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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am2
-rw-r--r--README.md6
-rwxr-xr-xautogen.sh1
-rw-r--r--configure.ac201
-rw-r--r--data/Makefile.am5
-rw-r--r--data/config.in8
-rw-r--r--eglib/src/eglib-remap.h6
-rw-r--r--eglib/src/glib.h21
-rw-r--r--eglib/src/goutput.c253
m---------external/cecil0
m---------external/ikvm0
-rw-r--r--libgc/configure.ac11
-rw-r--r--libgc/dyn_load.c4
-rw-r--r--libgc/include/gc.h2
-rw-r--r--libgc/include/private/gcconfig.h30
-rw-r--r--man/mono.111
-rw-r--r--mcs/Makefile2
-rw-r--r--mcs/build/profiles/basic.make2
-rw-r--r--mcs/build/profiles/net_4_0.make3
-rw-r--r--mcs/class/Accessibility/Accessibility.csproj70
-rw-r--r--mcs/class/Accessibility/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/Commons.Xml.Relaxng/Test/NvdlValidatingReaderTests.cs2
-rw-r--r--mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs3
-rw-r--r--mcs/class/I18N/CJK/I18N.CJK.csproj32
-rw-r--r--mcs/class/I18N/Common/I18N.csproj20
-rw-r--r--mcs/class/I18N/MidEast/I18N.MidEast.csproj25
-rw-r--r--mcs/class/I18N/Other/I18N.Other.csproj25
-rw-r--r--mcs/class/I18N/Rare/I18N.Rare.csproj25
-rw-r--r--mcs/class/I18N/West/I18N.West.csproj25
-rw-r--r--mcs/class/Makefile25
-rw-r--r--mcs/class/Managed.Windows.Forms/Makefile2
-rw-r--r--mcs/class/Managed.Windows.Forms/SWF.csproj4902
-rw-r--r--mcs/class/Managed.Windows.Forms/SWF.sln35
-rw-r--r--mcs/class/Managed.Windows.Forms/SWF2k5-tests.csproj402
-rw-r--r--mcs/class/Managed.Windows.Forms/SWF2k5.csproj1246
-rwxr-xr-xmcs/class/Managed.Windows.Forms/SWF2k5.sln35
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms.csproj35
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs3
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs9
-rwxr-xr-xmcs/class/Managed.Windows.Forms/build-csproj217
-rwxr-xr-xmcs/class/Managed.Windows.Forms/build-csproj2k5247
-rwxr-xr-xmcs/class/Managed.Windows.Forms/build-csproj2k5-tests267
-rw-r--r--mcs/class/Managed.Windows.Forms/resx.resx30
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs64
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskItem.cs5
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskPropertyGroup.cs6
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/IBuildTask.cs1
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs28
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs46
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs39
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskExecutionMode.cs (renamed from mcs/class/System.Web/System.Web.Util/ICalls.jvm.cs)28
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln26
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj106
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln16
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj115
-rw-r--r--mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources1
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp42
-rw-r--r--mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds17
-rwxr-xr-xmcs/class/Microsoft.Build.Engine/Test/various/Items.cs4
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.csproj66
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.sln20
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs5
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventContext.cs10
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs2
-rw-r--r--mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs4
-rwxr-xr-xmcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.csproj76
-rwxr-xr-xmcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.sln20
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs15
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs28
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs4
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/FindAppConfigFile.cs2
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs5
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs32
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs4
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs6
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs18
-rw-r--r--mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ResolveAssemblyReferenceTest.cs46
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj56
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.sln20
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs9
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/Logger.cs4
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskLoggingHelper.cs42
-rw-r--r--mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs8
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs30
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Execution/BuildManager.cs1
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs4
-rw-r--r--mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources1
-rw-r--r--mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs6
-rw-r--r--mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs55
-rw-r--r--mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs55
-rw-r--r--mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectTaskInstanceTest.cs84
-rw-r--r--[-rwxr-xr-x]mcs/class/Mono.CSharp/Mono.CSharp.csproj34
-rwxr-xr-xmcs/class/Mono.CSharp/Mono.CSharp.sln45
-rw-r--r--mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.csproj74
-rw-r--r--mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.sln42
-rw-r--r--mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter.csproj24
-rw-r--r--mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj26
-rw-r--r--mcs/class/Mono.Data.Tds/Mono.Data.Tds.csproj25
-rw-r--r--mcs/class/Mono.Data.Tds/Test/bug-4786.cs4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs61
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs11
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs70
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs51
-rw-r--r--mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs4
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs11
-rw-r--r--mcs/class/Mono.Debugger.Soft/Test/dtest.cs33
-rw-r--r--mcs/class/Mono.Options/Test/Mono.Options/OptionContextTest.cs2
-rw-r--r--mcs/class/Mono.Options/Test/Mono.Options/OptionSetTest.cs2
-rw-r--r--mcs/class/Mono.Options/Test/Mono.Options/OptionTest.cs2
-rw-r--r--mcs/class/Mono.Options/Test/Mono.Options/Utils.cs2
-rw-r--r--mcs/class/Mono.Posix/Mono.Posix.csproj23
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs6
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs4
-rw-r--r--mcs/class/Mono.Security/Mono.Security.csproj25
-rw-r--r--mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs20
-rw-r--r--mcs/class/Mono.WebBrowser/Makefile6
-rw-r--r--mcs/class/Mono.WebBrowser/Mono.WebBrowser.csproj23
-rw-r--r--mcs/class/Mono.WebBrowser/Mono.WebBrowser2K5.csproj250
-rwxr-xr-xmcs/class/Mono.WebBrowser/build-csproj2k5134
-rw-r--r--mcs/class/Novell.Directory.Ldap/.gitattributes1
-rw-r--r--mcs/class/Novell.Directory.Ldap/Makefile19
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/.gitattributes7
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/AuthenticationCallbackHandler.cs80
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ChangeLog27
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/CreateContextPrivilegedAction.cs105
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ExchangeTokenPrivilegedAction.cs73
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/Krb5Helper.cs197
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/SecureStream.cs208
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/UnwrapPrivilegedAction.cs80
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/WrapPrivilegedAction.cs80
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/RespExtensionSet.cs5
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/AssemblyInfo.cs4
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs21
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs138
-rw-r--r--mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/SupportClass.cs8
-rwxr-xr-xmcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap20.csproj353
-rw-r--r--mcs/class/Novell.Directory.Ldap/net_1_1_java_Novell.Directory.Ldap.dll.sources3
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources2
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs106
-rw-r--r--mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs34
-rw-r--r--mcs/class/System.Configuration/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Configuration/System.Configuration.csproj25
-rw-r--r--mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs21
-rw-r--r--mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs3
-rw-r--r--mcs/class/System.Configuration/System.Configuration/ConfigurationSection.cs2
-rw-r--r--mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs10
-rwxr-xr-xmcs/class/System.Configuration/System.Configuration20.csproj285
-rw-r--r--mcs/class/System.Configuration/Test/System.Configuration.Test20.csproj131
-rw-r--r--mcs/class/System.Configuration/Test/System.Configuration.Test20.sln23
-rw-r--r--mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs2
-rw-r--r--mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs9
-rw-r--r--mcs/class/System.Configuration/Test/Util/TestUtil.cs4
-rw-r--r--mcs/class/System.Core/System.Core.csproj28
-rw-r--r--mcs/class/System.Core/System.Core.dll.sources1
-rw-r--r--mcs/class/System.Core/System.Core_test.dll.sources1
-rw-r--r--mcs/class/System.Core/System.Linq.Expressions/Expression.cs2
-rw-r--r--mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs9
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.MonoTouch.cs9
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs213
-rw-r--r--mcs/class/System.Core/System/TimeZoneInfo.cs16
-rw-r--r--mcs/class/System.Core/Test/System.Collections.Generic/HashSetTest.cs1
-rw-r--r--mcs/class/System.Core/Test/System.Core.Tests-2008.JavaEE.csproj222
-rwxr-xr-xmcs/class/System.Core/Test/System.Core.Tests-2008.csproj133
-rw-r--r--mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest.cs2
-rw-r--r--mcs/class/System.Core/Test/System/TimeZoneInfo.SerializationTest.cs97
-rw-r--r--mcs/class/System.Core/mobile_System.Core.dll.sources1
-rw-r--r--mcs/class/System.Core/net_4_0_System.Core.dll.sources1
-rw-r--r--mcs/class/System.Data.DataSetExtensions/Assembly/AssemblyInfo.cs4
-rw-r--r--mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.csproj149
-rw-r--r--mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln25
-rw-r--r--mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.csproj91
-rw-r--r--mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.sln60
-rw-r--r--mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs5
-rw-r--r--mcs/class/System.Data.Linq/src/DbLinq/Schema/Dbml/DatabaseSerializer.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Makefile13
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleCommand.cs284
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConnection.cs116
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConvert.cs453
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleDataReader.cs276
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleError.cs67
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleErrorCollection.cs61
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleException.cs153
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleParameter.cs230
-rwxr-xr-xmcs/class/System.Data.OracleClient/System.Data.OracleClient.sln38
-rw-r--r--mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs2
-rwxr-xr-xmcs/class/System.Data.OracleClient/System.Data.OracleClient20.csproj162
-rwxr-xr-xmcs/class/System.Data.OracleClient/System.Data.OracleClient20.sln36
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.J2EE.config13
-rwxr-xr-xmcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests.J2EE.sln33
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.csproj231
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.sln26
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs28
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/DbTypeParametersCollection.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleCommand/OracleCommand_CommandTimeout.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_FillSchema_DsSt.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Fill_2.cs3
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_GetFillParameters.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Ds.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_DsStr.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Dt.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_GetName_I.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_NextResult.cs4
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_ctor.cs2
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleParameter/OracleParameter_ctor_SOtype.cs5
-rw-r--r--mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleTransaction/OracleTransaction_Rollback.cs2
-rwxr-xr-xmcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.exclude.sources47
-rwxr-xr-xmcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.sources19
-rw-r--r--mcs/class/System.Data.Services/System.Data.Services.csproj87
-rw-r--r--mcs/class/System.Data.Services/System.Data.Services.sln26
-rw-r--r--mcs/class/System.Data.Services/Test/ChangeInterceptorAttributeTests.cs6
-rw-r--r--mcs/class/System.Data.Services/Test/DataServiceExceptionTests.cs6
-rw-r--r--mcs/class/System.Data.Services/Test/DataServiceTests.cs6
-rw-r--r--mcs/class/System.Data.Services/Test/ETagAttributeTests.cs6
-rw-r--r--mcs/class/System.Data.Services/Test/ExpandSegmentCollectionTests.cs5
-rw-r--r--mcs/class/System.Data.Services/Test/ExpandSegmentTests.cs6
-rw-r--r--mcs/class/System.Data.Services/Test/IgnorePropertiesAttributeTests.cs6
-rw-r--r--mcs/class/System.Data.Services/Test/MimeTypeAttributeTests.cs5
-rw-r--r--mcs/class/System.Data.Services/Test/QueryInterceptorAttributeTests.cs6
-rw-r--r--mcs/class/System.Data.Services/Test/System.Data.Services.Tests.csproj73
-rw-r--r--mcs/class/System.Data/Assembly/AssemblyInfo.cs4
-rw-r--r--mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/GenericProvider.cs385
-rw-r--r--mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/IProvider.cs78
-rw-r--r--mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/OleDbSqlServerProvider.cs407
-rw-r--r--mcs/class/System.Data/Makefile8
-rw-r--r--mcs/class/System.Data/System.Data.Common/CatalogLocation.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbCommandSet.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbConnection.cs4
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbMetaDataCache.cs60
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbParameter.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs4
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbTable.cs212
-rw-r--r--mcs/class/System.Data/System.Data.Common/DbTransaction.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Common/SchemaLocation.cs2
-rw-r--r--mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs2
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbCommand.cs285
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs221
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConvert.cs342
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbDataReader.cs90
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbError.cs87
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbErrorCollection.cs74
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs163
-rw-r--r--mcs/class/System.Data/System.Data.OleDb.jvm/OleDbParameter.cs256
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs1273
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs737
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs311
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs1335
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbError.cs72
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs100
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs112
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs157
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/DbConvert.cs370
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs101
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs795
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase/DbCommandBase.cs2
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase/DbDataReaderBase.cs2
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase/DbParameterBase.cs2
-rw-r--r--mcs/class/System.Data/System.Data.ProviderBase/DbParameterCollectionBase.cs2
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs284
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs234
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConvert.cs243
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlDataReader.cs335
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlError.cs173
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlErrorCollection.cs77
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlException.cs165
-rw-r--r--mcs/class/System.Data/System.Data.SqlClient.jvm/SqlParameter.cs270
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlDecimal.cs897
-rw-r--r--mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs4
-rw-r--r--mcs/class/System.Data/System.Data/ConflictOption.cs2
-rw-r--r--mcs/class/System.Data/System.Data/ConflictOptions.cs2
-rw-r--r--mcs/class/System.Data/System.Data/DataColumn.cs2
-rw-r--r--mcs/class/System.Data/System.Data/DataRow.cs40
-rw-r--r--mcs/class/System.Data/System.Data/FillOptions.cs2
-rw-r--r--mcs/class/System.Data/System.Data/Res.cs155
-rw-r--r--mcs/class/System.Data/System.Data/UpdateOptions.cs2
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.config13
-rwxr-xr-xmcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.sln43
-rwxr-xr-xmcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.csproj254
-rwxr-xr-xmcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.sln36
-rw-r--r--mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs28
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/DataColumnMappingCollectionTest.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/DataTableMappingCollectionTest.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs35
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/DbDataReaderMock.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data.Common/DbDataReaderTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs16
-rw-r--r--mcs/class/System.Data/Test/System.Data.Test.sln34
-rwxr-xr-xmcs/class/System.Data/Test/System.Data.Test20.csproj287
-rwxr-xr-xmcs/class/System.Data/Test/System.Data.Test20.sln36
-rw-r--r--mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs15
-rw-r--r--mcs/class/System.Data/Test/System.Data/ConstraintExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs17
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs4
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataRowTest2.cs68
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataSetTest2.cs110
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableCollectionTest.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs14
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableTest.cs14
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableTest2.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableTest3.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableTest4.cs22
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataTableTest5.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataViewTest.cs3
-rw-r--r--mcs/class/System.Data/Test/System.Data/DataViewTest2.cs27
-rw-r--r--mcs/class/System.Data/Test/System.Data/DeletedRowInaccessibleExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/DuplicateNameExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/EvaluateExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/InRowChangingEventExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/InvalidConstraintExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/MissingPrimaryKeyExceptionTest.cs4
-rw-r--r--mcs/class/System.Data/Test/System.Data/NoNullAllowedExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/ReadOnlyExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/RowNotInTableExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/SyntaxErrorExceptionTest.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/TrailingSpaceTest.cs4
-rw-r--r--mcs/class/System.Data/Test/System.Data/UniqueConstraintTest2.cs2
-rw-r--r--mcs/class/System.Data/Test/System.Data/VersionNotFoundException.cs4
-rw-r--r--mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs4
-rw-r--r--mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs4
-rw-r--r--mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.DirectoryServices/.gitattributes1
-rw-r--r--mcs/class/System.DirectoryServices/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.DirectoryServices/System.DirectoryServices.sln35
-rwxr-xr-xmcs/class/System.DirectoryServices/System.DirectoryServices20.csproj161
-rwxr-xr-xmcs/class/System.DirectoryServices/System.DirectoryServices20.sln36
-rw-r--r--mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.csproj121
-rw-r--r--mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.sln34
-rw-r--r--mcs/class/System.DirectoryServices/Test/System.DirectoryServices.sln34
-rw-r--r--mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.exclude.sources5
-rw-r--r--mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.sources1
-rw-r--r--mcs/class/System.Drawing.Design/System.Drawing.Design.csproj85
-rw-r--r--mcs/class/System.Drawing/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Drawing/Makefile7
-rw-r--r--mcs/class/System.Drawing/SD2K5.csproj677
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs4
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/.gitattributes2
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs103
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs131
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs700
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs105
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs1082
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs220
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs150
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs60
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs346
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs295
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs286
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/.gitattributes2
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs184
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs298
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs700
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.jvm.cs181
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.jvm.cs362
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Imaging/MetafileHeader.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Text/.gitattributes3
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs89
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs57
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Text/LineLayout.jvm.cs193
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs58
-rw-r--r--mcs/class/System.Drawing/System.Drawing.Text/TextLineIterator.jvm.cs277
-rw-r--r--mcs/class/System.Drawing/System.Drawing/.gitattributes4
-rw-r--r--mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs554
-rw-r--r--mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs85
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs427
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs104
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Color.cs25
-rw-r--r--mcs/class/System.Drawing/System.Drawing/ColorConverter.cs5
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Font.jvm.cs382
-rw-r--r--mcs/class/System.Drawing/System.Drawing/FontConverter.cs2
-rw-r--r--mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs233
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs2628
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Icon.jvm.cs198
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Icon2.jvm.cs562
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Image.jvm.cs571
-rw-r--r--mcs/class/System.Drawing/System.Drawing/KnownColors.jvm.cs499
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs577
-rw-r--r--mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs137
-rw-r--r--mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs101
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Rectangle.cs7
-rw-r--r--mcs/class/System.Drawing/System.Drawing/RectangleF.cs15
-rw-r--r--mcs/class/System.Drawing/System.Drawing/Region.jvm.cs389
-rw-r--r--mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs280
-rw-r--r--mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs67
-rw-r--r--mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs278
-rw-r--r--mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs73
-rw-r--r--mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs226
-rw-r--r--mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs156
-rw-r--r--mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper20.J2EE.csproj168
-rw-r--r--mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP20.v1.J2EE.csproj161
-rw-r--r--mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs6
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs2
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs2
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs3
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs5
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs23
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs2
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs85
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs39
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs25
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Test20.J2EE.sln45
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing.Test20.sln32
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs15
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs6
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs40
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs3
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs11
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs59
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs79
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs12
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs102
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs18
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs18
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs83
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs18
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs18
-rw-r--r--mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs45
-rw-r--r--mcs/class/System.Drawing/Test/Test.dotnet.csproj541
-rw-r--r--mcs/class/System.Drawing/Test/Test20.J2EE.csproj212
-rw-r--r--mcs/class/System.Drawing/Test/Test20.csproj118
-rw-r--r--mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.exclude.sources82
-rw-r--r--mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.sources49
-rw-r--r--mcs/class/System.EnterpriseServices/System.EnterpriseServices.csproj23
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/Makefile3
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem_test.dll.sources1
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/Test/System.IO.Compression.FileSystem/ZipTest.cs109
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/ZipFile.cs111
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/ZipFileExtensions.cs69
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/foo/bar.txt0
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/foo/foo.txt1
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/foo/foobar/bar.txt0
-rw-r--r--mcs/class/System.IO.Compression.FileSystem/foo/foobar/foo.txt0
-rw-r--r--mcs/class/System.IO.Compression/SharpCompress/Writer/Zip/ZipWriter.cs2
-rw-r--r--mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs24
-rw-r--r--mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors.csproj82
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel-net_4_5.csproj35
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs (renamed from mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.jvm.cs)23
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs (renamed from mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry .jvm.cs)29
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs (renamed from mcs/class/System/System.Text.RegularExpressions/AlternationBackReferenceConstruct.jvm.cs)42
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs (renamed from mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute .jvm.cs)56
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs (renamed from mcs/class/System/System.Text.RegularExpressions/BalancingGroupConstruct.jvm.cs)61
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs (renamed from mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.jvm.cs)43
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs55
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs (renamed from mcs/class/System/System.Text.RegularExpressions/CategoryConstruct.jvm.cs)48
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs (renamed from mcs/class/System/System.Text.RegularExpressions/Group.jvm.cs)56
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs (renamed from mcs/class/System.Web/System.Web.UI/BaseTemplateParser.jvm.cs)37
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs45
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs (renamed from mcs/class/System/System.Text.RegularExpressions/RightToLeftOptionConstruct.jvm.cs)46
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs (renamed from mcs/class/System.Drawing/System.Drawing/SolidBrush.jvm.cs)79
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs (renamed from mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.jvm.cs)42
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs (renamed from mcs/class/System.Web/System.Web/IHttpExtendedWorkerRequest.cs)36
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs47
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs50
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs (renamed from mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.jvm.cs)37
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs41
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs2
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs74
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs123
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs197
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs66
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs109
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs (renamed from mcs/class/System/System.Text.RegularExpressions/AlternationExpressionConstruct.jvm.cs)43
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs (renamed from mcs/class/System.Web/System.Web.UI/TemplateBuilder.jvm.cs)82
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs148
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs (renamed from mcs/class/System.Web/System.Web.UI/SkinBuilder.jvm.cs)43
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs50
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs62
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel.csproj165
-rwxr-xr-xmcs/class/System.IdentityModel/System.IdentityModel.dll.sources34
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs (renamed from mcs/class/System.Web/System.Web.UI/ObjectTagBuilder.jvm.cs)30
-rw-r--r--mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs (renamed from mcs/class/System/System.Text.RegularExpressions/IConstructType.jvm.cs)26
-rw-r--r--mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs (renamed from mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.jvm.cs)26
-rw-r--r--mcs/class/System.Json/System.Json/JsonPrimitive.cs11
-rw-r--r--mcs/class/System.Json/System.Json/JsonValue.cs31
-rw-r--r--mcs/class/System.Json/Test/System.Json/JsonValueTest.cs146
-rw-r--r--mcs/class/System.Net.Http/HtppLibrary.csproj103
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs16
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/ContentRangeHeaderValue.cs2
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs1
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs10
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http.Headers/RangeHeaderValue.cs4
-rw-r--r--mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs12
-rw-r--r--mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs39
-rw-r--r--mcs/class/System.Net.Http/Test/System.Net.Http.Headers/MediaTypeHeaderValueTest.cs8
-rw-r--r--mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs24
-rw-r--r--mcs/class/System.Net.Http/Test/System.Net.Http/StreamContentTest.cs10
-rw-r--r--mcs/class/System.Numerics/System.Numerics/BigInteger.cs86
-rw-r--r--mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs25
-rw-r--r--mcs/class/System.Runtime.Remoting/.gitattributes2
-rw-r--r--mcs/class/System.Runtime.Remoting/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.jvm.cs128
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs2
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs17
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/BinaryCore.cs5
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/RemotingThreadPool.cs12
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs40
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.MetadataServices/MetaData.cs4
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.csproj176
-rw-r--r--mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.sln26
-rw-r--r--mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.exclude.sources4
-rw-r--r--mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.sources3
-rw-r--r--mcs/class/System.Runtime.Serialization.Formatters.Soap/.gitattributes1
-rw-r--r--mcs/class/System.Runtime.Serialization.Formatters.Soap/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapReader.cs2
-rw-r--r--mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapWriter.cs8
-rw-r--r--mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.csproj130
-rw-r--r--mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.sln23
-rw-r--r--mcs/class/System.Runtime.Serialization.Formatters.Soap/net_1_1_java_System.Runtime.Serialization.Formatters.Soap.dll.sources1
-rw-r--r--mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.csproj134
-rw-r--r--mcs/class/System.Security/System.Security.csproj27
-rw-r--r--mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs105
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Web.csproj158
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.csproj112
-rw-r--r--mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.sln31
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel.csproj1129
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs3
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs2
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs3
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs45
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/ServiceRuntimeChannel.cs4
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj290
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj.user10
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel_Test.sln71
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs2
-rw-r--r--mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs2
-rw-r--r--mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceBaseTest.cs7
-rw-r--r--mcs/class/System.Transactions/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Transactions/System.Transactions.csproj21
-rw-r--r--mcs/class/System.Transactions/System.Transactions/TransactionScope.cs5
-rw-r--r--mcs/class/System.Transactions/Test/TransactionScopeTest.cs18
-rw-r--r--mcs/class/System.Web.Extensions.Design/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Web.Extensions.Design/System.Web.Extensions.Design.csproj94
-rw-r--r--mcs/class/System.Web.Extensions/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.csproj261
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.sln60
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Extensions.csproj164
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Handlers/ScriptResourceHandler.cs6
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs4
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs2
-rw-r--r--mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs2
-rw-r--r--mcs/class/System.Web.Extensions/Test/AUT/SystemWebExtensionsAUT.JavaEE.csproj747
-rw-r--r--mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.csproj85
-rw-r--r--mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.sln36
-rw-r--r--mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptBehaviorDescriptorTest.cs24
-rw-r--r--mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptComponentDescriptorTest.cs24
-rw-r--r--mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptControlDescriptorTest.cs24
-rw-r--r--mcs/class/System.Web.Services/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Configuration/WebServicesConfigurationSectionHandler.cs12
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs4
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionSerializerBase2.cs2
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Description/SoapTransportImporter.cs11
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapDocumentationHandler.cs8
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapExtension.cs11
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/TypeStubManager.cs21
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/WebClientProtocol.cs11
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandlerFactory.cs2
-rwxr-xr-xmcs/class/System.Web.Services/System.Web.Services20.csproj418
-rwxr-xr-xmcs/class/System.Web.Services/System.Web.Services20.sln61
-rw-r--r--mcs/class/System.Web/Assembly/AssemblyInfo.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.jvm.cs59
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/BuildManager.jvm.cs53
-rw-r--r--mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.jvm.cs59
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/AppSettings.jvm.cs80
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs2
-rw-r--r--mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs4
-rw-r--r--mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs3
-rw-r--r--mcs/class/System.Web/System.Web.J2EE/J2EEConsts.cs66
-rw-r--r--mcs/class/System.Web/System.Web.J2EE/J2EEUtils.cs334
-rw-r--r--mcs/class/System.Web/System.Web.J2EE/ObjectInputStream.cs244
-rw-r--r--mcs/class/System.Web/System.Web.J2EE/ObjectOutputStream.cs220
-rw-r--r--mcs/class/System.Web/System.Web.J2EE/PageMapper.cs576
-rw-r--r--mcs/class/System.Web/System.Web.Mail/SmtpClient.cs6
-rw-r--r--mcs/class/System.Web/System.Web.Profile/ProfileParser.jvm.cs101
-rw-r--r--mcs/class/System.Web/System.Web.Security/AnonymousIdentificationModule.cs19
-rw-r--r--mcs/class/System.Web/System.Web.Testing.csproj90
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/Content.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs5
-rw-r--r--mcs/class/System.Web/System.Web.UI/BaseParser.jvm.cs47
-rw-r--r--mcs/class/System.Web/System.Web.UI/ClientScriptManager.jvm.cs67
-rw-r--r--mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.jvm.cs46
-rw-r--r--mcs/class/System.Web/System.Web.UI/Control.jvm.cs301
-rw-r--r--mcs/class/System.Web/System.Web.UI/ControlBuilder.jvm.cs89
-rw-r--r--mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter .jvm.cs93
-rw-r--r--mcs/class/System.Web/System.Web.UI/DesignTimeParseData.jvm.cs100
-rw-r--r--mcs/class/System.Web/System.Web.UI/EventEntry.jvm.cs51
-rw-r--r--mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs28
-rw-r--r--mcs/class/System.Web/System.Web.UI/IScriptManager.cs2
-rw-r--r--mcs/class/System.Web/System.Web.UI/IndexedString.jvm.cs45
-rw-r--r--mcs/class/System.Web/System.Web.UI/MasterPage.cs6
-rw-r--r--mcs/class/System.Web/System.Web.UI/MasterPageParser.jvm.cs73
-rw-r--r--mcs/class/System.Web/System.Web.UI/ObjectPersistData.jvm.cs64
-rw-r--r--mcs/class/System.Web/System.Web.UI/Page.cs39
-rw-r--r--mcs/class/System.Web/System.Web.UI/Page.jvm.cs496
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageHandlerFactory.jvm.cs50
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageParser.jvm.cs58
-rw-r--r--mcs/class/System.Web/System.Web.UI/PageParserFilter.jvm.cs91
-rw-r--r--mcs/class/System.Web/System.Web.UI/RootBuilder.jvm.cs67
-rw-r--r--mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.jvm.cs58
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateControl.jvm.cs699
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateControlParser.jvm.cs52
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplateParser.jvm.cs53
-rw-r--r--mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.jvm.cs43
-rw-r--r--mcs/class/System.Web/System.Web.UI/ThemeProvider.jvm.cs85
-rw-r--r--mcs/class/System.Web/System.Web.UI/VerificationAttribute.jvm.cs114
-rw-r--r--mcs/class/System.Web/System.Web.UI/ViewStateException .jvm.cs87
-rw-r--r--mcs/class/System.Web/System.Web.UI/WebServiceParser.jvm.cs47
-rw-r--r--mcs/class/System.Web/System.Web.csproj32
-rw-r--r--mcs/class/System.Web/System.Web/BaseParamsCollection.cs4
-rw-r--r--mcs/class/System.Web/System.Web/CapabilitiesLoader.cs49
-rw-r--r--mcs/class/System.Web/System.Web/HttpApplication.cs14
-rw-r--r--mcs/class/System.Web/System.Web/HttpApplication.jvm.cs1714
-rw-r--r--mcs/class/System.Web/System.Web/HttpContext.cs12
-rw-r--r--mcs/class/System.Web/System.Web/HttpContext.jvm.cs141
-rwxr-xr-xmcs/class/System.Web/System.Web/HttpRequest.cs10
-rw-r--r--mcs/class/System.Web/System.Web/HttpRequest.jvm.cs237
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponse.cs6
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponse.jvm.cs14
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponseStream.cs84
-rw-r--r--mcs/class/System.Web/System.Web/HttpResponseStream.jvm.cs637
-rw-r--r--mcs/class/System.Web/System.Web/HttpRuntime.cs8
-rwxr-xr-xmcs/class/System.Web/System.Web/HttpWorkerRequest.cs2
-rw-r--r--mcs/class/System.Web/System.Web/HttpWorkerRequest.jvm.cs82
-rw-r--r--mcs/class/System.Web/System.Web/HttpWriter.cs8
-rw-r--r--mcs/class/System.Web/System.Web/MimeTypes.cs10
-rw-r--r--mcs/class/System.Web/System.Web/SiteMap.cs15
-rw-r--r--mcs/class/System.Web/System.Web/SiteMapNodeCollection.cs9
-rw-r--r--mcs/class/System.Web/System.Web/StaticFileHandler.cs17
-rw-r--r--mcs/class/System.Web/System.Web20.csproj1509
-rw-r--r--mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs6
-rw-r--r--mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs2
-rw-r--r--mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs3
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs1
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs4
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs3
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs3
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs12
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs2
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceDerbyTest.cs268
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs3
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs3
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs8
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI/PageTest.cs8
-rw-r--r--mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs27
-rw-r--r--mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs6
-rw-r--r--mcs/class/System.Web/Test/System.Web/HttpServerUtilityTest.cs3
-rw-r--r--mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs11
-rw-r--r--mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs3
-rw-r--r--mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs4
-rw-r--r--mcs/class/System.Web/Test/System.Web_test_net_2_0.csproj978
-rw-r--r--mcs/class/System.Web/Test/TestMonoWeb.J2EE20.sln46
-rw-r--r--mcs/class/System.Web/Test/TestMonoWeb.csproj969
-rw-r--r--mcs/class/System.Web/Test/TestMonoWeb20.csproj458
-rw-r--r--mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/HtmlWeb.cs2
-rw-r--r--mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/tools.cs52
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs4
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs9
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs8
-rw-r--r--mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs32
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj211
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPointTest.cs2
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnovaResultTest.cs2
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotationTest.cs2
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyleTest.cs2
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ChartElementTest.cs2
-rw-r--r--mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/DataPointTest.cs2
-rw-r--r--mcs/class/System.XML/Assembly/AssemblyInfo.cs2
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslLiteralElement.cs3
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs13
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl/MSXslScriptManager.cs2
-rw-r--r--mcs/class/System.XML/Mono.Xml.Xsl/XslDecimalFormat.jvm.cs155
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/SchemaImporter.cs2
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs59
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs48
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs2
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs43
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs4
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs8
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriter.cs4
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriterInterpreter.cs21
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs15
-rw-r--r--mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs15
-rw-r--r--mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs4
-rw-r--r--mcs/class/System.XML/System.Xml.csproj36
-rw-r--r--mcs/class/System.XML/System.Xml/XmlConvert.cs2
-rw-r--r--mcs/class/System.XML/System.Xml/XmlInputStream.cs6
-rw-r--r--mcs/class/System.XML/System.Xml/XmlReader.cs4
-rwxr-xr-xmcs/class/System.XML/System.Xml20.csproj555
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Serialization/ComplexDataStructure.cs3
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs47
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs43
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs183
-rwxr-xr-xmcs/class/System.XML/Test/System.Xml.Test20.csproj197
-rwxr-xr-xmcs/class/System.XML/Test/System.Xml.Test20.sln36
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs33
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs12
-rwxr-xr-xmcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/README.j2ee13
-rwxr-xr-xmcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/run-test.j2ee.bat3
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.csproj106
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.sln31
-rw-r--r--mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs4
-rw-r--r--mcs/class/System.XML/Test/System.Xml/W3C/README.j2ee13
-rw-r--r--mcs/class/System.XML/Test/System.Xml/W3C/W3C.J2EE.csproj79
-rw-r--r--mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.csproj104
-rw-r--r--mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.sln25
-rw-r--r--mcs/class/System.XML/Test/System.Xml/W3C/run-test.j2ee.bat2
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs2
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs4
-rw-r--r--mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs2
-rw-r--r--mcs/class/System.XML/net_1_1_java_System.Xml.dll.exclude.sources5
-rw-r--r--mcs/class/System.XML/net_1_1_java_System.Xml.dll.sources2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq.csproj151
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs3
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs2
-rw-r--r--mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs8
-rw-r--r--mcs/class/System.Xml.Linq/Test/System.Xml.Linq.Tests.csproj134
-rw-r--r--mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XDocumentTest.cs17
-rw-r--r--mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs8
-rw-r--r--mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs10
-rw-r--r--mcs/class/System/System.Collections.Generic/RBTree.cs9
-rw-r--r--mcs/class/System/System.ComponentModel/Component.cs7
-rw-r--r--mcs/class/System/System.ComponentModel/MarshalByValueComponent.cs2
-rw-r--r--mcs/class/System/System.ComponentModel/PropertyDescriptorCollection.cs24
-rw-r--r--mcs/class/System/System.ComponentModel/TypeDescriptor.cs2
-rw-r--r--mcs/class/System/System.ComponentModel/Win32Exception.cs9
-rw-r--r--mcs/class/System/System.Configuration/AppSettingsReader.cs2
-rw-r--r--mcs/class/System/System.Configuration/ApplicationSettingsBase.cs2
-rw-r--r--mcs/class/System/System.Configuration/ConfigurationSettings.cs64
-rw-r--r--mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs25
-rw-r--r--mcs/class/System/System.Configuration/LocalFileSettingsProvider.cs9
-rw-r--r--mcs/class/System/System.Diagnostics/.gitattributes4
-rw-r--r--mcs/class/System/System.Diagnostics/Debugger.jvm.cs94
-rw-r--r--mcs/class/System/System.Diagnostics/DefaultTraceListener.cs9
-rw-r--r--mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs4
-rw-r--r--mcs/class/System/System.Diagnostics/SourceSwitch.cs7
-rw-r--r--mcs/class/System/System.Diagnostics/StackFrame.jvm.cs347
-rw-r--r--mcs/class/System/System.Diagnostics/StackTrace.jvm.cs287
-rw-r--r--mcs/class/System/System.Diagnostics/Switch.cs4
-rwxr-xr-xmcs/class/System/System.Diagnostics/TraceEventCache.jvm.cs52
-rw-r--r--mcs/class/System/System.Diagnostics/TraceListener.cs50
-rw-r--r--mcs/class/System/System.IO.Compression/DefalteStream.jvm.cs369
-rw-r--r--mcs/class/System/System.IO.Compression/DeflateStream.cs38
-rw-r--r--mcs/class/System/System.IO.Compression/GZipStream.cs8
-rw-r--r--mcs/class/System/System.IO.Ports/SerialPort.cs2
-rw-r--r--mcs/class/System/System.IO.Ports/SerialPortStream.cs5
-rw-r--r--mcs/class/System/System.IO.Ports/WinSerialStream.cs4
-rw-r--r--mcs/class/System/System.Net.Mail/SmtpClient.cs24
-rw-r--r--mcs/class/System/System.Net.Mail/SmtpException.cs2
-rw-r--r--mcs/class/System/System.Net.Mail/SmtpFailedRecipientException.cs2
-rw-r--r--mcs/class/System/System.Net.Mail/SmtpFailedRecipientsException.cs2
-rw-r--r--mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs18
-rw-r--r--mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs35
-rw-r--r--mcs/class/System/System.Net.Sockets/.gitattributes4
-rw-r--r--mcs/class/System/System.Net.Sockets/GHSocket.jvm.cs63
-rw-r--r--mcs/class/System/System.Net.Sockets/GHSocketFactory.jvm.cs210
-rw-r--r--mcs/class/System/System.Net.Sockets/GHStreamSocket.jvm.cs1273
-rw-r--r--mcs/class/System/System.Net.Sockets/GHStreamSocketSSL.jvm.cs620
-rw-r--r--mcs/class/System/System.Net.Sockets/NetworkStream.cs12
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket.cs6
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket.jvm.cs2586
-rw-r--r--mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs8
-rw-r--r--mcs/class/System/System.Net.Sockets/SocketException.cs5
-rw-r--r--mcs/class/System/System.Net.Sockets/Socket_2_1.cs6
-rw-r--r--mcs/class/System/System.Net.Sockets/TcpClient.cs12
-rw-r--r--mcs/class/System/System.Net.Sockets/TcpListener.cs3
-rw-r--r--mcs/class/System/System.Net.Sockets/UdpClient.cs15
-rw-r--r--mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs86
-rw-r--r--mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs6
-rw-r--r--mcs/class/System/System.Net/.gitattributes5
-rw-r--r--mcs/class/System/System.Net/ChunkStream.cs7
-rw-r--r--mcs/class/System/System.Net/CookieException.cs2
-rw-r--r--mcs/class/System/System.Net/Dns.cs47
-rw-r--r--mcs/class/System/System.Net/FileWebResponse.cs4
-rw-r--r--mcs/class/System/System.Net/FtpWebRequest.cs5
-rw-r--r--mcs/class/System/System.Net/HttpListenerContext.cs22
-rw-r--r--mcs/class/System/System.Net/HttpProvider.jvm.cs331
-rw-r--r--mcs/class/System/System.Net/HttpStateCache.jvm.cs43
-rw-r--r--mcs/class/System/System.Net/HttpUtility.cs4
-rw-r--r--mcs/class/System/System.Net/HttpWebRequest.jvm.cs614
-rw-r--r--mcs/class/System/System.Net/HttpWebResponse.jvm.cs534
-rw-r--r--mcs/class/System/System.Net/ProtocolViolationException.cs2
-rw-r--r--mcs/class/System/System.Net/ServicePoint.cs2
-rw-r--r--mcs/class/System/System.Net/ServicePointManager.cs13
-rw-r--r--mcs/class/System/System.Net/VMWHttpProvider.jvm.cs1305
-rw-r--r--mcs/class/System/System.Net/WebClient.cs33
-rw-r--r--mcs/class/System/System.Net/WebConnection.cs4
-rw-r--r--mcs/class/System/System.Net/WebConnectionStream.cs14
-rw-r--r--mcs/class/System/System.Net/WebException.cs2
-rw-r--r--mcs/class/System/System.Net/WebHeaderCollection.cs2
-rw-r--r--mcs/class/System/System.Net/WebResponse.cs4
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/.gitattributes2
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/BackReferenceConstruct.jvm.cs146
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs8
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/CommentsConstruct.jvm.cs69
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/Group.cs2
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/InlineExplicitCaptureConstruct.jvm.cs54
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/JavaUtils.jvm.cs92
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/JvmReMachine.jvm.cs191
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/LookBehindWithUndefinedLength.jvm.cs24
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/Match.cs2
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/Match.jvm.cs100
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/NamingGroupsConstruct.jvm.cs197
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/NotAllowedConstruct.jvm.cs23
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/PatternData.jvm.cs134
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/PatternDataBuilder.jvm.cs90
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/PatternGrouping.jvm.cs196
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/Regex.cs8
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/Regex.jvm.cs119
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/ReplacedRegularCharacterConstruct.jvm.cs95
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/ReplacementData.jvm.cs122
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/RxInterpreter.cs2
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/arch.cs1
-rw-r--r--mcs/class/System/System.Text.RegularExpressions/interpreter.cs58
-rw-r--r--mcs/class/System/System.Timers/Timer.cs56
-rw-r--r--mcs/class/System/System.csproj62
-rw-r--r--mcs/class/System/System.dll.sources1
-rw-r--r--mcs/class/System/System/AndroidPlatform.cs34
-rw-r--r--mcs/class/System/System/Uri.cs751
-rw-r--r--mcs/class/System/System/UriElements.cs16
-rw-r--r--mcs/class/System/System/UriHelper.cs606
-rw-r--r--mcs/class/System/System/UriParseComponents.cs366
-rw-r--r--mcs/class/System/System/UriParser.cs98
-rw-r--r--mcs/class/System/System_test.dll.sources4
-rw-r--r--mcs/class/System/Test/System.Collections.Generic/QueueTest.cs3
-rw-r--r--mcs/class/System/Test/System.Collections.Generic/StackTest.cs3
-rw-r--r--mcs/class/System/Test/System.ComponentModel/ArrayConverterTests.cs2
-rw-r--r--mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs3
-rw-r--r--mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs3
-rw-r--r--mcs/class/System/Test/System.ComponentModel/ToolboxItemAttributeTests.cs3
-rw-r--r--mcs/class/System/Test/System.ComponentModel/TypeConverterTests.cs3
-rw-r--r--mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs4
-rw-r--r--mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs11
-rw-r--r--mcs/class/System/Test/System.Diagnostics/SourceSwitchTest.cs82
-rw-r--r--mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs16
-rw-r--r--mcs/class/System/Test/System.Diagnostics/TextWriterTraceListenerHelper.cs88
-rw-r--r--mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs55
-rw-r--r--mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs26
-rw-r--r--mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs133
-rwxr-xr-xmcs/class/System/Test/System.Net.Sockets/SocketTest.cs25
-rwxr-xr-xmcs/class/System/Test/System.Net.Sockets/SocketTest.jvm.cs2947
-rw-r--r--mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs3
-rw-r--r--mcs/class/System/Test/System.Net/DnsTest.cs11
-rw-r--r--mcs/class/System/Test/System.Net/FileWebRequestTest.cs39
-rw-r--r--mcs/class/System/Test/System.Net/FileWebResponseTest.cs22
-rw-r--r--mcs/class/System/Test/System.Net/HttpListener2Test.cs3
-rw-r--r--mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs3
-rw-r--r--mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs5
-rw-r--r--mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs3
-rw-r--r--mcs/class/System/Test/System.Net/HttpListenerTest.cs5
-rw-r--r--mcs/class/System/Test/System.Net/HttpWebRequestTest.cs43
-rw-r--r--mcs/class/System/Test/System.Net/HttpWebResponseTest.cs3
-rw-r--r--mcs/class/System/Test/System.Net/IPAddressTest.cs6
-rw-r--r--mcs/class/System/Test/System.Net/NetworkCredentialTest.cs2
-rw-r--r--mcs/class/System/Test/System.Net/ServicePointManagerTest.cs3
-rw-r--r--mcs/class/System/Test/System.Net/ServicePointTest.cs13
-rw-r--r--mcs/class/System/Test/System.Net/WebHeaderCollectionTest.cs13
-rw-r--r--mcs/class/System/Test/System.Net/WebProxyTest.cs6
-rw-r--r--mcs/class/System/Test/System.Net/WebUtilityTest.cs3
-rw-r--r--mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs5
-rw-r--r--mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs5
-rw-r--r--mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs7
-rw-r--r--mcs/class/System/Test/System.Security.Cryptography/OidTest.cs5
-rw-r--r--mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs21
-rw-r--r--mcs/class/System/Test/System.Timers/TimerTest.cs96
-rw-r--r--mcs/class/System/Test/System/StringTester.cs155
-rw-r--r--mcs/class/System/Test/System/UriBuilderTest.cs20
-rw-r--r--mcs/class/System/Test/System/UriParserTest.cs4
-rw-r--r--mcs/class/System/Test/System/UriPermutationsTest.cs312
-rw-r--r--mcs/class/System/Test/System/UriTest.cs124
-rw-r--r--mcs/class/System/Test/System/UriTest2.cs1198
-rw-r--r--mcs/class/System/Test/System/UriTest3.cs12
-rw-r--r--mcs/class/System/mobile_System.dll.sources2
-rw-r--r--mcs/class/WindowsBase/System.IO.Packaging/Check.cs4
-rw-r--r--mcs/class/WindowsBase/System.IO.Packaging/PackUriHelper.cs8
-rw-r--r--mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs2
-rw-r--r--mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs17
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackage.cs6
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePart.cs4
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePartTests.cs9
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackageTests.cs4
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/FakeStream.cs3
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/PackUriHelperTests.cs11
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartFileTests.cs4
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartStreamTests.cs6
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartTest.cs4
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/PackageRelationshipTests.cs4
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/PackageTest.cs8
-rw-r--r--mcs/class/WindowsBase/Test/System.IO.Packaging/TestBase.cs4
-rw-r--r--mcs/class/WindowsBase/WindowsBase.csproj280
-rw-r--r--mcs/class/WindowsBase/WindowsBase.sln21
-rw-r--r--mcs/class/corlib/Makefile4
-rw-r--r--mcs/class/corlib/System.Collections.Generic/Dictionary.cs30
-rw-r--r--mcs/class/corlib/System.Globalization/CalendricalCalculations.cs23
-rw-r--r--mcs/class/corlib/System.IO/DirectoryInfo.cs28
-rw-r--r--mcs/class/corlib/System.IO/Path.cs6
-rw-r--r--mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs78
-rw-r--r--mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs6
-rw-r--r--mcs/class/corlib/System.Reflection/Assembly.cs7
-rw-r--r--mcs/class/corlib/System.Reflection/ParameterInfo.cs18
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs6
-rw-r--r--mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs9
-rw-r--r--mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs (renamed from mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.jvm.cs)28
-rw-r--r--mcs/class/corlib/System.Runtime/GCSettings.cs11
-rw-r--r--mcs/class/corlib/System.Security.Claims/AuthenticationTypes.cs42
-rw-r--r--mcs/class/corlib/System.Security.Claims/ClaimTypes.cs24
-rw-r--r--mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs88
-rwxr-xr-x[-rw-r--r--]mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs27
-rw-r--r--mcs/class/corlib/System.Security.Principal/GenericIdentity.cs55
-rw-r--r--mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs25
-rw-r--r--mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs5
-rw-r--r--mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs27
-rw-r--r--mcs/class/corlib/System.Text/Encoding.cs18
-rw-r--r--mcs/class/corlib/System.Text/EncodingDecoder.cs102
-rw-r--r--mcs/class/corlib/System.Text/EncodingEncoder.cs99
-rw-r--r--mcs/class/corlib/System.Text/UTF7Encoding.cs14
-rw-r--r--mcs/class/corlib/System.Text/UTF8Encoding.cs137
-rw-r--r--mcs/class/corlib/System.Text/UnicodeEncoding.cs7
-rw-r--r--mcs/class/corlib/System.Threading.Tasks/Task.cs2
-rw-r--r--mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs9
-rw-r--r--mcs/class/corlib/System.Threading/Volatile.cs2
-rw-r--r--mcs/class/corlib/System/AndroidPlatform.cs22
-rw-r--r--mcs/class/corlib/System/DateTime.cs72
-rw-r--r--mcs/class/corlib/System/DateTimeOffset.cs371
-rw-r--r--mcs/class/corlib/System/Decimal.cs8
-rw-r--r--mcs/class/corlib/System/Delegate.cs75
-rw-r--r--mcs/class/corlib/System/DelegateSerializationHolder.cs30
-rw-r--r--mcs/class/corlib/System/NumberFormatter.cs36
-rw-r--r--mcs/class/corlib/System/NumberFormatter.jvm.cs1020
-rw-r--r--mcs/class/corlib/System/String.cs19
-rw-r--r--mcs/class/corlib/System/TimeZone.cs6
-rw-r--r--mcs/class/corlib/Test/Mono/DataConvertTest.cs8
-rw-r--r--mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs1
-rw-r--r--mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs10
-rw-r--r--mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Collections/HashtableTest.cs8
-rw-r--r--mcs/class/corlib/Test/System.Collections/SortedListTest.cs19
-rw-r--r--mcs/class/corlib/Test/System.Globalization/CalendarTest.cs39
-rw-r--r--mcs/class/corlib/Test/System.Globalization/CompareInfoTest.jvm.cs690
-rw-r--r--mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs1
-rw-r--r--mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Globalization/DaylightTimeTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs24
-rw-r--r--mcs/class/corlib/Test/System.IO/DirectoryTest.cs48
-rw-r--r--mcs/class/corlib/Test/System.IO/FileInfoTest.cs1
-rw-r--r--mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs49
-rw-r--r--mcs/class/corlib/Test/System.IO/FileStreamTest.cs15
-rw-r--r--mcs/class/corlib/Test/System.IO/FileSystemInfoTest.cs6
-rw-r--r--mcs/class/corlib/Test/System.IO/FileTest.cs47
-rw-r--r--mcs/class/corlib/Test/System.IO/PathTest.cs23
-rw-r--r--mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs14
-rw-r--r--mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs14
-rw-r--r--mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs20
-rw-r--r--mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs8
-rw-r--r--mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs52
-rw-r--r--mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs10
-rw-r--r--mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs21
-rw-r--r--mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs48
-rw-r--r--mcs/class/corlib/Test/System.Security.Claims/ClaimsIdentityTest.cs560
-rw-r--r--mcs/class/corlib/Test/System.Security.Claims/ClaimsPrincipalTest.cs256
-rw-r--r--mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs6
-rw-r--r--mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs6
-rw-r--r--mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs2
-rw-r--r--mcs/class/corlib/Test/System.Security/SecureStringCas.cs2
-rw-r--r--mcs/class/corlib/Test/System.Security/SecureStringTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Text/DecoderTest.cs32
-rw-r--r--mcs/class/corlib/Test/System.Text/EncoderTest.cs33
-rw-r--r--mcs/class/corlib/Test/System.Text/EncodingTester.cs116
-rw-r--r--mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs83
-rw-r--r--mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs11
-rw-r--r--mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs4
-rw-r--r--mcs/class/corlib/Test/System.Threading/InterlockedTest.cs8
-rw-r--r--mcs/class/corlib/Test/System.Threading/MutexTest.cs1
-rw-r--r--mcs/class/corlib/Test/System.Threading/ThreadTest.cs6
-rw-r--r--mcs/class/corlib/Test/System/ActivatorTest.cs17
-rw-r--r--mcs/class/corlib/Test/System/AppDomainSetupTest.cs8
-rw-r--r--mcs/class/corlib/Test/System/ArrayTest.cs18
-rw-r--r--mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs42
-rw-r--r--mcs/class/corlib/Test/System/ConvertTest.cs3
-rw-r--r--mcs/class/corlib/Test/System/DateTimeOffsetTest.cs54
-rw-r--r--mcs/class/corlib/Test/System/DateTimeTest.cs35
-rw-r--r--mcs/class/corlib/Test/System/DecimalTest.cs13
-rw-r--r--mcs/class/corlib/Test/System/DecimalTest2.cs15
-rw-r--r--mcs/class/corlib/Test/System/DelegateTest.cs114
-rw-r--r--mcs/class/corlib/Test/System/EnumTest.cs8
-rw-r--r--mcs/class/corlib/Test/System/EnvironmentTest.cs4
-rw-r--r--mcs/class/corlib/Test/System/MathTest.cs6
-rw-r--r--mcs/class/corlib/Test/System/StringComparerTest.cs7
-rw-r--r--mcs/class/corlib/Test/System/StringTest.cs9
-rw-r--r--mcs/class/corlib/Test/System/TimeZoneTest.cs6
-rw-r--r--mcs/class/corlib/Test/System/TypeTest.cs12
-rw-r--r--mcs/class/corlib/corlib.csproj35
-rw-r--r--mcs/class/corlib/corlib.dll.sources4
-rw-r--r--mcs/class/corlib/corlib_test.dll.sources2
-rw-r--r--mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs47
-rw-r--r--mcs/class/monodoc/Monodoc/cache.cs4
-rw-r--r--mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs72
-rw-r--r--mcs/class/monodoc/Monodoc/providers/ecma-provider.cs78
-rw-r--r--mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs2
-rw-r--r--mcs/errors/CS0012-24-lib.il33
-rw-r--r--mcs/errors/Makefile2
-rw-r--r--mcs/errors/cs0012-24.cs11
-rw-r--r--mcs/errors/cs0021-5.cs12
-rw-r--r--mcs/errors/cs0023-20.cs13
-rw-r--r--mcs/errors/cs0023-21.cs12
-rw-r--r--mcs/errors/cs0023-22.cs10
-rw-r--r--mcs/errors/cs0023-23.cs12
-rw-r--r--mcs/errors/cs0023-24.cs11
-rw-r--r--mcs/errors/cs0100-8.cs7
-rw-r--r--mcs/errors/cs0102-99.cs11
-rw-r--r--mcs/errors/cs0103-13.cs (renamed from mcs/errors/cs9006.cs)2
-rw-r--r--mcs/errors/cs0103-14.cs10
-rw-r--r--mcs/errors/cs0111-10.cs16
-rw-r--r--mcs/errors/cs0121-25.cs33
-rw-r--r--mcs/errors/cs0136-18.cs13
-rw-r--r--mcs/errors/cs0136-19.cs13
-rw-r--r--mcs/errors/cs0138.cs1
-rw-r--r--mcs/errors/cs0151-3.cs19
-rw-r--r--mcs/errors/cs0151-4.cs30
-rw-r--r--mcs/errors/cs0151-5.cs19
-rw-r--r--mcs/errors/cs0163-2.cs20
-rw-r--r--mcs/errors/cs0163.cs33
-rw-r--r--mcs/errors/cs0165-45.cs21
-rw-r--r--mcs/errors/cs0165-46.cs21
-rw-r--r--mcs/errors/cs0165-47.cs21
-rw-r--r--mcs/errors/cs0165-48.cs24
-rw-r--r--mcs/errors/cs0165-49.cs22
-rw-r--r--mcs/errors/cs0171-7.cs18
-rw-r--r--mcs/errors/cs0426-4.cs12
-rw-r--r--mcs/errors/cs0429-5.cs26
-rw-r--r--mcs/errors/cs0457-4.cs27
-rw-r--r--mcs/errors/cs0464-5.cs16
-rw-r--r--mcs/errors/cs0472-6.cs14
-rw-r--r--mcs/errors/cs0472-7.cs16
-rw-r--r--mcs/errors/cs0531-3.cs7
-rw-r--r--mcs/errors/cs0573-2.cs6
-rw-r--r--mcs/errors/cs0573.cs13
-rw-r--r--mcs/errors/cs0657-23.cs14
-rw-r--r--mcs/errors/cs0837-2.cs5
-rw-r--r--mcs/errors/cs0837-3.cs12
-rw-r--r--mcs/errors/cs0837-4.cs (renamed from mcs/errors/cs1953.cs)2
-rw-r--r--mcs/errors/cs0837.cs2
-rw-r--r--mcs/errors/cs0840.cs8
-rw-r--r--mcs/errors/cs1001-9.cs10
-rw-r--r--mcs/errors/cs1008-2.cs14
-rw-r--r--mcs/errors/cs1031-2.cs13
-rw-r--r--mcs/errors/cs1031.cs11
-rw-r--r--mcs/errors/cs1061-15.cs11
-rw-r--r--mcs/errors/cs1501-17.cs14
-rwxr-xr-xmcs/errors/cs1525-10.cs2
-rw-r--r--mcs/errors/cs1525-42.cs2
-rw-r--r--mcs/errors/cs1644-19.cs2
-rw-r--r--mcs/errors/cs1644-36.cs8
-rw-r--r--mcs/errors/cs1644-37.cs7
-rw-r--r--mcs/errors/cs1644-38.cs8
-rw-r--r--mcs/errors/cs1644-39.cs8
-rw-r--r--mcs/errors/cs1644-40.cs8
-rw-r--r--mcs/errors/cs1644-41.cs12
-rw-r--r--mcs/errors/cs1644-42.cs12
-rw-r--r--mcs/errors/cs1644-43.cs11
-rw-r--r--mcs/errors/cs1644-44.cs15
-rw-r--r--mcs/errors/cs1650-3.cs19
-rw-r--r--mcs/errors/cs7003-2.cs11
-rw-r--r--mcs/errors/cs7003-3.cs11
-rw-r--r--mcs/errors/cs7003-4.cs4
-rw-r--r--mcs/errors/cs7003.cs19
-rw-r--r--mcs/errors/cs7007.cs9
-rw-r--r--mcs/errors/cs8036.cs (renamed from mcs/errors/cs9001.cs)0
-rw-r--r--mcs/errors/cs8037.cs (renamed from mcs/errors/cs9002.cs)0
-rw-r--r--mcs/errors/cs8038.cs (renamed from mcs/errors/cs9003.cs)2
-rw-r--r--mcs/errors/cs8039.cs (renamed from mcs/errors/cs9004.cs)2
-rw-r--r--mcs/errors/cs8041.cs13
-rw-r--r--mcs/errors/cs8043.cs10
-rw-r--r--mcs/errors/cs8049.cs11
-rw-r--r--mcs/errors/cs8050.cs7
-rw-r--r--mcs/errors/cs8051.cs7
-rw-r--r--mcs/errors/cs8052.cs7
-rw-r--r--mcs/errors/cs8053.cs7
-rw-r--r--mcs/errors/cs8054-2.cs6
-rw-r--r--mcs/errors/cs8054-3.cs6
-rw-r--r--mcs/errors/cs8054.cs7
-rw-r--r--mcs/errors/cs8070.cs23
-rw-r--r--mcs/errors/cs8071-2.cs13
-rw-r--r--mcs/errors/cs8071.cs18
-rw-r--r--mcs/errors/cs8072-2.cs16
-rw-r--r--mcs/errors/cs8072.cs14
-rw-r--r--mcs/errors/cs8074.cs16
-rw-r--r--mcs/errors/cs9005.cs10
-rw-r--r--mcs/errors/cs9007.cs12
-rw-r--r--mcs/jay/reader.c13
-rw-r--r--mcs/mcs/anonymous.cs35
-rw-r--r--mcs/mcs/argument.cs40
-rw-r--r--mcs/mcs/assign.cs1
-rw-r--r--mcs/mcs/async.cs24
-rw-r--r--mcs/mcs/cfold.cs21
-rw-r--r--mcs/mcs/class.cs107
-rw-r--r--mcs/mcs/codegen.cs314
-rw-r--r--mcs/mcs/constant.cs116
-rw-r--r--mcs/mcs/context.cs20
-rw-r--r--mcs/mcs/convert.cs104
-rw-r--r--mcs/mcs/cs-parser.jay533
-rw-r--r--mcs/mcs/cs-tokenizer.cs153
-rw-r--r--mcs/mcs/delegate.cs66
-rw-r--r--mcs/mcs/dynamic.cs4
-rw-r--r--mcs/mcs/ecore.cs395
-rw-r--r--mcs/mcs/enum.cs25
-rw-r--r--mcs/mcs/eval.cs17
-rw-r--r--mcs/mcs/expression.cs1433
-rw-r--r--mcs/mcs/field.cs2
-rw-r--r--mcs/mcs/flowanalysis.cs17
-rw-r--r--mcs/mcs/generic.cs12
-rw-r--r--mcs/mcs/import.cs25
-rw-r--r--mcs/mcs/iterators.cs28
-rw-r--r--mcs/mcs/membercache.cs11
-rw-r--r--mcs/mcs/method.cs43
-rw-r--r--mcs/mcs/module.cs135
-rw-r--r--mcs/mcs/namespace.cs153
-rw-r--r--mcs/mcs/nullable.cs68
-rw-r--r--mcs/mcs/parameter.cs48
-rw-r--r--mcs/mcs/property.cs87
-rw-r--r--mcs/mcs/report.cs3
-rw-r--r--mcs/mcs/settings.cs11
-rw-r--r--mcs/mcs/statement.cs263
-rw-r--r--mcs/mcs/typemanager.cs5
-rw-r--r--mcs/mcs/typespec.cs1
-rw-r--r--mcs/tests/gtest-409.cs28
-rw-r--r--mcs/tests/gtest-435.cs5
-rw-r--r--mcs/tests/gtest-502.cs7
-rw-r--r--mcs/tests/gtest-584.cs8
-rw-r--r--mcs/tests/gtest-618.cs73
-rw-r--r--mcs/tests/gtest-619.cs35
-rw-r--r--mcs/tests/gtest-620.cs28
-rw-r--r--mcs/tests/gtest-621.cs29
-rw-r--r--mcs/tests/gtest-622.cs25
-rw-r--r--mcs/tests/gtest-623-lib.il42
-rw-r--r--mcs/tests/gtest-623.cs24
-rw-r--r--mcs/tests/gtest-autoproperty-03.cs7
-rw-r--r--mcs/tests/gtest-autoproperty-09.cs57
-rw-r--r--mcs/tests/gtest-collectioninit-04.cs18
-rw-r--r--mcs/tests/gtest-initialize-13.cs18
-rw-r--r--mcs/tests/gtest-lambda-35.cs30
-rw-r--r--mcs/tests/gtest-named-05.cs26
-rw-r--r--mcs/tests/gtest-optional-32.cs23
-rw-r--r--mcs/tests/gtest-optional-33.cs72
-rw-r--r--mcs/tests/test-504.cs24
-rw-r--r--mcs/tests/test-640.cs10
-rw-r--r--mcs/tests/test-671.cs2
-rw-r--r--mcs/tests/test-77.cs10
-rw-r--r--mcs/tests/test-792-lib.il15
-rw-r--r--mcs/tests/test-792.cs1
-rw-r--r--mcs/tests/test-880.cs13
-rw-r--r--mcs/tests/test-888.cs24
-rw-r--r--mcs/tests/test-898.cs25
-rw-r--r--mcs/tests/test-899.cs15
-rw-r--r--mcs/tests/test-900.cs17
-rw-r--r--mcs/tests/test-901.cs23
-rw-r--r--mcs/tests/test-902.cs24
-rw-r--r--mcs/tests/test-903.cs22
-rw-r--r--mcs/tests/test-904.cs35
-rw-r--r--mcs/tests/test-905.cs13
-rw-r--r--mcs/tests/test-async-01.cs1
-rw-r--r--mcs/tests/test-async-02.cs2
-rw-r--r--mcs/tests/test-async-04.cs2
-rw-r--r--mcs/tests/test-async-06.cs2
-rw-r--r--mcs/tests/test-async-07.cs2
-rw-r--r--mcs/tests/test-async-08.cs2
-rw-r--r--mcs/tests/test-async-09.cs2
-rw-r--r--mcs/tests/test-async-10.cs2
-rw-r--r--mcs/tests/test-async-11.cs2
-rw-r--r--mcs/tests/test-async-12.cs2
-rw-r--r--mcs/tests/test-async-14.cs2
-rw-r--r--mcs/tests/test-async-16.cs2
-rw-r--r--mcs/tests/test-async-18.cs1
-rw-r--r--mcs/tests/test-async-19.cs2
-rw-r--r--mcs/tests/test-async-20.cs2
-rw-r--r--mcs/tests/test-async-24.cs1
-rw-r--r--mcs/tests/test-async-25.cs1
-rw-r--r--mcs/tests/test-async-26.cs2
-rw-r--r--mcs/tests/test-async-73.cs31
-rw-r--r--mcs/tests/test-async-74.cs27
-rw-r--r--mcs/tests/test-dictinit-01.cs49
-rw-r--r--mcs/tests/test-dictinit-02.cs52
-rw-r--r--mcs/tests/test-ex-filter-06.cs29
-rw-r--r--mcs/tests/test-expression-bodied-01.cs54
-rw-r--r--mcs/tests/test-nameof-01.cs12
-rw-r--r--mcs/tests/test-nameof-02.cs129
-rw-r--r--mcs/tests/test-nameof-03.cs22
-rw-r--r--mcs/tests/test-nameof-04.cs34
-rw-r--r--mcs/tests/test-null-operator-01.cs162
-rw-r--r--mcs/tests/test-null-operator-02.cs124
-rw-r--r--mcs/tests/test-null-operator-03.cs33
-rw-r--r--mcs/tests/test-null-operator-04.cs14
-rw-r--r--mcs/tests/test-null-operator-05.cs66
-rw-r--r--mcs/tests/test-null-operator-06.cs32
-rw-r--r--mcs/tests/test-null-operator-07.cs24
-rw-r--r--mcs/tests/test-null-operator-08.cs93
-rw-r--r--mcs/tests/test-null-operator-09.cs19
-rw-r--r--mcs/tests/test-partial-33.cs8
-rw-r--r--mcs/tests/test-pattern-01.cs43
-rw-r--r--mcs/tests/test-pattern-02.cs93
-rw-r--r--mcs/tests/test-pattern-03.cs14
-rw-r--r--mcs/tests/test-pattern-04.cs77
-rw-r--r--mcs/tests/test-pattern-05.cs39
-rw-r--r--mcs/tests/test-pattern-06.cs68
-rw-r--r--mcs/tests/test-pattern-07.cs53
-rw-r--r--mcs/tests/test-primary-ctor-01.cs12
-rw-r--r--mcs/tests/test-primary-ctor-02.cs19
-rw-r--r--mcs/tests/test-primary-ctor-03.cs2
-rw-r--r--mcs/tests/test-primary-ctor-05.cs14
-rw-r--r--mcs/tests/test-primary-ctor-06.cs15
-rw-r--r--mcs/tests/test-primary-ctor-07.cs29
-rw-r--r--mcs/tests/test-primary-ctor-08.cs31
-rw-r--r--mcs/tests/test-primary-ctor-09.cs30
-rw-r--r--mcs/tests/test-static-using-01.cs28
-rw-r--r--mcs/tests/test-static-using-02.cs42
-rw-r--r--mcs/tests/test-static-using-03.cs42
-rw-r--r--mcs/tests/test-static-using-04.cs42
-rw-r--r--mcs/tests/test-static-using-05.cs11
-rw-r--r--mcs/tests/test-static-using-06.cs44
-rw-r--r--mcs/tests/ver-il-net_4_5.xml5613
-rw-r--r--[-rwxr-xr-x]mcs/tools/csharp/csharp.csproj3
-rw-r--r--mcs/tools/mdoc/.gitignore5
-rw-r--r--mcs/tools/mdoc/Mono.Documentation/assembler.cs277
-rw-r--r--mcs/tools/mdoc/Mono.Documentation/mdoc.cs1
-rw-r--r--mcs/tools/mdoc/Mono.Documentation/monodocer.cs930
-rw-r--r--mcs/tools/mdoc/Mono.Documentation/preserver.cs34
-rw-r--r--mcs/tools/mdoc/mdoc.csproj10
-rw-r--r--mcs/tools/mdoc/mdoc.exe.sources1
-rw-r--r--mcs/tools/mono-service/AssemblyInfo.cs6
-rw-r--r--mcs/tools/mono-shlib-cop/Makefile2
-rw-r--r--mcs/tools/mono-shlib-cop/test.cs6
-rw-r--r--mcs/tools/mono-shlib-cop/test.dll.config1
-rw-r--r--mcs/tools/mono-shlib-cop/test.dll.out2
-rw-r--r--mcs/tools/mono-xmltool/xmltool.cs6
-rw-r--r--mono/Makefile.am6
-rw-r--r--mono/arch/Makefile.am14
-rw-r--r--mono/arch/amd64/Makefile.am7
-rw-r--r--mono/arch/amd64/tramp.c1054
-rw-r--r--mono/arch/ppc/Makefile.am12
-rw-r--r--mono/arch/ppc/test.c35
-rw-r--r--mono/arch/ppc/tramp.c895
-rw-r--r--mono/arch/x86/Makefile.am10
-rw-r--r--mono/arch/x86/test.c225
-rw-r--r--mono/arch/x86/tramp.c545
-rwxr-xr-xmono/dis/dump.c13
-rwxr-xr-xmono/dis/get.c7
-rw-r--r--mono/dis/main.c16
-rw-r--r--mono/interpreter/.gitignore11
-rw-r--r--mono/interpreter/ChangeLog1376
-rw-r--r--mono/interpreter/Makefile.am59
-rw-r--r--mono/interpreter/embed.h15
-rw-r--r--mono/interpreter/hacks.h153
-rw-r--r--mono/interpreter/interp.c4515
-rw-r--r--mono/interpreter/interp.h138
-rw-r--r--mono/interpreter/main.c9
-rw-r--r--mono/interpreter/mint.182
-rw-r--r--mono/interpreter/mintops.c120
-rw-r--r--mono/interpreter/mintops.def510
-rw-r--r--mono/interpreter/mintops.h58
-rw-r--r--mono/interpreter/transform.c3049
-rw-r--r--mono/io-layer/Makefile.am4
-rw-r--r--mono/io-layer/critical-section-private.h18
-rw-r--r--mono/io-layer/critical-sections.c115
-rw-r--r--mono/io-layer/critical-sections.h52
-rw-r--r--mono/io-layer/handles.c11
-rwxr-xr-xmono/io-layer/io-layer.h2
-rw-r--r--[-rwxr-xr-x]mono/io-layer/io.c2
-rw-r--r--mono/io-layer/uglify.h2
-rw-r--r--mono/io-layer/wapi.h3
-rw-r--r--mono/metadata/Makefile.am (renamed from mono/metadata/Makefile.am.in)15
-rw-r--r--mono/metadata/abi-details.h31
-rw-r--r--mono/metadata/appdomain.c39
-rw-r--r--mono/metadata/appdomain.h3
-rw-r--r--mono/metadata/assembly.c16
-rw-r--r--mono/metadata/attach.c8
-rw-r--r--mono/metadata/boehm-gc.c4
-rw-r--r--mono/metadata/class-internals.h34
-rw-r--r--mono/metadata/class.c896
-rw-r--r--mono/metadata/class.h4
-rw-r--r--mono/metadata/cominterop.c34
-rw-r--r--mono/metadata/debug-helpers.c2
-rw-r--r--mono/metadata/domain-internals.h18
-rw-r--r--mono/metadata/domain.c45
-rw-r--r--mono/metadata/exception.c8
-rw-r--r--mono/metadata/file-mmap-posix.c26
-rw-r--r--mono/metadata/gc-internal.h16
-rw-r--r--mono/metadata/gc.c72
-rw-r--r--mono/metadata/icall-def.h4
-rw-r--r--mono/metadata/icall.c115
-rw-r--r--mono/metadata/image.c39
-rw-r--r--mono/metadata/loader.c272
-rw-r--r--mono/metadata/lock-tracer.c8
-rw-r--r--mono/metadata/lock-tracer.h4
-rw-r--r--mono/metadata/marshal.c439
-rw-r--r--mono/metadata/marshal.h6
-rw-r--r--[-rwxr-xr-x]mono/metadata/mempool-internals.h0
-rw-r--r--mono/metadata/mempool.c10
-rw-r--r--mono/metadata/metadata-cross-helpers.c6
-rw-r--r--mono/metadata/metadata-internals.h49
-rw-r--r--mono/metadata/metadata.c221
-rw-r--r--mono/metadata/method-builder.c5
-rw-r--r--mono/metadata/monitor.c85
-rw-r--r--mono/metadata/monitor.h15
-rw-r--r--mono/metadata/mono-config.c50
-rw-r--r--mono/metadata/mono-debug-debugger.c8
-rw-r--r--mono/metadata/mono-debug.c6
-rw-r--r--mono/metadata/mono-hash.c12
-rw-r--r--mono/metadata/mono-perfcounters.c8
-rw-r--r--mono/metadata/null-gc.c2
-rw-r--r--mono/metadata/object-internals.h3
-rw-r--r--mono/metadata/object-offsets.h231
-rw-r--r--mono/metadata/object.c149
-rw-r--r--mono/metadata/object.h9
-rw-r--r--[-rwxr-xr-x]mono/metadata/process.c3
-rw-r--r--mono/metadata/profiler.c8
-rw-r--r--mono/metadata/reflection-internals.h2
-rw-r--r--mono/metadata/reflection.c114
-rw-r--r--mono/metadata/reflection.h2
-rw-r--r--mono/metadata/row-indexes.h10
-rw-r--r--mono/metadata/sgen-alloc.c23
-rw-r--r--[-rwxr-xr-x]mono/metadata/sgen-archdep.h0
-rw-r--r--mono/metadata/sgen-cardtable.c2
-rw-r--r--mono/metadata/sgen-conf.h9
-rw-r--r--mono/metadata/sgen-debug.c13
-rw-r--r--mono/metadata/sgen-gc.c338
-rw-r--r--mono/metadata/sgen-gc.h35
-rw-r--r--mono/metadata/sgen-internal.c14
-rw-r--r--[-rwxr-xr-x]mono/metadata/sgen-marksweep.c0
-rw-r--r--mono/metadata/sgen-new-bridge.c33
-rw-r--r--mono/metadata/sgen-nursery-allocator.c6
-rw-r--r--mono/metadata/sgen-os-posix.c2
-rw-r--r--[-rwxr-xr-x]mono/metadata/sgen-os-win32.c0
-rw-r--r--mono/metadata/sgen-pinning.c98
-rw-r--r--mono/metadata/sgen-pinning.h2
-rw-r--r--mono/metadata/sgen-pointer-queue.c88
-rw-r--r--mono/metadata/sgen-pointer-queue.h34
-rw-r--r--mono/metadata/sgen-protocol.c77
-rw-r--r--mono/metadata/sgen-protocol.h2
-rw-r--r--mono/metadata/sgen-qsort.h2
-rw-r--r--[-rwxr-xr-x]mono/metadata/sgen-stw.c0
-rw-r--r--mono/metadata/threadpool.c64
-rw-r--r--[-rwxr-xr-x]mono/metadata/threads.c89
-rw-r--r--mono/metadata/threads.h2
-rw-r--r--mono/metadata/tpool-epoll.c8
-rw-r--r--mono/metadata/tpool-kqueue.c8
-rw-r--r--mono/metadata/tpool-poll.c8
-rw-r--r--mono/metadata/verify.c14
-rwxr-xr-xmono/mini/Makefile.am.in9
-rw-r--r--mono/mini/alias-analysis.c50
-rw-r--r--mono/mini/aot-compiler.c229
-rw-r--r--mono/mini/aot-runtime.c450
-rw-r--r--mono/mini/cpu-amd64.md6
-rw-r--r--mono/mini/cpu-arm.md2
-rw-r--r--mono/mini/cpu-arm64.md4
-rw-r--r--mono/mini/cpu-ia64.md8
-rw-r--r--mono/mini/cpu-ppc.md1
-rw-r--r--mono/mini/cpu-ppc64.md5
-rw-r--r--mono/mini/cpu-s390x.md2
-rw-r--r--mono/mini/cpu-x86.md3
-rw-r--r--mono/mini/debug-mini.c2
-rw-r--r--mono/mini/debugger-agent.c122
-rw-r--r--mono/mini/decompose.c7
-rw-r--r--mono/mini/driver.c17
-rw-r--r--mono/mini/dwarfwriter.c9
-rw-r--r--mono/mini/exceptions-amd64.c65
-rw-r--r--mono/mini/exceptions-arm.c15
-rw-r--r--mono/mini/exceptions-mips.c2
-rw-r--r--mono/mini/exceptions-ppc.c2
-rw-r--r--mono/mini/exceptions-s390x.c6
-rw-r--r--mono/mini/exceptions-x86.c50
-rw-r--r--mono/mini/gshared.cs118
-rw-r--r--mono/mini/helpers.c10
-rw-r--r--mono/mini/image-writer.c2
-rw-r--r--mono/mini/ir-emit.h6
-rw-r--r--mono/mini/jit-icalls.c14
-rw-r--r--mono/mini/method-to-ir.c444
-rw-r--r--mono/mini/mini-amd64.c326
-rw-r--r--mono/mini/mini-amd64.h31
-rw-r--r--mono/mini/mini-arm.c145
-rw-r--r--mono/mini/mini-arm.h25
-rw-r--r--mono/mini/mini-cross-helpers.c13
-rw-r--r--mono/mini/mini-exceptions.c27
-rw-r--r--mono/mini/mini-gc.c12
-rw-r--r--mono/mini/mini-generic-sharing.c7
-rw-r--r--mono/mini/mini-ia64.c59
-rw-r--r--mono/mini/mini-ia64.h2
-rw-r--r--mono/mini/mini-llvm-cpp.cpp17
-rw-r--r--mono/mini/mini-llvm.c6
-rw-r--r--mono/mini/mini-mips.c32
-rw-r--r--mono/mini/mini-mips.h1
-rw-r--r--mono/mini/mini-ops.h47
-rw-r--r--mono/mini/mini-ppc.c83
-rw-r--r--mono/mini/mini-ppc.h4
-rw-r--r--mono/mini/mini-s390x.c65
-rw-r--r--mono/mini/mini-s390x.h3
-rw-r--r--mono/mini/mini-sparc.c6
-rw-r--r--mono/mini/mini-sparc.h1
-rw-r--r--mono/mini/mini-trampolines.c110
-rw-r--r--mono/mini/mini-unwind.h20
-rw-r--r--mono/mini/mini-x86.c154
-rw-r--r--mono/mini/mini-x86.h9
-rw-r--r--mono/mini/mini.c332
-rw-r--r--mono/mini/mini.h58
-rw-r--r--mono/mini/simd-intrinsics.c3
-rw-r--r--mono/mini/ssapre.c2
-rw-r--r--mono/mini/tasklets.c10
-rw-r--r--mono/mini/tramp-amd64.c33
-rw-r--r--mono/mini/tramp-arm.c41
-rw-r--r--mono/mini/tramp-mips.c5
-rw-r--r--mono/mini/tramp-ppc.c3
-rw-r--r--mono/mini/tramp-s390x.c3
-rw-r--r--mono/mini/tramp-x86.c327
-rw-r--r--mono/mini/unwind.c116
-rw-r--r--mono/profiler/proflog.c6
-rw-r--r--mono/tests/Makefile.am2
-rw-r--r--mono/tests/finalizer-wait.cs32
-rwxr-xr-xmono/tests/gc-descriptors/Makefile.am2
-rw-r--r--mono/tests/marshal7.cs4
-rw-r--r--mono/tests/pinvoke3.cs31
-rw-r--r--mono/unit-tests/.gitignore1
-rw-r--r--mono/unit-tests/Makefile.am11
-rw-r--r--mono/unit-tests/test-conc-hashtable.c324
-rw-r--r--mono/utils/Makefile.am10
-rw-r--r--[-rwxr-xr-x]mono/utils/atomic.c0
-rwxr-xr-xmono/utils/atomic.h10
-rw-r--r--mono/utils/hazard-pointer.c12
-rw-r--r--mono/utils/mono-codeman.c17
-rw-r--r--mono/utils/mono-compiler.h3
-rw-r--r--mono/utils/mono-conc-hashtable.c371
-rw-r--r--mono/utils/mono-conc-hashtable.h27
-rwxr-xr-xmono/utils/mono-context.h3
-rw-r--r--mono/utils/mono-error-internals.h6
-rw-r--r--mono/utils/mono-error.c46
-rw-r--r--mono/utils/mono-logger.c85
-rw-r--r--mono/utils/mono-logger.h13
-rw-r--r--mono/utils/mono-mutex.h3
-rw-r--r--mono/utils/mono-proclib.c15
-rw-r--r--mono/utils/mono-publib.h1
-rw-r--r--mono/utils/mono-sigcontext.h8
-rw-r--r--mono/utils/mono-threads-android.c9
-rw-r--r--mono/utils/mono-threads-freebsd.c24
-rw-r--r--mono/utils/mono-threads-linux.c21
-rw-r--r--mono/utils/mono-threads-mach-helper.c1
-rw-r--r--mono/utils/mono-threads-mach.c27
-rw-r--r--mono/utils/mono-threads-openbsd.c32
-rw-r--r--mono/utils/mono-threads-posix.c118
-rw-r--r--mono/utils/mono-threads.c68
-rw-r--r--mono/utils/mono-threads.h3
-rw-r--r--mono/utils/sha1.c176
-rw-r--r--mono/utils/sha1.h50
-rw-r--r--msvc/libmonoruntime.vcxproj1
-rw-r--r--msvc/libmonoutils.vcxproj5
-rw-r--r--msvc/mono.def1
-rw-r--r--msvc/monosgen.def1
-rw-r--r--msvc/monosgen64.def1
-rw-r--r--runtime/Makefile.am2
-rwxr-xr-xtools/sgen/gcpausevis.py11
1491 files changed, 28412 insertions, 103146 deletions
diff --git a/.gitignore b/.gitignore
index c5dbc5d7ad8..ea48a9e7fb9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -79,6 +79,7 @@ releases
stamp-h
stamp-h1
stamp-h.in
+/test-driver
*~
*.swp
*.o
diff --git a/Makefile.am b/Makefile.am
index da8953cdf26..c44c4b93c09 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -51,6 +51,8 @@ dist-hook:
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
rm -rf `find $(top_distdir)/external -path '*\.git'`
+ rm -f `find $(top_distdir)/external -path '*\.exe'`
+ rm -f `find $(top_distdir)/external -path '*\.dll'`
cp mcs/class/lib/basic/System.Configuration.dll mcs/class/lib/monolite/
cp mcs/class/lib/basic/System.Security.dll mcs/class/lib/monolite/
# Disable this for now because it is very slow and causes wrench to timeout:
diff --git a/README.md b/README.md
index f42e3000815..b061956eee2 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
Mono is a software platform designed to allow developers to easily create cross platform applications.
Mono is an open source implementation of Microsoft's .NET Framework based on the ECMA standards for C# and the Common Language Runtime.
+[![Build Status](http://jenkins.mono-project.com/job/test-mono-mainline/badge/icon/)](http://jenkins.mono-project.com/job/test-mono-mainline/)
+
1. [Installation](#compilation-and-installation)
2. [Using Mono](#using-mono)
3. [Directory Roadmap](#directory-roadmap)
@@ -492,16 +494,12 @@ Directory Roadmap
* `dis/` - CIL executable Disassembler
- * `cli/` - Common code for the JIT and the interpreter.
-
* `io-layer/` - The I/O layer and system abstraction for
emulating the .NET IO model.
* `cil/` - Common Intermediate Representation, XML
definition of the CIL bytecodes.
- * `interp/` - Interpreter for CLI executables (obsolete).
-
* `arch/` - Architecture specific portions.
* `man/` - Manual pages for the various Mono commands and programs.
diff --git a/autogen.sh b/autogen.sh
index 5213ecffd3c..d4a6ecaccbb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -123,7 +123,6 @@ if test x$has_ext_mod = xtrue; then
popd
else
cat mono/mini/Makefile.am.in > mono/mini/Makefile.am
- cat mono/metadata/Makefile.am.in > mono/metadata/Makefile.am
fi
diff --git a/configure.ac b/configure.ac
index c2d36bc8822..0de87159a12 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
-AC_INIT(mono, [3.6.1],
+AC_INIT(mono, [3.10.1],
[http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
AC_CONFIG_SRCDIR([README.md])
@@ -36,20 +36,15 @@ case $host_os in
*cygwin* ) LN_S='cp -p';;
esac
-dnl
-dnl libgc checks
-dnl
-
-gc_headers=no
-gc=included
-gc_msg="included Boehm"
-use_included_gc=no
+#
+# libgc defaults
+#
libgc_configure_args=
if test -d $srcdir/libgc ; then
- gc_default=included
+ libgc_default=included
else
- gc_default=boehm
+ libgc_default=boehm
fi
# These variables are the CPPFLAGS/CFLAGS passed to libgc's configure
@@ -121,14 +116,15 @@ case "$host" in
fi
HOST_CC="gcc"
# Windows 2000 is required that includes Internet Explorer 5.01
- CPPFLAGS="$CPPFLAGS -DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
+ CPPFLAGS="$CPPFLAGS -DWINVER=0x0502 -D_WIN32_WINNT=0x0502 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32"
libmono_cflags="-mms-bitfields -mwindows"
libmono_ldflags="-mms-bitfields -mwindows"
libdl=
libgc_threads=win32
- gc_default=included
+ libgc_default=included
with_sigaltstack=no
+ with_tls=pthread
LN_S=cp
# This forces libgc to use the DllMain based thread registration code on win32
libgc_configure_args="$libgc_configure_args --enable-win32-dllmain=yes"
@@ -146,6 +142,17 @@ case "$host" in
with_sigaltstack=no
use_sigposix=yes
;;
+ *-*-kfreebsd*-gnu)
+ host_win32=no
+ CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -DTHREAD_LOCAL_ALLOC -pthread"
+ libmono_cflags="-D_REENTRANT -DTHREAD_LOCAL_ALLOC -pthread"
+ libmono_ldflags="-lpthread -pthread"
+ libdl="-ldl"
+ libgc_threads=pthreads
+ need_link_unlink=yes
+ with_sigaltstack=no
+ use_sigposix=yes
+ ;;
*-*-*freebsd*)
host_win32=no
if test "x$PTHREAD_CFLAGS" = "x"; then
@@ -181,7 +188,7 @@ case "$host" in
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID)
libdl=
- gc_default=boehm
+ libgc_default=boehm
libgc_threads=pthreads
with_sigaltstack=no
use_sigposix=yes
@@ -256,7 +263,7 @@ case "$host" in
libmono_cflags="-D_REENTRANT"
libdl=
libgc_threads=pthreads
- gc_default=boehm
+ libgc_default=boehm
use_sigposix=yes
ikvm_native=no
AC_DEFINE(DISABLE_SOCKETS,1,[Disable sockets support])
@@ -361,6 +368,7 @@ fi
AC_SUBST(extra_runtime_ldflags)
AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
+AM_CONDITIONAL(PLATFORM_GNU, echo x$target_os | grep -q -- -gnu)
AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
AM_CONDITIONAL(PLATFORM_DARWIN, test x$platform_darwin = xyes)
AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
@@ -649,18 +657,6 @@ if test "x$USE_NLS" = "xyes"; then
fi
fi
-AC_ARG_WITH([libgdiplus],
- [ --with-libgdiplus=installed|sibling|<path> Override the libgdiplus used for System.Drawing tests (defaults to installed)],
- [], [with_libgdiplus=installed])
-
-case $with_libgdiplus in
-no|installed) libgdiplus_loc= ;;
-yes|sibling) libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la ;;
-/*) libgdiplus_loc=$with_libgdiplus ;;
-*) libgdiplus_loc=`pwd`/$with_libgdiplus ;;
-esac
-AC_SUBST([libgdiplus_loc])
-
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
pkg_config_path=
@@ -699,8 +695,6 @@ AC_SUBST(GMODULE_LIBS)
AC_SUBST(BUILD_GLIB_CFLAGS)
AC_SUBST(BUILD_GLIB_LIBS)
-AC_ARG_WITH(gc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[gc=$with_gc],[gc=$gc_default])
-
# Enable support for fast thread-local storage
# Some systems have broken support, so we allow to disable it.
AC_ARG_WITH(tls, [ --with-tls=__thread,pthread select Thread Local Storage implementation (defaults to __thread)],[],[with_tls=__thread])
@@ -1008,22 +1002,28 @@ AC_TRY_COMPILE([
AC_MSG_RESULT(no)
])
+dnl
+dnl Boehm GC configuration
+dnl
+
+AC_ARG_WITH(libgc, [ --with-gc=boehm,included,none Controls the Boehm GC config, default=included],[libgc=$with_gc],[libgc=$libgc_default])
+
+AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
+AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
+
AC_ARG_ENABLE(parallel-mark, [ --enable-parallel-mark Enables GC Parallel Marking], enable_parallel_mark=$enableval, enable_parallel_mark=$parallel_mark)
if test x$enable_parallel_mark = xyes; then
libgc_configure_args="$libgc_configure_args --enable-parallel-mark"
fi
-AC_ARG_ENABLE(boehm, [ --disable-boehm Disable the Boehm GC.], support_boehm=$enableval,support_boehm=${support_boehm:-yes})
-AM_CONDITIONAL(SUPPORT_BOEHM, test x$support_boehm = xyes)
-
-dnl
-dnl Boehm GC configuration
-dnl
+gc_headers=no
+gc_msg=""
+use_included_gc=no
LIBGC_CPPFLAGS=
LIBGC_LIBS=
LIBGC_STATIC_LIBS=
libgc_dir=
-case "x$gc" in
+case "x$libgc" in
xboehm|xbohem|xyes)
AC_CHECK_HEADERS(gc.h gc/gc.h, gc_headers=yes)
AC_CHECK_LIB(gc, GC_malloc, found_boehm="yes",,$libdl)
@@ -1056,17 +1056,18 @@ case "x$gc" in
fi
# check whether we need to explicitly allow
- # thread registering
- AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
- if test "x$found_allow_register_threads" = "xyes"; then
- AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
- fi
-
+ # thread registering
+ AC_CHECK_LIB(gc, GC_allow_register_threads, found_allow_register_threads="yes",,$libdl)
+ if test "x$found_allow_register_threads" = "xyes"; then
+ AC_DEFINE(HAVE_GC_ALLOW_REGISTER_THREADS, 1, [GC requires thread registration])
+ fi
;;
xincluded)
use_included_gc=yes
- libgc_dir=libgc
+ if test "x$support_boehm" = "xyes"; then
+ libgc_dir=libgc
+ fi
LIBGC_CPPFLAGS='-I$(top_srcdir)/libgc/include'
LIBGC_LIBS='$(top_builddir)/libgc/libmonogc.la'
@@ -1079,7 +1080,7 @@ case "x$gc" in
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DGC_BUILD -DGC_NOT_DLL"
fi
- gc_msg="bundled Boehm GC with typed GC"
+ gc_msg="Included Boehm GC with typed GC"
if test x$enable_parallel_mark = xyes; then
AC_DEFINE_UNQUOTED(DEFAULT_GC_NAME, "Included Boehm (with typed GC and Parallel Mark)", [GC description])
gc_msg="$gc_msg and parallel mark"
@@ -1116,7 +1117,7 @@ AC_SUBST(libgc_dir)
AC_SUBST(BOEHM_DEFINES)
dnl
-dnl End of libgc checks
+dnl End of Boehm GC Configuration
dnl
dnl *************************************
@@ -2148,7 +2149,6 @@ else
AC_MSG_RESULT(no)
])
])
- AC_CHECK_FUNCS(GetProcessId)
AC_CHECK_DECLS(InterlockedExchange64, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(InterlockedCompareExchange64, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(InterlockedDecrement64, [], [], [[#include <windows.h>]])
@@ -2156,6 +2156,16 @@ else
AC_CHECK_DECLS(InterlockedAdd, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(InterlockedAdd64, [], [], [[#include <windows.h>]])
AC_CHECK_DECLS(__readfsdword, [], [], [[#include <windows.h>]])
+
+ AC_MSG_CHECKING(for GetProcessId)
+ AC_TRY_COMPILE([#include <windows.h>], [
+ GetProcessId (0);
+ ], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GETPROCESSID)
+ ], [
+ AC_MSG_RESULT(no)
+ ])
fi
dnl socklen_t check
@@ -2489,7 +2499,6 @@ TARGET="unknown"
ACCESS_UNALIGNED="yes"
JIT_SUPPORTED=no
-INTERP_SUPPORTED=no
LIBC="libc.so.6"
INTL="libc.so.6"
SQLITE="libsqlite.so.0"
@@ -2497,12 +2506,11 @@ SQLITE3="libsqlite3.so.0"
X11="libX11.so"
GDKX11="libgdk-x11-2.0.so.0"
GTKX11="libgtk-x11-2.0.so.0"
-XINERAMA="libXinerama.so"
+XINERAMA="libXinerama.so.1"
sizeof_register="SIZEOF_VOID_P"
jit_wanted=true
-interp_wanted=false
sgen_supported=false
boehm_supported=true
case "$host" in
@@ -2567,7 +2575,7 @@ case "$host" in
sgen_supported=true
AOT_SUPPORTED="yes"
;;
- darwin*|openbsd*|freebsd*)
+ openbsd*|freebsd*|kfreebsd-gnu*)
sgen_supported=true
;;
esac
@@ -2585,7 +2593,14 @@ case "$host" in
sgen_supported=true
AOT_SUPPORTED="yes"
;;
- darwin*|openbsd*|freebsd*)
+ darwin*)
+ sgen_supported=true
+ AOT_SUPPORTED="yes"
+ ;;
+ openbsd*|freebsd*|kfreebsd-gnu*)
+ sgen_supported=true
+ ;;
+ mingw*)
sgen_supported=true
;;
esac
@@ -2659,8 +2674,6 @@ case "$host" in
ACCESS_UNALIGNED="no"
JIT_SUPPORTED=yes
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
- # libgc's gc_locks.h depends on this
- CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC"
sgen_supported=true
;;
arm*-linux*)
@@ -2727,7 +2740,6 @@ if test "x$host" != "x$target"; then
sizeof_register=8
target_byte_order=G_BIG_ENDIAN
;;
-
powerpc64-xbox360-linux-gnu)
TARGET=POWERPC64
arch_target=powerpc64
@@ -2926,18 +2938,10 @@ if test x$JIT_SUPPORTED = xyes; then
USEJIT=true
jit_status="Building and using the JIT"
else
- if $interp_wanted; then
- jit_status="Building the JIT, defaulting to the interpreter"
- else
- AC_ERROR(No JIT or interpreter support available or selected.)
- fi
+ AC_ERROR(No JIT support available or selected.)
fi
else
- if test x$interp_wanted = xtrue; then
- jit_status="interpreter"
- else
- AC_ERROR(No JIT or interpreter support available or selected.)
- fi
+ AC_ERROR(No JIT support available or selected.)
fi
AM_CONDITIONAL(USE_JIT, test x$USEJIT = xtrue)
@@ -2959,6 +2963,11 @@ case "$host" in
LIBC="libc.so.12"
INTL="libintl.so.0"
;;
+ *-*-kfreebsd*-gnu)
+ LIBC="libc.so.0.1"
+ INTL="libc.so.0.1"
+ X11="libX11.so.6"
+ ;;
*-*-*freebsd*)
LIBC="libc.so"
INTL="libintl.so"
@@ -2985,27 +2994,42 @@ case "$host" in
done
if test "x$X11" = "xlibX11.so"; then
- AC_MSG_WARN([Could not find X development libs. Do you have the -devel package installed? Assuming libX11.so.6...]);
+ AC_MSG_WARN([Could not find libX11.so. Do you have X.org or XFree86 installed? Assuming libX11.so.6...]);
X11=libX11.so.6
fi
- AC_MSG_CHECKING(for the soname of libXinerama.so)
- for i in $x_libraries $dlsearch_path; do
- for r in 1 2 3; do
- if test -f $i/libXinerama.so.$r; then
- XINERAMA=libXinerama.so.$r
- AC_MSG_RESULT($XINERAMA)
- fi
- done
- done
- if test "x$XINERAMA" = "xlibXinerama.so"; then
- AC_MSG_WARN([Could not find Xinerama development libs. Support for multiple monitors might not work...]);
- fi
;;
esac
AC_SUBST(libsuffix)
+AC_ARG_WITH([libgdiplus],
+ [ --with-libgdiplus=installed|sibling|<path> Override the libgdiplus used for System.Drawing tests (defaults to installed)],
+ [], [with_libgdiplus=installed])
+
+# default install location
+libgdiplus_install_loc=libgdiplus${libsuffix}
+case $with_libgdiplus in
+ no|installed)
+ libgdiplus_loc=
+ ;;
+
+ yes|sibling)
+ libgdiplus_loc=`cd ../libgdiplus && pwd`/src/libgdiplus.la
+ ;;
+
+ /*) # absolute path, assume it is an install location
+ libgdiplus_loc=$with_libgdiplus
+ libgdiplus_install_loc=$with_libgdiplus
+ ;;
+
+ *)
+ libgdiplus_loc=`pwd`/$with_libgdiplus
+ ;;
+esac
+AC_SUBST([libgdiplus_loc])
+AC_SUBST([libgdiplus_install_loc])
+
AC_ARG_ENABLE(icall-symbol-map,[ --enable-icall-symbol-map Generate tables which map icall functions to their C symbols], icall_symbol_map=$enableval, icall_symbol_map=no)
if test "x$icall_symbol_map" = "xyes"; then
AC_DEFINE(ENABLE_ICALL_SYMBOL_MAP, 1, [Icall symbol map enabled])
@@ -3171,7 +3195,7 @@ if test ${ACCESS_UNALIGNED} = no; then
CPPFLAGS="$CPPFLAGS -DNO_UNALIGNED_ACCESS"
fi
-case "x$gc" in
+case "x$libgc" in
xincluded)
# Pass CPPFLAGS to libgc configure
# We should use a separate variable for this to avoid passing useless and
@@ -3189,7 +3213,9 @@ case "x$gc" in
# (infinite recursion, undefined parking behavior, etc)
TMP_CPPFLAGS=`echo $TMP_CPPFLAGS | sed -e 's/-finstrument-for-thread-suspension//g'`
ac_configure_args="$ac_configure_args --disable-embed-check --with-libgc-threads=$libgc_threads $libgc_configure_args \"CPPFLAGS_FOR_LIBGC=$TMP_CPPFLAGS\" \"CFLAGS_FOR_LIBGC=$CFLAGS_FOR_LIBGC\""
- AC_CONFIG_SUBDIRS(libgc)
+ if test "x$support_boehm" = "xyes"; then
+ AC_CONFIG_SUBDIRS(libgc)
+ fi
;;
esac
@@ -3322,8 +3348,7 @@ AM_CONDITIONAL(HOST_ARM64, test x$HOST = xARM64)
AM_CONDITIONAL(CROSS_COMPILE, test "x$host" != "x$target")
AM_CONDITIONAL(JIT_SUPPORTED, test x$JIT_SUPPORTED = xyes)
-AM_CONDITIONAL(INTERP_SUPPORTED, test x$interp_wanted = xtrue)
-AM_CONDITIONAL(INCLUDED_LIBGC, test x$gc = xincluded)
+AM_CONDITIONAL(INCLUDED_LIBGC, test x$libgc = xincluded)
AC_SUBST(LIBC)
AC_SUBST(INTL)
@@ -3342,11 +3367,7 @@ AC_SUBST(LDFLAGS)
mono_build_root=`pwd`
AC_SUBST(mono_build_root)
-if test x$USEJIT = xtrue; then
- mono_runtime=mono/mini/mono
-else
- mono_runtime=mono/interpreter/mint
-fi
+mono_runtime=mono/mini/mono
AC_SUBST(mono_runtime)
mono_cfg_root=$mono_build_root/runtime
@@ -3543,7 +3564,6 @@ mono/arch/arm/Makefile
mono/arch/arm64/Makefile
mono/arch/ia64/Makefile
mono/arch/mips/Makefile
-mono/interpreter/Makefile
mono/tests/Makefile
mono/tests/tests-config
mono/tests/assemblyresolve/Makefile
@@ -3672,11 +3692,6 @@ fi
enable_system_aot=yes
fi
- if test "x$enable_loadedllvm" = "xyes"; then
- # This seems to fail on the x86 buildbots
- enable_system_aot=no
- fi
-
if test x$host_win32 = xno -a x$enable_system_aot = xyes; then
echo "ENABLE_AOT = 1" >> $mcs_topdir/build/config.make
fi
@@ -3738,6 +3753,8 @@ echo "
mcs source: $mcsdir
Engine:
+ Host: $host
+ Target: $target
GC: $gc_msg
TLS: $with_tls
SIGALTSTACK: $with_sigaltstack
diff --git a/data/Makefile.am b/data/Makefile.am
index 71cdc650fbc..32a13623cb9 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -27,13 +27,8 @@ SGENPCFILE=
endif
if JIT_SUPPORTED
-if INTERP_SUPPORTED
-pkgconfig_DATA= mono.pc mono-2.pc mint.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
- system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
-else
pkgconfig_DATA= mono.pc mono-2.pc dotnet.pc dotnet35.pc wcf.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc system.web.extensions_1.0.pc \
system.web.extensions.design_1.0.pc system.web.mvc.pc system.web.mvc2.pc system.web.mvc3.pc aspnetwebstack.pc reactive.pc xbuild12.pc $(SGENPCFILE)
-endif
else
pkgconfig_DATA= mint.pc mono-nunit.pc mono-cairo.pc mono-options.pc cecil.pc monodoc.pc mono-lineeditor.pc
endif
diff --git a/data/config.in b/data/config.in
index c337f82f17f..b7601766e95 100644
--- a/data/config.in
+++ b/data/config.in
@@ -29,8 +29,8 @@
<dllentry dll="__Internal" name="MoveMemory" target="mono_win32_compat_MoveMemory"/>
<dllentry dll="__Internal" name="ZeroMemory" target="mono_win32_compat_ZeroMemory"/>
</dllmap>
- <dllmap dll="gdiplus" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
- <dllmap dll="gdiplus.dll" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
- <dllmap dll="gdi32" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
- <dllmap dll="gdi32.dll" target="@prefix@/lib/libgdiplus@libsuffix@" os="!windows"/>
+ <dllmap dll="gdiplus" target="@libgdiplus_install_loc@" os="!windows"/>
+ <dllmap dll="gdiplus.dll" target="@libgdiplus_install_loc@" os="!windows"/>
+ <dllmap dll="gdi32" target="@libgdiplus_install_loc@" os="!windows"/>
+ <dllmap dll="gdi32.dll" target="@libgdiplus_install_loc@" os="!windows"/>
</configuration>
diff --git a/eglib/src/eglib-remap.h b/eglib/src/eglib-remap.h
index 9b4ecf1aebc..5c918d25dab 100644
--- a/eglib/src/eglib-remap.h
+++ b/eglib/src/eglib-remap.h
@@ -273,3 +273,9 @@
#define g_utf8_get_char_validated monoeg_utf8_get_char_validated
#define g_utf8_prev_char monoeg_utf8_prev_char
#define g_utf8_to_ucs4 monoeg_utf8_to_ucs4
+
+
+#define g_log_default_handler monoeg_log_default_handler
+#define g_log_set_default_handler monoeg_log_set_default_handler
+#define g_set_print_handler monoeg_set_print_handler
+#define g_set_printerr_handler monoeg_set_printerr_handler
diff --git a/eglib/src/glib.h b/eglib/src/glib.h
index 30c2d7adb8f..533c84116c3 100644
--- a/eglib/src/glib.h
+++ b/eglib/src/glib.h
@@ -603,10 +603,14 @@ void g_assertion_message (const gchar *format, ...) G_GNUC_NORETURN
#define g_message(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
#define g_debug(...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, __VA_ARGS__)
#endif /* ndef HAVE_C99_SUPPORT */
-#define g_log_set_handler(a,b,c,d)
-#define G_GNUC_INTERNAL
+typedef void (*GLogFunc) (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data);
+typedef void (*GPrintFunc) (const gchar *string);
+void g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data);
+GLogFunc g_log_set_default_handler (GLogFunc log_func, gpointer user_data);
+GPrintFunc g_set_print_handler (GPrintFunc func);
+GPrintFunc g_set_printerr_handler (GPrintFunc func);
/*
* Conversions
*/
@@ -1010,19 +1014,6 @@ glong g_utf8_pointer_to_offset (const gchar *str, const gchar *pos);
#define G_PRIORITY_DEFAULT 0
#define G_PRIORITY_DEFAULT_IDLE 200
-/*
- * Empty thread functions, not used by eglib
- */
-#define g_thread_supported() TRUE
-#define g_thread_init(x) G_STMT_START { if (x != NULL) { g_error ("No vtable supported in g_thread_init"); } } G_STMT_END
-
-#define G_LOCK_DEFINE(name) int name;
-#define G_LOCK_DEFINE_STATIC(name) static int name;
-#define G_LOCK_EXTERN(name)
-#define G_LOCK(name)
-#define G_TRYLOCK(name)
-#define G_UNLOCK(name)
-
#define GUINT16_SWAP_LE_BE_CONSTANT(x) ((((guint16) x) >> 8) | ((((guint16) x) << 8)))
#define GUINT16_SWAP_LE_BE(x) ((guint16) (((guint16) x) >> 8) | ((((guint16)(x)) & 0xff) << 8))
diff --git a/eglib/src/goutput.c b/eglib/src/goutput.c
index 73ef1f383de..9756b67a47d 100644
--- a/eglib/src/goutput.c
+++ b/eglib/src/goutput.c
@@ -35,85 +35,47 @@
/* The current fatal levels, error is always fatal */
static GLogLevelFlags fatal = G_LOG_LEVEL_ERROR;
+static GLogFunc default_log_func;
+static gpointer default_log_func_user_data;
+static GPrintFunc stdout_handler, stderr_handler;
-#if PLATFORM_ANDROID
-#include <android/log.h>
-
-static android_LogPriority
-to_android_priority (GLogLevelFlags log_level)
-{
- switch (log_level & G_LOG_LEVEL_MASK)
- {
- case G_LOG_LEVEL_ERROR: return ANDROID_LOG_FATAL;
- case G_LOG_LEVEL_CRITICAL: return ANDROID_LOG_ERROR;
- case G_LOG_LEVEL_WARNING: return ANDROID_LOG_WARN;
- case G_LOG_LEVEL_MESSAGE: return ANDROID_LOG_INFO;
- case G_LOG_LEVEL_INFO: return ANDROID_LOG_DEBUG;
- case G_LOG_LEVEL_DEBUG: return ANDROID_LOG_VERBOSE;
- }
- return ANDROID_LOG_UNKNOWN;
-}
-
-static void
-out_vfprintf (FILE *ignore, const gchar *format, va_list args)
-{
- /* TODO: provide a proper app name */
- __android_log_vprint (ANDROID_LOG_ERROR, "mono", format, args);
-}
-#elif MONOTOUCH && defined(__arm__)
-#include <asl.h>
-
-static int
-to_asl_priority (GLogLevelFlags log_level)
-{
- switch (log_level & G_LOG_LEVEL_MASK)
- {
- case G_LOG_LEVEL_ERROR: return ASL_LEVEL_CRIT;
- case G_LOG_LEVEL_CRITICAL: return ASL_LEVEL_ERR;
- case G_LOG_LEVEL_WARNING: return ASL_LEVEL_WARNING;
- case G_LOG_LEVEL_MESSAGE: return ASL_LEVEL_NOTICE;
- case G_LOG_LEVEL_INFO: return ASL_LEVEL_INFO;
- case G_LOG_LEVEL_DEBUG: return ASL_LEVEL_DEBUG;
- }
- return ASL_LEVEL_ERR;
-}
-
-static void
-out_vfprintf (FILE *ignore, const gchar *format, va_list args)
-{
- asl_vlog (NULL, NULL, ASL_LEVEL_WARNING, format, args);
-}
-
-#else
-static void
-out_vfprintf (FILE *file, const gchar *format, va_list args)
-{
- vfprintf (file, format, args);
-}
-#endif
+static void default_stdout_handler (const gchar *string);
+static void default_stderr_handler (const gchar *string);
void
g_print (const gchar *format, ...)
{
+ char *msg;
va_list args;
va_start (args, format);
+ if (vasprintf (&msg, format, args) < 0)
+ return;
+ va_end (args);
- out_vfprintf (stdout, format, args);
+ if (!stdout_handler)
+ stdout_handler = default_stdout_handler;
- va_end (args);
+ stdout_handler (msg);
+ free (msg);
}
void
g_printerr (const gchar *format, ...)
{
+ char *msg;
va_list args;
va_start (args, format);
+ if (vasprintf (&msg, format, args) < 0)
+ return;
+ va_end (args);
- out_vfprintf (stderr, format, args);
+ if (!stderr_handler)
+ stderr_handler = default_stderr_handler;
- va_end (args);
+ stderr_handler (msg);
+ free (msg);
}
GLogLevelFlags
@@ -140,42 +102,16 @@ g_log_set_fatal_mask (const gchar *log_domain, GLogLevelFlags fatal_mask)
void
g_logv (const gchar *log_domain, GLogLevelFlags log_level, const gchar *format, va_list args)
{
-#if PLATFORM_ANDROID
- __android_log_vprint (to_android_priority (log_level), log_domain, format, args);
-#elif MONOTOUCH && defined(__arm__)
- asl_vlog (NULL, NULL, to_asl_priority (log_level), format, args);
-#else
char *msg;
+
+ if (!default_log_func)
+ default_log_func = g_log_default_handler;
if (vasprintf (&msg, format, args) < 0)
return;
-#ifdef G_OS_WIN32
- printf ("%s%s%s\n",
- log_domain != NULL ? log_domain : "",
- log_domain != NULL ? ": " : "",
- msg);
-#else
-#if MONOTOUCH
- FILE *target = stderr;
-#else
- FILE *target = stdout;
-#endif
-
- fprintf (target, "%s%s%s\n",
- log_domain != NULL ? log_domain : "",
- log_domain != NULL ? ": " : "",
- msg);
-#endif
+ default_log_func (log_domain, log_level, msg, default_log_func_user_data);
free (msg);
- if (log_level & fatal){
- fflush (stdout);
- fflush (stderr);
- }
-#endif
- if (log_level & fatal){
- abort ();
- }
}
void
@@ -196,6 +132,143 @@ g_assertion_message (const gchar *format, ...)
va_start (args, format);
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, format, args);
va_end (args);
- abort ();
+}
+
+
+#if PLATFORM_ANDROID
+#include <android/log.h>
+
+static android_LogPriority
+to_android_priority (GLogLevelFlags log_level)
+{
+ switch (log_level & G_LOG_LEVEL_MASK)
+ {
+ case G_LOG_LEVEL_ERROR: return ANDROID_LOG_FATAL;
+ case G_LOG_LEVEL_CRITICAL: return ANDROID_LOG_ERROR;
+ case G_LOG_LEVEL_WARNING: return ANDROID_LOG_WARN;
+ case G_LOG_LEVEL_MESSAGE: return ANDROID_LOG_INFO;
+ case G_LOG_LEVEL_INFO: return ANDROID_LOG_DEBUG;
+ case G_LOG_LEVEL_DEBUG: return ANDROID_LOG_VERBOSE;
+ }
+ return ANDROID_LOG_UNKNOWN;
+}
+
+void
+g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
+{
+ __android_log_write (to_android_priority (log_level), log_domain, message);
+ if (log_level & fatal)
+ abort ();
+}
+
+static void
+default_stdout_handler (const gchar *message)
+{
+ /* TODO: provide a proper app name */
+ __android_log_write (ANDROID_LOG_ERROR, "mono", message);
+}
+
+static void
+default_stderr_handler (const gchar *message)
+{
+ /* TODO: provide a proper app name */
+ __android_log_write (ANDROID_LOG_ERROR, "mono", message);
+}
+
+
+#elif defined(HOST_IOS)
+#include <asl.h>
+
+static int
+to_asl_priority (GLogLevelFlags log_level)
+{
+ switch (log_level & G_LOG_LEVEL_MASK)
+ {
+ case G_LOG_LEVEL_ERROR: return ASL_LEVEL_CRIT;
+ case G_LOG_LEVEL_CRITICAL: return ASL_LEVEL_ERR;
+ case G_LOG_LEVEL_WARNING: return ASL_LEVEL_WARNING;
+ case G_LOG_LEVEL_MESSAGE: return ASL_LEVEL_NOTICE;
+ case G_LOG_LEVEL_INFO: return ASL_LEVEL_INFO;
+ case G_LOG_LEVEL_DEBUG: return ASL_LEVEL_DEBUG;
+ }
+ return ASL_LEVEL_ERR;
+}
+
+void
+g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
+{
+ asl_log (NULL, NULL, to_asl_priority (log_level), "%s", message);
+ if (log_level & fatal)
+ abort ();
+}
+
+static void
+default_stdout_handler (const gchar *message)
+{
+ asl_log (NULL, NULL, ASL_LEVEL_WARNING, "%s", message);
+}
+
+static void
+default_stderr_handler (const gchar *message)
+{
+ asl_log (NULL, NULL, ASL_LEVEL_WARNING, "%s", message);
+}
+
+#else
+
+void
+g_log_default_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data)
+{
+ FILE *target = stdout;
+
+ fprintf (target, "%s%s%s\n",
+ log_domain != NULL ? log_domain : "",
+ log_domain != NULL ? ": " : "",
+ message);
+
+ if (log_level & fatal) {
+ fflush (stdout);
+ fflush (stderr);
+ abort ();
+ }
+}
+
+static void
+default_stdout_handler (const gchar *string)
+{
+ fprintf (stdout, "%s", string);
+}
+
+static void
+default_stderr_handler (const gchar *string)
+{
+ fprintf (stderr, "%s", string);
+}
+
+#endif
+
+GLogFunc
+g_log_set_default_handler (GLogFunc log_func, gpointer user_data)
+{
+ GLogFunc old = default_log_func;
+ default_log_func = log_func;
+ default_log_func_user_data = user_data;
+ return old;
+}
+
+GPrintFunc
+g_set_print_handler (GPrintFunc func)
+{
+ GPrintFunc old = stdout_handler;
+ stdout_handler = func;
+ return old;
+}
+
+GPrintFunc
+g_set_printerr_handler (GPrintFunc func)
+{
+ GPrintFunc old = stderr_handler;
+ stderr_handler = func;
+ return old;
}
diff --git a/external/cecil b/external/cecil
-Subproject 89cfb1d4079002394010fd351628ad057c94422
+Subproject 33d50b874fd527118bc361d83de3d494e8bb55e
diff --git a/external/ikvm b/external/ikvm
-Subproject 92df59f033ef81a9b5a9cc6b09d44ed18d24451
+Subproject 22534de2098acbcf208f6b06836d122dab799e4
diff --git a/libgc/configure.ac b/libgc/configure.ac
index 7dc04985a90..ac992abfaf9 100644
--- a/libgc/configure.ac
+++ b/libgc/configure.ac
@@ -114,6 +114,17 @@ case "$THREADS" in
AC_DEFINE(THREAD_LOCAL_ALLOC)
THREADDLLIBS="-lpthread -lrt"
;;
+ *-*-kfreebsd*-gnu)
+ AC_DEFINE(GC_FREEBSD_THREADS)
+ INCLUDES="$INCLUDES -pthread"
+ THREADDLLIBS=-pthread
+ AC_DEFINE(_REENTRANT)
+ if test "${enable_parallel_mark}" = yes; then
+ AC_DEFINE(PARALLEL_MARK)
+ fi
+ AC_DEFINE(THREAD_LOCAL_ALLOC)
+ AC_DEFINE(USE_COMPILER_TLS)
+ ;;
*-*-freebsd*)
AC_DEFINE(GC_FREEBSD_THREADS)
if test "x$PTHREAD_CFLAGS" != "x"; then
diff --git a/libgc/dyn_load.c b/libgc/dyn_load.c
index ca7ce54f194..5db3503aacb 100644
--- a/libgc/dyn_load.c
+++ b/libgc/dyn_load.c
@@ -26,7 +26,7 @@
* None of this is safe with dlclose and incremental collection.
* But then not much of anything is safe in the presence of dlclose.
*/
-#if (defined(__linux__) || defined(__native_client__)) && !defined(_GNU_SOURCE)
+#if (defined(__linux__) || defined(__GLIBC__) || defined(__native_client__)) && !defined(_GNU_SOURCE)
/* Can't test LINUX, since this must be define before other includes */
# define _GNU_SOURCE
#endif
@@ -394,7 +394,7 @@ GC_bool GC_register_main_static_data()
/* For glibc 2.2.4+. Unfortunately, it doesn't work for older */
/* versions. Thanks to Jakub Jelinek for most of the code. */
-# if (defined(LINUX) || defined(NACL)) /* Are others OK here, too? */ \
+# if (defined(LINUX) || defined (__GLIBC__) || defined(NACL)) /* Are others OK here, too? */ \
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
diff --git a/libgc/include/gc.h b/libgc/include/gc.h
index 4693a3d9a54..2265fdbd34a 100644
--- a/libgc/include/gc.h
+++ b/libgc/include/gc.h
@@ -497,7 +497,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
# define GC_RETURN_ADDR (GC_word)__return_address
#endif
-#ifdef __linux__
+#if defined(__linux__) || defined(__GLIBC__)
# include <features.h>
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
&& !defined(__ia64__)
diff --git a/libgc/include/private/gcconfig.h b/libgc/include/private/gcconfig.h
index 418e046ae12..3cbab919b94 100644
--- a/libgc/include/private/gcconfig.h
+++ b/libgc/include/private/gcconfig.h
@@ -55,7 +55,7 @@
# endif
/* And one for FreeBSD: */
-# if defined(__FreeBSD__) && !defined(FREEBSD)
+# if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD)
# define FREEBSD
# endif
@@ -1371,8 +1371,15 @@
# ifndef GC_FREEBSD_THREADS
# define MPROTECT_VDB
# endif
-# define SIG_SUSPEND SIGTSTP
-# define SIG_THR_RESTART SIGCONT
+# ifdef __GLIBC__
+# define SIG_SUSPEND (32+6)
+# define SIG_THR_RESTART (32+5)
+ extern int _end[];
+# define DATAEND (_end)
+# else
+# define SIG_SUSPEND SIGTSTP
+# define SIG_THR_RESTART SIGCONT
+# endif
# define FREEBSD_STACKBOTTOM
# ifdef __ELF__
# define DYNAMIC_LOADING
@@ -2132,8 +2139,15 @@
# ifndef GC_FREEBSD_THREADS
# define MPROTECT_VDB
# endif
-# define SIG_SUSPEND SIGTSTP
-# define SIG_THR_RESTART SIGCONT
+# ifdef __GLIBC__
+# define SIG_SUSPEND (32+6)
+# define SIG_THR_RESTART (32+5)
+ extern int _end[];
+# define DATAEND (_end)
+# else
+# define SIG_SUSPEND SIGUSR1
+# define SIG_THR_RESTART SIGUSR2
+# endif
# define NEED_FIND_LIMIT
# define FREEBSD_STACKBOTTOM
# ifdef __ELF__
@@ -2230,7 +2244,7 @@
# define SUNOS5SIGS
# endif
-# if defined(FREEBSD) && (__FreeBSD__ >= 4)
+# if defined(FREEBSD) && ((__FreeBSD__ >= 4) || (__FreeBSD_kernel__ >= 4))
# define SUNOS5SIGS
# endif
@@ -2293,7 +2307,7 @@
# define CACHE_LINE_SIZE 32 /* Wild guess */
# endif
-# ifdef LINUX
+# if defined(LINUX) || defined(__GLIBC__)
# define REGISTER_LIBRARIES_EARLY
/* We sometimes use dl_iterate_phdr, which may acquire an internal */
/* lock. This isn't safe after the world has stopped. So we must */
@@ -2374,7 +2388,7 @@
#if defined(SPARC)
# define CAN_SAVE_CALL_ARGS
#endif
-#if (defined(I386) || defined(X86_64)) && defined(LINUX)
+#if (defined(I386) || defined(X86_64)) && (defined(LINUX) || defined(__GLIBC__))
/* SAVE_CALL_CHAIN is supported if the code is compiled to save */
/* frame pointers by default, i.e. no -fomit-frame-pointer flag. */
# define CAN_SAVE_CALL_ARGS
diff --git a/man/mono.1 b/man/mono.1
index ac2808e25f3..3d4bd54e989 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -1216,6 +1216,17 @@ is used.
Performs a check to make sure that no references are left to an
unloaded AppDomain.
.TP
+\fBclear-at-tlab-creation\fR
+Clears the nursery incrementally when the thread local allocation
+buffers (TLAB) are created. The default setting clears the whole
+nursery at GC time.
+.TP
+\fBdebug-clear-at-tlab-creation\fR
+Clears the nursery incrementally when the thread local allocation
+buffers (TLAB) are created, but at GC time fills it with the byte
+`0xff`, which should result in a crash more quickly if
+`clear-at-tlab-creation` doesn't work properly.
+.TP
\fBclear-at-gc\fR
This clears the nursery at GC time instead of doing it when the thread
local allocation buffer (TLAB) is created. The default is to clear
diff --git a/mcs/Makefile b/mcs/Makefile
index a10dfa504cb..af4495e9195 100644
--- a/mcs/Makefile
+++ b/mcs/Makefile
@@ -82,7 +82,7 @@ all-local $(STD_TARGETS:=-local):
@:
dir-check:
- @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then make -C ../runtime; fi
+ @if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then $(MAKE) -C ../runtime; fi
# fun specialty targets
diff --git a/mcs/build/profiles/basic.make b/mcs/build/profiles/basic.make
index c270cc81ccf..12f6c82cff2 100644
--- a/mcs/build/profiles/basic.make
+++ b/mcs/build/profiles/basic.make
@@ -65,7 +65,7 @@ do-profile-check: $(depsdir)/.stamp
$(MAKE) -s do-profile-check-monolite ; \
else \
echo "*** The compiler '$(BOOTSTRAP_MCS)' doesn't appear to be usable." 1>&2; \
- echo "*** You need Mono version 2.4 or better installed to build MCS" 1>&2 ; \
+ echo "*** You need Mono version 2.10 or better installed to build MCS" 1>&2 ; \
echo "*** Check mono README for information on how to bootstrap a Mono installation." 1>&2 ; \
exit 1; fi; fi
diff --git a/mcs/build/profiles/net_4_0.make b/mcs/build/profiles/net_4_0.make
index a5bec4cd2cc..99782bd526a 100644
--- a/mcs/build/profiles/net_4_0.make
+++ b/mcs/build/profiles/net_4_0.make
@@ -17,3 +17,6 @@ FRAMEWORK_VERSION = 4.0
XBUILD_VERSION = 4.0
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)
+
+# Ignore tests on net_4_0 as the 4.0 IL code is never used for running (just for metadata), so it doesn't make sense to execute tests there
+NO_TEST = yes
diff --git a/mcs/class/Accessibility/Accessibility.csproj b/mcs/class/Accessibility/Accessibility.csproj
deleted file mode 100644
index cc6dc88dbca..00000000000
--- a/mcs/class/Accessibility/Accessibility.csproj
+++ /dev/null
@@ -1,70 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{75D99998-A9C1-4B89-AD47-DA830E461DED}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>Accessibility</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <RootNamespace>Accessibility</RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_1_1;NET_2_0;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_1_1;NET_2_0;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="Accessibility\IAccessible.cs" />
- <Compile Include="Accessibility\IAccessibleHandler.cs" />
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" />
- </VisualStudio>
- </ProjectExtensions>
-</Project>
diff --git a/mcs/class/Accessibility/Assembly/AssemblyInfo.cs b/mcs/class/Accessibility/Assembly/AssemblyInfo.cs
index 82a24e7fa83..2b7c5494fed 100644
--- a/mcs/class/Accessibility/Assembly/AssemblyInfo.cs
+++ b/mcs/class/Accessibility/Assembly/AssemblyInfo.cs
@@ -55,10 +55,8 @@ using System.Runtime.InteropServices;
[assembly: Guid ("1ea4dbf0-3c3b-11cf-810c-00aa00389b71")]
[assembly: AllowPartiallyTrustedCallers]
-#if !TARGET_JVM
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../msfinal.pub")]
-#endif
[assembly: ImportedFromTypeLib ("Accessibility")]
diff --git a/mcs/class/Commons.Xml.Relaxng/Test/NvdlValidatingReaderTests.cs b/mcs/class/Commons.Xml.Relaxng/Test/NvdlValidatingReaderTests.cs
index e7d600c5ea0..8f0ae73cf6d 100644
--- a/mcs/class/Commons.Xml.Relaxng/Test/NvdlValidatingReaderTests.cs
+++ b/mcs/class/Commons.Xml.Relaxng/Test/NvdlValidatingReaderTests.cs
@@ -13,7 +13,7 @@ using System.Xml;
using Commons.Xml.Nvdl;
using NUnit.Framework;
-namespace MonoTests.Commons.Xml.Nvdl
+namespace MonoTests.Commons.Xml.Relaxng
{
[TestFixture]
public class NvdlValidatingReaderTests
diff --git a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
index 48a4e24b5f0..060d9292265 100644
--- a/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
+++ b/mcs/class/Facades/System.Runtime.InteropServices/TypeForwarders.cs
@@ -40,6 +40,8 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.COMException))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComMemberType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComSourceInterfacesAttribute))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.IStream))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.ComTypes.STATSTG))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CriticalHandle))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CurrencyWrapper))]
//[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.CustomQueryInterfaceMode))]
@@ -76,4 +78,3 @@
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.UnmanagedType))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VarEnum))]
[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Runtime.InteropServices.VariantWrapper))]
-
diff --git a/mcs/class/I18N/CJK/I18N.CJK.csproj b/mcs/class/I18N/CJK/I18N.CJK.csproj
deleted file mode 100644
index 1e56b048f06..00000000000
--- a/mcs/class/I18N/CJK/I18N.CJK.csproj
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>414</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="I18N">
- <HintPath>..\lib\net_2_0\I18N.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="big5.table"/>
- <EmbeddedResource Include="gb2312.table"/>
- <EmbeddedResource Include="jis.table"/>
- <EmbeddedResource Include="ks.table"/>
- <EmbeddedResource Include="gb18030.table"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/I18N/Common/I18N.csproj b/mcs/class/I18N/Common/I18N.csproj
deleted file mode 100644
index 4ec39ac1085..00000000000
--- a/mcs/class/I18N/Common/I18N.csproj
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>414</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/I18N/MidEast/I18N.MidEast.csproj b/mcs/class/I18N/MidEast/I18N.MidEast.csproj
deleted file mode 100644
index ef2b3e14a47..00000000000
--- a/mcs/class/I18N/MidEast/I18N.MidEast.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>414</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="I18N">
- <HintPath>..\lib\net_2_0\I18N.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/I18N/Other/I18N.Other.csproj b/mcs/class/I18N/Other/I18N.Other.csproj
deleted file mode 100644
index ef2b3e14a47..00000000000
--- a/mcs/class/I18N/Other/I18N.Other.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>414</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="I18N">
- <HintPath>..\lib\net_2_0\I18N.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/I18N/Rare/I18N.Rare.csproj b/mcs/class/I18N/Rare/I18N.Rare.csproj
deleted file mode 100644
index ef2b3e14a47..00000000000
--- a/mcs/class/I18N/Rare/I18N.Rare.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>414</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="I18N">
- <HintPath>..\lib\net_2_0\I18N.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/I18N/West/I18N.West.csproj b/mcs/class/I18N/West/I18N.West.csproj
deleted file mode 100644
index ef2b3e14a47..00000000000
--- a/mcs/class/I18N/West/I18N.West.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>414</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="I18N">
- <HintPath>..\lib\net_2_0\I18N.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Makefile b/mcs/class/Makefile
index 1e604f9aae1..47cf334888e 100644
--- a/mcs/class/Makefile
+++ b/mcs/class/Makefile
@@ -16,16 +16,7 @@ build_SUBDIRS := \
Mono.Posix \
System.Core
-net_1_1_java_SUBDIRS = \
- System.Xml \
- System.Data \
- System.Drawing \
- Novell.Directory.Ldap \
- System.DirectoryServices \
- System.Runtime.Serialization.Formatters.Soap \
- System.Runtime.Remoting
-
-common_dirs := \
+net_2_0_dirs := \
corlib \
System \
System.XML \
@@ -78,14 +69,11 @@ common_dirs := \
Mono.Cecil \
Mono.Cecil.Mdb \
Mono.Debugger.Soft \
- SystemWebTestShim
-
-net_2_0_dirs := \
+ SystemWebTestShim \
System.Xml.Linq \
System.Runtime.Serialization \
System.Data.DataSetExtensions \
System.Data.Linq \
- System.Web \
System.Web.Abstractions \
System.Web.Routing \
System.IdentityModel \
@@ -179,7 +167,6 @@ net_4_0_dirs := \
System.Xaml \
WindowsBase \
System.ServiceModel.Activation \
- System.ServiceModel \
System.ServiceModel.Routing \
System.ServiceModel.Discovery \
System.Runtime.Caching \
@@ -241,7 +228,7 @@ xbuild_4_0_dirs := \
$(xbuild_2_0_dirs) \
Microsoft.Build
-net_2_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
+net_2_0_SUBDIRS := $(net_2_0_dirs) $(net_2_0_only_dirs) $(xbuild_2_0_dirs) aot-compiler
monodroid_SUBDIRS := $(mobile_dirs) $(monodroid_dirs)
monotouch_SUBDIRS := $(mobile_dirs) $(monotouch_dirs)
monotouch_runtime_SUBDIRS := $(monotouch_runtime_dirs)
@@ -249,13 +236,13 @@ mobile_static_SUBDIRS := $(mobile_dirs)
mobile_SUBDIRS := $(mobile_dirs)
xammac_SUBDIRS := $(mobile_dirs) $(xammac_dirs)
net_3_5_SUBDIRS := $(xbuild_2_0_dirs)
-net_4_0_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
-net_4_5_SUBDIRS := $(common_dirs) $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
+net_4_0_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(xbuild_4_0_dirs)
+net_4_5_SUBDIRS := $(net_2_0_dirs) $(net_4_0_dirs) $(net_4_5_dirs) $(xbuild_4_0_dirs) aot-compiler
xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
include ../build/rules.make
-SUBDIRS = $(common_dirs) $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
+SUBDIRS = $(net_2_0_dirs) $(net_2_0_only_dirs) $(mobile_dirs) $(monotouch_dirs) $(net_4_0_dirs) $(net_4_0_only_dirs) $(net_4_5_dirs)
DIST_ONLY_SUBDIRS = dlr aot-compiler $(xbuild_4_0_dirs)
diff --git a/mcs/class/Managed.Windows.Forms/Makefile b/mcs/class/Managed.Windows.Forms/Makefile
index 37a323899be..556fab1dc33 100644
--- a/mcs/class/Managed.Windows.Forms/Makefile
+++ b/mcs/class/Managed.Windows.Forms/Makefile
@@ -100,7 +100,7 @@ TEST_DISTFILES = \
EXTRA_DISTFILES = \
README System.Windows.Forms.dll.resources \
- $(RESX_RESOURCES:.resources=.resx) $(CUR_RESOURCES) $(PREBUILT) build-csproj build-csproj2k5 \
+ $(RESX_RESOURCES:.resources=.resx) $(CUR_RESOURCES) $(PREBUILT) \
$(IMAGES_RESOURCES) \
$(TEST_DISTFILES)
diff --git a/mcs/class/Managed.Windows.Forms/SWF.csproj b/mcs/class/Managed.Windows.Forms/SWF.csproj
deleted file mode 100644
index 596f8837942..00000000000
--- a/mcs/class/Managed.Windows.Forms/SWF.csproj
+++ /dev/null
@@ -1,4902 +0,0 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{5E6430B2-6B9F-4E76-802E-20207EF80391}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "System.Windows.Forms"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Library"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = ""
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_1_1 ONLY_1_1"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Debug\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- <Config
- Name = "Debug 2.0"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_2_0"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Debug\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_1_1 ONLY_1_1"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Release\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- <Config
- Name = "Release 2.0"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_2_0"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Release\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- </Settings>
- <References>
- <Reference
- Name = "Accessibility"
- AssemblyName = "Accessibility"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Accessibility.dll"
- />
- <Reference
- Name = "System"
- AssemblyName = "System"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
- />
- <Reference
- Name = "System.Data"
- AssemblyName = "System.Data"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
- />
- <Reference
- Name = "System.Drawing"
- AssemblyName = "System.Drawing"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
- />
- <Reference
- Name = "System.Data"
- AssemblyName = "System.Data"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
- />
- <Reference
- Name = "System.XML"
- AssemblyName = "System.XML"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
- />
- </References>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "..\..\build\common\Consts.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "..\..\build\common\MonoTODOAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Assembly\Locale.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Resources\ResXDataNode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Resources\ResXFileRef.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Resources\ResXNullRef.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Resources\ResXResourceReader.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Resources\ResXResourceSet.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Resources\ResXResourceWriter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\ComponentEditorForm.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\ComponentEditorPage.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\EventsTab.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\IUIService.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\IWindowsFormsEditorService.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\PropertyTab.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\ToolStripItemDesignerAvailability.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\ToolStripItemDesignerAvailabilityAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Design\WindowsFormsComponentEditor.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Internal\Accessor.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Internal\DebugHelper.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.PropertyGridInternal\PropertiesTab.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Charcode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Charset.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\CharsetFlags.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\CharsetType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\ClassDelegate.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Color.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\DestinationDelegate.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Font.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\KeyStruct.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\KeysInit.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Major.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Minor.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Picture.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\RTF.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\RTFException.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\StandardCharCode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\StandardCharName.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\Style.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\StyleElement.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\StyleType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\TextMap.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.RTF\TokenClass.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\Default\LabelPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\Default\LinkLabelPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AccessibleEvents.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AccessibleNavigation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AccessibleObject.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AccessibleRole.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AccessibleSelection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AccessibleStates.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AmbientProperties.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AnchorStyles.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Appearance.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Application.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ApplicationContext.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ArrangeDirection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ArrangeStartingPosition.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ArrowDirection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AsyncMethodData.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AsyncMethodResult.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AutoCompleteMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AutoCompleteSource.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AutoCompleteStringCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AutoScaleMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AutoSizeMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AutoValidate.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\AxHost.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BaseCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BatteryChargeStatus.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Binding.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingCompleteContext.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingCompleteEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingCompleteEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingCompleteState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingContext.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingManagerBase.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingManagerDataErrorEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingManagerDataErrorEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingMemberInfo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingNavigator.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingSource.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BindingsCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BootMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Border3DSide.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Border3DStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\BoundsSpecified.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Button.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ButtonBase.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ButtonBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ButtonRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ButtonState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CacheVirtualItemsEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CacheVirtualItemsEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CaptionButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CategoryGridEntry.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CharacterCasing.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CheckBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CheckBoxRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CheckState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CheckedListBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Clipboard.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CloseReason.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColorDepth.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColorDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnClickEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnClickEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnHeader.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnHeaderAutoResizeStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnHeaderConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnHeaderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnReorderedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnReorderedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnWidthChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnWidthChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnWidthChangingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ColumnWidthChangingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ComboBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ComboBoxRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ComboBoxStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CommonDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ComponentModel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ContainerControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ContentsResizedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ContentsResizedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ContextMenu.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ContextMenuStrip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Control.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ControlBindingsCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ControlEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ControlEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ControlPaint.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ControlStyles.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ControlUpdateMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ConvertEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ConvertEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CreateParams.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CurrencyManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Cursor.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\CursorConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Cursors.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataFormats.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGrid.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridBoolColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridColumnStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridLineStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridParentRowsLabelStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridPreferredColumnWidthTypeConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridTableStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridTextBoxColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridView.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAdvancedBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAdvancedCellBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeColumnMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeColumnModeEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeColumnModeEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeColumnsMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeColumnsModeEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeColumnsModeEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeModeEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeModeEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeRowMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewAutoSizeRowsMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewBand.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewBindingCompleteEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewBindingCompleteEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewButtonCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewButtonColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellCancelEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellCancelEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellContextMenuStripNeededEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellContextMenuStripNeededEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellErrorTextNeededEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellErrorTextNeededEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellFormattingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellFormattingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellMouseEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellMouseEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellPaintingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellPaintingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellParsingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellParsingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellStateChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellStateChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellStyleContentChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellStyleContentChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellStyleConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellStyleScopes.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellToolTipTextNeededEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellToolTipTextNeededEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellValidatingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellValidatingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellValueEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCellValueEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCheckBoxCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewCheckBoxColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewClipboardCopyMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnDesignTimeVisibleAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnDividerDoubleClickEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnDividerDoubleClickEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnHeaderCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnHeadersHeightSizeMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnSortMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnStateChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewColumnStateChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewComboBoxCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewComboBoxColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewComboBoxDisplayStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewComboBoxEditingControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewContentAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewDataErrorContexts.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewDataErrorEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewDataErrorEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewEditMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewEditingControlShowingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewEditingControlShowingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewElement.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewElementStates.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewHeaderBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewHeaderCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewHitTestType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewImageCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewImageCellLayout.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewImageColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewLinkCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewLinkColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewPaintParts.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRow.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowCancelEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowCancelEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowContextMenuStripNeededEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowContextMenuStripNeededEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowDividerDoubleClickEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowDividerDoubleClickEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowErrorTextNeededEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowErrorTextNeededEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowHeaderCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowHeadersWidthSizeMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowHeightInfoNeededEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowHeightInfoNeededEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowHeightInfoPushedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowHeightInfoPushedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowPostPaintEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowPostPaintEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowPrePaintEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowPrePaintEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowStateChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowStateChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowsAddedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowsAddedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowsRemovedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewRowsRemovedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewSelectedCellCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewSelectedColumnCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewSelectedRowCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewSelectionMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewSortCompareEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewSortCompareEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewTextBoxCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewTextBoxColumn.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewTextBoxEditingControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewTopLeftHeaderCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataGridViewTriState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataObject.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DataSourceUpdateMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DateBoldEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DateBoldEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DateRangeEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DateRangeEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DateTimePicker.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DateTimePickerFormat.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Day.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DialogResult.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DockingAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DockStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DockingBehavior.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DomainUpDown.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DragAction.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DragDropEffects.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DragEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DragEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawItemState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawListViewColumnHeaderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawListViewColumnHeaderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawListViewItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawListViewItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawListViewSubItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawListViewSubItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawToolTipEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawToolTipEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawTreeNodeEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\DrawTreeNodeEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ErrorBlinkStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ErrorIconAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ErrorProvider.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FeatureSupport.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FileDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FileDialogCustomPlace.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FileDialogCustomPlacesCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FixedPanel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FixedSizeTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FlatButtonAppearance.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FlatStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FlowDirection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FlowLayoutPanel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FlowLayoutSettings.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FolderBrowserDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FontDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Form.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormClosedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormClosedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormClosingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormClosingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormStartPosition.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormWindowManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FormWindowState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\FrameStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GetChildAtPointSkip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GiveFeedbackEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GiveFeedbackEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GridColumnStylesCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GridEntry.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GridItem.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GridItemCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GridItemType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GridTableStylesCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GridTablesFactory.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GroupBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\GroupBoxRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HScrollBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HandledMouseEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Help.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HelpEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HelpEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HelpNavigator.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HelpProvider.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HorizontalAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HScrollProperties.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlDocument.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlElement.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlElementCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlElementErrorEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlElementErrorEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlElementEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlElementEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlElementInsertionOrientation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlHistory.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlWindow.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\HtmlWindowCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Hwnd.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IButtonControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IBindableComponent.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IBounds.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ICommandExecutor.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IComponentEditorPageSite.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IContainerControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ICurrencyManagerProvider.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IDataGridColumnStyleEditingNotificationService.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IDataGridEditingService.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IDataGridViewEditingCell.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IDataGridViewEditingControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IDataObject.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IDeviceContext.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IDropTarget.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IFeatureSupport.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IFileReaderService.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IKeyFilter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IMessageFilter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IRootGridEntry.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IWin32Window.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IWindowTarget.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImageIndexConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImageKeyConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImageLayout.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImageList.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImageListConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImageListStreamer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImeMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImplicitHScrollBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ImplicitVScrollBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InputLanguage.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InputLanguageChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InputLanguageChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InputLanguageChangingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InputLanguageChangingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InputLanguageCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InsertKeyMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InternalWindowManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InvalidateEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\InvalidateEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemActivation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemBoundsPortion.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemCheckEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemCheckEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemCheckedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemCheckedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemDragEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ItemDragEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\IToolStripData.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\KeyEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\KeyEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\KeyPressEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\KeyPressEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\KeyboardLayouts.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Keys.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\KeysConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Label.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LabelEditEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LabelEditEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LabelEditTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LayoutEngine.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LayoutEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LayoutEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LayoutSettings.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LeftRightAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Line.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LineTag.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkArea.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkBehavior.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkClickedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkClickedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkLabel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkLabelLinkClickedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkLabelLinkClickedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\LinkState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListBindingConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListBindingHelper.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListControlConvertEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListControlConvertEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListView.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewGroup.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewGroupCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewHitTestInfo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewHitTestLocations.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewInsertionMark.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewItem.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewItemConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewItemMouseHoverEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewItemMouseHoverEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewItemSelectionChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewItemSelectionChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewItemStates.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewVirtualItemsSelectionRangeChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ListViewVirtualItemsSelectionRangeChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MWFCategoryAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MWFDescriptionAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MainMenu.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MaskFormat.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MaskInputRejectedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MaskInputRejectedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MaskedTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MdiClient.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MdiControlStrip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MdiLayout.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MdiWindowManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MeasureItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MeasureItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Menu.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MenuAPI.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MenuGlyph.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MenuItem.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MenuMerge.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MenuStrip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MergeAction.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Message.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MessageBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MessageBoxButtons.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MessageBoxDefaultButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MessageBoxIcon.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MessageBoxOptions.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MethodInvoker.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Mime.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MimeIcon.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MonthCalendar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MouseButtons.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MouseEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\MouseEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NativeWindow.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NavigateEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NavigateEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NodeLabelEditEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NodeLabelEditEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NotifyIcon.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NumericTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NumericUpDown.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NumericUpDownAcceleration.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\NumericUpDownAccelerationCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\OSFeature.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\OpacityConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\OpenFileDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\OpenTreeNodeEnumerator.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Orientation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\OwnerDrawPropertyBag.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Padding.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PaddingConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PageSetupDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PaintEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PaintEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Panel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PictureBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PictureBoxSizeMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PopupEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PopupEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PowerLineStatus.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PowerState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PowerStatus.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PreProcessControlState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PreviewKeyDownEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PreviewKeyDownEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PrintControllerWithStatusDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PrintDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PrintPreviewControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PrintPreviewDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ProfessionalColors.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ProfessionalColorTable.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ProgressBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ProgressBarRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ProgressBarStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyGrid.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyGridCommands.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyGridTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyGridView.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertySort.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyTabChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyTabChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyValueChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\PropertyValueChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\QueryAccessibilityHelpEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\QueryAccessibilityHelpEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\QueryContinueDragEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\QueryContinueDragEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\QuestionEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\QuestionEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RadioButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RadioButtonRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RelatedCurrencyManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RelatedImageListAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RelatedPropertyManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RetrieveVirtualItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RetrieveVirtualItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBoxFinds.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBoxLanguageOptions.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBoxScrollBars.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBoxSelectionAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBoxSelectionTypes.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBoxStreamType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RichTextBoxWordPunctuations.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RightToLeft.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RootGridEntry.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\RowStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SaveFileDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Screen.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScreenOrientation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollBarRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollBars.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollEventType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollOrientation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollProperties.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ScrollableControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SearchDirectionHint.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SearchForVirtualItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SearchForVirtualItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SecurityIDType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SelectedGridItemChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SelectedGridItemChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SelectionMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SelectionRange.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SelectionRangeConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SendKeys.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Shortcut.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SizeGrip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SizeGripStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SizeType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SortOrder.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SplitContainer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Splitter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SplitterCancelEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SplitterCancelEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SplitterEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SplitterEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SplitterPanel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarDrawItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarDrawItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarPanel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarPanelAutoSize.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarPanelBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarPanelClickEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarPanelClickEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusBarPanelStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StatusStrip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\StructFormat.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SystemInformation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\SystemParameter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabAppearance.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabControlAction.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabControlCancelEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabControlCancelEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabControlEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabControlEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabDrawMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabPage.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TabSizeMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutCellPaintEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutCellPaintEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutColumnStyleCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutControlCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutPanel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutPanelCellBorderStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutPanelCellPosition.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutPanelGrowStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutRowStyleCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutSettings.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TableLayoutStyleCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextBoxBase.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextBoxRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextBoxTextRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextDataFormat.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextFormatFlags.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextImageRelation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TextRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Theme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ThemeEngine.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ThemeVisualStyles.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ThemeWin32Classic.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ThreadExceptionDialog.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TickStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Timer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolBarAppearance.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolBarButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolBarButtonClickEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolBarButtonClickEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolBarButtonStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolBarTextAlign.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStrip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripArrowRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripArrowRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripComboBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripContainer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripContentPanel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripContentPanelRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripContentPanelRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripControlHost.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDown.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownCloseReason.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownClosedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownClosedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownClosingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownClosingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownDirection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownItem.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownItemAccessibleObject.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripDropDownMenu.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripGripDisplayStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripGripRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripGripRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripGripStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItem.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemClickedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemClickedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemDisplayStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemEventType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemImageRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemImageRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemImageScaling.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemOverflow.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemPlacement.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemTextRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripItemTextRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripLabel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripLayoutStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripManagerRenderMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripMenuItem.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripOverflow.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripOverflowButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripPanel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripPanelRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripPanelRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripPanelRow.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripProfessionalRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripProgressBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripRenderMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripSeparator.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripSeparatorRenderEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripSeparatorRenderEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripSplitButton.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripSplitStackLayout.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripStatusLabel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripStatusLabelBorderSides.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripSystemRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripTextBox.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolStripTextDirection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolTip.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolTipIcon.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ToolWindowManager.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TrackBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TrackBarRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNodeCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNodeConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNodeMouseClickEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNodeMouseClickEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNodeMouseHoverEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNodeMouseHoverEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeNodeStates.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeView.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewAction.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewCancelEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewCancelEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewDrawMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewHitTestInfo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewHitTestLocations.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewImageIndexConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TreeViewImageKeyConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TypeValidationEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\TypeValidationEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UICues.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UICuesEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UICuesEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UnhandledExceptionMode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UpDownBase.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UpDownEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UpDownEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\UserControl.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\VScrollBar.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\ValidationConstraints.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\View.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\VScrollProperties.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowser.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserBase.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserDocumentCompletedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserDocumentCompletedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserEncryptionLevel.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserNavigatedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserNavigatedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserNavigatingEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserNavigatingEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserProgressChangedEventArgs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserProgressChangedEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserReadyState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserRefreshOption.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WebBrowserSiteBase.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\Win32DnD.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WindowsFormsSection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\WindowsFormsSynchronizationContext.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\X11DesktopColors.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\X11Dnd.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\X11Keyboard.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\X11Structs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\XEventQueue.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\XplatUI.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\XplatUICarbon.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\XplatUIDriver.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\XplatUIStructs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\XplatUIWin32.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms\XplatUIX11.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Layout\ArrangedElementCollection.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Layout\DefaultLayout.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Layout\FlowLayout.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Layout\TableLayout.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Layout\TableLayoutSettingsTypeConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\ApplicationHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\ControlHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\Cursor.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\Dnd.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\EventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\EventHandlerBase.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\Enums.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\HIObjectHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\IEventHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\KeyboardHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\MouseHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\Pasteboard.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\Structs.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.CarbonInternal\WindowHandler.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\ThemeElements.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\ThemeElementsDefault.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\ThemeElementsVisualStyles.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\Default\ButtonPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\Default\CheckBoxPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\Default\RadioButtonPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\Default\TabControlPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\Default\ToolStripPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\VisualStyles\CheckBoxPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\VisualStyles\RadioButtonPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\VisualStyles\TabControlPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.Theming\VisualStyles\ToolStripPainter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\BackgroundType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\BooleanProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\BorderType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\CheckBoxState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ColorProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ComboBoxState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ContentAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\EdgeEffects.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\Edges.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\EdgeStyle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\EnumProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\FilenameProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\FillType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\FontProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\GlyphFontSizingType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\GlyphType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\GroupBoxState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\GtkPlus.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\HitTestCode.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\HitTestOptions.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\HorizontalAlign.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\IconEffect.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ImageOrientation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ImageSelectType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\IntegerProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\IVisualStyles.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\MarginProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\OffsetType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\PointProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\PushButtonState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\RadioButtonState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ScrollBarArrowButtonState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ScrollBarSizeBoxState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ScrollBarState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\SizingType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\StringProperty.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TabItemState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TextBoxState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TextMetrics.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TextMetricsCharacterSet.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TextMetricsPitchAndFamilyValues.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TextShadowType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ThemeSizeType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\ToolBarState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TrackBarThumbState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\TrueSizeScalingType.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\UXTheme.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VerticalAlignment.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VisualStyleElement.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VisualStyleInformation.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VisualStyleRenderer.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VisualStylesEngine.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VisualStylesGtkPlus.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VisualStylesNative.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.VisualStyles\VisualStyleState.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.WebBrowserDialogs\AlertCheck.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.WebBrowserDialogs\ConfirmCheck.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.WebBrowserDialogs\Generic.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Windows.Forms.WebBrowserDialogs\Prompt.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "resources\SplitterNS.cur"
- CustomToolNameSpace = "System.Windows.Forms.SplitterNS.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\SplitterWE.cur"
- CustomToolNameSpace = "System.Windows.Forms.SplitterWE.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\NESW.cur"
- CustomToolNameSpace = "System.Windows.Forms.NESW.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\NWSE.cur"
- CustomToolNameSpace = "System.Windows.Forms.NWSE.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\DnDNo.cur"
- CustomToolNameSpace = "System.Windows.Forms.DnDNo.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\DnDCopy.cur"
- CustomToolNameSpace = "System.Windows.Forms.DnDCopy.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\DnDLink.cur"
- CustomToolNameSpace = "System.Windows.Forms.DnDLink.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\DnDMove.cur"
- CustomToolNameSpace = "System.Windows.Forms.DnDMove.cur"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\keyboards.resources"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_computer.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\32_computer.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\computer.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_document-open.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\32_document-open.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\document-open.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_folder.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\folder-new.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\folder.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_folder-remote.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\32_folder-remote.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\folder-remote.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\go-previous.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\go-top.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\22_page-magnifier.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\preferences-system-windows.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_printer.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\32_printer.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\text-x-generic.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_user-desktop.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\32_user-desktop.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\user-desktop.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_user-home.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\32_user-home.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\user-home.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_dialog-error.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_dialog-information.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\16_dialog-warning.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\1-up.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\2-up.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\3-up.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\4-up.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\6-up.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\nav_delete.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\nav_end.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\nav_first.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\nav_next.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\nav_plus.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\nav_previous.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\image-missing.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\image-x-generic.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\propertygrid-alphabetical.png"
- CustomToolNameSpace = "System.Windows.Forms.propertygrid-alphabetical.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\propertygrid-categorized.png"
- CustomToolNameSpace = "System.Windows.Forms.propertygrid-categorized.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\propertygrid-propertypages.png"
- CustomToolNameSpace = "System.Windows.Forms.propertygrid-propertypages.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\EventsTab.bmp"
- CustomToolNameSpace = "System.Windows.Forms.Design.EventsTab.bmp"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\PropertiesTab.bmp"
- CustomToolNameSpace = "System.Windows.Forms.PropertyGridInternal.PropertiesTab.bmp"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\mono.ico"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "resources\errorProvider.ico"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "Consts.cs"
- Link = "common/Consts.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "MonoTODOAttribute.cs"
- Link = "common/MonoTODOAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
diff --git a/mcs/class/Managed.Windows.Forms/SWF.sln b/mcs/class/Managed.Windows.Forms/SWF.sln
deleted file mode 100644
index c1498d56f0d..00000000000
--- a/mcs/class/Managed.Windows.Forms/SWF.sln
+++ /dev/null
@@ -1,35 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C# Express 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWF", "SWF.csproj", "{5E6430B2-6B9F-4E76-802E-20207EF80391}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "testbed", "..\testbed\testbed.csproj", "{75D9EBE5-A54C-4FFF-B536-066577092A78}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug 2.0|Any CPU = Debug 2.0|Any CPU
- Debug|Any CPU = Debug|Any CPU
- Release 2.0|Any CPU = Release 2.0|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug 2.0|Any CPU.ActiveCfg = Debug 2.0|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug 2.0|Any CPU.Build.0 = Debug 2.0|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release 2.0|Any CPU.ActiveCfg = Release 2.0|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release 2.0|Any CPU.Build.0 = Release 2.0|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release|Any CPU.Build.0 = Release|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Debug 2.0|Any CPU.ActiveCfg = Debug|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Debug 2.0|Any CPU.Build.0 = Debug|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Release 2.0|Any CPU.ActiveCfg = Release|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Release 2.0|Any CPU.Build.0 = Release|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {75D9EBE5-A54C-4FFF-B536-066577092A78}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Managed.Windows.Forms/SWF2k5-tests.csproj b/mcs/class/Managed.Windows.Forms/SWF2k5-tests.csproj
deleted file mode 100644
index 6312bbbad2e..00000000000
--- a/mcs/class/Managed.Windows.Forms/SWF2k5-tests.csproj
+++ /dev/null
@@ -1,402 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{5E6430B2-6B9F-4E76-802E-20207EF80391}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>System.Windows.Forms_test</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>
- </RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>.\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1,NET_2_0,__MonoCS__,DEBUG</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms_test_net_2_0</AssemblyName>
- <RootNamespace>
- </RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug 2.0|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_2_0 __MonoCS__ DEBUG</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms_test</AssemblyName>
- <RootNamespace>
- </RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 ONLY_1_1 __MonoCS__</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms_test</AssemblyName>
- <RootNamespace>
- </RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 2.0|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_2_0 __MonoCS__</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms_test</AssemblyName>
- <RootNamespace>
- </RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <OutputPath>.\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1,NET_2_0,__MonoCS__,DEBUG</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <AssemblyName>System.Windows.Forms_test_net_2_0</AssemblyName>
- <OutputType>Library</OutputType>
- <RootNamespace>
- </RootNamespace>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>C:\winforms-unittests\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="Accessibility">
- <Name>Accessibility</Name>
- </Reference>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
- </Reference>
- <Reference Include="System.Windows.Forms">
- <Name>System.Windows.Forms</Name>
- </Reference>
- <Reference Include="System.Xml">
- <Name>System.Xml</Name>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Test\System.Windows.Forms\ApplicationTest.cs" />
- <Compile Include="Test\System.Windows.Forms\AutoCompleteStringCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ApplicationContextTest.cs" />
- <Compile Include="Test\System.Windows.Forms\BindingTest.cs" />
- <Compile Include="Test\System.Windows.Forms\BindingsCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\BindingContextTest.cs" />
- <Compile Include="Test\System.Windows.Forms\BindingManagerBaseTest.cs" />
- <Compile Include="Test\System.Windows.Forms\BindingMemberInfoTest.cs" />
- <Compile Include="Test\System.Windows.Forms\BindingNavigatorTest.cs" />
- <Compile Include="Test\System.Windows.Forms\BindingSourceTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ButtonBaseTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ButtonTest.cs" />
- <Compile Include="Test\System.Windows.Forms\CheckBoxEventTest.cs" />
- <Compile Include="Test\System.Windows.Forms\CheckBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\CheckedListBoxEventTest.cs" />
- <Compile Include="Test\System.Windows.Forms\CheckedListBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ColumnClickEventArgsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ColumnHeaderTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ColumnStyleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ComboBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\Common.cs" />
- <Compile Include="Test\System.Windows.Forms\CommonDialogsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ContainerControlTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ContextMenuTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlBindingsCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlBindingsConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlEventTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlHandleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlLogger.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlLogger2.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlPaintTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlPropertyEventsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ControlStyleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\CursorTest.cs" />
- <Compile Include="Test\System.Windows.Forms\CurrencyManagerTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataBindingTests.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridColumnStyleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridTableStyleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridTextBoxColumnTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridTextBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewAdvancedBorderStyleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewBandTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewButtonCellTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewCellCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewCellStyleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewCellTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewCheckBoxCellTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewClipboardHeaderTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewClipboardTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewColumnCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewColumnHeaderTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewColumnTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewComboBoxCellTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewCommon.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewDataBindingTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewElementTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewLinkCellTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewImageCellTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewRowCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewRowHeaderTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewRowTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewTextBoxCellTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataGridViewTextBoxColumnTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DataObjectTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DateTimePickerTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DefaultLayoutTest.cs" />
- <Compile Include="Test\System.Windows.Forms\DragEventArgsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ErrorProviderTest.cs" />
- <Compile Include="Test\System.Windows.Forms\FlowPanelTests.cs" />
- <Compile Include="Test\System.Windows.Forms\FocusTest.cs" />
- <Compile Include="Test\System.Windows.Forms\FolderBrowserDialogTest.cs" />
- <Compile Include="Test\System.Windows.Forms\FormEventTest.cs" />
- <Compile Include="Test\System.Windows.Forms\FormHandleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\FormTest.cs" />
- <Compile Include="Test\System.Windows.Forms\EventArgsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\EventLogger.cs" />
- <Compile Include="Test\System.Windows.Forms\GridColumnStylesCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\GridTableStylesCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\GroupBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\HelpProviderTest.cs" />
- <Compile Include="Test\System.Windows.Forms\HScrollPropertiesTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ImageKeyConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ImageListStreamerTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ImageListTest.cs" />
- <Compile Include="Test\System.Windows.Forms\InputLanguageTest.cs" />
- <Compile Include="Test\System.Windows.Forms\KeyEventArgsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\KeysConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\LabelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\LinkAreaTest.cs" />
- <Compile Include="Test\System.Windows.Forms\LinkConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\LinkLabelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListControlTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListBindingHelperTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListBoxEventTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListViewCollectionsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListViewEventTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListViewTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListViewGroupTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListViewGroupCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ListViewItemTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MaskedTextBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MdiFormHandleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MdiFormTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MessageTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MenuStripTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MenuTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MenuItemTest.cs" />
- <Compile Include="Test\System.Windows.Forms\MonthCalendarTest.cs" />
- <Compile Include="Test\System.Windows.Forms\NotifyIconTest.cs" />
- <Compile Include="Test\System.Windows.Forms\NumericUpDownTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PaddingTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PaddingConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PaintEventArgsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PanelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PictureBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PrintDialogTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ProgressBarTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PropertyGridTest.cs" />
- <Compile Include="Test\System.Windows.Forms\PropertyManagerTest.cs" />
- <Compile Include="Test\System.Windows.Forms\RadioButtonTest.cs" />
- <Compile Include="Test\System.Windows.Forms\RowStyleTest.cs" />
- <Compile Include="Test\System.Windows.Forms\RichTextBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\SaveFileDialogTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ScrollableControlTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ScrollBarTest.cs" />
- <Compile Include="Test\System.Windows.Forms\SelectionRangeTest.cs" />
- <Compile Include="Test\System.Windows.Forms\SendKeysTest.cs" />
- <Compile Include="Test\System.Windows.Forms\SplitterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\SplitContainerTests.cs" />
- <Compile Include="Test\System.Windows.Forms\StatusBarPanelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\StatusBarTest.cs" />
- <Compile Include="Test\System.Windows.Forms\StatusStripTest.cs" />
- <Compile Include="Test\System.Windows.Forms\SystemInformationTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TabControlTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TableLayoutTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TestHelper.cs" />
- <Compile Include="Test\System.Windows.Forms\TestImageIndexConverter.cs" />
- <Compile Include="Test\System.Windows.Forms\TextBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TimerTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolBarTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolBarButtonTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripButtonTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripComboBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripContainerTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripContentPanelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripControlHostTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripDropDownTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripItemCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripItemTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripLabelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripManagerTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripMenuItemTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripOverflowButtonTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripOverflowTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripPanelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripProgressBarTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripSeparatorTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripStatusLabelTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolStripTextBoxTest.cs" />
- <Compile Include="Test\System.Windows.Forms\ToolTipTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TrackBarTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TreeNodeCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TreeNodeTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TreeViewHitTestInfoTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TreeViewImageKeyConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TreeViewImageIndexConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TreeViewTest.cs" />
- <Compile Include="Test\System.Windows.Forms\TreeViewEventsTest.cs" />
- <Compile Include="Test\System.Windows.Forms\UpDownTest.cs" />
- <Compile Include="Test\System.Windows.Forms\UserControlTest.cs" />
- <Compile Include="Test\System.Windows.Forms\VScrollPropertiesTest.cs" />
- <Compile Include="Test\System.Windows.Forms.Layout\TableLayoutSettingsTypeConverterTest.cs" />
- <Compile Include="Test\System.Windows.Forms.Layout\ArrangedElementCollectionTest.cs" />
- <Compile Include="Test\System.Resources\CompatTest.cs" />
- <Compile Include="Test\System.Resources\CultureTest.cs" />
- <Compile Include="Test\System.Resources\ResXDataNodeTest.cs" />
- <Compile Include="Test\System.Resources\ResXFileRefTest.cs" />
- <Compile Include="Test\System.Resources\ResXResourceReaderTest.cs" />
- <Compile Include="Test\System.Resources\WriterTest.cs" />
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <None Include="Test\System.Windows.Forms\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Test\System.Resources\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Test\System.Windows.Forms.Layout\ChangeLog" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- <ProjectGuid>{5E6430B2-6B9F-4E76-802E-20207EF80391}</ProjectGuid>
- <RootNamespace>
- </RootNamespace>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/SWF2k5.csproj b/mcs/class/Managed.Windows.Forms/SWF2k5.csproj
deleted file mode 100644
index a45876e2ac6..00000000000
--- a/mcs/class/Managed.Windows.Forms/SWF2k5.csproj
+++ /dev/null
@@ -1,1246 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{5E6430B2-6B9F-4E76-802E-20207EF80391}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>
- </RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 NET_2_0 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 NET_2_0 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug 1.1|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 ONLY_1_1 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 1.1|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 ONLY_1_1 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Accessibility">
- <Name>Accessibility</Name>
- </Reference>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- <Reference Include="System.configuration" />
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
- </Reference>
- <Reference Include="System.Xml">
- <Name>System.Xml</Name>
- </Reference>
- <Reference Include="Mono.WebBrowser2K5">
- <Name>Mono.WebBrowser2K5</Name>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Mono.WebBrowser\Mono.WebBrowser2K5.csproj">
- <Project>{5E6C996A-007F-40CE-B244-006EFCFB77D2}</Project>
- <Name>Mono.WebBrowser2K5</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="common\Consts.cs" />
- <Compile Include="common\MonoTODOAttribute.cs" />
- <Compile Include="Assembly\Locale.cs" />
- <Compile Include="System.Resources\ResXDataNode.cs" />
- <Compile Include="System.Resources\ResXFileRef.cs" />
- <Compile Include="System.Resources\ResXNullRef.cs" />
- <Compile Include="System.Resources\ResXResourceReader.cs" />
- <Compile Include="System.Resources\ResXResourceSet.cs" />
- <Compile Include="System.Resources\ResXResourceWriter.cs" />
- <Compile Include="System.Windows.Forms.Design\ComponentEditorForm.cs" />
- <Compile Include="System.Windows.Forms.Design\ComponentEditorPage.cs" />
- <Compile Include="System.Windows.Forms.Design\EventsTab.cs" />
- <Compile Include="System.Windows.Forms.Design\IUIService.cs" />
- <Compile Include="System.Windows.Forms.Design\IWindowsFormsEditorService.cs" />
- <Compile Include="System.Windows.Forms.Design\PropertyTab.cs" />
- <Compile Include="System.Windows.Forms.Design\ToolStripItemDesignerAvailability.cs" />
- <Compile Include="System.Windows.Forms.Design\ToolStripItemDesignerAvailabilityAttribute.cs" />
- <Compile Include="System.Windows.Forms.Design\WindowsFormsComponentEditor.cs" />
- <Compile Include="System.Windows.Forms.Internal\Accessor.cs" />
- <Compile Include="System.Windows.Forms.Internal\DebugHelper.cs" />
- <Compile Include="System.Windows.Forms.PropertyGridInternal\PropertiesTab.cs" />
- <Compile Include="System.Windows.Forms.RTF\Charcode.cs" />
- <Compile Include="System.Windows.Forms.RTF\Charset.cs" />
- <Compile Include="System.Windows.Forms.RTF\CharsetFlags.cs" />
- <Compile Include="System.Windows.Forms.RTF\CharsetType.cs" />
- <Compile Include="System.Windows.Forms.RTF\ClassDelegate.cs" />
- <Compile Include="System.Windows.Forms.RTF\Color.cs" />
- <Compile Include="System.Windows.Forms.RTF\DestinationDelegate.cs" />
- <Compile Include="System.Windows.Forms.RTF\Font.cs" />
- <Compile Include="System.Windows.Forms.RTF\KeyStruct.cs" />
- <Compile Include="System.Windows.Forms.RTF\KeysInit.cs" />
- <Compile Include="System.Windows.Forms.RTF\Major.cs" />
- <Compile Include="System.Windows.Forms.RTF\Minor.cs" />
- <Compile Include="System.Windows.Forms.RTF\Picture.cs" />
- <Compile Include="System.Windows.Forms.RTF\RTF.cs" />
- <Compile Include="System.Windows.Forms.RTF\RTFException.cs" />
- <Compile Include="System.Windows.Forms.RTF\StandardCharCode.cs" />
- <Compile Include="System.Windows.Forms.RTF\StandardCharName.cs" />
- <Compile Include="System.Windows.Forms.RTF\Style.cs" />
- <Compile Include="System.Windows.Forms.RTF\StyleElement.cs" />
- <Compile Include="System.Windows.Forms.RTF\StyleType.cs" />
- <Compile Include="System.Windows.Forms.RTF\TextMap.cs" />
- <Compile Include="System.Windows.Forms.RTF\TokenClass.cs" />
- <Compile Include="System.Windows.Forms.Theming\Default\LabelPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\Default\LinkLabelPainter.cs" />
- <Compile Include="System.Windows.Forms\AccessibleEvents.cs" />
- <Compile Include="System.Windows.Forms\AccessibleNavigation.cs" />
- <Compile Include="System.Windows.Forms\AccessibleObject.cs" />
- <Compile Include="System.Windows.Forms\AccessibleRole.cs" />
- <Compile Include="System.Windows.Forms\AccessibleSelection.cs" />
- <Compile Include="System.Windows.Forms\AccessibleStates.cs" />
- <Compile Include="System.Windows.Forms\AmbientProperties.cs" />
- <Compile Include="System.Windows.Forms\AnchorStyles.cs" />
- <Compile Include="System.Windows.Forms\Appearance.cs" />
- <Compile Include="System.Windows.Forms\Application.cs" />
- <Compile Include="System.Windows.Forms\ApplicationContext.cs" />
- <Compile Include="System.Windows.Forms\ArrangeDirection.cs" />
- <Compile Include="System.Windows.Forms\ArrangeStartingPosition.cs" />
- <Compile Include="System.Windows.Forms\ArrowDirection.cs" />
- <Compile Include="System.Windows.Forms\AsyncMethodData.cs" />
- <Compile Include="System.Windows.Forms\AsyncMethodResult.cs" />
- <Compile Include="System.Windows.Forms\AutoCompleteMode.cs" />
- <Compile Include="System.Windows.Forms\AutoCompleteSource.cs" />
- <Compile Include="System.Windows.Forms\AutoCompleteStringCollection.cs" />
- <Compile Include="System.Windows.Forms\AutoScaleMode.cs" />
- <Compile Include="System.Windows.Forms\AutoSizeMode.cs" />
- <Compile Include="System.Windows.Forms\AutoValidate.cs" />
- <Compile Include="System.Windows.Forms\AxHost.cs" />
- <Compile Include="System.Windows.Forms\BaseCollection.cs" />
- <Compile Include="System.Windows.Forms\BatteryChargeStatus.cs" />
- <Compile Include="System.Windows.Forms\Binding.cs" />
- <Compile Include="System.Windows.Forms\BindingCompleteContext.cs" />
- <Compile Include="System.Windows.Forms\BindingCompleteEventArgs.cs" />
- <Compile Include="System.Windows.Forms\BindingCompleteEventHandler.cs" />
- <Compile Include="System.Windows.Forms\BindingCompleteState.cs" />
- <Compile Include="System.Windows.Forms\BindingContext.cs" />
- <Compile Include="System.Windows.Forms\BindingManagerBase.cs" />
- <Compile Include="System.Windows.Forms\BindingManagerDataErrorEventArgs.cs" />
- <Compile Include="System.Windows.Forms\BindingManagerDataErrorEventHandler.cs" />
- <Compile Include="System.Windows.Forms\BindingMemberInfo.cs" />
- <Compile Include="System.Windows.Forms\BindingNavigator.cs" />
- <Compile Include="System.Windows.Forms\BindingSource.cs" />
- <Compile Include="System.Windows.Forms\BindingsCollection.cs" />
- <Compile Include="System.Windows.Forms\BootMode.cs" />
- <Compile Include="System.Windows.Forms\Border3DSide.cs" />
- <Compile Include="System.Windows.Forms\Border3DStyle.cs" />
- <Compile Include="System.Windows.Forms\BorderStyle.cs" />
- <Compile Include="System.Windows.Forms\BoundsSpecified.cs" />
- <Compile Include="System.Windows.Forms\Button.cs" />
- <Compile Include="System.Windows.Forms\ButtonBase.cs" />
- <Compile Include="System.Windows.Forms\ButtonBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\ButtonRenderer.cs" />
- <Compile Include="System.Windows.Forms\ButtonState.cs" />
- <Compile Include="System.Windows.Forms\CacheVirtualItemsEventArgs.cs" />
- <Compile Include="System.Windows.Forms\CacheVirtualItemsEventHandler.cs" />
- <Compile Include="System.Windows.Forms\CaptionButton.cs" />
- <Compile Include="System.Windows.Forms\CategoryGridEntry.cs" />
- <Compile Include="System.Windows.Forms\CharacterCasing.cs" />
- <Compile Include="System.Windows.Forms\CheckBox.cs" />
- <Compile Include="System.Windows.Forms\CheckBoxRenderer.cs" />
- <Compile Include="System.Windows.Forms\CheckState.cs" />
- <Compile Include="System.Windows.Forms\CheckedListBox.cs" />
- <Compile Include="System.Windows.Forms\Clipboard.cs" />
- <Compile Include="System.Windows.Forms\CloseReason.cs" />
- <Compile Include="System.Windows.Forms\ColorDepth.cs" />
- <Compile Include="System.Windows.Forms\ColorDialog.cs" />
- <Compile Include="System.Windows.Forms\ColumnClickEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ColumnClickEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ColumnHeader.cs" />
- <Compile Include="System.Windows.Forms\ColumnHeaderAutoResizeStyle.cs" />
- <Compile Include="System.Windows.Forms\ColumnHeaderConverter.cs" />
- <Compile Include="System.Windows.Forms\ColumnHeaderStyle.cs" />
- <Compile Include="System.Windows.Forms\ColumnReorderedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ColumnReorderedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ColumnStyle.cs" />
- <Compile Include="System.Windows.Forms\ColumnWidthChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ColumnWidthChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ColumnWidthChangingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ColumnWidthChangingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ComboBox.cs" />
- <Compile Include="System.Windows.Forms\ComboBoxRenderer.cs" />
- <Compile Include="System.Windows.Forms\ComboBoxStyle.cs" />
- <Compile Include="System.Windows.Forms\CommonDialog.cs" />
- <Compile Include="System.Windows.Forms\ComponentModel.cs" />
- <Compile Include="System.Windows.Forms\ContainerControl.cs" />
- <Compile Include="System.Windows.Forms\ContentsResizedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ContentsResizedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ContextMenu.cs" />
- <Compile Include="System.Windows.Forms\ContextMenuStrip.cs" />
- <Compile Include="System.Windows.Forms\Control.cs" />
- <Compile Include="System.Windows.Forms\ControlBindingsCollection.cs" />
- <Compile Include="System.Windows.Forms\ControlEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ControlEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ControlPaint.cs" />
- <Compile Include="System.Windows.Forms\ControlStyles.cs" />
- <Compile Include="System.Windows.Forms\ControlUpdateMode.cs" />
- <Compile Include="System.Windows.Forms\ConvertEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ConvertEventHandler.cs" />
- <Compile Include="System.Windows.Forms\CreateParams.cs" />
- <Compile Include="System.Windows.Forms\CurrencyManager.cs" />
- <Compile Include="System.Windows.Forms\Cursor.cs" />
- <Compile Include="System.Windows.Forms\CursorConverter.cs" />
- <Compile Include="System.Windows.Forms\Cursors.cs" />
- <Compile Include="System.Windows.Forms\DataFormats.cs" />
- <Compile Include="System.Windows.Forms\DataGrid.cs" />
- <Compile Include="System.Windows.Forms\DataGridBoolColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridColumnStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridLineStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridParentRowsLabelStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridPreferredColumnWidthTypeConverter.cs" />
- <Compile Include="System.Windows.Forms\DataGridTableStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridTextBox.cs" />
- <Compile Include="System.Windows.Forms\DataGridTextBoxColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridView.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAdvancedBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAdvancedCellBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeColumnMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeColumnModeEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeColumnModeEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeColumnsMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeColumnsModeEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeColumnsModeEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeModeEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeModeEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeRowMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewAutoSizeRowsMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewBand.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewBindingCompleteEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewBindingCompleteEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewButtonCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewButtonColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellCancelEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellCancelEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellCollection.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellContextMenuStripNeededEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellContextMenuStripNeededEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellErrorTextNeededEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellErrorTextNeededEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellFormattingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellFormattingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellMouseEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellMouseEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellPaintingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellPaintingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellParsingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellParsingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellStateChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellStateChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellStyleContentChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellStyleContentChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellStyleConverter.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellStyleScopes.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellToolTipTextNeededEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellToolTipTextNeededEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellValidatingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellValidatingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellValueEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCellValueEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCheckBoxCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewCheckBoxColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewClipboardCopyMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnCollection.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnDesignTimeVisibleAttribute.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnDividerDoubleClickEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnDividerDoubleClickEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnHeaderCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnHeadersHeightSizeMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnSortMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnStateChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewColumnStateChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewComboBoxCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewComboBoxColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewComboBoxDisplayStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewComboBoxEditingControl.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewContentAlignment.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewDataErrorContexts.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewDataErrorEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewDataErrorEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewEditMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewEditingControlShowingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewEditingControlShowingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewElement.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewElementStates.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewHeaderBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewHeaderCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewHitTestType.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewImageCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewImageCellLayout.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewImageColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewLinkCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewLinkColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewPaintParts.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRow.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowCancelEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowCancelEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowCollection.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowContextMenuStripNeededEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowContextMenuStripNeededEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowDividerDoubleClickEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowDividerDoubleClickEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowErrorTextNeededEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowErrorTextNeededEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowHeaderCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowHeadersWidthSizeMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowHeightInfoNeededEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowHeightInfoNeededEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowHeightInfoPushedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowHeightInfoPushedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowPostPaintEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowPostPaintEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowPrePaintEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowPrePaintEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowStateChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowStateChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowsAddedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowsAddedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowsRemovedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewRowsRemovedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewSelectedCellCollection.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewSelectedColumnCollection.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewSelectedRowCollection.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewSelectionMode.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewSortCompareEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewSortCompareEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewTextBoxCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewTextBoxColumn.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewTextBoxEditingControl.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewTopLeftHeaderCell.cs" />
- <Compile Include="System.Windows.Forms\DataGridViewTriState.cs" />
- <Compile Include="System.Windows.Forms\DataObject.cs" />
- <Compile Include="System.Windows.Forms\DataSourceUpdateMode.cs" />
- <Compile Include="System.Windows.Forms\DateBoldEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DateBoldEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DateRangeEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DateRangeEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DateTimePicker.cs" />
- <Compile Include="System.Windows.Forms\DateTimePickerFormat.cs" />
- <Compile Include="System.Windows.Forms\Day.cs" />
- <Compile Include="System.Windows.Forms\DialogResult.cs" />
- <Compile Include="System.Windows.Forms\DockingAttribute.cs" />
- <Compile Include="System.Windows.Forms\DockStyle.cs" />
- <Compile Include="System.Windows.Forms\DockingBehavior.cs" />
- <Compile Include="System.Windows.Forms\DomainUpDown.cs" />
- <Compile Include="System.Windows.Forms\DragAction.cs" />
- <Compile Include="System.Windows.Forms\DragDropEffects.cs" />
- <Compile Include="System.Windows.Forms\DragEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DragEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DrawItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DrawItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DrawItemState.cs" />
- <Compile Include="System.Windows.Forms\DrawListViewColumnHeaderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DrawListViewColumnHeaderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DrawListViewItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DrawListViewItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DrawListViewSubItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DrawListViewSubItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DrawMode.cs" />
- <Compile Include="System.Windows.Forms\DrawToolTipEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DrawToolTipEventHandler.cs" />
- <Compile Include="System.Windows.Forms\DrawTreeNodeEventArgs.cs" />
- <Compile Include="System.Windows.Forms\DrawTreeNodeEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ErrorBlinkStyle.cs" />
- <Compile Include="System.Windows.Forms\ErrorIconAlignment.cs" />
- <Compile Include="System.Windows.Forms\ErrorProvider.cs" />
- <Compile Include="System.Windows.Forms\FeatureSupport.cs" />
- <Compile Include="System.Windows.Forms\FileDialog.cs" />
- <Compile Include="System.Windows.Forms\FileDialogCustomPlace.cs" />
- <Compile Include="System.Windows.Forms\FileDialogCustomPlacesCollection.cs" />
- <Compile Include="System.Windows.Forms\FixedPanel.cs" />
- <Compile Include="System.Windows.Forms\FixedSizeTextBox.cs" />
- <Compile Include="System.Windows.Forms\FlatButtonAppearance.cs" />
- <Compile Include="System.Windows.Forms\FlatStyle.cs" />
- <Compile Include="System.Windows.Forms\FlowDirection.cs" />
- <Compile Include="System.Windows.Forms\FlowLayoutPanel.cs" />
- <Compile Include="System.Windows.Forms\FlowLayoutSettings.cs" />
- <Compile Include="System.Windows.Forms\FolderBrowserDialog.cs" />
- <Compile Include="System.Windows.Forms\FontDialog.cs" />
- <Compile Include="System.Windows.Forms\Form.cs" />
- <Compile Include="System.Windows.Forms\FormBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\FormClosedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\FormClosedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\FormClosingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\FormClosingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\FormCollection.cs" />
- <Compile Include="System.Windows.Forms\FormStartPosition.cs" />
- <Compile Include="System.Windows.Forms\FormWindowManager.cs" />
- <Compile Include="System.Windows.Forms\FormWindowState.cs" />
- <Compile Include="System.Windows.Forms\FrameStyle.cs" />
- <Compile Include="System.Windows.Forms\GetChildAtPointSkip.cs" />
- <Compile Include="System.Windows.Forms\GiveFeedbackEventArgs.cs" />
- <Compile Include="System.Windows.Forms\GiveFeedbackEventHandler.cs" />
- <Compile Include="System.Windows.Forms\GridColumnStylesCollection.cs" />
- <Compile Include="System.Windows.Forms\GridEntry.cs" />
- <Compile Include="System.Windows.Forms\GridItem.cs" />
- <Compile Include="System.Windows.Forms\GridItemCollection.cs" />
- <Compile Include="System.Windows.Forms\GridItemType.cs" />
- <Compile Include="System.Windows.Forms\GridTableStylesCollection.cs" />
- <Compile Include="System.Windows.Forms\GridTablesFactory.cs" />
- <Compile Include="System.Windows.Forms\GroupBox.cs" />
- <Compile Include="System.Windows.Forms\GroupBoxRenderer.cs" />
- <Compile Include="System.Windows.Forms\HScrollBar.cs" />
- <Compile Include="System.Windows.Forms\HandledMouseEventArgs.cs" />
- <Compile Include="System.Windows.Forms\Help.cs" />
- <Compile Include="System.Windows.Forms\HelpEventArgs.cs" />
- <Compile Include="System.Windows.Forms\HelpEventHandler.cs" />
- <Compile Include="System.Windows.Forms\HelpNavigator.cs" />
- <Compile Include="System.Windows.Forms\HelpProvider.cs" />
- <Compile Include="System.Windows.Forms\HorizontalAlignment.cs" />
- <Compile Include="System.Windows.Forms\HScrollProperties.cs" />
- <Compile Include="System.Windows.Forms\HtmlDocument.cs" />
- <Compile Include="System.Windows.Forms\HtmlElement.cs" />
- <Compile Include="System.Windows.Forms\HtmlElementCollection.cs" />
- <Compile Include="System.Windows.Forms\HtmlElementErrorEventArgs.cs" />
- <Compile Include="System.Windows.Forms\HtmlElementErrorEventHandler.cs" />
- <Compile Include="System.Windows.Forms\HtmlElementEventArgs.cs" />
- <Compile Include="System.Windows.Forms\HtmlElementEventHandler.cs" />
- <Compile Include="System.Windows.Forms\HtmlElementInsertionOrientation.cs" />
- <Compile Include="System.Windows.Forms\HtmlHistory.cs" />
- <Compile Include="System.Windows.Forms\HtmlWindow.cs" />
- <Compile Include="System.Windows.Forms\HtmlWindowCollection.cs" />
- <Compile Include="System.Windows.Forms\Hwnd.cs" />
- <Compile Include="System.Windows.Forms\IButtonControl.cs" />
- <Compile Include="System.Windows.Forms\IBindableComponent.cs" />
- <Compile Include="System.Windows.Forms\IBounds.cs" />
- <Compile Include="System.Windows.Forms\ICommandExecutor.cs" />
- <Compile Include="System.Windows.Forms\IComponentEditorPageSite.cs" />
- <Compile Include="System.Windows.Forms\IContainerControl.cs" />
- <Compile Include="System.Windows.Forms\ICurrencyManagerProvider.cs" />
- <Compile Include="System.Windows.Forms\IDataGridColumnStyleEditingNotificationService.cs" />
- <Compile Include="System.Windows.Forms\IDataGridEditingService.cs" />
- <Compile Include="System.Windows.Forms\IDataGridViewEditingCell.cs" />
- <Compile Include="System.Windows.Forms\IDataGridViewEditingControl.cs" />
- <Compile Include="System.Windows.Forms\IDataObject.cs" />
- <Compile Include="System.Windows.Forms\IDeviceContext.cs" />
- <Compile Include="System.Windows.Forms\IDropTarget.cs" />
- <Compile Include="System.Windows.Forms\IFeatureSupport.cs" />
- <Compile Include="System.Windows.Forms\IFileReaderService.cs" />
- <Compile Include="System.Windows.Forms\IKeyFilter.cs" />
- <Compile Include="System.Windows.Forms\IMessageFilter.cs" />
- <Compile Include="System.Windows.Forms\IRootGridEntry.cs" />
- <Compile Include="System.Windows.Forms\IWin32Window.cs" />
- <Compile Include="System.Windows.Forms\IWindowTarget.cs" />
- <Compile Include="System.Windows.Forms\ImageIndexConverter.cs" />
- <Compile Include="System.Windows.Forms\ImageKeyConverter.cs" />
- <Compile Include="System.Windows.Forms\ImageLayout.cs" />
- <Compile Include="System.Windows.Forms\ImageList.cs" />
- <Compile Include="System.Windows.Forms\ImageListConverter.cs" />
- <Compile Include="System.Windows.Forms\ImageListStreamer.cs" />
- <Compile Include="System.Windows.Forms\ImeMode.cs" />
- <Compile Include="System.Windows.Forms\ImplicitHScrollBar.cs" />
- <Compile Include="System.Windows.Forms\ImplicitVScrollBar.cs" />
- <Compile Include="System.Windows.Forms\InputLanguage.cs" />
- <Compile Include="System.Windows.Forms\InputLanguageChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\InputLanguageChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\InputLanguageChangingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\InputLanguageChangingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\InputLanguageCollection.cs" />
- <Compile Include="System.Windows.Forms\InsertKeyMode.cs" />
- <Compile Include="System.Windows.Forms\InternalWindowManager.cs" />
- <Compile Include="System.Windows.Forms\InvalidateEventArgs.cs" />
- <Compile Include="System.Windows.Forms\InvalidateEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ItemActivation.cs" />
- <Compile Include="System.Windows.Forms\ItemBoundsPortion.cs" />
- <Compile Include="System.Windows.Forms\ItemChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ItemChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ItemCheckEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ItemCheckEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ItemCheckedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ItemCheckedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ItemDragEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ItemDragEventHandler.cs" />
- <Compile Include="System.Windows.Forms\IToolStripData.cs" />
- <Compile Include="System.Windows.Forms\KeyEventArgs.cs" />
- <Compile Include="System.Windows.Forms\KeyEventHandler.cs" />
- <Compile Include="System.Windows.Forms\KeyPressEventArgs.cs" />
- <Compile Include="System.Windows.Forms\KeyPressEventHandler.cs" />
- <Compile Include="System.Windows.Forms\KeyboardLayouts.cs" />
- <Compile Include="System.Windows.Forms\Keys.cs" />
- <Compile Include="System.Windows.Forms\KeysConverter.cs" />
- <Compile Include="System.Windows.Forms\Label.cs" />
- <Compile Include="System.Windows.Forms\LabelEditEventArgs.cs" />
- <Compile Include="System.Windows.Forms\LabelEditEventHandler.cs" />
- <Compile Include="System.Windows.Forms\LabelEditTextBox.cs" />
- <Compile Include="System.Windows.Forms\LayoutEngine.cs" />
- <Compile Include="System.Windows.Forms\LayoutEventArgs.cs" />
- <Compile Include="System.Windows.Forms\LayoutEventHandler.cs" />
- <Compile Include="System.Windows.Forms\LayoutSettings.cs" />
- <Compile Include="System.Windows.Forms\LeftRightAlignment.cs" />
- <Compile Include="System.Windows.Forms\Line.cs" />
- <Compile Include="System.Windows.Forms\LineTag.cs" />
- <Compile Include="System.Windows.Forms\LinkArea.cs" />
- <Compile Include="System.Windows.Forms\LinkBehavior.cs" />
- <Compile Include="System.Windows.Forms\LinkClickedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\LinkClickedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\LinkConverter.cs" />
- <Compile Include="System.Windows.Forms\LinkLabel.cs" />
- <Compile Include="System.Windows.Forms\LinkLabelLinkClickedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\LinkLabelLinkClickedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\LinkState.cs" />
- <Compile Include="System.Windows.Forms\ListBindingConverter.cs" />
- <Compile Include="System.Windows.Forms\ListBindingHelper.cs" />
- <Compile Include="System.Windows.Forms\ListBox.cs" />
- <Compile Include="System.Windows.Forms\ListControl.cs" />
- <Compile Include="System.Windows.Forms\ListControlConvertEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ListControlConvertEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ListView.cs" />
- <Compile Include="System.Windows.Forms\ListViewAlignment.cs" />
- <Compile Include="System.Windows.Forms\ListViewGroup.cs" />
- <Compile Include="System.Windows.Forms\ListViewGroupCollection.cs" />
- <Compile Include="System.Windows.Forms\ListViewHitTestInfo.cs" />
- <Compile Include="System.Windows.Forms\ListViewHitTestLocations.cs" />
- <Compile Include="System.Windows.Forms\ListViewInsertionMark.cs" />
- <Compile Include="System.Windows.Forms\ListViewItem.cs" />
- <Compile Include="System.Windows.Forms\ListViewItemConverter.cs" />
- <Compile Include="System.Windows.Forms\ListViewItemMouseHoverEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ListViewItemMouseHoverEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ListViewItemSelectionChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ListViewItemSelectionChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ListViewItemStates.cs" />
- <Compile Include="System.Windows.Forms\ListViewVirtualItemsSelectionRangeChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ListViewVirtualItemsSelectionRangeChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\MWFCategoryAttribute.cs" />
- <Compile Include="System.Windows.Forms\MWFDescriptionAttribute.cs" />
- <Compile Include="System.Windows.Forms\MainMenu.cs" />
- <Compile Include="System.Windows.Forms\MaskFormat.cs" />
- <Compile Include="System.Windows.Forms\MaskInputRejectedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\MaskInputRejectedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\MaskedTextBox.cs" />
- <Compile Include="System.Windows.Forms\MdiClient.cs" />
- <Compile Include="System.Windows.Forms\MdiControlStrip.cs" />
- <Compile Include="System.Windows.Forms\MdiLayout.cs" />
- <Compile Include="System.Windows.Forms\MdiWindowManager.cs" />
- <Compile Include="System.Windows.Forms\MeasureItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\MeasureItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\Menu.cs" />
- <Compile Include="System.Windows.Forms\MenuAPI.cs" />
- <Compile Include="System.Windows.Forms\MenuGlyph.cs" />
- <Compile Include="System.Windows.Forms\MenuItem.cs" />
- <Compile Include="System.Windows.Forms\MenuMerge.cs" />
- <Compile Include="System.Windows.Forms\MenuStrip.cs" />
- <Compile Include="System.Windows.Forms\MergeAction.cs" />
- <Compile Include="System.Windows.Forms\Message.cs" />
- <Compile Include="System.Windows.Forms\MessageBox.cs" />
- <Compile Include="System.Windows.Forms\MessageBoxButtons.cs" />
- <Compile Include="System.Windows.Forms\MessageBoxDefaultButton.cs" />
- <Compile Include="System.Windows.Forms\MessageBoxIcon.cs" />
- <Compile Include="System.Windows.Forms\MessageBoxOptions.cs" />
- <Compile Include="System.Windows.Forms\MethodInvoker.cs" />
- <Compile Include="System.Windows.Forms\Mime.cs" />
- <Compile Include="System.Windows.Forms\MimeIcon.cs" />
- <Compile Include="System.Windows.Forms\MonthCalendar.cs" />
- <Compile Include="System.Windows.Forms\MouseButtons.cs" />
- <Compile Include="System.Windows.Forms\MouseEventArgs.cs" />
- <Compile Include="System.Windows.Forms\MouseEventHandler.cs" />
- <Compile Include="System.Windows.Forms\NativeWindow.cs" />
- <Compile Include="System.Windows.Forms\NavigateEventArgs.cs" />
- <Compile Include="System.Windows.Forms\NavigateEventHandler.cs" />
- <Compile Include="System.Windows.Forms\NodeLabelEditEventArgs.cs" />
- <Compile Include="System.Windows.Forms\NodeLabelEditEventHandler.cs" />
- <Compile Include="System.Windows.Forms\NotifyIcon.cs" />
- <Compile Include="System.Windows.Forms\NumericTextBox.cs" />
- <Compile Include="System.Windows.Forms\NumericUpDown.cs" />
- <Compile Include="System.Windows.Forms\NumericUpDownAcceleration.cs" />
- <Compile Include="System.Windows.Forms\NumericUpDownAccelerationCollection.cs" />
- <Compile Include="System.Windows.Forms\OSFeature.cs" />
- <Compile Include="System.Windows.Forms\OpacityConverter.cs" />
- <Compile Include="System.Windows.Forms\OpenFileDialog.cs" />
- <Compile Include="System.Windows.Forms\OpenTreeNodeEnumerator.cs" />
- <Compile Include="System.Windows.Forms\Orientation.cs" />
- <Compile Include="System.Windows.Forms\OwnerDrawPropertyBag.cs" />
- <Compile Include="System.Windows.Forms\Padding.cs" />
- <Compile Include="System.Windows.Forms\PaddingConverter.cs" />
- <Compile Include="System.Windows.Forms\PageSetupDialog.cs" />
- <Compile Include="System.Windows.Forms\PaintEventArgs.cs" />
- <Compile Include="System.Windows.Forms\PaintEventHandler.cs" />
- <Compile Include="System.Windows.Forms\Panel.cs" />
- <Compile Include="System.Windows.Forms\PictureBox.cs" />
- <Compile Include="System.Windows.Forms\PictureBoxSizeMode.cs" />
- <Compile Include="System.Windows.Forms\PopupEventArgs.cs" />
- <Compile Include="System.Windows.Forms\PopupEventHandler.cs" />
- <Compile Include="System.Windows.Forms\PowerLineStatus.cs" />
- <Compile Include="System.Windows.Forms\PowerState.cs" />
- <Compile Include="System.Windows.Forms\PowerStatus.cs" />
- <Compile Include="System.Windows.Forms\PreProcessControlState.cs" />
- <Compile Include="System.Windows.Forms\PreviewKeyDownEventArgs.cs" />
- <Compile Include="System.Windows.Forms\PreviewKeyDownEventHandler.cs" />
- <Compile Include="System.Windows.Forms\PrintControllerWithStatusDialog.cs" />
- <Compile Include="System.Windows.Forms\PrintDialog.cs" />
- <Compile Include="System.Windows.Forms\PrintPreviewControl.cs" />
- <Compile Include="System.Windows.Forms\PrintPreviewDialog.cs" />
- <Compile Include="System.Windows.Forms\ProfessionalColors.cs" />
- <Compile Include="System.Windows.Forms\ProfessionalColorTable.cs" />
- <Compile Include="System.Windows.Forms\ProgressBar.cs" />
- <Compile Include="System.Windows.Forms\ProgressBarRenderer.cs" />
- <Compile Include="System.Windows.Forms\ProgressBarStyle.cs" />
- <Compile Include="System.Windows.Forms\PropertyGrid.cs" />
- <Compile Include="System.Windows.Forms\PropertyGridCommands.cs" />
- <Compile Include="System.Windows.Forms\PropertyGridTextBox.cs" />
- <Compile Include="System.Windows.Forms\PropertyGridView.cs" />
- <Compile Include="System.Windows.Forms\PropertyManager.cs" />
- <Compile Include="System.Windows.Forms\PropertySort.cs" />
- <Compile Include="System.Windows.Forms\PropertyTabChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\PropertyTabChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\PropertyValueChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\PropertyValueChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\QueryAccessibilityHelpEventArgs.cs" />
- <Compile Include="System.Windows.Forms\QueryAccessibilityHelpEventHandler.cs" />
- <Compile Include="System.Windows.Forms\QueryContinueDragEventArgs.cs" />
- <Compile Include="System.Windows.Forms\QueryContinueDragEventHandler.cs" />
- <Compile Include="System.Windows.Forms\QuestionEventArgs.cs" />
- <Compile Include="System.Windows.Forms\QuestionEventHandler.cs" />
- <Compile Include="System.Windows.Forms\RadioButton.cs" />
- <Compile Include="System.Windows.Forms\RadioButtonRenderer.cs" />
- <Compile Include="System.Windows.Forms\RelatedCurrencyManager.cs" />
- <Compile Include="System.Windows.Forms\RelatedImageListAttribute.cs" />
- <Compile Include="System.Windows.Forms\RelatedPropertyManager.cs" />
- <Compile Include="System.Windows.Forms\RetrieveVirtualItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\RetrieveVirtualItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\RichTextBox.cs" />
- <Compile Include="System.Windows.Forms\RichTextBoxFinds.cs" />
- <Compile Include="System.Windows.Forms\RichTextBoxLanguageOptions.cs" />
- <Compile Include="System.Windows.Forms\RichTextBoxScrollBars.cs" />
- <Compile Include="System.Windows.Forms\RichTextBoxSelectionAttribute.cs" />
- <Compile Include="System.Windows.Forms\RichTextBoxSelectionTypes.cs" />
- <Compile Include="System.Windows.Forms\RichTextBoxStreamType.cs" />
- <Compile Include="System.Windows.Forms\RichTextBoxWordPunctuations.cs" />
- <Compile Include="System.Windows.Forms\RightToLeft.cs" />
- <Compile Include="System.Windows.Forms\RootGridEntry.cs" />
- <Compile Include="System.Windows.Forms\RowStyle.cs" />
- <Compile Include="System.Windows.Forms\SaveFileDialog.cs" />
- <Compile Include="System.Windows.Forms\Screen.cs" />
- <Compile Include="System.Windows.Forms\ScreenOrientation.cs" />
- <Compile Include="System.Windows.Forms\ScrollBar.cs" />
- <Compile Include="System.Windows.Forms\ScrollBarRenderer.cs" />
- <Compile Include="System.Windows.Forms\ScrollBars.cs" />
- <Compile Include="System.Windows.Forms\ScrollButton.cs" />
- <Compile Include="System.Windows.Forms\ScrollEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ScrollEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ScrollEventType.cs" />
- <Compile Include="System.Windows.Forms\ScrollOrientation.cs" />
- <Compile Include="System.Windows.Forms\ScrollProperties.cs" />
- <Compile Include="System.Windows.Forms\ScrollableControl.cs" />
- <Compile Include="System.Windows.Forms\SearchDirectionHint.cs" />
- <Compile Include="System.Windows.Forms\SearchForVirtualItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\SearchForVirtualItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\SecurityIDType.cs" />
- <Compile Include="System.Windows.Forms\SelectedGridItemChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\SelectedGridItemChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\SelectionMode.cs" />
- <Compile Include="System.Windows.Forms\SelectionRange.cs" />
- <Compile Include="System.Windows.Forms\SelectionRangeConverter.cs" />
- <Compile Include="System.Windows.Forms\SendKeys.cs" />
- <Compile Include="System.Windows.Forms\Shortcut.cs" />
- <Compile Include="System.Windows.Forms\SizeGrip.cs" />
- <Compile Include="System.Windows.Forms\SizeGripStyle.cs" />
- <Compile Include="System.Windows.Forms\SizeType.cs" />
- <Compile Include="System.Windows.Forms\SortOrder.cs" />
- <Compile Include="System.Windows.Forms\SplitContainer.cs" />
- <Compile Include="System.Windows.Forms\Splitter.cs" />
- <Compile Include="System.Windows.Forms\SplitterCancelEventArgs.cs" />
- <Compile Include="System.Windows.Forms\SplitterCancelEventHandler.cs" />
- <Compile Include="System.Windows.Forms\SplitterEventArgs.cs" />
- <Compile Include="System.Windows.Forms\SplitterEventHandler.cs" />
- <Compile Include="System.Windows.Forms\SplitterPanel.cs" />
- <Compile Include="System.Windows.Forms\StatusBar.cs" />
- <Compile Include="System.Windows.Forms\StatusBarDrawItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\StatusBarDrawItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\StatusBarPanel.cs" />
- <Compile Include="System.Windows.Forms\StatusBarPanelAutoSize.cs" />
- <Compile Include="System.Windows.Forms\StatusBarPanelBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\StatusBarPanelClickEventArgs.cs" />
- <Compile Include="System.Windows.Forms\StatusBarPanelClickEventHandler.cs" />
- <Compile Include="System.Windows.Forms\StatusBarPanelStyle.cs" />
- <Compile Include="System.Windows.Forms\StatusStrip.cs" />
- <Compile Include="System.Windows.Forms\StructFormat.cs" />
- <Compile Include="System.Windows.Forms\SystemInformation.cs" />
- <Compile Include="System.Windows.Forms\SystemParameter.cs" />
- <Compile Include="System.Windows.Forms\TabAlignment.cs" />
- <Compile Include="System.Windows.Forms\TabAppearance.cs" />
- <Compile Include="System.Windows.Forms\TabControl.cs" />
- <Compile Include="System.Windows.Forms\TabControlAction.cs" />
- <Compile Include="System.Windows.Forms\TabControlCancelEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TabControlCancelEventHandler.cs" />
- <Compile Include="System.Windows.Forms\TabControlEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TabControlEventHandler.cs" />
- <Compile Include="System.Windows.Forms\TabDrawMode.cs" />
- <Compile Include="System.Windows.Forms\TabPage.cs" />
- <Compile Include="System.Windows.Forms\TabRenderer.cs" />
- <Compile Include="System.Windows.Forms\TabSizeMode.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutCellPaintEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutCellPaintEventHandler.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutColumnStyleCollection.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutControlCollection.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutPanel.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutPanelCellBorderStyle.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutPanelCellPosition.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutPanelGrowStyle.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutRowStyleCollection.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutSettings.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutStyle.cs" />
- <Compile Include="System.Windows.Forms\TableLayoutStyleCollection.cs" />
- <Compile Include="System.Windows.Forms\TextBox.cs" />
- <Compile Include="System.Windows.Forms\TextBoxBase.cs" />
- <Compile Include="System.Windows.Forms\TextBoxRenderer.cs" />
- <Compile Include="System.Windows.Forms\TextBoxTextRenderer.cs" />
- <Compile Include="System.Windows.Forms\TextControl.cs" />
- <Compile Include="System.Windows.Forms\TextDataFormat.cs" />
- <Compile Include="System.Windows.Forms\TextFormatFlags.cs" />
- <Compile Include="System.Windows.Forms\TextImageRelation.cs" />
- <Compile Include="System.Windows.Forms\TextRenderer.cs" />
- <Compile Include="System.Windows.Forms\Theme.cs" />
- <Compile Include="System.Windows.Forms\ThemeEngine.cs" />
- <Compile Include="System.Windows.Forms\ThemeVisualStyles.cs" />
- <Compile Include="System.Windows.Forms\ThemeWin32Classic.cs" />
- <Compile Include="System.Windows.Forms\ThreadExceptionDialog.cs" />
- <Compile Include="System.Windows.Forms\TickStyle.cs" />
- <Compile Include="System.Windows.Forms\Timer.cs" />
- <Compile Include="System.Windows.Forms\ToolBar.cs" />
- <Compile Include="System.Windows.Forms\ToolBarAppearance.cs" />
- <Compile Include="System.Windows.Forms\ToolBarButton.cs" />
- <Compile Include="System.Windows.Forms\ToolBarButtonClickEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolBarButtonClickEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolBarButtonStyle.cs" />
- <Compile Include="System.Windows.Forms\ToolBarTextAlign.cs" />
- <Compile Include="System.Windows.Forms\ToolStrip.cs" />
- <Compile Include="System.Windows.Forms\ToolStripArrowRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripArrowRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripButton.cs" />
- <Compile Include="System.Windows.Forms\ToolStripComboBox.cs" />
- <Compile Include="System.Windows.Forms\ToolStripContainer.cs" />
- <Compile Include="System.Windows.Forms\ToolStripContentPanel.cs" />
- <Compile Include="System.Windows.Forms\ToolStripContentPanelRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripContentPanelRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripControlHost.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDown.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownButton.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownCloseReason.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownClosedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownClosedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownClosingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownClosingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownDirection.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownItem.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownItemAccessibleObject.cs" />
- <Compile Include="System.Windows.Forms\ToolStripDropDownMenu.cs" />
- <Compile Include="System.Windows.Forms\ToolStripGripDisplayStyle.cs" />
- <Compile Include="System.Windows.Forms\ToolStripGripRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripGripRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripGripStyle.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItem.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemAlignment.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemClickedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemClickedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemCollection.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemDisplayStyle.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemEventType.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemImageRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemImageRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemImageScaling.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemOverflow.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemPlacement.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemTextRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripItemTextRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripLabel.cs" />
- <Compile Include="System.Windows.Forms\ToolStripLayoutStyle.cs" />
- <Compile Include="System.Windows.Forms\ToolStripManager.cs" />
- <Compile Include="System.Windows.Forms\ToolStripManagerRenderMode.cs" />
- <Compile Include="System.Windows.Forms\ToolStripMenuItem.cs" />
- <Compile Include="System.Windows.Forms\ToolStripOverflow.cs" />
- <Compile Include="System.Windows.Forms\ToolStripOverflowButton.cs" />
- <Compile Include="System.Windows.Forms\ToolStripPanel.cs" />
- <Compile Include="System.Windows.Forms\ToolStripPanelRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripPanelRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripPanelRow.cs" />
- <Compile Include="System.Windows.Forms\ToolStripProfessionalRenderer.cs" />
- <Compile Include="System.Windows.Forms\ToolStripProgressBar.cs" />
- <Compile Include="System.Windows.Forms\ToolStripRenderer.cs" />
- <Compile Include="System.Windows.Forms\ToolStripRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripRenderMode.cs" />
- <Compile Include="System.Windows.Forms\ToolStripSeparator.cs" />
- <Compile Include="System.Windows.Forms\ToolStripSeparatorRenderEventArgs.cs" />
- <Compile Include="System.Windows.Forms\ToolStripSeparatorRenderEventHandler.cs" />
- <Compile Include="System.Windows.Forms\ToolStripSplitButton.cs" />
- <Compile Include="System.Windows.Forms\ToolStripSplitStackLayout.cs" />
- <Compile Include="System.Windows.Forms\ToolStripStatusLabel.cs" />
- <Compile Include="System.Windows.Forms\ToolStripStatusLabelBorderSides.cs" />
- <Compile Include="System.Windows.Forms\ToolStripSystemRenderer.cs" />
- <Compile Include="System.Windows.Forms\ToolStripTextBox.cs" />
- <Compile Include="System.Windows.Forms\ToolStripTextDirection.cs" />
- <Compile Include="System.Windows.Forms\ToolTip.cs" />
- <Compile Include="System.Windows.Forms\ToolTipIcon.cs" />
- <Compile Include="System.Windows.Forms\ToolWindowManager.cs" />
- <Compile Include="System.Windows.Forms\TrackBar.cs" />
- <Compile Include="System.Windows.Forms\TrackBarRenderer.cs" />
- <Compile Include="System.Windows.Forms\TreeNode.cs" />
- <Compile Include="System.Windows.Forms\TreeNodeCollection.cs" />
- <Compile Include="System.Windows.Forms\TreeNodeConverter.cs" />
- <Compile Include="System.Windows.Forms\TreeNodeMouseClickEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TreeNodeMouseClickEventHandler.cs" />
- <Compile Include="System.Windows.Forms\TreeNodeMouseHoverEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TreeNodeMouseHoverEventHandler.cs" />
- <Compile Include="System.Windows.Forms\TreeNodeStates.cs" />
- <Compile Include="System.Windows.Forms\TreeView.cs" />
- <Compile Include="System.Windows.Forms\TreeViewAction.cs" />
- <Compile Include="System.Windows.Forms\TreeViewCancelEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TreeViewCancelEventHandler.cs" />
- <Compile Include="System.Windows.Forms\TreeViewDrawMode.cs" />
- <Compile Include="System.Windows.Forms\TreeViewEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TreeViewEventHandler.cs" />
- <Compile Include="System.Windows.Forms\TreeViewHitTestInfo.cs" />
- <Compile Include="System.Windows.Forms\TreeViewHitTestLocations.cs" />
- <Compile Include="System.Windows.Forms\TreeViewImageIndexConverter.cs" />
- <Compile Include="System.Windows.Forms\TreeViewImageKeyConverter.cs" />
- <Compile Include="System.Windows.Forms\TypeValidationEventArgs.cs" />
- <Compile Include="System.Windows.Forms\TypeValidationEventHandler.cs" />
- <Compile Include="System.Windows.Forms\UICues.cs" />
- <Compile Include="System.Windows.Forms\UICuesEventArgs.cs" />
- <Compile Include="System.Windows.Forms\UICuesEventHandler.cs" />
- <Compile Include="System.Windows.Forms\UnhandledExceptionMode.cs" />
- <Compile Include="System.Windows.Forms\UpDownBase.cs" />
- <Compile Include="System.Windows.Forms\UpDownEventArgs.cs" />
- <Compile Include="System.Windows.Forms\UpDownEventHandler.cs" />
- <Compile Include="System.Windows.Forms\UserControl.cs" />
- <Compile Include="System.Windows.Forms\VScrollBar.cs" />
- <Compile Include="System.Windows.Forms\ValidationConstraints.cs" />
- <Compile Include="System.Windows.Forms\View.cs" />
- <Compile Include="System.Windows.Forms\VScrollProperties.cs" />
- <Compile Include="System.Windows.Forms\WebBrowser.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserBase.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserDocumentCompletedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserDocumentCompletedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserEncryptionLevel.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserNavigatedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserNavigatedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserNavigatingEventArgs.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserNavigatingEventHandler.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserProgressChangedEventArgs.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserProgressChangedEventHandler.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserReadyState.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserRefreshOption.cs" />
- <Compile Include="System.Windows.Forms\WebBrowserSiteBase.cs" />
- <Compile Include="System.Windows.Forms\Win32DnD.cs" />
- <Compile Include="System.Windows.Forms\WindowsFormsSection.cs" />
- <Compile Include="System.Windows.Forms\WindowsFormsSynchronizationContext.cs" />
- <Compile Include="System.Windows.Forms\X11DesktopColors.cs" />
- <Compile Include="System.Windows.Forms\X11Dnd.cs" />
- <Compile Include="System.Windows.Forms\X11Keyboard.cs" />
- <Compile Include="System.Windows.Forms\X11Structs.cs" />
- <Compile Include="System.Windows.Forms\XEventQueue.cs" />
- <Compile Include="System.Windows.Forms\XplatUI.cs" />
- <Compile Include="System.Windows.Forms\XplatUICarbon.cs" />
- <Compile Include="System.Windows.Forms\XplatUIDriver.cs" />
- <Compile Include="System.Windows.Forms\XplatUIStructs.cs" />
- <Compile Include="System.Windows.Forms\XplatUIWin32.cs" />
- <Compile Include="System.Windows.Forms\XplatUIX11.cs" />
- <Compile Include="System.Windows.Forms.Layout\ArrangedElementCollection.cs" />
- <Compile Include="System.Windows.Forms.Layout\DefaultLayout.cs" />
- <Compile Include="System.Windows.Forms.Layout\FlowLayout.cs" />
- <Compile Include="System.Windows.Forms.Layout\TableLayout.cs" />
- <Compile Include="System.Windows.Forms.Layout\TableLayoutSettingsTypeConverter.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\ApplicationHandler.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\ControlHandler.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\Cursor.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\Dnd.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\EventHandler.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\EventHandlerBase.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\Enums.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\HIObjectHandler.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\IEventHandler.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\KeyboardHandler.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\MouseHandler.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\Pasteboard.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\Structs.cs" />
- <Compile Include="System.Windows.Forms.CarbonInternal\WindowHandler.cs" />
- <Compile Include="System.Windows.Forms.Theming\ThemeElements.cs" />
- <Compile Include="System.Windows.Forms.Theming\ThemeElementsDefault.cs" />
- <Compile Include="System.Windows.Forms.Theming\ThemeElementsVisualStyles.cs" />
- <Compile Include="System.Windows.Forms.Theming\Default\ButtonPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\Default\CheckBoxPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\Default\RadioButtonPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\Default\TabControlPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\Default\ToolStripPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\VisualStyles\CheckBoxPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\VisualStyles\RadioButtonPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\VisualStyles\TabControlPainter.cs" />
- <Compile Include="System.Windows.Forms.Theming\VisualStyles\ToolStripPainter.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\BackgroundType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\BooleanProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\BorderType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\CheckBoxState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ColorProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ComboBoxState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ContentAlignment.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\EdgeEffects.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\Edges.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\EdgeStyle.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\EnumProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\FilenameProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\FillType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\FontProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\GlyphFontSizingType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\GlyphType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\GroupBoxState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\GtkPlus.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\HitTestCode.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\HitTestOptions.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\HorizontalAlign.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\IconEffect.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ImageOrientation.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ImageSelectType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\IntegerProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\IVisualStyles.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\MarginProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\OffsetType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\PointProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\PushButtonState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\RadioButtonState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ScrollBarArrowButtonState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ScrollBarSizeBoxState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ScrollBarState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\SizingType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\StringProperty.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TabItemState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TextBoxState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TextMetrics.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TextMetricsCharacterSet.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TextMetricsPitchAndFamilyValues.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TextShadowType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ThemeSizeType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\ToolBarState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TrackBarThumbState.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\TrueSizeScalingType.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\UXTheme.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VerticalAlignment.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VisualStyleElement.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VisualStyleInformation.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VisualStyleRenderer.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VisualStylesEngine.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VisualStylesGtkPlus.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VisualStylesNative.cs" />
- <Compile Include="System.Windows.Forms.VisualStyles\VisualStyleState.cs" />
- <Compile Include="System.Windows.Forms.WebBrowserDialogs\AlertCheck.cs" />
- <Compile Include="System.Windows.Forms.WebBrowserDialogs\ConfirmCheck.cs" />
- <Compile Include="System.Windows.Forms.WebBrowserDialogs\Generic.cs" />
- <Compile Include="System.Windows.Forms.WebBrowserDialogs\Prompt.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="resources\SplitterNS.cur">
- <LogicalName>System.Windows.Forms.SplitterNS.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\SplitterWE.cur">
- <LogicalName>System.Windows.Forms.SplitterWE.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\NESW.cur">
- <LogicalName>System.Windows.Forms.NESW.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\NWSE.cur">
- <LogicalName>System.Windows.Forms.NWSE.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\DnDNo.cur">
- <LogicalName>System.Windows.Forms.DnDNo.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\DnDCopy.cur">
- <LogicalName>System.Windows.Forms.DnDCopy.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\DnDLink.cur">
- <LogicalName>System.Windows.Forms.DnDLink.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\DnDMove.cur">
- <LogicalName>System.Windows.Forms.DnDMove.cur</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\keyboards.resources.prebuilt">
- <LogicalName>keyboards.resources</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_computer.png">
- <LogicalName>16_computer.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\32_computer.png">
- <LogicalName>32_computer.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\computer.png">
- <LogicalName>computer.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_document-open.png">
- <LogicalName>16_document-open.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\32_document-open.png">
- <LogicalName>32_document-open.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\document-open.png">
- <LogicalName>document-open.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_folder.png">
- <LogicalName>16_folder.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\folder-new.png">
- <LogicalName>folder-new.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\folder.png">
- <LogicalName>folder.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_folder-remote.png">
- <LogicalName>16_folder-remote.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\32_folder-remote.png">
- <LogicalName>32_folder-remote.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\folder-remote.png">
- <LogicalName>folder-remote.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\go-previous.png">
- <LogicalName>go-previous.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\go-top.png">
- <LogicalName>go-top.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\22_page-magnifier.png">
- <LogicalName>22_page-magnifier.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\preferences-system-windows.png">
- <LogicalName>preferences-system-windows.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_printer.png">
- <LogicalName>16_printer.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\32_printer.png">
- <LogicalName>32_printer.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\text-x-generic.png">
- <LogicalName>text-x-generic.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_user-desktop.png">
- <LogicalName>16_user-desktop.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\32_user-desktop.png">
- <LogicalName>32_user-desktop.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\user-desktop.png">
- <LogicalName>user-desktop.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_user-home.png">
- <LogicalName>16_user-home.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\32_user-home.png">
- <LogicalName>32_user-home.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\user-home.png">
- <LogicalName>user-home.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_dialog-error.png">
- <LogicalName>16_dialog-error.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_dialog-information.png">
- <LogicalName>16_dialog-information.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\16_dialog-warning.png">
- <LogicalName>16_dialog-warning.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\1-up.png">
- <LogicalName>1-up.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\2-up.png">
- <LogicalName>2-up.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\3-up.png">
- <LogicalName>3-up.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\4-up.png">
- <LogicalName>4-up.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\6-up.png">
- <LogicalName>6-up.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\nav_delete.png">
- <LogicalName>nav_delete.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\nav_end.png">
- <LogicalName>nav_end.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\nav_first.png">
- <LogicalName>nav_first.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\nav_next.png">
- <LogicalName>nav_next.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\nav_plus.png">
- <LogicalName>nav_plus.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\nav_previous.png">
- <LogicalName>nav_previous.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\image-missing.png">
- <LogicalName>image-missing.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\image-x-generic.png">
- <LogicalName>image-x-generic.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\propertygrid-alphabetical.png">
- <LogicalName>System.Windows.Forms.propertygrid-alphabetical.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\propertygrid-categorized.png">
- <LogicalName>System.Windows.Forms.propertygrid-categorized.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\propertygrid-propertypages.png">
- <LogicalName>System.Windows.Forms.propertygrid-propertypages.png</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\EventsTab.bmp">
- <LogicalName>System.Windows.Forms.Design.EventsTab.bmp</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\PropertiesTab.bmp">
- <LogicalName>System.Windows.Forms.PropertyGridInternal.PropertiesTab.bmp</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\mono.ico">
- <LogicalName>mono.ico</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\errorProvider.ico">
- <LogicalName>errorProvider.ico</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <None Include="System.Windows.Forms\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <None Include="ChangeLog" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project>
diff --git a/mcs/class/Managed.Windows.Forms/SWF2k5.sln b/mcs/class/Managed.Windows.Forms/SWF2k5.sln
deleted file mode 100755
index 450abffe39e..00000000000
--- a/mcs/class/Managed.Windows.Forms/SWF2k5.sln
+++ /dev/null
@@ -1,35 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SWF2k5", "SWF2k5.csproj", "{5E6430B2-6B9F-4E76-802E-20207EF80391}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.WebBrowser2K5", "..\Mono.WebBrowser\Mono.WebBrowser2K5.csproj", "{5E6C996A-007F-40CE-B244-006EFCFB77D2}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug 1.1|Any CPU = Debug 1.1|Any CPU
- Release|Any CPU = Release|Any CPU
- Release 1.1|Any CPU = Release 1.1|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug 1.1|Any CPU.ActiveCfg = Debug 1.1|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Debug 1.1|Any CPU.Build.0 = Debug 1.1|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release|Any CPU.Build.0 = Release|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release 1.1|Any CPU.ActiveCfg = Release 1.1|Any CPU
- {5E6430B2-6B9F-4E76-802E-20207EF80391}.Release 1.1|Any CPU.Build.0 = Release 1.1|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Debug 1.1|Any CPU.ActiveCfg = Debug 1.1|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Debug 1.1|Any CPU.Build.0 = Debug 1.1|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Release|Any CPU.Build.0 = Release|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Release 1.1|Any CPU.ActiveCfg = Release 1.1|Any CPU
- {5E6C996A-007F-40CE-B244-006EFCFB77D2}.Release 1.1|Any CPU.Build.0 = Release 1.1|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms.csproj b/mcs/class/Managed.Windows.Forms/System.Windows.Forms.csproj
deleted file mode 100644
index 8e6d2bf8311..00000000000
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms.csproj
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Default.targets"/>
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodePage>65001</CodePage>
- <NoWarn>618,612,809</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- <Reference Include="System.Xml"/>
- <Reference Include="System.Drawing"/>
- <Reference Include="Accessibility"/>
- <Reference Include="System.Data"/>
- <Reference Include="System.Configuration"/>
- <Reference Include="Mono.Posix">
- <HintPath>..\lib\net_2_0\Mono.Posix.dll</HintPath>
- </Reference>
- <Reference Include="Mono.WebBrowser">
- <HintPath>..\lib\net_2_0\Mono.WebBrowser.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
index c1b7d791f8d..f7075e8ef8f 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListView.cs
@@ -3833,8 +3833,7 @@ namespace System.Windows.Forms
{
Size item_size = ItemSize;
for (int i = 0; i < items.Count; i++) {
- Point item_location = GetItemLocation (i);
- Rectangle item_rect = new Rectangle (item_location, item_size);
+ Rectangle item_rect = items [i].Bounds;
if (item_rect.Contains (x, y))
return items [i];
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs
index fb231e26345..4c6ba44c18c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs
@@ -144,15 +144,14 @@ namespace MonoTests.System.Resources {
[Test]
public void WriteRead1 ()
{
- ResXResourceWriter rw = new ResXResourceWriter ("resx.resx");
serializable ser = new serializable ("aaaaa", "bbbbb");
ResXDataNode dn = new ResXDataNode ("test", ser);
dn.Comment = "comment";
- rw.AddResource (dn);
- rw.Close ();
+
+ string resXFile = GetResXFileWithNode (dn, "resx.resx");
bool found = false;
- ResXResourceReader rr = new ResXResourceReader ("resx.resx");
+ ResXResourceReader rr = new ResXResourceReader (resXFile);
rr.UseResXDataNodes = true;
IDictionaryEnumerator en = rr.GetEnumerator ();
while (en.MoveNext ()) {
@@ -224,7 +223,6 @@ namespace MonoTests.System.Resources {
ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode;
rr.Close ();
- File.Delete ("resx.resx");
Assert.IsNotNull (node,"#A1");
serializable o = node.GetValue ((AssemblyName []) null) as serializable;
@@ -245,7 +243,6 @@ namespace MonoTests.System.Resources {
ResXDataNode node = ((DictionaryEntry) en.Current).Value as ResXDataNode;
rr.Close ();
- File.Delete ("resx.resx");
Assert.IsNotNull (node, "#A1");
object o = node.GetValue ((AssemblyName []) null);
diff --git a/mcs/class/Managed.Windows.Forms/build-csproj b/mcs/class/Managed.Windows.Forms/build-csproj
deleted file mode 100755
index 8479a337f0b..00000000000
--- a/mcs/class/Managed.Windows.Forms/build-csproj
+++ /dev/null
@@ -1,217 +0,0 @@
-#!/bin/bash
-#
-# I got tired of editing the SWF.csproj
-# This script will generate it from our System.Windows.Forms.dll.sources
-#
-#
-
-tr=tr
-OutFile=SWF.csproj
-Source=System.Windows.Forms.dll.sources
-Resource=System.Windows.Forms.dll.resources
-
-SWFhead()
-{
-cat << EOT
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{5E6430B2-6B9F-4E76-802E-20207EF80391}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "System.Windows.Forms"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Library"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = ""
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_1_1 ONLY_1_1"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Debug\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- <Config
- Name = "Debug 2.0"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_2_0"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Debug\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_1_1 ONLY_1_1"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Release\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- <Config
- Name = "Release 2.0"
- AllowUnsafeBlocks = "true"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "NET_2_0"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "bin\Release\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "1"
- />
- </Settings>
- <References>
- <Reference
- Name = "Accessibility"
- AssemblyName = "Accessibility"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Accessibility.dll"
- />
- <Reference
- Name = "System"
- AssemblyName = "System"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
- />
- <Reference
- Name = "System.Data"
- AssemblyName = "System.Data"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
- />
- <Reference
- Name = "System.Drawing"
- AssemblyName = "System.Drawing"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
- />
- <Reference
- Name = "System.Data"
- AssemblyName = "System.Data"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
- />
- <Reference
- Name = "System.XML"
- AssemblyName = "System.XML"
- HintPath = "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
- />
- </References>
- </Build>
- <Files>
- <Include>
-EOT
-}
-
-SWFfilelist()
-{
-cat $Source | while read SRC; do
-# Don't do AssemblyInfo, it's got signing requests and such that we don't want
-if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
-SRC=`echo $SRC | $tr '/' '\\\\'`
-cat << EOT
- <File
- RelPath = "$SRC"
- SubType = "Code"
- BuildAction = "Compile"
- />
-EOT
-fi
-done
-}
-
-SWFresourcelist()
-{
-cat $Resource | while read SRC; do
-SRC=`echo $SRC | $tr '/' '\\\\'`
-SRC=`echo $SRC | sed 's/-resource://' | awk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
-
-cat << EOT
- <File
-$SRC
- BuildAction = "EmbeddedResource"
- />
-EOT
-done
-}
-
-SWFtail()
-{
-cat << EOT
- <File
- RelPath = "Consts.cs"
- Link = "common/Consts.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "MonoTODOAttribute.cs"
- Link = "common/MonoTODOAttribute.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-EOT
-}
-
-SWFhead > $OutFile
-SWFfilelist >> $OutFile
-SWFresourcelist >> $OutFile
-SWFtail >> $OutFile
-
diff --git a/mcs/class/Managed.Windows.Forms/build-csproj2k5 b/mcs/class/Managed.Windows.Forms/build-csproj2k5
deleted file mode 100755
index 4e444186a45..00000000000
--- a/mcs/class/Managed.Windows.Forms/build-csproj2k5
+++ /dev/null
@@ -1,247 +0,0 @@
-#!/bin/bash
-#
-# This script will generate SWF.cs.target from our System.Windows.Forms.dll.sources
-#
-#
-
-exec > SWF2k5.csproj
-
-Source=System.Windows.Forms.dll.sources
-Resource=System.Windows.Forms.dll.resources
-
-SWFhead()
-{
- cat <<EOF
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{5E6430B2-6B9F-4E76-802E-20207EF80391}</ProjectGuid>
- <Configuration Condition=" '\$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '\$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>
- </RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 NET_2_0 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 NET_2_0 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Debug 1.1|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 ONLY_1_1 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Release 1.1|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 ONLY_1_1 MWF_ON_MSRUNTIME</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>612,618,3021</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <OutputType>Library</OutputType>
- <AssemblyName>System.Windows.Forms</AssemblyName>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Accessibility">
- <Name>Accessibility</Name>
- </Reference>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- <Reference Include="System.configuration" />
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
- </Reference>
- <Reference Include="System.Xml">
- <Name>System.Xml</Name>
- </Reference>
- <Reference Include="Mono.WebBrowser2K5">
- <Name>Mono.WebBrowser2K5</Name>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Mono.WebBrowser\Mono.WebBrowser2K5.csproj">
- <Project>{5E6C996A-007F-40CE-B244-006EFCFB77D2}</Project>
- <Name>Mono.WebBrowser2K5</Name>
- </ProjectReference>
- </ItemGroup>
-EOF
-}
-
-SWFtail()
-{
- cat <<EOF
- <ItemGroup>
- <None Include="System.Windows.Forms\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <None Include="ChangeLog" />
- </ItemGroup>
- <Import Project="\$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project>
-EOF
-}
-
-SWFfilelist()
-{
-echo " <ItemGroup>"
-cat $Source | while read SRC; do
-# Don't do AssemblyInfo, it's got signing requests and such that we don't want
-if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
-SRC=`echo $SRC | sed 's/..\/..\/build\///'`
-SRC=`echo $SRC | tr '/' '\\\\'`
-cat <<EOF
- <Compile Include="$SRC" />
-EOF
-fi
-done
-echo " </ItemGroup>"
-}
-
-SWFresourcelist()
-{
-echo " <ItemGroup>"
- cat $Resource | while read SRC; do
- CUSTOMTOOLNAMESPACE=""
-
- # strip out that -resource:
- SRC=`echo $SRC | sed 's/-resource://'`
-
- CUSTOMTOOLNAMESPACE=`echo $SRC | awk -F, '{print $2}'`
-
- INCLUDE=`echo $SRC | awk -F, '{print $1}'`
-
- if test -f $INCLUDE.prebuilt; then
- INCLUDE=$INCLUDE.prebuilt
- fi
-
- # strip off the path from the name of the resource and the .prebuilt if there is one
- LOGICALNAME=`echo $INCLUDE | sed 's/resources\///;s/.prebuilt//'`
-
- # convert all /'s to \\'s
- INCLUDE=`echo $INCLUDE | sed 's/\//\\\\/'`
-
- echo " <EmbeddedResource Include=\"$INCLUDE\">"
- if test "x$CUSTOMTOOLNAMESPACE" != "x"; then
- echo " <LogicalName>$CUSTOMTOOLNAMESPACE</LogicalName>"
- else
- echo " <LogicalName>$LOGICALNAME</LogicalName>"
- fi
- echo " </EmbeddedResource>"
- done
-echo " </ItemGroup>"
-}
-
-SWFhead
-SWFfilelist
-SWFresourcelist
-SWFtail
diff --git a/mcs/class/Managed.Windows.Forms/build-csproj2k5-tests b/mcs/class/Managed.Windows.Forms/build-csproj2k5-tests
deleted file mode 100755
index f63d1e59a05..00000000000
--- a/mcs/class/Managed.Windows.Forms/build-csproj2k5-tests
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/bin/bash
-#
-# This script will generate SWF2K5-tests.cs.target from our System.Windows.Forms.dll.sources
-#
-#
-
-exec > SWF2k5-tests.csproj
-
-Source=System.Windows.Forms_test.dll.sources
-Resource=System.Windows.Forms.dll.resources
-
-SWFhead()
-{
- cat <<EOF
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{5E6430B2-6B9F-4E76-802E-20207EF80391}</ProjectGuid>
- <Configuration Condition=" '\$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '\$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>System.Windows.Forms_test</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>
- </RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 ONLY_1_1 __MonoCS__ DEBUG</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Debug 2.0|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_2_0 __MonoCS__ DEBUG</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 ONLY_1_1 __MonoCS__</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Release 2.0|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_2_0 __MonoCS__</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'net_2_0|AnyCPU' ">
- <OutputPath>.\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 NET_2_0 __MonoCS__ DEBUG</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>3</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <AssemblyName>System.Windows.Forms_test_net_2_0</AssemblyName>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>C:\winforms-unittests\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="Accessibility">
- <Name>Accessibility</Name>
- </Reference>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
- </Reference>
- <Reference Include="System.Windows.Forms">
- <Name>System.Windows.Forms</Name>
- </Reference>
- <Reference Include="System.Xml">
- <Name>System.Xml</Name>
- </Reference>
- </ItemGroup>
-EOF
-}
-
-SWFtail()
-{
- cat <<EOF
- <ItemGroup>
- <None Include="Test\System.Windows.Forms\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Test\System.Resources\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <None Include="Test\System.Windows.Forms.Layout\ChangeLog" />
- </ItemGroup>
- <Import Project="\$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project>
-EOF
-}
-
-SWFfilelist()
-{
-echo " <ItemGroup>"
-cat $Source | while read SRC; do
-# Don't do AssemblyInfo, it's got signing requests and such that we don't want
-if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" ] ; then
-SRC=`echo Test/$SRC`
-SRC=`echo $SRC | sed 's/Test\/..\/..\/..\/build\///'`
-SRC=`echo $SRC | tr '/' '\\\\'`
-cat <<EOF
- <Compile Include="$SRC" />
-EOF
-fi
-done
-echo " </ItemGroup>"
-}
-
-SWFresourcelist()
-{
-echo " <ItemGroup>"
- cat $Resource | while read SRC; do
- CUSTOMTOOLNAMESPACE=""
-
- # strip out that -resource:
- SRC=`echo $SRC | sed 's/-resource://'`
-
- CUSTOMTOOLNAMESPACE=`echo $SRC | awk -F, '{print $2}'`
-
- INCLUDE=`echo $SRC | awk -F, '{print $1}'`
-
- if test -f $INCLUDE.prebuilt; then
- INCLUDE=$INCLUDE.prebuilt
- fi
-
- # strip off the path from the name of the resource and the .prebuilt if there is one
- LOGICALNAME=`echo $INCLUDE | sed 's/resources\///;s/.prebuilt//'`
-
- # convert all /'s to \\'s
- INCLUDE=`echo $INCLUDE | sed 's/\//\\\\/'`
-
- echo " <EmbeddedResource Include=\"$INCLUDE\">"
- echo " <LogicalName>$LOGICALNAME</LogicalName>"
- if test "x$CUSTOMTOOLNAMESPACE" != "x"; then
- echo " <CustomToolNameSpace>$CUSTOMTOOLNAMESPACE</CustomToolNameSpace>"
- fi
- echo " </EmbeddedResource>"
- done
-echo " </ItemGroup>"
-}
-
-SWFhead
-SWFfilelist
-#SWFresourcelist
-SWFtail
diff --git a/mcs/class/Managed.Windows.Forms/resx.resx b/mcs/class/Managed.Windows.Forms/resx.resx
deleted file mode 100644
index 11d642e4b60..00000000000
--- a/mcs/class/Managed.Windows.Forms/resx.resx
+++ /dev/null
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
- <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xsd:element name="root" msdata:IsDataSet="true">
- <xsd:complexType>
- <xsd:choice maxOccurs="unbounded">
- <xsd:element name="data">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
- <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
- <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
- </xsd:complexType>
- </xsd:element>
- <xsd:element name="resheader">
- <xsd:complexType>
- <xsd:sequence>
- <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
- </xsd:sequence>
- <xsd:attribute name="name" type="xsd:string" use="required" />
- </xsd:complexType>
- </xsd:element>
- </xsd:choice>
- </xsd:complexType>
- </xsd:element>
- </xsd:schema>
-<resheader name="resmimetype"><value>text/microsoft-resx</value></resheader><resheader name="version"><value>1.3</value></resheader><resheader name="reader"><value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><resheader name="writer"><value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value></resheader><data name="test" mimetype="application/x-microsoft.net.object.binary.base64"><value>AAEAAAD/////AQAAAAAAAAAMAgAAACFTeXN0ZW0uV2luZG93cy5Gb3Jtc190ZXN0X25ldF8yXzAFAQAAACdNb25vVGVzdHMuU3lzdGVtLlJlc291cmNlcy5zZXJpYWxpemFibGUCAAAAB3Nlcm5hbWUIc2VydmFsdWUBAQIAAAAGAwAAAAVhYWFhYQYEAAAABWJiYmJiCw==</value><comment>comment</comment></data></root> \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs
index d0048815a18..3ffeaeb16bf 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTask.cs
@@ -78,43 +78,38 @@ namespace Microsoft.Build.BuildEngine {
if (propertyName != null)
element.SetAttribute ("PropertyName", propertyName);
}
-
- [MonoTODO]
+
public bool Execute ()
{
- bool result = false;
TaskEngine taskEngine;
LogTaskStarted ();
- ITask task = null;
+ ITask task;
try {
- try {
- task = InitializeTask ();
- } catch (Exception e) {
- LogError ("Error initializing task {0}: {1}", taskElement.LocalName, e.Message);
- LogMessage (MessageImportance.Low, "Error initializing task {0}: {1}",
- taskElement.LocalName, e.ToString ());
- return false;
- }
+ task = InitializeTask ();
+ } catch (Exception e) {
+ LogError ("Error initializing task {0}: {1}", taskElement.LocalName, e.Message);
+ LogMessage (MessageImportance.Low, "Error initializing task {0}: {1}",
+ taskElement.LocalName, e.ToString ());
+ return false;
+ }
+
+ try {
+ taskEngine = new TaskEngine (parentTarget.Project, task, Type);
+ taskEngine.Prepare (GetParameters ());
+ var result = taskEngine.Execute ();
+ if (result)
+ taskEngine.PublishOutput (taskElement, taskEngine.ValueFromExecution);
- try {
- taskEngine = new TaskEngine (parentTarget.Project);
- taskEngine.Prepare (task, this.taskElement, GetParameters (), this.Type);
- result = taskEngine.Execute ();
- if (result)
- taskEngine.PublishOutput ();
- } catch (Exception e) {
- task_logger.LogError ("Error executing task {0}: {1}", taskElement.LocalName, e.Message);
- task_logger.LogMessage (MessageImportance.Low,
- "Error executing task {0}: {1}", taskElement.LocalName, e.ToString ());
- result = false;
- }
- } finally {
LogTaskFinished (result);
+ return result;
+ } catch (Exception e) {
+ task_logger.LogError ("Error executing task {0}: {1}", taskElement.LocalName, e.Message);
+ task_logger.LogMessage (MessageImportance.Low,
+ "Error executing task {0}: {1}", taskElement.LocalName, e.ToString ());
+ return false;
}
-
- return result;
}
@@ -140,6 +135,21 @@ namespace Microsoft.Build.BuildEngine {
return taskElement.GetAttribute (attributeName);
}
+
+ bool IBuildTask.ResolveOutputItems ()
+ {
+ var taskEngine = new TaskEngine (parentTarget.Project, null, Type);
+
+ taskEngine.PublishOutput (taskElement, l => {
+ var pv = GetParameterValue (l.Name);
+
+ Expression exp = new Expression ();
+ exp.Parse (pv, ParseOptions.AllowItemsMetadataAndSplit);
+ return exp.ConvertTo (parentTarget.Project, l.PropertyType);
+ });
+
+ return true;
+ }
public void SetParameterValue (string parameterName,
string parameterValue)
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskItem.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskItem.cs
index 3fc4f14807d..fb1f7889254 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskItem.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskItem.cs
@@ -73,6 +73,11 @@ namespace Microsoft.Build.BuildEngine
foreach (XmlAttribute attrib in XmlElement.Attributes)
yield return attrib.Value;
}
+
+ public bool ResolveOutputItems ()
+ {
+ return true;
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskPropertyGroup.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskPropertyGroup.cs
index b5482ae1662..38cef0f0d09 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskPropertyGroup.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildTaskPropertyGroup.cs
@@ -52,7 +52,11 @@ namespace Microsoft.Build.BuildEngine {
{
return GetAttributes ();
}
-
+
+ public bool ResolveOutputItems ()
+ {
+ return true;
+ }
}
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/IBuildTask.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/IBuildTask.cs
index aa182487b64..d1553720f19 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/IBuildTask.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/IBuildTask.cs
@@ -38,6 +38,7 @@ namespace Microsoft.Build.BuildEngine {
}
bool Execute ();
+ bool ResolveOutputItems ();
IEnumerable<string> GetAttributes ();
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs
index 3873a93c498..76284d1660e 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TargetBatchingImpl.cs
@@ -36,7 +36,6 @@ using System.Xml;
using Microsoft.Build.Framework;
namespace Microsoft.Build.BuildEngine {
-
internal class TargetBatchingImpl : BatchingImplBase
{
string inputs;
@@ -58,17 +57,6 @@ namespace Microsoft.Build.BuildEngine {
{
executeOnErrors = false;
try {
- string reason;
- if (!BuildTargetNeeded (out reason)) {
- LogTargetStarted (target);
- LogTargetSkipped (target, reason);
- LogTargetFinished (target, true);
- return true;
- }
-
- if (!String.IsNullOrEmpty (reason))
- target.Engine.LogMessage (MessageImportance.Low, reason);
-
Init ();
ParseTargetAttributes (target);
@@ -104,24 +92,29 @@ namespace Microsoft.Build.BuildEngine {
executeOnErrors = false;
LogTargetStarted (target);
+
if (bucket != null)
project.PushBatch (bucket, commonItemsByName);
+
try {
+ TaskExecutionMode taskExecutionMode;
string reason;
if (!BuildTargetNeeded (out reason)) {
LogTargetSkipped (target, reason);
- return true;
- }
+ taskExecutionMode = TaskExecutionMode.SkipAndSetOutput;
+ } else {
+ taskExecutionMode = TaskExecutionMode.Complete;
- if (!String.IsNullOrEmpty (reason))
- target.Engine.LogMessage (MessageImportance.Low, reason);
+ if (!String.IsNullOrEmpty (reason))
+ target.Engine.LogMessage (MessageImportance.Low, reason);
+ }
for (int i = 0; i < target.BuildTasks.Count; i ++) {
//FIXME: parsing attributes repeatedly
IBuildTask bt = target.BuildTasks [i];
TaskBatchingImpl batchingImpl = new TaskBatchingImpl (project);
- bool task_result = batchingImpl.Build (bt, out executeOnErrors);
+ bool task_result = batchingImpl.Build (bt, taskExecutionMode, out executeOnErrors);
if (task_result)
continue;
@@ -138,6 +131,7 @@ namespace Microsoft.Build.BuildEngine {
} finally {
if (bucket != null)
project.PopBatch ();
+
LogTargetFinished (target, target_result);
}
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs
index 80e1d5272a1..b2628385645 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskBatchingImpl.cs
@@ -40,7 +40,7 @@ namespace Microsoft.Build.BuildEngine {
{
}
- public bool Build (IBuildTask buildTask, out bool executeOnErrors)
+ public bool Build (IBuildTask buildTask, TaskExecutionMode taskExecutionMode, out bool executeOnErrors)
{
executeOnErrors = false;
try {
@@ -49,15 +49,11 @@ namespace Microsoft.Build.BuildEngine {
// populate list of referenced items and metadata
ParseTaskAttributes (buildTask);
if (consumedMetadataReferences.Count == 0) {
- // No batching required
- if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project))
- return buildTask.Execute ();
- else // skipped, it should be logged
- return true;
+ return Execute (buildTask, taskExecutionMode);
}
BatchAndPrepareBuckets ();
- return Run (buildTask, out executeOnErrors);
+ return Run (buildTask, taskExecutionMode, out executeOnErrors);
} finally {
consumedItemsByName = null;
consumedMetadataReferences = null;
@@ -68,7 +64,7 @@ namespace Microsoft.Build.BuildEngine {
}
}
- bool Run (IBuildTask buildTask, out bool executeOnErrors)
+ bool Run (IBuildTask buildTask, TaskExecutionMode taskExecutionMode, out bool executeOnErrors)
{
executeOnErrors = false;
@@ -76,11 +72,9 @@ namespace Microsoft.Build.BuildEngine {
bool retval = true;
if (buckets.Count == 0) {
// batched mode, but no values in the corresponding items!
- if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project)) {
- retval = buildTask.Execute ();
- if (!retval && !buildTask.ContinueOnError)
- executeOnErrors = true;
- }
+ retval = Execute (buildTask, taskExecutionMode);
+ if (!retval && !buildTask.ContinueOnError)
+ executeOnErrors = true;
return retval;
}
@@ -89,12 +83,10 @@ namespace Microsoft.Build.BuildEngine {
foreach (Dictionary<string, BuildItemGroup> bucket in buckets) {
project.PushBatch (bucket, commonItemsByName);
try {
- if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project)) {
- retval = buildTask.Execute ();
- if (!retval && !buildTask.ContinueOnError) {
- executeOnErrors = true;
- break;
- }
+ retval = Execute (buildTask, taskExecutionMode);
+ if (!retval && !buildTask.ContinueOnError) {
+ executeOnErrors = true;
+ break;
}
} finally {
project.PopBatch ();
@@ -104,6 +96,22 @@ namespace Microsoft.Build.BuildEngine {
return retval;
}
+ bool Execute (IBuildTask buildTask, TaskExecutionMode taskExecutionMode)
+ {
+ if (ConditionParser.ParseAndEvaluate (buildTask.Condition, project)) {
+ switch (taskExecutionMode) {
+ case TaskExecutionMode.Complete:
+ return buildTask.Execute ();
+ case TaskExecutionMode.SkipAndSetOutput:
+ return buildTask.ResolveOutputItems ();
+ default:
+ throw new NotImplementedException ();
+ }
+ }
+
+ return true;
+ }
+
// Parse task attributes to get list of referenced metadata and items
// to determine batching
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs
index 335c66b459a..7e7c0c148e5 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskEngine.cs
@@ -38,10 +38,9 @@ using Microsoft.Build.Utilities;
namespace Microsoft.Build.BuildEngine {
internal class TaskEngine {
- ITask task;
- XmlElement taskElement;
Type taskType;
Project parentProject;
+ ITask task;
static Type requiredAttribute;
static Type outputAttribute;
@@ -52,9 +51,11 @@ namespace Microsoft.Build.BuildEngine {
outputAttribute = typeof (Microsoft.Build.Framework.OutputAttribute);
}
- public TaskEngine (Project project)
+ public TaskEngine (Project project, ITask task, Type taskType)
{
parentProject = project;
+ this.task = task;
+ this.taskType = taskType;
}
// Rules (inferred) for property values incase of empty data
@@ -69,17 +70,13 @@ namespace Microsoft.Build.BuildEngine {
// string/
// ITaskItem[] empty/whitespace null No
- public void Prepare (ITask task, XmlElement taskElement,
- IDictionary <string, string> parameters, Type taskType)
+ public void Prepare (IDictionary <string, string> parameters)
{
Dictionary <string, object> values;
PropertyInfo currentProperty;
PropertyInfo[] properties;
object value;
- this.task = task;
- this.taskElement = taskElement;
- this.taskType = taskType;
values = new Dictionary <string, object> (StringComparer.OrdinalIgnoreCase);
foreach (KeyValuePair <string, string> de in parameters) {
@@ -131,20 +128,18 @@ namespace Microsoft.Build.BuildEngine {
InitializeParameter (pi, val);
}
}
-
+
public bool Execute ()
{
return task.Execute ();
}
- public void PublishOutput ()
+ public void PublishOutput (XmlElement taskElement, Func<PropertyInfo, object> valueProvider)
{
XmlElement xmlElement;
- PropertyInfo propertyInfo;
string propertyName;
string taskParameter;
string itemName;
- object o;
foreach (XmlNode xmlNode in taskElement.ChildNodes) {
if (!(xmlNode is XmlElement))
@@ -165,16 +160,17 @@ namespace Microsoft.Build.BuildEngine {
taskParameter = xmlElement.GetAttribute ("TaskParameter");
itemName = xmlElement.GetAttribute ("ItemName");
propertyName = xmlElement.GetAttribute ("PropertyName");
-
- propertyInfo = taskType.GetProperty (taskParameter, BindingFlags.Public | BindingFlags.Instance |
- BindingFlags.IgnoreCase);
+
+ var propertyInfo = taskType.GetProperty (taskParameter, BindingFlags.Public | BindingFlags.Instance | BindingFlags.IgnoreCase);
+
if (propertyInfo == null)
- throw new InvalidProjectFileException (String.Format (
- "The parameter '{0}' was not found for the '{1}' task.", taskParameter, taskElement.Name));
+ throw new InvalidProjectFileException (String.Format ("The parameter '{0}' was not found for the '{1}' task.", taskParameter, taskElement.Name));
+
if (!propertyInfo.IsDefined (outputAttribute, false))
- throw new InvalidProjectFileException ("This is not output property.");
+ throw new InvalidProjectFileException ("This is not output property.");
- o = propertyInfo.GetValue (task, null);
+ var o = valueProvider (propertyInfo);
+
if (itemName != String.Empty) {
PublishItemGroup (propertyInfo, o, itemName);
} else {
@@ -260,5 +256,10 @@ namespace Microsoft.Build.BuildEngine {
return true;
}
+
+ public object ValueFromExecution (PropertyInfo propertyInfo)
+ {
+ return propertyInfo.GetValue (task, null);
+ }
}
}
diff --git a/mcs/class/System.Web/System.Web.Util/ICalls.jvm.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskExecutionMode.cs
index 686934fe7ac..268cffb7e90 100644
--- a/mcs/class/System.Web/System.Web.Util/ICalls.jvm.cs
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/TaskExecutionMode.cs
@@ -1,7 +1,10 @@
//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
+// TaskExecutionMode.cs
//
-
+// Authors:
+// Marek Safar <marek.safar@gmail.com>
+//
+// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -23,22 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Runtime.CompilerServices;
-namespace System.Web.Util
+namespace Microsoft.Build.BuildEngine
{
- class ICalls
+ enum TaskExecutionMode
{
- ICalls () {}
-
- static public string GetMachineConfigPath ()
- {
- return ".";
- }
-
- static public string GetMachineInstallDirectory ()
- {
- return ".";
- }
+ Complete = 0,
+ SkipAndSetOutput = 1
}
-}
-
+} \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln
deleted file mode 100644
index 6f9b584447d..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_0.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-net_4_0", "Microsoft.Build.Engine-net_4_0.csproj", "{155AEF28-C81F-405D-9072-9D52780E3E70}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine-tests-net_4_0", "Microsoft.Build.Engine-tests-net_4_0.csproj", "{155AEF28-C81F-405D-9072-9D52780E3E71}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {155AEF28-C81F-405D-9072-9D52780E3E70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {155AEF28-C81F-405D-9072-9D52780E3E71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {155AEF28-C81F-405D-9072-9D52780E3E70}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {155AEF28-C81F-405D-9072-9D52780E3E71}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {155AEF28-C81F-405D-9072-9D52780E3E70}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {155AEF28-C81F-405D-9072-9D52780E3E71}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {155AEF28-C81F-405D-9072-9D52780E3E70}.Release|Any CPU.Build.0 = Release|Any CPU
- {155AEF28-C81F-405D-9072-9D52780E3E71}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = Microsoft.Build.Engine-net_4_0.csproj
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj
deleted file mode 100644
index 8ce515a3c75..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.csproj
+++ /dev/null
@@ -1,106 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <RootNamespace>Microsoft.Build.Engine.Test</RootNamespace>
- <AssemblyName>Microsoft.Build.Engine.Test</AssemblyName>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{A2F451CD-8701-434A-A562-EF1809E2DB7D}</ProjectGuid>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <OutputPath>.\</OutputPath>
- <Optimize>False</Optimize>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugSymbols>True</DebugSymbols>
- <DebugType>Full</DebugType>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- <DocumentationFile>
- </DocumentationFile>
- <RegisterForComInterop>false</RegisterForComInterop>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'DebugMS' ">
- <OutputPath>.\</OutputPath>
- <Optimize>False</Optimize>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugSymbols>True</DebugSymbols>
- <DebugType>Full</DebugType>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- <DocumentationFile>
- </DocumentationFile>
- <RegisterForComInterop>false</RegisterForComInterop>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <Optimize>True</Optimize>
- <DefineConstants>TRACE</DefineConstants>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- <DocumentationFile>
- </DocumentationFile>
- <RegisterForComInterop>false</RegisterForComInterop>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="Microsoft.Build.Framework" />
- <Reference Include="Microsoft.Build.Utilities" />
- <Reference Include="nunit.core">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\nunit24\NUnitCore\core\bin\Debug2005\nunit.core.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\nunit24\NUnitFramework\framework\bin\Debug2005\nunit.framework.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(Configuration)' == 'DebugMS' ">
- <Reference Include="Microsoft.Build.Engine" />
- </ItemGroup>
- <ItemGroup Condition=" '$(Configuration)' != 'DebugMS' ">
- <ProjectReference Include="Microsoft.Build.Engine.csproj">
- <Project>{49CC9B64-E28A-4818-97F9-301E14B383B9}</Project>
- <Name>Microsoft.Build.Engine</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemGroupCollectionTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemGroupTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildItemTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyGroupTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildPropertyGroupCollectionTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildTaskTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\BuildChooseTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\ConsoleLoggerTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\Consts.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\EngineTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\ImportCollectionTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\ImportTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\InternalLoggerExceptionTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\InvalidProjectFileExceptionTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\ProjectTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\TargetCollectionTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\TargetTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\TestNamespaceManager.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\UsingTaskTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\UsingTaskCollectionTest.cs" />
- <Compile Include="Test\Microsoft.Build.BuildEngine\UtilitiesTest.cs" />
- <Compile Include="Test\various\Build.cs" />
- <Compile Include="Test\various\Conditions.cs" />
- <Compile Include="Test\various\DefaultTasks.cs" />
- <Compile Include="Test\various\EvaluationOrder.cs" />
- <Compile Include="Test\various\Items.cs" />
- <Compile Include="Test\various\ProjectElement.cs" />
- <Compile Include="Test\various\Properties.cs" />
- <Compile Include="..\Microsoft.Build.Tasks\Test/Microsoft.Build.Tasks\TestMessageLogger.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
- <PropertyGroup>
- <PreBuildEvent>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /r:Microsoft.Build.Framework.dll /r:Microsoft.Build.Utilities.dll /target:library /out:$(ProjectDir)Test\resources\TestTasks.dll $(ProjectDir)Test\resources\TestTasks.cs</PreBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln
deleted file mode 100644
index c6101a2c43c..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.Test.sln
+++ /dev/null
@@ -1,16 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# SharpDevelop 2.0.0.1135
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Engine.Test", "Microsoft.Build.Engine.Test.csproj", "{A2F451CD-8701-434A-A562-EF1809E2DB7D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.Build.0 = Release|Any CPU
- {A2F451CD-8701-434A-A562-EF1809E2DB7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj
deleted file mode 100644
index 3b9be7cdedd..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.csproj
+++ /dev/null
@@ -1,115 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <RootNamespace>Microsoft.Build.Engine</RootNamespace>
- <AssemblyName>Microsoft.Build.Engine</AssemblyName>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProjectGuid>{49CC9B64-E28A-4818-97F9-301E14B383B9}</ProjectGuid>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <OutputPath>.\</OutputPath>
- <Optimize>False</Optimize>
- <DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
- <DebugSymbols>True</DebugSymbols>
- <DebugType>Full</DebugType>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- <DocumentationFile>
- </DocumentationFile>
- <RegisterForComInterop>false</RegisterForComInterop>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <OutputPath>bin\Release\</OutputPath>
- <Optimize>True</Optimize>
- <DefineConstants>TRACE;NET_2_0</DefineConstants>
- <DebugSymbols>False</DebugSymbols>
- <DebugType>None</DebugType>
- <CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
- <UseVSHostingProcess>true</UseVSHostingProcess>
- <DocumentationFile>
- </DocumentationFile>
- <RegisterForComInterop>false</RegisterForComInterop>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'DebugMS' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\DebugMS\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_2_0</DefineConstants>
- <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <DebugType>Full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="Microsoft.Build.Framework" />
- <Reference Include="Microsoft.Build.Utilities" />
- </ItemGroup>
- <ItemGroup Condition=" '$(Configuration)' == 'DebugMS' ">
- <Compile Include="Assembly\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs" />
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
- <Compile Include="..\Microsoft.Build.Framework\Mono.XBuild.Framework/AssemblyLoadInfo.cs" />
- <Compile Include="..\Microsoft.Build.Utilities\Mono.XBuild.Utilities/ReservedNameUtils.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BatchingImplBase.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildChoose.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildEngine.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildItem.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildItemGroup.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildItemGroupCollection.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildProperty.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildPropertyGroup.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildPropertyGroupCollection.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildSettings.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildTask.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\BuildWhen.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ChangeType.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ColorResetter.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ColorSetter.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionAndExpression.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionExpression.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionFactorExpresion.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionFunctionExpression.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionNotExpression.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionOrExpression.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionParser.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionRelationalExpression.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConditionTokenizer.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ConsoleLogger.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\DirectoryScanner.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\Engine.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\EventSource.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\Expression.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ExpressionCollection.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ExpressionParseException.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\FileLogger.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\GroupingCollection.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\Import.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ImportCollection.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ImportedProject.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\InternalLoggerException.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\InvalidProjectFileException.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\IReference.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\ItemReference.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\MetadataReference.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\Project.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\PropertyPosition.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\PropertyReference.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\SolutionParser.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\Target.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\TargetBatchingImpl.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\TargetCollection.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\TaskBatchingImpl.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\TaskDatabase.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\TaskEngine.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\Token.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\UsingTask.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\UsingTaskCollection.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\Utilities.cs" />
- <Compile Include="Microsoft.Build.BuildEngine\WriteHandler.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
-</Project> \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources
index 5c4612001ea..a25d7363cdb 100644
--- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources
+++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine.dll.sources
@@ -65,6 +65,7 @@ Microsoft.Build.BuildEngine/TargetCollection.cs
Microsoft.Build.BuildEngine/Target.cs
Microsoft.Build.BuildEngine/TaskDatabase.cs
Microsoft.Build.BuildEngine/TaskEngine.cs
+Microsoft.Build.BuildEngine/TaskExecutionMode.cs
Microsoft.Build.BuildEngine/Token.cs
Microsoft.Build.BuildEngine/Toolset.cs
Microsoft.Build.BuildEngine/ToolsetCollection.cs
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp
deleted file mode 100644
index 0cc9acef0f4..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mdp
+++ /dev/null
@@ -1,42 +0,0 @@
-<Project name="Microsoft.Build.Engine.Test" fileversion="2.0" language="C#" clr-version="Net_2_0" ctype="DotNetProject">
- <Configurations active="Debug">
- <Configuration name="Debug" ctype="DotNetProjectConfiguration">
- <Output directory="./bin/Debug" assembly="Microsoft.Build.Engine.Test" />
- <Build debugmode="True" target="Library" />
- <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
- </Configuration>
- <Configuration name="Release" ctype="DotNetProjectConfiguration">
- <Output directory="./bin/Release" assembly="Microsoft.Build.Engine.Test" />
- <Build debugmode="False" target="Library" />
- <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
- <CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
- </Configuration>
- </Configurations>
- <DeployTargets />
- <DeploymentInformation strategy="File">
- <excludeFiles />
- </DeploymentInformation>
- <Contents>
- <File name="./Microsoft.Build.BuildEngine/InternalLoggerExceptionTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/InvalidProjectFileExceptionTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/EngineTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/ProjectTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/BuildItemTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/UtilitiesTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/BuildPropertyTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/BuildPropertyGroupTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/BuildPropertyGroupCollectionTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/UsingTaskCollectionTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/UsingTaskTest.cs" subtype="Code" buildaction="Compile" />
- <File name="./Microsoft.Build.BuildEngine/Consts.cs" subtype="Code" buildaction="Compile" />
- </Contents>
- <References>
- <ProjectReference type="Gac" localcopy="True" refto="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
- <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <ProjectReference type="Gac" localcopy="True" refto="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
- <ProjectReference type="Gac" localcopy="True" refto="Microsoft.Build.Engine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <ProjectReference type="Gac" localcopy="True" refto="Microsoft.Build.Framework, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- <ProjectReference type="Gac" localcopy="True" refto="Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
- </References>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds b/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds
deleted file mode 100644
index bc65d10979c..00000000000
--- a/mcs/class/Microsoft.Build.Engine/Test/Microsoft.Build.Engine.Test.mds
+++ /dev/null
@@ -1,17 +0,0 @@
-<Combine name="Microsoft.Build.Engine.Test" fileversion="2.0">
- <Configurations active="Debug">
- <Configuration name="Debug" ctype="CombineConfiguration">
- <Entry build="True" name="Microsoft.Build.Engine.Test" configuration="Debug" />
- </Configuration>
- <Configuration name="Release" ctype="CombineConfiguration">
- <Entry build="True" name="Microsoft.Build.Engine.Test" configuration="Debug" />
- </Configuration>
- </Configurations>
- <DeployTargets />
- <StartMode startupentry="Microsoft.Build.Engine.Test" single="True">
- <Execute type="None" entry="Microsoft.Build.Engine.Test" />
- </StartMode>
- <Entries>
- <Entry filename="./Microsoft.Build.Engine.Test.mdp" />
- </Entries>
-</Combine> \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs b/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs
index ee93c4b932d..3a07eb289fb 100755
--- a/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs
+++ b/mcs/class/Microsoft.Build.Engine/Test/various/Items.cs
@@ -1402,6 +1402,8 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
}
[Test]
+ // Fails on wrench
+ [Category ("NotWorking")]
public void TestItemsWithWildcards ()
{
Engine engine = new Engine (Consts.BinPath);
@@ -1476,6 +1478,8 @@ namespace MonoTests.Microsoft.Build.BuildEngine.Various {
}
[Test]
+ // Fails on wrench
+ [Category ("NotWorking")]
public void TestReservedMetadata ()
{
Engine engine = new Engine (Consts.BinPath);
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.csproj b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.csproj
deleted file mode 100644
index 736ca300b55..00000000000
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.csproj
+++ /dev/null
@@ -1,66 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{1D0190A3-E345-45EC-9DCD-7B12BB6A7CC9}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Microsoft.Build.Framework.Test</RootNamespace>
- <AssemblyName>Microsoft.Build.Framework.Test</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Build.Framework" />
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Test\Microsoft.Build.Framework\BuildErrorEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\BuildEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\BuildFinishedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\BuildMessageEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\BuildStartedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\BuildWarningEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\ExternalProjectFinishedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\ExternalProjectStartedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\LoggerExceptionTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\ProjectFinishedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\ProjectStartedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\TargetFinishedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\TargetStartedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\TaskCommandLineEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\TaskFinishedEventArgsTest.cs" />
- <Compile Include="Test\Microsoft.Build.Framework\TaskStartedEventArgsTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.sln b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.sln
deleted file mode 100644
index 81101028a6b..00000000000
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework.Test.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Framework.Test", "Microsoft.Build.Framework.Test.csproj", "{1D0190A3-E345-45EC-9DCD-7B12BB6A7CC9}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {1D0190A3-E345-45EC-9DCD-7B12BB6A7CC9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1D0190A3-E345-45EC-9DCD-7B12BB6A7CC9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1D0190A3-E345-45EC-9DCD-7B12BB6A7CC9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1D0190A3-E345-45EC-9DCD-7B12BB6A7CC9}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
index c23e7427cce..20566ffe215 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventArgs.cs
@@ -83,6 +83,11 @@ namespace Microsoft.Build.Framework
get {
return message;
}
+#if NET_4_0
+ protected set {
+ message = value;
+ }
+#endif
}
public string SenderName {
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventContext.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventContext.cs
index 2a550f46dc3..f65feb38485 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventContext.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/BuildEventContext.cs
@@ -26,12 +26,12 @@ namespace Microsoft.Build.Framework
{
}
- public BuildEventContext (int nodeId, int projectInstanceId, int targetId, int projectContextId, int taskId)
- : this (rnd.Next (), nodeId, projectInstanceId, targetId, projectContextId, taskId)
+ public BuildEventContext (int nodeId, int projectInstanceId, int projectContextId, int targetId, int taskId)
+ : this (rnd.Next (), nodeId, projectInstanceId, projectContextId, targetId, taskId)
{
}
- public BuildEventContext (int submissionId, int nodeId, int projectInstanceId, int targetId, int projectContextId, int taskId)
+ public BuildEventContext (int submissionId, int nodeId, int projectInstanceId, int projectContextId, int targetId, int taskId)
{
SubmissionId = submissionId;
NodeId = nodeId;
@@ -56,9 +56,9 @@ namespace Microsoft.Build.Framework
public int TaskId { get; private set; }
// MSDN document says "true if the references are equal, false otherwise." but that doesn't make sense.
- public override bool Equals (object other)
+ public override bool Equals (object obj)
{
- var o = other as BuildEventContext;
+ var o = obj as BuildEventContext;
return (object) o != null &&
o.NodeId == NodeId &&
o.ProjectContextId == ProjectContextId &&
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
index ad629ec180a..26a0306278a 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/LazyFormattedBuildEventArgs.cs
@@ -32,7 +32,7 @@ using System;
namespace Microsoft.Build.Framework
{
[Serializable]
- public abstract class LazyFormattedBuildEventArgs : BuildEventArgs {
+ public class LazyFormattedBuildEventArgs : BuildEventArgs {
string message, format;
object[] args;
diff --git a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs
index 121107824cc..e8ecdaecf04 100644
--- a/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs
+++ b/mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework/RegisteredTaskObjectLifetime.cs
@@ -3,8 +3,8 @@ namespace Microsoft.Build.Framework
{
public enum RegisteredTaskObjectLifetime
{
- AppDomain,
- Build
+ Build,
+ AppDomain
}
}
#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.csproj b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.csproj
deleted file mode 100755
index a9f9184314c..00000000000
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.csproj
+++ /dev/null
@@ -1,76 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{01D4DF2C-F88B-43F1-B935-25CC0EE900C7}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Microsoft.Build.Tasks.Test</RootNamespace>
- <AssemblyName>Microsoft.Build.Tasks.Test</AssemblyName>
- <StartupObject>
- </StartupObject>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>True</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>False</Optimize>
- <OutputPath>./</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <OutputType>Library</OutputType>
- <AssemblyName>Microsoft.Build.Tasks.Test</AssemblyName>
- <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>True</Optimize>
- <OutputPath>./bin/Release/</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <OutputType>Library</OutputType>
- <AssemblyName>Microsoft.Build.Tasks.Test</AssemblyName>
- <DebugSymbols>True</DebugSymbols>
- <AllowUnsafeBlocks>False</AllowUnsafeBlocks>
- <CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ItemGroup>
- <Compile Include="Test\Microsoft.Build.Tasks\ALTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\Consts.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\CreateItemTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\CreatePropertyTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\CscTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\ErrorTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\GetFrameworkPathTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\GetFrameworkSdkPathTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\MakeDirTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\ManagedCompilerTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\MessageTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\RemoveDirTest.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\TestEngine.cs" />
- <Compile Include="Test\Microsoft.Build.Tasks\WarningTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="Microsoft.Build.Engine" />
- <Reference Include="Microsoft.Build.Framework" />
- <Reference Include="Microsoft.Build.Tasks" />
- <Reference Include="Microsoft.Build.Utilities" />
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.sln b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.sln
deleted file mode 100755
index 7440b324539..00000000000
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks.Test.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C# Express 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Tasks.Test", "Microsoft.Build.Tasks.Test.csproj", "{01D4DF2C-F88B-43F1-B935-25CC0EE900C7}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {01D4DF2C-F88B-43F1-B935-25CC0EE900C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {01D4DF2C-F88B-43F1-B935-25CC0EE900C7}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {01D4DF2C-F88B-43F1-B935-25CC0EE900C7}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {01D4DF2C-F88B-43F1-B935-25CC0EE900C7}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs
index 5e853036989..fcb56e166ef 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CodeTaskFactory.cs
@@ -41,7 +41,7 @@ using System.Collections.Specialized;
namespace Microsoft.Build.Tasks
{
- public class CodeTaskFactory : ITaskFactory2
+ public class CodeTaskFactory : ITaskFactory
{
public CodeTaskFactory ()
{
@@ -51,11 +51,12 @@ namespace Microsoft.Build.Tasks
public void CleanupTask (ITask task)
{
}
- public ITask CreateTask (IBuildEngine taskFactoryLoggingHost)
+ public ITask CreateTask (IBuildEngine loggingHost)
{
- return CreateTask (taskFactoryLoggingHost, null);
+ return CreateTask (loggingHost, null);
}
- public ITask CreateTask (IBuildEngine taskFactoryLoggingHost, IDictionary<string, string> taskIdentityParameters)
+
+ ITask CreateTask (IBuildEngine taskFactoryLoggingHost, IDictionary<string, string> taskIdentityParameters)
{
if (assembly == null)
return null;
@@ -66,11 +67,11 @@ namespace Microsoft.Build.Tasks
{
return parameter_group != null ? parameter_group.Values.ToArray () : new TaskPropertyInfo [0];
}
- public bool Initialize (string taskName, IDictionary<string, TaskPropertyInfo> parameterGroup, string taskBody, IBuildEngine taskFactoryLoggingHost)
+ public bool Initialize (string taskName, IDictionary<string, TaskPropertyInfo> taskParameters, string taskElementContents, IBuildEngine taskFactoryLoggingHost)
{
- return Initialize (taskName, null, parameterGroup, taskBody, taskFactoryLoggingHost);
+ return Initialize (taskName, null, taskParameters, taskElementContents, taskFactoryLoggingHost);
}
- public bool Initialize (string taskName, IDictionary<string, string> factoryIdentityParameters, IDictionary<string, TaskPropertyInfo> parameterGroup, string taskBody, IBuildEngine taskFactoryLoggingHost)
+ bool Initialize (string taskName, IDictionary<string, string> factoryIdentityParameters, IDictionary<string, TaskPropertyInfo> parameterGroup, string taskBody, IBuildEngine taskFactoryLoggingHost)
{
task_name = taskName;
if (parameterGroup != null)
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs
index 0388364f8b3..f3b78a63029 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateManifestResourceName.cs
@@ -122,7 +122,7 @@ namespace Microsoft.Build.Tasks {
protected abstract string CreateManifestName (string fileName,
string linkFileName,
- string rootNamespace,
+ string rootNamespaceName,
string dependentUponFileName,
Stream binaryStream);
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs
index c905f6b1f59..ebabe1103af 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/CreateTemporaryVCProject.cs
@@ -26,7 +26,7 @@
///// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
/////
-#if NET_2_0
+#if !NET_4_0
using System;
using Microsoft.Build.Framework;
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
index 142e73eddeb..06b04b2670c 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Csc.cs
@@ -25,8 +25,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_2_0
-
using System;
using System.IO;
using Microsoft.Build.Framework;
@@ -102,12 +100,12 @@ namespace Microsoft.Build.Tasks {
//
if (References != null)
foreach (ITaskItem item in References) {
- string aliases = item.GetMetadata ("Aliases") ?? String.Empty;
- aliases = aliases.Trim ();
- if (aliases.Length > 0)
- commandLine.AppendSwitchIfNotNull ("/reference:" + aliases + "=", item.ItemSpec);
- else
+ string aliases = item.GetMetadata ("Aliases");
+ if (!string.IsNullOrEmpty (aliases)) {
+ AddAliasesReference (commandLine, aliases, item.ItemSpec);
+ } else {
commandLine.AppendSwitchIfNotNull ("/reference:", item.ItemSpec);
+ }
}
if (ResponseFiles != null)
@@ -125,6 +123,21 @@ namespace Microsoft.Build.Tasks {
commandLine.AppendSwitchIfNotNull ("/win32res:", Win32Resource);
}
+ static void AddAliasesReference (CommandLineBuilderExtension commandLine, string aliases, string reference)
+ {
+ foreach (var alias in aliases.Split (',')) {
+ var a = alias.Trim ();
+ if (a.Length == null)
+ continue;
+
+ var r = "/reference:";
+ if (!string.Equals (a, "global", StringComparison.OrdinalIgnoreCase))
+ r += a + "=";
+
+ commandLine.AppendSwitchIfNotNull (r, reference);
+ }
+ }
+
[MonoTODO]
protected override bool CallHostObjectToExecute ()
{
@@ -232,4 +245,3 @@ namespace Microsoft.Build.Tasks {
}
}
-#endif
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
index 33beac30384..cfcc2d65892 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Exec.cs
@@ -122,13 +122,13 @@ namespace Microsoft.Build.Tasks {
Log.LogMessage (MessageImportance.Normal, "Executing: " + command);
}
- protected override void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
+ protected override void LogEventsFromTextOutput (string singleLine, MessageImportance messageImportance)
{
#if NET_4_0
if (IgnoreStandardErrorWarningFormat ||
(!errorMatcher (singleLine) && !warningMatcher (singleLine)))
#endif
- Log.LogMessage (importance, singleLine);
+ Log.LogMessage (messageImportance, singleLine);
}
#if NET_4_0
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/FindAppConfigFile.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/FindAppConfigFile.cs
index 5630482be27..99c7602942c 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/FindAppConfigFile.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/FindAppConfigFile.cs
@@ -36,7 +36,7 @@ using Microsoft.Build.Utilities;
namespace Microsoft.Build.Tasks {
//FIXME: This should be in v3.5 only
- public sealed class FindAppConfigFile : TaskExtension {
+ public class FindAppConfigFile : TaskExtension {
public FindAppConfigFile ()
{
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
index e78b92dc8fc..a8ad35c8e69 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/GetReferenceAssemblyPaths.cs
@@ -222,7 +222,6 @@ namespace Microsoft.Build.Tasks
"It should have either 2 or 3 comma separated components.", moniker_literal);
}
- [Required]
public string TargetFrameworkMoniker { get; set; }
public string RootPath { get; set; }
@@ -233,10 +232,10 @@ namespace Microsoft.Build.Tasks
public string TargetFrameworkMonikerDisplayName { get; set; }
[Output]
- public string[] ReferenceAssemblyPaths { get; set; }
+ public string[] ReferenceAssemblyPaths { get; private set; }
[Output]
- public string[] FullFrameworkReferenceAssemblyPaths { get; set; }
+ public string[] FullFrameworkReferenceAssemblyPaths { get; private set; }
static string DefaultFrameworksBasePath {
get {
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
index 491d1c5a180..5a40c8e0c1e 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
@@ -53,7 +53,6 @@ namespace Microsoft.Build.Tasks {
bool findRelatedFiles;
bool findSatellites;
bool findSerializationAssemblies;
- string[] installedAssemblyTables;
ITaskItem[] relatedFiles;
ITaskItem[] resolvedDependencyFiles;
ITaskItem[] resolvedFiles;
@@ -156,6 +155,9 @@ namespace Microsoft.Build.Tasks {
LogWithPrecedingNewLine (MessageImportance.Low, "Primary Reference {0}", item.ItemSpec);
ResolvedReference resolved_ref = ResolveReference (item, searchPaths, true);
+ if (resolved_ref == null)
+ resolved_ref = ResolveWithAlternateName (item, allowedAssemblyExtensions ?? default_assembly_extensions);
+
if (resolved_ref == null) {
Log.LogWarning ("Reference '{0}' not resolved", item.ItemSpec);
assembly_resolver.LogSearchLoggerMessages (MessageImportance.Normal);
@@ -182,6 +184,19 @@ namespace Microsoft.Build.Tasks {
}
}
+
+ ResolvedReference ResolveWithAlternateName (ITaskItem item, string[] extensions)
+ {
+ foreach (string extn in extensions) {
+ if (item.ItemSpec.EndsWith (extn)) {
+ ITaskItem altitem = new TaskItem (item.ItemSpec.Substring (0, item.ItemSpec.Length - extn.Length));
+ item.CopyMetadataTo (altitem);
+ return ResolveReference (altitem, searchPaths, true);
+ }
+ }
+ return null;
+ }
+
// Use @search_paths to resolve the reference
ResolvedReference ResolveReference (ITaskItem item, IEnumerable<string> search_paths, bool set_copy_local)
{
@@ -610,12 +625,15 @@ namespace Microsoft.Build.Tasks {
get { return findSerializationAssemblies; }
set { findSerializationAssemblies = value; }
}
-
- public string[] InstalledAssemblyTables {
- get { return installedAssemblyTables; }
- set { installedAssemblyTables = value; }
- }
-
+
+ public
+#if NET_4_0
+ ITaskItem[]
+#else
+ string[]
+#endif
+ InstalledAssemblyTables { get; set; }
+
[Output]
public ITaskItem[] RelatedFiles {
get { return relatedFiles; }
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs
index 53e6f32e5b9..23e7e2c3c7f 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/VCBuild.cs
@@ -1,5 +1,5 @@
//
-// UpdateManifest.cs
+// VCBuild.cs
//
// Author:
// Leszek Ciesielski <skolima@gmail.com>
@@ -26,7 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
+#if !NET_4_0
using System;
using System.Collections.Specialized;
diff --git a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
index 107f9eb2896..a004b65ac6b 100644
--- a/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/Vbc.cs
@@ -158,7 +158,7 @@ namespace Microsoft.Build.Tasks {
return true;
}
- protected override void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
+ protected override void LogEventsFromTextOutput (string singleLine, MessageImportance messageImportance)
{
singleLine = singleLine.Trim ();
if (singleLine.Length == 0)
@@ -173,7 +173,7 @@ namespace Microsoft.Build.Tasks {
Match match = ErrorRegex.Match (singleLine);
if (!match.Success) {
- Log.LogMessage (importance, singleLine);
+ Log.LogMessage (messageImportance, singleLine);
return;
}
@@ -198,7 +198,7 @@ namespace Microsoft.Build.Tasks {
Log.LogError (null, code, null, filename, lineNumber, columnNumber, -1,
-1, text, null);
} else {
- Log.LogMessage (importance, singleLine);
+ Log.LogMessage (messageImportance, singleLine);
}
}
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs
index 846f47e627f..711bdb26afc 100644
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/CscTest.cs
@@ -434,6 +434,24 @@ namespace MonoTests.Microsoft.Build.Tasks {
}
[Test]
+ public void TestReferencesAlias ()
+ {
+ CscExtended csc = new CscExtended ();
+ CommandLineBuilderExtension c1 = new CommandLineBuilderExtension ();
+ CommandLineBuilderExtension c2 = new CommandLineBuilderExtension ();
+
+ TaskItem ti1 = new TaskItem ("A");
+ ti1.SetMetadata ("Aliases", "r1,global,r2");
+
+ csc.References = new ITaskItem[2] { ti1, new TaskItem ("B") };
+ csc.ARFC (c1);
+ csc.ACLC (c2);
+
+ Assert.AreEqual ("/reference:r1=A /reference:A /reference:r2=A /reference:B", c1.ToString (), "A1");
+ Assert.AreEqual (String.Empty, c2.ToString (), "A2");
+ }
+
+ [Test]
public void TestResponseFiles ()
{
CscExtended csc = new CscExtended ();
diff --git a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ResolveAssemblyReferenceTest.cs b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ResolveAssemblyReferenceTest.cs
index 60dda503175..5d802a32faa 100644
--- a/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ResolveAssemblyReferenceTest.cs
+++ b/mcs/class/Microsoft.Build.Tasks/Test/Microsoft.Build.Tasks/ResolveAssemblyReferenceTest.cs
@@ -227,6 +227,52 @@ namespace MonoTests.Microsoft.Build.Tasks {
";
}
+ [Test]
+ public void TestSystemDll ()
+ {
+ var gacDir = GetGacDir ();
+
+ if (gacDir == null || !System.IO.Directory.Exists (gacDir))
+ Assert.Ignore ("GAC not found.");
+
+ string documentString = @"
+ <Project xmlns=""http://schemas.microsoft.com/developer/msbuild/2003"">
+ <ItemGroup>
+ <Reference Include='System.dll' />
+ </ItemGroup>
+ <PropertyGroup>
+ <SearchPaths>
+ {CandidateAssemblyFiles};
+ $(ReferencePath);
+ {HintPathFromItem};
+ {TargetFrameworkDirectory};
+ {AssemblyFolders};
+ {GAC};
+ {RawFileName};
+ $(OutputPath)
+ </SearchPaths>
+ </PropertyGroup>
+ <Target Name='A'>
+ <ResolveAssemblyReference
+ Assemblies='@(Reference)'
+ SearchPaths='$(SearchPaths)'
+ >
+ <Output TaskParameter='ResolvedFiles' ItemName='ResolvedFiles'/>
+ </ResolveAssemblyReference>
+ </Target>
+ </Project>
+ ";
+
+ engine = new Engine (Consts.BinPath);
+ project = engine.CreateNewProject ();
+ project.LoadXml (documentString);
+
+ Assert.IsTrue (project.Build ("A"), "A1");
+ big = project.GetEvaluatedItemsByName ("ResolvedFiles");
+ Assert.AreEqual (1, big.Count, "A2");
+ Assert.IsTrue (big [0].Include.EndsWith (".dll"), "A3");
+ }
+
string GetGacDir ()
{
// copied from mcs/tools/gacutil/driver.cs
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj
deleted file mode 100644
index 718e3c2e01f..00000000000
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.csproj
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DC97F667-4341-4764-8F35-E1E0B2705A51}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Microsoft.Build.Utilities.Test</RootNamespace>
- <AssemblyName>Microsoft.Build.Utilities.Test</AssemblyName>
- <StartupObject>
- </StartupObject>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ItemGroup>
- <Reference Include="Microsoft.Build.Framework" />
- <Reference Include="Microsoft.Build.Utilities" />
- <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Test\Microsoft.Build.Utilities\CommandLineBuilderTest.cs" />
- <Compile Include="Test\Microsoft.Build.Utilities\LoggerTest.cs" />
- <Compile Include="Test\Microsoft.Build.Utilities\TaskItemTest.cs" />
- <Compile Include="Test\Microsoft.Build.Utilities\TaskLoggingHelperTest.cs" />
- <Compile Include="Test\Microsoft.Build.Utilities\ToolTaskTest.cs" />
- </ItemGroup>
-</Project>
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.sln b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.sln
deleted file mode 100644
index 99b60709587..00000000000
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities.Test.sln
+++ /dev/null
@@ -1,20 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual C# Express 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Build.Utilities.Test", "Microsoft.Build.Utilities.Test.csproj", "{DC97F667-4341-4764-8F35-E1E0B2705A51}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DC97F667-4341-4764-8F35-E1E0B2705A51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DC97F667-4341-4764-8F35-E1E0B2705A51}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DC97F667-4341-4764-8F35-E1E0B2705A51}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DC97F667-4341-4764-8F35-E1E0B2705A51}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
index c50ddf774c0..1a8fac12b7c 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/CommandLineBuilder.cs
@@ -328,8 +328,13 @@ namespace Microsoft.Build.Utilities
}
}
}
-
- protected void AppendTextUnquoted (string textToAppend)
+
+#if NET_4_0
+ public
+#else
+ protected
+#endif
+ void AppendTextUnquoted (string textToAppend)
{
commandLine.Append (textToAppend);
}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/Logger.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/Logger.cs
index ac1153bbddc..075575e1aa1 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/Logger.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/Logger.cs
@@ -112,9 +112,9 @@ namespace Microsoft.Build.Utilities
}
[MonoTODO]
- public bool IsVerbosityAtLeast (LoggerVerbosity verbosity)
+ public bool IsVerbosityAtLeast (LoggerVerbosity checkVerbosity)
{
- return (this.verbosity >= verbosity) ? true : false;
+ return this.verbosity >= checkVerbosity;
}
}
}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskLoggingHelper.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskLoggingHelper.cs
index 11a9229539a..089d0a40c03 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskLoggingHelper.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/TaskLoggingHelper.cs
@@ -127,31 +127,31 @@ namespace Microsoft.Build.Utilities
hasLoggedErrors = true;
}
- public void LogErrorFromException (Exception e)
+ public void LogErrorFromException (Exception exception)
{
- LogErrorFromException (e, true);
+ LogErrorFromException (exception, true);
}
- public void LogErrorFromException (Exception e,
+ public void LogErrorFromException (Exception exception,
bool showStackTrace)
{
- LogErrorFromException (e, showStackTrace, true, String.Empty);
+ LogErrorFromException (exception, showStackTrace, true, String.Empty);
}
[MonoTODO ("Arguments @showDetail and @file are not honored")]
- public void LogErrorFromException (Exception e,
+ public void LogErrorFromException (Exception exception,
bool showStackTrace, bool showDetail, string file)
{
- if (e == null)
- throw new ArgumentNullException ("e");
+ if (exception == null)
+ throw new ArgumentNullException ("exception");
StringBuilder sb = new StringBuilder ();
- sb.Append (e.Message);
+ sb.Append (exception.Message);
if (showStackTrace == true)
- sb.Append (e.StackTrace);
+ sb.Append (exception.StackTrace);
BuildErrorEventArgs beea = new BuildErrorEventArgs (
null, null, buildEngine.ProjectFileOfTaskNode, 0, 0, 0, 0, sb.ToString (),
- e.HelpLink, e.Source);
+ exception.HelpLink, exception.Source);
buildEngine.LogErrorEvent (beea);
hasLoggedErrors = true;
}
@@ -239,16 +239,16 @@ namespace Microsoft.Build.Utilities
messageResourceName), messageArgs);
}
- public bool LogMessagesFromFile (string filename)
+ public bool LogMessagesFromFile (string fileName)
{
- return LogMessagesFromFile (filename, MessageImportance.Normal);
+ return LogMessagesFromFile (fileName, MessageImportance.Normal);
}
- public bool LogMessagesFromFile (string filename,
+ public bool LogMessagesFromFile (string fileName,
MessageImportance messageImportance)
{
try {
- StreamReader sr = new StreamReader (filename);
+ StreamReader sr = new StreamReader (fileName);
LogMessage (messageImportance, sr.ReadToEnd (),
null);
sr.Close ();
@@ -276,14 +276,14 @@ namespace Microsoft.Build.Utilities
}
public bool LogMessageFromText (string lineOfText,
- MessageImportance importance)
+ MessageImportance messageImportance)
{
if (lineOfText == null)
throw new ArgumentNullException ("lineOfText");
BuildMessageEventArgs bmea = new BuildMessageEventArgs (
lineOfText, helpKeywordPrefix,
- null, importance);
+ null, messageImportance);
buildEngine.LogMessageEvent (bmea);
return true;
@@ -313,18 +313,18 @@ namespace Microsoft.Build.Utilities
buildEngine.LogWarningEvent (bwea);
}
- public void LogWarningFromException (Exception e)
+ public void LogWarningFromException (Exception exception)
{
- LogWarningFromException (e, false);
+ LogWarningFromException (exception, false);
}
- public void LogWarningFromException (Exception e,
+ public void LogWarningFromException (Exception exception,
bool showStackTrace)
{
StringBuilder sb = new StringBuilder ();
- sb.Append (e.Message);
+ sb.Append (exception.Message);
if (showStackTrace)
- sb.Append (e.StackTrace);
+ sb.Append (exception.StackTrace);
LogWarning (null, null, null, null, 0, 0, 0, 0,
sb.ToString (), null);
}
diff --git a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
index 82b576272a2..ded4b425c6c 100644
--- a/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
+++ b/mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities/ToolTask.cs
@@ -233,10 +233,10 @@ namespace Microsoft.Build.Utilities
}
}
- protected virtual void LogEventsFromTextOutput (string singleLine, MessageImportance importance)
+ protected virtual void LogEventsFromTextOutput (string singleLine, MessageImportance messageImportance)
{
if (singleLine.Length == 0) {
- Log.LogMessage (singleLine, importance);
+ Log.LogMessage (singleLine, messageImportance);
return;
}
@@ -254,7 +254,7 @@ namespace Microsoft.Build.Utilities
var result = MSBuildErrorParser.TryParseLine (singleLine);
if (result == null) {
- Log.LogMessage (importance, singleLine);
+ Log.LogMessage (messageImportance, singleLine);
return;
}
@@ -304,7 +304,7 @@ namespace Microsoft.Build.Utilities
return String.Format ("@{0}", responseFilePath);
}
- protected virtual ProcessStartInfo GetProcessStartInfo (string pathToTool, string commandLineCommands, string responseFileSwitch)
+ protected ProcessStartInfo GetProcessStartInfo (string pathToTool, string commandLineCommands, string responseFileSwitch)
{
var pinfo = new ProcessStartInfo (pathToTool, String.Format ("{0} {1}", commandLineCommands, responseFileSwitch));
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs
index 5b13e202407..8791eee590f 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Construction/ProjectItemElement.cs
@@ -62,14 +62,28 @@ namespace Microsoft.Build.Construction
}
string @remove;
public string Remove { get { return @remove ?? String.Empty; } set { @remove = value; } }
- #if NET_4_5
string keepDuplicates;
- public string KeepDuplicates { get { return keepDuplicates ?? String.Empty; } set { keepDuplicates = value; } }
- string keepMetadata;
- public string KeepMetadata { get { return keepMetadata ?? String.Empty; } set { keepMetadata = value; } }
- string removeMetadata;
- public string RemoveMetadata { get { return removeMetadata ?? String.Empty; } set { removeMetadata = value; } }
+ string keepMetadata;
+ string removeMetadata;
+ #if NET_4_5
+ public
+ #else
+ internal
#endif
+ string KeepDuplicates { get { return keepDuplicates ?? String.Empty; } set { keepDuplicates = value; } }
+ #if NET_4_5
+ public
+ #else
+ internal
+ #endif
+ string KeepMetadata { get { return keepMetadata ?? String.Empty; } set { keepMetadata = value; } }
+ #if NET_4_5
+ public
+ #else
+ internal
+ #endif
+ string RemoveMetadata { get { return removeMetadata ?? String.Empty; } set { removeMetadata = value; } }
+
public ProjectMetadataElement AddMetadata (string name, string unevaluatedValue)
{
var metadata = ContainingProject.CreateMetadataElement (name, unevaluatedValue);
@@ -83,11 +97,9 @@ namespace Microsoft.Build.Construction
{
SaveAttribute (writer, "Include", Include);
SaveAttribute (writer, "Exclude", Exclude);
-#if NET_4_5
SaveAttribute (writer, "KeepDuplicates", KeepDuplicates);
SaveAttribute (writer, "KeepMetadata", KeepMetadata);
SaveAttribute (writer, "RemoveMetadata", RemoveMetadata);
-#endif
SaveAttribute (writer, "Remove", Remove);
base.SaveValue (writer);
}
@@ -101,7 +113,6 @@ namespace Microsoft.Build.Construction
case "Exclude":
Exclude = value;
break;
-#if NET_4_5
case "KeepDuplicates":
KeepDuplicates = value;
break;
@@ -111,7 +122,6 @@ namespace Microsoft.Build.Construction
case "RemoveMetadata":
RemoveMetadata = value;
break;
-#endif
case "Remove":
Remove = value;
break;
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/BuildManager.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/BuildManager.cs
index 0c179afa48e..ea1e146a0d8 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Execution/BuildManager.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Execution/BuildManager.cs
@@ -61,7 +61,6 @@ namespace Microsoft.Build.Execution
~BuildManager ()
{
// maybe processes created by out-of-process nodes should be signaled.
- BuildNodeManager.Stop ();
}
readonly List<BuildSubmission> submissions = new List<BuildSubmission> ();
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs
index 4dc8b32c94d..76f7f906e8b 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs
+++ b/mcs/class/Microsoft.Build/Microsoft.Build.Internal/BuildEngine4.cs
@@ -595,6 +595,10 @@ namespace Microsoft.Build.Internal
foreach (DictionaryEntry p in globalProperties)
globalPropertiesThatMakeSense [(string) p.Key] = (string) p.Value;
var projectToBuild = new ProjectInstance (ProjectRootElement.Create (XmlReader.Create (projectFileName)), globalPropertiesThatMakeSense, toolsVersion, Projects);
+ // Not very sure if ALL of these properties should be added, but some are certainly needed.
+ foreach (var p in this.project.Properties.Where (p => !globalProperties.Contains (p.Name)))
+ projectToBuild.SetProperty (p.Name, p.EvaluatedValue);
+
IDictionary<string,TargetResult> outs;
var ret = projectToBuild.Build (targetNames ?? new string [] {"Build"}, Projects.Loggers, out outs);
foreach (var p in outs)
diff --git a/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources b/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources
index 10ae513e22f..7b65749c86a 100644
--- a/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources
+++ b/mcs/class/Microsoft.Build/Microsoft.Build_test.dll.sources
@@ -15,6 +15,7 @@ Microsoft.Build.Execution/BuildSubmissionTest.cs
Microsoft.Build.Execution/ProjectInstanceTest.cs
Microsoft.Build.Execution/ProjectMetadataInstanceTest.cs
Microsoft.Build.Execution/ProjectTargetInstanceTest.cs
+Microsoft.Build.Execution/ProjectTaskInstanceTest.cs
Microsoft.Build.Internal/CollectionFromEnumerableTest.cs
Microsoft.Build.Internal/ExpressionParserTest.cs
Microsoft.Build.Logging/ConsoleLoggerTest.cs
diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs
index 2430ecce09e..970240fa74b 100644
--- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs
+++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectCollectionTest.cs
@@ -40,15 +40,13 @@ namespace MonoTests.Microsoft.Build.Evaluation
public class ProjectCollectionTest
{
[Test]
-#if NET_4_0
- // BXC #20961
- [Category ("NotWorking")]
-#endif
public void GlobalProperties ()
{
var g = ProjectCollection.GlobalProjectCollection;
Assert.AreEqual (0, g.GlobalProperties.Count, "#1");
+ #if NET_4_5
Assert.IsTrue (g.GlobalProperties.IsReadOnly, "#2");
+ #endif
}
[Test]
diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs
index f5f880a0b5f..f5de47d4a73 100644
--- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs
+++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Evaluation/ProjectTest.cs
@@ -143,12 +143,12 @@ namespace MonoTests.Microsoft.Build.Evaluation
[Test]
public void BuildCSharpTargetGetFrameworkPaths ()
{
- string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<Import Project='$(MSBuildToolsPath)\Microsoft.CSharp.targets' />
</Project>";
- var xml = XmlReader.Create (new StringReader (project_xml));
- var root = ProjectRootElement.Create (xml);
- var proj = new Project (root);
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
+ var proj = new Project (root);
root.FullPath = "ProjectTest.BuildCSharpTargetGetFrameworkPaths.proj";
Assert.IsTrue (proj.Build ("GetFrameworkPaths", new ILogger [] {/*new ConsoleLogger ()*/}));
}
@@ -156,14 +156,14 @@ namespace MonoTests.Microsoft.Build.Evaluation
[Test]
public void ProperiesMustBeDistinct ()
{
- string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup>
<AssemblyName>Foo</AssemblyName>
<OutputPath>Test</OutputPath>
</PropertyGroup>
</Project>";
- var xml = XmlReader.Create (new StringReader (project_xml));
- var root = ProjectRootElement.Create (xml);
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
root.FullPath = "ProjectTest.BuildCSharpTargetBuild.proj";
var proj = new Project (root);
var list = new List<ProjectProperty> ();
@@ -173,20 +173,16 @@ namespace MonoTests.Microsoft.Build.Evaluation
}
[Test]
-#if NET_4_0
- // BXC #20961
- [Category ("NotWorking")]
-#endif
public void BuildCSharpTargetBuild ()
{
- string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup>
<AssemblyName>Foo</AssemblyName>
</PropertyGroup>
<Import Project='$(MSBuildToolsPath)\Microsoft.CSharp.targets' />
</Project>";
- var xml = XmlReader.Create (new StringReader (project_xml));
- var root = ProjectRootElement.Create (xml);
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
root.FullPath = "ProjectTest.BuildCSharpTargetBuild.proj";
var proj = new Project (root, null, "4.0");
Assert.IsFalse (proj.Build ("Build", new ILogger [] {/*new ConsoleLogger (LoggerVerbosity.Diagnostic)*/})); // missing mandatory properties
@@ -195,7 +191,7 @@ namespace MonoTests.Microsoft.Build.Evaluation
[Test]
public void EvaluateItemConditionThenIgnored ()
{
- string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup>
<P></P>
</PropertyGroup>
@@ -218,7 +214,7 @@ namespace MonoTests.Microsoft.Build.Evaluation
public void EvaluateSamePropertiesInOrder ()
{
// used in Microsoft.Common.targets
- string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup>
<BaseIntermediateOutputPath Condition=""'$(BaseIntermediateOutputPath)' == ''"">obj\</BaseIntermediateOutputPath>
</PropertyGroup>
@@ -258,52 +254,44 @@ namespace MonoTests.Microsoft.Build.Evaluation
}
[Test]
-#if NET_4_0
- // BXC #20961
- [Category ("NotWorking")]
-#endif
public void CreateProjectInstance ()
{
- string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup>
<AssemblyName>Foo</AssemblyName>
</PropertyGroup>
<Import Project='$(MSBuildToolsPath)\Microsoft.CSharp.targets' />
</Project>";
- var xml = XmlReader.Create (new StringReader (project_xml));
- var root = ProjectRootElement.Create (xml);
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
var proj = new Project (root, null, "4.0");
var inst = proj.CreateProjectInstance ();
Assert.AreEqual ("4.0", inst.ToolsVersion, "#1");
}
[Test]
-#if NET_4_0
- // BXC #20961
- [Category ("NotWorking")]
-#endif
public void LoadCaseInsensitive ()
{
- string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<PropertyGroup>
<AssemblyName>Foo</AssemblyName>
</PropertyGroup>
<Import Project='$(MSBuildToolsPath)\Microsoft.CSharp.Targets' />
</Project>";
- var xml = XmlReader.Create (new StringReader (project_xml));
- var root = ProjectRootElement.Create (xml);
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
new Project (root, null, "4.0");
}
[Test]
public void SameNameTargets ()
{
- string project_xml = @"<Project DefaultTargets='Foo' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ string project_xml = @"<Project DefaultTargets='Foo' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
<Target Name='Foo'><Message Text='This should not be written' /></Target>
<Target Name='Foo'><Message Text='This will be written' /></Target>
</Project>";
- var xml = XmlReader.Create (new StringReader (project_xml));
- var root = ProjectRootElement.Create (xml);
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
var proj = new Project (root, null, "4.0");
var sw = new StringWriter ();
proj.Build (new ConsoleLogger (LoggerVerbosity.Diagnostic, sw.WriteLine, null, null));
@@ -338,4 +326,3 @@ namespace MonoTests.Microsoft.Build.Evaluation
}
}
}
-
diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs
index 30524ffd278..4e23c2a7a5a 100644
--- a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs
+++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectInstanceTest.cs
@@ -311,6 +311,34 @@ namespace MonoTests.Microsoft.Build.Execution
}
[Test]
+ public void ItemsAndPostEvaluationCondition ()
+ {
+ // target-assigned property X is not considered when evaluating condition for C.
+ string project_xml = @"<Project DefaultTargets='X;Y' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <ItemGroup>
+ <A Include='foo.txt' />
+ <B Condition='False' Include='bar.txt' />
+ <C Condition=""'$(X)'=='True'"" Include='baz.txt' />
+ </ItemGroup>
+ <Target Name='X'>
+ <CreateProperty Value='True'>
+ <Output TaskParameter='Value' PropertyName='X' />
+ </CreateProperty>
+ </Target>
+ <Target Name='Y'>
+ <Error Condition=""'@(C)'==''"" Text='missing C. X is $(X)' />
+ </Target>
+</Project>";
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
+ root.FullPath = "ProjectInstanceTest.ItemsAndPostEvaluationCondition.proj";
+ var proj = new ProjectInstance (root);
+ Assert.AreEqual (1, proj.Items.Count, "Count1");
+ Assert.IsFalse (proj.Build (), "Build");
+ Assert.AreEqual (1, proj.Items.Count, "Count2");
+ }
+
+ [Test]
[Category ("NotWorking")] // until we figure out why it fails on wrench.
public void ItemsInTargets ()
{
@@ -341,6 +369,33 @@ namespace MonoTests.Microsoft.Build.Execution
Assert.IsTrue (items.Any (), "items.Any");
Assert.IsTrue (!string.IsNullOrEmpty (items.First ().EvaluatedInclude), "item.EvaluatedInclude");
}
+
+ [Test]
+ [Category ("NotWorking")]
+ public void ConditionalCyclicDependence ()
+ {
+ string project_xml = @"<Project DefaultTargets='Build' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <PropertyGroup>
+ <C>False</C>
+ </PropertyGroup>
+ <Target Name='Build' DependsOnTargets='ResolveReferences' />
+ <Target Name='Build2' DependsOnTargets='Bar' />
+ <Target Name='ResolveReferences' DependsOnTargets='Foo;Bar' />
+ <Target Name='Foo'>
+ <CreateProperty Value='True'>
+ <Output TaskParameter='Value' PropertyName='C' />
+ </CreateProperty>
+ </Target>
+ <Target Name='Bar' Condition='!($(C))' DependsOnTargets='ResolveReferences'>
+ </Target>
+</Project>";
+ var xml = XmlReader.Create (new StringReader (project_xml));
+ var root = ProjectRootElement.Create (xml);
+ root.FullPath = "ProjectInstanceTest.ConditionalCyclicDependence.proj";
+ var proj = new ProjectInstance (root, null, "4.0", ProjectCollection.GlobalProjectCollection);
+ Assert.IsTrue (proj.Build (), "#1");
+ Assert.IsFalse (proj.Build ("Build2", new ILogger [0]), "#2");
+ }
}
namespace SubNamespace
diff --git a/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectTaskInstanceTest.cs b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectTaskInstanceTest.cs
new file mode 100644
index 00000000000..c94bef7d695
--- /dev/null
+++ b/mcs/class/Microsoft.Build/Test/Microsoft.Build.Execution/ProjectTaskInstanceTest.cs
@@ -0,0 +1,84 @@
+//
+// ProjectInstanceTest.cs
+//
+// Author:
+// Atsushi Enomoto (atsushi@xamarin.com)
+//
+// Copyright (C) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+using System;
+using System.IO;
+using System.Linq;
+using System.Xml;
+using Microsoft.Build.Construction;
+using Microsoft.Build.Execution;
+using NUnit.Framework;
+using Microsoft.Build.Evaluation;
+using Microsoft.Build.Utilities;
+using Microsoft.Build.Framework;
+using Microsoft.Build.Logging;
+
+namespace MonoTests.Microsoft.Build.Execution
+{
+ [TestFixture]
+ public class ProjectTaskInstanceTest
+ {
+#if NET_4_5
+ [Test]
+ public void OutputPropertyExists ()
+ {
+ string project_xml = @"
+<Project DefaultTargets='Build' xmlns='http://schemas.microsoft.com/developer/msbuild/2003'>
+ <PropertyGroup>
+ <C>False</C>
+ </PropertyGroup>
+ <Target Name='Build' DependsOnTargets='ResolveReferences' />
+ <Target Name='Build2' DependsOnTargets='Bar' />
+ <Target Name='ResolveReferences' DependsOnTargets='Foo;Bar' />
+ <Target Name='Foo'>
+ <CreateProperty Value='True'>
+ <Output TaskParameter='Value' PropertyName='C' />
+ </CreateProperty>
+ </Target>
+ <Target Name='Bar' Condition='!($(C))' DependsOnTargets='ResolveReferences'>
+ </Target>
+</Project>";
+ var xml = XmlReader.Create (new StringReader(project_xml));
+ var root = ProjectRootElement.Create (xml);
+ var proj = new ProjectInstance (root);
+ Assert.AreEqual (5, proj.Targets.Count, "#1");
+ var foo = proj.Targets ["Foo"];
+ Assert.IsNotNull (foo, "#2");
+ Assert.AreEqual (1, foo.Tasks.Count, "#3");
+ var cp = foo.Tasks.First ();
+ Assert.AreEqual (1, cp.Outputs.Count, "#4");
+ var po = cp.Outputs.First () as ProjectTaskOutputPropertyInstance;
+ Assert.IsNotNull (po, "#5");
+ Assert.AreEqual ("C", po.PropertyName, "#5");
+ proj.Build ("Build", null);
+ Assert.AreEqual (string.Empty, foo.Outputs, "#6");
+ Assert.AreEqual ("True", proj.GetPropertyValue ("C"), "#7");
+ }
+#endif
+ }
+}
+
diff --git a/mcs/class/Mono.CSharp/Mono.CSharp.csproj b/mcs/class/Mono.CSharp/Mono.CSharp.csproj
index 2916ff33f87..e4b905a79d6 100755..100644
--- a/mcs/class/Mono.CSharp/Mono.CSharp.csproj
+++ b/mcs/class/Mono.CSharp/Mono.CSharp.csproj
@@ -3,14 +3,14 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{817CE046-07E8-409D-84BF-A6EA4F2879DE}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Mono.CSharp</RootNamespace>
<AssemblyName>Mono.CSharp</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -54,24 +54,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.XML" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="..\..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolFile.cs">
- <Link>MonoSymbolFile.cs</Link>
- </Compile>
- <Compile Include="..\..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolTable.cs">
- <Link>MonoSymbolTable.cs</Link>
- </Compile>
- <Compile Include="..\..\class\Mono.CompilerServices.SymbolWriter\MonoSymbolWriter.cs">
- <Link>MonoSymbolWriter.cs</Link>
- </Compile>
- <Compile Include="..\..\class\Mono.CompilerServices.SymbolWriter\SourceMethodBuilder.cs">
- <Link>SourceMethodBuilder.cs</Link>
- </Compile>
<Compile Include="..\..\mcs\anonymous.cs">
<Link>anonymous.cs</Link>
</Compile>
@@ -232,6 +218,18 @@
<Link>CryptoConvert.cs</Link>
</Compile>
<Compile Include="cs-parser.cs" />
+ <Compile Include="..\Mono.CompilerServices.SymbolWriter\MonoSymbolFile.cs">
+ <Link>MonoSymbolFile.cs</Link>
+ </Compile>
+ <Compile Include="..\Mono.CompilerServices.SymbolWriter\MonoSymbolTable.cs">
+ <Link>MonoSymbolTable.cs</Link>
+ </Compile>
+ <Compile Include="..\Mono.CompilerServices.SymbolWriter\MonoSymbolWriter.cs">
+ <Link>MonoSymbolWriter.cs</Link>
+ </Compile>
+ <Compile Include="..\Mono.CompilerServices.SymbolWriter\SourceMethodBuilder.cs">
+ <Link>SourceMethodBuilder.cs</Link>
+ </Compile>
</ItemGroup>
<ItemGroup>
<Folder Include="Properties\" />
diff --git a/mcs/class/Mono.CSharp/Mono.CSharp.sln b/mcs/class/Mono.CSharp/Mono.CSharp.sln
deleted file mode 100755
index f978bf48a4a..00000000000
--- a/mcs/class/Mono.CSharp/Mono.CSharp.sln
+++ /dev/null
@@ -1,45 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.CSharp", "Mono.CSharp.csproj", "{817CE046-07E8-409D-84BF-A6EA4F2879DE}"
- ProjectSection(ProjectDependencies) = postProject
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537} = {5D485D32-3B9F-4287-AB24-C8DA5B89F537}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jay2010", "..\..\jay\jay2010.vcxproj", "{5D485D32-3B9F-4287-AB24-C8DA5B89F537}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|Win32 = Debug|Win32
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Win32.ActiveCfg = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Any CPU.Build.0 = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Win32.ActiveCfg = Release|Any CPU
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|Any CPU.ActiveCfg = Debug|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|Mixed Platforms.Build.0 = Debug|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|Win32.ActiveCfg = Debug|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug|Win32.Build.0 = Debug|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|Any CPU.ActiveCfg = Release|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|Mixed Platforms.ActiveCfg = Release|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|Mixed Platforms.Build.0 = Release|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|Win32.ActiveCfg = Release|Win32
- {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.csproj b/mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.csproj
deleted file mode 100644
index c4959991c3a..00000000000
--- a/mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.csproj
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{4FCB063A-0731-4286-843F-7B85910C30D5}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Mono.CSharp.Tests</RootNamespace>
- <AssemblyName>Mono.CSharp.Tests</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <TargetFrameworkProfile>
- </TargetFrameworkProfile>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
- <PlatformTarget>x86</PlatformTarget>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
- <PlatformTarget>x86</PlatformTarget>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup>
- <StartupObject />
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.5.9.10348, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AssertReportPrinter.cs" />
- <Compile Include="Evaluator\BuildinCommands.cs" />
- <Compile Include="Evaluator\CompletionTest.cs" />
- <Compile Include="Evaluator\EvaluatorFixture.cs" />
- <Compile Include="Evaluator\EvaluatorTest.cs" />
- <Compile Include="Evaluator\ExpressionsTest.cs" />
- <Compile Include="Evaluator\TypesTest.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Mono.CSharp.csproj">
- <Project>{817CE046-07E8-409D-84BF-A6EA4F2879DE}</Project>
- <Name>Mono.CSharp</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.sln b/mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.sln
deleted file mode 100644
index 142be09840d..00000000000
--- a/mcs/class/Mono.CSharp/Test/Mono.CSharp.Tests.sln
+++ /dev/null
@@ -1,42 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.CSharp.Tests", "Mono.CSharp.Tests.csproj", "{4FCB063A-0731-4286-843F-7B85910C30D5}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.CSharp", "..\Mono.CSharp.csproj", "{817CE046-07E8-409D-84BF-A6EA4F2879DE}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|Mixed Platforms = Debug|Mixed Platforms
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|Mixed Platforms = Release|Mixed Platforms
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Debug|Any CPU.ActiveCfg = Debug|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Debug|x86.ActiveCfg = Debug|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Debug|x86.Build.0 = Debug|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Release|Any CPU.ActiveCfg = Release|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Release|Mixed Platforms.Build.0 = Release|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Release|x86.ActiveCfg = Release|x86
- {4FCB063A-0731-4286-843F-7B85910C30D5}.Release|x86.Build.0 = Release|x86
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Debug|x86.ActiveCfg = Debug|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Any CPU.Build.0 = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {817CE046-07E8-409D-84BF-A6EA4F2879DE}.Release|x86.ActiveCfg = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter.csproj b/mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter.csproj
deleted file mode 100644
index 7b22c39ca8c..00000000000
--- a/mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter.csproj
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'basic|AnyCPU' ">
- <DefineConstants>BOOTSTRAP_BASIC,NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System.dll"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj b/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj
deleted file mode 100644
index 4229252c476..00000000000
--- a/mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite.csproj
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Default.targets"/>
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0,SQLITE_STANDARD</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- <Reference Include="System.Data"/>
- <Reference Include="System.Xml"/>
- <Reference Include="System.Transactions"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.csproj b/mcs/class/Mono.Data.Tds/Mono.Data.Tds.csproj
deleted file mode 100644
index 256f63ab115..00000000000
--- a/mcs/class/Mono.Data.Tds/Mono.Data.Tds.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- <Reference Include="System.Xml"/>
- <Reference Include="Mono.Security">
- <HintPath>..\lib\net_2_0\Mono.Security.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Mono.Data.Tds/Test/bug-4786.cs b/mcs/class/Mono.Data.Tds/Test/bug-4786.cs
index e8436a7deca..91f8a06fc1a 100644
--- a/mcs/class/Mono.Data.Tds/Test/bug-4786.cs
+++ b/mcs/class/Mono.Data.Tds/Test/bug-4786.cs
@@ -27,11 +27,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-namespace bug4786test
+namespace MonoTests.Mono.Data.Tds
{
using NUnit.Framework;
- using Mono.Data.Tds.Protocol;
+ using global::Mono.Data.Tds.Protocol;
using System;
using System.Net;
using System.Net.Sockets;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index 29e782c7f14..14bf701f46f 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -157,7 +157,9 @@ namespace Mono.Debugger.Soft
enum InvokeFlags {
NONE = 0x0,
DISABLE_BREAKPOINTS = 0x1,
- SINGLE_THREADED = 0x2
+ SINGLE_THREADED = 0x2,
+ OUT_THIS = 0x4,
+ OUT_ARGS = 0x8,
}
enum ElementType {
@@ -414,7 +416,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 34;
+ internal const int MINOR_VERSION = 35;
enum WPSuspendPolicy {
NONE = 0,
@@ -1667,24 +1669,39 @@ namespace Mono.Debugger.Soft
}
}
- internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ErrorCode error, object state);
+ internal delegate void InvokeMethodCallback (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state);
+
+ void read_invoke_res (PacketReader r, out ValueImpl v, out ValueImpl exc, out ValueImpl out_this, out ValueImpl[] out_args) {
+ int resflags = r.ReadByte ();
+ v = null;
+ exc = null;
+ out_this = null;
+ out_args = null;
+ if (resflags == 0) {
+ exc = r.ReadValue ();
+ } else {
+ v = r.ReadValue ();
+ if ((resflags & 2) != 0)
+ out_this = r.ReadValue ();
+ if ((resflags & 4) != 0) {
+ int nargs = r.ReadInt ();
+ out_args = new ValueImpl [nargs];
+ for (int i = 0; i < nargs; ++i)
+ out_args [i] = r.ReadValue ();
+ }
+ }
+ }
internal int VM_BeginInvokeMethod (long thread, long method, ValueImpl this_arg, ValueImpl[] arguments, InvokeFlags flags, InvokeMethodCallback callback, object state) {
return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHOD, new PacketWriter ().WriteId (thread).WriteInt ((int)flags).WriteId (method).WriteValue (this_arg).WriteInt (arguments.Length).WriteValues (arguments), delegate (PacketReader r) {
- ValueImpl v, exc;
+ ValueImpl v, exc, out_this = null;
+ ValueImpl[] out_args = null;
if (r.ErrorCode != 0) {
- callback (null, null, (ErrorCode)r.ErrorCode, state);
+ callback (null, null, null, null, (ErrorCode)r.ErrorCode, state);
} else {
- if (r.ReadByte () == 0) {
- exc = r.ReadValue ();
- v = null;
- } else {
- v = r.ReadValue ();
- exc = null;
- }
-
- callback (v, exc, 0, state);
+ read_invoke_res (r, out v, out exc, out out_this, out out_args);
+ callback (v, exc, out_this, out_args, 0, state);
}
}, 1);
}
@@ -1702,20 +1719,14 @@ namespace Mono.Debugger.Soft
w.WriteValues (arguments [i]);
}
return Send (CommandSet.VM, (int)CmdVM.INVOKE_METHODS, w, delegate (PacketReader r) {
- ValueImpl v, exc;
+ ValueImpl v, exc, out_this = null;
+ ValueImpl[] out_args = null;
if (r.ErrorCode != 0) {
- callback (null, null, (ErrorCode)r.ErrorCode, state);
+ callback (null, null, null, null, (ErrorCode)r.ErrorCode, state);
} else {
- if (r.ReadByte () == 0) {
- exc = r.ReadValue ();
- v = null;
- } else {
- v = r.ReadValue ();
- exc = null;
- }
-
- callback (v, exc, 0, state);
+ read_invoke_res (r, out v, out exc, out out_this, out out_args);
+ callback (v, exc, out_this, out_args, 0, state);
}
}, methods.Length);
}
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
index bc064795083..5ca987ec694 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/InvokeOptions.cs
@@ -13,6 +13,15 @@ namespace Mono.Debugger.Soft
/*
* Only resume the target thread during the invoke
*/
- SingleThreaded = 2
+ SingleThreaded = 2,
+ /*
+ * Return the changed receiver when invoking
+ * a valuetype method.
+ */
+ ReturnOutThis = 4,
+ /*
+ * Return the values of out arguments
+ */
+ ReturnOutArgs = 8
}
}
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
index 030fa3e3e4a..d83e3a1a481 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/ObjectMirror.cs
@@ -8,6 +8,22 @@ using System.Threading.Tasks;
namespace Mono.Debugger.Soft
{
+ public class InvokeResult {
+ public Value Result { get; set; }
+ //
+ // The value of the receiver after the call for calls to valuetype methods or null.
+ // Only set when using the InvokeOptions.ReturnOutThis flag.
+ // Since protocol version 2.35
+ //
+ public Value OutThis { get; set; }
+ //
+ // The value of the arguments after the call
+ // Only set when using the InvokeOptions.ReturnOutArgs flag.
+ // Since protocol version 2.35
+ //
+ public Value[] OutArgs { get; set; }
+ }
+
public class ObjectMirror : Value {
TypeMirror type;
AppDomainMirror domain;
@@ -149,6 +165,10 @@ namespace Mono.Debugger.Soft
return EndInvokeMethodInternal (asyncResult);
}
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ }
+
#if NET_4_5
public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<Value> ();
@@ -164,6 +184,21 @@ namespace Mono.Debugger.Soft
}, null);
return tcs.Task;
}
+
+ public Task<InvokeResult> InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
+ var tcs = new TaskCompletionSource<InvokeResult> ();
+ BeginInvokeMethod (thread, method, arguments, options, iar =>
+ {
+ try {
+ tcs.SetResult (EndInvokeMethodInternalWithResult (iar));
+ } catch (OperationCanceledException) {
+ tcs.TrySetCanceled ();
+ } catch (Exception ex) {
+ tcs.TrySetException (ex);
+ }
+ }, null);
+ return tcs.Task;
+ }
#endif
//
@@ -223,6 +258,14 @@ namespace Mono.Debugger.Soft
get; set;
}
+ public ValueImpl OutThis {
+ get; set;
+ }
+
+ public ValueImpl[] OutArgs {
+ get; set;
+ }
+
public ValueImpl Exception {
get; set;
}
@@ -260,6 +303,10 @@ namespace Mono.Debugger.Soft
f |= InvokeFlags.DISABLE_BREAKPOINTS;
if ((options & InvokeOptions.SingleThreaded) != 0)
f |= InvokeFlags.SINGLE_THREADED;
+ if ((options & InvokeOptions.ReturnOutThis) != 0)
+ f |= InvokeFlags.OUT_THIS;
+ if ((options & InvokeOptions.ReturnOutArgs) != 0)
+ f |= InvokeFlags.OUT_ARGS;
InvokeAsyncResult r = new InvokeAsyncResult { AsyncState = state, AsyncWaitHandle = new ManualResetEvent (false), VM = vm, Thread = thread, Callback = callback };
thread.InvalidateFrames ();
@@ -269,7 +316,7 @@ namespace Mono.Debugger.Soft
}
// This is called when the result of an invoke is received
- static void InvokeCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) {
+ static void InvokeCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) {
InvokeAsyncResult r = (InvokeAsyncResult)state;
if (error != 0) {
@@ -279,6 +326,9 @@ namespace Mono.Debugger.Soft
r.Exception = exc;
}
+ r.OutThis = out_this;
+ r.OutArgs = out_args;
+
r.IsCompleted = true;
((ManualResetEvent)r.AsyncWaitHandle).Set ();
@@ -286,7 +336,7 @@ namespace Mono.Debugger.Soft
r.Callback.BeginInvoke (r, null, null);
}
- internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) {
+ internal static InvokeResult EndInvokeMethodInternalWithResult (IAsyncResult asyncResult) {
if (asyncResult == null)
throw new ArgumentNullException ("asyncResult");
@@ -309,10 +359,22 @@ namespace Mono.Debugger.Soft
if (r.Exception != null)
throw new InvocationException ((ObjectMirror)r.VM.DecodeValue (r.Exception));
- return r.VM.DecodeValue (r.Value);
+ Value out_this = null;
+ if (r.OutThis != null)
+ out_this = r.VM.DecodeValue (r.OutThis);
+ Value[] out_args = null;
+ if (r.OutArgs != null)
+ out_args = r.VM.DecodeValues (r.OutArgs);
+
+ return new InvokeResult () { Result = r.VM.DecodeValue (r.Value), OutThis = out_this, OutArgs = out_args };
}
}
+ internal static Value EndInvokeMethodInternal (IAsyncResult asyncResult) {
+ InvokeResult res = EndInvokeMethodInternalWithResult (asyncResult);
+ return res.Result;
+ }
+
internal static void EndInvokeMultipleInternal (IAsyncResult asyncResult) {
if (asyncResult == null)
throw new ArgumentNullException ("asyncResult");
@@ -377,7 +439,7 @@ namespace Mono.Debugger.Soft
}
// This is called when the result of an invoke is received
- static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ErrorCode error, object state) {
+ static void InvokeMultipleCB (ValueImpl v, ValueImpl exc, ValueImpl out_this, ValueImpl[] out_args, ErrorCode error, object state) {
var r = (InvokeAsyncResult)state;
Interlocked.Decrement (ref r.NumPending);
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
index 2e9c806f8bb..2ba50c84d4c 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PrimitiveValue.cs
@@ -55,5 +55,9 @@ namespace Mono.Debugger.Soft
public Value EndInvokeMethod (IAsyncResult asyncResult) {
return ObjectMirror.EndInvokeMethodInternal (asyncResult);
}
+
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ }
}
} \ No newline at end of file
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
index b6e43eb4e23..1aa1a4ef5ee 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/StructMirror.cs
@@ -1,5 +1,8 @@
using System;
using System.Collections.Generic;
+#if NET_4_5
+using System.Threading.Tasks;
+#endif
namespace Mono.Debugger.Soft
{
@@ -83,7 +86,53 @@ namespace Mono.Debugger.Soft
}
public Value EndInvokeMethod (IAsyncResult asyncResult) {
- return ObjectMirror.EndInvokeMethodInternal (asyncResult);
+ var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ var outThis = result.OutThis as StructMirror;
+ if (outThis != null) {
+ SetFields (outThis.Fields);
+ }
+ return result.Result;
+ }
+
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ var result = ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ var outThis = result.OutThis as StructMirror;
+ if (outThis != null) {
+ SetFields (outThis.Fields);
+ }
+ return result;
+ }
+
+#if NET_4_5
+ public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
+ var tcs = new TaskCompletionSource<Value> ();
+ BeginInvokeMethod (thread, method, arguments, options, iar =>
+ {
+ try {
+ tcs.SetResult (EndInvokeMethod (iar));
+ } catch (OperationCanceledException) {
+ tcs.TrySetCanceled ();
+ } catch (Exception ex) {
+ tcs.TrySetException (ex);
+ }
+ }, null);
+ return tcs.Task;
+ }
+
+ public Task<InvokeResult> InvokeMethodAsyncWithResult (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
+ var tcs = new TaskCompletionSource<InvokeResult> ();
+ BeginInvokeMethod (thread, method, arguments, options, iar =>
+ {
+ try {
+ tcs.SetResult (ObjectMirror.EndInvokeMethodInternalWithResult (iar));
+ } catch (OperationCanceledException) {
+ tcs.TrySetCanceled ();
+ } catch (Exception ex) {
+ tcs.TrySetException (ex);
+ }
+ }, null);
+ return tcs.Task;
}
+#endif
}
}
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
index 437689163ec..3970f2a5768 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/TypeMirror.cs
@@ -806,6 +806,10 @@ namespace Mono.Debugger.Soft
return ObjectMirror.EndInvokeMethodInternal (asyncResult);
}
+ public InvokeResult EndInvokeMethodWithResult (IAsyncResult asyncResult) {
+ return ObjectMirror.EndInvokeMethodInternalWithResult (asyncResult);
+ }
+
#if NET_4_5
public Task<Value> InvokeMethodAsync (ThreadMirror thread, MethodMirror method, IList<Value> arguments, InvokeOptions options = InvokeOptions.None) {
var tcs = new TaskCompletionSource<Value> ();
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
index a057455538d..3c9b2877c21 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
@@ -81,6 +81,7 @@ public struct AStruct {
public string s;
public byte k;
public IntPtr j;
+ public int l;
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public int foo (int val) {
@@ -106,6 +107,11 @@ public struct AStruct {
public IntPtr invoke_return_intptr () {
return j;
}
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public void invoke_mutate () {
+ l = 5;
+ }
}
public class GClass<T> {
@@ -953,6 +959,11 @@ public class Tests : TestsBase, ITest2
return 42;
}
+ public void invoke_out (out int foo, out int[] arr) {
+ foo = 5;
+ arr = new int [10];
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void exceptions () {
try {
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
index 9d6e5c41271..9a671202a82 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs
@@ -2110,6 +2110,21 @@ 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);
+ var out_args = out_task.Result.OutArgs;
+ AssertValue (5, out_args [0]);
+ Assert.IsTrue (out_args [1] is ArrayMirror);
+ Assert.AreEqual (10, (out_args [1] as ArrayMirror).Length);
+
+ // without ReturnOutArgs flag
+ 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");
v = t.InvokeMethod (e.Thread, m, null);
@@ -2212,6 +2227,24 @@ public class DebuggerTests
m = t.GetMethod ("invoke_return_int");
v = s.InvokeMethod (e.Thread, m, null);
AssertValue (42, v);
+
+#if NET_4_5
+ // Invoke a method which changes state
+ s = frame.GetArgument (1) as StructMirror;
+ t = s.Type;
+ m = t.GetMethod ("invoke_mutate");
+ var task = s.InvokeMethodAsyncWithResult (e.Thread, m, null, InvokeOptions.ReturnOutThis);
+ var out_this = task.Result.OutThis as StructMirror;
+ AssertValue (5, out_this ["l"]);
+
+ // Without the ReturnOutThis flag
+ s = frame.GetArgument (1) as StructMirror;
+ t = s.Type;
+ m = t.GetMethod ("invoke_mutate");
+ task = s.InvokeMethodAsyncWithResult (e.Thread, m, null);
+ out_this = task.Result.OutThis as StructMirror;
+ Assert.AreEqual (null, out_this);
+#endif
}
[Test]
diff --git a/mcs/class/Mono.Options/Test/Mono.Options/OptionContextTest.cs b/mcs/class/Mono.Options/Test/Mono.Options/OptionContextTest.cs
index 8eb61b2c93b..ec3fb02270f 100644
--- a/mcs/class/Mono.Options/Test/Mono.Options/OptionContextTest.cs
+++ b/mcs/class/Mono.Options/Test/Mono.Options/OptionContextTest.cs
@@ -39,7 +39,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
-namespace Tests.Mono.Options
+namespace MonoTests.Mono.Options
#endif
{
[TestFixture]
diff --git a/mcs/class/Mono.Options/Test/Mono.Options/OptionSetTest.cs b/mcs/class/Mono.Options/Test/Mono.Options/OptionSetTest.cs
index 086c6d9c8c2..688297a0f68 100644
--- a/mcs/class/Mono.Options/Test/Mono.Options/OptionSetTest.cs
+++ b/mcs/class/Mono.Options/Test/Mono.Options/OptionSetTest.cs
@@ -46,7 +46,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
-namespace Tests.Mono.Options
+namespace MonoTests.Mono.Options
#endif
{
class FooConverter : TypeConverter {
diff --git a/mcs/class/Mono.Options/Test/Mono.Options/OptionTest.cs b/mcs/class/Mono.Options/Test/Mono.Options/OptionTest.cs
index 5242609162a..fad1b484784 100644
--- a/mcs/class/Mono.Options/Test/Mono.Options/OptionTest.cs
+++ b/mcs/class/Mono.Options/Test/Mono.Options/OptionTest.cs
@@ -39,7 +39,7 @@ using NUnit.Framework;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
-namespace Tests.Mono.Options
+namespace MonoTests.Mono.Options
#endif
{
class DefaultOption : Option {
diff --git a/mcs/class/Mono.Options/Test/Mono.Options/Utils.cs b/mcs/class/Mono.Options/Test/Mono.Options/Utils.cs
index e5439aae4c3..074478e3e21 100644
--- a/mcs/class/Mono.Options/Test/Mono.Options/Utils.cs
+++ b/mcs/class/Mono.Options/Test/Mono.Options/Utils.cs
@@ -31,7 +31,7 @@ using System;
#if NDESK_OPTIONS
namespace Tests.NDesk.Options
#else
-namespace Tests.Mono.Options
+namespace MonoTests.Mono.Options
#endif
{
static class Utils {
diff --git a/mcs/class/Mono.Posix/Mono.Posix.csproj b/mcs/class/Mono.Posix/Mono.Posix.csproj
deleted file mode 100644
index 43eebdcf3fd..00000000000
--- a/mcs/class/Mono.Posix/Mono.Posix.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoWarn>0618,612</NoWarn>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System.dll"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs b/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs
index 3fae43a4926..38b1dea8de9 100644
--- a/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Cryptography/DiffieHellmanManaged.cs
@@ -156,9 +156,9 @@ namespace Mono.Security.Cryptography {
// clear keys
protected override void Dispose(bool disposing) {
if (!m_Disposed) {
- m_P.Clear();
- m_G.Clear();
- m_X.Clear();
+ if (m_P != null) m_P.Clear();
+ if (m_G != null) m_G.Clear();
+ if (m_X != null) m_X.Clear();
}
m_Disposed = true;
}
diff --git a/mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs b/mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs
index 9c406a200c7..5d798ac5d22 100644
--- a/mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs
@@ -303,6 +303,10 @@ namespace Mono.Security.Cryptography {
e = new BigInteger (parameters.Exponent);
n = new BigInteger (parameters.Modulus);
+
+ //reset all private key values to null
+ d = dp = dq = qInv = p = q = null;
+
// only if the private key is present
if (parameters.D != null)
d = new BigInteger (parameters.D);
diff --git a/mcs/class/Mono.Security/Mono.Security.csproj b/mcs/class/Mono.Security/Mono.Security.csproj
deleted file mode 100644
index 77cb6d1e5ad..00000000000
--- a/mcs/class/Mono.Security/Mono.Security.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'basic|AnyCPU' ">
- <DefineConstants>BOOTSTRAP_BASIC,NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System.dll"/>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs b/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
index 10b8a12339d..5b30c72f2e4 100644
--- a/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
+++ b/mcs/class/Mono.Security/Test/Mono.Security.Cryptography/RSAManagedTest.cs
@@ -545,5 +545,25 @@ namespace MonoTests.Mono.Security.Cryptography {
byte [] bytes = Convert.FromBase64String (b64);
rsa.DecryptValue (bytes);
}
+
+ [Test]
+ public void Bug18482 ()
+ {
+ RSAManaged privateRsa = new RSAManaged ();
+ privateRsa.FromXmlString (MonoXml384);
+
+ var rsaParameters = privateRsa.ExportParameters (false);
+
+ RSAManaged publicRsa = new RSAManaged ();
+
+ //Generates a key pair with private key values
+ publicRsa.ExportParameters (false);
+
+ //Sets public key values and should reset private key values
+ publicRsa.ImportParameters (rsaParameters);
+
+ //Should export valid parameters without throwing an exception.
+ publicRsa.ExportParameters (false);
+ }
}
}
diff --git a/mcs/class/Mono.WebBrowser/Makefile b/mcs/class/Mono.WebBrowser/Makefile
index 98d0800038e..af65ef0faa7 100644
--- a/mcs/class/Mono.WebBrowser/Makefile
+++ b/mcs/class/Mono.WebBrowser/Makefile
@@ -7,11 +7,7 @@ LIB_MCS_FLAGS = -r:System.dll -warn:1
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
-EXTRA_DISTFILES = README build-csproj2k5
-
-Mono.WebBrowser2K5.csproj: Mono.WebBrowser.dll.sources build-csproj2k5
- ./build-csproj2k5
+EXTRA_DISTFILES = README
include ../../build/library.make
-$(the_lib): Mono.WebBrowser2K5.csproj
diff --git a/mcs/class/Mono.WebBrowser/Mono.WebBrowser.csproj b/mcs/class/Mono.WebBrowser/Mono.WebBrowser.csproj
deleted file mode 100644
index 82b2cf6e213..00000000000
--- a/mcs/class/Mono.WebBrowser/Mono.WebBrowser.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Default.targets"/>
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>108</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/Mono.WebBrowser/Mono.WebBrowser2K5.csproj b/mcs/class/Mono.WebBrowser/Mono.WebBrowser2K5.csproj
deleted file mode 100644
index 244c53304f2..00000000000
--- a/mcs/class/Mono.WebBrowser/Mono.WebBrowser2K5.csproj
+++ /dev/null
@@ -1,250 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{5E6C996A-007F-40CE-B244-006EFCFB77D2}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>Mono.WebBrowser</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>Mono.WebBrowser</RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>TRACE</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>true</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Mono.Mozilla\AsciiString.cs" />
- <Compile Include="Mono.Mozilla\Base.cs" />
- <Compile Include="Mono.Mozilla\Callback.cs" />
- <Compile Include="Mono.Mozilla\DOM\ContentListener.cs" />
- <Compile Include="Mono.Mozilla\DOM\DocumentEncoder.cs" />
- <Compile Include="Mono.Mozilla\DOM\DocumentType.cs" />
- <Compile Include="Mono.Mozilla\DOM\DOMImplementation.cs" />
- <Compile Include="Mono.Mozilla\DOM\EventListener.cs" />
- <Compile Include="Mono.Mozilla\DOM\NamedNodeMap.cs" />
- <Compile Include="Mono.Mozilla\DOM\Stream.cs" />
- <Compile Include="Mono.Mozilla\DOM\Stylesheet.cs" />
- <Compile Include="Mono.Mozilla\DOM\StylesheetList.cs" />
- <Compile Include="Mono.Mozilla\interfaces\extras\DocumentEncoderFlags.cs" />
- <Compile Include="Mono.Mozilla\interfaces\extras\nsIReadSegmentFun.cs" />
- <Compile Include="Mono.Mozilla\interfaces\extras\nsITimerCallbackDelegate.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIAccessibilityService.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIAccessible.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIAccessibleDocument.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIAccessibleRelation.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIAccessibleRetrieval.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIAccessNode.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIArray.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsICancelable.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIChannel.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIClassInfo.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDocumentEncoder.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDocumentEncoderNodeFixup.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCounter.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSPrimitiveValue.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSRule.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSRuleList.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSStyleDeclaration.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSStyleSheet.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCSSValue.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentEvent.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentStyle.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDOMStringList.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMEvent.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMEventListener.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMEventTarget.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMHTMLStyleElement.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMKeyEvent.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMMediaList.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMMouseEvent.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMNSRange.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMRect.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMRGBColor.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMStyleSheet.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMStyleSheetList.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMUIEvent.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMViewCSS.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIErrorService.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIFile.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIIOService.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsILoadGroup.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIObserver.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIOutputStream.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIPersistentProperties.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIPrefBranch.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIPrefService.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIProperties.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIProtocolHandler.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIRequest.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIRequestObserver.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIServiceManager.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIStreamListener.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsITimer.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsITimerCallback.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIURIContentListener.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWeakReference.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebBrowser.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebBrowserChrome.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebBrowserPersist.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebBrowserStream.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebProgress.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebProgressListener.cs" />
- <Compile Include="Mono.Mozilla\UniString.cs" />
- <Compile Include="Mono.Mozilla\WebBrowser.cs" />
- <Compile Include="Mono.Mozilla\DOM\Attribute.cs" />
- <Compile Include="Mono.Mozilla\DOM\AttributeCollection.cs" />
- <Compile Include="Mono.Mozilla\DOM\Document.cs" />
- <Compile Include="Mono.Mozilla\DOM\DOMObject.cs" />
- <Compile Include="Mono.Mozilla\DOM\Element.cs" />
- <Compile Include="Mono.Mozilla\DOM\HTMLElement.cs" />
- <Compile Include="Mono.Mozilla\DOM\HTMLElementCollection.cs" />
- <Compile Include="Mono.Mozilla\DOM\History.cs" />
- <Compile Include="Mono.Mozilla\DOM\Navigation.cs" />
- <Compile Include="Mono.Mozilla\DOM\Node.cs" />
- <Compile Include="Mono.Mozilla\DOM\NodeList.cs" />
- <Compile Include="Mono.Mozilla\DOM\Window.cs" />
- <Compile Include="Mono.Mozilla\DOM\WindowCollection.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDocCharset.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMAbstractView.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMBarProp.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentView.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMWindow.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMWindowCollection.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIInterfaceRequestor.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsISelection.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebBrowserChromeFocus.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebBrowserFocus.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMAttr.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCDATASection.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMCharacterData.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMComment.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocument.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentFragment.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentRange.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDocumentType.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMDOMImplementation.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMElement.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMEntityReference.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMHTMLBodyElement.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMHTMLCollection.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMHTMLDocument.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMHTMLElement.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMNamedNodeMap.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMNode.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMNodeList.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMNSHTMLElement.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMProcessingInstruction.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMRange.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIDOMText.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIHistoryEntry.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIInputStream.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsISHistory.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsISHistoryListener.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsISimpleEnumerator.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIURI.cs" />
- <Compile Include="Mono.Mozilla\interfaces\nsIWebNavigation.cs" />
- <Compile Include="Mono.Mozilla\interfaces\extras\NodeType.cs" />
- <Compile Include="Mono.Mozilla\interfaces\extras\nsIWriteSegmentFun.cs" />
- <Compile Include="Mono.Mozilla\interfaces\extras\Options.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IDocumentType.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IDOMImplementation.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IMediaList.cs" />
- <Compile Include="Mono.WebBrowser\DOM\INamedNodeMap.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IStylesheet.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IStylesheetList.cs" />
- <Compile Include="Mono.WebBrowser\DOM\EventArgs.cs" />
- <Compile Include="Mono.WebBrowser\DOM\EventHandlers.cs" />
- <Compile Include="Mono.WebBrowser\IWebBrowser.cs" />
- <Compile Include="Mono.WebBrowser\Manager.cs" />
- <Compile Include="Mono.WebBrowser\Exception.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IAttribute.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IAttributeCollection.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IDocument.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IElement.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IElementCollection.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IHistory.cs" />
- <Compile Include="Mono.WebBrowser\DOM\INavigation.cs" />
- <Compile Include="Mono.WebBrowser\DOM\INode.cs" />
- <Compile Include="Mono.WebBrowser\DOM\INodeList.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IWindow.cs" />
- <Compile Include="Mono.WebBrowser\DOM\IWindowCollection.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="ChangeLog" />
- <None Include="Mono.WebBrowser.dll.sources" />
- <None Include="README" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project>
diff --git a/mcs/class/Mono.WebBrowser/build-csproj2k5 b/mcs/class/Mono.WebBrowser/build-csproj2k5
deleted file mode 100755
index 9e7a6138298..00000000000
--- a/mcs/class/Mono.WebBrowser/build-csproj2k5
+++ /dev/null
@@ -1,134 +0,0 @@
-#!/bin/sh
-#
-# This script will generate SWF.cs.target from our System.Windows.Forms.dll.sources
-#
-#
-
-exec > Mono.WebBrowser2K5.csproj
-
-Source=Mono.WebBrowser.dll.sources
-
-dohead()
-{
- cat <<EOF
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{5E6C996A-007F-40CE-B244-006EFCFB77D2}</ProjectGuid>
- <Configuration Condition=" '\$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '\$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>Mono.WebBrowser</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>Mono.WebBrowser</RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug\</OutputPath>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '\$(Configuration)|\$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>TRACE</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>true</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- </ItemGroup>
-EOF
-}
-
-dotail()
-{
- cat <<EOF
- <ItemGroup>
- <None Include="ChangeLog" />
- <None Include="Mono.WebBrowser.dll.sources" />
- <None Include="README" />
- </ItemGroup>
- <Import Project="\$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project>
-EOF
-}
-
-dofilelist()
-{
-echo " <ItemGroup>"
-cat $Source | while read SRC; do
-# Don't do AssemblyInfo, it's got signing requests and such that we don't want
-if [ "x$SRC" != "xAssembly/AssemblyInfo.cs" -a "x$SRC" != "x../../build/common/Consts.cs" ] ; then
-SRC=`echo $SRC | sed 's/..\/..\/build\///'`
-SRC=`echo $SRC | tr '/' '\\\\'`
-cat <<EOF
- <Compile Include="$SRC" />
-EOF
-fi
-done
-echo " </ItemGroup>"
-}
-
-dohead
-dofilelist
-dotail
diff --git a/mcs/class/Novell.Directory.Ldap/.gitattributes b/mcs/class/Novell.Directory.Ldap/.gitattributes
index 1dc79598aa7..6c272b92163 100644
--- a/mcs/class/Novell.Directory.Ldap/.gitattributes
+++ b/mcs/class/Novell.Directory.Ldap/.gitattributes
@@ -1,2 +1 @@
/makefile.build -crlf
-/net_1_1_java_Novell.Directory.Ldap.dll.sources -crlf
diff --git a/mcs/class/Novell.Directory.Ldap/Makefile b/mcs/class/Novell.Directory.Ldap/Makefile
index 678b6055779..7ecbff311e9 100644
--- a/mcs/class/Novell.Directory.Ldap/Makefile
+++ b/mcs/class/Novell.Directory.Ldap/Makefile
@@ -4,22 +4,12 @@ include ../../build/rules.make
LIBRARY = Novell.Directory.Ldap.dll
-ifeq (net_1_1_java, $(PROFILE))
-LIB_MCS_FLAGS = \
- /nowarn:649 /nowarn:169 /nowarn:219 /nowarn:168 \
- -r:$(corlib) \
- -r:System.dll \
- -r:rt.dll \
- -r:J2SE.Helpers.dll \
- $(RESX_RES:%=/res:%)
-else
LIB_MCS_FLAGS = \
-warn:1 -nowarn:612 \
-r:$(corlib) \
-r:System.dll \
-r:Mono.Security.dll \
$(RESX_RES:%=/res:%)
-endif
include ../../build/library.make
@@ -33,16 +23,7 @@ $(RESULTCODE_MESSAGES): Novell.Directory.Ldap.Utilclass/ResultCodeMessages.txt
$(RESGEN) $< $@
EXTRA_DISTFILES = \
- net_1_1_java_Novell.Directory.Ldap.dll.sources \
Novell.Directory.Ldap.Rfc2251/RfcLdapURL.cs \
- Novell.Directory.Ldap.Security.jvm/AuthenticationCallbackHandler.cs \
- Novell.Directory.Ldap.Security.jvm/ChangeLog \
- Novell.Directory.Ldap.Security.jvm/CreateContextPrivilegedAction.cs \
- Novell.Directory.Ldap.Security.jvm/ExchangeTokenPrivilegedAction.cs \
- Novell.Directory.Ldap.Security.jvm/Krb5Helper.cs \
- Novell.Directory.Ldap.Security.jvm/SecureStream.cs \
- Novell.Directory.Ldap.Security.jvm/UnwrapPrivilegedAction.cs \
- Novell.Directory.Ldap.Security.jvm/WrapPrivilegedAction.cs \
Novell.Directory.Ldap.Utilclass/ExceptionMessages.resx \
Novell.Directory.Ldap.Utilclass/ExceptionMessages.txt \
Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx \
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/.gitattributes b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/.gitattributes
deleted file mode 100644
index f4322cac4e6..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/.gitattributes
+++ /dev/null
@@ -1,7 +0,0 @@
-/AuthenticationCallbackHandler.cs -crlf
-/CreateContextPrivilegedAction.cs -crlf
-/ExchangeTokenPrivilegedAction.cs -crlf
-/Krb5Helper.cs -crlf
-/SecureStream.cs -crlf
-/UnwrapPrivilegedAction.cs -crlf
-/WrapPrivilegedAction.cs -crlf
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/AuthenticationCallbackHandler.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/AuthenticationCallbackHandler.cs
deleted file mode 100644
index 486ab61b5e2..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/AuthenticationCallbackHandler.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// Novell.Directory.Ldap.Security.AuthenticationCallbackHandler.cs
-//
-// Authors:
-// Boris Kirzner <borsk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-using javax.security.auth.callback;
-using java.io;
-
-namespace Novell.Directory.Ldap.Security
-{
- internal class AuthenticationCallbackHandler : CallbackHandler
- {
-
- #region Fields
-
- private readonly string _username;
- private readonly string _password;
-
- #endregion //Fields
-
- #region Constructors
-
- public AuthenticationCallbackHandler(string username, string password)
- {
- _username = username;
- _password = password;
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public void handle(Callback [] callbacks)
- {
- for (int i = 0; i < callbacks.Length; i++) {
- if (callbacks [i] is NameCallback) {
- NameCallback nc = (NameCallback) callbacks [i];
- nc.setName (_username);
- }
- else if (callbacks [i] is PasswordCallback) {
- PasswordCallback pc = (PasswordCallback) callbacks [i];
- pc.setPassword (_password.ToCharArray ());
- }
- else {
- throw new UnsupportedCallbackException (callbacks [i], "Unrecognized Callback");
- }
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ChangeLog b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ChangeLog
deleted file mode 100644
index be95898738f..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ChangeLog
+++ /dev/null
@@ -1,27 +0,0 @@
-2005-11-06 Konstantin Triger <kostat@mainsoft.com>
-
- * SecureStream.cs, CreateContextPrivilegedAction.cs, Krb5Helper.cs:
- create GSSCredential only once, cleanup
-
-2005-11-03 Konstantin Triger <kostat@mainsoft.com>
-
- * CreateContextPrivilegedAction.cs: always require mutual auth;
- require integrity by default.
- * Krb5Helper.cs: for wrap/unwrap: always create MessageProp with
- pribState set.
-
-2005-14-08 Boris Kirzner <borisk@mainsoft.com>
- * Krb5Helper.cs: ExchangeTokens does proper final handshaking. Wrap/Unwrap
- perform no action if no integrity and encryption accured.
- * SecureStream.cs: Private convertion methods became internal, used by
- Krb5Helper.
-
-2005-28-07 Boris Kirzner <borisk@mainsoft.com>
- * Novell.Directory.Ldap.Security.jvm/ExchangeTokenPrivilegedAction.cs,
- Novell.Directory.Ldap.Security.jvm/CreateContextPrivilegedAction.cs,
- Novell.Directory.Ldap.Security.jvm/SecureStream.cs,
- Novell.Directory.Ldap.Security.jvm/WrapPrivilegedAction.cs,
- Novell.Directory.Ldap.Security.jvm/Krb5Helper.cs,
- Novell.Directory.Ldap.Security.jvm/UnwrapPrivilegedAction.cs,
- Novell.Directory.Ldap.Security.jvm/AuthenticationCallbackHandler.cs: added
- new classes implementing kerberos authntication support.
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/CreateContextPrivilegedAction.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/CreateContextPrivilegedAction.cs
deleted file mode 100644
index 73b280f5581..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/CreateContextPrivilegedAction.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// Novell.Directory.Ldap.Security.CreateContextPrivilegedAction.cs
-//
-// Authors:
-// Boris Kirzner <borsk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-using java.security;
-using org.ietf.jgss;
-
-namespace Novell.Directory.Ldap.Security
-{
- internal class CreateContextPrivilegedAction : PrivilegedAction
- {
- #region Fields
-
- private readonly bool _encryption;
- private readonly bool _signing;
- private readonly bool _delegation;
- private readonly string _name;
- private readonly string _clientName;
- private readonly string _mech;
-
- #endregion //Fields
-
- #region Constructors
-
- public CreateContextPrivilegedAction(string name, string clientName, string mech, bool encryption, bool signing, bool delegation)
- {
- _name = name;
- _clientName = clientName;
- _mech = mech;
- _encryption = encryption;
- _signing = signing;
- _delegation = delegation;
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public object run()
- {
- try {
- Oid krb5Oid = new Oid (_mech);
- GSSManager manager = GSSManager.getInstance ();
- GSSName clientName =
- manager.createName(_clientName, GSSName__Finals.NT_USER_NAME);
- GSSCredential clientCreds =
- manager.createCredential(clientName,
- GSSContext__Finals.INDEFINITE_LIFETIME,
- krb5Oid,
- GSSCredential__Finals.INITIATE_ONLY);
-
-// try {
- GSSName serverName = manager.createName (_name, GSSName__Finals.NT_HOSTBASED_SERVICE, krb5Oid);
- GSSContext context = manager.createContext (serverName, krb5Oid, clientCreds, GSSContext__Finals.INDEFINITE_LIFETIME);
-
- context.requestMutualAuth(true);
- context.requestConf (_encryption);
- if (!_encryption || _signing)
- context.requestInteg (!_encryption || _signing);
- context.requestCredDeleg (_delegation);
-
- return context;
-// }
-// finally {
-// // Calling this throws GSSException: Operation unavailable...
-// clientCreds.dispose();
-// }
- }
- catch (GSSException e) {
- throw new PrivilegedActionException (e);
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ExchangeTokenPrivilegedAction.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ExchangeTokenPrivilegedAction.cs
deleted file mode 100644
index b806967f333..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/ExchangeTokenPrivilegedAction.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// Novell.Directory.Ldap.Security.ExchangeTokenPrivilegedAction.cs
-//
-// Authors:
-// Boris Kirzner <borsk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-using org.ietf.jgss;
-using java.security;
-
-namespace Novell.Directory.Ldap.Security
-{
- internal class ExchangeTokenPrivilegedAction : PrivilegedAction
- {
- #region Fields
-
- private readonly sbyte [] _token;
- private readonly GSSContext _context;
-
- #endregion // Fields
-
- #region Constructors
-
- public ExchangeTokenPrivilegedAction(GSSContext context, sbyte [] token)
- {
- _token = token;
- _context = context;
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public object run()
- {
- try {
- sbyte [] token = _context.initSecContext (_token, 0, _token.Length);
- return token;
- }
- catch (GSSException e) {
- throw new PrivilegedActionException (e);
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/Krb5Helper.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/Krb5Helper.cs
deleted file mode 100644
index 9b58ff50d9e..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/Krb5Helper.cs
+++ /dev/null
@@ -1,197 +0,0 @@
-//
-// Novell.Directory.Ldap.Security.Krb5Helper.cs
-//
-// Authors:
-// Boris Kirzner <borsk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using vmw.common;
-
-using java.security;
-using javax.security.auth;
-using org.ietf.jgss;
-
-
-namespace Novell.Directory.Ldap.Security
-{
- internal class Krb5Helper : IDisposable
- {
- enum QOP {
- NO_PROTECTION = 1,
- INTEGRITY_ONLY_PROTECTION = 2,
- PRIVACY_PROTECTION = 4
- }
-
- #region Fields
-
- internal static readonly sbyte [] EmptyToken = new sbyte [0];
-
- private readonly bool _encryption;
- private readonly bool _signing;
- private readonly bool _delegation;
-
- private readonly GSSContext _context;
-
- #endregion // Fields
-
- #region Constructors
-
- public Krb5Helper(string name, string clientName, Subject subject, AuthenticationTypes authenticationTypes, string mech)
- {
- _encryption = (authenticationTypes & AuthenticationTypes.Sealing) != 0;
- _signing = (authenticationTypes & AuthenticationTypes.Signing) != 0;
- _delegation = (authenticationTypes & AuthenticationTypes.Delegation) != 0;
-
- CreateContextPrivilegedAction action = new CreateContextPrivilegedAction (name, clientName, mech,_encryption,_signing,_delegation);
- try {
- _context = (GSSContext) Subject.doAs (subject,action);
- }
- catch (PrivilegedActionException e) {
- throw new LdapException ("Problem performing token exchange with the server",LdapException.OTHER,"",e.getCause());
- }
- }
-
- #endregion // Constructors
-
- #region Properties
-
- internal GSSContext Context
- {
- get { return _context; }
- }
-
- #endregion // Properties
-
- #region Methods
-
- public sbyte [] ExchangeTokens(sbyte [] clientToken)
- {
- if (Context.isEstablished ()) {
- if (clientToken == null || clientToken.Length == 0)
- return Krb5Helper.EmptyToken;
-
- //final handshake
- byte [] challengeData = (byte []) TypeUtils.ToByteArray (clientToken);
- byte [] gssOutToken = Unwrap (challengeData, 0, challengeData.Length, new MessageProp (false));
-
- QOP myCop = QOP.NO_PROTECTION;
-
- if (_encryption)
- myCop = QOP.PRIVACY_PROTECTION;
- else if (_signing || (((QOP)gssOutToken [0] & QOP.INTEGRITY_ONLY_PROTECTION) != 0))
- myCop = QOP.INTEGRITY_ONLY_PROTECTION;
-
- if ((myCop & (QOP)gssOutToken [0]) == 0)
- throw new LdapException ("Server does not support the requested security level", 80, "");
-
- int srvMaxBufSize = SecureStream.NetworkByteOrderToInt (gssOutToken, 1, 3);
-
- //int rawSendSize = Context.getWrapSizeLimit(0, _encryption, srvMaxBufSize);
-
- byte [] gssInToken = new byte [4];
- gssInToken [0] = (byte) myCop;
-
- SecureStream.IntToNetworkByteOrder (srvMaxBufSize, gssInToken, 1, 3);
-
- gssOutToken = Wrap (gssInToken, 0, gssInToken.Length, new MessageProp (true));
-
- return TypeUtils.ToSByteArray (gssOutToken);
- }
-
- sbyte [] token = Context.initSecContext (clientToken, 0, clientToken.Length);
-
- if (Context.isEstablished ()) {
-
- if (Context.getConfState () != _encryption)
- throw new LdapException ("Encryption protocol was not established layer between client and server", 80, "");
-
- if (Context.getCredDelegState () != _delegation)
- throw new LdapException ("Credential delegation was not established layer between client and server", 80, "");
-
- if (_signing && (Context.getIntegState () != _signing))
- throw new LdapException ("Signing protocol was not established layer between client and server", 80, "");
-
- if (token == null)
- return EmptyToken;
- }
- return token;
- }
-
- public byte [] Wrap(byte [] outgoing, int start, int len)
- {
- return Wrap (outgoing, start, len, new MessageProp(true));
- }
-
- public byte [] Wrap(byte [] outgoing, int start, int len, MessageProp messageProp)
- {
- if (!Context.isEstablished ())
- throw new LdapException ("GSSAPI authentication not completed",LdapException.OTHER,"");
-
- if (!(Context.getConfState () || Context.getIntegState ())) {
- // in the case no encryption and no integrity required - return the original data
- byte [] buff = new byte [len];
- Array.Copy (outgoing, start, buff, 0, len);
- return buff;
- }
-
- sbyte [] result = Context.wrap (TypeUtils.ToSByteArray (outgoing), start, len, messageProp);
- return (byte []) TypeUtils.ToByteArray (result);
- }
-
- public byte [] Unwrap(byte [] incoming, int start, int len)
- {
- return Unwrap (incoming, start, len, new MessageProp(true));
- }
-
- public byte [] Unwrap(byte [] incoming, int start, int len, MessageProp messageProp)
- {
- if (!Context.isEstablished ())
- throw new LdapException ("GSSAPI authentication not completed",LdapException.OTHER,"");
-
- if (!(Context.getConfState () || Context.getIntegState ())) {
- // in the case no encryption and no integrity required - return the original data
- byte [] buff = new byte [len];
- Array.Copy (incoming, start, buff, 0, len);
- return buff;
- }
-
- sbyte [] result = Context.unwrap (TypeUtils.ToSByteArray (incoming), start, len, messageProp);
- return (byte []) TypeUtils.ToByteArray (result);
- }
-
- #endregion // Methods
-
- #region IDisposable Members
-
- public void Dispose() {
- Context.dispose();
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/SecureStream.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/SecureStream.cs
deleted file mode 100644
index 08a37e6718c..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/SecureStream.cs
+++ /dev/null
@@ -1,208 +0,0 @@
-//
-// Novell.Directory.Ldap.Security.SecureStream.cs
-//
-// Authors:
-// Boris Kirzner <borsk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-
-namespace Novell.Directory.Ldap.Security
-{
- internal class SecureStream : Stream
- {
- #region Fields
-
- private readonly Stream _stream;
- private readonly Krb5Helper _helper;
-
- private readonly byte [] _lenBuf = new byte [4];
- private byte [] _buffer;
- private int _bufferPosition;
-
- #endregion // Fields
-
- #region Constructors
-
- public SecureStream(Stream stream, Krb5Helper helper): base ()
- {
- _stream = stream;
- _helper = helper;
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override bool CanRead
- {
- get { return _stream.CanRead; }
- }
-
- public override bool CanSeek
- {
- get { return _stream.CanSeek; }
- }
-
- public override bool CanWrite
- {
- get { return _stream.CanWrite; }
- }
-
- public override long Length
- {
- get { throw new NotSupportedException (); }
- }
-
- public override long Position
- {
- get { throw new NotSupportedException (); }
- set { throw new NotSupportedException (); }
- }
-
- #endregion // Properties
-
- #region Methods
-
- public override void Flush()
- {
- _stream.Flush ();
- }
-
- public override int Read( byte [] buffer, int offset, int count)
- {
- if (_buffer == null || _bufferPosition >= _buffer.Length) {
- int actual = Fill ();
- while (actual == 0)
- actual = Fill ();
-
- if (actual == -1)
- return -1;
- }
-
- int available = _buffer.Length - _bufferPosition;
- if (count > available) {
- Array.Copy (_buffer, _bufferPosition, buffer, offset, available);
- _bufferPosition = _buffer.Length;
- return available;
- }
- else {
- Array.Copy (_buffer, _bufferPosition, buffer, offset, count);
- _bufferPosition += count;
- return count;
- }
- }
-
- public override void Close() {
- _stream.Close();
- _helper.Dispose();
- }
-
- private int Fill()
- {
- int actual = ReadAll (_lenBuf, 4);
-
- if (actual != 4)
- return -1;
-
- int length = NetworkByteOrderToInt (_lenBuf, 0, 4);
-
-// if (length > _recvMaxBufSize)
-// throw new LdapException(length + " exceeds the negotiated receive buffer size limit: " + _recvMaxBufSize, 80, "");
-
- byte [] rawBuffer = new byte [length];
- actual = ReadAll (rawBuffer, length);
-
- if (actual != length)
- throw new LdapException("Expected to read " + length + " bytes, but get " + actual, 80, "");
-
- _buffer = _helper.Unwrap (rawBuffer, 0, length);
- _bufferPosition = 0;
- return _buffer.Length;
- }
-
- private int ReadAll(byte [] buffer, int total)
- {
- int count = 0;
- int pos = 0;
- while (total > 0) {
- count = _stream.Read (buffer, pos, total);
-
- if (count == -1)
- break;
- //return ((pos == 0) ? -1 : pos);
-
- pos += count;
- total -= count;
- }
- return pos;
- }
-
- public override long Seek(long offset, SeekOrigin loc)
- {
- return _stream.Seek (offset, loc);
- }
-
- public override void SetLength(long value)
- {
- _stream.SetLength (value);
- }
-
- public override void Write(byte [] buffer, int offset, int count)
- {
- // FIXME: use GSSCOntext.getWrapSizeLimit to divide the buffer
- // Generate wrapped token
- byte [] wrappedToken = _helper.Wrap (buffer, offset, count);
- // Write out length
- IntToNetworkByteOrder (wrappedToken.Length, _lenBuf, 0, 4);
- _stream.Write (_lenBuf, 0, 4);
- // Write out wrapped token
- _stream.Write (wrappedToken, 0, wrappedToken.Length);
- }
-
- internal static int NetworkByteOrderToInt(byte [] buf, int start, int count)
- {
- int answer = 0;
- for (int i = 0; i < count; i++) {
- answer <<= 8;
- answer |= ((int)buf [start + i] & 0xff);
- }
- return answer;
- }
-
- internal static void IntToNetworkByteOrder(int num, byte [] buf, int start, int count)
- {
- for (int i = count-1; i >= 0; i--) {
- buf [start + i] = (byte)(num & 0xff);
- num >>= 8;
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/UnwrapPrivilegedAction.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/UnwrapPrivilegedAction.cs
deleted file mode 100644
index 7320678c9b9..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/UnwrapPrivilegedAction.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// Novell.Directory.Ldap.Security.UnwrapPrivilegedAction.cs
-//
-// Authors:
-// Boris Kirzner <borsk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using vmw.common;
-
-using java.security;
-using org.ietf.jgss;
-
-namespace Novell.Directory.Ldap.Security
-{
- internal class UnwrapPrivilegedAction : PrivilegedAction
- {
- #region Fields
-
- private readonly byte [] _buffer;
- private readonly int _start;
- private readonly int _len;
- private readonly GSSContext _context;
- private readonly MessageProp _messageProperties;
-
- #endregion // Fields
-
- #region Constructors
-
- public UnwrapPrivilegedAction(GSSContext context, byte [] buffer, int start, int len, MessageProp messageProperties)
- {
- _buffer = buffer;
- _start = start;
- _len = len;
- _context = context;
- _messageProperties = messageProperties;
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public object run()
- {
- try {
- sbyte [] result = _context.unwrap (TypeUtils.ToSByteArray (_buffer), _start, _len, _messageProperties);
- return (byte []) TypeUtils.ToByteArray (result);
- }
- catch (GSSException e) {
- throw new PrivilegedActionException (e);
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/WrapPrivilegedAction.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/WrapPrivilegedAction.cs
deleted file mode 100644
index 8ec5a616765..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Security.jvm/WrapPrivilegedAction.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// Novell.Directory.Ldap.Security.WrapPrivilegedAction.cs
-//
-// Authors:
-// Boris Kirzner <borsk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using vmw.common;
-
-using java.security;
-using org.ietf.jgss;
-
-namespace Novell.Directory.Ldap.Security
-{
- internal class WrapPrivilegedAction : PrivilegedAction
- {
- #region Fields
-
- private readonly byte [] _buffer;
- private readonly int _start;
- private readonly int _len;
- private readonly GSSContext _context;
- private readonly MessageProp _messageProperties;
-
- #endregion // Fields
-
- #region Constructors
-
- public WrapPrivilegedAction(GSSContext context, byte [] buffer, int start, int len, MessageProp messageProperties)
- {
- _buffer = buffer;
- _start = start;
- _len = len;
- _context = context;
- _messageProperties = messageProperties;
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public object run()
- {
- try {
- sbyte [] result = _context.wrap (TypeUtils.ToSByteArray (_buffer), _start, _len, _messageProperties);
- return (byte []) TypeUtils.ToByteArray (result);
- }
- catch (GSSException e) {
- throw new PrivilegedActionException (e);
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/RespExtensionSet.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/RespExtensionSet.cs
index 701ce4b9a71..87a5a89b00e 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/RespExtensionSet.cs
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.Utilclass/RespExtensionSet.cs
@@ -33,11 +33,6 @@ using System;
namespace Novell.Directory.Ldap.Utilclass
{
-#if TARGET_JVM
- // This dummy class workarounds a MS CSC bug by using SupportClass before
- // using its inner class (SupportClass.AbstractSetSupport)
- class RespExtensionSetDummy : SupportClass {}
-#endif
/// <summary> This class extends the AbstractSet and Implements the Set
/// so that it can be used to maintain a list of currently
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/AssemblyInfo.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/AssemblyInfo.cs
index b5563d56cd2..cba8084028d 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/AssemblyInfo.cs
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/AssemblyInfo.cs
@@ -48,9 +48,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCopyright(" (C) 2003 Novell, Inc")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-#if !TARGET_JVM
[assembly: CLSCompliant(true)]
-#endif
//
// Version information for an assembly consists of the following four values:
@@ -65,8 +63,6 @@ using System.Runtime.InteropServices;
[assembly: AssemblyVersion (Consts.FxVersion)]
-#if (!TARGET_JVM)
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../mono.pub")]
-#endif
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
index 1dc68151233..f2ef8e99597 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/Connection.cs
@@ -34,10 +34,8 @@ using System.Threading;
using Novell.Directory.Ldap.Asn1;
using Novell.Directory.Ldap.Rfc2251;
using Novell.Directory.Ldap.Utilclass;
-#if !TARGET_JVM
using Mono.Security.Protocol.Tls;
using Mono.Security.X509.Extensions;
-#endif
using Syscert = System.Security.Cryptography.X509Certificates;
using System.Security.Cryptography;
using System.Net;
@@ -45,9 +43,7 @@ using System.Net.Sockets;
using System.Collections;
using System.IO;
using System.Text;
-#if !TARGET_JVM
using Mono.Security.X509;
-#endif
using System.Text.RegularExpressions;
using System.Globalization;
using System.Reflection;
@@ -735,7 +731,6 @@ namespace Novell.Directory.Ldap
{
if ((in_Renamed == null) || (out_Renamed == null))
{
-#if !TARGET_JVM
if(Ssl)
{
this.host = host;
@@ -796,13 +791,10 @@ namespace Novell.Directory.Ldap
out_Renamed = (System.IO.Stream) sslstream;*/
}
else{
-#endif
socket = new System.Net.Sockets.TcpClient(host, port);
in_Renamed = (System.IO.Stream) socket.GetStream();
out_Renamed = (System.IO.Stream) socket.GetStream();
-#if !TARGET_JVM
}
-#endif
}
else
{
@@ -1140,11 +1132,9 @@ namespace Novell.Directory.Ldap
if (socket != null || sock != null)
{
-#if !TARGET_JVM
// Just before closing the sockets, abort the reader thread
if ((reader != null) && (reason != "reader: thread stopping"))
reader.Abort();
-#endif
// Close the socket
try
{
@@ -1264,7 +1254,6 @@ namespace Novell.Directory.Ldap
/* package */
internal void startTLS()
{
-#if !TARGET_JVM
try
{
waitForReader(null);
@@ -1333,7 +1322,6 @@ namespace Novell.Directory.Ldap
throw new LdapException("The host is unknown", LdapException.CONNECT_ERROR, null, uhe);
}
return ;
-#endif
}
/*
@@ -1544,15 +1532,6 @@ namespace Novell.Directory.Ldap
// before closing sockets, from shutdown
return;
}
-#if TARGET_JVM
- catch (ObjectDisposedException)
- {
- // we do not support Thread.Abort under java
- // so we close the stream and the working thread
- // catches ObjectDisposedException exception
- return;
- }
-#endif
catch (System.IO.IOException ioe)
{
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs
index f6c72497f9e..35ee09ca151 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/LdapConnection.cs
@@ -34,18 +34,7 @@ using Novell.Directory.Ldap;
using Novell.Directory.Ldap.Asn1;
using Novell.Directory.Ldap.Rfc2251;
using Novell.Directory.Ldap.Utilclass;
-#if !TARGET_JVM
using Mono.Security.Protocol.Tls;
-#else
-using org.ietf.jgss;
-using javax.security.auth;
-using javax.security.auth.login;
-using java.security;
-
-using Novell.Directory.Ldap.Security;
-using System.Collections.Specialized;
-using System.Configuration;
-#endif
using System.Security.Cryptography.X509Certificates;
namespace Novell.Directory.Ldap
@@ -1199,13 +1188,6 @@ namespace Novell.Directory.Ldap
public virtual void Bind(System.String dn, System.String passwd, AuthenticationTypes authenticationTypes)
{
-#if TARGET_JVM
- if (authenticationTypes != AuthenticationTypes.None &&
- authenticationTypes != AuthenticationTypes.ServerBind &&
- authenticationTypes != AuthenticationTypes.Anonymous)
- BindSecure(dn, passwd, authenticationTypes);
- else
-#endif
Bind(Ldap_V3, dn, passwd, defSearchCons);
return ;
@@ -1542,11 +1524,6 @@ namespace Novell.Directory.Ldap
}
LdapMessage msg;
-#if TARGET_JVM
- if (mech != null)
- msg = new LdapBindRequest(version, "", mech, passwd, cons.getControls());
- else
-#endif
msg = new LdapBindRequest(version, dn, passwd, cons.getControls());
msgId = msg.MessageID;
@@ -1565,127 +1542,12 @@ namespace Novell.Directory.Ldap
}
}
-#if TARGET_JVM
- // stopping reader to enable stream replace after secure binding is complete, see Connection.ReplaceStreams()
- if (mech != null)
- {
- if (conn.BindSemIdClear) {
- // need to acquire a semaphore only if bindSemId is clear
- // because if we receive SASL_BIND_IN_PROGRESS the semaphore is not
- // released when the response is queued
- conn.acquireWriteSemaphore(msgId);
- conn.BindSemId = msgId;
- }
- conn.stopReaderOnReply(msgId);
- }
- else
-#endif
// The semaphore is released when the bind response is queued.
conn.acquireWriteSemaphore(msgId);
return SendRequestToServer(msg, cons.TimeLimit, queue, bindProps);
}
-#if TARGET_JVM
- private void BindSecure(System.String username, System.String password, AuthenticationTypes authenticationTypes)
- {
- if ((authenticationTypes & AuthenticationTypes.Secure) != 0) {
- LoginContext loginContext = null;
- try {
- if (username != null && password != null) {
- AuthenticationCallbackHandler callbackHandler = new AuthenticationCallbackHandler (username,password);
- loginContext = new LoginContext (SecurityAppName, callbackHandler);
- }
- else
- loginContext = new LoginContext (SecurityAppName);
-
- loginContext.login ();
- }
- catch (Exception e) {
- throw new LdapException ("Failed to create login security context", 80, "", e);
- }
-
- Krb5Helper krb5Helper = null;
- try {
- krb5Helper = new Krb5Helper ("ldap@" + conn.Host, username, loginContext.getSubject (), authenticationTypes, SecurityMech);
- }
- finally {
- loginContext.logout();
- }
- sbyte [] token = krb5Helper.ExchangeTokens (Krb5Helper.EmptyToken);
-
- for (;;) {
- LdapResponseQueue queue = Bind(LdapConnection.Ldap_V3, username, token, null, null, AuthenticationMech);
- LdapResponse res = (LdapResponse) queue.getResponse ();
- if (res.ResultCode != LdapException.SASL_BIND_IN_PROGRESS &&
- res.ResultCode != LdapException.SUCCESS) {
- krb5Helper.Dispose();
- throw new LdapException(ExceptionMessages.CONNECTION_ERROR, res.ResultCode, res.ErrorMessage);
- }
- Asn1OctetString serverSaslCreds = ((RfcBindResponse)res.Asn1Object.Response).ServerSaslCreds;
- token = serverSaslCreds != null ? serverSaslCreds.byteValue () : null;
-
- token = krb5Helper.ExchangeTokens(token == null ? Krb5Helper.EmptyToken : token);
-
- if (res.ResultCode != LdapException.SASL_BIND_IN_PROGRESS)
- break;
-
- conn.ReplaceStreams (conn.InputStream,conn.OutputStream);
- }
-
- System.IO.Stream inStream = conn.InputStream;
- System.IO.Stream newIn = new SecureStream (inStream, krb5Helper);
- System.IO.Stream outStream = conn.OutputStream;
- System.IO.Stream newOut = new SecureStream (outStream, krb5Helper);
- conn.ReplaceStreams (newIn,newOut);
- }
- }
-
- static string SecurityMech
- {
- get {
- string securityMech = null;
- NameValueCollection config = (NameValueCollection) ConfigurationSettings.GetConfig ("mainsoft.directoryservices/settings");
- if (config != null)
- securityMech = config ["securitymech"];
-
- if (securityMech == null)
- throw new ArgumentException("Security mechanism id not found in application settings");
-
- return securityMech;
- }
- }
-
- static string SecurityAppName
- {
- get {
- string securityAppName = null;
- NameValueCollection config = (NameValueCollection) ConfigurationSettings.GetConfig ("mainsoft.directoryservices/settings");
- if (config != null)
- securityAppName = config ["securityappname"];
-
- if (securityAppName == null)
- throw new ArgumentException("Application section name not found in application settings");
-
- return securityAppName;
- }
- }
-
- static string AuthenticationMech
- {
- get {
- string authenticationMech = null;
- NameValueCollection config = (NameValueCollection) ConfigurationSettings.GetConfig ("mainsoft.directoryservices/settings");
- if (config != null)
- authenticationMech = config ["authenticationmech"];
-
- if (authenticationMech == null)
- throw new ArgumentException("Authentication mechanism not found in application settings");
-
- return authenticationMech;
- }
- }
-#endif
//*************************************************************************
// compare methods
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/SupportClass.cs b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/SupportClass.cs
index 0f9033a3dbe..450ad081648 100644
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/SupportClass.cs
+++ b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap/SupportClass.cs
@@ -87,14 +87,10 @@ using System;
[CLSCompliantAttribute(false)]
public static sbyte[] ToSByteArray(byte[] byteArray)
{
-#if TARGET_JVM
- return vmw.common.TypeUtils.ToSByteArray(byteArray);
-#else
sbyte[] sbyteArray = new sbyte[byteArray.Length];
for(int index=0; index < byteArray.Length; index++)
sbyteArray[index] = (sbyte) byteArray[index];
return sbyteArray;
-#endif
}
/*******************************/
/// <summary>
@@ -105,14 +101,10 @@ using System;
[CLSCompliantAttribute(false)]
public static byte[] ToByteArray(sbyte[] sbyteArray)
{
-#if TARGET_JVM
- return (byte[])vmw.common.TypeUtils.ToByteArray(sbyteArray);;
-#else
byte[] byteArray = new byte[sbyteArray.Length];
for(int index=0; index < sbyteArray.Length; index++)
byteArray[index] = (byte) sbyteArray[index];
return byteArray;
-#endif
}
/// <summary>
diff --git a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap20.csproj b/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap20.csproj
deleted file mode 100755
index 2025886a4ed..00000000000
--- a/mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap20.csproj
+++ /dev/null
@@ -1,353 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7BA54046-FD05-4209-9508-D6367CDAFBC0}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Novell.Directory.Ldap</RootNamespace>
- <AssemblyName>Novell.Directory.Ldap</AssemblyName>
- <JDKName>1.4.2</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers">
- <HintPath>..\lib\J2SE.Helpers.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="rt, Version=1.4.2.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Boolean.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Choice.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Decoder.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Encoder.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Enumerated.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Identifier.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Integer.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Length.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Null.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Numeric.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Object.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1OctetString.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Sequence.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1SequenceOf.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Set.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1SetOf.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Structured.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Tagged.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\LBERDecoder.cs" />
- <Compile Include="Novell.Directory.Ldap.Asn1\LBEREncoder.cs" />
- <Compile Include="Novell.Directory.Ldap.Controls\LdapEntryChangeControl.cs" />
- <Compile Include="Novell.Directory.Ldap.Controls\LdapPersistSearchControl.cs" />
- <Compile Include="Novell.Directory.Ldap.Controls\LdapSortControl.cs" />
- <Compile Include="Novell.Directory.Ldap.Controls\LdapSortKey.cs" />
- <Compile Include="Novell.Directory.Ldap.Controls\LdapSortResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Controls\LdapVirtualListControl.cs" />
- <Compile Include="Novell.Directory.Ldap.Controls\LdapVirtualListResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\BaseEventArgs.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\DirectoryEventArgs.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\DirectoryExceptionEventArgs.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\LdapEventArgs.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\LdapEventConstants.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\LdapEventSource.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir\EdirEventArgs.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir\EdirEventConstants.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir\EdirEventIntermediateResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir\EdirEventSource.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir\EdirEventSpecifier.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir\MonitorEventRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir\MonitorEventResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\BaseEdirEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\BinderyObjectEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\ChangeAddressEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\ConnectionStateEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\DebugEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\DebugParameter.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\DSETimeStamp.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\EntryEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\GeneralDSEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\ModuleStateEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\NetworkAddressEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\ReferralAddress.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\SecurityEquivalenceEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events.Edir.EventData\ValueEventData.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\PSearchEventSource.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\SearchReferralEventArgs.cs" />
- <Compile Include="Novell.Directory.Ldap.Events\SearchResultEventArgs.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\AbortPartitionOperationRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\AddReplicaRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\ChangeReplicaTypeRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetBindDNRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetBindDNResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetEffectivePrivilegesRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetEffectivePrivilegesResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetReplicaInfoRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetReplicaInfoResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetReplicationFilterRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\GetReplicationFilterResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\ListReplicasRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\ListReplicasResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\MergePartitionsRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\NamingContextConstants.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\PartitionEntryCountRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\PartitionEntryCountResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\PartitionSyncRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\ReceiveAllUpdatesRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\RefreshLdapServerRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\RemoveOrphanPartitionRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\RemoveReplicaRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\ReplicationConstants.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\SchemaSyncRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\SendAllUpdatesRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\SetReplicationFilterRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\SplitOrphanPartitionRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\SplitPartitionRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\TriggerBackgroundProcessRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\BackupRestoreConstants.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\LdapBackupRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\LdapBackupResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Extensions\LdapRestoreRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAbandonRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAddRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAddResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAssertionValue.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAttributeDescription.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAttributeDescriptionList.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAttributeList.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAttributeTypeAndValues.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAttributeValue.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAttributeValueAssertion.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcAuthenticationChoice.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcBindRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcBindResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcCompareRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcCompareResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcControl.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcControls.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcDelRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcDelResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcExtendedRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcExtendedResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcFilter.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcIntermediateResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcLdapDN.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcLdapMessage.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcLdapOID.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcLdapResult.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcLdapString.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcLdapSuperDN.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcLdapURL.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcMatchingRuleAssertion.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcMatchingRuleId.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcMessageID.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcModifyDNRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcModifyDNResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcModifyRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcModifyResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcReferral.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcRelativeLdapDN.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcResponse.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcSaslCredentials.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcSearchRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcSearchResultDone.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcSearchResultEntry.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcSearchResultReference.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcSubstringFilter.cs" />
- <Compile Include="Novell.Directory.Ldap.Rfc2251\RfcUnbindRequest.cs" />
- <Compile Include="Novell.Directory.Ldap.Security.jvm\AuthenticationCallbackHandler.cs" />
- <Compile Include="Novell.Directory.Ldap.Security.jvm\CreateContextPrivilegedAction.cs" />
- <Compile Include="Novell.Directory.Ldap.Security.jvm\ExchangeTokenPrivilegedAction.cs" />
- <Compile Include="Novell.Directory.Ldap.Security.jvm\Krb5Helper.cs" />
- <Compile Include="Novell.Directory.Ldap.Security.jvm\SecureStream.cs" />
- <Compile Include="Novell.Directory.Ldap.Security.jvm\UnwrapPrivilegedAction.cs" />
- <Compile Include="Novell.Directory.Ldap.Security.jvm\WrapPrivilegedAction.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\ArrayEnumeration.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\AttributeQualifier.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\Base64.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\BindProperties.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\CharacterTypes.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\DN.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\EnumeratedIterator.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\ExceptionMessages.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\ExtResponseFactory.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\IntermediateResponseFactory.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\RDN.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\ReferralInfo.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\ResourcesHandler.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\RespControlVector.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\RespExtensionSet.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\ResultCodeMessages.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\SchemaParser.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\SchemaTokenCreator.cs" />
- <Compile Include="Novell.Directory.Ldap.Utilclass\TokenTypes.cs" />
- <Compile Include="Novell.Directory.Ldap\AssemblyInfo.cs" />
- <Compile Include="Novell.Directory.Ldap\AuthenticationTypes.cs" />
- <Compile Include="Novell.Directory.Ldap\Connection.cs" />
- <Compile Include="Novell.Directory.Ldap\InterThreadException.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapAbandonRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapAddRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapAttribute.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapAttributeSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapAttributeSet.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapAuthHandler.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapAuthProvider.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapBindHandler.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapBindRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapCompareAttrNames.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapCompareRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapConnection.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapConstraints.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapControl.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapDeleteRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapDITContentRuleSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapDITStructureRuleSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapDN.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapDSConstants.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapEntry.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapException.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapExtendedOperation.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapExtendedRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapExtendedResponse.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapIntermediateResponse.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapLocalException.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapMatchingRuleSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapMatchingRuleUseSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapMessage.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapMessageQueue.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapModification.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapModifyDNRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapModifyRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapNameFormSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapObjectClassSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapReferralException.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapReferralHandler.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapResponse.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapResponseQueue.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSchemaElement.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSearchConstraints.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSearchQueue.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSearchRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSearchResult.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSearchResultReference.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSearchResults.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapSyntaxSchema.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapUnbindRequest.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapUnsolicitedNotificationListener.cs" />
- <Compile Include="Novell.Directory.Ldap\LdapUrl.cs" />
- <Compile Include="Novell.Directory.Ldap\Message.cs" />
- <Compile Include="Novell.Directory.Ldap\MessageAgent.cs" />
- <Compile Include="Novell.Directory.Ldap\MessageVector.cs" />
- <Compile Include="Novell.Directory.Ldap\SupportClass.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass\ExceptionMessages.resx">
- <DependentUpon>ExceptionMessages.cs</DependentUpon>
- <LogicalName>ExceptionMessages.resources</LogicalName>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass\ResultCodeMessages.resx">
- <DependentUpon>ResultCodeMessages.cs</DependentUpon>
- <LogicalName>ResultCodeMessages.resources</LogicalName>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Properties\Consts.cs.in</Link>
- </Compile>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.4.2" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-j2se-helpers="..\lib\J2SE.Helpers.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project>
diff --git a/mcs/class/Novell.Directory.Ldap/net_1_1_java_Novell.Directory.Ldap.dll.sources b/mcs/class/Novell.Directory.Ldap/net_1_1_java_Novell.Directory.Ldap.dll.sources
deleted file mode 100644
index 0e14b627b3d..00000000000
--- a/mcs/class/Novell.Directory.Ldap/net_1_1_java_Novell.Directory.Ldap.dll.sources
+++ /dev/null
@@ -1,3 +0,0 @@
-#include Novell.Directory.Ldap.dll.sources
-Novell.Directory.Ldap.Rfc2251/RfcLdapURL.cs
-Novell.Directory.Ldap.Security.jvm/*.cs
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources
index 5072270d8f1..ac779fcd516 100644
--- a/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources
+++ b/mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition.dll.sources
@@ -22,10 +22,8 @@ src/ComponentModel/Microsoft/Internal/GenerationServices.cs
src/ComponentModel/Microsoft/Internal/Runtime/Serialization/SerializationServices.cs
src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.cs
src/ComponentModel/Microsoft/Internal/Collections/WeakReferenceCollection.cs
-src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
src/ComponentModel/Microsoft/Internal/Collections/CollectionServices.CollectionOfObject.cs
src/ComponentModel/Microsoft/Internal/Collections/EnumerableCardinality.cs
-src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
src/ComponentModel/System/LazyOfTTMetadata.cs
src/ComponentModel/System/ComponentModel/Composition/PartMetadataAttribute.cs
src/ComponentModel/System/ComponentModel/Composition/ExceptionBuilder.cs
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
deleted file mode 100644
index 03269317f54..00000000000
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionary.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-// -----------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// -----------------------------------------------------------------------
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using Microsoft.Internal;
-
-// This is using the desktop namespace for ReadOnlyDictionary, the source code is in Microsoft\Internal\Collections to keep it seperate from the main MEF codebase.
-namespace System.Collections.ObjectModel
-{
-
- [DebuggerDisplay("Count = {Count}")]
- [DebuggerTypeProxy(typeof(ReadOnlyDictionaryDebuggerProxy<,>))]
- internal sealed partial class ReadOnlyDictionary<TKey, TValue> : IDictionary<TKey, TValue>
- {
- private readonly IDictionary<TKey, TValue> _innerDictionary;
-
- public ReadOnlyDictionary(IDictionary<TKey, TValue> dictionary)
- {
- this._innerDictionary = dictionary ?? new Dictionary<TKey, TValue>(0);
- }
-
- public int Count
- {
- get { return this._innerDictionary.Count; }
- }
-
- public bool IsReadOnly
- {
- get { return true; }
- }
-
- public ICollection<TKey> Keys
- {
- get { return this._innerDictionary.Keys; }
- }
-
- public TValue this[TKey key]
- {
- get { return this._innerDictionary[key]; }
- set { throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary); }
- }
-
- public ICollection<TValue> Values
- {
- get { return this._innerDictionary.Values; }
- }
-
- public bool Contains(KeyValuePair<TKey, TValue> item)
- {
- return this._innerDictionary.Contains(item);
- }
-
- public bool ContainsKey(TKey key)
- {
- return this._innerDictionary.ContainsKey(key);
- }
-
- public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
- {
- this._innerDictionary.CopyTo(array, arrayIndex);
- }
-
- public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
- {
- return this._innerDictionary.GetEnumerator();
- }
-
- public bool TryGetValue(TKey key, out TValue value)
- {
- return this._innerDictionary.TryGetValue(key, out value);
- }
-
- IEnumerator IEnumerable.GetEnumerator()
- {
- return this._innerDictionary.GetEnumerator();
- }
-
- void IDictionary<TKey, TValue>.Add(TKey key, TValue value)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- void ICollection<KeyValuePair<TKey, TValue>>.Add(KeyValuePair<TKey, TValue> item)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- void ICollection<KeyValuePair<TKey, TValue>>.Clear()
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- bool IDictionary<TKey, TValue>.Remove(TKey key)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
-
- bool ICollection<KeyValuePair<TKey, TValue>>.Remove(KeyValuePair<TKey, TValue> item)
- {
- throw new NotSupportedException(Strings.NotSupportedReadOnlyDictionary);
- }
- }
-}
diff --git a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs b/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
deleted file mode 100644
index 9dda8f4bc58..00000000000
--- a/mcs/class/System.ComponentModel.Composition.4.5/src/ComponentModel/Microsoft/Internal/Collections/ReadOnlyDictionaryDebuggerProxy.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// -----------------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// -----------------------------------------------------------------------
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Linq;
-using Microsoft.Internal;
-
-namespace System.Collections.ObjectModel
-{
-
- // NOTE: This type cannot be a nested proxy of ReadOnlyDictionary due to a bug
- // in the Visual Studio Debugger which causes it to ignore nested generic proxies.
- internal class ReadOnlyDictionaryDebuggerProxy<TKey, TValue>
- {
- private readonly ReadOnlyDictionary<TKey, TValue> _dictionary;
-
- public ReadOnlyDictionaryDebuggerProxy(ReadOnlyDictionary<TKey, TValue> dictionary)
- {
- Requires.NotNull(dictionary, "dictionary");
-
- _dictionary = dictionary;
- }
-
- [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
- public KeyValuePair<TKey, TValue>[] Items
- {
- // NOTE: This shouldn't be cached, so that on every query of
- // the current value of the underlying dictionary is respected.
- get { return this._dictionary.ToArray(); }
- }
- }
-}
diff --git a/mcs/class/System.Configuration/Assembly/AssemblyInfo.cs b/mcs/class/System.Configuration/Assembly/AssemblyInfo.cs
index c1ac154b05a..49025b78c09 100644
--- a/mcs/class/System.Configuration/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Configuration/Assembly/AssemblyInfo.cs
@@ -56,10 +56,8 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
[assembly: AllowPartiallyTrustedCallers]
-#if !TARGET_JVM //TARGET_JVM does not support signing
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../msfinal.pub")]
-#endif
[assembly: InternalsVisibleTo ("System.Web, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
diff --git a/mcs/class/System.Configuration/System.Configuration.csproj b/mcs/class/System.Configuration/System.Configuration.csproj
deleted file mode 100644
index 7228d6d4d2a..00000000000
--- a/mcs/class/System.Configuration/System.Configuration.csproj
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- <Reference Include="System.Xml"/>
- <Reference Include="System.Security">
- <HintPath>..\lib\net_2_0\System.Security.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs b/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
index a49a9679f7b..1123e9ad156 100644
--- a/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
+++ b/mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
@@ -769,28 +769,7 @@ namespace System.Configuration
internal class ElementMap
{
-#if TARGET_JVM
- const string elementMapsKey = "ElementMap_elementMaps";
- static Hashtable elementMaps
- {
- get
- {
- Hashtable tbl = (Hashtable) AppDomain.CurrentDomain.GetData (elementMapsKey);
- if (tbl == null) {
- lock (typeof (ElementMap)) {
- tbl = (Hashtable) AppDomain.CurrentDomain.GetData (elementMapsKey);
- if (tbl == null) {
- tbl = Hashtable.Synchronized (new Hashtable ());
- AppDomain.CurrentDomain.SetData (elementMapsKey, tbl);
- }
- }
- }
- return tbl;
- }
- }
-#else
static readonly Hashtable elementMaps = Hashtable.Synchronized (new Hashtable ());
-#endif
readonly ConfigurationPropertyCollection properties;
readonly ConfigurationCollectionAttribute collectionAttribute;
diff --git a/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs b/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs
index 28b1d6bf3d4..28d4fa428db 100644
--- a/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs
+++ b/mcs/class/System.Configuration/System.Configuration/ConfigurationManager.cs
@@ -119,9 +119,6 @@ namespace System.Configuration {
return ConfigurationFactory.Create (typeof(ExeConfigurationHost), map, userLevel);
}
-#if TARGET_JVM
- [MonoLimitation ("Supported only when the userLevel parameter is set to ConfigurationUserLevel.None. Other values are not supported because Environment.GetFolderPath method is not implemented.")]
-#endif
public static Configuration OpenExeConfiguration (ConfigurationUserLevel userLevel)
{
return OpenExeConfigurationInternal (userLevel, Assembly.GetEntryAssembly () ?? Assembly.GetCallingAssembly (), null);
diff --git a/mcs/class/System.Configuration/System.Configuration/ConfigurationSection.cs b/mcs/class/System.Configuration/System.Configuration/ConfigurationSection.cs
index 8a76dd6fff5..56462d91d55 100644
--- a/mcs/class/System.Configuration/System.Configuration/ConfigurationSection.cs
+++ b/mcs/class/System.Configuration/System.Configuration/ConfigurationSection.cs
@@ -32,9 +32,7 @@
using System.Collections;
using System.Xml;
using System.IO;
-#if !TARGET_JVM
using System.Security.Cryptography.Xml;
-#endif
using System.Configuration.Internal;
namespace System.Configuration
diff --git a/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs b/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
index 80f410891de..e4d59f1466c 100644
--- a/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
+++ b/mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
@@ -161,34 +161,24 @@ namespace System.Configuration
{
throw new NotImplementedException ();
}
-#if !TARGET_JVM
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern private static string get_bundled_machine_config ();
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern private static string get_bundled_app_config ();
-#endif
public virtual Stream OpenStreamForRead (string streamName)
{
if (String.CompareOrdinal (streamName, System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile) == 0) {
-#if TARGET_JVM
- return (Stream) vmw.common.IOUtils.getStreamForGHConfigs (streamName);
-#else
string bundle = get_bundled_machine_config ();
if (bundle != null)
return new MemoryStream (System.Text.Encoding.UTF8.GetBytes (bundle));
-#endif
}
if (String.CompareOrdinal (streamName, AppDomain.CurrentDomain.SetupInformation.ConfigurationFile) == 0) {
-#if TARGET_JVM
- throw new NotImplementedException();
-#else
string bundle = get_bundled_app_config ();
if (bundle != null)
return new MemoryStream (System.Text.Encoding.UTF8.GetBytes (bundle));
-#endif
}
if (!File.Exists (streamName))
diff --git a/mcs/class/System.Configuration/System.Configuration20.csproj b/mcs/class/System.Configuration/System.Configuration20.csproj
deleted file mode 100755
index 04dd319929e..00000000000
--- a/mcs/class/System.Configuration/System.Configuration20.csproj
+++ /dev/null
@@ -1,285 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7262AA8D-840C-4123-B99E-180F64F13A76}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Configuration</RootNamespace>
- <AssemblyName>System.Configuration</AssemblyName>
- <JDKName>1.4.2</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- <jarserver>ip2</jarserver>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <NoStdLib>false</NoStdLib>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers, Version=0.0.0.0, Culture=neutral">
- <HintPath>..\lib\J2SE.Helpers.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="rt, Version=1.4.2.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.XML" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="System.Configuration.Internal\DelegatingConfigHost.cs" />
- <Compile Include="System.Configuration.Internal\IConfigErrorInfo.cs" />
- <Compile Include="System.Configuration.Internal\IConfigSystem.cs" />
- <Compile Include="System.Configuration.Internal\IConfigurationManagerHelper.cs" />
- <Compile Include="System.Configuration.Internal\IConfigurationManagerInternal.cs" />
- <Compile Include="System.Configuration.Internal\IInternalConfigClientHost.cs" />
- <Compile Include="System.Configuration.Internal\IInternalConfigConfigurationFactory.cs" />
- <Compile Include="System.Configuration.Internal\IInternalConfigHost.cs" />
- <Compile Include="System.Configuration.Internal\IInternalConfigRecord.cs" />
- <Compile Include="System.Configuration.Internal\IInternalConfigRoot.cs" />
- <Compile Include="System.Configuration.Internal\IInternalConfigSettingsFactory.cs" />
- <Compile Include="System.Configuration.Internal\IInternalConfigSystem.cs" />
- <Compile Include="System.Configuration.Internal\InternalConfigEventArgs.cs" />
- <Compile Include="System.Configuration.Internal\InternalConfigEventHandler.cs" />
- <Compile Include="System.Configuration.Internal\StreamChangeCallback.cs" />
- <Compile Include="System.Configuration.Provider\ProviderBase.cs" />
- <Compile Include="System.Configuration.Provider\ProviderCollection.cs" />
- <Compile Include="System.Configuration.Provider\ProviderException.cs" />
- <Compile Include="System.Configuration\AppSettingsSection.cs" />
- <Compile Include="System.Configuration\CallbackValidator.cs" />
- <Compile Include="System.Configuration\CallbackValidatorAttribute.cs" />
- <Compile Include="System.Configuration\ClientConfigurationSystem.cs" />
- <Compile Include="System.Configuration\CommaDelimitedStringCollection.cs" />
- <Compile Include="System.Configuration\CommaDelimitedStringCollectionConverter.cs" />
- <Compile Include="System.Configuration\ConfigHelper.cs" />
- <Compile Include="System.Configuration\ConfigInfo.cs" />
- <Compile Include="System.Configuration\Configuration.cs" />
- <Compile Include="System.Configuration\ConfigurationAllowDefinition.cs" />
- <Compile Include="System.Configuration\ConfigurationAllowExeDefinition.cs" />
- <Compile Include="System.Configuration\ConfigurationCollectionAttribute.cs" />
- <Compile Include="System.Configuration\ConfigurationConverterBase.cs" />
- <Compile Include="System.Configuration\ConfigurationElement.cs" />
- <Compile Include="System.Configuration\ConfigurationElementCollection.cs" />
- <Compile Include="System.Configuration\ConfigurationElementCollectionType.cs" />
- <Compile Include="System.Configuration\ConfigurationElementProperty.cs" />
- <Compile Include="System.Configuration\ConfigurationErrorsException.cs" />
- <Compile Include="System.Configuration\ConfigurationFileMap.cs" />
- <Compile Include="System.Configuration\ConfigurationLocation.cs" />
- <Compile Include="System.Configuration\ConfigurationLocationCollection.cs" />
- <Compile Include="System.Configuration\ConfigurationLockCollection.cs" />
- <Compile Include="System.Configuration\ConfigurationManager.cs" />
- <Compile Include="System.Configuration\ConfigurationPermission.cs" />
- <Compile Include="System.Configuration\ConfigurationPermissionAttribute.cs" />
- <Compile Include="System.Configuration\ConfigurationProperty.cs" />
- <Compile Include="System.Configuration\ConfigurationPropertyAttribute.cs" />
- <Compile Include="System.Configuration\ConfigurationPropertyCollection.cs" />
- <Compile Include="System.Configuration\ConfigurationPropertyOptions.cs" />
- <Compile Include="System.Configuration\ConfigurationRemoveElement.cs" />
- <Compile Include="System.Configuration\ConfigurationSaveMode.cs" />
- <Compile Include="System.Configuration\ConfigurationSection.cs" />
- <Compile Include="System.Configuration\ConfigurationSectionCollection.cs" />
- <Compile Include="System.Configuration\ConfigurationSectionGroup.cs" />
- <Compile Include="System.Configuration\ConfigurationSectionGroupCollection.cs" />
- <Compile Include="System.Configuration\ConfigurationUserLevel.cs" />
- <Compile Include="System.Configuration\ConfigurationValidatorAttribute.cs" />
- <Compile Include="System.Configuration\ConfigurationValidatorBase.cs" />
- <Compile Include="System.Configuration\ConnectionStringSettings.cs" />
- <Compile Include="System.Configuration\ConnectionStringSettingsCollection.cs" />
- <Compile Include="System.Configuration\ConnectionStringsSection.cs" />
- <Compile Include="System.Configuration\ContextInformation.cs" />
- <Compile Include="System.Configuration\DefaultSection.cs" />
- <Compile Include="System.Configuration\DefaultValidator.cs" />
- <Compile Include="System.Configuration\DpapiProtectedConfigurationProvider.cs" />
- <Compile Include="System.Configuration\ElementInformation.cs" />
- <Compile Include="System.Configuration\ExeConfigurationFileMap.cs" />
- <Compile Include="System.Configuration\ExeContext.cs" />
- <Compile Include="System.Configuration\GenericEnumConverter.cs" />
- <Compile Include="System.Configuration\IConfigXmlNode.cs" />
- <Compile Include="System.Configuration\IgnoreSection.cs" />
- <Compile Include="System.Configuration\InfiniteIntConverter.cs" />
- <Compile Include="System.Configuration\InfiniteTimeSpanConverter.cs" />
- <Compile Include="System.Configuration\IntegerValidator.cs" />
- <Compile Include="System.Configuration\IntegerValidatorAttribute.cs" />
- <Compile Include="System.Configuration\InternalConfigurationFactory.cs" />
- <Compile Include="System.Configuration\InternalConfigurationHost.cs" />
- <Compile Include="System.Configuration\InternalConfigurationRoot.cs" />
- <Compile Include="System.Configuration\KeyValueConfigurationCollection.cs" />
- <Compile Include="System.Configuration\KeyValueConfigurationElement.cs" />
- <Compile Include="System.Configuration\KeyValueInternalCollection.cs" />
- <Compile Include="System.Configuration\LongValidator.cs" />
- <Compile Include="System.Configuration\LongValidatorAttribute.cs" />
- <Compile Include="System.Configuration\NameValueConfigurationCollection.cs" />
- <Compile Include="System.Configuration\NameValueConfigurationElement.cs" />
- <Compile Include="System.Configuration\NonEmptyStringFlags.cs" />
- <Compile Include="System.Configuration\PathLevel.cs" />
- <Compile Include="System.Configuration\PositiveTimeSpanValidator.cs" />
- <Compile Include="System.Configuration\PositiveTimeSpanValidatorAttribute.cs" />
- <Compile Include="System.Configuration\PropertyInformation.cs" />
- <Compile Include="System.Configuration\PropertyInformationCollection.cs" />
- <Compile Include="System.Configuration\PropertyValueOrigin.cs" />
- <Compile Include="System.Configuration\ProtectedConfiguration.cs" />
- <Compile Include="System.Configuration\ProtectedConfigurationProvider.cs" />
- <Compile Include="System.Configuration\ProtectedConfigurationProviderCollection.cs" />
- <Compile Include="System.Configuration\ProtectedConfigurationSection.cs" />
- <Compile Include="System.Configuration\ProtectedProviderSettings.cs" />
- <Compile Include="System.Configuration\ProviderSettings.cs" />
- <Compile Include="System.Configuration\ProviderSettingsCollection.cs" />
- <Compile Include="System.Configuration\RegexStringValidator.cs" />
- <Compile Include="System.Configuration\RegexStringValidatorAttribute.cs" />
- <Compile Include="System.Configuration\SectionGroupInfo.cs" />
- <Compile Include="System.Configuration\SectionInfo.cs" />
- <Compile Include="System.Configuration\SectionInformation.cs" />
- <Compile Include="System.Configuration\StringValidator.cs" />
- <Compile Include="System.Configuration\StringValidatorAttribute.cs" />
- <Compile Include="System.Configuration\SubclassTypeValidator.cs" />
- <Compile Include="System.Configuration\SubclassTypeValidatorAttribute.cs" />
- <Compile Include="System.Configuration\TimeSpanMinutesConverter.cs" />
- <Compile Include="System.Configuration\TimeSpanMinutesOrInfiniteConverter.cs" />
- <Compile Include="System.Configuration\TimeSpanPropertyFlags.cs" />
- <Compile Include="System.Configuration\TimeSpanSecondsConverter.cs" />
- <Compile Include="System.Configuration\TimeSpanSecondsOrInfiniteConverter.cs" />
- <Compile Include="System.Configuration\TimeSpanSerializedFormat.cs" />
- <Compile Include="System.Configuration\TimeSpanValidator.cs" />
- <Compile Include="System.Configuration\TimeSpanValidatorAttribute.cs" />
- <Compile Include="System.Configuration\TypeNameConverter.cs" />
- <Compile Include="System.Configuration\ValidatorCallback.cs" />
- <Compile Include="System.Configuration\WhiteSpaceTrimStringConverter.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-j2se-helpers="..\lib\J2SE.Helpers.jar" REFS-JarPath-system="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-system-xml="..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-RefInfo-rt="repository:jre:sun:1.4.2" REFS-JarPath-rt="" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Configuration/Test/System.Configuration.Test20.csproj b/mcs/class/System.Configuration/Test/System.Configuration.Test20.csproj
deleted file mode 100644
index 0eb76bab0f4..00000000000
--- a/mcs/class/System.Configuration/Test/System.Configuration.Test20.csproj
+++ /dev/null
@@ -1,131 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_2_0;TARGET_JVM</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>False</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A9AEBFBA-4D4C-495A-8851-C70E5132DC10}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Configuration.Test</RootNamespace>
- <AssemblyName>System.Configuration.Test20</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_2_0;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Configuration">
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="System.Configuration\AppSettingsSectionTest.cs" />
- <Compile Include="System.Configuration\CallbackValidatorTest.cs" />
- <Compile Include="System.Configuration\CommaDelimitedStringCollectionConverterTest.cs" />
- <Compile Include="System.Configuration\CommaDelimitedStringCollectionTest.cs" />
- <Compile Include="System.Configuration\ConfigurationElementTest.cs" />
- <Compile Include="System.Configuration\ConfigurationLockCollectionTest.cs" />
- <Compile Include="System.Configuration\ConfigurationManagerTest.cs" />
- <Compile Include="System.Configuration\ConfigurationPermissionTest.cs" />
- <Compile Include="System.Configuration\ConfigurationPropertyTest.cs" />
- <Compile Include="System.Configuration\ConnectionStringSettingsTest.cs" />
- <Compile Include="System.Configuration\DefaultValidatorTest.cs" />
- <Compile Include="System.Configuration\ExeConfigurationFileMapTest.cs" />
- <Compile Include="System.Configuration\GenericEnumConverterTest.cs" />
- <Compile Include="System.Configuration\InfiniteIntConverterTest.cs" />
- <Compile Include="System.Configuration\InfiniteTimeSpanConverterTest.cs" />
- <Compile Include="System.Configuration\IntegerValidatorTest.cs" />
- <Compile Include="System.Configuration\KeyValueConfigurationCollectionTest.cs" />
- <Compile Include="System.Configuration\KeyValueConfigurationElementTest.cs" />
- <Compile Include="System.Configuration\LongValidatorTest.cs" />
- <Compile Include="System.Configuration\PositiveTimeSpanValidatorTest.cs" />
- <Compile Include="System.Configuration\RegexStringValidatorTest.cs" />
- <Compile Include="System.Configuration\StringValidatorTest.cs" />
- <Compile Include="System.Configuration\SubclassTypeValidatorTest.cs" />
- <Compile Include="System.Configuration\TimeSpanMinutesConverterTest.cs" />
- <Compile Include="System.Configuration\TimeSpanMinutesOrInfiniteConverterTest.cs" />
- <Compile Include="System.Configuration\TimeSpanSecondsConverterTest.cs" />
- <Compile Include="System.Configuration\TimeSpanSecondsOrInfiniteConverterTest.cs" />
- <Compile Include="System.Configuration\TimeSpanValidatorTest.cs" />
- <Compile Include="System.Configuration\TypeNameConverterTest.cs" />
- <Compile Include="System.Configuration\WhiteSpaceTrimStringConverterTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-rt="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Data.jar" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-nunit-core="..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.core.jar" REFS-JarPath-nunit-framework="..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.framework.jar" REFS-JarPath-system-configuration="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Configuration.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Configuration/Test/System.Configuration.Test20.sln b/mcs/class/System.Configuration/Test/System.Configuration.Test20.sln
deleted file mode 100644
index 576916b5eee..00000000000
--- a/mcs/class/System.Configuration/Test/System.Configuration.Test20.sln
+++ /dev/null
@@ -1,23 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Configuration.Test20", "System.Configuration.Test20.csproj", "{A9AEBFBA-4D4C-495A-8851-C70E5132DC10}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {A9AEBFBA-4D4C-495A-8851-C70E5132DC10}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs
index 1efa2b99eb2..d2e1a240f6d 100644
--- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs
+++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationManagerTest.cs
@@ -429,11 +429,9 @@ namespace MonoTests.System.Configuration {
{
SysConfig cfg = ConfigurationManager.OpenMachineConfiguration ();
Assert.IsTrue (cfg.Sections.Count > 0, "#1");
-#if !TARGET_JVM
ConfigurationSection s = cfg.SectionGroups ["system.net"].Sections ["connectionManagement"];
Assert.IsNotNull (s, "#2");
Assert.IsTrue (s is ConnectionManagementSection, "#3");
-#endif
}
[Test]
diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs
index 3ba5d998874..35af604b15a 100644
--- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs
+++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPermissionTest.cs
@@ -71,7 +71,6 @@ namespace MonoTests.System.Configuration {
Assert.IsNull (p3, "A1");
}
-#if !TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Intersect_wrongtype ()
@@ -80,7 +79,6 @@ namespace MonoTests.System.Configuration {
IPermission p3 = p1.Intersect (new StrongNameIdentityPermission (PermissionState.Unrestricted));
}
-#endif
[Test]
public void Union ()
@@ -107,7 +105,6 @@ namespace MonoTests.System.Configuration {
Assert.IsTrue (((ConfigurationPermission)p3).IsUnrestricted(), "A2");
}
-#if !TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Union_wrongtypee ()
@@ -116,7 +113,6 @@ namespace MonoTests.System.Configuration {
IPermission p3 = p1.Union (new StrongNameIdentityPermission (PermissionState.Unrestricted));
}
-#endif
[Test]
public void Subset ()
@@ -133,7 +129,6 @@ namespace MonoTests.System.Configuration {
Assert.IsTrue (p2.IsSubsetOf (null), "A6");
}
-#if !TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Subset_wrongtype ()
@@ -142,12 +137,8 @@ namespace MonoTests.System.Configuration {
Assert.IsFalse (p1.IsSubsetOf (new StrongNameIdentityPermission (PermissionState.Unrestricted)));
}
-#endif
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void ToXml ()
{
ConfigurationPermission p = new ConfigurationPermission (PermissionState.Unrestricted);
diff --git a/mcs/class/System.Configuration/Test/Util/TestUtil.cs b/mcs/class/System.Configuration/Test/Util/TestUtil.cs
index cdaddedbbac..585271a2fe8 100644
--- a/mcs/class/System.Configuration/Test/Util/TestUtil.cs
+++ b/mcs/class/System.Configuration/Test/Util/TestUtil.cs
@@ -85,13 +85,9 @@ namespace MonoTests.System.Configuration.Util {
public static string ThisConfigFileName {
get {
-#if TARGET_JVM
- return "System.Configuration.Test20.jar.config";
-#else
var asm = Assembly.GetCallingAssembly ();
var exe = Path.GetFileName (asm.Location);
return exe + ".config";
-#endif
}
}
}
diff --git a/mcs/class/System.Core/System.Core.csproj b/mcs/class/System.Core/System.Core.csproj
deleted file mode 100644
index c686772d01a..00000000000
--- a/mcs/class/System.Core/System.Core.csproj
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <NoWarn>1720</NoWarn>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'basic|AnyCPU' ">
- <DefineConstants>BOOTSTRAP_BASIC,NET_1_1,NET_2_0,INSIDE_SYSCORE,LIBC,NET_3_5</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0,INSIDE_SYSCORE,LIBC,NET_3_5</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System.dll"/>
- <Reference Include="Mono.Posix">
- <HintPath>..\lib\net_2_0\Mono.Posix.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Core/System.Core.dll.sources b/mcs/class/System.Core/System.Core.dll.sources
index 8f7b67fec88..1c476016340 100644
--- a/mcs/class/System.Core/System.Core.dll.sources
+++ b/mcs/class/System.Core/System.Core.dll.sources
@@ -5,6 +5,7 @@ System/Funcs.cs
System/InvalidTimeZoneException.cs
System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.cs
+System/TimeZoneInfo.Serialization.cs
System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System.Runtime.CompilerServices/DynamicAttribute.cs
diff --git a/mcs/class/System.Core/System.Core_test.dll.sources b/mcs/class/System.Core/System.Core_test.dll.sources
index a306dad0d5e..f1df65f6d2d 100644
--- a/mcs/class/System.Core/System.Core_test.dll.sources
+++ b/mcs/class/System.Core/System.Core_test.dll.sources
@@ -1,5 +1,6 @@
System/TimeZoneInfoTest.cs
System/TimeZoneInfo.AdjustmentRuleTest.cs
+System/TimeZoneInfo.SerializationTest.cs
System/TimeZoneInfo.TransitionTimeTest.cs
System.Collections.Generic/HashSetTest.cs
System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs
diff --git a/mcs/class/System.Core/System.Linq.Expressions/Expression.cs b/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
index 9685771de92..b575b386907 100644
--- a/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
+++ b/mcs/class/System.Core/System.Linq.Expressions/Expression.cs
@@ -2265,11 +2265,9 @@ namespace System.Linq.Expressions {
internal static bool IsUnsigned (Type t)
{
-#if !TARGET_JVM
if (t.IsPointer)
return IsUnsigned (t.GetElementType ());
-#endif
return t == typeof (ushort) ||
t == typeof (uint) ||
t == typeof (ulong) ||
diff --git a/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs b/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
index 96a5fe1f8e3..d1d639b9a14 100644
--- a/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
+++ b/mcs/class/System.Core/System.Linq.Parallel/ParallelExecuter.cs
@@ -230,18 +230,23 @@ namespace System.Linq.Parallel
var implementerToken = options.ImplementerToken;
try {
+ // Avoid cache thrashing of locals array
+ var local = locals [index];
+
if (seedFunc == null) {
if (!enumerator.MoveNext ())
return;
- locals[index] = (U)(object)enumerator.Current;
+ local = (U)(object)enumerator.Current;
}
while (enumerator.MoveNext ()) {
if (implementerToken.IsCancellationRequested)
break;
token.ThrowIfCancellationRequested ();
- locals[index] = localCall (locals[index], enumerator.Current);
+ local = localCall (local, enumerator.Current);
}
+
+ locals [index] = local;
} finally {
enumerator.Dispose ();
}
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.MonoTouch.cs b/mcs/class/System.Core/System/TimeZoneInfo.MonoTouch.cs
index b0b5faa8af2..70b077de98c 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.MonoTouch.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.MonoTouch.cs
@@ -64,12 +64,15 @@ namespace System {
[DllImport ("__Internal")]
extern static IntPtr monotouch_timezone_get_data (string name, ref int size);
- static Stream GetMonoTouchData (string name)
+ static Stream GetMonoTouchData (string name, bool throw_on_error = true)
{
int size = 0;
IntPtr data = monotouch_timezone_get_data (name, ref size);
- if (size <= 0)
- throw new TimeZoneNotFoundException ();
+ if (size <= 0) {
+ if (throw_on_error)
+ throw new TimeZoneNotFoundException ();
+ return null;
+ }
unsafe {
var s = new UnmanagedMemoryStream ((byte*) data, size);
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs b/mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs
new file mode 100644
index 00000000000..22aa38c5fa6
--- /dev/null
+++ b/mcs/class/System.Core/System/TimeZoneInfo.Serialization.cs
@@ -0,0 +1,213 @@
+/*
+ * System.TimeZoneInfo.Serialization
+ *
+ * Author(s)
+ * Sasha Kotlyar <sasha@arktronic.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * 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 (INSIDE_CORLIB && NET_4_0) || (!INSIDE_CORLIB && (NET_3_5 && !NET_4_0 && !MOBILE))
+
+using System.Collections.Generic;
+using System.Globalization;
+using System.Runtime.Serialization;
+using System.Text;
+
+namespace System
+{
+ public partial class TimeZoneInfo
+ {
+ public static TimeZoneInfo FromSerializedString (string source)
+ {
+ var input = new StringBuilder (source);
+ var tzId = DeserializeString (ref input);
+ var offset = DeserializeInt (ref input);
+ var displayName = DeserializeString (ref input);
+ var standardName = DeserializeString (ref input);
+ var daylightName = DeserializeString (ref input);
+ var rules = new List<TimeZoneInfo.AdjustmentRule> ();
+ while (input [0] != ';') {
+ rules.Add (DeserializeAdjustmentRule (ref input));
+ }
+ var offsetSpan = TimeSpan.FromMinutes (offset);
+ return TimeZoneInfo.CreateCustomTimeZone (tzId, offsetSpan, displayName, standardName, daylightName, rules.ToArray ());
+ }
+
+ public string ToSerializedString ()
+ {
+ var stb = new StringBuilder ();
+ var daylightName = (string.IsNullOrEmpty(this.DaylightName) ? this.StandardName : this.DaylightName);
+ stb.AppendFormat ("{0};{1};{2};{3};{4};", EscapeForSerialization (this.Id), (int)this.BaseUtcOffset.TotalMinutes,
+ EscapeForSerialization (this.DisplayName), EscapeForSerialization (this.StandardName), EscapeForSerialization (daylightName));
+
+ if (this.SupportsDaylightSavingTime) {
+ foreach (var rule in this.GetAdjustmentRules()) {
+ var start = rule.DateStart.ToString ("MM:dd:yyyy", CultureInfo.InvariantCulture);
+ var end = rule.DateEnd.ToString ("MM:dd:yyyy", CultureInfo.InvariantCulture);
+ var delta = (int)rule.DaylightDelta.TotalMinutes;
+ var transitionStart = SerializeTransitionTime (rule.DaylightTransitionStart);
+ var transitionEnd = SerializeTransitionTime (rule.DaylightTransitionEnd);
+ stb.AppendFormat ("[{0};{1};{2};{3};{4};]", start, end, delta,
+ transitionStart, transitionEnd);
+ }
+ }
+
+ stb.Append (";");
+ return stb.ToString ();
+ }
+
+ private static TimeZoneInfo.AdjustmentRule DeserializeAdjustmentRule (ref StringBuilder input)
+ {
+ // Similar to: [01:01:0001;12:31:9999;60;[0;01:00:00;3;5;0;];[0;02:00:00;10;5;0;];]
+ if (input [0] != '[')
+ throw new SerializationException ();
+ input.Remove (0, 1); // [
+ var dateStart = DeserializeDate (ref input);
+ var dateEnd = DeserializeDate (ref input);
+ var delta = DeserializeInt (ref input);
+ var transitionStart = DeserializeTransitionTime (ref input);
+ var transitionEnd = DeserializeTransitionTime (ref input);
+ input.Remove (0, 1); // ]
+ var deltaSpan = TimeSpan.FromMinutes (delta);
+ return TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (dateStart, dateEnd, deltaSpan,
+ transitionStart, transitionEnd);
+ }
+
+ private static TimeZoneInfo.TransitionTime DeserializeTransitionTime (ref StringBuilder input)
+ {
+ if (input [0] != '[' || (input [1] != '0' && input [1] != '1') || input [2] != ';')
+ throw new SerializationException ();
+ var rule = input [1];
+ input.Remove (0, 3); // [#;
+ var timeOfDay = DeserializeTime (ref input);
+ var month = DeserializeInt (ref input);
+ if (rule == '0') {
+ // Floating rule such as: [0;01:00:00;3;5;0;];
+ var week = DeserializeInt (ref input);
+ var dayOfWeek = DeserializeInt (ref input);
+ input.Remove (0, 2); // ];
+ return TimeZoneInfo.TransitionTime.CreateFloatingDateRule (timeOfDay, month, week, (DayOfWeek)dayOfWeek);
+ }
+
+ // Fixed rule such as: [1;02:15:59.999;6;2;];
+ var day = DeserializeInt (ref input);
+ input.Remove (0, 2); // ];
+ return TimeZoneInfo.TransitionTime.CreateFixedDateRule (timeOfDay, month, day);
+ }
+
+ private static string DeserializeString (ref StringBuilder input)
+ {
+ var stb = new StringBuilder ();
+ var isEscaped = false;
+ int charCount;
+ for (charCount = 0; charCount < input.Length; charCount++) {
+ var inChar = input [charCount];
+ if (isEscaped) {
+ isEscaped = false;
+ stb.Append (inChar);
+ } else if (inChar == '\\') {
+ isEscaped = true;
+ continue;
+ } else if (inChar == ';') {
+ break;
+ } else {
+ stb.Append (inChar);
+ }
+ }
+ input.Remove (0, charCount + 1);
+ return stb.ToString ();
+ }
+
+ private static int DeserializeInt(ref StringBuilder input)
+ {
+ int charCount = 0;
+ while(charCount++ < input.Length)
+ {
+ if (input[charCount] == ';')
+ break;
+ }
+ int result;
+ if(!int.TryParse(input.ToString(0, charCount), NumberStyles.Integer, CultureInfo.InvariantCulture, out result))
+ throw new SerializationException();
+ input.Remove(0, charCount + 1);
+ return result;
+ }
+
+ private static DateTime DeserializeDate (ref StringBuilder input)
+ {
+ var inChars = new char[11];
+ input.CopyTo (0, inChars, 0, inChars.Length);
+ DateTime result;
+ if (!DateTime.TryParseExact (new string (inChars), "MM:dd:yyyy;", CultureInfo.InvariantCulture, DateTimeStyles.None, out result))
+ throw new SerializationException ();
+ input.Remove (0, inChars.Length);
+ return result;
+ }
+
+ private static DateTime DeserializeTime (ref StringBuilder input)
+ {
+ if (input [8] == ';') {
+ // Without milliseconds
+ var inChars = new char[9];
+ input.CopyTo (0, inChars, 0, inChars.Length);
+ DateTime result;
+ if (!DateTime.TryParseExact (new string (inChars), "HH:mm:ss;", CultureInfo.InvariantCulture, DateTimeStyles.NoCurrentDateDefault, out result))
+ throw new SerializationException ();
+ input.Remove (0, inChars.Length);
+ return result;
+ } else if (input [12] == ';') {
+ // With milliseconds
+ char[] inChars = new char[13];
+ input.CopyTo (0, inChars, 0, inChars.Length);
+ var inString = new string (inChars);
+ DateTime result;
+ if (!DateTime.TryParseExact (inString, "HH:mm:ss.fff;", CultureInfo.InvariantCulture, DateTimeStyles.NoCurrentDateDefault, out result))
+ throw new SerializationException ();
+ input.Remove (0, inChars.Length);
+ return result;
+ }
+ throw new SerializationException ();
+ }
+
+ private static string EscapeForSerialization (string unescaped)
+ {
+ return unescaped.Replace (@"\", @"\\").Replace (";", "\\;");
+ }
+
+ private static string SerializeTransitionTime (TimeZoneInfo.TransitionTime transition)
+ {
+ string timeOfDay;
+ if (transition.TimeOfDay.Millisecond > 0)
+ timeOfDay = transition.TimeOfDay.ToString ("HH:mm:ss.fff");
+ else
+ timeOfDay = transition.TimeOfDay.ToString ("HH:mm:ss");
+
+ if (transition.IsFixedDateRule) {
+ return string.Format ("[1;{0};{1};{2};]", timeOfDay, transition.Month, transition.Day);
+ }
+
+ return string.Format ("[0;{0};{1};{2};{3};]", timeOfDay, transition.Month,
+ transition.Week, (int)transition.DayOfWeek);
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/System.Core/System/TimeZoneInfo.cs b/mcs/class/System.Core/System/TimeZoneInfo.cs
index bdcda565469..aead18c764f 100644
--- a/mcs/class/System.Core/System/TimeZoneInfo.cs
+++ b/mcs/class/System.Core/System/TimeZoneInfo.cs
@@ -572,11 +572,6 @@ namespace System
}
#endif
- public static TimeZoneInfo FromSerializedString (string source)
- {
- throw new NotImplementedException ();
- }
-
public AdjustmentRule [] GetAdjustmentRules ()
{
if (!supportsDaylightSavingTime)
@@ -656,7 +651,9 @@ namespace System
#elif MONOTOUCH
if (systemTimeZones.Count == 0) {
foreach (string name in GetMonoTouchNames ()) {
- using (Stream stream = GetMonoTouchData (name)) {
+ using (Stream stream = GetMonoTouchData (name, false)) {
+ if (stream == null)
+ continue;
systemTimeZones.Add (BuildFromStream (name, stream));
}
}
@@ -876,11 +873,6 @@ namespace System
}
}
- public string ToSerializedString ()
- {
- throw new NotImplementedException ();
- }
-
public override string ToString ()
{
return DisplayName;
@@ -986,6 +978,8 @@ namespace System
int day = 1 + (transition.Week - 1) * 7 + (transition.DayOfWeek - first) % 7;
if (day > DateTime.DaysInMonth (year, transition.Month))
day -= 7;
+ if (day < 1)
+ day += 7;
return new DateTime (year, transition.Month, day) + transition.TimeOfDay.TimeOfDay;
}
diff --git a/mcs/class/System.Core/Test/System.Collections.Generic/HashSetTest.cs b/mcs/class/System.Core/Test/System.Collections.Generic/HashSetTest.cs
index 24d9c429e77..ebb23a691f3 100644
--- a/mcs/class/System.Core/Test/System.Collections.Generic/HashSetTest.cs
+++ b/mcs/class/System.Core/Test/System.Collections.Generic/HashSetTest.cs
@@ -96,7 +96,6 @@ namespace MonoTests.System.Collections.Generic {
}
[Test]
- [Category("TargetJvmNotWorking")]
public void TestCopyTo ()
{
var data = new [] {1, 2, 3, 4, 5};
diff --git a/mcs/class/System.Core/Test/System.Core.Tests-2008.JavaEE.csproj b/mcs/class/System.Core/Test/System.Core.Tests-2008.JavaEE.csproj
deleted file mode 100644
index d8945b06e3c..00000000000
--- a/mcs/class/System.Core/Test/System.Core.Tests-2008.JavaEE.csproj
+++ /dev/null
@@ -1,222 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{79C9301F-06F0-431C-B72A-0FF2F63C0BF8}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Core.Tests</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>3.5</OldToolsVersion>
- <RootNamespace>System.Core.Tests</RootNamespace>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <jarserver>ipa</jarserver>
- <PublishUrl>http://localhost/System.Core.Tests-2008.JavaEE/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <StartupObject>
- </StartupObject>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>DEBUG;TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_3_5;TARGET_JVM;DEBUG</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <PreCompile>true</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <UseTestingPage>true</UseTestingPage>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_3_5;TARGET_JVM</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <PreCompile>true</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <UseTestingPage>true</UseTestingPage>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-core="repository:vmw:framework:2.0" REFS-JarPath-system-core="" REFS-RefInfo-system-core-2008-javaee="j2il:" REFS-JarPath-system-core-2008-javaee="..\bin\Debug_Java\System.Core-2008.JavaEE.jar" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system="" REFS-RefInfo-nunit-framework="j2il:" REFS-JarPath-nunit-framework="..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.jar" REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="rt, Version=1.6.0.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <None Include="System.Collections.Generic\ChangeLog" />
- <None Include="System.Linq.Expressions\ChangeLog" />
- <None Include="System.Linq\ChangeLog" />
- <None Include="System\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="System.Collections.Generic\HashSetTest.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Add.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_AddChecked.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_And.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_AndAlso.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ArrayIndex.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ArrayLength.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Bind.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Call.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Coalesce.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Condition.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Constant.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Convert.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Divide.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ElementInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Equal.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ExclusiveOr.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Field.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_GreaterThan.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_GreaterThanOrEqual.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Invoke.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Lambda.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_LeftShift.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_LessThan.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_LessThanOrEqual.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Lift.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ListBind.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ListInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MakeBinary.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MemberBind.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MemberInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Modulo.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Multiply.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MultiplyChecked.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Negate.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_New.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_NewArrayBounds.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_NewArrayInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Not.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Or.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_OrElse.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Power.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Property.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_PropertyOrField.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Quote.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_RightShift.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Subtract.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_SubtractChecked.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_TypeAs.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_TypeIs.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_UnaryPlus.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Utils.cs" />
- <Compile Include="System.Linq\EnumerableAsQueryableTest.cs" />
- <Compile Include="System.Linq\EnumerableMoreTest.cs" />
- <Compile Include="System.Linq\EnumerableTest.cs" />
- <Compile Include="System.Linq\QueryableProviderTest.cs" />
- <Compile Include="System.Linq\QueryableTest.cs" />
- <Compile Include="System\TimeZoneInfo.AdjustmentRuleTest.cs" />
- <Compile Include="System\TimeZoneInfo.TransitionTimeTest.cs" />
- <Compile Include="System\TimeZoneInfoTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
-</Project>
diff --git a/mcs/class/System.Core/Test/System.Core.Tests-2008.csproj b/mcs/class/System.Core/Test/System.Core.Tests-2008.csproj
deleted file mode 100755
index 9702fce8a6c..00000000000
--- a/mcs/class/System.Core/Test/System.Core.Tests-2008.csproj
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F902A50D-6156-4935-A1AC-E82DF0EB83D3}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Core.Tests</RootNamespace>
- <AssemblyName>System.Core.Tests</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Test.NET|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Test.NET\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework" />
- <Reference Include="System" />
- <Reference Condition=" '$(Configuration)' == 'Test.NET' " Include="System.Core" />
- </ItemGroup>
- <ItemGroup>
- <None Include="System.Collections.Generic\ChangeLog" />
- <None Include="System.Linq\ChangeLog" />
- <None Include="System\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="System.Collections.Generic\HashSetTest.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Convert.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Add.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_AddChecked.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_And.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_AndAlso.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ArrayIndex.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ArrayLength.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Bind.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Call.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Coalesce.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Condition.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Constant.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Divide.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ElementInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Equal.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ExclusiveOr.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Field.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_GreaterThan.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_GreaterThanOrEqual.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Invoke.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Lambda.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_LeftShift.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_LessThan.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_LessThanOrEqual.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Lift.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ListBind.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_ListInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MakeBinary.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MemberBind.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MemberInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Modulo.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Multiply.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_MultiplyChecked.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Negate.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_New.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_NewArrayBounds.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_NewArrayInit.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Not.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_NotEqual.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Or.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_OrElse.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Power.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Property.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_PropertyOrField.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Quote.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_RightShift.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Subtract.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_SubtractChecked.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_TypeAs.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_TypeIs.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_UnaryPlus.cs" />
- <Compile Include="System.Linq.Expressions\ExpressionTest_Utils.cs" />
- <Compile Include="System.Linq\EnumerableAsQueryableTest.cs" />
- <Compile Include="System.Linq\EnumerableFixture.cs" />
- <Compile Include="System.Linq\EnumerableMoreTest.cs" />
- <Compile Include="System.Linq\EnumerableTest.cs" />
- <Compile Include="System.Linq\LookupTest.cs" />
- <Compile Include="System.Linq\QueryableProviderTest.cs" />
- <Compile Include="System.Linq\QueryableTest.cs" />
- <Compile Include="System\TimeZoneInfo.AdjustmentRuleTest.cs" />
- <Compile Include="System\TimeZoneInfo.TransitionTimeTest.cs" />
- <Compile Include="System\TimeZoneInfoTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Condition=" '$(Configuration)' == 'Debug' or '$(Configuration)' == 'Release' " Include="..\System.Core-2008.csproj">
- <Project>{D287D5CA-4F81-4215-AFC8-8A1413696884}</Project>
- <Name>System.Core-2008</Name>
- <Private>True</Private>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest.cs b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest.cs
index d524e80f5c1..37d7a00082c 100644
--- a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest.cs
+++ b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest.cs
@@ -192,7 +192,6 @@ namespace MonoTests.System.Linq.Expressions {
}
[Test]
- [Category("TargetJvmNotSupported")]
public void ExpressionDelegateTarget ()
{
var p = Expression.Parameter (typeof (string), "str");
@@ -220,7 +219,6 @@ namespace MonoTests.System.Linq.Expressions {
#if !NET_4_0
[Test]
- [Category ("TargetJvmNotSupported")]
public void GlobalsInScope ()
{
var foo = new Foo { gazonk = "gazonk" };
diff --git a/mcs/class/System.Core/Test/System/TimeZoneInfo.SerializationTest.cs b/mcs/class/System.Core/Test/System/TimeZoneInfo.SerializationTest.cs
new file mode 100644
index 00000000000..f4d0cfa1e8c
--- /dev/null
+++ b/mcs/class/System.Core/Test/System/TimeZoneInfo.SerializationTest.cs
@@ -0,0 +1,97 @@
+using System;
+using System.IO;
+using NUnit.Framework;
+
+namespace MonoTests.System
+{
+ [TestFixture]
+ public class SerializedStringTests
+ {
+ [Test]
+ public void SerializeUtc ()
+ {
+ Assert.AreEqual ("UTC;0;UTC;UTC;UTC;;", TimeZoneInfo.Utc.ToSerializedString ());
+ }
+
+ [Test]
+ public void DeserializeUtc ()
+ {
+ var utc = TimeZoneInfo.FromSerializedString ("UTC;0;UTC;UTC;UTC;;");
+ Assert.AreEqual ("UTC", utc.Id);
+ Assert.AreEqual ("UTC", utc.DisplayName);
+ Assert.AreEqual ("UTC", utc.StandardName);
+ Assert.IsFalse (utc.SupportsDaylightSavingTime);
+ Assert.AreEqual (0, utc.GetAdjustmentRules ().Length);
+ }
+
+ [Test]
+ public void SerializeCustomUtcZoneWithOddNaming ()
+ {
+ var tz1 = TimeZoneInfo.CreateCustomTimeZone (@"My\; Zone, @1!.", TimeSpan.FromMinutes (0), @"My\\; Zone 1 Name", "My; Zone 1 Standard Time");
+ Assert.AreEqual (@"My\\\; Zone, @1!.;0;My\\\\\; Zone 1 Name;My\; Zone 1 Standard Time;My\; Zone 1 Standard Time;;", tz1.ToSerializedString ());
+ }
+
+ [Test]
+ public void SerializeCustomZoneWithOddOffset ()
+ {
+ var tz2 = TimeZoneInfo.CreateCustomTimeZone ("My Zone 2", TimeSpan.FromHours (1.25), "My Zone 2 Name", "My Zone 2 Standard Time");
+ Assert.AreEqual ("My Zone 2;75;My Zone 2 Name;My Zone 2 Standard Time;My Zone 2 Standard Time;;", tz2.ToSerializedString ());
+ }
+
+ [Test]
+ public void SerializeCustomZoneWithFloatingDaylightTransitions ()
+ {
+ var tz3rules = new TimeZoneInfo.AdjustmentRule[] { TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (1, 1, 1), new DateTime (9999, 12, 31), TimeSpan.FromMinutes (23), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 58, 0), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday)) };
+ var tz3 = TimeZoneInfo.CreateCustomTimeZone ("My Zone 3", TimeSpan.FromHours (-4), "My Zone 3 Name", "My Zone 3 Standard Time", "My Zone 3 Daylight Time", tz3rules);
+ Assert.AreEqual ("My Zone 3;-240;My Zone 3 Name;My Zone 3 Standard Time;My Zone 3 Daylight Time;[01:01:0001;12:31:9999;23;[0;02:15:58;3;2;2;];[0;02:15:59.999;6;2;2;];];", tz3.ToSerializedString ());
+ }
+
+ [Test]
+ public void SerializeCustomZoneWithFixedDaylightTransitions ()
+ {
+ var tz4rules = new TimeZoneInfo.AdjustmentRule[] { TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (1, 1, 1), new DateTime (9999, 12, 31), TimeSpan.FromMinutes (23), TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1, 1, 1, 2, 15, 59, 48), 3, 2), TimeZoneInfo.TransitionTime.CreateFixedDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2)) };
+ var tz4 = TimeZoneInfo.CreateCustomTimeZone ("My Zone 4", TimeSpan.FromHours (-4), "My Zone 4 Name", "My Zone 4 Standard Time", "My Zone 4 Daylight Time", tz4rules);
+ Assert.AreEqual ("My Zone 4;-240;My Zone 4 Name;My Zone 4 Standard Time;My Zone 4 Daylight Time;[01:01:0001;12:31:9999;23;[1;02:15:59.048;3;2;];[1;02:15:59.999;6;2;];];", tz4.ToSerializedString ());
+ }
+
+ [Test]
+ public void SerializeCustomZoneWithMultipleDaylightRules ()
+ {
+ var tz5rules = new TimeZoneInfo.AdjustmentRule[] {
+ TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (1, 1, 1), new DateTime (2012, 12, 31), TimeSpan.FromMinutes (23), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday)),
+ TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (2013, 1, 1), new DateTime (9999, 12, 31), TimeSpan.FromMinutes (48), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday))
+ };
+ var tz5 = TimeZoneInfo.CreateCustomTimeZone ("My Zone 5", TimeSpan.FromHours (-6.75), "My Zone 5 Name", "My Zone 5 Standard Time", "My Zone 5 Daylight Time", tz5rules);
+ Assert.AreEqual ("My Zone 5;-405;My Zone 5 Name;My Zone 5 Standard Time;My Zone 5 Daylight Time;[01:01:0001;12:31:2012;23;[0;02:15:59.999;3;2;2;];[0;02:15:59.999;6;2;2;];][01:01:2013;12:31:9999;48;[0;02:15:59.999;3;2;2;];[0;02:15:59.999;6;2;2;];];", tz5.ToSerializedString ());
+ }
+
+ [Test]
+ public void DeserializeCustomZoneWithOddNamingAndMultipleDaylightRules ()
+ {
+ var rule1 = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (1, 1, 1), new DateTime (2012, 12, 31), TimeSpan.FromMinutes (23), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday));
+ var rule2 = TimeZoneInfo.AdjustmentRule.CreateAdjustmentRule (new DateTime (2013, 1, 1), new DateTime (9999, 12, 31), TimeSpan.FromMinutes (48), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 3, 2, DayOfWeek.Tuesday), TimeZoneInfo.TransitionTime.CreateFloatingDateRule (new DateTime (1, 1, 1, 2, 15, 59, 999), 6, 2, DayOfWeek.Tuesday));
+
+ var tz1 = TimeZoneInfo.FromSerializedString ("My\\; Zone 5;-405;My Zone\\; 5 Name;My Zone 5\\; Standard Time;My Zone 5 Daylight\\; Time;[01:01:0001;12:31:2012;23;[0;02:15:59.999;3;2;2;];[0;02:15:59.999;6;2;2;];][01:01:2013;12:31:9999;48;[0;02:15:59.999;3;2;2;];[0;02:15:59.999;6;2;2;];];");
+ Assert.AreEqual ("My; Zone 5", tz1.Id);
+ Assert.AreEqual ("My Zone; 5 Name", tz1.DisplayName);
+ Assert.AreEqual ("My Zone 5; Standard Time", tz1.StandardName);
+ Assert.AreEqual ("My Zone 5 Daylight; Time", tz1.DaylightName);
+ Assert.AreEqual (TimeSpan.FromMinutes (-405), tz1.BaseUtcOffset);
+ Assert.IsTrue (tz1.SupportsDaylightSavingTime);
+
+ var deserializedRules = tz1.GetAdjustmentRules ();
+ Assert.AreEqual (2, deserializedRules.Length);
+ Assert.IsFalse (deserializedRules [0].Equals (deserializedRules [1]));
+ Assert.IsTrue (rule1.Equals (deserializedRules [0]));
+ Assert.IsTrue (rule2.Equals (deserializedRules [1]));
+ }
+
+ [Test]
+ public void DeserializeAndUseEasternTimeZone ()
+ {
+ var et = TimeZoneInfo.FromSerializedString (@"Eastern Standard Time;-300;(UTC-05:00) Eastern Time (US & Canada);Eastern Standard Time;Eastern Daylight Time;[01:01:0001;12:31:2006;60;[0;02:00:00;4;1;0;];[0;02:00:00;10;5;0;];][01:01:2007;12:31:9999;60;[0;02:00:00;3;2;0;];[0;02:00:00;11;1;0;];];");
+ var testDate = new DateTime (2014, 8, 1, 6, 0, 0, DateTimeKind.Unspecified);
+ Assert.AreEqual (TimeSpan.FromHours (-4), et.GetUtcOffset (testDate));
+ }
+ }
+}
diff --git a/mcs/class/System.Core/mobile_System.Core.dll.sources b/mcs/class/System.Core/mobile_System.Core.dll.sources
index a63481f69d6..dee2534a29b 100644
--- a/mcs/class/System.Core/mobile_System.Core.dll.sources
+++ b/mcs/class/System.Core/mobile_System.Core.dll.sources
@@ -4,6 +4,7 @@ System/Funcs.cs
System/InvalidTimeZoneException.cs
System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.cs
+System/TimeZoneInfo.Serialization.cs
System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System/Util.cs
diff --git a/mcs/class/System.Core/net_4_0_System.Core.dll.sources b/mcs/class/System.Core/net_4_0_System.Core.dll.sources
index 65bcfd88012..ee0a10c7b1c 100644
--- a/mcs/class/System.Core/net_4_0_System.Core.dll.sources
+++ b/mcs/class/System.Core/net_4_0_System.Core.dll.sources
@@ -5,6 +5,7 @@ System/Funcs.cs
System/InvalidTimeZoneException.cs
System/TimeZoneInfo.AdjustmentRule.cs
System/TimeZoneInfo.cs
+System/TimeZoneInfo.Serialization.cs
System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System/Util.cs
diff --git a/mcs/class/System.Data.DataSetExtensions/Assembly/AssemblyInfo.cs b/mcs/class/System.Data.DataSetExtensions/Assembly/AssemblyInfo.cs
index 0f367dd986f..2d977b1dceb 100644
--- a/mcs/class/System.Data.DataSetExtensions/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Data.DataSetExtensions/Assembly/AssemblyInfo.cs
@@ -54,12 +54,8 @@ using System.Runtime.InteropServices;
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: CLSCompliant (true)]
-#if TARGET_JVM
-[assembly: AssemblyDelaySign (false)]
-#else
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../ecma.pub")]
-#endif
[assembly: ComVisible (false)]
[assembly: AllowPartiallyTrustedCallers]
diff --git a/mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.csproj b/mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.csproj
deleted file mode 100644
index fc240e05bd5..00000000000
--- a/mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.csproj
+++ /dev/null
@@ -1,149 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7FD742E6-7FAB-47B7-B6DD-99ABB44B5914}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Data.DataSetExtensions</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>2.0</OldToolsVersion>
- <RootNamespace>System.Data.DataSetExtensions</RootNamespace>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <jarserver>ip2</jarserver>
- <PublishUrl>http://localhost/System.Data.DataSetExtensions/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_3_5;TARGET_JVM</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <PreCompile>true</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <UseTestingPage>true</UseTestingPage>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_3_5;TARGET_JVM</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <PreCompile>true</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <UseTestingPage>true</UseTestingPage>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Data\DataRowComparer.cs" />
- <Compile Include="System.Data\DataRowComparer_1.cs" />
- <Compile Include="System.Data\DataRowExtensions.cs" />
- <Compile Include="System.Data\DataTableExtensions.cs" />
- <Compile Include="System.Data\EnumerableRowCollection.cs" />
- <Compile Include="System.Data\EnumerableRowCollectionExtensions.cs" />
- <Compile Include="System.Data\EnumerableRowCollection_1.cs" />
- <Compile Include="System.Data\OrderedEnumerableRowCollection.cs" />
- <Compile Include="System.Data\RowEnumerableDataReader.cs" />
- <Compile Include="System.Data\TypedTableBase.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data\TypedTableBaseExtensions.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="rt, Version=1.6.0.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\System.Data\System.Data20.csproj">
- <Project>{BD83C476-AEC7-4535-8158-977B04887AF0}</Project>
- <Name>System.Data20</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-rt="repository:jre:sun:1.6.0" REFS-JarPath-rt="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system="" REFS-JarPath-system-core="" REFS-RefInfo-system-core="repository:vmw:framework:2.0" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln b/mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln
deleted file mode 100644
index 833b367f4ff..00000000000
--- a/mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.DataSetExtensions", "System.Data.DataSetExtensions.csproj", "{7FD742E6-7FAB-47B7-B6DD-99ABB44B5914}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data20", "..\System.Data\System.Data20.csproj", "{BD83C476-AEC7-4535-8158-977B04887AF0}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7FD742E6-7FAB-47B7-B6DD-99ABB44B5914}.Debug_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {7FD742E6-7FAB-47B7-B6DD-99ABB44B5914}.Debug_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {7FD742E6-7FAB-47B7-B6DD-99ABB44B5914}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {7FD742E6-7FAB-47B7-B6DD-99ABB44B5914}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Debug_Java|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Release_Java|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Release_Java|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.csproj b/mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.csproj
deleted file mode 100644
index d9d4c241805..00000000000
--- a/mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.csproj
+++ /dev/null
@@ -1,91 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D6170533-C107-4282-B8BB-571C5BAD1D1C}</ProjectGuid>
- <ProjectTypeGuids>{f6b19d50-1e2e-4e87-adfb-10393b439de0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Data.DataSetExtensions.Test</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <RootNamespace>System.Data.DataSetExtensions.Test</RootNamespace>
- <jarserver>ip2</jarserver>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>DEBUG;TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="System.Data\DataRowComparerTest.cs" />
- <Compile Include="System.Data\DataTableExtensionsTest.cs" />
- <Compile Include="System.Data\EnumerableRowCollectionTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="rt, Version=1.6.0.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" />
- <Reference Include="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj">
- <Project>{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}</Project>
- <Name>nunit.framework.dll20.J2EE</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system-core="" REFS-RefInfo-system-core="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-data-datasetextensions="" REFS-RefInfo-system-data-datasetextensions="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-system-xml-linq="" REFS-RefInfo-system-xml-linq="repository:vmw:framework:2.0" REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.sln b/mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.sln
deleted file mode 100644
index 38dc034a799..00000000000
--- a/mcs/class/System.Data.DataSetExtensions/Test/System.Data.DataSetExtensions.Test.JavaEE.sln
+++ /dev/null
@@ -1,60 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.DataSetExtensions.Test.JavaEE", "System.Data.DataSetExtensions.Test.JavaEE.csproj", "{D6170533-C107-4282-B8BB-571C5BAD1D1C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.dll20.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj", "{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.DataSetExtensions.Test", "System.Data.DataSetExtensions.Test.csproj", "{7C7649EB-F476-4D07-B9DA-896C97148DE8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Debug|Any CPU = Debug|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Debug_Java20|Any CPU.Build.0 = Debug_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Debug|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Debug|Any CPU.Build.0 = Debug_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Release_Java20|Any CPU.ActiveCfg = Release_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Release_Java20|Any CPU.Build.0 = Release_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Release|Any CPU.ActiveCfg = Release_Java|Any CPU
- {D6170533-C107-4282-B8BB-571C5BAD1D1C}.Release|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug|Any CPU.Build.0 = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release|Any CPU.ActiveCfg = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release|Any CPU.Build.0 = Release_Java|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Debug_Java|Any CPU.ActiveCfg = Debug|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Debug_Java|Any CPU.Build.0 = Debug|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Debug_Java20|Any CPU.ActiveCfg = Debug|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Debug_Java20|Any CPU.Build.0 = Debug|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Release_Java|Any CPU.ActiveCfg = Release|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Release_Java|Any CPU.Build.0 = Release|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Release_Java20|Any CPU.ActiveCfg = Release|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Release_Java20|Any CPU.Build.0 = Release|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7C7649EB-F476-4D07-B9DA-896C97148DE8}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs
index b6c229efb5e..acef0f90478 100644
--- a/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs
+++ b/mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs
@@ -830,9 +830,12 @@ namespace DbLinq.Data.Linq
}
}
- private static MethodInfo _WhereMethod = typeof(Queryable).GetMethods().First(m => m.Name == "Where");
+ private static MethodInfo _WhereMethod;
internal object GetOtherTableQuery(Expression predicate, ParameterExpression parameter, Type otherTableType, IQueryable otherTable)
{
+ if (_WhereMethod == null)
+ System.Threading.Interlocked.CompareExchange (ref _WhereMethod, typeof(Queryable).GetMethods().First(m => m.Name == "Where"), null);
+
//predicate: other.EmployeeID== "WARTH"
Expression lambdaPredicate = Expression.Lambda(predicate, parameter);
//lambdaPredicate: other=>other.EmployeeID== "WARTH"
diff --git a/mcs/class/System.Data.Linq/src/DbLinq/Schema/Dbml/DatabaseSerializer.cs b/mcs/class/System.Data.Linq/src/DbLinq/Schema/Dbml/DatabaseSerializer.cs
index 073eef9f156..d6723da8211 100644
--- a/mcs/class/System.Data.Linq/src/DbLinq/Schema/Dbml/DatabaseSerializer.cs
+++ b/mcs/class/System.Data.Linq/src/DbLinq/Schema/Dbml/DatabaseSerializer.cs
@@ -2144,7 +2144,6 @@ namespace DbLinq.Schema.Dbml
}
}
- #if !TARGET_JVM
#if !MONO_STRICT
public
#endif
@@ -2218,6 +2217,5 @@ namespace DbLinq.Schema.Dbml
}
}
- #endif
}
diff --git a/mcs/class/System.Data.OracleClient/Assembly/AssemblyInfo.cs b/mcs/class/System.Data.OracleClient/Assembly/AssemblyInfo.cs
index a99d8338b1b..ae6d540857f 100644
--- a/mcs/class/System.Data.OracleClient/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Data.OracleClient/Assembly/AssemblyInfo.cs
@@ -32,11 +32,9 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../ecma.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: AllowPartiallyTrustedCallers]
diff --git a/mcs/class/System.Data.OracleClient/Makefile b/mcs/class/System.Data.OracleClient/Makefile
index 14ff32d89ef..f2c31271bb7 100644
--- a/mcs/class/System.Data.OracleClient/Makefile
+++ b/mcs/class/System.Data.OracleClient/Makefile
@@ -3,23 +3,10 @@ SUBDIRS =
include ../../build/rules.make
LIBRARY = System.Data.OracleClient.dll
-ifeq (net_1_1_java, $(PROFILE))
-LIB_MCS_FLAGS = \
- -r:rt.dll \
- -r:J2SE.Helpers.dll \
- /r:System.dll \
- /r:System.Xml.dll /r:../../class/lib/net_1_1_java/System.Data.dll \
- -nowarn:649 -nowarn:169 -nowarn:219 -nowarn:168 -nowarn:1595 \
- -r:$(corlib) \
- -r:System.Xml.dll \
- /r:System.Drawing.dll
-
-else
LIB_MCS_FLAGS = /r:$(corlib) /r:System.dll \
/r:System.Xml.dll /r:System.Data.dll \
/r:System.EnterpriseServices.dll \
/r:System.Drawing.dll
-endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) /nowarn:618
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleCommand.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleCommand.cs
deleted file mode 100644
index 1e59ffcf3a8..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleCommand.cs
+++ /dev/null
@@ -1,284 +0,0 @@
-//
-// System.Data.OracleClient.OracleCommand
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Data;
-using System.Data.Common;
-using System.Data.ProviderBase;
-using System.Globalization;
-
-using java.sql;
-// Cannot use this because it makes ArrayList ambiguous reference
-//using java.util;
-#if !USE_DOTNET_REGEXP
-using java.util.regex;
-#endif
-
-namespace System.Data.OracleClient {
- public sealed class OracleCommand : AbstractDbCommand {
-
- #region Fields
-#if USE_DOTNET_REGEXP
- internal static readonly Regex NamedParameterStoredProcedureRegExp = new Regex(@"^\s*{?\s*((?<RETVAL>\:\w+)\s*=\s*)?call\s+(?<PROCNAME>(((\[[^\]]*\])|([^\.\(])*)\s*\.\s*){0,2}(\[[^\]]*\]|((\s*[^\.\(\)\{\}\s])+)))\s*(\(\s*(?<USERPARAM>((""([^""]|(""""))*"")|('([^']|(''))*')|[^,])*)?\s*(,\s*(?<USERPARAM>((""([^""]|(""""))*"")|('([^']|(''))*')|[^,])*)\s*)*\))?\s*}?\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
-#else
- internal static readonly Pattern NamedParameterStoredProcedureRegExp = Pattern.compile(@"^\s*\{?\s*(?:(\:\w+)\s*=\s*)?call\s+((?:(?:(?:\[[^\]]*\])|(?:[^\.\(\)\{\}\[\]])*)\s*\.\s*){0,2}(?:\[[^\]]*\]|(?:(?:\s*[^\.\(\)\{\}\[\]])+)))\s*(?:\((.*)\))?\s*\}?\s*$", Pattern.CASE_INSENSITIVE);
-#endif
- internal static readonly SimpleRegex NamedParameterRegExp = new OracleParamsRegex();
-
-// internal static readonly int oracleTypeRefCursor = java.sql.Types.OTHER;
-
- private int _currentParameterIndex = 0;
- private ResultSet _currentRefCursor;
-
- #endregion // Fields
-
- #region Constructors
-
- /**
- * Initializes a new instance of the OracleCommand class.
- * The base constructor initializes all fields to their default values.
- * The following table shows initial property values for an instance of SqlCommand.
- */
- public OracleCommand() : this(null, null, null) {
- }
-
- public OracleCommand(OracleConnection connection) : this(null, connection, null) {
- }
-
- /**
- * Initializes a new instance of the OracleCommand class with the text of the query.
- * @param cmdText The text of the query.
- */
- public OracleCommand(String cmdText) : this(cmdText, null, null) {
- }
-
- /**
- * Initializes a new instance of the OracleCommand class with the text of the query and a SqlConnection.
- * @param cmdText The text of the query.
- * @param connection A SqlConnection that represents the connection to an instance of SQL Server.
- */
- public OracleCommand(String cmdText, OracleConnection connection) : this(cmdText, connection, null) {
- }
-
- /**
- * Initializes a new instance of the OracleCommand class with the text of the query, a SqlConnection, and the Transaction.
- * @param cmdText The text of the query.
- * @param connection A SqlConnection that represents the connection to an instance of SQL Server.
- * @param transaction The SqlTransaction in which the OracleCommand executes.
- */
- public OracleCommand(
- String cmdText,
- OracleConnection connection,
- OracleTransaction transaction)
- : base(cmdText, connection, transaction) {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public new OracleConnection Connection {
- get { return (OracleConnection)base.Connection; }
- set { base.Connection = (AbstractDBConnection)value; }
- }
-
- public new OracleParameterCollection Parameters {
- get {
- return (OracleParameterCollection)base.Parameters;
- }
- }
-
- public new OracleTransaction Transaction {
- get { return (OracleTransaction)base.Transaction; }
- set { base.Transaction = (DbTransaction)value; }
- }
-
- protected override bool SkipParameter(DbParameter parameter) {
- return ((OracleParameter)parameter).OracleType == OracleType.Cursor;
- }
-
- protected sealed override ResultSet CurrentResultSet {
- get {
- try {
- ResultSet resultSet = base.CurrentResultSet;
-
- if (resultSet != null) {
- return resultSet;
- }
- return CurrentRefCursor;
- }
- catch(SQLException e) {
- throw CreateException(e);
- }
- }
- }
-
- private ResultSet CurrentRefCursor {
- get {
- if (_currentParameterIndex < 0) {
- NextRefCursor();
- }
- if (_currentRefCursor == null && _currentParameterIndex < InternalParameters.Count) {
- _currentRefCursor = (ResultSet)((CallableStatement)Statement).getObject(_currentParameterIndex + 1);
- }
- return _currentRefCursor;
- }
- }
-
-#if USE_DOTNET_REGEX
- protected override Regex StoredProcedureRegExp
-#else
- protected override java.util.regex.Pattern StoredProcedureRegExp {
-#endif
- get { return NamedParameterStoredProcedureRegExp; }
- }
-
- protected override SimpleRegex ParameterRegExp {
- get { return NamedParameterRegExp; }
- }
-
- #endregion // Properties
-
- #region Methods
-
- protected override bool NextResultSet() {
- try {
- bool hasMoreResults = base.NextResultSet();
-
- if (hasMoreResults) {
- return true;
- }
- else {
- return NextRefCursor();
- }
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- }
-
- private bool NextRefCursor() {
- _currentRefCursor = null;
- for (_currentParameterIndex++;InternalParameters.Count > _currentParameterIndex;_currentParameterIndex++) {
- OracleParameter param = (OracleParameter)InternalParameters[_currentParameterIndex];
- if (param.OracleType == OracleType.Cursor && ((param.Direction & ParameterDirection.Output) == ParameterDirection.Output))
- return true;
- }
- return false;
- }
-
- public new OracleDataReader ExecuteReader() {
- return (OracleDataReader)ExecuteReader(CommandBehavior.Default);
- }
-
- public new OracleDataReader ExecuteReader(CommandBehavior behavior) {
- return (OracleDataReader)base.ExecuteReader(behavior);
- }
-
- public new OracleParameter CreateParameter() {
- return (OracleParameter)CreateParameterInternal();
- }
-
- protected sealed override void CheckParameters() {
- //TBD
- }
-
- protected override AbstractDbParameter GetUserParameter(string parameterName, IList userParametersList, int userParametersListPosition) {
- for(int i=0; i < userParametersList.Count; i++) {
- OracleParameter userParameter = (OracleParameter)userParametersList[i];
- if (String.Compare(parameterName, userParameter.InternalPlaceholder.Trim(), true, CultureInfo.InvariantCulture) == 0) {
- return userParameter;
- }
- }
-
- return null;
- }
-
- protected override AbstractDbParameter GetReturnParameter (IList userParametersList) {
- for(int i=0; i < userParametersList.Count; i++) {
- AbstractDbParameter userParameter = (AbstractDbParameter)userParametersList[i];
- if (userParameter.Direction == ParameterDirection.ReturnValue) {
- return userParameter;
- }
- }
-
- return null;
- }
-
- protected sealed override DbParameter CreateParameterInternal() {
- return new OracleParameter();
- }
-
- protected sealed override DbParameterCollection CreateParameterCollection(AbstractDbCommand parent) {
- return new OracleParameterCollection((OracleCommand)parent);
- }
-
- public override object Clone() {
- OracleCommand clone = (OracleCommand)base.Clone();
- clone._currentParameterIndex = 0;
- clone._currentRefCursor = null;
- return clone;
- }
-
- protected override void PrepareInternalParameters() {
- InternalParameters.Clear();
- _currentParameterIndex = -1;
- }
-
-
- protected sealed override DbDataReader CreateReader() {
- return new OracleDataReader(this);
- }
-
- protected sealed override SystemException CreateException(SQLException e) {
- return new OracleException(e,Connection);
- }
-
- public object ExecuteOracleScalar() {
- throw new NotImplementedException();
- }
-
-#if SUPPORT_ORACLE_TYPES
- public int ExecuteOracleNonQuery(
- out OracleString rowid
- ) {
- throw new NotImplementedException();
- }
-#endif
-
- #endregion // Methods
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConnection.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConnection.cs
deleted file mode 100644
index 6268f7e7577..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConnection.cs
+++ /dev/null
@@ -1,116 +0,0 @@
-//
-// System.Data.OracleClient.OracleConnection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-using System.Data;
-using System.Data.Common;
-using System.Data.ProviderBase;
-using System.Collections;
-
-using java.sql;
-
-using System.Configuration;
-using Mainsoft.Data.Configuration;
-using Mainsoft.Data.Jdbc.Providers;
-
-namespace System.Data.OracleClient {
- public sealed class OracleConnection : AbstractDBConnection, System.ICloneable {
- #region Events
-
- public event OracleInfoMessageEventHandler InfoMessage;
-
- #endregion // Events
-
- #region Constructors
-
- public OracleConnection() : this(null) {
- }
-
- public OracleConnection(String connectionString) : base(connectionString) {
- }
-
- #endregion // Constructors
-
- #region Methods
-
- protected override IConnectionProvider GetConnectionProvider() {
- IDictionary conProviderDict = ConnectionStringDictionary.Parse(ConnectionString);
- string provider = (string)conProviderDict["Provider"];
- if (provider == null)
- provider = "ORACLECLIENT";
-
- return GetConnectionProvider("Mainsoft.Data.Configuration/OracleClientProviders", provider);
- }
-
- public new OracleTransaction BeginTransaction(IsolationLevel level) {
- return new OracleTransaction(level, this);
- }
-
- public new OracleTransaction BeginTransaction() {
- return BeginTransaction(IsolationLevel.ReadCommitted);
- }
-
- public new OracleCommand CreateCommand() {
- return new OracleCommand(this);
- }
-
- protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) {
- return BeginTransaction();
- }
-
- protected override DbCommand CreateDbCommand() {
- return CreateCommand();
- }
-
- protected sealed override SystemException CreateException(SQLException e) {
- return new OracleException(e,this);
- }
-
- protected sealed override SystemException CreateException(string message) {
- return new OracleException(message, null, this);
- }
-
- protected sealed override void OnSqlWarning(SQLWarning warning) {
- OracleErrorCollection col = new OracleErrorCollection(warning, this);
- OnOracleInfoMessage(new OracleInfoMessageEventArgs(col));
- }
-
- private void OnOracleInfoMessage (OracleInfoMessageEventArgs value) {
- if (InfoMessage != null) {
- InfoMessage (this, value);
- }
- }
-
- #endregion // Methods
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConvert.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConvert.cs
deleted file mode 100644
index e21da07a0f0..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleConvert.cs
+++ /dev/null
@@ -1,453 +0,0 @@
-//
-// System.Data.Oracle.OracleConvert
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using System.Data.Common;
-using System.Data.ProviderBase;
-
-using java.sql;
-
-namespace System.Data.OracleClient {
- #region oracle.sql.Types constants
-
- internal enum JavaSqlTypes {
- ARRAY = 2003 ,
- BIGINT = -5,
- BINARY = -2 ,
- BIT = -7 ,
- BLOB = 2004,
- BOOLEAN = 16,
- CHAR = 1,
- CLOB = 2005,
- DATALINK = 70,
- DATE = 91,
- DECIMAL = 3,
- DISTINCT = 2001,
- DOUBLE = 8,
- FLOAT = 6,
- INTEGER = 4,
- JAVA_OBJECT = 2000,
- LONGVARBINARY = -4,
- LONGVARCHAR = -1,
- NULL = 0,
- NUMERIC = 2 ,
- OTHER = 1111 ,
- REAL = 7 ,
- REF = 2006 ,
- SMALLINT = 5,
- STRUCT = 2002,
- TIME = 92,
- TIMESTAMP = 93,
- TINYINT = -6,
- VARBINARY = -3,
- VARCHAR = 12,
-
- //ORACLE types, see oracle.jdbc.OracleTypes
- BINARY_FLOAT = 100,
- BINARY_DOUBLE = 101,
- ROWID = -8,
- CURSOR = -10,
- TIMESTAMPNS = -100,
- TIMESTAMPTZ = -101,
- TIMESTAMPLTZ = -102,
- INTERVALYM = -103,
- INTERVALDS = -104,
- }
-
- #endregion
- sealed class OracleConvert : DbConvert {
-
- #region .Net types constants
-
- internal static readonly Type TypeOfBoolean = typeof(Boolean);
- internal static readonly Type TypeOfSByte = typeof(SByte);
- internal static readonly Type TypeOfChar = typeof(Char);
- internal static readonly Type TypeOfInt16 = typeof(Int16);
- internal static readonly Type TypeOfInt32 = typeof(Int32);
- internal static readonly Type TypeOfInt64 = typeof(Int64);
- internal static readonly Type TypeOfByte = typeof(Byte);
- internal static readonly Type TypeOfUInt16 = typeof(UInt16);
- internal static readonly Type TypeOfUInt32 = typeof(UInt32);
- internal static readonly Type TypeOfUInt64 = typeof(UInt64);
- internal static readonly Type TypeOfDouble = typeof(Double);
- internal static readonly Type TypeOfSingle = typeof(Single);
- internal static readonly Type TypeOfDecimal = typeof(Decimal);
- internal static readonly Type TypeOfString = typeof(String);
- internal static readonly Type TypeOfDateTime = typeof(DateTime);
- internal static readonly Type TypeOfObject = typeof(object);
- internal static readonly Type TypeOfGuid = typeof(Guid);
- internal static readonly Type TypeOfType = typeof(Type);
-
- // additional types
- internal static readonly Type TypeOfByteArray = typeof(Byte[]);
- internal static readonly Type TypeOfCharArray = typeof(Char[]);
- internal static readonly Type TypeOfFloat = typeof (float);
- internal static readonly Type TypeOfTimespan = typeof (TimeSpan);
- static readonly Type TypeOfIDataReader = typeof(IDataReader);
-
- #endregion
-
- #region Methods
-
- internal static String JdbcTypeNameToDbTypeName(string jdbcTypeName) {
- return jdbcTypeName.Trim();;
- }
-
- internal static OracleType JdbcTypeToOracleType(int jdbcType) {
- switch ((JavaSqlTypes)jdbcType) {
- case JavaSqlTypes.ARRAY: return OracleType.Blob;
- case JavaSqlTypes.BIGINT: return OracleType.Number;
- case JavaSqlTypes.BINARY: return OracleType.Blob;
- case JavaSqlTypes.BIT: return OracleType.Byte;
- case JavaSqlTypes.BLOB: return OracleType.Blob;
- case JavaSqlTypes.BOOLEAN: return OracleType.Byte;
- case JavaSqlTypes.CHAR: return OracleType.Char;
- case JavaSqlTypes.CLOB: return OracleType.Clob;
-// case JavaSqlTypes.DATALINK: return OracleType.IUnknown;
- case JavaSqlTypes.DATE: return OracleType.DateTime;
- case JavaSqlTypes.DECIMAL: return OracleType.Number;
-// case JavaSqlTypes.DISTINCT: return OracleType.IUnknown;
- case JavaSqlTypes.DOUBLE: return OracleType.Double;
- case JavaSqlTypes.FLOAT: return OracleType.Float;
- case JavaSqlTypes.INTEGER: return OracleType.Int32;
-// case JavaSqlTypes.JAVA_OBJECT: return OracleType.IUnknown;
- case JavaSqlTypes.LONGVARBINARY: return OracleType.LongRaw;
- case JavaSqlTypes.LONGVARCHAR: return OracleType.LongVarChar;
-// case JavaSqlTypes.NULL: return OracleType.Empty;
- case JavaSqlTypes.NUMERIC: return OracleType.Number;
-// case JavaSqlTypes.OTHER: return OracleType.IUnknown;
-// case JavaSqlTypes.REAL: return OracleType.Single;
-// case JavaSqlTypes.REF: return OracleType.IUnknown;
- case JavaSqlTypes.SMALLINT: return OracleType.Int16;
-// case JavaSqlTypes.STRUCT: return OracleType.IUnknown;
- case JavaSqlTypes.TIME: return OracleType.TimestampLocal;
- case JavaSqlTypes.TIMESTAMP: return OracleType.Timestamp;
- case JavaSqlTypes.TINYINT: return OracleType.Byte;
- case JavaSqlTypes.VARBINARY: return OracleType.LongVarChar;
- default:
- case JavaSqlTypes.VARCHAR: return OracleType.VarChar;
-
- case JavaSqlTypes.BINARY_FLOAT: return OracleType.Float;
- case JavaSqlTypes.BINARY_DOUBLE: return OracleType.Double;
- case JavaSqlTypes.ROWID: return OracleType.RowId;
- case JavaSqlTypes.CURSOR: return OracleType.Cursor;
- case JavaSqlTypes.TIMESTAMPNS: return OracleType.Timestamp;
- case JavaSqlTypes.TIMESTAMPTZ: return OracleType.TimestampWithTZ;
- case JavaSqlTypes.TIMESTAMPLTZ: return OracleType.TimestampLocal;
- case JavaSqlTypes.INTERVALYM: return OracleType.IntervalYearToMonth;
- case JavaSqlTypes.INTERVALDS: return OracleType.IntervalDayToSecond;
- }
- }
-
- internal static OracleType ValueTypeToOracleType(Type type) {
- switch (Type.GetTypeCode(type)) {
- case TypeCode.Boolean: return OracleType.Byte;
- case TypeCode.Byte: return OracleType.Byte;
- case TypeCode.Char: return OracleType.Char;
- case TypeCode.DateTime: return OracleType.DateTime;
-// case TypeCode.DBNull: return OracleType.Empty;
- case TypeCode.Decimal: return OracleType.Number;
- case TypeCode.Double: return OracleType.Double;
-// case TypeCode.Empty: return OracleType.Empty;
- case TypeCode.Int16: return OracleType.Int16;
- case TypeCode.Int32: return OracleType.Int32;
- case TypeCode.Int64: return OracleType.Number;
- default:
- case TypeCode.Object: {
- if (type.Equals(TypeOfByteArray)) return OracleType.Blob;
- if (type.Equals(TypeOfTimespan)) return OracleType.Timestamp;
- if (type.IsSubclassOf(TypeOfIDataReader)) return OracleType.Cursor;
-// if (type.Equals(DbTypes.TypeOfGuid)) return OracleType.Guid;
-//
- if (type.IsEnum)
- return ValueTypeToOracleType (Enum.GetUnderlyingType (type));
-//
- return OracleType.VarChar;
- }
- case TypeCode.SByte: return OracleType.SByte;
- case TypeCode.Single: return OracleType.Float;
- case TypeCode.String: return OracleType.VarChar;
- case TypeCode.UInt16: return OracleType.UInt16;
- case TypeCode.UInt32: return OracleType.UInt32;
- case TypeCode.UInt64: return OracleType.Number;
- }
- }
-
- internal static Type OracleTypeToValueType(OracleType oleDbType) {
- switch (oleDbType) {
-// case OracleType.BigInt : return DbTypes.TypeOfInt64;// typeof(long);
-// case OracleType.Binary : return DbTypes.TypeOfByteArray;
-// case OracleType.Boolean : return DbTypes.TypeOfBoolean;
-// case OracleType.BSTR : return DbTypes.TypeOfString;
- case OracleType.BFile : return TypeOfByteArray;
- case OracleType.Blob : return TypeOfByteArray;
- case OracleType.Byte : return TypeOfByte;
- case OracleType.Char : return TypeOfString;
- case OracleType.Clob : return TypeOfCharArray;
- case OracleType.Cursor : return TypeOfIDataReader;
- case OracleType.DateTime : return TypeOfDateTime;
-// case OracleType.Currency : return TypeOfDecimal;
-// case OracleType.Date : return TypeOfDateTime;
-// case OracleType.DBDate : return TypeOfDateTime;
-// case OracleType.DBTime : return TypeOfTimespan;
-// case OracleType.DBTimeStamp : return TypeOfDateTime;
-// case OracleType.Decimal : return TypeOfDecimal;
- case OracleType.Double : return TypeOfDouble;
- case OracleType.Float : return TypeOfFloat;
- case OracleType.Int16 : return TypeOfInt16;
- case OracleType.Int32 : return TypeOfInt32;
- case OracleType.IntervalDayToSecond : return TypeOfTimespan;
- case OracleType.IntervalYearToMonth : return TypeOfInt32;
- case OracleType.LongRaw : return TypeOfByteArray;
-// case OracleType.Empty : return null; //typeof(DBNull);
-// case OracleType.Error : return typeof(Exception);
-// case OracleType.Filetime : return TypeOfDateTime;
-// case OracleType.Guid : return TypeOfGuid;
-// case OracleType.IDispatch : return TypeOfObject;
-// case OracleType.Integer : return TypeOfInt32;
-// case OracleType.IUnknown : return TypeOfObject;
-// case OracleType.LongVarBinary : return TypeOfByteArray;
- case OracleType.LongVarChar : return TypeOfString;
- case OracleType.NChar : return TypeOfString;
- case OracleType.NClob : return TypeOfString;
- case OracleType.Number : return TypeOfDecimal;
- case OracleType.NVarChar : return TypeOfString;
- case OracleType.Raw : return TypeOfByteArray;
-
- case OracleType.RowId : return TypeOfString;
- case OracleType.SByte : return TypeOfSByte;
- case OracleType.Timestamp : return TypeOfTimespan;
- case OracleType.TimestampLocal : return TypeOfTimespan;
- case OracleType.TimestampWithTZ : return TypeOfTimespan;
- case OracleType.UInt16 : return TypeOfUInt16;
-
- case OracleType.UInt32 : return TypeOfUInt32;
- case OracleType.VarChar : return TypeOfString;
-// case OracleType.LongVarWChar : return TypeOfString;
-// case OracleType.Numeric : return TypeOfDecimal;
-// case OracleType.PropVariant : return TypeOfObject;
-// case OracleType.Single : return TypeOfFloat;
-// case OracleType.SmallInt : return TypeOfInt16;
-// case OracleType.TinyInt : return TypeOfSByte;
-// case OracleType.UnsignedBigInt : return TypeOfUInt64;
-// case OracleType.UnsignedInt : return TypeOfUInt32;
-// case OracleType.UnsignedSmallInt : return TypeOfUInt16;
-// case OracleType.UnsignedTinyInt : return TypeOfByte;
-// case OracleType.VarBinary : return TypeOfByteArray;
-// case OracleType.VarChar : return TypeOfString;
-// case OracleType.Variant : return TypeOfObject;
-// case OracleType.VarNumeric : return TypeOfDecimal;
-// case OracleType.VarWChar : return TypeOfString;
-// case OracleType.WChar : return TypeOfString;
- default : return TypeOfObject;
- }
- }
-
- internal static OracleType DbTypeToOracleType(DbType dbType) {
- switch (dbType) {
- case DbType.AnsiString : return OracleType.VarChar;
- case DbType.Binary : return OracleType.Blob;
- case DbType.Byte : return OracleType.Byte;
- case DbType.Boolean : return OracleType.Byte;
- case DbType.Currency : return OracleType.Number;
- case DbType.Date : return OracleType.DateTime;
- case DbType.DateTime : return OracleType.DateTime;
- case DbType.Decimal : return OracleType.Number;
- case DbType.Double : return OracleType.Double;
- case DbType.Guid : return OracleType.Char;
- case DbType.Int16 : return OracleType.Int16;
- case DbType.Int32 : return OracleType.Int32;
- case DbType.Int64 : return OracleType.Number;
- case DbType.Object : return OracleType.Cursor;
- case DbType.SByte : return OracleType.SByte;
- case DbType.Single : return OracleType.Float;
- case DbType.String : return OracleType.VarChar;
- case DbType.Time : return OracleType.Timestamp;
- case DbType.UInt16 : return OracleType.UInt16;
- case DbType.UInt32 : return OracleType.UInt32;
- case DbType.UInt64 : return OracleType.Number;
- case DbType.VarNumeric : return OracleType.Number;
- case DbType.AnsiStringFixedLength : return OracleType.NChar;
- case DbType.StringFixedLength : return OracleType.Char;
- default : throw ExceptionHelper.InvalidDbType((int)dbType);
- }
- }
-
- internal static DbType OracleTypeToDbType(OracleType oleDbType) {
- switch (oleDbType) {
- case OracleType.BFile : return DbType.Binary;
- case OracleType.Blob : return DbType.Binary;
- case OracleType.Byte : return DbType.Byte;
- case OracleType.Char : return DbType.StringFixedLength;
- case OracleType.Clob : return DbType.String;
- case OracleType.Cursor : return DbType.Object;
- case OracleType.DateTime : return DbType.DateTime;
- case OracleType.Double : return DbType.Double;
- case OracleType.Float : return DbType.Single;
- case OracleType.Int16 : return DbType.Int16;
- case OracleType.Int32 : return DbType.Int32;
- case OracleType.IntervalDayToSecond : return DbType.Time;
- case OracleType.IntervalYearToMonth : return DbType.Int32;
- case OracleType.LongRaw : return DbType.Binary;
- case OracleType.LongVarChar : return DbType.String;
- case OracleType.NChar : return DbType.AnsiStringFixedLength;
- case OracleType.NClob : return DbType.AnsiString;
- case OracleType.Number : return DbType.VarNumeric;
- case OracleType.NVarChar : return DbType.AnsiString;
- case OracleType.Raw : return DbType.Binary;
-
- case OracleType.RowId : return DbType.AnsiStringFixedLength;
- case OracleType.SByte : return DbType.SByte;
- case OracleType.Timestamp : return DbType.Time;
- case OracleType.TimestampLocal : return DbType.Time;
- case OracleType.TimestampWithTZ : return DbType.Time;
- case OracleType.UInt16 : return DbType.UInt16;
-
- case OracleType.UInt32 : return DbType.UInt32;
- case OracleType.VarChar : return DbType.String;
-// case OracleType.Empty : return DbType.Object;
-// case OracleType.SmallInt : return DbType.Int16;
-// case OracleType.Integer : return DbType.Int32;
-// case OracleType.Single : return DbType.Single;
-// case OracleType.Double : return DbType.Double;
-// case OracleType.Currency : return DbType.Currency;
-// case OracleType.Date : return DbType.DateTime;
-// case OracleType.BSTR : return DbType.String;
-// case OracleType.IDispatch : return DbType.Object;
-// case OracleType.Error : return DbType.Object;
-// case OracleType.Boolean : return DbType.Boolean;
-// case OracleType.Variant : return DbType.Object;
-// case OracleType.IUnknown : return DbType.Object;
-// case OracleType.Decimal : return DbType.Decimal;
-// case OracleType.TinyInt : return DbType.SByte;
-// case OracleType.UnsignedTinyInt : return DbType.Byte;
-// case OracleType.UnsignedSmallInt : return DbType.UInt16;
-// case OracleType.UnsignedInt : return DbType.UInt32;
-// case OracleType.BigInt : return DbType.Int64;
-// case OracleType.UnsignedBigInt : return DbType.UInt64;
-// case OracleType.Filetime : return DbType.DateTime;
-// case OracleType.Guid : return DbType.Guid;
-// case OracleType.Binary : return DbType.Binary;
-// case OracleType.Char : return DbType.AnsiStringFixedLength;
-// case OracleType.WChar : return DbType.StringFixedLength;
-// case OracleType.Numeric : return DbType.Decimal;
-// case OracleType.DBDate : return DbType.Date;
-// case OracleType.DBTime : return DbType.Time;
-// case OracleType.DBTimeStamp : return DbType.DateTime;
-// case OracleType.PropVariant : return DbType.Object;
-// case OracleType.VarNumeric : return DbType.VarNumeric;
-// case OracleType.VarChar : return DbType.AnsiString;
-// case OracleType.LongVarChar : return DbType.AnsiString;
-// case OracleType.VarWChar : return DbType.String;
-// case OracleType.LongVarWChar : return DbType.String;
-// case OracleType.VarBinary : return DbType.Binary;
-// case OracleType.LongVarBinary : return DbType.Binary;
- default : throw ExceptionHelper.InvalidOleDbType((int)oleDbType);
- }
- }
-
- internal static int OracleTypeToJdbcType(OracleType oleDbType) {
- switch(oleDbType) {
- case OracleType.BFile : return (int)JavaSqlTypes.BINARY;
- case OracleType.Blob : return (int)JavaSqlTypes.BINARY;
- case OracleType.Byte : return (int)JavaSqlTypes.TINYINT;
- case OracleType.Char : return (int)JavaSqlTypes.CHAR;
- case OracleType.Clob : return (int)JavaSqlTypes.CLOB;
- case OracleType.Cursor : return (int)JavaSqlTypes.CURSOR;
- case OracleType.DateTime : return (int)JavaSqlTypes.TIMESTAMP;
- case OracleType.Double : return (int)JavaSqlTypes.DOUBLE;
- case OracleType.Float : return (int)JavaSqlTypes.FLOAT;
- case OracleType.Int16 : return (int)JavaSqlTypes.SMALLINT;
- case OracleType.Int32 : return (int)JavaSqlTypes.INTEGER;
- case OracleType.IntervalDayToSecond : return (int)JavaSqlTypes.INTERVALDS;
- case OracleType.IntervalYearToMonth : return (int)JavaSqlTypes.INTERVALYM;
- case OracleType.LongRaw : return (int)JavaSqlTypes.LONGVARBINARY;
- case OracleType.LongVarChar : return (int)JavaSqlTypes.LONGVARCHAR;
- case OracleType.NChar : return (int)JavaSqlTypes.CHAR;
- case OracleType.NClob : return (int)JavaSqlTypes.CLOB;
- case OracleType.Number : return (int)JavaSqlTypes.NUMERIC;
- case OracleType.NVarChar : return (int)JavaSqlTypes.VARCHAR;
- case OracleType.Raw : return (int)JavaSqlTypes.BINARY;
-
- case OracleType.RowId : return (int)JavaSqlTypes.VARCHAR;
- case OracleType.SByte : return (int)JavaSqlTypes.TINYINT;
- case OracleType.Timestamp : return (int)JavaSqlTypes.TIMESTAMP;
- case OracleType.TimestampLocal : return (int)JavaSqlTypes.TIMESTAMP;
- case OracleType.TimestampWithTZ : return (int)JavaSqlTypes.TIMESTAMP;
- case OracleType.UInt16 : return (int)JavaSqlTypes.SMALLINT;
-
- case OracleType.UInt32 : return (int)JavaSqlTypes.INTEGER;
- case OracleType.VarChar : return (int)JavaSqlTypes.VARCHAR;
-// case OracleType.BigInt : return Types.BIGINT;
-// case OracleType.Binary : return Types.BINARY;
-// case OracleType.Boolean : return Types.BIT;
-// case OracleType.BSTR : return Types.VARCHAR;
-// case OracleType.Char : return Types.CHAR;
-// case OracleType.Currency : return Types.DECIMAL;
-// case OracleType.Date : return Types.TIMESTAMP;
-// case OracleType.DBDate : return Types.DATE;
-// case OracleType.DBTime : return Types.TIME;
-// case OracleType.DBTimeStamp : return Types.TIMESTAMP;
-// case OracleType.Decimal : return Types.DECIMAL;
-// case OracleType.Double : return Types.DOUBLE;
-// case OracleType.Empty : return Types.NULL;
-// case OracleType.Error : return Types.OTHER;
-// case OracleType.Filetime : return Types.TIMESTAMP;
-// case OracleType.Guid : return Types.CHAR;
-// case OracleType.IDispatch : return Types.OTHER; //throw new ArgumentException("The " + oleDbType + " OracleType value is not supported.");
-// case OracleType.Integer : return Types.INTEGER;
-// case OracleType.IUnknown : return Types.OTHER; //throw new ArgumentException("The " + oleDbType + " OracleType value is not supported.");
-// case OracleType.LongVarBinary : return Types.LONGVARBINARY;
-// case OracleType.LongVarChar : return Types.LONGVARCHAR;
-// case OracleType.LongVarWChar : return Types.LONGVARCHAR;
-// case OracleType.Numeric : return Types.NUMERIC;
-// case OracleType.PropVariant : return Types.OTHER;
-// case OracleType.Single : return Types.FLOAT;
-// case OracleType.SmallInt : return Types.SMALLINT;
-// case OracleType.TinyInt : return Types.TINYINT;
-// case OracleType.UnsignedBigInt : return Types.BIGINT;
-// case OracleType.UnsignedInt : return Types.INTEGER;
-// case OracleType.UnsignedSmallInt : return Types.SMALLINT;
-// case OracleType.UnsignedTinyInt : return Types.TINYINT;
-// case OracleType.VarBinary : return Types.VARBINARY;
-// case OracleType.VarChar : return Types.VARCHAR;
-// case OracleType.Variant : return Types.VARCHAR;
-// case OracleType.VarNumeric : return Types.DECIMAL;
-// case OracleType.VarWChar : return Types.VARCHAR;
-// case OracleType.WChar : return Types.VARCHAR;
- default : throw ExceptionHelper.InvalidOleDbType((int)oleDbType);
- }
-
- #endregion // Methods
- }
- }
-}
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleDataReader.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleDataReader.cs
deleted file mode 100644
index 5c1fa39b70a..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleDataReader.cs
+++ /dev/null
@@ -1,276 +0,0 @@
-//
-// System.Data.OracleClient.OracleDataReader
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Data.Common;
-using System.Data.ProviderBase;
-
-using java.sql;
-
-namespace System.Data.OracleClient {
- public sealed class OracleDataReader : AbstractDataReader {
- #region Fields
-
- #endregion // Fields
-
- #region Constructors
-
- internal OracleDataReader(OracleCommand command) : base(command) {
- }
-
- #endregion // Constructors
-
- #region Methods
-
- protected sealed override SystemException CreateException(string message, SQLException e) {
- return new OracleException(message,e, (OracleConnection)_command.Connection);
- }
-
- protected sealed override SystemException CreateException(java.io.IOException e) {
- return new OracleException(e, (OracleConnection)_command.Connection);
- }
-
- public override String GetDataTypeName(int columnIndex) {
- try {
- string jdbcTypeName = Results.getMetaData().getColumnTypeName(columnIndex + 1);
-
- return OracleConvert.JdbcTypeNameToDbTypeName(jdbcTypeName);
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- }
-
- protected override int GetProviderType(int jdbcType) {
- return (int)OracleConvert.JdbcTypeToOracleType(jdbcType);
- }
-
- protected override IReaderCacheContainer CreateReaderCacheContainer(int jdbcType, int columnIndex) {
- switch ((JavaSqlTypes)jdbcType) {
- case JavaSqlTypes.BINARY_FLOAT:
- jdbcType = (int)JavaSqlTypes.REAL;
- break;
- case JavaSqlTypes.BINARY_DOUBLE:
- jdbcType = (int)JavaSqlTypes.DOUBLE;
- break;
- case JavaSqlTypes.ROWID:
- jdbcType = (int)JavaSqlTypes.VARCHAR;
- break;
-// case JavaSqlTypes.CURSOR:
-// jdbcType = JavaSqlTypes.OTHER;
-// break;
- case JavaSqlTypes.TIMESTAMPNS:
- jdbcType = (int)JavaSqlTypes.TIMESTAMP;
- break;
- case JavaSqlTypes.TIMESTAMPTZ:
- jdbcType = (int)JavaSqlTypes.TIMESTAMP;
- break;
- case JavaSqlTypes.TIMESTAMPLTZ:
- jdbcType = (int)JavaSqlTypes.TIMESTAMP;
- break;
- case JavaSqlTypes.INTERVALYM:
- jdbcType = (int)JavaSqlTypes.INTEGER;
- break;
- case JavaSqlTypes.INTERVALDS:
- jdbcType = (int)JavaSqlTypes.TIMESTAMP;
- break;
- }
- return base.CreateReaderCacheContainer (jdbcType, columnIndex);
- }
-
-
- protected override void SetSchemaType(DataRow schemaRow, ResultSetMetaData metaData, int columnIndex) {
- JavaSqlTypes columnType = (JavaSqlTypes)metaData.getColumnType(columnIndex);
- switch (columnType) {
- case JavaSqlTypes.BINARY_FLOAT:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfFloat;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.BINARY_DOUBLE:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfDouble;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.ROWID:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfString;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.CURSOR:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfDouble;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.TIMESTAMPNS:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfTimespan;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.TIMESTAMPTZ:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfTimespan;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.TIMESTAMPLTZ:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfTimespan;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.INTERVALYM:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfUInt32;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- case JavaSqlTypes.INTERVALDS:
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = OracleConvert.TypeOfTimespan;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- default:
- base.SetSchemaType(schemaRow, metaData, columnIndex);
- break;
- }
- }
-
- public override decimal GetDecimal(int i) {
- if (IsNumeric(i))
- return GetDecimalSafe(i);
-
- return base.GetDecimal(i);
- }
-
- public override double GetDouble(int i) {
- if (IsNumeric(i))
- return GetDoubleSafe(i);
-
- return base.GetDouble(i);
- }
-
- public override float GetFloat(int i) {
- if (IsNumeric(i))
- return GetFloatSafe(i);
-
- return base.GetFloat(i);
- }
-//
-// OracleClient does not "excuse" for Int16
-//
-// public override short GetInt16(int i) {
-// if (IsNumeric(i))
-// return GetInt16Safe(i);
-//
-// return base.GetInt16(i);
-// }
-
-
- public override int GetInt32(int i) {
- if (IsNumeric(i))
- return GetInt32Safe(i);
-
- return base.GetInt32(i);
- }
-
- public override long GetInt64(int i) {
- if (IsNumeric(i))
- return GetInt64Safe(i);
-
- return base.GetInt64(i);
- }
-
-#if SUPPORT_ORACLE_TYPES
- #region GetOracleXXX
-
- public OracleBFile GetOracleBFile(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public OracleBinary GetOracleBinary(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public OracleDateTime GetOracleDateTime(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public OracleLob GetOracleLob(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public OracleMonthSpan GetOracleMonthSpan(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public OracleNumber GetOracleNumber(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public OracleString GetOracleString(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public OracleTimeSpan GetOracleTimeSpan(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public object GetOracleValue(
- int i
- ) {
- throw new NotImplementedException();
- }
-
- public int GetOracleValues(
- object[] values
- ) {
- throw new NotImplementedException();
- }
-
- #endregion
-#endif
-
- #endregion // Methods
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleError.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleError.cs
deleted file mode 100644
index fbdb138062c..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleError.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// System.Data.OleDb.OleDbError
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Data.OracleClient {
- using java.sql;
- using System.Data.Common;
- using System.Data.ProviderBase;
-
- [Serializable]
- internal sealed class OracleError : AbstractDbError {
-
- internal OracleError(SQLException e, AbstractDBConnection connection) : base(e, connection) {
- }
-
- public String Message {
- get {
- return DbMessage;
- }
- }
-
- public int NativeError {
- get {
- return DbErrorCode;
- }
- }
-
- public String Source {
- get {
- return DbSource;
- }
- }
-
- public String SQLState {
- get {
- return DbSQLState;
- }
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleErrorCollection.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleErrorCollection.cs
deleted file mode 100644
index 8ff780aa160..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleErrorCollection.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-//
-// System.Data.OleDb.OleDbErrorCollection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Data.OracleClient {
-
-
- using System.Collections;
- using java.sql;
- using System.Data.Common;
- using System.Data.ProviderBase;
-
- [Serializable]
- public sealed class OracleErrorCollection : AbstractDbErrorCollection {
- internal OracleErrorCollection(SQLException e, AbstractDBConnection connection) : base(e, connection) {
- }
- /**
- * Gets the error at the specified index.
- *
- * @param index of the error
- * @return Error on specified index
- */
- internal OracleError this[int index] {
- get {
- return (OracleError)GetDbItem(index);
- }
- }
-
- protected override AbstractDbError CreateDbError(SQLException e, AbstractDBConnection connection) {
- return new OracleError(e, connection);
- }
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleException.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleException.cs
deleted file mode 100644
index 155f986d2b7..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleException.cs
+++ /dev/null
@@ -1,153 +0,0 @@
-//
-// System.Data.SqlClient.SqlException
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Data.OracleClient {
-
- using java.sql;
-
- using System;
- using System.Data.ProviderBase;
-
- /**
- * The exception that is thrown when SQL Server returns a warning or error.
- * This class cannot be inherited.
- */
-
- /*
- * CURRENT LIMITATIONS
- * 1. Constructor for serialization SqlException(SerializationInfo info, StreamingContext sc)
- * is not supported.
- * 2. Method "void GetObjectData(...,...)" is not supported (serialization)
- */
-
- public sealed class OracleException : AbstractDbException {
- internal OracleException(Exception cause, OracleConnection connection) : base(cause, connection) {}
-
- internal OracleException(SQLException cause, OracleConnection connection) : base(cause, connection) {}
-
- internal OracleException(string message, SQLException cause, OracleConnection connection) : base(message, cause, connection) {}
-
- protected override AbstractDbErrorCollection DbErrors {
- get {
- return Errors;
- }
- }
-
-
-
- /**
- * Gets the severity level of the error returned from the SQL Server .NET
- * Data Provider.
- * @return severity level of the first error in the collection.
- */
-// public byte Class {
-// get {
-// SqlErrorCollection errors = Errors;
-// return errors.Count > 0 ? errors[0].Class : (byte)0;
-// }
-// }
-
- /**
- * Gets a collection of one or more SqlError objects that give detailed
- * information about exceptions generated by the SQL Server .NET Data Provider.
- * @return collection of SqlError objects
- */
- internal OracleErrorCollection Errors {
- get {
- return new OracleErrorCollection(_cause, _connection);
- }
- }
-
- public int Code {
- get { return DbErrorCode; }
- }
-
- /**
- * Gets the line number within the Transact-SQL command batch or stored
- * procedure that generated the error.
- * @return line number of the first error in the collection.
- */
-// public int LineNumber {
-// get {
-// SqlErrorCollection errors = Errors;
-// return errors.Count > 0 ? errors[0].LineNumber : 0;
-// }
-// }
-
- /**
- * Gets a number that identifies the type of error.
- * @return number that identifies the type of first error in the collection
- */
-// public int Number {
-// get {
-// SqlErrorCollection errors = Errors;
-// return errors.Count > 0 ? errors[0].Number : 0;
-// }
-// }
-
- /**
- * Gets the name of the stored procedure or remote procedure call (RPC)
- * that generated the error.
- * @return name of the stored procedure
- */
-// public String Procedure {
-// get {
-// SqlErrorCollection errors = Errors;
-// return errors.Count > 0 ? errors[0].Procedure : null;
-// }
-// }
-
- /**
- * Gets the name of the computer running an instance of SQL Server
- * that generated the error.
- * @return name of the computer where error generated
- */
-// public String Server {
-// get {
-// SqlErrorCollection errors = Errors;
-// return errors.Count > 0 ? errors[0].Server : null;
-// }
-// }
-
-
- /**
- * Gets a numeric error code from SQL Server that represents an error,
- * warning or "no data found" message.
- * @return numeric error code from SQL Server
- */
-// public byte State {
-// get {
-// SqlErrorCollection errors = Errors;
-// return errors.Count > 0 ? errors[0].State : (byte)0;
-// }
-// }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleParameter.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleParameter.cs
deleted file mode 100644
index d6b4e11e7e0..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.jvm/OracleParameter.cs
+++ /dev/null
@@ -1,230 +0,0 @@
-//
-// System.Data.OracleClient.OracleParameter
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Text;
-using System.Data;
-using System.Data.Common;
-using System.Data.ProviderBase;
-using System.Globalization;
-
-using java.sql;
-using java.lang;
-
-namespace System.Data.OracleClient {
- public sealed class OracleParameter : AbstractDbParameter, ICloneable {
-
- #region Fields
-
- OracleType _oleDbType = OracleType.VarChar;
-
- #endregion // Fields
-
- #region Constructors
-
- public OracleParameter() {
- }
-
- public OracleParameter(String parameterName, Object value)
- : this (parameterName, OracleType.VarChar, 0, ParameterDirection.Input,
- false, 0, 0, String.Empty, DataRowVersion.Current, value) {
- IsDbTypeSet = false;
- }
-
- public OracleParameter(String parameterName, OracleType dbType)
- : this (parameterName, dbType, 0, ParameterDirection.Input,
- false, 0, 0, String.Empty, DataRowVersion.Current, null) {
- }
-
- public OracleParameter(String parameterName, OracleType dbType, int size)
- : this (parameterName, dbType, size, ParameterDirection.Input,
- false, 0, 0, String.Empty, DataRowVersion.Current, null) {
- }
-
- public OracleParameter(String parameterName, OracleType dbType, int size,
- String sourceColumn)
- : this (parameterName, dbType, size, ParameterDirection.Input,
- false, 0, 0, sourceColumn, DataRowVersion.Current, null) {
- }
-
-
- public OracleParameter(String parameterName,
- OracleType dbType,
- int size,
- ParameterDirection direction,
- bool isNullable,
- byte precision,
- byte scale,
- String sourceColumn,
- DataRowVersion sourceVersion,
- Object value) {
- ParameterName = parameterName;
- OracleType = dbType;
- Size = size;
- Direction = direction;
- IsNullable = isNullable;
- Precision = precision;
- Scale = scale;
- SourceColumn = sourceColumn;
- SourceVersion = sourceVersion;
- Value = value;
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override DbType DbType {
- get { return OracleConvert.OracleTypeToDbType(_oleDbType); }
- set { OracleType = OracleConvert.DbTypeToOracleType(value); }
- }
-
- public OracleType OracleType {
- get { return _oleDbType; }
- set {
- _oleDbType = value;
- IsDbTypeSet = true;
- }
- }
-
- public new Object Value {
- get { return base.Value; }
- set {
- if (!IsDbTypeSet && (value != null) && (value != DBNull.Value)) {
- _oleDbType = OracleConvert.ValueTypeToOracleType(value.GetType());
- }
- base.Value = value;
- }
- }
-
-#if NET_2_0
- public new byte Precision {
- get { return base.Precision; }
- set { base.Precision = value; }
- }
-
- public new byte Scale {
- get { return base.Scale; }
- set { base.Scale = value; }
- }
-#endif
-
- #endregion // Properties
-
- #region Methods
-
- public override String ToString() {
- return ParameterName;
- }
-
- protected override string Placeholder {
- get {
- if (ParameterName.Length == 0 || ParameterName[0] == ':')
- return ParameterName;
-
- return String.Concat(":", ParameterName);
- }
- }
-
- internal string InternalPlaceholder {
- get {
- return Placeholder;
- }
- }
-
- protected sealed override object ConvertValue(object value) {
- // can not convert null or DbNull to other types
- if (value == null || value == DBNull.Value) {
- return value;
- }
-
- // TBD : some other way to do this?
-// if (OracleType == OracleType.Binary) {
-// return value;
-// }
- // .NET throws an exception to the user.
- object convertedValue = value;
-
- // note : if we set user parameter jdbc type inside prepare interbal, the db type is not set
- if (value is IConvertible && (IsDbTypeSet || IsJdbcTypeSet)) {
- OracleType oleDbType = (IsDbTypeSet) ? OracleType : OracleConvert.JdbcTypeToOracleType((int)JdbcType);
- Type to = OracleConvert.OracleTypeToValueType(oleDbType);
- if (!(value is DateTime && to == OracleConvert.TypeOfTimespan)) //anyway will go by jdbc type
- convertedValue = Convert.ChangeType(value,to);
- }
- return convertedValue;
- }
-
- protected sealed override void SetParameterName(ResultSet res) {
- ParameterName = res.getString("COLUMN_NAME");
- }
-
- protected sealed override void SetParameterDbType(ResultSet res) {
- int jdbcType = res.getInt("DATA_TYPE");
- // FIXME : is that correct?
- if (jdbcType == Types.OTHER) {
- string typeName = res.getString("TYPE_NAME");
- if (String.Compare("REF CURSOR", typeName, true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = (int)JavaSqlTypes.CURSOR;
- }
- else if (String.Compare("BLOB",typeName,true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = (int)JavaSqlTypes.BLOB;
- }
- else if (String.Compare("CLOB",typeName,true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = (int)JavaSqlTypes.CLOB;
- }
- else if(String.Compare("FLOAT",typeName,true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = (int)JavaSqlTypes.FLOAT;
- }
- else if(String.Compare("NVARCHAR2",typeName,true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = (int)JavaSqlTypes.VARCHAR;
- }
- else if(String.Compare("NCHAR",typeName,true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = (int)JavaSqlTypes.VARCHAR;
- }
- }
- OracleType = OracleConvert.JdbcTypeToOracleType(jdbcType);
- JdbcType = jdbcType;
- }
-
- protected sealed override void SetSpecialFeatures(ResultSet res) {
- // do nothing
- }
-
- protected sealed override int JdbcTypeFromProviderType() {
- return OracleConvert.OracleTypeToJdbcType(OracleType);
- }
-
- #endregion // Methods
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.sln b/mcs/class/System.Data.OracleClient/System.Data.OracleClient.sln
deleted file mode 100755
index e2ccd93d2f6..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient.sln
+++ /dev/null
@@ -1,38 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Data.OracleClient", "System.Data.OracleClient.vmwcsproj", "{168E2978-1640-405C-99B8-8CD81B27BC92}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Data", "..\System.Data\System.Data.vmwcsproj", "{12CA069B-C324-48C1-9836-0014497A212C}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Debug_Java = Debug_Java
- Release = Release
- Release_Java = Release_Java
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Debug.ActiveCfg = Debug_Java|.NET
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Debug.Build.0 = Debug_Java|.NET
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Debug_Java.Build.0 = Debug_Java|.NET
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Release.ActiveCfg = Release_Java|.NET
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Release.Build.0 = Release_Java|.NET
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Release_Java.ActiveCfg = Release_Java|.NET
- {168E2978-1640-405C-99B8-8CD81B27BC92}.Release_Java.Build.0 = Release_Java|.NET
- {12CA069B-C324-48C1-9836-0014497A212C}.Debug.ActiveCfg = Debug|.NET
- {12CA069B-C324-48C1-9836-0014497A212C}.Debug.Build.0 = Debug|.NET
- {12CA069B-C324-48C1-9836-0014497A212C}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {12CA069B-C324-48C1-9836-0014497A212C}.Release.ActiveCfg = Release|.NET
- {12CA069B-C324-48C1-9836-0014497A212C}.Release.Build.0 = Release|.NET
- {12CA069B-C324-48C1-9836-0014497A212C}.Release_Java.ActiveCfg = Release_Java|.NET
- {12CA069B-C324-48C1-9836-0014497A212C}.Release_Java.Build.0 = Release_Java|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs
index 3bbda5263b9..8d0aa1cd4ce 100644
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs
+++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleClientFactory.cs
@@ -71,11 +71,9 @@ namespace System.Data.OracleClient
return new OracleConnectionStringBuilder ();
}
-#if !TARGET_JVM
public override CodeAccessPermission CreatePermission (PermissionState state) {
return new OraclePermission (state);
}
-#endif
public override DbDataAdapter CreateDataAdapter () {
return new OracleDataAdapter ();
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient20.csproj b/mcs/class/System.Data.OracleClient/System.Data.OracleClient20.csproj
deleted file mode 100755
index c1250583c16..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient20.csproj
+++ /dev/null
@@ -1,162 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{71F3DF41-7E2F-41FB-B470-110851F2E758}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Data.OracleClient</RootNamespace>
- <AssemblyName>System.Data.OracleClient</AssemblyName>
- <JDKName>1.4.2</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system-drawing="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Drawing.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\jai_imageio.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\jai_core.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\jai_codec.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\clibwrapper_jiio.jar;..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mlibwrapper_jai.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-RefInfo-rt="repository:jre:sun:1.4.2" REFS-JarPath-rt="" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Assembly\Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>Assembly\MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="Mainsoft.Data.Jdbc.Providers.jvm\OracleProvider.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Assembly\Consts.cs.in</Link>
- </Compile>
- <Compile Include="System.Data.OracleClient.jvm\ExceptionHelper.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data.OracleClient.jvm\OracleCommandBuilder.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data.OracleClient.jvm\OracleConvert.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleError.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleErrorCollection.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleException.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleInfoMessageEventArgs.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameter.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameterCollection.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleTransaction.cs" />
- <Compile Include="System.Data.OracleClient.jvm\Regex.cs" />
- <Compile Include="System.Data.OracleClient\OracleClientFactory.cs" />
- <Compile Include="System.Data.OracleClient\OracleDataAdapter.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data.OracleClient\OracleInfoMessageEventHandler.cs" />
- <Compile Include="System.Data.OracleClient\OracleRowUpdatedEventArgs.cs" />
- <Compile Include="System.Data.OracleClient\OracleRowUpdatedEventHandler.cs" />
- <Compile Include="System.Data.OracleClient\OracleRowUpdatingEventArgs.cs" />
- <Compile Include="System.Data.OracleClient\OracleRowUpdatingEventHandler.cs" />
- <Compile Include="System.Data.OracleClient\OracleType.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\System.Data\System.Data20.csproj">
- <Project>{BD83C476-AEC7-4535-8158-977B04887AF0}</Project>
- <Name>System.Data</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Reference Include="rt, Version=1.4.2.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.Drawing" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
-</Project>
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient20.sln b/mcs/class/System.Data.OracleClient/System.Data.OracleClient20.sln
deleted file mode 100755
index da1681abc69..00000000000
--- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient20.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.OracleClient20", "System.Data.OracleClient20.csproj", "{71F3DF41-7E2F-41FB-B470-110851F2E758}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data20", "..\System.Data\System.Data20.csproj", "{BD83C476-AEC7-4535-8158-977B04887AF0}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {71F3DF41-7E2F-41FB-B470-110851F2E758}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {BD83C476-AEC7-4535-8158-977B04887AF0}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.J2EE.config b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.J2EE.config
deleted file mode 100644
index 746476c359b..00000000000
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.J2EE.config
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <appSettings>
- <add key="ConnectionString" value="hostname=powergh;port=1521;User ID=ghtdb;Password=ghtdb;ServiceName=powergh;Data Source=powergh" />
- <!--
- <add key="ConnectionString" value="Provider=SQLOLEDB.1;Data Source=xp050;Initial Catalog=GHTDB;User Id=sa;Password=" />
- <add key="ConnectionString" value="Provider=MSDAORA.1;hostname=xp050;port=1521;User ID=ghtdb;Password=ghtdb;ServiceName=xp050;Data Source=xp050" />
- <add key="ConnectionString" value="Provider=IBMDADB2;Password=db2admin;User ID=db2admin;Data Source=GHTDB;HostName=xp050;Port=50000;Location=xp050:50000" />
- <add key="ConnectionString" value="Provider=Sybase ASE OLE DB Provider;hostname=KONGO;port=5000;User ID=sa;Password=;ServiceName=KONGO;Data Source=sybaseoledb;JdbcDriverClassName=com.sybase.jdbc2.jdbc.SybDriver;JdbcURL=jdbc:sybase:Tds:KONGO:5000/GHTDB;user=sa;DatabaseName=GHTDB" />
- <add key="ConnectionString" value="Provider=Mainsoft.JDBC.OLEDB.1;Persist Security Info=False;User ID=super;Data Source=PostgreSQL_XP050;Extended Properties="DSN=PostgreSQL_XP050;DATABASE=GHTDB;SERVER=xp050;PORT=5432;UID=super;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=8192;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=0;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=0;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0";Initial Catalog=GHTDB;JdbcDriverClassName=org.postgresql.Driver;JdbcURL=jdbc:postgresql://xp050/GHTDB;User=super;Password=super" />
- -->
- </appSettings>
-</configuration> \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests.J2EE.sln b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests.J2EE.sln
deleted file mode 100755
index 227e44807d6..00000000000
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests.J2EE.sln
+++ /dev/null
@@ -1,33 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Data.OracleClient.Tests.J2EE", "System.Data.OracleClient.Tests.J2EE.vmwcsproj", "{8A846229-F249-415F-B69D-738374543437}"
- ProjectSection(ProjectDependencies) = postProject
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1} = {39CC8FF7-EF1A-41A1-B727-42684211ECD1}
- EndProjectSection
-EndProject
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.framework.dll.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll.J2EE.vmwcsproj", "{39CC8FF7-EF1A-41A1-B727-42684211ECD1}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Debug_Java = Debug_Java
- Release_Java = Release_Java
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {8A846229-F249-415F-B69D-738374543437}.Debug.ActiveCfg = Debug|.NET
- {8A846229-F249-415F-B69D-738374543437}.Debug.Build.0 = Debug|.NET
- {8A846229-F249-415F-B69D-738374543437}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {8A846229-F249-415F-B69D-738374543437}.Debug_Java.Build.0 = Debug_Java|.NET
- {8A846229-F249-415F-B69D-738374543437}.Release_Java.ActiveCfg = Release_Java|.NET
- {8A846229-F249-415F-B69D-738374543437}.Release_Java.Build.0 = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.ActiveCfg = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.ActiveCfg = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.Build.0 = Release_Java|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.csproj b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.csproj
deleted file mode 100644
index f52fd000ff2..00000000000
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.csproj
+++ /dev/null
@@ -1,231 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;JAVA</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;JAVA</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Data.OracleClient.Tests20.J2EE</RootNamespace>
- <AssemblyName>System.Data.OracleClient.Tests20.J2EE</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="System.Data.OracleClient.jvm\MonoTests.System.Data.Utils\ADONetTesterClass.cs" />
- <Compile Include="System.Data.OracleClient.jvm\MonoTests.System.Data.Utils\ConnectedDataProvider.cs" />
- <Compile Include="System.Data.OracleClient.jvm\MonoTests.System.Data.Utils\DbTypeParameter.cs" />
- <Compile Include="System.Data.OracleClient.jvm\MonoTests.System.Data.Utils\DbTypeParametersCollection.cs" />
- <Compile Include="System.Data.OracleClient.jvm\MonoTests.System.Data.Utils\GHTBase.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommandBuilder\OracleCommandBuilder_DeriveParameters_O.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_CommandText.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_CommandTimeout.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_CommandType.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_Connection.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_Dispose.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_ExecuteNonQuery.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_ExecuteReader.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_ExecuteScalar.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_New.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_Parameters.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_Prepare.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleCommand\OracleCommand_Transaction.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\IDBConnection_For_Oracle.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_BeginTransaction.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_ChangeDatabase.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_Close.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_ConnectionString.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_ConnectionTimeout.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_CreateCommand.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_Database.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_DataSource.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_Equals.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_InfoMessage.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_New.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_Open.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_State.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleConnection\OracleConnection_StateChange.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_AcceptChangesDuringFill.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_ContinueUpdateOnError.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_ctor.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_ctor_O.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_ctor_SO.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_ctor_SS.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_DeleteCommand.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Dispose.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_FillError.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_FillSchema_DS.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_FillSchema_DSS.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_FillSchema_DsSt.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_FillSchema_DtSch.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Fill_1.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Fill_2.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Fill_3.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Fill_Ds.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Fill_DsStr.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Fill_Ds_Int_Int_Str.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Fill_Dt.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_GetFillParameters.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_InsertCommand.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_MissingMappingAction.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_MissingSchemaAction.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_RowUpdated.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_RowUpdating.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_SelectCommand.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_TableMappings.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_ToString.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_UpdateCommand.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Update_Dr.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Update_Ds.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Update_DsStr.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataAdapter\OracleDataAdapter_Update_Dt.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_Close.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_ctor.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_Depth.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetBoolean.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetBytes_IIBII.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetByte_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetChars.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetDataTypeName.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetDateTime.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetDecimal_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetDouble_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetFieldType.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetFloat_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetGuiid_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetInt16.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetInt32_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetInt64.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetName_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetOrdinal.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetSchemaTable.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetString_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetTimeSpan_I.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetValue.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_GetValues.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_HasRows.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_IsDBNull.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_Item.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_NextResult.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_Read.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleDataReader\OracleDataReader_RecordsAffected.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameterCollection\OracleParameterCollection_Add.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameterCollection\OracleParameterCollection_Contains.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameterCollection\OracleParameterCollection_Count.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameter\OracleParameter_ctor.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameter\OracleParameter_ctor_SO.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameter\OracleParameter_ctor_SOIPBBBSDO.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameter\OracleParameter_ctor_SOtype.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameter\OracleParameter_ctor_SOtypeI.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleParameter\OracleParameter_ctor_SOtype_IS.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleTransaction\OracleTransaction_Begin.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleTransaction\OracleTransaction_Commit.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleTransaction\OracleTransaction_Connection.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleTransaction\OracleTransaction_ctor.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleTransaction\OracleTransaction_IsolationLevel.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleTransaction\OracleTransaction_Rollback.cs" />
- <Compile Include="System.Data.OracleClient.jvm\OracleType\OracleType_Date.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Data.OracleClient">
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Xml" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-rt="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system-data="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Data.jar" REFS-JarPath-system="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-system-data-oracleclient="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Data.OracleClient.jar" REFS-JarPath-nunit-framework="..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.framework.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.sln b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.sln
deleted file mode 100644
index ca9984cde34..00000000000
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.Tests20.J2EE.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.OracleClient.Tests20.J2EE", "System.Data.OracleClient.Tests20.J2EE.csproj", "{DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Debug_Java|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Debug_Java|Any CPU.Build.0 = Release_Java20|Any CPU
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {DC2FDC0D-C2C3-4B2B-84F0-6655BD3D1E61}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs
index 1a054138f30..3fd8b632a9f 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs
@@ -278,34 +278,6 @@ namespace MonoTests.System.Data.Utils {
// The .NET Framework provides support for Oracle LOBs in the OracleClient namespace, but not in the Oracle namespace.
// Since Visual MainWin does not support the OracleClient namespace, a partial support for this important feature is provided in the Oracle namespace.
// See ms-help://MS.VSCC.2003/VMW.GH.1033/ghdoc/vmwdoc_ADONET_data_access_limitations_51.htm
-#if TARGET_JVM
-
- row.Add("BLOB", new byte[] {0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- }, 4000);
- row.Add("CLOB", SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- , 4000);
- row.Add("NCLOB", SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- , 4000);
-#endif
break;
#endregion
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/DbTypeParametersCollection.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/DbTypeParametersCollection.cs
index 9e0068d21ef..0f2d77472a2 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/DbTypeParametersCollection.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/MonoTests.System.Data.Utils/DbTypeParametersCollection.cs
@@ -376,9 +376,7 @@ namespace MonoTests.System.Data.Utils.Data
/// <returns>The number of deleted rows.</returns>
public static int ExecuteDelete(string a_sTableName, string a_sUniqueId)
{
-#if !TARGET_JVM
return 0;
-#endif
int l_iRecordsDeleted;
OracleCommand l_cmdDelete = new OracleCommand();
l_cmdDelete.Connection = new OracleConnection(ConnectedDataProvider.ConnectionString);
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleCommand/OracleCommand_CommandTimeout.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleCommand/OracleCommand_CommandTimeout.cs
index b18ab465f03..e6585b85a7f 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleCommand/OracleCommand_CommandTimeout.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleCommand/OracleCommand_CommandTimeout.cs
@@ -50,9 +50,7 @@ public class OracleCommand_CommandTimeout : GHTBase
}
[Test]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public void run()
{
OracleCommand cmd = new OracleCommand();
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_FillSchema_DsSt.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_FillSchema_DsSt.cs
index 4f0fd3c672e..78a0c128943 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_FillSchema_DsSt.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_FillSchema_DsSt.cs
@@ -68,9 +68,7 @@ public class OracleDataAdapter_FillSchema_DsSt : ADONetTesterClass
//Test case for bug #4708
[Test(Description="Test case for bug #4708")]
-#if !TARGET_JVM
[Ignore ("JVM test")]
-#endif
public void TestLongSqlExpression()
{
BeginCase("Long SQL string cause java.lang.StackOverflowError (Test case for bug #4708)");
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Fill_2.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Fill_2.cs
index 658309ae906..388124e8647 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Fill_2.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Fill_2.cs
@@ -64,9 +64,6 @@ namespace MonoTests.System.Data.OracleClient
DoTestTypes3(con);
}
-#if TARGET_JVM
- DoTestTypes4(con);
-#endif
// DoTestTypes5(con); //Table direct --> multipe tables
DoTestTypes6(con);
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_GetFillParameters.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_GetFillParameters.cs
index 317faa488a6..663d6b77eac 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_GetFillParameters.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_GetFillParameters.cs
@@ -70,9 +70,7 @@ public class OracleDataAdapter_GetFillParameters : GHTBase
//BY DEFAULT LOGGING IS DONE TO THE STANDARD OUTPUT ONLY FOR FAILURES
[Test]
-#if !TARGET_JVM
[Ignore ("JVM test")]
-#endif
public void run()
{
Exception exp = null;
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Ds.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Ds.cs
index 7e94c04c229..95f739ab56f 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Ds.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Ds.cs
@@ -36,9 +36,7 @@ using NUnit.Framework;
namespace MonoTests.System.Data.OracleClient
{
[TestFixture]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public class OracleDataAdapter_Update_Ds : ADONetTesterClass
{
public static void Main()
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_DsStr.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_DsStr.cs
index a2c32c7414b..aacab9fb3ba 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_DsStr.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_DsStr.cs
@@ -35,9 +35,7 @@ using NUnit.Framework;
namespace MonoTests.System.Data.OracleClient
{
[TestFixture]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public class OracleDataAdapter_Update_DsStr : ADONetTesterClass
{
public static void Main()
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Dt.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Dt.cs
index 9f99ce9cfc3..762716a789c 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Dt.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataAdapter/OracleDataAdapter_Update_Dt.cs
@@ -33,9 +33,7 @@ using NUnit.Framework;
namespace MonoTests.System.Data.OracleClient
{
[TestFixture]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public class OracleDataAdapter_Update_Dt : ADONetTesterClass
{
public static void Main()
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_GetName_I.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_GetName_I.cs
index d747284760e..a574e655b13 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_GetName_I.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_GetName_I.cs
@@ -49,9 +49,7 @@ public class OracleDataReader_GetName_I : GHTBase
}
[Test]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public void run()
{
Exception exp = null;
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_NextResult.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_NextResult.cs
index 2e237b45abd..b03cc4c51f0 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_NextResult.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_NextResult.cs
@@ -79,9 +79,7 @@ namespace MonoTests.System.Data.OracleClient
}
[Test]
-#if !TARGET_JVM
[Ignore ("JVM test")]
-#endif
public void TestMultipleResultSetsWithSQLText()
{
@@ -351,9 +349,7 @@ namespace MonoTests.System.Data.OracleClient
}
[Test]
-#if !TARGET_JVM
[Ignore ("JVM test")]
-#endif
public void TestMultipleResultSetsWithSP()
{
#if !JAVA
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_ctor.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_ctor.cs
index e1c09c5f474..957651c579e 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_ctor.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleDataReader/OracleDataReader_ctor.cs
@@ -49,9 +49,7 @@ public class OracleDataReader_ctor : GHTBase
}
[Test]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public void run()
{
Exception exp = null;
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleParameter/OracleParameter_ctor_SOtype.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleParameter/OracleParameter_ctor_SOtype.cs
index e375cb45127..4b9593536f4 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleParameter/OracleParameter_ctor_SOtype.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleParameter/OracleParameter_ctor_SOtype.cs
@@ -94,9 +94,6 @@ public class OracleParameter_ctor_SOtype : ADONetTesterClass
}
[Test]
-//#if !TARGET_JVM
-// [Category("NotWorking")]
-//#endif
public void SimpleTypesWithDBNull()
{
OracleConnection con=null;
@@ -187,4 +184,4 @@ public class OracleParameter_ctor_SOtype : ADONetTesterClass
}
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleTransaction/OracleTransaction_Rollback.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleTransaction/OracleTransaction_Rollback.cs
index 3179050053c..d0d5e93f000 100644
--- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleTransaction/OracleTransaction_Rollback.cs
+++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient.jvm/OracleTransaction/OracleTransaction_Rollback.cs
@@ -33,9 +33,7 @@ using NUnit.Framework;
namespace MonoTests.System.Data.OracleClient
{
[TestFixture]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public class OracleTransaction_Rollback : ADONetTesterClass
{
public static void Main()
diff --git a/mcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.exclude.sources b/mcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.exclude.sources
deleted file mode 100755
index 46691cf43e0..00000000000
--- a/mcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.exclude.sources
+++ /dev/null
@@ -1,47 +0,0 @@
-System.Data.OracleClient.Oci/OciAttributeType.cs
-System.Data.OracleClient.Oci/OciBindHandle.cs
-System.Data.OracleClient.Oci/OciCalls.cs
-System.Data.OracleClient.Oci/OciColumnInfo.cs
-System.Data.OracleClient.Oci/OciCredentialType.cs
-System.Data.OracleClient.Oci/OciDataType.cs
-System.Data.OracleClient.Oci/OciDateTimeDescriptor.cs
-System.Data.OracleClient.Oci/OciDefineHandle.cs
-System.Data.OracleClient.Oci/OciDescriptorHandle.cs
-System.Data.OracleClient.Oci/OciEnvironmentHandle.cs
-System.Data.OracleClient.Oci/OciEnvironmentMode.cs
-System.Data.OracleClient.Oci/OciErrorHandle.cs
-System.Data.OracleClient.Oci/OciErrorInfo.cs
-System.Data.OracleClient.Oci/OciExecuteMode.cs
-System.Data.OracleClient.Oci/OciHandle.cs
-System.Data.OracleClient.Oci/OciHandleType.cs
-System.Data.OracleClient.Oci/OciLobLocator.cs
-System.Data.OracleClient.Oci/OciLobType.cs
-System.Data.OracleClient.Oci/OciNlsServiceType.cs
-System.Data.OracleClient.Oci/OciParameterDescriptor.cs
-System.Data.OracleClient.Oci/OciPointerType.cs
-System.Data.OracleClient.Oci/OciRowIdDescriptor.cs
-System.Data.OracleClient.Oci/OciServerHandle.cs
-System.Data.OracleClient.Oci/OciServiceHandle.cs
-System.Data.OracleClient.Oci/OciSessionHandle.cs
-System.Data.OracleClient.Oci/OciSessionMode.cs
-System.Data.OracleClient.Oci/OciStatementHandle.cs
-System.Data.OracleClient.Oci/OciStatementLanguage.cs
-System.Data.OracleClient.Oci/OciStatementMode.cs
-System.Data.OracleClient.Oci/OciStatementType.cs
-System.Data.OracleClient.Oci/OciTransactionFlags.cs
-System.Data.OracleClient.Oci/OciTransactionHandle.cs
-System.Data.OracleClient/OciGlue.cs
-System.Data.OracleClient/OracleBFile.cs
-System.Data.OracleClient/OracleBinary.cs
-System.Data.OracleClient/OracleCommand.cs
-System.Data.OracleClient/OracleCommandBuilder.cs
-System.Data.OracleClient/OracleConnection.cs
-System.Data.OracleClient/OracleConnectionPool.cs
-System.Data.OracleClient/OracleConnectionPoolManager.cs
-System.Data.OracleClient/OracleDataReader.cs
-System.Data.OracleClient/OracleException.cs
-System.Data.OracleClient/OracleInfoMessageEventArgs.cs
-System.Data.OracleClient/OracleLob.cs
-System.Data.OracleClient/OracleParameterCollection.cs
-System.Data.OracleClient/OracleParameter.cs
-System.Data.OracleClient/OracleTransaction.cs
diff --git a/mcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.sources b/mcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.sources
deleted file mode 100755
index 42cde4a561c..00000000000
--- a/mcs/class/System.Data.OracleClient/net_1_1_java_System.Data.OracleClient.dll.sources
+++ /dev/null
@@ -1,19 +0,0 @@
-#include System.Data.OracleClient.dll.sources
-Mainsoft.Data.Jdbc.Providers.jvm/OracleProvider.cs
-System.Data.OracleClient.jvm/ExceptionHelper.cs
-System.Data.OracleClient.jvm/OracleBFile.cs
-System.Data.OracleClient.jvm/OracleBinary.cs
-System.Data.OracleClient.jvm/OracleCommand.cs
-System.Data.OracleClient.jvm/OracleCommandBuilder.cs
-System.Data.OracleClient.jvm/OracleConnection.cs
-System.Data.OracleClient.jvm/OracleConvert.cs
-System.Data.OracleClient.jvm/OracleDataReader.cs
-System.Data.OracleClient.jvm/OracleError.cs
-System.Data.OracleClient.jvm/OracleErrorCollection.cs
-System.Data.OracleClient.jvm/OracleException.cs
-System.Data.OracleClient.jvm/OracleInfoMessageEventArgs.cs
-System.Data.OracleClient.jvm/OracleLob.cs
-System.Data.OracleClient.jvm/OracleParameter.cs
-System.Data.OracleClient.jvm/OracleParameterCollection.cs
-System.Data.OracleClient.jvm/OracleTransaction.cs
-System.Data.OracleClient.jvm/Regex.cs
diff --git a/mcs/class/System.Data.Services/System.Data.Services.csproj b/mcs/class/System.Data.Services/System.Data.Services.csproj
deleted file mode 100644
index 66ce754ab2f..00000000000
--- a/mcs/class/System.Data.Services/System.Data.Services.csproj
+++ /dev/null
@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A586EC7C-F793-42C1-8C14-D8C4DF147D1A}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Data.Services</RootNamespace>
- <AssemblyName>System.Data.Services</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel.Web">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ChangeInterceptorAttribute.cs" />
- <Compile Include="DataService.cs" />
- <Compile Include="DataServiceException.cs" />
- <Compile Include="DataServiceHost.cs" />
- <Compile Include="DataServiceHostFactory.cs" />
- <Compile Include="EntitySetRights.cs" />
- <Compile Include="ETagAttribute.cs" />
- <Compile Include="ExpandSegment.cs" />
- <Compile Include="ExpandSegmentCollection.cs" />
- <Compile Include="HandleExceptionArgs.cs" />
- <Compile Include="IDataServiceConfiguration.cs" />
- <Compile Include="IDataServiceHost.cs" />
- <Compile Include="IExpandedResult.cs" />
- <Compile Include="IExpandProvider.cs" />
- <Compile Include="IgnorePropertiesAttribute.cs" />
- <Compile Include="IRequestHandler.cs" />
- <Compile Include="IUpdatable.cs" />
- <Compile Include="MimeTypeAttribute.cs" />
- <Compile Include="ProcessRequestArgs.cs" />
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="QueryInterceptorAttribute.cs" />
- <Compile Include="ServiceOperationRights.cs" />
- <Compile Include="SingleResultAttribute.cs" />
- <Compile Include="UpdateOperations.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/mcs/class/System.Data.Services/System.Data.Services.sln b/mcs/class/System.Data.Services/System.Data.Services.sln
deleted file mode 100644
index 56aa5e1bfe8..00000000000
--- a/mcs/class/System.Data.Services/System.Data.Services.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.Services", "System.Data.Services.csproj", "{A586EC7C-F793-42C1-8C14-D8C4DF147D1A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.Services.Tests", "Tests\System.Data.Services.Tests.csproj", "{2491EDE6-791F-4CA2-B99C-70791EE81E75}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {2491EDE6-791F-4CA2-B99C-70791EE81E75}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2491EDE6-791F-4CA2-B99C-70791EE81E75}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2491EDE6-791F-4CA2-B99C-70791EE81E75}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2491EDE6-791F-4CA2-B99C-70791EE81E75}.Release|Any CPU.Build.0 = Release|Any CPU
- {A586EC7C-F793-42C1-8C14-D8C4DF147D1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A586EC7C-F793-42C1-8C14-D8C4DF147D1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A586EC7C-F793-42C1-8C14-D8C4DF147D1A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A586EC7C-F793-42C1-8C14-D8C4DF147D1A}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- StartupItem = System.Data.Services.csproj
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data.Services/Test/ChangeInterceptorAttributeTests.cs b/mcs/class/System.Data.Services/Test/ChangeInterceptorAttributeTests.cs
index d8d0e157a8e..3cc769d05e3 100644
--- a/mcs/class/System.Data.Services/Test/ChangeInterceptorAttributeTests.cs
+++ b/mcs/class/System.Data.Services/Test/ChangeInterceptorAttributeTests.cs
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
+using System.Data.Services;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class ChangeInterceptorAttributeTests {
[Test]
@@ -45,4 +47,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("setName", ci.EntitySetName);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/DataServiceExceptionTests.cs b/mcs/class/System.Data.Services/Test/DataServiceExceptionTests.cs
index 6058fc3e386..5f9758a44c5 100644
--- a/mcs/class/System.Data.Services/Test/DataServiceExceptionTests.cs
+++ b/mcs/class/System.Data.Services/Test/DataServiceExceptionTests.cs
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
+using System.Data.Services;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class DataServiceExceptionTests {
[Test]
@@ -68,4 +70,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual (inner, ex.InnerException);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/DataServiceTests.cs b/mcs/class/System.Data.Services/Test/DataServiceTests.cs
index 58b67859593..2bcc6a9dd75 100644
--- a/mcs/class/System.Data.Services/Test/DataServiceTests.cs
+++ b/mcs/class/System.Data.Services/Test/DataServiceTests.cs
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
+using System.Data.Services;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class DataServiceTests {
[Test]
@@ -79,4 +81,4 @@ namespace System.Data.Services.Tests {
this.OnStartProcessingRequest (args);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/ETagAttributeTests.cs b/mcs/class/System.Data.Services/Test/ETagAttributeTests.cs
index 8b40de6c5bd..706e02c6992 100644
--- a/mcs/class/System.Data.Services/Test/ETagAttributeTests.cs
+++ b/mcs/class/System.Data.Services/Test/ETagAttributeTests.cs
@@ -26,10 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
+using System.Data.Services;
using System.Linq;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class ETagAttributeTests {
[Test]
@@ -63,4 +65,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("bar", e.PropertyNames[1]);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/ExpandSegmentCollectionTests.cs b/mcs/class/System.Data.Services/Test/ExpandSegmentCollectionTests.cs
index e0eb629d5be..cd5e9a1d31f 100644
--- a/mcs/class/System.Data.Services/Test/ExpandSegmentCollectionTests.cs
+++ b/mcs/class/System.Data.Services/Test/ExpandSegmentCollectionTests.cs
@@ -26,10 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Data.Services;
using System.Linq.Expressions;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class ExpandSegmentCollectionTests {
[Test]
@@ -101,4 +102,4 @@ namespace System.Data.Services.Tests {
Assert.IsFalse (esc.HasFilter);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/ExpandSegmentTests.cs b/mcs/class/System.Data.Services/Test/ExpandSegmentTests.cs
index f64faa8fad2..ce6712c94e0 100644
--- a/mcs/class/System.Data.Services/Test/ExpandSegmentTests.cs
+++ b/mcs/class/System.Data.Services/Test/ExpandSegmentTests.cs
@@ -26,10 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
+using System.Data.Services;
using System.Linq.Expressions;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class ExpandSegmentTests {
[Test]
@@ -84,4 +86,4 @@ namespace System.Data.Services.Tests {
{ new ExpandSegment ("first", null), new ExpandSegment ("second", null), new ExpandSegment ("third", null) }));
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/IgnorePropertiesAttributeTests.cs b/mcs/class/System.Data.Services/Test/IgnorePropertiesAttributeTests.cs
index 04c17e3d3ce..090b3bf64bd 100644
--- a/mcs/class/System.Data.Services/Test/IgnorePropertiesAttributeTests.cs
+++ b/mcs/class/System.Data.Services/Test/IgnorePropertiesAttributeTests.cs
@@ -26,10 +26,12 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
+using System.Data.Services;
using System.Linq;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class IgnorePropertiesAttributeTests {
[Test]
@@ -63,4 +65,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("bar", e.PropertyNames[1]);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/MimeTypeAttributeTests.cs b/mcs/class/System.Data.Services/Test/MimeTypeAttributeTests.cs
index 6b5533ffa50..824cab9fcb1 100644
--- a/mcs/class/System.Data.Services/Test/MimeTypeAttributeTests.cs
+++ b/mcs/class/System.Data.Services/Test/MimeTypeAttributeTests.cs
@@ -26,9 +26,10 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.Data.Services;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class MimeTypeAttributeTests {
[Test]
@@ -39,4 +40,4 @@ namespace System.Data.Services.Tests {
Assert.AreEqual ("type", mt.MimeType);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/QueryInterceptorAttributeTests.cs b/mcs/class/System.Data.Services/Test/QueryInterceptorAttributeTests.cs
index b483fbe1cdd..e4b0147cccd 100644
--- a/mcs/class/System.Data.Services/Test/QueryInterceptorAttributeTests.cs
+++ b/mcs/class/System.Data.Services/Test/QueryInterceptorAttributeTests.cs
@@ -26,9 +26,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
+using System.Data.Services;
using NUnit.Framework;
-namespace System.Data.Services.Tests {
+namespace MonoTests.System.Data.Services {
[TestFixture]
public class QueryInterceptorAttributeTests {
[Test]
@@ -45,4 +47,4 @@ namespace System.Data.Services.Tests {
new QueryInterceptorAttribute (null);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data.Services/Test/System.Data.Services.Tests.csproj b/mcs/class/System.Data.Services/Test/System.Data.Services.Tests.csproj
deleted file mode 100644
index b23282f452e..00000000000
--- a/mcs/class/System.Data.Services/Test/System.Data.Services.Tests.csproj
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{2491EDE6-791F-4CA2-B99C-70791EE81E75}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Data.Services.Tests</RootNamespace>
- <AssemblyName>System.Data.Services.Tests</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ChangeInterceptorAttributeTests.cs" />
- <Compile Include="DataServiceExceptionTests.cs" />
- <Compile Include="DataServiceTests.cs" />
- <Compile Include="ETagAttributeTests.cs" />
- <Compile Include="ExpandSegmentCollectionTests.cs" />
- <Compile Include="ExpandSegmentTests.cs" />
- <Compile Include="IgnorePropertiesAttributeTests.cs" />
- <Compile Include="MimeTypeAttributeTests.cs" />
- <Compile Include="QueryInterceptorAttributeTests.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ItemGroup>
- <ProjectReference Include="..\System.Data.Services.csproj">
- <Project>{A586EC7C-F793-42C1-8C14-D8C4DF147D1A}</Project>
- <Name>System.Data.Services</Name>
- </ProjectReference>
- </ItemGroup>
-</Project>
diff --git a/mcs/class/System.Data/Assembly/AssemblyInfo.cs b/mcs/class/System.Data/Assembly/AssemblyInfo.cs
index 9f8a04e98aa..a98cee8e723 100644
--- a/mcs/class/System.Data/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Data/Assembly/AssemblyInfo.cs
@@ -51,18 +51,14 @@ using System.Runtime.InteropServices;
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyInformationalVersion (Consts.FxFileVersion)]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
-#endif
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: ComVisible (false)]
[assembly: AllowPartiallyTrustedCallers]
[assembly: AssemblyDelaySign (true)]
-#if !TARGET_JVM
[assembly: AssemblyKeyFile("../ecma.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
diff --git a/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/GenericProvider.cs b/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/GenericProvider.cs
deleted file mode 100644
index 690250c0595..00000000000
--- a/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/GenericProvider.cs
+++ /dev/null
@@ -1,385 +0,0 @@
-//
-// System.Data.OleDb.OleDbConnection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Data.Common;
-using System.Data.Configuration;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Reflection;
-using System.Text.RegularExpressions;
-using Mainsoft.Data.Configuration;
-
-using System.Globalization;
-
-using java.sql;
-using javax.sql;
-using javax.naming;
-
-namespace Mainsoft.Data.Jdbc.Providers
-{
- public class GenericProvider : IConnectionProvider
- {
- #region JdbcUrlConnector
-
- sealed class JdbcUrlConnector {
- #region Consts
-
- private static readonly Regex JdbcUrlPatternRegex= new Regex (@"\$\{(?<VALUE>[^$\{\}]*)\}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
-
- #endregion // Consts
-
- #region Fields
-
- readonly IConnectionStringDictionary _keyMapper;
- readonly GenericProvider _provider;
- readonly ArrayList _excludedKeys = new ArrayList();
-
- #endregion // Fields
-
- #region Constructors
-
- internal JdbcUrlConnector (GenericProvider provider, IConnectionStringDictionary keyMapper) {
- _provider = provider;
- _keyMapper = keyMapper;
- }
-
- #endregion // Constructors
-
-
- #region Methods
-
- internal java.sql.Connection Connection {
- get {
- java.util.Properties properties = new java.util.Properties ();
-
- string url = (string)_keyMapper["JdbcURL"];
- if (url == null) {
- string jdbcUrlPattern = (string)_provider.ProviderInfo [ConfigurationConsts.JdbcUrlPattern];
- if (jdbcUrlPattern == null || jdbcUrlPattern.Length == 0) {
- //throw ExceptionHelper.JdbcUrlPatternNotFound ((string)_provider.ProviderInfo [ConfigurationConsts.Name]);
- object [] args = new object [] {_provider.ProviderInfo [ConfigurationConsts.Name]};
- throw new ArgumentException (String.Format("Provider '{0}' is not configured with valid JDBC URL pattern.",args));
- }
- MatchEvaluator evaluator = new MatchEvaluator (ReplaceEvaluator);
- url = JdbcUrlPatternRegex.Replace (jdbcUrlPattern, evaluator);
- }
- else {
- // hack for backward comatibility:
- // if the connection string contains 'Provider',
- // the following mapping will hold:
- // 'User', 'User Id' --> 'user'
- // 'Password' --> 'password'
- if (_keyMapper["Provider"] != null) {
-
- const string USER = "User";
- const string USERID = "User Id";
- const string PASSWORD = "Password";
-
- string user = (string)_keyMapper[USER];
- if (user != null) {
- properties.put("user", user);
- _excludedKeys.Add(USER);
- }
- else {
- user = (string)_keyMapper[USERID];
- if (user != null) {
- properties.put("user", user);
- _excludedKeys.Add(USERID);
- }
- }
-
- string password = (string)_keyMapper[PASSWORD];
- if (password != null) {
- properties.put("password", password);
- _excludedKeys.Add(PASSWORD);
- }
- }
- }
-
- if (_provider._excludedKeys != null)
- _excludedKeys.AddRange(_provider._excludedKeys);
-
- foreach(string key in _provider.KeyMapping.Keys) {
- object value = _keyMapper [key];
- if (value == null)
- continue;
- bool contains = false;
- for (int i = 0; i < _excludedKeys.Count; i++) {
- if (String.Compare((string)_excludedKeys[i], key,
- true, CultureInfo.InvariantCulture) == 0) {
- contains = true;
- break;
- }
- }
- if (!contains) {
- properties.put (key, value);
- _excludedKeys.Add(key);
- }
- }
-
- for (int i = 0; i < _excludedKeys.Count; i++) {
- string value = _keyMapper.GetConnectionStringKey((string)_excludedKeys[i]);
- if (value != null)
- _excludedKeys[i] = value;
- }
-
- foreach(string key in _keyMapper.Keys) {
- object value = _keyMapper [key];
- if (value == null)
- continue;
- bool contains = false;
- for (int i = 0; i < _excludedKeys.Count; i++) {
- if (String.Compare((string)_excludedKeys[i], key,
- true, CultureInfo.InvariantCulture) == 0) {
- contains = true;
- break;
- }
- }
- if (!contains) {
- if (_provider._unsupportedKeys != null)
- for (int i = 0; i < _provider._unsupportedKeys.Length; i++)
- if (String.Compare ((string) _provider._unsupportedKeys [i], key,
- true, CultureInfo.InvariantCulture) == 0)
- throw new NotSupportedException (
- String.Format ("The parameter '{0}' is not supported.", key));
-
- properties.put (key, value);
- }
- }
-
- Driver d = ActivateJdbcDriver ();
- // TBD : add DriverManager.setLoginTimeout
- if (d != null)
- return d.connect (url, properties);
-
- return DriverManager.getConnection (url, properties);
- }
- }
-
- private string ReplaceEvaluator (Match m) {
- Group g = m.Groups["VALUE"];
-
- if (!g.Success)
- return String.Empty;
-
- string usedKey = g.Value.Trim();
-
- string value = (string)_keyMapper [usedKey];
- if (value == null)
- throw new ArgumentException(
- String.Format("Missing parameter {0}", g.Value),
- "ConnectionString");
-
- _excludedKeys.Add(usedKey);
- return value;
- }
-
- private Driver ActivateJdbcDriver () {
- string driver = (string) _keyMapper["JdbcDriverClassName"];
- if (driver == null)
- driver = (string) _provider.ProviderInfo [ConfigurationConsts.JdbcDriverClassName];
-
- if (driver != null && driver.Length != 0) {
- try {
- java.lang.ClassLoader contextLoader = (java.lang.ClassLoader) AppDomain.CurrentDomain.GetData ("GH_ContextClassLoader");
- if (contextLoader != null)
- return (Driver) contextLoader.loadClass (driver).newInstance ();
- return (Driver) java.lang.Class.forName (driver).newInstance ();
- }
- catch (java.lang.ClassNotFoundException e) {
- throw new TypeLoadException (e.Message, e);
- }
- catch (java.lang.InstantiationException e) {
- throw new MemberAccessException (e.Message, e);
- }
- catch (java.lang.IllegalAccessException e) {
- throw new MissingMethodException (e.Message, e);
- }
- }
-
- return null;
- }
-
- #endregion // Methods
- }
-
- #endregion // JdbcUrlBuilder
-
- #region DataSourceCache
-
- private sealed class DataSourceCache : AbstractDbMetaDataCache {
- internal DataSource GetDataSource(string dataSourceName,string namingProviderUrl,string namingFactoryInitial) {
- Hashtable cache = Cache;
-
- DataSource ds = cache[dataSourceName] as DataSource;
-
- if (ds != null) {
- return ds;
- }
-
- Context ctx = null;
-
- java.util.Properties properties = new java.util.Properties();
-
- if ((namingProviderUrl != null) && (namingProviderUrl.Length > 0)) {
- properties.put("java.naming.provider.url",namingProviderUrl);
- }
-
- if ((namingFactoryInitial != null) && (namingFactoryInitial.Length > 0)) {
- properties.put("java.naming.factory.initial",namingFactoryInitial);
- }
-
- ctx = new InitialContext(properties);
-
- try {
- ds = (DataSource)ctx.lookup(dataSourceName);
- }
- catch(javax.naming.NameNotFoundException e) {
- // possible that is a Tomcat bug,
- // so try to lookup for jndi datasource with "java:comp/env/" appended
- ds = (DataSource)ctx.lookup("java:comp/env/" + dataSourceName);
- }
-
- cache[dataSourceName] = ds;
- return ds;
- }
- }
-
- #endregion // DatasourceCache
-
- #region Fields
-
- private static DataSourceCache _dataSourceCache = new DataSourceCache();
-
- private readonly IDictionary _providerInfo;
- private NameValueCollection _keyMapping;
- private string[] _excludedKeys;
- private string[] _unsupportedKeys;
-
- #endregion // Fields
-
- #region Constructors
-
- public GenericProvider(IDictionary providerInfo)
- {
- _providerInfo = providerInfo;
- _keyMapping = null;
- }
-
- #endregion // Constructors
-
- #region Properties
-
- protected IDictionary ProviderInfo
- {
- get { return _providerInfo; }
- }
-
- private NameValueCollection KeyMapping
- {
- get
- {
- if (_keyMapping == null)
- InitKeyMapping ();
-
- return _keyMapping;
- }
- }
-
- #endregion // Properties
-
- #region Methods
-
- public virtual java.sql.Connection GetConnection (IConnectionStringDictionary conectionStringBuilder)
- {
- string dataSourceJndi = (string) conectionStringBuilder.GetValue ("jndi-datasource-name");
-
- if (dataSourceJndi != null && dataSourceJndi.Length > 0) {
-
- string namingProviderUrl = (string) conectionStringBuilder.GetValue ("naming-provider-url");
- string namingFactoryInitial = (string) conectionStringBuilder.GetValue ("naming-factory-initial");
- DataSource ds = _dataSourceCache.GetDataSource(dataSourceJndi,namingProviderUrl,namingFactoryInitial);
- return ds.getConnection();
- }
-
- JdbcUrlConnector connector = new JdbcUrlConnector (this, conectionStringBuilder);
- return connector.Connection;
- }
-
- public virtual IConnectionStringDictionary GetConnectionStringBuilder (string connectionString)
- {
- return new ConnectionStringDictionary(connectionString, KeyMapping);
- }
-
- private void InitKeyMapping ()
- {
- lock (this) {
- if (_keyMapping != null)
- return;
-
- _keyMapping = new NameValueCollection (StringComparer.OrdinalIgnoreCase);
-
- // create key mappings collection
- string keyMappingsStr = (string) _providerInfo [ConfigurationConsts.KeyMapping];
- if (keyMappingsStr != null) {
- string [] keyMappings = keyMappingsStr.Split (ConfigurationConsts.SemicolonArr);
- foreach (string keyMapping in keyMappings) {
- if (keyMapping.Length == 0)
- continue;
- int equalsIndex = keyMapping.IndexOf ('=');
- string key = keyMapping.Substring (0, equalsIndex).Trim ();
- string [] mappings = keyMapping.Substring (equalsIndex + 1).Trim ().Split (ConfigurationConsts.CommaArr);
- foreach (string mapping in mappings)
- _keyMapping.Add (key, mapping.Trim ());
- }
- }
-
- string keyMappingExcludesStr = (string) _providerInfo [ConfigurationConsts.KeyMappingExcludes];
- if (keyMappingExcludesStr != null) {
- _excludedKeys = keyMappingExcludesStr.Split (ConfigurationConsts.CommaArr);
- for (int i = 0; i < _excludedKeys.Length; i++)
- _excludedKeys [i] = _excludedKeys [i].Trim ();
- }
-
- string keyMappingUnsupportedStr = (string) _providerInfo [ConfigurationConsts.KeyMappingUnsupported];
- if (keyMappingUnsupportedStr != null) {
- _unsupportedKeys = keyMappingUnsupportedStr.Split (ConfigurationConsts.CommaArr);
- for (int i = 0; i < _unsupportedKeys.Length; i++)
- _unsupportedKeys [i] = _unsupportedKeys [i].Trim ();
- }
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/IProvider.cs b/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/IProvider.cs
deleted file mode 100644
index 5c758005edb..00000000000
--- a/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/IProvider.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-//
-// System.Data.OleDb.OleDbConnection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using Mainsoft.Data.Configuration;
-
-using java.sql;
-
-namespace Mainsoft.Data.Jdbc.Providers
-{
- sealed class ConfigurationConsts {
- #region Constructors
-
- ConfigurationConsts() {
- }
-
- #endregion // Constructors
-
- #region Consts
-
- public const string Name = "id";
- public const string KeyMapping = "keyMapping";
- public const string KeyMappingExcludes = "keyExclude";
- public const string KeyMappingUnsupported = "keyUnsupported";
- public const string JdbcUrlPattern = "url";
- public const string JdbcDriverClassName = "driverClassName";
- public const string ProviderType = "type";
-
- public static readonly char [] SemicolonArr = new char [] { ';' };
- public static readonly char [] CommaArr = new char [] { ',' };
-
- #endregion // Consts
-
- }
-
- public interface IConnectionProvider
- {
- java.sql.Connection GetConnection (IConnectionStringDictionary connectionStringBuilder);
- IConnectionStringDictionary GetConnectionStringBuilder (string connectionString);
- }
-
- public interface IPreparedStatement : java.sql.PreparedStatement {
- void setBit(int parameterIndex, int value);
- void setChar(int parameterIndex, string value);
- void setNumeric(int parameterIndex, java.math.BigDecimal value);
- void setReal(int parameterIndex, double value);
- }
-}
diff --git a/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/OleDbSqlServerProvider.cs b/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/OleDbSqlServerProvider.cs
deleted file mode 100644
index 6995c54c4a5..00000000000
--- a/mcs/class/System.Data/Mainsoft.Data.Jdbc.Providers.jvm/OleDbSqlServerProvider.cs
+++ /dev/null
@@ -1,407 +0,0 @@
-//
-// System.Data.OleDb.OleDbConnection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-using System.Data.Common;
-using System.Data.Configuration;
-using System.Data.ProviderBase;
-using Mainsoft.Data.Configuration;
-
-using java.net;
-using System.Globalization;
-
-namespace Mainsoft.Data.Jdbc.Providers
-{
- #region OleDbSqlServerProvider2000
-
- public class OleDbSqlServerProvider2000 : GenericProvider
- {
- #region Consts
-
- private const string Port = "Port";
- private const string DefaultInstanceName = "MSSQLSERVER";
- private const int DefaultTimeout = 15;
-
- #endregion //Consts
-
- #region Fields
-
- #endregion // Fields
-
- #region Constructors
-
- public OleDbSqlServerProvider2000 (IDictionary providerInfo) : base (providerInfo)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- #endregion // Properties
-
- #region Methods
-
- public override IConnectionStringDictionary GetConnectionStringBuilder (string connectionString)
- {
- //TBD: should wrap the IConnectionStringDictionary
- IConnectionStringDictionary conectionStringBuilder = base.GetConnectionStringBuilder (connectionString);
- OleDbSqlHelper.InitConnectionStringBuilder (conectionStringBuilder);
-
- string port = (string) conectionStringBuilder [Port];
- if (port == null || port.Length == 0) {
- port = GetMSSqlPort (OleDbSqlHelper.GetInstanceName (conectionStringBuilder, DefaultInstanceName), OleDbSqlHelper.GetDataSource (conectionStringBuilder), OleDbSqlHelper.GetTimeout (conectionStringBuilder, DefaultTimeout));
- conectionStringBuilder.Add (Port, port);
- }
-
- return conectionStringBuilder;
- }
-
- static string GetMSSqlPort(string instanceName, string dataSource, int timeout) {
- string port = String.Empty;
- try {
- DatagramSocket socket = new DatagramSocket();
-
- // send request
- sbyte[] buf = new sbyte[] {2};
- InetAddress address = InetAddress.getByName(dataSource);
- DatagramPacket packet = new DatagramPacket(buf, buf.Length, address, 1434);
- socket.send(packet);
- sbyte[] recbuf = new sbyte[1024];
- packet = new DatagramPacket(recbuf, recbuf.Length, packet.getAddress(), packet.getPort());
-
- // try to receive from socket while increasing timeouts in geometric progression
- int iterationTimeout = 1;
- int totalTimeout = 0;
- for(;;) {
- socket.setSoTimeout(iterationTimeout);
- try {
- socket.receive(packet);
- break;
- }
- catch (SocketTimeoutException e) {
- totalTimeout += iterationTimeout;
- iterationTimeout *= 2;
- if (totalTimeout >= timeout*1000) {
- throw new java.sql.SQLException(
- String.Format ("Unable to retrieve the port number for {0} using UDP on port 1434. Please see your network administrator to solve this problem or add the port number of your SQL server instance to your connection string (i.e. port=1433).", dataSource)
- );
- }
- }
- }
- sbyte[] rcvdSbytes = packet.getData();
- char[] rcvdChars = new char[rcvdSbytes.Length];
- for(int i=0; i < rcvdSbytes.Length; i++) {
- rcvdChars[i] = (char)rcvdSbytes[i];
- }
- String received = new String(rcvdChars);
-
- java.util.StringTokenizer st = new java.util.StringTokenizer(received, ";");
- String prev = "";
- bool instanceReached = instanceName == null || instanceName.Length == 0;
- while (st.hasMoreTokens()) {
- if (!instanceReached) {
- if (prev.Trim().Equals("InstanceName")) {
- if (String.Compare(instanceName,st.nextToken().Trim(),true, CultureInfo.InvariantCulture) == 0) {
- instanceReached = true;
- }
- }
- }
- else {
- if (prev.Trim().Equals("tcp")) {
- port = st.nextToken().Trim();
- //ensure we got a valid int
- java.lang.Integer.parseInt(port);
- break;
- }
- }
- prev = st.nextToken();
- }
- socket.close();
-
- if (!instanceReached)
- throw new java.sql.SQLException(
- String.Format ("Specified SQL Server '{0}\\{1}' not found.", dataSource, instanceName)
- );
- return port;
-
- }
- catch (java.sql.SQLException) {
- throw;
- }
- catch (Exception e) {
- throw new java.sql.SQLException(e.Message);
- }
- }
-
- #endregion // Methods
- }
-
- #endregion // OleDbSqlServerProvider2000
-
- #region OleDbSqlServerProvider2005
-
- public class OleDbSqlServerProvider2005 : GenericProvider
- {
- #region Consts
-
- #endregion //Consts
-
- #region Fields
-
- #endregion // Fields
-
- #region Constructors
-
- public OleDbSqlServerProvider2005 (IDictionary providerInfo) : base (providerInfo)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- #endregion // Properties
-
- #region Methods
-
- public override IConnectionStringDictionary GetConnectionStringBuilder (string connectionString)
- {
- //TBD: should wrap the IConnectionStringDictionary
- IConnectionStringDictionary conectionStringBuilder = base.GetConnectionStringBuilder (connectionString);
- OleDbSqlHelper.InitConnectionStringBuilder (conectionStringBuilder);
- return conectionStringBuilder;
- }
-
- public override java.sql.Connection GetConnection(IConnectionStringDictionary conectionStringBuilder)
- {
- return new SqlServer2005Connection (base.GetConnection (conectionStringBuilder));
- }
-
- #endregion // Methods
-
- #region SqlServer2005Connection
-
- sealed class SqlServer2005Connection : Connection
- {
- #region Constructors
-
- public SqlServer2005Connection(java.sql.Connection connection) : base (connection)
- {
- }
-
- #endregion
-
- #region Methods
-
- public override java.sql.DatabaseMetaData getMetaData()
- {
- return new SqlServer2005DatabaseMetaData (base.getMetaData ());
- }
-
- #endregion
- }
-
- #endregion
-
- #region SqlServer2005DatabaseMetaData
-
- sealed class SqlServer2005DatabaseMetaData : DatabaseMetaData
- {
- #region Fields
-
- #endregion // Fields
-
- #region Constructors
-
- public SqlServer2005DatabaseMetaData (java.sql.DatabaseMetaData databaseMetaData) : base (databaseMetaData)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- #endregion // Properties
-
- #region Methods
-
- public override java.sql.ResultSet getProcedureColumns(string arg_0, string arg_1, string arg_2, string arg_3)
- {
- return new SqlServer2005DatbaseMetaDataResultSet (Wrapped.getProcedureColumns (arg_0, arg_1, arg_2, arg_3));
- }
-
- #endregion // Methods
- }
-
- #endregion
-
- #region SqlServer2005DatbaseMetaDataResultSet
-
- sealed class SqlServer2005DatbaseMetaDataResultSet : ResultSet
- {
- #region Consts
-
- private const string DataType = "DATA_TYPE";
-
- #endregion
-
- #region Fields
-
- #endregion // Fields
-
- #region Constructors
-
- public SqlServer2005DatbaseMetaDataResultSet (java.sql.ResultSet resultSet) : base (resultSet)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- #endregion // Properties
-
- #region Methods
-
- public override int getInt(int arg_0)
- {
- int res = base.getInt (arg_0);
- if (res == -9) // sql server 2005 jdbc driver value for NVARCHAR
- if (String.CompareOrdinal (getMetaData ().getColumnName (arg_0), DataType) == 0)
- return java.sql.Types.VARCHAR;
- if (res == -8) // sql server 2005 jdbc driver value for NVARCHAR
- if (String.CompareOrdinal (getMetaData ().getColumnName (arg_0), DataType) == 0)
- return java.sql.Types.CHAR;
- return res;
- }
-
- public override int getInt(string arg_0)
- {
- int res = base.getInt (arg_0);
-
- if (res == -9) // sql server 2005 jdbc driver value for NVARCHAR
- if (String.CompareOrdinal (arg_0, DataType) == 0)
- return java.sql.Types.VARCHAR;
-
- if (res == -8) // sql server 2005 jdbc driver value for NVARCHAR
- if (String.CompareOrdinal (arg_0, DataType) == 0)
- return java.sql.Types.CHAR;
- return res;
- }
-
- #endregion // Methods
- }
-
- #endregion
- }
-
- #endregion // OleDbSqlServerProvider2005
-
- #region OleDbSqlHelper
-
- class OleDbSqlHelper
- {
- private const string Database = "Database";
- private const string ServerName = "ServerName";
- private const string Timeout = "Timeout";
-
- internal static void InitConnectionStringBuilder (IConnectionStringDictionary conectionStringBuilder)
- {
- if (!conectionStringBuilder.Contains("jndi-datasource-name")) {
-
- string database = (string) conectionStringBuilder [Database];
- if (database == null)
- conectionStringBuilder.Add (Database, String.Empty);
-
- string dataSource = GetDataSource (conectionStringBuilder);
- string instanceName = GetInstanceName (conectionStringBuilder, null);
-
- if (instanceName != null)
- conectionStringBuilder [ServerName] = dataSource + "\\" + instanceName;
- else
- conectionStringBuilder [ServerName] = dataSource;
- }
- }
-
- // TBD : refactor GetInstanceName and GetDataSource to single method
- internal static string GetInstanceName (IDictionary keyMapper, string defaultInstanceName)
- {
- string dataSource = (string) keyMapper [ServerName];
- string instanceName = String.Empty;
- int instanceIdx;
- if (dataSource == null || (instanceIdx = dataSource.IndexOf ("\\")) == -1)
- // no named instance specified - use a default name
- return defaultInstanceName;
- else
- // get named instance name
- return dataSource.Substring (instanceIdx + 1);
- }
-
- internal static string GetDataSource (IDictionary keyMapper)
- {
- string dataSource = (string) keyMapper [ServerName];
- int instanceIdx;
- if (dataSource != null && (instanceIdx = dataSource.IndexOf ("\\")) != -1)
- // throw out named instance name
- dataSource = dataSource.Substring (0,instanceIdx);
-
- if (dataSource != null && dataSource.StartsWith ("(") && dataSource.EndsWith (")"))
- dataSource = dataSource.Substring (1,dataSource.Length - 2);
-
- if (String.Empty.Equals (dataSource) || (String.Compare ("local", dataSource, true, CultureInfo.InvariantCulture) == 0) || (String.CompareOrdinal (".", dataSource) == 0))
- dataSource = "localhost";
-
- return dataSource;
- }
-
- internal static int GetTimeout (IDictionary keyMapper, int defaultTimeout)
- {
- string timeoutStr = (string) keyMapper [Timeout];
- if ((timeoutStr != null) && (timeoutStr.Length != 0)) {
- try {
- return Convert.ToInt32(timeoutStr);
- }
- catch(FormatException e) {
- throw ExceptionHelper.InvalidValueForKey("connect timeout");
- }
- catch (OverflowException e) {
- throw ExceptionHelper.InvalidValueForKey("connect timeout");
- }
- }
- return defaultTimeout;
- }
- }
-
- #endregion // OleDbSqlHelper
-
-}
diff --git a/mcs/class/System.Data/Makefile b/mcs/class/System.Data/Makefile
index 4a15ce7480d..2fb0b08ecd5 100644
--- a/mcs/class/System.Data/Makefile
+++ b/mcs/class/System.Data/Makefile
@@ -24,13 +24,6 @@ LIB_MCS_FLAGS = \
-r:System.Xml.dll \
-ifeq (net_1_1_java, $(PROFILE))
-OTHER_RES = $(RESOURCE_FILES)
-LIB_MCS_FLAGS += \
- -r:rt.dll \
- -r:J2SE.Helpers.dll \
- $(OTHER_LIB_MCS_FLAGS)
-else
MOBILE := $(filter monotouch monodroid xammac mobile mobile_static, $(PROFILE))
ifdef MOBILE
LIB_MCS_FLAGS += \
@@ -42,7 +35,6 @@ LIB_MCS_FLAGS += \
-r:Mono.Data.Tds.dll \
$(OTHER_LIB_MCS_FLAGS)
endif
-endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -r:System.Core.dll -r:Mono.Data.Sqlite.dll -nowarn:618,169,612,219,168
diff --git a/mcs/class/System.Data/System.Data.Common/CatalogLocation.cs b/mcs/class/System.Data/System.Data.Common/CatalogLocation.cs
index c12cb34c49a..df795e2bb50 100644
--- a/mcs/class/System.Data/System.Data.Common/CatalogLocation.cs
+++ b/mcs/class/System.Data/System.Data.Common/CatalogLocation.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data.Common {
public enum CatalogLocation
diff --git a/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs b/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs
index ae3262f24da..75cfc1fb392 100644
--- a/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbCommandBuilder.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.ComponentModel;
using System.Data;
diff --git a/mcs/class/System.Data/System.Data.Common/DbCommandSet.cs b/mcs/class/System.Data/System.Data.Common/DbCommandSet.cs
index 9f55fba24f2..d0e494463a6 100644
--- a/mcs/class/System.Data/System.Data.Common/DbCommandSet.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbCommandSet.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.ComponentModel;
using System.Data;
diff --git a/mcs/class/System.Data/System.Data.Common/DbConnection.cs b/mcs/class/System.Data/System.Data.Common/DbConnection.cs
index 94355018c4c..156497a6814 100644
--- a/mcs/class/System.Data/System.Data.Common/DbConnection.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbConnection.cs
@@ -32,7 +32,7 @@
using System.ComponentModel;
using System.Data;
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
using System.Transactions;
#endif
@@ -97,7 +97,7 @@ namespace System.Data.Common {
protected abstract DbCommand CreateDbCommand ();
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
public virtual void EnlistTransaction (Transaction transaction)
{
throw new NotSupportedException ();
diff --git a/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs b/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
index f438cb100f1..18ac3aab9c6 100644
--- a/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs
@@ -659,7 +659,7 @@ namespace System.Data.Common
}
RowUpdatingEventArgs argsUpdating = CreateRowUpdatingEvent (row, command, statementType, tableMapping);
- row.RowError = null;
+ row.RowError = String.Empty;
OnRowUpdating (argsUpdating);
switch (argsUpdating.Status) {
case UpdateStatus.Continue :
diff --git a/mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs b/mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs
index 1eca5f966ab..5ff28000e32 100644
--- a/mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbDataSourceEnumerator.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data.Common {
public abstract class DbDataSourceEnumerator
diff --git a/mcs/class/System.Data/System.Data.Common/DbMetaDataCache.cs b/mcs/class/System.Data/System.Data.Common/DbMetaDataCache.cs
deleted file mode 100644
index ee279b1ecb0..00000000000
--- a/mcs/class/System.Data/System.Data.Common/DbMetaDataCache.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2002-2004 Mainsoft Corporation.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-using System;
-using System.Collections;
-
-using java.sql;
-
-namespace System.Data.Common
-{
- #region AbstractDbMetaDataCache
-
- internal abstract class AbstractDbMetaDataCache
- {
- Hashtable _cache;
- const int MINUTES_TIMEOUT = 10;
- private long _timestamp;
-
- protected AbstractDbMetaDataCache()
- {
- _cache = Hashtable.Synchronized(new Hashtable());
- }
-
- protected Hashtable Cache
- {
- get
- {
- long now = DateTime.Now.Ticks;
- if (now - _timestamp > MINUTES_TIMEOUT * TimeSpan.TicksPerMinute)
- {
- _timestamp = now;
- _cache.Clear();
- }
-
- return _cache;
- }
- }
- }
-
- #endregion
-}
diff --git a/mcs/class/System.Data/System.Data.Common/DbParameter.cs b/mcs/class/System.Data/System.Data.Common/DbParameter.cs
index f1ecefdde8c..d22af6a36f2 100644
--- a/mcs/class/System.Data/System.Data.Common/DbParameter.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbParameter.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.Collections;
using System.ComponentModel;
diff --git a/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs b/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs
index 82d6600f29b..fd56302648d 100644
--- a/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbParameterCollection.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.Collections;
using System.ComponentModel;
diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs b/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs
index 63c9a560ce2..0ea515a3455 100644
--- a/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbProviderFactories.cs
@@ -49,11 +49,7 @@ namespace System.Data.Common {
public static DbProviderFactory GetFactory (DataRow providerRow)
{
string assemblyType = (string) providerRow ["AssemblyQualifiedName"];
-#if TARGET_JVM // case insensitive GetType is not supported
- Type type = Type.GetType (assemblyType, false);
-#else
Type type = Type.GetType (assemblyType, false, true);
-#endif
if (type != null && type.IsSubclassOf (typeof (DbProviderFactory))) {
// Provider factories are singletons with Instance field having
// the sole instance
diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs b/mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs
index 8ce2a17db1e..592fdffa0e9 100644
--- a/mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbProviderFactory.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.Collections;
using System.Security;
diff --git a/mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs b/mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs
index 846ffed87bc..a368bf3f224 100644
--- a/mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbProviderSupportedClasses.cs
@@ -31,7 +31,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data.Common {
public enum DbProviderSupportedClasses
diff --git a/mcs/class/System.Data/System.Data.Common/DbTable.cs b/mcs/class/System.Data/System.Data.Common/DbTable.cs
index e07c0bf3747..ae4da776ac7 100644
--- a/mcs/class/System.Data/System.Data.Common/DbTable.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbTable.cs
@@ -30,215 +30,3 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if TARGET_JVM
-
-using System.ComponentModel;
-
-namespace System.Data.Common {
- public abstract class DbTable : DataTable
- {
- #region Constructors
-
- [MonoTODO]
- protected DbTable (DbProviderFactory providerFactory)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- [MonoTODO]
- public ConflictOption ConflictOption {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public DbConnection Connection {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public DbCommand DeleteCommand {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public DbCommand InsertCommand {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public DbProviderFactory ProviderFactory {
- get { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public bool ReturnProviderSpecificTypes {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public DbCommand SelectCommand {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public override ISite Site {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public DataTableMapping TableMapping {
- get { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public int UpdateBatchSize {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- [MonoTODO]
- public DbCommand UpdateCommand {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- #endregion // Properties
-
- #region Methods
-
- [MonoTODO]
- public DataRelation AddChildTable (string relationName, DbTable childTable, string parentColumnName, string childColumnName)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public DataRelation AddChildTable (string relationName, DbTable childTable, string[] parentColumnNames, string[] childColumnNames)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public override void BeginInit ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected virtual DbCommandBuilder CreateCommandBuilder (DbConnection connection)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected override void Dispose (bool disposing)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public override void EndInit ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int Fill (object[] parameterValues)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int Fill (FillOptions options, object[] parameterValues)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int Fill (FillOptions options, DbTransaction transaction, object[] parameterValues)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int FillPage (int startRecord, int maxRecords, object[] parameterValues)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int FillPage (int startRecord, int maxRecords, FillOptions options, object[] parameterValues)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int FillPage (int startRecord, int maxRecords, FillOptions options, DbTransaction transaction, object[] parameterValues)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected virtual string GenerateQuery (DbCommandBuilder cmdBuilder)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected virtual string GenerateQueryForHierarchy (DbCommandBuilder builder, DataTable[] tableList)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int Update ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int Update (UpdateOptions updateOptions)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int Update (UpdateOptions updateOptions, DbTransaction transaction)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int UpdateRows (DataRow[] dataRows)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int UpdateRows (DataRow[] dataRows, UpdateOptions updateOptions)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public int UpdateRows (DataRow[] dataRows, UpdateOptions updateOptions, DbTransaction transaction)
- {
- throw new NotImplementedException ();
- }
-
-
- #endregion // Methods
- }
-}
-
-#endif
diff --git a/mcs/class/System.Data/System.Data.Common/DbTransaction.cs b/mcs/class/System.Data/System.Data.Common/DbTransaction.cs
index ecd803de560..319ca963289 100644
--- a/mcs/class/System.Data/System.Data.Common/DbTransaction.cs
+++ b/mcs/class/System.Data/System.Data.Common/DbTransaction.cs
@@ -28,7 +28,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data.Common
{
diff --git a/mcs/class/System.Data/System.Data.Common/SchemaLocation.cs b/mcs/class/System.Data/System.Data.Common/SchemaLocation.cs
index da645ca64fc..b270c61899c 100644
--- a/mcs/class/System.Data/System.Data.Common/SchemaLocation.cs
+++ b/mcs/class/System.Data/System.Data.Common/SchemaLocation.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data.Common {
public enum SchemaLocation
diff --git a/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs b/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs
index f738a187a8d..83d8294334c 100644
--- a/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs
+++ b/mcs/class/System.Data/System.Data.Odbc/OdbcConnection.cs
@@ -37,7 +37,7 @@ using System.Data.Common;
using System.EnterpriseServices;
using System.Runtime.InteropServices;
using System.Text;
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
using System.Transactions;
#endif
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbCommand.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbCommand.cs
deleted file mode 100644
index d51327838d6..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbCommand.cs
+++ /dev/null
@@ -1,285 +0,0 @@
-//
-// System.Data.OleDb.OleDbCommand
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Data;
-using System.Data.Common;
-using System.Data.ProviderBase;
-
-using java.sql;
-// Cannot use this because it makes ArrayList ambiguous reference
-//using java.util;
-
-namespace System.Data.OleDb
-{
- public sealed class OleDbCommand : AbstractDbCommand
- {
-
- #region Fields
-
- internal static readonly int oracleTypeRefCursor = java.sql.Types.OTHER;
- private static readonly int _oracleRefCursor = -10; // oracle.jdbc.OracleTypes.CURSOR
- private int _currentParameterIndex = 0;
- private ResultSet _currentRefCursor;
-
- #endregion // Fields
-
- #region Constructors
-
- static OleDbCommand()
- {
- try {
- java.lang.Class OracleTypesClass = java.lang.Class.forName("oracle.jdbc.OracleTypes");
- _oracleRefCursor = OracleTypesClass.getField("CURSOR").getInt(null);
- }
- catch(java.lang.ClassNotFoundException e) {
- // oracle driver is not in classpath - just continue
- }
- }
-
- /**
- * Initializes a new instance of the OleDbCommand class.
- * The base constructor initializes all fields to their default values.
- * The following table shows initial property values for an instance of SqlCommand.
- */
- public OleDbCommand() : this(null, null, null)
- {
- }
-
- public OleDbCommand(OleDbConnection connection) : this(null, connection, null)
- {
- }
-
- /**
- * Initializes a new instance of the OleDbCommand class with the text of the query.
- * @param cmdText The text of the query.
- */
- public OleDbCommand(String cmdText) : this(cmdText, null, null)
- {
- }
-
- /**
- * Initializes a new instance of the OleDbCommand class with the text of the query and a SqlConnection.
- * @param cmdText The text of the query.
- * @param connection A SqlConnection that represents the connection to an instance of SQL Server.
- */
- public OleDbCommand(String cmdText, OleDbConnection connection) : this(cmdText, connection, null)
- {
- }
-
- /**
- * Initializes a new instance of the OleDbCommand class with the text of the query, a SqlConnection, and the Transaction.
- * @param cmdText The text of the query.
- * @param connection A SqlConnection that represents the connection to an instance of SQL Server.
- * @param transaction The SqlTransaction in which the OleDbCommand executes.
- */
- public OleDbCommand(
- String cmdText,
- OleDbConnection connection,
- OleDbTransaction transaction)
- : base(cmdText, connection, transaction)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public new OleDbConnection Connection
- {
- get { return (OleDbConnection)base.Connection; }
- set { base.Connection = (AbstractDBConnection)value; }
- }
-
- public new OleDbParameterCollection Parameters
- {
- get {
- return (OleDbParameterCollection)base.Parameters;
- }
- }
-
- public new OleDbTransaction Transaction
- {
- get { return (OleDbTransaction)base.Transaction; }
- set { base.Transaction = (DbTransaction)value; }
- }
-
- protected internal sealed override ResultSet CurrentResultSet
- {
- get {
- try {
- ResultSet resultSet = base.CurrentResultSet;
-
- if (resultSet != null) {
- return resultSet;
- }
- return CurrentRefCursor;
- }
- catch(SQLException e) {
- throw CreateException(e);
- }
- }
- }
-
- private ResultSet CurrentRefCursor
- {
- get {
- if (_currentParameterIndex < 0) {
- NextRefCursor();
- }
- if (_currentRefCursor == null && _currentParameterIndex < InternalParameters.Count) {
- _currentRefCursor = (ResultSet)((CallableStatement)Statement).getObject(_currentParameterIndex + 1);
- }
- return _currentRefCursor;
- }
- }
-
- #endregion // Properties
-
- #region Methods
-
- public new OleDbDataReader ExecuteReader()
- {
- return (OleDbDataReader)ExecuteReader(CommandBehavior.Default);
- }
-
- public new OleDbDataReader ExecuteReader(CommandBehavior behavior)
- {
- return (OleDbDataReader)base.ExecuteReader(behavior);
- }
-
- public new OleDbParameter CreateParameter()
- {
- return (OleDbParameter)CreateParameterInternal();
- }
-
- protected sealed override void CheckParameters()
- {
- for(int i = 0; i < Parameters.Count; i++) {
- OleDbParameter parameter = (OleDbParameter)Parameters[i];
- if ((parameter.OleDbType == OleDbType.Empty) || (parameter.OleDbType == OleDbType.Error)) {
- throw ExceptionHelper.ParametersNotInitialized(i,parameter.ParameterName,parameter.OleDbType.ToString());
- }
-
- if (((parameter.OleDbType == OleDbType.Char) || (parameter.OleDbType == OleDbType.Binary) ||
- (parameter.OleDbType == OleDbType.VarWChar) || (parameter.OleDbType == OleDbType.VarBinary) ||
- (parameter.OleDbType == OleDbType.VarNumeric)) && (parameter.Size == 0)) {
- throw ExceptionHelper.WrongParameterSize("OleDb");
- }
- }
- }
-
- protected sealed override DbParameter CreateParameterInternal()
- {
- return new OleDbParameter();
- }
-
- protected sealed override DbParameterCollection CreateParameterCollection(AbstractDbCommand parent)
- {
- return new OleDbParameterCollection((OleDbCommand)parent);
- }
-
- public override object Clone() {
- OleDbCommand clone = (OleDbCommand)base.Clone();
- clone._currentParameterIndex = 0;
- clone._currentRefCursor = null;
- return clone;
- }
-
- protected override void PrepareInternalParameters()
- {
- InternalParameters.Clear();
- _currentParameterIndex = -1;
- }
-
- protected override void BindOutputParameter(AbstractDbParameter parameter, int parameterIndex)
- {
- CallableStatement callableStatement = ((CallableStatement)Statement);
- if (((OleDbParameter)parameter).IsOracleRefCursor) {
- callableStatement.registerOutParameter(++parameterIndex, _oracleRefCursor);
- }
- else {
- base.BindOutputParameter(parameter, parameterIndex);
- }
- }
-
- protected override bool SkipParameter(DbParameter parameter)
- {
- return ((OleDbParameter)parameter).IsOracleRefCursor;
- }
-
- protected internal override bool NextResultSet()
- {
- try {
- bool hasMoreResults = base.NextResultSet();
-
- if (hasMoreResults) {
- return true;
- }
- else {
- return NextRefCursor();
- }
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- }
-
- private bool NextRefCursor()
- {
- _currentRefCursor = null;
- // FIXME : should we count all parameters or only out ones?
- for (_currentParameterIndex++;InternalParameters.Count > _currentParameterIndex;_currentParameterIndex++) {
- if (((OleDbParameter)InternalParameters[_currentParameterIndex]).IsOracleRefCursor) {
- return true;
- }
- }
- return false;
- }
-
- protected sealed override DbDataReader CreateReader()
- {
- return new OleDbDataReader(this);
- }
-
- protected internal sealed override SystemException CreateException(SQLException e)
- {
- return new OleDbException(e,Connection);
- }
-
- #endregion // Methods
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs
deleted file mode 100644
index 6c96afb556f..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConnection.cs
+++ /dev/null
@@ -1,221 +0,0 @@
-//
-// System.Data.OleDb.OleDbConnection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-using System.Data;
-using System.Data.Common;
-using System.Collections;
-using System.Data.ProviderBase;
-using System.Globalization;
-
-using java.sql;
-
-using System.Configuration;
-using Mainsoft.Data.Configuration;
-using Mainsoft.Data.Jdbc.Providers;
-
-namespace System.Data.OleDb
-{
- public sealed class OleDbConnection : AbstractDBConnection {
-
- #region Events
-
- public event OleDbInfoMessageEventHandler InfoMessage;
-
- #endregion // Events
-
- #region Constructors
-
- public OleDbConnection() : this(null) {
- }
-
- public OleDbConnection(String connectionString) : base(connectionString) {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public String Provider {
- get {
- IDictionary conDict = ConnectionStringBuilder;
- string provider = (string)conDict["Provider"];
- if (provider == null || provider.Length == 0)
- throw ExceptionHelper.OleDbNoProviderSpecified();
-
- return provider;
- }
- }
-
- protected override IConnectionProvider GetConnectionProvider() {
- IDictionary conProviderDict = ConnectionStringDictionary.Parse(ConnectionString);
- string jdbcUrl = (string)conProviderDict["JdbcUrl"];
- if (jdbcUrl == null) {
- string provider = (string)conProviderDict["Provider"];
- if (provider != null)
- return GetConnectionProvider("Mainsoft.Data.Configuration/OleDbProviders", provider);
- }
-
- return new GenericProvider (conProviderDict);
- }
-
- #endregion // Properties
-
- #region Methods
-
- public new OleDbTransaction BeginTransaction(IsolationLevel level)
- {
- return new OleDbTransaction(level, this);
- }
-
- public new OleDbTransaction BeginTransaction()
- {
- return BeginTransaction(IsolationLevel.ReadCommitted);
- }
-
- public new OleDbCommand CreateCommand()
- {
- return new OleDbCommand(this);
- }
-
- protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) {
- return BeginTransaction();
- }
-
- protected override DbCommand CreateDbCommand() {
- return CreateCommand();
- }
-
- protected sealed override SystemException CreateException(SQLException e)
- {
- return new OleDbException(e,this);
- }
-
- protected sealed override SystemException CreateException(string message)
- {
- return new OleDbException(message, null, this);
- }
-
- [MonoTODO]
- public DataTable GetOleDbSchemaTable (Guid schema, object[] restrictions)
- {
- if (State != ConnectionState.Open)
- throw ExceptionHelper.ConnectionNotOpened("GetOleDbSchemaTable", State.ToString());
-
- try {
-
- string[] fixedRestrictions = new string[4];
- if (restrictions != null) {
- if (restrictions.Length > 4)
- throw new OleDbException("The parameter is incorrect", null, this);
-
- for (int i = 0, count = restrictions.Length; i < count; i ++) {
- if (restrictions[i] != null) {
- if (!(restrictions[i] is string))
- throw new OleDbException("The parameter is incorrect", null, this);
-
- fixedRestrictions[i] = (string)restrictions[i];
- }
- }
- }
-
- DataTable schemaTable = new DataTable("Tables");
- schemaTable.Columns.Add("TABLE_CATALOG");
- schemaTable.Columns.Add("TABLE_SCHEMA");
- schemaTable.Columns.Add("TABLE_NAME");
- schemaTable.Columns.Add("TABLE_TYPE");
- schemaTable.Columns.Add("TABLE_GUID");
- schemaTable.Columns.Add("DESCRIPTION");
- schemaTable.Columns.Add("TABLE_PROPID");
- schemaTable.Columns.Add("DATE_CREATED");
- schemaTable.Columns.Add("DATE_MODIFIED");
-
- java.sql.ResultSet tableRes = JdbcConnection.getMetaData().getTables(
- fixedRestrictions[0],
- fixedRestrictions[1],
- fixedRestrictions[2],
- new string[]{fixedRestrictions[3]});
-
- try {
- while(tableRes.next()) {
- DataRow row = schemaTable.NewRow();
- row["TABLE_CATALOG"] = tableRes.getString("TABLE_CAT");
- row["TABLE_SCHEMA"] = tableRes.getString("TABLE_SCHEM");
- row["TABLE_NAME"] = tableRes.getString("TABLE_NAME");
- row["TABLE_TYPE"] = tableRes.getString("TABLE_TYPE");
- row["DESCRIPTION"] = tableRes.getString("REMARKS");
-
- schemaTable.Rows.Add(row);
- }
- }
- finally {
- tableRes.close();
- }
-
- return schemaTable;
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- }
-
- public static void ReleaseObjectPool()
- {
- // since we're using connection pool from app servet, this is by design
- //throw new NotImplementedException();
- }
-
-#if NET_2_0
- [MonoLimitation ("Empty implementation since State relies on java.sql.Connection.State always returning the correct state")]
- public void ResetState ()
- {
- }
-
-#endif
-
- protected internal sealed override void OnSqlWarning(SQLWarning warning)
- {
- OleDbErrorCollection col = new OleDbErrorCollection(warning, this);
- OnOleDbInfoMessage(new OleDbInfoMessageEventArgs(col));
- }
-
- private void OnOleDbInfoMessage (OleDbInfoMessageEventArgs value)
- {
- if (InfoMessage != null) {
- InfoMessage (this, value);
- }
- }
-
- #endregion // Methods
-
- }
-}
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConvert.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConvert.cs
deleted file mode 100644
index 67de73699c6..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbConvert.cs
+++ /dev/null
@@ -1,342 +0,0 @@
-//
-// System.Data.OleDb.OleDbConvert
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using System.Data.Common;
-using System.Data.ProviderBase;
-
-using java.sql;
-
-namespace System.Data.OleDb
-{
- internal sealed class OleDbConvert : DbConvert
- {
- #region Fields
-
- private static Hashtable _typeNamesMap;
-
- #endregion // Fields
-
- #region Constructors
-
- static OleDbConvert()
- {
- _typeNamesMap = new Hashtable(30,CaseInsensitiveHashCodeProvider.DefaultInvariant, CaseInsensitiveComparer.DefaultInvariant);
-
- // SqlServer types mapping
-// _typeNamesMap.Add("numeric(3, 0)1","DBTYPE_I1");
- _typeNamesMap.Add("smallint","DBTYPE_I2");
- _typeNamesMap.Add("Int","DBTYPE_I4");
- _typeNamesMap.Add("bigint","DBTYPE_I8");
- _typeNamesMap.Add("tinyint","DBTYPE_UI1");
-// _typeNamesMap.Add("numeric(5,0)","DBTYPE_UI2");
-// _typeNamesMap.Add("numeric(10,0)","DBTYPE_UI4");
-// _typeNamesMap.Add("numeric(20,0)","DBTYPE_UI8");
- _typeNamesMap.Add("Float","DBTYPE_R8");
- _typeNamesMap.Add("Real","DBTYPE_R4");
- _typeNamesMap.Add("numeric","DBTYPE_NUMERIC");
- _typeNamesMap.Add("decimal","DBTYPE_NUMERIC");
- _typeNamesMap.Add("money","DBTYPE_CY");
- _typeNamesMap.Add("smallmoney","DBTYPE_CY");
- _typeNamesMap.Add("ntext","DBTYPE_WLONGVARCHAR");
- _typeNamesMap.Add("nchar","DBTYPE_WCHAR");
- _typeNamesMap.Add("nvarchar","DBTYPE_WVARCHAR");
- _typeNamesMap.Add("Bit","DBTYPE_BOOL");
-// _typeNamesMap.Add("nvarchar(4000)","DBTYPE_VARIANT");
- _typeNamesMap.Add("sql_variant","DBTYPE_VARIANT");
- _typeNamesMap.Add("uniqueidentifier","DBTYPE_GUID");
- _typeNamesMap.Add("image","DBTYPE_LONGVARBINARY");
- _typeNamesMap.Add("timestamp","DBTYPE_BINARY");
- _typeNamesMap.Add("binary","DBTYPE_BINARY");
- _typeNamesMap.Add("varbinary","DBTYPE_VARBINARY");
- _typeNamesMap.Add("char","DBTYPE_CHAR");
- _typeNamesMap.Add("varchar","DBTYPE_VARCHAR");
- _typeNamesMap.Add("text","DBTYPE_LONGVARCHAR");
-// _typeNamesMap.Add("nchar","DBTYPE_WSTR");
-// _typeNamesMap.Add("nvarchar","DBTYPE_WSTR");
-// _typeNamesMap.Add("ntext","DBTYPE_WSTR");
-// _typeNamesMap.Add("datetime","DBTYPE_DATE");
- _typeNamesMap.Add("datetime","DBTYPE_DBTIMESTAMP");
- _typeNamesMap.Add("smalldatetime","DBTYPE_DBTIMESTAMP");
- _typeNamesMap.Add("Ignored","DBTYPE_BYREF");
- }
-
- #endregion //Constructors
-
- #region Methods
-
- internal static String JdbcTypeNameToDbTypeName(string jdbcTypeName)
- {
- jdbcTypeName = jdbcTypeName.Trim();
- string dbTypeName = (string)_typeNamesMap[jdbcTypeName];
-
- return (dbTypeName != null) ? dbTypeName : jdbcTypeName;
- }
-
- internal static OleDbType JdbcTypeToOleDbType(int jdbcType)
- {
- switch ((JavaSqlTypes)jdbcType) {
- case JavaSqlTypes.ARRAY: return OleDbType.Binary;
- case JavaSqlTypes.BIGINT: return OleDbType.BigInt;
- case JavaSqlTypes.BINARY: return OleDbType.Binary;
- case JavaSqlTypes.BIT: return OleDbType.Boolean;
- case JavaSqlTypes.BLOB: return OleDbType.Binary;
- case JavaSqlTypes.BOOLEAN: return OleDbType.Boolean;
- case JavaSqlTypes.CHAR: return OleDbType.Char;
- case JavaSqlTypes.CLOB: return OleDbType.LongVarWChar;
- case JavaSqlTypes.DATALINK: return OleDbType.IUnknown;
- case JavaSqlTypes.DATE: return OleDbType.DBDate;
- case JavaSqlTypes.DECIMAL: return OleDbType.Decimal;
- case JavaSqlTypes.DISTINCT: return OleDbType.IUnknown;
- case JavaSqlTypes.DOUBLE: return OleDbType.Double;
- case JavaSqlTypes.FLOAT: return OleDbType.Double;
- case JavaSqlTypes.INTEGER: return OleDbType.Integer;
- case JavaSqlTypes.JAVA_OBJECT: return OleDbType.IUnknown;
- case JavaSqlTypes.LONGVARBINARY: return OleDbType.LongVarBinary;
- case JavaSqlTypes.LONGVARCHAR: return OleDbType.LongVarWChar;
- case JavaSqlTypes.NULL: return OleDbType.Empty;
- case JavaSqlTypes.NUMERIC: return OleDbType.Numeric;
- default:
- case JavaSqlTypes.OTHER: return OleDbType.IUnknown;
- case JavaSqlTypes.REAL: return OleDbType.Single;
- case JavaSqlTypes.REF: return OleDbType.IUnknown;
- case JavaSqlTypes.SMALLINT: return OleDbType.SmallInt;
- case JavaSqlTypes.STRUCT: return OleDbType.IUnknown;
- case JavaSqlTypes.TIME: return OleDbType.DBTime;
- case JavaSqlTypes.TIMESTAMP: return OleDbType.DBTimeStamp;
- case JavaSqlTypes.TINYINT: return OleDbType.TinyInt;
- case JavaSqlTypes.VARBINARY: return OleDbType.VarBinary;
- case JavaSqlTypes.VARCHAR: return OleDbType.VarChar;
- }
- }
-
- internal static OleDbType ValueTypeToOleDbType(Type type)
- {
- switch (Type.GetTypeCode(type)) {
- case TypeCode.Boolean: return OleDbType.Boolean;
- case TypeCode.Byte: return OleDbType.UnsignedTinyInt;
- case TypeCode.Char: return OleDbType.Char;
- case TypeCode.DateTime: return OleDbType.Date;
- case TypeCode.DBNull: return OleDbType.Empty;
- case TypeCode.Decimal: return OleDbType.Decimal;
- case TypeCode.Double: return OleDbType.Double;
- case TypeCode.Empty: return OleDbType.Empty;
- case TypeCode.Int16: return OleDbType.SmallInt;
- case TypeCode.Int32: return OleDbType.Integer;
- case TypeCode.Int64: return OleDbType.BigInt;
- default:
- case TypeCode.Object: {
- if (type.Equals(DbTypes.TypeOfByteArray)) return OleDbType.Binary;
- if (type.Equals(DbTypes.TypeOfTimespan)) return OleDbType.DBTime;
- if (type.Equals(DbTypes.TypeOfGuid)) return OleDbType.Guid;
-
- if (type.IsEnum)
- return ValueTypeToOleDbType (Enum.GetUnderlyingType (type));
-
- return OleDbType.IUnknown;
- }
- case TypeCode.SByte: return OleDbType.TinyInt;
- case TypeCode.Single: return OleDbType.Single;
- case TypeCode.String: return OleDbType.VarWChar;
- case TypeCode.UInt16: return OleDbType.UnsignedSmallInt;
- case TypeCode.UInt32: return OleDbType.UnsignedInt;
- case TypeCode.UInt64: return OleDbType.UnsignedBigInt;
- }
- }
-
- internal static Type OleDbTypeToValueType(OleDbType oleDbType)
- {
- switch (oleDbType) {
- case OleDbType.BigInt : return DbTypes.TypeOfInt64;// typeof(long);
- case OleDbType.Binary : return DbTypes.TypeOfByteArray;
- case OleDbType.Boolean : return DbTypes.TypeOfBoolean;
- case OleDbType.BSTR : return DbTypes.TypeOfString;
- case OleDbType.Char : return DbTypes.TypeOfString;
- case OleDbType.Currency : return DbTypes.TypeOfDecimal;
- case OleDbType.Date : return DbTypes.TypeOfDateTime;
- case OleDbType.DBDate : return DbTypes.TypeOfDateTime;
- case OleDbType.DBTime : return DbTypes.TypeOfTimespan;
- case OleDbType.DBTimeStamp : return DbTypes.TypeOfDateTime;
- case OleDbType.Decimal : return DbTypes.TypeOfDecimal;
- case OleDbType.Double : return DbTypes.TypeOfDouble;
- case OleDbType.Empty : return null; //typeof(DBNull);
- case OleDbType.Error : return typeof(Exception);
- case OleDbType.Filetime : return DbTypes.TypeOfDateTime;
- case OleDbType.Guid : return DbTypes.TypeOfGuid;
- case OleDbType.IDispatch : return DbTypes.TypeOfObject;
- case OleDbType.Integer : return DbTypes.TypeOfInt32;
- case OleDbType.IUnknown : return DbTypes.TypeOfObject;
- case OleDbType.LongVarBinary : return DbTypes.TypeOfByteArray;
- case OleDbType.LongVarChar : return DbTypes.TypeOfString;
- case OleDbType.LongVarWChar : return DbTypes.TypeOfString;
- case OleDbType.Numeric : return DbTypes.TypeOfDecimal;
- case OleDbType.PropVariant : return DbTypes.TypeOfObject;
- case OleDbType.Single : return DbTypes.TypeOfFloat;
- case OleDbType.SmallInt : return DbTypes.TypeOfInt16;
- case OleDbType.TinyInt : return DbTypes.TypeOfSByte;
- case OleDbType.UnsignedBigInt : return DbTypes.TypeOfUInt64;
- case OleDbType.UnsignedInt : return DbTypes.TypeOfUInt32;
- case OleDbType.UnsignedSmallInt : return DbTypes.TypeOfUInt16;
- case OleDbType.UnsignedTinyInt : return DbTypes.TypeOfByte;
- case OleDbType.VarBinary : return DbTypes.TypeOfByteArray;
- case OleDbType.VarChar : return DbTypes.TypeOfString;
- case OleDbType.Variant : return DbTypes.TypeOfObject;
- case OleDbType.VarNumeric : return DbTypes.TypeOfDecimal;
- case OleDbType.VarWChar : return DbTypes.TypeOfString;
- case OleDbType.WChar : return DbTypes.TypeOfString;
- default : return DbTypes.TypeOfObject;
- }
- }
-
- internal static OleDbType DbTypeToOleDbType(DbType dbType)
- {
- switch (dbType) {
- case DbType.AnsiString : return OleDbType.VarChar;
- case DbType.Binary : return OleDbType.VarBinary;
- case DbType.Byte : return OleDbType.UnsignedTinyInt;
- case DbType.Boolean : return OleDbType.Boolean;
- case DbType.Currency : return OleDbType.Currency;
- case DbType.Date : return OleDbType.DBDate;
- case DbType.DateTime : return OleDbType.DBTimeStamp;
- case DbType.Decimal : return OleDbType.Decimal;
- case DbType.Double : return OleDbType.Double;
- case DbType.Guid : return OleDbType.Guid;
- case DbType.Int16 : return OleDbType.SmallInt;
- case DbType.Int32 : return OleDbType.Integer;
- case DbType.Int64 : return OleDbType.BigInt;
- case DbType.Object : return OleDbType.Variant;
- case DbType.SByte : return OleDbType.TinyInt;
- case DbType.Single : return OleDbType.Single;
- case DbType.String : return OleDbType.VarWChar;
- case DbType.Time : return OleDbType.DBTime;
- case DbType.UInt16 : return OleDbType.UnsignedSmallInt;
- case DbType.UInt32 : return OleDbType.UnsignedInt;
- case DbType.UInt64 : return OleDbType.UnsignedBigInt;
- case DbType.VarNumeric : return OleDbType.VarNumeric;
- case DbType.AnsiStringFixedLength : return OleDbType.Char;
- case DbType.StringFixedLength : return OleDbType.WChar;
- default : throw ExceptionHelper.InvalidDbType((int)dbType);
- }
- }
-
- internal static DbType OleDbTypeToDbType(OleDbType oleDbType)
- {
- switch (oleDbType) {
- case OleDbType.Empty : return DbType.Object;
- case OleDbType.SmallInt : return DbType.Int16;
- case OleDbType.Integer : return DbType.Int32;
- case OleDbType.Single : return DbType.Single;
- case OleDbType.Double : return DbType.Double;
- case OleDbType.Currency : return DbType.Currency;
- case OleDbType.Date : return DbType.DateTime;
- case OleDbType.BSTR : return DbType.String;
- case OleDbType.IDispatch : return DbType.Object;
- case OleDbType.Error : return DbType.Object;
- case OleDbType.Boolean : return DbType.Boolean;
- case OleDbType.Variant : return DbType.Object;
- case OleDbType.IUnknown : return DbType.Object;
- case OleDbType.Decimal : return DbType.Decimal;
- case OleDbType.TinyInt : return DbType.SByte;
- case OleDbType.UnsignedTinyInt : return DbType.Byte;
- case OleDbType.UnsignedSmallInt : return DbType.UInt16;
- case OleDbType.UnsignedInt : return DbType.UInt32;
- case OleDbType.BigInt : return DbType.Int64;
- case OleDbType.UnsignedBigInt : return DbType.UInt64;
- case OleDbType.Filetime : return DbType.DateTime;
- case OleDbType.Guid : return DbType.Guid;
- case OleDbType.Binary : return DbType.Binary;
- case OleDbType.Char : return DbType.AnsiStringFixedLength;
- case OleDbType.WChar : return DbType.StringFixedLength;
- case OleDbType.Numeric : return DbType.Decimal;
- case OleDbType.DBDate : return DbType.Date;
- case OleDbType.DBTime : return DbType.Time;
- case OleDbType.DBTimeStamp : return DbType.DateTime;
- case OleDbType.PropVariant : return DbType.Object;
- case OleDbType.VarNumeric : return DbType.VarNumeric;
- case OleDbType.VarChar : return DbType.AnsiString;
- case OleDbType.LongVarChar : return DbType.AnsiString;
- case OleDbType.VarWChar : return DbType.String;
- case OleDbType.LongVarWChar : return DbType.String;
- case OleDbType.VarBinary : return DbType.Binary;
- case OleDbType.LongVarBinary : return DbType.Binary;
- default : throw ExceptionHelper.InvalidOleDbType((int)oleDbType);
- }
- }
-
- internal static int OleDbTypeToJdbcType(OleDbType oleDbType)
- {
- switch(oleDbType) {
- case OleDbType.BigInt : return Types.BIGINT;
- case OleDbType.Binary : return Types.BINARY;
- case OleDbType.Boolean : return Types.BIT;
- case OleDbType.BSTR : return Types.VARCHAR;
- case OleDbType.Char : return Types.CHAR;
- case OleDbType.Currency : return Types.DECIMAL;
- case OleDbType.Date : return Types.TIMESTAMP;
- case OleDbType.DBDate : return Types.DATE;
- case OleDbType.DBTime : return Types.TIME;
- case OleDbType.DBTimeStamp : return Types.TIMESTAMP;
- case OleDbType.Decimal : return Types.DECIMAL;
- case OleDbType.Double : return Types.DOUBLE;
- case OleDbType.Empty : return Types.NULL;
- case OleDbType.Error : return Types.OTHER;
- case OleDbType.Filetime : return Types.TIMESTAMP;
- case OleDbType.Guid : return Types.CHAR;
- case OleDbType.IDispatch : return Types.OTHER; //throw new ArgumentException("The " + oleDbType + " OleDbType value is not supported.");
- case OleDbType.Integer : return Types.INTEGER;
- case OleDbType.IUnknown : return Types.OTHER; //throw new ArgumentException("The " + oleDbType + " OleDbType value is not supported.");
- case OleDbType.LongVarBinary : return Types.LONGVARBINARY;
- case OleDbType.LongVarChar : return Types.LONGVARCHAR;
- case OleDbType.LongVarWChar : return Types.LONGVARCHAR;
- case OleDbType.Numeric : return Types.NUMERIC;
- case OleDbType.PropVariant : return Types.OTHER;
- case OleDbType.Single : return Types.FLOAT;
- case OleDbType.SmallInt : return Types.SMALLINT;
- case OleDbType.TinyInt : return Types.TINYINT;
- case OleDbType.UnsignedBigInt : return Types.BIGINT;
- case OleDbType.UnsignedInt : return Types.INTEGER;
- case OleDbType.UnsignedSmallInt : return Types.SMALLINT;
- case OleDbType.UnsignedTinyInt : return Types.TINYINT;
- case OleDbType.VarBinary : return Types.VARBINARY;
- case OleDbType.VarChar : return Types.VARCHAR;
- case OleDbType.Variant : return Types.VARCHAR;
- case OleDbType.VarNumeric : return Types.DECIMAL;
- case OleDbType.VarWChar : return Types.VARCHAR;
- case OleDbType.WChar : return Types.VARCHAR;
- default : throw ExceptionHelper.InvalidOleDbType((int)oleDbType);
- }
-
- #endregion // Methods
- }
- }
-}
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbDataReader.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbDataReader.cs
deleted file mode 100644
index 554298c4693..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbDataReader.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// System.Data.OleDb.OleDbDataReader
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Data.Common;
-using System.Data.ProviderBase;
-
-using java.sql;
-
-namespace System.Data.OleDb
-{
- public sealed class OleDbDataReader : AbstractDataReader
- {
- #region Fields
-
- #endregion // Fields
-
- #region Constructors
-
- internal OleDbDataReader(OleDbCommand command) : base(command)
- {
- }
-
- #endregion // Constructors
-
- #region Methods
-
- protected sealed override SystemException CreateException(string message, SQLException e)
- {
- return new OleDbException(message,e, (OleDbConnection)_command.Connection);
- }
-
- protected sealed override SystemException CreateException(java.io.IOException e)
- {
- return new OleDbException(e, (OleDbConnection)_command.Connection);
- }
-
- public override String GetDataTypeName(int columnIndex)
- {
- try {
- string jdbcTypeName = Results.getMetaData().getColumnTypeName(columnIndex + 1);
-
- return OleDbConvert.JdbcTypeNameToDbTypeName(jdbcTypeName);
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- }
-
- protected override int GetProviderType(int jdbcType)
- {
- return (int)OleDbConvert.JdbcTypeToOleDbType(jdbcType);
- }
-
- [MonoNotSupported("")]
- public OleDbDataReader GetData (int ordinal)
- {
- throw new NotImplementedException ();
- }
-
- #endregion // Methods
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbError.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbError.cs
deleted file mode 100644
index f46680d629a..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbError.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// System.Data.OleDb.OleDbError
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Data.OleDb
-{
- using java.sql;
- using System.Data.Common;
- using System.Data.ProviderBase;
-
- [Serializable]
- public sealed class OleDbError : AbstractDbError
- {
-
- internal OleDbError(SQLException e, AbstractDBConnection connection) : base(e, connection) {
- }
-
- public String Message
- {
- get
- {
- return DbMessage;
- }
- }
-
- public int NativeError
- {
- get
- {
- return DbErrorCode;
- }
- }
-
- public String Source
- {
- get
- {
- return DbSource;
- }
- }
-
- public String SQLState
- {
- get
- {
- return DbSQLState;
- }
- }
-
- public override string ToString ()
- {
- string toStr;
-
- toStr = String.Format("OleDbError: {0}. {1}", Message, _e.StackTrace);
- return toStr;
-
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbErrorCollection.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbErrorCollection.cs
deleted file mode 100644
index f1c96c20175..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbErrorCollection.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-//
-// System.Data.OleDb.OleDbErrorCollection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Data.OleDb
-{
-
-
- using System.Collections;
- using java.sql;
- using System.Data.Common;
- using System.Data.ProviderBase;
-
- [Serializable]
- public sealed class OleDbErrorCollection : AbstractDbErrorCollection
- {
- internal OleDbErrorCollection(SQLException e, AbstractDBConnection connection) : base(e, connection) {
- }
- /**
- * Gets the error at the specified index.
- *
- * @param index of the error
- * @return Error on specified index
- */
- public OleDbError this[int index]
- {
- get
- {
- return (OleDbError)GetDbItem(index);
- }
- }
-
-#if NET_2_0
- public void CopyTo (OleDbError [] array, int index)
- {
- base.CopyTo (array, index);
- }
-
-#endif
-
- protected override AbstractDbError CreateDbError(SQLException e, AbstractDBConnection connection) {
- return new OleDbError(e, connection);
- }
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs
deleted file mode 100644
index cf2d729b4cf..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbException.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-//
-// System.Data.OleDb.OleDbException
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-namespace System.Data.OleDb
-{
-
- using java.sql;
- using System.Text;
- using System.Data.Common;
- using System.Data.ProviderBase;
-
- /*
- * CURRENT LIMITATIONS
- * 1. Constructor for serialization SqlException(SerializationInfo info, StreamingContext sc)
- * is not supported.
- * 2. Method "void GetObjectData(...,...)" is not supported (serialization)
- */
-#if NET_2_0
- public sealed class OleDbException : AbstractDbException
- {
- internal OleDbException (Exception cause, OleDbConnection connection) : base (cause, connection) { }
-
- internal OleDbException (SQLException cause, OleDbConnection connection) : base (cause, connection) { }
-
- internal OleDbException (string message, SQLException cause, OleDbConnection connection) : base (message, cause, connection) { }
-
- protected override AbstractDbErrorCollection DbErrors {
- get {
- return Errors;
- }
- }
-
- public OleDbErrorCollection Errors {
- get {
- return new OleDbErrorCollection (_cause, _connection);
- }
- }
-
- public override int ErrorCode {
- get {
- return DbErrorCode;
- }
- }
- }
-#else
- public sealed class OleDbException : System.Runtime.InteropServices.ExternalException
- {
- private class OleDbExceptionImpl : AbstractDbException {
- internal OleDbExceptionImpl(Exception cause, OleDbConnection connection) : base(cause, connection) {}
-
- internal OleDbExceptionImpl(SQLException cause, OleDbConnection connection) : base(cause, connection) {}
-
- internal OleDbExceptionImpl(string message, SQLException cause, OleDbConnection connection) : base(message, cause, connection) {}
-
- protected override AbstractDbErrorCollection DbErrors {
- get {
- return Errors;
- }
- }
-
- public OleDbErrorCollection Errors {
- get {
- return new OleDbErrorCollection(_cause, _connection);
- }
- }
-
- public int ErrorCode {
- get {
- return DbErrorCode;
- }
- }
- }
-
- OleDbExceptionImpl _impl;
-
- internal OleDbException(Exception cause, OleDbConnection connection) : base(null, cause) {
- _impl = new OleDbExceptionImpl(cause, connection);
- }
-
- internal OleDbException(SQLException cause, OleDbConnection connection) : base(null, cause) {
- _impl = new OleDbExceptionImpl(cause, connection);
- }
-
- internal OleDbException(string message, SQLException cause, OleDbConnection connection) : base(null, cause) {
- _impl = new OleDbExceptionImpl(message, cause, connection);
- }
- /**
- * Gets a collection of one or more SqlError objects that give detailed
- * information about exceptions generated by the SQL Server .NET Data Provider.
- * @return collection of SqlError objects
- */
- public OleDbErrorCollection Errors
- {
- get
- {
- return (OleDbErrorCollection)_impl.Errors;
- }
- }
-
- /**
- * Gets the error code of the error.
- * @return The error code of the error.
- */
- public override int ErrorCode
- {
- get
- {
- return base.HResult;
- }
- }
-
-
- /**
- * Gets the name of the OLE DB provider that generated the error.
- * @return the name of the OLE DB provider that generated the error.
- */
- public override String Source
- {
- get
- {
- return _impl.Source;
- }
- }
-
- public override string Message {
- get {
- return _impl.Message;
- }
- }
-
- }
-#endif
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbParameter.cs b/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbParameter.cs
deleted file mode 100644
index 71c7403501a..00000000000
--- a/mcs/class/System.Data/System.Data.OleDb.jvm/OleDbParameter.cs
+++ /dev/null
@@ -1,256 +0,0 @@
-//
-// System.Data.OleDb.OleDbParameter
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Text;
-using System.Data;
-using System.Data.Common;
-using System.Data.ProviderBase;
-
-using java.sql;
-using java.lang;
-using System.Globalization;
-
-namespace System.Data.OleDb
-{
- public sealed class OleDbParameter : AbstractDbParameter
- {
-
- #region Fields
-
- private OleDbType _oleDbType = OleDbType.VarWChar;
- private bool _isOracleRefCursor = false;
-
- #endregion // Fields
-
- #region Constructors
-
- public OleDbParameter()
- {
- }
-
- public OleDbParameter(String parameterName, Object value)
- : this (parameterName, OleDbType.VarWChar, 0, ParameterDirection.Input,
- false, 0, 0, String.Empty, DataRowVersion.Current, value)
- {
- IsDbTypeSet = false;
- }
-
- public OleDbParameter(String parameterName, OleDbType dbType)
- : this (parameterName, dbType, 0, ParameterDirection.Input,
- false, 0, 0, String.Empty, DataRowVersion.Current, null)
- {
- }
-
- public OleDbParameter(String parameterName, OleDbType dbType, int size)
- : this (parameterName, dbType, size, ParameterDirection.Input,
- false, 0, 0, String.Empty, DataRowVersion.Current, null)
- {
- }
-
- public OleDbParameter(String parameterName, OleDbType dbType, int size,
- String sourceColumn)
- : this (parameterName, dbType, size, ParameterDirection.Input,
- false, 0, 0, sourceColumn, DataRowVersion.Current, null)
- {
- }
-
-
- public OleDbParameter(String parameterName,
- OleDbType dbType,
- int size,
- ParameterDirection direction,
- bool isNullable,
- byte precision,
- byte scale,
- String sourceColumn,
- DataRowVersion sourceVersion,
- Object value)
- {
- ParameterName = parameterName;
- OleDbType = dbType;
- Size = size;
- Direction = direction;
- IsNullable = isNullable;
- Precision = precision;
- Scale = scale;
- SourceColumn = sourceColumn;
- SourceVersion = sourceVersion;
- Value = value;
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override DbType DbType
- {
- get { return OleDbConvert.OleDbTypeToDbType(_oleDbType); }
- set { OleDbType = OleDbConvert.DbTypeToOleDbType(value); }
- }
-
- public OleDbType OleDbType
- {
- get { return _oleDbType; }
- set {
- _oleDbType = value;
- IsDbTypeSet = true;
- }
- }
-
-#if NET_2_0
- public new byte Precision
- {
- get { return base.Precision; }
- set { base.Precision = value; }
- }
-
- public new byte Scale
- {
- get { return base.Scale; }
- set { base.Scale = value; }
- }
-#endif
-
- public new Object Value
- {
- get { return base.Value; }
- set {
- if (!IsDbTypeSet && (value != null) && (value != DBNull.Value)) {
- _oleDbType = OleDbConvert.ValueTypeToOleDbType(value.GetType());
- }
- base.Value = value;
- }
- }
-
- protected internal sealed override bool IsSpecial {
- get {
- return (Direction == ParameterDirection.Output) && IsOracleRefCursor;
- }
- }
-
-
- internal bool IsOracleRefCursor
- {
- get { return _isOracleRefCursor; }
- set { _isOracleRefCursor = value; }
- }
-
- #endregion // Properties
-
- #region Methods
-
- protected internal sealed override object ConvertValue(object value)
- {
- // can not convert null or DbNull to other types
- if (value == null || value == DBNull.Value) {
- return value;
- }
-
- // FIXME : some other way to do this?
- if (OleDbType == OleDbType.Binary) {
- return value;
- }
- // .NET throws an exception to the user.
- object convertedValue = value;
-
- // note : if we set user parameter jdbc type inside prepare interbal, the db type is not set
- if (value is IConvertible && (IsDbTypeSet || IsJdbcTypeSet)) {
- OleDbType oleDbType = (IsDbTypeSet) ? OleDbType : OleDbConvert.JdbcTypeToOleDbType((int)JdbcType);
- Type to = OleDbConvert.OleDbTypeToValueType(oleDbType);
- if (!(value is DateTime && to == DbTypes.TypeOfTimespan)) //anyway will go by jdbc type
- convertedValue = Convert.ChangeType(value,to);
- }
- return convertedValue;
- }
-
- protected internal sealed override void SetParameterName(ResultSet res)
- {
- ParameterName = res.getString("COLUMN_NAME");
-
- if (ParameterName.StartsWith("@")) {
- ParameterName = ParameterName.Remove(0,1);
- }
- }
-
- protected internal sealed override void SetParameterDbType(ResultSet res)
- {
- int jdbcType = res.getInt("DATA_TYPE");
- // FIXME : is that correct?
- if (jdbcType == Types.OTHER) {
- string typeName = res.getString("TYPE_NAME");
- if (String.Compare ("BLOB", typeName, true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = Types.BLOB;
- }
- else if (String.Compare ("CLOB", typeName, true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = Types.CLOB;
- }
- else if (String.Compare ("FLOAT", typeName, true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = Types.FLOAT;
- }
- else if (String.Compare ("NVARCHAR2", typeName, true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = Types.VARCHAR;
- }
- else if (String.Compare ("NCHAR", typeName, true, CultureInfo.InvariantCulture) == 0) {
- jdbcType = Types.VARCHAR;
- }
- }
- OleDbType = OleDbConvert.JdbcTypeToOleDbType(jdbcType);
- JdbcType = jdbcType;
- }
-
-#if NET_2_0
- public void ResetOleDbType ()
- {
- IsDbTypeSet = false;
- }
-
- public override void ResetDbType ()
- {
- ResetOleDbType ();
- }
-#endif
-
- protected internal sealed override void SetSpecialFeatures(ResultSet res)
- {
- IsOracleRefCursor = (res.getString("TYPE_NAME") == "REF CURSOR");
- }
-
- protected internal sealed override int JdbcTypeFromProviderType()
- {
- return OleDbConvert.OleDbTypeToJdbcType(OleDbType);
- }
-
- #endregion // Methods
-
- }
-}
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs
deleted file mode 100644
index 855d9d2ff6d..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBCommand.cs
+++ /dev/null
@@ -1,1273 +0,0 @@
-//
-// System.Data.ProviderBase.AbstractDbCommand
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.Data;
-using System.Data.Common;
-
-using java.sql;
-using java.io;
-
-#if !USE_DOTNET_REGEXP
-using java.util.regex;
-#endif
-
-namespace System.Data.ProviderBase
-{
- public abstract class AbstractDbCommand : DbCommand, ICloneable
- {
- #region ProcedureColumnCache
-
- internal sealed class ProcedureColumnCache : AbstractDbMetaDataCache
- {
- internal ArrayList GetProcedureColumns(AbstractDBConnection connection, String commandText,AbstractDbCommand command)
- {
- string connectionCatalog = connection.JdbcConnection.getCatalog();
- string key = String.Concat(connection.ConnectionString, connectionCatalog, commandText);
- System.Collections.Hashtable cache = Cache;
-
- ArrayList col = cache[key] as ArrayList;
-
- if (null != col) {
- return col;
- }
-
- col = connection.GetProcedureColumns(commandText,command);
- if (col != null)
- cache[key] = col;
- return col;
- }
- }
-
- #endregion
-
- #region SqlStatementsHelper
-
- internal sealed class SqlStatementsHelper
- {
- #region Fields
-#if USE_DOTNET_REGEXP
- internal static readonly Regex NamedParameterStoredProcedureRegExp = new Regex(@"^\s*{?\s*((?<RETVAL>@\w+)\s*=\s*)?call\s+(?<PROCNAME>(((\[[^\]]*\])|([^\.\(])*)\s*\.\s*){0,2}(\[[^\]]*\]|((\s*[^\.\(\)\{\}\s])+)))\s*(\(\s*(?<USERPARAM>((""([^""]|(""""))*"")|('([^']|(''))*')|[^,])*)?\s*(,\s*(?<USERPARAM>((""([^""]|(""""))*"")|('([^']|(''))*')|[^,])*)\s*)*\))?\s*}?\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- internal static readonly Regex SimpleParameterStoredProcedureRegExp = new Regex(@"^\s*{?\s*((?<RETVAL>\?)\s*=\s*)?call\s+(?<PROCNAME>(((\[[^\]]*\])|([^\.\(])*)\s*\.\s*){0,2}(\[[^\]]*\]|((\s*[^\.\(\)\{\}\s])+)))\s*(\(\s*(?<USERPARAM>((""([^""]|(""""))*"")|('([^']|(''))*')|[^,])*)?\s*(,\s*(?<USERPARAM>((""([^""]|(""""))*"")|('([^']|(''))*')|[^,])*)\s*)*\))?\s*}?\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- internal static readonly Regex ForBrowseStatementReqExp = new Regex(@"\s+FOR\s+BROWSE\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
-#else
- internal static readonly Pattern NamedParameterStoredProcedureRegExp = Pattern.compile(@"^\s*\{?\s*(?:(@\w+)\s*=\s*)?call\s+((?:(?:(?:\[[^\]]*\])|(?:[^\.\(\)\{\}\[\]])*)\s*\.\s*){0,2}(?:\[[^\]]*\]|(?:(?:\s*[^\.\(\)\{\}\[\]])+)))\s*(?:\((.*)\))?\s*\}?\s*$", Pattern.CASE_INSENSITIVE);
- internal static readonly Pattern SimpleParameterStoredProcedureRegExp = Pattern.compile(@"^\s*\{?\s*(?:(\?)\s*=\s*)?call\s+((?:(?:(?:\[[^\]]*\])|(?:[^\.\(\)\{\}\[\]])*)\s*\.\s*){0,2}(?:\[[^\]]*\]|(?:(?:\s*[^\.\(\)\{\}\[\]])+)))\s*(?:\((.*)\))?\s*\}?\s*$", Pattern.CASE_INSENSITIVE);
- internal static readonly Pattern ForBrowseStatementReqExp = Pattern.compile(@"\s+FOR\s+BROWSE\s*$", Pattern.CASE_INSENSITIVE);
-#endif
-
- internal static readonly SimpleRegex NamedParameterRegExp = new SqlParamsRegex();
- internal static readonly SimpleRegex SimpleParameterRegExp = new OleDbParamsRegex();
-
- internal static readonly SimpleRegex CompoundStatementSplitterReqExp = new CharacterSplitterRegex(';');
- internal static readonly SimpleRegex ProcedureParameterSplitterReqExp = new CharacterSplitterRegex(',');
-
- #endregion // Fields
- }
-
- #endregion // SqlStatementsHelper
-
- #region Fields
-
- string _commandText;
- int _commandTimeout;
- CommandType _commandType;
- bool _designTimeVisible;
- UpdateRowSource _updatedRowSource;
-
- private DbParameterCollection _parameters;
- private java.sql.Statement _statement;
- private AbstractDBConnection _connection;
- private AbstractTransaction _transaction;
- private bool _isCommandPrepared;
- private CommandBehavior _behavior;
- private ArrayList _internalParameters;
- string _javaCommandText;
- private int _recordsAffected;
- private ResultSet _currentResultSet;
- private DbDataReader _currentReader;
- private bool _nullParametersInPrepare;
- private bool _hasResultSet;
- private bool _explicitPrepare;
-
- static ProcedureColumnCache _procedureColumnCache = new ProcedureColumnCache();
-
- #endregion // Fields
-
- #region Constructors
-
- public AbstractDbCommand(
- String cmdText,
- AbstractDBConnection connection,
- AbstractTransaction transaction)
- {
- _connection = connection;
- _commandText = cmdText;
- _transaction = transaction;
-
- _commandTimeout = 30;
- _commandType = CommandType.Text;
- _designTimeVisible = true;
- _updatedRowSource = UpdateRowSource.Both;
-
- _isCommandPrepared = false;
- _explicitPrepare = false;
- _recordsAffected = -1;
- if (connection != null) {
- connection.AddReference(this);
- }
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override int CommandTimeout {
- get { return _commandTimeout; }
- set { _commandTimeout = value; }
- }
-
- public override CommandType CommandType {
- get { return _commandType; }
- set { _commandType = value; }
- }
-
- public override bool DesignTimeVisible {
- get { return _designTimeVisible; }
- set { _designTimeVisible = value; }
- }
-
- public override UpdateRowSource UpdatedRowSource {
- get { return _updatedRowSource; }
- set { _updatedRowSource = value; }
- }
-
- protected override DbParameterCollection DbParameterCollection
- {
- get {
- if (_parameters == null) {
- _parameters = CreateParameterCollection(this);
- }
- return _parameters;
- }
- }
-
- protected override DbConnection DbConnection
- {
- get { return (DbConnection)_connection; }
- set {
- if (value == _connection) {
- return;
- }
-
- if (_currentReader != null && !_currentReader.IsClosed) {
- throw ExceptionHelper.ConnectionIsBusy(this.GetType().Name,((AbstractDBConnection)_connection).InternalState);
- }
- if (_connection != null) {
- _connection.RemoveReference(this);
- }
- _connection = (AbstractDBConnection) value;
- if (_connection != null) {
- _connection.AddReference(this);
- }
- }
- }
-
- protected override DbTransaction DbTransaction
- {
- get { return _transaction != null ? _transaction.ActiveTransaction : null; }
- set { _transaction = (AbstractTransaction)value; }
- }
-
- public override string CommandText
- {
- get { return _commandText; }
- set {
- if (CommandText == null || String.Compare(CommandText, value, true) != 0) {
- _commandText = value;
- _isCommandPrepared = false;
- _explicitPrepare = false;
- }
- }
- }
-
- protected virtual string InternalCommandText {
- get { return CommandText; }
- //set { CommandText = value; }
- }
-
- internal CommandBehavior Behavior
- {
- get { return _behavior; }
- set { _behavior = value; }
- }
-
- bool IsCommandPrepared
- {
- get { return _isCommandPrepared; }
- set { _isCommandPrepared = value; }
- }
-
- bool NullParametersInPrepare
- {
- get { return _nullParametersInPrepare; }
- set { _nullParametersInPrepare = value; }
- }
-
- protected ArrayList InternalParameters
- {
- get {
- if (_internalParameters == null) {
- _internalParameters = new ArrayList();
- }
- return _internalParameters;
- }
- }
-
- // Number of records affected by execution of batch statement
- // -1 for SELECT statements.
- internal int RecordsAffected
- {
- get {
- return _recordsAffected;
- }
- }
-
- // AbstractDbCommand acts as IEnumerator over JDBC statement
- // AbstractDbCommand.CurrentResultSet corresponds to IEnumerator.Current
- protected internal virtual ResultSet CurrentResultSet
- {
- get {
- try {
- if (_currentResultSet == null && _hasResultSet) {
- _currentResultSet = _statement.getResultSet();
- }
- return _currentResultSet;
- }
- catch(SQLException e) {
- throw new Exception(e.Message, e);
- }
- }
- }
-
- protected internal java.sql.Statement Statement
- {
- get { return _statement; }
- }
-#if USE_DOTNET_REGEX
- protected virtual Regex StoredProcedureRegExp
-#else
- protected virtual Pattern StoredProcedureRegExp
-#endif
- {
- get { return SqlStatementsHelper.SimpleParameterStoredProcedureRegExp; }
- }
-
- protected virtual SimpleRegex ParameterRegExp
- {
- get { return SqlStatementsHelper.SimpleParameterRegExp; }
- }
-
- #endregion // Properties
-
- #region Methods
-
- protected abstract DbParameter CreateParameterInternal();
-
- protected abstract void CheckParameters();
-
- protected abstract DbDataReader CreateReader();
-
- protected abstract DbParameterCollection CreateParameterCollection(AbstractDbCommand parent);
-
- protected internal abstract SystemException CreateException(SQLException e);
-
- public override int ExecuteNonQuery ()
- {
- IDataReader reader = null;
- try {
- reader = ExecuteReader ();
- }
- finally {
- if (reader != null)
- reader.Close ();
- }
- return reader.RecordsAffected;
- }
-
- public override object ExecuteScalar ()
- {
- IDataReader reader = ExecuteReader(CommandBehavior.SequentialAccess);
-
- try {
- do {
- if (reader.FieldCount > 0 && reader.Read ())
- return reader.GetValue (0);
- }
- while (reader.NextResult ());
- return null;
- } finally {
- reader.Close();
- }
- }
-
- public virtual void ResetCommandTimeout ()
- {
- _commandTimeout = 30;
- }
-
- public override void Cancel()
- {
- try {
- if (_statement != null)
- _statement.cancel();
- }
- catch {
- // MSDN says : "If there is nothing to cancel, nothing happens.
- // However, if there is a command in process, and the attempt to cancel fails,
- // no exception is generated."
- }
- }
-
- protected virtual bool SkipParameter(DbParameter parameter)
- {
- return false;
- }
-
- protected sealed override DbParameter CreateDbParameter()
- {
- return CreateParameterInternal();
- }
-
- internal ArrayList DeriveParameters(string procedureName, bool throwIfNotExist)
- {
- try {
- ArrayList col = _procedureColumnCache.GetProcedureColumns((AbstractDBConnection)Connection, procedureName, this);
- if (col == null) {
- if (throwIfNotExist)
- throw ExceptionHelper.NoStoredProcedureExists(procedureName);
- col = new ArrayList();
- }
-
- return col;
- }
- catch(SQLException e) {
- throw CreateException(e);
- }
- }
-
- string CreateTableDirectCommandText(string tableNames) {
- string forBrowse = String.Empty;
- if ((Behavior & CommandBehavior.KeyInfo) != 0) {
- AbstractDBConnection connection = (AbstractDBConnection)Connection;
- if (connection != null) {
- string dbname = connection.JdbcConnection.getMetaData().getDatabaseProductName();
- if (dbname == "Microsoft SQL Server") //must add "FOR BROWSE" for selects
- forBrowse = " FOR BROWSE";
- }
- }
-
- string[] names = tableNames.Split(',');
- StringBuilder sb = new StringBuilder();
-
- for(int i = 0; i < names.Length; i++) {
- sb.Append("SELECT * FROM ");
- sb.Append(names[i]);
- sb.Append(forBrowse);
- sb.Append(';');
- }
-
- if(names.Length <= 1) {
- sb.Remove(sb.Length - 1,1);
- }
- return sb.ToString();
- }
-
- private string PrepareCommandTextAndParameters()
- {
- NullParametersInPrepare = false;
- switch (CommandType) {
- case CommandType.TableDirect :
- return CreateTableDirectCommandText(CommandText);
- case CommandType.StoredProcedure :
- return CreateStoredProcedureCommandTextSimple (InternalCommandText, Parameters, DeriveParameters (InternalCommandText, false));
- case CommandType.Text :
-
- int userParametersPosition = 0;
- int charsConsumed = 0;
- StringBuilder sb = new StringBuilder(CommandText.Length);
-
- for (SimpleMatch match = SqlStatementsHelper.CompoundStatementSplitterReqExp.Match(CommandText);
- match.Success;
- match = match.NextMatch()) {
-
- int length = match.Length;
-
- if (length == 0)
- continue;
-
- int start = match.Index;
- string value = match.Value;
-
- sb.Append(CommandText, charsConsumed, start-charsConsumed);
- charsConsumed = start + length;
-
-#if USE_DOTNET_REGEX
- Match storedProcMatch = StoredProcedureRegExp.Match(value);
- // count parameters for all kinds of simple statements
- userParametersPosition +=
- (storedProcMatch.Success) ?
- // statement is stored procedure call
- CreateStoredProcedureCommandText(sb, value, storedProcMatch, Parameters, userParametersPosition) :
- // statement is a simple SQL query
- PrepareSimpleQuery(sb, value, Parameters, userParametersPosition);
-#else
- Matcher storedProcMatch = StoredProcedureRegExp.matcher((java.lang.CharSequence)(object)value);
- userParametersPosition +=
- (storedProcMatch.find()) ?
- // statement is stored procedure call
- CreateStoredProcedureCommandText(sb, value, storedProcMatch, Parameters, userParametersPosition) :
- // statement is a simple SQL query
- PrepareSimpleQuery(sb, value, Parameters, userParametersPosition);
-#endif
- }
-
- sb.Append(CommandText, charsConsumed, CommandText.Length-charsConsumed);
-
- return sb.ToString();
- }
- return null;
- }
-
- string CreateStoredProcedureCommandTextSimple(string procedureName, IDataParameterCollection userParams, IList derivedParams) {
- StringBuilder sb = new StringBuilder();
-
- int curUserPos = 0;
- int curDerivedPos = 0;
- bool addParas = true;
- string trimedProcedureName = (procedureName != null) ? procedureName.TrimEnd() : String.Empty;
- if (trimedProcedureName.Length > 0 && trimedProcedureName[trimedProcedureName.Length-1] == ')')
- addParas = false;
-
- AbstractDbParameter derivedParam = (derivedParams.Count > 0) ? (AbstractDbParameter)derivedParams[curDerivedPos] : null;
- if (derivedParam != null) {
- if (derivedParam.Direction == ParameterDirection.ReturnValue)
- curDerivedPos++;
- else
- derivedParam = null; //play as if there is no retval parameter
- }
- AbstractDbParameter returnValueParameter = GetReturnParameter (userParams);
- if (returnValueParameter != null) {
- curUserPos++;
- InternalParameters.Add(returnValueParameter);
- sb.Append("{? = call ");
-
- if (derivedParam != null && !returnValueParameter.IsDbTypeSet) {
- returnValueParameter.JdbcType = derivedParam.JdbcType;
- }
- }
- else {
- sb.Append("{call ");
- }
-
- sb.Append(procedureName);
- if (addParas)
- sb.Append('(');
-
- bool needComma = false;
- for (int i = curDerivedPos; i < derivedParams.Count; i++) {
- AbstractDbParameter derivedParameter = (AbstractDbParameter)derivedParams[curDerivedPos++];
-
- bool addParam = false;
-
- if (derivedParameter.IsSpecial) {
- // derived parameter is special - never appears in user parameters or user values
- InternalParameters.Add((AbstractDbParameter)derivedParameter.Clone());
- addParam = true;
- }
- else {
- AbstractDbParameter userParameter = GetUserParameter(derivedParameter.Placeholder, userParams, curUserPos);
- if (userParameter != null) {
- curUserPos++;
- InternalParameters.Add(userParameter);
- addParam = true;
-
- if (derivedParameter != null && !userParameter.IsDbTypeSet) {
- userParameter.JdbcType = derivedParameter.JdbcType;
- }
- }
- }
-
- if (addParam) {
- if (needComma)
- sb.Append(',');
- else
- needComma = true;
-
- sb.Append('?');
- }
- }
-
- for (int i = curUserPos; i < userParams.Count; i++) {
- if (needComma)
- sb.Append(',');
- else
- needComma = true;
-
- AbstractDbParameter userParameter = (AbstractDbParameter)userParams[curUserPos++];
- InternalParameters.Add(userParameter);
-
- sb.Append('?');
- }
-
- if (addParas)
- sb.Append(')');
- sb.Append('}');
- return sb.ToString();
- }
-
- /// <summary>
- /// We suppose that user parameters are in the same order as devived parameters except the special cases
- /// (return value, oracle ref cursors etc.)
- /// </summary>
- //protected virtual string CreateStoredProcedureCommandText(string procedureName, IList userParametersList, int userParametersListStart/*, int userParametersListCount*/, string[] userValuesList, ArrayList derivedParametersList)
-#if USE_DOTNET_REGEX
- int CreateStoredProcedureCommandText(StringBuilder sb, string sql, Match match, IDataParameterCollection userParams, int userParamsStartPosition)
-#else
- int CreateStoredProcedureCommandText(StringBuilder sb, string sql, Matcher match, IDataParameterCollection userParams, int userParamsStartPosition)
-#endif
- {
- int curUserPos = userParamsStartPosition;
-#if USE_DOTNET_REGEX
- Group procNameGroup = null;
-
- for (Match procNameMatch = match; procNameMatch.Success; procNameMatch = procNameMatch.NextMatch()){
- procNameGroup = match.Groups["PROCNAME"];
- if (!procNameGroup.Success) {
- continue;
- }
- }
-
- if (procNameGroup == null || !procNameGroup.Success)
- throw new ArgumentException("Not a stored procedure call: '{0}'", sql);
-
- ArrayList derivedParameters = DeriveParameters(procNameGroup.Value, false);
-#else
- ArrayList derivedParameters = DeriveParameters(match.group(2).Trim(), false);
-#endif
- int curDerivedPos = 0;
-
- AbstractDbParameter retValderivedParameter = curDerivedPos < derivedParameters.Count ?
- (AbstractDbParameter)derivedParameters[curDerivedPos] : null;
- if (retValderivedParameter != null && retValderivedParameter.Direction == ParameterDirection.ReturnValue)
- curDerivedPos++;
-
- int queryCurrentPosition = 0;
-
-#if USE_DOTNET_REGEX
- for (Match retValMatch = match; retValMatch.Success; retValMatch = retValMatch.NextMatch()){
- Group retval = retValMatch.Groups["RETVAL"];
- if (!retval.Success) {
- continue;
- }
-
- int retvalIndex = retval.Index;
- string retvalValue = retval.Value;
- int retvalLength = retval.Length;
-#else
- int retvalIndex = match.start(1);
- for (;retvalIndex >= 0;) {
- string retvalValue = match.group(1);
- int retvalLength = retvalValue.Length;
-#endif
-
- sb.Append(sql, queryCurrentPosition, retvalIndex);
- AbstractDbParameter userParameter = GetUserParameter(retvalValue, userParams, curUserPos);
- if (userParameter != null) {
- sb.Append('?');
- InternalParameters.Add(userParameter);
-
- if (retValderivedParameter != null && !userParameter.IsDbTypeSet) {
- userParameter.JdbcType = retValderivedParameter.JdbcType;
- }
-
- curUserPos++;
- }
- else {
- sb.Append(retvalValue);
- }
-
- queryCurrentPosition = (retvalIndex + retvalLength);
-
- break;
- }
-
-#if USE_DOTNET_REGEX
- sb.Append(sql, queryCurrentPosition, procNameGroup.Index + procNameGroup.Length - queryCurrentPosition);
- queryCurrentPosition = procNameGroup.Index + procNameGroup.Length;
-#else
- sb.Append(sql, queryCurrentPosition, match.end(2) - queryCurrentPosition);
- queryCurrentPosition = match.end(2);
-#endif
-
- bool hasUserParams = false;
-
-#if USE_DOTNET_REGEX
- must rewrite the regex to not parse params to have single code with java regex
-#else
- int paramsStart = match.start(3);
- if (paramsStart >= 0) {
-#endif
-
- hasUserParams = true;
- sb.Append(sql,queryCurrentPosition,paramsStart - queryCurrentPosition);
- queryCurrentPosition = paramsStart;
-
- for (SimpleMatch m = SqlStatementsHelper.ProcedureParameterSplitterReqExp.Match(match.group(3));
- m.Success;m = m.NextMatch()) {
-
- SimpleCapture parameterCapture = m;
- sb.Append(sql,queryCurrentPosition,paramsStart + parameterCapture.Index - queryCurrentPosition);
-
- // advance in query
- queryCurrentPosition = paramsStart + parameterCapture.Index + parameterCapture.Length;
-
- AbstractDbParameter derivedParameter = curDerivedPos < derivedParameters.Count ?
- (AbstractDbParameter)derivedParameters[curDerivedPos++] : null;
-
- //check for special params
- while (derivedParameter != null && derivedParameter.IsSpecial) {
- // derived parameter is special - never appears in user parameters or user values
- InternalParameters.Add((AbstractDbParameter)derivedParameter.Clone());
- sb.Append('?');
- sb.Append(',');
-
- derivedParameter = curDerivedPos < derivedParameters.Count ?
- (AbstractDbParameter)derivedParameters[curDerivedPos++] : null;
- }
-
- AbstractDbParameter userParameter = GetUserParameter(parameterCapture.Value.Trim(), userParams, curUserPos);
-
- if (userParameter != null) {
- sb.Append('?');
- InternalParameters.Add(userParameter);
- if (derivedParameter != null && !userParameter.IsDbTypeSet) {
- userParameter.JdbcType = derivedParameter.JdbcType;
- }
- // advance in user parameters
- curUserPos++;
- }
- else {
- sb.Append(parameterCapture.Value);
- }
- }
- }
-
- bool addedSpecialParams = false;
-
- for (int i = curDerivedPos; i < derivedParameters.Count;) {
- AbstractDbParameter derivedParameter = (AbstractDbParameter)derivedParameters[i++];
- if (derivedParameter.IsSpecial) {
- // derived parameter is special - never appears in user parameters or user values
- if (!hasUserParams && !addedSpecialParams) {
- addedSpecialParams = true;
- curDerivedPos++;
- sb.Append('(');
- }
-
- for (;curDerivedPos < i;curDerivedPos++)
- sb.Append(',');
-
- InternalParameters.Add((AbstractDbParameter)derivedParameter.Clone());
- sb.Append('?');
- }
- }
-
- if (!hasUserParams && addedSpecialParams)
- sb.Append(')');
-
- sb.Append(sql,queryCurrentPosition,sql.Length - queryCurrentPosition);
- return curUserPos - userParamsStartPosition;
- }
-
- protected virtual AbstractDbParameter GetUserParameter(string parameterName, IList userParametersList, int userParametersListPosition)
- {
- if (userParametersListPosition < userParametersList.Count) {
- AbstractDbParameter param = (AbstractDbParameter)userParametersList[userParametersListPosition];
- if (param.Placeholder == parameterName)
- return param;
- }
- return null;
- }
-
- protected virtual AbstractDbParameter GetReturnParameter (IList userParametersList)
- {
- AbstractDbParameter param = GetUserParameter ("?", userParametersList, 0);
-
- if (param != null && param.Direction == ParameterDirection.ReturnValue)
- return param;
-
- return null;
- }
-
- int PrepareSimpleQuery(StringBuilder sb, string query, IList userParametersList, int userParametersListStart)
- {
- int queryCurrentPosition = 0;
- int userParametersListPosition = userParametersListStart;
-
- if (userParametersList.Count > 0) {
- for (SimpleMatch m = ParameterRegExp.Match(query);
- m.Success;m = m.NextMatch()) {
-
- SimpleCapture parameterCapture = m;
- sb.Append(query,queryCurrentPosition,parameterCapture.Index - queryCurrentPosition);
-
- // advance in query
- queryCurrentPosition = parameterCapture.Index + parameterCapture.Length;
-
- AbstractDbParameter userParameter = GetUserParameter(parameterCapture.Value, userParametersList, userParametersListPosition);
-
- if (userParameter != null) {
- if (IsNullParameter(userParameter)) {
- sb.Append("null");
- NullParametersInPrepare = true;
- }
- else {
- sb.Append('?');
- InternalParameters.Add(userParameter);
- }
- // advance in user parameters
- userParametersListPosition++;
- }
- else {
- sb.Append(parameterCapture.Value);
- }
- }
- }
-
- sb.Append(query,queryCurrentPosition,query.Length - queryCurrentPosition);
- int userParamsConsumed = userParametersListPosition - userParametersListStart;
-
- if ((Behavior & CommandBehavior.KeyInfo) == 0)
- return userParamsConsumed;
-
- AbstractDBConnection connection = (AbstractDBConnection)Connection;
- if (connection == null)
- return userParamsConsumed;
-
- string dbname = connection.JdbcConnection.getMetaData().getDatabaseProductName();
- if (dbname == "Microsoft SQL Server") { //must add "FOR BROWSE" for selects
-#if USE_DOTNET_REGEX
- if (!SqlStatementsHelper.ForBrowseStatementReqExp.IsMatch(query))
- sb.Append(" FOR BROWSE");
-#else
- if (!SqlStatementsHelper.ForBrowseStatementReqExp.matcher ((java.lang.CharSequence)(object)query).find ())
- sb.Append (" FOR BROWSE");
-#endif
- }
-
- return userParamsConsumed;
- }
-
- protected virtual bool IsNullParameter(AbstractDbParameter parameter)
- {
- return ((parameter.Value == null || parameter.Value == DBNull.Value) && !parameter.IsDbTypeSet);
- }
-
- protected virtual void PrepareInternalParameters()
- {
- InternalParameters.Clear();
- }
-
- protected override DbDataReader ExecuteDbDataReader(CommandBehavior behavior)
- {
- AbstractDBConnection connection = (AbstractDBConnection)Connection;
- if (connection == null) {
- throw ExceptionHelper.ConnectionNotInitialized("ExecuteReader");
- }
-
- connection.IsExecuting = true;
-
- try {
- IDbTransaction transaction = Transaction;
- if ((transaction != null && transaction.Connection != connection) ||
- (transaction == null && !connection.JdbcConnection.getAutoCommit ())) {
- throw ExceptionHelper.TransactionNotInitialized ();
- }
-
- Behavior = behavior;
-
- PrepareInternalParameters();
- PrepareInternal();
-
- // For SchemaOnly there is no need for statement execution
- if (Behavior != CommandBehavior.SchemaOnly) {
- _recordsAffected = -1;
-
- // FIXME: this causes SP in MS Sql Server to create no mor than one row.
- if ((Behavior & CommandBehavior.SingleRow) != 0) {
- _statement.setMaxRows (1);
- }
-
- if(_statement is PreparedStatement) {
- BindParameters(InternalParameters);
- _hasResultSet = ((PreparedStatement)_statement).execute();
- }
- else {
- _hasResultSet =_statement.execute(_javaCommandText);
- }
-
- if (!_hasResultSet) {
- int updateCount = _statement.getUpdateCount();
- if (updateCount >= 0) {
- AccumulateRecordsAffected(updateCount);
- _hasResultSet = true; //play as if we have resultset
- NextResultSet();
- }
- }
- }
- connection.IsFetching = true;
- try {
- _currentReader = CreateReader();
- }
- catch(Exception e) {
- connection.IsFetching = false;
- throw e;
- }
- return _currentReader;
- }
- catch(SQLException e) {
- throw CreateException(e);
- }
- finally {
- connection.IsExecuting = false;
- NullParametersInPrepare = false;
- }
- }
-
- public override void Prepare()
- {
- ((AbstractDBConnection)Connection).IsExecuting = true;
- try {
- CheckParameters();
- _explicitPrepare = true;
- }
- finally {
- ((AbstractDBConnection)Connection).IsExecuting = false;
- }
- }
-
- private void PrepareInternal()
- {
- if ((Connection == null) || (Connection.State != ConnectionState.Open)) {
- throw ExceptionHelper.ConnectionNotOpened("Prepare",(Connection != null) ? Connection.State.ToString() : "");
- }
-
- if (IsCommandPrepared) {
- // maybe we have to prepare the command again
- bool hasNullParameters = false;
- for(int i = 0; (i < Parameters.Count) && !hasNullParameters; i++) {
- AbstractDbParameter parameter = (AbstractDbParameter)Parameters[i];
- if (IsNullParameter(parameter)) {
- // if we still have null parameters - have to prepare agail
- IsCommandPrepared = false;
- hasNullParameters = true;
- }
- }
-
- if (!NullParametersInPrepare && hasNullParameters) {
- // if we prepeared using null parameters and now there is no null parameters - need to prepare again
- IsCommandPrepared = false;
- }
- }
-
- if (!IsCommandPrepared) {
-
- _javaCommandText = PrepareCommandTextAndParameters();
-
- java.sql.Connection jdbcCon = _connection.JdbcConnection;
-
- // For SchemaOnly we just prepare statement (for future use in GetSchemaTable)
- if (Behavior == CommandBehavior.SchemaOnly) {
- if (CommandType == CommandType.StoredProcedure)
- _statement = jdbcCon.prepareCall(_javaCommandText);
- else
- _statement = jdbcCon.prepareStatement(_javaCommandText);
- return;
- }
-
- if (CommandType == CommandType.StoredProcedure)
- _statement = jdbcCon.prepareCall(_javaCommandText);
- else {
- int internalParametersCount = InternalParameters.Count;
- if ( internalParametersCount > 0) {
- bool hasOnlyInputParameters = true;
- for(int i=0; i < internalParametersCount; i++) {
- AbstractDbParameter internalParameter = (AbstractDbParameter)InternalParameters[i];
- if (IsNullParameter(internalParameter)) {
- NullParametersInPrepare = true;
- }
-
- if ((internalParameter.Direction & ParameterDirection.Output) != 0){
- hasOnlyInputParameters = false;
- }
- }
-
- if (hasOnlyInputParameters) {
- _statement = jdbcCon.prepareStatement(_javaCommandText);
- }
- else {
- _statement = jdbcCon.prepareCall(_javaCommandText);
- }
- }
- else {
- if (_explicitPrepare) {
- _statement = jdbcCon.prepareStatement(_javaCommandText);
- }
- else {
- _statement = jdbcCon.createStatement();
- }
- }
- }
- IsCommandPrepared = true;
- }
- }
-
- protected void BindParameters(ArrayList parameters)
- {
- for(int parameterIndex = 0; parameterIndex < parameters.Count; parameterIndex++) {
- AbstractDbParameter parameter = (AbstractDbParameter)parameters[parameterIndex];
- switch (parameter.Direction) {
- case ParameterDirection.Input :
- BindInputParameter(parameter,parameterIndex);
- break;
- case ParameterDirection.InputOutput:
- BindInputParameter(parameter,parameterIndex);
- BindOutputParameter(parameter,parameterIndex);
- break;
- case ParameterDirection.Output :
- BindOutputParameter(parameter,parameterIndex);
- break;
- case ParameterDirection.ReturnValue :
- BindOutputParameter(parameter,parameterIndex);
- break;
- }
- }
- }
-
- protected virtual void BindInputParameter(AbstractDbParameter parameter, int parameterIndex)
- {
- object value = parameter.ConvertedValue;
- // java parameters are 1 based, while .net are 0 based
- parameterIndex++;
- PreparedStatement preparedStatement = ((PreparedStatement)_statement);
-
- switch ((DbConvert.JavaSqlTypes)parameter.JdbcType) {
- case DbConvert.JavaSqlTypes.DATALINK:
- case DbConvert.JavaSqlTypes.DISTINCT:
- case DbConvert.JavaSqlTypes.JAVA_OBJECT:
- case DbConvert.JavaSqlTypes.OTHER:
- case DbConvert.JavaSqlTypes.REF:
- case DbConvert.JavaSqlTypes.STRUCT: {
- preparedStatement.setObject(parameterIndex, value, (int)parameter.JdbcType);
- return;
- }
- }
-
- if ((value is DBNull) || (value == null)) {
- preparedStatement.setNull(parameterIndex, (int)((AbstractDbParameter)parameter).JdbcType);
- }
- else if (value is long) {
- preparedStatement.setLong(parameterIndex, (long)value);
- }
- else if (value is byte[]) {
- if (((byte[])value).Length <= 4000) {
- preparedStatement.setBytes(parameterIndex, vmw.common.TypeUtils.ToSByteArray((byte[]) value));
- }
- else {
- InputStream iStream=new ByteArrayInputStream(vmw.common.TypeUtils.ToSByteArray((byte[]) value));
- preparedStatement.setBinaryStream(parameterIndex,iStream,((byte[])value).Length);
- }
- }
- else if (value is byte) {
- preparedStatement.setByte(parameterIndex, (sbyte)(byte)value);
- }
- else if (value is char[]) {
- Reader reader = new CharArrayReader((char[])value);
- preparedStatement.setCharacterStream(parameterIndex,reader,((char[])value).Length);
- }
- else if (value is bool) {
- preparedStatement.setBoolean(parameterIndex, (bool) value);
- }
- else if (value is char) {
- preparedStatement.setString(parameterIndex, ((char)value).ToString());
- }
- else if (value is DateTime) {
- switch ((DbConvert.JavaSqlTypes)parameter.JdbcType) {
- default:
- case DbConvert.JavaSqlTypes.TIMESTAMP:
- preparedStatement.setTimestamp(parameterIndex,DbConvert.ClrTicksToJavaTimestamp(((DateTime)value).Ticks));
- break;
- case DbConvert.JavaSqlTypes.TIME:
- preparedStatement.setTime(parameterIndex,DbConvert.ClrTicksToJavaTime(((DateTime)value).Ticks));
- break;
- case DbConvert.JavaSqlTypes.DATE:
- preparedStatement.setDate(parameterIndex,DbConvert.ClrTicksToJavaDate(((DateTime)value).Ticks));
- break;
- }
- }
- else if (value is TimeSpan) {
- if (parameter.JdbcType == (int)DbConvert.JavaSqlTypes.TIMESTAMP)
- preparedStatement.setTimestamp(parameterIndex,DbConvert.ClrTicksToJavaTimestamp(((TimeSpan)value).Ticks));
- else
- preparedStatement.setTime(parameterIndex,DbConvert.ClrTicksToJavaTime(((TimeSpan)value).Ticks));
- }
- else if (value is Decimal) {
- preparedStatement.setBigDecimal(parameterIndex, vmw.common.PrimitiveTypeUtils.DecimalToBigDecimal((Decimal) value));
- }
- else if (value is double) {
- preparedStatement.setDouble(parameterIndex, (double)value);
- }
- else if (value is float) {
- preparedStatement.setFloat(parameterIndex, (float)value);
- }
- else if (value is int) {
- preparedStatement.setInt(parameterIndex, (int)value);
- }
- else if (value is string) {
- //can not be done for inout params, due to Oracle problem with FIXED_CHAR out param fetching
- if (parameter.Direction == ParameterDirection.Input &&
- preparedStatement is Mainsoft.Data.Jdbc.Providers.IPreparedStatement &&
- (DbConvert.JavaSqlTypes)parameter.JdbcType == DbConvert.JavaSqlTypes.CHAR) {
- ((Mainsoft.Data.Jdbc.Providers.IPreparedStatement)preparedStatement)
- .setChar(parameterIndex, (string)value);
- }
- else
- preparedStatement.setString(parameterIndex, (string)value);
- }
- else if (value is Guid) {
- preparedStatement.setString(parameterIndex, value.ToString());
- }
- else if (value is short) {
- preparedStatement.setShort(parameterIndex, (short)value);
- }
- else if (value is sbyte) {
- preparedStatement.setByte(parameterIndex, (sbyte)value);
- }
- else {
- preparedStatement.setObject(parameterIndex, value);
- }
- }
-
- protected virtual void BindOutputParameter(AbstractDbParameter parameter, int parameterIndex)
- {
- parameter.Validate();
- int jdbcType = (int)parameter.JdbcType;
- // java parameters are 1 based, while .net are 0 based
- parameterIndex++;
-
- CallableStatement callableStatement = ((CallableStatement)_statement);
-
- // the scale has a meening only in DECIMAL and NUMERIC parameters
- if (jdbcType == Types.DECIMAL || jdbcType == Types.NUMERIC) {
- if(parameter.DbType == DbType.Currency) {
- callableStatement.registerOutParameter(parameterIndex, jdbcType, 4);
- }
- else {
- callableStatement.registerOutParameter(parameterIndex, jdbcType, parameter.Scale);
- }
- }
- else {
- callableStatement.registerOutParameter(parameterIndex, jdbcType);
- }
- }
-
- private void FillOutputParameters()
- {
- if (!(_statement is CallableStatement)) {
- return;
- }
- for(int i = 0; i < InternalParameters.Count; i++) {
- AbstractDbParameter parameter = (AbstractDbParameter)InternalParameters[i];
- ParameterDirection direction = parameter.Direction;
- if (((direction & ParameterDirection.Output) != 0) && !SkipParameter(parameter)) {
- FillOutputParameter(parameter, i);
- }
- // drop jdbc type of out parameter, since it possibly was updated in ExecuteReader
- parameter.IsJdbcTypeSet = false;
- }
- }
-
- protected virtual void FillOutputParameter(DbParameter parameter, int index)
- {
- CallableStatement callableStatement = (CallableStatement)_statement;
- ParameterMetadataWrapper parameterMetadataWrapper = null;
- // FIXME wait for other drivers to implement
-// try {
-// parameterMetadataWrapper = new ParameterMetadataWrapper(callableStatement.getParameterMetaData());
-// }
-// catch {
-// // suppress error : ms driver for sql server does not implement getParameterMetaData
-// // suppress exception : ms driver for sql server does not implement getParameterMetaData
-// }
- DbConvert.JavaSqlTypes javaSqlType = (DbConvert.JavaSqlTypes)((AbstractDbParameter)parameter).JdbcType;
- try {
- parameter.Value = DbConvert.JavaResultSetToClrWrapper(callableStatement,index,javaSqlType,parameter.Size,parameterMetadataWrapper);
- }
- catch(java.sql.SQLException e) {
- throw CreateException(e);
- }
- }
-
- // AbstractDbCommand acts as IEnumerator over JDBC statement
- // AbstractDbCommand.NextResultSet corresponds to IEnumerator.MoveNext
- protected internal virtual bool NextResultSet()
- {
- if (!_hasResultSet)
- return false;
-
- try {
- for(;;) {
- _hasResultSet = _statement.getMoreResults();
- if (_hasResultSet)
- return true;
- int updateCount = _statement.getUpdateCount();
- if (updateCount < 0)
- return false;
-
- AccumulateRecordsAffected(updateCount);
- }
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- finally {
- _currentResultSet = null;
- }
- }
-
- private void AccumulateRecordsAffected(int updateCount)
- {
- if (_recordsAffected < 0) {
- _recordsAffected = updateCount;
- }
- else {
- _recordsAffected += updateCount;
- }
- }
-
- internal void OnReaderClosed(object reader)
- {
- CloseInternal();
- if (Connection != null) {
- ((AbstractDBConnection)Connection).RemoveReference(reader);
- ((AbstractDBConnection)Connection).IsFetching = false;
- if ((Behavior & CommandBehavior.CloseConnection) != 0) {
- Connection.Close();
- }
- }
- }
-
- internal void CloseInternal()
- {
- if (Behavior != CommandBehavior.SchemaOnly) {
- if (_statement != null) {
- while (NextResultSet()) {
- }
- FillOutputParameters();
- }
- }
- _currentReader = null;
- CleanUp();
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing) {
- CleanUp();
- }
- base.Dispose(disposing);
- }
-
- private void CleanUp()
- {
- if (_currentReader != null) {
- // we must preserve statement object until we have an associated reader object that might access it.
- return;
- }
- if (Connection != null) {
- ((AbstractDBConnection)Connection).RemoveReference(this);
- }
- if (_statement != null) {
- _statement.close();
- _statement = null;
- }
- IsCommandPrepared = false;
- _internalParameters = null;
- _currentResultSet = null;
- }
-
- internal void OnSchemaChanging()
- {
- }
-
- #endregion // Methods
-
- #region ICloneable Members
-
- public virtual object Clone() {
- AbstractDbCommand target = (AbstractDbCommand)MemberwiseClone();
- target._statement = null;
- target._isCommandPrepared = false;
- target._internalParameters = null;
- target._javaCommandText = null;
- target._recordsAffected = -1;
- target._currentResultSet = null;
- target._currentReader = null;
- target._nullParametersInPrepare = false;
- target._hasResultSet = false;
- target._explicitPrepare = false;
- if (Parameters != null && Parameters.Count > 0) {
- target._parameters = CreateParameterCollection(target);
- for(int i=0 ; i < Parameters.Count; i++) {
- target.Parameters.Add(((AbstractDbParameter)Parameters[i]).Clone());
- }
- }
- return target;
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
deleted file mode 100644
index c5b422296d5..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBConnection.cs
+++ /dev/null
@@ -1,737 +0,0 @@
-//
-// System.Data.Common.AbstractDBConnection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Globalization;
-using System.Data;
-using System.Data.ProviderBase;
-using System.Data.Configuration;
-using System.Configuration;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Text;
-using System.Text.RegularExpressions;
-using Mainsoft.Data.Jdbc.Providers;
-using System.Data.Common;
-
-using java.sql;
-using javax.sql;
-using javax.naming;
-
-using Mainsoft.Data.Configuration;
-
-namespace System.Data.ProviderBase
-{
- public abstract class AbstractDBConnection : DbConnection, ICloneable
- {
- #region ObjectNamesHelper
-
- private sealed class ObjectNamesHelper
- {
- //static readonly Regex NameOrder = new Regex(@"^\s*((\[(?<NAME>(\s*[^\[\]\s])+)\s*\])|(?<NAME>(\w|!|\#|\$)+(\s*(\w|!|\#|\$)+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- static readonly Regex NameOrder = new Regex(@"^((\[(?<NAME>[^\]]+)\])|(?<NAME>[^\.\[\]]+))$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
-
- //static readonly Regex SchemaNameOrder = new Regex(@"^\s*((\[(?<SCHEMA>(\s*[^\[\]\s])+)\s*\])|(?<SCHEMA>(\w|!|\#|\$)*(\s*(\w|!|\#|\$)+)*))\s*\.\s*((\[(?<NAME>(\s*[^\[\]\s])+)\s*\])|(?<NAME>(\w|!|\#|\$)+(\s*(\w|!|\#|\$)+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- static readonly Regex SchemaNameOrder = new Regex(@"^((\[(?<SCHEMA>[^\]]+)\])|(?<SCHEMA>[^\.\[\]]+))\s*\.\s*((\[(?<NAME>[^\]]+)\])|(?<NAME>[^\.\[\]]+))$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- //static readonly Regex CatalogSchemaNameOrder = new Regex(@"^\s*((\[\s*(?<CATALOG>(\s*[^\[\]\s])+)\s*\])|(?<CATALOG>(\w|!|\#|\$)*(\s*(\w|!|\#|\$)+)*))\s*\.\s*((\[(?<SCHEMA>(\s*[^\[\]\s])+)\s*\])|(?<SCHEMA>(\w|!|\#|\$)*(\s*(\w|!|\#|\$)+)*))\s*\.\s*((\[(?<NAME>(\s*[^\[\]\s])+)\s*\])|(?<NAME>(\w|!|\#|\$)+(\s*(\w|!|\#|\$)+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- //static readonly Regex CatalogSchemaNameOrder = new Regex(@"^\s*((\[\s*(?<CATALOG>(\s*[^\]\s])+)\s*\])|(?<CATALOG>([^\.\s])*(\s*([^\.\s])+)*))\s*\.\s*((\[(?<SCHEMA>(\s*[^\]\s])+)\s*\])|(?<SCHEMA>([^\.\s])*(\s*([^\.\s])+)*))\s*\.\s*((\[(?<NAME>(\s*[^\]\s])+)\s*\])|(?<NAME>([^\.\s])+(\s*([^\.\s])+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- static readonly Regex CatalogSchemaNameOrder = new Regex(@"^((\[(?<CATALOG>[^\]]+)\])|(?<CATALOG>[^\.\[\]]+))\s*\.\s*((\[(?<SCHEMA>[^\]]+)\])|(?<SCHEMA>[^\.\[\]]+))\s*\.\s*((\[(?<NAME>[^\]]+)\])|(?<NAME>[^\.\[\]]+))$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
-
- //static readonly Regex CatalogNameOrder = new Regex(@"^\s*((\[(?<CATALOG>(\s*[^\[\]\s])+)\s*\])|(?<CATALOG>(\w|!|\#|\$)*(\s*(\w|!|\#|\$)+)*))\s*\.\s*((\[(?<NAME>(\s*[^\[\]\s])+)\s*\])|(?<NAME>(\w|!|\#|\$)+(\s*(\w|!|\#|\$)+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- //static readonly Regex CatalogNameOrder = new Regex(@"^\s*((\[(?<CATALOG>(\s*[^\]\s])+)\s*\])|(?<CATALOG>([^\.\s])*(\s*([^\.\s])+)*))\s*\.\s*((\[(?<NAME>(\s*[^\]\s])+)\s*\])|(?<NAME>([^\.\s])+(\s*([^\.\s])+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- static readonly Regex CatalogNameOrder = new Regex(@"^((\[(?<CATALOG>[^\]]+)\])|(?<CATALOG>[^\.\[\]]+))\s*\.\s*((\[(?<NAME>[^\]]+)\])|(?<NAME>[^\.\[\]]+))$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- //static readonly Regex SchemaCatalogNameOrder = new Regex(@"^\s*((\[\s*(?<SCHEMA>(\s*[^\[\]\s])+)\s*\])|(?<SCHEMA>(\w|!|\#|\$)*(\s*(\w|!|\#|\$)+)*))\s*\.\s*((\[(?<CATALOG>(\s*[^\[\]\s])+)\s*\])|(?<CATALOG>(\w|!|\#|\$)*(\s*(\w|!|\#|\$)+)*))\s*\.\s*((\[(?<NAME>(\s*[^\[\]\s])+)\s*\])|(?<NAME>(\w|!|\#|\$)+(\s*(\w|!|\#|\$)+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- //static readonly Regex SchemaCatalogNameOrder = new Regex(@"^\s*((\[\s*(?<SCHEMA>(\s*[^\]\s])+)\s*\])|(?<SCHEMA>([^\.\s])*(\s*([^\.\s])+)*))\s*\.\s*((\[(?<CATALOG>(\s*[^\]\s])+)\s*\])|(?<CATALOG>([^\.\s])*(\s*([^\.\s])+)*))\s*\.\s*((\[(?<NAME>(\s*[^\]\s])+)\s*\])|(?<NAME>([^\.\s])+(\s*([^\.\s])+)*))\s*$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
- static readonly Regex SchemaCatalogNameOrder = new Regex(@"^((\[(?<SCHEMA>[^\]]+)\])|(?<SCHEMA>[^\.\[\]]+))\s*\.\s*((\[(?<CATALOG>[^\]]+)\])|(?<CATALOG>[^\.\[\]]+))\s*\.\s*((\[(?<NAME>[^\]]+)\])|(?<NAME>[^\.\[\]]+))$", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.ExplicitCapture);
-
- internal static ObjectNameResolver[] GetSyntaxPatterns(AbstractDBConnection connection)
- {
- ArrayList collection = new ArrayList();
- collection.Add(new ObjectNameResolver(NameOrder));
-
- ObjectNameResolversCollection basic = (ObjectNameResolversCollection) ConfigurationSettings.GetConfig ("Mainsoft.Data.Configuration/objectnameresolution");
-
- java.sql.DatabaseMetaData metaData = connection.JdbcConnection.getMetaData();
- string productName = metaData.getDatabaseProductName();
-
- foreach(ObjectNameResolver nameResolver in basic) {
- if (productName.IndexOf(nameResolver.DbName) != -1) {
- collection.Add(nameResolver);
- }
- }
-
- //defaults
- if (metaData.isCatalogAtStart()) {
- collection.Add(new ObjectNameResolver(SchemaNameOrder));
- collection.Add(new ObjectNameResolver(CatalogNameOrder));
- collection.Add(new ObjectNameResolver(CatalogSchemaNameOrder));
- collection.Add(new ObjectNameResolver(SchemaCatalogNameOrder));
- }
- else {
- collection.Add(new ObjectNameResolver(CatalogNameOrder));
- collection.Add(new ObjectNameResolver(SchemaNameOrder));
- collection.Add(new ObjectNameResolver(SchemaCatalogNameOrder));
- collection.Add(new ObjectNameResolver(CatalogSchemaNameOrder));
- }
-
- return (ObjectNameResolver[])collection.ToArray(typeof(ObjectNameResolver));
- }
- }
-
- #endregion // ObjectNamesHelper
-
- #region Fields
-
- private const int DEFAULT_TIMEOUT = 15;
-
- private java.sql.Connection _jdbcConnnection;
- private ConnectionState _internalState;
- private object _internalStateSync = new object();
-
- private string _connectionString = String.Empty;
- IConnectionStringDictionary _connectionStringBuilder;
- IConnectionProvider _connectionProvider;
-
- private ArrayList _referencedObjects = new ArrayList();
- private ObjectNameResolver[] _syntaxPatterns;
-
- #endregion // Fields
-
- #region Constructors
-
- public AbstractDBConnection(string connectionString)
- {
- _connectionString = connectionString;
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override String ConnectionString
- {
- get { return _connectionString; }
- set {
- if (IsOpened) {
- throw ExceptionHelper.NotAllowedWhileConnectionOpen("ConnectionString",_internalState);
- }
- _connectionString = value;
- _connectionProvider = null;
- _connectionStringBuilder = null;
- }
- }
-
- public override int ConnectionTimeout
- {
- get {
- string timeoutStr = (string)ConnectionStringBuilder["loginTimeout"];
- if (timeoutStr != null && timeoutStr.Length > 0) {
- try {
- return Convert.ToInt32(timeoutStr);
- }
- catch(FormatException) {
- throw ExceptionHelper.InvalidValueForKey("connect timeout");
- }
- catch (OverflowException) {
- throw ExceptionHelper.InvalidValueForKey("connect timeout");
- }
- }
- return DEFAULT_TIMEOUT;
- }
- }
-
- public override String Database
- {
- get {
- if ((State & ConnectionState.Open) != 0)
- return JdbcConnection.getCatalog();
-
- return (string)ConnectionStringBuilder["DATABASE"];
- }
- }
-
- public override ConnectionState State
- {
- get {
- try {
- if ((JdbcConnection == null) || JdbcConnection.isClosed()) {
- // jdbc connection not initialized or closed
- if (_internalState == ConnectionState.Closed ) {
- return ConnectionState.Closed;
- }
- }
- else {
- // jdbc connection is opened
- if ((_internalState & ConnectionState.Open) != 0) {
- return ConnectionState.Open;
- }
- }
- return ConnectionState.Broken;
- }
- catch (SQLException) {
- return ConnectionState.Broken;
- }
- }
- }
-
- internal bool IsExecuting
- {
- get {
- return ((_internalState & ConnectionState.Executing) != 0);
- }
-
- set {
- lock(_internalStateSync) {
- // to switch to executing, the connection must be in opened
- if (value) {
- if (_internalState != ConnectionState.Open) {
- if (IsFetching) {
- throw ExceptionHelper.OpenedReaderExists();
- }
- throw ExceptionHelper.OpenConnectionRequired("",_internalState);
- }
- _internalState |= ConnectionState.Executing;
- }
- else {
- if (!IsExecuting) {
- throw new InvalidOperationException("Connection : Impossible to tear down from state " + ConnectionState.Executing.ToString() + " while in state " + _internalState.ToString());
- }
- _internalState &= ~ConnectionState.Executing;
- }
- }
- }
- }
-
- internal bool IsFetching
- {
- get {
- return ((_internalState & ConnectionState.Fetching) != 0);
- }
-
- set {
- lock(_internalStateSync) {
- if (value) {
- // to switch to fetching connection must be in opened, executing
- if (((_internalState & ConnectionState.Open) == 0) || ((_internalState & ConnectionState.Executing) == 0)) {
- throw ExceptionHelper.OpenConnectionRequired("",_internalState);
- }
- _internalState |= ConnectionState.Fetching;
- }
- else {
- if (!IsFetching) {
- throw new InvalidOperationException("Connection : Impossible to tear down from state " + ConnectionState.Fetching.ToString() + " while in state " + _internalState.ToString());
- }
- _internalState &= ~ConnectionState.Fetching;
- }
- }
- }
- }
-
- internal bool IsOpened
- {
- get {
- return ((_internalState & ConnectionState.Open) != 0);
- }
-
- set {
- lock(_internalStateSync) {
- if (value) {
- // only connecting connection can be opened
- if ((_internalState != ConnectionState.Connecting)) {
- throw ExceptionHelper.ConnectionAlreadyOpen(_internalState);
- }
- _internalState |= ConnectionState.Open;
- }
- else {
- if (!IsOpened) {
- throw new InvalidOperationException("Connection : Impossible to tear down from state " + ConnectionState.Open.ToString() + " while in state " + _internalState.ToString());
- }
- _internalState &= ~ConnectionState.Open;
- }
- }
- }
- }
-
- internal bool IsConnecting
- {
- get {
- return ((_internalState & ConnectionState.Connecting) != 0);
- }
-
- set {
- lock(_internalStateSync) {
- if (value) {
- // to switch to connecting conection must be in closed or in opened
- if ((_internalState != ConnectionState.Closed) && (_internalState != ConnectionState.Open)) {
- throw ExceptionHelper.ConnectionAlreadyOpen(_internalState);
- }
- _internalState |= ConnectionState.Connecting;
- }
- else {
- if (!IsConnecting) {
- throw new InvalidOperationException("Connection : Impossible to tear down from state " + ConnectionState.Connecting.ToString() + " while in state " + _internalState.ToString());
- }
- _internalState &= ~ConnectionState.Connecting;
- }
- }
- }
- }
-
- public override string DataSource
- {
- get {
- return (string)ConnectionStringBuilder["SERVERNAME"];
- }
- }
-
- internal ConnectionState InternalState
- {
- get { return _internalState; }
- }
-
-
- protected internal java.sql.Connection JdbcConnection
- {
- get { return _jdbcConnnection; }
- set { _jdbcConnnection = value; }
- }
-
- internal ObjectNameResolver[] SyntaxPatterns
- {
- get {
- if (_syntaxPatterns == null) {
- _syntaxPatterns = ObjectNamesHelper.GetSyntaxPatterns(this);
- }
- return _syntaxPatterns;
- }
- }
-
- protected internal IConnectionProvider ConnectionProvider {
- get {
- try {
- if (_connectionProvider == null)
- _connectionProvider = GetConnectionProvider();
-
- return _connectionProvider;
- }
- catch(SQLException exp) {
- throw CreateException(exp);
- }
- }
- }
- protected internal IConnectionStringDictionary ConnectionStringBuilder {
- get {
- try {
- if (_connectionStringBuilder == null)
- _connectionStringBuilder = ConnectionProvider.GetConnectionStringBuilder(ConnectionString);
-
- return _connectionStringBuilder;
- }
- catch(SQLException exp) {
- throw CreateException(exp);
- }
- }
- }
- protected abstract IConnectionProvider GetConnectionProvider();
-
- static protected IConnectionProvider GetConnectionProvider(string sectionMame, string provider) {
- if (provider == null)
- throw new ArgumentNullException("provider");
-
- IList providers = (IList) ConfigurationSettings.GetConfig(sectionMame);
- if (providers.Count == 0)
- throw new ArgumentException("Configuration section is empty.", "sectionName");
-
- for (int i = 0; i < providers.Count; i++) {
- IDictionary providerInfo = (IDictionary) providers[i];
-
- string curProvider = (string)providerInfo[ConfigurationConsts.Name];
- if (String.Compare(provider, 0, curProvider, 0, provider.Length, StringComparison.OrdinalIgnoreCase) == 0) {
- string providerType = (string) providerInfo [ConfigurationConsts.ProviderType];
- if (providerType == null || providerType.Length == 0)
- return new GenericProvider (providerInfo);
- else {
- Type t = Type.GetType (providerType);
- return (IConnectionProvider) Activator.CreateInstance (t , new object[] {providerInfo});
- }
- }
- }
-
- throw new ArgumentException(
- String.Format("Unknown provider name '{0}'", provider), "ConnectionString");
- }
-
- #endregion // Properties
-
- #region Methods
- // since WS also does not permits dynamically change of login timeout and tomcat does no implements - do not do it at all
- //ds.setLoginTimeout(ConnectionTimeout);
-
- protected internal abstract void OnSqlWarning(SQLWarning warning);
-
- protected abstract SystemException CreateException(SQLException e);
-
- protected abstract SystemException CreateException(string message);
-
- public override void Close()
- {
- ConnectionState orig = State;
- try {
- ClearReferences();
- if (JdbcConnection != null && !JdbcConnection.isClosed()) {
- if (!JdbcConnection.getAutoCommit())
- JdbcConnection.rollback();
- JdbcConnection.close();
- }
- }
- catch (Exception e) {
- // suppress exception
-#if DEBUG
- Console.WriteLine("Exception catched at Conection.Close() : {0}\n{1}\n{2}",e.GetType().FullName,e.Message,e.StackTrace);
-#endif
- }
- finally {
- JdbcConnection = null;
- lock(_internalStateSync) {
- _internalState = ConnectionState.Closed;
- }
- }
-
- ConnectionState current = State;
- if (current != orig)
- OnStateChange (new StateChangeEventArgs (orig, current));
- }
-
- internal protected virtual void OnSqlException(SQLException exp)
- {
- throw CreateException(exp);
- }
-
- internal void AddReference(object referencedObject)
- { lock(_referencedObjects.SyncRoot) {
- _referencedObjects.Add(new WeakReference(referencedObject));
- }
- }
-
- internal void RemoveReference(object referencedObject)
- {
- lock(_referencedObjects.SyncRoot) {
- for(int i = 0; i < _referencedObjects.Count; i++) {
- WeakReference wr = (WeakReference) _referencedObjects[i];
- if (wr.IsAlive && (wr.Target == referencedObject)) {
- _referencedObjects.RemoveAt(i);
- }
- }
- }
- }
-
- private void ClearReferences()
- {
- ArrayList oldList = _referencedObjects;
- _referencedObjects = new ArrayList();
-
- for(int i = 0; i < oldList.Count; i++) {
- WeakReference wr = (WeakReference) oldList[i];
- if (wr.IsAlive) {
- ClearReference(wr.Target);
- }
- }
- }
-
- private void ClearReference(object referencedObject)
- {
- try {
- if (referencedObject is AbstractDbCommand) {
- ((AbstractDbCommand)referencedObject).CloseInternal();
- }
- else if (referencedObject is AbstractDataReader) {
- ((AbstractDataReader)referencedObject).CloseInternal();
- }
- }
- catch (SQLException) {
- // suppress exception since it's possible that command or reader are in inconsistent state
- }
- }
-
- public override void Open()
- {
- if (_connectionString == null || _connectionString.Length == 0) {
- throw ExceptionHelper.ConnectionStringNotInitialized();
- }
-
- IsConnecting = true;
- try {
- if (JdbcConnection != null && !JdbcConnection.isClosed()) {
- throw ExceptionHelper.ConnectionAlreadyOpen(_internalState);
- }
-
- JdbcConnection = ConnectionProvider.GetConnection (ConnectionStringBuilder);
-
- IsOpened = true;
-
- OnStateChange (new StateChangeEventArgs (ConnectionState.Closed, ConnectionState.Open));
- }
- catch (SQLWarning warning) {
- OnSqlWarning(warning);
- }
- catch (SQLException exp) {
- OnSqlException(exp);
- }
- finally {
- IsConnecting = false;
- }
- }
-
- public override void ChangeDatabase(String database)
- {
- IsConnecting = true;
- try {
- ClearReferences();
- java.sql.Connection con = JdbcConnection;
- con.setCatalog(database);
-// ConnectionStringHelper.UpdateValue(UserParameters,StringManager.GetStringArray("CON_DATABASE"),database);
- }
- catch (SQLWarning warning) {
- OnSqlWarning(warning);
- }
- catch (SQLException exp) {
- throw CreateException(exp);
- }
- finally {
- IsConnecting = false;
- }
- }
-
- public override string ServerVersion {
- get {
- // only if the driver support this methods
- try {
- if (JdbcConnection == null)
- return String.Empty;
-
- java.sql.DatabaseMetaData metaData = JdbcConnection.getMetaData();
- return metaData.getDatabaseProductVersion();
- }
- catch (SQLException exp) {
- throw CreateException(exp);
- }
- }
- }
-
- internal string JdbcProvider {
- get {
- // only if the driver support this methods
- try {
- if (JdbcConnection == null)
- return String.Empty;
-
- java.sql.DatabaseMetaData metaData = JdbcConnection.getMetaData();
- return metaData.getDriverName() + " " + metaData.getDriverVersion();
- }
- catch (SQLException exp) {
- return String.Empty; //suppress
- }
- }
- }
-
- protected override void Dispose(bool disposing)
- {
- if (disposing) {
- try {
- if (JdbcConnection != null && !JdbcConnection.isClosed()) {
- JdbcConnection.close();
- }
- JdbcConnection = null;
- }
- catch (java.sql.SQLException exp) {
- throw CreateException(exp);
- }
- }
- base.Dispose(disposing);
- }
-
- internal void ValidateBeginTransaction()
- {
- if (State != ConnectionState.Open) {
- throw new InvalidOperationException(String.Format("{0} requires an open and available Connection. The connection's current state is {1}.", new object[] {"BeginTransaction", State}));
- }
-
- if (!JdbcConnection.getAutoCommit()) {
- throw new System.InvalidOperationException("Parallel transactions are not supported.");
- }
- }
-
- internal ArrayList GetProcedureColumns(String procedureString, AbstractDbCommand command)
- {
- ArrayList col = new ArrayList();
- try {
- ObjectNameResolver[] nameResolvers = SyntaxPatterns;
- java.sql.ResultSet res = null;
- string catalog = null;
- string schema = null;
- string spname = null;
-
- java.sql.DatabaseMetaData metadata = JdbcConnection.getMetaData();
- bool storesUpperCaseIdentifiers = false;
- bool storesLowerCaseIdentifiers = false;
- try {
- storesUpperCaseIdentifiers = metadata.storesUpperCaseIdentifiers();
- storesLowerCaseIdentifiers = metadata.storesLowerCaseIdentifiers();
- }
- catch (SQLException e) {
- // suppress
- }
-
- for(int i=0; i < nameResolvers.Length; i++) {
- ObjectNameResolver nameResolver = nameResolvers[i];
- Match match = nameResolver.Match(procedureString);
-
- if (match.Success) {
- spname = ObjectNameResolver.GetName(match);
- schema = ObjectNameResolver.GetSchema(match);
- catalog = ObjectNameResolver.GetCatalog(match);
-
- // make all identifiers uppercase or lowercase according to database metadata
- if (storesUpperCaseIdentifiers) {
- spname = (spname.Length > 0) ? spname.ToUpper() : null;
- schema = (schema.Length > 0) ? schema.ToUpper() : null;
- catalog = (catalog.Length > 0) ? catalog.ToUpper() : null;
- }
- else if (storesLowerCaseIdentifiers) {
- spname = (spname.Length > 0) ? spname.ToLower() : null;
- schema = (schema.Length > 0) ? schema.ToLower() : null;
- catalog = (catalog.Length > 0) ? catalog.ToLower() : null;
- }
- else {
- spname = (spname.Length > 0) ? spname : null;
- schema = (schema.Length > 0) ? schema : null;
- catalog = (catalog.Length > 0) ? catalog : null;
- }
-
- // catalog from db is always in correct caps
- if (catalog == null) {
- catalog = JdbcConnection.getCatalog();
- }
-
- try {
- // always get the first procedure that db returns
- res = metadata.getProcedures(catalog, schema, spname);
- if (res.next()) {
- catalog = res.getString(1);
- schema = res.getString(2);
- spname = res.getString(3);
- break;
- }
-
- spname = null;
- }
- catch { // suppress exception
- return null;
- }
- finally {
- if (res != null) {
- res.close();
- }
- }
- }
- }
-
- if (spname == null || spname.Length == 0) {
- return null;
- }
-
- try {
- // get procedure columns based o procedure metadata
- res = metadata.getProcedureColumns(catalog, schema, spname, null);
- while (res.next()) {
- // since there is still a possibility that some of the parameters to getProcedureColumn were nulls,
- // we need to filter the results with strict matching
- if ((res.getString(1) != catalog ) || (res.getString(2) != schema) || (res.getString(3) != spname)) {
- continue;
- }
-
- AbstractDbParameter parameter = (AbstractDbParameter)command.CreateParameter();
-
- parameter.SetParameterName(res);
- parameter.SetParameterDbType(res);
- parameter.SetSpecialFeatures(res);
-
- //get parameter direction
- short direction = res.getShort("COLUMN_TYPE");
- if(direction == 1) //DatabaseMetaData.procedureColumnIn
- parameter.Direction = ParameterDirection.Input;
- else if(direction == 2) //DatabaseMetaData.procedureColumnInOut
- parameter.Direction = ParameterDirection.InputOutput;
- else if(direction == 4) //DatabaseMetaData.procedureColumnOut
- parameter.Direction = ParameterDirection.Output;
- else if(direction == 5) //DatabaseMetaData.procedureColumnReturn
- parameter.Direction = ParameterDirection.ReturnValue;
-
- //get parameter precision and scale
- parameter.SetParameterPrecisionAndScale(res);
-
- parameter.SetParameterSize(res);
- parameter.SetParameterIsNullable(res);
-
- col.Add(parameter);
- }
- }
- finally {
- if (res != null) {
- res.close();
- }
- }
- }
- catch(Exception e) {
- //supress
-#if DEBUG
- Console.WriteLine("Exception catched at AbstractDBConnection.GetProcedureColumns() : {0}\n{1}\n{2}",e.GetType().FullName,e.Message,e.StackTrace);
-#endif
- }
- return col;
- }
-
- #endregion // Methods
-
- #region ICloneable Members
-
- public virtual object Clone() {
- AbstractDBConnection con = (AbstractDBConnection)MemberwiseClone();
- con._internalState = ConnectionState.Closed;
- con._internalStateSync = new object();
- con._jdbcConnnection = null;
- con._referencedObjects = new ArrayList();
- con._syntaxPatterns = null;
- return con;
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs
deleted file mode 100644
index 17a4601268b..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDBParameter.cs
+++ /dev/null
@@ -1,311 +0,0 @@
-//
-// System.Data.ProviderBase.AbstractDbParameter
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Data;
-using System.Data.Common;
-
-using java.sql;
-
-namespace System.Data.ProviderBase
-{
- public abstract class AbstractDbParameter : DbParameter, IDbDataParameter, ICloneable
- {
- #region Fields
-
- byte _precision;
- byte _scale;
- protected DataRowVersion _sourceVersion;
- private int _jdbcType;
- bool _isDbTypeSet;
- bool _isJdbcTypeSet;
- object _convertedValue;
-
- string _parameterName;
- ParameterDirection _direction = ParameterDirection.Input;
- int _size;
- object _value;
- bool _isNullable;
- int _offset;
- string _sourceColumn;
- DbParameterCollection _parent = null;
-
- #endregion // Fields
-
- #region Constructors
-
- [MonoTODO]
- protected AbstractDbParameter ()
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override ParameterDirection Direction {
- get { return _direction; }
- set {
- if (_direction != value) {
- switch (value) {
- case ParameterDirection.Input:
- case ParameterDirection.Output:
- case ParameterDirection.InputOutput:
- case ParameterDirection.ReturnValue:
- {
- _direction = value;
- return;
- }
- }
- throw ExceptionHelper.InvalidParameterDirection (value);
- }
- }
- }
-
- public override bool IsNullable {
- get { return _isNullable; }
- set { _isNullable = value; }
- }
-
-
- public virtual int Offset {
- get { return _offset; }
- set { _offset = value; }
- }
-
- public override string ParameterName {
- get {
- if (_parameterName == null)
- return String.Empty;
-
- return _parameterName;
- }
- set {
- if (_parameterName != value) {
- _parameterName = value;
- }
- }
- }
-
- public override int Size {
- get { return _size; }
-
- set {
- if (_size != value) {
- if (value < -1)
- throw ExceptionHelper.InvalidSizeValue (value);
-
- _size = value;
- }
- }
- }
-
-
- public override string SourceColumn {
- get {
- if (_sourceColumn == null)
- return String.Empty;
-
- return _sourceColumn;
- }
-
- set { _sourceColumn = value; }
- }
-
- internal DbParameterCollection Parent
- {
- get { return _parent; }
- set { _parent = value; }
- }
-
- public byte Precision
- {
- get { return _precision; }
- set { _precision = value; }
- }
-
- public byte Scale
- {
- get { return _scale; }
- set { _scale = value; }
- }
-
- public override DataRowVersion SourceVersion
- {
- get { return _sourceVersion; }
- set { _sourceVersion = value; }
- }
-
- protected internal int JdbcType
- {
- get {
- if (!IsJdbcTypeSet) {
- return JdbcTypeFromProviderType();
- }
- return _jdbcType;
- }
- set {
- _jdbcType = value;
- IsJdbcTypeSet = true;
- }
- }
-
- protected internal bool IsJdbcTypeSet
- {
- get {
- return _isJdbcTypeSet;
- }
-
- set {
- _isJdbcTypeSet = value;
- }
- }
-
- protected internal bool IsDbTypeSet
- {
- get { return _isDbTypeSet; }
- set { _isDbTypeSet = value; }
- }
-
- protected internal virtual bool IsSpecial {
- get {
- return false;
- }
- }
-
- private bool IsFixedLength
- {
- get {
- return ((DbType != DbType.AnsiString) && (DbType != DbType.Binary) &&
- (DbType != DbType.String) && (DbType != DbType.VarNumeric));
- }
- }
-
- protected internal virtual string Placeholder {
- get {
- return "?";
- }
- }
-
- internal object ConvertedValue
- {
- get {
- if (_convertedValue == null) {
- object value = Value;
- _convertedValue = ((value != null) && (value != DBNull.Value)) ? ConvertValue(value) : value;
- }
- return _convertedValue;
- }
- }
-
- public override object Value {
- get { return _value; }
- set {
- _convertedValue = null;
- _value = value;
- }
- }
-
- //DbParameter overrides
-
- public override bool SourceColumnNullMapping {
- get {
- throw new NotImplementedException();
- }
- set {
- throw new NotImplementedException();
- }
- }
-
-
- #endregion // Properties
-
- #region Methods
-
- public override String ToString()
- {
- return ParameterName;
- }
-
- protected internal abstract void SetParameterName(ResultSet res);
-
- protected internal abstract void SetParameterDbType(ResultSet res);
-
- protected internal abstract void SetSpecialFeatures(ResultSet res);
-
- public virtual object Clone()
- {
- AbstractDbParameter other = (AbstractDbParameter) MemberwiseClone ();
- other._parent = null;
- return other;
- }
-
- protected internal abstract int JdbcTypeFromProviderType();
-
- protected internal abstract object ConvertValue(object value);
-
- internal void SetParameterPrecisionAndScale(ResultSet res)
- {
- int jdbcType = res.getInt("DATA_TYPE");
- if(jdbcType == java.sql.Types.DECIMAL || jdbcType == java.sql.Types.NUMERIC) {
- Precision = (byte)res.getInt("PRECISION");
- Scale = (byte)res.getInt("SCALE");
- }
- }
-
- internal void SetParameterSize(ResultSet res)
- {
- Size = res.getInt("LENGTH");
- }
-
- internal void SetParameterIsNullable(ResultSet res)
- {
- IsNullable = (res.getInt("NULLABLE") == 1);
- }
-
- internal void Validate()
- {
- if (!IsFixedLength && ((Direction & ParameterDirection.Output) != 0) && (Size == 0)) {
- throw ExceptionHelper.ParameterSizeNotInitialized(Offset,ParameterName,DbType.ToString(),Size);
- }
- }
-
- //DbParameter overrides
-
- public override void ResetDbType() {
- throw new NotImplementedException();
- }
-
- #endregion // Methods
- }
-}
-
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs
deleted file mode 100644
index 6b6978280a8..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDataReader.cs
+++ /dev/null
@@ -1,1335 +0,0 @@
-//
-// System.Data.Common.AbstractDataReader
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Data;
-using System.Collections;
-using System.Data.Common;
-
-using java.io;
-using java.sql;
-
-namespace System.Data.ProviderBase
-{
- public abstract class AbstractDataReader : DbDataReader, ISafeDataRecord {
-
- #region Fields
-
- private ResultSetMetaData _resultsMetaData;
- protected AbstractDbCommand _command;
- private DataTable _schemaTable;
- private ReaderState _readerState = ReaderState.Uninitialized;
-
- private IReaderCacheContainer[] _readerCache;
- private int _currentCacheFilledPosition;
- private Stack _resultSetStack = new Stack();
- private bool _isClosed = false;
-
- [Flags]
- private enum ReaderState { Uninitialized = 0, Empty = 1, HasRows = 2, FirstRed = 4, Eof = 8, Fetching = 16 };
-
- protected internal enum SCHEMA_TABLE { ColumnName,
- ColumnOrdinal,
- ColumnSize,
- NumericPrecision,
- NumericScale,
- IsUnique,
- IsKey,
- BaseServerName,
- BaseCatalogName,
- BaseColumnName,
- BaseSchemaName,
- BaseTableName,
- DataType,
- AllowDBNull,
- ProviderType,
- IsAliased,
- IsExpression,
- IsIdentity,
- IsAutoIncrement,
- IsRowVersion,
- IsHidden,
- IsLong,
- IsReadOnly};
-
- #endregion // Fields
-
- #region Constructors
-
- protected AbstractDataReader(AbstractDbCommand command) {
- _command = command;
- if (_command.Connection != null) {
- ((AbstractDBConnection)_command.Connection).AddReference(this);
- }
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override int Depth {
- get { return 0; }
- }
-
- public override bool HasRows {
- get {
- if (IsClosed) {
- throw new InvalidOperationException("Invalid attempt to HasRows when reader is closed.");
- }
-
- try {
- if(null == Results)
- return false;
- }
- catch(SystemException) {
- //suppress
- return false;
- }
-
- return (_readerState & ReaderState.HasRows) != 0;
- }
- }
-
- public override int RecordsAffected
- {
- // MSDN : The RecordsAffected property is not set
- // until all rows are read and you close the reader.
- get {
- return _command.RecordsAffected;
- }
- }
-
- public override int FieldCount
- {
- get {
- if (ResultsMetaData == null)
- return 0;
-
- try {
- return ResultsMetaData.getColumnCount();
- }
- catch (SQLException exp) {
- throw CreateException(exp);
- }
-
- }
- }
-
- protected internal CommandBehavior Behavior
- {
- get {
- return _command.Behavior;
- }
- }
-
- public override Object this[String columnName]
- {
- get {
- try {
- int columnIndex = Results.findColumn(columnName) - 1;
- return this[columnIndex];
- }
- catch (SQLException exp) {
- throw new IndexOutOfRangeException(exp.Message, exp);
- }
- }
- }
-
- public override Object this[int columnIndex]
- {
- get { return GetValue(columnIndex); }
- }
-
- protected ResultSet Results
- {
- get {
- if (_readerState == ReaderState.Uninitialized) {
-
- if (_resultSetStack.Count == 0) {
- ResultSet resultSet = _command.CurrentResultSet;
- if (resultSet == null)
- return null;
-
- _resultSetStack.Push(resultSet);
- }
-
- _readerState = ReaderState.Fetching;
- for (;;) {
- try {
- Configuration.BooleanSetting prefetchSchema = Configuration.Switches.PrefetchSchema;
-
- if (prefetchSchema == Configuration.BooleanSetting.NotSet) {
- AbstractDBConnection conn = (AbstractDBConnection)((ICloneable)_command.Connection);
- string driverName = conn.JdbcConnection.getMetaData().getDriverName();
- if (driverName.IndexOf("DB2", StringComparison.Ordinal) >= 0)
- prefetchSchema = Configuration.BooleanSetting.True;
- }
-
- if (prefetchSchema == Configuration.BooleanSetting.True)
- GetSchemaTable();
-
- ResultSet resultSet = (ResultSet)_resultSetStack.Peek();
- if (resultSet.next()) {
- _readerState = (ReaderState.HasRows | ReaderState.FirstRed);
- ResultSetMetaData rsMetaData = ResultsMetaData;
- DbConvert.JavaSqlTypes javaSqlType = (DbConvert.JavaSqlTypes)rsMetaData.getColumnType(1);
- if (javaSqlType == DbConvert.JavaSqlTypes.OTHER) {
- object value = GetValue(0);
- if (value != null && value is ResultSet) {
- _resultsMetaData = null;
- _readerCache = null;
- SchemaTable = null;
- _readerState = ReaderState.Fetching;
- _resultSetStack.Push(value);
- continue;
- }
- }
- }
- else
- _readerState = ReaderState.Empty;
-
- break;
- }
- catch(SQLException e) {
- throw CreateException(e);
- }
- }
- }
-
- return (_resultSetStack.Count > 0) ? (ResultSet)_resultSetStack.Peek() : null;
- }
- }
-
- protected ResultSetMetaData ResultsMetaData
- {
- get {
- ResultSet results = Results;
- if (results == null) {
- return null;
- }
- if(_resultsMetaData == null) {
- _resultsMetaData = results.getMetaData();
- }
- return _resultsMetaData;
- }
- }
-
- protected DataTable SchemaTable
- {
- get {
- if (_schemaTable == null) {
- _schemaTable = ConstructSchemaTable();
- }
- return _schemaTable;
- }
-
- set {_schemaTable = value; }
- }
-
- internal protected IReaderCacheContainer[] ReaderCache
- {
- get {
- if (_readerCache == null) {
- _readerCache = CreateReaderCache();
- _currentCacheFilledPosition = -1;
- }
- return _readerCache;
- }
- }
-
- public override bool IsClosed {
- get { return _isClosed; }
- }
-
- #endregion // Properties
-
- #region Methods
-
- protected abstract int GetProviderType(int jdbcType);
-
- protected abstract SystemException CreateException(string message, SQLException e);
-
- protected abstract SystemException CreateException(IOException e);
-
- protected SystemException CreateException(SQLException e)
- {
- return CreateException(e.Message,e);
- }
-
- private bool CloseCurrentResultSet() {
- if (_resultSetStack.Count > 0) {
- try{
- _resultsMetaData = null;
- _readerCache = null;
- _readerState = ReaderState.Uninitialized;
- ResultSet rs = (ResultSet)_resultSetStack.Pop();
- rs.close();
- return true;
- }
- catch (SQLException exp) {
- throw CreateException(exp);
- }
- }
-
- return false;
- }
-
- // FIXME : add Close(bool readAllRecords) and pass this bool to skip looping over NextResult(), override AbstractDbCommand.ExecuteScalar
- public override void Close()
- {
- if (IsClosed)
- return;
-
- try {
- CloseCurrentResultSet();
- _command.OnReaderClosed(this);
- }
- finally {
- CloseInternal();
- }
- }
-
- internal void CloseInternal()
- {
- _resultsMetaData = null;
- _readerCache = null;
- _isClosed = true;
- }
-
- public override IEnumerator GetEnumerator ()
- {
- bool closeReader = (Behavior & CommandBehavior.CloseConnection) != 0;
- return new DbEnumerator (this , closeReader);
- }
-
- public override bool NextResult()
- {
- CloseCurrentResultSet();
-
- if ((_command.Behavior & CommandBehavior.SingleResult) != 0) {
- while (CloseCurrentResultSet());
- while (_command.NextResultSet());
- return false;
- }
-
- try {
- while (_resultSetStack.Count > 0) {
- ResultSet rs = (ResultSet)_resultSetStack.Peek();
-
- if(!rs.next()) {
- CloseCurrentResultSet();
- continue;
- }
-
- // must be a ResultSet
- object childRs = rs.getObject(1);
- if (childRs != null) {
- SchemaTable = null;
- _resultSetStack.Push(childRs);
- return true;
- }
- }
- }
- catch (SQLException exp) {
- throw CreateException(exp);
- }
-
- if (_command.NextResultSet()) {
- SchemaTable = null;
- return true;
- }
- return false;
- }
-
- public override bool Read()
- {
- if(null == Results ||
- (_readerState & (ReaderState.HasRows | ReaderState.Eof)) != ReaderState.HasRows)
- return false;
-
- bool firstRead = false;
-
- try {
- if ((_readerState & ReaderState.FirstRed) != 0) {
- firstRead = true;
- _readerState &= ~ReaderState.FirstRed;
- return true;
- }
- else {
- bool next = Results.next();
-
- if (!next)
- _readerState |= ReaderState.Eof;
-
- return next;
- }
- }
- catch (SQLException exp) {
- // suppress exception as .Net does
- return false;
- }
- finally {
- // in case of first read we could sampled the first value
- // to see whether there is a resultset, so _currentCacheFilledPosition
- // might be already inited
- if (!firstRead)
- _currentCacheFilledPosition = -1;
- }
- }
-
- public override bool GetBoolean(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((BooleanReaderCacheContainer)ReaderCache[columnIndex]).GetBoolean();
- }
-
- public bool GetBooleanSafe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is BooleanReaderCacheContainer) {
- return GetBoolean(columnIndex);
- }
- else {
- return Convert.ToBoolean(GetValue(columnIndex));
- }
- }
-
- public override byte GetByte(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((ByteReaderCacheContainer)ReaderCache[columnIndex]).GetByte();
- }
-
- public byte GetByteSafe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is ByteReaderCacheContainer) {
- return GetByte(columnIndex);
- }
- else {
- return Convert.ToByte(GetValue(columnIndex));
- }
- }
-
- public override long GetBytes(
- int columnIndex,
- long dataIndex,
- byte[] buffer,
- int bufferIndex,
- int length)
- {
- FillReaderCache(columnIndex);
- return ((BytesReaderCacheContainer)ReaderCache[columnIndex])
- .GetBytes(dataIndex, buffer, bufferIndex, length);
- }
-
- public virtual byte[] GetBytes(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((BytesReaderCacheContainer)ReaderCache[columnIndex]).GetBytes();
- }
-
- public override char GetChar(int columnIndex)
- {
- FillReaderCache(columnIndex);
- string s = ((StringReaderCacheContainer)ReaderCache[columnIndex]).GetString();
- if(s == null) {
- return '\0';
- }
- return s[0];
- }
-
- public char GetCharSafe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is StringReaderCacheContainer) {
- return GetChar(columnIndex);
- }
- else {
- return Convert.ToChar(GetValue(columnIndex));
- }
- }
-
- public override long GetChars(
- int columnIndex,
- long dataIndex,
- char[] buffer,
- int bufferIndex,
- int length)
- {
- FillReaderCache(columnIndex);
- return ((CharsReaderCacheContainer)ReaderCache[columnIndex])
- .GetChars(dataIndex, buffer, bufferIndex, length);
- }
-
- public override string GetDataTypeName(int columnIndex)
- {
- try {
- if (ResultsMetaData == null) {
- return String.Empty;
- }
- return ResultsMetaData.getColumnTypeName(columnIndex + 1);
- }
- catch (SQLException exp) {
- throw CreateException(exp);
- }
- }
-
- public override DateTime GetDateTime(int columnIndex)
- {
- return GetDateTimeUnsafe(columnIndex);
- }
-
- DateTime GetDateTimeUnsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((DateTimeReaderCacheContainer)ReaderCache[columnIndex]).GetDateTime();
- }
-
- public DateTime GetDateTimeSafe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is DateTimeReaderCacheContainer) {
- return GetDateTimeUnsafe(columnIndex);
- }
- else {
- return Convert.ToDateTime(GetValue(columnIndex));
- }
- }
-
- public virtual TimeSpan GetTimeSpan(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((TimeSpanReaderCacheContainer)ReaderCache[columnIndex]).GetTimeSpan();
- }
-
- public override Guid GetGuid(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((GuidReaderCacheContainer)ReaderCache[columnIndex]).GetGuid();
- }
-
- public override decimal GetDecimal(int columnIndex)
- {
- return GetDecimalUnsafe(columnIndex);
- }
-
- decimal GetDecimalUnsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((DecimalReaderCacheContainer)ReaderCache[columnIndex]).GetDecimal();
- }
-
- public decimal GetDecimalSafe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is DecimalReaderCacheContainer) {
- return GetDecimalUnsafe(columnIndex);
- }
- else {
- return Convert.ToDecimal(GetValue(columnIndex));
- }
- }
-
- public override double GetDouble(int columnIndex)
- {
- return GetDoubleUnsafe(columnIndex);
- }
-
- double GetDoubleUnsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((DoubleReaderCacheContainer)ReaderCache[columnIndex]).GetDouble();
- }
-
- public double GetDoubleSafe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is DoubleReaderCacheContainer) {
- return GetDoubleUnsafe(columnIndex);
- }
- else {
- return Convert.ToDouble(GetValue(columnIndex));
- }
- }
-
- public override float GetFloat(int columnIndex)
- {
- return GetFloatUnsafe(columnIndex);
- }
-
- float GetFloatUnsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((FloatReaderCacheContainer)ReaderCache[columnIndex]).GetFloat();
- }
-
- public float GetFloatSafe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is FloatReaderCacheContainer) {
- return GetFloatUnsafe(columnIndex);
- }
- else {
- return Convert.ToSingle(GetValue(columnIndex));
- }
- }
-
- public override short GetInt16(int columnIndex)
- {
- return GetInt16Unsafe(columnIndex);
- }
-
- short GetInt16Unsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((Int16ReaderCacheContainer)ReaderCache[columnIndex]).GetInt16();
- }
-
- public short GetInt16Safe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is Int16ReaderCacheContainer) {
- return GetInt16Unsafe(columnIndex);
- }
- else {
- return Convert.ToInt16(GetValue(columnIndex));
- }
- }
-
- public override int GetInt32(int columnIndex)
- {
- return GetInt32Unsafe(columnIndex);
- }
-
- int GetInt32Unsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((Int32ReaderCacheContainer)ReaderCache[columnIndex]).GetInt32();
- }
-
- public int GetInt32Safe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is Int32ReaderCacheContainer) {
- return GetInt32Unsafe(columnIndex);
- }
- else {
- return Convert.ToInt32(GetValue(columnIndex));
- }
- }
-
- public override long GetInt64(int columnIndex)
- {
- return GetInt64Unsafe(columnIndex);
- }
-
- long GetInt64Unsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((Int64ReaderCacheContainer)ReaderCache[columnIndex]).GetInt64();
- }
-
- public long GetInt64Safe(int columnIndex)
- {
- if (ReaderCache[columnIndex] is Int64ReaderCacheContainer) {
- return GetInt64Unsafe(columnIndex);
- }
- else {
- return Convert.ToInt64(GetValue(columnIndex));
- }
- }
-
- public override string GetName(int columnIndex)
- {
- try {
- if (ResultsMetaData == null) {
- return String.Empty;
- }
- return ResultsMetaData.getColumnName(columnIndex + 1);
- }
- catch (SQLException exp) {
- throw new IndexOutOfRangeException(exp.Message, exp);
- }
- }
-
- public override int GetOrdinal(String columnName)
- {
- try {
- int retVal = Results.findColumn(columnName);
- if(retVal != -1) {
- retVal -= 1;
- }
- return retVal;
- }
- catch (SQLException exp) {
- throw new IndexOutOfRangeException(exp.Message, exp);
- }
- }
-
- public override string GetString(int columnIndex)
- {
- return GetStringUnsafe(columnIndex);
- }
-
- string GetStringUnsafe(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ((StringReaderCacheContainer)ReaderCache[columnIndex]).GetString();
- }
-
- public string GetStringSafe(int columnIndex) {
- if (ReaderCache[columnIndex] is StringReaderCacheContainer) {
- return GetStringUnsafe(columnIndex);
- }
- else {
- return Convert.ToString(GetValue(columnIndex));
- }
- }
-
- public override object GetValue(int columnIndex)
- {
- FillReaderCache(columnIndex);
- if (ReaderCache[columnIndex].IsNull()) {
- return DBNull.Value;
- }
- return ReaderCache[columnIndex].GetValue();
- }
-
- public override int GetValues(Object[] values)
- {
- int columnCount = FieldCount;
- int i = 0;
- for (; i < values.Length && i < columnCount; i++) {
- values[i] = GetValue(i);
- }
- return i;
- }
-
- private void FillReaderCache(int columnIndex)
- {
- try {
- IReaderCacheContainer[] readerCache = ReaderCache;
- if ((Behavior & CommandBehavior.SequentialAccess) == 0) {
- while (_currentCacheFilledPosition < columnIndex) {
- _currentCacheFilledPosition++;
- readerCache[_currentCacheFilledPosition].Fetch(Results,_currentCacheFilledPosition, false);
- }
- }
- else {
- readerCache[columnIndex].Fetch(Results,columnIndex, true);
- }
- }
- catch(SQLException e) {
- _currentCacheFilledPosition = -1;
- throw CreateException(e);
- }
- catch (IOException e) {
- _currentCacheFilledPosition = -1;
- throw CreateException(e);
- }
- }
-
- protected virtual IReaderCacheContainer CreateReaderCacheContainer(int jdbcType, int columnIndex) {
- switch ((DbConvert.JavaSqlTypes)jdbcType) {
- case DbConvert.JavaSqlTypes.ARRAY :
- return new ArrayReaderCacheContainer();
- case DbConvert.JavaSqlTypes.BIGINT :
- return new Int64ReaderCacheContainer();
- case DbConvert.JavaSqlTypes.BINARY :
- case DbConvert.JavaSqlTypes.VARBINARY :
- case DbConvert.JavaSqlTypes.LONGVARBINARY :
- return new BytesReaderCacheContainer();
- case DbConvert.JavaSqlTypes.BIT :
- return new BooleanReaderCacheContainer();
- case DbConvert.JavaSqlTypes.BLOB :
- return new BlobReaderCacheContainer();
- case DbConvert.JavaSqlTypes.VARCHAR:
- case DbConvert.JavaSqlTypes.CHAR :
- if (String.CompareOrdinal("uniqueidentifier", ResultsMetaData.getColumnTypeName(columnIndex)) == 0) {
- return new GuidReaderCacheContainer();
- }
- else {
- return new StringReaderCacheContainer();
- }
- case DbConvert.JavaSqlTypes.CLOB :
- return new ClobReaderCacheContainer();
- case DbConvert.JavaSqlTypes.TIME :
- return new TimeSpanReaderCacheContainer();
- case DbConvert.JavaSqlTypes.DATE :
- AbstractDBConnection conn = (AbstractDBConnection)((ICloneable)_command.Connection);
- string driverName = conn.JdbcConnection.getMetaData().getDriverName();
-
- if (driverName.StartsWith("PostgreSQL")) {
- return new DateTimeReaderCacheContainer();
- }
- else
- goto case DbConvert.JavaSqlTypes.TIMESTAMP;
- case DbConvert.JavaSqlTypes.TIMESTAMP :
- return new TimestampReaderCacheContainer();
- case DbConvert.JavaSqlTypes.DECIMAL :
- case DbConvert.JavaSqlTypes.NUMERIC :
- // jdbc driver for oracle identitfies both FLOAT and NUMBEr columns as
- // java.sql.Types.NUMERIC (2), columnTypeName NUMBER, columnClassName java.math.BigDecimal
- // therefore we relay on scale
- int scale = ResultsMetaData.getScale(columnIndex);
- if (scale == -127) {
- // Oracle db type FLOAT
- return new DoubleReaderCacheContainer();
- }
- else {
- return new DecimalReaderCacheContainer();
- }
- case DbConvert.JavaSqlTypes.DOUBLE :
- case DbConvert.JavaSqlTypes.FLOAT :
- return new DoubleReaderCacheContainer();
- case DbConvert.JavaSqlTypes.INTEGER :
- return new Int32ReaderCacheContainer();
- case DbConvert.JavaSqlTypes.LONGVARCHAR :
- return new StringReaderCacheContainer();
- case DbConvert.JavaSqlTypes.NULL :
- return new NullReaderCacheContainer();
- case DbConvert.JavaSqlTypes.REAL :
- return new FloatReaderCacheContainer();
- case DbConvert.JavaSqlTypes.REF :
- return new RefReaderCacheContainer();
- case DbConvert.JavaSqlTypes.SMALLINT :
- return new Int16ReaderCacheContainer();
- case DbConvert.JavaSqlTypes.TINYINT :
- return new ByteReaderCacheContainer();
- case DbConvert.JavaSqlTypes.DISTINCT :
- case DbConvert.JavaSqlTypes.JAVA_OBJECT :
- case DbConvert.JavaSqlTypes.OTHER :
- case DbConvert.JavaSqlTypes.STRUCT :
- default :
- return new ObjectReaderCacheContainer();
- }
- }
-
- private IReaderCacheContainer[] CreateReaderCache()
- {
- try {
- IReaderCacheContainer[] readerCache = new IReaderCacheContainer[FieldCount];
- for(int i=1; i <= readerCache.Length; i++)
- readerCache[i-1] = CreateReaderCacheContainer(ResultsMetaData.getColumnType(i), i);
-
- return readerCache;
- }
- catch(SQLException e) {
- throw CreateException(e);
- }
- }
-
- protected bool IsNumeric(int columnIndex)
- {
- return ReaderCache[columnIndex].IsNumeric();
- }
-
- public override bool IsDBNull(int columnIndex)
- {
- FillReaderCache(columnIndex);
- return ReaderCache[columnIndex].IsNull();
- }
-
- public override Type GetFieldType(int i)
- {
- try {
- int javaSqlType = ResultsMetaData.getColumnType(i + 1);
- return DbConvert.JavaSqlTypeToClrType(javaSqlType);
- }
- catch (SQLException exp) {
- throw new IndexOutOfRangeException(exp.Message, exp);
- }
- }
-
- public IDataReader GetData(int i)
- {
- throw new NotSupportedException();
- }
-
- protected virtual void SetSchemaType(DataRow schemaRow, ResultSetMetaData metaData, int columnIndex) {
- DbConvert.JavaSqlTypes columnType = (DbConvert.JavaSqlTypes)metaData.getColumnType(columnIndex);
-
- switch (columnType) {
- case DbConvert.JavaSqlTypes.ARRAY: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = typeof (java.sql.Array);
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.BIGINT: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfInt64;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.BINARY: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfByteArray;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- case DbConvert.JavaSqlTypes.BIT: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfBoolean;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.BLOB: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfByteArray;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- case DbConvert.JavaSqlTypes.VARCHAR:
- case DbConvert.JavaSqlTypes.CHAR: {
- // FIXME : specific for Microsoft SQl Server driver
- if (String.CompareOrdinal(metaData.getColumnTypeName(columnIndex), "uniqueidentifier") == 0) {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.Guid;
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfGuid;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- }
- else
- if (String.CompareOrdinal(metaData.getColumnTypeName(columnIndex), "sql_variant") == 0) {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.Object;
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfObject;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- }
- else {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfString;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- }
- break;
- }
- case DbConvert.JavaSqlTypes.CLOB: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfString; // instead og .java.sql.Clob
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- case DbConvert.JavaSqlTypes.DATE: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfDateTime;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- // else if(DbConvert.JavaSqlTypes.DISTINCT)
- // {
- // schemaRow ["ProviderType = (int)GetProviderType((int)columnType);
- // schemaRow ["DataType = typeof (?);
- // schemaRow ["IsLong = false;
- // }
- case DbConvert.JavaSqlTypes.DOUBLE: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfDouble; // was typeof(float)
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.FLOAT: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfDouble;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.REAL: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfFloat;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.INTEGER: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfInt32;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.JAVA_OBJECT: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfObject;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.LONGVARBINARY: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfByteArray;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- case DbConvert.JavaSqlTypes.LONGVARCHAR: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfString;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- case DbConvert.JavaSqlTypes.DECIMAL:
- case DbConvert.JavaSqlTypes.NUMERIC: {
- int scale = ResultsMetaData.getScale(columnIndex);
- if (scale == -127) {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfDouble;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- }
- else {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfDecimal;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- }
- break;
- }
- case DbConvert.JavaSqlTypes.REF: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = typeof (java.sql.Ref);
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- case DbConvert.JavaSqlTypes.SMALLINT: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfInt16;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.STRUCT: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = typeof (java.sql.Struct);
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.TIME: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfTimespan;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.TIMESTAMP: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfDateTime;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.TINYINT: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfByte;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = false;
- break;
- }
- case DbConvert.JavaSqlTypes.VARBINARY: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = GetProviderType((int)columnType);
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfByteArray;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- default: {
- schemaRow [(int)SCHEMA_TABLE.ProviderType] = DbType.Object;
- schemaRow [(int)SCHEMA_TABLE.DataType] = DbTypes.TypeOfObject;
- schemaRow [(int)SCHEMA_TABLE.IsLong] = true;
- break;
- }
- }
- }
-
- public override DataTable GetSchemaTable()
- {
- if (SchemaTable.Rows != null && SchemaTable.Rows.Count > 0) {
- return SchemaTable;
- }
-
- ResultSetMetaData metaData;
- if (Behavior == CommandBehavior.SchemaOnly) {
- try {
- metaData = ((PreparedStatement)_command.Statement).getMetaData();
- }
- catch(SQLException e) {
- throw CreateException("CommandBehaviour.SchemaOnly is not supported by the JDBC driver.",e);
- }
- }
- else {
- metaData = ResultsMetaData;
- }
-
- if (metaData == null) {
- return SchemaTable;
- }
-
- DatabaseMetaData dbMetaData = null;
- AbstractDBConnection clonedConnection = null;
- if ((_command.Behavior & CommandBehavior.KeyInfo) != 0) {
- clonedConnection = (AbstractDBConnection)((ICloneable)_command.Connection).Clone();
-
- try {
- clonedConnection.Open();
- dbMetaData = clonedConnection.JdbcConnection.getMetaData();
- }
- catch {
- //suppress
- if (clonedConnection != null) {
- clonedConnection.Close();
- }
- }
- }
-
- try {
- int tmp;
- for(int i = 1; i <= metaData.getColumnCount(); i++) {
- DataRow row = SchemaTable.NewRow ();
- string columnName = metaData.getColumnLabel(i);
- string baseColumnName = metaData.getColumnName(i);
-
- row [(int)SCHEMA_TABLE.ColumnName] = columnName; // maybe we should use metaData.getColumnLabel(i);
- row [(int)SCHEMA_TABLE.ColumnSize] = metaData.getColumnDisplaySize(i);
- row [(int)SCHEMA_TABLE.ColumnOrdinal] = i - 1;
- try {
- // FIXME : workaround for Oracle JDBC driver bug
- // getPrecision on BLOB, CLOB, NCLOB throws NumberFormatException
- tmp = metaData.getPrecision(i);
- }
- catch(java.lang.NumberFormatException e) {
- // supress exception
- tmp = 255;
- }
- row [(int)SCHEMA_TABLE.NumericPrecision] = Convert.ToInt16(tmp > 255 ? 255 : tmp);
- tmp = metaData.getScale(i);
- row [(int)SCHEMA_TABLE.NumericScale] = Convert.ToInt16(tmp > 255 ? 255 : tmp);
-
- row [(int)SCHEMA_TABLE.BaseServerName] = DBNull.Value;
-
- string catalog = null;
- try {
- catalog = metaData.getCatalogName(i);
- }
- catch (Exception e) {
- // supress exception
- }
- if (catalog != null && catalog.Length == 0)
- catalog = ((AbstractDBConnection)_command.Connection).JdbcConnection.getCatalog();
- row [(int)SCHEMA_TABLE.BaseCatalogName] = catalog;
- row [(int)SCHEMA_TABLE.BaseColumnName] = baseColumnName;
-
- string schemaName;
- string tableName;
-
- try {
- tableName = metaData.getTableName(i);
- }
- catch {
- tableName = null;
- }
-
- try {
- schemaName = metaData.getSchemaName(i);
- }
- catch {
- schemaName = null;
- }
-
- if (tableName != null && tableName.Length == 0)
- tableName = null;
- if (schemaName != null && schemaName.Length == 0)
- schemaName = null;
-
- row [(int)SCHEMA_TABLE.BaseSchemaName] = schemaName;
- row [(int)SCHEMA_TABLE.BaseTableName] = tableName;
-
-
- row [(int)SCHEMA_TABLE.AllowDBNull] = Convert.ToBoolean(metaData.isNullable(i));
-
- InitKeyInfo(row, dbMetaData, catalog, schemaName, tableName);
-
- row [(int)SCHEMA_TABLE.IsAliased] = columnName != baseColumnName;
- row [(int)SCHEMA_TABLE.IsExpression] = false;
-
- row [(int)SCHEMA_TABLE.IsAutoIncrement] = metaData.isAutoIncrement(i);
-
- row [(int)SCHEMA_TABLE.IsHidden] = false;
- row [(int)SCHEMA_TABLE.IsReadOnly] = metaData.isReadOnly(i);
-
- SetSchemaType(row, metaData, i);
-
- SchemaTable.Rows.Add (row);
- }
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- finally {
- if (clonedConnection != null) {
- clonedConnection.Close();
- }
- }
- return SchemaTable;
- }
-
- private void InitKeyInfo(DataRow row, DatabaseMetaData dbMetaData, String catalog, String schema, String table) {
- string column = (string)row [(int)SCHEMA_TABLE.BaseColumnName];
-
- row [(int)SCHEMA_TABLE.IsUnique] = false;
- row [(int)SCHEMA_TABLE.IsKey] = false;
- row [(int)SCHEMA_TABLE.IsIdentity] = false;
- row [(int)SCHEMA_TABLE.IsRowVersion] = false;
-
- if ((_command.Behavior & CommandBehavior.KeyInfo) == 0)
- return;
-
- if(table == null || column == null || dbMetaData == null)
- return;
-
- ResultSet versionCol = dbMetaData.getVersionColumns(catalog, schema, table);
- try {
- while(versionCol.next()) {
- if(versionCol.getString("COLUMN_NAME") == column) {
- if (DatabaseMetaData__Finals.versionColumnPseudo == versionCol.getShort("PSEUDO_COLUMN")) {
- row [(int)SCHEMA_TABLE.IsIdentity] = true;
- row [(int)SCHEMA_TABLE.IsRowVersion] = true;
- }
- }
- }
- }
- finally {
- versionCol.close();
- }
-
- ResultSet primaryKeys = dbMetaData.getPrimaryKeys(catalog,schema,table);
- bool primaryKeyExists = false;
- int columnCount = 0;
- try {
- while(primaryKeys.next()) {
- columnCount++;
- if(primaryKeys.getString("COLUMN_NAME") == column) {
- row [(int)SCHEMA_TABLE.IsKey] = true;
- primaryKeyExists = true;
- }
- }
- // column constitutes a key by itself, so it should be marked as unique
- if ((columnCount == 1) && (((bool)row [(int)SCHEMA_TABLE.IsKey]) == true)) {
- row [(int)SCHEMA_TABLE.IsUnique] = true;
- }
- }
- finally {
- primaryKeys.close();
- }
-
- ResultSet indexInfoRes = dbMetaData.getIndexInfo(catalog,schema,table,true,false);
- string currentIndexName = null;
- columnCount = 0;
- bool belongsToCurrentIndex = false;
- bool atFirstIndex = true;
- bool uniqueKeyExists = false;
- try {
- while(indexInfoRes.next()) {
- if (indexInfoRes.getShort("TYPE") == DatabaseMetaData__Finals.tableIndexStatistic) {
- // index of type tableIndexStatistic identifies table statistics - ignore it
- continue;
- }
-
- uniqueKeyExists = true;
- string iname = indexInfoRes.getString("INDEX_NAME");
- if (currentIndexName == iname) {
- // we're within the rows of the same index
- columnCount++;
- }
- else {
- // we jump to row of new index
- if (belongsToCurrentIndex && columnCount == 1) {
- // there is a constraint of type UNIQUE that applies only to this column
- row [(int)SCHEMA_TABLE.IsUnique] = true;
- }
-
- if (currentIndexName != null) {
- atFirstIndex = false;
- }
- currentIndexName = iname;
- columnCount = 1;
- belongsToCurrentIndex = false;
- }
-
- if(indexInfoRes.getString("COLUMN_NAME") == column) {
- // FIXME : this will cause "spare" columns marked as IsKey. Needs future investigation.
- // only the first index we met should be marked as a key
- //if (atFirstIndex) {
- row [(int)SCHEMA_TABLE.IsKey] = true;
- //}
- belongsToCurrentIndex = true;
- }
- }
- // the column appears in the last index, which is single-column
- if (belongsToCurrentIndex && columnCount == 1) {
- // there is a constraint of type UNIQUE that applies only to this column
- row [(int)SCHEMA_TABLE.IsUnique] = true;
- }
- }
- finally {
- indexInfoRes.close();
- }
-
- if(!primaryKeyExists && !uniqueKeyExists) {
- ResultSet bestRowId = dbMetaData.getBestRowIdentifier(catalog, schema, table, DatabaseMetaData__Finals.bestRowTemporary, false);
- try {
- while(bestRowId.next()) {
- if(bestRowId.getString("COLUMN_NAME") == column)
- row [(int)SCHEMA_TABLE.IsKey] = true;
- }
- }
- finally {
- bestRowId.close();
- }
- }
- }
-
- protected static DataTable ConstructSchemaTable ()
- {
- Type booleanType = DbTypes.TypeOfBoolean;
- Type stringType = DbTypes.TypeOfString;
- Type intType = DbTypes.TypeOfInt32;
- Type typeType = DbTypes.TypeOfType;
- Type shortType = DbTypes.TypeOfInt16;
-
- DataTable schemaTable = new DataTable ("SchemaTable");
- schemaTable.Columns.Add ("ColumnName", stringType);
- schemaTable.Columns.Add ("ColumnOrdinal", intType);
- schemaTable.Columns.Add ("ColumnSize", intType);
- schemaTable.Columns.Add ("NumericPrecision", shortType);
- schemaTable.Columns.Add ("NumericScale", shortType);
- schemaTable.Columns.Add ("IsUnique", booleanType);
- schemaTable.Columns.Add ("IsKey", booleanType);
- schemaTable.Columns.Add ("BaseServerName", stringType);
- schemaTable.Columns.Add ("BaseCatalogName", stringType);
- schemaTable.Columns.Add ("BaseColumnName", stringType);
- schemaTable.Columns.Add ("BaseSchemaName", stringType);
- schemaTable.Columns.Add ("BaseTableName", stringType);
- schemaTable.Columns.Add ("DataType", typeType);
- schemaTable.Columns.Add ("AllowDBNull", booleanType);
- schemaTable.Columns.Add ("ProviderType", intType);
- schemaTable.Columns.Add ("IsAliased", booleanType);
- schemaTable.Columns.Add ("IsExpression", booleanType);
- schemaTable.Columns.Add ("IsIdentity", booleanType);
- schemaTable.Columns.Add ("IsAutoIncrement", booleanType);
- schemaTable.Columns.Add ("IsRowVersion", booleanType);
- schemaTable.Columns.Add ("IsHidden", booleanType);
- schemaTable.Columns.Add ("IsLong", booleanType);
- schemaTable.Columns.Add ("IsReadOnly", booleanType);
- return schemaTable;
- }
-
- #endregion // Methods
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbError.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbError.cs
deleted file mode 100644
index aeeb3521a61..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbError.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//
-// System.Data.ProviderBase.AbstractDbError
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Data.ProviderBase {
- using java.sql;
- using System.Data.Common;
-
- [Serializable]
- public abstract class AbstractDbError {
- protected SQLException _e;
- string _jdbcProvider;
-
- protected AbstractDbError(SQLException e, AbstractDBConnection connection) {
- _e = e;
- if (connection != null)
- _jdbcProvider = connection.JdbcProvider;
- }
-
- protected internal String DbMessage {
- get {
- return _e.Message;
- }
- }
-
- protected int DbErrorCode {
- get {
- return _e.getErrorCode();
- }
- }
-
- protected String DbSource {
- get {
- return _jdbcProvider;
- }
- }
-
- protected String DbSQLState {
- get {
- return _e.getSQLState();
- }
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs
deleted file mode 100644
index 5e7fc681f47..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbErrorCollection.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// System.Data.ProviderBase.AbstractDbErrorCollection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Data.ProviderBase {
-
-
- using System.Collections;
- using java.sql;
- using System.Data.Common;
-
- [Serializable]
- public abstract class AbstractDbErrorCollection : ICollection, IEnumerable {
- private ArrayList _list;
-
- protected AbstractDbErrorCollection(SQLException e, AbstractDBConnection connection) {
- _list = new ArrayList();
-
- while(e != null) {
- _list.Add(CreateDbError(e, connection));
- e = e.getNextException();
- }
- }
-
- protected abstract AbstractDbError CreateDbError(SQLException e, AbstractDBConnection connection);
- /**
- * Gets the error at the specified index.
- *
- * @param index of the error
- * @return Error on specified index
- */
- protected AbstractDbError GetDbItem(int index) {
- return (AbstractDbError)_list[index];
- }
-
- /**
- * Adds new Error to the collection
- *
- * @param value new OleDbError
- */
- public void Add(object value) {
- _list.Add(value);
- }
-
- public int Count {
- get {
- return _list.Count;
- }
- }
-
- public IEnumerator GetEnumerator() {
- return _list.GetEnumerator();
- }
-
- public void CopyTo(System.Array arr, int index) {
- _list.CopyTo(arr, index);
- }
-
- bool ICollection.IsSynchronized {
- get {
- return _list.IsSynchronized;
- }
- }
-
- Object ICollection.SyncRoot {
- get {
- return _list.SyncRoot;
- }
- }
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs
deleted file mode 100644
index 848f05cecf8..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractDbException.cs
+++ /dev/null
@@ -1,112 +0,0 @@
-//
-// System.Data.ProviderBase.AbstractDbException
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Data.ProviderBase {
-
- using java.sql;
- using System.Text;
- using System.Data.Common;
-
- /*
- * CURRENT LIMITATIONS
- * 1. Constructor for serialization SqlException(SerializationInfo info, StreamingContext sc)
- * is not supported.
- * 2. Method "void GetObjectData(...,...)" is not supported (serialization)
- */
-
- public abstract class AbstractDbException :
-#if NET_2_0
- DbException
-#else
- System.SystemException
-#endif
- {
- protected SQLException _cause;
- protected AbstractDBConnection _connection;
-
- protected AbstractDbException(Exception cause, AbstractDBConnection connection) : base(cause.Message, cause) {
- _connection = connection;
- }
-
- protected AbstractDbException(SQLException cause, AbstractDBConnection connection) : this(String.Empty, cause, connection) {}
-
- protected AbstractDbException(string message, SQLException cause, AbstractDBConnection connection) : base(message, cause) {
- _connection = connection;
- _cause = cause;
- }
-
- abstract protected AbstractDbErrorCollection DbErrors { get; }
-
- /**
- * Gets the error code of the error.
- * @return The error code of the error.
- */
- protected int DbErrorCode {
- get {
- return _cause != null ? _cause.getErrorCode() : 0;
- }
- }
-
-
- /**
- * Gets the name of the OLE DB provider that generated the error.
- * @return the name of the OLE DB provider that generated the error.
- */
- public override String Source {
- get {
- return _connection != null ? _connection.JdbcProvider : null;
- }
- }
-
- public override string Message {
- get {
- StringBuilder sb = new StringBuilder();
- string message = base.Message;
- bool addNewLine = false;
- if (message != null && message.Length > 0) {
- sb.Append(message);
- addNewLine = true;
- }
-
- foreach (AbstractDbError err in DbErrors) {
- if (addNewLine)
- sb.Append(Environment.NewLine);
-
- addNewLine = true;
- sb.Append(err.DbMessage);
- }
- return sb.ToString();
- }
- }
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs
deleted file mode 100644
index 2c2f25f550a..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/AbstractTransaction.cs
+++ /dev/null
@@ -1,157 +0,0 @@
-//
-// System.Data.ProviderBase.AbstractTransaction
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Data.Common;
-
-namespace System.Data.ProviderBase
-{
-
- using java.sql;
-
- using System.Data;
-
- public abstract class AbstractTransaction : DbTransaction
- {
-
- protected String _transactionName;
- protected AbstractDBConnection _connection;
-
- protected IsolationLevel _isolationLevel;
-
- public AbstractTransaction(
- IsolationLevel isolationLevel,
- AbstractDBConnection connection,
- String transactionName)
- {
- connection.ValidateBeginTransaction();
- _transactionName = transactionName;
- _connection = connection;
- _isolationLevel = isolationLevel;
- try
- {
- _connection.JdbcConnection.setAutoCommit(false);
- _connection.JdbcConnection.setTransactionIsolation(
- convertIsolationLevel(isolationLevel));
- }
- catch (SQLException exp)
- {
- throw new System.InvalidOperationException(exp.Message, exp);
- }
- }
-
-
- /**
- * @see System.Data.IDbTransaction#Connection
- */
- protected override DbConnection DbConnection
- {
- get
- {
- return _connection;
- }
- }
-
- /**
- * @see System.Data.IDbTransaction#IsolationLevel
- */
- public override IsolationLevel IsolationLevel
- {
- get
- {
- return _isolationLevel;
- }
- }
-
- /**
- * @see System.Data.IDbTransaction#Commit()
- */
- public override void Commit()
- {
- if (_connection == null)
- return;
-
- try
- {
- _connection.JdbcConnection.commit();
- _connection.JdbcConnection.setAutoCommit(true);
- _connection = null;
- }
- catch (SQLException exp)
- {
- throw new SystemException(exp.Message, exp);
- }
- }
-
- /**
- * @see System.Data.IDbTransaction#Rollback()
- */
- public override void Rollback()
- {
- if (_connection == null)
- return;
-
- try
- {
- _connection.JdbcConnection.rollback();
- _connection.JdbcConnection.setAutoCommit(true);
- _connection = null;
- }
- catch (SQLException exp)
- {
- throw new SystemException(exp.Message, exp);
- }
- }
-
- internal AbstractTransaction ActiveTransaction {
- get {
- // recoursively return parent transaction when nesting will
- // be implemented
- return _connection != null ? this : null;
- }
- }
-
- private int convertIsolationLevel(IsolationLevel isolationLevel)
- {
- if (isolationLevel == IsolationLevel.Unspecified)
- return vmw.@internal.sql.ConnectionUtils__Finals.TRANSACTION_NONE;
- if (isolationLevel == IsolationLevel.ReadCommitted)
- return vmw.@internal.sql.ConnectionUtils__Finals.TRANSACTION_READ_COMMITTED;
- if (isolationLevel == IsolationLevel.ReadUncommitted)
- return vmw.@internal.sql.ConnectionUtils__Finals.TRANSACTION_READ_UNCOMMITTED;
- if (isolationLevel == IsolationLevel.RepeatableRead)
- return vmw.@internal.sql.ConnectionUtils__Finals.TRANSACTION_REPEATABLE_READ;
- if (isolationLevel == IsolationLevel.Serializable)
- return vmw.@internal.sql.ConnectionUtils__Finals.TRANSACTION_SERIALIZABLE;
-
- throw new NotSupportedException("The Isolation level '" + isolationLevel + "' is not supported");
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbConvert.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbConvert.cs
deleted file mode 100644
index 7b62cbe9295..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/DbConvert.cs
+++ /dev/null
@@ -1,370 +0,0 @@
-//
-// System.Data.Common.DbConvert
-//
-// Author:
-// Boris Kirzner (borisk@mainsoft.com)
-//
-
-using System;
-using System.Data.Common;
-
-using java.io;
-using java.sql;
-
-namespace System.Data.ProviderBase
-{
- public abstract class DbConvert
- {
- #region Fields
-
- const long JAVA_MIN_MILLIS_UTC = -62135769600000L; // java.sql.Timestamp.valueOf("0001-01-01 00:00:00.000000000").getTime() at Greenwich time zone.
- static readonly long TIMEZONE_RAW_OFFSET;
- // .NET milliseconds value of DateTime(1582,1,1,0,0,0,0).Ticks/TimeSpan.TicksPerMillisecond
- const long CLR_MILLIS_1582 = 49891507200000L;
- const long MILLIS_PER_TWO_DAYS = 2 * TimeSpan.TicksPerDay / TimeSpan.TicksPerMillisecond; // 172800000L;
- internal static readonly java.util.TimeZone DEFAULT_TIME_ZONE;
-
- #endregion // Fields
-
- #region java.sql.Types constants
-
- internal enum JavaSqlTypes {
- ARRAY = 2003 ,
- BIGINT = -5,
- BINARY = -2 ,
- BIT = -7 ,
- BLOB = 2004,
- BOOLEAN = 16,
- CHAR = 1,
- CLOB = 2005,
- DATALINK = 70,
- DATE = 91,
- DECIMAL = 3,
- DISTINCT = 2001,
- DOUBLE = 8,
- FLOAT = 6,
- INTEGER = 4,
- JAVA_OBJECT = 2000,
- LONGVARBINARY = -4,
- LONGVARCHAR = -1,
- NULL = 0,
- NUMERIC = 2 ,
- OTHER = 1111 ,
- REAL = 7 ,
- REF = 2006 ,
- SMALLINT = 5,
- STRUCT = 2002,
- TIME = 92,
- TIMESTAMP = 93,
- TINYINT = -6,
- VARBINARY = -3,
- VARCHAR = 12,
- // NOTSET = int.MinValue
- }
-
-
- #endregion // java.sql.Types constants
-
- #region Methods
-
- static DbConvert()
- {
- DEFAULT_TIME_ZONE = java.util.SimpleTimeZone.getDefault();
- TIMEZONE_RAW_OFFSET = (long)DEFAULT_TIME_ZONE.getRawOffset();
- }
-
- // The diff between .Net and Java goes as the following:
- // * at 1582: java has 10 days less than .net
- // * below 1500 (exept 1200,800,400) : each 100'th year java adds 1 day over .net.
- // Current implementation compatible with .net in 1-99 and since 1582. In 100-1582 we're not compatible with .Ner nor with Java
-
- internal static long JavaMillisToClrMillis(long javaMillis)
- {
- return JavaMillisToClrMillisUTC(javaMillis) + TIMEZONE_RAW_OFFSET;
- }
-
- internal static long JavaMillisToClrMillisUTC(long javaMillis) {
- long clrMillis = javaMillis - JAVA_MIN_MILLIS_UTC;
- if (clrMillis > CLR_MILLIS_1582) {
- clrMillis -= MILLIS_PER_TWO_DAYS;
- }
- return clrMillis;
- }
-
- internal static long ClrMillisToJavaMillis(long clrMillis)
- {
- return ClrMillisToJavaMillisUTC(clrMillis) - TIMEZONE_RAW_OFFSET;
- }
-
- internal static long ClrMillisToJavaMillisUTC(long clrMillis) {
- long javaMillis = clrMillis + JAVA_MIN_MILLIS_UTC;
- if (clrMillis > CLR_MILLIS_1582) {
- javaMillis += MILLIS_PER_TWO_DAYS;
- }
- return javaMillis;
- }
-
- internal static java.sql.Time ClrTicksToJavaTime(long ticks) {
- return new Time((ticks / TimeSpan.TicksPerMillisecond)
- - DEFAULT_TIME_ZONE.getRawOffset());
- }
-
- internal static java.sql.Date ClrTicksToJavaDate(long ticks) {
- java.sql.Date d = new java.sql.Date(0);
- ClrTicksToJavaDate(d, ticks);
- return d;
- }
-
- internal static java.sql.Timestamp ClrTicksToJavaTimestamp(long ticks)
- {
- java.sql.Timestamp ts = new java.sql.Timestamp(0);
- ClrTicksToJavaDate(ts, ticks);
-
-// int nanos = (int)(ticks % TimeSpan.TicksPerMillisecond) * 100;
-// ts.setNanos(javaTimestamp.getNanos() + nanos);
-
- return ts;
- }
-
- internal static void ClrTicksToJavaDate(java.util.Date d, long ticks) {
- long millis = ClrMillisToJavaMillis(ticks / TimeSpan.TicksPerMillisecond);
-
- d.setTime(millis);
- if (DEFAULT_TIME_ZONE.inDaylightTime(d)) {
- millis -= DEFAULT_TIME_ZONE.getDSTSavings();
- d.setTime(millis);
- }
- }
-
- internal static long JavaTimestampToClrTicks(java.sql.Timestamp ts)
- {
- long ticks = JavaDateToClrTicks(ts);
- // Extra ticks, for dbs that can save them.
- // We do not use it, since .net does not saves ticks for fractial milliseconds
- // long ticksLessThanMilliseconds = (ts.getNanos()*100) % TimeSpan.TicksPerMillisecond;
- // ticks += ticksLessThanMilliseconds;
-
- return ticks;
- }
-
- internal static long JavaDateToClrTicks(java.util.Date d) {
- long millis = JavaMillisToClrMillis(d.getTime());
- if (DEFAULT_TIME_ZONE.inDaylightTime(d)) {
- millis += DEFAULT_TIME_ZONE.getDSTSavings();
- }
- return millis * TimeSpan.TicksPerMillisecond;
- }
-
- internal static long JavaTimeToClrTicks(java.sql.Time t) {
- return (t.getTime() + DEFAULT_TIME_ZONE.getRawOffset())
- * TimeSpan.TicksPerMillisecond;
- }
-
- internal static Type JavaSqlTypeToClrType(int sqlTypeValue)
- {
- JavaSqlTypes sqlType = (JavaSqlTypes)sqlTypeValue;
-
- switch (sqlType) {
- case JavaSqlTypes.ARRAY : return typeof (java.sql.Array);
- case JavaSqlTypes.BIGINT : return DbTypes.TypeOfInt64;
- case JavaSqlTypes.BINARY : return DbTypes.TypeOfByteArray;
- case JavaSqlTypes.BIT : return DbTypes.TypeOfBoolean;
- case JavaSqlTypes.BLOB : return DbTypes.TypeOfByteArray;
- case JavaSqlTypes.BOOLEAN : return DbTypes.TypeOfBoolean;
- case JavaSqlTypes.CHAR : return DbTypes.TypeOfString;
- case JavaSqlTypes.CLOB : return DbTypes.TypeOfString;
-// case JavaSqlTypes.DATALINK :
- case JavaSqlTypes.DATE : return DbTypes.TypeOfDateTime;
- case JavaSqlTypes.DECIMAL : return DbTypes.TypeOfDecimal;
-// case JavaSqlTypes.DISTINCT :
- case JavaSqlTypes.DOUBLE : return DbTypes.TypeOfDouble;
- case JavaSqlTypes.FLOAT : return DbTypes.TypeOfDouble;
- case JavaSqlTypes.INTEGER : return DbTypes.TypeOfInt32;
-// case JavaSqlTypes.JAVA_OBJECT :
- case JavaSqlTypes.LONGVARBINARY : return DbTypes.TypeOfByteArray;
- case JavaSqlTypes.LONGVARCHAR : return DbTypes.TypeOfString;
- case JavaSqlTypes.NULL : return null;
- case JavaSqlTypes.NUMERIC : return DbTypes.TypeOfDecimal;
-// case JavaSqlTypes.OTHER :
- case JavaSqlTypes.REAL : return DbTypes.TypeOfSingle;
- case JavaSqlTypes.REF : return typeof (java.sql.Ref);
- case JavaSqlTypes.SMALLINT : return DbTypes.TypeOfInt16;
- case JavaSqlTypes.STRUCT : return typeof (java.sql.Struct);
- case JavaSqlTypes.TIME : return DbTypes.TypeOfTimespan;
- case JavaSqlTypes.TIMESTAMP : return DbTypes.TypeOfDateTime;
- case JavaSqlTypes.TINYINT : return DbTypes.TypeOfByte;
- case JavaSqlTypes.VARBINARY : return DbTypes.TypeOfByteArray;
- case JavaSqlTypes.VARCHAR : return DbTypes.TypeOfString;
- default : return DbTypes.TypeOfObject;
- }
-
- }
-
-
- internal static object JavaResultSetToClrWrapper(CallableStatement results,int columnIndex,JavaSqlTypes javaSqlType,int maxLength ,ResultSetMetaData resultsMetaData)
- {
- object returnValue = null;
- sbyte[] sbyteArray;
- long milliseconds;
- long ticks;
- string s;
- columnIndex++; //jdbc style
- switch (javaSqlType) {
- case JavaSqlTypes.ARRAY :
- returnValue = results.getArray(columnIndex);
- break;
- case JavaSqlTypes.BIGINT :
- returnValue = results.getLong(columnIndex);
- break;
- case JavaSqlTypes.BINARY :
- case JavaSqlTypes.VARBINARY :
- case JavaSqlTypes.LONGVARBINARY :
- // FIXME : comsider using maxLength
- sbyteArray = results.getBytes(columnIndex);
- if (sbyteArray != null) {
- returnValue = vmw.common.TypeUtils.ToByteArray(sbyteArray);
- }
- break;
- case JavaSqlTypes.BIT :
- returnValue = results.getBoolean(columnIndex);
- break;
- case JavaSqlTypes.BLOB :
- // FIXME : comsider using maxLength
- java.sql.Blob blob = results.getBlob(columnIndex);
- if (blob != null) {
- InputStream input = blob.getBinaryStream();
- if (input == null) {
- returnValue = new byte[0];
- }
- else {
- long length = blob.length();
- byte[] byteValue = new byte[length];
- sbyte[] sbyteValue = vmw.common.TypeUtils.ToSByteArray(byteValue);
- input.read(sbyteValue);
- returnValue = byteValue;
- }
- }
- break;
- case JavaSqlTypes.CHAR :
- if (resultsMetaData != null && "uniqueidentifier".Equals(resultsMetaData.getColumnTypeName(columnIndex))) {
- returnValue = new Guid(results.getString(columnIndex));
- }
- else {
- // Oracle Jdbc driver returns extra trailing 0 chars for NCHAR columns, so we threat this at parameter.Size level
- s = results.getString(columnIndex);
- if ((s != null) && (maxLength < s.Length)) {
- s = s.Substring(0,maxLength);
- }
- returnValue = s;
- }
- break;
- case JavaSqlTypes.CLOB :
- // FIXME : comsider using maxLength
- java.sql.Clob clob = results.getClob(columnIndex);
- if (clob != null) {
- java.io.Reader reader = clob.getCharacterStream();
- if (reader == null) {
- returnValue = String.Empty;
- }
- else {
- long length = clob.length();
- char[] charValue = new char[length];
- reader.read(charValue);
- returnValue = new string(charValue);
- }
- }
- break;
- case JavaSqlTypes.TIME :
- Time t = results.getTime(columnIndex);
- if (t != null) {
- returnValue = new TimeSpan(JavaTimeToClrTicks(t));
- }
- break;
- case JavaSqlTypes.DATE :
- Date d = results.getDate(columnIndex);
- if (d != null) {
- returnValue = new DateTime(JavaDateToClrTicks(d));
- }
- break;
- case JavaSqlTypes.TIMESTAMP :
- Timestamp ts = results.getTimestamp(columnIndex);
- if (ts != null) {
- returnValue = new DateTime(JavaTimestampToClrTicks(ts));
- }
- break;
- case JavaSqlTypes.DECIMAL :
- case JavaSqlTypes.NUMERIC :
- // java.sql.Types.NUMERIC (2), columnTypeName NUMBER, columnClassName java.math.BigDecimal
- // therefore we rely on scale
- if (resultsMetaData != null && resultsMetaData.getScale(columnIndex) == -127) {
- // Oracle db type FLOAT
- returnValue = results.getDouble(columnIndex);
- }
- else {
- java.math.BigDecimal bigDecimal = results.getBigDecimal(columnIndex);
- if (bigDecimal != null) {
- returnValue = vmw.common.PrimitiveTypeUtils.BigDecimalToDecimal(bigDecimal);
- }
- }
- break;
- case JavaSqlTypes.DISTINCT :
- returnValue = results.getObject(columnIndex);
- break;
- case JavaSqlTypes.DOUBLE :
- returnValue = results.getDouble(columnIndex);
- break;
- case JavaSqlTypes.FLOAT :
- //float f = results.getFloat(columnIndex);
- returnValue = results.getDouble(columnIndex);
- break;
- case JavaSqlTypes.INTEGER :
- returnValue = results.getInt(columnIndex);
- break;
- case JavaSqlTypes.JAVA_OBJECT :
- returnValue = results.getObject(columnIndex);
- break;
- case JavaSqlTypes.LONGVARCHAR :
- returnValue = results.getString(columnIndex);
- break;
- case JavaSqlTypes.NULL :
- returnValue = DBNull.Value;
- break;
- case JavaSqlTypes.OTHER :
- returnValue = results.getObject(columnIndex);
- break;
- case JavaSqlTypes.REAL :
- returnValue = results.getFloat(columnIndex);
- break;
- case JavaSqlTypes.REF :
- returnValue = results.getRef(columnIndex);
- break;
- case JavaSqlTypes.SMALLINT :
- returnValue = results.getShort(columnIndex);
- break;
- case JavaSqlTypes.STRUCT :
- returnValue = results.getObject(columnIndex);
- break;
- case JavaSqlTypes.TINYINT :
- returnValue = Convert.ToByte(results.getByte(columnIndex));
- break;
- case JavaSqlTypes.VARCHAR :
- s = results.getString(columnIndex);
- if ((s != null) && (maxLength < s.Length)) {
- s = s.Substring(0,maxLength);
- }
- returnValue = s;
- break;
- default :
- returnValue = results.getObject(columnIndex);
- break;
- }
-
- if (results.wasNull() || results == null) {
- return DBNull.Value;
- }
- return returnValue;
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs
deleted file mode 100644
index 45ee1b084c6..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/ParameterMetadataWrapper.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-// System.Data.ProviderBase.ParameterMetaDataWrapper
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-using java.sql;
-
-namespace System.Data.ProviderBase
-{
- public class ParameterMetadataWrapper : java.sql.ResultSetMetaData
- {
- #region Fields
-
- ParameterMetaData _parameterMetaData;
-
- #endregion // Fields
-
- #region Constructors
-
- public ParameterMetadataWrapper(ParameterMetaData parameterMetaData)
- {
- _parameterMetaData = parameterMetaData;
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public int getColumnCount() { throw new NotImplementedException(); }
-
- public int getColumnDisplaySize(int i) { throw new NotImplementedException(); }
-
- public int getColumnType(int i) { throw new NotImplementedException(); }
-
- public int getPrecision(int i) { throw new NotImplementedException(); }
-
- public int getScale(int i) { throw new NotImplementedException(); }
-
- public int isNullable(int i) { throw new NotImplementedException(); }
-
- public bool isAutoIncrement(int i) { throw new NotImplementedException(); }
-
- public bool isCaseSensitive(int i) { throw new NotImplementedException(); }
-
- public bool isCurrency(int i) { throw new NotImplementedException(); }
-
- public bool isDefinitelyWritable(int i) { throw new NotImplementedException(); }
-
- public bool isReadOnly(int i) { throw new NotImplementedException(); }
-
- public bool isSearchable(int i) { throw new NotImplementedException(); }
-
- public bool isSigned(int i) { throw new NotImplementedException(); }
-
- public bool isWritable(int i) { throw new NotImplementedException(); }
-
- public String getCatalogName(int i) { throw new NotImplementedException(); }
-
- public String getColumnClassName(int i) { throw new NotImplementedException(); }
-
- public String getColumnLabel(int i) { throw new NotImplementedException(); }
-
- public String getColumnName(int i) { throw new NotImplementedException(); }
-
- public String getColumnTypeName(int i) { return _parameterMetaData.getParameterTypeName(i); }
-
- public String getSchemaName(int i) { throw new NotImplementedException(); }
-
- public String getTableName(int i) { throw new NotImplementedException(); }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs b/mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs
deleted file mode 100644
index 7a9d1ff7d5f..00000000000
--- a/mcs/class/System.Data/System.Data.ProviderBase.jvm/ReaderCache.cs
+++ /dev/null
@@ -1,795 +0,0 @@
-//
-// System.Data.ProviderBase.ReaderCache.cs
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using java.sql;
-
-namespace System.Data.ProviderBase
-{
- public interface IReaderCacheContainer
- {
- void Fetch(ResultSet rs, int columnIndex, bool isSequential);
- bool IsNull();
- bool IsNumeric();
- object GetValue();
- }
-
- public abstract class ReaderCacheContainerBase : IReaderCacheContainer
- {
- #region Fields
-
- bool _isNull;
-
- #endregion // Fields
-
- #region Methods
-
- protected abstract void FetchInternal(ResultSet rs, int columnIndex);
- protected virtual void FetchInternal(ResultSet rs, int columnIndex, bool isSequential) {
- FetchInternal(rs, columnIndex);
- }
-
- public virtual bool IsNumeric() {
- return false;
- }
-
- public abstract object GetValue();
-
- public void Fetch(ResultSet rs, int columnIndex, bool isSequential)
- {
- FetchInternal(rs, columnIndex + 1, isSequential);
- _isNull = rs.wasNull();
- }
-
- public bool IsNull()
- {
- return _isNull;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class ArrayReaderCacheContainer : ReaderCacheContainerBase // Types.ARRAY
- {
- #region Fields
-
- object _a;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _a = rs.getArray(columnIndex).getArray();
- }
-
- public override object GetValue()
- {
- return _a;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class Int64ReaderCacheContainer : ReaderCacheContainerBase // Types.BIGINT
- {
- #region Fields
-
- long _l;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _l = rs.getLong(columnIndex);
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
-
- public override object GetValue()
- {
- return _l;
- }
-
- internal long GetInt64()
- {
- return _l;
- }
-
- #endregion // Methods
- }
-
-
- internal class BytesReaderCacheContainer : ReaderCacheContainerBase // Types.BINARY, Types.VARBINARY, Types.LONGVARBINARY
- {
- #region Fields
-
- protected byte[] _b;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- sbyte[] sbyteArray = rs.getBytes(columnIndex);
- if (sbyteArray != null) {
- _b = (byte[])vmw.common.TypeUtils.ToByteArray(sbyteArray);
- }
- }
-
- public override object GetValue()
- {
- return _b;
- }
-
- internal byte[] GetBytes()
- {
- return (byte[])GetValue();
- }
-
- internal virtual long GetBytes(
- long dataIndex,
- byte[] buffer,
- int bufferIndex,
- int length) {
- if (_b == null)
- return 0;
- if (buffer == null)
- return _b.LongLength;
- long actualLength = ((dataIndex + length) >= _b.LongLength) ? (_b.LongLength - dataIndex) : length;
- Array.Copy(_b,dataIndex,buffer,bufferIndex,actualLength);
- return actualLength;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class BooleanReaderCacheContainer : ReaderCacheContainerBase // Types.BIT
- {
- #region Fields
-
- bool _b;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _b = rs.getBoolean(columnIndex);
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
- public override object GetValue()
- {
- return _b;
- }
-
- internal bool GetBoolean()
- {
- return _b;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class BlobReaderCacheContainer : BytesReaderCacheContainer // Types.BLOB
- {
- #region Fields
-
- static readonly byte[] _emptyByteArr = new byte[0];
- java.sql.Blob _blob;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex) {
- throw new NotImplementedException("Should not be called");
- }
-
-
- protected override void FetchInternal(ResultSet rs, int columnIndex, bool isSequential)
- {
- _blob = rs.getBlob(columnIndex);
- if (!isSequential)
- ReadAll();
-
- }
-
- void ReadAll() {
- if (_blob != null) {
- long length = _blob.length();
- if (length == 0) {
- _b = _emptyByteArr;
- }
- else {
- java.io.InputStream input = _blob.getBinaryStream();
- byte[] byteValue = new byte[length];
- sbyte[] sbyteValue = vmw.common.TypeUtils.ToSByteArray(byteValue);
- input.read(sbyteValue);
- _b = byteValue;
- }
- }
- }
-
- public override object GetValue()
- {
- if (_b == null)
- ReadAll();
- return base.GetValue();
- }
-
- internal override long GetBytes(long dataIndex, byte[] buffer, int bufferIndex, int length) {
- if (_b != null)
- return base.GetBytes (dataIndex, buffer, bufferIndex, length);
-
- if (_blob == null)
- return 0;
-
- if (buffer == null)
- return _blob.length();
-
- java.io.InputStream input = _blob.getBinaryStream();
- input.skip(dataIndex);
- return input.read(vmw.common.TypeUtils.ToSByteArray(buffer), bufferIndex, length);
- }
-
-
- #endregion // Methods
- }
-
-
- internal abstract class CharsReaderCacheContainer : ReaderCacheContainerBase //
- {
- #region Fields
-
- #endregion // Fields
-
- #region Methods
-
- internal abstract long GetChars(
- long dataIndex,
- char[] buffer,
- int bufferIndex,
- int length);
-
- #endregion // Methods
- }
-
-
- internal sealed class GuidReaderCacheContainer : ReaderCacheContainerBase // Types.CHAR
- {
- #region Fields
-
- Guid _g;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- string s = rs.getString(columnIndex);
- if (s != null)
- _g = new Guid(s);
- }
-
- public override object GetValue()
- {
- return _g;
- }
-
- internal Guid GetGuid()
- {
- return _g;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class ClobReaderCacheContainer : StringReaderCacheContainer // Types.CLOB
- {
- #region Fields
-
- java.sql.Clob _clob;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex, bool isSequential)
- {
- _clob = rs.getClob(columnIndex);
- if (!isSequential)
- ReadAll();
-
- }
-
- void ReadAll() {
- if (_clob != null) {
- long length = _clob.length();
- if (length == 0) {
- _s = String.Empty;
- }
- else {
- java.io.Reader reader = _clob.getCharacterStream();
- char[] charValue = new char[length];
- reader.read(charValue);
- if (charValue != null)
- _s = new String(charValue);
- }
- }
- }
-
- public override object GetValue()
- {
- if (_s == null)
- ReadAll();
- return base.GetValue();
- }
-
- internal override long GetChars(long dataIndex, char[] buffer, int bufferIndex, int length) {
- if (_s != null)
- return base.GetChars (dataIndex, buffer, bufferIndex, length);
-
- if (_clob == null)
- return 0;
-
- if (buffer == null)
- return _clob.length();
-
- java.io.Reader reader = _clob.getCharacterStream();
- reader.skip(dataIndex);
- return reader.read(buffer, bufferIndex, length);
- }
-
-
- #endregion // Methods
- }
-
-
- internal sealed class TimeSpanReaderCacheContainer : ReaderCacheContainerBase // Types.TIME
- {
- #region Fields
-
- TimeSpan _t;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- Time t = rs.getTime(columnIndex);
- if (t != null) {
- _t = new TimeSpan(DbConvert.JavaTimeToClrTicks(t));
- }
- }
-
- public override object GetValue()
- {
- return _t;
- }
-
- internal TimeSpan GetTimeSpan()
- {
- return _t;
- }
-
- #endregion // Methods
- }
-
-
- internal class DateTimeReaderCacheContainer : ReaderCacheContainerBase // Types.TIMESTAMP
- {
- #region Fields
-
- protected DateTime _d;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- Date d = rs.getDate(columnIndex);
- if (d != null) {
- _d = new DateTime(DbConvert.JavaDateToClrTicks(d));
- }
- }
-
- public override object GetValue()
- {
- return _d;
- }
-
- internal DateTime GetDateTime()
- {
- return _d;
- }
-
- #endregion // Methods
- }
-
- internal sealed class TimestampReaderCacheContainer : DateTimeReaderCacheContainer // Types.DATE
- {
- protected override void FetchInternal(ResultSet rs, int columnIndex) {
- Timestamp ts = rs.getTimestamp(columnIndex);
- if (ts != null) {
- _d = new DateTime(DbConvert.JavaTimestampToClrTicks(ts));
- }
- }
- }
-
-
- internal sealed class DecimalReaderCacheContainer : ReaderCacheContainerBase // Types.DECIMAL, Types.NUMERIC
- {
- #region Fields
-
- decimal _d;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- java.math.BigDecimal bigDecimal = rs.getBigDecimal(columnIndex);
- if (bigDecimal != null) {
- _d = (decimal)vmw.common.PrimitiveTypeUtils.BigDecimalToDecimal(bigDecimal);
- }
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
- public override object GetValue()
- {
- return _d;
- }
-
- internal decimal GetDecimal()
- {
- return _d;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class DoubleReaderCacheContainer : ReaderCacheContainerBase // Types.DOUBLE, Types.Float, Types.NUMERIC for Oracle with scale = -127
- {
- #region Fields
-
- double _d;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _d = rs.getDouble(columnIndex);
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
- public override object GetValue()
- {
- return _d;
- }
-
- internal double GetDouble()
- {
- return _d;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class Int32ReaderCacheContainer : ReaderCacheContainerBase // Types.INTEGER
- {
- #region Fields
-
- int _i;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _i = rs.getInt(columnIndex);
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
- public override object GetValue()
- {
- return _i;
- }
-
- internal int GetInt32()
- {
- return _i;
- }
-
- #endregion // Methods
- }
-
-
- internal class StringReaderCacheContainer : CharsReaderCacheContainer // Types.LONGVARCHAR, Types.VARCHAR, Types.CHAR
- {
- #region Fields
-
- protected string _s;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _s = rs.getString(columnIndex);
- // Oracle Jdbc driver returns extra trailing 0 chars for NCHAR columns
-// if ((_s != null) && (_jdbcType == 1)) {
-// Console.WriteLine(_jdbcType);
-// int zeroIndex = ((string)_s).IndexOf((char)0);
-// if (zeroIndex > 0) {
-// Console.WriteLine("zero-padded");
-// _s = ((string)_s).Substring(0,zeroIndex);
-// }
-// else {
-// // Oracle sometimes pads with blanks (32)
-// int blankIndex = ((string)_s).IndexOf((char)32);
-// if (blankIndex > 0) {
-// Console.WriteLine("blank-padded");
-// _s = ((string)_s).Substring(0,blankIndex);
-// }
-// }
-// }
- }
-
- public override object GetValue()
- {
- return _s;
- }
-
- internal string GetString()
- {
- return _s;
- }
-
- internal override long GetChars(long dataIndex, char[] buffer, int bufferIndex, int length) {
- if (_s == null)
- return 0;
- if (buffer == null)
- return _s.Length;
- int actualLength = ((dataIndex + length) >= _s.Length) ? (_s.Length - (int)dataIndex) : length;
- _s.CopyTo((int)dataIndex, buffer, bufferIndex, actualLength);
- return actualLength;
- }
-
-
- #endregion // Methods
- }
-
-
- internal sealed class NullReaderCacheContainer : ReaderCacheContainerBase // Types.NULL
- {
- #region Fields
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- }
-
- public override object GetValue()
- {
- return DBNull.Value;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class FloatReaderCacheContainer : ReaderCacheContainerBase // Types.REAL
- {
- #region Fields
-
- float _f;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _f = rs.getFloat(columnIndex);
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
- public override object GetValue()
- {
- return _f;
- }
-
- internal float GetFloat()
- {
- return _f;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class RefReaderCacheContainer : ReaderCacheContainerBase // Types.REF
- {
- #region Fields
-
- java.sql.Ref _r;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _r = rs.getRef(columnIndex);
- }
-
- public override object GetValue()
- {
- return _r;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class Int16ReaderCacheContainer : ReaderCacheContainerBase // Types.SMALLINT
- {
- #region Fields
-
- short _s;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _s = rs.getShort(columnIndex);
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
- public override object GetValue()
- {
- return _s;
- }
-
- internal short GetInt16()
- {
- return _s;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class ByteReaderCacheContainer : ReaderCacheContainerBase // Types.TINYINT
- {
- #region Fields
-
- byte _b;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- _b = (byte)rs.getByte(columnIndex);
- }
-
- public override bool IsNumeric() {
- return true;
- }
-
- public override object GetValue()
- {
- return _b;
- }
-
- internal byte GetByte()
- {
- return _b;
- }
-
- #endregion // Methods
- }
-
-
- internal sealed class ObjectReaderCacheContainer : ReaderCacheContainerBase // Types.Distinct, Types.JAVA_OBJECT, Types.OTHER, Types.STRUCT
- {
- #region Fields
-
- object o;
-
- #endregion // Fields
-
- #region Methods
-
- protected override void FetchInternal(ResultSet rs, int columnIndex)
- {
- o = rs.getObject(columnIndex);
- }
-
- public override object GetValue()
- {
- return o;
- }
-
- #endregion // Methods
- }
-
-}
diff --git a/mcs/class/System.Data/System.Data.ProviderBase/DbCommandBase.cs b/mcs/class/System.Data/System.Data.ProviderBase/DbCommandBase.cs
index 4b34e1ae47a..14aac00fa43 100644
--- a/mcs/class/System.Data/System.Data.ProviderBase/DbCommandBase.cs
+++ b/mcs/class/System.Data/System.Data.ProviderBase/DbCommandBase.cs
@@ -32,7 +32,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.Data.Common;
diff --git a/mcs/class/System.Data/System.Data.ProviderBase/DbDataReaderBase.cs b/mcs/class/System.Data/System.Data.ProviderBase/DbDataReaderBase.cs
index a8e8d2079bf..ce413ac5c26 100644
--- a/mcs/class/System.Data/System.Data.ProviderBase/DbDataReaderBase.cs
+++ b/mcs/class/System.Data/System.Data.ProviderBase/DbDataReaderBase.cs
@@ -32,7 +32,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.Collections;
using System.Data.Common;
diff --git a/mcs/class/System.Data/System.Data.ProviderBase/DbParameterBase.cs b/mcs/class/System.Data/System.Data.ProviderBase/DbParameterBase.cs
index 9d5bb587666..1035df2bc46 100644
--- a/mcs/class/System.Data/System.Data.ProviderBase/DbParameterBase.cs
+++ b/mcs/class/System.Data/System.Data.ProviderBase/DbParameterBase.cs
@@ -32,7 +32,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.Data.Common;
diff --git a/mcs/class/System.Data/System.Data.ProviderBase/DbParameterCollectionBase.cs b/mcs/class/System.Data/System.Data.ProviderBase/DbParameterCollectionBase.cs
index ff3af6873e7..2eeef4d5c36 100644
--- a/mcs/class/System.Data/System.Data.ProviderBase/DbParameterCollectionBase.cs
+++ b/mcs/class/System.Data/System.Data.ProviderBase/DbParameterCollectionBase.cs
@@ -32,7 +32,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
using System.Collections;
using System.Data.Common;
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
deleted file mode 100644
index 4333ae8f3c5..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlCommand.cs
+++ /dev/null
@@ -1,284 +0,0 @@
-//
-// System.Data.SqlClient.SqlCommand
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Data;
-using System.Data.Common;
-using System.Data.ProviderBase;
-using System.Xml;
-
-using java.sql;
-
-namespace System.Data.SqlClient
-{
- public sealed class SqlCommand : AbstractDbCommand
- {
- #region Fields
-
- #endregion // Fields
-
- #region Constructors
-
- // Initializes a new instance of the SqlCommand class.
- // The base constructor initializes all fields to their default values.
- // The following table shows initial property values for an instance of SqlCommand.
- public SqlCommand() : this(null, null, null)
- {
- }
-
- public SqlCommand(SqlConnection connection) : this(null, connection, null)
- {
- }
-
- // Initializes a new instance of the SqlCommand class with the text of the query.
- public SqlCommand(String cmdText) : this(cmdText, null, null)
- {
- }
-
- // Initializes a new instance of the SqlCommand class with the text of the query and a SqlConnection.
- public SqlCommand(String cmdText, SqlConnection connection) : this(cmdText, connection, null)
- {
- }
-
- // Initializes a new instance of the SqlCommand class with the text of the query, a SqlConnection, and the Transaction.
- public SqlCommand(
- String cmdText,
- SqlConnection connection,
- SqlTransaction transaction)
- : base(cmdText, connection, transaction)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- protected override string InternalCommandText {
- get {
- string commandText = CommandText;
- if (CommandType != CommandType.StoredProcedure ||
- string.IsNullOrEmpty (commandText) ||
- commandText [0] == '[' ||
- commandText.IndexOf ('.') >= 0)
- return commandText;
-
- string trimmedCommandText = commandText.TrimEnd ();
- if (trimmedCommandText.Length > 0 && trimmedCommandText [trimmedCommandText.Length - 1] != ')')
- commandText = String.Concat ("[", commandText, "]");
-
- return commandText;
- }
- }
-
- public new SqlConnection Connection
- {
- get { return (SqlConnection)base.Connection; }
- set { base.Connection = value; }
- }
-
- public new SqlParameterCollection Parameters
- {
- get {
- return (SqlParameterCollection)base.Parameters;
- }
- }
-
- public new SqlTransaction Transaction
- {
- get { return (SqlTransaction)base.Transaction; }
- set { base.Transaction = value; }
- }
-
-#if USE_DOTNET_REGEX
- protected override Regex StoredProcedureRegExp
-#else
- protected override java.util.regex.Pattern StoredProcedureRegExp {
-#endif
- get { return SqlStatementsHelper.NamedParameterStoredProcedureRegExp; }
- }
-
- protected override SimpleRegex ParameterRegExp
- {
- get { return SqlStatementsHelper.NamedParameterRegExp; }
- }
-
- #endregion // Properties
-
- #region Methods
-
- public XmlReader ExecuteXmlReader() {
- return SqlXmlTextReader.Create(ExecuteReader(CommandBehavior.SequentialAccess));
- }
-
- public new SqlDataReader ExecuteReader()
- {
- return (SqlDataReader)ExecuteReader(CommandBehavior.Default);
- }
-
- public new SqlDataReader ExecuteReader(CommandBehavior behavior)
- {
- return (SqlDataReader)base.ExecuteReader(behavior);
- }
-
- public new SqlParameter CreateParameter()
- {
- return (SqlParameter)CreateParameterInternal();
- }
-
- protected sealed override void CheckParameters()
- {
- // do nothing
- }
-
- protected override AbstractDbParameter GetUserParameter(string parameterName, IList userParametersList, int userParametersListPosition/*,int userParametersListStart,int userParameterListCount*/)
- {
-// Match match = SqlStatementsHelper.NamedParameterRegExp.Match(parameterName);
-// parameterName = match.Result("${USERPARAM}");
-// if (parameterName.Length == 0)
-// return null;
-
- for(int i=0; i < userParametersList.Count; i++) {
- AbstractDbParameter userParameter = (AbstractDbParameter)userParametersList[i];
- if (String.Compare(parameterName, userParameter.Placeholder.Trim(), true, System.Globalization.CultureInfo.InvariantCulture) == 0) {
- return userParameter;
- }
- }
-
- return null;
- }
-
- protected override AbstractDbParameter GetReturnParameter (IList userParametersList)
- {
- for(int i=0; i < userParametersList.Count; i++) {
- AbstractDbParameter userParameter = (AbstractDbParameter)userParametersList[i];
- if (userParameter.Direction == ParameterDirection.ReturnValue) {
- return userParameter;
- }
- }
-
- return null;
- }
-
- protected sealed override DbParameter CreateParameterInternal()
- {
- return new SqlParameter();
- }
-
- protected sealed override DbDataReader CreateReader()
- {
- return new SqlDataReader(this);
- }
-
- protected sealed override DbParameterCollection CreateParameterCollection(AbstractDbCommand parent)
- {
- return new SqlParameterCollection((SqlCommand)parent);
- }
-
- protected internal sealed override SystemException CreateException(SQLException e)
- {
- return new SqlException(e, Connection);
- }
-
- #region Asynchronous behavior
-#if NET_2_0
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteReader ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteReader (CommandBehavior behavior)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteReader (AsyncCallback callback, Object stateObject)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteReader (AsyncCallback callback, Object stateObject, CommandBehavior behavior)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public SqlDataReader EndExecuteReader (IAsyncResult asyncResult)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteXmlReader ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteXmlReader (AsyncCallback callback, Object stateObject)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public XmlReader EndExecuteXmlReader (IAsyncResult asyncResult)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteNonQuery ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public IAsyncResult BeginExecuteNonQuery (AsyncCallback callback, Object stateObject)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Asynchronous behavior not implemented")]
- public int EndExecuteNonQuery (IAsyncResult asyncResult)
- {
- throw new NotImplementedException ();
- }
-#endif
- #endregion
- #endregion // Methods
- }
-}
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs
deleted file mode 100644
index bf556bb0cd9..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConnection.cs
+++ /dev/null
@@ -1,234 +0,0 @@
-//
-// System.Data.SqlClient.SqlConnection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Data;
-using System.Data.Common;
-using System.Collections;
-using System.Data.ProviderBase;
-
-using java.sql;
-
-using System.Configuration;
-using Mainsoft.Data.Configuration;
-using Mainsoft.Data.Jdbc.Providers;
-
-namespace System.Data.SqlClient
-{
- public class SqlConnection : AbstractDBConnection
- {
- #region Fields
-
- private const int DEFAULT_PACKET_SIZE = 8192;
-
- #endregion // Fields
-
- #region Constructors
-
- public SqlConnection() : this(null)
- {
- }
-
- public SqlConnection(String connectionString) : base(connectionString)
- {
- }
-
- #endregion // Constructors
-
- #region Events
-
- [DataCategory ("InfoMessage")]
- [DataSysDescription ("Event triggered when messages arrive from the DataSource.")]
- public event SqlInfoMessageEventHandler InfoMessage;
-
- #endregion // Events
-
- #region Properties
-
- public string WorkstationId
- {
- get { return (string)ConnectionStringBuilder["workstation id"]; }
- }
-
- public int PacketSize
- {
- get {
- string packetSize = (string)ConnectionStringBuilder["Packet Size"];
- if (packetSize == null || packetSize.Length == 0) {
- return DEFAULT_PACKET_SIZE;
- }
- try {
- return Convert.ToInt32(packetSize);
- }
- catch(FormatException e) {
- throw ExceptionHelper.InvalidValueForKey("packet size");
- }
- catch (OverflowException e) {
- throw ExceptionHelper.InvalidValueForKey("packet size");
- }
- }
- }
-
- protected override IConnectionProvider GetConnectionProvider() {
- IDictionary conProviderDict = ConnectionStringDictionary.Parse(ConnectionString);
- string provider = (string)conProviderDict["Provider"];
- if (provider == null)
- provider = "SQLCLIENT";
-
- return GetConnectionProvider("Mainsoft.Data.Configuration/SqlClientProviders", provider);
- }
-
- #endregion // Properties
-
- #region Methods
-
- protected override DbTransaction BeginDbTransaction(IsolationLevel isolationLevel) {
- return BeginTransaction(isolationLevel);
- }
-
- public SqlTransaction BeginTransaction(String transactionName)
- {
- return BeginTransaction(IsolationLevel.ReadCommitted,transactionName);
- }
-
- public new SqlTransaction BeginTransaction(IsolationLevel isolationLevel)
- {
- return BeginTransaction(isolationLevel,"Transaction");
- }
-
- public new SqlTransaction BeginTransaction()
- {
- return BeginTransaction(IsolationLevel.ReadCommitted);
- }
-
- public SqlTransaction BeginTransaction(IsolationLevel isolationLevel, string transactionName)
- {
- return new SqlTransaction(isolationLevel, this, transactionName);
- }
-
- public new SqlCommand CreateCommand()
- {
- return new SqlCommand(this);
- }
-
- protected override DbCommand CreateDbCommand() {
- return CreateCommand();
- }
-
- protected internal sealed override void OnSqlWarning(SQLWarning warning)
- {
- SqlErrorCollection col = new SqlErrorCollection(warning, this);
- OnSqlInfoMessage(new SqlInfoMessageEventArgs(col));
- }
-
- protected sealed override SystemException CreateException(SQLException e)
- {
- return new SqlException(e, this);
- }
-
- protected sealed override SystemException CreateException(string message)
- {
- return new SqlException(message, null, this);
- }
-
- private void OnSqlInfoMessage (SqlInfoMessageEventArgs value)
- {
- if (InfoMessage != null) {
- InfoMessage (this, value);
- }
- }
-
-#if NET_2_0
-
- [MonoNotSupported("")]
- public static void ChangePassword (string connectionString, string newPassword)
- {
- throw new NotImplementedException ();
-
- // FIXME: refactored from Mono implementation. Not finished!!!
- if (connectionString == null || newPassword == null || newPassword == String.Empty)
- throw new ArgumentNullException ();
- if (newPassword.Length > 128)
- throw new ArgumentException ("The value of newPassword exceeds its permittable length which is 128");
-
- SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder (connectionString);
- if (builder.IntegratedSecurity) {
- throw new ArgumentException ("Can't use integrated security when changing password");
- }
-
- using (SqlConnection conn = new SqlConnection (connectionString)) {
- conn.Open ();
- SqlCommand cmd = conn.CreateCommand ();
- cmd.CommandText = "sp_password";
- cmd.CommandType = CommandType.StoredProcedure;
- // FIXME: Need to extract old password and user from our structures
- // of the connectionString.
- cmd.Parameters.Add (builder.Password); // Is this good???
- cmd.Parameters.Add (newPassword);
- cmd.Parameters.Add (builder.UserID); // Is this good???
- cmd.ExecuteNonQuery();
- }
- }
-
- #region Pooling
-
- [MonoNotSupported("Pooling not supported")]
- public static void ClearPool (SqlConnection connection)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Pooling not supported")]
- public static void ClearAllPools ()
- {
- throw new NotImplementedException ();
- }
-
- #endregion
- #region Statistics
-
- [MonoNotSupported ("Statistics not supported")]
- public IDictionary RetrieveStatistics ()
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("Statistics not supported")]
- public void ResetStatistics ()
- {
- throw new NotImplementedException ();
- }
-
- #endregion
-#endif
- #endregion // Methods
-
- }
-}
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConvert.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConvert.cs
deleted file mode 100644
index 17d9db29caf..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlConvert.cs
+++ /dev/null
@@ -1,243 +0,0 @@
-//
-// System.Data.SqlClient.SqlConvert
-//
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Data.Common;
-using System.Data.ProviderBase;
-
-using java.sql;
-
-namespace System.Data.SqlClient
-{
- internal sealed class SqlConvert : DbConvert
- {
- #region Methods
-
- internal static String JdbcTypeNameToDbTypeName(string jdbcTypeName)
- {
- return jdbcTypeName.Trim();
- }
-
- internal static SqlDbType JdbcTypeToSqlDbType(int jdbcType)
- {
- // FIXME : other java.sql.Type
- // Types.ARRAY
- if(Types.BIGINT == jdbcType) return SqlDbType.BigInt;
- if(Types.BINARY == jdbcType) return SqlDbType.Binary;
- if(Types.BIT == jdbcType) return SqlDbType.Bit;
- if(Types.BLOB == jdbcType) return SqlDbType.Binary;
- // Types.BOOLEAN
- if(Types.CHAR == jdbcType) return SqlDbType.Char;
- if(Types.CLOB == jdbcType) return SqlDbType.Binary;
- if(Types.DATE == jdbcType) return SqlDbType.DateTime;
- if(Types.DECIMAL == jdbcType) return SqlDbType.Decimal;
- // Types.DISTINCT
- if(Types.DOUBLE == jdbcType) return SqlDbType.Float;
- if(Types.FLOAT == jdbcType) return SqlDbType.Float;
- if(Types.INTEGER == jdbcType) return SqlDbType.Int;
- // Types.JAVA_OBJECT
- if(Types.LONGVARBINARY == jdbcType) return SqlDbType.Image;
- if(Types.LONGVARCHAR == jdbcType) return SqlDbType.Text;
- // Types.NULL
- if(Types.NUMERIC == jdbcType) return SqlDbType.Decimal;
- if(Types.REAL == jdbcType) return SqlDbType.Real;
- // Types.REF
- if(Types.SMALLINT == jdbcType) return SqlDbType.SmallInt;
- // Types.STRUCT
- if(Types.TIME == jdbcType) return SqlDbType.DateTime;
- if(Types.TIMESTAMP == jdbcType) return SqlDbType.DateTime;
- if(Types.TINYINT == jdbcType) return SqlDbType.TinyInt;
- if(Types.VARBINARY == jdbcType) return SqlDbType.VarBinary;
- if(Types.VARCHAR == jdbcType) return SqlDbType.NVarChar;
- return SqlDbType.Variant;
- }
-
- internal static SqlDbType ValueTypeToSqlDbType(Type type)
- {
- switch (Type.GetTypeCode(type)) {
- case TypeCode.Boolean: return SqlDbType.Bit;
- case TypeCode.Byte: return SqlDbType.TinyInt;
- case TypeCode.Char: return SqlDbType.Char;
- case TypeCode.DateTime: return SqlDbType.DateTime;
- case TypeCode.DBNull: return SqlDbType.Variant;
- case TypeCode.Decimal: return SqlDbType.Decimal;
- case TypeCode.Double: return SqlDbType.Float;
- case TypeCode.Empty: return SqlDbType.Variant;
- case TypeCode.Int16: return SqlDbType.SmallInt;
- case TypeCode.Int32: return SqlDbType.Int;
- case TypeCode.Int64: return SqlDbType.BigInt;
- default:
- case TypeCode.Object: {
- if (type.Equals(DbTypes.TypeOfByteArray)) return SqlDbType.VarBinary;
- //if (type.Equals(DbTypes.TypeOfTimespan)) return OleDbType.DBTime;
- if (type.Equals(DbTypes.TypeOfGuid)) return SqlDbType.UniqueIdentifier;
-
- if (type.IsEnum)
- return ValueTypeToSqlDbType (Enum.GetUnderlyingType (type));
-
- return SqlDbType.Variant;
- }
- case TypeCode.SByte: return SqlDbType.TinyInt;
- case TypeCode.Single: return SqlDbType.Float;
- case TypeCode.String: return SqlDbType.NVarChar;
- case TypeCode.UInt16: return SqlDbType.SmallInt;
- case TypeCode.UInt32: return SqlDbType.Int;
- case TypeCode.UInt64: return SqlDbType.BigInt;
- }
- }
-
- internal static Type SqlDbTypeToValueType(SqlDbType sqlDbType)
- {
- switch (sqlDbType) {
- case SqlDbType.BigInt : return typeof(long);
- case SqlDbType.Binary : return typeof(byte[]);
- case SqlDbType.Bit : return typeof(bool);
- case SqlDbType.Char : return typeof(string);
- case SqlDbType.DateTime : return typeof(DateTime);
- case SqlDbType.Decimal : return typeof(decimal);
- case SqlDbType.Float : return typeof(double);
- case SqlDbType.Image : return typeof(byte[]);
- case SqlDbType.Int : return typeof(int);
- case SqlDbType.Money : return typeof(decimal);
- case SqlDbType.NChar : return typeof(string);
- case SqlDbType.NText : return typeof(string);
- case SqlDbType.NVarChar : return typeof(string);
- case SqlDbType.Real : return typeof(Single);
- case SqlDbType.UniqueIdentifier : return typeof(Guid);
- case SqlDbType.SmallDateTime : return typeof(DateTime);
- case SqlDbType.SmallInt : return typeof(Int16);
- case SqlDbType.SmallMoney : return typeof(decimal);
- case SqlDbType.Text : return typeof(string);
- case SqlDbType.Timestamp : return typeof(byte[]);
- case SqlDbType.TinyInt : return typeof(byte);
- case SqlDbType.VarBinary : return typeof(byte[]);
- case SqlDbType.VarChar : return typeof(string);
- case SqlDbType.Variant : return typeof(object);
- default : throw ExceptionHelper.InvalidSqlDbType((int)sqlDbType);
- }
- }
-
- internal static SqlDbType DbTypeToSqlDbType(DbType dbType)
- {
- switch (dbType) {
- case DbType.AnsiString : return SqlDbType.VarChar;
- case DbType.Binary : return SqlDbType.VarBinary;
- case DbType.Byte : return SqlDbType.TinyInt;
- case DbType.Boolean : return SqlDbType.Bit;
- case DbType.Currency : return SqlDbType.Money;
- case DbType.Date : return SqlDbType.DateTime;
- case DbType.DateTime : return SqlDbType.DateTime;
- case DbType.Decimal : return SqlDbType.Decimal;
- case DbType.Double : return SqlDbType.Float;
- case DbType.Guid : return SqlDbType.UniqueIdentifier;
- case DbType.Int16 : return SqlDbType.SmallInt;
- case DbType.Int32 : return SqlDbType.Int;
- case DbType.Int64 : return SqlDbType.BigInt;
- case DbType.Object : return SqlDbType.Variant;
- case DbType.SByte : throw ExceptionHelper.UnknownDataType(dbType.ToString(),"SqlDbType");
- case DbType.Single : return SqlDbType.Real;
- case DbType.String : return SqlDbType.NVarChar;
- case DbType.UInt16 : throw ExceptionHelper.UnknownDataType(dbType.ToString(),"SqlDbType");
- case DbType.UInt32 : throw ExceptionHelper.UnknownDataType(dbType.ToString(),"SqlDbType");
- case DbType.UInt64 : throw ExceptionHelper.UnknownDataType(dbType.ToString(),"SqlDbType");
- case DbType.VarNumeric : throw ExceptionHelper.UnknownDataType(dbType.ToString(),"SqlDbType");
- case DbType.AnsiStringFixedLength : return SqlDbType.Char;
- case DbType.StringFixedLength : return SqlDbType.NChar;
- default : throw ExceptionHelper.InvalidDbType((int)dbType);
- }
- }
-
- internal static DbType SqlDbTypeToDbType(SqlDbType sqlDbType)
- {
- switch (sqlDbType) {
- case SqlDbType.BigInt : return DbType.Int64;
- case SqlDbType.Binary : return DbType.Binary;
- case SqlDbType.Bit : return DbType.Boolean;
- case SqlDbType.Char : return DbType.AnsiStringFixedLength;
- case SqlDbType.DateTime : return DbType.DateTime;
- case SqlDbType.Decimal : return DbType.Decimal;
- case SqlDbType.Float : return DbType.Double;
- case SqlDbType.Image : return DbType.Binary;
- case SqlDbType.Int : return DbType.Int32;
- case SqlDbType.Money : return DbType.Currency;
- case SqlDbType.NChar : return DbType.StringFixedLength;
- case SqlDbType.NText : return DbType.String;
- case SqlDbType.NVarChar : return DbType.String;
- case SqlDbType.Real : return DbType.Single;
- case SqlDbType.UniqueIdentifier : return DbType.Guid;
- case SqlDbType.SmallDateTime : return DbType.DateTime;
- case SqlDbType.SmallInt : return DbType.Int16;
- case SqlDbType.SmallMoney : return DbType.Currency;
- case SqlDbType.Text : return DbType.AnsiString;
- case SqlDbType.Timestamp : return DbType.Binary;
- case SqlDbType.TinyInt : return DbType.Byte;
- case SqlDbType.VarBinary : return DbType.Binary;
- case SqlDbType.VarChar : return DbType.AnsiString;
- case SqlDbType.Variant : return DbType.Object;
- default : throw ExceptionHelper.InvalidSqlDbType((int)sqlDbType);
- }
- }
-
- internal static int SqlDbTypeToJdbcType(SqlDbType sqlDbType)
- {
- switch(sqlDbType) {
- case SqlDbType.BigInt : return Types.BIGINT;
- case SqlDbType.Binary : return Types.BINARY;
- case SqlDbType.Bit : return Types.BIT;
- case SqlDbType.Char : return Types.CHAR;
- case SqlDbType.DateTime : return Types.TIMESTAMP;
- case SqlDbType.Decimal : return Types.DECIMAL;
- case SqlDbType.Float : return Types.FLOAT;
- case SqlDbType.Image : return Types.LONGVARBINARY;
- case SqlDbType.Int : return Types.INTEGER;
- case SqlDbType.Money : return Types.DECIMAL;
- case SqlDbType.NChar : return Types.CHAR;
- case SqlDbType.NText : return Types.LONGVARCHAR;
- case SqlDbType.NVarChar : return Types.VARCHAR;
- case SqlDbType.Real : return Types.REAL;
- case SqlDbType.UniqueIdentifier : return Types.CHAR;
- case SqlDbType.SmallDateTime : return Types.DATE;
- case SqlDbType.SmallInt : return Types.SMALLINT;
- case SqlDbType.SmallMoney : return Types.DECIMAL;
- case SqlDbType.Text : return Types.LONGVARCHAR;
- case SqlDbType.Timestamp : return Types.TIMESTAMP;
- case SqlDbType.TinyInt : return Types.TINYINT;
- case SqlDbType.VarBinary : return Types.VARBINARY;
- case SqlDbType.VarChar : return Types.VARCHAR;
- case SqlDbType.Variant : return Types.VARCHAR; // note : ms jdbc driver recognize this sqlserver as varchar
- default : throw ExceptionHelper.InvalidSqlDbType((int)sqlDbType);
- }
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlDataReader.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlDataReader.cs
deleted file mode 100644
index 83dedecd0c4..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlDataReader.cs
+++ /dev/null
@@ -1,335 +0,0 @@
-//
-// System.Data.SqlClient.SqlDataReader
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Data.SqlTypes;
-using System.Data.ProviderBase;
-
-using java.sql;
-
-namespace System.Data.SqlClient
-{
- public class SqlDataReader : AbstractDataReader
- {
-
- #region Constructors
-
- internal SqlDataReader(SqlCommand command) : base(command)
- {
- }
-
- #endregion // Constructors
-
- #region Properties
-
- #endregion // Properties
-
- #region Methods
-
- protected sealed override SystemException CreateException(string message, SQLException e)
- {
- return new SqlException(message, e, (SqlConnection)_command.Connection);
- }
-
- protected sealed override SystemException CreateException(java.io.IOException e)
- {
- return new SqlException(e, (SqlConnection)_command.Connection);
- }
-
- public override String GetDataTypeName(int columnIndex)
- {
- try {
- string jdbcTypeName = Results.getMetaData().getColumnTypeName(columnIndex + 1);
-
- return SqlConvert.JdbcTypeNameToDbTypeName(jdbcTypeName);
- }
- catch (SQLException e) {
- throw CreateException(e);
- }
- }
-
- protected override int GetProviderType(int jdbcType)
- {
- return (int)SqlConvert.JdbcTypeToSqlDbType(jdbcType);
- }
-
- // Gets the value of the specified column as a SqlBinary.
- public SqlBinary GetSqlBinary(int columnIndex)
- {
- byte[] bytes = GetBytes(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlBinary.Null;
- }
- else {
- return new SqlBinary(bytes);
- }
- }
-
- // Gets the value of the specified column as a SqlBoolean.
- public SqlBoolean GetSqlBoolean(int columnIndex)
- {
- bool boolean = GetBoolean(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlBoolean.Null;
- }
- else {
- return new SqlBoolean(boolean);
- }
- }
-
- // Gets the value of the specified column as a SqlByte.
- public SqlByte GetSqlByte(int columnIndex)
- {
- byte byt = GetByte(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlByte.Null;
- }
- else {
- return new SqlByte(byt);
- }
- }
-
-#if NET_2_0
-
- public virtual SqlBytes GetSqlBytes (int columnIndex)
- {
- byte [] bytes = GetBytes (columnIndex);
- if (IsDBNull (columnIndex)) {
- return SqlBytes.Null;
- }
- else {
- return new SqlBytes (bytes);
- }
- }
-
- public virtual SqlChars GetSqlChars (int columnIndex)
- {
- SqlString sqlStr = GetSqlString (columnIndex);
- if (sqlStr.IsNull) {
- return SqlChars.Null;
- }
- else {
- return new SqlChars (sqlStr);
- }
- }
-
- [MonoNotSupported("SqlXml is not fully implemented")]
- public virtual SqlXml GetSqlXml (int columnIndex)
- {
- throw new NotImplementedException ();
- }
-
-#endif
-
- // Gets the value of the specified column as a SqlDecimal.
- public SqlDecimal GetSqlDecimal(int columnIndex)
- {
- decimal dec = GetDecimal(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlDecimal.Null;
- }
- else {
- return new SqlDecimal(dec);
- }
- }
-
- // Gets the value of the specified column as a SqlDateTime.
- public SqlDateTime GetSqlDateTime(int columnIndex)
- {
- DateTime dateTime = GetDateTime(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlDateTime.Null;
- }
- else {
- return new SqlDateTime(dateTime);
- }
- }
-
- // Gets the value of the specified column as a SqlDouble.
- public SqlDouble GetSqlDouble(int columnIndex)
- {
- double doubl = GetDouble(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlDouble.Null;
- }
- else {
- return new SqlDouble(doubl);
- }
- }
-
- // Gets the value of the specified column as a SqlInt16.
- public SqlInt16 GetSqlInt16(int columnIndex)
- {
- short s = GetInt16(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlInt16.Null;
- }
- else {
- return new SqlInt16(s);
- }
- }
-
- // Gets the value of the specified column as a SqlInt32.
- public SqlInt32 GetSqlInt32(int columnIndex)
- {
- int i = GetInt32(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlInt32.Null;
- }
- else {
- return new SqlInt32(i);
- }
- }
-
- // Gets the value of the specified column as a SqlInt64.
- public SqlInt64 GetSqlInt64(int columnIndex)
- {
- long l = GetInt64(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlInt64.Null;
- }
- else {
- return new SqlInt64(l);
- }
- }
-
- // Gets the value of the specified column as a SqlMoney.
- public SqlMoney GetSqlMoney(int columnIndex)
- {
- decimal dec = GetDecimal(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlMoney.Null;
- }
- else {
- return new SqlMoney(dec);
- }
- }
-
- // Gets the value of the specified column as a SqlSingle.
- public SqlSingle GetSqlSingle(int columnIndex)
- {
- float f = GetFloat(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlSingle.Null;
- }
- else {
- return new SqlSingle(f);
- }
- }
-
- // Gets the value of the specified column as a SqlString.
- public SqlString GetSqlString(int columnIndex)
- {
- string str = GetString(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlString.Null;
- }
- else {
- return new SqlString(str);
- }
- }
-
- // Gets the value of the specified column as a SqlGuid.
- public SqlGuid GetSqlGuid(int columnIndex)
- {
- object obj = GetValue(columnIndex);
- if(IsDBNull(columnIndex)) {
- return SqlGuid.Null;
- }
- else {
- if (obj is byte[]) {
- return new SqlGuid((byte[])obj);
- }
- else {
- return new SqlGuid((string)obj);
- }
- }
- }
-
- // Gets all the attribute columns in the current row.
- public int GetSqlValues(Object[] values)
- {
- int columnCount = FieldCount;
- int i = 0;
- for (; i < values.Length && i < columnCount; i++) {
- values[i] = GetSqlValue(i);
- }
- return i;
- }
-
- // Gets an Object that is a representation of the underlying SqlDbType Variant.
- public Object GetSqlValue(int columnIndex)
- {
- try {
- int jdbcType = ResultsMetaData.getColumnType(columnIndex + 1);
- SqlDbType sqlDbType = SqlConvert.JdbcTypeToSqlDbType(jdbcType);
-
- switch (sqlDbType) {
- case SqlDbType.BigInt : return GetSqlInt64(columnIndex);
- case SqlDbType.Binary : return GetSqlBinary(columnIndex);
- case SqlDbType.Bit : return GetSqlBoolean(columnIndex);
- case SqlDbType.Char : return GetSqlString(columnIndex);
- case SqlDbType.DateTime : return GetSqlDateTime(columnIndex);
- case SqlDbType.Decimal : return GetSqlDecimal(columnIndex);
- case SqlDbType.Float : return GetSqlDouble(columnIndex);
- case SqlDbType.Image : return GetSqlBinary(columnIndex);
- case SqlDbType.Int : return GetSqlInt32(columnIndex);
- case SqlDbType.Money : return GetSqlDecimal(columnIndex);
- case SqlDbType.NChar : return GetSqlString(columnIndex);
- case SqlDbType.NText : return GetSqlString(columnIndex);
- case SqlDbType.NVarChar : return GetSqlString(columnIndex);
- case SqlDbType.Real : return GetSqlSingle(columnIndex);
- case SqlDbType.UniqueIdentifier : return GetSqlGuid(columnIndex);
- case SqlDbType.SmallDateTime : return GetSqlDateTime(columnIndex);
- case SqlDbType.SmallInt : return GetSqlInt16(columnIndex);
- case SqlDbType.SmallMoney : return GetSqlDecimal(columnIndex);
- case SqlDbType.Text : return GetSqlString(columnIndex);
- case SqlDbType.Timestamp : return GetSqlDateTime(columnIndex);
- case SqlDbType.TinyInt : return GetSqlByte(columnIndex);
- case SqlDbType.VarBinary : return GetSqlBinary(columnIndex);
- case SqlDbType.VarChar : return GetSqlString(columnIndex);
- case SqlDbType.Variant : return GetValue(columnIndex);
- default : return GetValue(columnIndex);
- }
- }
- catch (SQLException exp) {
- throw new Exception(exp.Message);
- }
- }
-
-#if NET_2_0
- protected bool IsCommandBehavior (CommandBehavior condition)
- {
- return (_command.Behavior & condition) == condition;
- }
-#endif
- #endregion // Methods
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlError.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlError.cs
deleted file mode 100644
index 7099ebca0dd..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlError.cs
+++ /dev/null
@@ -1,173 +0,0 @@
-//
-// System.Data.SqlClient.SqlError
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Data.SqlClient
-{
- using System.Data.ProviderBase;
- using java.sql;
- using System.Data.Common;
-
- /**
- * Collects information relevant to a warning or error returned by SQL Server.
- */
-
- [Serializable]
- public class SqlError : AbstractDbError
- {
- string _serverVersion;
- /**
- * Initialize SqlError object
- * */
- internal SqlError(SQLException e, AbstractDBConnection connection) : base(e, connection)
- {
- if (connection != null)
- _serverVersion = connection.ServerVersion;
- }
-
- /**
- * Overridden. Gets the complete text of the error message.
- *
- * @return A string representation of the current object.
- */
- public override String ToString()
- {
- return String.Concat("SqlError:", Message, _e.StackTrace);
- }
-
- /**
- * Gets the name of the provider that generated the error.
- *
- * @return The name of the provider
- */
- public String Source
- {
- get
- {
- return DbSource;
- }
- }
-
- /**
- * Gets a number that identifies the type of error.
- *
- * @return Number of the error
- */
- public int Number
- {
- get
- {
- return DbErrorCode;
- }
- }
-
- /**
- * Gets a numeric error code from SQL Server that represents an error,
- * warning or "no data found" message. For more information on how to
- * decode these values, see SQL Server Books Online.
- *
- * @return Error Code
- */
- public byte State
- {
- get
- {
- return 0; // & BitConstants.ALL_BYTE;
- }
- }
-
- /**
- * Gets the severity level of the error returned from SQL Server.
- *
- * @return Severity level of the error
- */
- public byte Class
- {
- get
- {
- return 0; // & BitConstants.ALL_BYTE;
- }
- }
-
- /**
- * Gets the name of the instance of SQL Server that generated the error.
- *
- * @return The name of the server
- */
- public String Server
- {
- get
- {
- return _serverVersion;
- }
- }
-
- /**
- * Gets the text describing the error.
- *
- * @return The text describing the error
- */
- public String Message
- {
- get
- {
- return DbMessage;
- }
- }
-
- /**
- * Gets the name of the stored procedure or remote procedure call (RPC)
- * that generated the error.
- *
- * @return The name of stored procedure that generated the error.
- */
- public String Procedure
- {
- get
- {
- return null;
- }
- }
-
- /**
- * Bets the line number within the Transact-SQL command batch or stored
- * procedure that contains the error.
- *
- * @return Line number of error in stored procedure
- */
- public int LineNumber
- {
- get
- {
- return 0;
- }
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlErrorCollection.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlErrorCollection.cs
deleted file mode 100644
index 68c5651f070..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlErrorCollection.cs
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-// System.Data.SqlClient.SqlErrorCollection
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Data.SqlClient
-{
-
- /**
- * Collects all errors generated by the SQL .NET Data Provider.
- */
-
- using System.Collections;
- using System.Data.Common;
- using System.Data.ProviderBase;
- using java.sql;
-
-
- [Serializable]
- public class SqlErrorCollection : AbstractDbErrorCollection
- {
- internal SqlErrorCollection(SQLException e, AbstractDBConnection connection) : base(e, connection) {}
- /**
- * Gets the error at the specified index.
- *
- * @param index of the error
- * @return Error on specified index
- */
- public SqlError this[int index]
- {
- get
- {
- return (SqlError)GetDbItem(index);
- }
- }
-
-#if NET_2_0
- public void CopyTo (SqlError [] array, int index)
- {
- base.CopyTo (array, index);
- }
-
-#endif
-
- protected override AbstractDbError CreateDbError(java.sql.SQLException e, AbstractDBConnection connection) {
- return new SqlError(e, connection);
- }
-
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlException.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlException.cs
deleted file mode 100644
index a197c3fd926..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlException.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-//
-// System.Data.SqlClient.SqlException
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Data.SqlClient
-{
-
- using java.sql;
-
- using System;
- using System.Data.ProviderBase;
-
- /**
- * The exception that is thrown when SQL Server returns a warning or error.
- * This class cannot be inherited.
- */
-
- /*
- * CURRENT LIMITATIONS
- * 1. Constructor for serialization SqlException(SerializationInfo info, StreamingContext sc)
- * is not supported.
- * 2. Method "void GetObjectData(...,...)" is not supported (serialization)
- */
-
- public sealed class SqlException : AbstractDbException
- {
- internal SqlException(Exception cause, SqlConnection connection) : base(cause, connection) {}
-
- internal SqlException(SQLException cause, SqlConnection connection) : base(cause, connection) {}
-
- internal SqlException(string message, SQLException cause, SqlConnection connection) : base(message, cause, connection) {}
-
- protected override AbstractDbErrorCollection DbErrors {
- get {
- return Errors;
- }
- }
-
-
-
- /**
- * Gets the severity level of the error returned from the SQL Server .NET
- * Data Provider.
- * @return severity level of the first error in the collection.
- */
- public byte Class
- {
- get
- {
- SqlErrorCollection errors = Errors;
- return errors.Count > 0 ? errors[0].Class : (byte)0;
- }
- }
-
- /**
- * Gets a collection of one or more SqlError objects that give detailed
- * information about exceptions generated by the SQL Server .NET Data Provider.
- * @return collection of SqlError objects
- */
- public SqlErrorCollection Errors
- {
- get
- {
- return new SqlErrorCollection(_cause, _connection);
- }
- }
-
- /**
- * Gets the line number within the Transact-SQL command batch or stored
- * procedure that generated the error.
- * @return line number of the first error in the collection.
- */
- public int LineNumber
- {
- get
- {
- SqlErrorCollection errors = Errors;
- return errors.Count > 0 ? errors[0].LineNumber : 0;
- }
- }
-
- /**
- * Gets a number that identifies the type of error.
- * @return number that identifies the type of first error in the collection
- */
- public int Number
- {
- get
- {
- SqlErrorCollection errors = Errors;
- return errors.Count > 0 ? errors[0].Number : 0;
- }
- }
-
- /**
- * Gets the name of the stored procedure or remote procedure call (RPC)
- * that generated the error.
- * @return name of the stored procedure
- */
- public String Procedure
- {
- get
- {
- SqlErrorCollection errors = Errors;
- return errors.Count > 0 ? errors[0].Procedure : null;
- }
- }
-
- /**
- * Gets the name of the computer running an instance of SQL Server
- * that generated the error.
- * @return name of the computer where error generated
- */
- public String Server
- {
- get
- {
- SqlErrorCollection errors = Errors;
- return errors.Count > 0 ? errors[0].Server : null;
- }
- }
-
-
- /**
- * Gets a numeric error code from SQL Server that represents an error,
- * warning or "no data found" message.
- * @return numeric error code from SQL Server
- */
- public byte State
- {
- get
- {
- SqlErrorCollection errors = Errors;
- return errors.Count > 0 ? errors[0].State : (byte)0;
- }
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlParameter.cs b/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlParameter.cs
deleted file mode 100644
index 9315e7d4c89..00000000000
--- a/mcs/class/System.Data/System.Data.SqlClient.jvm/SqlParameter.cs
+++ /dev/null
@@ -1,270 +0,0 @@
-//
-// System.Data.SqlClient.SqlParameter
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-using System.Data;
-using System.Data.ProviderBase;
-using System.Data.Common;
-
-using java.sql;
-
-namespace System.Data.SqlClient
-{
- public sealed class SqlParameter : AbstractDbParameter
- {
- #region Fields
-
- private SqlDbType _sqlDbType;
-
- #endregion // Fields
-
- #region Constructors
-
- public SqlParameter()
- {
- }
-
- public SqlParameter(String parameterName, Object value)
- : this(parameterName, SqlDbType.NVarChar, 0, ParameterDirection.Input, false, 0, 0, String.Empty, DataRowVersion.Current, value,false)
- {
- }
-
- public SqlParameter(String parameterName, SqlDbType dbType)
- : this(parameterName, dbType, 0, ParameterDirection.Input, false, 0, 0, String.Empty, DataRowVersion.Current, null, true)
- {
- }
-
-
- public SqlParameter(String parameterName, SqlDbType dbType, int size)
- : this(parameterName, dbType, size, ParameterDirection.Input, false, 0, 0, String.Empty, DataRowVersion.Current, null, true)
- {
- }
-
-
- public SqlParameter(String parameterName, SqlDbType dbType, int size, String sourceColumn)
- : this(parameterName, dbType, size, ParameterDirection.Input, false, 0, 0, sourceColumn, DataRowVersion.Current, null, true)
- {
- }
-
-
- public SqlParameter(
- String parameterName,
- SqlDbType dbType,
- int size,
- ParameterDirection direction,
- bool isNullable,
- byte precision,
- byte scale,
- String sourceColumn,
- DataRowVersion sourceVersion,
- Object value) : this(parameterName,dbType,size,direction,isNullable,precision,scale,sourceColumn,sourceVersion,value,true)
- {
- }
-
-#if NET_2_0
- public SqlParameter (
- string parameterName,
- SqlDbType dbType,
- int size,
- ParameterDirection direction,
- byte precision,
- byte scale,
- string sourceColumn,
- DataRowVersion sourceVersion,
- bool sourceColumnNullMapping,
- Object value,
- string xmlSchemaCollectionDatabase,
- string xmlSchemaCollectionOwningSchema,
- string xmlSchemaCollectionName
- ) : this (parameterName, dbType, size, direction, sourceColumnNullMapping, precision, scale, sourceColumn, sourceVersion, value, true)
- {
- }
-#endif
-
- SqlParameter(
- String parameterName,
- SqlDbType dbType,
- int size,
- ParameterDirection direction,
- bool isNullable,
- byte precision,
- byte scale,
- String sourceColumn,
- DataRowVersion sourceVersion,
- Object value,
- bool dbTypeExplicit)
- {
- ParameterName = parameterName;
- SqlDbType = dbType;
- Size = size;
- Direction = direction;
- IsNullable = isNullable;
- Precision = precision;
- Scale = scale;
- SourceColumn = sourceColumn;
- SourceVersion = sourceVersion;
- if (!dbTypeExplicit) {
- IsDbTypeSet = false;
- }
- Value = value;
- }
-
- #endregion // Constructors
-
- #region Properties
-
- public override DbType DbType
- {
- get { return SqlConvert.SqlDbTypeToDbType(_sqlDbType); }
- set { SqlDbType = SqlConvert.DbTypeToSqlDbType(value); }
- }
-
- public SqlDbType SqlDbType
- {
- get { return _sqlDbType; }
- set {
- _sqlDbType = value;
- IsDbTypeSet = true;
- }
- }
-
- public override int Size
- {
- get {
- int retVal = base.Size;
- return retVal;
- }
- set {
- if (value < 0) {
- throw ExceptionHelper.InvalidSizeValue(value);
- }
-
- if (value != 0) {
- base.Size = value;
- }
- else {
- base.Size = -1;
- }
- }
- }
-
-#if NET_2_0
- public new byte Precision
- {
- get { return base.Precision; }
- set { base.Precision = value; }
- }
-
- public new byte Scale
- {
- get { return base.Scale; }
- set { base.Scale = value; }
- }
-#endif
-
- protected internal override string Placeholder {
- get {
- if (ParameterName.Length == 0 || ParameterName[0] == '@')
- return ParameterName;
-
- return String.Concat("@", ParameterName);
- }
- }
-
-
- public override Object Value
- {
- get { return base.Value; }
- set {
- if (!IsDbTypeSet && (value != null) && (value != DBNull.Value)) {
- _sqlDbType = SqlConvert.ValueTypeToSqlDbType(value.GetType());
- }
- base.Value = value;
- }
- }
-
- #endregion // Properties
-
- #region Methods
-
- protected internal sealed override object ConvertValue(object value)
- {
- // can not convert null or DbNull to other types
- if (value == null || value == DBNull.Value) {
- return value;
- }
- // .NET throws an exception to the user.
- object convertedValue = value is IConvertible ? Convert.ChangeType(value,SqlConvert.SqlDbTypeToValueType(SqlDbType)) : value;
- return convertedValue;
- }
-
- protected internal sealed override void SetParameterName(ResultSet res)
- {
- string name = res.getString("COLUMN_NAME");
- if (name != null && name.Length > 0 && name[0] != '@')
- name = String.Concat("@", name);
- ParameterName = name;
- }
-
- protected internal sealed override void SetParameterDbType(ResultSet res)
- {
- int dataType = res.getInt("DATA_TYPE");
- SqlDbType = SqlConvert.JdbcTypeToSqlDbType(dataType);
- JdbcType = dataType;
- }
-
-#if NET_2_0
- public void ResetSqlDbType ()
- {
- IsDbTypeSet = false;
- }
-
- public override void ResetDbType ()
- {
- ResetSqlDbType ();
- }
-#endif
-
- protected internal sealed override void SetSpecialFeatures (ResultSet res)
- {
- // do nothing
- }
-
- protected internal sealed override int JdbcTypeFromProviderType()
- {
- return SqlConvert.SqlDbTypeToJdbcType(SqlDbType);
- }
-
- #endregion // Methods
-
- }
-}
diff --git a/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlDecimal.cs b/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlDecimal.cs
deleted file mode 100644
index aeae5ea3c34..00000000000
--- a/mcs/class/System.Data/System.Data.SqlTypes.jvm/SqlDecimal.cs
+++ /dev/null
@@ -1,897 +0,0 @@
-// System.Data.SqlTypes.SqlDecimal
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-// Boris Kirzner <borisk@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Data.SqlTypes
-{
-
- /**
- * <p>Title: </p>
- * <p>Description: </p>
- * <p>Copyright: Copyright (c) 2002</p>
- * <p>Company: MainSoft</p>
- * @author Pavel Sandler
- * @version 1.0
- */
-
- using System;
-
- using java.math;
-
- /*
- * CURRENT LIMITATIONS:
- * 1. public byte[] Data not implemented.
- * 2. public byte[] BinData not implemented.
- * 3. Precision value is ignored.
- * 4. public SqlDecimal AdjustScale(SqlDecimal n, int position) not implemented.
- * 5. public SqlDecimal ConvertToPrecScale(SqlDecimal n, int precision, int scale) not implemented.
- */
-
-
- public struct SqlDecimal : INullable
- {
-
- private Decimal _value;
- private bool _isNull;
-
- public static readonly SqlDecimal MaxValue = new SqlDecimal(Decimal.MaxValue);
- public static readonly SqlDecimal MinValue = new SqlDecimal(Decimal.MinValue);
- public static readonly int MaxPrecision = 38;
- public static readonly int MaxScale = MaxPrecision;
- public static readonly SqlDecimal Null = new SqlDecimal(true);
-
- private int _precision;
- private int _scale;
-
-
- private SqlDecimal(bool isNull)
- {
- _value = Decimal.Zero;
- _isNull = isNull;
- _precision = 38;
- _scale = 0;
- }
- /**
- * Initializes a new instance of the SqlDecimal instance using the supplied Decimal value.
- * @param value The Decimal value to be stored as a SqlDecimal instance.
- */
- public SqlDecimal(Decimal value)
- {
- _value = value;
- _isNull = false;
- int[] bits = Decimal.GetBits(value);
- int i = bits[3] & 0xff0000;
- _scale = i >> 16;
- _precision = 38;
- }
-
- /**
- * Initializes a new instance of the SqlDecimal instance using the supplied double value.
- * @param value The double value to be stored as a SqlDecimal instance.
- */
- public SqlDecimal(double value)
- {
- _value = new Decimal(value);
- _isNull = false;
- int[] bits = Decimal.GetBits(_value);
- int i = bits[3] & 0xff0000;
- _scale = i >> 16;
- _precision = 38;
- }
-
- /**
- * Initializes a new instance of the SqlDecimal instance using the supplied int value.
- * @param value The int value to be stored as a SqlDecimal instance.
- */
- public SqlDecimal(int value)
- {
- _value = new Decimal(value);
- _isNull = false;
- int[] bits = Decimal.GetBits(_value);
- int i = bits[3] & 0xff0000;
- _scale = i >> 16;
- _precision = 38;
- }
-
- /**
- * Initializes a new instance of the SqlDecimal instance using the supplied long value.
- * @param value The long value to be stored as a SqlDecimal instance.
- */
- public SqlDecimal(long value)
- {
- _value = new Decimal(value);
- _isNull = false;
- int[] bits = Decimal.GetBits(_value);
- int i = bits[3] & 0xff0000;
- _scale = i >> 16;
- _precision = 38;
- }
-
-
- /**
- * Indicates whether or not Value is null.
- * @return true if Value is null, otherwise false.
- */
- public bool IsNull
- {
- get
- {
- return _isNull;
- }
- }
-
- /**
- * Gets the value of the SqlDecimal instance.
- * @return the value of this instance
- */
- public Decimal Value
- {
- get
- {
- if(IsNull)
- throw new SqlNullValueException();
- return _value;
- }
- }
-
- public byte[] BinData
- {
- get
- {
- /** @todo implement this method */
- throw new NotImplementedException();
- }
- }
-
- public byte[] Data
- {
- get
- {
- /** @todo implement this method */
- throw new NotImplementedException();
- }
- }
-
- /**
- * Indicates whether or not the Value of this SqlDecimal instance is greater than zero.
- * @return true if the Value is assigned to null, otherwise false.
- */
- public bool IsPositive
- {
- get
- {
- if (!IsNull)
- {
- if (_value >= 0)
- return true;
-
- return false;
- }
-
- throw new SqlNullValueException("The value of this instance is null");
- }
- }
-
- /**
- * Gets the maximum number of digits used to represent the Value property.
- * @return The maximum number of digits used to represent the Value of this SqlDecimal instance.
- */
- public int Precision
- {
- get
- {
- return _precision;
- }
- }
-
- /**
- * Gets the number of decimal places to which Value is resolved.
- * @return The number of decimal places to which the Value property is resolved.
- */
- public int Scale
- {
- get
- {
- return _precision;
- }
- }
-
- /**
- * The Abs member function gets the absolute value of the SqlDecimal parameter.
- * @param n A SqlDecimal instance.
- * @return A SqlDecimal instance whose Value property contains the unsigned number representing the absolute value of the SqlDecimal parameter.
- */
- public static SqlDecimal Abs(SqlDecimal n)
- {
- if (n.IsNull)
- return new SqlDecimal();
-
- Decimal val;
-
- if (n.IsPositive)
- val = n.Value;
- else
- val = Decimal.Negate(n._value);
-
- return new SqlDecimal(val);
-
- }
-
- /**
- * Calcuates the sum of the two SqlDecimal operators.
- * @param x A SqlDecimal instance.
- * @param y A SqlDecimal instance.
- * @return A new SqlDecimal instance whose Value property contains the sum.
- * If one of the parameters or their value is null return SqlDecimal.Null.
- */
- public static SqlDecimal Add(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlDecimal.Null;
-
- Decimal res = Decimal.Add(x._value, y._value);
-
- return new SqlDecimal(res);
- }
-
- public static SqlDecimal AdjustScale(SqlDecimal n, int digits, bool fround)
- {
- /** @todo find out what the logic */
- throw new NotImplementedException();
- }
-
- /**
- * Returns the smallest whole number greater than or equal to the specified SqlDecimal instance.
- * @param n The SqlDecimal instance for which the ceiling value is to be calculated.
- * @return A SqlDecimal representing the smallest whole number greater than or equal to the specified SqlDecimal instance.
- */
- public static SqlDecimal Ceiling(SqlDecimal n)
- {
- if (n.IsNull)
- return SqlDecimal.Null;
-
- double d = Math.Ceiling((double)n._value);
- return new SqlDecimal(d);
- }
-
- /**
- * Compares this instance to the supplied object and returns an indication of their relative values.
- * @param obj The object to compare.
- * @return A signed number indicating the relative values of the instance and the object.
- * Less than zero This instance is less than object.
- * Zero This instance is the same as object.
- * Greater than zero This instance is greater than object -or-
- * object is a null reference.
- */
- public int CompareTo(Object obj)
- {
- if (obj == null)
- return 1;
-
- if (obj is SqlDecimal)
- {
- SqlDecimal value = (SqlDecimal)obj;
-
- if (IsNull)
- return -1;
-
- if (value.IsNull)
- return 1;
-
- if (_value == value._value)
- return 0;
-
- return Decimal.Compare(_value, value._value);
- }
-
- throw new ArgumentException("parameter obj is not SqlDecimal : " + obj.GetType().Name);
-
-
- }
-
-
- public SqlDecimal ConvertToPrecScale(SqlDecimal n, int precision, int scale)
- {
- /** @todo find out what the logic */
- throw new NotImplementedException();
- }
-
- /**
- * The division operator divides the first SqlDecimal operand by the second.
- * @param x A SqlDecimal instance.
- * @param y A SqlDecimal instance.
- * @return A SqlDecimal instance containing the results of the division operation.
- * If one of the parameters is null or null value - return SqlDouble.Null.
- */
- public static SqlDecimal Divide(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlDecimal.Null;
-
- Decimal res = Decimal.Divide(x._value, y._value);
-
- return new SqlDecimal(res);
- }
-
- public override bool Equals(Object obj)
- {
- if (obj == null)
- return false;
-
- if (obj is SqlDecimal)
- {
- SqlDecimal dec = (SqlDecimal)obj;
-
- return Decimal.Equals(_value, dec._value);
- }
-
- return false;
- }
-
-
- /**
- * Performs a logical comparison on two instances of SqlDecimal to determine if they are equal.
- * @param x A SqlDecimal instance.
- * @param y A SqlDecimal instance.
- * @return true if the two values are equal, otherwise false.
- * If one of the parameters is null or null value return SqlBoolean.Null.
- */
- public static SqlBoolean Equals(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- if (x.Equals(y))
- return SqlBoolean.True;
-
- return SqlBoolean.False;
- }
-
- /**
- * Rounds a specified SqlDecimal number to the next lower whole number.
- * @param n The SqlDecimal instance for which the floor value is to be calculated.
- * @return A SqlDecimal instance containing the whole number portion of this SqlDecimal instance.
- */
- public static SqlDecimal Floor(SqlDecimal n)
- {
- Decimal res = Decimal.Floor(n._value);
-
- return new SqlDecimal(res);
- }
-
- /**
- * Compares two instances of SqlDecimal to determine if the first is greater than the second.
- * @param x A SqlDecimal instance
- * @param y A SqlDecimal instance
- * @return A SqlBoolean that is True if the first instance is greater than the second instance, otherwise False.
- * If either instance of SqlDouble is null, the Value of the SqlBoolean will be Null.
- */
- public static SqlBoolean GreaterThan(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- if (x.CompareTo(y) > 0)
- return SqlBoolean.True;
-
- return SqlBoolean.False;
- }
-
- /**
- * Compares two instances of SqlDecimal to determine if the first is greater than or equal to the second.
- * @param x A SqlDecimal instance
- * @param y A SqlDecimal instance
- * @return A SqlBoolean that is True if the first instance is greaater than or equal to the second instance, otherwise False.
- * If either instance of SqlDouble is null, the Value of the SqlBoolean will be Null.
- */
- public static SqlBoolean GreaterThanOrEqual(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- if (x.CompareTo(y) >= 0)
- return SqlBoolean.True;
-
- return SqlBoolean.False;
- }
-
- /**
- * Compares two instances of SqlDecimal to determine if the first is less than the second.
- * @param x A SqlDecimal instance
- * @param y A SqlDecimal instance
- * @return A SqlBoolean that is True if the first instance is less than the second instance, otherwise False.
- * If either instance of SqlDouble is null, the Value of the SqlBoolean will be Null.
- */
- public static SqlBoolean LessThan(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- if (x.CompareTo(y) < 0)
- return SqlBoolean.True;
-
- return SqlBoolean.False;
- }
-
- /**
- * Compares two instances of SqlDecimal to determine if the first is less than the second.
- * @param x A SqlDecimal instance
- * @param y A SqlDecimal instance
- * @return A SqlBoolean that is True if the first instance is less than the second instance, otherwise False.
- * If either instance of SqlDouble is null, the Value of the SqlBoolean will be Null.
- */
- public static SqlBoolean LessThanOrEqual(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- if (x.CompareTo(y) <= 0)
- return SqlBoolean.True;
-
- return SqlBoolean.False;
- }
-
- /**
- * The multiplication operator computes the product of the two SqlDecimal operands.
- * @param x A SqlDecimal instance
- * @param y A SqlDecimal instance
- * @return The product of the two SqlDecimal operands.
- */
- public static SqlDecimal Multiply(SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlDecimal.Null;
-
- Decimal res = Decimal.Multiply(x._value, y._value);
-
- return new SqlDecimal(res);
- }
-
- /**
- * Compares two instances of SqlDecimal to determine if they are equal.
- * @param x A SqlDecimal instance
- * @param y A SqlDecimal instance
- * @return A SqlBoolean that is True if the two instances are not equal or False if the two instances are equal.
- * If either instance of SqlDouble is null, the Value of the SqlBoolean will be Null.
- */
- public static SqlBoolean NotEquals(SqlDecimal x, SqlDecimal y)
- {
- SqlBoolean eVal = Equals(x, y);
-
- if (eVal.IsNull)
- return eVal;
- if (eVal.IsTrue)
- return SqlBoolean.False;
-
- return SqlBoolean.True;
- }
-
- /**
- * Converts the String representation of a number to its Decimal number equivalent.
- * @param s The String to be parsed.
- * @return A SqlDecimal containing the value represented by the String.
- */
- public static SqlDecimal Parse(String s)
- {
- Decimal val = Decimal.Parse(s);
- SqlDecimal retVal = new SqlDecimal(val);
-
- if (GreaterThan(retVal, MaxValue).IsTrue || LessThan(retVal, MinValue).IsTrue)
- throw new OverflowException("The parse of this string is overflowing : " + val);
-
- return retVal;
-
- }
-
- /**
- * Raises the value of the specified SqlDecimal instance to the specified exponential power.
- * @param n The SqlDecimal instance to be raised to a power.
- * @param exponent A double value indicating the power to which the number should be raised.
- * @return A SqlDecimal instance containing the results.
- */
- public static SqlDecimal Power(SqlDecimal n, double exponent)
- {
- /** @todo decide if we treat the Decimal as a double and use Math.pow() */
-
- double d = (double)n._value;
-
- d = java.lang.Math.pow(d, exponent);
-
- return new SqlDecimal(d);
- }
-
- /**
- * Gets the number nearest the specified SqlDecimal instance's value with the specified precision.
- * @param n The SqlDecimal instance to be rounded.
- * @param position The number of significant fractional digits (precision) in the return value.
- * @return A SqlDecimal instance containing the results of the rounding operation.
- */
- public static SqlDecimal Round(SqlDecimal n, int position)
- {
- Decimal val = Decimal.Round(n._value, position);
-
- return new SqlDecimal(val);
- }
-
- /**
- * Gets a value indicating the sign of a SqlDecimal instance's Value property.
- * @param n The SqlDecimal instance whose sign is to be evaluated.
- * @return A number indicating the sign of the SqlDecimal instance.
- */
- public static int Sign(SqlDecimal n)
- {
- if (n._value < 0)
- return -1;
- if(n._value > 0)
- return 1;
- return 0;
- }
-
- /**
- * The subtraction operator the second SqlDecimal operand from the first.
- * @param x A SqlDecimal instance
- * @param y A SqlDecimal instance
- * @return The results of the subtraction operation.
- */
- public static SqlDecimal Subtract(SqlDecimal x, SqlDecimal y)
- {
- Decimal val = Decimal.Subtract(x._value, y._value);
- SqlDecimal retVal = new SqlDecimal(val);
-
- return retVal;
-
- }
-
- /**
- * Returns the a double equal to the contents of the Value property of this instance.
- * @return The decimal representation of the Value property.
- */
- public double ToDouble()
- {
- return Decimal.ToDouble(_value);
- }
-
- /**
- * Converts this SqlDecimal instance to SqlBoolean.
- * @return A SqlBoolean instance whose Value will be True if the SqlDecimal instance's Value is non-zero,
- * False if the SqlDecimal is zero
- * and Null if the SqlDecimal instance is Null.
- */
- public SqlBoolean ToSqlBoolean()
- {
- if (IsNull)
- return SqlBoolean.Null;
-
- return new SqlBoolean(!_value.Equals(Decimal.Zero));
- }
-
- /**
- * Converts this SqlDecimal instance to SqlByte.
- * @return A SqlByte instance whose Value equals the Value of this SqlDouble instance.
- */
- public SqlByte ToSqlByte()
- {
- if (IsNull)
- return SqlByte.Null;
-
- return new SqlByte(checked((byte)_value));
- }
-
- /**
- * Converts this SqlDecimal instance to SqlDouble.
- * @return A SqlDouble instance whose Value equals the Value of this SqlDecimal instance.
- */
- public SqlDouble ToSqlDouble()
- {
- if (IsNull)
- return SqlDouble.Null;
-
- return new SqlDouble((double)_value);
- }
-
- /**
- * Converts this SqlDouble structure to SqlInt16.
- * @return A SqlInt16 structure whose Value equals the Value of this SqlDouble structure.
- */
- public SqlInt16 ToSqlInt16()
- {
- if (IsNull)
- return SqlInt16.Null;
-
- return new SqlInt16(checked((short)_value));
- }
-
- /**
- * Converts this SqlDouble structure to SqlInt32.
- * @return A SqlInt32 structure whose Value equals the Value of this SqlDouble structure.
- */
- public SqlInt32 ToSqlInt32()
- {
- if (IsNull)
- return SqlInt32.Null;
-
- return new SqlInt32(checked((int)_value));
- }
-
- /**
- * Converts this SqlDecimal structure to SqlInt64.
- * @return A SqlInt64 structure whose Value equals the Value of this SqlDecimal structure.
- */
- public SqlInt64 ToSqlInt64()
- {
- if (IsNull)
- return SqlInt64.Null;
-
- return new SqlInt64(checked((long)_value));
- }
-
- /**
- * Converts this SqlDecimal instance to SqlDouble.
- * @return A SqlMoney instance whose Value equals the Value of this SqlDecimal instance.
- */
- public SqlMoney ToSqlMoney()
- {
- if (IsNull)
- return SqlMoney.Null;
-
- return new SqlMoney(_value);
- }
-
- /**
- * Converts this SqlDecimal instance to SqlSingle.
- * @return A SqlSingle instance whose Value equals the Value of this SqlDecimal instance.
- */
- public SqlSingle ToSqlSingle()
- {
- if (IsNull)
- return SqlSingle.Null;
-
- return new SqlSingle(checked((float)_value));
- }
-
- /**
- * Converts this SqlDecimal structure to SqlString.
- * @return A SqlString structure whose value is a string representing the date and time contained in this SqlDecimal structure.
- */
- public SqlString ToSqlString()
- {
- return new SqlString(ToString());
- }
-
-
- public override String ToString()
- {
- if (IsNull)
- return "null";
-
- return _value.ToString();
- }
-
- /**
- * Truncates the specified SqlDecimal instance's value to the desired position.
- * @param n The SqlDecimal instance to be truncated.
- * @param position The decimal position to which the number will be truncated.
- * @return Supply a negative value for the position parameter in order to truncate the value to the corresponding positon to the left of the decimal point.
- */
- public static SqlDecimal Truncate(SqlDecimal n, int position)
- {
- if (n.IsNull)
- return n;
-
- Decimal tmp = Decimal.Round(n._value, position);
-
- return new SqlDecimal(tmp);
- }
-
- public override int GetHashCode()
- {
- return _value.GetHashCode();
- }
-
- public static SqlDecimal operator + (SqlDecimal x, SqlDecimal y)
- {
- if(x.IsNull || y.IsNull)
- return SqlDecimal.Null;
-
- return new SqlDecimal(x.Value + y.Value);
- }
-
- public static SqlDecimal operator / (SqlDecimal x, SqlDecimal y)
- {
- if(x.IsNull || y.IsNull)
- return SqlDecimal.Null;
- return new SqlDecimal (x.Value / y.Value);
- }
-
- public static SqlBoolean operator == (SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- return new SqlBoolean(x.Value == y.Value);
- }
-
- public static SqlBoolean operator > (SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- return new SqlBoolean(x.Value > y.Value);
- }
-
- public static SqlBoolean operator >= (SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- return new SqlBoolean(x.Value >= y.Value);
- }
-
- public static SqlBoolean operator != (SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- return new SqlBoolean(x.Value != y.Value);
- }
-
- public static SqlBoolean operator < (SqlDecimal x, SqlDecimal y)
- {
-
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- return new SqlBoolean(x.Value < y.Value);
-
- }
-
- public static SqlBoolean operator <= (SqlDecimal x, SqlDecimal y)
- {
- if (x.IsNull || y.IsNull)
- return SqlBoolean.Null;
-
- return new SqlBoolean(x.Value <= y.Value);
- }
-
- public static SqlDecimal operator * (SqlDecimal x, SqlDecimal y)
- {
- // adjust the scale to the smaller of the two beforehand
- if (x.Scale > y.Scale)
- x = SqlDecimal.AdjustScale(x, y.Scale - x.Scale, true);
- else if (y.Scale > x.Scale)
- y = SqlDecimal.AdjustScale(y, x.Scale - y.Scale, true);
-
- return new SqlDecimal(x.Value * y.Value);
- }
-
- public static SqlDecimal operator - (SqlDecimal x, SqlDecimal y)
- {
- if(x.IsNull || y.IsNull)
- return SqlDecimal.Null;
-
- return new SqlDecimal(x.Value - y.Value);
- }
-
- public static SqlDecimal operator - (SqlDecimal n)
- {
- if(n.IsNull)
- return n;
- return new SqlDecimal (Decimal.Negate(n.Value));
- }
-
- public static explicit operator SqlDecimal (SqlBoolean x)
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.ByteValue);
- }
-
- public static explicit operator Decimal (SqlDecimal n)
- {
- return n.Value;
- }
-
- public static explicit operator SqlDecimal (SqlDouble x)
- {
- checked
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.Value);
- }
- }
-
- public static explicit operator SqlDecimal (SqlSingle x)
- {
- checked
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.Value);
- }
- }
-
- public static explicit operator SqlDecimal (SqlString x)
- {
- checked
- {
- return Parse (x.Value);
- }
- }
-
- public static implicit operator SqlDecimal (decimal x)
- {
- return new SqlDecimal (x);
- }
-
- public static implicit operator SqlDecimal (SqlByte x)
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.Value);
- }
-
- public static implicit operator SqlDecimal (SqlInt16 x)
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.Value);
- }
-
- public static implicit operator SqlDecimal (SqlInt32 x)
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.Value);
- }
-
- public static implicit operator SqlDecimal (SqlInt64 x)
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.Value);
- }
-
- public static implicit operator SqlDecimal (SqlMoney x)
- {
- if (x.IsNull)
- return Null;
- else
- return new SqlDecimal ((decimal)x.Value);
- }
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs b/mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs
index 82669cd5c76..2b70404d4d0 100644
--- a/mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs
+++ b/mcs/class/System.Data/System.Data.SqlTypes/SqlDecimal.cs
@@ -31,9 +31,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if !TARGET_JVM
using Mono.Data.Tds.Protocol;
-#endif
using System;
using System.Xml;
using System.Text;
@@ -348,7 +346,6 @@ namespace System.Data.SqlTypes
return AdjustScale (n, -(n.Scale), false);
}
-#if !TARGET_JVM
internal static SqlDecimal FromTdsBigDecimal (TdsBigDecimal x)
{
if (x == null)
@@ -356,7 +353,6 @@ namespace System.Data.SqlTypes
else
return new SqlDecimal (x.Precision, x.Scale, !x.IsNegative, x.Data);
}
-#endif
public override int GetHashCode ()
{
diff --git a/mcs/class/System.Data/System.Data/ConflictOption.cs b/mcs/class/System.Data/System.Data/ConflictOption.cs
index 471fde51e61..749dbbc7b81 100644
--- a/mcs/class/System.Data/System.Data/ConflictOption.cs
+++ b/mcs/class/System.Data/System.Data/ConflictOption.cs
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data {
public enum ConflictOption
diff --git a/mcs/class/System.Data/System.Data/ConflictOptions.cs b/mcs/class/System.Data/System.Data/ConflictOptions.cs
index 54a422df3c6..93cfbce35c8 100644
--- a/mcs/class/System.Data/System.Data/ConflictOptions.cs
+++ b/mcs/class/System.Data/System.Data/ConflictOptions.cs
@@ -30,7 +30,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data {
public enum ConflictOptions
diff --git a/mcs/class/System.Data/System.Data/DataColumn.cs b/mcs/class/System.Data/System.Data/DataColumn.cs
index 166be8d8f48..7e7cedae6f2 100644
--- a/mcs/class/System.Data/System.Data/DataColumn.cs
+++ b/mcs/class/System.Data/System.Data/DataColumn.cs
@@ -474,7 +474,7 @@ namespace System.Data {
public string Expression {
get { return _expression; }
set {
- if (value == null)
+ if (value == null || value.Trim () == string.Empty)
value = String.Empty;
CompileExpression (value);
diff --git a/mcs/class/System.Data/System.Data/DataRow.cs b/mcs/class/System.Data/System.Data/DataRow.cs
index 6b6299f41a8..2d0df625f37 100644
--- a/mcs/class/System.Data/System.Data/DataRow.cs
+++ b/mcs/class/System.Data/System.Data/DataRow.cs
@@ -96,6 +96,7 @@ namespace System.Data {
{
_table = table;
_rowId = rowId;
+ rowError = String.Empty;
}
#endregion // Constructors
@@ -117,11 +118,11 @@ namespace System.Data {
/// </summary>
public bool HasErrors {
get {
- if (RowError != string.Empty)
+ if (!string.IsNullOrEmpty (RowError))
return true;
foreach (String columnError in ColumnErrors) {
- if (columnError != null && columnError != string.Empty)
+ if (!string.IsNullOrEmpty (columnError))
return true;
}
return false;
@@ -134,10 +135,7 @@ namespace System.Data {
public object this [string columnName] {
get { return this [columnName, DataRowVersion.Default]; }
set {
- DataColumn column = _table.Columns [columnName];
- if (column == null)
- throw new ArgumentException ("The column '" + columnName +
- "' does not belong to the table : " + _table.TableName);
+ DataColumn column = GetColumn (columnName);
this [column.Ordinal] = value;
}
}
@@ -202,10 +200,7 @@ namespace System.Data {
/// </summary>
public object this [string columnName, DataRowVersion version] {
get {
- DataColumn column = _table.Columns [columnName];
- if (column == null)
- throw new ArgumentException ("The column '" + columnName +
- "' does not belong to the table : " + _table.TableName);
+ DataColumn column = GetColumn (columnName);
return this [column.Ordinal, version];
}
}
@@ -514,7 +509,7 @@ namespace System.Data {
/// </summary>
public string RowError {
get { return rowError; }
- set { rowError = value; }
+ set { rowError = value ?? string.Empty; }
}
internal int IndexFromVersion (DataRowVersion version)
@@ -1248,7 +1243,7 @@ namespace System.Data {
/// </summary>
public bool IsNull (string columnName)
{
- return IsNull (Table.Columns [columnName]);
+ return IsNull (GetColumn (columnName));
}
/// <summary>
@@ -1257,6 +1252,17 @@ namespace System.Data {
/// </summary>
public bool IsNull (DataColumn column, DataRowVersion version)
{
+ if (column == null)
+ throw new ArgumentNullException ("column");
+
+ // use the expresion if there is one
+ if (column.Expression != String.Empty) {
+ // FIXME: how does this handle 'version'?
+ // TODO: Can we avoid the Eval each time by using the cached value?
+ object o = column.CompiledExpression.Eval (this);
+ return o == null && o == DBNull.Value;
+ }
+
return column.DataContainer.IsNull (IndexFromVersion (version));
}
@@ -1692,5 +1698,15 @@ namespace System.Data {
}
}
#endif // NET_2_0
+
+ DataColumn GetColumn (string columnName)
+ {
+ DataColumn column = _table.Columns [columnName];
+
+ if (column == null)
+ throw new ArgumentException ("The column '" + columnName + "' does not belong to the table " + _table.TableName);
+
+ return column;
+ }
}
}
diff --git a/mcs/class/System.Data/System.Data/FillOptions.cs b/mcs/class/System.Data/System.Data/FillOptions.cs
index 7f661949235..5cce950a4df 100644
--- a/mcs/class/System.Data/System.Data/FillOptions.cs
+++ b/mcs/class/System.Data/System.Data/FillOptions.cs
@@ -31,7 +31,7 @@
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data {
public enum FillOptions
{
diff --git a/mcs/class/System.Data/System.Data/Res.cs b/mcs/class/System.Data/System.Data/Res.cs
deleted file mode 100644
index e9e799a8b5b..00000000000
--- a/mcs/class/System.Data/System.Data/Res.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-namespace System.Data
-{
-
- using java.util;
-
- using System.Globalization;
- //using clr.System;
-
- public class Res
- {
- private static readonly String FILE_NAME = "SystemData";
- private static readonly ResourceBundle _resource =
- ResourceBundle.getBundle(FILE_NAME);
-
- public static String GetString(String name, Object[] args)
- {
- return GetString(null, name, args);
- }
-
- public static String GetString(CultureInfo culture, String name, Object[] args)
- {
- try
- {
- String str = _resource.getString(name);
- if (args != null && (int) args.Length > 0)
- {
- return String.Format(str, args);
- }
- else
- {
- return str;
- }
- }
- catch (MissingResourceException)
- {
- return null;
- }
- }
-
- public static String GetString(String name)
- {
- return GetString(null, name);
- }
-
- public static String GetString(CultureInfo culture, String name)
- {
- try
- {
- return _resource.getString(name);
- }
- catch (MissingResourceException)
- {
- return null;
- }
- }
-
- public static bool GetBoolean(String name)
- {
- return GetBoolean(name);
- }
-
- public static bool GetBoolean(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return false;
- }
-
- public static char GetChar(String name)
- {
- return GetChar(null, name);
- }
-
- public static char GetChar(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return (char)0;
- }
-
- public static int GetByte(String name)
- {
- return GetByte(null, name);
- }
-
- public static int GetByte(CultureInfo culture, String name)
- {
- return 0;
- }
-
- public static short GetShort(String name)
- {
- return GetShort(null, name);
- }
-
- public static short GetShort(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return 0;
- }
-
- public static int GetInt(String name)
- {
- return GetInt(null, name);
- }
-
- public static int GetInt(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return 0;
- }
-
- public static long GetLong(String name)
- {
- return GetLong(null, name);
- }
-
- public static long GetLong(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return 0;
- }
-
- public static float GetFloat(String name)
- {
- return GetFloat(null, name);
- }
-
- public static float GetFloat(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return 0.0f;
- }
-
- public static double GetDouble(String name)
- {
- return GetDouble(null, name);
- }
-
- public static double GetDouble(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return 0.0;
- }
-
- public static Object GetObject(String name)
- {
- return GetObject(null, name);
- }
-
- public static Object GetObject(CultureInfo culture, String name)
- {
- // This online demo only decompiles 10 methods in each class
- return null;
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Data/System.Data/UpdateOptions.cs b/mcs/class/System.Data/System.Data/UpdateOptions.cs
index 0596e965759..3ae20904d96 100644
--- a/mcs/class/System.Data/System.Data/UpdateOptions.cs
+++ b/mcs/class/System.Data/System.Data/UpdateOptions.cs
@@ -31,7 +31,7 @@
//
-#if NET_2_0 || TARGET_JVM
+#if NET_2_0
namespace System.Data {
public enum UpdateOptions
{
diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.config b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.config
deleted file mode 100644
index f97ff30f9f2..00000000000
--- a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.config
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration>
- <appSettings>
- <add key="ConnectionString" value="Provider=SQLOLEDB.1;Data Source=powergh;Initial Catalog=GHTDB;User Id=sa;Password=sa" />
- <!--
- <add key="ConnectionString" value="Provider=SQLOLEDB.1;Data Source=xp050;Initial Catalog=GHTDB;User Id=sa;Password=" />
- <add key="ConnectionString" value="Provider=MSDAORA.1;hostname=xp050;port=1521;User ID=ghtdb;Password=ghtdb;ServiceName=xp050;Data Source=xp050" />
- <add key="ConnectionString" value="Provider=IBMDADB2;Password=db2admin;User ID=db2admin;Data Source=GHTDB;HostName=xp050;Port=50000;Location=xp050:50000" />
- <add key="ConnectionString" value="Provider=Sybase ASE OLE DB Provider;hostname=KONGO;port=5000;User ID=sa;Password=;ServiceName=KONGO;Data Source=sybaseoledb;JdbcDriverClassName=com.sybase.jdbc2.jdbc.SybDriver;JdbcURL=jdbc:sybase:Tds:KONGO:5000/GHTDB;user=sa;DatabaseName=GHTDB" />
- <add key="ConnectionString" value="Provider=Mainsoft.JDBC.OLEDB.1;Persist Security Info=False;User ID=super;Data Source=PostgreSQL_XP050;Extended Properties="DSN=PostgreSQL_XP050;DATABASE=GHTDB;SERVER=xp050;PORT=5432;UID=super;ReadOnly=0;Protocol=6.4;FakeOidIndex=0;ShowOidColumn=0;RowVersioning=0;ShowSystemTables=0;ConnSettings=;Fetch=100;Socket=8192;UnknownSizes=0;MaxVarcharSize=254;MaxLongVarcharSize=8190;Debug=0;CommLog=0;Optimizer=1;Ksqo=1;UseDeclareFetch=0;TextAsLongVarchar=1;UnknownsAsLongVarchar=0;BoolsAsChar=0;Parse=0;CancelAsFreeStmt=0;ExtraSysTablePrefixes=dd_;;LFConversion=1;UpdatableCursors=0;DisallowPremature=0;TrueIsMinus1=0;BI=0;ByteaAsLongVarBinary=0;UseServerSidePrepare=0";Initial Catalog=GHTDB;JdbcDriverClassName=org.postgresql.Driver;JdbcURL=jdbc:postgresql://xp050/GHTDB;User=super;Password=super" />
- -->
- </appSettings>
-</configuration>
diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.sln b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.sln
deleted file mode 100755
index 92031c7b7b0..00000000000
--- a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.J2EE.sln
+++ /dev/null
@@ -1,43 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Data.OleDb.Tests.J2EE", "System.Data.OleDb.Tests.J2EE.vmwcsproj", "{D5887372-DC7D-47E1-8CAA-B348643412ED}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.framework.dll.J2EE", "..\..\..\..\nunit20\framework\nunit.framework.dll.J2EE.vmwcsproj", "{39CC8FF7-EF1A-41A1-B727-42684211ECD1}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Debug_Java = Debug_Java
- Debug-Strong = Debug-Strong
- Release = Release
- Release_Java = Release_Java
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Debug.ActiveCfg = Debug|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Debug.Build.0 = Debug|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Debug_Java.Build.0 = Debug_Java|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Debug-Strong.ActiveCfg = Debug|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Debug-Strong.Build.0 = Debug|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Release.ActiveCfg = Release_Java|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Release.Build.0 = Release_Java|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Release_Java.ActiveCfg = Release_Java|.NET
- {D5887372-DC7D-47E1-8CAA-B348643412ED}.Release_Java.Build.0 = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.ActiveCfg = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.Build.0 = Debug_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug-Strong.ActiveCfg = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug-Strong.Build.0 = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release.ActiveCfg = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release.Build.0 = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.ActiveCfg = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.Build.0 = Release_Java|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.csproj b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.csproj
deleted file mode 100755
index db6a209fa7d..00000000000
--- a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.csproj
+++ /dev/null
@@ -1,254 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;TARGET_JVM;NET_1_1;NET_2_0;KNOWN_BUG</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{67E25B16-2068-4DA3-8008-5ACA13DE2843}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Data.OleDb.Tests.J2EE</RootNamespace>
- <AssemblyName>System.Data.OleDb.Tests.J2EE</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\System.Data.Test.Utils\DataProvider.cs">
- <Link>System.Data.OleDb.jvm\MonoTests.System.Data.Utils\DataProvider.cs</Link>
- </Compile>
- <Compile Include="System.Data.OleDb.jvm\MonoTests.System.Data.Utils\ADONetTesterClass.cs" />
- <Compile Include="System.Data.OleDb.jvm\MonoTests.System.Data.Utils\ConnectedDataProvider.cs" />
- <Compile Include="System.Data.OleDb.jvm\MonoTests.System.Data.Utils\DbTypeParameter.cs" />
- <Compile Include="System.Data.OleDb.jvm\MonoTests.System.Data.Utils\DbTypeParametersCollection.cs" />
- <Compile Include="System.Data.OleDb.jvm\MonoTests.System.Data.Utils\GHTBase.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommandBuilder\OleDbCommandBuilder_DeriveParameters_O.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_CommandText.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_CommandTimeout.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_CommandType.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_Connection.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_Dispose.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_ExecuteNonQuery.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_ExecuteReader.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_ExecuteScalar.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_New.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_Parameters.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_Prepare.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbCommand\OleDbCommand_Transaction.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\IDBConnection_For_OleDb.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_BeginTransaction.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_ChangeDatabase.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_Close.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_ConnectionString.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_ConnectionTimeout.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_CreateCommand.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_Database.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_DataSource.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_Equals.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_GetOleDbSchemaTable.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_InfoMessage.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_New.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_Open.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_Provider.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_State.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbConnection\OleDbConnection_StateChange.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_AcceptChangesDuringFill.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_ContinueUpdateOnError.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_ctor.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_ctor_O.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_ctor_SO.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_ctor_SS.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_DeleteCommand.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Dispose.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_FillError.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_FillSchema_DS.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_FillSchema_DSS.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_FillSchema_DsSt.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_FillSchema_DtSch.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Fill_1.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Fill_2.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Fill_3.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Fill_Ds.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Fill_DsStr.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Fill_Ds_Int_Int_Str.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Fill_Dt.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_GetFillParameters.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_InsertCommand.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_MissingMappingAction.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_MissingSchemaAction.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_RowUpdated.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_RowUpdating.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_SelectCommand.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_TableMappings.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_ToString.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_UpdateCommand.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Update_Dr.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Update_Ds.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Update_DsStr.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataAdapter\OleDbDataAdapter_Update_Dt.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_Close.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_ctor.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_Depth.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetBoolean.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetBytes_IIBII.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetByte_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetChars.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetDataTypeName.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetDateTime.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetDecimal_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetDouble_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetFieldType.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetFloat_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetGuiid_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetInt16.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetInt32_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetInt64.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetName_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetOrdinal.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetSchemaTable.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetString_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetTimeSpan_I.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetValue.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_GetValues.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_HasRows.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_IsDBNull.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_Item.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_NextResult.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_Read.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbDataReader\OleDbDataReader_RecordsAffected.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbLiteral\OleDbLiteral.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameterCollection\OleDbParameterCollection_Add.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameterCollection\OleDbParameterCollection_Contains.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameterCollection\OleDbParameterCollection_Count.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SO.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SOIPBBBSDO.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SOtype.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SOtypeI.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbParameter\OleDbParameter_ctor_SOtype_IS.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Begin.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Commit.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Connection.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_ctor.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_IsolationLevel.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbTransaction\OleDbTransaction_Rollback.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbType\OleDbType.cs" />
- <Compile Include="System.Data.OleDb.jvm\OleDbType\OleDbType_Date.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlCommandBuilder\SqlCommandBuilder_DeriveParameters_S.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlCommand\SqlCommand_ExecuteReader_.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlCommand\SqlCommand_ExecuteXmlReader_.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlCommand\SqlCommand_Parameters.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlConnection\SqlConnection_BeginTransaction_S.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlConnection\SqlConnection_InfoMessage.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlConnection\SqlConnection_StateChange.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlDataAdapter\SqlDataAdapter_RowUpdated.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlDataAdapter\SqlDataAdapter_RowUpdating.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlParameter\SqlParameter_ctor_SO.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlParameter\SqlParameter_Direction.cs" />
- <Compile Include="System.Data.SqlClient.jvm\SqlParameter\SqlParameter_set_DbType_D.cs" />
- <Compile Include="System.Data.SqlClient\SqlConnectionStringBuilderTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj">
- <Project>{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}</Project>
- <Name>nunit.framework.dll20.J2EE</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-rt="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system-data="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Data.jar" REFS-JarPath-system="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.sln b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.sln
deleted file mode 100755
index bc9e09f4e3e..00000000000
--- a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.Tests20.J2EE.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.OleDb.Tests20.J2EE", "System.Data.OleDb.Tests20.J2EE.csproj", "{67E25B16-2068-4DA3-8008-5ACA13DE2843}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.dll20.J2EE", "..\..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj", "{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {67E25B16-2068-4DA3-8008-5ACA13DE2843}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs
index a91f79d2b9b..b49f606ade1 100644
--- a/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs
+++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.OleDb.jvm/MonoTests.System.Data.Utils/ConnectedDataProvider.cs
@@ -280,34 +280,6 @@ namespace MonoTests.System.Data.Utils {
// The .NET Framework provides support for Oracle LOBs in the OracleClient namespace, but not in the OleDb namespace.
// Since Visual MainWin does not support the OracleClient namespace, a partial support for this important feature is provided in the OleDb namespace.
// See ms-help://MS.VSCC.2003/VMW.GH.1033/ghdoc/vmwdoc_ADONET_data_access_limitations_51.htm
-#if TARGET_JVM
-
- row.Add("BLOB", new byte[] {0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- ,0x00, 0x12, 0x34, 0x56, 0x78, 0x9A, 0xBC, 0xDE, 0xFF, 0xF0
- }, 4000);
- row.Add("CLOB", SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- , 4000);
- row.Add("NCLOB", SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- + SAMPLE_STRING
- , 4000);
-#endif
break;
#endregion
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs
index 2a9f7cdada4..a8ff6acfa25 100644
--- a/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs
@@ -60,9 +60,7 @@ namespace MonoTests.System.Data.Common
public void Default ()
{
DBDataPermissionAttribute a = new NonAbstractDBDataPermissionAttribute (SecurityAction.Assert);
-#if !TARGET_JVM
Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId");
-#endif
Assert.IsFalse (a.Unrestricted, "Unrestricted");
Assert.IsFalse (a.AllowBlankPassword, "AllowBlankPassword");
Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString");
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DataColumnMappingCollectionTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DataColumnMappingCollectionTest.cs
index d34d6d46076..f093bd97e21 100644
--- a/mcs/class/System.Data/Test/System.Data.Common/DataColumnMappingCollectionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.Common/DataColumnMappingCollectionTest.cs
@@ -376,9 +376,6 @@ namespace MonoTests.System.Data.Common
}
[Test]
-#if TARGET_JVM
- [Ignore ("Does not work with TARGET_JVM")]
-#endif
public void ToStringTest()
{
Assert.AreEqual ("System.Data.Common.DataColumnMappingCollection", columnMapCollection.ToString(), "test1");
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DataTableMappingCollectionTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DataTableMappingCollectionTest.cs
index a14c3f85ab3..a481c27af32 100644
--- a/mcs/class/System.Data/Test/System.Data.Common/DataTableMappingCollectionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.Common/DataTableMappingCollectionTest.cs
@@ -360,9 +360,6 @@ namespace MonoTests.System.Data.Common
}
[Test]
-#if TARGET_JVM
- [Ignore ("Does not work with TARGET_JVM")]
-#endif
public void ToStringTest()
{
Assert.AreEqual("System.Data.Common.DataTableMappingCollection", tableMapCollection.ToString(), "test1");
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs
index c857af2d64b..a3f69974e06 100644
--- a/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs
@@ -223,6 +223,41 @@ sqliteDataAdapter.Update (dataSet, "Primus");
dbConnection.Close();
dbConnection = null;
}
+
+ [Test]
+ [Category ("NotWorking")] // Requires newer sqlite than is on wrench
+ public void UpdateResetRowErrorCorrectly ()
+ {
+ const string connectionString = "URI = file::memory:; Version = 3";
+ using (var dbConnection = new SqliteConnection (connectionString)) {
+ dbConnection.Open ();
+
+ using (var cmd = dbConnection.CreateCommand ()) {
+ cmd.CommandText = "CREATE TABLE data (id PRIMARY KEY, name TEXT)";
+ cmd.ExecuteNonQuery ();
+ }
+
+
+ var ts = dbConnection.BeginTransaction ();
+ var da = new SqliteDataAdapter ("SELECT * FROM data", dbConnection);
+ var builder = new SqliteCommandBuilder (da);
+ da.UpdateCommand = builder.GetUpdateCommand ();
+ da.UpdateCommand.Transaction = ts;
+
+ var ds1 = new DataSet ();
+ da.Fill (ds1, "data");
+
+ var table = ds1.Tables [0];
+ var row = table.NewRow ();
+ row ["id"] = 10;
+ row ["name"] = "Bart";
+ table.Rows.Add (row);
+
+ var ds2 = ds1.GetChanges ();
+ da.Update (ds2, "data");
+ Assert.IsFalse (ds2.HasErrors);
+ }
+ }
#endif
#endif
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderMock.cs b/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderMock.cs
index 5d561b44dd5..2957cd73deb 100644
--- a/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderMock.cs
+++ b/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderMock.cs
@@ -31,7 +31,7 @@ using System.Data;
using System.Data.Common;
using System.IO;
-namespace Test.System.Data.Common
+namespace MonoTests.System.Data.Common
{
internal class DbDataReaderMock : DbDataReader
{
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderTest.cs
index 0a7235f1b90..20d5c1ab0bf 100644
--- a/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.Common/DbDataReaderTest.cs
@@ -32,7 +32,7 @@ using System.Data;
using System.Data.Common;
using System.IO;
-namespace Test.System.Data.Common
+namespace MonoTests.System.Data.Common
{
[TestFixture]
public class DbDataReaderTest
diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs
index 8f94229a47c..28a82f1ad1a 100644
--- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs
@@ -38,9 +38,6 @@ using System.Xml;
using System.Data.SqlTypes;
using System.Threading;
using System.Globalization;
-#if TARGET_JVM
-using DivideByZeroException = System.ArithmeticException;
-#endif
namespace MonoTests.System.Data.SqlTypes
{
diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs
index 0df3b9d3aa2..ee3817830d9 100644
--- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs
+++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs
@@ -35,9 +35,6 @@ using NUnit.Framework;
using System;
using System.Xml;
using System.Data.SqlTypes;
-#if TARGET_JVM
-using DivideByZeroException = System.ArithmeticException;
-#endif
#if NET_2_0
using System.Xml.Serialization;
using System.IO;
diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs
index 0492fd708c8..37b186347a0 100644
--- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs
+++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs
@@ -34,9 +34,6 @@
using System;
using System.Xml;
using System.Data.SqlTypes;
-#if TARGET_JVM
-using DivideByZeroException = System.ArithmeticException;
-#endif
#if NET_2_0
using System.Xml.Serialization;
diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs
index a1bf2f00f7d..a8230d0310d 100644
--- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs
+++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs
@@ -191,9 +191,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
-#if TARGET_JVM
- [Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
-#endif
public void CompareTo()
{
SqlByte Test = new SqlByte (1);
@@ -271,9 +268,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
-#if TARGET_JVM
- [Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
-#endif
public void Greaters()
{
// GreateThan ()
@@ -288,9 +282,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
-#if TARGET_JVM
- [Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
-#endif
public void Lessers()
{
// LessThan()
@@ -377,11 +368,7 @@ namespace MonoTests.System.Data.SqlTypes
byte test = Test1.GetUnicodeBytes () [105];
Assert.Fail ("#N05");
} catch (Exception e) {
-#if TARGET_JVM
- Assert.IsTrue (typeof (IndexOutOfRangeException).IsAssignableFrom(e.GetType()), "#N06");
-#else
Assert.AreEqual (typeof (IndexOutOfRangeException), e.GetType(), "#N06");
-#endif
}
}
@@ -545,9 +532,6 @@ namespace MonoTests.System.Data.SqlTypes
}
[Test]
-#if TARGET_JVM
- [Ignore ("The option CompareOptions.IgnoreWidth is not supported")]
-#endif
public void ThanOrEqualOperators()
{
// == -operator
diff --git a/mcs/class/System.Data/Test/System.Data.Test.sln b/mcs/class/System.Data/Test/System.Data.Test.sln
deleted file mode 100644
index e3adf1ed81b..00000000000
--- a/mcs/class/System.Data/Test/System.Data.Test.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Data.Test", "System.Data.Test.vmwcsproj", "{B1B135D9-4FB2-4369-8C4F-983AFD06044F}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.framework.dll.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll.J2EE.vmwcsproj", "{39CC8FF7-EF1A-41A1-B727-42684211ECD1}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Debug_Java = Debug_Java
- Release_Java = Release_Java
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug.ActiveCfg = Debug_Java|.NET
- {B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug.Build.0 = Debug_Java|.NET
- {B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Debug_Java.Build.0 = Debug_Java|.NET
- {B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Release_Java.ActiveCfg = Release_Java|.NET
- {B1B135D9-4FB2-4369-8C4F-983AFD06044F}.Release_Java.Build.0 = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.ActiveCfg = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.Build.0 = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.Build.0 = Debug_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.ActiveCfg = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.Build.0 = Release_Java|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data/Test/System.Data.Test20.csproj b/mcs/class/System.Data/Test/System.Data.Test20.csproj
deleted file mode 100755
index 3b0d1ea0c28..00000000000
--- a/mcs/class/System.Data/Test/System.Data.Test20.csproj
+++ /dev/null
@@ -1,287 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Data.Test</RootNamespace>
- <AssemblyName>System.Data.Test</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="System.Data.Common\DataAdapterTest.cs" />
- <Compile Include="System.Data.Common\DataColumnMappingCollectionTest.cs" />
- <Compile Include="System.Data.Common\DataTableMappingCollectionTest.cs" />
- <Compile Include="System.Data.Common\DbConnectionStringBuilderTest.cs" />
- <Compile Include="System.Data.Common\DBDataPermissionAttributeTest.cs" />
- <Compile Include="System.Data.Common\DbProviderFactoriesConfigurationHandlerTest.cs" />
- <Compile Include="System.Data.SqlClient\SqlConnectionStringBuilderTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlBinaryTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlBooleanTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlBytesTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlByteTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlCharsTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlDateTimeTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlDecimalTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlDoubleTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlGuidTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlInt16Test.cs" />
- <Compile Include="System.Data.SqlTypes\SqlInt32Test.cs" />
- <Compile Include="System.Data.SqlTypes\SqlInt64Test.cs" />
- <Compile Include="System.Data.SqlTypes\SqlMoneyTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlSingleTest.cs" />
- <Compile Include="System.Data.SqlTypes\SqlStringTest.cs" />
- <Compile Include="System.Data.Test.Utils\DataProvider.cs" />
- <Compile Include="System.Data\BinarySerializationTest.cs" />
- <Compile Include="System.Data\ConstraintCollectionTest.cs" />
- <Compile Include="System.Data\ConstraintCollectionTest2.cs" />
- <Compile Include="System.Data\ConstraintExceptionTest.cs" />
- <Compile Include="System.Data\ConstraintTest.cs" />
- <Compile Include="System.Data\DataColumnCollectionTest.cs" />
- <Compile Include="System.Data\DataColumnCollectionTest2.cs" />
- <Compile Include="System.Data\DataColumnTest.cs" />
- <Compile Include="System.Data\DataColumnTest2.cs" />
- <Compile Include="System.Data\DataRelationCollectionTest.cs" />
- <Compile Include="System.Data\DataRelationCollectionTest2.cs" />
- <Compile Include="System.Data\DataRelationTest.cs" />
- <Compile Include="System.Data\DataRelationTest2.cs" />
- <Compile Include="System.Data\DataRowCollectionTest.cs" />
- <Compile Include="System.Data\DataRowCollectionTest2.cs" />
- <Compile Include="System.Data\DataRowTest.cs" />
- <Compile Include="System.Data\DataRowTest2.cs" />
- <Compile Include="System.Data\DataRowViewTest.cs" />
- <Compile Include="System.Data\DataRowViewTest2.cs" />
- <Compile Include="System.Data\DataSet1.Designer.cs">
- </Compile>
- <Compile Include="System.Data\DataSetAssertion.cs" />
- <Compile Include="System.Data\DataSetInferXmlSchemaTest.cs" />
- <Compile Include="System.Data\DataSetReadXmlSchemaTest.cs" />
- <Compile Include="System.Data\DataSetReadXmlTest.cs" />
- <Compile Include="System.Data\DataSetTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data\DataSetTest2.cs" />
- <Compile Include="System.Data\DataSetTypedDataSetTest.cs" />
- <Compile Include="System.Data\DataTableCollectionTest.cs" />
- <Compile Include="System.Data\DataTableCollectionTest2.cs" />
- <Compile Include="System.Data\DataTableLoadRowTest.cs" />
- <Compile Include="System.Data\DataTableReaderTest.cs" />
- <Compile Include="System.Data\DataTableReadWriteXmlTest.cs" />
- <Compile Include="System.Data\DataTableReadXmlSchemaTest.cs" />
- <Compile Include="System.Data\DataTableTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data\DataTableTest2.cs" />
- <Compile Include="System.Data\DataTableTest3.cs" />
- <Compile Include="System.Data\DataTableTest4.cs" />
- <Compile Include="System.Data\DataTableTest5.cs" />
- <Compile Include="System.Data\DataViewManagerTest.cs" />
- <Compile Include="System.Data\DataViewTest.cs" />
- <Compile Include="System.Data\DataViewTest2.cs" />
- <Compile Include="System.Data\DataViewTest_IBindingList.cs" />
- <Compile Include="System.Data\DataViewTest_IBindingListView.cs" />
- <Compile Include="System.Data\DeletedRowInaccessibleExceptionTest.cs" />
- <Compile Include="System.Data\DuplicateNameExceptionTest.cs" />
- <Compile Include="System.Data\EvaluateExceptionTest.cs" />
- <Compile Include="System.Data\ForeignKeyConstraintTest.cs" />
- <Compile Include="System.Data\ForeignKeyConstraintTest2.cs" />
- <Compile Include="System.Data\InRowChangingEventExceptionTest.cs" />
- <Compile Include="System.Data\InvalidConstraintExceptionTest.cs" />
- <Compile Include="System.Data\MissingPrimaryKeyExceptionTest.cs" />
- <Compile Include="System.Data\MonkeyDataSet.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Data\NoNullAllowedExceptionTest.cs" />
- <Compile Include="System.Data\ReadOnlyExceptionTest.cs" />
- <Compile Include="System.Data\RowNotInTableExceptionTest.cs" />
- <Compile Include="System.Data\SyntaxErrorExceptionTest.cs" />
- <Compile Include="System.Data\TrailingSpaceTest.cs" />
- <Compile Include="System.Data\UniqueConstraintTest.cs" />
- <Compile Include="System.Data\UniqueConstraintTest2.cs" />
- <Compile Include="System.Data\VersionNotFoundException.cs" />
- <Compile Include="System.Data\XmlDataLoaderTest.cs" />
- <Compile Include="System.Data\XmlDataReaderTest.cs" />
- <Compile Include="System.Data\XmlExportOfTypedDataSetTest.cs" />
- <Compile Include="System.Xml\XmlDataDocumentTest.cs" />
- <Compile Include="System.Xml\XmlDataDocumentTest2.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="System.Data\own_schema.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test001.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test002.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test003.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test004.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test005.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test006.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test007.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test008.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test009.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test010.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test011.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test012.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test013.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test014.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\schemas\test103.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\store.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\store2.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\store3.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Data\store4.xsd">
- <SubType>Designer</SubType>
- </None>
- <None Include="System.Xml\store.xsd">
- <SubType>Designer</SubType>
- </None>
- </ItemGroup>
- <ItemGroup>
- <Content Include="System.Data\region.xml" />
- <Content Include="System.Data\TypedDataSet.xml" />
- <Content Include="System.Xml\2books.xml" />
- <Content Include="System.Xml\region.xml" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj">
- <Project>{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}</Project>
- <Name>nunit.framework.dll20.J2EE</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-rt="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Data.jar" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project>
diff --git a/mcs/class/System.Data/Test/System.Data.Test20.sln b/mcs/class/System.Data/Test/System.Data.Test20.sln
deleted file mode 100755
index 96d691c3fd8..00000000000
--- a/mcs/class/System.Data/Test/System.Data.Test20.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Data.Test20", "System.Data.Test20.csproj", "{DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.dll20.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj", "{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {DA1981D9-7FE1-493F-8B8C-3DFE47DE7934}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs b/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs
index 36d82147cdc..efbe64a1a4a 100644
--- a/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs
@@ -12,6 +12,8 @@ using System.Threading;
using NUnit.Framework;
+namespace MonoTests.System.Data
+{
[TestFixture]
public class BinarySerializationTest
{
@@ -132,9 +134,6 @@ public class BinarySerializationTest
dt.Rows[1].RejectChanges();
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void DataTableSerializationTest2 ()
{
//Serialize Table
@@ -274,9 +273,6 @@ public class BinarySerializationTest
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void Test_With_Null_Values2 ()
{
//Serialize Table
@@ -454,9 +450,6 @@ public class BinarySerializationTest
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void DataSetSerializationTest2 ()
{
DataSet ds = new DataSet ();
@@ -653,9 +646,6 @@ public class BinarySerializationTest
Assert.AreEqual (ds.Relations [i].RelationName, ds.Relations [i].RelationName, "#9 Relation : {0} differs", ds.Relations [i]);
}
[Test]
-#if TARGET_JVM
- [Ignore ("Net Binary formatting is not supported for DataSet")]
-#endif
public void Constraint_Relations_Test2 ()
{
//Serialize DataSet
@@ -763,3 +753,4 @@ public class BinarySerializationTest
}
#endif
+}
diff --git a/mcs/class/System.Data/Test/System.Data/ConstraintExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/ConstraintExceptionTest.cs
index c98a03c5aa4..fe575137ea4 100644
--- a/mcs/class/System.Data/Test/System.Data/ConstraintExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/ConstraintExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class ConstraintExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs
index bfae78d6e6e..35e876ff51f 100644
--- a/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs
@@ -31,7 +31,7 @@ using System.Data;
using NUnit.Framework;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class DBConcurrencyExceptionTest
diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest.cs b/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest.cs
index 8b0b4a376d2..b9eaac53220 100644
--- a/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest.cs
@@ -638,9 +638,6 @@ namespace MonoTests.System.Data
}
[Test]
-#if TARGET_JVM
- [Ignore ("Does not work with TARGET_JVM")]
-#endif
public void ToStringTest ()
{
DataTable Table = new DataTable ("test_table");
diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs
index f0f68c3207c..096c72fd1cf 100644
--- a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs
@@ -543,6 +543,23 @@ namespace MonoTests.System.Data
}
[Test]
+ public void Expression_Whitespace ()
+ {
+ DataColumn dc = new DataColumn ("ColName", typeof(string));
+
+ string plainWhitespace = " ";
+ string surroundWhitespace = " 'abc' ";
+
+ Assert.AreEqual (string.Empty, dc.Expression, "dce#1");
+
+ dc.Expression = plainWhitespace;
+ Assert.AreEqual (string.Empty, dc.Expression, "dce#2");
+
+ dc.Expression = surroundWhitespace;
+ Assert.AreEqual (surroundWhitespace, dc.Expression, "dce#3");
+ }
+
+ [Test]
public void Expression_Exceptions()
{
DataTable dt = DataProvider.CreateParentDataTable();
diff --git a/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs b/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs
index f7e298569fc..cc42664fcab 100644
--- a/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs
@@ -112,9 +112,7 @@ namespace MonoTests.System.Data
Assert.AreEqual (1, Rows.Count, "test#01");
Assert.IsFalse (Rows.IsReadOnly, "test#02");
Assert.IsFalse (Rows.IsSynchronized, "test#03");
-#if !TARGET_JVM
Assert.AreEqual ("System.Data.DataRowCollection", Rows.ToString (), "test#04");
-#endif
string [] cols = new string [2];
cols [0] = "first";
@@ -126,9 +124,7 @@ namespace MonoTests.System.Data
Rows.Add (cols);
Assert.AreEqual (3, Rows.Count, "test#05");
-#if !TARGET_JVM
Assert.AreEqual ("System.Data.DataRow", Rows [0].ToString (), "test#06");
-#endif
Assert.AreEqual (DBNull.Value, Rows [0] [0], "test#07");
Assert.AreEqual (DBNull.Value, Rows [0] [1], "test#08");
Assert.AreEqual ("first", Rows [1] [0], "test#09");
diff --git a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs
index 14333e2201a..e3e7aac2857 100644
--- a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs
@@ -739,6 +739,21 @@ namespace MonoTests.System.Data
Assert.AreEqual(true , dr.HasErrors , "DRW48");
}
+ [Test] public void HasErrorsWithNullError()
+ {
+ DataTable dt = new DataTable("myTable");
+ DataRow dr = dt.NewRow();
+
+ // HasErrors (default)
+ Assert.AreEqual(false, dr.HasErrors, "DRW47.2");
+
+ dr.RowError = null;
+
+ // HasErrors (set/get)
+ Assert.AreEqual(string.Empty , dr.RowError , "DRW48.2");
+ Assert.AreEqual(false , dr.HasErrors , "DRW49.2");
+ }
+
[Test] public void HasVersion_ByDataRowVersion()
{
DataTable t = new DataTable("atable");
@@ -2125,6 +2140,59 @@ namespace MonoTests.System.Data
#endregion
}
+ [Test]
+ public void IsNull_BeforeGetValue ()
+ {
+ DataTable table = new DataTable ();
+
+ // add the row, with the value in the column
+ DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null); // static
+ DataRow row = table.Rows.Add ("the value");
+ Assert.IsFalse (row.IsNull ("static"), "static null check failed");
+ Assert.AreEqual ("the value", row ["static"], "static value check failed");
+
+ // add the first derived column
+ DataColumn firstColumn = table.Columns.Add ("first", typeof(string), "static"); // first -> static
+ Assert.IsFalse (row.IsNull ("first"), "first level null check failed");
+ Assert.AreEqual ("the value", row ["first"], "first level value check failed");
+
+ // add the second level of related
+ DataColumn secondColumn = table.Columns.Add ("second", typeof(string), "first"); // second -> first -> static
+ Assert.IsFalse (row.IsNull ("second"), "second level null check failed");
+ Assert.AreEqual ("the value", row ["second"], "second level value check failed");
+ }
+
+ [Test]
+ public void IsNull_NullValueArguments ()
+ {
+ DataTable table = new DataTable ();
+
+ // add the row, with the value in the column
+ DataColumn staticColumn = table.Columns.Add ("static", typeof(string), null);
+ DataRow row = table.Rows.Add ("the value");
+
+ try {
+ row.IsNull ((string)null);
+ Assert.Fail ("expected an arg null exception for passing a null string");
+ } catch (ArgumentNullException) {
+ // do nothing as null columns aren't allowed
+ }
+
+ try {
+ row.IsNull ("");
+ Assert.Fail ("expected an arg exception for passing an empty string");
+ } catch (ArgumentException) {
+ // do nothing as we can't find a col with no name
+ }
+
+ try {
+ row.IsNull (null, DataRowVersion.Default);
+ Assert.Fail ("null column with version check failed");
+ } catch (ArgumentNullException) {
+ // do nothing as null columns aren't allowed
+ }
+ }
+
[Test] public void Item()
{
// init table with columns
diff --git a/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs b/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs
index 27df0f58984..6e338558389 100644
--- a/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs
@@ -39,7 +39,7 @@ using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Globalization;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class DataSetTest2
@@ -448,7 +448,7 @@ namespace MonoTests_System.Data
dt.Rows.Add(new object[] {2,"Value3","Value4"});
dt.Rows.Add(new object[] {3,"Value5","Value5"});
- System.Text.StringBuilder resultXML = new System.Text.StringBuilder();
+ StringBuilder resultXML = new StringBuilder();
resultXML.Append("<" + ds.DataSetName + "xmlns=\"namespace\">");
@@ -975,13 +975,13 @@ namespace MonoTests_System.Data
[Test] public void Locale()
{
DataSet ds = new DataSet("MyDataSet");
- System.Globalization.CultureInfo culInfo = System.Globalization.CultureInfo.CurrentCulture ;
+ CultureInfo culInfo = CultureInfo.CurrentCulture ;
// Checking Locale default from system
Assert.AreEqual(culInfo, ds.Locale , "DS156");
// Checking Locale get/set
- culInfo = new System.Globalization.CultureInfo("fr"); // = french
+ culInfo = new CultureInfo("fr"); // = french
ds.Locale = culInfo ;
Assert.AreEqual(culInfo , ds.Locale , "DS157");
}
@@ -1998,11 +1998,11 @@ namespace MonoTests_System.Data
ds1.Tables.Add(DataProvider.CreateParentDataTable());
ds1.Tables.Add(DataProvider.CreateChildDataTable());
- System.IO.MemoryStream ms = new System.IO.MemoryStream();
+ MemoryStream ms = new MemoryStream();
//write xml schema only
ds1.WriteXmlSchema(ms);
- System.IO.MemoryStream ms1 = new System.IO.MemoryStream(ms.GetBuffer());
+ MemoryStream ms1 = new MemoryStream(ms.GetBuffer());
//copy schema
DataSet ds2 = new DataSet();
ds2.ReadXmlSchema(ms1);
@@ -2073,7 +2073,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(0, ds2.Tables[1].Rows.Count , "DS282");
//try to delete the file
- System.IO.File.Delete(sTempFileName);
+ File.Delete(sTempFileName);
}
[Test] public void ReadXmlSchema_ByTextReader()
@@ -2082,11 +2082,11 @@ namespace MonoTests_System.Data
ds1.Tables.Add(DataProvider.CreateParentDataTable());
ds1.Tables.Add(DataProvider.CreateChildDataTable());
- System.IO.StringWriter sw = new System.IO.StringWriter();
+ StringWriter sw = new StringWriter();
//write xml file, schema only
ds1.WriteXmlSchema(sw);
- System.IO.StringReader sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
+ StringReader sr = new StringReader(sw.GetStringBuilder().ToString());
//copy both data and schema
DataSet ds2 = new DataSet();
ds2.ReadXmlSchema(sr);
@@ -2122,14 +2122,14 @@ namespace MonoTests_System.Data
ds1.Tables.Add(DataProvider.CreateParentDataTable());
ds1.Tables.Add(DataProvider.CreateChildDataTable());
- System.IO.StringWriter sw = new System.IO.StringWriter();
- System.Xml.XmlTextWriter xmlTW = new System.Xml.XmlTextWriter(sw);
+ StringWriter sw = new StringWriter();
+ XmlTextWriter xmlTW = new XmlTextWriter(sw);
//write xml file, schema only
ds1.WriteXmlSchema(xmlTW);
xmlTW.Flush();
- System.IO.StringReader sr = new System.IO.StringReader(sw.ToString());
- System.Xml.XmlTextReader xmlTR = new System.Xml.XmlTextReader(sr);
+ StringReader sr = new StringReader(sw.ToString());
+ XmlTextReader xmlTR = new XmlTextReader(sr);
//copy both data and schema
DataSet ds2 = new DataSet();
@@ -2196,7 +2196,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(ds2.Tables[1].Rows.Count, ds1.Tables[1].Rows.Count , "DS299");
//try to delete the file
- System.IO.File.Delete(sTempFileName);
+ File.Delete(sTempFileName);
}
[Test]
@@ -2212,7 +2212,7 @@ namespace MonoTests_System.Data
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
- System.IO.MemoryStream ms = new System.IO.MemoryStream();
+ MemoryStream ms = new MemoryStream();
//write xml file, data only
ds1.WriteXml(ms);
@@ -2241,7 +2241,7 @@ namespace MonoTests_System.Data
{
string input = string.Empty;
- System.IO.StringReader sr;
+ StringReader sr;
DataSet ds = new DataSet();
input += "<?xml version=\"1.0\"?>";
@@ -2261,7 +2261,7 @@ namespace MonoTests_System.Data
input += " </Price>";
input += "</Stock>";
- sr = new System.IO.StringReader(input);
+ sr = new StringReader(input);
ds.ReadXml(sr);
@@ -2311,7 +2311,7 @@ namespace MonoTests_System.Data
{
DataSet ds = new DataSet("TestDataSet");
string input = string.Empty;
- System.IO.StringReader sr;
+ StringReader sr;
input += "<?xml version=\"1.0\" standalone=\"yes\"?>";
input += "<Stocks><Stock name=\"MSFT\"><Company name=\"Microsoft Corp.\" /><Price type=\"high\"><Value>10.0</Value>";
@@ -2320,7 +2320,7 @@ namespace MonoTests_System.Data
input += "<Company name=\"General Electric\" /><Price type=\"high\"><Value>22.23</Value><Date>02/12/2001</Date></Price>";
input += "<Price type=\"low\"><Value>1.97</Value><Date>04/20/2003</Date></Price><Price type=\"current\"><Value>3.0</Value>";
input += "<Date>TODAY</Date></Price></Stock></Stocks>";
- sr = new System.IO.StringReader(input);
+ sr = new StringReader(input);
ds.EnforceConstraints = false;
ds.ReadXml(sr);
@@ -2339,7 +2339,7 @@ namespace MonoTests_System.Data
{
m_ds = new DataSet("Stocks");
string input = string.Empty;
- System.IO.StringReader sr;
+ StringReader sr;
input += "<?xml version=\"1.0\"?>";
input += "<Stocks>";
@@ -2408,7 +2408,7 @@ namespace MonoTests_System.Data
input += " </Stock>";
input += "</Stocks>";
- sr = new System.IO.StringReader(input);
+ sr = new StringReader(input);
m_ds.EnforceConstraints = true;
m_ds.ReadXml(sr);
this.privateTestCase("TestCase 1", "Company", "name='Microsoft Corp.'", "Stock", "name='MSFT'", "DS320");
@@ -2444,14 +2444,14 @@ namespace MonoTests_System.Data
#region "TestCase 1 - Empty string"
// Empty string
DataSet ds = new DataSet();
- System.IO.StringReader sr = new System.IO.StringReader (string.Empty);
- System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr);
+ StringReader sr = new StringReader (string.Empty);
+ XmlTextReader xReader = new XmlTextReader(sr);
try
{
ds.ReadXml (xReader);
Assert.Fail("DS335: ReadXml Failed to throw XmlException");
}
- catch (System.Xml.XmlException) {}
+ catch (XmlException) {}
catch (AssertionException exc) {throw exc;}
catch (Exception exc)
{
@@ -2635,8 +2635,8 @@ namespace MonoTests_System.Data
private void PrivateTestCase(string a_name, string a_expected, string a_xmlData)
{
DataSet ds = new DataSet();
- System.IO.StringReader sr = new System.IO.StringReader(a_xmlData) ;
- System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
+ StringReader sr = new StringReader(a_xmlData) ;
+ XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
Assert.AreEqual(a_expected, this.dataSetDescription(ds), "DS337");
}
@@ -2681,8 +2681,8 @@ namespace MonoTests_System.Data
xmlData += "<c>3</c>";
xmlData += "</b>";
xmlData += "</a>";
- System.IO.StringReader sr = new System.IO.StringReader(xmlData) ;
- System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
+ StringReader sr = new StringReader(xmlData) ;
+ XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
Assert.AreEqual(3, ds.Tables["c"].Rows.Count, "DS338");
}
@@ -2738,7 +2738,7 @@ namespace MonoTests_System.Data
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
- System.IO.StringWriter sw = new System.IO.StringWriter();
+ StringWriter sw = new StringWriter();
//write xml file, data only
ds1.WriteXml(sw);
@@ -2747,7 +2747,7 @@ namespace MonoTests_System.Data
//clear the data
ds2.Clear();
- System.IO.StringReader sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
+ StringReader sr = new StringReader(sw.GetStringBuilder().ToString());
ds2.ReadXml(sr);
//check xml data
@@ -2777,8 +2777,8 @@ namespace MonoTests_System.Data
ds1.Tables[1].Rows.Add(new object[] {7,2," "," ",new DateTime(2000,1,1,0,0,0,0),35});
ds1.Tables[1].Rows.Add(new object[] {7,3,"","",new DateTime(2000,1,1,0,0,0,0),35});
- System.IO.StringWriter sw = new System.IO.StringWriter();
- System.Xml.XmlTextWriter xmlTW = new System.Xml.XmlTextWriter(sw);
+ StringWriter sw = new StringWriter();
+ XmlTextWriter xmlTW = new XmlTextWriter(sw);
//write xml file, data only
ds1.WriteXml(xmlTW);
@@ -2788,8 +2788,8 @@ namespace MonoTests_System.Data
DataSet ds2 = ds1.Copy();
//clear the data
ds2.Clear();
- System.IO.StringReader sr = new System.IO.StringReader(sw.ToString());
- System.Xml.XmlTextReader xmlTR = new System.Xml.XmlTextReader(sr);
+ StringReader sr = new StringReader(sw.ToString());
+ XmlTextReader xmlTR = new XmlTextReader(sr);
ds2.ReadXml(xmlTR);
//check xml data
@@ -2847,8 +2847,8 @@ namespace MonoTests_System.Data
[Test] public void WriteXmlSchema_Relations_ForeignKeys ()
{
- System.IO.MemoryStream ms = null;
- System.IO.MemoryStream ms1 = null;
+ MemoryStream ms = null;
+ MemoryStream ms1 = null;
DataSet ds1 = new DataSet();
@@ -2884,10 +2884,10 @@ namespace MonoTests_System.Data
new DataColumn[] {col1_5, col1_6},
new DataColumn[] {col2_5, col2_6});
- ms = new System.IO.MemoryStream();
+ ms = new MemoryStream();
ds1.WriteXmlSchema (ms);
- ms1 = new System.IO.MemoryStream (ms.GetBuffer());
+ ms1 = new MemoryStream (ms.GetBuffer());
DataSet ds2 = new DataSet();
ds2.ReadXmlSchema(ms1);
@@ -3096,18 +3096,18 @@ namespace MonoTests_System.Data
[Test] public void WriteXml_ByTextWriterXmlWriteMode()
{
- System.IO.StringReader sr = null;
- System.IO.StringWriter sw = null;
+ StringReader sr = null;
+ StringWriter sw = null;
try // For real
{
// ReadXml - DataSetOut
DataSet oDataset = new DataSet("DataSetOut");
- sw = new System.IO.StringWriter();
- oDataset.WriteXml(sw,System.Data.XmlWriteMode.WriteSchema);
+ sw = new StringWriter();
+ oDataset.WriteXml(sw, XmlWriteMode.WriteSchema);
- sr = new System.IO.StringReader(sw.GetStringBuilder().ToString());
+ sr = new StringReader(sw.GetStringBuilder().ToString());
oDataset = new DataSet("DataSetOut");
oDataset.ReadXml(sr);
@@ -3252,13 +3252,13 @@ namespace MonoTests_System.Data
{
DataSet ds = new DataSet();
string input = "<a><b><c>2</c></b></a>";
- System.IO.StringReader sr = new System.IO.StringReader(input) ;
- System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
+ StringReader sr = new StringReader(input) ;
+ XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
- System.Text.StringBuilder sb = new System.Text.StringBuilder();
- System.IO.StringWriter sw = new System.IO.StringWriter(sb);
- System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(sw);
+ StringBuilder sb = new StringBuilder();
+ StringWriter sw = new StringWriter(sb);
+ XmlTextWriter xWriter = new XmlTextWriter(sw);
ds.WriteXml(xWriter);
string output = sb.ToString();
Assert.AreEqual(input,output, "DS76");
@@ -3267,20 +3267,20 @@ namespace MonoTests_System.Data
DataSet ds = new DataSet();
string input = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><a><b><c>2</c></b></a>";
string expectedOutput = "<a><b><c>2</c></b></a>";
- System.IO.StringReader sr = new System.IO.StringReader(input) ;
- System.Xml.XmlTextReader xReader = new System.Xml.XmlTextReader(sr) ;
+ StringReader sr = new StringReader(input) ;
+ XmlTextReader xReader = new XmlTextReader(sr) ;
ds.ReadXml (xReader);
- System.Text.StringBuilder sb = new System.Text.StringBuilder();
- System.IO.StringWriter sw = new System.IO.StringWriter(sb);
- System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(sw);
+ StringBuilder sb = new StringBuilder();
+ StringWriter sw = new StringWriter(sb);
+ XmlTextWriter xWriter = new XmlTextWriter(sw);
ds.WriteXml(xWriter);
string output = sb.ToString();
Assert.AreEqual(expectedOutput,output, "DS77");
}
{
DataSet ds = new DataSet("DSName");
- System.IO.StringWriter sr = new System.IO.StringWriter();
+ StringWriter sr = new StringWriter();
ds.WriteXml(sr);
Assert.AreEqual("<DSName />",sr.ToString(), "DS78");
}
@@ -3315,7 +3315,7 @@ namespace MonoTests_System.Data
ds.Tables.Remove("ChildTable");
//Get the xml representation of the dataset.
- System.IO.StringWriter sr = new System.IO.StringWriter();
+ StringWriter sr = new StringWriter();
ds.WriteXml(sr);
string xml = sr.ToString();
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest.cs
index e96ca5f7c55..05d0eddc7fb 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest.cs
@@ -348,9 +348,6 @@ namespace MonoTests.System.Data
}
[Test]
-#if TARGET_JVM
- [Ignore ("Does not work with TARGET_JVM")]
-#endif
public void ToStringTest()
{
DataTableCollection tbcol = _dataset[0].Tables;
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs b/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs
index 9229265648c..053825e3501 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs
@@ -28,10 +28,12 @@
using NUnit.Framework;
using System;
+using System.Collections;
+using System.ComponentModel;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class DataTableCollectionTest2
{
@@ -143,7 +145,7 @@ namespace MonoTests_System.Data
{
counter = 0;
DataSet ds = new DataSet();
- ds.Tables.CollectionChanged+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanged);
+ ds.Tables.CollectionChanged+=new CollectionChangeEventHandler(Tables_CollectionChanged);
ds.Tables.Add();
ds.Tables.Add();
Assert.AreEqual(2, counter, "DTC15");
@@ -153,7 +155,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(4, counter, "DTC16");
}
- private void Tables_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
+ private void Tables_CollectionChanged(object sender, CollectionChangeEventArgs e)
{
counter++;
}
@@ -163,7 +165,7 @@ namespace MonoTests_System.Data
{
counter = 0;
DataSet ds = new DataSet();
- ds.Tables.CollectionChanging+=new System.ComponentModel.CollectionChangeEventHandler(Tables_CollectionChanging);
+ ds.Tables.CollectionChanging+=new CollectionChangeEventHandler(Tables_CollectionChanging);
ds.Tables.Add();
ds.Tables.Add();
Assert.AreEqual(2, counter, "DTC17");
@@ -173,7 +175,7 @@ namespace MonoTests_System.Data
Assert.AreEqual(4, counter, "DTC18");
}
- private void Tables_CollectionChanging(object sender, System.ComponentModel.CollectionChangeEventArgs e)
+ private void Tables_CollectionChanging(object sender, CollectionChangeEventArgs e)
{
counter++;
}
@@ -233,7 +235,7 @@ namespace MonoTests_System.Data
ds.Tables.Add();
int count=0;
- System.Collections.IEnumerator myEnumerator = ds.Tables.GetEnumerator();
+ IEnumerator myEnumerator = ds.Tables.GetEnumerator();
while (myEnumerator.MoveNext())
{
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs
index a98713e2b88..13f46ad9858 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs
@@ -295,9 +295,6 @@ namespace MonoTests.System.Data
}
[Test]
-#if TARGET_JVM
- [Ignore ("Should review the test")]
-#endif
public void TestReadXml()
{
// For reading, DataTable.ReadXml only supports reading in xml with
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest.cs
index d752df4f1ac..86dd5e737e6 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableTest.cs
@@ -2911,9 +2911,6 @@ namespace MonoTests.System.Data
#region Read/Write XML Tests
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void ReadXmlSchema ()
{
DataTable Table = new DataTable ();
@@ -3806,9 +3803,6 @@ namespace MonoTests.System.Data
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void WriteXmlSchema_Hierarchy ()
{
DataSet ds = new DataSet ();
@@ -3841,9 +3835,6 @@ namespace MonoTests.System.Data
[Test]
[Ignore ("MS behavior is far from consistent to be regarded as a reference implementation.")]
// See the same-named tests in DataSetTest.cs
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
// WriteXmlSchema doesn't have overload wityh 2 parameters in System.Data
// and is commented-out TWICE below
public void ReadWriteXmlSchema()
@@ -3957,9 +3948,6 @@ namespace MonoTests.System.Data
[Test]
[Ignore ("MS behavior is far from consistent to be regarded as a reference implementation.")]
// See the same-named tests in DataSetTest.cs
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void ReadWriteXmlSchema_IgnoreSchema ()
{
DataSet ds = new DataSet ();
@@ -4153,7 +4141,7 @@ namespace MonoTests.System.Data
Assert.AreEqual (5, n, "n");
}
-#if !TARGET_JVM && !MONOTOUCH
+#if !MONOTOUCH
[Test]
public void NFIFromBug55978 ()
{
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs
index 331875ac888..bed6e55e50c 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs
@@ -36,7 +36,7 @@ using MonoTests.System.Data.Utils;
using NUnit.Framework;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest2
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs
index 6fc2d64b20b..c706778c67b 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs
@@ -31,7 +31,7 @@ using System.Xml;
using NUnit.Framework;
-namespace Monotests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest3
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs
index 2cdd5af913b..c7cb3a35e85 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs
@@ -31,7 +31,7 @@ using System.IO;
using System.Xml;
using NUnit.Framework;
-namespace Monotests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest4
@@ -1600,7 +1600,7 @@ namespace Monotests_System.Data
DataSet ds = new DataSet ();
DataTable table = new DataTable ("ParentTable");
XmlReadMode mode = XmlReadMode.Auto;
- table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
+ table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
ds.Tables.Add (table);
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
@@ -1638,7 +1638,7 @@ namespace Monotests_System.Data
using (FileStream stream = new FileStream (tempFile, FileMode.Open)) {
DataSet ds = new DataSet ();
DataTable table = new DataTable ("Table1");
- table.Columns.Add (new DataColumn ("id", System.Type.GetType ("System.Int32")));
+ table.Columns.Add (new DataColumn ("id", Type.GetType ("System.Int32")));
ds.Tables.Add (table);
try {
@@ -1852,7 +1852,7 @@ namespace Monotests_System.Data
DataTable table = new DataTable ("DummyTable");
//define the table schame partially with a column name which does not match with any
//table columns in the diffgram
- table.Columns.Add (new DataColumn ("WrongColumnName", System.Type.GetType ("System.String")));
+ table.Columns.Add (new DataColumn ("WrongColumnName", Type.GetType ("System.String")));
XmlReadMode mode = XmlReadMode.Auto;
@@ -2013,8 +2013,8 @@ namespace Monotests_System.Data
Assert.AreEqual ("NewDataSet", table.DataSet.DataSetName, "#2");
Assert.AreEqual (2, table.Columns.Count, "#3");
Assert.AreEqual (2, table.Rows.Count, "#4");
- Assert.AreEqual (typeof (System.Int32), table.Columns [0].DataType, "#5");
- Assert.AreEqual (typeof (System.String), table.Columns [1].DataType, "#6");
+ Assert.AreEqual (typeof (Int32), table.Columns [0].DataType, "#5");
+ Assert.AreEqual (typeof (String), table.Columns [1].DataType, "#6");
Assert.AreEqual (1, table.Constraints.Count, "#7");
Assert.AreEqual (typeof (UniqueConstraint), table.Constraints [0].GetType (), "#8");
Assert.AreEqual (1, table.ChildRelations.Count, "#9");
@@ -2027,9 +2027,9 @@ namespace Monotests_System.Data
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#14");
Assert.AreEqual (3, table1.Columns.Count, "#15");
Assert.AreEqual (4, table1.Rows.Count, "#16");
- Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#17");
- Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#18");
- Assert.AreEqual (typeof (System.Int32), table1.Columns [2].DataType, "#19");
+ Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#17");
+ Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#18");
+ Assert.AreEqual (typeof (Int32), table1.Columns [2].DataType, "#19");
Assert.AreEqual (2, table1.Constraints.Count, "#20");
Assert.AreEqual (typeof (UniqueConstraint), table1.Constraints [0].GetType (), "#21");
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [1].GetType (), "#22");
@@ -2045,8 +2045,8 @@ namespace Monotests_System.Data
Assert.AreEqual ("NewDataSet", table1.DataSet.DataSetName, "#29");
Assert.AreEqual (2, table1.Columns.Count, "#30");
Assert.AreEqual (8, table1.Rows.Count, "#31");
- Assert.AreEqual (typeof (System.Int32), table1.Columns [0].DataType, "#32");
- Assert.AreEqual (typeof (System.String), table1.Columns [1].DataType, "#33");
+ Assert.AreEqual (typeof (Int32), table1.Columns [0].DataType, "#32");
+ Assert.AreEqual (typeof (String), table1.Columns [1].DataType, "#33");
Assert.AreEqual (1, table1.Constraints.Count, "#34");
Assert.AreEqual (typeof (ForeignKeyConstraint), table1.Constraints [0].GetType (), "#35");
Assert.AreEqual (1, table1.ParentRelations.Count, "#36");
diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs
index 3bcbf75889a..0cacc8ea9ef 100644
--- a/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs
@@ -34,7 +34,7 @@ using System.Xml.Serialization;
using NUnit.Framework;
-namespace Monotests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class DataTableTest5
diff --git a/mcs/class/System.Data/Test/System.Data/DataViewTest.cs b/mcs/class/System.Data/Test/System.Data/DataViewTest.cs
index 045df6951bd..ac68e08fbb3 100644
--- a/mcs/class/System.Data/Test/System.Data/DataViewTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataViewTest.cs
@@ -511,9 +511,6 @@ namespace MonoTests.System.Data
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")] // defect 5446
-#endif
public void Find_3 ()
{
dataView.Sort = "itemID, itemName";
diff --git a/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs b/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs
index f6c6b3f9a8c..58ca232fb53 100644
--- a/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs
@@ -28,12 +28,13 @@
using NUnit.Framework;
using System;
-using System.IO;
+using System.Collections;
using System.ComponentModel;
+using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class DataViewTest2
{
@@ -41,7 +42,7 @@ namespace MonoTests_System.Data
class EventProperties //hold the event properties to be checked
{
- public System.ComponentModel.ListChangedType lstType ;
+ public ListChangedType lstType ;
public int NewIndex;
public int OldIndex;
}
@@ -508,7 +509,7 @@ namespace MonoTests_System.Data
//create the dataview for the table
DataView dv = new DataView(dt);
- System.Collections.IEnumerator ienm = null;
+ IEnumerator ienm = null;
// GetEnumerator != null
ienm = dv.GetEnumerator();
@@ -549,7 +550,7 @@ namespace MonoTests_System.Data
DataView dv = new DataView(dt);
//add event handler
- dv.ListChanged +=new System.ComponentModel.ListChangedEventHandler(dv_ListChanged);
+ dv.ListChanged +=new ListChangedEventHandler(dv_ListChanged);
// ----- Change Value ---------
evProp = null;
@@ -557,7 +558,7 @@ namespace MonoTests_System.Data
dv[1]["String1"] = "something";
Assert.AreEqual(true , evProp!=null , "DV58");
// change value - ListChangedType
- Assert.AreEqual(System.ComponentModel.ListChangedType.ItemChanged, evProp.lstType , "DV59");
+ Assert.AreEqual(ListChangedType.ItemChanged, evProp.lstType , "DV59");
// change value - NewIndex
Assert.AreEqual(1, evProp.NewIndex, "DV60");
// change value - OldIndex
@@ -569,7 +570,7 @@ namespace MonoTests_System.Data
dv.AddNew();
Assert.AreEqual(true , evProp!=null , "DV62");
// Add New - ListChangedType
- Assert.AreEqual(System.ComponentModel.ListChangedType.ItemAdded , evProp.lstType , "DV63");
+ Assert.AreEqual(ListChangedType.ItemAdded , evProp.lstType , "DV63");
// Add New - NewIndex
Assert.AreEqual(6, evProp.NewIndex, "DV64");
// Add New - OldIndex
@@ -581,7 +582,7 @@ namespace MonoTests_System.Data
dv.Sort = "ParentId Desc";
Assert.AreEqual(true , evProp!=null , "DV66");
// sort - ListChangedType
- Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV67");
+ Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV67");
// sort - NewIndex
Assert.AreEqual(-1, evProp.NewIndex, "DV68");
// sort - OldIndex
@@ -627,12 +628,12 @@ namespace MonoTests_System.Data
Assert.AreEqual(true , evProp != null , "DV168");
// Clear DataTable - should emit ListChangedType.Reset
- Assert.AreEqual(System.ComponentModel.ListChangedType.Reset , evProp.lstType , "DV169");
+ Assert.AreEqual(ListChangedType.Reset , evProp.lstType , "DV169");
// Clear DataTable - should clear view count
Assert.AreEqual(0, dt.DefaultView.Count , "DV169");
}
- private void dv_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
+ private void dv_ListChanged(object sender, ListChangedEventArgs e)
{
evProp = new EventProperties();
evProp.lstType = e.ListChangedType;
@@ -646,7 +647,7 @@ namespace MonoTests_System.Data
// this test also check DataView.Count property
DataRowView[] drvResult = null;
- System.Collections.ArrayList al = new System.Collections.ArrayList();
+ ArrayList al = new ArrayList();
//create the source datatable
DataTable dt = DataProvider.CreateChildDataTable();
@@ -763,7 +764,7 @@ namespace MonoTests_System.Data
*/
//DataRowView[] drvResult = null;
- System.Collections.ArrayList al = new System.Collections.ArrayList();
+ ArrayList al = new ArrayList();
DataTable dt = DataProvider.CreateParentDataTable();
@@ -821,7 +822,7 @@ namespace MonoTests_System.Data
private DataRow[] GetResultRows(DataTable dt,DataRowState State)
{
//get expected rows
- System.Collections.ArrayList al = new System.Collections.ArrayList();
+ ArrayList al = new ArrayList();
DataRowVersion drVer = DataRowVersion.Current;
//From MSDN - The row the default version for the current DataRowState.
diff --git a/mcs/class/System.Data/Test/System.Data/DeletedRowInaccessibleExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/DeletedRowInaccessibleExceptionTest.cs
index 89fdeb547b1..be2810330fd 100644
--- a/mcs/class/System.Data/Test/System.Data/DeletedRowInaccessibleExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DeletedRowInaccessibleExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class DeletedRowInaccessibleExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/DuplicateNameExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/DuplicateNameExceptionTest.cs
index c26a71db1e1..77cf583fc81 100644
--- a/mcs/class/System.Data/Test/System.Data/DuplicateNameExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/DuplicateNameExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class DuplicateNameExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/EvaluateExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/EvaluateExceptionTest.cs
index dd6fe52c914..a9c41f0c2a1 100644
--- a/mcs/class/System.Data/Test/System.Data/EvaluateExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/EvaluateExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
//using GHTUtils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class EvaluateExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs b/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs
index c0ed174c96d..591fef23f04 100644
--- a/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs
@@ -31,7 +31,7 @@ using System;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class ForeignKeyConstraintTest2
{
diff --git a/mcs/class/System.Data/Test/System.Data/InRowChangingEventExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/InRowChangingEventExceptionTest.cs
index 08dd7f08c69..549076cbb39 100644
--- a/mcs/class/System.Data/Test/System.Data/InRowChangingEventExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/InRowChangingEventExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class InRowChangingEventExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/InvalidConstraintExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/InvalidConstraintExceptionTest.cs
index 1aacff1ee99..04c19bfc75f 100644
--- a/mcs/class/System.Data/Test/System.Data/InvalidConstraintExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/InvalidConstraintExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class InvalidConstraintExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/MissingPrimaryKeyExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/MissingPrimaryKeyExceptionTest.cs
index 75791b325b4..14404f2b35f 100644
--- a/mcs/class/System.Data/Test/System.Data/MissingPrimaryKeyExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/MissingPrimaryKeyExceptionTest.cs
@@ -32,7 +32,7 @@ using System.Data;
using NUnit.Framework;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
class MissingPrimaryKeyExceptionTest
@@ -57,4 +57,4 @@ namespace MonoTests_System.Data
tbl.Rows.Contains("Something");
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data/Test/System.Data/NoNullAllowedExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/NoNullAllowedExceptionTest.cs
index 5b1506a857d..45a5c5f3f76 100644
--- a/mcs/class/System.Data/Test/System.Data/NoNullAllowedExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/NoNullAllowedExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class NoNullAllowedExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/ReadOnlyExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/ReadOnlyExceptionTest.cs
index 4969ea0a93d..dd16e85714a 100644
--- a/mcs/class/System.Data/Test/System.Data/ReadOnlyExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/ReadOnlyExceptionTest.cs
@@ -33,7 +33,7 @@ using System.IO;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class ReadOnlyExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/RowNotInTableExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/RowNotInTableExceptionTest.cs
index 349bdb8ae88..edade038354 100644
--- a/mcs/class/System.Data/Test/System.Data/RowNotInTableExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/RowNotInTableExceptionTest.cs
@@ -31,7 +31,7 @@ using System;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class RowNotInTableExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/SyntaxErrorExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/SyntaxErrorExceptionTest.cs
index 875be983894..e1e2b08e24b 100644
--- a/mcs/class/System.Data/Test/System.Data/SyntaxErrorExceptionTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/SyntaxErrorExceptionTest.cs
@@ -32,7 +32,7 @@ using System.Text;
using System.IO;
using System.Data;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class SyntaxErrorExceptionTest
{
diff --git a/mcs/class/System.Data/Test/System.Data/TrailingSpaceTest.cs b/mcs/class/System.Data/Test/System.Data/TrailingSpaceTest.cs
index 788cc5a390e..8c6d6a0d863 100644
--- a/mcs/class/System.Data/Test/System.Data/TrailingSpaceTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/TrailingSpaceTest.cs
@@ -2,7 +2,7 @@ using NUnit.Framework;
using System;
using System.Data;
-namespace Monotests_Mono.Data.SqlExpressions
+namespace MonoTests.System.Data
{
[TestFixture]
public class ComparisonTest {
@@ -10,7 +10,7 @@ namespace Monotests_Mono.Data.SqlExpressions
[Test]
public void TestStringTrailingSpaceHandling () {
// test for bug 79695 - does not ignore certain trailing whitespace chars when comparing strings
- System.Data.DataTable dataTable = new System.Data.DataTable ("Person");
+ DataTable dataTable = new DataTable ("Person");
dataTable.Columns.Add ("Name", typeof (string));
dataTable.Rows.Add (new object[] {"Mike "});
DataRow[] selectedRows = dataTable.Select ("Name = 'Mike'");
diff --git a/mcs/class/System.Data/Test/System.Data/UniqueConstraintTest2.cs b/mcs/class/System.Data/Test/System.Data/UniqueConstraintTest2.cs
index a21d94f1883..4e0224430c0 100644
--- a/mcs/class/System.Data/Test/System.Data/UniqueConstraintTest2.cs
+++ b/mcs/class/System.Data/Test/System.Data/UniqueConstraintTest2.cs
@@ -31,7 +31,7 @@ using System;
using System.Data;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture] public class UniqueConstraintTest2
{
diff --git a/mcs/class/System.Data/Test/System.Data/VersionNotFoundException.cs b/mcs/class/System.Data/Test/System.Data/VersionNotFoundException.cs
index 8c2e7a9f7f1..235e30890a2 100644
--- a/mcs/class/System.Data/Test/System.Data/VersionNotFoundException.cs
+++ b/mcs/class/System.Data/Test/System.Data/VersionNotFoundException.cs
@@ -32,7 +32,7 @@ using System.Data;
using NUnit.Framework;
using MonoTests.System.Data.Utils;
-namespace MonoTests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
class VersionNotFoundExceptionTest
@@ -73,4 +73,4 @@ namespace MonoTests_System.Data
object obj = drParent[0,DataRowVersion.Original];
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs b/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs
index dee7e6e378f..2e0fe018304 100644
--- a/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs
@@ -32,7 +32,7 @@ using System.Xml;
using NUnit.Framework;
-namespace Monotests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class XmlDataLoaderTest
@@ -74,7 +74,7 @@ namespace Monotests_System.Data
DataSet ds = new DataSet ("Set");
DataTable dt = new DataTable ("Test");
dt.Columns.Add ("CustName", typeof (String));
- dt.Columns.Add ("Type", typeof (System.Type));
+ dt.Columns.Add ("Type", typeof (Type));
ds.Tables.Add (dt);
return ds;
}
diff --git a/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs b/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs
index 546db60bfb9..9bff68d0b92 100644
--- a/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs
+++ b/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs
@@ -33,7 +33,7 @@ using System.Xml.Serialization;
using System.Xml.Schema;
using NUnit.Framework;
-namespace Monotests_System.Data
+namespace MonoTests.System.Data
{
[TestFixture]
public class XmlDataReaderTest
@@ -103,7 +103,7 @@ namespace Monotests_System.Data
StringReader sr = new StringReader (xml);
XmlTextReader xr = new XmlTextReader (sr);
DataTable tbl = new DataTable("CustomTypesTable");
- tbl.Columns.Add("Dummy", typeof(System.UInt32));
+ tbl.Columns.Add("Dummy", typeof(UInt32));
tbl.Columns.Add("FuncXml", typeof(CustomTypeXml));
DataSet ds = new DataSet("CustomTypesData");
diff --git a/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs b/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs
index aba9cdd34a8..a633fe836e4 100644
--- a/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.DirectoryServices.Protocols/Assembly/AssemblyInfo.cs
@@ -31,11 +31,9 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../msfinal.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: AllowPartiallyTrustedCallers]
diff --git a/mcs/class/System.DirectoryServices/.gitattributes b/mcs/class/System.DirectoryServices/.gitattributes
index b502fff56d1..e3ded8555b4 100644
--- a/mcs/class/System.DirectoryServices/.gitattributes
+++ b/mcs/class/System.DirectoryServices/.gitattributes
@@ -2,4 +2,3 @@
/ChangeLog -crlf
/Secure.config -crlf
/makefile.build -crlf
-/net_1_1_java_System.DirectoryServices.dll.exclude.sources -crlf
diff --git a/mcs/class/System.DirectoryServices/Assembly/AssemblyInfo.cs b/mcs/class/System.DirectoryServices/Assembly/AssemblyInfo.cs
index 1c486ea8ab0..eda06fb8885 100644
--- a/mcs/class/System.DirectoryServices/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.DirectoryServices/Assembly/AssemblyInfo.cs
@@ -31,11 +31,9 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../msfinal.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: AllowPartiallyTrustedCallers]
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices.sln b/mcs/class/System.DirectoryServices/System.DirectoryServices.sln
deleted file mode 100644
index ffd59a750c7..00000000000
--- a/mcs/class/System.DirectoryServices/System.DirectoryServices.sln
+++ /dev/null
@@ -1,35 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.DirectoryServices", "System.DirectoryServices.vmwcsproj", "{2A86AAED-1EF5-4BDC-8B53-9DBF6DAFD736}"
- ProjectSection(ProjectDependencies) = postProject
- {0B45F886-E6BB-4871-B9C1-77A0D92DA76E} = {0B45F886-E6BB-4871-B9C1-77A0D92DA76E}
- EndProjectSection
-EndProject
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "Novell.Directory.Ldap", "..\Novell.Directory.Ldap\Novell.Directory.Ldap.vmwcsproj", "{0B45F886-E6BB-4871-B9C1-77A0D92DA76E}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Debug_Java = Debug_Java
- Release_Java = Release_Java
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {2A86AAED-1EF5-4BDC-8B53-9DBF6DAFD736}.Debug.ActiveCfg = Debug|.NET
- {2A86AAED-1EF5-4BDC-8B53-9DBF6DAFD736}.Debug.Build.0 = Debug|.NET
- {2A86AAED-1EF5-4BDC-8B53-9DBF6DAFD736}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {2A86AAED-1EF5-4BDC-8B53-9DBF6DAFD736}.Debug_Java.Build.0 = Debug_Java|.NET
- {2A86AAED-1EF5-4BDC-8B53-9DBF6DAFD736}.Release_Java.ActiveCfg = Release_Java|.NET
- {2A86AAED-1EF5-4BDC-8B53-9DBF6DAFD736}.Release_Java.Build.0 = Release_Java|.NET
- {0B45F886-E6BB-4871-B9C1-77A0D92DA76E}.Debug.ActiveCfg = Debug|.NET
- {0B45F886-E6BB-4871-B9C1-77A0D92DA76E}.Debug.Build.0 = Debug|.NET
- {0B45F886-E6BB-4871-B9C1-77A0D92DA76E}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {0B45F886-E6BB-4871-B9C1-77A0D92DA76E}.Debug_Java.Build.0 = Debug_Java|.NET
- {0B45F886-E6BB-4871-B9C1-77A0D92DA76E}.Release_Java.ActiveCfg = Release_Java|.NET
- {0B45F886-E6BB-4871-B9C1-77A0D92DA76E}.Release_Java.Build.0 = Release_Java|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices20.csproj b/mcs/class/System.DirectoryServices/System.DirectoryServices20.csproj
deleted file mode 100755
index 20a488dce0d..00000000000
--- a/mcs/class/System.DirectoryServices/System.DirectoryServices20.csproj
+++ /dev/null
@@ -1,161 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.DirectoryServices</RootNamespace>
- <AssemblyName>System.DirectoryServices</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers">
- <HintPath>..\lib\J2SE.Helpers.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System">
- <Private>False</Private>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Assembly\Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>Assembly\MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.DirectoryServices.Design\DirectoryEntryConverter.cs" />
- <Compile Include="System.DirectoryServices\AuthenticationTypes.cs" />
- <Compile Include="System.DirectoryServices\DirectoryEntries.cs" />
- <Compile Include="System.DirectoryServices\DirectoryEntry.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.DirectoryServices\DirectorySearcher.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.DirectoryServices\DirectoryServicesPermission.cs" />
- <Compile Include="System.DirectoryServices\DirectoryServicesPermissionAccess.cs" />
- <Compile Include="System.DirectoryServices\DirectoryServicesPermissionAttribute.cs" />
- <Compile Include="System.DirectoryServices\DirectoryServicesPermissionEntry.cs" />
- <Compile Include="System.DirectoryServices\DirectoryServicesPermissionEntryCollection.cs" />
- <Compile Include="System.DirectoryServices\DSDescriptionAttribute.cs" />
- <Compile Include="System.DirectoryServices\PropertyCollection.cs" />
- <Compile Include="System.DirectoryServices\PropertyValueCollection.cs" />
- <Compile Include="System.DirectoryServices\ReferralChasingOption.cs" />
- <Compile Include="System.DirectoryServices\ResultPropertyCollection.cs" />
- <Compile Include="System.DirectoryServices\ResultPropertyValueCollection.cs" />
- <Compile Include="System.DirectoryServices\SchemaNameCollection.cs" />
- <Compile Include="System.DirectoryServices\SearchResult.cs" />
- <Compile Include="System.DirectoryServices\SearchResultCollection.cs" />
- <Compile Include="System.DirectoryServices\SearchScope.cs" />
- <Compile Include="System.DirectoryServices\SortDirection.cs" />
- <Compile Include="System.DirectoryServices\SortOption.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Assembly\Consts.cs.in</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Novell.Directory.Ldap\Novell.Directory.Ldap20.csproj">
- <Project>{7BA54046-FD05-4209-9508-D6367CDAFBC0}</Project>
- <Name>Novell.Directory.Ldap20</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-rt="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Data.jar" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project>
diff --git a/mcs/class/System.DirectoryServices/System.DirectoryServices20.sln b/mcs/class/System.DirectoryServices/System.DirectoryServices20.sln
deleted file mode 100755
index 3fbeb9adca9..00000000000
--- a/mcs/class/System.DirectoryServices/System.DirectoryServices20.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.DirectoryServices20", "System.DirectoryServices20.csproj", "{6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Novell.Directory.Ldap20", "..\Novell.Directory.Ldap\Novell.Directory.Ldap20.csproj", "{7BA54046-FD05-4209-9508-D6367CDAFBC0}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {6C8C17FE-0F2F-4515-AC3C-2FB79F10FFA8}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {7BA54046-FD05-4209-9508-D6367CDAFBC0}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.csproj b/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.csproj
deleted file mode 100644
index 51f02fc185f..00000000000
--- a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.csproj
+++ /dev/null
@@ -1,121 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{4CBF37B7-AFCF-4805-81A4-610282C6D9A5}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.DirectoryServices.Test20</RootNamespace>
- <AssemblyName>System.DirectoryServices.Test20</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA,NET_2_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="System.DirectoryServices\DirectoryServicesDirectoryEntryTest.cs" />
- <Compile Include="System.DirectoryServices\DirectoryServicesDirectorySearcherTest.cs" />
- <Compile Include="System.DirectoryServices\DirectoryServicesSearchResultTest.cs" />
- <Compile Include="System.DirectoryServices\TestConfiguration.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.DirectoryServices" />
- <Reference Include="System.Xml" />
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system-directoryservices="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.DirectoryServices.jar;..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\Novell.Directory.Ldap.jar" REFS-JarPath-rt="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.Xml.jar" REFS-JarPath-system-data="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.Data.jar" REFS-JarPath-system="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.sln b/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.sln
deleted file mode 100644
index 3d7ed4a884a..00000000000
--- a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.Test20.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.DirectoryServices.Test20", "System.DirectoryServices.Test20.csproj", "{4CBF37B7-AFCF-4805-81A4-610282C6D9A5}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Release_Java20|Any CPU.ActiveCfg = Release_Java|Any CPU
- {4CBF37B7-AFCF-4805-81A4-610282C6D9A5}.Release_Java20|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.sln b/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.sln
deleted file mode 100644
index 41630bf6187..00000000000
--- a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices.sln
+++ /dev/null
@@ -1,34 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.DirectoryServices.Test", "System.DirectoryServices.Test.vmwcsproj", "{63E8DD13-3F4D-4088-9641-FF4030B9054D}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.framework.dll.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll.J2EE.vmwcsproj", "{39CC8FF7-EF1A-41A1-B727-42684211ECD1}"
- ProjectSection(ProjectDependencies) = postProject
- EndProjectSection
-EndProject
-Global
- GlobalSection(SolutionConfiguration) = preSolution
- Debug = Debug
- Debug_Java = Debug_Java
- Release_Java = Release_Java
- EndGlobalSection
- GlobalSection(ProjectConfiguration) = postSolution
- {63E8DD13-3F4D-4088-9641-FF4030B9054D}.Debug.ActiveCfg = Debug_Java|.NET
- {63E8DD13-3F4D-4088-9641-FF4030B9054D}.Debug.Build.0 = Debug_Java|.NET
- {63E8DD13-3F4D-4088-9641-FF4030B9054D}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {63E8DD13-3F4D-4088-9641-FF4030B9054D}.Debug_Java.Build.0 = Debug_Java|.NET
- {63E8DD13-3F4D-4088-9641-FF4030B9054D}.Release_Java.ActiveCfg = Release_Java|.NET
- {63E8DD13-3F4D-4088-9641-FF4030B9054D}.Release_Java.Build.0 = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.ActiveCfg = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug.Build.0 = Debug|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.ActiveCfg = Debug_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Debug_Java.Build.0 = Debug_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.ActiveCfg = Release_Java|.NET
- {39CC8FF7-EF1A-41A1-B727-42684211ECD1}.Release_Java.Build.0 = Release_Java|.NET
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- EndGlobalSection
- GlobalSection(ExtensibilityAddIns) = postSolution
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.exclude.sources b/mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.exclude.sources
deleted file mode 100644
index 9ddbeb157ec..00000000000
--- a/mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.exclude.sources
+++ /dev/null
@@ -1,5 +0,0 @@
-System.DirectoryServices/DirectoryServicesPermission.cs
-System.DirectoryServices/DirectoryServicesPermissionAccess.cs
-System.DirectoryServices/DirectoryServicesPermissionAttribute.cs
-System.DirectoryServices/DirectoryServicesPermissionEntry.cs
-System.DirectoryServices/DirectoryServicesPermissionEntryCollection.cs
diff --git a/mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.sources b/mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.sources
deleted file mode 100644
index 9f02d9a674f..00000000000
--- a/mcs/class/System.DirectoryServices/net_1_1_java_System.DirectoryServices.dll.sources
+++ /dev/null
@@ -1 +0,0 @@
-#include System.DirectoryServices.dll.sources
diff --git a/mcs/class/System.Drawing.Design/System.Drawing.Design.csproj b/mcs/class/System.Drawing.Design/System.Drawing.Design.csproj
deleted file mode 100644
index 44766f1f92d..00000000000
--- a/mcs/class/System.Drawing.Design/System.Drawing.Design.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java20</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{645B83F0-DAE2-4360-96FD-7E8FCFADD3B5}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Drawing.Design</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <RootNamespace>System.Drawing.Design</RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_1_1;NET_2_0;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_1_1;NET_2_0;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="Consts.cs" />
- <Compile Include="Locale.cs" />
- <Compile Include="MonoTODOAttribute.cs" />
- <Compile Include="System.Drawing.Design\BitmapEditor.cs" />
- <Compile Include="System.Drawing.Design\ColorEditor.cs" />
- <Compile Include="System.Drawing.Design\ContentAlignmentEditor.cs" />
- <Compile Include="System.Drawing.Design\CursorEditor.cs" />
- <Compile Include="System.Drawing.Design\FontEditor.cs" />
- <Compile Include="System.Drawing.Design\FontNameEditor.cs" />
- <Compile Include="System.Drawing.Design\IconEditor.cs" />
- <Compile Include="System.Drawing.Design\ImageEditor.cs" />
- <Compile Include="System.Drawing.Design\MetafileEditor.cs" />
- <Compile Include="System.Drawing.Design\ToolboxItemContainer.cs" />
- <Compile Include="System.Drawing.Design\ToolboxItemCreator.cs" />
- <Compile Include="System.Drawing.Design\ToolboxService.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-JarPath-system-drawing="" REFS-RefInfo-system-windows-forms="repository:vmw:framework:2.0" REFS-JarPath-system-windows-forms="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" REFS-JarPath-rt="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system="" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs b/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs
index 8cddd927e9f..c036603b98a 100644
--- a/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Drawing/Assembly/AssemblyInfo.cs
@@ -54,9 +54,9 @@ using System.Runtime.InteropServices;
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
[assembly: AllowPartiallyTrustedCallers]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
+#if !MOBILE
[assembly: AssemblyKeyFile("../msfinal.pub")]
#endif
diff --git a/mcs/class/System.Drawing/Makefile b/mcs/class/System.Drawing/Makefile
index ceecdb8b168..fb59ad10560 100644
--- a/mcs/class/System.Drawing/Makefile
+++ b/mcs/class/System.Drawing/Makefile
@@ -13,13 +13,6 @@ TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -define:TEST -resource:Test/resources/indexed.
-r:System.Drawing.dll -r:System.Runtime.Serialization.Formatters.Soap.dll -r:System.Xml.dll \
-nowarn:0618 -nowarn:219 -nowarn:169 -nowarn:1595
-ifeq (net_1_1_java, $(PROFILE))
-LIB_MCS_FLAGS += \
- -r:System.Xml.dll \
- -r:rt.dll \
- -r:J2SE.Helpers.dll
-endif
-
include ../../build/library.make
EXTRA_DISTFILES = Test/resources/indexed.png \
diff --git a/mcs/class/System.Drawing/SD2K5.csproj b/mcs/class/System.Drawing/SD2K5.csproj
deleted file mode 100644
index 3b40a26f405..00000000000
--- a/mcs/class/System.Drawing/SD2K5.csproj
+++ /dev/null
@@ -1,677 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A6337986-B345-4C49-95F4-40D498C1927B}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>System.Drawing</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>
- </RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <OutputPath>bin\Debug_2.0\</OutputPath>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>NET_1_1 NET_2_0 VSTUDIO</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>1</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <OutputPath>bin\Release\</OutputPath>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>
- </DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>
- </NoWarn>
- <Optimize>true</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>1</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\CategoryNameCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\IPropertyValueUIService.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\IToolboxItemProvider.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\IToolboxService.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\IToolboxUser.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\PaintValueEventArgs.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\PropertyValueItem.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\PropertyValueUIHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\PropertyValueUIItemInvokeHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\ToolboxComponentsCreatedEventArgs.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\ToolboxComponentsCreatedEventHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\ToolboxComponentsCreatingEventArgs.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\ToolboxComponentsCreatingEventHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\ToolboxItem.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\ToolboxItemCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\ToolboxItemCreatorCallback.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\UITypeEditor.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Design\UITypeEditorEditStyle.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\AdjustableArrowCap.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\Blend.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\ColorBlend.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\CombineMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\CompostingMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\CompostingQuality.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\CoordinateSpace.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\CustomLineCap.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\DashCap.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\DashStyle.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\FillMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\FlushIntention.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\GraphicsContainer.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\GraphicsPath.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\GraphicsPathIterator.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\GraphicsState.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\HatchBrush.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\HatchStyle.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\InterpolationMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\LinearGradientBrush.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\LinearGradientMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\LineCap.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\LineJoin.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\Matrix.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\MatrixOrder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\PathData.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\PathGradientBrush.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\PathPointType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\PenAlignment.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\PenType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\PixelOffsetMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\QualityMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\RegionData.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\SmoothingMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\WarpMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Drawing2D\WrapMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\BitmapData.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorAdjustType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorChannelFlag.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorMap.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorMapType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorMatrix.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorMatrixFlag.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ColorPalette.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\EmfPlusRecordType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\EmfType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\Encoder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\EncoderParameter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\EncoderParameters.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\EncoderParameterValueType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\EncoderValue.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\FrameDimension.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ImageAttributes.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ImageCodecFlags.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ImageCodecInfo.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ImageFlags.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ImageFormat.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\ImageLockMode.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\Metafile.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\MetafileFrameUnit.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\MetafileHeader.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\MetafileType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\MetaHeader.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\PaletteFlags.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\PixelFormat.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\PlayRecordCallback.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\PropertyItem.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Imaging\WmfPlaceableFileHeader.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\Duplex.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\InvalidPrinterException.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\Margins.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\MarginsConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PageSettings.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PaperKind.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PaperSize.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PaperSource.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PaperSourceKind.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PreviewPageInfo.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PreviewPrintController.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintAction.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintController.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintDocument.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrinterResolution.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrinterResolutionKind.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrinterSettings.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrinterUnit.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrinterUnitConvert.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintEventArgs.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintEventHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintingPermission.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintingPermissionAttribute.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintingPermissionLevel.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintingServices.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintingServicesUnix.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintingServicesWin32.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintPageEventArgs.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintPageEventHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\PrintRange.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\QueryPageSettingsEventArgs.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\QueryPageSettingsEventHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Printing\StandardPrintController.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Text\FontCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Text\GenericFontFamilies.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Text\HotkeyPrefix.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Text\InstalledFontCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Text\PrivateFontCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing.Text\TextRenderingHint.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Bitmap.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Brush.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Brushes.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\BufferedGraphics.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\BufferedGraphicsContext.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\BufferedGraphicsManager.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\carbonFunctions.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\CharacterRange.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Color.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ColorConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ColorTranslator.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ComIStreamMarshaler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ComIStreamWrapper.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ContentAlignment.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\CopyPixelOperation.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Font.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\FontConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\FontFamily.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\FontStyle.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\gdipEnums.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\gdipFunctions.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\gdipStructs.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Graphics.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\GraphicsUnit.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Icon.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\IconConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\IDeviceContext.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Image.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ImageAnimator.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ImageConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ImageFormatConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\KnownColor.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\KnownColors.cs" />
- <Compile Include="System.Drawing\Pen.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Pens.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Point.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\PointConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\PointF.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Rectangle.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\RectangleConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\RectangleF.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Region.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\RotateFlipType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\Size.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SizeConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SizeF.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SizeFConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SolidBrush.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SRDescriptionAttribute.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\StringAligment.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\StringDigitSubstitute.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\StringFormat.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\StringFormatFlags.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\StringTrimming.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\StringUnit.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SystemBrushes.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SystemColors.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SystemFonts.cs" />
- <Compile Include="System.Drawing\SystemIcons.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\SystemPens.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\TextureBrush.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Drawing\ToolboxBitmapAttribute.cs">
- <SubType>Code</SubType>
- </Compile>
- <None Include="System.Drawing.Printing\ChangeLog" />
- <None Include="System.Drawing\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="System" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Assembly\Application.ico" />
- <EmbeddedResource Include="Assembly\Asterisk.ico" />
- <EmbeddedResource Include="Assembly\Error.ico" />
- <EmbeddedResource Include="Assembly\Exclamation.ico" />
- <EmbeddedResource Include="Assembly\Hand.ico" />
- <EmbeddedResource Include="Assembly\Information.ico" />
- <EmbeddedResource Include="Assembly\Mono.ico" />
- <EmbeddedResource Include="Assembly\Question.ico" />
- <EmbeddedResource Include="Assembly\Warning.ico" />
- <EmbeddedResource Include="Assembly\WinLogo.ico" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs b/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs
index 978b9573839..76c66c3fcca 100644
--- a/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs
@@ -48,7 +48,9 @@ namespace System.Drawing.Design
editors [typeof (IList)] = "System.ComponentModel.Design.CollectionEditor, " + Consts.AssemblySystem_Design;
editors [typeof (ICollection)] = "System.ComponentModel.Design.CollectionEditor, " + Consts.AssemblySystem_Design;
editors [typeof (string[])] = "System.Windows.Forms.Design.StringArrayEditor, " + Consts.AssemblySystem_Design;
+#if !MOBILE
TypeDescriptor.AddEditorTable (typeof (UITypeEditor), editors);
+#endif
}
public UITypeEditor()
@@ -86,7 +88,6 @@ namespace System.Drawing.Design
{
return false;
}
-#if !TARGET_JVM
public void PaintValue (object value, Graphics canvas, Rectangle rectangle)
{
PaintValue (new PaintValueEventArgs (null, value, canvas, rectangle));
@@ -99,7 +100,6 @@ namespace System.Drawing.Design
// but on the other hand the class is not abstract. Could never observe it did paint anything
return;
}
-#endif
#if NET_2_0
public virtual bool IsDropDownResizable {
get { return false; }
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/.gitattributes b/mcs/class/System.Drawing/System.Drawing.Drawing2D/.gitattributes
deleted file mode 100644
index a866bb46b06..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-/ExtendedGeneralPath.jvm.cs -crlf
-/GeneralPathIterator.jvm.cs -crlf
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs
deleted file mode 100644
index 62a59f88e67..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// System.Drawing.Drawing2D.AdjustableArrowCap.cs
-//
-// Authors:
-// Dennis Hayes (dennish@Raytek.com)
-// Ravindra (rkumar@novell.com)
-//
-// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com
-// Copyright (C) 2004 Novell, Inc. http://www.novell.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace System.Drawing.Drawing2D
-{
- /// <summary>
- /// Summary description for AdjustableArrowCap.
- /// </summary>
- [MonoNotSupported ("")]
- public sealed class AdjustableArrowCap : CustomLineCap
- {
- // Constructors
-
- [MonoNotSupported ("")]
- public AdjustableArrowCap (float width, float height) : this (width, height, true)
- {
- }
-
- [MonoNotSupported ("")]
- public AdjustableArrowCap (float width, float height, bool isFilled)
- {
- throw new NotImplementedException();
- }
-
- // Public Properities
- [MonoTODO]
- public bool Filled {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
-
- [MonoTODO]
- public float Width {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
-
- [MonoTODO]
- public float Height {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
-
- [MonoTODO]
- public float MiddleInset {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs
index a3cb2e9af5a..7629ddc4eee 100644
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Drawing2D/Blend.cs
@@ -38,9 +38,6 @@ namespace System.Drawing.Drawing2D
/// <summary>
/// Summary description for Blend.
/// </summary>
-#if TARGET_JVM
- [MonoTODO]
-#endif
public sealed class Blend
{
private float [] positions;
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs
deleted file mode 100644
index 099fce0ad35..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/CustomLineCap.jvm.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// System.Drawing.Drawing2D.CustomLineCap.cs
-//
-// Authors:
-// Dennis Hayes (dennish@Raytek.com)
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-// Ravindra (rkumar@novell.com)
-//
-// Copyright (C) 2002/3 Ximian, Inc. http://www.ximian.com
-// Copyright (C) 2004 Novell, Inc. http://www.novell.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace System.Drawing.Drawing2D
-{
- /// <summary>
- /// Summary description for CustomLineCap.
- /// </summary>
- [MonoNotSupported ("")]
- public class CustomLineCap : MarshalByRefObject, ICloneable
- {
- private bool disposed;
-
- // Constructors
-
- internal CustomLineCap () { }
-
- [MonoNotSupported ("")]
- public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath) : this (fillPath, strokePath, LineCap.Flat, 0)
- {
- }
-
- [MonoNotSupported ("")]
- public CustomLineCap (GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap) : this (fillPath, strokePath, baseCap, 0)
- {
- }
-
- [MonoNotSupported ("")]
- public CustomLineCap(GraphicsPath fillPath, GraphicsPath strokePath, LineCap baseCap, float baseInset)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public LineCap BaseCap {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
-
- [MonoTODO]
- public LineJoin StrokeJoin {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
-
- [MonoTODO]
- public float BaseInset {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
-
- [MonoTODO]
- public float WidthScale {
- get {
- throw new NotImplementedException();
- }
-
- set {
- throw new NotImplementedException();
- }
- }
-
- // Public Methods
- [MonoTODO]
- public virtual object Clone ()
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public void GetStrokeCaps (out LineCap startCap, out LineCap endCap)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public void SetStrokeCaps(LineCap startCap, LineCap endCap)
- {
- throw new NotImplementedException();
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs
deleted file mode 100644
index 0b777b6f459..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs
+++ /dev/null
@@ -1,700 +0,0 @@
-//
-// System.Drawing.Drawing2D.ExtendedGeneralPath.cs
-//
-// Author:
-// Bors Kirzner <boris@mainsoft.com>
-//
-// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-using java.awt;
-using java.awt.geom;
-using java.lang;
-
-namespace System.Drawing.Drawing2D
-{
- internal class ExtendedGeneralPath : Shape, ICloneable
- {
- #region Fields
-
- public const int WIND_EVEN_ODD = 0; //PathIterator__Finals.WIND_EVEN_ODD;
- public const int WIND_NON_ZERO = 1; //PathIterator__Finals.WIND_NON_ZERO;
-
- public const sbyte SEG_MOVETO = 0; //(byte) PathIterator__Finals.SEG_MOVETO;
- public const sbyte SEG_LINETO = 1; //(byte) PathIterator__Finals.SEG_LINETO;
- public const sbyte SEG_QUADTO = 2; //(byte) PathIterator__Finals.SEG_QUADTO;
- public const sbyte SEG_CUBICTO = 3; //(byte) PathIterator__Finals.SEG_CUBICTO;
- public const sbyte SEG_CLOSE = 4; //(byte) PathIterator__Finals.SEG_CLOSE;
-
- public const sbyte SEG_START = 16; // segment start
-
- public const sbyte SEG_MASK = SEG_MOVETO | SEG_LINETO | SEG_QUADTO | SEG_CUBICTO | SEG_CLOSE; // mask to eliminate SEG_CLOSE and SEG_MARKER
-
- private const sbyte SEG_MARKER = 32; // path marker
-
-
- private sbyte [] _types;
- private float [] _coords;
- private int _typesCount;
- private int _coordsCount;
- private int _windingRule;
-
- private PathData _pathData;
- private GeneralPath _generalPath;
-
- const int INIT_SIZE = 20;
- const int EXPAND_MAX = 500;
-
- #endregion // Fileds
-
- #region Constructors
-
- public ExtendedGeneralPath() : this (WIND_NON_ZERO, INIT_SIZE, INIT_SIZE)
- {
- }
-
- public ExtendedGeneralPath(int rule) : this (rule, INIT_SIZE, INIT_SIZE)
- {
- }
-
- public ExtendedGeneralPath(int rule, int initialCapacity) : this (rule, initialCapacity, initialCapacity)
- {
- }
-
- public ExtendedGeneralPath(Shape s) : this(WIND_NON_ZERO, INIT_SIZE, INIT_SIZE)
- {
- PathIterator pi = s.getPathIterator (null);
- setWindingRule (pi.getWindingRule ());
- append (pi, false);
- }
-
- private ExtendedGeneralPath(int rule, int initialTypes, int initialCoords)
- {
- setWindingRule(rule);
- Reset (initialTypes, initialCoords);
- }
-
- #endregion // Constructors
-
- #region Properties
-
- private GeneralPath GeneralPath
- {
- get {
- if (_generalPath == null) {
- _generalPath = GetGeneralPath ();
- }
- return _generalPath;
- }
- }
-
- public sbyte [] Types
- {
- get { return _types; }
- }
-
- public float [] Coords
- {
- get { return _coords; }
- }
-
- public int TypesCount
- {
- get { return _typesCount; }
- }
-
- public int CoordsCount
- {
- get { return _coordsCount; }
- }
-
- public bool LastFigureClosed
- {
- get {
- return ((TypesCount == 0) ||
- ((Types [TypesCount - 1] & ExtendedGeneralPath.SEG_CLOSE) != 0) ||
- ((Types [TypesCount - 1] & ExtendedGeneralPath.SEG_START) != 0));
- }
- }
-
- public int PointCount
- {
- get {
- return CoordsCount / 2;
- }
- }
-
- public PathData PathData
- {
- get
- {
- if (_pathData == null)
- _pathData = GetPathData ();
-
- return _pathData;
- }
- }
-
- #endregion // Properties
-
- #region Methods
-
- #region CachedData
-
- private void ClearCache ()
- {
- _pathData = null;
- _generalPath = null;
- }
-
- private GeneralPath GetGeneralPath ()
- {
- PathIterator iter = getPathIterator (null);
- GeneralPath path = new GeneralPath ();
- path.append (iter, false);
- return path;
- }
-
- private PathData GetPathData ()
- {
- PathData pathData = new PathData();
- int nPts = PointCount;
- for (int i = 0; i < TypesCount; i++)
- if ((Types [i] & SEG_MASK) == SEG_QUADTO)
- nPts++;
-
- pathData.Types = new byte [nPts];
- pathData.Points = new PointF [nPts];
- int tpos = 0;
- int ppos = 0;
- int cpos = 0;
- byte marker;
- bool start;
- for (int i = 0; i < TypesCount; i++) {
- sbyte segmentType = (sbyte)(Types [i] & SEG_MASK);
-
- // set the masks and the markers
- marker = ((Types [i] & SEG_MARKER) != 0) ? (byte)PathPointType.PathMarker : (byte)0;
- start = ((Types [i] & SEG_START) != 0);
-
- switch (segmentType) {
- case SEG_CLOSE:
- pathData.Types [tpos - 1] = (byte) (pathData.Types [tpos - 1] | (byte) PathPointType.CloseSubpath | marker);
- break;
- case SEG_MOVETO:
- pathData.Types [tpos++] = (byte)((byte) PathPointType.Start | marker);
- pathData.Points [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]);
- break;
- case SEG_LINETO:
- pathData.Types [tpos++] = (byte) ((byte) PathPointType.Line | marker);
- pathData.Points [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]);
- break;
- case SEG_QUADTO:
- /*
- .net does not support Quadratic curves, so convert to Cubic according to http://pfaedit.sourceforge.net/bezier.html
-
- The end points of the cubic will be the same as the quadratic's.
- CP0 = QP0
- CP3 = QP2
-
- The two control points for the cubic are:
-
- CP1 = QP0 + 2/3 *(QP1-QP0)
- CP2 = CP1 + 1/3 *(QP2-QP0)
- */
-
- float x0 = Coords[cpos-2]; //QP0
- float y0 = Coords[cpos-1]; //QP0
-
- float x1 = x0 + (2/3 * (Coords [cpos++]-x0));
- float y1 = y0 + (2/3 * (Coords [cpos++]-y0));
-
- float x3 = Coords [cpos++]; //QP2
- float y3 = Coords [cpos++]; //QP2
-
- float x2 = x1 + (1/3 * (x3-x0));
- float y2 = y1 + (1/3 * (y3-y0));
-
- pathData.Types [tpos++] = (byte)(byte) PathPointType.Bezier;
- pathData.Points [ppos++] = new PointF (x1, y1);
- pathData.Types [tpos++] = (byte)(byte) PathPointType.Bezier;
- pathData.Points [ppos++] = new PointF (x2, y2);
- pathData.Types [tpos++] = (byte) ((byte)PathPointType.Bezier | marker);
- pathData.Points [ppos++] = new PointF (x3, y3);
- break;
- case SEG_CUBICTO:
- pathData.Types [tpos++] = (byte)(byte) PathPointType.Bezier3;
- pathData.Points [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]);
- pathData.Types [tpos++] = (byte) PathPointType.Bezier3;
- pathData.Points [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]);
- pathData.Types [tpos++] = (byte) ((byte)PathPointType.Bezier3 | marker);
- pathData.Points [ppos++] = new PointF (Coords [cpos++], Coords [cpos++]);
- break;
- }
- }
- return pathData;
- }
-
- #endregion // CachedData
-
- public void append(Shape s)
- {
- append (s, !LastFigureClosed);
- }
-
- #region GeneralPath
-
- public void append(PathIterator pi, bool connect)
- {
- ClearCache ();
- float [] coords = new float [6];
- while (!pi.isDone ()) {
- switch (pi.currentSegment (coords)) {
- case SEG_MOVETO:
- if (!connect || _typesCount < 1 || _coordsCount < 2) {
- moveTo (coords [0], coords [1]);
- break;
- }
- if (_types [_typesCount - 1] != SEG_CLOSE &&
- _coords [_coordsCount - 2] == coords [0] &&
- _coords [_coordsCount - 1] == coords [1])
- break;
- goto case SEG_LINETO;
- case SEG_LINETO:
- lineTo (coords [0], coords [1]);
- break;
- case SEG_QUADTO:
- quadTo (coords [0], coords [1], coords [2], coords [3]);
- break;
- case SEG_CUBICTO:
- curveTo (coords [0], coords [1], coords [2], coords [3], coords [4], coords [5]);
- break;
- case SEG_CLOSE:
- closePath ();
- break;
- }
- pi.next ();
- connect = false;
- }
- }
-
- public void append(Shape s, bool connect)
- {
- PathIterator pi = s.getPathIterator (null);
- append (pi,connect);
- }
-
- public object Clone()
- {
- ExtendedGeneralPath copy = (ExtendedGeneralPath)MemberwiseClone ();
- copy._types = (sbyte []) _types.Clone ();
- copy._coords = (float []) _coords.Clone ();
- return copy;
- }
-
- public void closePath()
- {
- ClearCache ();
- if (_typesCount == 0 || _types[_typesCount - 1] != SEG_CLOSE) {
- needRoom (1, 0, true);
- _types [_typesCount++] = SEG_CLOSE;
- }
- }
-
- public bool contains(double x, double y)
- {
- return GeneralPath.contains (x, y);
- }
-
- public bool contains(double x, double y, double w, double h)
- {
- return GeneralPath.contains (x, y, w, h);
- }
-
- public bool contains(Point2D p)
- {
- return contains (p.getX (), p.getY ());
- }
-
- public bool contains(Rectangle2D r)
- {
- return contains (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
- }
-
- public Shape createTransformedShape(AffineTransform at)
- {
- ExtendedGeneralPath gp = (ExtendedGeneralPath) Clone ();
- if (at != null) {
- gp.transform (at);
- }
- return gp;
- }
-
- public void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
- {
- ClearCache ();
- needRoom (1, 6, true);
- _types [_typesCount++] = SEG_CUBICTO;
- _coords [_coordsCount++] = x1;
- _coords [_coordsCount++] = y1;
- _coords [_coordsCount++] = x2;
- _coords [_coordsCount++] = y2;
- _coords [_coordsCount++] = x3;
- _coords [_coordsCount++] = y3;
- }
-
- public java.awt.Rectangle getBounds()
- {
- return getBounds2D ().getBounds ();
- }
-
- public Rectangle2D getBounds2D()
- {
- float x1, y1, x2, y2;
- int i = _coordsCount;
- if (i > 0) {
- y1 = y2 = _coords [--i];
- x1 = x2 = _coords [--i];
- while (i > 0) {
- float y = _coords [--i];
- float x = _coords [--i];
- if (x < x1) x1 = x;
- if (y < y1) y1 = y;
- if (x > x2) x2 = x;
- if (y > y2) y2 = y;
- }
- }
- else {
- x1 = y1 = x2 = y2 = 0f;
- }
- return new Rectangle2D.Float (x1, y1, x2 - x1, y2 - y1);
- }
-
- public Point2D getCurrentPoint()
- {
- if (_typesCount < 1 || _coordsCount < 2)
- return null;
-
- int index = _coordsCount;
- if (_types [_typesCount - 1] == SEG_CLOSE)
- for (int i = _typesCount - 2; i > 0; i--) {
- switch (_types [i]) {
- case SEG_MOVETO:
- //break loop;
- goto loopend;
- case SEG_LINETO:
- index -= 2;
- break;
- case SEG_QUADTO:
- index -= 4;
- break;
- case SEG_CUBICTO:
- index -= 6;
- break;
- case SEG_CLOSE:
- break;
- }
- }
- loopend:
-
- return new Point2D.Float (_coords [index - 2], _coords [index - 1]);
- }
-
- public PathIterator getPathIterator(AffineTransform at) {
- return new GeneralPathIterator (this, at);
- }
-
- public PathIterator getPathIterator(AffineTransform at, double flatness) {
- return new FlatteningPathIterator (getPathIterator (at), flatness);
- }
-
- public int getWindingRule()
- {
- return _windingRule;
- }
-
- public bool intersects(double x, double y, double w, double h)
- {
- return GeneralPath.intersects (x, y, w, h);
- }
-
- public bool intersects(Rectangle2D r)
- {
- return intersects (r.getX (), r.getY (), r.getWidth (), r.getHeight ());
- }
-
- public void lineTo(float x, float y)
- {
- ClearCache ();
- needRoom (1, 2, true);
- _types [_typesCount++] = SEG_LINETO;
- _coords [_coordsCount++] = x;
- _coords [_coordsCount++] = y;
- }
-
- public void moveTo(float x, float y)
- {
- ClearCache ();
- if (_typesCount > 0 && _types [_typesCount - 1] == SEG_MOVETO) {
- _coords [_coordsCount - 2] = x;
- _coords [_coordsCount - 1] = y;
- }
- else {
- needRoom (1, 2, false);
- _types [_typesCount++] = SEG_MOVETO;
- _coords [_coordsCount++] = x;
- _coords [_coordsCount++] = y;
- }
- }
-
- public void quadTo(float x1, float y1, float x2, float y2)
- {
- // restore quadTo as cubic affects quality
- ClearCache ();
- needRoom (1, 4, true);
- _types [_typesCount++] = SEG_QUADTO;
- _coords [_coordsCount++] = x1;
- _coords [_coordsCount++] = y1;
- _coords [_coordsCount++] = x2;
- _coords [_coordsCount++] = y2;
- }
-
- public void reset()
- {
- ClearCache ();
- _typesCount = 0;
- _coordsCount = 0;
- }
-
- public void setWindingRule(int rule)
- {
- if (rule != WIND_EVEN_ODD && rule != WIND_NON_ZERO) {
- throw new IllegalArgumentException ("winding rule must be WIND_EVEN_ODD or WIND_NON_ZERO");
- }
- _windingRule = rule;
- }
-
- public void transform(AffineTransform at)
- {
- transform(at, 0, CoordsCount);
- }
-
- public void transform(AffineTransform at, int startCoord, int numCoords) {
- ClearCache ();
- at.transform (_coords, startCoord, _coords, startCoord, numCoords/2);
- }
-
- private void needRoom(int newTypes, int newCoords, bool needMove)
- {
- if (needMove && _typesCount == 0)
- throw new IllegalPathStateException ("missing initial moveto in path definition");
-
- int size = _coords.Length;
- if (_coordsCount + newCoords > size) {
- int grow = size;
- if (grow > EXPAND_MAX * 2)
- grow = EXPAND_MAX * 2;
-
- if (grow < newCoords)
- grow = newCoords;
-
- float [] arr = new float [size + grow];
- Array.Copy (_coords, 0, arr, 0, _coordsCount);
- _coords = arr;
- }
- size = _types.Length;
- if (_typesCount + newTypes > size) {
- int grow = size;
- if (grow > EXPAND_MAX)
- grow = EXPAND_MAX;
-
- if (grow < newTypes)
- grow = newTypes;
-
- sbyte [] arr = new sbyte [size + grow];
- Array.Copy (_types, 0, arr, 0, _typesCount);
- _types = arr;
- }
- }
-
- #endregion // GeneralPath
-
- public void SetMarkers()
- {
- ClearCache ();
- if (TypesCount > 0)
- Types [ TypesCount - 1] |= SEG_MARKER;
- }
-
- public void ClearMarkers()
- {
- ClearCache ();
- for (int i = 0; i < TypesCount; i++)
- Types [i] &= ~SEG_MARKER;
- }
-
- public void StartFigure ()
- {
- ClearCache ();
- if (TypesCount > 0)
- Types [TypesCount - 1] |= ExtendedGeneralPath.SEG_START;
- }
-
- private void Reset (int initialTypes, int initialCoords)
- {
- ClearCache ();
- _types = new sbyte [initialTypes];
- _coords = new float [initialCoords * 2];
- _typesCount = 0;
- _coordsCount = 0;
- }
-
- internal void Clear ()
- {
- Reset (INIT_SIZE, INIT_SIZE);
- }
-
- internal void Reverse ()
- {
- ClearCache ();
- // revert coordinates
- for (int i=0, max = CoordsCount / 2; i < max;) {
- int ix = i++;
- int iy = i++;
- int rix = CoordsCount - i;
- int riy = rix + 1;
- float tmpx = Coords [ix];
- float tmpy = Coords [iy];
- Coords [ix] = Coords [rix];
- Coords [iy] = Coords [riy];
- Coords [rix] = tmpx;
- Coords [riy] = tmpy;
- }
-
- // revert types
- sbyte [] newTypes = new sbyte [TypesCount];
- int oldIdx = 0;
- int newIdx = TypesCount - 1;
- int copyStart;
- int copyEnd;
- sbyte mask1 = 0;
- sbyte mask2 = 0;
- sbyte closeMask = 0;
- bool closedFigure = false;
-
- while (oldIdx < TypesCount) {
- // start copying after moveto
- copyStart = ++oldIdx;
- // continue to the next figure start
- while ((Types [oldIdx] != SEG_MOVETO) && (oldIdx < TypesCount))
- oldIdx++;
-
- copyEnd = oldIdx - 1;
- // check whenever current figure is closed
- if ((Types [oldIdx - 1] & SEG_CLOSE) != 0) {
- closedFigure = true;
- // close figure
- newTypes [newIdx--] = (sbyte)(SEG_CLOSE | mask1);
- mask1 = 0;
- mask2 = 0;
- // end copy one cell earlier
- copyEnd--;
- closeMask = (sbyte)(Types [oldIdx - 1] & (sbyte)SEG_MARKER);
- }
- else {
- mask2 = mask1;
- mask1 = 0;
- }
-
- // copy reverted "inner" types
- for(int i = copyStart; i <= copyEnd; i++) {
- newTypes [newIdx--] = (sbyte)((Types [i] & SEG_MASK) | mask2);
- mask2 = mask1;
- mask1 = (sbyte)(Types [i] & (sbyte)SEG_MARKER);
- }
-
- // copy moveto
- newTypes [newIdx--] = SEG_MOVETO;
-
- // pass close mask to the nex figure
- if (closedFigure) {
- mask1 = closeMask;
- closedFigure = false;
- }
- }
-
- _types = newTypes;
- }
-
- public PointF GetLastPoint ()
- {
- if (CoordsCount == 0)
- throw new System.ArgumentException ("Invalid parameter used.");
-
- return new PointF (Coords [CoordsCount - 2], Coords [CoordsCount - 1]);
- }
-
- #endregion //Methods
-
- #region Private helpers
-
-#if DEBUG
- private void Print()
- {
- Console.WriteLine ("\n\n");
- float [] fpoints = _coords;
- int cpos = 0;
- for (int i=0; i < _typesCount; i++) {
- sbyte type = _types [i];
- string marker = String.Empty;
- if ((type & SEG_MARKER) != 0)
- marker = " | MARKER";
-
- switch (type & SEG_MASK) {
- case SEG_CLOSE:
- Console.WriteLine ("CLOSE {0}",marker);
- break;
- case SEG_MOVETO:
- Console.WriteLine("{0}{3} ({1},{2})","MOVETO", fpoints[cpos++], fpoints[cpos++], marker);
- break;
- case SEG_LINETO:
- Console.WriteLine("{0}{3} ({1},{2})","LINETO", fpoints[cpos++], fpoints[cpos++], marker);
- break;
- case SEG_QUADTO:
- Console.WriteLine("{0}{3} ({1},{2})","QUADTO", fpoints[cpos++], fpoints[cpos++], marker);
- Console.WriteLine(" ({1},{2})","QUADTO", fpoints[cpos++], fpoints[cpos++]);
- break;
- case SEG_CUBICTO:
- Console.WriteLine("{0}{3} ({1},{2})","CUBICTO", fpoints[cpos++], fpoints[cpos++], marker);
- Console.WriteLine(" ({1},{2})","CUBICTO", fpoints[cpos++], fpoints[cpos++]);
- Console.WriteLine(" ({1},{2})","CUBICTO", fpoints[cpos++], fpoints[cpos++]);
- break;
- }
- }
- }
-#endif
- #endregion // Private helpers
-
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs
deleted file mode 100644
index 1cfa230a4e8..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs
+++ /dev/null
@@ -1,105 +0,0 @@
-//
-// System.Drawing.Drawing2D.GeneralPathIterator.cs
-//
-// Author:
-// Bors Kirzner <boris@mainsoft.com>
-//
-// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-using java.awt.geom;
-
-namespace System.Drawing.Drawing2D
-{
- internal class GeneralPathIterator : PathIterator
- {
- #region Fields
-
- int typeIdx = 0;
- int pointIdx = 0;
- ExtendedGeneralPath _path;
- AffineTransform _affine;
-
- private static readonly int [] curvesize = {2, 2, 4, 6, 0};
-
- #endregion // Fileds
-
- #region Constructors
-
- public GeneralPathIterator(ExtendedGeneralPath _path) : this (_path, null)
- {
- }
-
- public GeneralPathIterator(ExtendedGeneralPath _path, AffineTransform at)
- {
- this._path = _path;
- this._affine = at;
- }
-
- #endregion // Constructors
-
- #region Methods
-
- public int getWindingRule()
- {
- return _path.getWindingRule ();
- }
-
- public bool isDone()
- {
- return (typeIdx >= _path.TypesCount);
- }
-
- public void next()
- {
- int type = _path.Types [typeIdx++] & ExtendedGeneralPath.SEG_MASK;
- pointIdx += curvesize [type];
- }
-
- public int currentSegment(float [] coords) {
- int type = _path.Types [typeIdx] & ExtendedGeneralPath.SEG_MASK;
- int numCoords = curvesize [type];
- if (numCoords > 0 && _affine != null)
- _affine.transform (_path.Coords, pointIdx, coords, 0, numCoords/2);
- else
- Array.Copy (_path.Coords, pointIdx, coords, 0, numCoords);
- return type;
- }
-
- public int currentSegment(double [] coords)
- {
- int type = _path.Types [typeIdx] & ExtendedGeneralPath.SEG_MASK;
- int numCoords = curvesize [type];
- if (numCoords > 0 && _affine != null)
- _affine.transform (_path.Coords, pointIdx, coords, 0, numCoords/2);
- else
- for (int i=0; i < numCoords; i++)
- coords [i] = _path.Coords [pointIdx + i];
-
- return type;
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs
deleted file mode 100644
index e763dcb098f..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.jvm.cs
+++ /dev/null
@@ -1,1082 +0,0 @@
-//
-// System.Drawing.Drawing2D.GraphicsPath.cs
-//
-// Author:
-// Konstantin Triger <kostat@mainsoft.com>
-// Bors Kirzner <boris@mainsoft.com>
-//
-// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Drawing;
-using System.Drawing.Text;
-using System.Collections;
-using java.awt.geom;
-using java.awt;
-
-namespace System.Drawing.Drawing2D
-{
- public sealed class GraphicsPath : BasicShape, ICloneable
- {
- internal enum JPI {
- SEG_MOVETO = ExtendedGeneralPath.SEG_MOVETO,
- SEG_LINETO = ExtendedGeneralPath.SEG_LINETO,
- SEG_QUADTO = ExtendedGeneralPath.SEG_QUADTO,
- SEG_CUBICTO = ExtendedGeneralPath.SEG_CUBICTO,
- SEG_CLOSE = ExtendedGeneralPath.SEG_CLOSE
- }
-
- #region Internal
-
- internal ExtendedGeneralPath NativeObject
- {
- get
- {
- return (ExtendedGeneralPath)Shape;
- }
- }
-
- GraphicsPath (ExtendedGeneralPath ptr) : base(ptr)
- {
- }
- #endregion
-
- #region C-tors.
- public GraphicsPath ():
- this(FillMode.Alternate)
- {
- }
-
- public GraphicsPath (FillMode fillMode) : this(new ExtendedGeneralPath ())
- {
- FillMode = fillMode;
- }
-
- public GraphicsPath (Point[] pts, byte[] types) : this(pts, types, FillMode.Alternate)
- {
- }
-
- public GraphicsPath (PointF [] pts, byte [] types) : this(pts, types, FillMode.Alternate)
- {
- }
-
- public GraphicsPath (Point [] pts, byte [] types, FillMode fillMode) : this(new ExtendedGeneralPath ())
- {
- FillMode = fillMode;
- SetPath (pts, types);
- }
-
- public GraphicsPath (PointF [] pts, byte [] types, FillMode fillMode) : this(new ExtendedGeneralPath ())
- {
- FillMode = fillMode;
- SetPath (pts, types);
- }
-
- #endregion
-
- #region Clone
- public object Clone ()
- {
- return new GraphicsPath ((ExtendedGeneralPath) NativeObject.Clone ());
- }
- #endregion
-
- #region Properties
- public FillMode FillMode
- {
- get
- { if(NativeObject.getWindingRule() == GeneralPath.WIND_EVEN_ODD)
- return FillMode.Alternate;
- else
- return FillMode.Winding;
- }
-
- set
- {
- if (value == FillMode.Alternate)
- NativeObject.setWindingRule (GeneralPath.WIND_EVEN_ODD);
- else
- NativeObject.setWindingRule (GeneralPath.WIND_NON_ZERO);
- }
- }
-
- public PathData PathData
- {
- get { return NativeObject.PathData; }
- }
-
- public PointF [] PathPoints
- {
- get
- {
- return PathData.Points;
- }
- }
-
- public byte [] PathTypes
- {
- get
- {
- return PathData.Types;
- }
- }
- #endregion
-
- #region PointCount
- public int PointCount
- {
- get
- {
- return NativeObject.PointCount;
- }
- }
- #endregion
-
- #region AddArc
- public void AddArc (Rectangle rect, float startAngle, float sweepAngle)
- {
- AddArc(rect.X,rect.Y,rect.Width,rect.Height,startAngle,sweepAngle);
- }
-
- public void AddArc (RectangleF rect, float startAngle, float sweepAngle)
- {
- AddArc(rect.X,rect.Y,rect.Width,rect.Height,startAngle,sweepAngle);
- }
-
- public void AddArc (int x, int y, int width, int height, float startAngle, float sweepAngle)
- {
- AddArc((float)x,(float)y,(float)width,(float)height,startAngle,sweepAngle);
- }
-
- public void AddArc (float x, float y, float width, float height, float startAngle, float sweepAngle)
- {
- Shape shape = null;
-
- if (sweepAngle >= 360)
- shape = new Ellipse2D.Float(x, y, width, height);
- else {
-
- double d1Tod2 = width/height;
- double sqrd1Tod2 = d1Tod2*d1Tod2;
- double start = ConvertArcAngle(sqrd1Tod2, startAngle);
- double extent = ConvertArcAngle(sqrd1Tod2, startAngle+sweepAngle) - start;
-
- shape = new Arc2D.Double(x,y,width,height,-start,-extent,Arc2D.OPEN);
- }
-
- NativeObject.append(shape);
- }
-
- /// <summary>
- /// .Net computes an angle by intersection of ellipse with a ray
- /// java does the following: x1 = d1*cos(a), y1 = d2*sin(a)
- /// where: d1 = width/2, d2 = height/2
- /// we need to find angle x, which satisfies:
- /// x1 = m*cos(a) = d1*cos(x)
- /// y1 = m*sin(a) = d2*sin(x)
- /// (x1*x1)/(d1*d1) + (x2*x2)/(d2*d2) = 1
- /// </summary>
- /// <param name="sqrd1Tod2">(d1/d2)*(d1/d2)</param>
- /// <param name="angle">angle in degrees</param>
- /// <returns>converted angle in degrees</returns>
- static double ConvertArcAngle(double sqrd1Tod2, double angle) {
- double angleRad = java.lang.Math.toRadians(angle);
- double tan = Math.Tan(angleRad);
- double cosx = 1/Math.Sqrt( sqrd1Tod2 * (tan*tan) + 1);
- double xRad = Math.Acos(cosx);
- double x = java.lang.Math.toDegrees(xRad);
- int q = (Math.Abs((int)angle))/90;
-
- switch (q&3) {
- case 1:
- x = 180-x;
- break;
- case 2:
- x = 180+x;
- break;
- case 3:
- x = 360-x;
- break;
- }
-
- if (angle < 0)
- x = -x;
-
- x += (((int)angle)/360)*360;
-
- return x;
- }
-
- #endregion
-
- #region AddBezier(s)
- public void AddBezier (Point pt1, Point pt2, Point pt3, Point pt4)
- {
- AddBezier(pt1.X,pt1.Y,pt2.X,pt2.Y,pt3.X,pt3.Y,pt4.X,pt4.Y);
- }
-
- public void AddBezier (PointF pt1, PointF pt2, PointF pt3, PointF pt4)
- {
- AddBezier(pt1.X,pt1.Y,pt2.X,pt2.Y,pt3.X,pt3.Y,pt4.X,pt4.Y);
- }
-
- public void AddBezier (int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
- {
- AddBezier((float)x1,(float)y1,(float)x2,(float)y2,(float)x3,(float)y3,(float)x4,(float)y4);
- }
-
- public void AddBezier (float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
- {
- CubicCurve2D cc = new CubicCurve2D.Float(x1,y1,x2,y2,x3,y3,x4,y4);
- NativeObject.append(cc);
- }
-
- public void AddBeziers (Point [] pts)
- {
- if (pts == null)
- throw new ArgumentNullException("points");
-
- AddBezier(pts [0].X,pts [0].Y,
- pts [1].X,pts [1].Y,
- pts [2].X,pts [2].Y,
- pts [3].X,pts [3].Y);
-
- for (int i = 4; i < pts.Length; i += 3) {
- NativeObject.curveTo(
- pts [i].X,pts [i].Y,
- pts [i+1].X,pts [i+1].Y,
- pts [i+2].X,pts [i+2].Y);
- }
- }
-
- public void AddBeziers (PointF [] pts)
- {
- if (pts == null)
- throw new ArgumentNullException("points");
-
- AddBezier(pts [0].X,pts [0].Y,
- pts [1].X,pts [1].Y,
- pts [2].X,pts [2].Y,
- pts [3].X,pts [3].Y);
-
- for (int i = 4; i < pts.Length; i += 3) {
- NativeObject.curveTo(
- pts [i].X,pts [i].Y,
- pts [i+1].X,pts [i+1].Y,
- pts [i+2].X,pts [i+2].Y);
- }
- }
- #endregion
-
- #region AddEllipse
- public void AddEllipse (float x, float y, float width, float height)
- {
- Ellipse2D e = new Ellipse2D.Float(x,y,width,height);
- NativeObject.append(e,false);
- }
-
- public void AddEllipse (RectangleF r)
- {
- AddEllipse(r.X,r.Y,r.Width,r.Height);
- }
-
- public void AddEllipse (Rectangle r)
- {
- AddEllipse(r.X,r.Y,r.Width,r.Height);
- }
-
- public void AddEllipse (int x, int y, int width, int height)
- {
- AddEllipse((float)x, (float)y, (float)width, (float)height);
- }
- #endregion
-
- #region AddLine
- public void AddLine (float x1, float y1, float x2, float y2)
- {
- Line2D l = new Line2D.Float(x1,y1,x2,y2);
- NativeObject.append(l);
- }
-
- public void AddLine (Point a, Point b)
- {
- AddLine(a.X,a.Y,b.X,b.Y);
- }
-
- public void AddLine (PointF a, PointF b)
- {
- AddLine(a.X,a.Y,b.X,b.Y);
- }
-
- public void AddLine (int x1, int y1, int x2, int y2)
- {
- AddLine((float)x1,(float)y1,(float)x2,(float)y2);
- }
-
- public void AddLines (Point [] points)
- {
- if (points == null)
- throw new ArgumentNullException("points");
-
- if (points.Length == 0)
- return;
-
- if (NativeObject.LastFigureClosed)
- NativeObject.moveTo(points[0].X, points[0].Y);
- else
- NativeObject.lineTo(points[0].X, points[0].Y);
-
- for (int i = 1; i < points.Length; i ++)
- NativeObject.lineTo(points[i].X, points[i].Y);
- }
-
- public void AddLines (PointF [] points)
- {
- if (points == null)
- throw new ArgumentNullException("points");
-
- if (points.Length == 0)
- return;
-
- if (NativeObject.LastFigureClosed)
- NativeObject.moveTo(points[0].X, points[0].Y);
- else
- NativeObject.lineTo(points[0].X, points[0].Y);
-
- for (int i = 1; i < points.Length; i ++)
- NativeObject.lineTo(points[i].X, points[i].Y);
- }
- #endregion
-
- #region AddPie
- public void AddPie (float x, float y, float width, float height, float startAngle, float sweepAngle)
- {
- Shape shape = null;
-
- if (sweepAngle >= 360)
- shape = new Ellipse2D.Float(x, y, width, height);
- else {
-
- double d1Tod2 = width/height;
- double sqrd1Tod2 = d1Tod2*d1Tod2;
- double start = ConvertArcAngle(sqrd1Tod2, startAngle);
- double extent = ConvertArcAngle(sqrd1Tod2, startAngle+sweepAngle) - start;
-
- shape = new Arc2D.Double(x,y,width,height,-start,-extent,Arc2D.PIE);
- }
-
- NativeObject.append(shape,false);
- }
-
- public void AddPie (Rectangle rect, float startAngle, float sweepAngle)
- {
- AddPie((float)rect.X, (float)rect.Y,(float)rect.Width,(float)rect.Height,startAngle,sweepAngle);
- }
-
- public void AddPie (int x, int y, int width, int height, float startAngle, float sweepAngle)
- {
- AddPie((float)x,(float)y,(float)width,(float)height,startAngle,sweepAngle);
- }
- #endregion
-
- #region AddPolygon
- public void AddPolygon (Point [] points)
- {
- if (points == null)
- throw new ArgumentNullException("points");
-
- if (points.Length < 3)
- throw new ArgumentException("Invalid parameter used.");
-
- NativeObject.moveTo((float)points[0].X,(float)points[0].Y);
- for (int i = 1; i< points.Length; i++)
- {
- NativeObject.lineTo((float)points[i].X,(float)points[i].Y);
- }
- NativeObject.closePath();
- }
-
- public void AddPolygon (PointF [] points)
- {
- if (points == null)
- throw new ArgumentNullException("points");
-
- if (points.Length < 3)
- throw new ArgumentException("Invalid parameter used.");
-
- NativeObject.moveTo(points[0].X,points[0].Y);
- for (int i = 1; i < points.Length; i++)
- {
- NativeObject.lineTo(points[i].X,points[i].Y);
- }
- NativeObject.closePath();
- }
- #endregion
-
- #region AddRectangle(s)
- internal void AddRectangle(float x,float y, float w, float h)
- {
- NativeObject.moveTo(x, y);
- NativeObject.lineTo (x + w, y);
- NativeObject.lineTo (x + w, y + h);
- NativeObject.lineTo (x, y + h);
- NativeObject.closePath ();
- }
- public void AddRectangle (RectangleF rect)
- {
- AddRectangle(rect.X,rect.Y,rect.Width,rect.Height);
- }
-
- public void AddRectangle (Rectangle rect)
- {
- AddRectangle(rect.X,rect.Y,rect.Width,rect.Height);
- }
-
- public void AddRectangles (Rectangle [] rects)
- {
- foreach(Rectangle rect in rects)
- AddRectangle(rect.X,rect.Y,rect.Width,rect.Height);
- }
-
- public void AddRectangles (RectangleF [] rects)
- {
- foreach(RectangleF rect in rects)
- AddRectangle(rect.X,rect.Y,rect.Width,rect.Height);
- }
- #endregion
-
- #region AddPath
- public void AddPath (GraphicsPath addingPath, bool connect)
- {
- if (NativeObject.LastFigureClosed || addingPath.NativeObject.LastFigureClosed)
- connect = false;
-
- NativeObject.append(addingPath.NativeObject,connect);
- }
- #endregion
-
- #region GetLastPoint
- public PointF GetLastPoint ()
- {
- return NativeObject.GetLastPoint ();
- }
- #endregion
-
- #region Reset
- public void Reset ()
- {
- NativeObject.reset();
- }
- #endregion
-
- #region GetBounds
- public RectangleF GetBounds ()
- {
- return GetBounds (null, null);
- }
-
- public RectangleF GetBounds (Matrix matrix)
- {
- return GetBounds (matrix, null);
- }
-
- public RectangleF GetBounds (Matrix matrix, Pen pen)
- {
- // FIXME : we do not know exacly how the bounding rectangle
- // is calculated so this implementation obtains different bounds
- // that still contains the path widened by oen and transformed by matrix
- // the order of operations is similar to widening, as .Net does.
-
- // first get original shape bounds
- //Shape shape = NativeObject.getBounds2D();
- Shape shape = NativeObject;
-
- // stroke bounds
- if (pen != null)
- shape = ((Stroke)pen).createStrokedShape (shape);
-
- Rectangle2D rect = shape.getBounds2D ();
-
- // transform bounds
- if (matrix != null)
- rect = matrix.NativeObject.createTransformedShape(rect).getBounds2D();
-
- return new RectangleF (rect);
- }
- #endregion
-
- #region Transform
- public void Transform (Matrix matrix)
- {
- if(matrix == null)
- return;
-
- NativeObject.transform(matrix.NativeObject);
- }
- #endregion
-
- #region IsVisible
- public bool IsVisible (Point point)
- {
- return IsVisible (point.X, point.Y, null);
- }
-
- public bool IsVisible (PointF point)
- {
- return IsVisible (point.X, point.Y, null);
- }
-
- public bool IsVisible (int x, int y)
- {
- return IsVisible (x, y, null);
- }
-
- public bool IsVisible (float x, float y)
- {
- return IsVisible (x, y, null);
- }
-
- public bool IsVisible (Point pt, Graphics graphics)
- {
- return IsVisible (pt.X, pt.Y, graphics);
- }
-
- public bool IsVisible (PointF pt, Graphics graphics)
- {
- return IsVisible (pt.X, pt.Y, graphics);
- }
-
- public bool IsVisible (int x, int y, Graphics graphics)
- {
- return IsVisible((float)x,(float)y,null);
- }
-
- public bool IsVisible (float x, float y, Graphics graphics)
- {
- // LAMESPEC : .Net is currently ignorig Graphics object
- //if (graphics != null && !graphics.IsVisible(x,y))
- // return false;
-
- return NativeObject.contains(x,y);
- }
- #endregion
-
- #region Reverse
- public void Reverse ()
- {
- NativeObject.Reverse ();
- }
- #endregion
-
- #region AddClosedCurve
- public void AddClosedCurve (Point [] points)
- {
- AddClosedCurve(points, 0.5f);
- }
-
- public void AddClosedCurve (PointF [] points)
- {
- AddClosedCurve(points, 0.5f);
- }
-
- public void AddClosedCurve (Point [] points, float tension)
- {
- if (points == null)
- throw new ArgumentNullException("points");
-
- if (points.Length < 3)
- throw new ArgumentException("Invalid parameter used.");
-
- int length = (points.Length + 3)*2;
-
- float[] pts = new float[length];
- pts[--length] = points[1].Y;
- pts[--length] = points[1].X;
- pts[--length] = points[0].Y;
- pts[--length] = points[0].X;
-
- for (int i = points.Length-1; i >= 0; i--) {
- pts[--length] = points[i].Y;
- pts[--length] = points[i].X;
- }
-
- pts[--length] = points[points.Length-1].Y;
- pts[--length] = points[points.Length-1].X;
-
- AddCurve(pts, !NativeObject.LastFigureClosed, tension);
- CloseFigure ();
- }
-
- public void AddClosedCurve (PointF [] points, float tension)
- {
- if (points == null)
- throw new ArgumentNullException("points");
-
- if (points.Length < 3)
- throw new ArgumentException("Invalid parameter used.");
-
- int length = (points.Length + 3)*2;
-
- float[] pts = new float[length];
- pts[--length] = points[1].Y;
- pts[--length] = points[1].X;
- pts[--length] = points[0].Y;
- pts[--length] = points[0].X;
-
- for (int i = points.Length-1; i >= 0; i--) {
- pts[--length] = points[i].Y;
- pts[--length] = points[i].X;
- }
-
- pts[--length] = points[points.Length-1].Y;
- pts[--length] = points[points.Length-1].X;
-
- AddCurve(pts, !NativeObject.LastFigureClosed, tension);
- CloseFigure ();
- }
- #endregion
-
- #region AddCurve
- //we have now two approaches for drawing cardinal curves
- //the first one is to convert cardinals into approximate beziers
- //the second one - to draw curve ourself with all interpolation staff
- //here. I preffer the first one because we could utilize java antialiasing and
- //flattening features, otherwise curves will be more strict but less cool
- public void AddCurve (Point [] points)
- {
- AddCurve(points,0.5F);
- }
-
- public void AddCurve (PointF [] points)
- {
- AddCurve(points,0.5f);
- }
-
- public void AddCurve (Point [] points, float tension)
- {
- AddCurve(points, 0, points.Length-1, tension);
- }
-
- public void AddCurve (PointF [] points, float tension)
- {
- AddCurve(points, 0, points.Length-1, tension);
- }
-
- public void AddCurve (Point [] points, int offset, int numberOfSegments, float tension)
- {
- int nPoints = numberOfSegments + 1;
- int length = nPoints*2 + 4;
- float[] pts = new float[length];
-
- int lastP = offset + nPoints;
- if (lastP == points.Length) {
- lastP--;
- pts[--length] = points[lastP].Y;
- pts[--length] = points[lastP].X;
- }
-
- for (; length > 0 && lastP >= 0; lastP--) {
- pts[--length] = points[lastP].Y;
- pts[--length] = points[lastP].X;
- }
-
- if (length > 0) {
- pts[1] = points[0].Y;
- pts[0] = points[0].X;
- }
-
- AddCurve(pts, !NativeObject.LastFigureClosed, tension);
- }
-
- public void AddCurve (PointF [] points, int offset, int numberOfSegments, float tension)
- {
- int nPoints = numberOfSegments + 1;
- int length = nPoints*2 + 4;
- float[] pts = new float[length];
-
- int lastP = offset + nPoints;
- if (lastP == points.Length) {
- lastP--;
- pts[--length] = points[lastP].Y;
- pts[--length] = points[lastP].X;
- }
-
- for (; length > 0 && lastP >= 0; lastP--) {
- pts[--length] = points[lastP].Y;
- pts[--length] = points[lastP].X;
- }
-
- if (length > 0) {
- pts[1] = points[0].Y;
- pts[0] = points[0].X;
- }
-
- AddCurve(pts, !NativeObject.LastFigureClosed, tension);
- }
-
- /// <summary>
- /// Based on http://pubpages.unh.edu/~cs770/a5/cardinal.html
- /// </summary>
- /// <param name="pts">point array (x1,y1,x2,y2 ...).
- /// The first and last points considered only for calculations, but are not added.</param>
- void AddCurve(float[] pts, bool connect, float tension) {
- tension /= 3f; //looks like a good pick
-
- if (connect)
- NativeObject.lineTo(pts[2],pts[3]);
- else
- NativeObject.moveTo(pts[2],pts[3]);
-
- float dx = pts[4] - pts[0];
- float dy = pts[5] - pts[1];
-
- float sx = pts[2] + tension*dx;
- float sy = pts[3] + tension*dy;
-
- for (int offset = 2, total = pts.Length-4; offset < total; offset += 2) {
- int cur_offset = offset;
- int pX = cur_offset++;
- int pY = cur_offset++;
- int X = cur_offset++;
- int Y = cur_offset++;
- int nX = cur_offset++;
- int nY = cur_offset++;
-
- dx = pts[nX] - pts[pX];
- dy = pts[nY] - pts[pY];
-
- float rx = pts[X] - tension*dx;
- float ry = pts[Y] - tension*dy;
-
- NativeObject.curveTo(sx, sy, rx, ry, pts[X], pts[Y]);
-
- sx = pts[X] + tension*dx;
- sy = pts[Y] + tension*dy;
- }
- }
- #endregion
-
- #region AddString
- public void AddString (string s, FontFamily family, int style, float emSize, Point origin, StringFormat format)
- {
- AddString(s, new Font(family, emSize, (FontStyle)style, GraphicsUnit.World), origin.X, origin.Y, float.PositiveInfinity, float.PositiveInfinity,
- format);
- }
-
- public void AddString (string s, FontFamily family, int style, float emSize, PointF origin, StringFormat format)
- {
- AddString(s, new Font(family, emSize, (FontStyle)style, GraphicsUnit.World), origin.X, origin.Y, float.PositiveInfinity, float.PositiveInfinity,
- format);
- }
-
- public void AddString (string s, FontFamily family, int style, float emSize, Rectangle layoutRect, StringFormat format)
- {
- AddString(s, new Font(family, emSize, (FontStyle)style, GraphicsUnit.World),
- layoutRect.X, layoutRect.Y, layoutRect.Width, layoutRect.Height,
- format);
- }
-
- public void AddString (string s, FontFamily family, int style, float emSize, RectangleF layoutRect, StringFormat format)
- {
- AddString(s, new Font(family, emSize, (FontStyle)style, GraphicsUnit.World),
- layoutRect.X, layoutRect.Y, layoutRect.Width, layoutRect.Height,
- format);
- }
-
- void AddString (string s, Font font,
- float x, float y, float width, float height,
- StringFormat format) {
-
- TextLineIterator iter = new TextLineIterator(s, font,
- new java.awt.font.FontRenderContext(null, false, false),
- format, width, height);
-
- int coordsCount = NativeObject.CoordsCount;
-
- for (LineLayout layout = iter.NextLine(); layout != null; layout = iter.NextLine()) {
- NativeObject.append(layout.GetOutline(x, y), false);
- }
-
- AffineTransform lineAlignT = iter.CalcLineAlignmentTransform();
- if (lineAlignT != null)
- NativeObject.transform(lineAlignT, coordsCount, NativeObject.CoordsCount - coordsCount);
- }
- #endregion
-
- #region ClearMarkers
- public void ClearMarkers()
- {
- NativeObject.ClearMarkers ();
- }
- #endregion
-
- #region Close
- public void CloseAllFigures()
- {
- ExtendedGeneralPath p = new ExtendedGeneralPath();
- PathIterator pi = NativeObject.getPathIterator(null);
- JPI lastSeg = JPI.SEG_CLOSE;
- float [] points = new float[6];
-
- p.setWindingRule(pi.getWindingRule());
- while(!pi.isDone())
- {
- JPI curSeg = (JPI)pi.currentSegment(points);
- switch(curSeg)
- {
- case JPI.SEG_CLOSE:
- p.closePath();
- break;
- case JPI.SEG_MOVETO:
- if(lastSeg != JPI.SEG_CLOSE)
- p.closePath();
- p.moveTo(points[0],points[1]);
- break;
- case JPI.SEG_LINETO:
- p.lineTo(points[0],points[1]);
- break;
- case JPI.SEG_QUADTO:
- p.quadTo(points[0],points[1],points[2],points[3]);
- break;
- case JPI.SEG_CUBICTO:
- p.curveTo(points[0],points[1],points[2],points[3],points[4],points[5]);
- break;
- default:
- break;
- }
- lastSeg = curSeg;
- pi.next();
- }
-
- p.closePath();
- Shape = p;
- }
-
- public void CloseFigure() {
- if (!NativeObject.LastFigureClosed)
- NativeObject.closePath();
- }
- #endregion
-
- #region Flatten
- public void Flatten ()
- {
- // 1/4 is the FlatnessDefault as defined in GdiPlusEnums.h
- Flatten (null, 1.0f / 4.0f);
- }
-
- public void Flatten (Matrix matrix)
- {
- Flatten (matrix, 1.0f / 4.0f);
- }
-
- public void Flatten (Matrix matrix, float flatness)
- {
- AffineTransform tr = null;
- if(matrix != null)
- tr = matrix.NativeObject;
-
- //FIXME : Review (perfomance reasons).
- PathIterator pi = NativeObject.getPathIterator(tr,flatness);
- ExtendedGeneralPath newPath = new ExtendedGeneralPath();
- newPath.append(pi,false);
- Shape = newPath;
- }
- #endregion
-
- #region GetOutlineVisible
- public bool IsOutlineVisible (Point point, Pen pen)
- {
- return IsOutlineVisible (point.X, point.Y, pen, null);
- }
-
- public bool IsOutlineVisible (PointF point, Pen pen)
- {
- return IsOutlineVisible (point.X, point.Y, pen, null);
- }
-
- public bool IsOutlineVisible (int x, int y, Pen pen)
- {
- return IsOutlineVisible (x, y, pen, null);
- }
-
- public bool IsOutlineVisible (float x, float y, Pen pen)
- {
- return IsOutlineVisible (x, y, pen, null);
- }
-
- public bool IsOutlineVisible (Point pt, Pen pen, Graphics graphics)
- {
- return IsOutlineVisible (pt.X, pt.Y, pen, graphics);
- }
-
- public bool IsOutlineVisible (PointF pt, Pen pen, Graphics graphics)
- {
- return IsOutlineVisible (pt.X, pt.Y, pen, graphics);
- }
-
- public bool IsOutlineVisible (int x, int y, Pen pen, Graphics graphics)
- {
- // LAMESPEC : .Net is currently ignorig Graphics object
- //if (graphics != null) {
- // if (!graphics.IsVisible (x, y))
- // return false;
- //}
-
- return ((Stroke)pen).createStrokedShape (NativeObject).contains (x, y);
- }
-
- public bool IsOutlineVisible (float x, float y, Pen pen, Graphics graphics)
- {
- return ((Stroke)pen).createStrokedShape (NativeObject).contains (x, y);
- }
- #endregion
-
- #region SetMarkers
- public void SetMarkers ()
- {
- NativeObject.SetMarkers ();
- }
- #endregion
-
- #region StartFigure
- public void StartFigure()
- {
- NativeObject.StartFigure ();
- }
- #endregion
-
- #region Warp
- [MonoNotSupported ("")]
- public void Warp (PointF[] destPoints, RectangleF srcRect)
- {
- Warp (destPoints, srcRect, null, WarpMode.Perspective, 1.0f / 4.0f);
- }
-
- [MonoNotSupported ("")]
- public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix)
- {
- Warp (destPoints, srcRect, matrix, WarpMode.Perspective, 1.0f / 4.0f);
- }
-
- [MonoNotSupported ("")]
- public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode)
- {
- Warp (destPoints, srcRect, matrix, warpMode, 1.0f / 4.0f);
- }
-
- [MonoNotSupported ("")]
- public void Warp (PointF[] destPoints, RectangleF srcRect, Matrix matrix, WarpMode warpMode, float flatness)
- {
- throw new NotImplementedException();
- }
- #endregion
-
- #region Widen
- public void Widen (Pen pen)
- {
- Widen (pen, null);
- }
-
- public void Widen (Pen pen, Matrix matrix)
- {
- Widen (pen, matrix, 2f/3f);
- }
-
- public void Widen (Pen pen, Matrix matrix, float flatness)
- {
- if (pen == null)
- throw new ArgumentNullException("pen");
-
- Shape = new ExtendedGeneralPath(((Stroke)pen).createStrokedShape(this));
- Flatten(matrix, flatness);
- }
- #endregion
-
- private void SetPath (Point [] pts, byte [] types)
- {
- NativeObject.Clear ();
- if (((PathPointType)types [0] & PathPointType.PathTypeMask) != PathPointType.Start)
- NativeObject.moveTo (pts [0].X, pts [0].Y);
-
- for (int i=0; i < pts.Length; i++) {
- switch (((PathPointType)types [i] & PathPointType.PathTypeMask)) {
- case PathPointType.Start :
- NativeObject.moveTo (pts [i].X, pts [i].Y);
- break;
- case PathPointType.Line :
- NativeObject.lineTo (pts [i].X, pts [i].Y);
- break;
- case PathPointType.Bezier3 :
- float x1 = pts [i].X;
- float y1 = pts [i].Y;
- i++;
- float x2 = pts [i].X;
- float y2 = pts [i].Y;
- i++;
- float x3 = pts [i].X;
- float y3 = pts [i].Y;
- NativeObject.curveTo (x1,y1, x2, y2, x3, y3);
- break;
- }
- if (((PathPointType)types [i] & PathPointType.CloseSubpath) != 0)
- NativeObject.closePath();
-
- if (((PathPointType)types [i] & PathPointType.PathMarker) != 0)
- NativeObject.SetMarkers ();
- }
- }
-
- internal void SetPath (PointF [] pts, byte [] types)
- {
- NativeObject.Clear ();
- if (((PathPointType)types [0] & PathPointType.PathTypeMask) != PathPointType.Start)
- NativeObject.moveTo (pts [0].X, pts [0].Y);
- for (int i=0; i < pts.Length; i++) {
- switch (((PathPointType)types [i] & PathPointType.PathTypeMask)) {
- case PathPointType.Start :
- NativeObject.moveTo (pts [i].X, pts [i].Y);
- break;
- case PathPointType.Line :
- NativeObject.lineTo (pts [i].X, pts [i].Y);
- break;
- case PathPointType.Bezier3 :
- float x1 = pts [i].X;
- float y1 = pts [i].Y;
- i++;
- float x2 = pts [i].X;
- float y2 = pts [i].Y;
- i++;
- float x3 = pts [i].X;
- float y3 = pts [i].Y;
- NativeObject.curveTo (x1,y1, x2, y2, x3, y3);
- break;
- }
- if (((PathPointType)types [i] & PathPointType.CloseSubpath) != 0)
- NativeObject.closePath();
-
- if (((PathPointType)types [i] & PathPointType.PathMarker) != 0)
- NativeObject.SetMarkers ();
- }
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs
deleted file mode 100644
index 7cdd36c128b..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs
+++ /dev/null
@@ -1,220 +0,0 @@
-//
-// System.Drawing.Drawing2D.GraphicsPathIterator.cs
-//
-// Author:
-// Bors Kirzner <boris@mainsoft.com>
-//
-// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Drawing;
-
-namespace System.Drawing.Drawing2D
-{
- public sealed class GraphicsPathIterator : MarshalByRefObject, IDisposable
- {
- #region Fields
-
- private readonly GraphicsPath _path;
- private int _marker = -1;
- private int _subpath = -1;
-
- #endregion // Fields
-
- #region Constructors
-
- public GraphicsPathIterator (GraphicsPath path)
- {
- _path = path;
- }
-
- #endregion // Constructors
-
- #region Properites
-
- public int Count
- {
- get { return _path.NativeObject.PointCount; }
- }
-
- public int SubpathCount {
- get {
- int count = 0;
- int start, end;
- bool isClosed;
- while (NextSubpath (out start, out end, out isClosed) != 0)
- count++;
- return count;
- }
- }
-
- #endregion // Properties
-
- #region Methods
-
- public int CopyData (ref PointF [] points, ref byte [] types, int startIndex, int endIndex)
- {
- int j = 0;
- for (int i = startIndex; i <= endIndex && i < _path.PointCount; i++) {
- points [j] = _path.PathPoints [i];
- types [j++] = _path.PathTypes [i];
- }
- return j;
- }
-
- public void Dispose ()
- {
- }
-
- public int Enumerate (ref PointF [] points, ref byte [] types)
- {
- return CopyData (ref points, ref types, 0, _path.PointCount);
- }
-
- public bool HasCurve ()
- {
- byte [] types = _path.PathTypes;
- for (int i=0; i < types.Length; i++)
- if ((types [i] & (byte)PathPointType.PathTypeMask) == (byte)PathPointType.Bezier3)
- return true;
- return false;
- }
-
- public int NextMarker (GraphicsPath path)
- {
- if (path == null)
- return 0;
-
- int startIndex;
- int endIndex;
- int count = NextMarker (out startIndex, out endIndex);
-
- if (count != 0)
- SetPath (_path, startIndex, count, path);
-
- return count;
- }
-
- public int NextMarker (out int startIndex, out int endIndex)
- {
- if (_marker >= _path.PointCount) {
- startIndex = 0;
- endIndex = 0;
- return 0;
- }
-
- startIndex = ++_marker;
- while ((_marker < _path.PointCount) && ((_path.PathTypes [_marker] & (byte)PathPointType.PathMarker) == 0))
- _marker++;
-
- endIndex = (_marker < _path.PointCount) ? _marker : _path.PointCount - 1;
- return endIndex - startIndex + 1;
- }
-
- public int NextPathType (out byte pathType, out int startIndex, out int endIndex)
- {
- if ((_subpath >= _path.PointCount - 1) | (_subpath < 0)) {
- startIndex = 0;
- endIndex = 0;
- pathType = (_subpath < 0) ? (byte)PathPointType.Start : _path.PathTypes [_path.PointCount - 1];
- return 0;
- }
-
- // .net acts different, but it seems to be a bug
- if ((_path.PathTypes [_subpath + 1] & (byte)PathPointType.PathMarker) != 0) {
- startIndex = 0;
- endIndex = 0;
- pathType = _path.PathTypes [_subpath];
- return 0;
- }
-
- startIndex = _subpath++;
- endIndex = startIndex;
- pathType = (byte)(_path.PathTypes [startIndex + 1] & (byte)PathPointType.PathTypeMask);
-
- while (((_subpath) < _path.PointCount) && ((_path.PathTypes [_subpath] & (byte)PathPointType.PathTypeMask) == pathType))
- _subpath++;
-
- endIndex = (_subpath < _path.PointCount) ? --_subpath : _path.PointCount - 1;
- return endIndex - startIndex + 1;
- }
-
- public int NextSubpath (GraphicsPath path, out bool isClosed)
- {
- int startIndex;
- int endIndex;
- int count = NextSubpath (out startIndex, out endIndex, out isClosed);
-
- if ((count != 0) && (path != null))
- SetPath (_path, startIndex, count, path);
-
- return count;
- }
-
- private void SetPath (GraphicsPath source, int start, int count, GraphicsPath target)
- {
- PointF [] points = new PointF [count];
- byte [] types = new byte [count];
- PointF [] pathPoints = _path.PathPoints;
- byte [] pathTypes = _path.PathTypes;
-
- for (int i = 0; i < count; i++) {
- points [i] = pathPoints [start + i];
- types [i] = pathTypes [start + i];
- }
-
- target.SetPath (points, types);
- }
-
- public int NextSubpath (out int startIndex, out int endIndex, out bool isClosed)
- {
- _subpath++;
- while (((_subpath) < _path.PointCount) && (_path.PathTypes [_subpath] != (byte)PathPointType.Start))
- _subpath++;
-
-
- if (_subpath >= _path.PointCount - 1) {
- startIndex = 0;
- endIndex = 0;
- isClosed = true;
- return 0;
- }
-
- startIndex = _subpath;
- int offset = 1;
- while (((_subpath + offset) < _path.PointCount) && (_path.PathTypes [_subpath + offset] != (byte)PathPointType.Start))
- offset++;
-
- endIndex = ((_subpath + offset) < _path.PointCount) ? _subpath + offset - 1 : _path.PointCount - 1;
- isClosed = (_path.PathTypes [endIndex] & (byte)PathPointType.CloseSubpath) != 0;
- return endIndex - startIndex + 1;
- }
-
- public void Rewind ()
- {
- _marker = -1;
- _subpath = -1;
- }
-
- #endregion // Methods
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs
deleted file mode 100644
index 1cfb65ad375..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsState.jvm.cs
+++ /dev/null
@@ -1,150 +0,0 @@
-//
-// System.Drawing.Drawing2D.ExtendedGraphicsState.jvm.cs
-//
-// Author:
-// Vladimir Krasnov (vladimirk@mainsoft.com)
-//
-// Copyright (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Drawing.Text;
-using geom = java.awt.geom;
-using awt = java.awt;
-
-namespace System.Drawing.Drawing2D
-{
- /// <summary>
- /// Summary description for GraphicsState.
- /// </summary>
- public sealed class GraphicsState : MarshalByRefObject
- {
- readonly CompositingMode _compositingMode;
- readonly CompositingQuality _compositingQuality;
- readonly Region _clip;
- readonly awt.Shape _baseClip;
- readonly InterpolationMode _interpolationMode;
- readonly float _pageScale;
- readonly GraphicsUnit _pageUnit;
- readonly PixelOffsetMode _pixelOffsetMode;
- readonly Point _renderingOrigin;
- readonly SmoothingMode _smoothingMode;
- readonly int _textContrast;
- readonly TextRenderingHint _textRenderingHint;
-
- // additional transform in case that new container has one
- readonly Matrix _transform;
- readonly Matrix _baseTransform;
-
- GraphicsState _next = null;
-
- internal GraphicsState(Graphics graphics, bool resetState)
- : this(graphics, Matrix.IdentityTransform, resetState) {}
-
- internal GraphicsState Next {
- get {
- return _next;
- }
- set {
- _next = value;
- }
- }
-
- internal GraphicsState(Graphics graphics, Matrix matrix, bool resetState)
- {
- _compositingMode = graphics.CompositingMode;
- _compositingQuality = graphics.CompositingQuality;
- _clip = graphics.ScaledClip;
- _baseClip = graphics.NativeObject.getClip();
- _interpolationMode = graphics.InterpolationMode;
- _pageScale = graphics.PageScale;
- _pageUnit = graphics.PageUnit;
- _pixelOffsetMode = graphics.PixelOffsetMode;
-
- // FIXME: render orign is not implemented yet
- //_renderingOrigin = new Point( g.RenderingOrigin.X, g.RenderingOrigin.Y );
-
- _smoothingMode = graphics.SmoothingMode;
- _transform = graphics.Transform;
- _baseTransform = graphics.BaseTransform;
-
- _textContrast = graphics.TextContrast;
- _textRenderingHint = graphics.TextRenderingHint;
-
- if (resetState)
- ResetState(graphics, matrix);
- }
-
- internal void RestoreState(Graphics graphics)
- {
- graphics.CompositingMode = _compositingMode;
- graphics.CompositingQuality = _compositingQuality;
- graphics.ScaledClip = _clip;
- graphics.InterpolationMode = _interpolationMode;
- graphics.PageScale = _pageScale;
- graphics.PageUnit = _pageUnit;
- graphics.PixelOffsetMode = _pixelOffsetMode;
-
- // FIXME: render orign is not implemented yet
- //graphics.RenderingOrigin = new Point( _renderingOrigin.X, _renderingOrigin.Y );
-
- graphics.SmoothingMode = _smoothingMode;
- graphics.Transform = _transform;
- graphics.BaseTransform = _baseTransform;
- graphics.TextContrast = _textContrast;
- graphics.TextRenderingHint = _textRenderingHint;
-
- // must be set after the base transform is restored
- graphics.NativeObject.setClip(_baseClip);
- }
-
- void ResetState(Graphics graphics, Matrix matrix)
- {
- //should be set before the base transform is changed
- if (_baseClip == null)
- graphics.IntersectScaledClipWithBase(graphics.VisibleShape);
-
- graphics.CompositingMode = CompositingMode.SourceOver;
- graphics.CompositingQuality = CompositingQuality.Default;
- graphics.ScaledClip = Region.InfiniteRegion;
- graphics.InterpolationMode = InterpolationMode.Bilinear;
- graphics.PageScale = 1.0f;
- graphics.PageUnit = GraphicsUnit.Display;
- graphics.PixelOffsetMode = PixelOffsetMode.Default;
-
- // FIXME: render orign is not implemented yet
- //graphics.RenderingOrigin = new Point(0, 0);
-
- graphics.SmoothingMode = SmoothingMode.None;
- graphics.ResetTransform();
- graphics.PrependBaseTransform(Graphics.GetFinalTransform(_transform.NativeObject, _pageUnit, _pageScale));
- graphics.PrependBaseTransform(matrix.NativeObject);
- graphics.TextContrast = 4;
- graphics.TextRenderingHint = TextRenderingHint.SystemDefault;
- }
-
- internal void RestoreBaseClip(Graphics graphics) {
- graphics.NativeObject.setClip(_baseClip);
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs
deleted file mode 100644
index 7d64fe85af9..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.jvm.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-
-using System;
-using java.awt;
-namespace System.Drawing.Drawing2D
-{
- /// <summary>
- /// Summary description for HatchBrush.
- /// </summary>
- public sealed class HatchBrush : Brush
- {
- private HatchStyle _style;
- private Color _foreColor;
- private Color _backColor;
-
- [MonoTODO]
- public HatchBrush (HatchStyle hatchStyle, Color foreColor)
- : this (hatchStyle, foreColor, Color.Black)
- {
- }
-
- [MonoTODO]
- public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor)
- {
- _style = hatchStyle;
- _foreColor = foreColor;
- _backColor = backColor;
- }
-
- public Color BackgroundColor {
- get {
- return _backColor;
- }
- }
-
- public Color ForegroundColor {
- get {
- return _foreColor;
- }
- }
-
- public HatchStyle HatchStyle {
- get {
- return _style;
- }
- }
-
- public override object Clone ()
- {
- return new HatchBrush (_style, _foreColor, _backColor);
- }
-
- protected override Paint NativeObject {
- get {
- // FALLBACK: Solid color brush will be used
- return _foreColor.NativeObject;
- }
- }
-
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs
deleted file mode 100644
index 7d728a1058b..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs
+++ /dev/null
@@ -1,346 +0,0 @@
-using System;
-using java.awt;
-using awt = java.awt;
-using geom = java.awt.geom;
-using image = java.awt.image;
-
-namespace System.Drawing.Drawing2D {
- /// <summary>
- /// Summary description for LinearGradientBrush.
- /// </summary>
- public sealed class LinearGradientBrush : Brush {
- Blend _blend;
- bool _gammaCorrection;
- ColorBlend _interpolationColors;
- WrapMode _wrapmode;
- RectangleF _gradientRectangle;
-
- // gradient brush data
- float _x1 = 0;
- float _y1 = 0;
-
- float _x2 = 0;
- float _y2 = 0;
-
- Color _color1, _color2;
- bool _cyclic;
-
- #region NativeObject
-
- GradientPaint _nativeObject = null;
- protected override Paint NativeObject {
- get {
- if ( _nativeObject == null )
- _nativeObject = new GradientPaint(
- _x1, _y1,
- new java.awt.Color(_color1.R, _color1.G, _color1.B, _color1.A),
- _x2, _y2,
- new java.awt.Color(_color2.R, _color2.G, _color2.B, _color2.A), _cyclic);
-
- return _nativeObject;
- }
- }
-
- #endregion
-
- #region Initialization
-
- private void Init(float x1, float y1, Color color1, float x2, float y2, Color color2, bool cyclic) {
- _x1 = x1;
- _y1 = y1;
- _color1 = color1;
-
- _x2 = x2;
- _y2 = y2;
- _color2 = color2;
-
- _cyclic = cyclic;
- _nativeObject = null;
- }
-
- private void Init(float x1, float y1, Color color1, float x2, float y2, Color color2, float angle) {
- _gradientRectangle = new RectangleF(x1, y1, x2-x1, y2-y1);
- PointF [] points = GetMedianeEnclosingRect(x1, y1, x2, y2, angle);
- Init(points[0].X, points[0].Y, color1, points[1].X, points[1].Y, color2, false);
- }
-
- private void Init(float x1, float y1, Color color1, float x2, float y2, Color color2, LinearGradientMode linearGradientMode) {
- _gradientRectangle = new RectangleF(x1, y1, x2-x1, y2-y1);
- PointF [] points;
-
- switch (linearGradientMode) {
- case LinearGradientMode.Horizontal :
- Init(x1, y1, color1, x2, y1, color2, false);
- break;
-
- case LinearGradientMode.Vertical :
- Init(x1, y1, color1, x1, y2, color2, false);
- break;
-
- case LinearGradientMode.BackwardDiagonal :
- points = GetMedianeEnclosingRect(x1, y1, x2, y2, false);
- Init(points[0].X, points[0].Y, color2, points[1].X, points[1].Y, color1, false);
- break;
-
- case LinearGradientMode.ForwardDiagonal :
- points = GetMedianeEnclosingRect(x1, y1, x2, y2, true);
- Init(points[0].X, points[0].Y, color1, points[1].X, points[1].Y, color2, false);
- break;
-
- default :
- throw new ArgumentException("LinearGradientMode");
- }
- }
-
- #endregion
-
- #region Constructors
-
- private LinearGradientBrush (float x1, float y1, Color color1, float x2, float y2, Color color2, bool cyclic) {
- Init(x1, y1, color1, x2, y2, color2, cyclic);
- }
-
- internal LinearGradientBrush (float x1, float y1, Color color1, float x2, float y2, Color color2, LinearGradientMode mode) {
- Init(x1, y1, color1, x2, y2, color2, mode);
- }
- internal LinearGradientBrush (float x1, float y1, Color color1, float x2, float y2, Color color2) {
- Init(x1, y2, color1, x1, y2, color2, false);
- }
- public LinearGradientBrush (Point point1, Point point2, Color color1, Color color2) {
- _gradientRectangle = new RectangleF(point1.X, point1.Y, point2.X - point1.X, point2.Y - point2.Y);
- Init(point1.X, point1.Y, color1, point2.X, point2.Y, color2, false);
- }
- public LinearGradientBrush (PointF point1, PointF point2, Color color1, Color color2) {
- _gradientRectangle = new RectangleF(point1.X, point1.Y, point2.X - point1.X, point2.Y - point2.Y);
- Init(point1.X, point1.Y, color1, point2.X, point2.Y, color2, false);
- }
- public LinearGradientBrush (Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode) {
- Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, linearGradientMode);
- }
- public LinearGradientBrush (RectangleF rect, Color color1, Color color2, LinearGradientMode linearGradientMode) {
- Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, linearGradientMode);
- }
- public LinearGradientBrush (Rectangle rect, Color color1, Color color2, float angle) {
- Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, angle);
- }
- public LinearGradientBrush (RectangleF rect, Color color1, Color color2, float angle) {
- Init(rect.X, rect.Y, color1, rect.X + rect.Width, rect.Y + rect.Height, color2, angle);
- }
- public LinearGradientBrush (Rectangle rect, Color color1, Color color2, float angle, bool isAngleScaleable):
- this(rect, color1, color2, angle) {
- }
- public LinearGradientBrush (RectangleF rect, Color color1, Color color2, float angle, bool isAngleScaleable):
- this(rect, color1, color2, angle) {
- }
- #endregion
-
- #region GetMedianeEnclosingRect
-
- internal PointF [] GetMedianeEnclosingRect(float x1, float y1, float x2, float y2, float rotateAngle) {
- float width = x2 - x1;
- float height = y2 - y1;
- PointF rectCenter = new PointF(x1 + width/2, y1 + height/2);
- float gradLen = width * Math.Abs((float)Math.Cos(rotateAngle * Math.PI / 180)) +
- height * Math.Abs((float)Math.Sin(rotateAngle * Math.PI / 180));
-
- PointF [] points = new PointF []{ new PointF(rectCenter.X - gradLen/2, rectCenter.Y),
- new PointF(rectCenter.X + gradLen/2, rectCenter.Y) };
-
- Matrix mx = new Matrix();
- mx.RotateAt((float)rotateAngle, rectCenter);
- mx.TransformPoints(points);
- return points;
- }
- internal PointF [] GetMedianeEnclosingRect(float x1, float y1, float x2, float y2, bool forwardDiagonal) {
- float width = x2 - x1;
- float height = y2 - y1;
- PointF rectCenter = new PointF(x1 + width/2, y1 + height/2);
- float rotateAngle = (float)Math.Atan2(width, height);
- float gradLen = width * (float)Math.Cos(rotateAngle);
-
- if (!forwardDiagonal)
- rotateAngle = -rotateAngle;
-
- PointF [] points = new PointF []{ new PointF(rectCenter.X - gradLen, rectCenter.Y),
- new PointF(rectCenter.X + gradLen, rectCenter.Y) };
-
- Matrix mx = new Matrix();
- mx.RotateAt((float)rotateAngle * (float)(180/Math.PI), rectCenter);
- mx.TransformPoints(points);
- return points;
- }
-
- #endregion
-
- #region Public Properties
-
- // FALLBACK: no functionality implemented for this property
- [MonoTODO]
- public Blend Blend {
- get {
- return _blend;
- }
- set {
- _blend = value;
- }
- }
-
- // FALLBACK: no functionality implemented for this property
- [MonoTODO]
- public bool GammaCorrection {
- get {
- return _gammaCorrection;
- }
- set {
- _gammaCorrection = value;
- }
- }
-
- // FALLBACK: functionality of two color gradient is implemented
- [MonoTODO]
- public ColorBlend InterpolationColors {
- get {
- return _interpolationColors;
- }
- set {
- if (value == null)
- throw new ArgumentNullException("ColorBlend");
-
- if ( (value.Colors == null) || (value.Colors.Length == 0) )
- throw new ArgumentException("ColorBlend");
-
- _interpolationColors = value;
-
- _color1 = value.Colors[0];
- _color2 = value.Colors[value.Colors.Length - 1];
- _nativeObject = null;
- }
- }
-
- public Color [] LinearColors {
- get {
- Color [] cl = new Color[2];
- cl[0] = _color1;
- cl[1] = _color2;
- return cl;
- }
- set {
- if (value == null)
- throw new ArgumentNullException("colors");
-
- _color1 = value[0];
- _color2 = value[1];
- _nativeObject = null;
- }
- }
-
- public RectangleF Rectangle {
- get {
- return _gradientRectangle;
- }
- }
-
- public Matrix Transform {
- get { return BrushTransform; }
- set { BrushTransform = value; }
- }
-
- // FALLBACK: not functionality implemented for this property
- [MonoTODO]
- public WrapMode WrapMode {
- get {
- return _wrapmode;
- }
- set {
- _wrapmode = value;
- }
- }
- #endregion
-
- #region Public Methods
-
- public void MultiplyTransform (Matrix matrix) {
- BrushMultiplyTransform(matrix, MatrixOrder.Prepend);
- }
-
- public void MultiplyTransform (Matrix matrix, MatrixOrder order) {
- BrushMultiplyTransform(matrix, order);
- }
-
- public void ResetTransform () {
- BrushResetTransform();
- }
-
- public void RotateTransform (float angle) {
- BrushRotateTransform(angle, MatrixOrder.Prepend);
- }
-
- public void RotateTransform (float angle, MatrixOrder order) {
- BrushRotateTransform(angle, order);
- }
-
- public void ScaleTransform (float sx, float sy) {
- BrushScaleTransform(sx, sy, MatrixOrder.Prepend);
- }
-
- public void ScaleTransform (float sx, float sy, MatrixOrder order) {
- BrushScaleTransform(sx, sy, order);
- }
-
- public void SetBlendTriangularShape (float focus) {
- SetBlendTriangularShape (focus, 1.0F);
- }
-
- public void SetBlendTriangularShape (float focus, float scale) {
- _x2 = (_x1 + _x2) / 2;
- _y2 = (_y1 + _y2) / 2;
- _cyclic = true;
- _nativeObject = null;
- }
-
- public void SetSigmaBellShape (float focus) {
- SetSigmaBellShape (focus, 1.0F);
- }
-
- [MonoTODO]
- public void SetSigmaBellShape (float focus, float scale) {
- // FALLBACK: Triangle shape used
- SetBlendTriangularShape (focus, scale);
- }
-
- public void TranslateTransform (float dx, float dy) {
- BrushTranslateTransform (dx, dy);
- }
-
- public void TranslateTransform (float dx, float dy, MatrixOrder order) {
- BrushTranslateTransform(dx, dy, order);
- }
-
- public override object Clone () {
- LinearGradientBrush copy = (LinearGradientBrush)InternalClone();
-
- if (copy._nativeObject != null)
- copy._nativeObject = null;
-
- if (_interpolationColors != null) {
- copy._interpolationColors = new ColorBlend();
- if (_interpolationColors.Colors != null)
- copy._interpolationColors.Colors = (Color[])_interpolationColors.Colors.Clone();
- if (_interpolationColors.Positions != null)
- copy._interpolationColors.Positions = (float[])_interpolationColors.Positions.Clone();
- }
-
- if (_blend != null) {
- copy._blend = new Blend();
- if (_blend.Factors != null)
- copy._blend.Factors = (float[])_blend.Factors.Clone();
- if (_blend.Positions != null)
- copy._blend.Positions = (float[])_blend.Positions.Clone();
- }
-
- copy.LinearColors = (Color[])LinearColors.Clone();
- return copy;
- }
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs
deleted file mode 100644
index 7a3dff8b728..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/Matrix.jvm.cs
+++ /dev/null
@@ -1,295 +0,0 @@
-using System;
-using System.Drawing;
-using System.Runtime.InteropServices;
-using geom = java.awt.geom;
-using JMath = java.lang.Math;
-
-namespace System.Drawing.Drawing2D
-{
- public sealed class Matrix : MarshalByRefObject, IDisposable
- {
- #region fields
-
- static internal readonly Matrix IdentityTransform = new Matrix();
- readonly geom.AffineTransform _nativeMatrix;
-
- #endregion
-
- #region ctors
-
- internal Matrix (geom.AffineTransform ptr)
- {
- _nativeMatrix = ptr;
- }
-
- public Matrix () : this(new geom.AffineTransform())
- {
- }
-
- public Matrix (Rectangle rect , Point[] plgpts)
- {
- double x1 = plgpts[1].X - plgpts[0].X;
- double y1 = plgpts[1].Y - plgpts[0].Y;
-
- double x2 = plgpts[2].X - plgpts[0].X;
- double y2 = plgpts[2].Y - plgpts[0].Y;
-
- _nativeMatrix = new geom.AffineTransform(x1/rect.Width, y1/rect.Width, x2/rect.Height, y2/rect.Height, plgpts[0].X, plgpts[0].Y);
- _nativeMatrix.translate(-rect.X,-rect.Y);
- }
-
- public Matrix (RectangleF rect , PointF[] plgpts)
- {
- double x1 = plgpts[1].X - plgpts[0].X;
- double y1 = plgpts[1].Y - plgpts[0].Y;
-
- double x2 = plgpts[2].X - plgpts[0].X;
- double y2 = plgpts[2].Y - plgpts[0].Y;
-
- _nativeMatrix = new geom.AffineTransform(x1/rect.Width, y1/rect.Width, x2/rect.Height, y2/rect.Height, plgpts[0].X, plgpts[0].Y);
- _nativeMatrix.translate(-rect.X,-rect.Y);
- }
-
- public Matrix (float m11, float m12, float m21, float m22, float dx, float dy)
- : this(new geom.AffineTransform(m11,m12,m21,m22,dx,dy))
- {
- }
-
- #endregion
-
- #region properties
-
- public float[] Elements
- {
- get
- {
- float [] elems = new float[] {
- (float)NativeObject.getScaleX(),
- (float)NativeObject.getShearY(),
- (float)NativeObject.getShearX(),
- (float)NativeObject.getScaleY(),
- (float)NativeObject.getTranslateX(),
- (float)NativeObject.getTranslateY()};
- return elems;
- }
- }
-
- public bool IsIdentity
- {
- get
- {
- return NativeObject.isIdentity();
- }
- }
-
- public bool IsInvertible
- {
- get
- {
- try
- {
- return NativeObject.getDeterminant() != 0.0;
- }
- catch(geom.NoninvertibleTransformException)
- {
- return false;
- }
- }
- }
-
- public float OffsetX
- {
- get
- {
- return (float)NativeObject.getTranslateX();
- }
- }
-
- public float OffsetY
- {
- get
- {
- return (float)NativeObject.getTranslateY();
- }
- }
-
- #endregion
-
- #region methods
-
- public Matrix Clone()
- {
- return new Matrix ((geom.AffineTransform) NativeObject.clone ());
- }
-
-
- public void Dispose ()
- {
- }
-
- internal void CopyTo(Matrix matrix) {
- matrix.NativeObject.setTransform(NativeObject);
- }
-
- public override bool Equals (object obj)
- {
- Matrix m = obj as Matrix;
-
-
- if (m == null)
- return false;
-
- return NativeObject.Equals(m.NativeObject);
- }
-
- public override int GetHashCode ()
- {
- return NativeObject.GetHashCode();
- }
-
- public void Invert ()
- {
- try {
- _nativeMatrix.setTransform( _nativeMatrix.createInverse() );
- }
- catch(geom.NoninvertibleTransformException e) {
- throw new ArgumentException(e.Message, e);
- }
- }
-
- public void Multiply (Matrix matrix)
- {
- Multiply (matrix, MatrixOrder.Prepend);
- }
-
- public void Multiply (Matrix matrix, MatrixOrder order)
- {
- Multiply(matrix.NativeObject, order);
- }
-
- public void Reset()
- {
- NativeObject.setToIdentity();
- }
-
- public void Rotate (float angle)
- {
- NativeObject.rotate (JMath.toRadians(angle));
- }
-
- public void Rotate (float angle, MatrixOrder order)
- {
- Multiply(geom.AffineTransform.getRotateInstance(JMath.toRadians(angle)), order);
- }
-
- public void RotateAt (float angle, PointF point)
- {
- NativeObject.rotate (JMath.toRadians(angle), point.X, point.Y);
- }
-
- public void RotateAt (float angle, PointF point, MatrixOrder order)
- {
- Multiply(geom.AffineTransform.getRotateInstance(JMath.toRadians(angle),point.X, point.Y), order);
- }
-
- public void Scale (float scaleX, float scaleY)
- {
- NativeObject.scale (scaleX, scaleY);
- }
-
- public void Scale (float scaleX, float scaleY, MatrixOrder order)
- {
- Multiply(geom.AffineTransform.getScaleInstance(scaleX, scaleY), order);
- }
-
- public void Shear (float shearX, float shearY)
- {
- NativeObject.shear(shearX, shearY);
- }
-
- public void Shear (float shearX, float shearY, MatrixOrder order)
- {
- Multiply(geom.AffineTransform.getShearInstance (shearX, shearY), order);
- }
-
- public void TransformPoints (Point[] pts)
- {
- geom.Point2D.Float pt = new geom.Point2D.Float();
- for(int i =0;i < pts.Length;i++) {
- pt.setLocation(pts[i].X,pts[i].Y);
- NativeObject.transform(pt,pt);
- pts[i].X=(int)pt.getX();
- pts[i].Y=(int)pt.getY();
- }
- }
-
- public void TransformPoints (PointF[] pts)
- {
- geom.Point2D.Float pt = new geom.Point2D.Float();
- for(int i =0;i < pts.Length;i++) {
- pt.setLocation(pts[i].X,pts[i].Y);
- NativeObject.transform(pt,pt);
- pts[i].X=(float)pt.getX();
- pts[i].Y=(float)pt.getY();
- }
- }
-
- public void TransformVectors (Point[] pts)
- {
- geom.Point2D.Float pt = new geom.Point2D.Float();
- for(int i =0;i < pts.Length;i++) {
- pt.setLocation(pts[i].X,pts[i].Y);
- NativeObject.deltaTransform(pt,pt);
- pts[i].X=(int)pt.getX();
- pts[i].Y=(int)pt.getY();
- }
- }
-
- public void TransformVectors (PointF[] pts)
- {
- geom.Point2D.Float pt = new geom.Point2D.Float();
- for(int i =0;i < pts.Length;i++) {
- pt.setLocation(pts[i].X,pts[i].Y);
- NativeObject.deltaTransform(pt,pt);
- pts[i].X=(float)pt.getX();
- pts[i].Y=(float)pt.getY();
- }
- }
-
- public void Translate (float offsetX, float offsetY)
- {
- NativeObject.translate (offsetX, offsetY);
- }
-
- public void Translate (float offsetX, float offsetY, MatrixOrder order)
- {
- Multiply(geom.AffineTransform.getTranslateInstance(offsetX, offsetY), order);
- }
-
- public void VectorTransformPoints (Point[] pts)
- {
- TransformVectors (pts);
- }
-
- internal geom.AffineTransform NativeObject
- {
- get
- {
- return _nativeMatrix;
- }
- }
-
- void Multiply(geom.AffineTransform at, MatrixOrder order) {
- Multiply(NativeObject, at, order);
- }
-
- internal static void Multiply(geom.AffineTransform to, geom.AffineTransform add, MatrixOrder order) {
- if(order == MatrixOrder.Prepend)
- to.concatenate(add);
- else
- to.preConcatenate(add);
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs
deleted file mode 100644
index dda2bc6c835..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/PathGradientBrush.jvm.cs
+++ /dev/null
@@ -1,286 +0,0 @@
-
-
-using System;
-using System.Drawing;
-using System.Runtime.InteropServices;
-using awt = java.awt;
-
-namespace System.Drawing.Drawing2D {
- /// <summary>
- /// Summary description for PathGradientBrush.
- /// </summary>
- [MonoTODO]
- public sealed class PathGradientBrush : Brush {
- Brush _nativeObject;
- Blend _blend;
- Color _centerColor;
- PointF _center;
- PointF _focus;
- RectangleF _rectangle;
- Color [] _surroundColors;
- ColorBlend _interpolationColors;
- WrapMode _wrapMode;
- GraphicsPath _texturePath;
- bool _triangularShape = false;
-
- protected override java.awt.Paint NativeObject {
- get {
- return _nativeObject;
- }
- }
-
- #region initialize
-
- void Initialize(GraphicsPath path, WrapMode wrapMode, bool initColors, bool calcCenter) {
-
- _texturePath = path;
- _wrapMode = wrapMode;
- _rectangle = path.GetBounds();
-
- if (initColors) {
- _centerColor = Color.Black;
- _surroundColors = new Color []{ Color.White };
- }
-
- Bitmap texture = new Bitmap( (int)_rectangle.Width, (int)_rectangle.Height );
- Graphics g = Graphics.FromImage( texture );
- PointF [] pathPoints = path.PathPoints;
-
- if (calcCenter) {
- for (int i=0; i < pathPoints.Length; i++) {
- _center.X += pathPoints[i].X;
- _center.Y += pathPoints[i].Y;
- }
- _center.X /= pathPoints.Length;
- _center.Y /= pathPoints.Length;
- }
-
- int outerColor = 0;
- DrawSector( g, CenterPoint, pathPoints[pathPoints.Length-1], pathPoints[0], CenterColor, SurroundColors[outerColor] );
- for(int i=0; i < pathPoints.Length - 1; i++) {
- if (outerColor < SurroundColors.Length - 1)
- outerColor++;
- DrawSector( g, CenterPoint, pathPoints[i], pathPoints[i+1], CenterColor, SurroundColors[outerColor] );
- }
-
- _nativeObject = new TextureBrush( texture );
- }
- private void DrawSector(Graphics g, PointF center, PointF p1, PointF p2, Color innerColor, Color outerColor) {
- GraphicsPath pt = new GraphicsPath();
- pt.AddLine(p1, center);
- pt.AddLine(center, p2);
- LinearGradientBrush lgb = new LinearGradientBrush( GetVertical(center, p1, p2) , center, outerColor, innerColor );
- if (_triangularShape)
- lgb.SetBlendTriangularShape(0.5f);
- g.FillPath( lgb, pt );
- }
- private PointF GetVertical(PointF c, PointF p1, PointF p2) {
- if (p1.X == p2.X)
- return new PointF(p1.X, c.Y);
- if (p1.Y == p2.Y)
- return new PointF(c.X, p2.Y);
-
- float a = (float)(p2.Y - p1.Y) / (p2.X - p1.X);
- float av = - 1 / a;
-
- float b1 = p1.Y - a * p1.X;
- float b2 = c.Y - av * c.X;
-
- float ox = (b1 - b2) / (av - a);
- float oy = av * ox + b2;
-
- return new PointF(ox, oy);
- }
-
- #endregion
-
- #region ctors
-
- public PathGradientBrush (GraphicsPath path) {
- Initialize( path, WrapMode.Clamp, true, true );
- }
-
- public PathGradientBrush (Point [] points) : this (points, WrapMode.Clamp) {
- }
-
- public PathGradientBrush (PointF [] points) : this (points, WrapMode.Clamp) {
- }
-
- public PathGradientBrush (Point [] points, WrapMode wrapMode) {
- GraphicsPath path = new GraphicsPath();
- path.AddLines( points );
- Initialize( path, wrapMode, true, true );
- }
-
- public PathGradientBrush (PointF [] points, WrapMode wrapMode) {
- GraphicsPath path = new GraphicsPath();
- path.AddLines( points );
- Initialize( path, wrapMode, true, true );
- }
-
- #endregion
-
- #region Properties
-
- [MonoTODO]
- public Blend Blend {
- get {
- return _blend;
- }
- set {
- _blend = value;
- }
- }
-
- public Color CenterColor {
- get {
- return _centerColor;
- }
- set {
- _centerColor = value;
- Initialize(_texturePath, _wrapMode, false, false );
- }
- }
-
- public PointF CenterPoint {
- get {
- return _center;
- }
- set {
- _center = value;
- Initialize(_texturePath, _wrapMode, false, false );
- }
- }
-
- public PointF FocusScales {
- get {
- return _focus;
- }
- set {
- _focus = value;
- }
- }
-
- public ColorBlend InterpolationColors {
- get {
- return _interpolationColors;
- }
- set {
- _interpolationColors = value;
- }
- }
-
- public RectangleF Rectangle {
- get {
- return _rectangle;
- }
- }
-
- public Color [] SurroundColors {
- get {
- return _surroundColors;
- }
- set {
- _surroundColors = value;
- Initialize(_texturePath, _wrapMode, false, false );
- }
- }
-
- public Matrix Transform {
- get {
- return BrushTransform;
- }
- set {
- BrushTransform = value;
- }
- }
-
- public WrapMode WrapMode {
- get {
- return _wrapMode;
- }
- set {
- _wrapMode = value;
- }
- }
-
- #endregion
-
- #region Methods
-
- public void MultiplyTransform (Matrix matrix) {
- base.BrushMultiplyTransform( matrix );
- }
-
- public void MultiplyTransform (Matrix matrix, MatrixOrder order) {
- base.BrushMultiplyTransform( matrix, order );
- }
-
- public void ResetTransform () {
- base.BrushResetTransform();
- }
-
- public void RotateTransform (float angle) {
- base.BrushRotateTransform( angle );
- }
-
- public void RotateTransform (float angle, MatrixOrder order) {
- base.BrushRotateTransform( angle, order );
- }
-
- public void ScaleTransform (float sx, float sy) {
- base.BrushScaleTransform( sx, sy );
- }
-
- public void ScaleTransform (float sx, float sy, MatrixOrder order) {
- base.BrushScaleTransform( sx, sy, order );
- }
-
- public void SetBlendTriangularShape (float focus) {
- SetBlendTriangularShape (focus, 1.0F);
- }
-
- public void SetBlendTriangularShape (float focus, float scale) {
- _triangularShape = true;
- Initialize( _texturePath, _wrapMode, false, false );
- }
-
- public void SetSigmaBellShape (float focus) {
- SetSigmaBellShape (focus, 1.0F);
- }
-
- [MonoTODO]
- public void SetSigmaBellShape (float focus, float scale) {
- // FALLBACK: Triangle shape used
- SetBlendTriangularShape (focus, scale);
- }
-
- public void TranslateTransform (float dx, float dy) {
- base.BrushTranslateTransform( dx, dy );
- }
-
- public void TranslateTransform (float dx, float dy, MatrixOrder order) {
- base.BrushTranslateTransform( dx, dy, order );
- }
-
- public override object Clone () {
- PathGradientBrush copy = (PathGradientBrush)InternalClone();
-
- if (copy._nativeObject != null)
- copy._nativeObject = (Brush)copy._nativeObject.Clone();
-
- if (copy._surroundColors != null)
- copy._surroundColors = (Color[])copy._surroundColors.Clone();
-
- if (copy._texturePath != null)
- copy._texturePath = (GraphicsPath)copy._texturePath.Clone();
-
- //TBD: clone _blend, _interpolationColors
- //copy._blend = copy._blend
-
- return copy;
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/.gitattributes b/mcs/class/System.Drawing/System.Drawing.Imaging/.gitattributes
deleted file mode 100644
index 56401427ed8..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/.gitattributes
+++ /dev/null
@@ -1,2 +0,0 @@
-/ImageAttributes.jvm.cs -crlf
-/ImageCodec.jvm.cs -crlf
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs
index 53d86e6e551..d1095dc1ddf 100644
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Imaging/BitmapData.cs
@@ -34,9 +34,6 @@ namespace System.Drawing.Imaging
{
// MUST BE KEPT IN SYNC WITH gdip.h in libgdiplus!
// The first 6 fields MUST also match MS definition
-#if TARGET_JVM
- [MonoTODO]
-#endif
[StructLayout(LayoutKind.Sequential)]
public sealed class BitmapData {
private int width;
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs
index 602434eedbb..88584b271d3 100644
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMap.cs
@@ -37,9 +37,6 @@ using System.IO;
using System.Reflection;
namespace System.Drawing.Imaging {
-#if TARGET_JVM
- [MonoTODO]
-#endif
public sealed class ColorMap {
private Color newColor;
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs
index 6e73ea4e6d0..3b042cad175 100644
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs
@@ -36,9 +36,6 @@ using System.Runtime.InteropServices;
namespace System.Drawing.Imaging
{
-#if TARGET_JVM
- [MonoTODO]
-#endif
[StructLayout (LayoutKind.Sequential)]
public sealed class ColorMatrix
{
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs
index 078af159161..28599a7b47a 100644
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Imaging/ColorPalette.cs
@@ -69,7 +69,6 @@ namespace System.Drawing.Imaging
return flags;
}
}
-#if !TARGET_JVM
/* Caller should call FreeHGlobal*/
internal IntPtr getGDIPalette()
{
@@ -112,6 +111,5 @@ namespace System.Drawing.Imaging
offset += 4;
}
}
-#endif
}
}
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs
deleted file mode 100644
index 0f9ed05813e..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.jvm.cs
+++ /dev/null
@@ -1,184 +0,0 @@
-//
-// System.Drawing.Imaging.EncoderParameter.cs
-//
-// Author:
-// Ravindra (rkumar@novell.com)
-// Vladimir Vukicevic (vladimir@pobox.com)
-//
-// (C) 2004 Novell, Inc. http://www.novell.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Text;
-
-using System.Runtime.InteropServices;
-
-namespace System.Drawing.Imaging {
-
- [MonoTODO]
- public sealed class EncoderParameter : IDisposable {
-
- private Encoder encoder;
- private int valuesCount;
- private EncoderParameterValueType type;
-
- internal EncoderParameter ()
- {
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, byte value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, byte[] value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, short value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, short[] value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, long value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, long[] value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, string value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, byte value, bool undefined)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, byte[] value, bool undefined)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, int numerator, int denominator)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, int[] numerator, int[] denominator)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, long rangebegin, long rangeend)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, long[] rangebegin, long[] rangeend)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, int numberOfValues, int type, int value)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, int numerator1, int denominator1, int numerator2, int denominator2)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public EncoderParameter (Encoder encoder, int[] numerator1, int[] denominator1, int[] numerator2, int[] denominator2)
- {
- throw new NotImplementedException();
- }
-
- public Encoder Encoder {
- get {
- return encoder;
- }
-
- set {
- encoder = value;
- }
- }
-
- public int NumberOfValues {
- get {
- return valuesCount;
- }
- }
-
- public EncoderParameterValueType Type {
- get {
- return type;
- }
- }
-
- public EncoderParameterValueType ValueType {
- get {
- return type;
- }
- }
-
- void Dispose (bool disposing) {
- }
-
- public void Dispose () {
- Dispose (true);
- }
-
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs
index dfac530436d..2a5b25c585c 100644
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameters.cs
@@ -58,7 +58,6 @@ namespace System.Drawing.Imaging
// Nothing
GC.SuppressFinalize(this);
}
-#if !TARGET_JVM
internal IntPtr ToNativePtr () {
IntPtr result;
IntPtr ptr;
@@ -106,6 +105,5 @@ namespace System.Drawing.Imaging
return result;
}
-#endif
}
}
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs
deleted file mode 100644
index dafafc83b5e..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.jvm.cs
+++ /dev/null
@@ -1,298 +0,0 @@
-
-using System;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-
-namespace System.Drawing.Imaging
-{
- /// <summary>
- /// Summary description for ImageAttributes.
- /// </summary>
- ///
- [MonoTODO]
- public sealed class ImageAttributes : ICloneable, IDisposable
- {
- [MonoTODO]
- public ImageAttributes()
- {
- }
-
- public void Dispose()
- {
- }
-
- public Object Clone()
- {
- ImageAttributes imgAttr = new ImageAttributes();
- imgAttr.clrMatrix = clrMatrix;
- imgAttr.clrMatrixFlag = clrMatrixFlag;
- imgAttr.clrAdjustType = clrAdjustType;
- imgAttr.gMatrix = gMatrix;
- imgAttr.thresh = thresh;
- imgAttr.gamma = gamma;
- imgAttr.clrChannelFlags = clrChannelFlags;
- imgAttr.clrProfileFilename = clrProfileFilename;
- imgAttr.clrLow = clrLow;
- imgAttr.clrHigh = clrHigh;
- imgAttr.clrMap = clrMap;
- imgAttr.wrapMode = wrapMode;
- imgAttr.col = col;
- imgAttr.bClamp = bClamp;
- imgAttr.clrPalette = clrPalette;
- imgAttr.bNoOp = bNoOp;
- return imgAttr;
- }
-
-
- public void SetColorMatrix(ColorMatrix newColorMatrix)
- {
- SetColorMatrix(newColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
- }
-
- public void SetColorMatrix(ColorMatrix newColorMatrix, ColorMatrixFlag flags)
- {
- SetColorMatrix(newColorMatrix, flags, ColorAdjustType.Default);
- }
-
- public void SetColorMatrix(ColorMatrix newColorMatrix, ColorMatrixFlag mode, ColorAdjustType type)
- {
- clrMatrix = newColorMatrix;
- clrMatrixFlag = mode;
- clrAdjustType = type;
- }
-
- public void ClearColorMatrix()
- {
- ClearColorMatrix(ColorAdjustType.Default);
- }
-
- public void ClearColorMatrix(ColorAdjustType type)
- {
- ColorMatrix cm = new ColorMatrix();
- clrMatrix = cm;
- clrAdjustType = type;
- }
-
- public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix gMatrix)
- {
- SetColorMatrices(newColorMatrix, gMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
- }
-
- public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix gMatrix, ColorMatrixFlag flags)
- {
- SetColorMatrices(newColorMatrix, gMatrix, flags, ColorAdjustType.Default);
- }
-
- public void SetColorMatrices(ColorMatrix newColorMatrix, ColorMatrix gMatrix, ColorMatrixFlag mode, ColorAdjustType type)
- {
- clrMatrix = newColorMatrix;
- this.gMatrix = gMatrix;
- clrMatrixFlag = mode;
- clrAdjustType = type;
- }
-
- public void SetThreshold(float thresh)
- {
- SetThreshold(thresh, ColorAdjustType.Default);
- }
-
- public void SetThreshold(float thresh, ColorAdjustType type)
- {
- this.thresh = thresh;
- clrAdjustType = type;
- }
-
- public void ClearThreshold()
- {
- ClearThreshold(ColorAdjustType.Default);
- }
-
- public void ClearThreshold(ColorAdjustType type)
- {
- thresh = 1.0F;
- clrAdjustType = type;
- }
-
- public void SetGamma(float gamma)
- {
- SetGamma(gamma, ColorAdjustType.Default);
- }
-
- public void SetGamma(float gamma, ColorAdjustType type)
- {
- this.gamma = gamma;
- clrAdjustType = type;
- return;
- }
-
- public void ClearGamma()
- {
- ClearGamma(ColorAdjustType.Default);
- }
-
- public void ClearGamma(ColorAdjustType type)
- {
- gamma = 1;
- clrAdjustType = type;
- }
-
- public void SetNoOp()
- {
- SetNoOp(ColorAdjustType.Default);
- }
-
- public void SetNoOp(ColorAdjustType type)
- {
- bNoOp = true;
- clrAdjustType = type;
- }
-
- public void ClearNoOp()
- {
- ClearNoOp(ColorAdjustType.Default);
- }
-
- public void ClearNoOp(ColorAdjustType type)
- {
- bNoOp = false;
- clrAdjustType = type;
- }
-
- public void SetColorKey(Color clrLow, Color clrHigh)
- {
- SetColorKey(clrLow, clrHigh, ColorAdjustType.Default);
- }
-
- public void SetColorKey(Color clrLow, Color clrHigh, ColorAdjustType type)
- {
- this.clrLow = clrLow;
- this.clrHigh = clrHigh;
- clrAdjustType = type;
- }
-
- public void ClearColorKey()
- {
- ClearColorKey(ColorAdjustType.Default);
- }
-
- public void ClearColorKey(ColorAdjustType type)
- {
- clrAdjustType = type;
- }
-
- public void SetOutputChannel(ColorChannelFlag flags)
- {
- SetOutputChannel(flags, ColorAdjustType.Default);
- }
-
- public void SetOutputChannel(ColorChannelFlag flags, ColorAdjustType type)
- {
- clrChannelFlags = flags;
- clrAdjustType = type;
- }
-
- public void ClearOutputChannel()
- {
- ClearOutputChannel(ColorAdjustType.Default);
- }
-
- public void ClearOutputChannel(ColorAdjustType type)
- {
- clrAdjustType = type;
- }
-
- public void SetOutputChannelColorProfile(String clrProfileFilename)
- {
- SetOutputChannelColorProfile(clrProfileFilename, ColorAdjustType.Default);
- }
-
- public void SetOutputChannelColorProfile(String clrProfileFilename, ColorAdjustType type)
- {
- this.clrProfileFilename = clrProfileFilename;
- clrAdjustType = type;
- }
-
- public void ClearOutputChannelColorProfile()
- {
- ClearOutputChannel(ColorAdjustType.Default);
- }
-
- public void ClearOutputChannelColorProfile(ColorAdjustType type)
- {
- clrProfileFilename = null;
- clrAdjustType = type;
- }
-
- public void SetRemapTable(ColorMap[] map)
- {
- SetRemapTable(map, ColorAdjustType.Default);
- }
-
- public void SetRemapTable(ColorMap[] map, ColorAdjustType type)
- {
- clrMap = map;
- clrAdjustType = type;
- }
-
- public void ClearRemapTable()
- {
- ClearRemapTable(ColorAdjustType.Default);
- }
-
- public void ClearRemapTable(ColorAdjustType type)
- {
- clrMap = null;
- clrAdjustType = type;
- }
-
- public void SetBrushRemapTable(ColorMap []map)
- {
- SetRemapTable(map, ColorAdjustType.Brush);
- }
-
- public void ClearBrushRemapTable()
- {
- ClearRemapTable(ColorAdjustType.Brush);
- }
-
- public void SetWrapMode(WrapMode mode)
- {
- SetWrapMode(mode, new Color(), false);
- }
-
- public void SetWrapMode(WrapMode mode, Color clr)
- {
- SetWrapMode(mode, clr, false);
- }
-
- public void SetWrapMode(WrapMode mode, Color clr, bool bClamp)
- {
- wrapMode = mode;
- col = clr;
- this.bClamp = bClamp;
- }
-
- public void GetAdjustedPalette(ColorPalette palette, ColorAdjustType type)
- {
- clrPalette = palette;
- clrAdjustType = type;
- }
-
- public ColorMatrix clrMatrix;
- public ColorMatrixFlag clrMatrixFlag;
- public ColorAdjustType clrAdjustType;
- public ColorMatrix gMatrix;
- public float thresh;
- public float gamma;
- public ColorChannelFlag clrChannelFlags;
- public string clrProfileFilename;
- public Color clrLow;
- public Color clrHigh;
- public ColorMap[] clrMap;
- public WrapMode wrapMode;
- public Color col;
- public bool bClamp;
- public ColorPalette clrPalette;
- public bool bNoOp;
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs
deleted file mode 100644
index 8ded371ba75..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodec.jvm.cs
+++ /dev/null
@@ -1,700 +0,0 @@
-using System;
-using System.Configuration;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Drawing.Imaging;
-using System.Xml;
-using Mainsoft.Drawing.Configuration;
-
-using imageio = javax.imageio;
-using stream = javax.imageio.stream;
-using awt = java.awt;
-using image = java.awt.image;
-using spi = javax.imageio.spi;
-using dom = org.w3c.dom;
-
-namespace Mainsoft.Drawing.Imaging {
- /// <summary>
- /// Summary description for ImageCodec.
- /// </summary>
- public class ImageCodec : IDisposable {
-
- #region Members
-
- imageio.ImageReader _nativeReader = null;
- imageio.ImageWriter _nativeWriter = null;
- stream.ImageInputStream _nativeStream = null;
-
- ImageFormat _imageFormat = null;
-
- int _currentFrame = 0;
-
- #endregion
-
- #region Constructros
-
- protected ImageCodec() {
- }
-
- static ImageCodec() {
- }
-
- #endregion
-
- #region Internal properties
-
- internal imageio.ImageReader NativeReader {
- get { return _nativeReader; }
- set {
- _nativeReader = value;
- if (value == null)
- return;
- _imageFormat = MimeTypesToImageFormat( value.getOriginatingProvider().getMIMETypes() );
- }
- }
- internal imageio.ImageWriter NativeWriter {
- get { return _nativeWriter; }
- set {
- _nativeWriter = value;
- if (value == null)
- return;
- _imageFormat = MimeTypesToImageFormat( value.getOriginatingProvider().getMIMETypes() );
- }
- }
-
- internal stream.ImageInputStream NativeStream {
- get { return _nativeStream; }
- set {
- _nativeStream = value;
- if (value == null)
- return;
-
- if (NativeReader != null)
- NativeReader.setInput( value );
-
- if (NativeWriter != null)
- NativeWriter.setOutput( value );
- }
- }
-
- #endregion
-
- #region ImageCodec factory methods
-
- public static ImageCodec CreateReader(stream.ImageInputStream inputStream) {
- java.util.Iterator iter = imageio.ImageIO.getImageReaders( inputStream );
- return CreateReader(iter);
- }
-
- public static ImageCodec CreateReader(ImageFormat imageFormat) {
- return CreateReader( ImageFormatToClsid( imageFormat ) );
- }
-
- public static ImageCodec CreateReader(Guid clsid) {
- ImageCodec codec = null;
- try {
- ImageCodecInfo codecInfo = FindDecoder(clsid);
- java.util.Iterator iter = imageio.ImageIO.getImageReadersByMIMEType( codecInfo.MimeType );
- codec = CreateReader(iter);
- }
- catch {}
-
- if (codec == null) {
- ImageFormat format = ClsidToImageFormat(clsid);
- string name = (format != null) ? format.ToString() : clsid.ToString();
- throw new NotSupportedException(String.Format("The '{0}' format decoder is not installed.", name));
- }
-
- return codec;
- }
-
- private static ImageCodec CreateReader(java.util.Iterator iter) {
- if ( !iter.hasNext() )
- return null;
-
- ImageCodec imageCodec = new ImageCodec();
- imageCodec.NativeReader = (imageio.ImageReader) iter.next();
- return imageCodec;
- }
-
- public static ImageCodec CreateWriter(ImageFormat imageFormat) {
- return CreateWriter( ImageFormatToClsid( imageFormat ) );
- }
-
- public static ImageCodec CreateWriter(Guid clsid) {
- ImageCodec codec = null;
- try {
- ImageCodecInfo codecInfo = FindEncoder(clsid);
- java.util.Iterator iter = imageio.ImageIO.getImageWritersByMIMEType( codecInfo.MimeType );
- codec = CreateWriter(iter);
- }
- catch {}
-
- if (codec == null) {
- ImageFormat format = ClsidToImageFormat(clsid);
- string name = (format != null) ? format.ToString() : clsid.ToString();
- throw new NotSupportedException(String.Format("The '{0}' format encoder is not installed.", name));
- }
-
- return codec;
- }
-
- private static ImageCodec CreateWriter(java.util.Iterator iter) {
- if ( !iter.hasNext() )
- return null;
-
- ImageCodec imageCodec = new ImageCodec();
- imageCodec.NativeWriter = (imageio.ImageWriter) iter.next();
- return imageCodec;
- }
-
- #endregion
-
- #region Codec enumerations
-
- internal static Hashtable Decoders {
- get {
- const string MYNAME = "System.Drawing.Imaging.ImageCodecInfo.decoders";
- Hashtable o = (Hashtable) AppDomain.CurrentDomain.GetData (MYNAME);
- if (o != null)
- return o;
- o = new ReaderSpiIterator().Iterate();
- AppDomain.CurrentDomain.SetData(MYNAME, o);
- return o;
- }
- }
-
- internal static Hashtable Encoders {
- get {
- const string MYNAME = "System.Drawing.Imaging.ImageCodecInfo.encoders";
- Hashtable o = (Hashtable) AppDomain.CurrentDomain.GetData (MYNAME);
- if (o != null)
- return o;
- o = new WriterSpiIterator().Iterate();
- AppDomain.CurrentDomain.SetData(MYNAME, o);
- return o;
- }
- }
-
- internal static ImageCodecInfo FindEncoder (Guid clsid) {
- ImageCodecInfo codec = (ImageCodecInfo) Encoders[clsid];
- if (codec == null) {
- // .net saves in png if cannot find requested encoder. atc id 316563
- codec = (ImageCodecInfo) Encoders[ ImageCodec.PngClsid ];
- }
- return codec;
- }
-
- internal static ImageCodecInfo FindDecoder (Guid clsid) {
- ImageCodecInfo codec = (ImageCodecInfo) Decoders[clsid];
- if (codec == null) {
- ImageFormat format = ClsidToImageFormat(clsid);
- string name = (format != null) ? format.ToString() : clsid.ToString();
- throw new NotSupportedException(String.Format("The '{0}' format decoder is not installed.", name));
- }
- return codec;
- }
-
- #endregion
-
- #region SpiIterators
-
- abstract class BaseSpiIterator {
- protected abstract java.util.Iterator GetIterator (string mimeType);
- protected abstract spi.ImageReaderWriterSpi GetNext (java.util.Iterator iter);
-
- #region ProcessOneCodec
- private ImageCodecInfo ProcessOneCodec (Guid clsid, Guid formatID, string mimeType) {
- ImageCodecInfo ici = new ImageCodecInfo ();
- ici.Clsid = clsid;
- ici.FormatID = formatID;
- ici.MimeType = mimeType;
- java.util.Iterator iter = null;
- try {
- iter = GetIterator (mimeType);
- }
- catch(Exception) {
- return null;
- }
- while (iter.hasNext ()) {
- spi.ImageReaderWriterSpi rw = GetNext (iter);
-
- ici.CodecName = rw.getDescription (java.util.Locale.getDefault ());
- //ici.DllName = null;
- foreach (string suffix in rw.getFileSuffixes ()) {
- if (ici.FilenameExtension != null)
- ici.FilenameExtension += ";";
- ici.FilenameExtension += "*."+suffix;
- }
- ici.Flags = ImageCodecFlags.Builtin|ImageCodecFlags.SupportBitmap;
- if (rw is spi.ImageReaderSpi)
- ici.Flags |= ImageCodecFlags.Decoder;
-
- if (rw is spi.ImageWriterSpi)
- ici.Flags |= ImageCodecFlags.Encoder;
-
- ici.FormatDescription = string.Join(";",
- rw.getFormatNames());
- try {
- ici.Version = (int)Convert.ToDouble(rw.getVersion ());
- }
- catch (Exception) {
- ici.Version = 1;
- }
- break;
- }
- return ici;
- }
- #endregion
-
- internal Hashtable Iterate () {
- // TBD: Insert Exception handling here
- NameValueCollection nvc = (NameValueCollection) System.Configuration.ConfigurationSettings
- .GetConfig ("mainsoft.drawing/codecs");
- Hashtable codecs = new Hashtable (10);
-
- for (int i=0; i<nvc.Count; i++) {
- Guid clsid = new Guid (nvc.GetKey (i));
- ImageFormat format = ClsidToImageFormat (clsid);
- ImageCodecInfo codec = ProcessOneCodec (clsid, format.Guid, nvc[i]);
- if ((codec != null) && (codec.FilenameExtension != null))
- codecs [clsid] = codec;
- }
- return codecs;
- }
- }
-
- class ReaderSpiIterator: BaseSpiIterator {
- protected override java.util.Iterator GetIterator(string mimeType) {
- return imageio.ImageIO.getImageReadersByMIMEType (mimeType);
- }
- protected override javax.imageio.spi.ImageReaderWriterSpi GetNext(java.util.Iterator iter) {
- imageio.ImageReader r = (imageio.ImageReader) iter.next ();
- return r.getOriginatingProvider ();
- }
- }
-
- class WriterSpiIterator: BaseSpiIterator {
- protected override java.util.Iterator GetIterator(string mimeType) {
- return imageio.ImageIO.getImageWritersByMIMEType (mimeType);
- }
- protected override javax.imageio.spi.ImageReaderWriterSpi GetNext(java.util.Iterator iter) {
- imageio.ImageWriter w = (imageio.ImageWriter) iter.next ();
- return w.getOriginatingProvider ();
- }
- }
- #endregion
-
- #region Clsid and FormatID
- static Guid BmpClsid = new Guid ("557cf400-1a04-11d3-9a73-0000f81ef32e");
- static Guid JpegClsid = new Guid ("557cf401-1a04-11d3-9a73-0000f81ef32e");
- static Guid GifClsid = new Guid ("557cf402-1a04-11d3-9a73-0000f81ef32e");
- static Guid EmfClsid = new Guid ("557cf403-1a04-11d3-9a73-0000f81ef32e");
- static Guid WmfClsid = new Guid ("557cf404-1a04-11d3-9a73-0000f81ef32e");
- static Guid TiffClsid = new Guid ("557cf405-1a04-11d3-9a73-0000f81ef32e");
- static Guid PngClsid = new Guid ("557cf406-1a04-11d3-9a73-0000f81ef32e");
- static Guid IconClsid = new Guid ("557cf407-1a04-11d3-9a73-0000f81ef32e");
-
- private static ImageFormat MimeTypesToImageFormat (string [] mimeTypes) {
- foreach (ImageCodecInfo codec in Decoders.Values)
- for (int i=0; i<mimeTypes.Length; i++)
- if (codec.MimeType == mimeTypes [i])
- return ClsidToImageFormat (codec.Clsid);
- return null;
- }
-
- internal static ImageFormat ClsidToImageFormat (Guid clsid) {
- if (clsid.Equals (BmpClsid))
- return ImageFormat.Bmp;
- else if (clsid.Equals (JpegClsid))
- return ImageFormat.Jpeg;
- else if (clsid.Equals (GifClsid))
- return ImageFormat.Gif;
- else if (clsid.Equals (EmfClsid))
- return ImageFormat.Emf;
- else if (clsid.Equals (WmfClsid))
- return ImageFormat.Wmf;
- else if (clsid.Equals (TiffClsid))
- return ImageFormat.Tiff;
- else if (clsid.Equals (PngClsid))
- return ImageFormat.Png;
- else if (clsid.Equals (IconClsid))
- return ImageFormat.Icon;
- else
- return null;
- }
-
- internal static Guid ImageFormatToClsid (ImageFormat format) {
- if (format == null)
- return Guid.Empty;
-
- if (format.Guid.Equals (ImageFormat.Bmp.Guid))
- return BmpClsid;
- else if (format.Guid.Equals (ImageFormat.Jpeg.Guid))
- return JpegClsid;
- else if (format.Guid.Equals (ImageFormat.Gif))
- return GifClsid;
- else if (format.Guid.Equals (ImageFormat.Emf.Guid))
- return EmfClsid;
- else if (format.Guid.Equals (ImageFormat.Wmf.Guid))
- return WmfClsid;
- else if (format.Guid.Equals (ImageFormat.Tiff.Guid))
- return TiffClsid;
- else if (format.Guid.Equals (ImageFormat.Png.Guid))
- return PngClsid;
- else if (format.Guid.Equals (ImageFormat.Icon.Guid))
- return IconClsid;
- else
- return Guid.Empty;
- }
-
- private FrameDimension FormatFrameDimesion {
- get {
- if (ImageFormat == null)
- return FrameDimension.Page;
-
- if (ImageFormat.Guid.Equals (ImageFormat.Bmp.Guid))
- return FrameDimension.Page;
- else if (ImageFormat.Guid.Equals (ImageFormat.Jpeg.Guid))
- return FrameDimension.Page;
- else if (ImageFormat.Guid.Equals (ImageFormat.Gif))
- return FrameDimension.Time;
- else if (ImageFormat.Guid.Equals (ImageFormat.Emf.Guid))
- return FrameDimension.Page;
- else if (ImageFormat.Guid.Equals (ImageFormat.Wmf.Guid))
- return FrameDimension.Page;
- else if (ImageFormat.Guid.Equals (ImageFormat.Tiff.Guid))
- return FrameDimension.Page;
- else if (ImageFormat.Guid.Equals (ImageFormat.Png.Guid))
- return FrameDimension.Page;
- else if (ImageFormat.Guid.Equals (ImageFormat.Icon.Guid))
- return FrameDimension.Resolution;
- else
- return FrameDimension.Page;
- }
- }
-
- #endregion
-
- #region Image read/write methods
-
- internal PlainImage ReadPlainImage() {
- awt.Image img = ReadImage( _currentFrame );
- if (img == null)
- return null;
-
- // its possible to fail to load thumbnails and metadata, but image is ok.
- awt.Image [] th = null;
-#if THUMBNAIL_SUPPORTED
- try {
- th = ReadThumbnails( _currentFrame );
- }
- catch (Exception) {}
-#endif
-
- XmlDocument md = null;
- imageio.metadata.IIOMetadata nativeMd = null;
- try {
- nativeMd = ReadImageMetadata( _currentFrame );
- md = ConvertImageMetadata( nativeMd );
- }
- catch (Exception) {}
-
- float [] resolution = GetResolution( md );
-
- PlainImage pi = new PlainImage( img, th, ImageFormat, resolution[0], resolution[1], FormatFrameDimesion );
- pi.NativeMetadata = nativeMd;
- return pi;
- }
-
- internal PlainImage ReadNextPlainImage() {
- _currentFrame++;
- return ReadPlainImage();
- }
-
- private awt.Image ReadImage(int frame) {
- if (NativeStream == null)
- throw new Exception("Input stream not specified");
-
- try {
- return NativeReader.read (frame);
- }
- catch (java.lang.IndexOutOfBoundsException) {
- return null;
- }
- catch (java.io.IOException ex) {
- throw new System.IO.IOException(ex.Message, ex);
- }
- }
-
-#if THUMBNAIL_SUPPORTED
- private awt.Image [] ReadThumbnails(int frameIndex) {
- awt.Image [] thArray = null;
-
- try {
- if (NativeReader.readerSupportsThumbnails()) {
- int tmbNumber = NativeReader.getNumThumbnails(frameIndex);
-
- if (tmbNumber > 0) {
- thArray = new awt.Image[ tmbNumber ];
-
- for (int i = 0; i < tmbNumber; i++) {
- thArray[i] = NativeReader.readThumbnail(frameIndex, i);
- }
- }
- }
- return thArray;
- }
- catch (java.io.IOException ex) {
- throw new System.IO.IOException(ex.Message, ex);
- }
- }
-#endif
- internal void WritePlainImage(PlainImageCollection pic) {
- if ((pic == null) || (pic.Count == 0))
- return;
-
- if (pic.Count == 1) {
- WritePlainImage( pic[0] );
- return;
- }
-
- try {
- if (NativeWriter.canWriteSequence ()) {
- NativeWriter.prepareWriteSequence (null);
- for (int i=0; i < pic.Count; i++) {
- imageio.IIOImage iio = GetIIOImageContainer( pic[i] );
- NativeWriter.writeToSequence (iio, null);
- }
- NativeWriter.endWriteSequence ();
- }
- else
- WritePlainImage( pic[0] );
- }
- catch (java.io.IOException ex) {
- throw new System.IO.IOException(ex.Message, ex);
- }
- }
-
- internal void WritePlainImage(PlainImage pi) {
- try {
- imageio.IIOImage iio = GetIIOImageContainer( pi );
- WriteImage( iio );
- }
- catch (java.io.IOException ex) {
- throw new System.IO.IOException(ex.Message, ex);
- }
- }
-
- private void WriteImage(imageio.IIOImage iio) {
- if (NativeStream == null)
- throw new Exception("Output stream not specified");
-
- NativeWriter.write( iio );
- }
-
- private imageio.IIOImage GetIIOImageContainer(PlainImage pi) {
- java.util.ArrayList al = null;
-
- // prepare thumbnails list
- if (pi.Thumbnails != null) {
- al = new java.util.ArrayList( pi.Thumbnails.Length );
- for (int i=0; i < pi.Thumbnails.Length; i++)
- al.add(pi.Thumbnails[i]);
- }
-
- // prepare IIOImage container
- if (pi.NativeImage is image.BufferedImage) {
- imageio.IIOImage iio = new javax.imageio.IIOImage(
- (image.BufferedImage)pi.NativeImage, al, null /*pi.NativeMetadata*/);
- return iio;
- }
- else
- // TBD: This codec is for raster formats only
- throw new NotSupportedException("Only raster formats are supported");
- }
-
-
- private imageio.metadata.IIOMetadata ReadImageMetadata(int frameIndex) {
- if (NativeStream == null)
- throw new Exception("Input stream not specified");
-
- try {
- imageio.metadata.IIOMetadata md = NativeReader.getImageMetadata( frameIndex );
- return md;
- }
- catch (java.io.IOException ex) {
- throw new System.IO.IOException(ex.Message, ex);
- }
- }
-
- #endregion
-
- #region Extra properties
-
- public ImageFormat ImageFormat {
- get { return _imageFormat; }
- }
-
- #endregion
-
- #region Metadata parse
-
- private float [] GetResolution(XmlDocument metaData) {
- if (metaData == null)
- return new float[]{0, 0};
-
- ResolutionConfigurationCollection rcc =
- (ResolutionConfigurationCollection)
- ConfigurationSettings.GetConfig ("mainsoft.drawing/codecsmetadata");
-
- if (rcc == null)
- throw new ConfigurationException("Configuration section codecsmetadata not found");
-
- ResolutionConfiguration rc = rcc[ ImageFormat.ToString() ];
-
- if (rc == null)
- return new float[]{0, 0};
-
- // Horizontal resolution
- string xResPath = rc.XResPath;
- string xRes;
-
- if (xResPath == string.Empty)
- xRes = rc.XResDefault;
- else
- xRes = GetValueFromMetadata(metaData, xResPath);
-
- if ((xRes == null) || (xRes == string.Empty))
- xRes = rc.XResDefault;
-
- // Vertical resolution
- string yResPath = rc.YResPath;
- string yRes;
-
- if (yResPath == string.Empty)
- yRes = rc.YResDefault;
- else
- yRes = GetValueFromMetadata(metaData, yResPath);
-
- if ((yRes == null) || (yRes == string.Empty))
- yRes = rc.YResDefault;
-
- // Resolution units
- string resUnitsPath = rc.UnitsTypePath;
- string resUnitsType;
-
- if (resUnitsPath == string.Empty)
- resUnitsType = rc.UnitsTypeDefault;
- else
- resUnitsType = GetValueFromMetadata(metaData, resUnitsPath);
-
- if (resUnitsType == null)
- resUnitsType = rc.UnitsTypeDefault;
-
- // Unit scale
- string unitScale = rc.UnitsScale[resUnitsType].ToString();
-
- // Adjust resolution to its units
- float [] res = new float[2];
- res[0] = ParseFloatValue(xRes) * ParseFloatValue(unitScale);
- res[1] = ParseFloatValue(yRes) * ParseFloatValue(unitScale);
-
- return res;
- }
-
- private string GetValueFromMetadata(XmlDocument metaData, string path) {
- XmlNode n = metaData.SelectSingleNode(path);
- if (n == null)
- return null;
-
- return n.InnerText;
- }
-
- private XmlDocument ConvertImageMetadata(imageio.metadata.IIOMetadata metaData) {
- string [] formatNames = metaData.getMetadataFormatNames();
- dom.Element rootNode = (dom.Element) metaData.getAsTree(formatNames[0]);
-
- XmlDocument _metadataDocument = new XmlDocument();
- XmlConvert(rootNode, _metadataDocument);
-
- return _metadataDocument;
- }
-
- private void XmlConvert(dom.Node jNode, XmlNode nNode) {
- XmlDocument document = nNode.OwnerDocument;
- if (document == null)
- document = (XmlDocument)nNode;
-
- XmlNode n = null;
- switch (jNode.getNodeType()) {
- case 1 :
- n = document.CreateNode(XmlNodeType.Element, jNode.getNodeName(), jNode.getNamespaceURI());
- break;
-
- case 4 :
- n = document.CreateNode(XmlNodeType.CDATA, jNode.getNodeName(), jNode.getNamespaceURI());
- break;
-
- default:
- return;
- }
- //set value
- n.InnerText = jNode.getNodeValue();
- nNode.AppendChild( n );
-
- //copy attributes
- org.w3c.dom.NamedNodeMap nm = jNode.getAttributes();
- for (int i=0; i<nm.getLength(); i++) {
- XmlAttribute a = document.CreateAttribute( nm.item(i).getNodeName() );
- a.Value = nm.item(i).getNodeValue();
- n.Attributes.Append( a );
- }
-
- //copy childs
- org.w3c.dom.NodeList nl = jNode.getChildNodes();
- for (int i=0; i<nl.getLength(); i++) {
- XmlConvert(nl.item(i), n);
- }
- }
-
- protected virtual float ParseFloatValue(string strValue) {
- try {
- if ((strValue != null) && (strValue != "")) {
- int dividerPos = strValue.IndexOf("/");
-
- if (dividerPos < 0) {
- return float.Parse(strValue);
- }
- else {
- return float.Parse(strValue.Substring( 0, dividerPos )) /
- float.Parse(strValue.Substring( dividerPos + 1 ));
- }
- }
- return float.NaN;
- }
- catch (Exception) {
- return float.NaN;
- }
- }
-
- #endregion
-
- #region IDisposable members
-
- public void Dispose() {
- if (NativeReader != null) {
- NativeReader.dispose();
- NativeReader = null;
- }
-
- if (NativeWriter != null) {
- NativeWriter.dispose();
- NativeWriter = null;
- }
- }
-
- #endregion
-
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.jvm.cs
deleted file mode 100644
index 9cf9da7a810..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/ImageCodecInfo.jvm.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-//
-// System.Drawing.Imaging.ImageCodecInfo.cs
-//
-// Authors:
-// Everaldo Canuto (everaldo.canuto@bol.com.br)
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-// Dennis Hayes (dennish@raytek.com)
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-// Dennis Hayes (dennish@raytek.com)
-// Jordi Mas i Hernandez (jordi@ximian.com)
-//
-// (C) 2002 Ximian, Inc. http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Runtime.InteropServices;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Configuration;
-using System.IO;
-using Mainsoft.Drawing.Imaging;
-
-using imageio = javax.imageio;
-using spi = javax.imageio.spi;
-
-namespace System.Drawing.Imaging {
-
- [ComVisible (false)]
- public sealed class ImageCodecInfo
- {
- private Guid clsid;
- private string codecName;
- private string dllName;
- private string filenameExtension;
- private ImageCodecFlags flags;
- private string formatDescription;
- private Guid formatID;
- private string mimeType;
- private byte[][] signatureMasks;
- private byte[][] signaturePatterns;
- private int version;
-
- public static ImageCodecInfo[] GetImageDecoders ()
- {
- Hashtable oldInfo = ImageCodec.Decoders;
- ImageCodecInfo [] newInfo = new ImageCodecInfo [oldInfo.Count];
- int i=0;
- foreach (ImageCodecInfo codec in oldInfo.Values) {
- newInfo [i++] = (ImageCodecInfo) codec.MemberwiseClone ();
- }
- return newInfo;
- }
-
- internal ImageCodecInfo () {
- }
-
- public static ImageCodecInfo[] GetImageEncoders ()
- {
- Hashtable oldInfo = ImageCodec.Encoders;
- ImageCodecInfo [] newInfo = new ImageCodecInfo [oldInfo.Count];
- int i=0;
- foreach (ImageCodecInfo codec in oldInfo.Values) {
- //newInfo [i++] = (ImageCodecInfo) codec.MemberwiseClone ();
- newInfo [i] = new ImageCodecInfo ();
- newInfo [i].clsid = codec.clsid;
- newInfo [i].formatID = codec.formatID;
- newInfo [i].codecName = codec.codecName;
- newInfo [i].dllName = codec.dllName;
- newInfo [i].flags = codec.flags;
- newInfo [i].filenameExtension = codec.filenameExtension;
- newInfo [i].formatDescription = codec.formatDescription;
- newInfo [i].mimeType = codec.mimeType;
- newInfo [i].signatureMasks = codec.signatureMasks;
- newInfo [i].signaturePatterns = codec.signaturePatterns;
- newInfo [i++].version = codec.version;
- }
- return newInfo;
- }
-
- // properties
-
- public Guid Clsid
- {
- get { return clsid; }
- set { clsid = value; }
- }
-
-
- public string CodecName
- {
- get { return codecName; }
- set { codecName = value; }
- }
-
-
- public string DllName
- {
- get { return dllName; }
- set { throw new PlatformNotSupportedException(); }
- }
-
-
- public string FilenameExtension
- {
- get { return filenameExtension; }
- set { filenameExtension = value; }
- }
-
-
- public ImageCodecFlags Flags
- {
- get { return flags; }
- set { flags = value; }
- }
-
- public string FormatDescription
- {
- get { return formatDescription; }
- set { formatDescription = value; }
- }
-
- public Guid FormatID
- {
- get { return formatID; }
- set { formatID = value; }
- }
-
-
- public string MimeType
- {
- get { return mimeType; }
- set { mimeType = value; }
- }
-
-
- [CLSCompliant(false)]
- public byte[][] SignatureMasks
- {
- get { return signatureMasks; }
- set { signatureMasks = value; }
- }
-
- [CLSCompliant(false)]
- public byte[][] SignaturePatterns
- {
- get { return signaturePatterns; }
- set { signaturePatterns = value; }
- }
-
- public int Version
- {
- get { return version; }
- set { version = value; }
- }
-
- }
-
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.jvm.cs
deleted file mode 100644
index 78a28c40755..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.jvm.cs
+++ /dev/null
@@ -1,362 +0,0 @@
-//
-// System.Drawing.Imaging.Metafile.cs
-//
-// (C) 2002 Ximian, Inc. http://www.ximian.com
-// Author: Christian Meyer
-// eMail: Christian.Meyer@cs.tum.edu
-// Dennis Hayes (dennish@raytek.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.IO;
-using System.Reflection;
-using System.ComponentModel;
-using System.Runtime.InteropServices;
-
-namespace System.Drawing.Imaging {
-
- [Serializable]
- [ComVisible (false)]
-#if SYSTEM_DRAWING_DESIGN_SUPPORT
- [Editor ("System.Drawing.Design.MetafileEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
-#endif
- [MonoTODO]
- public sealed class Metafile : Image {
-
- // constructors
- [MonoTODO]
- public Metafile (Stream stream)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string filename)
- {
- throw new NotImplementedException ();
- }
-
-#if INTPTR_SUPPORT
-
- [MonoTODO]
- public Metafile (IntPtr henhmetafile, bool deleteEmf)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHtc, EmfType emfType)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHtc, Rectangle frameRect)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHtc, RectangleF frameRect)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHtc)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (String fileName, IntPtr referenceHtc)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHdc, EmfType emfType, string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader, bool deleteWmf)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, Rectangle frameRect)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, RectangleF frameRect)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, Rectangle frameRect)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHtc, EmfType type, string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, EmfType type, string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type,
- string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (Stream stream, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type,
- string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type,
- string description)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type,
- string description)
- {
- throw new NotImplementedException ();
- }
-
- // methods
- [MonoTODO]
- public IntPtr GetHenhmetafile()
- {
- throw new NotImplementedException ();
- }
-#endif
-
- [MonoTODO]
- public MetafileHeader GetMetafileHeader()
- {
- throw new NotFiniteNumberException();
- }
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public static MetafileHeader GetMetafileHeader(IntPtr henhmetafile)
- {
- throw new NotImplementedException ();
- }
-#endif
- [MonoTODO]
- public static MetafileHeader GetMetafileHeader(Stream stream)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public static MetafileHeader GetMetafileHeader(string fileName)
- {
- throw new NotImplementedException ();
- }
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public static MetafileHeader GetMetafileHeader(IntPtr henhmetafile, WmfPlaceableFileHeader wmfHeader)
- {
- throw new NotImplementedException ();
- }
-#endif
- [MonoTODO]
- public void PlayRecord(EmfPlusRecordType recordType, int flags, int dataSize, byte[] datawmfHeader)
- {
- throw new NotImplementedException ();
- }
- // properties
-
- [MonoTODO]
- protected override void InternalSave (javax.imageio.stream.ImageOutputStream output, Guid clsid) {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- protected override PixelFormat InternalPixelFormat {
- get {
- throw new NotImplementedException ();
- }
- }
-
- [MonoTODO]
- protected override java.awt.Image[] CloneNativeObjects(java.awt.Image[] src) {
- throw new NotImplementedException ();
- }
-
- #region Clone
- [MonoTODO]
- public override object Clone() {
- throw new NotImplementedException ();
- }
- #endregion
-
- }
-
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Imaging/MetafileHeader.cs b/mcs/class/System.Drawing/System.Drawing.Imaging/MetafileHeader.cs
index 242d2c3342c..bd73b2d2bc1 100644
--- a/mcs/class/System.Drawing/System.Drawing.Imaging/MetafileHeader.cs
+++ b/mcs/class/System.Drawing/System.Drawing.Imaging/MetafileHeader.cs
@@ -88,9 +88,7 @@ namespace System.Drawing.Imaging {
}
[MonoTODO ("Metafiles, both WMF and EMF formats, aren't supported.")]
-#if !TARGET_JVM
[StructLayout(LayoutKind.Sequential)]
-#endif
public sealed class MetafileHeader {
private MonoMetafileHeader header;
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/.gitattributes b/mcs/class/System.Drawing/System.Drawing.Text/.gitattributes
deleted file mode 100644
index bdbd9a1a244..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Text/.gitattributes
+++ /dev/null
@@ -1,3 +0,0 @@
-/InstalledFontCollection.jvm.cs -crlf
-/PrivateFontCollection.jvm.cs -crlf
-/TextLineIterator.jvm.cs -crlf
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs
deleted file mode 100644
index 15af2c798e3..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Text/FontCollection.jvm.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// System.Drawing.Text.FontCollection.cs
-//
-// (C) 2002 Ximian, Inc. http://www.ximian.com
-// Author: Everaldo Canuto everaldo.canuto@bol.com.br
-// Sanjay Gupta (gsanjay@novell.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-using awt = java.awt;
-
-namespace System.Drawing.Text
-{
- /// <summary>
- /// Summary description for FontCollection.
- /// </summary>
- public abstract class FontCollection : IDisposable
- {
- private readonly Hashtable _fonts;
-
- protected FontCollection()
- {
- _fonts = CollectionsUtil.CreateCaseInsensitiveHashtable( new Hashtable() );
- }
-
- protected FontCollection(Hashtable fonts) {
- _fonts = fonts;
- }
-
- public FontFamily[] Families {
- get {
- ICollection values = _fonts.Keys;
- FontFamily[] families = new FontFamily[values.Count];
-
- string [] keys = new string[_fonts.Count];
- _fonts.Keys.CopyTo(keys, 0);
-
- for (int i = 0; i < _fonts.Count; i++)
- families[i] = new FontFamily( keys[i] );
-
- return families;
- }
- }
-
- internal virtual awt.Font GetInitialFont(string familyName) {
- return (awt.Font)_fonts[familyName];
- }
-
- internal virtual bool Contains(string familyName) {
- return _fonts.ContainsKey( familyName );
- }
-
- protected void AddFont(awt.Font font) {
- _fonts.Add(font.getFamily(), font);
- }
-
- #region IDisposable Members
-
- public void Dispose() {
- // TODO: Add FontCollection.Dispose implementation
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs
deleted file mode 100644
index 8e93ca8cfda..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Text/InstalledFontCollection.jvm.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// System.Drawing.InstalledFontCollection.cs
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-// Author: Konstantin Triger (kostat@mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-using awt = java.awt;
-
-namespace System.Drawing.Text
-{
- /// <summary>
- /// Summary description for InstalledFontCollection.
- /// </summary>
- public sealed class InstalledFontCollection : FontCollection
- {
- static readonly Hashtable _installedFonts;
-
- static InstalledFontCollection()
- {
- _installedFonts = CollectionsUtil.CreateCaseInsensitiveHashtable( new Hashtable() );
- java.awt.Font [] fonts = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
- for (int i = 0; i < fonts.Length; i++) {
- string fontFamilyName = fonts[i].getFamily();
- if (!_installedFonts.ContainsKey( fontFamilyName ))
- _installedFonts.Add(fontFamilyName, fonts[i]);
- }
- }
-
- public InstalledFontCollection() : base( _installedFonts ) {
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/LineLayout.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/LineLayout.jvm.cs
deleted file mode 100644
index 6da75b537a1..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Text/LineLayout.jvm.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-//
-// System.Drawing.Test.LineLayout.jvm.cs
-//
-// Author:
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Drawing.Drawing2D;
-
-using font = java.awt.font;
-using text = java.text;
-using awt = java.awt;
-using geom = java.awt.geom;
-
-namespace System.Drawing.Text {
-
- internal sealed class LineLayout {
-
- #region Fields
-
- readonly font.TextLayout _layout;
-
- readonly float _accumulatedHeight;
- readonly TextLineIterator _lineIter;
-
- #endregion
-
- #region ctor
-
- internal LineLayout(font.TextLayout layout,
- TextLineIterator lineIter,
- float accumulatedHeight) {
-
- _layout = layout;
- _lineIter = lineIter;
- _accumulatedHeight = accumulatedHeight;
- }
-
- #endregion
-
- #region Properties
-
- internal float AccumulatedHeight {
- get { return _accumulatedHeight; }
- }
-
- internal float MeasureWidth {
- get {
- return _lineIter.PadWidth (Width);
- }
- }
-
- internal float WidthPadding {
- get {
- return _lineIter.PadWidth (Width) - Width;
- }
- }
-
- internal int CharacterCount {
- get { return _layout.getCharacterCount(); }
- }
-
- internal float Ascent {
- get { return _layout.getAscent(); }
- }
-
- internal float Descent {
- get { return _layout.getDescent(); }
- }
-
- public float Leading {
- get { return _layout.getLeading(); }
- }
-
- internal float NativeY {
- get {
- if (_lineIter.Format.IsVertical) {
- float height = _lineIter.Height;
- if (float.IsPositiveInfinity(height))
- height = 0;
- switch (_lineIter.Format.Alignment) {
- case StringAlignment.Center:
- return (height - Width) / 2;
- case StringAlignment.Far:
- return height - _layout.getVisibleAdvance () - WidthPadding;
- default:
- return WidthPadding;
- }
- }
- else
- return AccumulatedHeight + Ascent;
- }
- }
-
- internal float NativeX {
- get {
- float width = _lineIter.Width;
- if (float.IsPositiveInfinity(width))
- width = 0;
- if (_lineIter.Format.IsVertical)
- return (_lineIter.Format.IsRightToLeft) ?
- width - AccumulatedHeight - Ascent :
- AccumulatedHeight + Leading + Descent;
- else {
- float xOffset;
- switch ( _lineIter.Format.Alignment) {
- case StringAlignment.Center:
- xOffset = (width - Width) / 2;
- break;
- case StringAlignment.Far:
- if (_lineIter.Format.IsRightToLeft)
- xOffset = WidthPadding/2;
- else
- xOffset = width - _layout.getVisibleAdvance () - WidthPadding/2;
- break;
- default:
- if (_lineIter.Format.IsRightToLeft)
- xOffset = width - _layout.getVisibleAdvance () - WidthPadding/2;
- else
- xOffset = WidthPadding / 2;
- break;
- }
-
- return xOffset;
- }
- }
- }
-
- internal float Height {
- get {
- return Ascent + Descent + Leading;
- }
- }
-
- internal float Width {
- get {
- if (_lineIter.Format.MeasureTrailingSpaces)
- if (!(_lineIter.Format.IsRightToLeft ^
- (_lineIter.Format.Alignment == StringAlignment.Far)))
- return _layout.getAdvance();
-
- return _layout.getVisibleAdvance();
- }
- }
-
- #endregion
-
- #region Methods
-
- internal void Draw(awt.Graphics2D g2d, float x, float y) {
- if (_lineIter.Format.IsVertical)
- _layout.draw (g2d, y + NativeY, -(x + NativeX));
- else
- _layout.draw(g2d, x + NativeX, y + NativeY );
- }
-
- internal awt.Shape GetOutline(float x, float y) {
- geom.AffineTransform t = (geom.AffineTransform) _lineIter.Transform.clone();
-
- if (_lineIter.Format.IsVertical)
- t.translate(y + NativeY, -(x + NativeX));
- else
- t.translate(x + NativeX, y + NativeY);
-
- return _layout.getOutline(t);
- }
-
- #endregion
- }
-
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs
deleted file mode 100644
index 1f67bc1a326..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.jvm.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// System.Drawing.PrivateFontCollection.cs
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-// Author: Konstantin Triger (kostat@mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using awt = java.awt;
-using io = java.io;
-using vmw.common;
-
-namespace System.Drawing.Text
-{
- /// <summary>
- /// Summary description for PrivateFontCollection.
- /// </summary>
- public sealed class PrivateFontCollection : FontCollection
- {
- public PrivateFontCollection()
- {
- }
-
- public void AddFontFile(string filename) {
- using(FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read)) {
- io.InputStream stream = vmw.common.IOUtils.ToInputStream (fs);
- awt.Font font = awt.Font.createFont(awt.Font.TRUETYPE_FONT, stream);
- AddFont(font);
- }
- }
-#if INTPTR_SUPPORT
- public void AddMemoryFont(IntPtr memory, int length) {
- }
-#endif
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing.Text/TextLineIterator.jvm.cs b/mcs/class/System.Drawing/System.Drawing.Text/TextLineIterator.jvm.cs
deleted file mode 100644
index 6be27b70293..00000000000
--- a/mcs/class/System.Drawing/System.Drawing.Text/TextLineIterator.jvm.cs
+++ /dev/null
@@ -1,277 +0,0 @@
-//
-// System.Drawing.Test.TextLineIterator.jvm.cs
-//
-// Author:
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// Copyright (C) 2005 Mainsoft Corporation, (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Drawing.Drawing2D;
-
-using font = java.awt.font;
-using text = java.text;
-using awt = java.awt;
-using geom = java.awt.geom;
-
-namespace System.Drawing.Text {
- internal sealed class TextLineIterator {
-
- #region Fields
-
- readonly float _width;
- readonly float _height;
- readonly StringFormat _format;
- readonly font.FontRenderContext _frc;
- readonly string _s;
- readonly Font _font;
- readonly float _margin;
-
- static readonly string NewLine;
-
- static readonly geom.AffineTransform Rotate90Transform =
- geom.AffineTransform.getRotateInstance(Math.PI/2);
-
- font.TextMeasurer _measurer;
- int _charsConsumed = 0;
- int _currentPos = 0;
- int _currentRun = 0;
- float _accumulatedHeight = 0;
-
- #endregion
-
- #region ctors
-
- static TextLineIterator() {
- string newLine = Environment.NewLine;
- if (newLine == null || newLine.Length == 0 || newLine[newLine.Length - 1] == '\n')
- newLine = "\n";
-
- NewLine = newLine;
- }
-
- internal TextLineIterator(string s, Font font, font.FontRenderContext frc, StringFormat format, float width, float height) {
- _format = (format != null) ? format : new StringFormat();
- _font = font;
- _s = (s != null) ? s : String.Empty;
- _frc = frc;
- FontFamily ff = font.FontFamily;
- _margin = font.Size*ff.GetDrawMargin(font.Style)/ff.GetEmHeight(font.Style);
-
- _width = width;
- _height = height;
- }
-
- #endregion
-
- #region Properties
-
- float WrapWidth
- {
- get {
- float widthOrHeight = _format.IsVertical ? Height : Width;
- if (!_format.IsGenericTypographic) {
- widthOrHeight =
- ((_format.IsVertical ? Height : Width) - (0.463f * FontSize)) / 1.028f;
- }
- return widthOrHeight;
- }
- }
-
- internal float WrapHeight {
- get {
- float widthOrHeight = _format.IsVertical ? Width : Height;
- if (!_format.IsGenericTypographic) {
- widthOrHeight = (_format.IsVertical ? Width : Height) / 1.08864f;
- }
- return widthOrHeight;
- }
- }
-
- internal float Width {
- get { return _width; }
- }
-
- internal float Height {
- get { return _height; }
- }
-
- internal StringFormat Format {
- get { return _format; }
- }
-
- internal float PadWidth (float origWidth)
- {
- if (Format.IsGenericTypographic)
- return origWidth;
-
- //This is a proximity to .NET calculated Width.
- return origWidth * 1.028f + 0.463f * FontSize;
- }
-
- internal float PadHeight (float origHeight)
- {
- if (Format.IsGenericTypographic)
- return origHeight;
-
- //This is a proximity to .NET calculated Height.
- return 1.08864f * origHeight;
- }
-
- internal float FontSize
- {
- get {
- return _font.Size;
- }
- }
-
- internal int CharsConsumed {
- get { return _charsConsumed; }
- }
-
- internal int CurrentRun {
- get { return _currentRun; }
- }
-
- internal int CurrentPosition {
- get { return _currentPos; }
- }
-
- internal float AccumulatedHeight {
- get { return _accumulatedHeight; }
- }
-
- internal float GetAdvanceBetween(int start, int limit) {
- return _measurer.getAdvanceBetween(start, limit);
- }
-
- internal geom.AffineTransform Transform {
- get { return Format.IsVertical ? Rotate90Transform : Matrix.IdentityTransform.NativeObject; }
- }
-
- #endregion
-
- #region Methods
-
- LineLayout NextTextLayoutFromMeasurer() {
- if (_accumulatedHeight >= WrapHeight) {
- _charsConsumed += _currentPos;
- return null;
- }
-
- int limit = _measurer.getLineBreakIndex(_currentPos, WrapWidth);
-
- int wordBreak = limit;
- if (wordBreak < _currentRun) {
- while (wordBreak >= _currentPos && char.IsLetterOrDigit(_s, _charsConsumed + wordBreak))
- wordBreak--;
-
- if (wordBreak > _currentPos)
- limit = wordBreak + 1;
- }
- font.TextLayout layout = _measurer.getLayout(_currentPos, limit);
-
- LineLayout lineLayout = new LineLayout(
- layout,
- this,
- _accumulatedHeight);
-
- float lineHeight = PadHeight (lineLayout.Ascent + lineLayout.Descent + lineLayout.Leading);
-
- if (Format.LineLimit && (_accumulatedHeight + lineHeight > WrapHeight)) {
- _charsConsumed += _currentPos;
- return null;
- }
-
- _accumulatedHeight += lineHeight + lineLayout.Leading;
-
- _currentPos = limit;
-
- while (_currentPos < _currentRun) {
- if (char.IsWhiteSpace(_s, _charsConsumed + _currentPos))
- _currentPos++;
- else
- break;
- }
- return lineLayout;
- }
-
- internal LineLayout NextLine() {
- if (_currentPos < _currentRun && !Format.NoWrap)
- return NextTextLayoutFromMeasurer();
-
- _charsConsumed += _currentRun;
- if (_charsConsumed >= _s.Length)
- return null;
-
- string s;
- int lineBreakIndex = _s.IndexOf(NewLine, _charsConsumed);
- if (lineBreakIndex >= 0) {
- s = _s.Substring(_charsConsumed, lineBreakIndex - _charsConsumed + NewLine.Length);
- }
- else
- s = _s.Substring(_charsConsumed);
-
- _currentRun = s.Length;
- _currentPos = 0;
-
- text.AttributedString aS = new text.AttributedString(s);
-
- // TODO: add more attribs according to StringFormat
- aS.addAttribute(font.TextAttribute.FONT, _font.NativeObject);
- if((_font.Style & FontStyle.Underline) != FontStyle.Regular)
- aS.addAttribute(font.TextAttribute.UNDERLINE, font.TextAttribute.UNDERLINE_ON);
- if((_font.Style & FontStyle.Strikeout) != FontStyle.Regular)
- aS.addAttribute(font.TextAttribute.STRIKETHROUGH, font.TextAttribute.STRIKETHROUGH_ON);
-
- text.AttributedCharacterIterator charIter = aS.getIterator();
-
- _measurer = new font.TextMeasurer(charIter, _frc);
- return NextTextLayoutFromMeasurer();
- }
-
- internal geom.AffineTransform CalcLineAlignmentTransform() {
- if (Format.LineAlignment == StringAlignment.Near)
- return null;
- float height = WrapHeight;
- if (float.IsPositiveInfinity(height))
- height = 0;
-
- float shift = height - AccumulatedHeight;
- if (height > 0 && shift <= 0)
- return null;
-
- if (Format.LineAlignment == StringAlignment.Center)
- shift /= 2;
- else
- if (Format.IsVertical && Format.IsRightToLeft)
- return null;
-
- return Format.IsVertical ?
- geom.AffineTransform.getTranslateInstance(shift, 0) :
- geom.AffineTransform.getTranslateInstance(0, shift);
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/.gitattributes b/mcs/class/System.Drawing/System.Drawing/.gitattributes
deleted file mode 100644
index b43c576d4f1..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-/AdvancedStroke.jvm.cs -crlf
-/PlainImage.jvm.cs -crlf
-/PlainImageCollection.jvm.cs -crlf
-/StrokeFactory.jvm.cs -crlf
diff --git a/mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs b/mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs
deleted file mode 100644
index 92c9d40727b..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/AdvancedStroke.jvm.cs
+++ /dev/null
@@ -1,554 +0,0 @@
-using System;
-using System.Drawing.Drawing2D;
-using java.lang;
-
-using java.awt;
-using java.awt.geom;
-using sun.dc.path;
-using sun.dc.pr;
-
-namespace System.Drawing {
-
- internal enum PenFit {
- NotThin,
- Thin,
- ThinAntiAlias
- }
-
- internal class AdvancedStroke : Stroke {
-
- public const float PenUnits = 0.01f;
- public const int MinPenUnits = 100;
- public const int MinPenUnitsAA = 20;
- public const float MinPenSizeAA = PenUnits * MinPenUnitsAA;
- public const double MinPenSizeAASquared = (MinPenSizeAA * MinPenSizeAA);
- public const double MinPenSizeSquared = 1.000000001;
- public const double MinPenSizeNorm = 1.5;
- public const double MinPenSizeSquaredNorm = (MinPenSizeNorm * MinPenSizeNorm);
-
- /**
- * Joins path segments by extending their outside edges until
- * they meet.
- */
- public const int JOIN_MITER = 0;
-
- /**
- * Joins path segments by rounding off the corner at a radius
- * of half the line width.
- */
- public const int JOIN_ROUND = 1;
-
- /**
- * Joins path segments by connecting the outer corners of their
- * wide outlines with a straight segment.
- */
- public const int JOIN_BEVEL = 2;
-
- /**
- * Ends unclosed subpaths and dash segments with no added
- * decoration.
- */
- public const int CAP_BUTT = 0;
-
- /**
- * Ends unclosed subpaths and dash segments with a round
- * decoration that has a radius equal to half of the width
- * of the pen.
- */
- public const int CAP_ROUND = 1;
-
- /**
- * Ends unclosed subpaths and dash segments with a square
- * projection that extends beyond the end of the segment
- * to a distance equal to half of the line width.
- */
- public const int CAP_SQUARE = 2;
-
- float width;
-
- int join;
- int cap;
- float miterlimit;
-
- float[] dash;
- float dash_phase;
-
- AffineTransform _penTransform;
- AffineTransform _outputTransform;
- PenFit _penFit;
-
- /**
- * Constructs a new <code>AdvancedStroke</code> with the specified
- * attributes.
- * @param width the width of this <code>AdvancedStroke</code>. The
- * width must be greater than or equal to 0.0f. If width is
- * set to 0.0f, the stroke is rendered as the thinnest
- * possible line for the target device and the antialias
- * hint setting.
- * @param cap the decoration of the ends of a <code>AdvancedStroke</code>
- * @param join the decoration applied where path segments meet
- * @param miterlimit the limit to trim the miter join. The miterlimit
- * must be greater than or equal to 1.0f.
- * @param dash the array representing the dashing pattern
- * @param dash_phase the offset to start the dashing pattern
- * @throws IllegalArgumentException if <code>width</code> is negative
- * @throws IllegalArgumentException if <code>cap</code> is not either
- * CAP_BUTT, CAP_ROUND or CAP_SQUARE
- * @throws IllegalArgumentException if <code>miterlimit</code> is less
- * than 1 and <code>join</code> is JOIN_MITER
- * @throws IllegalArgumentException if <code>join</code> is not
- * either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
- * @throws IllegalArgumentException if <code>dash_phase</code>
- * is negative and <code>dash</code> is not <code>null</code>
- * @throws IllegalArgumentException if the length of
- * <code>dash</code> is zero
- * @throws IllegalArgumentException if dash lengths are all zero.
- */
- public AdvancedStroke(float width, int cap, int join, float miterlimit,
- float[] dash, float dash_phase, AffineTransform penTransform,
- AffineTransform outputTransform, PenFit penFit) {
- if (width < 0.0f) {
- throw new IllegalArgumentException("negative width");
- }
- if (cap != CAP_BUTT && cap != CAP_ROUND && cap != CAP_SQUARE) {
- throw new IllegalArgumentException("illegal end cap value");
- }
- if (join == JOIN_MITER) {
- if (miterlimit < 1.0f) {
- throw new IllegalArgumentException("miter limit < 1");
- }
- } else if (join != JOIN_ROUND && join != JOIN_BEVEL) {
- throw new IllegalArgumentException("illegal line join value");
- }
- if (dash != null) {
- if (dash_phase < 0.0f) {
- throw new IllegalArgumentException("negative dash phase");
- }
- bool allzero = true;
- for (int i = 0; i < dash.Length; i++) {
- float d = dash[i];
- if (d > 0.0) {
- allzero = false;
- } else if (d < 0.0) {
- throw new IllegalArgumentException("negative dash length");
- }
- }
- if (allzero) {
- throw new IllegalArgumentException("dash lengths all zero");
- }
- }
- this.width = width;
- this.cap = cap;
- this.join = join;
- this.miterlimit = miterlimit;
- if (dash != null) {
- this.dash = (float []) dash.Clone();
- }
- this.dash_phase = dash_phase;
- this._penTransform = penTransform;
- this._outputTransform = outputTransform;
- this._penFit = penFit;
- }
-
- /**
- * Constructs a solid <code>AdvancedStroke</code> with the specified
- * attributes.
- * @param width the width of the <code>AdvancedStroke</code>
- * @param cap the decoration of the ends of a <code>AdvancedStroke</code>
- * @param join the decoration applied where path segments meet
- * @param miterlimit the limit to trim the miter join
- * @throws IllegalArgumentException if <code>width</code> is negative
- * @throws IllegalArgumentException if <code>cap</code> is not either
- * CAP_BUTT, CAP_ROUND or CAP_SQUARE
- * @throws IllegalArgumentException if <code>miterlimit</code> is less
- * than 1 and <code>join</code> is JOIN_MITER
- * @throws IllegalArgumentException if <code>join</code> is not
- * either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
- */
- public AdvancedStroke(float width, int cap, int join, float miterlimit) :
- this(width, cap, join, miterlimit, null, 0.0f, null, null, PenFit.NotThin) {
- }
-
- /**
- * Constructs a solid <code>AdvancedStroke</code> with the specified
- * attributes. The <code>miterlimit</code> parameter is
- * unnecessary in cases where the default is allowable or the
- * line joins are not specified as JOIN_MITER.
- * @param width the width of the <code>AdvancedStroke</code>
- * @param cap the decoration of the ends of a <code>AdvancedStroke</code>
- * @param join the decoration applied where path segments meet
- * @throws IllegalArgumentException if <code>width</code> is negative
- * @throws IllegalArgumentException if <code>cap</code> is not either
- * CAP_BUTT, CAP_ROUND or CAP_SQUARE
- * @throws IllegalArgumentException if <code>join</code> is not
- * either JOIN_ROUND, JOIN_BEVEL, or JOIN_MITER
- */
- public AdvancedStroke(float width, int cap, int join) :
- this(width, cap, join, 10.0f, null, 0.0f, null, null, PenFit.NotThin) {
- }
-
- /**
- * Constructs a solid <code>AdvancedStroke</code> with the specified
- * line width and with default values for the cap and join
- * styles.
- * @param width the width of the <code>AdvancedStroke</code>
- * @throws IllegalArgumentException if <code>width</code> is negative
- */
- public AdvancedStroke(float width) :
- this(width, CAP_SQUARE, JOIN_MITER, 10.0f, null, 0.0f, null, null, PenFit.NotThin) {
- }
-
- /**
- * Constructs a new <code>AdvancedStroke</code> with defaults for all
- * attributes.
- * The default attributes are a solid line of width 1.0, CAP_SQUARE,
- * JOIN_MITER, a miter limit of 10.0.
- */
- public AdvancedStroke() :
- this(1.0f, CAP_SQUARE, JOIN_MITER, 10.0f, null, 0.0f, null, null, PenFit.NotThin) {
- }
-
-
- /**
- * Returns a <code>Shape</code> whose interior defines the
- * stroked outline of a specified <code>Shape</code>.
- * @param s the <code>Shape</code> boundary be stroked
- * @return the <code>Shape</code> of the stroked outline.
- */
- public Shape createStrokedShape(Shape s) {
- FillAdapter filler = new FillAdapter();
- PathStroker stroker = new PathStroker(filler);
- PathConsumer consumer;
-
- stroker.setPenDiameter(width);
- switch (_penFit) {
- case PenFit.Thin:
- stroker.setPenFitting(PenUnits, MinPenUnits);
- break;
- case PenFit.ThinAntiAlias:
- stroker.setPenFitting(PenUnits, MinPenUnitsAA);
- break;
- }
-
- float[] t4 = null;
- if (PenTransform != null && !PenTransform.isIdentity() && (PenTransform.getDeterminant() > 1e-25)) {
- t4 = new float[]{
- (float)PenTransform.getScaleX(), (float)PenTransform.getShearY(),
- (float)PenTransform.getShearX(), (float)PenTransform.getScaleY()
- };
- }
-
- float[] t6 = null;
- if (OutputTransform != null && !OutputTransform.isIdentity()) {
- t6 = new float[] {
- (float)OutputTransform.getScaleX(), (float)OutputTransform.getShearY(),
- (float)OutputTransform.getShearX(), (float)OutputTransform.getScaleY(),
- (float)OutputTransform.getTranslateX(), (float)OutputTransform.getTranslateY()
- };
- }
-
- stroker.setPenT4(t4);
- stroker.setOutputT6(t6);
- stroker.setCaps(RasterizerCaps[cap]);
- stroker.setCorners(RasterizerCorners[join], miterlimit);
- if (dash != null) {
- PathDasher dasher = new PathDasher(stroker);
- dasher.setDash(dash, dash_phase);
- dasher.setDashT4(t4);
- consumer = dasher;
- } else {
- consumer = stroker;
- }
-
- PathIterator pi = s.getPathIterator(null);
-
- try {
- consumer.beginPath();
- bool pathClosed = false;
- float mx = 0.0f;
- float my = 0.0f;
- float[] point = new float[6];
-
- while (!pi.isDone()) {
- int type = pi.currentSegment(point);
- if (pathClosed == true) {
- pathClosed = false;
- if (type != PathIterator__Finals.SEG_MOVETO) {
- // Force current point back to last moveto point
- consumer.beginSubpath(mx, my);
- }
- }
- switch ((GraphicsPath.JPI)type) {
- case GraphicsPath.JPI.SEG_MOVETO:
- mx = point[0];
- my = point[1];
- consumer.beginSubpath(point[0], point[1]);
- break;
- case GraphicsPath.JPI.SEG_LINETO:
- consumer.appendLine(point[0], point[1]);
- break;
- case GraphicsPath.JPI.SEG_QUADTO:
- // Quadratic curves take two points
- consumer.appendQuadratic(point[0], point[1],
- point[2], point[3]);
- break;
- case GraphicsPath.JPI.SEG_CUBICTO:
- // Cubic curves take three points
- consumer.appendCubic(point[0], point[1],
- point[2], point[3],
- point[4], point[5]);
- break;
- case GraphicsPath.JPI.SEG_CLOSE:
- consumer.closedSubpath();
- pathClosed = true;
- break;
- }
- pi.next();
- }
-
- consumer.endPath();
- } catch (PathException e) {
- throw new InternalError("Unable to Stroke shape ("+
- e.Message+")");
- }
-
- return filler.getShape();
- }
-
- /**
- * Returns the line width. Line width is represented in user space,
- * which is the default-coordinate space used by Java 2D. See the
- * <code>Graphics2D</code> class comments for more information on
- * the user space coordinate system.
- * @return the line width of this <code>AdvancedStroke</code>.
- * @see Graphics2D
- */
- public float getLineWidth() {
- return width;
- }
-
- /**
- * Returns the end cap style.
- * @return the end cap style of this <code>AdvancedStroke</code> as one
- * of the static <code>int</code> values that define possible end cap
- * styles.
- */
- public int getEndCap() {
- return cap;
- }
-
- /**
- * Returns the line join style.
- * @return the line join style of the <code>AdvancedStroke</code> as one
- * of the static <code>int</code> values that define possible line
- * join styles.
- */
- public int getLineJoin() {
- return join;
- }
-
- /**
- * Returns the limit of miter joins.
- * @return the limit of miter joins of the <code>AdvancedStroke</code>.
- */
- public float getMiterLimit() {
- return miterlimit;
- }
-
- /**
- * Returns the array representing the lengths of the dash segments.
- * Alternate entries in the array represent the user space lengths
- * of the opaque and transparent segments of the dashes.
- * As the pen moves along the outline of the <code>Shape</code>
- * to be stroked, the user space
- * distance that the pen travels is accumulated. The distance
- * value is used to index into the dash array.
- * The pen is opaque when its current cumulative distance maps
- * to an even element of the dash array and transparent otherwise.
- * @return the dash array.
- */
- public float[] getDashArray() {
- if (dash == null) {
- return null;
- }
-
- return (float[]) dash.Clone();
- }
-
- /**
- * Returns the current dash phase.
- * The dash phase is a distance specified in user coordinates that
- * represents an offset into the dashing pattern. In other words, the dash
- * phase defines the point in the dashing pattern that will correspond to
- * the beginning of the stroke.
- * @return the dash phase as a <code>float</code> value.
- */
- public float getDashPhase() {
- return dash_phase;
- }
-
- /**
- * Returns the hashcode for this stroke.
- * @return a hash code for this stroke.
- */
- public override int GetHashCode() {
- int hash = Float.floatToIntBits(width);
- hash = hash * 31 + join;
- hash = hash * 31 + cap;
- hash = hash * 31 + Float.floatToIntBits(miterlimit);
- if (dash != null) {
- hash = hash * 31 + Float.floatToIntBits(dash_phase);
- for (int i = 0; i < dash.Length; i++) {
- hash = hash * 31 + Float.floatToIntBits(dash[i]);
- }
- }
- return hash;
- }
-
- /**
- * Returns true if this AdvancedStroke represents the same
- * stroking operation as the given argument.
- */
- /**
- * Tests if a specified object is equal to this <code>AdvancedStroke</code>
- * by first testing if it is a <code>AdvancedStroke</code> and then comparing
- * its width, join, cap, miter limit, dash, and dash phase attributes with
- * those of this <code>AdvancedStroke</code>.
- * @param obj the specified object to compare to this
- * <code>AdvancedStroke</code>
- * @return <code>true</code> if the width, join, cap, miter limit, dash, and
- * dash phase are the same for both objects;
- * <code>false</code> otherwise.
- */
- public override bool Equals(object obj) {
- if (!(obj is AdvancedStroke)) {
- return false;
- }
-
- AdvancedStroke bs = (AdvancedStroke) obj;
- if (width != bs.width) {
- return false;
- }
-
- if (join != bs.join) {
- return false;
- }
-
- if (cap != bs.cap) {
- return false;
- }
-
- if (miterlimit != bs.miterlimit) {
- return false;
- }
-
- if (dash != null) {
- if (dash_phase != bs.dash_phase) {
- return false;
- }
-
- if (!java.util.Arrays.equals(dash, bs.dash)) {
- return false;
- }
- }
- else if (bs.dash != null) {
- return false;
- }
-
- return true;
- }
-
- public AffineTransform PenTransform {
- get{
- return _penTransform;
- }
- set{
- _penTransform = value;
- }
- }
-
- public AffineTransform OutputTransform {
- get {
- return _outputTransform;
- }
- set {
- _outputTransform = value;
- }
- }
-
- private static readonly int[] RasterizerCaps = {
- Rasterizer.BUTT, Rasterizer.ROUND, Rasterizer.SQUARE
- };
-
- private static readonly int[] RasterizerCorners = {
- Rasterizer.MITER, Rasterizer.ROUND, Rasterizer.BEVEL
- };
-
- #region FillAdapter
-
- private class FillAdapter : PathConsumer {
- bool closed;
- GeneralPath path;
-
- public FillAdapter() {
- path = new GeneralPath(GeneralPath.WIND_NON_ZERO);
- }
-
- public Shape getShape() {
- return path;
- }
-
- public void beginPath() {}
-
- public void beginSubpath(float x0, float y0) {
- if (closed) {
- path.closePath();
- closed = false;
- }
- path.moveTo(x0, y0);
- }
-
- public void appendLine(float x1, float y1) {
- path.lineTo(x1, y1);
- }
-
- public void appendQuadratic(float xm, float ym, float x1, float y1) {
- path.quadTo(xm, ym, x1, y1);
- }
-
- public void appendCubic(float xm, float ym,
- float xn, float yn,
- float x1, float y1) {
- path.curveTo(xm, ym, xn, yn, x1, y1);
- }
-
- public void closedSubpath() {
- closed = true;
- }
-
- public void endPath() {
- if (closed) {
- path.closePath();
- closed = false;
- }
- }
-
- public virtual PathConsumer getConsumer () {
- return this;
- }
-
- public void useProxy(FastPathProducer proxy) {
- proxy.sendTo(this);
- }
-
- public long getCPathConsumer() {
- return 0;
- }
-
- public void dispose() {
- }
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs b/mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs
deleted file mode 100644
index 5aad895321f..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/BasicShape.jvm.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-using System;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Runtime.InteropServices;
-
-using awt = java.awt;
-using geom = java.awt.geom;
-
-namespace System.Drawing
-{
- /// <summary>
- /// Summary description for BasicShape.
- /// </summary>
- public abstract class BasicShape : MarshalByRefObject, awt.Shape, IDisposable
- {
- awt.Shape _shape;
-
- protected BasicShape(awt.Shape shape)
- {
- _shape = shape;
- }
-
- protected awt.Shape Shape {
- get {
- return _shape;
- }
- set {
- _shape = value;
- }
- }
-
- #region IDisposable
- public void Dispose () {
- Dispose (true);
- }
-
- void Dispose (bool disposing) {
- }
- #endregion
-
- #region Shape Members
-
- awt.Rectangle awt.Shape.getBounds() {
- return Shape.getBounds();
- }
-
- bool awt.Shape.contains(double arg_0, double arg_1) {
- return Shape.contains(arg_0, arg_1);
- }
-
- bool awt.Shape.contains(geom.Point2D arg_0) {
- return Shape.contains(arg_0);
- }
-
- bool awt.Shape.contains(double arg_0, double arg_1, double arg_2, double arg_3) {
- return Shape.contains(arg_0, arg_1, arg_2, arg_3);
- }
-
- bool awt.Shape.contains(geom.Rectangle2D arg_0) {
- return Shape.contains(arg_0);
- }
-
- geom.PathIterator awt.Shape.getPathIterator(geom.AffineTransform arg_0) {
- return Shape.getPathIterator(arg_0);
- }
-
- geom.PathIterator awt.Shape.getPathIterator(geom.AffineTransform arg_0, double arg_1) {
- return Shape.getPathIterator(arg_0, arg_1);
- }
-
- geom.Rectangle2D awt.Shape.getBounds2D() {
- return Shape.getBounds2D();
- }
-
- bool awt.Shape.intersects(double arg_0, double arg_1, double arg_2, double arg_3) {
- return Shape.intersects(arg_0, arg_1, arg_2, arg_3);
- }
-
- bool awt.Shape.intersects(geom.Rectangle2D arg_0) {
- return Shape.intersects(arg_0);
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs
deleted file mode 100644
index 126e36145d6..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Bitmap.jvm.cs
+++ /dev/null
@@ -1,427 +0,0 @@
-using System;
-using System.IO;
-using System.Drawing.Imaging;
-using System.Runtime.Serialization;
-using Mainsoft.Drawing.Imaging;
-
-using io = java.io;
-using imageio = javax.imageio;
-using stream = javax.imageio.stream;
-using spi = javax.imageio.spi;
-using BufferedImage = java.awt.image.BufferedImage;
-using JavaImage = java.awt.Image;
-using awt = java.awt;
-using image = java.awt.image;
-
-namespace System.Drawing
-{
- public sealed class Bitmap : Image {
-
- # region Static fields
-
- static readonly image.ColorModel _jpegColorModel = new image.DirectColorModel(24, 0x00ff0000, 0x0000ff00, 0x000000ff, 0x0);
-
- #endregion
-
- #region constructors
-
- Bitmap (PlainImage orig) {
- base.Initialize( orig, false );
- }
-
- [MonoTODO]
- private Bitmap (SerializationInfo info, StreamingContext context) {
- throw new NotImplementedException ();
- }
-
- public Bitmap (int width, int height, Graphics g)
- :this (width, height, PixelFormat.Format32bppArgb) {
- CurrentImage.HorizontalResolution = g.DpiX;
- CurrentImage.VerticalResolution = g.DpiY;
- }
-
- public Bitmap (Image original)
- :this (original, original.Size) {}
-
- public Bitmap (Image orig, Size newSize)
- :this (orig, newSize.Width, newSize.Height) {}
-
- public Bitmap (Image orig, int width, int height)
- :base (CreateScaledImage (orig, width, height), ImageFormat.MemoryBmp) {}
-
- internal Bitmap (java.awt.Image nativeObject, ImageFormat format)
- :base (nativeObject, format) {}
-
- [MonoTODO]
- private Bitmap (java.awt.Image nativeObject, ImageFormat format, PixelFormat pixFormat)
- :this (nativeObject, format) {
- if (pixFormat != this.PixelFormat)
- throw new NotImplementedException ("Converting PixelFormat is not implemented yet.");
- }
-
- public Bitmap (int width, int height)
- :this (width, height, PixelFormat.Format32bppArgb) {}
-
- public Bitmap (int width, int height, PixelFormat format)
- :base (
- new java.awt.image.BufferedImage (width, height,
- ToBufferedImageFormat (format)),
- ImageFormat.Bmp) {
- }
-
- public Bitmap (Stream stream)
- :this (stream, false) {}
-
- public Bitmap (string filename)
- :this (filename, false) {}
-
- [MonoTODO]
- public Bitmap (Stream stream, bool useIcm)
- :this (stream, useIcm, null) {}
-
- [MonoTODO]
- public Bitmap (string filename, bool useIcm)
- :this (filename, useIcm, null) {}
-
- internal Bitmap (Stream stream, bool useIcm, ImageFormat format) {
- // TBD: useIcm param
- io.InputStream jis = vmw.common.IOUtils.ToInputStream (stream);
- Initialize (new stream.MemoryCacheImageInputStream (jis), format);
- }
-
- internal Bitmap (string filename, bool useIcm, ImageFormat format) {
- using(FileStream stream = new FileStream(filename, FileMode.Open, FileAccess.Read)) {
- // TBD: useIcm param
- io.InputStream jis = vmw.common.IOUtils.ToInputStream (stream);
- Initialize (new stream.MemoryCacheImageInputStream (jis), format);
- }
- }
-
- public Bitmap (Type type, string resource) {
- using (Stream s = type.Assembly.GetManifestResourceStream (resource)) {
- if (s == null)
- throw new ArgumentException("Resource '" + resource + "' could not be found in class '" + type.ToString() + "'");
-
- io.InputStream jis = vmw.common.IOUtils.ToInputStream (s);
- Initialize (new stream.MemoryCacheImageInputStream (jis), null);
- }
- }
-#if INTPTR_SUPPORT
- [MonoTODO]
- public Bitmap (int width, int height, int stride, PixelFormat format, IntPtr scan0)
- {
- throw new NotImplementedException();
- }
-#endif
- #endregion
-
- #region Internal Initialization
-
- private void Initialize (stream.ImageInputStream input, ImageFormat format) {
- ImageCodec ic = null;
-
- if (format == null)
- ic = ImageCodec.CreateReader(input);
- else
- ic = ImageCodec.CreateReader(format);
-
- if (ic == null)
- throw new ArgumentException ("Parameter is not valid.");
-
- try {
- ic.NativeStream = input;
- PlainImage pi = ic.ReadPlainImage();
- base.Initialize( pi, false );
-
- pi = ic.ReadNextPlainImage();
- while ( pi != null) {
- base.Initialize( pi, true );
- pi = ic.ReadNextPlainImage();
- }
-
- _flags |= (int)(ImageFlags.ImageFlagsReadOnly | ImageFlags.ImageFlagsHasRealPixelSize);
- }
- catch (IOException ex) {
- throw ex;
- }
- finally {
- ic.Dispose();
- }
- }
-
- #endregion
-
- #region InternalSave
- protected override void InternalSave (stream.ImageOutputStream output, Guid clsid) {
-
- ImageCodec ic = ImageCodec.CreateWriter( clsid );
- using (ic) {
-
- PlainImage plainImage = CurrentImage;
- plainImage.NativeImage.flush();
-
- if ( ImageCodec.ClsidToImageFormat( clsid ).Equals( ImageFormat.Jpeg ) ) {
- image.ColorModel cm = ((image.BufferedImage)CurrentImage.NativeImage).getColorModel();
- if (cm.hasAlpha()) {
- if (cm is image.DirectColorModel) {
- image.Raster raster = ((image.BufferedImage)CurrentImage.NativeImage).getRaster();
- image.DataBuffer db = raster.getDataBuffer();
- image.DirectColorModel dcm = (image.DirectColorModel)cm;
- image.SinglePixelPackedSampleModel jpegSampleModel = new image.SinglePixelPackedSampleModel(
- db.getDataType(), Width, Height,
- new int[] {dcm.getRedMask(), dcm.getGreenMask(), dcm.getBlueMask()} );
-
- image.BufferedImage tb = new image.BufferedImage(
- _jpegColorModel,
- image.Raster.createWritableRaster( jpegSampleModel, db, null ),
- false, null );
-
- plainImage = new PlainImage( tb, plainImage.Thumbnails, ImageFormat.Jpeg, plainImage.HorizontalResolution, plainImage.VerticalResolution, plainImage.Dimension );
- plainImage.NativeMetadata = plainImage.NativeMetadata;
- }
- }
- }
-
- ic.NativeStream = output;
- ic.WritePlainImage( plainImage );
- }
- }
-
- #endregion
-
- #region private statics: ToBufferedImageFormat, CreateScaledImage
-
- private static int ToBufferedImageFormat (PixelFormat format) {
- switch(format) {
- case PixelFormat.Format16bppGrayScale:
- return BufferedImage.TYPE_USHORT_GRAY;
- case PixelFormat.Format1bppIndexed:
- return BufferedImage.TYPE_BYTE_GRAY;
- case PixelFormat.Format32bppArgb:
- return BufferedImage.TYPE_INT_ARGB;
- case PixelFormat.Format32bppRgb:
- return BufferedImage.TYPE_INT_RGB;
- case PixelFormat.Format32bppPArgb:
- return BufferedImage.TYPE_INT_ARGB_PRE;
- case PixelFormat.Format16bppRgb555:
- return BufferedImage.TYPE_USHORT_555_RGB;
- case PixelFormat.Format16bppRgb565:
- return BufferedImage.TYPE_USHORT_565_RGB;
- case PixelFormat.Indexed:
- return BufferedImage.TYPE_BYTE_INDEXED;
- default:
- return BufferedImage.TYPE_INT_ARGB;
- }
- }
-
- private static java.awt.Image CreateScaledImage(Image original, int width, int height) {
- JavaImage oldscaled = original.CurrentImage.NativeImage.getScaledInstance(width, height,
- JavaImage.SCALE_DEFAULT);
- BufferedImage newimage = new BufferedImage(oldscaled.getWidth(null),
- oldscaled.getHeight(null),
- BufferedImage.TYPE_INT_ARGB);
- java.awt.Graphics2D graphics2d = newimage.createGraphics();
- graphics2d.drawImage(oldscaled, 0, 0, null);
- graphics2d.dispose();
- return newimage;
- }
- #endregion
-
- #region Get-SetPixel
- public Color GetPixel (int x, int y)
- {
-
- int argb = NativeObject.getRGB(x,y);
- return Color.FromArgb(argb);
- }
-
- public void SetPixel (int x, int y, Color color)
- {
- int rgb = color.ToArgb();
- NativeObject.setRGB(x,y,rgb);
- }
- #endregion
-
- #region Clone
- public override object Clone () {
- return new Bitmap ( (PlainImage)CurrentImage.Clone() );
- }
-
- public Bitmap Clone (Rectangle rect, PixelFormat pixFormat)
- {
- return Clone(new RectangleF( rect.X, rect.Y, rect.Width, rect.Height ), pixFormat);
- }
-
- public Bitmap Clone (RectangleF rect, PixelFormat pixFormat)
- {
- PlainImage plainImage = CurrentImage.Clone(false);
- BufferedImage clone = new BufferedImage( (int)rect.Width, (int)rect.Height, ToBufferedImageFormat( pixFormat ) );
- awt.Graphics2D g = clone.createGraphics();
- try {
- g.drawImage( NativeObject, -(int)rect.X, -(int)rect.Y, null );
- }
- finally {
- g.dispose();
- }
-
- plainImage.NativeImage = clone;
- return new Bitmap(plainImage);
- }
- #endregion
-
- #region LockBits
- [MonoTODO]
- public BitmapData LockBits (Rectangle rect, ImageLockMode flags, PixelFormat format) {
- throw new NotImplementedException();
- }
-
-#if NET_2_0
- public
-#endif
- BitmapData LockBits (Rectangle rect, ImageLockMode flags, PixelFormat format, BitmapData bitmapData) {
- throw new NotImplementedException();
- }
- #endregion
-
- #region MakeTransparent
- public void MakeTransparent ()
- {
- Color clr = Color.FromArgb(0,0,0);
- MakeTransparent (clr);
- }
-
- public void MakeTransparent (Color transparentColor)
- {
- image.WritableRaster raster = NativeObject.getRaster();
- int numBands = raster.getNumBands();
- if (numBands != 4)
- return;
-
- int maxWidth = raster.getWidth() + raster.getMinX();
- int maxHeight = raster.getHeight() + raster.getMinY();
- int[] srcPix = new int[numBands];
-
- for (int y = raster.getMinY(); y < maxHeight; y++) {
- for (int x = raster.getMinX(); x < maxWidth; x++) {
- /*srcPix =*/ raster.getPixel(x, y, srcPix);
- if (srcPix[0] == transparentColor.R &&
- srcPix[1] == transparentColor.G &&
- srcPix[2] == transparentColor.B) {
- srcPix[3] = 0;
- raster.setPixel(x, y, srcPix);
- }
- }
- }
- }
- #endregion
-
- #region SetResolution
- public void SetResolution (float xDpi, float yDpi)
- {
- CurrentImage.HorizontalResolution = xDpi;
- CurrentImage.VerticalResolution = yDpi;
- }
- #endregion
-
- #region UnlockBits
- [MonoTODO]
- public void UnlockBits (BitmapData bitmap_data)
- {
- throw new NotImplementedException();
- }
- #endregion
-
- #region NativeObject
- internal new BufferedImage NativeObject {
- get {
- return (BufferedImage)base.NativeObject.CurrentImage.NativeImage;
- }
- }
-
- protected override java.awt.Image[] CloneNativeObjects(java.awt.Image[] src) {
- if (src == null)
- return null;
-
- awt.Image[] dst = new awt.Image[src.Length];
- for (int i = 0; i < dst.Length; i++) {
- BufferedImage image = src[i] as BufferedImage;
- if (image == null)
- throw new ArgumentException(String.Format("Unsupported image type '{0}'", src[i].ToString()), "src");
-
- dst[i] = new BufferedImage(image.getColorModel(), image.copyData(null), image.isAlphaPremultiplied(), null);
- }
-
- return dst;
- }
-
- #endregion
-
- #region InternalPixelFormat
- protected override PixelFormat InternalPixelFormat {
- get {
- int t = NativeObject.getType();
- switch(t) {
- case 11://JavaImage.TYPE_USHORT_GRAY:
- return PixelFormat.Format16bppGrayScale;
- case 10://JavaImage.TYPE_BYTE_GRAY:
- return PixelFormat.Format8bppIndexed;
- case 1: //JavaImage.TYPE_INT_RGB
- return PixelFormat.Format32bppRgb;
- case 2: //JavaImage.TYPE_INT_ARGB:
- return PixelFormat.Format32bppArgb;
- case 3://JavaImage.TYPE_INT_ARGB_PRE:
- return PixelFormat.Format32bppPArgb;
- case 9://JavaImage.TYPE_USHORT_555_RGB:
- return PixelFormat.Format16bppRgb555;
- case 8://JavaImage.TYPE_USHORT_565_RGB:
- return PixelFormat.Format16bppRgb565;
- case 13://JavaImage.TYPE_BYTE_INDEXED:
- return PixelFormat.Indexed;
- //TBD: support this
- case 12://JavaImage.TYPE_BYTE_BINARY:
- case 0://JavaImage.TYPE_CUSTOM:
- case 4://JavaImage.TYPE_INT_BGR:
- case 5://JavaImage.TYPE_3BYTE_BGR:
- case 6://JavaImage.TYPE_4BYTE_ABGR:
- case 7://JavaImage.TYPE_4BYTE_ABGR_PRE:
- default:
- return PixelFormat.Undefined;
- }
- }
- }
- #endregion
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public static Bitmap FromHicon (IntPtr hicon)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public static Bitmap FromResource (IntPtr hinstance, string bitmapName) //TBD: Untested
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IntPtr GetHbitmap ()
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IntPtr GetHbitmap (Color background)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IntPtr GetHicon ()
- {
- throw new NotImplementedException();
- }
-#endif
-
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs
deleted file mode 100644
index 8ec1ed5368d..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Brush.jvm.cs
+++ /dev/null
@@ -1,104 +0,0 @@
-using System;
-using System.Drawing;
-using System.Drawing.Drawing2D;
-using System.Collections;
-
-using awt = java.awt;
-using image = java.awt.image;
-using geom = java.awt.geom;
-
-
-namespace System.Drawing
-{
- public abstract class Brush : MarshalByRefObject, ICloneable, IDisposable, awt.Paint {
-
- #region fields
-
- private Matrix _brushTransform = new Matrix();
-
- #endregion
-
- protected abstract java.awt.Paint NativeObject {
- get;
- }
-
- awt.PaintContext awt.Paint.createContext (image.ColorModel cm,
- awt.Rectangle deviceBounds, geom.Rectangle2D userBounds, geom.AffineTransform xform,
- awt.RenderingHints hints) {
-
- return createContextInternal(cm, deviceBounds, userBounds, xform, hints);
- }
-
- protected virtual awt.PaintContext createContextInternal (image.ColorModel cm,
- awt.Rectangle deviceBounds, geom.Rectangle2D userBounds, geom.AffineTransform xform,
- awt.RenderingHints hints) {
-
- Matrix.Multiply(xform, _brushTransform.NativeObject, MatrixOrder.Append);
- return NativeObject.createContext (cm, deviceBounds, userBounds, xform, hints);
- }
-
- int awt.Transparency.getTransparency () {
- return NativeObject.getTransparency ();
- }
-
- abstract public object Clone ();
-
- public void Dispose () {
- Dispose (true);
- }
-
- protected virtual void Dispose (bool disposing) {
- }
-
- protected Brush InternalClone() {
- Brush brush = (Brush)this.MemberwiseClone();
- brush._brushTransform = this._brushTransform.Clone();
- return brush;
- }
-
- #region Brush transform
-
- internal Matrix BrushTransform {
- get { return _brushTransform.Clone(); }
- set {
- if (value == null)
- throw new ArgumentNullException("matrix");
-
- value.CopyTo( _brushTransform );
- }
- }
-
- protected internal void BrushTranslateTransform (float dx, float dy) {
- BrushTranslateTransform(dx, dy, MatrixOrder.Prepend);
- }
- protected internal void BrushTranslateTransform (float dx, float dy, MatrixOrder order) {
- _brushTransform.Translate(dx,dy,order);
- }
- protected internal void BrushResetTransform () {
- _brushTransform.Reset();
- }
- protected internal void BrushRotateTransform (float angle) {
- BrushRotateTransform(angle, MatrixOrder.Prepend);
- }
- protected internal void BrushRotateTransform (float angle, MatrixOrder order) {
- _brushTransform.Rotate(angle, order);
- }
- protected internal void BrushScaleTransform (float sx, float sy) {
- BrushScaleTransform(sx, sy, MatrixOrder.Prepend);
- }
- protected internal void BrushScaleTransform (float sx, float sy, MatrixOrder order) {
- _brushTransform.Scale(sx, sy, order);
- }
- protected internal void BrushMultiplyTransform (Matrix matrix) {
- BrushMultiplyTransform(matrix, MatrixOrder.Prepend);
- }
- protected internal void BrushMultiplyTransform (Matrix matrix, MatrixOrder order) {
- if (matrix == null)
- throw new ArgumentNullException("matrix");
- _brushTransform.Multiply(matrix, order);
- }
-
- #endregion
- }
-}
-
diff --git a/mcs/class/System.Drawing/System.Drawing/Color.cs b/mcs/class/System.Drawing/System.Drawing/Color.cs
index 3f5235d3af7..6c62a9f080f 100644
--- a/mcs/class/System.Drawing/System.Drawing/Color.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Color.cs
@@ -42,9 +42,7 @@ namespace System.Drawing
#if ONLY_1_1
[ComVisible (true)]
#endif
-#if !TARGET_JVM
[Editor ("System.Drawing.Design.ColorEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
-#endif
[Serializable]
public struct Color {
@@ -71,29 +69,6 @@ namespace System.Drawing
// however it's bad to keep a string (reference) in a struct
internal string name;
// #endif
-#if TARGET_JVM
- internal java.awt.Color NativeObject {
- get {
- return new java.awt.Color (R, G, B, A);
- }
- }
-
- internal static Color FromArgbNamed (int alpha, int red, int green, int blue, string name, KnownColor knownColor)
- {
- Color color = FromArgb (alpha, red, green, blue);
- color.state = (short) (ColorType.Known|ColorType.Named);
- color.name = KnownColors.GetName (knownColor);
- color.knownColor = (short) knownColor;
- return color;
- }
-
- internal static Color FromArgbSystem (int alpha, int red, int green, int blue, string name, KnownColor knownColor)
- {
- Color color = FromArgbNamed (alpha, red, green, blue, name, knownColor);
- color.state |= (short) ColorType.System;
- return color;
- }
-#endif
public string Name {
get {
diff --git a/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs b/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs
index 7cd02aeae19..2a49f6f945b 100644
--- a/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs
+++ b/mcs/class/System.Drawing/System.Drawing/ColorConverter.cs
@@ -225,15 +225,10 @@ namespace System.Drawing
lock (creatingCached) {
if (cached != null)
return cached;
-#if TARGET_JVM
- Color [] colors = new Color [KnownColors.Values.Length - 1];
- Array.Copy (KnownColors.Values, 1, colors, 0, colors.Length);
-#else
Array colors = Array.CreateInstance (typeof (Color), KnownColors.ArgbValues.Length - 1);
for (int i=1; i < KnownColors.ArgbValues.Length; i++) {
colors.SetValue (KnownColors.FromKnownColor ((KnownColor)i), i - 1);
}
-#endif
Array.Sort (colors, 0, colors.Length, new CompareColors ());
cached = new StandardValuesCollection (colors);
diff --git a/mcs/class/System.Drawing/System.Drawing/Font.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Font.jvm.cs
deleted file mode 100644
index 4a622f090f2..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Font.jvm.cs
+++ /dev/null
@@ -1,382 +0,0 @@
-
-using System.Runtime.Serialization;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-using awt = java.awt;
-using TextAttribute = java.awt.font.TextAttribute;
-
-namespace System.Drawing {
- [Serializable]
- public sealed class Font: MarshalByRefObject, ISerializable, ICloneable, IDisposable {
-
- #region variables
-
- const byte DEFAULT_CHARSET = 1;
-
- private readonly GraphicsUnit _gUnit = GraphicsUnit.Point;
- private readonly FontFamily _fontFamily;
- private readonly awt.Font _jFont;
- private readonly byte _charset;
-
- static readonly float [] _screenResolutionConverter = {
- 1, // World
- 1, // Display
- 1, // Pixel
- Graphics.DefaultScreenResolution, // Point
- Graphics.DefaultScreenResolution, // Inch
- Graphics.DefaultScreenResolution, // Document
- Graphics.DefaultScreenResolution // Millimeter
- };
-
-#if NET_2_0
- private readonly string _systemFontName;
-#endif
-
- #endregion
-
- internal awt.Font NativeObject {
- get {
- return _jFont;
- }
- }
-
- #region ISerializable
-
- void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) {
- info.AddValue("Name", Name);
- info.AddValue("Size", Size);
- info.AddValue("Style", Style, typeof(FontStyle));
- info.AddValue("Unit", Unit, typeof(GraphicsUnit));
- }
-
- #endregion
-
- #region ctors
-
- private Font (SerializationInfo info, StreamingContext context)
- : this(
- info.GetString("Name"),
- info.GetSingle("Size"),
- (FontStyle)info.GetValue("Style", typeof(FontStyle)),
- (GraphicsUnit)info.GetValue("Unit", typeof(GraphicsUnit)) ) {
- }
-
- public Font(Font original, FontStyle style) {
- _jFont = original.NativeObject.deriveFont( DeriveStyle(original.NativeObject.getAttributes(), style, true) );
- _gUnit = original._gUnit;
- _fontFamily = original._fontFamily;
- _charset = original._charset;
- }
-
- public Font(FontFamily family, float emSize)
- : this(family, emSize, FontStyle.Regular, GraphicsUnit.Point, DEFAULT_CHARSET, false) {
- }
-
- public Font(FontFamily family, float emSize, FontStyle style)
- : this(family, emSize, style, GraphicsUnit.Point, DEFAULT_CHARSET, false) {
- }
- public Font(FontFamily family, float emSize, GraphicsUnit unit)
- : this(family, emSize, FontStyle.Regular, unit, DEFAULT_CHARSET, false) {
- }
-
- public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit)
- : this(family, emSize, style, unit, DEFAULT_CHARSET, false) {
- }
-
- public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet)
- : this(family, emSize, style, unit, charSet, false) {
- }
-
- public Font(FontFamily family, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical) {
- if (family == null)
- throw new ArgumentNullException("family");
-
- _gUnit = unit;
- _fontFamily = family;
- _charset = charSet;
-
- java.util.Hashtable attribs = new java.util.Hashtable();
- attribs.put(TextAttribute.FAMILY, family.Name/*TODO: family doungrade possibility*/);
- //init defaults
- attribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR);
-
- float newSize = emSize * Graphics.UnitConversion[ (int)_gUnit ];
- attribs.put(TextAttribute.SIZE, new java.lang.Float(newSize));
-
- DeriveStyle(attribs, style, false);
-
- _jFont = family.FamilyFont.deriveFont(attribs);
- }
-
- public Font(string familyName, float emSize)
- : this(familyName, emSize, FontStyle.Regular, GraphicsUnit.Point, (byte)0, false) {
- }
-
- public Font(string familyName, float emSize, FontStyle style)
- : this(familyName, emSize, style, GraphicsUnit.Point, (byte)0, false) {
- }
-
- public Font(string familyName, float emSize, GraphicsUnit unit)
- : this(familyName, emSize, FontStyle.Regular, unit, (byte)0, false) {
- }
-
- public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit)
- : this(familyName, emSize, style, unit, (byte)0, false) {
- }
-
- public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte charSet)
- : this(familyName, emSize, style, unit, charSet, false) {
- }
-
- public Font(string familyName, float emSize, FontStyle style, GraphicsUnit unit, byte charSet, bool isVertical)
- : this (GetFontFamily (familyName), emSize, style, unit, charSet, isVertical) {
- }
-
-#if NET_2_0
- internal Font (string familyName, float emSize, string systemName)
- : this (familyName, emSize) {
- _systemFontName = systemName;
- }
-#endif
-
- static FontFamily GetFontFamily (string familyName) {
-#if ONLY_1_1
- if (familyName == null)
- throw new ArgumentNullException ("familyName");
-#endif
- // NOTE: If family name is null, empty or invalid,
- // MS creates Microsoft Sans Serif font.
- try {
- return new FontFamily (familyName);
- }
- catch {
- return FontFamily.GenericSansSerif;
- }
- }
-
- #endregion
-
- #region IDisposable members
-
- public void Dispose() {
- }
-
- #endregion
-
- #region ICloneable
-
- public object Clone() {
- return (Font)MemberwiseClone();
- }
-
- #endregion
-
- public override bool Equals (object obj)
- {
- Font other = obj as Font;
- if (other == null) {
- return false;
- }
-
- return NativeObject.Equals (other.NativeObject);
- }
-
- public override int GetHashCode ()
- {
- return NativeObject.GetHashCode ();
- }
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public IntPtr ToHfont ()
- {
- throw new NotImplementedException();
- }
-#endif
-
- #region public properties
-
- public bool Bold {
- get {
- return _jFont.isBold();
- }
- }
-
- public FontFamily FontFamily {
- get {
- return _fontFamily;
- }
- }
-
- public byte GdiCharSet {
- get {
- return _charset;
- }
- }
-
- public bool GdiVerticalFont {
- get {
- return Name.StartsWith("@");
- }
- }
-
- public int Height {
- get {
- return FontFamily.Container.getFontMetrics(NativeObject).getHeight();
- }
- }
-
- public float GetHeight () {
- return GetHeight (Graphics.DefaultScreenResolution);
- }
-
- public float GetHeight (float dpi) {
- return (FontFamily.GetLineSpacing (Style) / FontFamily.GetEmHeight (Style))
- * (SizeInPoints / _screenResolutionConverter [(int) Unit])
- * dpi;
- }
-
- public float GetHeight (Graphics graphics) {
- if (graphics == null)
- throw new ArgumentNullException ("graphics");
- return GetHeight (graphics.DpiY);
- }
-
- public bool Italic {
- get {
- return _jFont.isItalic();
- }
- }
-
- public string Name {
- get {
- return _jFont.getName();
- }
- }
-
- public float Size {
- get {
- return SizeInPoints / Graphics.UnitConversion[ (int)_gUnit ];
- }
- }
-
- public float SizeInPoints {
- get {
- return _jFont.getSize2D();
- }
- }
-
- public bool Strikeout {
- get {
- try {
- if((java.lang.Boolean)_jFont.getAttributes().get(TextAttribute.STRIKETHROUGH)
- == TextAttribute.STRIKETHROUGH_ON )
- return true;
- }
- catch {
- }
- return false;
- }
- }
-
- public FontStyle Style {
- get {
- FontStyle style = FontStyle.Regular;
- if (Bold)
- style |= FontStyle.Bold;
- if (Italic)
- style |= FontStyle.Italic;
- if (Underline)
- style |= FontStyle.Underline;
- if (Strikeout)
- style |= FontStyle.Strikeout;
-
- return style;
- }
- }
-
- public bool Underline {
- get {
- try {
- if((java.lang.Integer)_jFont.getAttributes().get(TextAttribute.UNDERLINE)
- == TextAttribute.UNDERLINE_ON )
- return true;
- }
- catch {
- }
- return false;
- }
- }
-
- [TypeConverter(typeof(FontConverter.FontUnitConverter))]
- public GraphicsUnit Unit {
- get {
- return _gUnit;
- }
- }
-
-#if NET_2_0
- [Browsable (false)]
- public bool IsSystemFont {
- get {
- return !string.IsNullOrEmpty (_systemFontName);
- }
- }
-
- [Browsable (false)]
- public string SystemFontName {
- get {
- return _systemFontName;
- }
- }
-#endif
-
- #endregion
-
- public override System.String ToString() {
- return ("[Font: Name="+ Name +", Size="+ Size +", Style="+ Style +", Units="+ Unit +"]");
- }
-
- static internal java.util.Map DeriveStyle(java.util.Map attribs, FontStyle style, bool createNew) {
- java.util.Map newAttribs;
- if (createNew) {
- newAttribs = new java.util.Hashtable( attribs.size() );
- java.util.Iterator it = attribs.keySet().iterator();
- while (it.hasNext ()) {
- object key = it.next ();
- object value = attribs.get (key);
- if (value != null)
- newAttribs.put (key, value);
- }
- }
- else
- newAttribs = attribs;
-
- //Bold
- if((style & FontStyle.Bold) == FontStyle.Bold)
- newAttribs.put(TextAttribute.WEIGHT, TextAttribute.WEIGHT_BOLD);
- else
- newAttribs.remove(TextAttribute.WEIGHT);
-
- //Italic
- if((style & FontStyle.Italic) == FontStyle.Italic)
- newAttribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_OBLIQUE);
- else
- newAttribs.put(TextAttribute.POSTURE, TextAttribute.POSTURE_REGULAR);
-
- //Underline
- if((style & FontStyle.Underline) == FontStyle.Underline)
- newAttribs.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);
- else
- newAttribs.remove(TextAttribute.UNDERLINE);
-
- //Strikeout
- if((style & FontStyle.Strikeout) == FontStyle.Strikeout)
- newAttribs.put(TextAttribute.STRIKETHROUGH, TextAttribute.STRIKETHROUGH_ON);
- else
- newAttribs.remove(TextAttribute.STRIKETHROUGH);
-
- return newAttribs;
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/FontConverter.cs b/mcs/class/System.Drawing/System.Drawing/FontConverter.cs
index 22baf05498b..7998c487eca 100644
--- a/mcs/class/System.Drawing/System.Drawing/FontConverter.cs
+++ b/mcs/class/System.Drawing/System.Drawing/FontConverter.cs
@@ -46,12 +46,10 @@ namespace System.Drawing
public FontConverter ()
{
}
-#if !TARGET_JVM
~FontConverter ()
{
// required to match API definition
}
-#endif
public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType)
{
if (sourceType == typeof (string))
diff --git a/mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs b/mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs
deleted file mode 100644
index 90042743762..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/FontFamily.jvm.cs
+++ /dev/null
@@ -1,233 +0,0 @@
-//
-// System.Drawing.FontFamily.cs
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-// Author: Konstantin Triger (kostat@mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Drawing.Text;
-using System.Text;
-using System.Runtime.InteropServices;
-using System.Globalization;
-using awt = java.awt;
-using geom = java.awt.geom;
-using font = java.awt.font;
-using TextAttribute = java.awt.font.TextAttribute;
-
-namespace System.Drawing {
-
- public sealed class FontFamily : MarshalByRefObject, IDisposable {
-
- static readonly FontFamily _genericMonospace;
- static readonly FontFamily _genericSansSerif;
- static readonly FontFamily _genericSerif;
- static readonly FontCollection _installedFonts;
- internal static readonly awt.Container Container;
-
- static FontFamily() {
- Container = new awt.Container();
- _installedFonts = new InstalledFontCollection();
- _genericMonospace = new FontFamily(GenericFontFamilies.Monospace);
- _genericSansSerif = new FontFamily(GenericFontFamilies.SansSerif);
- _genericSerif = new FontFamily(GenericFontFamilies.Serif);
- }
-
- private readonly string _name;
-
- private awt.FontMetrics _fontMetrics = null;
- private FontStyle _lastStyle = FontStyle.Regular;
- private readonly awt.Font _font;
-
- // this is unavailable through Java API, usually 2048 for TT fonts
- const int UnitsPerEm = 2048;
- // the margin for text drawing
- const int DrawMargin = 571;
-
- #region ctors
-
- // dummy ctors to work around convertor problems
- internal FontFamily() {}
- internal FontFamily(IntPtr family) {}
-
- static string ToGenericFontName(GenericFontFamilies genericFamily) {
- switch(genericFamily) {
- case GenericFontFamilies.SansSerif:
- return "SansSerif";
- case GenericFontFamilies.Serif:
- return "Serif";
- default:
- return "Monospaced";
- }
- }
-
- public FontFamily(string familyName) : this(familyName, null) {
- }
-
- public FontFamily(string name, FontCollection fontCollection) {
- if (name == null)
- throw new ArgumentNullException("name");
-
- if (fontCollection == null)
- fontCollection = _installedFonts;
-
- if (fontCollection.Contains(name))
- _name = name;
- else {
- _name = ToGenericFontName(GenericFontFamilies.SansSerif);
- fontCollection = _installedFonts;
- }
-
- _font = fontCollection.GetInitialFont( _name );
- }
-
- public FontFamily(GenericFontFamilies genericFamily) : this(ToGenericFontName(genericFamily)) {
- }
-
- #endregion
-
- public string Name {
- get {
- return _name;
- }
- }
-
- internal int GetDrawMargin(FontStyle style) {
- return DrawMargin;
- }
-
- awt.FontMetrics GetMetrics(FontStyle style) {
- if ((_lastStyle != style) || (_fontMetrics == null)) {
- java.util.Map attrib = Font.DeriveStyle( FamilyFont.getAttributes(), style, true);
- attrib.put(TextAttribute.SIZE, new java.lang.Float((float)(UnitsPerEm<<1)));
- _fontMetrics = Container.getFontMetrics( FamilyFont.deriveFont( attrib ) );
- }
- return _fontMetrics;
- }
-
- public int GetCellAscent(FontStyle style) {
- return GetMetrics(style).getMaxAscent()>>1;
- }
-
- public int GetCellDescent(FontStyle style) {
- return GetMetrics(style).getMaxDecent()>>1;
- }
-
- public int GetEmHeight(FontStyle style) {
- return UnitsPerEm;
- }
-
- public int GetLineSpacing(FontStyle style) {
- return GetMetrics(style).getHeight()>>1;
- }
-
- public string GetName(int language) {
- try {
- CultureInfo culture = new CultureInfo(language, false);
- java.util.Locale locale = vmw.@internal.EnvironmentUtils.getLocaleFromCultureInfo( culture );
-
- return FamilyFont.getFamily( locale );
- }
- catch {
- return Name;
- }
- }
-
- public bool IsStyleAvailable(FontStyle style) {
- //unable to get this infromation from java
- return true;
- }
-
- #region static members
-
- public static FontFamily[] Families {
- get {
- return _installedFonts.Families;
- }
- }
-
- public static FontFamily GenericMonospace {
- get {
- return (FontFamily)_genericMonospace.MemberwiseClone();
- }
- }
-
- public static FontFamily GenericSansSerif {
- get {
- return (FontFamily)_genericSansSerif.MemberwiseClone();
- }
- }
-
- public static FontFamily GenericSerif {
- get {
- return (FontFamily)_genericSerif.MemberwiseClone();
- }
- }
-
- public static FontFamily[] GetFamilies(Graphics graphics) {
- if (graphics == null) {
- throw new ArgumentNullException("graphics");
- }
- return _installedFonts.Families;
- }
-
- #endregion
-
- #region Object members
-
- public override bool Equals(object obj) {
- if (this == obj)
- return true;
-
- if (!(obj is FontFamily))
- return false;
-
- return string.Compare(Name, ((FontFamily)obj).Name, true) == 0;
- }
-
- public override int GetHashCode() {
- return Name.ToLower().GetHashCode();
- }
-
- public override string ToString() {
- return string.Format("[{0}: Name={1}]", GetType().Name, Name);
- }
-
- #endregion
-
- #region IDisposable Members
-
- public void Dispose() {
- }
-
- #endregion
-
- internal awt.Font FamilyFont {
- get {
- return _font;
- }
- }
- }
-}
-
diff --git a/mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs
deleted file mode 100644
index 05becc8075d..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Graphics.jvm.cs
+++ /dev/null
@@ -1,2628 +0,0 @@
-using System;
-using System.Drawing.Drawing2D;
-using System.Drawing.Imaging;
-using System.Drawing.Text;
-using System.ComponentModel;
-using System.Collections;
-using System.Runtime.InteropServices;
-using System.Text;
-using awt = java.awt;
-using geom = java.awt.geom;
-
-namespace System.Drawing {
- [ComVisible(false)]
- public sealed class Graphics : MarshalByRefObject, IDisposable {
- sealed class DummyStroke : awt.Stroke {
- #region Stroke Members
-
- awt.Shape awt.Stroke.createStrokedShape(awt.Shape arg_0) {
- throw new NotImplementedException("DummyStroke");
- }
-
- #endregion
- }
-
- sealed class NormalizingPathIterator : geom.PathIterator {
-
- #region fields
-
- readonly geom.PathIterator _iter;
-
- const float norm = 0.5f;
- const float rnd = (1.0f - norm);
- float ax = 0.0f;
- float ay = 0.0f;
-
- #endregion
-
- #region ctor
-
- public NormalizingPathIterator(geom.PathIterator iter) {
- _iter = iter;
- }
-
- #endregion
-
- #region methods
-
- static int GetIndex(int type) {
- int index;
- switch ((GraphicsPath.JPI)type) {
- case GraphicsPath.JPI.SEG_CUBICTO:
- index = 4;
- break;
- case GraphicsPath.JPI.SEG_QUADTO:
- index = 2;
- break;
- case GraphicsPath.JPI.SEG_MOVETO:
- case GraphicsPath.JPI.SEG_LINETO:
- index = 0;
- break;
- case GraphicsPath.JPI.SEG_CLOSE:
- default:
- index = -1;
- break;
- }
-
- return index;
- }
-
- #endregion
-
- #region PathIterator Members
-
- void geom.PathIterator.next() {
- _iter.next();
- }
-
- bool geom.PathIterator.isDone() {
- return _iter.isDone();
- }
-
- int geom.PathIterator.currentSegment(float[] point) {
- int type = _iter.currentSegment(point);
-
- int index = GetIndex(type);
-
- if (index >= 0) {
- float ox = point[index];
- float oy = point[index+1];
- float newax = (float) java.lang.Math.floor(ox + rnd) + norm;
- float neway = (float) java.lang.Math.floor(oy + rnd) + norm;
- point[index] = newax;
- point[index+1] = neway;
- newax -= ox;
- neway -= oy;
- switch ((GraphicsPath.JPI)type) {
- case GraphicsPath.JPI.SEG_CUBICTO:
- point[0] += ax;
- point[1] += ay;
- point[2] += newax;
- point[3] += neway;
- break;
- case GraphicsPath.JPI.SEG_QUADTO:
- point[0] += (newax + ax) / 2;
- point[1] += (neway + ay) / 2;
- break;
- // case GraphicsPath.JPI.SEG_MOVETO:
- // case GraphicsPath.JPI.SEG_LINETO:
- // case GraphicsPath.JPI.SEG_CLOSE:
- // break;
- }
- ax = newax;
- ay = neway;
- }
-
- return type;
- }
-
- int geom.PathIterator.currentSegment(double[] point) {
- int type = _iter.currentSegment(point);
-
- int index = GetIndex(type);
-
- if (index >= 0) {
- float ox = (float)point[index];
- float oy = (float)point[index+1];
- float newax = (float)java.lang.Math.floor(ox + rnd) + norm;
- float neway = (float)java.lang.Math.floor(oy + rnd) + norm;
- point[index] = newax;
- point[index+1] = neway;
- newax -= ox;
- neway -= oy;
- switch ((GraphicsPath.JPI)type) {
- case GraphicsPath.JPI.SEG_CUBICTO:
- point[0] += ax;
- point[1] += ay;
- point[2] += newax;
- point[3] += neway;
- break;
- case GraphicsPath.JPI.SEG_QUADTO:
- point[0] += (newax + ax) / 2;
- point[1] += (neway + ay) / 2;
- break;
- // case GraphicsPath.JPI.SEG_MOVETO:
- // case GraphicsPath.JPI.SEG_LINETO:
- // case GraphicsPath.JPI.SEG_CLOSE:
- // break;
- }
- ax = newax;
- ay = neway;
- }
-
- return type;
- }
-
- int geom.PathIterator.getWindingRule() {
- return _iter.getWindingRule();
- }
-
- #endregion
-
- }
-
-
- #region Variables
-
- readonly awt.Graphics2D _nativeObject;
- PixelOffsetMode _pixelOffsetMode = PixelOffsetMode.Default;
- int _textContrast = 4;
- TextRenderingHint _textRenderingHint;
- readonly Image _image;
-
- readonly Matrix _transform;
- GraphicsUnit _pageUnit = GraphicsUnit.Display;
- float _pageScale = 1.0f;
-
- readonly Region _clip;
- readonly awt.Rectangle _windowRect;
-
- GraphicsState _nextGraphicsState = null;
-
- static readonly float [] _unitConversion = {
- 1, // World
- 1, // Display
- 1, // Pixel
- DefaultScreenResolution / 72.0f, // Point
- DefaultScreenResolution, // Inch
- DefaultScreenResolution / 300.0f,// Document
- DefaultScreenResolution / 25.4f // Millimeter
- };
-
- static int _isHeadless;
- static internal bool IsHeadless {
- get {
- if (_isHeadless == 0) {
- bool isHeadless = awt.GraphicsEnvironment.isHeadless();
- if (!isHeadless) {
- try {
- awt.Toolkit.getDefaultToolkit();
- }
- catch{
- isHeadless = true;
- }
- }
-
- _isHeadless = isHeadless ? 2 : 1;
- }
-
- return _isHeadless > 1;
- }
- }
-
- #endregion
-
-#if INTPTR_SUPPORT
- [ComVisible(false)]
- public delegate bool EnumerateMetafileProc (EmfPlusRecordType recordType,
- int flags,
- int dataSize,
- IntPtr data,
- PlayRecordCallback callbackData);
- [ComVisible (false)]
- public delegate bool DrawImageAbort (IntPtr callbackData);
-#endif
-
- #region Constr. and Destr.
- private Graphics (Image image) {
- _nativeObject = (awt.Graphics2D)image.NativeObject.CurrentImage.NativeImage.getGraphics();
- _image = image;
- _transform = new Matrix ();
-
- NativeObject.setStroke(new DummyStroke());
- NativeObject.setRenderingHint(awt.RenderingHints.KEY_COLOR_RENDERING, awt.RenderingHints.VALUE_COLOR_RENDER_QUALITY);
-
- InterpolationMode = InterpolationMode.Bilinear;
- TextRenderingHint = TextRenderingHint.SystemDefault;
-
- _windowRect = new awt.Rectangle(_image.Width, _image.Height);
- _clip = new Region();
- }
-
- #endregion
-
- #region Internal Accessors
-
- static internal float [] UnitConversion {
- get {
- return _unitConversion;
- }
- }
-
- static internal int DefaultScreenResolution {
- get {
- return IsHeadless ? 96 :
- awt.Toolkit.getDefaultToolkit().getScreenResolution();
- }
- }
-
- internal java.awt.Graphics2D NativeObject {
- get {
- return _nativeObject;
- }
- }
- #endregion
-
- #region FromImage (static accessor)
- public static Graphics FromImage (Image image) {
- return new Graphics(image);
- }
- #endregion
-
-
- #region Workers [INTERNAL]
- void DrawShape(Pen pen, awt.Shape shape) {
- if (pen == null)
- throw new ArgumentNullException("pen");
-
- if (StrokeFactory.CanCreateAdvancedStroke &&
- (!pen.CanCreateBasicStroke || !NeedsNormalization)) {
- geom.AffineTransform oldT = NativeObject.getTransform();
- NativeObject.setTransform(Matrix.IdentityTransform.NativeObject);
-
- try {
- geom.AffineTransform t = GetFinalTransform();
- if (!oldT.isIdentity()) {
- t = (geom.AffineTransform)t.clone();
- t.preConcatenate(oldT);
- }
-
- double widthsquared = pen.GetSquaredTransformedWidth(t);
-
- bool antiAlias = (SmoothingMode == SmoothingMode.AntiAlias);
-
- bool thin = (widthsquared <= (antiAlias ?
- AdvancedStroke.MinPenSizeAASquared :
- AdvancedStroke.MinPenSizeSquared));
-
- PenFit penFit = thin ? (antiAlias ? PenFit.ThinAntiAlias : PenFit.Thin) : PenFit.NotThin;
-
- if (NeedsNormalization) {
-
- bool normThin =
- widthsquared <= AdvancedStroke.MinPenSizeSquaredNorm;
-
- if (normThin) {
- shape = GetNormalizedShape(shape, t);
- shape = pen.GetNativeObject(
- t, null, penFit).createStrokedShape(shape);
- }
- else {
- shape = pen.GetNativeObject(t, penFit).createStrokedShape(shape);
- shape = GetNormalizedShape(shape, null);
- }
- }
- else {
- shape = pen.GetNativeObject(t, penFit).createStrokedShape(shape);
- }
-
- FillScaledShape(pen.Brush, shape);
- }
- finally {
- NativeObject.setTransform(oldT);
- }
- }
- else {
- awt.Stroke oldStroke = NativeObject.getStroke();
- NativeObject.setStroke(pen.GetNativeObject(null, PenFit.NotThin));
- try {
-
- NativeObject.setPaint(pen.Brush);
-
- geom.AffineTransform oldT = NativeObject.getTransform();
- NativeObject.transform(GetFinalTransform());
- try {
- NativeObject.draw(shape);
- }
- finally {
- NativeObject.setTransform(oldT);
- }
- }
- finally {
- NativeObject.setStroke(oldStroke);
- }
- }
- }
- void FillShape(Brush paint, awt.Shape shape) {
- if (paint == null)
- throw new ArgumentNullException("brush");
-
- geom.AffineTransform oldT = null;
- if (NeedsNormalization) {
- oldT = NativeObject.getTransform();
- geom.AffineTransform t = GetFinalTransform();
- if (!oldT.isIdentity()) {
- t = (geom.AffineTransform) t.clone ();
- t.preConcatenate(oldT);
- }
- shape = GetNormalizedShape(shape, t);
- }
- else {
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity())
- shape = t.createTransformedShape(shape);
- }
-
- if (oldT != null)
- NativeObject.setTransform(Matrix.IdentityTransform.NativeObject);
-
- try {
- FillScaledShape(paint, shape);
- }
- finally {
- if (oldT != null)
- NativeObject.setTransform(oldT);
- }
- }
-
- bool NeedsNormalization {
- get {
- return PixelOffsetMode != PixelOffsetMode.Half &&
- PixelOffsetMode != PixelOffsetMode.HighQuality;
- }
- }
-
- static awt.Shape GetNormalizedShape(awt.Shape shape, geom.AffineTransform t) {
- geom.PathIterator iter = new NormalizingPathIterator(shape.getPathIterator(t));
-
- geom.GeneralPath path = new geom.GeneralPath(iter.getWindingRule());
- path.append(iter, false);
- return path;
- }
-
- void FillScaledShape(Brush paint, awt.Shape shape) {
- Matrix m = null;
- if (!(paint is SolidBrush || paint is HatchBrush) && !_transform.IsIdentity) {
- m = paint.BrushTransform;
- paint.BrushMultiplyTransform( _transform );
- }
-
- try {
- NativeObject.setPaint(paint);
- NativeObject.fill(shape);
- }
- finally {
- if (m != null)
- paint.BrushTransform = m;
- }
- }
-
- #endregion
-
- #region Dispose
- public void Dispose() {
- NativeObject.dispose();
- }
- #endregion
-
- #region Clear
- public void Clear (Color color) {
- FillScaledShape(new SolidBrush( color ), _clip.NativeObject);
- }
- #endregion
-
- #region DrawArc
- public void DrawArc (Pen pen, Rectangle rect, float startAngle, float sweepAngle) {
- DrawArc (pen,
- rect.X,
- rect.Y,
- rect.Width,
- rect.Height,
- startAngle,
- sweepAngle);
- }
-
-
- public void DrawArc (Pen pen, RectangleF rect, float startAngle, float sweepAngle) {
- DrawArc (pen,
- rect.X,
- rect.Y,
- rect.Width,
- rect.Height,
- startAngle,
- sweepAngle);
- }
-
- public void DrawArc (Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle) {
- DrawArc(pen,
- (float)x,
- (float)y,
- (float)width,
- (float)height,
- (float)startAngle,
- (float)sweepAngle);
- }
-
- public void DrawArc (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) {
- GraphicsPath path = new GraphicsPath();
- path.AddArc(x, y, width, height, startAngle, sweepAngle);
- DrawPath(pen, path);
- }
- #endregion
-
- #region DrawBezier(s)
- public void DrawBezier (Pen pen, PointF pt1, PointF pt2, PointF pt3, PointF pt4) {
- DrawBezier(pen, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
- }
-
- public void DrawBezier (Pen pen, Point pt1, Point pt2, Point pt3, Point pt4) {
- DrawBezier(pen, pt1.X, pt1.Y, pt2.X, pt2.Y, pt3.X, pt3.Y, pt4.X, pt4.Y);
- }
-
- public void DrawBezier (Pen pen, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4) {
- geom.GeneralPath path = new geom.GeneralPath();
- path.moveTo(x1,y1);
- path.curveTo(x2,y2,x3,y3,x4,y4);
- DrawShape(pen, path);
- }
-
- public void DrawBeziers (Pen pen, Point [] points) {
- GraphicsPath path = new GraphicsPath();
- path.AddBeziers(points);
- DrawPath(pen, path);
- }
-
- public void DrawBeziers (Pen pen, PointF [] points) {
- GraphicsPath path = new GraphicsPath();
- path.AddBeziers(points);
- DrawPath(pen, path);
- }
- #endregion
-
- #region DrawClosedCurve
- public void DrawClosedCurve (Pen pen, PointF [] points) {
- DrawClosedCurve(pen, points, 0.5f, FillMode.Alternate);
- }
-
- public void DrawClosedCurve (Pen pen, Point [] points) {
- DrawClosedCurve(pen, points, 0.5f, FillMode.Alternate);
- }
-
- public void DrawClosedCurve (Pen pen, Point [] points, float tension, FillMode fillmode) {
- GraphicsPath path = new GraphicsPath(fillmode);
- path.AddClosedCurve(points, tension);
- DrawPath(pen, path);
- }
-
- public void DrawClosedCurve (Pen pen, PointF [] points, float tension, FillMode fillmode) {
- GraphicsPath path = new GraphicsPath(fillmode);
- path.AddClosedCurve(points, tension);
- DrawPath(pen, path);
- }
- #endregion
-
- #region DrawCurve
- public void DrawCurve (Pen pen, Point [] points) {
- DrawCurve(pen, points, 0.5f);
- }
-
- public void DrawCurve (Pen pen, PointF [] points) {
- DrawCurve(pen, points, 0.5f);
- }
-
- public void DrawCurve (Pen pen, PointF [] points, float tension) {
- DrawCurve(pen, points, 0, points.Length-1, tension);
- }
-
- public void DrawCurve (Pen pen, Point [] points, float tension) {
- DrawCurve(pen, points, 0, points.Length-1, tension);
- }
-
-
- public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments) {
- DrawCurve(pen, points, offset, numberOfSegments, 0.5f);
- }
-
- public void DrawCurve (Pen pen, Point [] points, int offset, int numberOfSegments, float tension) {
- GraphicsPath path = new GraphicsPath();
- path.AddCurve(points, offset, numberOfSegments, tension);
- DrawPath(pen, path);
- }
-
-
- public void DrawCurve (Pen pen, PointF [] points, int offset, int numberOfSegments, float tension) {
- GraphicsPath path = new GraphicsPath();
- path.AddCurve(points, offset, numberOfSegments, tension);
- DrawPath(pen, path);
- }
- #endregion
-
- #region DrawEllipse
- public void DrawEllipse (Pen pen, Rectangle rect) {
- DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public void DrawEllipse (Pen pen, RectangleF rect) {
- DrawEllipse (pen, rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public void DrawEllipse (Pen pen, int x, int y, int width, int height) {
- DrawEllipse(pen,(float)x,(float)y,(float)width,(float)height);
- }
-
- public void DrawEllipse (Pen pen, float x, float y, float width, float height) {
- DrawShape(pen, new geom.Ellipse2D.Float(x,y,width,height));
- }
- #endregion
-
- #region DrawIcon
- public void DrawIcon (Icon icon, Rectangle targetRect) {
- Bitmap b = icon.ToBitmap ();
- this.DrawImage (b, targetRect);
- }
-
- public void DrawIcon (Icon icon, int x, int y) {
- Bitmap b = icon.ToBitmap ();
- this.DrawImage (b, x, y);
- }
-
- public void DrawIconUnstretched (Icon icon, Rectangle targetRect) {
- Bitmap b = icon.ToBitmap ();
- this.DrawImageUnscaled (b, targetRect);
- }
- #endregion
-
- #region DrawImage
-
- public void DrawImage (Image image, Point point) {
- DrawImage(image, point.X, point.Y);
- }
-
- public void DrawImage (Image image, PointF point) {
- DrawImage(image, point.X, point.Y);
- }
-
-
- public void DrawImage (Image image, Point [] destPoints) {
- Matrix m = new Matrix(new Rectangle(0, 0, image.Width, image.Height), destPoints);
- DrawImage(image, m);
- }
-
- public void DrawImage (Image image, PointF [] destPoints) {
- Matrix m = new Matrix(new RectangleF(0, 0, image.Width, image.Height), destPoints);
- DrawImage(image, m);
- }
-
-
- public void DrawImage (Image image, Rectangle rect) {
- DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public void DrawImage (Image image, RectangleF rect) {
- DrawImage(image, rect.X, rect.Y, rect.Width, rect.Height);
- }
-
-
- public void DrawImage (Image image, int x, int y) {
- DrawImage(image, (float)x, (float)y);
- }
-
- public void DrawImage (Image image, float x, float y) {
- if ((image.HorizontalResolution != DpiX) || (image.VerticalResolution != DpiY))
- DrawImage( image, x, y,
- (float)image.Width * (DpiX / image.HorizontalResolution) / _unitConversion[(int)PageUnit],
- (float)image.Height * (DpiY / image.VerticalResolution) / _unitConversion[(int)PageUnit]) ;
- else
- DrawImage( image, x, y,
- (float)image.Width / _unitConversion[(int)PageUnit],
- (float)image.Height / _unitConversion[(int)PageUnit] );
- }
-
-
- public void DrawImage (Image image, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit) {
- DrawImage(
- image,
- new Point [] {
- new Point( destRect.X, destRect.Y),
- new Point( destRect.X + destRect.Width, destRect.Y),
- new Point( destRect.X, destRect.Y + destRect.Height)},
- srcRect,
- srcUnit);
- }
-
- public void DrawImage (Image image, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit) {
- DrawImage(
- image,
- new PointF [] {
- new PointF( destRect.X, destRect.Y),
- new PointF( destRect.X + destRect.Width, destRect.Y),
- new PointF( destRect.X, destRect.Y + destRect.Height)},
- srcRect,
- srcUnit);
- }
-
-
- public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit) {
- DrawImage(image, destPoints, srcRect, srcUnit, null);
- }
-
- public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit) {
- DrawImage(image, destPoints, srcRect, srcUnit, null);
- }
-
- [MonoLimitation("ImageAttributes parameter is ignored.")]
- public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr) {
- //TBD: ImageAttributes
- if (srcUnit != GraphicsUnit.Pixel)
- throw new NotImplementedException();
- // Like in .NET http://dotnet247.com/247reference/msgs/45/227979.aspx
-
- Matrix mx = new Matrix(srcRect, destPoints);
-
- Region region = new Region(srcRect);
- DrawImage(image, mx, region);
- }
-
- [MonoLimitation ("ImageAttributes parameter is ignored.")]
- public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr) {
- //TBD: ImageAttributes
- if (srcUnit != GraphicsUnit.Pixel)
- throw new NotImplementedException();
- // Like in .NET http://dotnet247.com/247reference/msgs/45/227979.aspx
-
- Matrix mx = new Matrix(srcRect, destPoints);
-
- Region region = new Region(srcRect);
- DrawImage(image, mx, region);
- }
-
-
- public void DrawImage (Image image, int x, int y, int width, int height) {
- DrawImage(image, (float)x, (float)y, (float)width, (float)height);
- }
-
- public void DrawImage (Image image, float x, float y, float width, float height) {
- Matrix mx = new Matrix();
- mx.Translate((float)x, (float)y);
- mx.Scale(width / (float)image.Width, height / (float)image.Height);
-
- DrawImage( image, mx );
- }
-
-
- public void DrawImage (Image image, int x, int y, Rectangle srcRect, GraphicsUnit srcUnit) {
- DrawImage(image, new Rectangle(x, y, srcRect.Width, srcRect.Height), srcRect, srcUnit);
- }
-
- public void DrawImage (Image image, float x, float y, RectangleF srcRect, GraphicsUnit srcUnit) {
- DrawImage(image, new RectangleF(x, y, srcRect.Width, srcRect.Height), srcRect, srcUnit);
- }
-
-
- public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit) {
- DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, null);
- }
-
- public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit) {
- DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, null);
- }
-
- [MonoLimitation ("ImageAttributes parameter is ignored.")]
- public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr) {
- //TBD: attributes
- DrawImage(
- image,
- destRect,
- new Rectangle(srcX, srcY, srcWidth, srcHeight),
- srcUnit);
- }
-
- [MonoLimitation ("ImageAttributes parameter is ignored.")]
- public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs) {
- //TBD: attributes
- DrawImage(
- image,
- destRect,
- new RectangleF(srcX, srcY, srcWidth, srcHeight),
- srcUnit);
- }
-
-
- public delegate bool DrawImageAbort (IntPtr callbackdata);
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttrs, DrawImageAbort callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- internal void DrawImage (Image image, Matrix m) {
- DrawImage(image, m, null);
- }
-
- internal void DrawImage (Image image, Matrix m, Region clip) {
- if (clip == null) {
- clip = new Region( new RectangleF( 0, 0, image.Width, image.Height ) );
- }
-
- geom.AffineTransform t = GetFinalTransform(_transform.NativeObject, PageUnit, 1.0f);
- if (!t.isIdentity())
- m.NativeObject.preConcatenate(t);
-
- clip.Transform( m );
-
- if (NeedsNormalization) {
- Matrix normMatrix = ComputeClipNormalization(clip.GetBounds(this));
- clip.Transform(normMatrix);
- }
-
- awt.Shape oldClip = NativeObject.getClip();
- IntersectScaledClipWithBase(clip);
-
- try {
- Matrix mm = ComputeImageNormalization(image, m);
- NativeObject.drawImage(image.NativeObject.CurrentImage.NativeImage, mm.NativeObject, null);
- }
- finally {
- NativeObject.setClip( oldClip );
- }
- }
-
- private static Matrix ComputeImageNormalization(Image img, Matrix m) {
- if ( m.IsIdentity )
- return m;
-
- //m.Translate( -(m.Elements[0] + m.Elements[2]) / 2.0f, -(m.Elements[3] + m.Elements[1]) / 2.0f, MatrixOrder.Append);
- m.Translate(
- -(float)(m.NativeObject.getScaleX() + m.NativeObject.getShearX()) / 2.0f,
- -(float)(m.NativeObject.getScaleY() + m.NativeObject.getShearY()) / 2.0f, MatrixOrder.Append);
-
- PointF [] p = new PointF[] {
- new PointF( 0, 0 ),
- new PointF( img.Width, 0 ),
- new PointF( 0, img.Height )};
-
- m.TransformPoints(p);
- for (int i=0; i < p.Length; i++) {
- p[i].X = (float)( p[i].X + 0.5f );
- p[i].Y = (float)( p[i].Y + 0.5f );
- }
-
- return new Matrix( new Rectangle(0, 0, img.Width, img.Height), p );
- }
- private static Matrix ComputeClipNormalization(RectangleF rect) {
- PointF [] p = new PointF[] {
- new PointF( rect.X, rect.Y ),
- new PointF( rect.X + rect.Width, rect.Y ),
- new PointF( rect.X, rect.Y + rect.Height )};
-
- for (int i=0; i < p.Length; i++) {
- p[i].X = (float)Math.Round( p[i].X + 0.5f ) + 0.5f;
- p[i].Y = (float)Math.Round( p[i].Y + 0.5f ) + 0.5f;
- }
-
- return new Matrix( rect, p );
- }
-
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
- {
-
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public void DrawImage (Image image, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)
- {
- throw new NotImplementedException();
- }
-#endif
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public void DrawImage (Image image, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, int callbackData)
- {
- throw new NotImplementedException();
- }
-#endif
-
-#if INTPTR_SUPPORT
- public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
- {
- //TBD:units,attributes, callback
- java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject;
- g.drawImage(image.NativeObject,destRect.X,destRect.Y,destRect.Width,destRect.Height,srcX,srcY,srcWidth,srcHeight,null);
- }
-
- public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback)
- {
- //TBD:units,attributes, callback
- java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject;
- g.drawImage(image.NativeObject,
- (int)destRect.X,
- (int)destRect.Y,
- (int)destRect.Width,
- (int)destRect.Height,
- (int)srcX,
- (int)srcY,
- (int)srcWidth,
- (int)srcHeight,null);
- }
-
- public void DrawImage (Image image, Rectangle destRect, float srcX, float srcY, float srcWidth, float srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, IntPtr callbackData)
- {
- //TBD:units,attributes, callback
- java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject;
- g.drawImage(image.NativeObject,
- (int)destRect.X,
- (int)destRect.Y,
- (int)destRect.Width,
- (int)destRect.Height,
- (int)srcX,
- (int)srcY,
- (int)srcWidth,
- (int)srcHeight,null);
- }
-
- public void DrawImage (Image image, Rectangle destRect, int srcX, int srcY, int srcWidth, int srcHeight, GraphicsUnit srcUnit, ImageAttributes imageAttr, DrawImageAbort callback, IntPtr callbackData)
- {
- //TBD:units,attributes, callback
- java.awt.Graphics2D g = (java.awt.Graphics2D)nativeObject;
- g.drawImage(image.NativeObject,
- destRect.X,
- destRect.Y,
- destRect.Width,
- destRect.Height,
- srcX,
- srcY,
- srcWidth,
- srcHeight,null);
- }
-#endif
-
- public void DrawImageUnscaled (Image image, Point point)
- {
- DrawImageUnscaled (image, point.X, point.Y);
- }
-
- public void DrawImageUnscaled (Image image, Rectangle rect) {
- DrawImageUnscaled (image, rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public void DrawImageUnscaled (Image image, int x, int y) {
- DrawImage (image, x, y, image.Width, image.Height);
- }
-
- public void DrawImageUnscaled (Image image, int x, int y, int width, int height) {
- Image tmpImg = new Bitmap (width, height);
- Graphics g = FromImage (tmpImg);
- g.DrawImage (image, 0, 0, image.Width, image.Height);
- this.DrawImage (tmpImg, x, y, width, height);
- tmpImg.Dispose ();
- g.Dispose ();
- }
-
-#if NET_2_0
- [MonoNotSupported ("")]
- public void DrawImageUnscaledAndClipped (Image image, Rectangle rect)
- {
- throw new NotImplementedException ();
- }
-
-#endif
- #endregion
-
- #region DrawLine
- public void DrawLine (Pen pen, PointF pt1, PointF pt2) {
- DrawLine(pen,pt1.X,pt1.Y,pt2.X,pt2.Y);
- }
-
- public void DrawLine (Pen pen, Point pt1, Point pt2) {
- DrawLine(pen,(float)pt1.X,(float)pt1.Y,(float)pt2.X,(float)pt2.Y);
- }
-
- public void DrawLine (Pen pen, int x1, int y1, int x2, int y2) {
- DrawLine(pen,(float)x1,(float)y1,(float)x2,(float)y2);
- }
-
- public void DrawLine (Pen pen, float x1, float y1, float x2, float y2) {
- DrawShape(pen, new geom.Line2D.Float(x1,y1,x2,y2));
- }
-
- public void DrawLines (Pen pen, PointF [] points) {
- GraphicsPath path = new GraphicsPath();
- path.AddLines(points);
- DrawShape(pen, path);
- }
-
- public void DrawLines (Pen pen, Point [] points) {
- GraphicsPath path = new GraphicsPath();
- path.AddLines(points);
- DrawShape(pen, path);
- }
- #endregion
-
- #region DrawPath
- public void DrawPath (Pen pen, GraphicsPath path) {
- DrawShape(pen, path);
- }
- #endregion
-
- #region DrawPie
- public void DrawPie (Pen pen, Rectangle rect, float startAngle, float sweepAngle) {
- DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
- }
-
- public void DrawPie (Pen pen, RectangleF rect, float startAngle, float sweepAngle) {
- DrawPie (pen, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
- }
-
- public void DrawPie (Pen pen, float x, float y, float width, float height, float startAngle, float sweepAngle) {
- GraphicsPath path = new GraphicsPath();
- path.AddPie(x, y, width, height, startAngle, sweepAngle);
- DrawPath(pen, path);
- }
-
- public void DrawPie (Pen pen, int x, int y, int width, int height, int startAngle, int sweepAngle) {
- DrawPie(pen,(float)x,(float)y,(float)width,(float)height,(float)startAngle,(float)sweepAngle);
- }
- #endregion
-
- #region DrawPolygon
- public void DrawPolygon (Pen pen, Point [] points) {
- GraphicsPath path = new GraphicsPath();
- path.AddPolygon(points);
- DrawPath(pen, path);
- }
-
- public void DrawPolygon (Pen pen, PointF [] points) {
- GraphicsPath path = new GraphicsPath();
- path.AddPolygon(points);
- DrawPath(pen, path);
- }
- #endregion
-
- #region DrawRectangle(s)
- internal void DrawRectangle (Pen pen, RectangleF rect) {
- DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height);
- }
-
- public void DrawRectangle (Pen pen, Rectangle rect) {
- DrawRectangle (pen, rect.Left, rect.Top, rect.Width, rect.Height);
- }
-
- public void DrawRectangle (Pen pen, float x, float y, float width, float height) {
- DrawShape(pen, new geom.Rectangle2D.Float(x,y,width,height));
- }
-
- public void DrawRectangle (Pen pen, int x, int y, int width, int height) {
- DrawRectangle (pen,(float) x,(float) y,(float) width,(float) height);
- }
-
- public void DrawRectangles (Pen pen, RectangleF [] rects) {
- foreach(RectangleF r in rects)
- DrawRectangle (pen, r.Left, r.Top, r.Width, r.Height);
- }
-
- public void DrawRectangles (Pen pen, Rectangle [] rects) {
- foreach(Rectangle r in rects)
- DrawRectangle (pen, r.Left, r.Top, r.Width, r.Height);
- }
- #endregion
-
- #region DrawString
- public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle) {
- DrawString(s, font, brush, layoutRectangle.X, layoutRectangle.Y, layoutRectangle.Width, layoutRectangle.Height, null);
- }
-
- public void DrawString (string s, Font font, Brush brush, PointF point) {
- DrawString(s, font, brush, point.X, point.Y, float.PositiveInfinity, float.PositiveInfinity, null);
- }
-
- public void DrawString (string s, Font font, Brush brush, PointF point, StringFormat format) {
- DrawString(s, font, brush, point.X, point.Y, float.PositiveInfinity, float.PositiveInfinity, format);
- }
-
- public void DrawString (string s, Font font, Brush brush, RectangleF layoutRectangle, StringFormat format) {
- DrawString(s, font, brush, layoutRectangle.X, layoutRectangle.Y, layoutRectangle.Width, layoutRectangle.Height, format);
- }
-
- public void DrawString (string s, Font font, Brush brush, float x, float y) {
- DrawString(s, font, brush, x, y, float.PositiveInfinity, float.PositiveInfinity, null);
- }
-
- public void DrawString (string s, Font font, Brush brush, float x, float y, StringFormat format) {
- DrawString(s, font, brush, x, y, float.PositiveInfinity, float.PositiveInfinity, format);
- }
-
- void DrawString (string s, Font font, Brush brush,
- float x, float y, float width, float height,
- StringFormat format) {
- if (brush == null)
- throw new ArgumentNullException("brush");
-
- if (font == null)
- throw new ArgumentNullException("font");
-
- if (format != null && format.LineAlignment != StringAlignment.Near) {
-
- SizeF sizeF = MeasureString(s, font, format, width, height, null);
-
- float lineAWidth = width;
- float lineAHeight = height;
-
- if (float.IsPositiveInfinity(width))
- lineAWidth = lineAHeight = 0;
-
- float wdelta = format.IsVertical ? lineAWidth - sizeF.Width : lineAHeight - sizeF.Height;
- float pdelta = format.LineAlignment == StringAlignment.Center ? wdelta/2 : wdelta;
- if (format.IsVertical) {
- if (!(format.IsRightToLeft && format.LineAlignment == StringAlignment.Far))
- x += pdelta;
- if (!float.IsPositiveInfinity(width))
- width -= wdelta;
- }
- else {
- y += pdelta;
- if (!float.IsPositiveInfinity(width))
- height -= wdelta;
- }
- }
-
- awt.Paint oldP = NativeObject.getPaint();
- NativeObject.setPaint(brush);
- try {
- geom.AffineTransform oldT = NativeObject.getTransform();
- try {
-
- bool noclip = float.IsPositiveInfinity(width) || (format != null && format.NoClip);
-
- awt.Shape oldClip = null;
- if (!noclip) {
- oldClip = NativeObject.getClip();
- NativeObject.clip(new geom.Rectangle2D.Float(x, y, width, height));
- }
- try {
- TextLineIterator iter = new TextLineIterator(s, font, NativeObject.getFontRenderContext(), format, width, height);
- NativeObject.transform(iter.Transform);
- for (LineLayout layout = iter.NextLine(); layout != null; layout = iter.NextLine()) {
- layout.Draw (NativeObject, x * UnitConversion [(int) PageUnit], y * UnitConversion [(int) PageUnit]);
- }
- }
- finally {
- if (!noclip)
- NativeObject.setClip(oldClip);
- }
- }
- finally {
- NativeObject.setTransform(oldT);
- }
- }
- finally {
- NativeObject.setPaint(oldP);
- }
- }
- #endregion
-
- #region Container
-
- void PushGraphicsState(GraphicsState state) {
- state.Next = _nextGraphicsState;
- _nextGraphicsState = state;
- }
-
- GraphicsState PopGraphicsState() {
- GraphicsState state = _nextGraphicsState;
- _nextGraphicsState = _nextGraphicsState.Next;
- return state;
- }
-
- bool ContainsGraphicsState(GraphicsState state) {
- GraphicsState gs = _nextGraphicsState;
-
- while(gs != null) {
- if (gs == state)
- return true;
-
- gs = gs.Next;
- }
-
- return false;
- }
-
- public void EndContainer (GraphicsContainer container) {
- Restore(container.StateObject);
- }
-
- public GraphicsContainer BeginContainer () {
- return new GraphicsContainer(Save(Matrix.IdentityTransform, true));
- }
-
- public GraphicsContainer BeginContainer (Rectangle dstrect, Rectangle srcrect, GraphicsUnit unit) {
- Matrix containerTransfrom =
- new Matrix( srcrect,
- new Point [] { new Point (dstrect.X, dstrect.Y),
- new Point (dstrect.X + dstrect.Width, dstrect.Y),
- new Point (dstrect.X, dstrect.Y + dstrect.Height) });
-
- float scale = _unitConversion[ (int)PageUnit ] / _unitConversion[ (int)unit ];
- containerTransfrom.Scale(scale, scale);
-
- return new GraphicsContainer(Save(containerTransfrom, true));
- }
-
-
- public GraphicsContainer BeginContainer (RectangleF dstrect, RectangleF srcrect, GraphicsUnit unit) {
- Matrix containerTransfrom =
- new Matrix( srcrect,
- new PointF [] { new PointF (dstrect.X, dstrect.Y),
- new PointF (dstrect.X + dstrect.Width, dstrect.Y),
- new PointF (dstrect.X, dstrect.Y + dstrect.Height) });
-
- float scale = _unitConversion[ (int)PageUnit ] / _unitConversion[ (int)unit ];
- containerTransfrom.Scale(scale, scale);
-
- return new GraphicsContainer(Save(containerTransfrom, true));
- }
-
- GraphicsState Save(Matrix matrix, bool resetState) {
- GraphicsState graphicsState = new GraphicsState(this, matrix, resetState);
-
- PushGraphicsState( graphicsState );
- return graphicsState;
- }
-
- public GraphicsState Save () {
- return Save(Matrix.IdentityTransform, false);
- }
-
- public void Restore (GraphicsState graphicsState) {
- if (ContainsGraphicsState(graphicsState)) {
- GraphicsState gs = PopGraphicsState();
- while ( gs != graphicsState )
- gs = PopGraphicsState();
-
- graphicsState.RestoreState(this);
- }
- }
-
- #endregion
-
- #region Metafiles Staff
- [MonoTODO]
- public void AddMetafileComment (byte [] data) {
- throw new NotImplementedException ();
- }
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, RectangleF destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF destPoint, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Rectangle destRect, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit srcUnit, EnumerateMetafileProc callback, IntPtr callbackData)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point [] destPoints, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Rectangle destRect, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, Point destPoint, Rectangle srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, RectangleF destRect, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF [] destPoints, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void EnumerateMetafile (Metafile metafile, PointF destPoint, RectangleF srcRect, GraphicsUnit unit, EnumerateMetafileProc callback, IntPtr callbackData, ImageAttributes imageAttr)
- {
- throw new NotImplementedException ();
- }
-#endif
- #endregion
-
- #region ExcludeClip
- void ExcludeClip(geom.Area area) {
-
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity()) {
- area = (geom.Area) area.clone ();
- area.transform(t);
- }
-
- _clip.NativeObject.subtract(area);
- RestoreBaseClip();
- NativeObject.clip(_clip);
- }
-
- public void ExcludeClip (Rectangle rect) {
- ExcludeClip(new geom.Area(rect.NativeObject));
- }
-
- public void ExcludeClip (Region region) {
- if (region == null)
- throw new ArgumentNullException("region");
- ExcludeClip(region.NativeObject);
- }
- #endregion
-
- #region FillClosedCurve
- public void FillClosedCurve (Brush brush, PointF [] points) {
- FillClosedCurve (brush, points, FillMode.Alternate);
- }
-
-
- public void FillClosedCurve (Brush brush, Point [] points) {
- FillClosedCurve (brush, points, FillMode.Alternate);
- }
-
-
- public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode) {
- FillClosedCurve (brush, points, fillmode, 0.5f);
- }
-
- public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode) {
- FillClosedCurve (brush, points, fillmode, 0.5f);
- }
-
- public void FillClosedCurve (Brush brush, PointF [] points, FillMode fillmode, float tension) {
- GraphicsPath path = new GraphicsPath(fillmode);
- path.AddClosedCurve(points, tension);
- FillPath(brush, path);
- }
-
- public void FillClosedCurve (Brush brush, Point [] points, FillMode fillmode, float tension) {
- GraphicsPath path = new GraphicsPath(fillmode);
- path.AddClosedCurve(points, tension);
- FillPath(brush, path);
- }
- #endregion
-
- #region FillEllipse
- public void FillEllipse (Brush brush, Rectangle rect) {
- FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public void FillEllipse (Brush brush, RectangleF rect) {
- FillEllipse (brush, rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public void FillEllipse (Brush brush, float x, float y, float width, float height) {
- FillShape(brush,new java.awt.geom.Ellipse2D.Float(x,y,width,height));
- }
-
- public void FillEllipse (Brush brush, int x, int y, int width, int height) {
- FillEllipse (brush,(float)x,(float)y,(float)width,(float)height);
- }
- #endregion
-
- #region FillPath
- public void FillPath (Brush brush, GraphicsPath path) {
- if (path == null)
- throw new ArgumentNullException("path");
-
- FillShape(brush,path);
- }
- #endregion
-
- #region FillPie
- public void FillPie (Brush brush, Rectangle rect, float startAngle, float sweepAngle) {
- FillPie(brush,(float)rect.X,(float)rect.Y,(float)rect.Width,(float)rect.Height,(float)startAngle,(float)sweepAngle);
- }
-
- public void FillPie (Brush brush, int x, int y, int width, int height, int startAngle, int sweepAngle) {
- FillPie(brush,(float)x,(float)y,(float)width,(float)height,(float)startAngle,(float)sweepAngle);
- }
-
- public void FillPie (Brush brush, float x, float y, float width, float height, float startAngle, float sweepAngle) {
- GraphicsPath path = new GraphicsPath();
- path.AddPie(x, y, width, height, startAngle, sweepAngle);
- FillPath(brush, path);
- }
- #endregion
-
- #region FillPolygon
- public void FillPolygon (Brush brush, PointF [] points) {
- FillPolygon(brush, points, FillMode.Alternate);
- }
-
- public void FillPolygon (Brush brush, Point [] points) {
- FillPolygon(brush, points, FillMode.Alternate);
- }
-
- public void FillPolygon (Brush brush, Point [] points, FillMode fillMode) {
- GraphicsPath path = new GraphicsPath(fillMode);
- path.AddPolygon(points);
- FillPath(brush,path);
- }
-
- public void FillPolygon (Brush brush, PointF [] points, FillMode fillMode) {
- GraphicsPath path = new GraphicsPath(fillMode);
- path.AddPolygon(points);
- FillPath(brush,path);
- }
- #endregion
-
- #region FillRectangle
- public void FillRectangle (Brush brush, RectangleF rect) {
- FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height);
- }
-
- public void FillRectangle (Brush brush, Rectangle rect) {
- FillRectangle (brush, rect.Left, rect.Top, rect.Width, rect.Height);
- }
-
- public void FillRectangle (Brush brush, int x, int y, int width, int height) {
- FillRectangle(brush,(float)x,(float)y,(float)width,(float)height);
- }
-
- public void FillRectangle (Brush brush, float x, float y, float width, float height) {
- FillShape(brush,new java.awt.geom.Rectangle2D.Float(x,y,width,height));
- }
-
- public void FillRectangles (Brush brush, Rectangle [] rects) {
- GraphicsPath path = new GraphicsPath();
- path.AddRectangles(rects);
- FillPath(brush,path);
- }
-
- public void FillRectangles (Brush brush, RectangleF [] rects) {
- GraphicsPath path = new GraphicsPath();
- path.AddRectangles(rects);
- FillPath(brush,path);
- }
- #endregion
-
- #region FillRegion
- public void FillRegion (Brush brush, Region region) {
- FillShape(brush,region);
- }
-
- #endregion
-
- public void Flush () {
- Flush (FlushIntention.Flush);
- }
-
-
- public void Flush (FlushIntention intention) {
- if (_image != null)
- _image.NativeObject.CurrentImage.NativeImage.flush();
- }
-
-#if INTPTR_SUPPORTED
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public void ReleaseHdc (IntPtr hdc)
- {
- throw new NotImplementedException();
- }
-
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public void ReleaseHdcInternal (IntPtr hdc)
- {
- throw new NotImplementedException ();
- }
-
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public static Graphics FromHdc (IntPtr hdc)
- {
- throw new NotImplementedException();
- }
-
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public static Graphics FromHdc (IntPtr hdc, IntPtr hdevice)
- {
- throw new NotImplementedException ();
- }
-
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public static Graphics FromHdcInternal (IntPtr hdc)
- {
- throw new NotImplementedException ();
- }
-
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public static Graphics FromHwnd (IntPtr hwnd)
- {
- throw new NotImplementedException();
- }
-
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public static Graphics FromHwndInternal (IntPtr hwnd)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- internal static Graphics FromXDrawable (IntPtr drawable, IntPtr display)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public static IntPtr GetHalftonePalette ()
- {
- throw new NotImplementedException ();
- }
-
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- [MonoTODO]
- public IntPtr GetHdc ()
- {
- throw new NotImplementedException();
- }
-#endif
-
- #region GetNearestColor
- [MonoTODO]
- public Color GetNearestColor (Color color) {
- throw new NotImplementedException();
- }
- #endregion
-
- #region IntersectClip
- void IntersectClip (geom.Area area) {
-
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity()) {
- area = (geom.Area) area.clone ();
- area.transform(t);
- }
-
- _clip.NativeObject.intersect(area);
- RestoreBaseClip();
- NativeObject.clip(_clip);
- }
-
- public void IntersectClip (Region region) {
- if (region == null)
- throw new ArgumentNullException("region");
-
- IntersectClip(region.NativeObject);
- }
-
- public void IntersectClip (RectangleF rect) {
- IntersectClip(new geom.Area(rect.NativeObject));
- }
-
- public void IntersectClip (Rectangle rect) {
- IntersectClip(new geom.Area(rect.NativeObject));
- }
- #endregion
-
- #region IsVisible
- public bool IsVisible (Point point) {
- return IsVisible(point.X,point.Y);
- }
-
-
- public bool IsVisible (RectangleF rect) {
- return IsVisible ((float)rect.X,(float)rect.Y,(float)rect.Width,(float)rect.Height);
- }
-
- public bool IsVisible (PointF point) {
- return IsVisible(point.X,point.Y);
- }
-
- public bool IsVisible (Rectangle rect) {
- return IsVisible ((float)rect.X,(float)rect.Y,(float)rect.Width,(float)rect.Height);
- }
-
- public bool IsVisible (float x, float y) {
- double dx = x;
- double dy = y;
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity()) {
- double[] p = new double[] {dx, dy};
- t.transform(p, 0, p, 0, 1);
-
- dx = p[0];
- dy = p[1];
- }
- if (!_clip.NativeObject.contains(dx, dy))
- return false;
-
- awt.Shape clip = NativeObject.getClip();
- if (clip == null)
- return true;
-
- return clip.contains(dx, dy);
- }
-
- public bool IsVisible (int x, int y) {
- return IsVisible ((float)x,(float)y);
- }
-
- public bool IsVisible (float x, float y, float width, float height) {
-
- geom.AffineTransform t = GetFinalTransform();
- geom.Rectangle2D r = new geom.Rectangle2D.Float(x, y, width, height);
-
- if (!t.isIdentity())
- r = t.createTransformedShape(r).getBounds2D();
-
- return NativeObject.hitClip(
- (int)(r.getX()+0.5), (int)(r.getY()+0.5),
- (int)(r.getWidth()+0.5), (int)(r.getHeight()+0.5))
- && _clip.NativeObject.intersects(r);
- }
-
-
- public bool IsVisible (int x, int y, int width, int height) {
- return IsVisible ((float)x,(float)y,(float)width,(float)height);
- }
- #endregion
-
- #region MeasureCharacterRanges
- public Region [] MeasureCharacterRanges (string text, Font font, RectangleF layoutRect, StringFormat stringFormat) {
- if (stringFormat == null)
- throw new ArgumentException("stringFormat");
-
- CharacterRange[] ranges = stringFormat.CharRanges;
- if (ranges == null || ranges.Length == 0)
- return new Region[0];
-
- GraphicsPath[] pathes = new GraphicsPath[ranges.Length];
- for (int i = 0; i < pathes.Length; i++)
- pathes[i] = new GraphicsPath();
-
- TextLineIterator iter = new TextLineIterator(text, font, NativeObject.getFontRenderContext(),
- stringFormat, layoutRect.Width, layoutRect.Height);
-
- for (LineLayout layout = iter.NextLine(); layout != null; layout = iter.NextLine()) {
-
- for (int i = 0; i < ranges.Length; i++) {
- int start = ranges[i].First;
- int length = ranges[i].Length;
- start -= iter.CharsConsumed;
- int limit = start + length;
- int layoutStart = iter.CurrentPosition - layout.CharacterCount;
- if (start < iter.CurrentPosition && limit > layoutStart) {
-
- float layoutOffset;
- if (start > layoutStart)
- layoutOffset = iter.GetAdvanceBetween(layoutStart, start);
- else {
- layoutOffset = 0;
- start = layoutStart;
- }
-
- float width = (limit < iter.CurrentPosition) ?
- iter.GetAdvanceBetween(start, limit) :
- layout.Width - layoutOffset;
-
- float height = layout.Ascent + layout.Descent;
-
- float x = layout.NativeX;
- float y = layout.NativeY;
-
- if (stringFormat.IsVertical) {
- y += layoutOffset;
- x -= layout.Descent;
- }
- else {
- x += layoutOffset;
- y -= layout.Ascent;
- }
-
- if (layout.AccumulatedHeight + height > iter.WrapHeight) {
- float diff = iter.WrapHeight - layout.AccumulatedHeight;
- if (stringFormat.IsVertical && stringFormat.IsRightToLeft) {
- x += diff;
- height -= diff;
- }
- else
- height = diff;
- }
-
- if (stringFormat.IsVertical)
- pathes[i].AddRectangle(x + layoutRect.X, y + layoutRect.Y, height, width);
- else
- pathes[i].AddRectangle(x + layoutRect.X, y + layoutRect.Y, width, height);
- }
- }
- }
-
- geom.AffineTransform lineAlignT = iter.CalcLineAlignmentTransform();
- if (lineAlignT != null) {
- for (int i = 0; i < pathes.Length; i++)
- pathes[i].NativeObject.transform(lineAlignT);
- }
-
- Region[] regions = new Region[ranges.Length];
- for (int i = 0; i < regions.Length; i++)
- regions[i] = new Region(pathes[i]);
-
- return regions;
- }
- #endregion
-
- #region MeasureString
- public SizeF MeasureString (string text, Font font) {
- return MeasureString(text, font, null, float.PositiveInfinity, float.PositiveInfinity, null);
- }
-
-
- public SizeF MeasureString (string text, Font font, SizeF layoutArea) {
- return MeasureString(text, font, layoutArea, null);
- }
-
-
- public SizeF MeasureString (string text, Font font, int width) {
- return MeasureString(text, font, width, null);
- }
-
-
- public SizeF MeasureString (string text, Font font, SizeF layoutArea, StringFormat format) {
- return MeasureString(text, font, format, layoutArea.Width, layoutArea.Height, null);
- }
-
-
- public SizeF MeasureString (string text, Font font, int width, StringFormat format) {
- return MeasureString(text, font, format, width, float.PositiveInfinity, null);
- }
-
-
- public SizeF MeasureString (string text, Font font, PointF origin, StringFormat format) {
- return MeasureString(text, font, format, float.PositiveInfinity, float.PositiveInfinity, null);
- }
-
- SizeF MeasureString (string text, Font font, StringFormat format, float width, float height, int[] statistics) {
-
- if (statistics != null) {
- statistics[0] = 0;
- statistics[1] = 0;
- }
-
- TextLineIterator iter = new TextLineIterator(text, font, NativeObject.getFontRenderContext(), format, width, height);
-
- float mwidth = 0;
- int linesFilled = 0;
- for (LineLayout layout = iter.NextLine(); layout != null; layout = iter.NextLine()) {
-
- linesFilled ++;
- float w = layout.MeasureWidth;
-
- if (w > mwidth)
- mwidth = w;
- }
-
- if (linesFilled == 0)
- return SizeF.Empty;
-
- float mheight = iter.AccumulatedHeight;
-
- if (format != null) {
- if (format.IsVertical) {
- float temp = mheight;
- mheight = mwidth;
- mwidth = temp;
- }
- }
-
- if (!(format != null && format.NoClip)) {
- if (mwidth > width)
- mwidth = width;
- if (mheight > height)
- mheight = height;
- }
-
- if (statistics != null) {
- statistics[0] = linesFilled;
- statistics[1] = iter.CharsConsumed;
- }
-
- return new SizeF (mwidth / UnitConversion [(int) _pageUnit], mheight / UnitConversion [(int) _pageUnit]);
- }
-
-
- public SizeF MeasureString (string text, Font font, SizeF layoutArea, StringFormat stringFormat, out int charactersFitted, out int linesFilled) {
- linesFilled = 0;
- charactersFitted = 0;
-
- int[] statistics = new int[2];
- SizeF sz = MeasureString(text, font, stringFormat, layoutArea.Width, layoutArea.Height, statistics);
- linesFilled = statistics[0];
- charactersFitted = statistics[1];
- return sz;
- }
- #endregion
-
- #region MultiplyTransform
- public void MultiplyTransform (Matrix matrix) {
- MultiplyTransform (matrix, MatrixOrder.Prepend);
- }
-
- public void MultiplyTransform (Matrix matrix, MatrixOrder order) {
- ConcatenateTransform(matrix.NativeObject, order);
- }
- #endregion
-
- #region Reset (Clip and Transform)
- public void ResetClip () {
- _clip.MakeInfinite();
- RestoreBaseClip();
- NativeObject.clip(_clip);
- }
-
- public void ResetTransform () {
- _transform.Reset();
- }
- #endregion
-
- #region RotateTransform
- public void RotateTransform (float angle) {
- RotateTransform (angle, MatrixOrder.Prepend);
- }
-
- public void RotateTransform (float angle, MatrixOrder order) {
- ConcatenateTransform(
- geom.AffineTransform.getRotateInstance(java.lang.Math.toRadians(angle)),
- order);
- }
- #endregion
-
- #region ScaleTransform
- public void ScaleTransform (float sx, float sy) {
- ScaleTransform (sx, sy, MatrixOrder.Prepend);
- }
-
- public void ScaleTransform (float sx, float sy, MatrixOrder order) {
- ConcatenateTransform(
- geom.AffineTransform.getScaleInstance(sx, sy),
- order);
- }
- #endregion
-
- #region SetClip [Must be reviewed - more abstraction needed]
- public void SetClip (RectangleF rect) {
- SetClip (rect, CombineMode.Replace);
- }
-
- public void SetClip (GraphicsPath path) {
- SetClip (path, CombineMode.Replace);
- }
-
- public void SetClip (Rectangle rect) {
- SetClip (rect, CombineMode.Replace);
- }
-
- public void SetClip (Graphics g) {
- SetClip (g, CombineMode.Replace);
- }
-
- public void SetClip (Graphics g, CombineMode combineMode) {
- if(g == null)
- throw new NullReferenceException();
-
- CombineClipArea(g._clip.NativeObject, combineMode);
- }
-
- public void SetClip (Rectangle rect, CombineMode combineMode) {
- SetClip(rect.X,rect.Y,rect.Width,rect.Height,combineMode);
- }
- public void SetClip (RectangleF rect, CombineMode combineMode) {
- SetClip(rect.X,rect.Y,rect.Width,rect.Height,combineMode);
- }
-
- public void SetClip (Region region, CombineMode combineMode) {
- if(region == null)
- throw new ArgumentNullException("region");
-
- CombineClipArea ((geom.Area) region.NativeObject.clone (), combineMode);
- }
-
- public void SetClip (GraphicsPath path, CombineMode combineMode) {
- if(path == null)
- throw new ArgumentNullException("path");
-
- CombineClipArea(new geom.Area(path.NativeObject), combineMode);
- }
- #endregion
-
- #region Clipping Staff [INTERNAL]
- internal Region ScaledClip {
- get {
- return _clip.Clone();
- }
- set {
- _clip.NativeObject.reset();
- _clip.NativeObject.add(value.NativeObject);
- }
- }
- internal void SetClip(float x,float y,float width,float height,CombineMode combineMode) {
- CombineClipArea(new geom.Area(
- new geom.Rectangle2D.Float(x,y,width,height)),combineMode);
- }
-
- void CombineClipArea(geom.Area area, CombineMode combineMode) {
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity())
- area.transform(t);
- if (combineMode == CombineMode.Replace) {
- _clip.NativeObject.reset();
- _clip.NativeObject.add(area);
- }
- else {
- geom.Area curClip = _clip.NativeObject;
- switch(combineMode) {
- case CombineMode.Complement:
- curClip.add(area);
- break;
- case CombineMode.Exclude:
- curClip.subtract(area);
- break;
- case CombineMode.Intersect:
- curClip.intersect(area);
- break;
- case CombineMode.Union:
- curClip.add(area);
- break;
- case CombineMode.Xor:
- curClip.exclusiveOr(area);
- break;
- default:
- throw new ArgumentOutOfRangeException();
- }
- }
-
- RestoreBaseClip();
- NativeObject.clip(_clip);
- }
-
- internal void IntersectScaledClipWithBase(awt.Shape clip) {
- NativeObject.clip(clip);
- }
-
- void RestoreBaseClip() {
- if (_nextGraphicsState == null) {
- NativeObject.setClip(_windowRect);
- return;
- }
-
- _nextGraphicsState.RestoreBaseClip(this);
- }
-
- #endregion
-
- #region TransformPoints
- [MonoTODO]
- public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, PointF [] pts) {
- //TBD:CoordinateSpace
- java.awt.geom.AffineTransform tr = this.Transform.NativeObject;
- float[] fpts = new float[2];
- for(int i = 0; i< pts.Length; i++) {
- fpts[0] = pts[i].X;
- fpts[1] = pts[i].Y;
- tr.transform(fpts, 0, fpts, 0, 1);
- pts[i].X = fpts[0];
- pts[i].Y = fpts[1];
- }
- }
-
- [MonoTODO]
- public void TransformPoints (CoordinateSpace destSpace, CoordinateSpace srcSpace, Point [] pts) {
- //TBD:CoordinateSpace
- java.awt.geom.AffineTransform tr = this.Transform.NativeObject;
- float[] fpts = new float[2];
- for(int i = 0; i< pts.Length; i++) {
- fpts[0] = pts[i].X;
- fpts[1] = pts[i].Y;
- tr.transform(fpts, 0, fpts, 0, 1);
- pts[i].X = (int)fpts[0];
- pts[i].Y = (int)fpts[1];
- }
- }
- #endregion
-
- #region TranslateClip
- public void TranslateClip (int dx, int dy) {
- TranslateClip((float)dx, (float)dy);
- }
-
-
- public void TranslateClip (float dx, float dy) {
- double x = dx;
- double y = dy;
- geom.AffineTransform f = GetFinalTransform();
-
- if (!f.isIdentity()) {
- double[] p = new double[] {x, y};
- f.deltaTransform(p, 0, p, 0, 1);
-
- x = p[0];
- y = p[1];
- }
-
- // It seems .Net does exactly this...
- x = Math.Floor(x+0.96875);
- y = Math.Floor(y+0.96875);
-
- geom.AffineTransform t = geom.AffineTransform.getTranslateInstance(x, y);
-
- _clip.NativeObject.transform(t);
- RestoreBaseClip();
- NativeObject.clip(_clip);
- }
- #endregion
-
- #region TranslateTransform
- public void TranslateTransform (float dx, float dy) {
- TranslateTransform (dx, dy, MatrixOrder.Prepend);
- }
-
-
- public void TranslateTransform (float dx, float dy, MatrixOrder order) {
- ConcatenateTransform(
- geom.AffineTransform.getTranslateInstance(dx, dy),
- order);
- }
- #endregion
-
- #region Properties [Partial TODO]
- public Region Clip {
- get {
- Region r = _clip.Clone();
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity())
- r.NativeObject.transform(t.createInverse());
-
- return r;
- }
- set {
- SetClip (value, CombineMode.Replace);
- }
- }
-
- public RectangleF ClipBounds {
- get {
- awt.Shape shape = _clip.NativeObject;
- if (shape == null)
- shape = Region.InfiniteRegion.NativeObject;
-
- geom.RectangularShape r = shape.getBounds2D();
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity()) {
- geom.AffineTransform it = t.createInverse();
- r = it.createTransformedShape(r).getBounds2D();
- }
-
- return new RectangleF (r);
- }
- }
-
- public CompositingMode CompositingMode {
- //TBD:check this carefully
- get {
- return (NativeObject.getComposite() == awt.AlphaComposite.SrcOver) ?
- CompositingMode.SourceOver : CompositingMode.SourceCopy;
- }
- set {
- NativeObject.setComposite(
- (value == CompositingMode.SourceOver) ?
- awt.AlphaComposite.SrcOver : awt.AlphaComposite.Src);
- }
-
- }
-
- public CompositingQuality CompositingQuality {
- get {
- awt.RenderingHints hints = NativeObject.getRenderingHints();
- if(hints.containsKey(awt.RenderingHints.KEY_ALPHA_INTERPOLATION)) {
- object value_ai = hints.get(awt.RenderingHints.KEY_ALPHA_INTERPOLATION);
-
- if (value_ai == awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED)
- return CompositingQuality.HighSpeed;
- if (value_ai == awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY)
- return CompositingQuality.HighQuality;
- if (value_ai == awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT)
- return CompositingQuality.Default;
- }
-
- return CompositingQuality.Default;
-
- }
- set {
- awt.RenderingHints hints = NativeObject.getRenderingHints();
- switch (value) {
- case CompositingQuality.AssumeLinear:
- case CompositingQuality.Default:
- case CompositingQuality.GammaCorrected:
- hints.put(awt.RenderingHints.KEY_ALPHA_INTERPOLATION,
- awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_DEFAULT);
- break;
- case CompositingQuality.HighQuality:
- hints.put(awt.RenderingHints.KEY_ALPHA_INTERPOLATION,
- awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
- break;
- case CompositingQuality.HighSpeed:
- hints.put(awt.RenderingHints.KEY_ALPHA_INTERPOLATION,
- awt.RenderingHints.VALUE_ALPHA_INTERPOLATION_SPEED);
- break;
-// case CompositingQuality.Invalid:
-// if(hints.containsKey(awt.RenderingHints.KEY_ALPHA_INTERPOLATION))
-// hints.remove(awt.RenderingHints.KEY_ALPHA_INTERPOLATION);
- }
-
- NativeObject.setRenderingHints(hints);
- }
- }
-
- public float DpiX {
- get {
- if (_image != null)
- return _image.HorizontalResolution;
-
- return DefaultScreenResolution;
- }
- }
-
- public float DpiY {
- get {
- if (_image != null)
- return _image.VerticalResolution;
-
- return DefaultScreenResolution;
- }
- }
-
- public InterpolationMode InterpolationMode {
- get {
- awt.RenderingHints hints = NativeObject.getRenderingHints();
- if(hints.containsKey(awt.RenderingHints.KEY_INTERPOLATION)) {
- object value_i = hints.get(awt.RenderingHints.KEY_INTERPOLATION);
-
- if (value_i == awt.RenderingHints.VALUE_INTERPOLATION_BILINEAR)
- return InterpolationMode.Bilinear;
- if (value_i == awt.RenderingHints.VALUE_INTERPOLATION_BICUBIC)
- return InterpolationMode.Bicubic;
- if (value_i == awt.RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR)
- return InterpolationMode.NearestNeighbor;
- }
-
- return InterpolationMode.Default;
- }
- set {
- awt.RenderingHints hints = NativeObject.getRenderingHints();
-
- switch (value) {
- case InterpolationMode.Bicubic:
- case InterpolationMode.HighQualityBicubic:
- case InterpolationMode.Low:
- hints.put(awt.RenderingHints.KEY_INTERPOLATION, awt.RenderingHints.VALUE_INTERPOLATION_BICUBIC);
- break;
- case InterpolationMode.High:
- case InterpolationMode.Bilinear:
- case InterpolationMode.HighQualityBilinear:
- hints.put(awt.RenderingHints.KEY_INTERPOLATION, awt.RenderingHints.VALUE_INTERPOLATION_BILINEAR);
- break;
- case InterpolationMode.Default:
- if (hints.containsKey(awt.RenderingHints.KEY_INTERPOLATION))
- hints.remove(awt.RenderingHints.KEY_INTERPOLATION);
- break;
- case InterpolationMode.NearestNeighbor:
- hints.put(awt.RenderingHints.KEY_INTERPOLATION, awt.RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
- break;
- case InterpolationMode.Invalid:
- throw new ArgumentException();
- default:
- throw new ArgumentOutOfRangeException();
- }
-
- NativeObject.setRenderingHints(hints);
- }
- }
-
- public bool IsClipEmpty {
- get {
- return _clip.IsEmpty(this);
- }
- }
-
- public bool IsVisibleClipEmpty {
- get {
- if (_clip.IsEmpty(this))
- return true;
-
- return VisibleClipBounds.IsEmpty;
- }
- }
-
- public float PageScale {
- get {
- return _pageScale;
- }
- set {
- _pageScale = value;
- }
- }
-
- public GraphicsUnit PageUnit {
- get {
- return _pageUnit;
- }
- set {
- _pageUnit = value;
- }
- }
-
- static internal geom.AffineTransform GetFinalTransform(
- geom.AffineTransform transform, GraphicsUnit pageUnit, float pageScale) {
- geom.AffineTransform t = null;
- if (pageUnit != GraphicsUnit.Display) {
- float scale = pageScale * _unitConversion[ (int)pageUnit ];
- if (Math.Abs(scale-1f) > float.Epsilon)
- t = geom.AffineTransform.getScaleInstance(scale, scale);
- }
-
- if (t != null)
- t.concatenate(transform);
- else
- t = transform;
-
- return t;
- }
-
- internal geom.AffineTransform GetFinalTransform() {
- return GetFinalTransform(_transform.NativeObject, PageUnit, PageScale);
- }
-
- public PixelOffsetMode PixelOffsetMode {
- get {
- return _pixelOffsetMode;
- }
- set {
- _pixelOffsetMode = value;
- }
- }
-
- [MonoTODO]
- public Point RenderingOrigin {
- get {
- throw new NotImplementedException();
- }
- set {
- throw new NotImplementedException();
- }
- }
-
- public SmoothingMode SmoothingMode {
- get {
- awt.RenderingHints hints = NativeObject.getRenderingHints();
- if(hints.containsKey(awt.RenderingHints.KEY_ANTIALIASING)) {
- object value_aa = hints.get(awt.RenderingHints.KEY_ANTIALIASING);
- if (value_aa == awt.RenderingHints.VALUE_ANTIALIAS_ON) {
- if(hints.containsKey(awt.RenderingHints.KEY_RENDERING)) {
- object value_render = hints.get(awt.RenderingHints.KEY_RENDERING);
- if (value_render == awt.RenderingHints.VALUE_RENDER_QUALITY)
- return SmoothingMode.HighQuality;
- if (value_render == awt.RenderingHints.VALUE_RENDER_SPEED)
- return SmoothingMode.HighSpeed;
- }
-
- return SmoothingMode.AntiAlias;
- }
-
- if (value_aa == awt.RenderingHints.VALUE_ANTIALIAS_DEFAULT)
- return SmoothingMode.Default;
- }
- return SmoothingMode.None;
-
- }
-
- set {
- awt.RenderingHints hints = NativeObject.getRenderingHints();
-
- switch (value) {
- case SmoothingMode.None:
- if(hints.containsKey(awt.RenderingHints.KEY_ANTIALIASING))
- hints.remove(awt.RenderingHints.KEY_ANTIALIASING);
- if(hints.containsKey(awt.RenderingHints.KEY_RENDERING))
- hints.remove(awt.RenderingHints.KEY_RENDERING);
- break;
- case SmoothingMode.AntiAlias:
- hints.put(awt.RenderingHints.KEY_ANTIALIASING, awt.RenderingHints.VALUE_ANTIALIAS_ON);
- break;
- case SmoothingMode.HighQuality:
- hints.put(awt.RenderingHints.KEY_RENDERING, awt.RenderingHints.VALUE_RENDER_QUALITY);
- goto case SmoothingMode.AntiAlias;
- case SmoothingMode.HighSpeed:
- hints.put(awt.RenderingHints.KEY_RENDERING, awt.RenderingHints.VALUE_RENDER_SPEED);
- goto case SmoothingMode.None;
- case SmoothingMode.Default:
- hints.put(awt.RenderingHints.KEY_RENDERING, awt.RenderingHints.VALUE_RENDER_DEFAULT);
- goto case SmoothingMode.AntiAlias;
- case SmoothingMode.Invalid:
- throw new ArgumentException("Invalid parameter used.");
- }
-
- NativeObject.setRenderingHints(hints);
- }
- }
-
- /// <summary>
- /// Java does not have similar functionality
- /// </summary>
- public int TextContrast {
- get {
- return _textContrast;
- }
-
- set {
- _textContrast = value;
- }
- }
-
- public TextRenderingHint TextRenderingHint {
- get {
- return _textRenderingHint;
-// awt.RenderingHints hints = NativeObject.getRenderingHints();
-// if(hints.containsKey(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING)) {
-// if(hints.get(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING) ==
-// java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON)
-// return TextRenderingHint.AntiAlias;
-// if(hints.get(java.awt.RenderingHints.KEY_TEXT_ANTIALIASING) ==
-// java.awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF)
-// return TextRenderingHint.SingleBitPerPixel;
-// }
-// //return TextRenderingHint.SystemDefault;
-// return TextRenderingHint.SingleBitPerPixelGridFit;
- }
-
- set {
- _textRenderingHint = value;
- awt.RenderingHints hints = NativeObject.getRenderingHints();
- switch (value) {
- case TextRenderingHint.AntiAlias:
- case TextRenderingHint.AntiAliasGridFit:
- case TextRenderingHint.ClearTypeGridFit:
-// case TextRenderingHint.SystemDefault:
- hints.put(awt.RenderingHints.KEY_TEXT_ANTIALIASING,
- awt.RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
- break;
-
- case TextRenderingHint.SingleBitPerPixelGridFit:
- hints.put(awt.RenderingHints.KEY_TEXT_ANTIALIASING,
- awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
- break;
-
- case TextRenderingHint.SingleBitPerPixel:
- hints.put(awt.RenderingHints.KEY_TEXT_ANTIALIASING,
- awt.RenderingHints.VALUE_TEXT_ANTIALIAS_OFF);
- break;
-
- case TextRenderingHint.SystemDefault:
- hints.put(awt.RenderingHints.KEY_TEXT_ANTIALIASING,
- awt.RenderingHints.VALUE_TEXT_ANTIALIAS_DEFAULT);
- break;
- }
-
- NativeObject.setRenderingHints(hints);
- }
- }
-
- public Matrix Transform {
- get {
- return _transform.Clone();
- }
- set {
- if (value == null)
- throw new ArgumentNullException("matrix");
-
- if (!value.IsInvertible)
- throw new ArgumentException("Invalid parameter used.");
-
- value.CopyTo(_transform);
- }
- }
-
- internal Matrix BaseTransform {
- get {
- return new Matrix(NativeObject.getTransform());
- }
- set {
- NativeObject.setTransform(value.NativeObject);
- }
- }
-
- internal void PrependBaseTransform(geom.AffineTransform t) {
- NativeObject.transform(t);
- }
-
- internal awt.Shape VisibleShape {
- get {
- return _windowRect;
- }
- }
-
- public RectangleF VisibleClipBounds {
- get {
- if (_clip.IsEmpty(this))
- return RectangleF.Empty;
-
- geom.Rectangle2D r = _clip.NativeObject.getBounds2D();
- awt.Shape clip = NativeObject.getClip();
- geom.Rectangle2D clipBounds = (clip != null) ? clip.getBounds2D() : _windowRect;
- geom.Rectangle2D.intersect(r, clipBounds, r);
- if ((r.getWidth() <= 0) || (r.getHeight() <= 0))
- return RectangleF.Empty;
-
- geom.AffineTransform t = GetFinalTransform();
- if (!t.isIdentity()) {
- geom.AffineTransform it = t.createInverse();
- r = it.createTransformedShape(r).getBounds2D();
- }
-
- return new RectangleF (r);
- }
- }
-
- void ConcatenateTransform(geom.AffineTransform transform, MatrixOrder order) {
- geom.AffineTransform at = _transform.NativeObject;
- Matrix.Multiply(at, transform, order);
- }
- #endregion
- }
-}
-
-
-
diff --git a/mcs/class/System.Drawing/System.Drawing/Icon.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Icon.jvm.cs
deleted file mode 100644
index 944ea0fd03b..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Icon.jvm.cs
+++ /dev/null
@@ -1,198 +0,0 @@
-//
-// System.Drawing.Icon.cs
-//
-// Authors:
-// Andrew Skiba (andrews@mainsoft.com)
-// Dennis Hayes (dennish@Raytek.com)
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-// Sanjay Gupta (gsanjay@novell.com)
-//
-// Copyright (C) 2005 Mainsoft, Corp. http://mainsoft.com
-// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com
-// Copyright (C) 2004 Novell, Inc. http://www.novell.com
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using System.Drawing.Imaging;
-using System.Runtime.Serialization;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-
-namespace System.Drawing
-{
- [Serializable]
- [ComVisible (false)]
- [TypeConverter(typeof(IconConverter))]
- public sealed class Icon
- : MarshalByRefObject, ISerializable, ICloneable, IDisposable
- {
- private System.Drawing.Bitmap _bitmap;
-
- #region Ctors
- private void SelectSize (int width, int height) {
- int count = _bitmap.GetFrameCount (FrameDimension.Resolution);
- bool sizeObtained = false;
- for (int i=0; i<count; i++){
- _bitmap.SelectActiveFrame (
- System.Drawing.Imaging.FrameDimension.Resolution, i);
- if (!sizeObtained)
- if (_bitmap.Height==height && _bitmap.Width==width) {
- sizeObtained = true;
- break;
- }
- }
-
- if (!sizeObtained){
- uint largestSize = 0;
- Bitmap tmpBmp = _bitmap;
- for (int j=0; j<count; j++){
- tmpBmp.SelectActiveFrame (FrameDimension.Resolution, j);
- uint thisSize = (uint)_bitmap.Height * (uint)_bitmap.Width;
- if (thisSize >= largestSize){
- largestSize = thisSize;
- _bitmap = tmpBmp;
- }
- }
- }
- }
-
- private Icon () {
- }
-
- internal Icon (Bitmap bitmap) {
- _bitmap = bitmap;
- }
-
- public Icon (Icon original, int width, int height) {
- _bitmap = original._bitmap;
- SelectSize (width, height);
- }
-
- public Icon (Icon original, Size size)
- :this (original, size.Width, size.Height) {
- }
-
- public Icon (Stream stream)
- : this (stream, 32, 32) {
- }
-
- public Icon (Stream stream, int width, int height)
- {
- _bitmap = new Bitmap (stream, false, ImageFormat.Icon);
- SelectSize (width, height);
- }
-
- public Icon (string fileName) {
- _bitmap = new Bitmap (fileName, false, ImageFormat.Icon);
- }
-
- public Icon (Type type, string resource)
- {
- using (Stream s = type.Assembly.GetManifestResourceStream (resource)) {
- if (s == null)
- throw new FileNotFoundException ("Resource name was not found: `" + resource + "'");
- _bitmap = new Bitmap (s, false, ImageFormat.Icon);
- }
- }
-
- [MonoTODO]
- private Icon (SerializationInfo info, StreamingContext context)
- {
- //FIXME, need to check how MS stores Icon structure
- //Will serialized form help
- throw new NotImplementedException ();
- }
- #endregion
-
- [MonoTODO]
- void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
- {
- throw new NotImplementedException ();
- }
-
- public void Dispose ()
- {
-#if INTPTR_SUPPORT
- if (winHandle!=IntPtr.Zero)
- winHandle = IntPtr.Zero;
-#endif
- }
-
- public object Clone ()
- {
- Icon newIcon = new Icon ();
- newIcon._bitmap = (Bitmap)_bitmap.Clone ();
- return newIcon;
- }
-
-#if INTPTR_SUPPORT
- [MonoTODO]
- public static Icon FromHandle (IntPtr handle)
- {
- throw new NotImplementedException ();
- }
-#endif
- public void Save (Stream outputStream) {
- _bitmap.Save (outputStream, System.Drawing.Imaging.ImageFormat.Icon);
- }
-
- public Bitmap ToBitmap () {
- return _bitmap;
- }
-
- public override string ToString ()
- {
- //is this correct, this is what returned by .Net
- return "<Icon>";
- }
-
-#if INTPTR_SUPPORT
- [Browsable (false)]
- public IntPtr Handle {
- get {
- return winHandle;
- }
- }
-#endif
-
- [Browsable (false)]
- public int Height {
- get {
- return _bitmap.Height;
- }
- }
-
- public Size Size {
- get {
- return _bitmap.Size;
- }
- }
-
- [Browsable (false)]
- public int Width {
- get {
- return _bitmap.Width;
- }
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/Icon2.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Icon2.jvm.cs
deleted file mode 100644
index cfe033e21a8..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Icon2.jvm.cs
+++ /dev/null
@@ -1,562 +0,0 @@
-//
-// System.Drawing.Icon.cs
-//
-// Authors:
-// Dennis Hayes (dennish@Raytek.com)
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-// Sanjay Gupta (gsanjay@novell.com)
-//
-// Copyright (C) 2002 Ximian, Inc. http://www.ximian.com
-// Copyright (C) 2004 Novell, Inc. http://www.novell.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using System.Runtime.Serialization;
-using System.Runtime.InteropServices;
-using System.ComponentModel;
-
-namespace System.Drawing
-{
- [Serializable]
- [ComVisible (false)]
- [Editor ("System.Drawing.Design.IconEditor, " + Consts.AssemblySystem_Drawing_Design, typeof (System.Drawing.Design.UITypeEditor))]
- [TypeConverter(typeof(IconConverter))]
- public sealed class Icon : MarshalByRefObject, ISerializable, ICloneable, IDisposable
- {
- [StructLayout(LayoutKind.Sequential)]
- internal struct IconDirEntry {
- internal byte width; // Width of icon
- internal byte height; // Height of icon
- internal byte colorCount; // colors in icon
- internal byte reserved; // Reserved
- internal ushort planes; // Color Planes
- internal ushort bitCount; // Bits per pixel
- internal uint bytesInRes; // bytes in resource
- internal uint imageOffset; // position in file
- };
-
- [StructLayout(LayoutKind.Sequential)]
- internal struct IconDir {
- internal ushort idReserved; // Reserved
- internal ushort idType; // resource type (1 for icons)
- internal ushort idCount; // how many images?
- internal IconDirEntry [] idEntries; // the entries for each image
- };
-
- [StructLayout(LayoutKind.Sequential)]
- internal struct BitmapInfoHeader {
- internal uint biSize;
- internal int biWidth;
- internal int biHeight;
- internal ushort biPlanes;
- internal ushort biBitCount;
- internal uint biCompression;
- internal uint biSizeImage;
- internal int biXPelsPerMeter;
- internal int biYPelsPerMeter;
- internal uint biClrUsed;
- internal uint biClrImportant;
- };
-
- [StructLayout(LayoutKind.Sequential)]
- internal struct IconImage {
- internal BitmapInfoHeader iconHeader; //image header
- internal uint [] iconColors; //colors table
- internal byte [] iconXOR; // bits for XOR mask
- internal byte [] iconAND; //bits for AND mask
- };
-
- private Size iconSize;
- private IntPtr winHandle = IntPtr.Zero;
- private IconDir iconDir;
- private ushort id;
- private IconImage [] imageData;
- bool destroyIcon = true;
-
- private Icon ()
- {
- }
-#if INTPTR_SUPPORTED
- [MonoTODO ("Implement fully")]
- private Icon (IntPtr handle)
- {
- this.winHandle = handle;
-
- IconInfo ii;
- GDIPlus.GetIconInfo (winHandle, out ii);
- if (ii.IsIcon) {
- // If this structure defines an icon, the hot spot is always in the center of the icon
- iconSize = new Size (ii.xHotspot * 2, ii.yHotspot * 2);
- }
- else {
- throw new NotImplementedException ();
- }
-
- this.destroyIcon = false;
- }
-#endif
- public Icon (Icon original, int width, int height) : this (original, new Size(width, height))
- {
- }
-
- public Icon (Icon original, Size size)
- {
- this.iconSize = size;
- this.winHandle = original.winHandle;
- this.iconDir = original.iconDir;
- this.imageData = original.imageData;
-
- int count = iconDir.idCount;
- bool sizeObtained = false;
- for (int i=0; i<count; i++){
- IconDirEntry ide = iconDir.idEntries [i];
- if (!sizeObtained)
- if (ide.height==size.Height && ide.width==size.Width) {
- this.id = (ushort) i;
- sizeObtained = true;
- this.iconSize.Height = ide.height;
- this.iconSize.Width = ide.width;
- break;
- }
- }
-
- if (!sizeObtained){
- uint largestSize = 0;
- for (int j=0; j<count; j++){
- if (iconDir.idEntries [j].bytesInRes >= largestSize){
- largestSize = iconDir.idEntries [j].bytesInRes;
- this.id = (ushort) j;
- this.iconSize.Height = iconDir.idEntries [j].height;
- this.iconSize.Width = iconDir.idEntries [j].width;
- }
- }
- }
- }
-
- public Icon (Stream stream) : this (stream, 32, 32)
- {
- }
-
- public Icon (Stream stream, int width, int height)
- {
- InitFromStreamWithSize (stream, width, height);
- }
-
- public Icon (string fileName) : this (new FileStream (fileName, FileMode.Open))
- {
- }
-
- public Icon (Type type, string resource)
- {
- using (Stream s = type.Assembly.GetManifestResourceStream (type, resource)) {
- if (s == null) {
- throw new FileNotFoundException ("Resource name was not found: `" + resource + "'");
- }
- InitFromStreamWithSize (s, 32, 32); // 32x32 is default
- }
- }
-
- private Icon (SerializationInfo info, StreamingContext context)
- {
- MemoryStream dataStream = null;
- int width=0;
- int height=0;
- foreach (SerializationEntry serEnum in info) {
- if (String.Compare(serEnum.Name, "IconData", true) == 0) {
- dataStream = new MemoryStream ((byte []) serEnum.Value);
- }
- if (String.Compare(serEnum.Name, "IconSize", true) == 0) {
- Size iconSize = (Size) serEnum.Value;
- width = iconSize.Width;
- height = iconSize.Height;
- }
- }
- if (dataStream != null && width != 0 && height != 0) {
- dataStream.Seek (0, SeekOrigin.Begin);
- InitFromStreamWithSize (dataStream, width, height);
- }
- }
-
- void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
- {
- MemoryStream ms = new MemoryStream ();
- Save (ms);
- info.AddValue ("IconSize", this.Size, typeof (Size));
- info.AddValue ("IconData", ms.ToArray ());
- }
-
- public void Dispose ()
- {
-#if !TARGET_JVM
- DisposeIcon ();
- GC.SuppressFinalize(this);
-#endif
- }
-#if !TARGET_JVM
- void DisposeIcon ()
- {
- if (winHandle ==IntPtr.Zero)
- return;
-
- if (destroyIcon) {
- //TODO: will have to call some win32 icon stuff
- winHandle = IntPtr.Zero;
- }
- }
-#endif
-
- public object Clone ()
- {
- return new Icon (this, this.Width, this.Height);
- }
-#if INTPTR_SUPPORTED
- public static Icon FromHandle (IntPtr handle)
- {
- if (handle == IntPtr.Zero)
- throw new ArgumentException ("handle");
-
- return new Icon (handle);
- }
-#endif
- public void Save (Stream outputStream)
- {
- if (iconDir.idEntries!=null){
- BinaryWriter bw = new BinaryWriter (outputStream);
- //write icondir
- bw.Write (iconDir.idReserved);
- bw.Write (iconDir.idType);
- ushort count = iconDir.idCount;
- bw.Write (count);
-
- //now write iconDirEntries
- for (int i=0; i<(int)count; i++){
- IconDirEntry ide = iconDir.idEntries [i];
- bw.Write (ide.width);
- bw.Write (ide.height);
- bw.Write (ide.colorCount);
- bw.Write (ide.reserved);
- bw.Write (ide.planes);
- bw.Write (ide.bitCount);
- bw.Write (ide.bytesInRes);
- bw.Write (ide.imageOffset);
- }
-
- //now write iconImage data
- for (int i=0; i<(int)count; i++){
- BitmapInfoHeader bih = imageData [i].iconHeader;
- bw.Write (bih.biSize);
- bw.Write (bih.biWidth);
- bw.Write (bih.biHeight);
- bw.Write (bih.biPlanes);
- bw.Write (bih.biBitCount);
- bw.Write (bih.biCompression);
- bw.Write (bih.biSizeImage);
- bw.Write (bih.biXPelsPerMeter);
- bw.Write (bih.biYPelsPerMeter);
- bw.Write (bih.biClrUsed);
- bw.Write (bih.biClrImportant);
-
- //now write color table
- int colCount = imageData [i].iconColors.Length;
- for (int j=0; j<colCount; j++)
- bw.Write (imageData [i].iconColors [j]);
-
- //now write XOR Mask
- bw.Write (imageData [i].iconXOR);
-
- //now write AND Mask
- bw.Write (imageData [i].iconAND);
- }
- bw.Flush();
- }
- }
-
- public Bitmap ToBitmap ()
- {
- Bitmap bmp;
-
- if (imageData != null) {
-
- // select active icon from the iconDirEntry
- IconImage ii = imageData [this.id];
- MemoryStream stream = new MemoryStream ();
-
- BinaryWriter writer = new BinaryWriter (stream);
-
- try {
- // write bitmap file header
- // start with writing signature
- writer.Write ('B');
- writer.Write ('M');
-
- // write the file size
- // file size = bitmapfileheader + bitmapinfo +
- // colorpalette + image bits
- // sizeof bitmapfileheader = 14 bytes
- // sizeof bitmapinfo = 40 bytes
- uint offSet = (uint) (14 + 40 + ii.iconColors.Length * 4);
- uint fileSize = (uint) (offSet + ii.iconXOR.Length);
- writer.Write (fileSize);
-
- // write reserved words
- ushort reserved12 = 0;
- writer.Write (reserved12);
- writer.Write (reserved12);
-
- // write offset
- writer.Write (offSet);
-
- // write bitmapfile header
- BitmapInfoHeader bih = ii.iconHeader;
- writer.Write (bih.biSize);
- writer.Write (bih.biWidth);
- writer.Write (bih.biHeight/2);
- writer.Write (bih.biPlanes);
- writer.Write (bih.biBitCount);
- writer.Write (bih.biCompression);
- writer.Write (bih.biSizeImage);
- writer.Write (bih.biXPelsPerMeter);
- writer.Write (bih.biYPelsPerMeter);
- writer.Write (bih.biClrUsed);
- writer.Write (bih.biClrImportant);
-
- // write color table
- int colCount = ii.iconColors.Length;
- for (int j = 0; j < colCount; j++)
- writer.Write (ii.iconColors [j]);
-
- // write image bits
- writer.Write (ii.iconXOR);
-
- writer.Flush ();
-
- stream.Position = 0;
-
- // create bitmap from stream and return
- if (colCount > 0) {
- Bitmap new_bmp;
-
- new_bmp = new Bitmap(stream);
- bmp = new Bitmap(new_bmp, bih.biWidth, bih.biHeight/2);
- new_bmp.Dispose();
- } else {
- bmp = new Bitmap(stream);
- }
-
- // This hack is so ugly, it's embarassing.
- // But icons are small, so it should be ok for now
- for (int y = 0; y < bih.biHeight/2; y++) {
- for (int x = 0; x < bih.biWidth / 8; x++) {
- for (int bit = 7; bit >= 0; bit--) {
- if (((ii.iconAND[y * bih.biWidth / 8 +x] >> bit) & 1) != 0) {
- bmp.SetPixel(x*8 + 7-bit, bih.biHeight/2 - y - 1, Color.Transparent);
- }
- }
- }
- }
-
- } catch (Exception e) {
- throw e;
- } finally {
- writer.Close (); // closes the underlying stream as well
- }
- } else {
- bmp = new Bitmap (32, 32);
- }
-
- return bmp;
- }
-
- public override string ToString ()
- {
- //is this correct, this is what returned by .Net
- return "<Icon>";
- }
-
- [Browsable (false)]
- public IntPtr Handle {
- get {
- return winHandle;
- }
- }
-
- [Browsable (false)]
- public int Height {
- get {
- return iconSize.Height;
- }
- }
-
- public Size Size {
- get {
- return iconSize;
- }
- }
-
- [Browsable (false)]
- public int Width {
- get {
- return iconSize.Width;
- }
- }
-
-#if !TARGET_JVM
- ~Icon ()
- {
- DisposeIcon ();
- }
-#endif
-
- private void InitFromStreamWithSize (Stream stream, int width, int height)
- {
- //read the icon header
- if (stream == null || stream.Length == 0)
- throw new System.ArgumentException ("The argument 'stream' must be a picture that can be used as a Icon", "stream");
-
- BinaryReader reader = new BinaryReader (stream);
-
- //iconDir = new IconDir ();
- iconDir.idReserved = reader.ReadUInt16();
- if (iconDir.idReserved != 0) //must be 0
- throw new System.ArgumentException ("Invalid Argument", "stream");
-
- iconDir.idType = reader.ReadUInt16();
- if (iconDir.idType != 1) //must be 1
- throw new System.ArgumentException ("Invalid Argument", "stream");
-
- ushort dirEntryCount = reader.ReadUInt16();
- iconDir.idCount = dirEntryCount;
- iconDir.idEntries = new IconDirEntry [dirEntryCount];
- imageData = new IconImage [dirEntryCount];
- bool sizeObtained = false;
- //now read in the IconDirEntry structures
- for (int i=0; i<dirEntryCount; i++){
- IconDirEntry ide;
- ide.width = reader.ReadByte ();
- ide.height = reader.ReadByte ();
- ide.colorCount = reader.ReadByte ();
- ide.reserved = reader.ReadByte ();
- ide.planes = reader.ReadUInt16 ();
- ide.bitCount = reader.ReadUInt16 ();
- ide.bytesInRes = reader.ReadUInt32 ();
- ide.imageOffset = reader.ReadUInt32 ();
- iconDir.idEntries [i] = ide;
- //is this is the best fit??
- if (!sizeObtained)
- if (ide.height==height && ide.width==width) {
- this.id = (ushort) i;
- sizeObtained = true;
- this.iconSize.Height = ide.height;
- this.iconSize.Width = ide.width;
- }
- }
- //if we havent found the best match, return the one with the
- //largest size. Is this approach correct??
- if (!sizeObtained){
- uint largestSize = 0;
- for (int j=0; j<dirEntryCount; j++){
- if (iconDir.idEntries [j].bytesInRes >= largestSize) {
- largestSize = iconDir.idEntries [j].bytesInRes;
- this.id = (ushort) j;
- this.iconSize.Height = iconDir.idEntries [j].height;
- this.iconSize.Width = iconDir.idEntries [j].width;
- }
- }
- }
-
- //now read in the icon data
- for (int j = 0; j<dirEntryCount; j++)
- {
- IconImage iidata = new IconImage();
- BitmapInfoHeader bih = new BitmapInfoHeader();
- stream.Seek (iconDir.idEntries [j].imageOffset, SeekOrigin.Begin);
- byte [] buffer = new byte [iconDir.idEntries [j].bytesInRes];
- stream.Read (buffer, 0, buffer.Length);
- BinaryReader bihReader = new BinaryReader (new MemoryStream(buffer));
- bih.biSize = bihReader.ReadUInt32 ();
- bih.biWidth = bihReader.ReadInt32 ();
- bih.biHeight = bihReader.ReadInt32 ();
- bih.biPlanes = bihReader.ReadUInt16 ();
- bih.biBitCount = bihReader.ReadUInt16 ();
- bih.biCompression = bihReader.ReadUInt32 ();
- bih.biSizeImage = bihReader.ReadUInt32 ();
- bih.biXPelsPerMeter = bihReader.ReadInt32 ();
- bih.biYPelsPerMeter = bihReader.ReadInt32 ();
- bih.biClrUsed = bihReader.ReadUInt32 ();
- bih.biClrImportant = bihReader.ReadUInt32 ();
-
- iidata.iconHeader = bih;
- //Read the number of colors used and corresponding memory occupied by
- //color table. Fill this memory chunk into rgbquad[]
- int numColors;
- switch (bih.biBitCount){
- case 1: numColors = 2;
- break;
- case 4: numColors = 16;
- break;
- case 8: numColors = 256;
- break;
- default: numColors = 0;
- break;
- }
-
- iidata.iconColors = new uint [numColors];
- for (int i=0; i<numColors; i++)
- iidata.iconColors [i] = bihReader.ReadUInt32 ();
-
- //XOR mask is immediately after ColorTable and its size is
- //icon height* no. of bytes per line
-
- //icon height is half of BITMAPINFOHEADER.biHeight, since it contains
- //both XOR as well as AND mask bytes
- int iconHeight = bih.biHeight/2;
-
- //bytes per line should should be uint aligned
- int numBytesPerLine = ((((bih.biWidth * bih.biPlanes * bih.biBitCount)+ 31)>>5)<<2);
-
- //Determine the XOR array Size
- int xorSize = numBytesPerLine * iconHeight;
- iidata.iconXOR = new byte [xorSize];
- for (int i=0; i<xorSize; i++)
- iidata.iconXOR[i] = bihReader.ReadByte();
-
- //Determine the AND array size
- //For this i subtract the current position from the length.
- //ugly hack...
- int andSize = (int) (bihReader.BaseStream.Length - bihReader.BaseStream.Position);
- iidata.iconAND = new byte [andSize];
- for (int i=0; i<andSize; i++)
- iidata.iconAND[i] = bihReader.ReadByte();
-
- imageData [j] = iidata;
- bihReader.Close();
- }
-
- reader.Close();
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/Image.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Image.jvm.cs
deleted file mode 100644
index e6334dfd0e3..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Image.jvm.cs
+++ /dev/null
@@ -1,571 +0,0 @@
-//
-// System.Drawing.Image.cs
-//
-// (C) 2002 Ximian, Inc. http://www.ximian.com
-// Author: Christian Meyer (Christian.Meyer@cs.tum.edu)
-// Alexandre Pigolkine (pigolkine@gmx.de)
-// Jordi Mas i Hernandez (jordi@ximian.com)
-//
-namespace System.Drawing {
-
- using System;
- using System.Runtime.Remoting;
- using System.Runtime.Serialization;
- using System.Runtime.InteropServices;
- using System.ComponentModel;
- using System.Drawing;
- using System.Drawing.Imaging;
- using System.IO;
- using System.Xml;
- using Mainsoft.Drawing.Imaging;
-
- using BufferedImage = java.awt.image.BufferedImage;
- using java.io;
- using javax.imageio;
- using javax.imageio.stream;
- using vmw.common;
- using awt = java.awt;
- using image = java.awt.image;
-
- public abstract class Image : MarshalByRefObject, IDisposable , ICloneable {
- #region Vars
- PlainImageCollection _nativeObject = new PlainImageCollection();
- protected int _flags = 0;
-
- //consider using Image[] to support many thumbnails per Image
- #endregion
-
- #region flags enum
- [Flags]
- protected enum ImageFlags {
- ImageFlagsNone = 0,
- ImageFlagsScalable = 0x0001,
- ImageFlagsHasAlpha = 0x0002,
- ImageFlagsHasTranslucent = 0x0004,
- ImageFlagsPartiallyScalable = 0x0008,
- ImageFlagsColorSpaceRGB = 0x0010,
- ImageFlagsColorSpaceCMYK = 0x0020,
- ImageFlagsColorSpaceGRAY = 0x0040,
- ImageFlagsColorSpaceYCBCR = 0x0080,
- ImageFlagsColorSpaceYCCK = 0x0100,
- ImageFlagsHasRealDPI = 0x1000,
- ImageFlagsHasRealPixelSize = 0x2000,
- ImageFlagsReadOnly = 0x00010000,
- ImageFlagsCaching = 0x00020000
- }
- #endregion
-
- #region Constructor
- public void Dispose () {
- }
-
- protected virtual void DisposeResources () {
- }
-
- protected virtual void Dispose (bool disposing) {
- }
-
- // Derived classes must call Initialize () when they use this constructor
- protected Image () {
- }
-
- protected Image (java.awt.Image nativeObject) : this(nativeObject, ImageFormat.MemoryBmp) {
- }
-
- protected Image (java.awt.Image nativeObject, ImageFormat format) {
- PlainImage pi = new PlainImage( nativeObject, null, format, 0, 0, FrameDimension.Page );
- Initialize( pi, false );
- }
-
- protected void Initialize (PlainImage pi, bool addToCollection) {
- if (!addToCollection)
- NativeObject.Clear();
-
- NativeObject.Add( pi );
- }
-
- #endregion
-
- #region Internals
-
- internal PlainImageCollection NativeObject {
- get {
- return _nativeObject;
- }
- }
-
- internal PlainImage CurrentImage {
- get {
- return NativeObject.CurrentImage;
- }
- }
-
- #endregion
-
- #region FromFile
- [MonoTODO]
- public static Image FromFile(string filename) {
- //FIXME: check if it's not a metafile, throw NotImplementedException
- return new Bitmap (filename);
- }
-
- [MonoTODO]
- public static Image FromFile(string filename, bool useIcm) {
- //FIXME: check if it's not a metafile, throw NotImplementedException
- return new Bitmap (filename, useIcm);
- }
- #endregion
-
- #region GetThumbnailImageAbort
- [Serializable]
- public delegate bool GetThumbnailImageAbort();
- #endregion
-
- #region Clone
- public abstract object Clone();
- #endregion
-
- // static
- #region FromStream
- [MonoTODO]
- public static Image FromStream (Stream stream) {
- //FIXME: check if it's not a metafile, throw NotImplementedException
- return new Bitmap (stream);
- }
-
- [MonoTODO]
- public static Image FromStream (Stream stream, bool useIcm) {
- //FIXME: check if it's not a metafile, throw NotImplementedException
- return new Bitmap (stream, useIcm);
- }
- #endregion
-
- #region GetPixelFormatSize
- public static int GetPixelFormatSize(PixelFormat pixfmt) {
-
- int result = 0;
- switch (pixfmt) {
- case PixelFormat.Format16bppArgb1555:
- case PixelFormat.Format16bppGrayScale:
- case PixelFormat.Format16bppRgb555:
- case PixelFormat.Format16bppRgb565:
- result = 16;
- break;
- case PixelFormat.Format1bppIndexed:
- result = 1;
- break;
- case PixelFormat.Format24bppRgb:
- result = 24;
- break;
- case PixelFormat.Format32bppArgb:
- case PixelFormat.Format32bppPArgb:
- case PixelFormat.Format32bppRgb:
- result = 32;
- break;
- case PixelFormat.Format48bppRgb:
- result = 48;
- break;
- case PixelFormat.Format4bppIndexed:
- result = 4;
- break;
- case PixelFormat.Format64bppArgb:
- case PixelFormat.Format64bppPArgb:
- result = 64;
- break;
- case PixelFormat.Format8bppIndexed:
- result = 8;
- break;
- }
- return result;
- }
- #endregion
-
- #region IsAlphaPixelFormat
- public static bool IsAlphaPixelFormat(PixelFormat pixfmt) {
- return (pixfmt & PixelFormat.Alpha) != PixelFormat.Undefined;
- }
- #endregion
-
- #region IsCanonicalPixelFormat
- // TBD: implement this
- public static bool IsCanonicalPixelFormat (PixelFormat pixfmt) {
- return (pixfmt & PixelFormat.Canonical) != PixelFormat.Undefined;
- }
- #endregion
-
- #region IsExtendedPixelFormat
- // TBD: implement this
- public static bool IsExtendedPixelFormat (PixelFormat pixfmt) {
- return (pixfmt & PixelFormat.Extended) != PixelFormat.Undefined;
- }
- #endregion
-
- // non-static
- #region GetBounds
- public RectangleF GetBounds (ref GraphicsUnit pageUnit) {
- pageUnit = GraphicsUnit.Pixel; //java.awt.Image always returns pixels
- return new RectangleF((float)0,(float)0,(float)Width,(float)Height);
- }
- #endregion
-
- #region GetEncoderParameterList
- [MonoTODO]
- public EncoderParameters GetEncoderParameterList(Guid encoder) {
- throw new NotImplementedException ();
- }
- #endregion
-
- #region GetFrameCount
- public int GetFrameCount(FrameDimension dimension) {
- // FALLBACK: now, only one dimension assigned for all frames
- if (dimension.Guid != CurrentImage.Dimension.Guid)
- throw new ArgumentException ("dimension");
-
- return NativeObject.Count;
- }
- #endregion
-
- #region GetPropertyItem
- [MonoTODO]
- public PropertyItem GetPropertyItem(int propid) {
- throw new NotImplementedException ();
- }
- #endregion
-
- #region RemovePropertyItem
- [MonoTODO]
- public void RemovePropertyItem (int propid) {
- throw new NotImplementedException ();
- }
- #endregion
-
- #region RotateFlip
- public void RotateFlip (RotateFlipType rotateFlipType) {
- awt.geom.AffineTransform tx;
-
- if ( !(CurrentImage.NativeImage is image.BufferedImage) )
- // TBD: This implementation is for raster formats only
- throw new NotImplementedException("Only raster formats are supported");
-
- switch (rotateFlipType) {
- case RotateFlipType.RotateNoneFlipNone :
- return;
-
- case RotateFlipType.Rotate90FlipNone :
- tx = awt.geom.AffineTransform.getRotateInstance(Math.PI / 2);
- tx.translate( 0, -Height );
- break;
-
- case RotateFlipType.Rotate180FlipNone :
- tx = awt.geom.AffineTransform.getScaleInstance(-1, -1);
- tx.translate( -Width, -Height );
- break;
-
- case RotateFlipType.Rotate270FlipNone :
- tx = awt.geom.AffineTransform.getRotateInstance(-Math.PI / 2);
- tx.translate( -Width, 0 );
- break;
-
- case RotateFlipType.RotateNoneFlipX :
- tx = awt.geom.AffineTransform.getScaleInstance(-1, 1);
- tx.translate( -Width, 0 );
- break;
-
- case RotateFlipType.Rotate90FlipX :
- tx = awt.geom.AffineTransform.getRotateInstance(Math.PI / 2);
- tx.scale(1, -1);
- break;
-
- case RotateFlipType.Rotate180FlipX :
- tx = awt.geom.AffineTransform.getScaleInstance(1, -1);
- tx.translate( 0, -Height );
- break;
-
- case RotateFlipType.Rotate270FlipX :
- tx = awt.geom.AffineTransform.getRotateInstance(Math.PI / 2);
- tx.scale(-1, 1);
- tx.translate( -Width, -Height );
- break;
-
- default:
- throw new ArgumentOutOfRangeException();
- }
- image.AffineTransformOp op = new image.AffineTransformOp(tx, image.AffineTransformOp.TYPE_NEAREST_NEIGHBOR);
- CurrentImage.NativeImage = op.filter((BufferedImage)CurrentImage.NativeImage, null);
- }
- #endregion
-
- #region Save
- protected abstract void InternalSave (ImageOutputStream output, Guid clsid);
-
- [MonoTODO]
- public void Save (Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams) {
- //TBD: implement encoderParams
- if (encoder == null)
- throw new ArgumentNullException("Value cannot be null.");
-
- try {
- java.io.OutputStream jos = vmw.common.IOUtils.ToOutputStream (stream);
- MemoryCacheImageOutputStream output = new MemoryCacheImageOutputStream(jos);
- InternalSave (output, encoder.Clsid);
- output.flush();
- }
- catch (java.io.IOException ex) {
- throw new System.IO.IOException(ex.Message, ex);
- }
- }
-
- public void Save(string filename, ImageCodecInfo encoder, EncoderParameters encoderParams) {
- using (Stream outputStream = new FileStream(filename, FileMode.Create))
- Save(outputStream, encoder, encoderParams);
- }
-
- public void Save (string filename) {
- Save (filename, ImageFormat.Png);
- }
-
- public void Save (Stream stream, ImageFormat format) {
- ImageCodecInfo encoder = ImageCodec.FindEncoder ( ImageCodec.ImageFormatToClsid (format) );
- Save (stream, encoder, null);
- }
-
- public void Save(string filename, ImageFormat format) {
- using (Stream outputStream = new FileStream(filename, FileMode.Create))
- Save(outputStream, format);
- }
- #endregion
-
- #region SaveAdd
- [MonoTODO]
- public void SaveAdd(EncoderParameters encoderParams) {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void SaveAdd(Image image, EncoderParameters encoderParams) {
- throw new NotImplementedException ();
- }
- #endregion
-
- #region SelectActiveFrame
-
- // TBD: .Net does not load all frames at the initialization. New frames loaded by request.
- [MonoTODO]
- public int SelectActiveFrame(FrameDimension dimension, int frameIndex) {
- // FALLBACK: now, only one dimension assigned for all frames
- if (dimension.Guid != CurrentImage.Dimension.Guid)
- throw new ArgumentException ("dimension");
-
- if (frameIndex < NativeObject.Count)
- NativeObject.CurrentImageIndex = frameIndex;
-
- return frameIndex;
- }
- #endregion
-
- #region SetPropertyItem
- [MonoTODO]
- public void SetPropertyItem(PropertyItem propitem) {
- throw new NotImplementedException ();
- }
- #endregion
-
- // properties
- #region Flags
- public int Flags {
- // TDB: ImageFlagsScalable, ImageFlagsHasTranslucent, ImageFlagsPartiallyScalable, ImageFlagsCaching
- [MonoTODO]
- get {
- image.ColorModel colorModel = ((BufferedImage)CurrentImage.NativeImage).getColorModel();
- int t = colorModel.getColorSpace().getType();
-
- if (t == awt.color.ColorSpace.TYPE_RGB)
- _flags |= (int)ImageFlags.ImageFlagsColorSpaceRGB;
- else if (t == awt.color.ColorSpace.TYPE_CMYK)
- _flags |= (int)ImageFlags.ImageFlagsColorSpaceCMYK;
- else if (t == awt.color.ColorSpace.TYPE_GRAY)
- _flags |= (int)ImageFlags.ImageFlagsColorSpaceGRAY;
- else if (t == awt.color.ColorSpace.TYPE_YCbCr)
- _flags |= (int)ImageFlags.ImageFlagsColorSpaceYCBCR;
-
- if (colorModel.hasAlpha())
- _flags |= (int)ImageFlags.ImageFlagsHasAlpha;
-
- if ((CurrentImage.HorizontalResolution > 0) || (CurrentImage.VerticalResolution > 0))
- _flags |= (int)ImageFlags.ImageFlagsHasRealDPI;
-
- return _flags;
- }
- }
- #endregion
-
- #region FrameDimensionsList
- [MonoTODO]
- public Guid[] FrameDimensionsList {
- // TBD: look over all frames and build array of dimensions
- // FALLBACK: now, only one dimension assigned for all frames
- get {
- Guid [] dimList = new Guid[]{CurrentImage.Dimension.Guid};
- return dimList;
- }
- }
- #endregion
-
- #region Height
- public int Height {
- get {
- return CurrentImage.NativeImage.getHeight(null);
- }
- }
- #endregion
-
- #region HorizontalResolution
- public float HorizontalResolution {
- get {
- if (CurrentImage.HorizontalResolution <= 1)
- return Graphics.DefaultScreenResolution;
-
- return CurrentImage.HorizontalResolution;
- }
- }
- #endregion
-
- #region ColorPalette
- [MonoTODO]
- public ColorPalette Palette {
- get {
- if (!(CurrentImage.NativeImage is BufferedImage))
- // TBD: This implementation is for raster formats only
- throw new NotImplementedException("Only raster formats are supported");
-
- image.ColorModel colorModel = ((BufferedImage)CurrentImage.NativeImage).getColorModel();
- if (colorModel is image.IndexColorModel) {
-
- Color [] colors = new Color[ ((image.IndexColorModel)colorModel).getMapSize() ];
- for (int i=0; i<colors.Length; i++) {
- colors[i] = Color.FromArgb( ((image.IndexColorModel)colorModel).getRGB(i) );
- }
- ColorPalette palette = new ColorPalette(0, colors);
- return palette;
- }
- return new ColorPalette();
- }
- set {
- throw new NotImplementedException ();
- }
- }
- #endregion
-
- #region PhysicalDimension
- public SizeF PhysicalDimension {
- get {
- return new Size(Width, Height);
- }
- }
- #endregion
-
- #region PixelFormat
- abstract protected PixelFormat InternalPixelFormat {get;}
-
- public PixelFormat PixelFormat {
- get {
- return InternalPixelFormat;
- }
- }
- #endregion
-
- #region PropertiIdList
- [MonoTODO]
- public int[] PropertyIdList {
- get {
- throw new NotImplementedException ();
- }
- }
- #endregion
-
- #region PropertItems
- [MonoTODO]
- public PropertyItem[] PropertyItems {
- get {
- throw new NotImplementedException ();
- }
- }
- #endregion
-
- #region RawFormat
- public ImageFormat RawFormat {
- get {
- return CurrentImage.ImageFormat;
- }
- }
- #endregion
-
- #region Size
- public Size Size {
- get {
- return new Size(Width, Height);
- }
- }
- #endregion
-
- #region VerticalResolution
- public float VerticalResolution {
- get {
- if (CurrentImage.VerticalResolution <= 1)
- return Graphics.DefaultScreenResolution;
-
- return CurrentImage.VerticalResolution;
- }
- }
- #endregion
-
- #region Width
- public int Width {
- get {
- return CurrentImage.NativeImage.getWidth(null);
- }
- }
- #endregion
-
- public Image GetThumbnailImage(int thumbWidth, int thumbHeight, Image.GetThumbnailImageAbort callback, IntPtr callbackData) {
- awt.Image img;
-
-#if THUMBNAIL_SUPPORTED
- if (CurrentImage.Thumbnails != null) {
- for (int i=0; i < CurrentImage.Thumbnails.Length; i++)
- if (CurrentImage.Thumbnails[i] != null) {
- img = CurrentImage.Thumbnails[i];
- if (img.getHeight(null) == thumbHeight && img.getWidth(null) == thumbWidth)
- return ImageFromNativeImage(img, RawFormat);
- }
- }
-#endif
- img = CurrentImage.NativeImage.getScaledInstance(thumbWidth, thumbHeight, awt.Image.SCALE_DEFAULT);
-
- return ImageFromNativeImage(img, RawFormat);
- }
-#if INTPTR_SUPPORT
- [MonoTODO]
- public static Bitmap FromHbitmap(IntPtr hbitmap)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette)
- {
- throw new NotImplementedException ();
- }
-#endif
-
- internal static Image ImageFromNativeImage(awt.Image nativeImage, ImageFormat format) {
- if (nativeImage is BufferedImage)
- return new Bitmap(nativeImage, format);
-
- throw new ArgumentException("Invalid image type");
- }
-
- protected abstract awt.Image [] CloneNativeObjects(awt.Image [] src);
- }
-
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/KnownColors.jvm.cs b/mcs/class/System.Drawing/System.Drawing/KnownColors.jvm.cs
deleted file mode 100644
index 772e10eaba7..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/KnownColors.jvm.cs
+++ /dev/null
@@ -1,499 +0,0 @@
-//
-// System.Drawing.KnownColors.cs
-//
-// Authors:
-// Konstantin Triger (kostat@mainsoft.com)
-//
-// Copyright (C) 2007 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using awt = java.awt;
-
-namespace System.Drawing
-{
- sealed class KnownColors
- {
- static readonly Color [] SystemColorsCache;
-
- KnownColors () { }
-
- static KnownColors ()
- {
-#if !NET_2_0
- SystemColorsCache = new Color[27]; //enough for all system color indices
-#else
- SystemColorsCache = new Color [175]; //enough for all system color indices
-#endif
-
- if (Graphics.IsHeadless) {
- SystemColorsCache[(int)KnownColor.ActiveBorder] = Color.FromArgbSystem (255, 212, 208, 200, "ActiveBorder", KnownColor.ActiveBorder);
- SystemColorsCache[(int)KnownColor.ActiveCaption] = Color.FromArgbSystem (255, 10, 36, 106, "ActiveCaption", KnownColor.ActiveCaption);
- SystemColorsCache[(int)KnownColor.ActiveCaptionText] = Color.FromArgbSystem (255, 255, 255, 255, "ActiveCaptionText", KnownColor.ActiveCaptionText);
- //TODO: find a more close approximation
- SystemColorsCache[(int)KnownColor.AppWorkspace] = Color.FromArgbSystem (255, 128, 128, 128, "AppWorkspace", KnownColor.AppWorkspace);
- SystemColorsCache[(int)KnownColor.Control] = Color.FromArgbSystem (255, 212, 208, 200, "Control", KnownColor.Control);
- SystemColorsCache[(int)KnownColor.ControlDark] = Color.FromArgbSystem (255, 128, 128, 128, "ControlDark", KnownColor.ControlDark);
- SystemColorsCache[(int)KnownColor.ControlDarkDark] = Color.FromArgbSystem (255, 64, 64, 64, "ControlDarkDark", KnownColor.ControlDarkDark);
- SystemColorsCache[(int)KnownColor.ControlLight] = Color.FromArgbSystem (255, 212, 208, 200, "ControlLight", KnownColor.ControlLight);
- SystemColorsCache[(int)KnownColor.ControlLightLight] = Color.FromArgbSystem (255, 255, 255, 255, "ControlLightLight", KnownColor.ControlLightLight);
- SystemColorsCache[(int)KnownColor.ControlText] = Color.FromArgbSystem (255, 0, 0, 0, "ControlText", KnownColor.ControlText);
- SystemColorsCache[(int)KnownColor.Desktop] = Color.FromArgbSystem (255, 58, 110, 165, "Desktop", KnownColor.Desktop);
- SystemColorsCache[(int)KnownColor.GrayText] = Color.FromArgbSystem (255, 128, 128, 128, "GrayText", KnownColor.GrayText);
- SystemColorsCache[(int)KnownColor.Highlight] = Color.FromArgbSystem (255, 10, 36, 106, "Highlight", KnownColor.Highlight);
- SystemColorsCache[(int)KnownColor.HighlightText] = Color.FromArgbSystem (255, 255, 255, 255, "HighlightText", KnownColor.HighlightText);
- //TODO: find a more close approximation
- SystemColorsCache[(int)KnownColor.HotTrack] = Color.FromArgbSystem (255, 0, 0, 128, "HotTrack", KnownColor.HotTrack);
- SystemColorsCache[(int)KnownColor.InactiveBorder] = Color.FromArgbSystem (255, 212, 208, 200, "InactiveBorder", KnownColor.InactiveBorder);
- SystemColorsCache[(int)KnownColor.InactiveCaption] = Color.FromArgbSystem (255, 128, 128, 128, "InactiveCaption", KnownColor.InactiveCaption);
- SystemColorsCache[(int)KnownColor.InactiveCaptionText] = Color.FromArgbSystem (255, 212, 208, 200, "InactiveCaptionText", KnownColor.InactiveCaptionText);
- SystemColorsCache[(int)KnownColor.Info] = Color.FromArgbSystem (255, 255, 255, 225, "Info", KnownColor.Info);
- SystemColorsCache[(int)KnownColor.InfoText] = Color.FromArgbSystem (255, 0, 0, 0, "InfoText", KnownColor.InfoText);
- SystemColorsCache[(int)KnownColor.Menu] = Color.FromArgbSystem (255, 212, 208, 200, "Menu", KnownColor.Menu);
- SystemColorsCache[(int)KnownColor.MenuText] = Color.FromArgbSystem (255, 0, 0, 0, "MenuText", KnownColor.MenuText);
- SystemColorsCache[(int)KnownColor.ScrollBar] = Color.FromArgbSystem (255, 212, 208, 200, "ScrollBar", KnownColor.ScrollBar);
- SystemColorsCache[(int)KnownColor.Window] = Color.FromArgbSystem (255, 255, 255, 255, "Window", KnownColor.Window);
- SystemColorsCache[(int)KnownColor.WindowFrame] = Color.FromArgbSystem (255, 0, 0, 0, "WindowFrame", KnownColor.WindowFrame);
- SystemColorsCache[(int)KnownColor.WindowText] = Color.FromArgbSystem (255, 0, 0, 0, "WindowText", KnownColor.WindowText);
-
-#if NET_2_0
- SystemColorsCache [(int) KnownColor.ButtonFace] = Color.FromArgbSystem (255, 192, 192, 192, "ButtonFace", KnownColor.ButtonFace);
- SystemColorsCache [(int) KnownColor.ButtonHighlight] = Color.FromArgbSystem (255, 255, 255, 255, "ButtonHighlight", KnownColor.ButtonHighlight);
- SystemColorsCache [(int) KnownColor.ButtonShadow] = Color.FromArgbSystem (255, 128, 128, 128, "ButtonShadow", KnownColor.ButtonShadow);
- SystemColorsCache [(int) KnownColor.GradientActiveCaption] = Color.FromArgbSystem (255, 16, 132, 208, "GradientActiveCaption", KnownColor.GradientActiveCaption);
- SystemColorsCache [(int) KnownColor.GradientInactiveCaption] = Color.FromArgbSystem (255, 181, 181, 181, "GradientInactiveCaption", KnownColor.GradientInactiveCaption);
- SystemColorsCache [(int) KnownColor.MenuBar] = Color.FromArgbSystem (255, 192, 192, 192, "MenuBar", KnownColor.MenuBar);
- SystemColorsCache [(int) KnownColor.MenuHighlight] = Color.FromArgbSystem (255, 0, 0, 0, "MenuHighlight", KnownColor.MenuHighlight);
-#endif
- }
- else {
- SystemColorsCache[(int)KnownColor.ActiveBorder] = FromNativeColor (awt.SystemColor.activeCaptionBorder, "ActiveBorder", KnownColor.ActiveBorder);
- SystemColorsCache[(int)KnownColor.ActiveCaption] = FromNativeColor (awt.SystemColor.activeCaption, "ActiveCaption", KnownColor.ActiveCaption);
- SystemColorsCache[(int)KnownColor.ActiveCaptionText] = FromNativeColor (awt.SystemColor.activeCaptionText, "ActiveCaptionText", KnownColor.ActiveCaptionText);
- //TODO: find a more close approximation
- SystemColorsCache[(int)KnownColor.AppWorkspace] = FromNativeColor (awt.SystemColor.desktop, "AppWorkspace", KnownColor.AppWorkspace);
- SystemColorsCache[(int)KnownColor.Control] = FromNativeColor (awt.SystemColor.control, "Control", KnownColor.Control);
- SystemColorsCache[(int)KnownColor.ControlDark] = FromNativeColor (awt.SystemColor.controlShadow, "ControlDark", KnownColor.ControlDark);
- SystemColorsCache[(int)KnownColor.ControlDarkDark] = FromNativeColor (awt.SystemColor.controlDkShadow, "ControlDarkDark", KnownColor.ControlDarkDark);
- SystemColorsCache[(int)KnownColor.ControlLight] = FromNativeColor (awt.SystemColor.controlHighlight, "ControlLight", KnownColor.ControlLight);
- SystemColorsCache[(int)KnownColor.ControlLightLight] = FromNativeColor (awt.SystemColor.controlLtHighlight, "ControlLightLight", KnownColor.ControlLightLight);
- SystemColorsCache[(int)KnownColor.ControlText] = FromNativeColor (awt.SystemColor.controlText, "ControlText", KnownColor.ControlText);
- SystemColorsCache[(int)KnownColor.Desktop] = FromNativeColor (awt.SystemColor.desktop, "Desktop", KnownColor.Desktop);
- SystemColorsCache[(int)KnownColor.GrayText] = FromNativeColor (awt.SystemColor.textInactiveText, "GrayText", KnownColor.GrayText);
- SystemColorsCache[(int)KnownColor.Highlight] = FromNativeColor (awt.SystemColor.textHighlight, "Highlight", KnownColor.Highlight);
- SystemColorsCache[(int)KnownColor.HighlightText] = FromNativeColor (awt.SystemColor.textHighlightText, "HighlightText", KnownColor.HighlightText);
- //TODO: find a more close approximation
- SystemColorsCache[(int)KnownColor.HotTrack] = FromNativeColor (awt.SystemColor.textText, "HotTrack", KnownColor.HotTrack);
- SystemColorsCache[(int)KnownColor.InactiveBorder] = FromNativeColor (awt.SystemColor.inactiveCaptionBorder, "InactiveBorder", KnownColor.InactiveBorder);
- SystemColorsCache[(int)KnownColor.InactiveCaption] = FromNativeColor (awt.SystemColor.inactiveCaption, "InactiveCaption", KnownColor.InactiveCaption);
- SystemColorsCache[(int)KnownColor.InactiveCaptionText] = FromNativeColor (awt.SystemColor.inactiveCaptionText, "InactiveCaptionText", KnownColor.InactiveCaptionText);
- SystemColorsCache[(int)KnownColor.Info] = FromNativeColor (awt.SystemColor.info, "Info", KnownColor.Info);
- SystemColorsCache[(int)KnownColor.InfoText] = FromNativeColor (awt.SystemColor.infoText, "InfoText", KnownColor.InfoText);
- SystemColorsCache[(int)KnownColor.Menu] = FromNativeColor (awt.SystemColor.menu, "Menu", KnownColor.Menu);
- SystemColorsCache[(int)KnownColor.MenuText] = FromNativeColor (awt.SystemColor.menuText, "MenuText", KnownColor.MenuText);
- SystemColorsCache[(int)KnownColor.ScrollBar] = FromNativeColor (awt.SystemColor.scrollbar, "ScrollBar", KnownColor.ScrollBar);
- SystemColorsCache[(int)KnownColor.Window] = FromNativeColor (awt.SystemColor.window, "Window", KnownColor.Window);
- SystemColorsCache[(int)KnownColor.WindowFrame] = FromNativeColor (awt.SystemColor.windowBorder, "WindowFrame", KnownColor.WindowFrame);
- SystemColorsCache[(int)KnownColor.WindowText] = FromNativeColor (awt.SystemColor.windowText, "WindowText", KnownColor.WindowText);
-
-#if NET_2_0
- SystemColorsCache [(int) KnownColor.ButtonFace] = FromNativeColor (awt.SystemColor.control, "ButtonFace", KnownColor.ButtonFace);
- SystemColorsCache [(int) KnownColor.ButtonHighlight] = FromNativeColor (awt.SystemColor.controlHighlight, "ButtonHighlight", KnownColor.ButtonHighlight);
- SystemColorsCache [(int) KnownColor.ButtonShadow] = FromNativeColor (awt.SystemColor.controlShadow, "ButtonShadow", KnownColor.ButtonShadow);
- SystemColorsCache [(int) KnownColor.GradientActiveCaption] = FromNativeColor (awt.SystemColor.activeCaption, "GradientActiveCaption", KnownColor.GradientActiveCaption);
- SystemColorsCache [(int) KnownColor.GradientInactiveCaption] = FromNativeColor (awt.SystemColor.inactiveCaption, "GradientInactiveCaption", KnownColor.GradientInactiveCaption);
- SystemColorsCache [(int) KnownColor.MenuBar] = FromNativeColor (awt.SystemColor.menu, "MenuBar", KnownColor.MenuBar);
- SystemColorsCache [(int) KnownColor.MenuHighlight] = FromNativeColor (awt.SystemColor.menu, "MenuHighlight", KnownColor.MenuHighlight);
-#endif
- }
-
- Color [] namedColors = new Color [] {
- Color.FromArgbNamed (0x00, 0xFF, 0xFF, 0xFF, "Transparent", KnownColor.Transparent),
- Color.FromArgbNamed (0xFF, 0xF0, 0xF8, 0xFF, "AliceBlue", KnownColor.AliceBlue),
- Color.FromArgbNamed (0xFF, 0xFA, 0xEB, 0xD7, "AntiqueWhite", KnownColor.AntiqueWhite),
- Color.FromArgbNamed (0xFF, 0x00, 0xFF, 0xFF, "Aqua", KnownColor.Aqua),
- Color.FromArgbNamed (0xFF, 0x7F, 0xFF, 0xD4, "Aquamarine", KnownColor.Aquamarine),
- Color.FromArgbNamed (0xFF, 0xF0, 0xFF, 0xFF, "Azure", KnownColor.Azure),
- Color.FromArgbNamed (0xFF, 0xF5, 0xF5, 0xDC, "Beige", KnownColor.Beige),
- Color.FromArgbNamed (0xFF, 0xFF, 0xE4, 0xC4, "Bisque", KnownColor.Bisque),
- Color.FromArgbNamed (0xFF, 0x00, 0x00, 0x00, "Black", KnownColor.Black),
- Color.FromArgbNamed (0xFF, 0xFF, 0xEB, 0xCD, "BlanchedAlmond", KnownColor.BlanchedAlmond),
- Color.FromArgbNamed (0xFF, 0x00, 0x00, 0xFF, "Blue", KnownColor.Blue),
- Color.FromArgbNamed (0xFF, 0x8A, 0x2B, 0xE2, "BlueViolet", KnownColor.BlueViolet),
- Color.FromArgbNamed (0xFF, 0xA5, 0x2A, 0x2A, "Brown", KnownColor.Brown),
- Color.FromArgbNamed (0xFF, 0xDE, 0xB8, 0x87, "BurlyWood", KnownColor.BurlyWood),
- Color.FromArgbNamed (0xFF, 0x5F, 0x9E, 0xA0, "CadetBlue", KnownColor.CadetBlue),
- Color.FromArgbNamed (0xFF, 0x7F, 0xFF, 0x00, "Chartreuse", KnownColor.Chartreuse),
- Color.FromArgbNamed (0xFF, 0xD2, 0x69, 0x1E, "Chocolate", KnownColor.Chocolate),
- Color.FromArgbNamed (0xFF, 0xFF, 0x7F, 0x50, "Coral", KnownColor.Coral),
- Color.FromArgbNamed (0xFF, 0x64, 0x95, 0xED, "CornflowerBlue", KnownColor.CornflowerBlue),
- Color.FromArgbNamed (0xFF, 0xFF, 0xF8, 0xDC, "Cornsilk", KnownColor.Cornsilk),
- Color.FromArgbNamed (0xFF, 0xDC, 0x14, 0x3C, "Crimson", KnownColor.Crimson),
- Color.FromArgbNamed (0xFF, 0x00, 0xFF, 0xFF, "Cyan", KnownColor.Cyan),
- Color.FromArgbNamed (0xFF, 0x00, 0x00, 0x8B, "DarkBlue", KnownColor.DarkBlue),
- Color.FromArgbNamed (0xFF, 0x00, 0x8B, 0x8B, "DarkCyan", KnownColor.DarkCyan),
- Color.FromArgbNamed (0xFF, 0xB8, 0x86, 0x0B, "DarkGoldenrod", KnownColor.DarkGoldenrod),
- Color.FromArgbNamed (0xFF, 0xA9, 0xA9, 0xA9, "DarkGray", KnownColor.DarkGray),
- Color.FromArgbNamed (0xFF, 0x00, 0x64, 0x00, "DarkGreen", KnownColor.DarkGreen),
- Color.FromArgbNamed (0xFF, 0xBD, 0xB7, 0x6B, "DarkKhaki", KnownColor.DarkKhaki),
- Color.FromArgbNamed (0xFF, 0x8B, 0x00, 0x8B, "DarkMagenta", KnownColor.DarkMagenta),
- Color.FromArgbNamed (0xFF, 0x55, 0x6B, 0x2F, "DarkOliveGreen", KnownColor.DarkOliveGreen),
- Color.FromArgbNamed (0xFF, 0xFF, 0x8C, 0x00, "DarkOrange", KnownColor.DarkOrange),
- Color.FromArgbNamed (0xFF, 0x99, 0x32, 0xCC, "DarkOrchid", KnownColor.DarkOrchid),
- Color.FromArgbNamed (0xFF, 0x8B, 0x00, 0x00, "DarkRed", KnownColor.DarkRed),
- Color.FromArgbNamed (0xFF, 0xE9, 0x96, 0x7A, "DarkSalmon", KnownColor.DarkSalmon),
- Color.FromArgbNamed (0xFF, 0x8F, 0xBC, 0x8B, "DarkSeaGreen", KnownColor.DarkSeaGreen),
- Color.FromArgbNamed (0xFF, 0x48, 0x3D, 0x8B, "DarkSlateBlue", KnownColor.DarkSlateBlue),
- Color.FromArgbNamed (0xFF, 0x2F, 0x4F, 0x4F, "DarkSlateGray", KnownColor.DarkSlateGray),
- Color.FromArgbNamed (0xFF, 0x00, 0xCE, 0xD1, "DarkTurquoise", KnownColor.DarkTurquoise),
- Color.FromArgbNamed (0xFF, 0x94, 0x00, 0xD3, "DarkViolet", KnownColor.DarkViolet),
- Color.FromArgbNamed (0xFF, 0xFF, 0x14, 0x93, "DeepPink", KnownColor.DeepPink),
- Color.FromArgbNamed (0xFF, 0x00, 0xBF, 0xFF, "DeepSkyBlue", KnownColor.DeepSkyBlue),
- Color.FromArgbNamed (0xFF, 0x69, 0x69, 0x69, "DimGray", KnownColor.DimGray),
- Color.FromArgbNamed (0xFF, 0x1E, 0x90, 0xFF, "DodgerBlue", KnownColor.DodgerBlue),
- Color.FromArgbNamed (0xFF, 0xB2, 0x22, 0x22, "Firebrick", KnownColor.Firebrick),
- Color.FromArgbNamed (0xFF, 0xFF, 0xFA, 0xF0, "FloralWhite", KnownColor.FloralWhite),
- Color.FromArgbNamed (0xFF, 0x22, 0x8B, 0x22, "ForestGreen", KnownColor.ForestGreen),
- Color.FromArgbNamed (0xFF, 0xFF, 0x00, 0xFF, "Fuchsia", KnownColor.Fuchsia),
- Color.FromArgbNamed (0xFF, 0xDC, 0xDC, 0xDC, "Gainsboro", KnownColor.Gainsboro),
- Color.FromArgbNamed (0xFF, 0xF8, 0xF8, 0xFF, "GhostWhite", KnownColor.GhostWhite),
- Color.FromArgbNamed (0xFF, 0xFF, 0xD7, 0x00, "Gold", KnownColor.Gold),
- Color.FromArgbNamed (0xFF, 0xDA, 0xA5, 0x20, "Goldenrod", KnownColor.Goldenrod),
- Color.FromArgbNamed (0xFF, 0x80, 0x80, 0x80, "Gray", KnownColor.Gray),
- Color.FromArgbNamed (0xFF, 0x00, 0x80, 0x00, "Green", KnownColor.Green),
- Color.FromArgbNamed (0xFF, 0xAD, 0xFF, 0x2F, "GreenYellow", KnownColor.GreenYellow),
- Color.FromArgbNamed (0xFF, 0xF0, 0xFF, 0xF0, "Honeydew", KnownColor.Honeydew),
- Color.FromArgbNamed (0xFF, 0xFF, 0x69, 0xB4, "HotPink", KnownColor.HotPink),
- Color.FromArgbNamed (0xFF, 0xCD, 0x5C, 0x5C, "IndianRed", KnownColor.IndianRed),
- Color.FromArgbNamed (0xFF, 0x4B, 0x00, 0x82, "Indigo", KnownColor.Indigo),
- Color.FromArgbNamed (0xFF, 0xFF, 0xFF, 0xF0, "Ivory", KnownColor.Ivory),
- Color.FromArgbNamed (0xFF, 0xF0, 0xE6, 0x8C, "Khaki", KnownColor.Khaki),
- Color.FromArgbNamed (0xFF, 0xE6, 0xE6, 0xFA, "Lavender", KnownColor.Lavender),
- Color.FromArgbNamed (0xFF, 0xFF, 0xF0, 0xF5, "LavenderBlush", KnownColor.LavenderBlush),
- Color.FromArgbNamed (0xFF, 0x7C, 0xFC, 0x00, "LawnGreen", KnownColor.LawnGreen),
- Color.FromArgbNamed (0xFF, 0xFF, 0xFA, 0xCD, "LemonChiffon", KnownColor.LemonChiffon),
- Color.FromArgbNamed (0xFF, 0xAD, 0xD8, 0xE6, "LightBlue", KnownColor.LightBlue),
- Color.FromArgbNamed (0xFF, 0xF0, 0x80, 0x80, "LightCoral", KnownColor.LightCoral),
- Color.FromArgbNamed (0xFF, 0xE0, 0xFF, 0xFF, "LightCyan", KnownColor.LightCyan),
- Color.FromArgbNamed (0xFF, 0xFA, 0xFA, 0xD2, "LightGoldenrodYellow", KnownColor.LightGoldenrodYellow),
- Color.FromArgbNamed (0xFF, 0xD3, 0xD3, 0xD3, "LightGray", KnownColor.LightGray),
- Color.FromArgbNamed (0xFF, 0x90, 0xEE, 0x90, "LightGreen", KnownColor.LightGreen),
- Color.FromArgbNamed (0xFF, 0xFF, 0xB6, 0xC1, "LightPink", KnownColor.LightPink),
- Color.FromArgbNamed (0xFF, 0xFF, 0xA0, 0x7A, "LightSalmon", KnownColor.LightSalmon),
- Color.FromArgbNamed (0xFF, 0x20, 0xB2, 0xAA, "LightSeaGreen", KnownColor.LightSeaGreen),
- Color.FromArgbNamed (0xFF, 0x87, 0xCE, 0xFA, "LightSkyBlue", KnownColor.LightSkyBlue),
- Color.FromArgbNamed (0xFF, 0x77, 0x88, 0x99, "LightSlateGray", KnownColor.LightSlateGray),
- Color.FromArgbNamed (0xFF, 0xB0, 0xC4, 0xDE, "LightSteelBlue", KnownColor.LightSteelBlue),
- Color.FromArgbNamed (0xFF, 0xFF, 0xFF, 0xE0, "LightYellow", KnownColor.LightYellow),
- Color.FromArgbNamed (0xFF, 0x00, 0xFF, 0x00, "Lime", KnownColor.Lime),
- Color.FromArgbNamed (0xFF, 0x32, 0xCD, 0x32, "LimeGreen", KnownColor.LimeGreen),
- Color.FromArgbNamed (0xFF, 0xFA, 0xF0, 0xE6, "Linen", KnownColor.Linen),
- Color.FromArgbNamed (0xFF, 0xFF, 0x00, 0xFF, "Magenta", KnownColor.Magenta),
- Color.FromArgbNamed (0xFF, 0x80, 0x00, 0x00, "Maroon", KnownColor.Maroon),
- Color.FromArgbNamed (0xFF, 0x66, 0xCD, 0xAA, "MediumAquamarine", KnownColor.MediumAquamarine),
- Color.FromArgbNamed (0xFF, 0x00, 0x00, 0xCD, "MediumBlue", KnownColor.MediumBlue),
- Color.FromArgbNamed (0xFF, 0xBA, 0x55, 0xD3, "MediumOrchid", KnownColor.MediumOrchid),
- Color.FromArgbNamed (0xFF, 0x93, 0x70, 0xDB, "MediumPurple", KnownColor.MediumPurple),
- Color.FromArgbNamed (0xFF, 0x3C, 0xB3, 0x71, "MediumSeaGreen", KnownColor.MediumSeaGreen),
- Color.FromArgbNamed (0xFF, 0x7B, 0x68, 0xEE, "MediumSlateBlue", KnownColor.MediumSlateBlue),
- Color.FromArgbNamed (0xFF, 0x00, 0xFA, 0x9A, "MediumSpringGreen", KnownColor.MediumSpringGreen),
- Color.FromArgbNamed (0xFF, 0x48, 0xD1, 0xCC, "MediumTurquoise", KnownColor.MediumTurquoise),
- Color.FromArgbNamed (0xFF, 0xC7, 0x15, 0x85, "MediumVioletRed", KnownColor.MediumVioletRed),
- Color.FromArgbNamed (0xFF, 0x19, 0x19, 0x70, "MidnightBlue", KnownColor.MidnightBlue),
- Color.FromArgbNamed (0xFF, 0xF5, 0xFF, 0xFA, "MintCream", KnownColor.MintCream),
- Color.FromArgbNamed (0xFF, 0xFF, 0xE4, 0xE1, "MistyRose", KnownColor.MistyRose),
- Color.FromArgbNamed (0xFF, 0xFF, 0xE4, 0xB5, "Moccasin", KnownColor.Moccasin),
- Color.FromArgbNamed (0xFF, 0xFF, 0xDE, 0xAD, "NavajoWhite", KnownColor.NavajoWhite),
- Color.FromArgbNamed (0xFF, 0x00, 0x00, 0x80, "Navy", KnownColor.Navy),
- Color.FromArgbNamed (0xFF, 0xFD, 0xF5, 0xE6, "OldLace", KnownColor.OldLace),
- Color.FromArgbNamed (0xFF, 0x80, 0x80, 0x00, "Olive", KnownColor.Olive),
- Color.FromArgbNamed (0xFF, 0x6B, 0x8E, 0x23, "OliveDrab", KnownColor.OliveDrab),
- Color.FromArgbNamed (0xFF, 0xFF, 0xA5, 0x00, "Orange", KnownColor.Orange),
- Color.FromArgbNamed (0xFF, 0xFF, 0x45, 0x00, "OrangeRed", KnownColor.OrangeRed),
- Color.FromArgbNamed (0xFF, 0xDA, 0x70, 0xD6, "Orchid", KnownColor.Orchid),
- Color.FromArgbNamed (0xFF, 0xEE, 0xE8, 0xAA, "PaleGoldenrod", KnownColor.PaleGoldenrod),
- Color.FromArgbNamed (0xFF, 0x98, 0xFB, 0x98, "PaleGreen", KnownColor.PaleGreen),
- Color.FromArgbNamed (0xFF, 0xAF, 0xEE, 0xEE, "PaleTurquoise", KnownColor.PaleTurquoise),
- Color.FromArgbNamed (0xFF, 0xDB, 0x70, 0x93, "PaleVioletRed", KnownColor.PaleVioletRed),
- Color.FromArgbNamed (0xFF, 0xFF, 0xEF, 0xD5, "PapayaWhip", KnownColor.PapayaWhip),
- Color.FromArgbNamed (0xFF, 0xFF, 0xDA, 0xB9, "PeachPuff", KnownColor.PeachPuff),
- Color.FromArgbNamed (0xFF, 0xCD, 0x85, 0x3F, "Peru", KnownColor.Peru),
- Color.FromArgbNamed (0xFF, 0xFF, 0xC0, 0xCB, "Pink", KnownColor.Pink),
- Color.FromArgbNamed (0xFF, 0xDD, 0xA0, 0xDD, "Plum", KnownColor.Plum),
- Color.FromArgbNamed (0xFF, 0xB0, 0xE0, 0xE6, "PowderBlue", KnownColor.PowderBlue),
- Color.FromArgbNamed (0xFF, 0x80, 0x00, 0x80, "Purple", KnownColor.Purple),
- Color.FromArgbNamed (0xFF, 0xFF, 0x00, 0x00, "Red", KnownColor.Red),
- Color.FromArgbNamed (0xFF, 0xBC, 0x8F, 0x8F, "RosyBrown", KnownColor.RosyBrown),
- Color.FromArgbNamed (0xFF, 0x41, 0x69, 0xE1, "RoyalBlue", KnownColor.RoyalBlue),
- Color.FromArgbNamed (0xFF, 0x8B, 0x45, 0x13, "SaddleBrown", KnownColor.SaddleBrown),
- Color.FromArgbNamed (0xFF, 0xFA, 0x80, 0x72, "Salmon", KnownColor.Salmon),
- Color.FromArgbNamed (0xFF, 0xF4, 0xA4, 0x60, "SandyBrown", KnownColor.SandyBrown),
- Color.FromArgbNamed (0xFF, 0x2E, 0x8B, 0x57, "SeaGreen", KnownColor.SeaGreen),
- Color.FromArgbNamed (0xFF, 0xFF, 0xF5, 0xEE, "SeaShell", KnownColor.SeaShell),
- Color.FromArgbNamed (0xFF, 0xA0, 0x52, 0x2D, "Sienna", KnownColor.Sienna),
- Color.FromArgbNamed (0xFF, 0xC0, 0xC0, 0xC0, "Silver", KnownColor.Silver),
- Color.FromArgbNamed (0xFF, 0x87, 0xCE, 0xEB, "SkyBlue", KnownColor.SkyBlue),
- Color.FromArgbNamed (0xFF, 0x6A, 0x5A, 0xCD, "SlateBlue", KnownColor.SlateBlue),
- Color.FromArgbNamed (0xFF, 0x70, 0x80, 0x90, "SlateGray", KnownColor.SlateGray),
- Color.FromArgbNamed (0xFF, 0xFF, 0xFA, 0xFA, "Snow", KnownColor.Snow),
- Color.FromArgbNamed (0xFF, 0x00, 0xFF, 0x7F, "SpringGreen", KnownColor.SpringGreen),
- Color.FromArgbNamed (0xFF, 0x46, 0x82, 0xB4, "SteelBlue", KnownColor.SteelBlue),
- Color.FromArgbNamed (0xFF, 0xD2, 0xB4, 0x8C, "Tan", KnownColor.Tan),
- Color.FromArgbNamed (0xFF, 0x00, 0x80, 0x80, "Teal", KnownColor.Teal),
- Color.FromArgbNamed (0xFF, 0xD8, 0xBF, 0xD8, "Thistle", KnownColor.Thistle),
- Color.FromArgbNamed (0xFF, 0xFF, 0x63, 0x47, "Tomato", KnownColor.Tomato),
- Color.FromArgbNamed (0xFF, 0x40, 0xE0, 0xD0, "Turquoise", KnownColor.Turquoise),
- Color.FromArgbNamed (0xFF, 0xEE, 0x82, 0xEE, "Violet", KnownColor.Violet),
- Color.FromArgbNamed (0xFF, 0xF5, 0xDE, 0xB3, "Wheat", KnownColor.Wheat),
- Color.FromArgbNamed (0xFF, 0xFF, 0xFF, 0xFF, "White", KnownColor.White),
- Color.FromArgbNamed (0xFF, 0xF5, 0xF5, 0xF5, "WhiteSmoke", KnownColor.WhiteSmoke),
- Color.FromArgbNamed (0xFF, 0xFF, 0xFF, 0x00, "Yellow", KnownColor.Yellow),
- Color.FromArgbNamed (0xFF, 0x9A, 0xCD, 0x32, "YellowGreen", KnownColor.YellowGreen),
- };
-
- Array.Copy (namedColors, 0, SystemColorsCache, (int) KnownColor.Transparent, namedColors.Length);
- }
-
- static private Color FromNativeColor (
- awt.Color awtColor, string name, KnownColor knownColor) {
- return Color.FromArgbSystem (awtColor.getAlpha(),
- awtColor.getRed(), awtColor.getGreen(), awtColor.getBlue(),
- name, knownColor);
- }
-
- public static Color [] Values {
- get { return SystemColorsCache; }
- }
-
- public static Color FromKnownColor (KnownColor kc) {
- int n = (int) kc;
- if ((n <= 0) || (n >= Values.Length)) {
- // This is what it returns!
- Color c = Color.FromArgb (0, 0, 0, 0);
- c.name = kc.ToString ();
- c.state |= (short) Color.ColorType.Named;
- c.knownColor = (short) kc;
- return c;
- }
- return Values [n];
- }
-
- public static string GetName (short kc)
- {
- switch (kc) {
- case 1: return "ActiveBorder";
- case 2: return "ActiveCaption";
- case 3: return "ActiveCaptionText";
- case 4: return "AppWorkspace";
- case 5: return "Control";
- case 6: return "ControlDark";
- case 7: return "ControlDarkDark";
- case 8: return "ControlLight";
- case 9: return "ControlLightLight";
- case 10: return "ControlText";
- case 11: return "Desktop";
- case 12: return "GrayText";
- case 13: return "Highlight";
- case 14: return "HighlightText";
- case 15: return "HotTrack";
- case 16: return "InactiveBorder";
- case 17: return "InactiveCaption";
- case 18: return "InactiveCaptionText";
- case 19: return "Info";
- case 20: return "InfoText";
- case 21: return "Menu";
- case 22: return "MenuText";
- case 23: return "ScrollBar";
- case 24: return "Window";
- case 25: return "WindowFrame";
- case 26: return "WindowText";
- case 27: return "Transparent";
- case 28: return "AliceBlue";
- case 29: return "AntiqueWhite";
- case 30: return "Aqua";
- case 31: return "Aquamarine";
- case 32: return "Azure";
- case 33: return "Beige";
- case 34: return "Bisque";
- case 35: return "Black";
- case 36: return "BlanchedAlmond";
- case 37: return "Blue";
- case 38: return "BlueViolet";
- case 39: return "Brown";
- case 40: return "BurlyWood";
- case 41: return "CadetBlue";
- case 42: return "Chartreuse";
- case 43: return "Chocolate";
- case 44: return "Coral";
- case 45: return "CornflowerBlue";
- case 46: return "Cornsilk";
- case 47: return "Crimson";
- case 48: return "Cyan";
- case 49: return "DarkBlue";
- case 50: return "DarkCyan";
- case 51: return "DarkGoldenrod";
- case 52: return "DarkGray";
- case 53: return "DarkGreen";
- case 54: return "DarkKhaki";
- case 55: return "DarkMagenta";
- case 56: return "DarkOliveGreen";
- case 57: return "DarkOrange";
- case 58: return "DarkOrchid";
- case 59: return "DarkRed";
- case 60: return "DarkSalmon";
- case 61: return "DarkSeaGreen";
- case 62: return "DarkSlateBlue";
- case 63: return "DarkSlateGray";
- case 64: return "DarkTurquoise";
- case 65: return "DarkViolet";
- case 66: return "DeepPink";
- case 67: return "DeepSkyBlue";
- case 68: return "DimGray";
- case 69: return "DodgerBlue";
- case 70: return "Firebrick";
- case 71: return "FloralWhite";
- case 72: return "ForestGreen";
- case 73: return "Fuchsia";
- case 74: return "Gainsboro";
- case 75: return "GhostWhite";
- case 76: return "Gold";
- case 77: return "Goldenrod";
- case 78: return "Gray";
- case 79: return "Green";
- case 80: return "GreenYellow";
- case 81: return "Honeydew";
- case 82: return "HotPink";
- case 83: return "IndianRed";
- case 84: return "Indigo";
- case 85: return "Ivory";
- case 86: return "Khaki";
- case 87: return "Lavender";
- case 88: return "LavenderBlush";
- case 89: return "LawnGreen";
- case 90: return "LemonChiffon";
- case 91: return "LightBlue";
- case 92: return "LightCoral";
- case 93: return "LightCyan";
- case 94: return "LightGoldenrodYellow";
- case 95: return "LightGray";
- case 96: return "LightGreen";
- case 97: return "LightPink";
- case 98: return "LightSalmon";
- case 99: return "LightSeaGreen";
- case 100: return "LightSkyBlue";
- case 101: return "LightSlateGray";
- case 102: return "LightSteelBlue";
- case 103: return "LightYellow";
- case 104: return "Lime";
- case 105: return "LimeGreen";
- case 106: return "Linen";
- case 107: return "Magenta";
- case 108: return "Maroon";
- case 109: return "MediumAquamarine";
- case 110: return "MediumBlue";
- case 111: return "MediumOrchid";
- case 112: return "MediumPurple";
- case 113: return "MediumSeaGreen";
- case 114: return "MediumSlateBlue";
- case 115: return "MediumSpringGreen";
- case 116: return "MediumTurquoise";
- case 117: return "MediumVioletRed";
- case 118: return "MidnightBlue";
- case 119: return "MintCream";
- case 120: return "MistyRose";
- case 121: return "Moccasin";
- case 122: return "NavajoWhite";
- case 123: return "Navy";
- case 124: return "OldLace";
- case 125: return "Olive";
- case 126: return "OliveDrab";
- case 127: return "Orange";
- case 128: return "OrangeRed";
- case 129: return "Orchid";
- case 130: return "PaleGoldenrod";
- case 131: return "PaleGreen";
- case 132: return "PaleTurquoise";
- case 133: return "PaleVioletRed";
- case 134: return "PapayaWhip";
- case 135: return "PeachPuff";
- case 136: return "Peru";
- case 137: return "Pink";
- case 138: return "Plum";
- case 139: return "PowderBlue";
- case 140: return "Purple";
- case 141: return "Red";
- case 142: return "RosyBrown";
- case 143: return "RoyalBlue";
- case 144: return "SaddleBrown";
- case 145: return "Salmon";
- case 146: return "SandyBrown";
- case 147: return "SeaGreen";
- case 148: return "SeaShell";
- case 149: return "Sienna";
- case 150: return "Silver";
- case 151: return "SkyBlue";
- case 152: return "SlateBlue";
- case 153: return "SlateGray";
- case 154: return "Snow";
- case 155: return "SpringGreen";
- case 156: return "SteelBlue";
- case 157: return "Tan";
- case 158: return "Teal";
- case 159: return "Thistle";
- case 160: return "Tomato";
- case 161: return "Turquoise";
- case 162: return "Violet";
- case 163: return "Wheat";
- case 164: return "White";
- case 165: return "WhiteSmoke";
- case 166: return "Yellow";
- case 167: return "YellowGreen";
-#if NET_2_0
- case 168: return "ButtonFace";
- case 169: return "ButtonHighlight";
- case 170: return "ButtonShadow";
- case 171: return "GradientActiveCaption";
- case 172: return "GradientInactiveCaption";
- case 173: return "MenuBar";
- case 174: return "MenuHighlight";
-#endif
- default: return String.Empty;
- }
- }
-
- public static string GetName (KnownColor kc)
- {
- return GetName ((short)kc);
- }
-
- public static Color FindColorMatch (Color c)
- {
- uint argb = (uint) c.ToArgb ();
- for (int i = 0; i < Values.Length; i++) {
- if (argb == Values [i].ToArgb ())
- return KnownColors.FromKnownColor ((KnownColor) i);
- }
- return Color.Empty;
- }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs
deleted file mode 100644
index bd9ca2b298a..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Pen.jvm.cs
+++ /dev/null
@@ -1,577 +0,0 @@
-//
-// System.Drawing.Pen.cs
-//
-// Authors:
-// Miguel de Icaza (miguel@ximian.com)
-// Alexandre Pigolkine (pigolkine@gmx.de)
-// Duncan Mak (duncan@ximian.com)
-// Ravindra (rkumar@novell.com)
-//
-// (C) Ximian, Inc. http://www.ximian.com
-// (C) Novell, Inc. http://www.novell.com
-//
-
-using System;
-using System.Drawing.Drawing2D;
-using System.Runtime.InteropServices;
-
-using awt = java.awt;
-using geom = java.awt.geom;
-
-namespace System.Drawing
-{
-
- public sealed class Pen : MarshalByRefObject, ICloneable, IDisposable, awt.Stroke
- {
- #region Member Vars
-
- static readonly float [] DASH_ARRAY = {4.0f,1.0f};
- static readonly float [] DASHDOT_ARRAY = {4.0f,1.0f,1.0f,1.0f};
- static readonly float [] DASHDOTDOT_ARRAY = {4.0f,1.0f,1.0f,1.0f,1.0f,1.0f};
- static readonly float [] DOT_ARRAY = {1.0f,1.0f};
-
- internal bool isModifiable = true;
-
- Brush _brush;
- DashStyle _dashStyle;
- DashCap _dashCap;
- LineCap _startCap;
- LineCap _endCap;
-
- LineJoin _lineJoin;
-
- PenAlignment _alignment;
- Matrix _transform;
- float _width;
- float _dashOffset;
- float[] _dashPattern;
- //float[] _compoundArray;
-
- float _miterLimit;
-
- #endregion
-
- #region Ctors. and Dtor
-
- public Pen (Brush brush) : this (brush, 1.0F)
- {}
-
- public Pen (Color color) : this (color, 1.0F)
- {}
-
- public Pen (Color color, float width) : this(new SolidBrush(color), width)
- {}
-
- public Pen (Brush brush, float width)
- {
- _brush = (Brush)brush.Clone();;
- _width = width;
- _dashStyle = DashStyle.Solid;
- _startCap = LineCap.Flat;
- _dashCap = DashCap.Flat;
- _endCap = LineCap.Flat;
- _alignment = PenAlignment.Center;
- _lineJoin = LineJoin.Miter;
- _miterLimit = 10f;
- _transform = new Matrix();
- }
- #endregion
- //
- // Properties
- //
- #region Alignment [TODO]
- public PenAlignment Alignment
- {
- get
- {
- return _alignment;
- }
-
- set
- {
- EnsureModifiable();
- _alignment = value;
- }
- }
- #endregion
-
- #region Brush
- public Brush Brush
- {
- get
- {
- return _brush;
- }
-
- set
- {
- EnsureModifiable();
- if (value == null)
- throw new ArgumentNullException("brush");
- _brush = value;
- }
- }
- #endregion
-
- #region Color
- public Color Color
- {
- get
- {
- if(Brush is SolidBrush)
- return ((SolidBrush)Brush).Color;
- else if(Brush is HatchBrush)
- return ((HatchBrush)Brush).ForegroundColor;
- else
- return Color.Empty;
- }
-
- set
- {
- EnsureModifiable();
- _brush = new SolidBrush (value);
- }
- }
- #endregion
-
- #region CompoundArray [TODO]
- [MonoTODO]
- public float[] CompoundArray {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
- #endregion
-
- #region CustomEndCap [TODO]
- [MonoTODO]
- public CustomLineCap CustomEndCap
- {
- get
- {
- throw new NotImplementedException ();
- }
- // do a check for isModifiable when implementing this property
- set
- {
- throw new NotImplementedException ();
- }
- }
- #endregion
-
- #region CustomStartCap [TODO]
- [MonoTODO]
- public CustomLineCap CustomStartCap
- {
- get
- {
- throw new NotImplementedException ();
- }
-
- // do a check for isModifiable when implementing this property
- set
- {
- throw new NotImplementedException ();
- }
- }
- #endregion
-
- #region DashCap
- [MonoTODO]
- public DashCap DashCap {
- get {
- return _dashCap;
- }
-
- set {
- EnsureModifiable();
- _dashCap = value;
- }
- }
- #endregion
-
- #region DashOffset
- public float DashOffset
- {
-
- get
- {
- return _dashOffset;
- }
-
- set
- {
- EnsureModifiable();
- _dashOffset = value;
- }
- }
- #endregion
-
- #region DashPattern
-
- public float [] DashPattern
- {
- get
- {
- return (float [])_dashPattern.Clone();
- }
-
- set
- {
- EnsureModifiable();
-
- _dashPattern = value;
- DashStyle = (_dashPattern == null) ? DashStyle.Solid : DashStyle.Custom;
- }
- }
- #endregion
-
- #region DashStyle
- public DashStyle DashStyle
- {
- get
- {
- return _dashStyle;
- }
-
- set
- {
- EnsureModifiable();
- _dashStyle = value;
- }
- }
- #endregion
-
- #region StartCap [TODO - now allways endcap]
- [MonoTODO]
- public LineCap StartCap {
- get {
- return _startCap;
- }
-
- set {
- EnsureModifiable();
- _startCap = value;
- }
- }
- #endregion
-
- #region EndCap
- [MonoTODO]
- public LineCap EndCap
- {
- get
- {
- return _endCap;
- }
-
- set
- {
- EnsureModifiable();
-
- _endCap = value;
- }
- }
- #endregion
-
- #region LineJoin [partial TODO - missed styles]
- [MonoTODO]
- public LineJoin LineJoin {
- get {
- return _lineJoin;
- }
-
- set {
- EnsureModifiable();
- _lineJoin = value;
- }
- }
-
- #endregion
-
- #region MiterLimit
- public float MiterLimit
- {
-
- get
- {
- return _miterLimit;
- }
-
- set
- {
- EnsureModifiable();
-
- _miterLimit = value;
- }
-
- }
- #endregion
-
- #region PenType
- public PenType PenType
- {
- get
- {
- if (Brush is TextureBrush)
- return PenType.TextureFill;
- else if (Brush is HatchBrush)
- return PenType.HatchFill;
- else if (Brush is LinearGradientBrush)
- return PenType.LinearGradient;
- else if (Brush is PathGradientBrush)
- return PenType.PathGradient;
- else
- return PenType.SolidColor;
- }
- }
- #endregion
-
- #region Transform
- public Matrix Transform
- {
- get
- {
- return _transform.Clone();
- }
-
- set
- {
- EnsureModifiable();
-
- value.CopyTo(_transform);
- }
- }
- #endregion
-
- #region Width
- public float Width
- {
- get
- {
- return _width;
- }
- set
- {
- EnsureModifiable();
-
- _width = value;
- }
- }
- #endregion
-
- #region Clone
- public object Clone ()
- {
- Pen clone = (Pen)MemberwiseClone();
- if (clone._transform != null)
- clone._transform = clone._transform.Clone();
- if (clone._dashPattern != null)
- clone._dashPattern = (float[])clone._dashPattern.Clone();
- return clone;
- }
- #endregion
-
- #region Dispose
- public void Dispose ()
- {
- Dispose (true);
- }
- void Dispose (bool disposing)
- {
- if (!isModifiable && disposing)
- throw new ArgumentException ("You may not change this Pen because it does not belong to you.");
- // Restore the dtor if adding anything below
- }
- #endregion
-
- #region Transform Funcs
- public void MultiplyTransform (Matrix matrix)
- {
- _transform.Multiply (matrix);
- }
-
- public void MultiplyTransform (Matrix matrix, MatrixOrder order)
- {
- _transform.Multiply (matrix, order);
- }
-
- public void ResetTransform ()
- {
- _transform.Reset ();
- }
-
- public void RotateTransform (float angle)
- {
- _transform.Rotate (angle);
- }
-
- public void RotateTransform (float angle, MatrixOrder order)
- {
- _transform.Rotate (angle, order);
- }
-
- public void ScaleTransform (float sx, float sy)
- {
- _transform.Scale (sx, sy);
- }
-
- public void ScaleTransform (float sx, float sy, MatrixOrder order)
- {
- _transform.Scale (sx, sy, order);
- }
-
- public void TranslateTransform (float dx, float dy) {
- _transform.Translate (dx, dy);
- }
-
- public void TranslateTransform (float dx, float dy, MatrixOrder order) {
- _transform.Translate (dx, dy, order);
- }
- #endregion
-
- public void SetLineCap (LineCap startCap, LineCap endCap, DashCap dashCap)
- {
- StartCap = startCap;
- DashCap = dashCap;
- EndCap = endCap;
- }
-
- void EnsureModifiable() {
- if (!isModifiable)
- throw new ArgumentException ("You may not change this Pen because it does not belong to you.");
- }
-
- internal double GetSquaredTransformedWidth(geom.AffineTransform coordsTransform) {
- geom.AffineTransform transform = _transform.NativeObject;
- double A = transform.getScaleX(); // m00
- double B = transform.getShearY(); // m10
- double C = transform.getShearX(); // m01
- double D = transform.getScaleY(); // m11
-
- double K = coordsTransform.getScaleX(); // m00
- double L = coordsTransform.getShearY(); // m10
- double M = coordsTransform.getShearX(); // m01
- double N = coordsTransform.getScaleY(); // m11
-
- double AD = A*D, BC = B*C, KN = K*N, LM = L*M;
- double KN_LM = KN-LM;
- return Math.Abs(Width*Width * (AD*KN_LM - BC*KN_LM));
- }
-
-
- internal bool CanCreateBasicStroke {
- get {
- if (!_transform.IsIdentity)
- return false;
-
- //FIXME: add more logic when more features will
- // be implemented.
- return true;
- }
- }
-
- internal awt.Stroke GetNativeObject(geom.AffineTransform outputTransform, PenFit penFit) {
- return GetNativeObject(null, outputTransform, penFit);
- }
- /// <summary>
- ///
- /// </summary>
- /// <param name="outputTransform">transform which will be applied on the final shape</param>
- /// <param name="fitPen">ensure the shape will wide enough to be visible</param>
- /// <returns></returns>
- internal awt.Stroke GetNativeObject(geom.AffineTransform penTransform, geom.AffineTransform outputTransform, PenFit penFit) {
- float[] dashPattern = null;
-
- switch (DashStyle) {
- case DashStyle.Custom:
- if (_dashPattern != null) {
- dashPattern = new float[_dashPattern.Length];
- for(int i = 0; i < _dashPattern.Length; i++) {
-
- if (EndCap == LineCap.Flat)
- dashPattern[i] = _dashPattern[i] * Width;
- else {
- if ((i & 1) == 0) {
- // remove the size of caps from the opaque parts
- dashPattern[i] = (_dashPattern[i] * Width) - Width;
- if (_dashPattern[i] < 0)
- dashPattern[i] = 0;
- }
- else
- // add the size of caps to the transparent parts
- dashPattern[i] = (_dashPattern[i] * Width) + Width;
- }
- }
- }
- break;
- case DashStyle.Dash:
- dashPattern = DASH_ARRAY;
- break;
- case DashStyle.DashDot:
- dashPattern = DASHDOT_ARRAY;
- break;
- case DashStyle.DashDotDot:
- dashPattern = DASHDOTDOT_ARRAY;
- break;
-
- // default:
- // case DashStyle.Solid:
- // break;
- }
-
- int join;
- switch (LineJoin) {
- case LineJoin.Bevel:
- join = java.awt.BasicStroke.JOIN_BEVEL;
- break;
- default:
- case LineJoin.Miter:
- case LineJoin.MiterClipped:
- join = java.awt.BasicStroke.JOIN_MITER;
- break;
- case LineJoin.Round:
- join = java.awt.BasicStroke.JOIN_ROUND;
- break;
- }
-
- // We go by End cap for now.
- int cap;
- switch (EndCap) {
- default:
- case LineCap.Square:
- case LineCap.SquareAnchor:
- cap = awt.BasicStroke.CAP_SQUARE;
- break;
- case LineCap.Round:
- case LineCap.RoundAnchor:
- cap = awt.BasicStroke.CAP_ROUND;
- break;
- case LineCap.Flat:
- cap = awt.BasicStroke.CAP_BUTT;
- break;
- }
-
- geom.AffineTransform penT = _transform.NativeObject;
- if (penTransform != null && !penTransform.isIdentity()) {
- penT = (geom.AffineTransform) penT.clone();
- penT.concatenate(penTransform);
- }
-
- return StrokeFactory.CreateStroke(Width, cap,
- join, MiterLimit, dashPattern, DashOffset,
- penT, outputTransform, penFit);
- }
-
- #region Stroke Members
-
- awt.Shape awt.Stroke.createStrokedShape(awt.Shape arg_0) {
- return GetNativeObject(null, PenFit.NotThin).createStrokedShape(arg_0);
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs b/mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs
deleted file mode 100644
index aad9478bdb7..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/PlainImage.jvm.cs
+++ /dev/null
@@ -1,137 +0,0 @@
-using System;
-using System.Drawing.Imaging;
-using System.Xml;
-
-using Mainsoft.Drawing.Imaging;
-
-using awt = java.awt;
-using java.awt.image;
-using imageio = javax.imageio;
-
-namespace Mainsoft.Drawing.Imaging
-{
- /// <summary>
- /// Summary description for PlainImage.
- /// </summary>
- public class PlainImage : ICloneable {
-
- #region Members
-
- awt.Image _nativeObject;
- awt.Image [] _thumbnails;
- FrameDimension _dimension;
- XmlDocument _metadata;
- imageio.metadata.IIOMetadata _nativeMetadata;
- ImageFormat _imageFormat;
-
- float _xResolution;
- float _yResolution;
-
-
- #endregion
-
- #region Constructors
-
- public PlainImage() {
- }
-
- public PlainImage(awt.Image image, awt.Image [] thumbnails, ImageFormat format, float xRes, float yRes, FrameDimension dimension) {
- _nativeObject = image;
- _thumbnails = thumbnails;
- _imageFormat = format;
-
- _xResolution = xRes;
- _yResolution = yRes;
-
- _dimension = dimension;
- }
-
- #endregion
-
-
- private awt.Image NativeObject {
- get { return _nativeObject; }
- set { _nativeObject = value; }
- }
-
- #region PlainImage properties
-
- public awt.Image NativeImage {
- get { return NativeObject; }
- set { NativeObject = value; }
- }
-
- internal imageio.metadata.IIOMetadata NativeMetadata {
- get { return _nativeMetadata; }
- set { _nativeMetadata = value; }
- }
-
- public XmlDocument Metadata {
- get { return _metadata; }
- set { _metadata = value; }
- }
-
- public ImageFormat ImageFormat {
- get { return _imageFormat; }
- }
-
- public FrameDimension Dimension {
- get { return _dimension; }
- set { _dimension = value; }
- }
-
- public awt.Image [] Thumbnails {
- get { return _thumbnails; }
- }
-
- public float HorizontalResolution {
- get { return _xResolution; }
- set { _xResolution = value; }
- }
-
- public float VerticalResolution {
- get { return _yResolution; }
- set { _yResolution = value; }
- }
-
- #endregion
-
- #region ICloneable members
-
- public object Clone() {
- return Clone(true);
- }
-
- public PlainImage Clone(bool cloneImage) {
- awt.Image img = NativeImage;
- awt.Image [] th = _thumbnails;
-
- if (cloneImage) {
- img = new BufferedImage(
- ((BufferedImage)NativeObject).getColorModel(),
- ((BufferedImage)NativeObject).copyData(null),
- ((BufferedImage)NativeObject).isAlphaPremultiplied(), null);
-
- if (Thumbnails != null) {
- th = new java.awt.Image[ Thumbnails.Length ];
- for (int i=0; i < Thumbnails.Length; i++) {
- th[i] = new BufferedImage(
- ((BufferedImage)Thumbnails[i]).getColorModel(),
- ((BufferedImage)Thumbnails[i]).copyData(null),
- ((BufferedImage)Thumbnails[i]).isAlphaPremultiplied(), null);
- }
- }
- }
-
- return new PlainImage(
- img,
- th,
- ImageFormat,
- HorizontalResolution,
- VerticalResolution,
- Dimension );
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs b/mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs
deleted file mode 100644
index 1274948840f..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/PlainImageCollection.jvm.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-using System;
-using System.Collections;
-
-namespace Mainsoft.Drawing.Imaging
-{
- /// <summary>
- /// Summary description for PlainImageCollection.
- /// </summary>
- public class PlainImageCollection : ICollection, IEnumerable
- {
- ArrayList collection = new ArrayList();
- int _position = 0;
-
- public PlainImageCollection()
- {
- //
- // TODO: Add constructor logic here
- //
- }
-
- #region ICollection members
-
- public bool IsSynchronized {
- get {
- return collection.IsSynchronized;
- }
- }
-
- public int Count {
- get {
- return collection.Count;
- }
- }
-
- public void CopyTo(Array array, int index) {
- collection.CopyTo(array, index);
- }
-
- public object SyncRoot {
- get {
- return collection.SyncRoot;
- }
- }
-
- #endregion
-
- #region IEnumerable members
-
- public IEnumerator GetEnumerator() {
- return collection.GetEnumerator();
- }
-
- #endregion
-
- #region Collection members
-
- public int Add(PlainImage plainImage) {
- return collection.Add( plainImage );
- }
-
- public void Clear() {
- collection.Clear();
- }
-
- public bool Contains(PlainImage plainImage) {
- return collection.Contains(plainImage);
- }
-
- public int IndexOf(PlainImage plainImage) {
- return collection.IndexOf( plainImage );
- }
-
- public void Insert(int index, PlainImage value) {
- collection.Insert( index, value );
- }
-
- public void Remove(PlainImage value) {
- collection.Remove( value );
- }
-
- public void RemoveAt(int index) {
- collection.RemoveAt( index );
- }
-
- public PlainImage this[int index] {
- get { return (PlainImage) collection[ index ]; }
- }
-
- public PlainImage CurrentImage {
- get { return (PlainImage) collection[ _position ]; }
- set { collection[ _position ] = value; }
- }
-
- public int CurrentImageIndex {
- get { return _position; }
- set { _position = value; }
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/Rectangle.cs b/mcs/class/System.Drawing/System.Drawing/Rectangle.cs
index 1ba6fd32a0b..c8b3f6c7282 100644
--- a/mcs/class/System.Drawing/System.Drawing/Rectangle.cs
+++ b/mcs/class/System.Drawing/System.Drawing/Rectangle.cs
@@ -54,13 +54,6 @@ namespace System.Drawing
public static readonly Rectangle Empty;
-#if TARGET_JVM
- internal java.awt.Rectangle NativeObject {
- get {
- return new java.awt.Rectangle(X,Y,Width,Height);
- }
- }
-#endif
/// <summary>
/// Ceiling Shared Method
diff --git a/mcs/class/System.Drawing/System.Drawing/RectangleF.cs b/mcs/class/System.Drawing/System.Drawing/RectangleF.cs
index 0c651fe0977..dc2ea17506e 100644
--- a/mcs/class/System.Drawing/System.Drawing/RectangleF.cs
+++ b/mcs/class/System.Drawing/System.Drawing/RectangleF.cs
@@ -47,13 +47,6 @@ namespace System.Drawing
public static readonly RectangleF Empty;
-#if TARGET_JVM
- internal java.awt.geom.Rectangle2D NativeObject {
- get {
- return new java.awt.geom.Rectangle2D.Float(X,Y,Width,Height);
- }
- }
-#endif
/// <summary>
/// FromLTRB Shared Method
@@ -255,14 +248,6 @@ namespace System.Drawing
}
-#if TARGET_JVM
- internal RectangleF (java.awt.geom.RectangularShape r2d) {
- this.x = (float) r2d.getX ();
- this.y = (float) r2d.getY ();
- this.width = (float) r2d.getWidth ();
- this.height = (float) r2d.getHeight ();
- }
-#endif
/// <summary>
/// Bottom Property
diff --git a/mcs/class/System.Drawing/System.Drawing/Region.jvm.cs b/mcs/class/System.Drawing/System.Drawing/Region.jvm.cs
deleted file mode 100644
index 18e1e37829d..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/Region.jvm.cs
+++ /dev/null
@@ -1,389 +0,0 @@
-
-using System;
-using System.Drawing.Drawing2D;
-using System.Runtime.InteropServices;
-
-using awt = java.awt;
-using geom = java.awt.geom;
-
-namespace System.Drawing
-{
- [ComVisible (false)]
- public sealed class Region : BasicShape
- {
- #region Member Vars
- internal static readonly Region InfiniteRegion = new Region(new Rectangle(-0x400000, -0x400000, 0x800000, 0x800000));
- #endregion
-
- #region Internals
- internal geom.Area NativeObject
- {
- get
- {
- return (geom.Area)Shape;
- }
- }
- #endregion
-
- #region Ctors. and Dtor
-
-
- public Region ()
- : this ((geom.Area) InfiniteRegion.NativeObject.clone ())
- {
- }
-
- internal Region(geom.Area native) : base(native)
- {
- }
-
-
- public Region (GraphicsPath path) : this(new geom.Area(path.NativeObject))
- {
- }
-
- public Region (Rectangle rect) : this(new geom.Area(rect.NativeObject))
- {
- }
-
- public Region (RectangleF rect) : this(new geom.Area(rect.NativeObject))
- {
- }
-
- [MonoTODO]
- public Region (RegionData region_data) : this((geom.Area)null)
- {
- throw new NotImplementedException ();
- }
- #endregion
-
- #region Union
- public void Union (GraphicsPath path)
- {
- if (path == null)
- throw new ArgumentNullException("path");
- NativeObject.add(new geom.Area(path.NativeObject));
- }
-
-
- public void Union (Rectangle rect)
- {
- NativeObject.add(new geom.Area(rect.NativeObject));
- }
-
- public void Union (RectangleF rect)
- {
- NativeObject.add(new geom.Area(rect.NativeObject));
- }
-
- public void Union (Region region)
- {
- if (region == null)
- throw new ArgumentNullException("region");
- NativeObject.add(region.NativeObject);
- }
- #endregion
-
- #region Intersect
- //
- public void Intersect (GraphicsPath path)
- {
- if (path == null)
- throw new ArgumentNullException("path");
- NativeObject.intersect(new geom.Area(path.NativeObject));
- }
-
- public void Intersect (Rectangle rect)
- {
- NativeObject.intersect(new geom.Area(rect.NativeObject));
- }
-
- public void Intersect (RectangleF rect)
- {
- NativeObject.intersect(new geom.Area(rect.NativeObject));
- }
-
- public void Intersect (Region region)
- {
- if (region == null)
- throw new ArgumentNullException("region");
- NativeObject.intersect(region.NativeObject);
- }
- #endregion
-
- #region Complement
- //
- public void Complement (GraphicsPath path)
- {
- if (path == null)
- throw new ArgumentNullException("path");
- geom.Area a = new geom.Area(path.NativeObject);
- a.subtract(NativeObject);
- Shape = a;
- }
-
- public void Complement (Rectangle rect)
- {
- geom.Area a = new geom.Area(rect.NativeObject);
- a.subtract(NativeObject);
- Shape = a;
- }
-
- public void Complement (RectangleF rect)
- {
- geom.Area a = new geom.Area(rect.NativeObject);
- a.subtract(NativeObject);
- Shape = a;
- }
-
- public void Complement (Region region)
- {
- if (region == null)
- throw new ArgumentNullException("region");
- geom.Area a = (geom.Area) region.NativeObject.clone ();
- a.subtract(NativeObject);
- Shape = a;
- }
- #endregion
-
- #region Exclude
- //
- public void Exclude (GraphicsPath path)
- {
- if (path == null)
- throw new ArgumentNullException("path");
- NativeObject.subtract(new geom.Area(path.NativeObject));
- }
-
- public void Exclude (Rectangle rect)
- {
- NativeObject.subtract(new geom.Area(rect.NativeObject));
- }
-
- public void Exclude (RectangleF rect)
- {
- NativeObject.subtract(new geom.Area(rect.NativeObject));
- }
-
- public void Exclude (Region region)
- {
- if (region == null)
- throw new ArgumentNullException("region");
- NativeObject.subtract(region.NativeObject);
- }
- #endregion
-
- #region Xor
- //
- public void Xor (GraphicsPath path)
- {
- if (path == null)
- throw new ArgumentNullException("path");
- NativeObject.exclusiveOr(new geom.Area(path.NativeObject));
- }
-
- public void Xor (Rectangle rect)
- {
- NativeObject.exclusiveOr(new geom.Area(rect.NativeObject));
- }
-
- public void Xor (RectangleF rect)
- {
- NativeObject.exclusiveOr(new geom.Area(rect.NativeObject));
- }
-
- public void Xor (Region region)
- {
- if (region == null)
- throw new ArgumentNullException("region");
- NativeObject.exclusiveOr(region.NativeObject);
- }
- #endregion
-
- #region GetBounds
- //
- public RectangleF GetBounds (Graphics graphics)
- {
- if (graphics == null)
- throw new ArgumentNullException("graphics");
- return new RectangleF(NativeObject.getBounds2D());
- }
- #endregion
-
- #region Translate
- //
- public void Translate (int dx, int dy)
- {
- Translate((float)dx, (float)dy);
- }
-
- public void Translate (float dx, float dy)
- {
- if (NativeObject.equals(InfiniteRegion.NativeObject))
- return;
- NativeObject.transform(geom.AffineTransform.getTranslateInstance(
- dx,
- dy));
- }
- #endregion
-
- #region IsVisible [TODO]
- //
- public bool IsVisible (int x, int y, Graphics g)
- {
- return IsVisible((float)x, (float)y, g);
- }
-
- public bool IsVisible (int x, int y, int width, int height)
- {
- return IsVisible((float)x, (float)y, (float)width, (float)height);
- }
-
- public bool IsVisible (int x, int y, int width, int height, Graphics g)
- {
- return IsVisible((float)x, (float)y, (float)width, (float)height, g);
- }
-
- public bool IsVisible (Point point)
- {
- return IsVisible(point.X, point.Y);
- }
-
- public bool IsVisible (PointF point)
- {
- return IsVisible(point.X, point.Y);
- }
-
- public bool IsVisible (Point point, Graphics g)
- {
- return IsVisible(point.X, point.Y, g);
- }
-
- public bool IsVisible (PointF point, Graphics g)
- {
- return IsVisible(point.X, point.Y, g);
- }
-
- public bool IsVisible (Rectangle rect)
- {
- return IsVisible(rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public bool IsVisible (RectangleF rect)
- {
- return IsVisible(rect.X, rect.Y, rect.Width, rect.Height);
- }
-
- public bool IsVisible (Rectangle rect, Graphics g)
- {
- return IsVisible(rect.X, rect.Y, rect.Width, rect.Height, g);
- }
-
- public bool IsVisible (RectangleF rect, Graphics g)
- {
- return IsVisible(rect.X, rect.Y, rect.Width, rect.Height, g);
- }
-
- public bool IsVisible (float x, float y)
- {
- return NativeObject.contains(x,y);
- }
-
- public bool IsVisible (float x, float y, Graphics g)
- {
- if (g == null)
- throw new ArgumentNullException("graphics");
- return NativeObject.contains(x,y);
- }
-
- public bool IsVisible (float x, float y, float width, float height)
- {
- return NativeObject.intersects(x,y,width,height);
- }
-
- public bool IsVisible (float x, float y, float width, float height, Graphics g)
- {
- if (g == null)
- throw new ArgumentNullException("graphics");
- return NativeObject.intersects(x,y,width,height);
- }
- #endregion
-
- #region IsEmpty
- public bool IsEmpty(Graphics g)
- {
- if (g == null)
- throw new ArgumentNullException("graphics");
- return NativeObject.isEmpty();
- }
- #endregion
-
- #region IsInfinite
- public bool IsInfinite(Graphics g)
- {
- if (g == null)
- throw new ArgumentNullException("graphics");
- //probably too naive.
- return NativeObject.equals(InfiniteRegion.NativeObject);
- }
- #endregion
-
- #region MakeEmpty
- public void MakeEmpty()
- {
- NativeObject.reset();
- }
- #endregion
-
- #region MakeInfinite
- public void MakeInfinite()
- {
- Shape = (geom.Area) InfiniteRegion.NativeObject.clone ();
- }
- #endregion
-
- #region Equals
- public bool Equals(Region region, Graphics g)
- {
- if (g == null)
- throw new ArgumentNullException("graphics");
- return NativeObject.equals(region.NativeObject);
- }
- #endregion
-
- [MonoTODO]
- public RegionData GetRegionData()
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IntPtr GetHrgn(Graphics g) {
- throw new NotImplementedException();
- }
-
-
- public RectangleF[] GetRegionScans(Matrix matrix)
- {
- throw new NotImplementedException();
- }
-
- #region Transform
- public void Transform(Matrix matrix)
- {
- if (matrix == null)
- throw new ArgumentNullException("matrix");
- if (NativeObject.equals(InfiniteRegion.NativeObject))
- return;
- NativeObject.transform(matrix.NativeObject);
- }
- #endregion
-
- #region Clone
- public Region Clone()
- {
- return new Region ((geom.Area) NativeObject.clone ());
- }
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs b/mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs
deleted file mode 100644
index 3d9ec7944ff..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/StringFormat.jvm.cs
+++ /dev/null
@@ -1,280 +0,0 @@
-//
-// System.Drawing.StringFormat.cs
-//
-// Authors:
-// Dennis Hayes (dennish@Raytek.com)
-// Miguel de Icaza (miguel@ximian.com)
-// Jordi Mas i Hernandez (jordi@ximian.com)
-//
-// Copyright (C) 2002 Ximian, Inc (http://www.ximian.com)
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-using System.Drawing.Text;
-
-namespace System.Drawing {
- /// <summary>
- /// Summary description for StringFormat.
- /// </summary>
- public sealed class StringFormat : MarshalByRefObject, IDisposable, ICloneable {
-
-
- private CharacterRange [] _charRanges;
- private StringAlignment _alignment;
- private StringAlignment _lineAlignment;
- private HotkeyPrefix _hotkeyPrefix;
- private StringFormatFlags _flags;
- private StringDigitSubstitute _digitSubstituteMethod;
- private int _digitSubstituteLanguage;
- private StringTrimming _trimming;
-
- private float _firstTabOffset;
- private float [] _tabStops;
-
- private bool _genericTypeographic = false;
-
- #region Constructors
-
- public StringFormat() : this(0, 0) {
- }
-
- public StringFormat(StringFormatFlags options) : this(options,0) {
- }
-
- public StringFormat(StringFormatFlags options, int lang) {
- _alignment = StringAlignment.Near;
- _digitSubstituteLanguage = lang;
- _digitSubstituteMethod = StringDigitSubstitute.User;
- _flags = options;
- _hotkeyPrefix = HotkeyPrefix.None;
- _lineAlignment = StringAlignment.Near;
- _trimming = StringTrimming.Character;
- }
-
- public StringFormat (StringFormat source) {
- if (source == null)
- throw new ArgumentNullException("format");
-
- _alignment = source.LineAlignment;
- _digitSubstituteLanguage = source.DigitSubstitutionLanguage;
- _digitSubstituteMethod = source.DigitSubstitutionMethod;
- _flags = source.FormatFlags;
- _hotkeyPrefix = source.HotkeyPrefix;
- _lineAlignment = source.LineAlignment;
- _trimming = source.Trimming;
- }
-
-
- #endregion
-
- #region IDisposable
-
- public void Dispose() {
- }
-
- #endregion
-
- #region Public properties
-
- public StringAlignment Alignment {
- get {
- return _alignment;
- }
-
- set {
- _alignment = value;
- }
- }
-
- public StringAlignment LineAlignment {
- get {
- return _lineAlignment;
- }
- set {
- _lineAlignment = value;
- }
- }
-
- [MonoTODO]
- public StringFormatFlags FormatFlags {
- get {
- return _flags;
- }
-
- set {
- _flags = value;
- }
- }
-
- [MonoTODO]
- public HotkeyPrefix HotkeyPrefix {
- get {
- return _hotkeyPrefix;
- }
-
- set {
- _hotkeyPrefix = value;
- }
- }
-
- [MonoTODO]
- public StringTrimming Trimming {
- get {
- return _trimming;
- }
-
- set {
- _trimming = value;
- }
- }
-
- public int DigitSubstitutionLanguage {
- get {
- return _digitSubstituteLanguage;
- }
- }
-
- public StringDigitSubstitute DigitSubstitutionMethod {
- get {
- return _digitSubstituteMethod;
- }
- }
-
-
- #endregion
-
- #region static properties
-
- public static StringFormat GenericDefault {
- get {
- StringFormat genericDefault = new StringFormat();
- return genericDefault;
- }
- }
-
- public static StringFormat GenericTypographic {
- get {
- StringFormat genericTypographic = new StringFormat(
- StringFormatFlags.FitBlackBox |
- StringFormatFlags.LineLimit |
- StringFormatFlags.NoClip,
- 0 );
- genericTypographic.Trimming = StringTrimming.None;
- genericTypographic._genericTypeographic = true;
- return genericTypographic;
- }
- }
-
- #endregion
-
- #region internal accessors
- internal bool NoWrap {
- get {
- return (FormatFlags & StringFormatFlags.NoWrap) != 0;
- }
- }
-
- internal bool IsVertical {
- get {
- return (FormatFlags & StringFormatFlags.DirectionVertical) != 0;
- }
- }
-
- internal bool MeasureTrailingSpaces {
- get {
- return (FormatFlags & StringFormatFlags.MeasureTrailingSpaces) != 0;
- }
- }
-
- internal bool LineLimit {
- get {
- return (FormatFlags & StringFormatFlags.LineLimit) != 0;
- }
- }
-
- internal bool NoClip {
- get {
- return (FormatFlags & StringFormatFlags.NoClip) != 0;
- }
- }
-
- internal bool IsRightToLeft {
- get {
- return (FormatFlags & StringFormatFlags.DirectionRightToLeft) != 0;
- }
- }
-
- internal CharacterRange [] CharRanges {
- get {
- return _charRanges;
- }
- }
-
- internal bool IsGenericTypographic
- {
- get {
- return _genericTypeographic;
- }
- }
- #endregion
-
- #region public methods
-
- public void SetMeasurableCharacterRanges (CharacterRange [] range) {
- _charRanges = range != null ? (CharacterRange [])range.Clone() : null;
- }
-
- public object Clone() {
- StringFormat copy = (StringFormat)MemberwiseClone();
- if (_charRanges != null)
- copy._charRanges = (CharacterRange [])_charRanges.Clone();
- if (_tabStops != null)
- copy._tabStops = (float[])_tabStops.Clone();
- return copy;
- }
-
- public override string ToString() {
- return "[StringFormat, FormatFlags=" + this.FormatFlags.ToString() + "]";
- }
-
- public void SetTabStops(float firstTabOffset, float[] tabStops) {
-// _firstTabOffset = firstTabOffset;
-// _tabStops = tabStops != null ? (float[])tabStops.Clone() : null;
- throw new NotImplementedException();
- }
-
- public void SetDigitSubstitution(int language, StringDigitSubstitute substitute) {
-// _digitSubstituteMethod = substitute;
-// _digitSubstituteLanguage = language;
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public float[] GetTabStops(out float firstTabOffset) {
- firstTabOffset = _firstTabOffset;
- return _tabStops != null ? (float[])_tabStops.Clone() : null;
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs b/mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs
deleted file mode 100644
index 8878ac73f1b..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/StrokeFactory.jvm.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using awt = java.awt;
-using geom = java.awt.geom;
-
-namespace System.Drawing {
- internal sealed class StrokeFactory {
-
- StrokeFactory() {}
-
- interface StrokeCreator {
- awt.Stroke Create(float width, int cap, int join, float miterlimit,
- float[] dash, float dash_phase, geom.AffineTransform penTransform,
- geom.AffineTransform outputTransform, PenFit penFit);
- }
-
- sealed class AdvancedCreator : StrokeCreator {
- #region StrokeCreator Members
-
- public awt.Stroke Create(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase, geom.AffineTransform penTransform,
- geom.AffineTransform outputTransform, PenFit penFit) {
- if ((penFit == PenFit.NotThin) &&
- (outputTransform == null || outputTransform.isIdentity()) &&
- (penTransform == null || penTransform.isIdentity()))
- return new awt.BasicStroke(width, cap, join, miterlimit, dash, dash_phase);
- return new System.Drawing.AdvancedStroke(width, cap, join, miterlimit, dash, dash_phase, penTransform, outputTransform, penFit);
- }
-
- #endregion
- }
-
- sealed class DefaultCreator : StrokeCreator {
- #region StrokeCreator Members
-
- public awt.Stroke Create(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase, geom.AffineTransform penTransform,
- geom.AffineTransform outputTransform, PenFit penFit) {
- return new awt.BasicStroke(width, cap, join, miterlimit, dash, dash_phase);
- }
-
- #endregion
- }
-
- static readonly StrokeCreator Creator;
- static StrokeFactory() {
- try {
- Type type = typeof(System.Drawing.AdvancedStroke);
- Activator.CreateInstance(type);
- Creator = new AdvancedCreator();
- }
- catch{
- Creator = new DefaultCreator();
- }
- }
-
- static public bool CanCreateAdvancedStroke {
- get {
- return !(Creator is DefaultCreator);
- }
- }
-
- static public awt.Stroke CreateStroke(float width, int cap, int join, float miterlimit,
- float[] dash, float dash_phase, geom.AffineTransform penTransform,
- geom.AffineTransform outputTransform, PenFit penFit) {
-
- return Creator.Create(width, cap, join, miterlimit, dash, dash_phase, penTransform, outputTransform, penFit);
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs b/mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs
deleted file mode 100644
index af1d7b18fb9..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/SystemColors.jvm.cs
+++ /dev/null
@@ -1,278 +0,0 @@
-//
-// System.Drawing.SystemColors.cs
-//
-// Authors:
-// Andrew Skiba (andrews@mainsoft.com)
-// Konstantin Triger (kostat@mainsoft.com)
-//
-// Copyright (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Drawing {
-
- public sealed class SystemColors
- {
- private SystemColors (){}
-
- static Color [] SystemColorsCache {
- get {
- return KnownColors.Values;
- }
- }
-
- static public Color ActiveBorder
- {
- get {
- return SystemColorsCache[(int)KnownColor.ActiveBorder];
- }
- }
-
- static public Color ActiveCaption
- {
- get {
- return SystemColorsCache[(int)KnownColor.ActiveCaption];
- }
- }
-
- static public Color ActiveCaptionText
- {
- get {
- return SystemColorsCache[(int)KnownColor.ActiveCaptionText];
- }
- }
-
- static public Color AppWorkspace
- {
- get {
- return SystemColorsCache[(int)KnownColor.AppWorkspace];
- }
- }
-
- static public Color Control
- {
- get {
- return SystemColorsCache[(int)KnownColor.Control];
- }
- }
-
- static public Color ControlDark
- {
- get {
- return SystemColorsCache[(int)KnownColor.ControlDark];
- }
- }
-
- static public Color ControlDarkDark
- {
- get {
- return SystemColorsCache[(int)KnownColor.ControlDarkDark];
- }
- }
-
- static public Color ControlLight
- {
- get {
- return SystemColorsCache[(int)KnownColor.ControlLight];
- }
- }
-
- static public Color ControlLightLight
- {
- get {
- return SystemColorsCache[(int)KnownColor.ControlLightLight];
- }
- }
-
- static public Color ControlText
- {
- get {
- return SystemColorsCache[(int)KnownColor.ControlText];
- }
- }
-
- static public Color Desktop
- {
- get {
- return SystemColorsCache[(int)KnownColor.Desktop];
- }
- }
-
- static public Color GrayText
- {
- get {
- return SystemColorsCache[(int)KnownColor.GrayText];
- }
- }
-
- static public Color Highlight
- {
- get {
- return SystemColorsCache[(int)KnownColor.Highlight];
- }
- }
-
- static public Color HighlightText
- {
- get {
- return SystemColorsCache[(int)KnownColor.HighlightText];
- }
- }
-
- static public Color HotTrack
- {
- get {
- return SystemColorsCache[(int)KnownColor.HotTrack];
- }
- }
-
- static public Color InactiveBorder
- {
- get {
- return SystemColorsCache[(int)KnownColor.InactiveBorder];
- }
- }
-
- static public Color InactiveCaption
- {
- get {
- return SystemColorsCache[(int)KnownColor.InactiveCaption];
- }
- }
-
- static public Color InactiveCaptionText
- {
- get {
- return SystemColorsCache[(int)KnownColor.InactiveCaptionText];
- }
- }
-
- static public Color Info
- {
- get {
- return SystemColorsCache[(int)KnownColor.Info];
- }
- }
-
- static public Color InfoText
- {
- get {
- return SystemColorsCache[(int)KnownColor.InfoText];
- }
- }
-
- static public Color Menu
- {
- get {
- return SystemColorsCache[(int)KnownColor.Menu];
- }
- }
-
- static public Color MenuText
- {
- get {
- return SystemColorsCache[(int)KnownColor.MenuText];
- }
- }
-
- static public Color ScrollBar
- {
- get {
- return SystemColorsCache[(int)KnownColor.ScrollBar];
- }
- }
-
- static public Color Window
- {
- get {
- return SystemColorsCache[(int)KnownColor.Window];
- }
- }
-
- static public Color WindowFrame
- {
- get {
- return SystemColorsCache[(int)KnownColor.WindowFrame];
- }
- }
-
- static public Color WindowText
- {
- get {
- return SystemColorsCache[(int)KnownColor.WindowText];
- }
- }
-
-#if NET_2_0
-
- static public Color ButtonFace
- {
- get {
- return SystemColorsCache [(int) KnownColor.ButtonFace];
- }
- }
-
- static public Color ButtonHighlight
- {
- get {
- return SystemColorsCache [(int) KnownColor.ButtonHighlight];
- }
- }
-
- static public Color ButtonShadow
- {
- get {
- return SystemColorsCache [(int) KnownColor.ButtonShadow];
- }
- }
-
- static public Color GradientActiveCaption
- {
- get {
- return SystemColorsCache [(int) KnownColor.GradientActiveCaption];
- }
- }
-
- static public Color GradientInactiveCaption
- {
- get {
- return SystemColorsCache [(int) KnownColor.GradientInactiveCaption];
- }
- }
-
- static public Color MenuBar
- {
- get {
- return SystemColorsCache [(int) KnownColor.MenuBar];
- }
- }
-
- static public Color MenuHighlight
- {
- get {
- return SystemColorsCache [(int) KnownColor.MenuHighlight];
- }
- }
-#endif
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs b/mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs
deleted file mode 100644
index e3fdbade025..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/SystemIcons.jvm.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// System.Drawing.systemIcons.cs
-//
-// Authors:
-// Vladimir Krasnov (vladimirk@mainsoft.com)
-// Konstantin Triger (kostat@mainsoft.com)
-//
-// Copyright (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using System.Configuration;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Reflection;
-
-namespace System.Drawing {
- public sealed class SystemIcons {
- static readonly Icon[] systemIcons;
-
- enum IconName {
- Application, Asterisk, Error,
- Exclamation, Hand, Information,
- Question, Warning, WinLogo
- }
-
- static SystemIcons() {
-
- Type nameType = typeof(IconName);
- string [] iconNames = Enum.GetNames(nameType);
- systemIcons = new Icon[iconNames.Length];
- Assembly assembly = Assembly.GetExecutingAssembly();
- for (int i = 0; i < iconNames.Length; i++)
- systemIcons[(int)(IconName)Enum.Parse(nameType, iconNames[i])] =
- new Icon(assembly.GetManifestResourceStream(String.Format("System.Drawing.Assembly.{0}.ico", iconNames[i])));
- }
-
- private SystemIcons() {
- }
-
- public static Icon Application { get { return systemIcons[(int)IconName.Application];} }
- public static Icon Asterisk { get { return systemIcons[(int)IconName.Asterisk];} }
- public static Icon Error { get { return systemIcons[(int)IconName.Error];} }
- public static Icon Exclamation { get { return systemIcons[(int)IconName.Exclamation];} }
- public static Icon Hand { get { return systemIcons[(int)IconName.Hand];} }
- public static Icon Information { get { return systemIcons[(int)IconName.Information];} }
- public static Icon Question { get { return systemIcons[(int)IconName.Question];} }
- public static Icon Warning { get { return systemIcons[(int)IconName.Warning];} }
- public static Icon WinLogo { get { return systemIcons[(int)IconName.WinLogo];} }
- }
-}
diff --git a/mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs b/mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs
deleted file mode 100644
index f940dfb7423..00000000000
--- a/mcs/class/System.Drawing/System.Drawing/TextureBrush.jvm.cs
+++ /dev/null
@@ -1,226 +0,0 @@
-//
-// System.Drawing.TextureBrush.cs
-//
-// Author:
-// Dennis Hayes (dennish@Raytek.com)
-// Ravindra (rkumar@novell.com)
-//
-// (C) 2002 Ximian, Inc
-// (C) 2004 Novell, Inc.
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Drawing.Drawing2D;
-using System.Drawing.Imaging;
-
-using awt = java.awt;
-using geom = java.awt.geom;
-using image = java.awt.image;
-
-namespace System.Drawing {
- /// <summary>
- /// Summary description for TextureBrush.
- /// </summary>
- public sealed class TextureBrush : Brush {
- readonly awt.TexturePaint _nativeObject;
- RectangleF _sourceRectangle;
- Image _texture = null;
- WrapMode _wrapMode;
-
- protected override java.awt.Paint NativeObject {
- get {
- return _nativeObject;
- }
- }
-
- #region ctors
-
- public TextureBrush (Image image) : this (image, WrapMode.Tile) {
- }
-
- public TextureBrush (Image image, WrapMode wrapMode) :
- this( image, wrapMode, new RectangleF(0, 0, image.Width, image.Height )){
- }
-
- public TextureBrush (Image image, Rectangle dstRect) :
- this( image, WrapMode.Tile, dstRect ) {
- }
-
- public TextureBrush (Image image, RectangleF dstRect) :
- this( image, WrapMode.Tile, dstRect ) {
- }
-
- [MonoTODO]
- public TextureBrush (Image image, Rectangle dstRect, ImageAttributes imageAttr) : this( image, dstRect ) {
- // TBD: Implement ImageAttributes
- }
-
- [MonoTODO]
- public TextureBrush (Image image, RectangleF dstRect, ImageAttributes imageAttr) : this( image, dstRect ) {
- // TBD: Implement ImageAttributes
- }
-
- public TextureBrush (Image image, WrapMode wrapMode, Rectangle dstRect) :
- this( image, wrapMode, new RectangleF(dstRect.X, dstRect.Y, dstRect.Width, dstRect.Height )){
- }
-
- [MonoTODO]
- public TextureBrush (Image image, WrapMode wrapMode, RectangleF dstRect) {
- // TBD: check if not metafile
- _sourceRectangle = dstRect;
- _texture = (Image)((Bitmap)image).Clone(dstRect, image.PixelFormat);
- _wrapMode = wrapMode;
-
- if (wrapMode != Drawing2D.WrapMode.Tile)
- image = CreateWrappedImage(_texture, wrapMode);
- else
- image = _texture;
-
- _nativeObject = new awt.TexturePaint((image.BufferedImage)image.NativeObject.CurrentImage.NativeImage,
- new geom.Rectangle2D.Float(0, 0, image.Width, image.Height));
- }
-
- #endregion
-
- #region CreateWrappedImage
-
- private Image CreateWrappedImage(Image image, WrapMode wrapMode) {
- Image b = null;
- Graphics g = null;
-
- switch (wrapMode) {
- case Drawing2D.WrapMode.TileFlipX :
- b = new Bitmap(image.Width * 2, image.Height);
- g = Graphics.FromImage( b );
- g.DrawImage(image, new Matrix());
- g.DrawImage(image, new Matrix(-1, 0, 0, 1, image.Width * 2 - 1, 0));
- break;
- case Drawing2D.WrapMode.TileFlipY :
- b = new Bitmap(image.Width, image.Height * 2);
- g = Graphics.FromImage( b );
- g.DrawImage(image, new Matrix());
- g.DrawImage(image, new Matrix(1, 0, 0, -1, 0, image.Height * 2 - 1));
- break;
- case Drawing2D.WrapMode.TileFlipXY :
- b = new Bitmap(image.Width * 2, image.Height * 2);
- g = Graphics.FromImage( b );
- g.DrawImage(image, new Matrix());
- g.DrawImage(image, new Matrix(-1, 0, 0, 1, image.Width * 2 - 1, 0));
- g.DrawImage(image, new Matrix(1, 0, 0, -1, 0, image.Height * 2 - 1));
- g.DrawImage(image, new Matrix(-1, 0, 0, -1, image.Width * 2 - 1, image.Height * 2 - 1));
- break;
- case Drawing2D.WrapMode.Clamp :
- // TBD: Implement WrapMode.Clamp
- return image;
- default :
- b = image;
- break;
- }
-
- return b;
- }
-
- #endregion
-
- #region properties
-
- public Image Image {
- get {
- return (Image)_texture.Clone();
- }
- }
-
- public Matrix Transform {
- get {
- return BrushTransform;
- }
- set {
- BrushTransform = value;
- }
- }
-
- [MonoTODO]
- public WrapMode WrapMode {
- get {
- return _wrapMode;
- }
- set {
- _wrapMode = value;
- }
- }
-
- #endregion
-
- #region public methods
-
- public override object Clone () {
- TextureBrush copy = (TextureBrush)InternalClone();
-
- if (_texture != null)
- copy._texture = (Image)_texture.Clone();
-
- return copy;
- }
-
- public void MultiplyTransform (Matrix matrix) {
- base.BrushMultiplyTransform( matrix );
- }
-
- public void MultiplyTransform (Matrix matrix, MatrixOrder order) {
- base.BrushMultiplyTransform( matrix, order );
- }
-
- public void ResetTransform () {
- base.BrushResetTransform();
- }
-
- public void RotateTransform (float angle) {
- base.BrushRotateTransform( angle );
- }
-
- public void RotateTransform (float angle, MatrixOrder order) {
- base.BrushRotateTransform( angle, order );
- }
-
- public void ScaleTransform (float sx, float sy) {
- base.BrushScaleTransform( sx, sy );
- }
-
- public void ScaleTransform (float sx, float sy, MatrixOrder order) {
- base.BrushScaleTransform( sx, sy, order );
- }
-
- public void TranslateTransform (float dx, float dy) {
- base.BrushTranslateTransform( dx, dy );
- }
-
- public void TranslateTransform (float dx, float dy, MatrixOrder order) {
- base.BrushTranslateTransform( dx, dy, order );
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs
index 8f9baacf2be..a8612cc29b9 100644
--- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs
+++ b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTest.cs
@@ -13,16 +13,8 @@ using System.Drawing.Imaging;
#if MONOTOUCH
#else
-#if TARGET_JVM
-using awt = java.awt;
-using javax.imageio;
-using java.lang;
-using java.security;
-using java.awt.image;
-#else
using System.Windows.Forms;
#endif
-#endif
using NUnit.Framework;
@@ -115,13 +107,8 @@ namespace DrawingTestHelper
Hashtable _hash;
CachedResults _results;
-#if TARGET_JVM
- public const string FileName = "CachedResults.xml";
- public const string NewFileName = "NewCachedResults.xml";
-#else
public const string FileName = "dotnet.CachedResults.xml";
public const string NewFileName = "dotnet.NewCachedResults.xml";
-#endif
public readonly static XmlSerializer TestSuiteSerializer =
new XmlSerializer(typeof(CachedResults));
@@ -437,11 +424,7 @@ namespace DrawingTestHelper
}
public static DrawingTest Create (int width, int height, string ownerClass) {
DrawingTest test;
-#if TARGET_JVM
- test = new JavaDrawingTest ();
-#else
test = new NetDrawingTest ();
-#endif
test.Init (width, height);
test.OwnerClass = ownerClass;
return test;
@@ -460,144 +443,6 @@ namespace DrawingTestHelper
#endregion
}
-#if TARGET_JVM
- internal class JavaDrawingTest:DrawingTest {
- java.awt.image.BufferedImage _image;
- java.awt.image.BufferedImage Image {
- get {
- if (_image != null)
- return _image;
- Type imageType = typeof (Bitmap);
- PropertyInfo [] props = imageType.GetProperties (
- BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.DeclaredOnly);
-
- PropertyInfo prop = null;
- foreach (PropertyInfo p in props) {
- if (p.Name == "NativeObject")
- if (p.PropertyType == typeof(java.awt.image.BufferedImage))
- prop = p;
- }
-
- MethodInfo method = prop.GetGetMethod (true);
- _image = (java.awt.image.BufferedImage) method.Invoke (_bitmap, new object [0]);
- return _image;
- }
- }
-
- public JavaDrawingTest () {}
-
- protected override double GetExpectedNorm (double myNorm) {
- return ExpectedResults.GetNorm(TestName);
- }
-
- protected override Bitmap GetReferenceImage(string testName) {
- try{
- string dotNetResultsFolder = @"";
- string fileName = dotNetResultsFolder + testName.Replace(":", "_") + ".png";
- return new Bitmap(fileName);
- }
- catch(System.Exception e) {
- throw new System.Exception("Error creating .Net reference image");
- }
- }
-
- private class JavaForm:java.awt.Dialog,IMyForm {
- class EventListener : java.awt.@event.WindowListener {
- #region WindowListener Members
-
- public void windowOpened(java.awt.@event.WindowEvent arg_0) {
- // TODO: Add ttt.windowOpened implementation
- }
-
- public void windowActivated(java.awt.@event.WindowEvent arg_0) {
- // TODO: Add ttt.windowActivated implementation
- }
-
- public void windowClosed(java.awt.@event.WindowEvent arg_0) {
- // TODO: Add ttt.windowClosed implementation
- }
-
- public void windowDeiconified(java.awt.@event.WindowEvent arg_0) {
- // TODO: Add ttt.windowDeiconified implementation
- }
-
- public void windowIconified(java.awt.@event.WindowEvent arg_0) {
- // TODO: Add ttt.windowIconified implementation
- }
-
- public void windowClosing(java.awt.@event.WindowEvent arg_0) {
- // TODO: Add ttt.windowClosing implementation
- java.awt.Window w = arg_0.getWindow();
- java.awt.Window par = w.getOwner ();
- w.dispose();
- par.dispose ();
- }
-
- public void windowDeactivated(java.awt.@event.WindowEvent arg_0) {
- // TODO: Add ttt.windowDeactivated implementation
- }
-
- #endregion
- }
-
- java.awt.Image _image;
- Size _s;
-
- public JavaForm (string title, java.awt.Image anImage, Size s)
- : base(new java.awt.Frame(), title, true) {
- _image = anImage;
- _s = s;
-
- addWindowListener(new EventListener());
- }
- public override void paint (java.awt.Graphics g) {
- base.paint (g);
- awt.Insets insets = this.getInsets ();
- g.drawImage (_image, insets.left, insets.top, null);
- }
- void IMyForm.Show () {
- awt.Insets insets = this.getInsets ();
- base.setSize (_s.Width + insets.left + insets.right,
- _s.Width + insets.top + insets.bottom);
- this.show ();
- //save the image
- //ImageIO.write((java.awt.image.RenderedImage)_image, "png", new java.io.File("test.java.png"));
- }
- }
-
- protected override IMyForm CreateForm(string title) {
- return new JavaForm (title, Image, _bitmap.Size);
- }
-
- protected override string DetermineCallingFunction() {
- System.Exception e = new System.Exception ();
- java.lang.Class c = vmw.common.TypeUtils.ToClass (e);
- java.lang.reflect.Method m = c.getMethod ("getStackTrace",
- new java.lang.Class [0]);
- java.lang.StackTraceElement [] els = (java.lang.StackTraceElement [])
- m.invoke (e, new object [0]);
- java.lang.StackTraceElement el = els [4];
- return el.getClassName () + "." + _ownerClass + "." + el.getMethodName ();
- }
-
- public override string CalculateSHA1() {
- MessageDigest md = MessageDigest.getInstance ("SHA");
- DataBufferInt dbi = (DataBufferInt) Image.getRaster ().getDataBuffer ();
- for (int i=0; i<dbi.getNumBanks (); i++) {
- int [] curBank = dbi.getData (i);
- for (int j=0; j<curBank.Length; j++) {
- int x = curBank[j];
- md.update ((sbyte) (x & 0xFF));
- md.update ((sbyte) ((x>>8) & 0xFF));
- md.update ((sbyte) ((x>>16) & 0xFF));
- md.update ((sbyte) ((x>>24) & 0xFF));
- }
- }
- byte [] resdata = (byte[])vmw.common.TypeUtils.ToByteArray(md.digest());
- return Convert.ToBase64String (resdata);
- }
- }
-#else
internal class NetDrawingTest:DrawingTest {
public NetDrawingTest () {}
@@ -680,6 +525,5 @@ namespace DrawingTestHelper
}
}
-#endif
}
diff --git a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper20.J2EE.csproj b/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper20.J2EE.csproj
deleted file mode 100644
index dc08e5398e0..00000000000
--- a/mcs/class/System.Drawing/Test/DrawingTest/DrawingTestHelper/DrawingTestHelper20.J2EE.csproj
+++ /dev/null
@@ -1,168 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>DrawingTest</RootNamespace>
- <AssemblyName>DrawingTest</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- <jarserver>ip2</jarserver>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- <HintPath>..\..\..\..\lib\J2SE.Helpers.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="rt">
- <HintPath>..\..\..\..\lib\rt.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="DrawingTest.cs" />
- <Compile Include="PDComparer.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\Exocortex.DSP\src\Exocortex.DSP20.v1.J2EE.csproj">
- <Project>{995DE32D-06AB-4926-97FF-565B9205D5F8}</Project>
- <Name>Exocortex.DSP20.v1.J2EE</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-RefInfo-nunit-framework="j2il:" REFS-JarPath-system-drawing="" REFS-JarPath-j2se-helpers="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\J2SE.Helpers.jar" REFS-JarPath-rt="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" REFS-JarPath-system-xml="" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.Data.jar" REFS-JarPath-system="" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\mscorlib.jar" REFS-JarPath-nunit-framework="..\..\..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.jar" REFS-JarPath-nunit-util="..\..\..\..\..\nunit20\util\bin\Debug_Java20\nunit.util.jar" REFS-JarPath-nunit-core="..\..\..\..\..\nunit20\util\bin\Debug_Java20\nunit.core.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP20.v1.J2EE.csproj b/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP20.v1.J2EE.csproj
deleted file mode 100644
index 15a54c476ec..00000000000
--- a/mcs/class/System.Drawing/Test/DrawingTest/Exocortex.DSP/src/Exocortex.DSP20.v1.J2EE.csproj
+++ /dev/null
@@ -1,161 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{995DE32D-06AB-4926-97FF-565B9205D5F8}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Exocortex.DSP</RootNamespace>
- <AssemblyName>Exocortex.DSP.v1</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- <jarserver>ip2</jarserver>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="rt">
- <Private>False</Private>
- </Reference>
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="AssemblyInfo.cs" />
- <Compile Include="Complex.cs" />
- <Compile Include="ComplexArray.cs" />
- <Compile Include="ComplexF.cs" />
- <Compile Include="ComplexMath.cs" />
- <Compile Include="ComplexStats.cs" />
- <Compile Include="Fourier.cs" />
- <Compile Include="FourierDirection.cs" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system-drawing="" REFS-JarPath-j2se-helpers="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\J2SE.Helpers.jar" REFS-JarPath-rt="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" REFS-JarPath-system-xml="" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.Data.jar" REFS-JarPath-system="" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs
index d1796375f2c..98485656057 100644
--- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs
+++ b/mcs/class/System.Drawing/Test/DrawingTest/Test/Graphics.cs
@@ -438,9 +438,6 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
Assert.That(t.Compare(), Is.True);
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")] // defect 6145
-#endif
public void DrawImageWithResolution() {
t.Graphics.DrawImage(bmp2, 0, 0);
t.Show();
@@ -454,9 +451,6 @@ namespace Test.Sys.Drawing.GraphicsFixtures {
Assert.That(t.Compare(), Is.True);
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")] // defect 6145
-#endif
public void DrawImageInContainer2() {
t.Graphics.BeginContainer(new Rectangle(10, 10, 50, 50), new Rectangle(70, 70, 100, 100), GraphicsUnit.Pixel);
t.Graphics.DrawImage(bmp2, 0, 0);
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs
index 1fca5558d21..96e81b672f5 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorCas.cs
@@ -78,7 +78,6 @@ namespace MonoCasTests.System.Drawing.Design {
unit.DefaultValues ();
}
-#if !TARGET_JVM
[Test]
[PermissionSet (SecurityAction.Deny, Unrestricted = true)]
public void UnitTests_PaintValue ()
@@ -87,7 +86,6 @@ namespace MonoCasTests.System.Drawing.Design {
unit.PaintValue_PaintValueEventArgs ();
unit.PaintValue ();
}
-#endif
// we use reflection to call UITypeEditor class as it's protected by a
// LinkDemand (which will be converted into full demand, i.e. a stack
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs
index b1027f46ffc..c48dd5b3f88 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs
@@ -65,7 +65,6 @@ namespace MonoTests.System.Drawing.Design {
#endif
}
-#if !TARGET_JVM
[Test]
public void PaintValue_PaintValueEventArgs_Null ()
{
@@ -83,6 +82,5 @@ namespace MonoTests.System.Drawing.Design {
{
editor.PaintValue (null, graphics, Rectangle.Empty);
}
-#endif
}
}
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs
index 3c8626244ca..ffe43baaf86 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestColorBlend.cs
@@ -97,9 +97,6 @@ namespace MonoTests.System.Drawing.Drawing2D
[Test]
[ExpectedException (typeof (OverflowException))]
-#if TARGET_JVM
- [Category ("NotWorking")] // defect 6364
-#endif
public void ColorBlend_Negative ()
{
ColorBlend cb = new ColorBlend (-1);
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs
index b07e5b9415d..5bbb6216696 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Drawing2D/TestHatchBrush.cs
@@ -28,6 +28,7 @@
using System;
+using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Drawing2D;
@@ -96,9 +97,6 @@ namespace MonoTests.System.Drawing.Drawing2D
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestDrawing ()
{
// create a bitmap with big enough dimensions
@@ -125,6 +123,7 @@ namespace MonoTests.System.Drawing.Drawing2D
// save the drawing
string file = "TestHatchBrush" + getOutSufix() + ".png";
bmp.Save (file, ImageFormat.Png);
+ File.Delete (file);
}
private void Constructors ()
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs
index f792ecced86..47c8947577b 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestBmpCodec.cs
@@ -75,9 +75,6 @@ namespace MonoTests.System.Drawing.Imaging {
/* Checks bitmap features on a know 1bbp bitmap */
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Bitmap1bitFeatures ()
{
string sInFile = getInFile ("bitmaps/almogaver1bit.bmp");
@@ -154,9 +151,6 @@ namespace MonoTests.System.Drawing.Imaging {
/* Checks bitmap features on a know 8bbp bitmap */
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Bitmap8bitFeatures ()
{
string sInFile = getInFile ("bitmaps/almogaver8bits.bmp");
@@ -232,9 +226,6 @@ namespace MonoTests.System.Drawing.Imaging {
/* Checks bitmap features on a know 24-bits bitmap */
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[Test]
public void Bitmap24bitFeatures()
{
@@ -308,7 +299,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
}
-#if !TARGET_JVM
[Test]
public void Bitmap24bitData ()
{
@@ -434,7 +424,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
}
}
-#endif
/* Checks bitmap features on a know 32-bits bitmap (codec)*/
[Test]
@@ -548,36 +537,24 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_24bppRgb ()
{
Save (PixelFormat.Format24bppRgb, PixelFormat.Format24bppRgb, true);
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_32bppRgb ()
{
Save (PixelFormat.Format32bppRgb, PixelFormat.Format32bppRgb, true);
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_32bppArgb ()
{
Save (PixelFormat.Format32bppArgb, PixelFormat.Format32bppRgb, true);
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_32bppPArgb ()
{
Save (PixelFormat.Format32bppPArgb, PixelFormat.Format32bppRgb, true);
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs
index 228594e7269..ecce1ac458b 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestColorMatrix.cs
@@ -160,10 +160,8 @@ namespace MonoTests.System.Drawing.Imaging {
Assert.AreEqual (0, cm.Matrix41, "4,1");
Assert.AreEqual (0, cm.Matrix42, "4,2");
Assert.AreEqual (0, cm.Matrix43, "4,3");
-#if !TARGET_JVM
Assert.AreEqual (100, Marshal.SizeOf (cm), "object");
Assert.AreEqual (100, Marshal.SizeOf (typeof (ColorMatrix)), "type");
-#endif
}
[Test]
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs
index 784e19b0ede..b4724040e1e 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageAttributes.cs
@@ -27,6 +27,7 @@
//
using System;
+using System.IO;
using System.Drawing;
using System.Drawing.Imaging;
using System.Security.Permissions;
@@ -70,9 +71,6 @@ namespace MonoTests.System.Drawing.Imaging {
// Text Color Matrix processing
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void ColorMatrix1 ()
{
Color clr_src, clr_rslt;
@@ -92,9 +90,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void ColorMatrix2 ()
{
Color clr_src, clr_rslt;
@@ -114,6 +109,8 @@ namespace MonoTests.System.Drawing.Imaging {
private void Bug80323 (Color c)
{
+ string fileName = String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X"));
+
// test case from bug #80323
ColorMatrix cm = new ColorMatrix (new float[][] {
new float[] {1, 0, 0, 0, 0}, //R
@@ -138,27 +135,23 @@ namespace MonoTests.System.Drawing.Imaging {
g.DrawImage (bmp, new Rectangle (0, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, null);
g.DrawImage (bmp, new Rectangle (100, 0, 100, 100), 0, 0, 100, 100, GraphicsUnit.Pixel, ia);
}
- b.Save (String.Format ("80323-{0}.png", c.ToArgb ().ToString ("X")));
+ b.Save (fileName);
Assert.AreEqual (Color.FromArgb (255, 255, 155, 155), b.GetPixel (50, 50), "50,50");
Assert.AreEqual (Color.FromArgb (255, 255, 205, 205), b.GetPixel (150, 50), "150,50");
}
}
}
+
+ File.Delete (fileName);
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void ColorMatrix_80323_UsingAlpha ()
{
Bug80323 (Color.FromArgb (100, 255, 0, 0));
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void ColorMatrix_80323_WithoutAlpha ()
{
// this color is identical, once drawn over the bitmap, to Color.FromArgb (100, 255, 0, 0)
@@ -181,9 +174,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_Null ()
{
@@ -206,9 +196,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_Default_Any ()
{
@@ -218,9 +205,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_Default_Count ()
{
@@ -230,9 +214,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays ()
{
@@ -242,9 +223,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays_Any ()
{
@@ -254,9 +232,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays_Bitmap ()
{
@@ -266,9 +241,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays_Brush ()
{
@@ -278,9 +250,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays_Count ()
{
@@ -290,9 +259,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays_Default ()
{
@@ -302,9 +268,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays_Pen ()
{
@@ -314,9 +277,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_AltGrays_Text ()
{
@@ -339,9 +299,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_SkipGrays_Any ()
{
@@ -351,9 +308,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_SkipGrays_Count ()
{
@@ -363,9 +317,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_InvalidFlag ()
{
@@ -375,9 +326,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrix_InvalidType()
{
@@ -387,9 +335,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrices_Null_ColorMatrix ()
{
@@ -409,9 +354,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrices_ColorMatrix_Null_AltGrays ()
{
@@ -432,9 +374,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
public void SetColorMatrices_Gray ()
{
Color c = ProcessColorMatrices (Color.Gray, global_color_matrix, global_gray_matrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
@@ -448,9 +387,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
public void SetColorMatrices_Color ()
{
Color c = ProcessColorMatrices (Color.MidnightBlue, global_color_matrix, global_gray_matrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
@@ -464,9 +400,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrices_InvalidFlags ()
{
@@ -476,9 +409,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void SetColorMatrices_InvalidType ()
{
@@ -519,9 +449,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("ImageAttributes is not supported in GH")]
-#endif
public void ColorMatrixAlpha ()
{
for (int i = 0; i < 256; i++) {
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs
index c5159e65c4d..45397a4b702 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestImageCodecInfo.cs
@@ -122,9 +122,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Decoders ()
{
Assert.AreEqual (8, decoders.Count, "Count");
@@ -148,9 +145,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Encoders ()
{
Assert.AreEqual (5, encoders.Count, "Count");
@@ -171,9 +165,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void BMPCodec()
{
Guid g = new Guid ("557cf400-1a04-11d3-9a73-0000f81ef32e");
@@ -184,9 +175,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void GifCodec()
{
Guid g = new Guid ("557cf402-1a04-11d3-9a73-0000f81ef32e");
@@ -197,9 +185,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void JpegCodec()
{
Guid g = new Guid ("557cf401-1a04-11d3-9a73-0000f81ef32e");
@@ -210,9 +195,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void PngCodec()
{
Guid g = new Guid ("557cf406-1a04-11d3-9a73-0000f81ef32e");
@@ -223,9 +205,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TiffCodec ()
{
Guid g = new Guid ("557cf405-1a04-11d3-9a73-0000f81ef32e");
@@ -236,9 +215,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IconCodec_Encoder ()
{
Guid g = new Guid ("557cf407-1a04-11d3-9a73-0000f81ef32e");
@@ -246,9 +222,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IconCodec_Decoder ()
{
Guid g = new Guid ("557cf407-1a04-11d3-9a73-0000f81ef32e");
@@ -259,9 +232,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void EmfCodec_Encoder ()
{
Guid g = new Guid ("557cf403-1a04-11d3-9a73-0000f81ef32e");
@@ -269,9 +239,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void EmfCodec_Decoder ()
{
Guid g = new Guid ("557cf403-1a04-11d3-9a73-0000f81ef32e");
@@ -283,9 +250,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void WmfCodec_Encoder ()
{
Guid g = new Guid ("557cf404-1a04-11d3-9a73-0000f81ef32e");
@@ -293,9 +257,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void WmfCodec_Decoder ()
{
Guid g = new Guid ("557cf404-1a04-11d3-9a73-0000f81ef32e");
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs
index 5044a1ad3e3..9644d8eedf5 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/TestJpegCodec.cs
@@ -72,9 +72,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Ignore ("#8853")]
-#endif
public void Bitmap8bbpIndexedGreyscaleFeatures ()
{
string sInFile = getInFile ("bitmaps/nature-greyscale.jpg");
@@ -116,9 +113,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Bitmap8bbpIndexedGreyscalePixels ()
{
string sInFile = getInFile ("bitmaps/nature-greyscale.jpg");
@@ -150,7 +144,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
}
-#if !TARGET_JVM
[Test]
public void Bitmap8bbpIndexedGreyscaleData ()
{
@@ -212,13 +205,9 @@ namespace MonoTests.System.Drawing.Imaging {
}
}
}
-#endif
/* Checks bitmap features on a known 24-bits bitmap */
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Bitmap24bitFeatures ()
{
string sInFile = getInFile ("bitmaps/nature24bits.jpg");
@@ -283,7 +272,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
}
-#if !TARGET_JVM
[Test]
public void Bitmap24bitData ()
{
@@ -408,7 +396,6 @@ namespace MonoTests.System.Drawing.Imaging {
}
}
}
-#endif
private void Save (PixelFormat original, PixelFormat expected)
{
@@ -449,36 +436,24 @@ namespace MonoTests.System.Drawing.Imaging {
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_24bppRgb ()
{
Save (PixelFormat.Format24bppRgb, PixelFormat.Format24bppRgb);
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_32bppRgb ()
{
Save (PixelFormat.Format32bppRgb, PixelFormat.Format24bppRgb);
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_32bppArgb ()
{
Save (PixelFormat.Format32bppArgb, PixelFormat.Format24bppRgb);
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Save_32bppPArgb ()
{
Save (PixelFormat.Format32bppPArgb, PixelFormat.Format24bppRgb);
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Test20.J2EE.sln b/mcs/class/System.Drawing/Test/System.Drawing.Test20.J2EE.sln
deleted file mode 100644
index d756e36a0b5..00000000000
--- a/mcs/class/System.Drawing/Test/System.Drawing.Test20.J2EE.sln
+++ /dev/null
@@ -1,45 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exocortex.DSP20.v1.J2EE", "DrawingTest\Exocortex.DSP\src\Exocortex.DSP20.v1.J2EE.csproj", "{995DE32D-06AB-4926-97FF-565B9205D5F8}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingTestHelper20.J2EE", "DrawingTest\DrawingTestHelper\DrawingTestHelper20.J2EE.csproj", "{C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test20.J2EE", "Test20.J2EE.csproj", "{FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {995DE32D-06AB-4926-97FF-565B9205D5F8}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Test20.sln b/mcs/class/System.Drawing/Test/System.Drawing.Test20.sln
deleted file mode 100644
index 56541f75934..00000000000
--- a/mcs/class/System.Drawing/Test/System.Drawing.Test20.sln
+++ /dev/null
@@ -1,32 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test20", "Test20.csproj", "{0E95EEE1-AE3C-41E9-8A9C-0F0A05A594BE}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DrawingTestHelper20", "DrawingTest\DrawingTestHelper\DrawingTestHelper20.csproj", "{0E97F734-51B9-497B-9259-B6999FD87BDF}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exocortex.DSP20.v1", "DrawingTest\Exocortex.DSP\src\Exocortex.DSP20.v1.csproj", "{A9553E24-D07E-44FE-92FB-8C1D3D3C744E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {0E95EEE1-AE3C-41E9-8A9C-0F0A05A594BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0E95EEE1-AE3C-41E9-8A9C-0F0A05A594BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0E95EEE1-AE3C-41E9-8A9C-0F0A05A594BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0E95EEE1-AE3C-41E9-8A9C-0F0A05A594BE}.Release|Any CPU.Build.0 = Release|Any CPU
- {0E97F734-51B9-497B-9259-B6999FD87BDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0E97F734-51B9-497B-9259-B6999FD87BDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0E97F734-51B9-497B-9259-B6999FD87BDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0E97F734-51B9-497B-9259-B6999FD87BDF}.Release|Any CPU.Build.0 = Release|Any CPU
- {A9553E24-D07E-44FE-92FB-8C1D3D3C744E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {A9553E24-D07E-44FE-92FB-8C1D3D3C744E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {A9553E24-D07E-44FE-92FB-8C1D3D3C744E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {A9553E24-D07E-44FE-92FB-8C1D3D3C744E}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs
index 308f3ab47d9..ff6d12c0ada 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs
@@ -59,9 +59,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void CanConvertFrom () {
Assert.IsTrue (colconv.CanConvertFrom (typeof (String)), "CCF#1");
Assert.IsTrue (colconv.CanConvertFrom (null, typeof (String)), "CCF#1a");
@@ -92,9 +89,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFrom ()
{
Color color = (Color) colconv.ConvertFrom (null, CultureInfo.InvariantCulture,
@@ -196,9 +190,6 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (Exception))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFrom_x4 ()
{
colconv.ConvertFrom (null, CultureInfo.InvariantCulture,
@@ -367,9 +358,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromInvariantString_InvalidNumber ()
{
try {
@@ -399,9 +387,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_InvalidNumber ()
{
try {
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs b/mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs
index eb1de4a8dba..ffd4e836938 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/ColorTranslator.cs
@@ -83,9 +83,6 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (Exception))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void FromHtml_PoundNegative ()
{
ColorTranslator.FromHtml ("#-1");
@@ -100,9 +97,6 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (Exception))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void FromHtml_Unknown ()
{
ColorTranslator.FromHtml ("unknown-color-test");
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs
index 435377815f4..d2114123308 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs
@@ -47,9 +47,6 @@ namespace MonoTests.System.Drawing {
[TestFixture]
[SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public class TestBitmap {
[Test]
@@ -239,26 +236,17 @@ namespace MonoTests.System.Drawing {
#if NET_2_0
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("Bitmap.LockBits is not implemented")]
-#endif
public void LockBits_BitmapData_Null ()
{
-#if !TARGET_JVM
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format32bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
bmp.LockBits (rect, ImageLockMode.ReadWrite, PixelFormat.Format24bppRgb, null);
}
-#endif
}
[Test]
-#if TARGET_JVM
- [Ignore ("Bitmap.LockBits is not implemented")]
-#endif
public void LockBits_32_32_BitmapData ()
{
-#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format32bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
@@ -269,16 +257,11 @@ namespace MonoTests.System.Drawing {
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
-#endif
}
[Test]
-#if TARGET_JVM
- [Ignore ("Bitmap.LockBits is not implemented")]
-#endif
public void LockBits_32_24_BitmapData ()
{
-#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format32bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
@@ -289,16 +272,11 @@ namespace MonoTests.System.Drawing {
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
-#endif
}
[Test]
-#if TARGET_JVM
- [Ignore ("Bitmap.LockBits is not implemented")]
-#endif
public void LockBits_24_24_BitmapData ()
{
-#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format24bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
@@ -309,16 +287,11 @@ namespace MonoTests.System.Drawing {
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
-#endif
}
[Test]
-#if TARGET_JVM
- [Ignore ("Bitmap.LockBits is not implemented")]
-#endif
public void LockBits_24_32_BitmapData ()
{
-#if !TARGET_JVM
BitmapData data = new BitmapData ();
using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format24bppRgb)) {
Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height);
@@ -329,7 +302,6 @@ namespace MonoTests.System.Drawing {
Assert.AreEqual (100, data.Width, "Width");
bmp.UnlockBits (data);
}
-#endif
}
#endif
@@ -634,9 +606,6 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void FileDoesNotExists ()
{
Bitmap bmp = new Bitmap ("FileDoesNotExists.jpg");
@@ -675,7 +644,6 @@ namespace MonoTests.System.Drawing {
hash = new MD5CryptoServiceProvider().ComputeHash (pixels);
return ByteArrayToString (hash);
}
-#if !TARGET_JVM
public string RotateIndexedBmp (Bitmap src, RotateFlipType type)
{
int pixels_per_byte;
@@ -726,7 +694,6 @@ namespace MonoTests.System.Drawing {
byte[] hash = new MD5CryptoServiceProvider().ComputeHash (pixel_data);
return ByteArrayToString (hash);
}
-#endif
/*
@@ -749,7 +716,6 @@ namespace MonoTests.System.Drawing {
}
-#if !TARGET_JVM
/*
Rotate 1- and 4-bit bitmaps in different ways and check the
resulting pixels using MD5
@@ -1095,7 +1061,6 @@ namespace MonoTests.System.Drawing {
}
}
}
-#endif
[Test]
public void DefaultFormat1 ()
{
@@ -1712,11 +1677,7 @@ namespace MonoTests.System.Drawing {
}
[TestFixture]
-#if TARGET_JVM
- [Ignore ("Unsafe code is not supported")]
-#endif
public class BitmapFullTrustTest {
-#if !TARGET_JVM
[Test]
public void BitmapIntIntIntPixelFormatIntPtrCtor ()
{
@@ -1877,7 +1838,6 @@ namespace MonoTests.System.Drawing {
Assert.IsTrue (image2.RawFormat.Equals (ImageFormat.MemoryBmp), "2.RawFormat");
}
}
-#endif
}
}
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs
index fd4ddc9d21f..6b922e2a719 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestBrushes.cs
@@ -49,9 +49,6 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("Throws ArgumentException - Implementation specific")]
-#endif
public void Dispose ()
{
Brushes.YellowGreen.Dispose ();
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs
index 25ae527e75f..a5d2eb58db9 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs
@@ -1181,9 +1181,6 @@ namespace MonoTests.System.Drawing {
0x01, 0x00, 0x0B };
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Deserialize ()
{
BinaryFormatter bf = new BinaryFormatter ();
@@ -1201,9 +1198,6 @@ namespace MonoTests.System.Drawing {
67,111,108,111,114,5,115,116,97,116,101,1,0,0,0,9,7,7,2,0,0,0,10,0,0,0,0,0,0,0,0,37,0,1,0,11 };
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Deserialize2 ()
{
BinaryFormatter bf = new BinaryFormatter ();
@@ -1229,9 +1223,6 @@ namespace MonoTests.System.Drawing {
67,111,108,111,114,5,115,116,97,116,101,1,0,0,0,9,7,7,2,0,0,0,10,255,0,0,255,0,0,0,0,0,0,2,0,11};
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Deserialize3 ()
{
BinaryFormatter bf = new BinaryFormatter ();
@@ -1285,7 +1276,6 @@ namespace MonoTests.System.Drawing {
}
}
-#if !TARGET_JVM
private void Compare (KnownColor kc, GetSysColorIndex index)
{
// we get BGR than needs to be converted into ARGB
@@ -1335,7 +1325,6 @@ namespace MonoTests.System.Drawing {
Compare (KnownColor.MenuHighlight, GetSysColorIndex.COLOR_MENUHIGHLIGHT);
#endif
}
-#endif // TARGET_JVM
}
}
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
index 05038a11360..f01160f3b76 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs
@@ -118,7 +118,6 @@ namespace MonoTests.System.Drawing{
public string lfFaceName;
}
-#if !TARGET_JVM
[Test]
[Category ("CAS")]
[ExpectedException (typeof (SecurityException))]
@@ -199,14 +198,10 @@ namespace MonoTests.System.Drawing{
Font f = new Font ("Arial", 10);
f.ToLogFont (null);
}
-#endif
[Test]
#if ONLY_1_1
[ExpectedException (typeof (ArgumentNullException))]
#endif
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_StringNull_Float ()
{
string family = null;
@@ -219,9 +214,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_String_Float ()
{
Font f = new Font (name, 12.5f);
@@ -240,9 +232,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_String_Float_FontStyle ()
{
Font f = new Font (name, 12.5f, FontStyle.Bold);
@@ -261,9 +250,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_String_Float_FontStyle_GraphicsUnit ()
{
Font f = new Font (name, 12.5f, FontStyle.Italic, GraphicsUnit.Pixel);
@@ -282,18 +268,12 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_String_Float_FontStyle_GraphicsUnit_Display ()
{
new Font (name, 12.5f, FontStyle.Italic, GraphicsUnit.Display);
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_String_Float_FontStyle_GraphicsUnit_Byte ()
{
Font f = new Font (name, 12.5f, FontStyle.Strikeout, GraphicsUnit.Inch, Byte.MaxValue);
@@ -312,9 +292,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_String_Float_FontStyle_GraphicsUnit_Byte_Bool ()
{
Font f = new Font (name, 12.5f, FontStyle.Underline, GraphicsUnit.Document, Byte.MinValue, true);
@@ -349,9 +326,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_FontFamily_Float ()
{
Font f = new Font (FontFamily.GenericMonospace, 12.5f);
@@ -370,9 +344,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_FontFamily_Float_FontStyle ()
{
Font f = new Font (FontFamily.GenericMonospace, 12.5f, FontStyle.Bold);
@@ -391,9 +362,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_FontFamily_Float_FontStyle_GraphicsUnit ()
{
Font f = new Font (FontFamily.GenericMonospace, 12.5f, FontStyle.Italic, GraphicsUnit.Millimeter);
@@ -413,18 +381,12 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_FontFamily_Float_FontStyle_GraphicsUnit_Display ()
{
new Font (FontFamily.GenericMonospace, 12.5f, FontStyle.Italic, GraphicsUnit.Display);
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_FontFamily_Float_FontStyle_GraphicsUnit_Byte ()
{
Font f = new Font (FontFamily.GenericMonospace, 12.5f, FontStyle.Strikeout, GraphicsUnit.Inch, Byte.MaxValue);
@@ -443,9 +405,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Font_FontFamily_Float_FontStyle_GraphicsUnit_Byte_Bool ()
{
Font f = new Font (FontFamily.GenericMonospace, 12.5f, FontStyle.Underline, GraphicsUnit.Document, Byte.MinValue, true);
@@ -484,9 +443,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Dispose_Height ()
{
Font f = new Font (name, 12.5f);
@@ -496,26 +452,17 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Dispose_ToLogFont ()
{
-#if !TARGET_JVM
Font f = new Font (name, 12.5f);
f.Dispose ();
LOGFONT lf = new LOGFONT();
f.ToLogFont (lf);
-#endif
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Dispose_ToLogFont_LoopCharSet ()
{
-#if !TARGET_JVM
Font f = new Font (name, 12.5f);
f.Dispose ();
LOGFONT lf = new LOGFONT ();
@@ -560,21 +507,15 @@ namespace MonoTests.System.Drawing{
Assert.Fail ("Unexcepted exception {0} at iteration {1}", e, i);
}
}
-#endif
}
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Dispose_ToHFont ()
{
-#if !TARGET_JVM
Font f = new Font (name, 12.5f);
f.Dispose ();
f.ToHfont ();
-#endif
}
[Test]
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs
index 36568741c3f..203dfe34794 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs
@@ -94,18 +94,12 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("Check parameters")]
-#endif
public void Constructor_IconNull_Int_Int ()
{
new Icon ((Icon)null, 32, 32);
}
[Test]
-#if TARGET_JVM
- [Ignore ("Constructor_Icon_IntNegative_Int Not Working")]
-#endif
public void Constructor_Icon_IntNegative_Int ()
{
Icon neg = new Icon (icon, -32, 32);
@@ -115,18 +109,12 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("Check parameters")]
-#endif
public void Constructor_IconNull_Size ()
{
new Icon ((Icon) null, new Size (32, 32));
}
[Test]
-#if TARGET_JVM
- [Ignore ("Constructor_Icon_Size_Negative Not Working")]
-#endif
public void Constructor_Icon_Size_Negative ()
{
Icon neg = new Icon (icon, new Size (-32, -32));
@@ -135,9 +123,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [Ignore ("Constructor_Icon_Int_Int_NonSquare Not Working")]
-#endif
public void Constructor_Icon_Int_Int_NonSquare ()
{
Icon non_square = new Icon (icon, 32, 16);
@@ -217,9 +202,6 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("Check parameters")]
-#endif
public void Constructor_Type_StringNull ()
{
new Icon (typeof (Icon), null);
@@ -227,38 +209,23 @@ namespace MonoTests.System.Drawing {
#if NET_2_0
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("Constructor_StreamNull_Size Not Implemented")]
-#endif
public void Constructor_StreamNull_Size ()
{
-#if !TARGET_JVM
new Icon ((Stream) null, new Size (32, 32));
-#endif
}
[Test]
[ExpectedException (typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Ignore ("Constructor_StringNull_Size Not Implemented")]
-#endif
public void Constructor_StringNull_Size ()
{
-#if !TARGET_JVM
new Icon ((string) null, new Size (32, 32));
-#endif
}
[Test]
[ExpectedException (typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Ignore ("Constructor_StringNull_Int_Int Not Implemented")]
-#endif
public void Constructor_StringNull_Int_Int ()
{
-#if !TARGET_JVM
new Icon ((string) null, 32, 32);
-#endif
}
#endif
@@ -281,7 +248,6 @@ namespace MonoTests.System.Drawing {
Assert.AreEqual (32, clone.Size.Height, "Size.Height");
}
-#if !TARGET_JVM
[Test]
public void CloneHandleIcon ()
{
@@ -291,7 +257,6 @@ namespace MonoTests.System.Drawing {
Assert.AreEqual (SystemIcons.Hand.Size.Width, clone.Size.Width, "Size.Width");
Assert.AreEqual (SystemIcons.Hand.Size.Height, clone.Size.Height, "Size.Height");
}
-#endif
private void XPIcon (int size)
{
@@ -331,9 +296,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [Ignore ("SelectFromUnusualSize_Small16 Not Working")]
-#endif
public void SelectFromUnusualSize_Small16 ()
{
using (FileStream fs = File.OpenRead (TestBitmap.getInFile ("bitmaps/80509.ico"))) {
@@ -421,18 +383,12 @@ namespace MonoTests.System.Drawing {
[Test]
[ExpectedException (typeof (NullReferenceException))]
-#if TARGET_JVM
- [Ignore ("Throws NullReference, do we need to follow?")]
-#endif
public void Save_Null ()
{
icon.Save (null);
}
[Test]
-#if TARGET_JVM
- [Ignore ("Icon16ToBitmap Not Working")]
-#endif
public void Icon16ToBitmap ()
{
using (Bitmap b = icon16.ToBitmap ()) {
@@ -447,9 +403,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [Ignore ("Icon32ToBitmap Not Working")]
-#endif
public void Icon32ToBitmap ()
{
using (Bitmap b = icon32.ToBitmap ()) {
@@ -464,9 +417,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [Ignore ("Icon48ToBitmap Not Working")]
-#endif
public void Icon48ToBitmap ()
{
using (Bitmap b = icon48.ToBitmap ()) {
@@ -481,9 +431,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [Ignore ("Icon64ToBitmap Not Working")]
-#endif
public void Icon64ToBitmap ()
{
using (Bitmap b = icon64.ToBitmap ()) {
@@ -498,9 +445,6 @@ namespace MonoTests.System.Drawing {
}
[Test]
-#if TARGET_JVM
- [Ignore ("Icon96ToBitmap Not Working")]
-#endif
public void Icon96ToBitmap ()
{
using (Bitmap b = icon96.ToBitmap ()) {
@@ -515,9 +459,6 @@ namespace MonoTests.System.Drawing {
}
[Test] // bug #415581
-#if TARGET_JVM
- [Ignore ("Icon256ToBitmap Not Working")]
-#endif
public void Icon256ToBitmap ()
{
using (FileStream fs = File.OpenRead (TestBitmap.getInFile ("bitmaps/415581.ico"))) {
@@ -572,38 +513,23 @@ namespace MonoTests.System.Drawing {
#if NET_2_0
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("ExtractAssociatedIcon is not implemented")]
-#endif
public void ExtractAssociatedIcon_Null ()
{
-#if !TARGET_JVM
Icon.ExtractAssociatedIcon (null);
-#endif
}
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [Ignore ("ExtractAssociatedIcon is not implemented")]
-#endif
public void ExtractAssociatedIcon_Empty ()
{
-#if !TARGET_JVM
Icon.ExtractAssociatedIcon (String.Empty);
-#endif
}
[Test]
[ExpectedException (typeof (FileNotFoundException))]
-#if TARGET_JVM
- [Ignore ("ExtractAssociatedIcon is not implemented")]
-#endif
public void ExtractAssociatedIcon_DoesNotExists ()
{
-#if !TARGET_JVM
Icon.ExtractAssociatedIcon ("does-not-exists.png");
-#endif
}
#endif
@@ -617,11 +543,7 @@ namespace MonoTests.System.Drawing {
}
[TestFixture]
-#if TARGET_JVM
- [Ignore ("Unsafe code is not supported")]
-#endif
public class IconFullTrustTest {
-#if !TARGET_JVM
#if NET_2_0
[Test]
public void ExtractAssociatedIcon ()
@@ -721,6 +643,5 @@ namespace MonoTests.System.Drawing {
IconTest.SaveAndCompare ("HICON", icon3, false);
}
}
-#endif
}
}
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs
index 76e5098cf1b..6fcfadabe48 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestIconConverter.cs
@@ -81,9 +81,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertFrom ()
{
Assert.IsTrue (icoConv.CanConvertFrom (typeof (byte [])), "CCF#1");
@@ -115,9 +112,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertTo ()
{
Assert.IsTrue (icoConv.CanConvertTo (typeof (String)), "CCT#1");
@@ -151,9 +145,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestConvertFrom ()
{
Icon newIcon = (Icon) icoConv.ConvertFrom (null, CultureInfo.InvariantCulture, iconBytes);
@@ -264,9 +255,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestConvertTo ()
{
Assert.AreEqual (iconStr, (String) icoConv.ConvertTo (null,
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs
index 94a71a8cbbb..4176be6e714 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs
@@ -77,9 +77,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertFrom ()
{
Assert.IsTrue (imgConv.CanConvertFrom (typeof (byte [])), "CCF#1");
@@ -111,9 +108,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertTo ()
{
Assert.IsTrue (imgConv.CanConvertTo (typeof (String)), "CCT#1");
@@ -147,9 +141,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFrom ()
{
Image newImage = (Image) imgConv.ConvertFrom (null, CultureInfo.InvariantCulture, imageBytes);
@@ -166,9 +157,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertFrom_BadString ()
{
@@ -176,9 +164,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertFrom_BadString_WithCulture ()
{
@@ -186,9 +171,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertFrom_Bitmap ()
{
@@ -196,9 +178,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertFrom_Point ()
{
@@ -206,9 +185,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertFrom_SizeF ()
{
@@ -216,9 +192,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertFrom_Object ()
{
@@ -226,9 +199,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertFrom_BadString ()
{
@@ -236,9 +206,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertFrom_BadString_Culture ()
{
@@ -246,9 +213,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertFrom_Bitmap ()
{
@@ -256,9 +220,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertFrom_Point ()
{
@@ -266,9 +227,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertFrom_SizeF ()
{
@@ -276,9 +234,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertFrom_Object ()
{
@@ -286,9 +241,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertTo ()
{
Assert.AreEqual (imageStr, (String) imgConv.ConvertTo (null, CultureInfo.InvariantCulture,
@@ -326,9 +278,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Rectangle ()
{
@@ -336,9 +285,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Image ()
{
@@ -346,9 +292,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Size ()
{
@@ -356,9 +299,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Bitmap ()
{
@@ -366,9 +306,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Point ()
{
@@ -376,9 +313,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Metafile ()
{
@@ -386,9 +320,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Object ()
{
@@ -396,9 +327,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void ConvertTo_Int ()
{
@@ -406,9 +334,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Rectangle ()
{
@@ -416,9 +341,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Image ()
{
@@ -426,9 +348,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Size ()
{
@@ -436,9 +355,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Bitmap ()
{
@@ -446,9 +362,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Point ()
{
@@ -456,9 +369,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Metafile ()
{
@@ -466,9 +376,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Object ()
{
@@ -476,9 +383,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
[ExpectedException (typeof (NotSupportedException))]
public void TypeDescriptor_ConvertTo_Int ()
{
@@ -486,9 +390,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestGetPropertiesSupported ()
{
Assert.IsTrue (imgConv.GetPropertiesSupported (), "GPS#1");
@@ -496,9 +397,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestGetProperties ()
{
#if NET_2_0
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs
index f4e3cdd3019..b96d2065395 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs
@@ -63,9 +63,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertFrom ()
{
Assert.IsTrue (ptconv.CanConvertFrom (typeof (String)), "CCF#1");
@@ -97,9 +94,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestConvertFrom ()
{
Assert.AreEqual (pt, (Point) ptconv.ConvertFrom (null, CultureInfo.InvariantCulture,
@@ -280,9 +274,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestGetProperties ()
{
Attribute [] attrs;
@@ -325,9 +316,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromInvariantString_string_exc_2 ()
{
try {
@@ -341,9 +329,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string ()
{
// save current culture
@@ -367,9 +352,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string_exc_2 ()
{
try {
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs
index 9a917633978..9f48a9e623a 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs
@@ -69,9 +69,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertFrom ()
{
Assert.IsTrue (rconv.CanConvertFrom (typeof (String)), "CCF#1");
@@ -103,9 +100,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestConvertFrom ()
{
Assert.AreEqual (rect, (Rectangle) rconv.ConvertFrom (null, CultureInfo.InvariantCulture,
@@ -334,9 +328,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestGetProperties ()
{
Attribute [] attrs;
@@ -394,9 +385,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromInvariantString_string_exc_2 ()
{
try {
@@ -410,9 +398,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string ()
{
// save current culture
@@ -438,9 +423,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string_exc_2 ()
{
try {
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs
index 7a12e92b94c..29bb158d5f4 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs
@@ -85,9 +85,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestCloneAndEquals()
{
Bitmap bmp = new Bitmap (600, 800);
@@ -122,9 +119,6 @@ namespace MonoTests.System.Drawing
/*Tests infinite, empty, etc*/
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestInfiniteAndEmpty()
{
Bitmap bmp = new Bitmap (600, 800);
@@ -160,9 +154,6 @@ namespace MonoTests.System.Drawing
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestUnionGroup1 ()
{
Bitmap bmp = new Bitmap (600, 800);
@@ -316,9 +307,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestUnionGroup2 ()
{
RectangleF[] rects;
@@ -466,9 +454,6 @@ namespace MonoTests.System.Drawing
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestComplementGroup1 ()
{
RectangleF[] rects;
@@ -573,9 +558,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestComplementGroup2 ()
{
@@ -614,9 +596,6 @@ namespace MonoTests.System.Drawing
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestExcludeGroup1 ()
{
RectangleF[] rects;
@@ -880,9 +859,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestExcludeGroup2 ()
{
Bitmap bmp = new Bitmap (600, 800);
@@ -912,9 +888,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void ExcludeBug402613 ()
{
Region r = new Region();
@@ -925,9 +898,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestIntersect()
{
@@ -972,9 +942,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestXor()
{
Bitmap bmp = new Bitmap (600, 800);
@@ -1064,9 +1031,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void TestTranslate()
{
Region rgn1 = new Region (new RectangleF (10, 10, 120,120));
@@ -1085,9 +1049,6 @@ namespace MonoTests.System.Drawing
[Test]
[ExpectedException (typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Constructor_GraphicsPath_Null ()
{
GraphicsPath gp = null;
@@ -1096,9 +1057,6 @@ namespace MonoTests.System.Drawing
[Test]
[ExpectedException (typeof (ArgumentNullException))]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Constructor_RegionData_Null ()
{
RegionData rd = null;
@@ -1204,27 +1162,18 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_IntIntNull ()
{
Assert.IsTrue (new Region ().IsVisible (0, 0, null));
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_IntIntIntIntNull ()
{
Assert.IsFalse (new Region ().IsVisible (0, 0, 0, 0, null));
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_PointNull ()
{
Point p = new Point ();
@@ -1232,9 +1181,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_PointFNull ()
{
PointF p = new PointF ();
@@ -1242,9 +1188,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_RectangleNull ()
{
Rectangle r = new Rectangle ();
@@ -1252,9 +1195,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_RectangleFNull ()
{
RectangleF r = new RectangleF ();
@@ -1262,18 +1202,12 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_SingleSingleNull ()
{
Assert.IsTrue (new Region ().IsVisible (0f, 0f, null));
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void IsVisible_SingleSingleSingleSingleNull ()
{
Assert.IsFalse (new Region ().IsVisible (0f, 0f, 0f, 0f, null));
@@ -1294,9 +1228,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
[ExpectedException (typeof (ArgumentNullException))]
public void Equals_NullGraphics ()
{
@@ -1319,9 +1250,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
[ExpectedException (typeof (ArgumentNullException))]
public void GetRegionScans_Null ()
{
@@ -1349,9 +1277,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Region_Empty ()
{
Region region = new Region ();
@@ -1388,9 +1313,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void Rectangle_GetRegionScans ()
{
Matrix matrix = new Matrix ();
@@ -1579,12 +1501,8 @@ namespace MonoTests.System.Drawing
}
[TestFixture]
-#if TARGET_JVM
- [Ignore ("Unsafe code is not supported")]
-#endif
// the test cases in this fixture aren't restricted wrt running unmanaged code
public class RegionTestUnmanaged {
-#if !TARGET_JVM
private Bitmap bitmap;
private Graphics graphic;
@@ -1688,6 +1606,5 @@ namespace MonoTests.System.Drawing
r.ReleaseHrgn (ptr);
}
#endif
-#endif
}
}
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs
index 56ccc9cb95b..7b0f751b612 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs
@@ -64,9 +64,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertFrom ()
{
Assert.IsTrue (szconv.CanConvertFrom (typeof (String)), "CCF#1");
@@ -98,9 +95,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestConvertFrom ()
{
Assert.AreEqual (sz, (Size) szconv.ConvertFrom (null, CultureInfo.InvariantCulture,
@@ -283,9 +277,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestGetProperties ()
{
Attribute [] attrs;
@@ -330,9 +321,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromInvariantString_string_exc_2 ()
{
try {
@@ -346,9 +334,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string ()
{
// save current culture
@@ -374,9 +359,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string_exc_2 ()
{
try {
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs
index edb0f74ccd0..63c1a1410b9 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs
@@ -66,9 +66,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestCanConvertFrom ()
{
Assert.IsTrue (szconv.CanConvertFrom (typeof (String)), "CCF#1");
@@ -100,9 +97,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestConvertFrom ()
{
Assert.AreEqual (sz, (SizeF) szconv.ConvertFrom (null, CultureInfo.InvariantCulture,
@@ -284,9 +278,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TestGetProperties ()
{
Attribute [] attrs;
@@ -331,9 +322,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromInvariantString_string_exc_2 ()
{
try {
@@ -347,9 +335,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string ()
{
// save current culture
@@ -375,9 +360,6 @@ namespace MonoTests.System.Drawing
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ConvertFromString_string_exc_2 ()
{
try {
diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs
index 31aaf102111..e8b68c56f4d 100644
--- a/mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs
+++ b/mcs/class/System.Drawing/Test/System.Drawing/TestStringFormat.cs
@@ -67,9 +67,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void Default_Dispose ()
{
StringFormat sf = new StringFormat ();
@@ -93,9 +90,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ctor_StringFormatFlags ()
{
using (StringFormat sf = new StringFormat ((StringFormatFlags)Int32.MinValue)) {
@@ -104,9 +98,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void ctor_StringFormatFlags_Int32 ()
{
using (StringFormat sf = new StringFormat ((StringFormatFlags) Int32.MinValue, Int32.MinValue)) {
@@ -130,9 +121,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void GenericDefault_Local_Dispose ()
{
StringFormat sf = StringFormat.GenericDefault;
@@ -168,9 +156,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (ArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void GenericTypographic_Local_Dispose ()
{
StringFormat sf = StringFormat.GenericTypographic;
@@ -191,9 +176,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (InvalidEnumArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void Alignment_Invalid ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -214,9 +196,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (InvalidEnumArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void HotkeyPrefix_Invalid ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -237,9 +216,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (InvalidEnumArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void LineAlignment_Invalid ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -260,9 +236,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (InvalidEnumArgumentException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void Trimming_Invalid ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -281,9 +254,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void Clone_Complex ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -321,9 +291,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void TabsStops()
{
using (StringFormat smf = new StringFormat ()) {
@@ -345,9 +312,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (NullReferenceException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void SetTabStops_Null ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -356,9 +320,6 @@ namespace MonoTests.System.Drawing{
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void SetDigitSubstitution ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -370,9 +331,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (NullReferenceException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void SetMeasurableCharacterRanges_Null ()
{
using (StringFormat sf = new StringFormat ()) {
@@ -400,9 +358,6 @@ namespace MonoTests.System.Drawing{
[Test]
[ExpectedException (typeof (OverflowException))]
-#if TARGET_JVM
- [NUnit.Framework.Category ("NotWorking")]
-#endif
public void SetMeasurableCharacterRanges_TooBig ()
{
using (StringFormat sf = new StringFormat ()) {
diff --git a/mcs/class/System.Drawing/Test/Test.dotnet.csproj b/mcs/class/System.Drawing/Test/Test.dotnet.csproj
deleted file mode 100644
index 2647d19b8d7..00000000000
--- a/mcs/class/System.Drawing/Test/Test.dotnet.csproj
+++ /dev/null
@@ -1,541 +0,0 @@
-<VisualStudioProject>
- <CSHARP
- ProjectType = "Local"
- ProductVersion = "7.10.3077"
- SchemaVersion = "2.0"
- ProjectGuid = "{DFE29E81-D6A8-45D4-A627-161F462BE767}"
- >
- <Build>
- <Settings
- ApplicationIcon = ""
- AssemblyKeyContainerName = ""
- AssemblyName = "Test.dotnet"
- AssemblyOriginatorKeyFile = ""
- DefaultClientScript = "JScript"
- DefaultHTMLPageLayout = "Grid"
- DefaultTargetSchema = "IE50"
- DelaySign = "false"
- OutputType = "Library"
- PreBuildEvent = ""
- PostBuildEvent = ""
- RootNamespace = "Test.dotnet"
- RunPostBuildEvent = "OnBuildSuccess"
- StartupObject = ""
- >
- <Config
- Name = "Debug"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "DEBUG;TRACE"
- DocumentationFile = ""
- DebugSymbols = "true"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "false"
- OutputPath = "DrawingTest\Test\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- <Config
- Name = "Release"
- AllowUnsafeBlocks = "false"
- BaseAddress = "285212672"
- CheckForOverflowUnderflow = "false"
- ConfigurationOverrideFile = ""
- DefineConstants = "TRACE"
- DocumentationFile = ""
- DebugSymbols = "false"
- FileAlignment = "4096"
- IncrementalBuild = "false"
- NoStdLib = "false"
- NoWarn = ""
- Optimize = "true"
- OutputPath = "bin\Release\"
- RegisterForComInterop = "false"
- RemoveIntegerChecks = "false"
- TreatWarningsAsErrors = "false"
- WarningLevel = "4"
- />
- </Settings>
- <References>
- <Reference
- Name = "System"
- AssemblyName = "System"
- HintPath = "..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
- />
- <Reference
- Name = "System.Drawing"
- AssemblyName = "System.Drawing"
- HintPath = "..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Drawing.dll"
- />
- <Reference
- Name = "System.Data"
- AssemblyName = "System.Data"
- HintPath = "..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
- />
- <Reference
- Name = "System.XML"
- AssemblyName = "System.Xml"
- HintPath = "..\..\..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
- />
- <Reference
- Name = "DrawingTestHelper"
- Project = "{8EF9FC71-4D70-4F89-BF4D-B83EF37D4A0C}"
- Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
- />
- <Reference
- Name = "nunit.core.dll.J2EE"
- Project = "{7C52A6A5-71ED-4468-9564-2FF5CD6E6E6C}"
- Package = "{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"
- />
- <Reference
- Name = "nunit.framework.dll.J2EE"
- Project = "{39CC8FF7-EF1A-41A1-B727-42684211ECD1}"
- Package = "{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"
- />
- <Reference
- Name = "nunit.util.dll.J2EE"
- Project = "{36BE0465-4DE4-44CE-AF8D-6E50D0C40BC6}"
- Package = "{83B010C7-76FC-4FAD-A26C-00D7EFE60256}"
- />
- </References>
- </Build>
- <Files>
- <Include>
- <File
- RelPath = "DrawingTest\Test\AssemblyInfo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\Bitmap.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\Bitmap1.png"
- BuildAction = "EmbeddedResource"
- />
- <File
- RelPath = "DrawingTest\Test\Brush.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\Graphics.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\GraphicsPath.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\GraphicsPathIterator.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\Image.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\Pen.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\Region.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "DrawingTest\Test\SampIcon.ico"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\ColorConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\ColorTranslator.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestBitmap.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestBrushes.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestColor.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestFont.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestIcon.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestIconConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestImageConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestImageFormatConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestPens.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestPoint.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestPointConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestPointF.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestRectangle.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestRectangleConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestRectangleF.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestRegion.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestSize.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestSizeConverter.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestSizeF.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestStringFormat.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestSystemBrushes.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\TestSystemPens.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing\bitmaps\almogaver1bit.bmp"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\almogaver24bits.bmp"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\almogaver24bits1.bmp"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\almogaver32bits.bmp"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\almogaver8bits.bmp"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\almogaver-os2.bmp"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\maketransparent.bmp"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\nature24bits.gif"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\nature24bits.jpg"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\smiley.ico"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\VisualPng.ico"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\VisualPng1.ico"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\empty-file"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\entries"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\format"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\README.txt"
- BuildAction = "Content"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\almogaver1bit.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\almogaver24bits.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\almogaver24bits1.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\almogaver32bits.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\almogaver8bits.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\almogaver-os2.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\maketransparent.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\nature24bits.gif.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\nature24bits.jpg.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\smiley.ico.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\VisualPng.ico.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\prop-base\VisualPng1.ico.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\almogaver1bit.bmp.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\almogaver24bits.bmp.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\almogaver24bits1.bmp.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\almogaver32bits.bmp.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\almogaver8bits.bmp.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\almogaver-os2.bmp.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\maketransparent.bmp.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\nature24bits.gif.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\nature24bits.jpg.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\smiley.ico.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\VisualPng.ico.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\props\VisualPng1.ico.svn-work"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\almogaver1bit.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\almogaver24bits.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\almogaver24bits1.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\almogaver32bits.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\almogaver8bits.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\almogaver-os2.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\maketransparent.bmp.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\nature24bits.gif.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\nature24bits.jpg.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\smiley.ico.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\VisualPng.ico.svn-base"
- BuildAction = "None"
- />
- <File
- RelPath = "System.Drawing\bitmaps\.svn\text-base\VisualPng1.ico.svn-base"
- BuildAction = "None"
- />
- <Folder RelPath = "System.Drawing\bitmaps\.svn\tmp\prop-base\" />
- <Folder RelPath = "System.Drawing\bitmaps\.svn\tmp\props\" />
- <Folder RelPath = "System.Drawing\bitmaps\.svn\tmp\text-base\" />
- <Folder RelPath = "System.Drawing\bitmaps\.svn\tmp\wcprops\" />
- <Folder RelPath = "System.Drawing\bitmaps\.svn\wcprops\" />
- <File
- RelPath = "System.Drawing.Drawing2D\TestBlend.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing.Drawing2D\TestColorBlend.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing.Drawing2D\TestHatchBrush.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing.Imaging\TestBmpCodec.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing.Imaging\TestColorMatrix.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing.Imaging\TestImageAttributes.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing.Imaging\TestImageCodecInfo.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "System.Drawing.Imaging\TestJpegCodec.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- </Include>
- </Files>
- </CSHARP>
-</VisualStudioProject>
-
diff --git a/mcs/class/System.Drawing/Test/Test20.J2EE.csproj b/mcs/class/System.Drawing/Test/Test20.J2EE.csproj
deleted file mode 100644
index 9cb91b6ea05..00000000000
--- a/mcs/class/System.Drawing/Test/Test20.J2EE.csproj
+++ /dev/null
@@ -1,212 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>DrawingTest\Test\bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>DrawingTest\Test\bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{FD3F01E4-4F19-4124-BD9C-226C3E8D55B3}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Drawing.Test</RootNamespace>
- <AssemblyName>System.Drawing.Test20.J2EE</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- <jarserver>ip2</jarserver>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers, Version=0.0.0.0, Culture=neutral">
- <HintPath>..\..\lib\J2SE.Helpers.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="rt">
- <HintPath>..\..\lib\rt.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Runtime.Serialization.Formatters.Soap, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="DrawingTest\Test\Bitmap.cs" />
- <Compile Include="DrawingTest\Test\Brush.cs" />
- <Compile Include="DrawingTest\Test\Graphics.cs" />
- <Compile Include="DrawingTest\Test\GraphicsPath.cs" />
- <Compile Include="DrawingTest\Test\GraphicsPathIterator.cs" />
- <Compile Include="DrawingTest\Test\Image.cs" />
- <Compile Include="DrawingTest\Test\Pen.cs" />
- <Compile Include="DrawingTest\Test\Region.cs" />
- <Compile Include="System.Drawing.Drawing2D\TestBlend.cs" />
- <Compile Include="System.Drawing.Drawing2D\TestColorBlend.cs" />
- <Compile Include="System.Drawing.Drawing2D\TestHatchBrush.cs" />
- <Compile Include="System.Drawing.Imaging\TestBmpCodec.cs" />
- <Compile Include="System.Drawing.Imaging\TestColorMatrix.cs" />
- <Compile Include="System.Drawing.Imaging\TestImageAttributes.cs" />
- <Compile Include="System.Drawing.Imaging\TestImageCodecInfo.cs" />
- <Compile Include="System.Drawing.Imaging\TestJpegCodec.cs" />
- <Compile Include="System.Drawing\ColorConverter.cs" />
- <Compile Include="System.Drawing\ColorTranslator.cs" />
- <Compile Include="System.Drawing\TestBitmap.cs" />
- <Compile Include="System.Drawing\TestBrushes.cs" />
- <Compile Include="System.Drawing\TestColor.cs" />
- <Compile Include="System.Drawing\TestFont.cs" />
- <Compile Include="System.Drawing\TestIcon.cs" />
- <Compile Include="System.Drawing\TestIconConverter.cs" />
- <Compile Include="System.Drawing\TestImageConverter.cs" />
- <Compile Include="System.Drawing\TestImageFormatConverter.cs" />
- <Compile Include="System.Drawing\TestPens.cs" />
- <Compile Include="System.Drawing\TestPoint.cs" />
- <Compile Include="System.Drawing\TestPointConverter.cs" />
- <Compile Include="System.Drawing\TestPointF.cs" />
- <Compile Include="System.Drawing\TestRectangle.cs" />
- <Compile Include="System.Drawing\TestRectangleConverter.cs" />
- <Compile Include="System.Drawing\TestRectangleF.cs" />
- <Compile Include="System.Drawing\TestRegion.cs" />
- <Compile Include="System.Drawing\TestSize.cs" />
- <Compile Include="System.Drawing\TestSizeConverter.cs" />
- <Compile Include="System.Drawing\TestSizeF.cs" />
- <Compile Include="System.Drawing\TestSizeFConverter.cs" />
- <Compile Include="System.Drawing\TestStringFormat.cs" />
- <Compile Include="System.Drawing\TestSystemBrushes.cs" />
- <Compile Include="System.Drawing\TestSystemPens.cs" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="DrawingTest\Test\Bitmap1.bmp" />
- <Content Include="DrawingTest\Test\Bitmap1.png" />
- <Content Include="DrawingTest\Test\SampIcon.ico" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="DrawingTest\DrawingTestHelper\DrawingTestHelper20.J2EE.csproj">
- <Project>{C4329BA9-2E08-4EB3-B6ED-0FA3BB6285AF}</Project>
- <Name>DrawingTestHelper20.J2EE</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-runtime-serialization-formatters-soap="repository:vmw:framework:2.0" REFS-JarPath-system-runtime-serialization-formatters-soap="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-RefInfo-nunit-framework="j2il:" REFS-JarPath-system-drawing="" REFS-JarPath-j2se-helpers="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\J2SE.Helpers.jar" REFS-JarPath-rt="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" REFS-JarPath-system-xml="" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.Data.jar" REFS-JarPath-system="" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\mscorlib.jar" REFS-JarPath-nunit-framework="..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Drawing/Test/Test20.csproj b/mcs/class/System.Drawing/Test/Test20.csproj
deleted file mode 100644
index 26dc59094fd..00000000000
--- a/mcs/class/System.Drawing/Test/Test20.csproj
+++ /dev/null
@@ -1,118 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{0E95EEE1-AE3C-41E9-8A9C-0F0A05A594BE}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Drawing.Test</RootNamespace>
- <AssemblyName>System.Drawing.Test</AssemblyName>
- <StartupObject>
- </StartupObject>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>DrawingTest\Test\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_2_0;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>DrawingTest\Test\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Runtime.Serialization.Formatters.Soap" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="DrawingTest\Test\AssemblyInfo.cs" />
- <Compile Include="DrawingTest\Test\Bitmap.cs" />
- <Compile Include="DrawingTest\Test\Brush.cs" />
- <Compile Include="DrawingTest\Test\Graphics.cs" />
- <Compile Include="DrawingTest\Test\GraphicsPath.cs" />
- <Compile Include="DrawingTest\Test\GraphicsPathIterator.cs" />
- <Compile Include="DrawingTest\Test\Image.cs" />
- <Compile Include="DrawingTest\Test\Pen.cs" />
- <Compile Include="DrawingTest\Test\Region.cs" />
- <Compile Include="System.Drawing.Drawing2D\TestBlend.cs" />
- <Compile Include="System.Drawing.Drawing2D\TestColorBlend.cs" />
- <Compile Include="System.Drawing.Drawing2D\TestHatchBrush.cs" />
- <Compile Include="System.Drawing.Imaging\TestBmpCodec.cs" />
- <Compile Include="System.Drawing.Imaging\TestColorMatrix.cs" />
- <Compile Include="System.Drawing.Imaging\TestImageAttributes.cs" />
- <Compile Include="System.Drawing.Imaging\TestImageCodecInfo.cs" />
- <Compile Include="System.Drawing.Imaging\TestJpegCodec.cs" />
- <Compile Include="System.Drawing\ColorConverter.cs" />
- <Compile Include="System.Drawing\ColorTranslator.cs" />
- <Compile Include="System.Drawing\TestBitmap.cs" />
- <Compile Include="System.Drawing\TestBrushes.cs" />
- <Compile Include="System.Drawing\TestColor.cs" />
- <Compile Include="System.Drawing\TestFont.cs" />
- <Compile Include="System.Drawing\TestIcon.cs" />
- <Compile Include="System.Drawing\TestIconConverter.cs" />
- <Compile Include="System.Drawing\TestImageConverter.cs" />
- <Compile Include="System.Drawing\TestImageFormatConverter.cs" />
- <Compile Include="System.Drawing\TestPens.cs" />
- <Compile Include="System.Drawing\TestPoint.cs" />
- <Compile Include="System.Drawing\TestPointConverter.cs" />
- <Compile Include="System.Drawing\TestPointF.cs" />
- <Compile Include="System.Drawing\TestRectangle.cs" />
- <Compile Include="System.Drawing\TestRectangleConverter.cs" />
- <Compile Include="System.Drawing\TestRectangleF.cs" />
- <Compile Include="System.Drawing\TestRegion.cs" />
- <Compile Include="System.Drawing\TestSize.cs" />
- <Compile Include="System.Drawing\TestSizeConverter.cs" />
- <Compile Include="System.Drawing\TestSizeF.cs" />
- <Compile Include="System.Drawing\TestStringFormat.cs" />
- <Compile Include="System.Drawing\TestSystemBrushes.cs" />
- <Compile Include="System.Drawing\TestSystemPens.cs" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="DrawingTest\Test\Bitmap1.png" />
- <Content Include="DrawingTest\Test\SampIcon.ico" />
- <Content Include="System.Drawing\bitmaps\1bit.png" />
- <Content Include="System.Drawing\bitmaps\4bit.png" />
- <Content Include="System.Drawing\bitmaps\almogaver-os2.bmp" />
- <Content Include="System.Drawing\bitmaps\almogaver1bit.bmp" />
- <Content Include="System.Drawing\bitmaps\almogaver24bits.bmp" />
- <Content Include="System.Drawing\bitmaps\almogaver24bits1.bmp" />
- <Content Include="System.Drawing\bitmaps\almogaver32bits.bmp" />
- <Content Include="System.Drawing\bitmaps\almogaver8bits.bmp" />
- <Content Include="System.Drawing\bitmaps\maketransparent.bmp" />
- <Content Include="System.Drawing\bitmaps\nature24bits.gif" />
- <Content Include="System.Drawing\bitmaps\nature24bits.jpg" />
- <Content Include="System.Drawing\bitmaps\smiley.ico" />
- <Content Include="System.Drawing\bitmaps\VisualPng.ico" />
- <Content Include="System.Drawing\bitmaps\VisualPng1.ico" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="DrawingTest\DrawingTestHelper\DrawingTestHelper20.csproj">
- <Project>{0E97F734-51B9-497B-9259-B6999FD87BDF}</Project>
- <Name>DrawingTestHelper20</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.exclude.sources b/mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.exclude.sources
deleted file mode 100644
index f4fe0d38a25..00000000000
--- a/mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.exclude.sources
+++ /dev/null
@@ -1,82 +0,0 @@
-##files existing in both profiles
-System.Drawing.Drawing2D/AdjustableArrowCap.cs
-System.Drawing.Drawing2D/CustomLineCap.cs
-System.Drawing.Drawing2D/GraphicsContainer.cs
-System.Drawing.Drawing2D/GraphicsPath.cs
-System.Drawing.Drawing2D/GraphicsPathIterator.cs
-System.Drawing.Drawing2D/GraphicsState.cs
-System.Drawing.Drawing2D/HatchBrush.cs
-System.Drawing.Drawing2D/LinearGradientBrush.cs
-System.Drawing.Drawing2D/Matrix.cs
-System.Drawing.Drawing2D/PathGradientBrush.cs
-System.Drawing.Imaging/EncoderParameter.cs
-System.Drawing.Imaging/ImageAttributes.cs
-System.Drawing.Imaging/ImageCodecInfo.cs
-System.Drawing.Imaging/Metafile.cs
-System.Drawing.Text/FontCollection.cs
-System.Drawing.Text/InstalledFontCollection.cs
-System.Drawing.Text/PrivateFontCollection.cs
-System.Drawing/Bitmap.cs
-System.Drawing/Brush.cs
-System.Drawing/Font.cs
-System.Drawing/FontFamily.cs
-System.Drawing/Graphics.cs
-System.Drawing/Icon.cs
-System.Drawing/Image.cs
-System.Drawing/Pen.cs
-System.Drawing/Region.cs
-System.Drawing/SolidBrush.cs
-System.Drawing/StringFormat.cs
-System.Drawing/SystemColors.cs
-System.Drawing/SystemIcons.cs
-System.Drawing/TextureBrush.cs
-
-##completely different files
-System.Drawing.Design/CategoryNameCollection.cs
-System.Drawing.Design/IPropertyValueUIService.cs
-System.Drawing.Design/IToolboxService.cs
-System.Drawing.Design/IToolboxUser.cs
-System.Drawing.Design/PaintValueEventArgs.cs
-System.Drawing.Design/PropertyValueItem.cs
-System.Drawing.Design/PropertyValueUIHandler.cs
-System.Drawing.Design/PropertyValueUIItemInvokeHandler.cs
-System.Drawing.Design/ToolboxItemCollection.cs
-System.Drawing.Design/ToolboxItemCreatorCallback.cs
-System.Drawing.Imaging/PlayRecordCallback.cs
-System.Drawing.Printing/Duplex.cs
-System.Drawing.Printing/InvalidPrinterException.cs
-System.Drawing.Printing/Margins.cs
-System.Drawing.Printing/MarginsConverter.cs
-System.Drawing.Printing/PageSettings.cs
-System.Drawing.Printing/PaperKind.cs
-System.Drawing.Printing/PaperSize.cs
-System.Drawing.Printing/PaperSource.cs
-System.Drawing.Printing/PaperSourceKind.cs
-System.Drawing.Printing/PreviewPageInfo.cs
-System.Drawing.Printing/PreviewPrintController.cs
-System.Drawing.Printing/PrintController.cs
-System.Drawing.Printing/PrintDocument.cs
-System.Drawing.Printing/PrintEventArgs.cs
-System.Drawing.Printing/PrintEventHandler.cs
-System.Drawing.Printing/PrintPageEventArgs.cs
-System.Drawing.Printing/PrintPageEventHandler.cs
-System.Drawing.Printing/PrintRange.cs
-System.Drawing.Printing/PrinterResolution.cs
-System.Drawing.Printing/PrinterResolutionKind.cs
-System.Drawing.Printing/PrinterSettings.cs
-System.Drawing.Printing/PrinterUnit.cs
-System.Drawing.Printing/PrinterUnitConvert.cs
-System.Drawing.Printing/PrintingPermission.cs
-System.Drawing.Printing/PrintingPermissionAttribute.cs
-System.Drawing.Printing/PrintingPermissionLevel.cs
-System.Drawing.Printing/QueryPageSettingsEventArgs.cs
-System.Drawing.Printing/QueryPageSettingsEventHandler.cs
-System.Drawing.Printing/StandardPrintController.cs
-System.Drawing/ComIStreamMarshaler.cs
-System.Drawing/ComIStreamWrapper.cs
-System.Drawing/SRDescriptionAttribute.cs
-System.Drawing/gdipEnums.cs
-System.Drawing/gdipFunctions.cs
-System.Drawing/gdipStructs.cs
-System.Drawing/carbonFunctions.cs
-
diff --git a/mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.sources b/mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.sources
deleted file mode 100644
index 9d557f864e7..00000000000
--- a/mcs/class/System.Drawing/net_1_1_java_System.Drawing.dll.sources
+++ /dev/null
@@ -1,49 +0,0 @@
-#include System.Drawing.dll.sources
-
-##files existing in both profiles
-System.Drawing.Drawing2D/AdjustableArrowCap.jvm.cs
-System.Drawing.Drawing2D/CustomLineCap.jvm.cs
-System.Drawing.Drawing2D/GraphicsContainer.jvm.cs
-System.Drawing.Drawing2D/GraphicsPath.jvm.cs
-System.Drawing.Drawing2D/GraphicsPathIterator.jvm.cs
-System.Drawing.Drawing2D/GraphicsState.jvm.cs
-System.Drawing.Drawing2D/HatchBrush.jvm.cs
-System.Drawing.Drawing2D/LinearGradientBrush.jvm.cs
-System.Drawing.Drawing2D/Matrix.jvm.cs
-System.Drawing.Drawing2D/PathGradientBrush.jvm.cs
-System.Drawing.Imaging/EncoderParameter.jvm.cs
-System.Drawing.Imaging/ImageAttributes.jvm.cs
-System.Drawing.Imaging/ImageCodecInfo.jvm.cs
-System.Drawing.Imaging/Metafile.jvm.cs
-System.Drawing.Text/FontCollection.jvm.cs
-System.Drawing.Text/InstalledFontCollection.jvm.cs
-System.Drawing.Text/PrivateFontCollection.jvm.cs
-System.Drawing/Bitmap.jvm.cs
-System.Drawing/Brush.jvm.cs
-System.Drawing/Font.jvm.cs
-System.Drawing/FontFamily.jvm.cs
-System.Drawing/Graphics.jvm.cs
-System.Drawing/Icon.jvm.cs
-System.Drawing/Image.jvm.cs
-System.Drawing/Pen.jvm.cs
-System.Drawing/Region.jvm.cs
-System.Drawing/SolidBrush.jvm.cs
-System.Drawing/StringFormat.jvm.cs
-System.Drawing/SystemColors.jvm.cs
-System.Drawing/SystemIcons.jvm.cs
-System.Drawing/TextureBrush.jvm.cs
-
-##completely different files
-System.Drawing.Drawing2D/ExtendedGeneralPath.jvm.cs
-System.Drawing.Drawing2D/GeneralPathIterator.jvm.cs
-System.Drawing.Imaging/ImageCodec.jvm.cs
-Mainsoft.Drawing.Configuration.jvm/ResolutionConfiguration.cs
-Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationCollection.cs
-Mainsoft.Drawing.Configuration.jvm/ResolutionConfigurationHandler.cs
-System.Drawing.Text/LineLayout.jvm.cs
-System.Drawing.Text/TextLineIterator.jvm.cs
-System.Drawing/AdvancedStroke.jvm.cs
-System.Drawing/BasicShape.jvm.cs
-System.Drawing/PlainImage.jvm.cs
-System.Drawing/PlainImageCollection.jvm.cs
-System.Drawing/StrokeFactory.jvm.cs
diff --git a/mcs/class/System.EnterpriseServices/System.EnterpriseServices.csproj b/mcs/class/System.EnterpriseServices/System.EnterpriseServices.csproj
deleted file mode 100644
index 022ea25f8dc..00000000000
--- a/mcs/class/System.EnterpriseServices/System.EnterpriseServices.csproj
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <NoWarn>168,162</NoWarn>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- <Reference Include="System.Transactions"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.IO.Compression.FileSystem/Makefile b/mcs/class/System.IO.Compression.FileSystem/Makefile
index 4e36c8abfd4..764cf083f8b 100644
--- a/mcs/class/System.IO.Compression.FileSystem/Makefile
+++ b/mcs/class/System.IO.Compression.FileSystem/Makefile
@@ -4,7 +4,6 @@ include ../../build/rules.make
LIBRARY = System.IO.Compression.FileSystem.dll
LIB_MCS_FLAGS = /r:System /r:System.IO.Compression.dll
-
-NO_TEST = yes
+TEST_MCS_FLAGS = /r:System /r:System.Core /r:System.IO.Compression.dll
include ../../build/library.make
diff --git a/mcs/class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem_test.dll.sources b/mcs/class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem_test.dll.sources
new file mode 100644
index 00000000000..dc67ea0cf1c
--- /dev/null
+++ b/mcs/class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem_test.dll.sources
@@ -0,0 +1 @@
+System.IO.Compression.FileSystem/ZipTest.cs
diff --git a/mcs/class/System.IO.Compression.FileSystem/Test/System.IO.Compression.FileSystem/ZipTest.cs b/mcs/class/System.IO.Compression.FileSystem/Test/System.IO.Compression.FileSystem/ZipTest.cs
new file mode 100644
index 00000000000..0354311b478
--- /dev/null
+++ b/mcs/class/System.IO.Compression.FileSystem/Test/System.IO.Compression.FileSystem/ZipTest.cs
@@ -0,0 +1,109 @@
+//
+// ZipTest.cs
+//
+// Author:
+// João Matos <joao.matos@xamarin.com>
+//
+// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+using System;
+using System.IO;
+using System.IO.Compression;
+using System.Linq;
+using System.Security.Cryptography;
+using NUnit.Framework;
+
+namespace MonoTests.System.IO.Compression.FileSystem
+{
+ [TestFixture]
+ public class ZipArchiveTests
+ {
+ [TearDown]
+ public void Dispose()
+ {
+ File.Delete ("foo.zip");
+ }
+
+ [Test]
+ public void ZipCreateFromDirectory()
+ {
+ if (File.Exists ("foo.zip"))
+ File.Delete ("foo.zip");
+
+ ZipFile.CreateFromDirectory ("foo", "foo.zip");
+ Assert.IsTrue(File.Exists("foo.zip"));
+
+ using (var archive = new ZipArchive (File.Open ("foo.zip", FileMode.Open),
+ ZipArchiveMode.Read))
+ {
+ Assert.IsNotNull (archive.GetEntry ("foo.txt"));
+ Assert.IsNotNull (archive.GetEntry ("bar.txt"));
+
+ Assert.IsNotNull (archive.GetEntry ("foobar/foo.txt"));
+ Assert.IsNotNull (archive.GetEntry ("foobar/bar.txt"));
+ }
+ }
+
+ [Test]
+ public void ZipCreateFromDirectoryIncludeBase()
+ {
+ if (File.Exists ("foo.zip"))
+ File.Delete ("foo.zip");
+
+ ZipFile.CreateFromDirectory ("foo", "foo.zip", CompressionLevel.Fastest,
+ includeBaseDirectory: true);
+ Assert.IsTrue (File.Exists ("foo.zip"));
+
+ using (var archive = new ZipArchive (File.Open ("foo.zip", FileMode.Open),
+ ZipArchiveMode.Read))
+ {
+ Assert.IsNotNull (archive.GetEntry ("foo/foo.txt"));
+ Assert.IsNotNull (archive.GetEntry ("foo/bar.txt"));
+
+ Assert.IsNotNull (archive.GetEntry ("foo/foobar/foo.txt"));
+ Assert.IsNotNull (archive.GetEntry ("foo/foobar/bar.txt"));
+ }
+ }
+
+ [Test]
+ public void ZipExtractToDirectory()
+ {
+ if (Directory.Exists ("extract"))
+ Directory.Delete ("extract", true);
+
+ if (File.Exists ("foo.zip"))
+ File.Delete ("foo.zip");
+
+ ZipFile.CreateFromDirectory ("foo", "foo.zip");
+
+ ZipFile.ExtractToDirectory ("foo.zip", "extract");
+ Assert.IsTrue(Directory.Exists ("extract"));
+
+ Assert.IsTrue (File.Exists ("extract/foo.txt"));
+ Assert.IsTrue (File.Exists ("extract/bar.txt"));
+ Assert.IsTrue (Directory.Exists ("extract/foobar"));
+ Assert.IsTrue (File.Exists ("extract/foobar/foo.txt"));
+ Assert.IsTrue (File.Exists ("extract/foobar/bar.txt"));
+
+ Directory.Delete ("extract", true);
+ }
+ }
+}
diff --git a/mcs/class/System.IO.Compression.FileSystem/ZipFile.cs b/mcs/class/System.IO.Compression.FileSystem/ZipFile.cs
index e6016708ab3..eaa3b75230d 100644
--- a/mcs/class/System.IO.Compression.FileSystem/ZipFile.cs
+++ b/mcs/class/System.IO.Compression.FileSystem/ZipFile.cs
@@ -2,6 +2,7 @@
// ZipFile.cs
//
// Author:
+// João Matos <joao.matos@xamarin.com>
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
@@ -28,20 +29,21 @@ using System.Text;
namespace System.IO.Compression
{
- [MonoTODO]
public static class ZipFile
{
public static void CreateFromDirectory (
string sourceDirectoryName, string destinationArchiveFileName)
{
- throw new NotImplementedException ();
+ CreateFromDirectory (sourceDirectoryName, destinationArchiveFileName,
+ CompressionLevel.Fastest, includeBaseDirectory: false);
}
public static void CreateFromDirectory (
string sourceDirectoryName, string destinationArchiveFileName,
CompressionLevel compressionLevel, bool includeBaseDirectory)
{
- throw new NotImplementedException ();
+ CreateFromDirectory (sourceDirectoryName, destinationArchiveFileName,
+ CompressionLevel.Fastest, includeBaseDirectory, Encoding.UTF8);
}
public static void CreateFromDirectory (
@@ -51,38 +53,129 @@ namespace System.IO.Compression
bool includeBaseDirectory,
Encoding entryNameEncoding)
{
- throw new NotImplementedException ();
+ if (sourceDirectoryName == null)
+ throw new ArgumentNullException ("sourceDirectoryName");
+
+ if (destinationArchiveFileName == null)
+ throw new ArgumentNullException ("destinationArchiveFileName");
+
+ if (string.IsNullOrWhiteSpace (sourceDirectoryName))
+ throw new ArgumentException ("sourceDirectoryName");
+
+ if (string.IsNullOrWhiteSpace (destinationArchiveFileName))
+ throw new ArgumentException ("destinationArchiveFileName");
+
+ if (entryNameEncoding == Encoding.Unicode ||
+ entryNameEncoding == Encoding.UTF32 ||
+ entryNameEncoding == Encoding.UTF7)
+ throw new ArgumentException ("entryNameEncoding");
+
+ if (entryNameEncoding == null)
+ entryNameEncoding = Encoding.UTF8;
+
+ if (!Directory.Exists (sourceDirectoryName))
+ throw new DirectoryNotFoundException ("sourceDirectoryName is invalid or does not exist");
+
+ var sourceDir = new DirectoryInfo (Path.GetFullPath (sourceDirectoryName));
+
+ string fullBaseName = sourceDir.FullName;
+ if (includeBaseDirectory && sourceDir.Parent != null)
+ fullBaseName = sourceDir.Parent.FullName;
+
+ bool hasEntries = false;
+ char[] separators = new char[] {
+ Path.DirectorySeparatorChar,
+ Path.AltDirectorySeparatorChar
+ };
+
+ using (var zipFile = ZipFile.Open (destinationArchiveFileName, ZipArchiveMode.Create,
+ entryNameEncoding)) {
+ var entries = sourceDir.EnumerateFileSystemInfos ("*", SearchOption.AllDirectories);
+ foreach (var entry in entries) {
+ hasEntries = true;
+
+ int length = entry.FullName.Length - fullBaseName.Length;
+ string entryName = entry.FullName.Substring(fullBaseName.Length, length);
+
+ entryName = entryName.TrimStart(separators);
+
+ if (entry is FileInfo)
+ zipFile.CreateEntryFromFile (entry.FullName, entryName, compressionLevel);
+ else
+ zipFile.CreateEntry (entryName + Path.DirectorySeparatorChar);
+ }
+
+ // Create the base directory even if we had no entries
+ if (includeBaseDirectory && !hasEntries)
+ zipFile.CreateEntry(sourceDir.Name + Path.DirectorySeparatorChar);
+ }
}
public static void ExtractToDirectory (
string sourceArchiveFileName, string destinationDirectoryName)
{
- throw new NotImplementedException ();
+ ExtractToDirectory (sourceArchiveFileName, destinationDirectoryName,
+ Encoding.UTF8);
}
public static void ExtractToDirectory (
string sourceArchiveFileName, string destinationDirectoryName,
Encoding entryNameEncoding)
{
- throw new NotImplementedException ();
+ if (sourceArchiveFileName == null)
+ throw new ArgumentNullException ("sourceArchiveFileName");
+
+ using (ZipArchive zipArchive = ZipFile.Open(sourceArchiveFileName,
+ ZipArchiveMode.Read, entryNameEncoding))
+ {
+ zipArchive.ExtractToDirectory(destinationDirectoryName);
+ }
}
public static ZipArchive Open (
string archiveFileName, ZipArchiveMode mode)
{
- throw new NotImplementedException ();
+ return Open (archiveFileName, mode);
}
public static ZipArchive Open (
string archiveFileName, ZipArchiveMode mode,
Encoding entryNameEncoding)
{
- throw new NotImplementedException ();
+ if (archiveFileName == null)
+ throw new ArgumentNullException ("archiveFileName");
+
+ if (string.IsNullOrWhiteSpace (archiveFileName))
+ throw new ArgumentException ("archiveFileName");
+
+ FileStream stream;
+
+ switch (mode) {
+ case ZipArchiveMode.Read:
+ if (!File.Exists (archiveFileName))
+ throw new FileNotFoundException ();
+ stream = new FileStream (archiveFileName, FileMode.Open, FileAccess.Read,
+ FileShare.Read);
+ break;
+ case ZipArchiveMode.Create:
+ if (File.Exists (archiveFileName))
+ throw new IOException ("mode is set to Create but the file already exists");
+ stream = new FileStream (archiveFileName, FileMode.CreateNew, FileAccess.Write);
+ break;
+ case ZipArchiveMode.Update:
+ stream = new FileStream (archiveFileName, FileMode.OpenOrCreate,
+ FileAccess.ReadWrite);
+ break;
+ default:
+ throw new ArgumentOutOfRangeException ();
+ }
+
+ return new ZipArchive (stream, mode, false, entryNameEncoding);
}
public static ZipArchive OpenRead (string archiveFileName)
{
- throw new NotImplementedException ();
+ return ZipFile.Open (archiveFileName, ZipArchiveMode.Read);
}
}
}
diff --git a/mcs/class/System.IO.Compression.FileSystem/ZipFileExtensions.cs b/mcs/class/System.IO.Compression.FileSystem/ZipFileExtensions.cs
index 1abe0e0e168..07a8448171e 100644
--- a/mcs/class/System.IO.Compression.FileSystem/ZipFileExtensions.cs
+++ b/mcs/class/System.IO.Compression.FileSystem/ZipFileExtensions.cs
@@ -2,6 +2,7 @@
// ZipFileExtensions.cs
//
// Author:
+// João Matos <joao.matos@xamarin.com>
// Martin Baulig <martin.baulig@xamarin.com>
//
// Copyright (c) 2013 Xamarin Inc. (http://www.xamarin.com)
@@ -27,43 +28,95 @@ using System;
namespace System.IO.Compression
{
- [MonoTODO]
public static class ZipFileExtensions
{
public static ZipArchiveEntry CreateEntryFromFile (
this ZipArchive destination, string sourceFileName,
string entryName)
{
- throw new NotImplementedException ();
+ return CreateEntryFromFile (destination, sourceFileName, entryName,
+ CompressionLevel.Fastest);
}
public static ZipArchiveEntry CreateEntryFromFile (
this ZipArchive destination, string sourceFileName,
- string entryName, CompressionLevel compressionLevel
- )
+ string entryName, CompressionLevel compressionLevel)
{
- throw new NotImplementedException ();
+ if (destination == null)
+ throw new ArgumentNullException ("destination");
+
+ if (sourceFileName == null)
+ throw new ArgumentNullException ("sourceFileName");
+
+ if (entryName == null)
+ throw new ArgumentNullException ("entryName");
+
+ ZipArchiveEntry entry;
+ using (Stream stream = File.Open (sourceFileName, FileMode.Open,
+ FileAccess.Read, FileShare.Read))
+ {
+ var zipArchiveEntry = destination.CreateEntry (entryName, compressionLevel);
+
+ using (Stream entryStream = zipArchiveEntry.Open ())
+ stream.CopyTo (entryStream);
+
+ entry = zipArchiveEntry;
+ }
+
+ return entry;
}
public static void ExtractToDirectory (
this ZipArchive source,
string destinationDirectoryName)
{
- throw new NotImplementedException ();
+ if (source == null)
+ throw new ArgumentNullException ("source");
+
+ if (destinationDirectoryName == null)
+ throw new ArgumentNullException ("destinationDirectoryName");
+
+ var destDirInfo = Directory.CreateDirectory (destinationDirectoryName);
+ string fullName = destDirInfo.FullName;
+
+ foreach (var zipEntry in source.Entries)
+ {
+ var fullPath = Path.GetFullPath (Path.Combine (fullName, zipEntry.FullName));
+
+ var isFileName = Path.GetFileName (fullPath).Length != 0;
+ var dirPath = isFileName ? Path.GetDirectoryName (fullPath) : fullPath;
+ Directory.CreateDirectory (dirPath);
+
+ if (isFileName)
+ zipEntry.ExtractToFile (fullPath, false);
+ }
}
public static void ExtractToFile (
this ZipArchiveEntry source,
string destinationFileName)
{
- throw new NotImplementedException ();
+ ExtractToFile (source, destinationFileName, overwrite: false);
}
public static void ExtractToFile (
this ZipArchiveEntry source, string destinationFileName,
bool overwrite)
{
- throw new NotImplementedException ();
+ if (source == null)
+ throw new ArgumentNullException ("source");
+
+ if (destinationFileName == null)
+ throw new ArgumentNullException ("destinationFileName");
+
+ var mode = overwrite ? FileMode.Create : FileMode.CreateNew;
+ using (var stream = File.Open (destinationFileName, mode, FileAccess.Write))
+ {
+ using (var stream2 = source.Open ())
+ stream2.CopyTo(stream);
+ }
+
+ File.SetLastWriteTime(destinationFileName, source.LastWriteTime.DateTime);
}
}
}
diff --git a/mcs/class/System.IO.Compression.FileSystem/foo/bar.txt b/mcs/class/System.IO.Compression.FileSystem/foo/bar.txt
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mcs/class/System.IO.Compression.FileSystem/foo/bar.txt
diff --git a/mcs/class/System.IO.Compression.FileSystem/foo/foo.txt b/mcs/class/System.IO.Compression.FileSystem/foo/foo.txt
new file mode 100644
index 00000000000..257cc5642cb
--- /dev/null
+++ b/mcs/class/System.IO.Compression.FileSystem/foo/foo.txt
@@ -0,0 +1 @@
+foo
diff --git a/mcs/class/System.IO.Compression.FileSystem/foo/foobar/bar.txt b/mcs/class/System.IO.Compression.FileSystem/foo/foobar/bar.txt
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mcs/class/System.IO.Compression.FileSystem/foo/foobar/bar.txt
diff --git a/mcs/class/System.IO.Compression.FileSystem/foo/foobar/foo.txt b/mcs/class/System.IO.Compression.FileSystem/foo/foobar/foo.txt
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/mcs/class/System.IO.Compression.FileSystem/foo/foobar/foo.txt
diff --git a/mcs/class/System.IO.Compression/SharpCompress/Writer/Zip/ZipWriter.cs b/mcs/class/System.IO.Compression/SharpCompress/Writer/Zip/ZipWriter.cs
index 83032d92ec4..76a8853d0a0 100644
--- a/mcs/class/System.IO.Compression/SharpCompress/Writer/Zip/ZipWriter.cs
+++ b/mcs/class/System.IO.Compression/SharpCompress/Writer/Zip/ZipWriter.cs
@@ -132,7 +132,7 @@ namespace SharpCompress.Writer.Zip
if (pos >= 0)
filename = filename.Remove(0, pos + 1);
- return filename.Trim('/');
+ return filename;
}
private int WriteHeader(string filename, DateTime? modificationTime)
diff --git a/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs b/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs
index 40d8f15fb63..478af95dbeb 100644
--- a/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs
+++ b/mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs
@@ -58,6 +58,8 @@ namespace MonoTests.System.IO.Compression
var nullEntry = archive.GetEntry("nonexisting");
Assert.IsNull(nullEntry);
}
+
+ File.Delete ("test.zip");
}
[Test]
@@ -75,6 +77,8 @@ namespace MonoTests.System.IO.Compression
Assert.Fail();
}
+
+ File.Delete ("test.zip");
}
[Test]
@@ -90,6 +94,8 @@ namespace MonoTests.System.IO.Compression
var nullEntry = archive.GetEntry("nonexisting");
Assert.IsNull(nullEntry);
}
+
+ File.Delete ("test.zip");
}
[Test]
@@ -104,6 +110,8 @@ namespace MonoTests.System.IO.Compression
var foo = entry.Open();
}
+
+ File.Delete ("test.zip");
}
[Test]
@@ -125,6 +133,8 @@ namespace MonoTests.System.IO.Compression
var entry = archive.GetEntry("foo.txt");
Assert.IsNull(entry);
}
+
+ File.Delete ("delete.zip");
}
[Test]
@@ -146,6 +156,8 @@ namespace MonoTests.System.IO.Compression
var entry = archive.GetEntry("foo.txt");
Assert.IsNull(entry);
}
+
+ File.Delete ("delete.zip");
}
[Test]
@@ -154,6 +166,8 @@ namespace MonoTests.System.IO.Compression
using (var archive = new ZipArchive(File.Open("create.zip", FileMode.Create),
ZipArchiveMode.Create))
{
+ var dir = archive.CreateEntry("foobar/");
+
var entry = archive.CreateEntry("foo.txt");
using (var stream = entry.Open())
{
@@ -165,6 +179,8 @@ namespace MonoTests.System.IO.Compression
using (var archive = new ZipArchive(File.Open("create.zip", FileMode.Open),
ZipArchiveMode.Read))
{
+ Assert.IsNotNull(archive.GetEntry("foobar/"));
+
var entry = archive.GetEntry("foo.txt");
Assert.IsNotNull(entry);
@@ -173,6 +189,8 @@ namespace MonoTests.System.IO.Compression
Assert.AreEqual("foo", text);
}
+
+ File.Delete ("create.zip");
}
[Test]
@@ -191,6 +209,8 @@ namespace MonoTests.System.IO.Compression
Assert.AreEqual("foobar/bar.txt", entries[3].FullName);
Assert.AreEqual("foobar/foo.txt", entries[4].FullName);
}
+
+ File.Delete ("test.zip");
}
[Test]
@@ -209,6 +229,8 @@ namespace MonoTests.System.IO.Compression
Assert.AreEqual("foobar/bar.txt", entries[3].FullName);
Assert.AreEqual("foobar/foo.txt", entries[4].FullName);
}
+
+ File.Delete ("test.zip");
}
[Test]
@@ -226,6 +248,8 @@ namespace MonoTests.System.IO.Compression
Assert.Fail();
}
+
+ File.Delete ("test.zip");
}
}
}
diff --git a/mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors.csproj b/mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors.csproj
deleted file mode 100644
index 018c2c4336a..00000000000
--- a/mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors.csproj
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F46BBFCE-C0DD-41EC-BD53-B1F4F312DE1A}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.IdentityModel.Selectors</RootNamespace>
- <AssemblyName>System.IdentityModel.Selectors</AssemblyName>
- <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.IdentityModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="System.IdentityModel.Selectors\CardSpaceException.cs" />
- <Compile Include="System.IdentityModel.Selectors\CardSpacePolicyElement.cs" />
- <Compile Include="System.IdentityModel.Selectors\CardSpaceSelector.cs" />
- <Compile Include="System.IdentityModel.Selectors\IdentityValidationException.cs" />
- <Compile Include="System.IdentityModel.Selectors\PolicyValidationException.cs" />
- <Compile Include="System.IdentityModel.Selectors\ServiceBusyException.cs" />
- <Compile Include="System.IdentityModel.Selectors\ServiceNotStartedException.cs" />
- <Compile Include="System.IdentityModel.Selectors\StsCommunicationException.cs" />
- <Compile Include="System.IdentityModel.Selectors\UnsupportedPolicyOptionsException.cs" />
- <Compile Include="System.IdentityModel.Selectors\UntrustedRecipientException.cs" />
- <Compile Include="System.IdentityModel.Selectors\UserCancellationException.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PostBuildEvent>@rem "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "$(TargetPath)" /f
-@rem "C:\Program Files\Mono-1.2.6\bin\gacutil.bat" -i "$(TargetPath)"</PostBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel-net_4_5.csproj b/mcs/class/System.IdentityModel/System.IdentityModel-net_4_5.csproj
index 17888b5d370..3022c52ab5b 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel-net_4_5.csproj
+++ b/mcs/class/System.IdentityModel/System.IdentityModel-net_4_5.csproj
@@ -48,17 +48,32 @@
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
<Compile Include="Assembly\AssemblyInfo.cs" />
+ <Compile Include="System.IdentityModel\CookieTransform.cs" />
+ <Compile Include="System.IdentityModel\OpenObject.cs" />
<Compile Include="System.IdentityModel.Claims\Claim.cs" />
<Compile Include="System.IdentityModel.Claims\ClaimSet.cs" />
<Compile Include="System.IdentityModel.Claims\ClaimTypes.cs" />
<Compile Include="System.IdentityModel.Claims\DefaultClaimSet.cs" />
<Compile Include="System.IdentityModel.Claims\Rights.cs" />
<Compile Include="System.IdentityModel.Claims\WindowsClaimSet.cs" />
+ <Compile Include="System.IdentityModel.Configuration\ICustomIdentityConfiguration.cs" />
+ <Compile Include="System.IdentityModel.Configuration\IdentityModelCaches.cs" />
<Compile Include="System.IdentityModel.Claims\X509CertificateClaimSet.cs" />
<Compile Include="System.IdentityModel.Policy\AuthorizationContext.cs" />
<Compile Include="System.IdentityModel.Policy\EvaluationContext.cs" />
<Compile Include="System.IdentityModel.Policy\IAuthorizationComponent.cs" />
<Compile Include="System.IdentityModel.Policy\IAuthorizationPolicy.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\BinaryExchange.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\EndpointReference.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\Entropy.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\Lifetime.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\ProtectedKey.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\RequestSecurityTokenResponse.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\RequestedProofToken.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\RequestedSecurityTOken.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\Status.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\UseKey.cs" />
+ <Compile Include="System.IdentityModel.Protocols\WSTrust\WSTrustMessage.cs" />
<Compile Include="System.IdentityModel.Selectors\AudienceUriMode.cs" />
<Compile Include="System.IdentityModel.Selectors\CustomUserNameSecurityTokenAuthenticator.cs" />
<Compile Include="System.IdentityModel.Selectors\KerberosSecurityTokenAuthenticator.cs" />
@@ -82,13 +97,20 @@
<Compile Include="System.IdentityModel.Selectors\X509SecurityTokenAuthenticator.cs" />
<Compile Include="System.IdentityModel.Selectors\X509SecurityTokenProvider.cs" />
<Compile Include="System.IdentityModel.Tokens\AsymmetricSecurityKey.cs" />
+ <Compile Include="System.IdentityModel.Tokens\AudienceRestriction.cs" />
+ <Compile Include="System.IdentityModel.Tokens\AuthenticationContext.cs" />
+ <Compile Include="System.IdentityModel.Tokens\AuthenticationInformation.cs" />
+ <Compile Include="System.IdentityModel.Tokens\AuthenticationContext.cs" />
<Compile Include="System.IdentityModel.Tokens\BinaryKeyIdentifierClause.cs" />
<Compile Include="System.IdentityModel.Tokens\EncryptedKeyIdentifierClause.cs" />
+ <Compile Include="System.IdentityModel.Tokens\EncryptingCredentials.cs" />
<Compile Include="System.IdentityModel.Tokens\GenericXmlSecurityToken.cs" />
<Compile Include="System.IdentityModel.Tokens\InMemorySymmetricSecurityKey.cs" />
+ <Compile Include="System.IdentityModel.Tokens\IssuerNameRegistry.cs" />
<Compile Include="System.IdentityModel.Tokens\KerberosReceiverSecurityToken.cs" />
<Compile Include="System.IdentityModel.Tokens\KerberosRequestorSecurityToken.cs" />
<Compile Include="System.IdentityModel.Tokens\LocalIdKeyIdentifierClause.cs" />
+ <Compile Include="System.IdentityModel.Tokens\ProofDescriptor.cs" />
<Compile Include="System.IdentityModel.Tokens\RsaKeyIdentifierClause.cs" />
<Compile Include="System.IdentityModel.Tokens\RsaSecurityKey.cs" />
<Compile Include="System.IdentityModel.Tokens\RsaSecurityToken.cs" />
@@ -123,22 +145,33 @@
<Compile Include="System.IdentityModel.Tokens\SecurityKeyType.cs" />
<Compile Include="System.IdentityModel.Tokens\SecurityKeyUsage.cs" />
<Compile Include="System.IdentityModel.Tokens\SecurityToken.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SecurityTokenDescriptor.cs" />
<Compile Include="System.IdentityModel.Tokens\SecurityTokenException.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SecurityTokenHandler.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SecurityTokenHandlerCollection.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SecurityTokenHandlerConfiguration.cs" />
<Compile Include="System.IdentityModel.Tokens\SecurityTokenTypes.cs" />
<Compile Include="System.IdentityModel.Tokens\SecurityTokenValidationException.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SessionSecurityToken.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SessionSecurityTokenCache.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SessionSecurityTokenCacheKey.cs" />
+ <Compile Include="System.IdentityModel.Tokens\SessionSecurityTokenHandler.cs" />
<Compile Include="System.IdentityModel.Tokens\SigningCredentials.cs" />
<Compile Include="System.IdentityModel.Tokens\SymmetricSecurityKey.cs" />
<Compile Include="System.IdentityModel.Tokens\TlsHMAC.cs" />
+ <Compile Include="System.IdentityModel.Tokens\TokenReplayCache.cs" />
<Compile Include="System.IdentityModel.Tokens\UserNameSecurityToken.cs" />
<Compile Include="System.IdentityModel.Tokens\WindowsSecurityToken.cs" />
<Compile Include="System.IdentityModel.Tokens\X509AsymmetricSecurityKey.cs" />
<Compile Include="System.IdentityModel.Tokens\X509IssuerSerialKeyIdentifierClause.cs" />
<Compile Include="System.IdentityModel.Tokens\X509RawDataKeyIdentifierClause.cs" />
<Compile Include="System.IdentityModel.Tokens\X509SecurityToken.cs" />
+ <Compile Include="System.IdentityModel.Tokens\X509SigningCredentials.cs" />
<Compile Include="System.IdentityModel.Tokens\X509SubjectKeyIdentifierClause.cs" />
<Compile Include="System.IdentityModel.Tokens\X509ThumbprintKeyIdentifierClause.cs" />
<Compile Include="System.IdentityModel.Tokens\X509WindowsSecurityToken.cs" />
- <Compile Include="System.Security.Claims\AuthenticationTypes.cs" /> </ItemGroup>
+ <Compile Include="System.Security.Claims\AuthenticationTypes.cs" /> <Compile Include="System.ServiceModel.Security\X509CertificateValidationMode.cs" />
+ </ItemGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
index ddc87fe3e5b..91ae5d7ec65 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/XmlBuilder.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
@@ -1,13 +1,10 @@
-//
-// System.Web.UI.WebControls.XmlBuilder.cs
+//
+// ICustomIdentityConfiguration.cs
//
// Author:
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-// Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// Copyright (c) 2004 Novell, Inc. (http://www.novell.com)
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,17 +25,15 @@
// 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.Collections;
-using System.Web.Compilation;
-using System.Web.UI;
using System.Xml;
-namespace System.Web.UI.WebControls
+namespace System.IdentityModel.Configuration
{
- class XmlBuilder : ControlBuilder
+ public interface ICustomIdentityConfiguration
{
+ void LoadCustomConfiguration(XmlNodeList nodeList);
}
}
-
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry .jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs
index 1a22554825d..cbe68f8f053 100644
--- a/mcs/class/System.Web/System.Web.UI/BuilderPropertyEntry .jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Configuration/IdentityModelCaches.cs
@@ -1,12 +1,10 @@
+//
+// IdentityModelCaches.cs
//
-// System.Web.UI.BuilderPropertyEntry.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,19 +25,16 @@
// 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
-#if NET_2_0
-using System.Web.UI;
+using System.IdentityModel.Tokens;
-namespace System.Web.UI
+namespace System.IdentityModel.Configuration
{
- public abstract class BuilderPropertyEntry : PropertyEntry
+ public sealed class IdentityModelCaches
{
- public ControlBuilder Builder {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
+ public SessionSecurityTokenCache SessionSecurityTokenCache { get; set; }
+ public TokenReplayCache TokenReplayCache { get; set; }
}
}
-#endif
+#endif \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/AlternationBackReferenceConstruct.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
index d247b432d94..84f8f3bb775 100644
--- a/mcs/class/System/System.Text.RegularExpressions/AlternationBackReferenceConstruct.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
@@ -1,12 +1,10 @@
-//
-// AlternationBackReferenceConstruct.jvm.cs
+//
+// BinaryExchange.cs
//
// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,27 +25,29 @@
// 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.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-namespace System.Text.RegularExpressions
+namespace System.IdentityModel.Protocols.WSTrust
{
- sealed class AlternationBackReferenceConstruct : IConstructType
+ public class BinaryExchange
{
- private const string DEFINITION = @"\(\?\(\w+\).*\|?.*\)";
+ private const string defaultEncodingTypeUrl = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary";
- public bool HasConstruct (string pattern, RegexOptions options) {
- return JavaUtils.IsMatch (pattern, DEFINITION);
- }
+ public byte[] BinaryData { get; private set; }
+ public Uri EncodingType { get; private set; }
+ public Uri ValueType { get; private set; }
+
+ public BinaryExchange (byte[] binaryData, Uri valueType)
+ : this (binaryData, valueType, new Uri (defaultEncodingTypeUrl))
+ { }
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- throw new NotImplementedException ("Reformat for alternation construct with back reference is not implemented.");
+ public BinaryExchange (byte[] binaryData, Uri valueType, Uri encodingType) {
+ BinaryData = binaryData;
+ ValueType = valueType;
+ EncodingType = encodingType;
}
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute .jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
index 1f18b7218b5..22828af6bd7 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelControlBuilderAttribute .jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
@@ -1,12 +1,10 @@
+//
+// EndpointReference.cs
//
-// System.Web.UI.FileLevelControlBuilderAttribute.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,36 +25,40 @@
// 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
-#if NET_2_0
-namespace System.Web.UI
+using System;
+using System.Collections.ObjectModel;
+using System.Xml;
+
+namespace System.IdentityModel.Protocols.WSTrust
{
- [AttributeUsageAttribute (AttributeTargets.Class)]
- public sealed class FileLevelControlBuilderAttribute : Attribute
+ public class EndpointReference
{
- public FileLevelControlBuilderAttribute (Type builderType)
- {}
+ private Collection<XmlElement> details = new Collection<XmlElement> ();
+ private Uri uri = null;
- public static readonly FileLevelControlBuilderAttribute Default;
-
- public Type BuilderType { get { throw new NotImplementedException (); } }
-
- public override bool Equals (Object obj)
- {
- throw new NotImplementedException ();
+ public Collection<XmlElement> Details { get { return details; } }
+ public Uri Uri { get { return uri; } }
+
+ public EndpointReference (string uri) {
+ this.uri = new Uri (uri);
}
- public static bool Equals (Object objA, Object objB)
- {
+
+ [MonoTODO]
+ public static EndpointReference ReadFrom (XmlDictionaryReader reader) {
throw new NotImplementedException ();
}
- public override int GetHashCode ()
- {
+
+ [MonoTODO]
+ public static EndpointReference ReadFrom(Xml.XmlReader reader) {
throw new NotImplementedException ();
}
- public override bool IsDefaultAttribute ()
- {
+
+ [MonoTODO]
+ public void WriteTo (XmlWriter writer) {
throw new NotImplementedException ();
}
}
}
-#endif
+#endif \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/BalancingGroupConstruct.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs
index 339750fb83e..4ec0c3e07ba 100644
--- a/mcs/class/System/System.Text.RegularExpressions/BalancingGroupConstruct.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Entropy.cs
@@ -1,12 +1,10 @@
-//
-// BalancingGroupConstruct.jvm.cs
+//
+// Entropy.cs
//
// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,35 +25,36 @@
// 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.Collections.Generic;
-using java.util.regex;
-using java.lang;
+using System.IdentityModel.Tokens;
+using System.Security.Cryptography;
-
-namespace System.Text.RegularExpressions
+namespace System.IdentityModel.Protocols.WSTrust
{
- sealed class BalancingGroupConstruct : IConstructType
+ public class Entropy : ProtectedKey
{
- private const string DEFINITION1 = @"\(\?<[A-Za-z]\w*-[A-Za-z]\w*>.*\)";
- private const string DEFINITION2 = @"\(\?'[A-Za-z]\w*-[A-Za-z]\w*'.*\)";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- if (JavaUtils.IsMatch (pattern, DEFINITION1)) {
- return true;
- }
- if (JavaUtils.IsMatch (pattern, DEFINITION2)) {
- return true;
- }
-
- return false;
- }
+ public Entropy (ProtectedKey protectedKey) : base (protectedKey.GetKeyBytes (), protectedKey.WrappingCredentials)
+ { }
+
+ public Entropy (byte[] secret) : base (secret)
+ { }
+
+ public Entropy (int entropySizeInBits)
+ : this(Entropy.GetRandomByteArray(entropySizeInBits / 8))
+ { }
+
+ public Entropy (byte[] secret, EncryptingCredentials wrappingCredentials) : base (secret, wrappingCredentials)
+ { }
+
+ private static byte[] GetRandomByteArray (int arraySize) {
+ byte[] b = new byte[arraySize];
+
+ RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
+ rng.GetNonZeroBytes(b);
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- throw new NotImplementedException ("Reformat for balancing group is not implemented.");
+ return b;
}
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs
index 881266c2e39..403b4200900 100644
--- a/mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsContainer.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Lifetime.cs
@@ -1,15 +1,10 @@
+//
+// Lifetime.cs
//
-// System.Drawing.Drawing2D.GraphicsContainer.cs
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-// Authors:
-// Dennis Hayes (dennish@Raytek.com)
-// Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-// (C) 2002/3 Ximian, Inc
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -30,25 +25,25 @@
// 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;
-namespace System.Drawing.Drawing2D
+namespace System.IdentityModel.Protocols.WSTrust
{
- /// <summary>
- /// Summary description for GraphicsContainer.
- /// </summary>
- public sealed class GraphicsContainer : MarshalByRefObject
+ public class Lifetime
{
- readonly GraphicsState _stateObject;
-
- internal GraphicsContainer (GraphicsState stateObject)
- {
- _stateObject = stateObject;
- }
+ public DateTime? Created { get; set; }
+ public DateTime? Expires { get; set; }
+
+ public Lifetime (DateTime created, DateTime expires)
+ : this ((DateTime?)created, (DateTime?)expires)
+ { }
- internal GraphicsState StateObject
- {
- get {return _stateObject;}
+ public Lifetime (DateTime? created, DateTime? expires) {
+ if (created.HasValue) { Created = created.Value.ToUniversalTime (); }
+ if (expires.HasValue) { Expires = expires.Value.ToUniversalTime (); }
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
new file mode 100644
index 00000000000..d04010538ab
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
@@ -0,0 +1,55 @@
+//
+// ProtectedKey.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.IdentityModel.Tokens;
+
+namespace System.IdentityModel.Protocols.WSTrust
+{
+ public class ProtectedKey
+ {
+ private byte[] secret;
+
+ public EncryptingCredentials WrappingCredentials { get; private set; }
+
+ public ProtectedKey (byte[] secret) {
+ this.secret = secret;
+ }
+
+ public ProtectedKey (byte[] secret, EncryptingCredentials wrappingCredentials) {
+ this.secret = secret;
+ WrappingCredentials = wrappingCredentials;
+ }
+
+ public byte[] GetKeyBytes () {
+ return secret;
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/CategoryConstruct.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
index 9437868a36e..f374d023a72 100644
--- a/mcs/class/System/System.Text.RegularExpressions/CategoryConstruct.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
@@ -1,12 +1,10 @@
-//
-// CategoryConstruct.jvm.cs
+//
+// RequestSecurityTokenResponse.cs
//
// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,29 +25,31 @@
// 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.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
+using System.IdentityModel.Tokens;
-namespace System.Text.RegularExpressions
+namespace System.IdentityModel.Protocols.WSTrust
{
- sealed class CategoryConstruct : IConstructType
+ public class RequestSecurityTokenResponse : WSTrustMessage
{
- private const string DEFINITION = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823}\\[pP]\{)Is(?=\w+\})";
- private const string IS_CATEGORY = @"In";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- return JavaUtils.IsMatch (pattern, DEFINITION);
- }
+ public bool IsFinal { get; set; }
+ public SecurityKeyIdentifierClause RequestedAttachedReference { get; set; }
+ public RequestedProofToken RequestedProofToken { get; set; }
+ public RequestedSecurityToken RequestedSecurityToken { get; set; }
+ public bool RequestedTokenCancelled { get; set; }
+ public SecurityKeyIdentifierClause RequestedUnattachedReference { get; set; }
+ public Status Status { get; set; }
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
+ public RequestSecurityTokenResponse ()
+ { }
- return JavaUtils.ReplaceAll (reformattedPattern, DEFINITION, IS_CATEGORY);
+ public RequestSecurityTokenResponse (WSTrustMessage message) {
+ Context = message.Context;
+ KeyType = message.KeyType;
+ KeySizeInBits = message.KeySizeInBits;
+ RequestType = message.RequestType;
}
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/Group.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
index 3a2ba99c6cd..098fe44ecf4 100644
--- a/mcs/class/System/System.Text.RegularExpressions/Group.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
@@ -1,12 +1,10 @@
-//
-// Group.jvm.cs
+//
+// RequestedProofToken.cs
//
// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,45 +25,33 @@
// 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.Collections.Generic;
-using System.Text;
+using System.IdentityModel.Tokens;
-namespace System.Text.RegularExpressions
+namespace System.IdentityModel.Protocols.WSTrust
{
- public partial class Group : Capture
+ public class RequestedProofToken
{
- readonly Match _match;
- readonly object _capturesLock = new object ();
- readonly int _groupNumber;
+ public string ComputedKeyAlgorithm { get; private set; }
+ public ProtectedKey ProtectedKey { get; private set; }
- internal int GroupNumber {
- get { return _groupNumber; }
+ public RequestedProofToken (ProtectedKey protectedKey) {
+ ProtectedKey = protectedKey;
}
- public CaptureCollection Captures {
- get {
- lock (_capturesLock) {
- if (captures != null)
- return captures;
- _match.FillMonoCaptures (this);
- }
-
- return captures;
- }
-
- internal set { captures = value; }
+ public RequestedProofToken (Byte[] secret) {
+ ProtectedKey = new ProtectedKey (secret);
}
- // internal
- internal Group (string text, int index, int length, Match match, int groupNumber)
- : base (text, index, length) {
- success = true;
- _match = match;
- _groupNumber = groupNumber;
+ public RequestedProofToken (string computedKeyAlgorithm) {
+ ComputedKeyAlgorithm = computedKeyAlgorithm;
}
+ public RequestedProofToken (Byte[] secret, EncryptingCredentials wrappingCredentials) {
+ ProtectedKey = new ProtectedKey (secret, wrappingCredentials);
+ }
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/BaseTemplateParser.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
index 7a808b62a53..21f2356ec01 100644
--- a/mcs/class/System.Web/System.Web.UI/BaseTemplateParser.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
@@ -1,10 +1,10 @@
+//
+// RequestedSecurityToken.cs
//
-// System.Web.UI.BaseTemplateParser
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -25,27 +25,26 @@
// 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
-#if NET_2_0
using System;
+using System.IdentityModel.Tokens;
+using System.Xml;
-namespace System.Web.UI {
- public abstract class BaseTemplateParser : TemplateParser
+namespace System.IdentityModel.Protocols.WSTrust
+{
+ public class RequestedSecurityToken
{
- protected BaseTemplateParser ()
- {
- throw new NotImplementedException ();
- }
+ public SecurityToken SecurityToken { get; private set; }
+ public virtual XmlElement SecurityTokenXml { get; private set; }
- protected Type GetReferenceType ()
- {
- throw new NotImplementedException ();
+ public RequestedSecurityToken (SecurityToken token) {
+ SecurityToken = token;
}
- protected internal Type GetUserControlType (string virtualPath)
- {
- throw new NotImplementedException ();
+ public RequestedSecurityToken (XmlElement tokenAsXml) {
+ SecurityTokenXml = tokenAsXml;
}
}
}
-#endif
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs
new file mode 100644
index 00000000000..d4cecc7962b
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/Status.cs
@@ -0,0 +1,45 @@
+//
+// Status.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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;
+
+namespace System.IdentityModel.Protocols.WSTrust
+{
+ public class Status
+ {
+ public string Code { get; set; }
+ public string Reason { get; set; }
+
+ public Status (string code, string reason) {
+ Code = code;
+ Reason = reason;
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/RightToLeftOptionConstruct.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs
index 7acc8ec5572..ad75cffe623 100644
--- a/mcs/class/System/System.Text.RegularExpressions/RightToLeftOptionConstruct.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/UseKey.cs
@@ -1,12 +1,10 @@
-//
-// RightToLeftOptionConstruct.jvm.cs
+//
+// UseKey.cs
//
// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,27 +25,33 @@
// 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.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
+using System.IdentityModel.Tokens;
-namespace System.Text.RegularExpressions
+namespace System.IdentityModel.Protocols.WSTrust
{
- sealed class RightToLeftOptionConstruct : IConstructType
+ public class UseKey
{
- public bool HasConstruct (string pattern, RegexOptions options) {
+ public SecurityKeyIdentifier SecurityKeyIdentifier { get; private set; }
+ public SecurityToken Token { get; private set; }
- return (options & RegexOptions.RightToLeft) == RegexOptions.RightToLeft;
- }
+ public UseKey () : this (null, null)
+ { }
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- throw new NotImplementedException ("RightToLeftOptions Reformat is not implemented");
- }
+ public UseKey (SecurityKeyIdentifier ski)
+ : this (ski, null)
+ { }
+
+ public UseKey (SecurityToken token)
+ : this (null, token)
+ { }
+ public UseKey (SecurityKeyIdentifier ski, SecurityToken token) {
+ SecurityKeyIdentifier = ski;
+ Token = token;
+ }
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Drawing/System.Drawing/SolidBrush.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
index 7d0e4df26b0..d4f6f7be8e8 100644
--- a/mcs/class/System.Drawing/System.Drawing/SolidBrush.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
@@ -1,17 +1,10 @@
-//
-// System.Drawing.SolidBrush.cs
+//
+// WSTrustMessage.cs
//
// Author:
-// Dennis Hayes (dennish@Raytek.com)
-// Alexandre Pigolkine(pigolkine@gmx.de)
-// Ravindra (rkumar@novell.com)
-//
-// (C) 2002 Ximian, Inc.
-// (C) 2004 Novell, Inc.
-//
-
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -32,46 +25,34 @@
// 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;
-namespace System.Drawing
+using System.IdentityModel;
+
+namespace System.IdentityModel.Protocols.WSTrust
{
- public sealed class SolidBrush : Brush
+ public abstract class WSTrustMessage : OpenObject
{
- internal bool isModifiable = true;
- Color _color;
-
- protected override java.awt.Paint NativeObject {
- get {
- return _color.NativeObject;
- }
- }
-
- public SolidBrush (Color color)
- {
- _color = color;
- }
-
- public Color Color {
- get {
- return _color;
- }
- set {
- if (isModifiable)
- _color = value;
- else
- throw new ArgumentException ("This SolidBrush object can't be modified.");
- }
- }
-
- public override object Clone()
- {
- return new SolidBrush(_color);
- }
-
- protected override void Dispose (bool disposing)
- {
- if (!isModifiable && disposing)
- throw new ArgumentException ("This SolidBrush object can't be modified.");
- }
+ public bool AllowPostdating { get; set; }
+ public EndpointReference AppliesTo { get; set; }
+ public string AuthenticationType { get; set; }
+ public BinaryExchange BinaryExchange { get; set; }
+ public string CanonicalizationAlgorithm { get; set; }
+ public string Context { get; set; }
+ public string EncryptionAlgorithm { get; set; }
+ public string EncryptWith { get; set; }
+ public Entropy Entropy { get; set; }
+ public int? KeySizeInBits { get; set; }
+ public string KeyType { get; set; }
+ public string KeyWrapAlgorithm { get; set; }
+ public Lifetime Lifetime { get; set; }
+ public string ReplyTo { get; set; }
+ public string RequestType { get; set; }
+ public string SignatureAlgorithm { get; set; }
+ public string SignWith { get; set; }
+ public string TokenType { get; set; }
+ public UseKey UseKey { get; set; }
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs
index 57bde9967cb..94dcef0fc61 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelPageControlBuilder.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AudienceRestriction.cs
@@ -1,12 +1,10 @@
+//
+// AudienceRestriction.cs
//
-// System.Web.UI.FileLevelControlBuilderAttribute.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,27 +25,27 @@
// 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
-#if NET_2_0
-using System.Web.UI;
+using System.Collections.ObjectModel;
+using System.IdentityModel.Selectors;
-namespace System.Web.UI
+namespace System.IdentityModel.Tokens
{
- public class FileLevelPageControlBuilder : RootBuilder
+ public class AudienceRestriction
{
- public FileLevelPageControlBuilder ()
- {
- throw new NotImplementedException ();
- }
- public override void AppendLiteralString (string text)
- {
- throw new NotImplementedException ();
+ public Collection<Uri> AllowedAudienceUris { get; private set; }
+ public AudienceUriMode AudienceMode { get; set; }
+
+ public AudienceRestriction () {
+ AllowedAudienceUris = new Collection<Uri>();
}
- public override void AppendSubBuilder (ControlBuilder subBuilder)
+
+ public AudienceRestriction (AudienceUriMode audienceMode)
+ : this ()
{
- throw new NotImplementedException ();
+ AudienceMode = audienceMode;
}
}
}
-#endif
-
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web/IHttpExtendedWorkerRequest.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs
index 0a0d9793d71..22bb5501bfc 100644
--- a/mcs/class/System.Web/System.Web/IHttpExtendedWorkerRequest.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationContext.cs
@@ -1,7 +1,10 @@
+//
+// AuthenticationContext.cs
//
-// (C) 2007 Mainsoft Corporation (http://www.mainsoft.com)
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -10,10 +13,10 @@
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -22,27 +25,22 @@
// 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.Collections.Generic;
-using System.Text;
-using javax.servlet.http;
+using System.Collections.ObjectModel;
-namespace Mainsoft.Web
+namespace System.IdentityModel.Tokens
{
- public interface IHttpExtendedWorkerRequest
- {
- HttpSession GetSession (bool create);
- }
-
- public interface IHttpUnifyWorkerRequest
+ public class AuthenticationContext
{
- }
+ public Collection<string> Authorities { get; private set; }
+ public string ContextClass { get; set; }
+ public string ContextDeclaration { get; set; }
- public class UnifyRequestException : Exception
- {
- public UnifyRequestException (Exception innerException)
- : base (String.Empty, innerException) {
+ public AuthenticationContext () {
+ Authorities = new Collection<string> ();
}
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs
new file mode 100644
index 00000000000..b5aa22e8059
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/AuthenticationInformation.cs
@@ -0,0 +1,47 @@
+//
+// AuthenticationInformation.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections.ObjectModel;
+using System.IdentityModel.Tokens;
+
+namespace System.Security.Claims
+{
+ public class AuthenticationInformation
+ {
+ private Collection<AuthenticationContext> authorizationContexts = new Collection<AuthenticationContext> ();
+
+ public String Address { get; set; }
+ public Collection<AuthenticationContext> AuthorizationContexts { get { return authorizationContexts; } }
+ public String DnsName { get; set; }
+ public Nullable<DateTime> NotOnOrAfter { get; set; }
+ public String Session { get; set; }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs
new file mode 100644
index 00000000000..c47d45ae79e
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptingCredentials.cs
@@ -0,0 +1,50 @@
+//
+// EncryptingCredentials.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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;
+
+namespace System.IdentityModel.Tokens
+{
+ public class EncryptingCredentials
+ {
+ public string Algorithm { get; set; }
+ public SecurityKey SecurityKey { get; set; }
+ public SecurityKeyIdentifier SecurityKeyIdentifier { get; set; }
+
+ public EncryptingCredentials ()
+ { }
+
+ public EncryptingCredentials (SecurityKey key, SecurityKeyIdentifier keyIdentifier, string algorithm) {
+ SecurityKey = key;
+ SecurityKeyIdentifier = keyIdentifier;
+ Algorithm = algorithm;
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs
index 243b466b21b..ad1d2f96a57 100644
--- a/mcs/class/System.Web/System.Web.UI/SessionPageStatePersister.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/IssuerNameRegistry.cs
@@ -1,12 +1,10 @@
+//
+// IssuerNameRegistry.cs
//
-// System.Web.UI.SessionPageStatePersister.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,28 +25,31 @@
// 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
-#if NET_2_0
-using System.Web.UI;
+using System.IdentityModel.Configuration;
+using System.Xml;
-namespace System.Web.UI
+namespace System.IdentityModel.Tokens
{
- public class SessionPageStatePersister : PageStatePersister
+ public abstract class IssuerNameRegistry : ICustomIdentityConfiguration
{
- public SessionPageStatePersister (Page page):base(page)
- {
+ public abstract string GetIssuerName (SecurityToken securityToken);
+
+ [MonoTODO]
+ public virtual string GetIssuerName (SecurityToken securityToken, System.String requestedIssuerName) {
throw new NotImplementedException ();
}
- public override void Load ()
- {
+ [MonoTODO]
+ public virtual string GetWindowsIssuerName() {
throw new NotImplementedException ();
}
- public override void Save ()
- {
+ [MonoTODO]
+ public virtual void LoadCustomConfiguration(XmlNodeList nodelist) {
throw new NotImplementedException ();
}
}
}
-#endif
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs
new file mode 100644
index 00000000000..74bcb6fa748
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/ProofDescriptor.cs
@@ -0,0 +1,41 @@
+//
+// ProofDescriptor.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.IdentityModel.Protocols.WSTrust;
+
+namespace System.IdentityModel.Tokens
+{
+ public abstract class ProofDescriptor
+ {
+ public abstract SecurityKeyIdentifier KeyIdentifier { get; }
+
+ public abstract void ApplyTo (RequestSecurityTokenResponse response);
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs
index 5ded54d99d1..1dba4954631 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs
@@ -68,6 +68,8 @@ namespace System.IdentityModel.Tokens
return nonce != null ? (byte []) nonce.Clone () : null;
}
+ public string Id { get; set; }
+
public virtual SecurityKey CreateKey ()
{
throw new NotSupportedException (String.Format ("This '{0}' identifier clause does not support key creation.", GetType ()));
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
new file mode 100644
index 00000000000..52b8681bac0
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
@@ -0,0 +1,74 @@
+//
+// SecurityTokenDescriptor.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+using System.IdentityModel.Protocols.WSTrust;
+using System.Security.Claims;
+
+namespace System.IdentityModel.Tokens
+{
+ public class SecurityTokenDescriptor
+ {
+ private Dictionary<string, Object> properties = new Dictionary<string, object> ();
+
+ public string AppliesToAddress { get; set; }
+ public SecurityKeyIdentifierClause AttachedReference { get; set; }
+ public AuthenticationInformation AuthenticationInfo { get; set; }
+ public EncryptingCredentials EncryptingCredentials { get; set; }
+ public Lifetime Lifetime { get; set; }
+ public ProofDescriptor Proof { get; set; }
+ public Dictionary<string, Object> Properties { get { return properties; } }
+ public string ReplyToAddress { get; set; }
+ public SigningCredentials SigningCredentials { get; set; }
+ public ClaimsIdentity Subject { get; set; }
+ public SecurityToken Token { get; set; }
+ public string TokenIssuerName { get; set; }
+ public string TokenType { get; set; }
+ public SecurityKeyIdentifierClause UnattachedReference { get; set; }
+
+ [MonoTODO]
+ public void AddAuthenticationClaims (string authType) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void AddAuthenticationClaims (string authType, DateTime time) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual void ApplyTo (RequestSecurityTokenResponse response) {
+ throw new NotImplementedException ();
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs
new file mode 100644
index 00000000000..5dec724b948
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandler.cs
@@ -0,0 +1,123 @@
+//
+// SecurityTokenHandler.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections.ObjectModel;
+using System.IdentityModel.Configuration;
+using System.IdentityModel.Selectors;
+using System.Security.Claims;
+using System.Xml;
+
+namespace System.IdentityModel.Tokens
+{
+ public abstract class SecurityTokenHandler : ICustomIdentityConfiguration
+ {
+ public virtual bool CanValidateToken { get { return false; } }
+ public virtual bool CanWriteToken { get { return false; } }
+ public SecurityTokenHandlerConfiguration Configuration { get; set; }
+ public SecurityTokenHandlerCollection ContainingCollection { get; internal set; }
+ public abstract Type TokenType { get; }
+
+ public virtual bool CanReadKeyIdentifierClause (XmlReader reader) {
+ return false;
+ }
+
+ public virtual bool CanReadToken (string tokenString) {
+ return false;
+ }
+
+ public virtual bool CanReadToken (XmlReader reader) {
+ return false;
+ }
+
+ public virtual bool CanWriteKeyIdentifierClause (SecurityKeyIdentifierClause securityKeyIdentifierClause) {
+ return false;
+ }
+
+ public virtual SecurityKeyIdentifierClause CreateSecurityTokenReference (SecurityToken token, bool attached) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SecurityToken CreateToken (SecurityTokenDescriptor tokenDescriptor) {
+ throw new NotImplementedException ();
+ }
+
+ protected virtual void DetectReplayedToken (SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ public abstract string[] GetTokenTypeIdentifiers ();
+
+ public virtual void LoadCustomConfiguration (XmlNodeList nodelist) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SecurityKeyIdentifierClause ReadKeyIdentifierClause (XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+
+ public virtual SecurityToken ReadToken (string tokenString) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SecurityToken ReadToken (XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual SecurityToken ReadToken (XmlReader reader, SecurityTokenResolver tokenResolver) {
+ return this.ReadToken (reader);
+ }
+
+ protected void TraceTokenValidationFailure (SecurityToken token, string errorMessage) {
+ throw new NotImplementedException ();
+ }
+
+ protected void TraceTokenValidationSuccess (SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual ReadOnlyCollection<ClaimsIdentity> ValidateToken (SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void WriteKeyIdentifierClause (XmlWriter writer, SecurityKeyIdentifierClause securityKeyIdentifierClause) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual string WriteToken (SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ public virtual void WriteToken (XmlWriter writer, SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
new file mode 100644
index 00000000000..a3a3fcea8b1
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
@@ -0,0 +1,197 @@
+//
+// SecurityTokenHandlerCollection.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IdentityModel.Selectors;
+using System.Security.Claims;
+using System.Xml;
+
+namespace System.IdentityModel.Tokens
+{
+ public class SecurityTokenHandlerCollection : Collection<SecurityTokenHandler>
+ {
+ private SecurityTokenHandlerConfiguration config;
+ private IEnumerable<string> tokenTypeIdentifiers = new List<string> ();
+ private IEnumerable<Type> tokenTypes = new List<Type> ();
+
+ public SecurityTokenHandlerConfiguration Configuration { get { return this.config; } }
+ public IEnumerable<string> TokenTypeIdentifiers { get { return tokenTypeIdentifiers; } }
+ public IEnumerable<Type> TokenTypes { get { return tokenTypes; } }
+ public SecurityTokenHandler this[SecurityToken token] {
+ get {
+ if (token == null) { return null; }
+
+ return this[token.GetType ()];
+ }
+ }
+ [MonoTODO]
+ public SecurityTokenHandler this[string tokenTypeIdentifier] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+ [MonoTODO]
+ public SecurityTokenHandler this[Type tokenType] {
+ get {
+ throw new NotImplementedException ();
+ }
+ }
+
+ public SecurityTokenHandlerCollection ()
+ : this(new SecurityTokenHandlerConfiguration ())
+ { }
+
+ public SecurityTokenHandlerCollection (SecurityTokenHandlerConfiguration configuration) {
+ config = configuration;
+ }
+
+ public SecurityTokenHandlerCollection (IEnumerable<SecurityTokenHandler> handlers)
+ : this (handlers, new SecurityTokenHandlerConfiguration ())
+ { }
+
+ public SecurityTokenHandlerCollection (IEnumerable<SecurityTokenHandler> handlers, SecurityTokenHandlerConfiguration configuration) : this (configuration) {
+ foreach (var handler in handlers) {
+ Add (handler);
+ }
+ }
+
+ [MonoTODO]
+ public void AddOrReplace(SecurityTokenHandler handler) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public bool CanReadKeyIdentifierClause(XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected virtual bool CanReadKeyIdentifierClauseCore(XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public bool CanReadToken(string tokenString) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public bool CanReadToken(XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public bool CanWriteToken(SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected override void ClearItems() {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static SecurityTokenHandlerCollection CreateDefaultSecurityTokenHandlerCollection() {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static SecurityTokenHandlerCollection CreateDefaultSecurityTokenHandlerCollection(SecurityTokenHandlerConfiguration configuration) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SecurityToken CreateToken(SecurityTokenDescriptor tokenDescriptor) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected override void InsertItem(int index, SecurityTokenHandler item) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SecurityKeyIdentifierClause ReadKeyIdentifierClause(XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected virtual SecurityKeyIdentifierClause ReadKeyIdentifierClauseCore(XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SecurityToken ReadToken(string tokenString) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public SecurityToken ReadToken(XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected override void RemoveItem(int index) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected override void SetItem(int index, SecurityTokenHandler item) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public ReadOnlyCollection<ClaimsIdentity> ValidateToken(SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void WriteKeyIdentifierClause(XmlWriter writer, SecurityKeyIdentifierClause keyIdentifierClause) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected virtual void WriteKeyIdentifierClauseCore(XmlWriter writer, SecurityKeyIdentifierClause keyIdentifierClause) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public string WriteToken(SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public void WriteToken(XmlWriter writer, SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
new file mode 100644
index 00000000000..00e967fe148
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
@@ -0,0 +1,66 @@
+//
+// SecurityTokenHandlerConfiguration.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.IdentityModel.Configuration;
+using System.IdentityModel.Selectors;
+using System.Security.Cryptography.X509Certificates;
+using System.ServiceModel.Security;
+
+namespace System.IdentityModel.Tokens
+{
+ public class SecurityTokenHandlerConfiguration
+ {
+ public static readonly X509CertificateValidationMode DefaultCertificateValidationMode;
+ public static readonly X509CertificateValidator DefaultCertificateValidator;
+ public static readonly bool DefaultDetectReplayedTokens;
+ public static readonly IssuerNameRegistry DefaultIssuerNameRegistry;
+ public static readonly SecurityTokenResolver DefaultIssuerTokenResolver;
+ public static readonly TimeSpan DefaultMaxClockSkew;
+ public static readonly X509RevocationMode DefaultRevocationMode;
+ public static readonly bool DefaultSaveBootstrapContext;
+ public static readonly TimeSpan DefaultTokenReplayCacheExpirationPeriod;
+ public static readonly StoreLocation DefaultTrustedStoreLocation;
+
+ public AudienceRestriction AudienceRestriction { get; set; }
+ public IdentityModelCaches Caches { get; set; }
+ public X509CertificateValidationMode CertificateValidationMode { get; set; }
+ public X509CertificateValidator CertificateValidator { get; set; }
+ public bool DetectReplayedTokens { get; set; }
+ public IssuerNameRegistry IssuerNameRegistry { get; set; }
+ public SecurityTokenResolver IssuerTokenResolver { get; set; }
+ public TimeSpan MaxClockSkew { get; set; }
+ public X509RevocationMode RevocationMode { get; set; }
+ public bool SaveBootstrapContext { get; set; }
+ public SecurityTokenResolver ServiceTokenResolver { get; set; }
+ public TimeSpan TokenReplayCacheExpirationPeriod { get; set; }
+ public StoreLocation TrustedStoreLocation { get; set; }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs
new file mode 100644
index 00000000000..de60b68b10f
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityToken.cs
@@ -0,0 +1,109 @@
+//
+// SessionSecurityToken.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections.ObjectModel;
+using System.Runtime.Serialization;
+using System.Security.Claims;
+using System.Xml;
+
+namespace System.IdentityModel.Tokens
+{
+ [Serializable]
+ public class SessionSecurityToken : SecurityToken
+ {
+ private ReadOnlyCollection<SecurityKey> securityKeys;
+ private DateTime validFrom;
+ private DateTime validTo;
+
+ public ClaimsPrincipal ClaimsPrincipal { get; private set; }
+ public string Context { get; private set; }
+ public UniqueId ContextId { get; private set; }
+ public string EndpointId { get; private set; }
+ [MonoTODO]
+ public override string Id { get { throw new NotImplementedException (); } }
+ public bool IsPersistent { get; set; }
+ public bool IsReferenceMode { get; set; }
+ public DateTime KeyEffectiveTime { get; private set; }
+ public DateTime KeyExpirationTime { get; private set; }
+ public UniqueId KeyGeneration { get; private set; }
+ public Uri SecureConversationVersion { get; private set; }
+ public override ReadOnlyCollection<SecurityKey> SecurityKeys { get { return securityKeys; } }
+ public override DateTime ValidFrom { get { return validFrom; } }
+ public override DateTime ValidTo { get { return validTo; } }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal)
+ : this (claimsPrincipal, null)
+ { }
+
+ protected SessionSecurityToken (SerializationInfo info, StreamingContext context) {
+ throw new NotImplementedException ();
+ }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal, string context)
+ : this (claimsPrincipal, context, DateTime.UtcNow, DateTime.UtcNow + SessionSecurityTokenHandler.DefaultTokenLifetime)
+ { }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal, TimeSpan lifetime)
+ : this (claimsPrincipal, null, DateTime.UtcNow, DateTime.UtcNow + lifetime)
+ { }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal, string context, DateTime? validFrom, DateTime? validTo)
+ : this (claimsPrincipal, new UniqueId (), context, String.Empty, validFrom, validTo, null)
+ { }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal, string context, string endpointId, DateTime? validFrom, DateTime? validTo)
+ : this(claimsPrincipal, new UniqueId (), context, endpointId, validFrom, validTo, null)
+ { }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal, UniqueId contextId, string context, string endpointId, TimeSpan lifetime, SymmetricSecurityKey key)
+ : this (claimsPrincipal, contextId, context, endpointId, DateTime.UtcNow, lifetime, key)
+ { }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal, UniqueId contextId, string context, string endpointId, DateTime validFrom, TimeSpan lifetime, SymmetricSecurityKey key)
+ : this (claimsPrincipal, contextId, context, endpointId, validFrom, validFrom + lifetime, key)
+ { }
+
+ public SessionSecurityToken (ClaimsPrincipal claimsPrincipal, UniqueId contextId, string context, string endpointId, DateTime? validFrom, DateTime? validTo, SymmetricSecurityKey key) {
+ ClaimsPrincipal = claimsPrincipal;
+ ContextId = contextId;
+ Context = context;
+ EndpointId = endpointId;
+ validFrom = (validFrom.HasValue) ? validFrom.Value.ToUniversalTime () : DateTime.UtcNow;
+ validTo = (validTo.HasValue) ? validTo.Value.ToUniversalTime () : ValidFrom + SessionSecurityTokenHandler.DefaultTokenLifetime;
+ securityKeys = new ReadOnlyCollection<SecurityKey> (new SecurityKey[] { new InMemorySymmetricSecurityKey ((key == null) ? null : key.GetSymmetricKey ()) });
+ }
+
+ [MonoTODO]
+ public virtual void GetObjectData (SerializationInfo info, StreamingContext context) {
+ throw new NotImplementedException ();
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/AlternationExpressionConstruct.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
index 896fd502d9f..c3c8739bcda 100644
--- a/mcs/class/System/System.Text.RegularExpressions/AlternationExpressionConstruct.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
@@ -1,12 +1,10 @@
-//
-// AlternationExpressionConstruct.jvm.cs
+//
+// SessionSecurityTokenCache.cs
//
// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,28 +25,27 @@
// 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.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
+using System.IdentityModel.Configuration;
+using System.Xml;
-namespace System.Text.RegularExpressions
+namespace System.IdentityModel.Tokens
{
- sealed class AlternationExpressionConstruct : IConstructType
+ public abstract class SessionSecurityTokenCache : ICustomIdentityConfiguration
{
- private const string DEFINITION = @"\(\?\([^\)]+\).*\|?.*\)";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- return JavaUtils.IsMatch (pattern, DEFINITION);
- }
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- throw new NotImplementedException ("Reformat for alternation construct with expression is not implemented.");
+ public abstract void AddOrUpdate (SessionSecurityTokenCacheKey key, SessionSecurityToken value, DateTime expiryTime);
+ public abstract SessionSecurityToken Get (SessionSecurityTokenCacheKey key);
+ public abstract IEnumerable<SessionSecurityToken> GetAll (string endpointId, UniqueId contextId);
+ [MonoTODO]
+ public virtual void LoadCustomConfiguration (XmlNodeList nodelist) {
+ throw new NotImplementedException ();
}
+ public abstract void Remove (SessionSecurityTokenCacheKey key);
+ public abstract void RemoveAll (string endpointId);
+ public abstract void RemoveAll (string endpointId, UniqueId contextId);
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateBuilder.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
index 4e224339a3c..943c75bcb94 100644
--- a/mcs/class/System.Web/System.Web.UI/TemplateBuilder.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
@@ -1,11 +1,10 @@
+//
+// SessionSecurityTokenCacheKey.cs
//
-// System.Web.UI.TemplateBuilder
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -26,63 +25,50 @@
// 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.Collections;
-using System.Reflection;
-using System.Security.Permissions;
-#if NET_2_0
-using System.ComponentModel;
-#endif
-
-namespace System.Web.UI {
-
- public class TemplateBuilder : ControlBuilder, ITemplate {
+using System;
+using System.Xml;
- public TemplateBuilder ()
- {
+namespace System.IdentityModel.Tokens
+{
+ public class SessionSecurityTokenCacheKey
+ {
+ [MonoTODO]
+ public static bool operator !=(SessionSecurityTokenCacheKey first, SessionSecurityTokenCacheKey second) {
throw new NotImplementedException ();
}
- public virtual string Text {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-
-#if NET_2_0
- public override object BuildObject ()
- {
- throw new NotImplementedException ();
+ [MonoTODO]
+ public static bool operator ==(SessionSecurityTokenCacheKey first, SessionSecurityTokenCacheKey second) {
+ throw new NotImplementedException ();
}
-#endif
- public override void Init (TemplateParser parser,
- ControlBuilder parentBuilder,
- Type type,
- string tagName,
- string ID,
- IDictionary attribs)
- {
- throw new NotImplementedException ();
+ public UniqueId ContextId { get; private set; }
+ public string EndpointId { get; private set; }
+ public bool IgnoreKeyGeneration { get; set; }
+ public UniqueId KeyGeneration { get; private set; }
+
+ public SessionSecurityTokenCacheKey (string endpointId, UniqueId contextId, UniqueId keyGeneration) {
+ EndpointId = endpointId;
+ ContextId = contextId;
+ KeyGeneration = keyGeneration;
}
-
- public virtual void InstantiateIn (Control container)
- {
+
+ [MonoTODO]
+ public override bool Equals (System.Object obj) {
throw new NotImplementedException ();
}
- public override bool NeedsTagInnerText ()
- {
+ [MonoTODO]
+ public override int GetHashCode () {
throw new NotImplementedException ();
}
- public override void SetTagInnerText (string text)
- {
+ [MonoTODO]
+ public override string ToString () {
throw new NotImplementedException ();
}
}
}
-
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
new file mode 100644
index 00000000000..58f18fa2b71
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
@@ -0,0 +1,148 @@
+//
+// SessionSecurityTokenHandler.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IdentityModel.Selectors;
+using System.Security.Claims;
+using System.Xml;
+
+namespace System.IdentityModel.Tokens
+{
+ public class SessionSecurityTokenHandler : SecurityTokenHandler
+ {
+ public static readonly ReadOnlyCollection<CookieTransform> DefaultCookieTransforms;
+ public static readonly TimeSpan DefaultLifetime = TimeSpan.FromHours (10);
+
+ private bool canValidateToken;
+ private bool canWriteToken;
+ private string cookieElementName;
+ private string cookieNamespace;
+ private Type tokenType;
+
+ public override bool CanValidateToken { get { return canValidateToken; } }
+ public override bool CanWriteToken { get { return canWriteToken; } }
+ public virtual string CookieElementName { get { return cookieElementName; } }
+ public virtual string CookieNamespace { get { return cookieNamespace; } }
+ public static TimeSpan DefaultTokenLifetime { get { return SessionSecurityTokenHandler.DefaultLifetime; } }
+ public virtual TimeSpan TokenLifetime { get; set; }
+ public override Type TokenType { get { return tokenType; } }
+ public ReadOnlyCollection<CookieTransform> Transforms { get; private set; }
+
+ public SessionSecurityTokenHandler ()
+ : this (SessionSecurityTokenHandler.DefaultCookieTransforms)
+ { }
+
+ public SessionSecurityTokenHandler (ReadOnlyCollection<CookieTransform> transforms)
+ : this (transforms, SessionSecurityTokenHandler.DefaultLifetime)
+ { }
+
+ public SessionSecurityTokenHandler (ReadOnlyCollection<CookieTransform> transforms, TimeSpan tokenLifetime) {
+ Transforms = transforms;
+ TokenLifetime = tokenLifetime;
+ }
+
+ [MonoTODO]
+ protected virtual byte[] ApplyTransforms (byte[] cookie, bool outbound) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override bool CanReadToken (XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual SessionSecurityToken CreateSessionSecurityToken (ClaimsPrincipal principal, string context, string endpointId, DateTime validFrom, DateTime validTo) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override SecurityToken CreateToken (SecurityTokenDescriptor tokenDescriptor) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override string[] GetTokenTypeIdentifiers () {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override void LoadCustomConfiguration (XmlNodeList customConfigElements) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override SecurityToken ReadToken (XmlReader reader) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual SecurityToken ReadToken (byte[] token, SecurityTokenResolver tokenResolver) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override SecurityToken ReadToken(XmlReader reader, SecurityTokenResolver tokenResolver) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected void SetTransforms (IEnumerable<CookieTransform> transforms) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ protected virtual void ValidateSession (SessionSecurityToken securityToken) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override ReadOnlyCollection<ClaimsIdentity> ValidateToken (SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual ReadOnlyCollection<ClaimsIdentity> ValidateToken (SessionSecurityToken token, string endpointId) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public virtual byte[] WriteToken (SessionSecurityToken sessionToken) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public override void WriteToken (XmlWriter writer, SecurityToken token) {
+ throw new NotImplementedException ();
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/SkinBuilder.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs
index f413206d8bd..9f6d4359981 100644
--- a/mcs/class/System.Web/System.Web.UI/SkinBuilder.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/TokenReplayCache.cs
@@ -1,10 +1,10 @@
+//
+// TokenReplayCache.cs
//
-// System.Web.UI.SkinBuilder.cs
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-// (C) 2006 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -25,27 +25,28 @@
// 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
-#if NET_2_0
-
-namespace System.Web.UI {
+using System;
+using System.IdentityModel.Configuration;
+using System.Xml;
- public sealed class SkinBuilder : ControlBuilder
+namespace System.IdentityModel.Tokens
+{
+ public abstract class TokenReplayCache : ICustomIdentityConfiguration
{
- public SkinBuilder (ThemeProvider provider,
- Control control,
- ControlBuilder skinBuilder,
- string themePath)
- {
- throw new NotImplementedException ();
- }
+ public abstract void AddOrUpdate (string key, SecurityToken securityToken, DateTime expirationTime);
+
+ public abstract bool Contains (string key);
- public Control ApplyTheme ()
- {
+ public abstract SecurityToken Get (string key);
+
+ [MonoTODO]
+ public virtual void LoadCustomConfiguration (XmlNodeList nodelist) {
throw new NotImplementedException ();
}
- }
+ public abstract void Remove (string key);
+ }
}
-
-#endif
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs
index 4963c7a8787..7221e34d1e3 100644
--- a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs
@@ -84,24 +84,62 @@ namespace System.IdentityModel.Tokens
switch (algorithm) {
//case SignedXml.XmlDsigDSAUrl: // it is documented as supported, but it isn't in reality and it wouldn't be possible.
case SignedXml.XmlDsigRSASHA1Url:
- return new HMACSHA1 ();
+ return new SHA1Managed ();
case SecurityAlgorithms.RsaSha256Signature:
- return new HMACSHA256 ();
+ return new SHA256Managed ();
default:
throw new NotSupportedException (String.Format ("'{0}' Hash algorithm is not supported in this security key.", algorithm));
}
}
- [MonoTODO]
public override AsymmetricSignatureDeformatter GetSignatureDeformatter (string algorithm)
{
- throw new NotImplementedException ();
+ switch (algorithm) {
+ //case SignedXml.XmlDsigDSAUrl:
+ // DSA dsa = (cert.PublicKey.Key as DSA);
+ // if (dsa == null) {
+ // throw new NotSupportedException (String.Format ("The certificate does not contain DSA public key while '{0}' requires it.", algorithm));
+ // }
+ // else {
+ // return new DSASignatureDeformatter(dsa);
+ // }
+ case SignedXml.XmlDsigRSASHA1Url:
+ case SecurityAlgorithms.RsaSha256Signature:
+ RSA rsa = (cert.PublicKey.Key as RSA);
+ if (rsa == null) {
+ throw new NotSupportedException (String.Format ("The certificate does not contain RSA public key while '{0}' requires it.", algorithm));
+ }
+ else {
+ return new RSAPKCS1SignatureDeformatter (rsa);
+ }
+ default:
+ throw new NotSupportedException (String.Format ("'{0}' Hash algorithm is not supported in this security key.", algorithm));
+ }
}
- [MonoTODO]
public override AsymmetricSignatureFormatter GetSignatureFormatter (string algorithm)
{
- throw new NotImplementedException ();
+ switch (algorithm) {
+ //case SignedXml.XmlDsigDSAUrl:
+ // DSA dsa = (cert.PrivateKey as DSA);
+ // if (dsa == null) {
+ // throw new NotSupportedException (String.Format ("The certificate does not contain DSA private key while '{0}' requires it.", algorithm));
+ // }
+ // else {
+ // return new DSASignatureFormatter(dsa);
+ // }
+ case SignedXml.XmlDsigRSASHA1Url:
+ case SecurityAlgorithms.RsaSha256Signature:
+ RSA rsa = (cert.PrivateKey as RSA);
+ if (rsa == null) {
+ throw new NotSupportedException (String.Format ("The certificate does not contain RSA private key while '{0}' requires it.", algorithm));
+ }
+ else {
+ return new RSAPKCS1SignatureFormatter (rsa);
+ }
+ default:
+ throw new NotSupportedException (String.Format ("'{0}' Hash algorithm is not supported in this security key.", algorithm));
+ }
}
public override bool HasPrivateKey ()
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs
new file mode 100644
index 00000000000..eeabc38551f
--- /dev/null
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SigningCredentials.cs
@@ -0,0 +1,62 @@
+//
+// X509SigningCredentials.cs
+//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
+//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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.Security.Cryptography.X509Certificates;
+
+namespace System.IdentityModel.Tokens
+{
+ public class X509SigningCredentials : SigningCredentials
+ {
+ public X509Certificate2 Certificate { get; private set; }
+
+ public X509SigningCredentials (X509Certificate2 certificate)
+ : this (certificate, X509SigningCredentials.GetSecurityKeyIdentifier (certificate), SecurityAlgorithms.RsaSha256Signature, SecurityAlgorithms.Sha256Digest)
+ { }
+
+ public X509SigningCredentials (X509Certificate2 certificate, SecurityKeyIdentifier ski)
+ : this (certificate, ski, SecurityAlgorithms.RsaSha256Signature, SecurityAlgorithms.Sha256Digest)
+ { }
+
+ public X509SigningCredentials (X509Certificate2 certificate, string signatureAlgorithm, string digestAlgorithm)
+ : this (certificate, X509SigningCredentials.GetSecurityKeyIdentifier (certificate), signatureAlgorithm, digestAlgorithm)
+ { }
+
+ public X509SigningCredentials (X509Certificate2 certificate, SecurityKeyIdentifier ski, string signatureAlgorithm, string digestAlgorithm)
+ : base (new X509SecurityToken (certificate).SecurityKeys[0], signatureAlgorithm, digestAlgorithm, ski)
+ {
+ Certificate = certificate;
+ }
+
+ private static SecurityKeyIdentifier GetSecurityKeyIdentifier (X509Certificate2 certificate) {
+ return new SecurityKeyIdentifier (new X509SecurityToken (certificate).CreateKeyIdentifierClause<X509RawDataKeyIdentifierClause> ());
+ }
+ }
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.csproj b/mcs/class/System.IdentityModel/System.IdentityModel.csproj
deleted file mode 100644
index 6f246eee313..00000000000
--- a/mcs/class/System.IdentityModel/System.IdentityModel.csproj
+++ /dev/null
@@ -1,165 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{439D4BD2-AC46-4CE4-81DE-6AE171EC2D79}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.IdentityModel</RootNamespace>
- <AssemblyName>System.IdentityModel</AssemblyName>
- <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Security" />
- <Reference Include="System.Web" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- <Compile Include="System.IdentityModel.Claims\Claim.cs" />
- <Compile Include="System.IdentityModel.Claims\ClaimSet.cs" />
- <Compile Include="System.IdentityModel.Claims\ClaimTypes.cs" />
- <Compile Include="System.IdentityModel.Claims\DefaultClaimSet.cs" />
- <Compile Include="System.IdentityModel.Claims\Rights.cs" />
- <Compile Include="System.IdentityModel.Claims\WindowsClaimSet.cs" />
- <Compile Include="System.IdentityModel.Claims\X509CertificateClaimSet.cs" />
- <Compile Include="System.IdentityModel.Policy\AuthorizationContext.cs" />
- <Compile Include="System.IdentityModel.Policy\EvaluationContext.cs" />
- <Compile Include="System.IdentityModel.Policy\IAuthorizationComponent.cs" />
- <Compile Include="System.IdentityModel.Policy\IAuthorizationPolicy.cs" />
- <Compile Include="System.IdentityModel.Selectors\AudienceUriMode.cs" />
- <Compile Include="System.IdentityModel.Selectors\CustomUserNameSecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\KerberosSecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\KerberosSecurityTokenProvider.cs" />
- <Compile Include="System.IdentityModel.Selectors\RsaSecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\SamlSecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\SecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\SecurityTokenManager.cs" />
- <Compile Include="System.IdentityModel.Selectors\SecurityTokenProvider.cs" />
- <Compile Include="System.IdentityModel.Selectors\SecurityTokenRequirement.cs" />
- <Compile Include="System.IdentityModel.Selectors\SecurityTokenResolver.cs" />
- <Compile Include="System.IdentityModel.Selectors\SecurityTokenSerializer.cs" />
- <Compile Include="System.IdentityModel.Selectors\SecurityTokenVersion.cs" />
- <Compile Include="System.IdentityModel.Selectors\SystemIdentityAuthorizationPolicy.cs" />
- <Compile Include="System.IdentityModel.Selectors\UserNamePasswordValidator.cs" />
- <Compile Include="System.IdentityModel.Selectors\UserNameSecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\UserNameSecurityTokenProvider.cs" />
- <Compile Include="System.IdentityModel.Selectors\WindowsSecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\WindowsUserNameSecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\X509CertificateValidator.cs" />
- <Compile Include="System.IdentityModel.Selectors\X509SecurityTokenAuthenticator.cs" />
- <Compile Include="System.IdentityModel.Selectors\X509SecurityTokenProvider.cs" />
- <Compile Include="System.IdentityModel.Tokens\AsymmetricSecurityKey.cs" />
- <Compile Include="System.IdentityModel.Tokens\BinaryKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\EncryptedKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\GenericXmlSecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\InMemorySymmetricSecurityKey.cs" />
- <Compile Include="System.IdentityModel.Tokens\KerberosReceiverSecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\KerberosRequestorSecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\LocalIdKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\RsaKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\RsaSecurityKey.cs" />
- <Compile Include="System.IdentityModel.Tokens\RsaSecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAccessDecision.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAction.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAdvice.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAssertion.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAssertionKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAttribute.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAttributeStatement.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAudienceRestrictionCondition.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAuthenticationClaimResource.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAuthenticationStatement.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAuthorityBinding.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAuthorizationDecisionClaimResource.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlAuthorizationDecisionStatement.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlCondition.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlConditions.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlConstants.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlDoNotCacheCondition.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlEvidence.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlNameIdentifierClaimResource.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlSecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlSerializer.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlStatement.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlSubject.cs" />
- <Compile Include="System.IdentityModel.Tokens\SamlSubjectStatement.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityAlgorithms.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityKey.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityKeyIdentifier.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityKeyType.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityKeyUsage.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityTokenException.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityTokenTypes.cs" />
- <Compile Include="System.IdentityModel.Tokens\SecurityTokenValidationException.cs" />
- <Compile Include="System.IdentityModel.Tokens\SigningCredentials.cs" />
- <Compile Include="System.IdentityModel.Tokens\SymmetricSecurityKey.cs" />
- <Compile Include="System.IdentityModel.Tokens\TlsHMAC.cs" />
- <Compile Include="System.IdentityModel.Tokens\UserNameSecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\WindowsSecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\X509AsymmetricSecurityKey.cs" />
- <Compile Include="System.IdentityModel.Tokens\X509IssuerSerialKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\X509RawDataKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\X509SecurityToken.cs" />
- <Compile Include="System.IdentityModel.Tokens\X509SubjectKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\X509ThumbprintKeyIdentifierClause.cs" />
- <Compile Include="System.IdentityModel.Tokens\X509WindowsSecurityToken.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PostBuildEvent>
-@rem "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "$(TargetPath)" /f
-@rem "C:\Program Files\Mono-1.2.6\bin\gacutil.bat" -i "$(TargetPath)"</PostBuildEvent>
- </PropertyGroup>
-</Project>
diff --git a/mcs/class/System.IdentityModel/System.IdentityModel.dll.sources b/mcs/class/System.IdentityModel/System.IdentityModel.dll.sources
index 5ee6bcd63f6..32942efdb5c 100755
--- a/mcs/class/System.IdentityModel/System.IdentityModel.dll.sources
+++ b/mcs/class/System.IdentityModel/System.IdentityModel.dll.sources
@@ -1,6 +1,8 @@
../../build/common/Consts.cs
../../build/common/MonoTODOAttribute.cs
Assembly/AssemblyInfo.cs
+System.IdentityModel/CookieTransform.cs
+System.IdentityModel/OpenObject.cs
System.IdentityModel.Claims/Claim.cs
System.IdentityModel.Claims/ClaimSet.cs
System.IdentityModel.Claims/ClaimTypes.cs
@@ -8,10 +10,23 @@ System.IdentityModel.Claims/DefaultClaimSet.cs
System.IdentityModel.Claims/Rights.cs
System.IdentityModel.Claims/WindowsClaimSet.cs
System.IdentityModel.Claims/X509CertificateClaimSet.cs
+System.IdentityModel.Configuration/ICustomIdentityConfiguration.cs
+System.IdentityModel.Configuration/IdentityModelCaches.cs
System.IdentityModel.Policy/AuthorizationContext.cs
System.IdentityModel.Policy/EvaluationContext.cs
System.IdentityModel.Policy/IAuthorizationComponent.cs
System.IdentityModel.Policy/IAuthorizationPolicy.cs
+System.IdentityModel.Protocols/WSTrust/BinaryExchange.cs
+System.IdentityModel.Protocols/WSTrust/EndpointReference.cs
+System.IdentityModel.Protocols/WSTrust/Entropy.cs
+System.IdentityModel.Protocols/WSTrust/Lifetime.cs
+System.IdentityModel.Protocols/WSTrust/ProtectedKey.cs
+System.IdentityModel.Protocols/WSTrust/RequestSecurityTokenResponse.cs
+System.IdentityModel.Protocols/WSTrust/RequestedProofToken.cs
+System.IdentityModel.Protocols/WSTrust/RequestedSecurityToken.cs
+System.IdentityModel.Protocols/WSTrust/Status.cs
+System.IdentityModel.Protocols/WSTrust/UseKey.cs
+System.IdentityModel.Protocols/WSTrust/WSTrustMessage.cs
System.IdentityModel.Selectors/AudienceUriMode.cs
System.IdentityModel.Selectors/CustomUserNameSecurityTokenAuthenticator.cs
System.IdentityModel.Selectors/KerberosSecurityTokenAuthenticator.cs
@@ -35,13 +50,19 @@ System.IdentityModel.Selectors/X509CertificateValidator.cs
System.IdentityModel.Selectors/X509SecurityTokenAuthenticator.cs
System.IdentityModel.Selectors/X509SecurityTokenProvider.cs
System.IdentityModel.Tokens/AsymmetricSecurityKey.cs
+System.IdentityModel.Tokens/AudienceRestriction.cs
+System.IdentityModel.Tokens/AuthenticationContext.cs
+System.IdentityModel.Tokens/AuthenticationInformation.cs
System.IdentityModel.Tokens/BinaryKeyIdentifierClause.cs
System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.cs
+System.IdentityModel.Tokens/EncryptingCredentials.cs
System.IdentityModel.Tokens/GenericXmlSecurityToken.cs
System.IdentityModel.Tokens/InMemorySymmetricSecurityKey.cs
+System.IdentityModel.Tokens/IssuerNameRegistry.cs
System.IdentityModel.Tokens/KerberosReceiverSecurityToken.cs
System.IdentityModel.Tokens/KerberosRequestorSecurityToken.cs
System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.cs
+System.IdentityModel.Tokens/ProofDescriptor.cs
System.IdentityModel.Tokens/RsaKeyIdentifierClause.cs
System.IdentityModel.Tokens/RsaSecurityKey.cs
System.IdentityModel.Tokens/RsaSecurityToken.cs
@@ -76,19 +97,30 @@ System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs
System.IdentityModel.Tokens/SecurityKeyType.cs
System.IdentityModel.Tokens/SecurityKeyUsage.cs
System.IdentityModel.Tokens/SecurityToken.cs
+System.IdentityModel.Tokens/SecurityTokenDescriptor.cs
System.IdentityModel.Tokens/SecurityTokenException.cs
+System.IdentityModel.Tokens/SecurityTokenHandler.cs
+System.IdentityModel.Tokens/SecurityTokenHandlerCollection.cs
+System.IdentityModel.Tokens/SecurityTokenHandlerConfiguration.cs
System.IdentityModel.Tokens/SecurityTokenTypes.cs
System.IdentityModel.Tokens/SecurityTokenValidationException.cs
+System.IdentityModel.Tokens/SessionSecurityToken.cs
+System.IdentityModel.Tokens/SessionSecurityTokenCache.cs
+System.IdentityModel.Tokens/SessionSecurityTokenCacheKey.cs
+System.IdentityModel.Tokens/SessionSecurityTokenHandler.cs
System.IdentityModel.Tokens/SigningCredentials.cs
System.IdentityModel.Tokens/SymmetricSecurityKey.cs
System.IdentityModel.Tokens/TlsHMAC.cs
+System.IdentityModel.Tokens/TokenReplayCache.cs
System.IdentityModel.Tokens/UserNameSecurityToken.cs
System.IdentityModel.Tokens/WindowsSecurityToken.cs
System.IdentityModel.Tokens/X509AsymmetricSecurityKey.cs
System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.cs
System.IdentityModel.Tokens/X509RawDataKeyIdentifierClause.cs
System.IdentityModel.Tokens/X509SecurityToken.cs
+System.IdentityModel.Tokens/X509SigningCredentials.cs
System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.cs
System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.cs
System.IdentityModel.Tokens/X509WindowsSecurityToken.cs
-System.Security.Claims/AuthenticationTypes.cs \ No newline at end of file
+System.Security.Claims/AuthenticationTypes.cs
+System.ServiceModel.Security/X509CertificateValidationMode.cs \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/ObjectTagBuilder.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs
index ea817987e7c..2bd59e7f294 100644
--- a/mcs/class/System.Web/System.Web.UI/ObjectTagBuilder.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel/CookieTransform.cs
@@ -1,9 +1,10 @@
-//
-// System.Web.UI/ObjectTagBuilder.jvm.cs
+//
+// CookieTransform.cs
//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -12,10 +13,10 @@
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -24,22 +25,15 @@
// 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.Collections;
-namespace System.Web.UI
+namespace System.IdentityModel
{
- public sealed class ObjectTagBuilder : ControlBuilder
+ public abstract class CookieTransform
{
- internal Type Type
- {
- get { return null; }
- }
-
- internal string ObjectID
- {
- get { return string.Empty; }
- }
+ public abstract byte[] Encode (byte[] value);
}
}
+#endif \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/IConstructType.jvm.cs b/mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs
index b53030616d9..e6c00bf0b58 100644
--- a/mcs/class/System/System.Text.RegularExpressions/IConstructType.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.IdentityModel/OpenObject.cs
@@ -1,12 +1,10 @@
-//
-// IConstructType.jvm.cs
+//
+// OpenObject.cs
//
// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
-
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,20 +25,18 @@
// 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.Collections.Generic;
-using System.Text;
-namespace System.Text.RegularExpressions
+namespace System.IdentityModel
{
- internal interface IConstructType
+ public abstract class OpenObject
{
- bool HasConstruct (string pattern, RegexOptions options);
+ private Dictionary<string, object> properties = new Dictionary<string, object> ();
- string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping);
+ public Dictionary<string, object> Properties { get { return properties; } }
}
-} \ No newline at end of file
+}
+#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.jvm.cs b/mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs
index 6d52be1e277..832e2a43c1e 100644
--- a/mcs/class/System.Web/System.Web.UI/ViewStateModeByIdAttribute.jvm.cs
+++ b/mcs/class/System.IdentityModel/System.ServiceModel.Security/X509CertificateValidationMode.cs
@@ -1,12 +1,10 @@
+//
+// X509CertificateValidationMode.cs
//
-// System.Web.UI.ViewStateModeByIdAttribute.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
+// Author:
+// Noesis Labs (Ryan.Melena@noesislabs.com)
//
+// Copyright (C) 2014 Noesis Labs, LLC https://noesislabs.com
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -27,15 +25,17 @@
// 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
-#if NET_2_0
-namespace System.Web.UI
+namespace System.ServiceModel.Security
{
- [AttributeUsageAttribute (AttributeTargets.Class)]
- public sealed class ViewStateModeByIdAttribute : Attribute
+ public enum X509CertificateValidationMode
{
- public ViewStateModeByIdAttribute ()
- {}
+ None,
+ PeerTrust,
+ ChainTrust,
+ PeerOrChainTrust,
+ Custom
}
}
#endif
diff --git a/mcs/class/System.Json/System.Json/JsonPrimitive.cs b/mcs/class/System.Json/System.Json/JsonPrimitive.cs
index 64518785b87..5d47eb4a4e6 100644
--- a/mcs/class/System.Json/System.Json/JsonPrimitive.cs
+++ b/mcs/class/System.Json/System.Json/JsonPrimitive.cs
@@ -163,7 +163,16 @@ namespace System.Json
return (string) value;
throw new NotImplementedException ("GetFormattedString from value type " + value.GetType ());
case JsonType.Number:
- return ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo);
+ string s;
+ if (value is float || value is double)
+ // Use "round-trip" format
+ s = ((IFormattable) value).ToString ("R", NumberFormatInfo.InvariantInfo);
+ else
+ s = ((IFormattable) value).ToString ("G", NumberFormatInfo.InvariantInfo);
+ if (s == "NaN" || s == "Infinity" || s == "-Infinity")
+ return "\"" + s + "\"";
+ else
+ return s;
default:
throw new InvalidOperationException ();
}
diff --git a/mcs/class/System.Json/System.Json/JsonValue.cs b/mcs/class/System.Json/System.Json/JsonValue.cs
index 1d16b88e3f4..d703edd5512 100644
--- a/mcs/class/System.Json/System.Json/JsonValue.cs
+++ b/mcs/class/System.Json/System.Json/JsonValue.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Json;
@@ -218,8 +219,8 @@ namespace System.Json
if (src [i] == '"' || src [i] == '\\') {
sb.Append (src, start, i - start);
sb.Append ('\\');
- sb.Append (src [i++]);
- start = i;
+ sb.Append (src [i]);
+ start = i + 1;
}
sb.Append (src, start, src.Length - start);
return sb.ToString ();
@@ -328,70 +329,70 @@ namespace System.Json
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToBoolean (((JsonPrimitive) value).Value);
+ return Convert.ToBoolean (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator byte (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToByte (((JsonPrimitive) value).Value);
+ return Convert.ToByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator char (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToChar (((JsonPrimitive) value).Value);
+ return Convert.ToChar (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator decimal (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToDecimal (((JsonPrimitive) value).Value);
+ return Convert.ToDecimal (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator double (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToDouble (((JsonPrimitive) value).Value);
+ return Convert.ToDouble (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator float (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToSingle (((JsonPrimitive) value).Value);
+ return Convert.ToSingle (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator int (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToInt32 (((JsonPrimitive) value).Value);
+ return Convert.ToInt32 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator long (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToInt64 (((JsonPrimitive) value).Value);
+ return Convert.ToInt64 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator sbyte (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToSByte (((JsonPrimitive) value).Value);
+ return Convert.ToSByte (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator short (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToInt16 (((JsonPrimitive) value).Value);
+ return Convert.ToInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator string (JsonValue value)
@@ -405,21 +406,21 @@ namespace System.Json
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToUInt16 (((JsonPrimitive) value).Value);
+ return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator ulong (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToUInt64(((JsonPrimitive) value).Value);
+ return Convert.ToUInt64(((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator ushort (JsonValue value)
{
if (value == null)
throw new ArgumentNullException ("value");
- return Convert.ToUInt16 (((JsonPrimitive) value).Value);
+ return Convert.ToUInt16 (((JsonPrimitive) value).Value, NumberFormatInfo.InvariantInfo);
}
public static implicit operator DateTime (JsonValue value)
diff --git a/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs b/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
index 2459c1fc3ad..02dd106dfd8 100644
--- a/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
+++ b/mcs/class/System.Json/Test/System.Json/JsonValueTest.cs
@@ -11,6 +11,8 @@ using System;
using System.IO;
using System.Text;
using System.Json;
+using System.Globalization;
+using System.Threading;
namespace MonoTests.System
{
@@ -24,6 +26,14 @@ namespace MonoTests.System
Assert.AreEqual (1, j.Count, "itemcount");
Assert.AreEqual (JsonType.String, j ["a"].JsonType, "type");
Assert.AreEqual ("b", (string) j ["a"], "value");
+
+ JsonValue.Parse ("[{ \"a\": \"b\",}]");
+ }
+
+ [Test]
+ public void LoadWithTrailingComma2 ()
+ {
+ JsonValue.Parse ("[{ \"a\": \"b\",}]");
}
// Test that we correctly serialize JsonArray with null elements.
@@ -35,5 +45,141 @@ namespace MonoTests.System
var str = j.ToString ();
Assert.AreEqual (str, "[1, 2, 3, null]");
}
+
+ [Test]
+ public void QuoteEscapeBug_20869 ()
+ {
+ Assert.AreEqual ((new JsonPrimitive ("\"\"")).ToString (), "\"\\\"\\\"\"");
+ }
+
+ void ExpectError (string s)
+ {
+ try {
+ JsonValue.Parse (s);
+ Assert.Fail ("Expected ArgumentException for `" + s + "'");
+ } catch (ArgumentException) {
+ }
+ }
+
+ // Test whether an exception is thrown for invalid JSON
+ [Test]
+ public void CheckErrors ()
+ {
+ ExpectError (@"-");
+ ExpectError (@"- ");
+ ExpectError (@"1.");
+ ExpectError (@"1. ");
+ ExpectError (@"1e+");
+ ExpectError (@"1 2");
+ ExpectError (@"077");
+
+ ExpectError (@"[1,]");
+
+ //ExpectError (@"{""a"":1,}"); // Not valid JSON, allowed anyway
+ }
+
+ // Parse a json string and compare to the expected value
+ void CheckDouble (double expected, string json)
+ {
+ double jvalue = (double) JsonValue.Parse (json);
+ Assert.AreEqual (expected, jvalue);
+ }
+
+ // Convert a number to json and parse the string, then compare the result to the original value
+ void CheckDouble (double number)
+ {
+ double jvalue = (double) JsonValue.Parse (new JsonPrimitive (number).ToString ());
+ Assert.AreEqual (number, jvalue); // should be exactly the same
+ }
+
+ [Test]
+ public void CheckNumbers ()
+ {
+ CheckDouble (0, "0");
+ CheckDouble (0, "-0");
+ CheckDouble (0, "0.00");
+ CheckDouble (0, "-0.00");
+ CheckDouble (1, "1");
+ CheckDouble (1.1, "1.1");
+ CheckDouble (-1, "-1");
+ CheckDouble (-1.1, "-1.1");
+ CheckDouble (1e-10, "1e-10");
+ CheckDouble (1e+10, "1e+10");
+ CheckDouble (1e-30, "1e-30");
+ CheckDouble (1e+30, "1e+30");
+
+ CheckDouble (1, "\"1\"");
+ CheckDouble (1.1, "\"1.1\"");
+ CheckDouble (-1, "\"-1\"");
+ CheckDouble (-1.1, "\"-1.1\"");
+
+ CheckDouble (double.NaN, "\"NaN\"");
+ CheckDouble (double.PositiveInfinity, "\"Infinity\"");
+ CheckDouble (double.NegativeInfinity, "\"-Infinity\"");
+
+ ExpectError ("NaN");
+ ExpectError ("Infinity");
+ ExpectError ("-Infinity");
+
+ Assert.AreEqual ("1.1", new JsonPrimitive (1.1).ToString ());
+ Assert.AreEqual ("-1.1", new JsonPrimitive (-1.1).ToString ());
+ Assert.AreEqual ("1E-20", new JsonPrimitive (1e-20).ToString ());
+ Assert.AreEqual ("1E+20", new JsonPrimitive (1e+20).ToString ());
+ Assert.AreEqual ("1E-30", new JsonPrimitive (1e-30).ToString ());
+ Assert.AreEqual ("1E+30", new JsonPrimitive (1e+30).ToString ());
+ Assert.AreEqual ("\"NaN\"", new JsonPrimitive (double.NaN).ToString ());
+ Assert.AreEqual ("\"Infinity\"", new JsonPrimitive (double.PositiveInfinity).ToString ());
+ Assert.AreEqual ("\"-Infinity\"", new JsonPrimitive (double.NegativeInfinity).ToString ());
+
+ Assert.AreEqual ("1E-30", JsonValue.Parse ("1e-30").ToString ());
+ Assert.AreEqual ("1E+30", JsonValue.Parse ("1e+30").ToString ());
+
+ CheckDouble (1);
+ CheckDouble (1.1);
+ CheckDouble (1.25);
+ CheckDouble (-1);
+ CheckDouble (-1.1);
+ CheckDouble (-1.25);
+ CheckDouble (1e-20);
+ CheckDouble (1e+20);
+ CheckDouble (1e-30);
+ CheckDouble (1e+30);
+ CheckDouble (3.1415926535897932384626433);
+ CheckDouble (3.1415926535897932384626433e-20);
+ CheckDouble (3.1415926535897932384626433e+20);
+ CheckDouble (double.NaN);
+ CheckDouble (double.PositiveInfinity);
+ CheckDouble (double.NegativeInfinity);
+ CheckDouble (double.MinValue);
+ CheckDouble (double.MaxValue);
+
+ // A number which needs 17 digits (see http://stackoverflow.com/questions/6118231/why-do-i-need-17-significant-digits-and-not-16-to-represent-a-double)
+ CheckDouble (18014398509481982.0);
+
+ // Values around the smallest positive decimal value
+ CheckDouble (1.123456789e-29);
+ CheckDouble (1.123456789e-28);
+
+ CheckDouble (1.1E-29, "0.000000000000000000000000000011");
+ // This is being parsed as a decimal and rounded to 1e-28, even though it can be more accurately be represented by a double
+ //CheckDouble (1.1E-28, "0.00000000000000000000000000011");
+ }
+
+ // Retry the test with different locales
+ [Test]
+ public void CheckNumbersCulture ()
+ {
+ CultureInfo old = Thread.CurrentThread.CurrentCulture;
+ try {
+ Thread.CurrentThread.CurrentCulture = new CultureInfo ("en");
+ CheckNumbers ();
+ Thread.CurrentThread.CurrentCulture = new CultureInfo ("fr");
+ CheckNumbers ();
+ Thread.CurrentThread.CurrentCulture = new CultureInfo ("de");
+ CheckNumbers ();
+ } finally {
+ Thread.CurrentThread.CurrentCulture = old;
+ }
+ }
}
}
diff --git a/mcs/class/System.Net.Http/HtppLibrary.csproj b/mcs/class/System.Net.Http/HtppLibrary.csproj
deleted file mode 100644
index 3ddc293f051..00000000000
--- a/mcs/class/System.Net.Http/HtppLibrary.csproj
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{1067A7EF-857F-4045-AB01-013CA131EA32}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>HtppLibrary</RootNamespace>
- <AssemblyName>HtppLibrary</AssemblyName>
- <FileAlignment>512</FileAlignment>
- <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;NET_2_0;NET_4_0;NET_4_5;MOBILE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="System.Net.Http.Headers\AuthenticationHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\CacheControlHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\CollectionExtensions.cs" />
- <Compile Include="System.Net.Http.Headers\ContentDispositionHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\ContentRangeHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\EntityTagHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\HashCodeCalculator.cs" />
- <Compile Include="System.Net.Http.Headers\HeaderInfo.cs" />
- <Compile Include="System.Net.Http.Headers\HttpContentHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\HttpHeaderKind.cs" />
- <Compile Include="System.Net.Http.Headers\HttpHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\HttpHeaderValueCollection.cs" />
- <Compile Include="System.Net.Http.Headers\HttpRequestHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\HttpResponseHeaders.cs" />
- <Compile Include="System.Net.Http.Headers\Lexer.cs" />
- <Compile Include="System.Net.Http.Headers\MediaTypeHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\MediaTypeWithQualityHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\NameValueHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\NameValueWithParametersHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\Parser.cs" />
- <Compile Include="System.Net.Http.Headers\ProductHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\ProductInfoHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\QualityValue.cs" />
- <Compile Include="System.Net.Http.Headers\RangeConditionHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\RangeHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\RangeItemHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\RetryConditionHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\StringWithQualityHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\TransferCodingHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\TransferCodingWithQualityHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\ViaHeaderValue.cs" />
- <Compile Include="System.Net.Http.Headers\WarningHeaderValue.cs" />
- <Compile Include="System.Net.Http\ByteArrayContent.cs" />
- <Compile Include="System.Net.Http\ClientCertificateOption.cs" />
- <Compile Include="System.Net.Http\DelegatingHandler.cs" />
- <Compile Include="System.Net.Http\FormUrlEncodedContent.cs" />
- <Compile Include="System.Net.Http\HttpClient.cs" />
- <Compile Include="System.Net.Http\HttpClientHandler.cs" />
- <Compile Include="System.Net.Http\HttpCompletionOption.cs" />
- <Compile Include="System.Net.Http\HttpContent.cs" />
- <Compile Include="System.Net.Http\HttpMessageHandler.cs" />
- <Compile Include="System.Net.Http\HttpMethod.cs" />
- <Compile Include="System.Net.Http\HttpRequestException.cs" />
- <Compile Include="System.Net.Http\HttpRequestMessage.cs" />
- <Compile Include="System.Net.Http\HttpResponseMessage.cs" />
- <Compile Include="System.Net.Http\MessageProcessingHandler.cs" />
- <Compile Include="System.Net.Http\MultipartContent.cs" />
- <Compile Include="System.Net.Http\StreamContent.cs" />
- <Compile Include="System.Net.Http\StringContent.cs" />
- <Compile Include="System.Net.Http\MultipartFormDataContent.cs" />
- </ItemGroup>
- <ItemGroup />
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs
index 9dd41b3d330..9329ac5796f 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentDispositionHeaderValue.cs
@@ -120,9 +120,17 @@ namespace System.Net.Http.Headers
public string Name {
get {
- return FindParameter ("name");
+ var value = FindParameter ("name");
+
+ if (value == null)
+ return null;
+
+ return DecodeValue (value, false);
}
set {
+ if (value != null)
+ value = EncodeBase64Value (value);
+
SetValue ("name", value);
}
}
@@ -211,6 +219,10 @@ namespace System.Net.Http.Headers
static string EncodeBase64Value (string value)
{
+ bool quoted = value.Length > 1 && value [0] == '"' && value [value.Length - 1] == '"';
+ if (quoted)
+ value = value.Substring (1, value.Length - 2);
+
for (int i = 0; i < value.Length; ++i) {
var ch = value[i];
if (ch > 127) {
@@ -220,7 +232,7 @@ namespace System.Net.Http.Headers
}
}
- if (!Lexer.IsValidToken (value))
+ if (quoted || !Lexer.IsValidToken (value))
return "\"" + value + "\"";
return value;
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentRangeHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentRangeHeaderValue.cs
index 118d65085f7..1bea52b76e8 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentRangeHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/ContentRangeHeaderValue.cs
@@ -170,7 +170,7 @@ namespace System.Net.Http.Headers
} else {
value.From = nvalue;
- t = lexer.Scan ();
+ t = lexer.Scan (recognizeDash: true);
if (t != Token.Type.SeparatorDash)
return false;
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs
index 5717ddd67dc..4f1137a8ccc 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/HttpHeaders.cs
@@ -96,6 +96,7 @@ namespace System.Net.Http.Headers
HeaderInfo.CreateSingle<AuthenticationHeaderValue> ("Authorization", AuthenticationHeaderValue.TryParse, HttpHeaderKind.Request),
HeaderInfo.CreateSingle<CacheControlHeaderValue> ("Cache-Control", CacheControlHeaderValue.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
HeaderInfo.CreateMulti<string> ("Connection", CollectionParser.TryParse, HttpHeaderKind.Request | HttpHeaderKind.Response),
+ HeaderInfo.CreateSingle<ContentDispositionHeaderValue> ("Content-Disposition", ContentDispositionHeaderValue.TryParse, HttpHeaderKind.Content),
HeaderInfo.CreateMulti<string> ("Content-Encoding", CollectionParser.TryParse, HttpHeaderKind.Content),
HeaderInfo.CreateMulti<string> ("Content-Language", CollectionParser.TryParse, HttpHeaderKind.Content),
HeaderInfo.CreateSingle<long> ("Content-Length", Parser.Long.TryParse, HttpHeaderKind.Content),
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs
index 5bd7d093acf..622e36b0ec2 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/Lexer.cs
@@ -247,7 +247,7 @@ namespace System.Net.Http.Headers
return false;
}
- public Token Scan ()
+ public Token Scan (bool recognizeDash = false)
{
int start = pos;
if (s == null)
@@ -279,8 +279,12 @@ namespace System.Net.Http.Headers
ttype = Token.Type.SeparatorSlash;
break;
case '-':
- ttype = Token.Type.SeparatorDash;
- break;
+ if (recognizeDash) {
+ ttype = Token.Type.SeparatorDash;
+ break;
+ }
+
+ goto default;
case ',':
ttype = Token.Type.SeparatorComma;
break;
diff --git a/mcs/class/System.Net.Http/System.Net.Http.Headers/RangeHeaderValue.cs b/mcs/class/System.Net.Http/System.Net.Http.Headers/RangeHeaderValue.cs
index ad8e7e2b4f3..36e9c806157 100644
--- a/mcs/class/System.Net.Http/System.Net.Http.Headers/RangeHeaderValue.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http.Headers/RangeHeaderValue.cs
@@ -127,7 +127,7 @@ namespace System.Net.Http.Headers
int number;
token_read = false;
- t = lexer.Scan ();
+ t = lexer.Scan (recognizeDash: true);
switch (t.Kind) {
case Token.Type.SeparatorDash:
t = lexer.Scan ();
@@ -144,7 +144,7 @@ namespace System.Net.Http.Headers
switch (values.Length) {
case 1:
- t = lexer.Scan ();
+ t = lexer.Scan (recognizeDash: true);
from = number;
switch (t.Kind) {
case Token.Type.SeparatorDash:
diff --git a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
index 7f74497c60b..b4de2a029cf 100644
--- a/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
+++ b/mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
@@ -50,7 +50,6 @@ namespace System.Net.Http
bool useProxy;
ClientCertificateOption certificate;
bool sentRequest;
- HttpWebRequest wrequest;
string connectionGroupName;
bool disposed;
@@ -221,12 +220,9 @@ namespace System.Net.Http
protected override void Dispose (bool disposing)
{
- if (disposing) {
- if (wrequest != null) {
- wrequest.ServicePoint.CloseConnectionGroup (wrequest.ConnectionGroupName);
- Volatile.Write (ref wrequest, null);
- }
+ if (disposing && !disposed) {
Volatile.Write (ref disposed, true);
+ ServicePointManager.CloseConnectionGroup (connectionGroupName);
}
base.Dispose (disposing);
@@ -306,6 +302,8 @@ namespace System.Net.Http
item_headers.TryAddWithoutValidation (key, value);
}
+ requestMessage.RequestUri = wr.ResponseUri;
+
return response;
}
@@ -315,7 +313,7 @@ namespace System.Net.Http
throw new ObjectDisposedException (GetType ().ToString ());
Volatile.Write (ref sentRequest, true);
- wrequest = CreateWebRequest (request);
+ var wrequest = CreateWebRequest (request);
if (request.Content != null) {
var headers = wrequest.Headers;
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs
index 87bd1a95fe6..e9a7ab8de0a 100644
--- a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs
+++ b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/ContentDispositionHeaderValueTest.cs
@@ -56,7 +56,7 @@ namespace MonoTests.System.Net.Http.Headers
[Test]
/*
- * This fails on Windows with the .NET runtime:
+ * .NET BUG
*
* Test Case Failures:
* 1) MonoTests.System.Net.Http.Headers.ContentDispositionHeaderValueTest.Equals : System.NullReferenceException : Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
@@ -64,7 +64,7 @@ namespace MonoTests.System.Net.Http.Headers
* bei MonoTests.System.Net.Http.Headers.ContentDispositionHeaderValueTest.Equals()
*
*/
- [Category ("NotWorking")]
+ [Category ("NotDotNet")]
public void Equals ()
{
var value = new ContentDispositionHeaderValue ("x");
@@ -215,6 +215,14 @@ namespace MonoTests.System.Net.Http.Headers
value.FileName = "(@)";
Assert.AreEqual ("\"(@)\"", value.FileName, "#21");
Assert.AreEqual (new NameValueHeaderValue ("filename", "\"(@)\""), value.Parameters.First (), "#22");
+
+ value.FileName = "\"č\"";
+ Assert.AreEqual ("č", value.FileName, "#31");
+ Assert.AreEqual (new NameValueHeaderValue ("filename", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#32");
+
+ value.FileName = "\"quoted\"";
+ Assert.AreEqual ("\"quoted\"", value.FileName, "#41");
+ Assert.AreEqual (new NameValueHeaderValue ("filename", "\"quoted\""), value.Parameters.First (), "#42");
}
[Test]
@@ -231,6 +239,33 @@ namespace MonoTests.System.Net.Http.Headers
Assert.AreEqual (new NameValueHeaderValue ("filename*", "utf-8''%C4%8D"), value.Parameters.First (), "#12");
}
+
+ [Test]
+ public void Properties_Name ()
+ {
+ var value = new ContentDispositionHeaderValue ("a");
+
+ value.Name = "aa";
+ Assert.AreEqual ("aa", value.Name, "#1");
+ Assert.AreEqual (new NameValueHeaderValue ("name", "aa"), value.Parameters.First (), "#2");
+
+ value.Name = "č";
+ Assert.AreEqual ("č", value.Name, "#11");
+ Assert.AreEqual (new NameValueHeaderValue ("name", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#12");
+
+ value.Name = "(@)";
+ Assert.AreEqual ("\"(@)\"", value.Name, "#21");
+ Assert.AreEqual (new NameValueHeaderValue ("name", "\"(@)\""), value.Parameters.First (), "#22");
+
+ value.Name = "\"č\"";
+ Assert.AreEqual ("č", value.Name, "#31");
+ Assert.AreEqual (new NameValueHeaderValue ("name", "\"=?utf-8?B?xI0=?=\""), value.Parameters.First (), "#32");
+
+ value.Name = "\"quoted\"";
+ Assert.AreEqual ("\"quoted\"", value.Name, "#41");
+ Assert.AreEqual (new NameValueHeaderValue ("name", "\"quoted\""), value.Parameters.First (), "#42");
+ }
+
[Test]
public void Properties_ModificationDate ()
{
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/MediaTypeHeaderValueTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/MediaTypeHeaderValueTest.cs
index afbf8274b9f..c4b882467aa 100644
--- a/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/MediaTypeHeaderValueTest.cs
+++ b/mcs/class/System.Net.Http/Test/System.Net.Http.Headers/MediaTypeHeaderValueTest.cs
@@ -31,6 +31,7 @@ using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using System.Net.Http.Headers;
+using System.Linq;
namespace MonoTests.System.Net.Http.Headers
{
@@ -81,6 +82,13 @@ namespace MonoTests.System.Net.Http.Headers
Assert.AreEqual ("mu/m", res.MediaType, "#2");
Assert.AreEqual ("jj'", res.CharSet, "#2b");
Assert.AreEqual ("mu/m; CHarset=jj'", res.ToString (), "#2c");
+
+ res = MediaTypeHeaderValue.Parse ("multipart/form-data; boundary=----Wk");
+ Assert.AreEqual ("multipart/form-data", res.MediaType, "#3");
+ Assert.IsNull (res.CharSet, "#3b");
+ Assert.AreEqual (1, res.Parameters.Count, "#3c");
+ Assert.AreEqual (new NameValueHeaderValue ("boundary", "----Wk"), res.Parameters.First (), "#3d");
+ Assert.AreEqual ("multipart/form-data; boundary=----Wk", res.ToString (), "#3e");
}
[Test]
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
index d2871f60875..4b07313aafd 100644
--- a/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
+++ b/mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
@@ -801,6 +801,30 @@ namespace MonoTests.System.Net.Http
}
[Test]
+ public void RequestUriAfterRedirect ()
+ {
+ var listener = CreateListener (l => {
+ var request = l.Request;
+ var response = l.Response;
+
+ response.StatusCode = (int)HttpStatusCode.Moved;
+ response.RedirectLocation = "http://xamarin.com/";
+ });
+
+ try {
+ var chandler = new HttpClientHandler ();
+ chandler.AllowAutoRedirect = true;
+ var client = new HttpClient (chandler);
+
+ var resp = client.GetAsync (LocalServer).Result;
+ Assert.AreEqual ("http://xamarin.com/", resp.RequestMessage.RequestUri.AbsoluteUri, "#1");
+ } finally {
+ listener.Abort ();
+ listener.Close ();
+ }
+ }
+
+ [Test]
/*
* Properties may only be modified before sending the first request.
*/
diff --git a/mcs/class/System.Net.Http/Test/System.Net.Http/StreamContentTest.cs b/mcs/class/System.Net.Http/Test/System.Net.Http/StreamContentTest.cs
index c19e88ccbad..5d7cd12490c 100644
--- a/mcs/class/System.Net.Http/Test/System.Net.Http/StreamContentTest.cs
+++ b/mcs/class/System.Net.Http/Test/System.Net.Http/StreamContentTest.cs
@@ -160,7 +160,7 @@ namespace MonoTests.System.Net.Http
* The .NET runtime hits the "#9" assertion.
* The test succeeds with Mono.
*/
- [Category ("NotWorking")]
+ [Category ("NotDotNet")]
public void CopyToAsync ()
{
var ms = new MemoryStream ();
@@ -222,6 +222,7 @@ namespace MonoTests.System.Net.Http
Assert.AreEqual (330, scm.Headers.ContentLength, "#2");
headers.Allow.Add ("a1");
+ headers.ContentDisposition = new ContentDispositionHeaderValue ("cd1");
headers.ContentEncoding.Add ("ce1");
headers.ContentLanguage.Add ("cl1");
headers.ContentLength = 23;
@@ -234,6 +235,12 @@ namespace MonoTests.System.Net.Http
headers.Add ("allow", "a2");
+ try {
+ headers.Add ("content-disposition", "cd2");
+ Assert.Fail ("content-disposition");
+ } catch (FormatException) {
+ }
+
headers.Add ("content-encoding", "ce3");
headers.Add ("content-language", "cl2");
@@ -307,6 +314,7 @@ namespace MonoTests.System.Net.Http
Assert.AreEqual (new MediaTypeHeaderValue ("multipart/*"), headers.ContentType);
Assert.AreEqual (new DateTimeOffset (DateTime.Today), headers.Expires);
Assert.AreEqual (new DateTimeOffset (DateTime.Today), headers.LastModified);
+ Assert.AreEqual (new ContentDispositionHeaderValue ("cd1"), headers.ContentDisposition);
}
[Test]
diff --git a/mcs/class/System.Numerics/System.Numerics/BigInteger.cs b/mcs/class/System.Numerics/System.Numerics/BigInteger.cs
index b067997cb7c..93fb7b939e4 100644
--- a/mcs/class/System.Numerics/System.Numerics/BigInteger.cs
+++ b/mcs/class/System.Numerics/System.Numerics/BigInteger.cs
@@ -1,10 +1,12 @@
//
// System.Numerics.BigInteger
//
-// Rodrigo Kumpera (rkumpera@novell.com)
-
+// Authors:
+// Rodrigo Kumpera (rkumpera@novell.com)
+// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -68,7 +70,6 @@ namespace System.Numerics {
readonly uint[] data;
readonly short sign;
- static readonly uint[] ZERO = new uint [1];
static readonly uint[] ONE = new uint [1] { 1 };
BigInteger (short sign, uint[] data)
@@ -81,7 +82,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
- data = ZERO;
+ data = null;
} else if (value > 0) {
sign = 1;
data = new uint[] { (uint) value };
@@ -96,7 +97,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
- data = ZERO;
+ data = null;
} else {
sign = 1;
data = new uint [1] { value };
@@ -107,7 +108,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
- data = ZERO;
+ data = null;
} else if (value > 0) {
sign = 1;
uint low = (uint)value;
@@ -135,7 +136,7 @@ namespace System.Numerics {
{
if (value == 0) {
sign = 0;
- data = ZERO;
+ data = null;
} else {
sign = 1;
uint low = (uint)value;
@@ -180,7 +181,7 @@ namespace System.Numerics {
int exponent = Exponent (bytes);
if (exponent == 0) {
sign = 0;
- data = ZERO;
+ data = null;
return;
}
@@ -217,7 +218,7 @@ namespace System.Numerics {
if (size == 0) {
sign = 0;
- data = ZERO;
+ data = null;
return;
}
@@ -241,7 +242,7 @@ namespace System.Numerics {
if (len == 0 || (len == 1 && value [0] == 0)) {
sign = 0;
- data = ZERO;
+ data = null;
return;
}
@@ -254,7 +255,7 @@ namespace System.Numerics {
while (value [len - 1] == 0) {
if (--len == 0) {
sign = 0;
- data = ZERO;
+ data = null;
return;
}
}
@@ -315,12 +316,14 @@ namespace System.Numerics {
word = (uint)sub;
borrow = (uint)(sub >> 32) & 0x1u;
- data [data.Length - 1] = ~word & store_mask;
+ if ((~word & store_mask) == 0)
+ data = Resize (data, data.Length - 1);
+ else
+ data [data.Length - 1] = ~word & store_mask;
}
if (borrow != 0) //FIXME I believe this can't happen, can someone write a test for it?
throw new Exception ("non zero final carry");
}
-
}
public bool IsEven {
@@ -454,12 +457,12 @@ namespace System.Numerics {
}
public static BigInteger Zero {
- get { return new BigInteger (0, ZERO); }
+ get { return new BigInteger (0); }
}
public static explicit operator int (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return 0;
if (value.data.Length > 1)
throw new OverflowException ();
@@ -481,7 +484,7 @@ namespace System.Numerics {
[CLSCompliantAttribute (false)]
public static explicit operator uint (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return 0;
if (value.data.Length > 1 || value.sign == -1)
throw new OverflowException ();
@@ -525,7 +528,7 @@ namespace System.Numerics {
public static explicit operator long (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return 0;
if (value.data.Length > 2)
@@ -567,7 +570,7 @@ namespace System.Numerics {
[CLSCompliantAttribute (false)]
public static explicit operator ulong (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return 0;
if (value.data.Length > 2 || value.sign == -1)
throw new OverflowException ();
@@ -582,9 +585,10 @@ namespace System.Numerics {
public static explicit operator double (BigInteger value)
{
- switch (value.data.Length) {
- case 0:
+ if (value.data == null)
return 0.0;
+
+ switch (value.data.Length) {
case 1:
return BuildDouble (value.sign, value.data [0], 0);
case 2:
@@ -611,7 +615,7 @@ namespace System.Numerics {
public static explicit operator decimal (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return Decimal.Zero;
uint[] data = value.data;
@@ -701,7 +705,7 @@ namespace System.Numerics {
int r = CoreCompare (left.data, right.data);
if (r == 0)
- return new BigInteger (0, ZERO);
+ return Zero;
if (r > 0) //left > right
return new BigInteger (left.sign, CoreSub (left.data, right.data));
@@ -720,7 +724,7 @@ namespace System.Numerics {
int r = CoreCompare (left.data, right.data);
if (r == 0)
- return new BigInteger (0, ZERO);
+ return Zero;
if (r > 0) //left > right
return new BigInteger (left.sign, CoreSub (left.data, right.data));
@@ -734,7 +738,7 @@ namespace System.Numerics {
public static BigInteger operator* (BigInteger left, BigInteger right)
{
if (left.sign == 0 || right.sign == 0)
- return new BigInteger (0, ZERO);
+ return Zero;
if (left.data [0] == 1 && left.data.Length == 1) {
if (left.sign == 1)
@@ -795,7 +799,7 @@ namespace System.Numerics {
int i;
for (i = quotient.Length - 1; i >= 0 && quotient [i] == 0; --i) ;
if (i == -1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (i < quotient.Length - 1)
quotient = Resize (quotient, i + 1);
@@ -818,7 +822,7 @@ namespace System.Numerics {
int i;
for (i = remainder_value.Length - 1; i >= 0 && remainder_value [i] == 0; --i) ;
if (i == -1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (i < remainder_value.Length - 1)
remainder_value = Resize (remainder_value, i + 1);
@@ -827,7 +831,7 @@ namespace System.Numerics {
public static BigInteger operator- (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return value;
return new BigInteger ((short)-value.sign, value.data);
}
@@ -839,14 +843,14 @@ namespace System.Numerics {
public static BigInteger operator++ (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return One;
short sign = value.sign;
uint[] data = value.data;
if (data.Length == 1) {
if (sign == -1 && data [0] == 1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (sign == 0)
return new BigInteger (1, ONE);
}
@@ -861,14 +865,14 @@ namespace System.Numerics {
public static BigInteger operator-- (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return MinusOne;
short sign = value.sign;
uint[] data = value.data;
if (data.Length == 1) {
if (sign == 1 && data [0] == 1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (sign == 0)
return new BigInteger (-1, ONE);
}
@@ -933,7 +937,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -993,7 +997,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -1053,7 +1057,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -1063,7 +1067,7 @@ namespace System.Numerics {
public static BigInteger operator~ (BigInteger value)
{
- if (value.sign == 0)
+ if (value.data == null)
return new BigInteger (-1, ONE);
uint[] data = value.data;
@@ -1097,7 +1101,7 @@ namespace System.Numerics {
for (i = result.Length - 1; i >= 0 && result [i] == 0; --i) ;
if (i == -1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (i < result.Length - 1)
result = Resize (result, i + 1);
@@ -1119,7 +1123,7 @@ namespace System.Numerics {
public static BigInteger operator<< (BigInteger value, int shift)
{
- if (shift == 0 || value.sign == 0)
+ if (shift == 0 || value.data == null)
return value;
if (shift < 0)
return value >> -shift;
@@ -1175,7 +1179,7 @@ namespace System.Numerics {
if (size <= 0) {
if (sign == 1)
- return new BigInteger (0, ZERO);
+ return Zero;
return new BigInteger (-1, ONE);
}
@@ -2140,7 +2144,7 @@ namespace System.Numerics {
int i;
for (i = remainder_value.Length - 1; i >= 0 && remainder_value [i] == 0; --i) ;
if (i == -1) {
- remainder = new BigInteger (0, ZERO);
+ remainder = Zero;
} else {
if (i < remainder_value.Length - 1)
remainder_value = Resize (remainder_value, i + 1);
@@ -2149,7 +2153,7 @@ namespace System.Numerics {
for (i = quotient.Length - 1; i >= 0 && quotient [i] == 0; --i) ;
if (i == -1)
- return new BigInteger (0, ZERO);
+ return Zero;
if (i < quotient.Length - 1)
quotient = Resize (quotient, i + 1);
@@ -2262,7 +2266,7 @@ namespace System.Numerics {
if (baseValue == 0.0d || baseValue == Double.PositiveInfinity)
return value.IsOne ? 0 : double.NaN;
- if (value.sign == 0)
+ if (value.data == null)
return double.NegativeInfinity;
int length = value.data.Length - 1;
diff --git a/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs b/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs
index 4aa0ffbd029..c4ad9e811ee 100644
--- a/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs
+++ b/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs
@@ -550,13 +550,18 @@ namespace MonoTests.System.Numerics
{
long[] values = new long [] {
0, long.MinValue, long.MaxValue, -1, 1L + int.MaxValue, -1L + int.MinValue, 0x1234, 0xFFFFFFFFL, 0x1FFFFFFFFL, -0xFFFFFFFFL, -0x1FFFFFFFFL,
- 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L };
+ 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L, 4294967295L, -4294967295L, 4294967296L, -4294967296L };
foreach (var val in values) {
- var a = new BigInteger (val);
- var b = new BigInteger (a.ToByteArray ());
-
- Assert.AreEqual (val, (long)a, "#a_" + val);
- Assert.AreEqual (val, (long)b, "#b_" + val);
+ try {
+ var a = new BigInteger (val);
+ var b = new BigInteger (a.ToByteArray ());
+
+ Assert.AreEqual (val, (long)a, "#a_" + val);
+ Assert.AreEqual (val, (long)b, "#b_" + val);
+ Assert.AreEqual (a, b, "#a == #b (" + val + ")");
+ } catch (Exception e) {
+ Assert.Fail ("could not roundtrip {0}", val);
+ }
}
}
@@ -620,10 +625,12 @@ namespace MonoTests.System.Numerics
Assert.IsTrue (new BigInteger (1).IsOne, "#7");
Assert.IsTrue (new BigInteger (32).IsPowerOfTwo, "#8");
Assert.IsTrue (new BigInteger (0).IsZero, "#9");
+ Assert.IsTrue (new BigInteger ().IsZero, "#9b");
Assert.AreEqual (0, new BigInteger (0).Sign, "#10");
Assert.AreEqual (-1, new BigInteger (-99999).Sign, "#11");
Assert.IsFalse (new BigInteger (0).IsPowerOfTwo, "#12");
+ Assert.IsFalse (new BigInteger ().IsPowerOfTwo, "#12b");
Assert.IsFalse (new BigInteger (-16).IsPowerOfTwo, "#13");
Assert.IsTrue (new BigInteger (1).IsPowerOfTwo, "#14");
}
@@ -642,6 +649,7 @@ namespace MonoTests.System.Numerics
Assert.AreEqual ("0000000005", new BigInteger (5).ToString ("d10"), "#2");
Assert.AreEqual ("0A8", new BigInteger (168).ToString ("X"), "#3");
Assert.AreEqual ("0", new BigInteger (0).ToString ("X"), "#4");
+ Assert.AreEqual ("0", new BigInteger ().ToString ("X"), "#4b");
Assert.AreEqual ("1", new BigInteger (1).ToString ("X"), "#5");
Assert.AreEqual ("0A", new BigInteger (10).ToString ("X"), "#6");
Assert.AreEqual ("F6", new BigInteger (-10).ToString ("X"), "#7");
@@ -745,6 +753,7 @@ namespace MonoTests.System.Numerics
Assert.AreEqual (new byte[] { 0x7F }, new BigInteger (0x7F).ToByteArray (), "#10");
Assert.AreEqual (new byte[] { 0x45, 0xCC, 0xD0 }, new BigInteger (-0x2F33BB).ToByteArray (), "#11");
Assert.AreEqual (new byte[] { 0 }, new BigInteger (0).ToByteArray (), "#12");
+ Assert.AreEqual (new byte[] { 0 }, new BigInteger ().ToByteArray (), "#13");
}
[Test]
@@ -881,6 +890,7 @@ namespace MonoTests.System.Numerics
Assert.AreEqual (-1m, (decimal)new BigInteger (-1), "#6");
Assert.AreEqual (9999999999999999999999999999m,
(decimal)new BigInteger (9999999999999999999999999999m), "#7");
+ Assert.AreEqual (0m, (decimal)new BigInteger (), "#8");
}
[Test]
@@ -1271,6 +1281,9 @@ namespace MonoTests.System.Numerics
a = new BigInteger ();
Assert.AreEqual (BigInteger.Zero.GetHashCode (), a.GetHashCode (), "#15");
+
+ a = new BigInteger ();
+ Assert.AreEqual (BigInteger.Zero, a, "#16");
}
[Test]
diff --git a/mcs/class/System.Runtime.Remoting/.gitattributes b/mcs/class/System.Runtime.Remoting/.gitattributes
index 9c356bcd51d..6c272b92163 100644
--- a/mcs/class/System.Runtime.Remoting/.gitattributes
+++ b/mcs/class/System.Runtime.Remoting/.gitattributes
@@ -1,3 +1 @@
/makefile.build -crlf
-/net_1_1_java_System.Runtime.Remoting.dll.exclude.sources -crlf
-/net_1_1_java_System.Runtime.Remoting.dll.sources -crlf
diff --git a/mcs/class/System.Runtime.Remoting/Assembly/AssemblyInfo.cs b/mcs/class/System.Runtime.Remoting/Assembly/AssemblyInfo.cs
index bd93a4debbb..fd9d08db646 100644
--- a/mcs/class/System.Runtime.Remoting/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Runtime.Remoting/Assembly/AssemblyInfo.cs
@@ -56,10 +56,8 @@ using System.Runtime.InteropServices;
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
-#if !TARGET_JVM
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: CLSCompliant (false)]
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.jvm.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.jvm.cs
deleted file mode 100644
index 9833d53e0a4..00000000000
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.jvm.cs
+++ /dev/null
@@ -1,128 +0,0 @@
-//
-// System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory
-//
-// Authors:
-// Martin Willemoes Hansen (mwh@sysrq.dk)
-// Lluis Sanchez Gual (lluis@ximian.com)
-//
-// (C) 2003 Martin Willemoes Hansen
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Web;
-using System.IO;
-using System.Runtime.Remoting;
-using System.Runtime.Remoting.Channels;
-
-namespace System.Runtime.Remoting.Channels.Http
-{
- public class HttpRemotingHandlerFactory : IHttpHandlerFactory
- {
- public HttpRemotingHandlerFactory ()
- {
- }
-
- private static HttpRemotingHandlerFactoryData CurrentHttpRemotingHandlerFactoryData
- {
- get
- {
- HttpRemotingHandlerFactoryData res = (HttpRemotingHandlerFactoryData)AppDomain.CurrentDomain.GetData("HttpRemotingHandlerFactory");
- if (res == null)
- {
- res = new HttpRemotingHandlerFactoryData();
- AppDomain.CurrentDomain.SetData("HttpRemotingHandlerFactory", res);
- }
- return res;
- }
- }
-
- public IHttpHandler GetHandler (HttpContext context,
- string verb,
- string url,
- string filePath)
- {
- if (!CurrentHttpRemotingHandlerFactoryData.webConfigLoaded)
- ConfigureHttpChannel (context);
-
- return new HttpRemotingHandler (CurrentHttpRemotingHandlerFactoryData.transportSink);
- }
-
- void ConfigureHttpChannel (HttpContext context)
- {
- lock (GetType())
- {
- if (CurrentHttpRemotingHandlerFactoryData.webConfigLoaded) return;
-
- // Look for a channel that wants to receive http request
- IChannelReceiverHook chook = null;
- foreach (IChannel channel in ChannelServices.RegisteredChannels)
- {
- chook = channel as IChannelReceiverHook;
- if (chook == null) continue;
-
- if (chook.ChannelScheme != "http")
- throw new RemotingException ("Only http channels are allowed when hosting remoting objects in a web server");
-
- if (!chook.WantsToListen)
- {
- chook = null;
- continue;
- }
-
- //found chook
- break;
- }
-
- if (chook == null)
- {
- HttpChannel chan = new HttpChannel();
- ChannelServices.RegisterChannel(chan);
- chook = chan;
- }
-
- // Register the uri for the channel. The channel uri includes the scheme, the
- // host and the application path
-
- string channelUrl = context.Request.Url.GetLeftPart(UriPartial.Authority);
- channelUrl += context.Request.ApplicationPath;
- chook.AddHookChannelUri (channelUrl);
-
- CurrentHttpRemotingHandlerFactoryData.transportSink = new HttpServerTransportSink (chook.ChannelSinkChain, null);
-
- CurrentHttpRemotingHandlerFactoryData.webConfigLoaded = true;
- }
- }
-
- public void ReleaseHandler (IHttpHandler handler)
- {
- }
- }
-
- internal class HttpRemotingHandlerFactoryData
- {
-
- internal bool webConfigLoaded = false;
- internal HttpServerTransportSink transportSink = null;
-
- }
-}
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs
index 0e7efffeed4..f5a8ce25922 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpConnectionPool.cs
@@ -65,10 +65,8 @@ namespace System.Runtime.Remoting.Channels.Tcp
public static void Shutdown ()
{
-#if !TARGET_JVM
if (_poolThread != null)
_poolThread.Abort();
-#endif
}
public static int MaxOpenConnections
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
index 9ca8bba321d..cab5d342086 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.cs
@@ -56,9 +56,6 @@ namespace System.Runtime.Remoting.Channels.Tcp
RemotingThreadPool threadPool;
-#if TARGET_JVM
- private volatile bool stopped = false;
-#endif
void Init (IServerChannelSinkProvider serverSinkProvider)
{
@@ -207,11 +204,7 @@ namespace System.Runtime.Remoting.Channels.Tcp
{
try
{
-#if !TARGET_JVM
while(true)
-#else
- while(!stopped)
-#endif
{
Socket socket = listener.AcceptSocket ();
ClientConnection reader = new ClientConnection (this, socket, sink);
@@ -236,9 +229,6 @@ namespace System.Runtime.Remoting.Channels.Tcp
public void StartListening (object data)
{
-#if TARGET_JVM
- stopped = false;
-#endif
listener = new TcpListener (bindAddress, port);
if (server_thread == null)
{
@@ -261,16 +251,9 @@ namespace System.Runtime.Remoting.Channels.Tcp
public void StopListening (object data)
{
-#if TARGET_JVM
- stopped = true;
-#endif
if (server_thread == null) return;
-#if !TARGET_JVM
server_thread.Abort ();
-#else
- server_thread.Interrupt ();
-#endif
listener.Stop ();
threadPool.Free ();
server_thread.Join ();
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/BinaryCore.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/BinaryCore.cs
index 7da3a54c3ce..400fabd8fac 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/BinaryCore.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/BinaryCore.cs
@@ -98,13 +98,8 @@ namespace System.Runtime.Remoting.Channels
RemotingSurrogateSelector surrogateSelector = new RemotingSurrogateSelector ();
StreamingContext context = new StreamingContext (StreamingContextStates.Remoting, null);
-#if !TARGET_JVM
_serializationFormatter = new BinaryFormatter (surrogateSelector, context);
_deserializationFormatter = new BinaryFormatter (null, context);
-#else
- _serializationFormatter = (BinaryFormatter) vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (surrogateSelector, context, false);
- _deserializationFormatter = (BinaryFormatter) vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (null, context, false);
-#endif
_serializationFormatter.FilterLevel = _filterLevel;
_deserializationFormatter.FilterLevel = _filterLevel;
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/RemotingThreadPool.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/RemotingThreadPool.cs
index aa99a655487..123cbaf860e 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/RemotingThreadPool.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/RemotingThreadPool.cs
@@ -46,9 +46,6 @@ namespace System.Runtime.Remoting.Channels
AutoResetEvent threadDone = new AutoResetEvent (false);
ArrayList runningThreads = new ArrayList ();
-#if TARGET_JVM
- volatile
-#endif
bool stopped = false;
static object globalLock = new object ();
@@ -75,11 +72,7 @@ namespace System.Runtime.Remoting.Channels
threadDone.Set ();
workItems.Clear ();
foreach (Thread t in runningThreads)
-#if !TARGET_JVM
t.Abort ();
-#else
- t.Interrupt();
-#endif
runningThreads.Clear ();
}
if (this == sharedPool)
@@ -138,12 +131,7 @@ namespace System.Runtime.Remoting.Channels
void PoolThread ()
{
-#if !TARGET_JVM
while (true) {
-#else
- while (!stopped)
- {
-#endif
ThreadStart work = null;
do {
lock (workItems) {
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs
index 85c71a1c026..055824f9505 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.Channels/SoapMessageFormatter.cs
@@ -74,34 +74,6 @@ namespace System.Runtime.Remoting.Channels {
if (sf != null) {
if(_serverFaultExceptionField != null)
e = (Exception) _serverFaultExceptionField.GetValue(sf);
-#if TARGET_JVM
- if (e == null && sf.ExceptionType != null)
- {
- try
- {
- Type te = Type.GetType(sf.ExceptionType);
- if (te != null)
- {
- ConstructorInfo ce = te.GetConstructor(
- BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.CreateInstance,
- null, new Type[] {typeof(string)}, null);
-
- if (ce != null)
- {
- e = (Exception) ce.Invoke(new object[] {sf.ExceptionMessage});
- }
- else
- {
- e = (Exception) Activator.CreateInstance(te);
- }
- }
- }
- catch
- {
- e = null;
- }
- }
-#endif
}
if (e == null)
e = new RemotingException (fault.FaultString);
@@ -431,12 +403,6 @@ namespace System.Runtime.Remoting.Channels {
object GetNullValue (Type paramType)
{
-#if TARGET_JVM
- if (paramType.IsEnum)
- {
- return Activator.CreateInstance(paramType);
- }
-#endif
switch (Type.GetTypeCode (paramType))
{
case TypeCode.Boolean: return false;
@@ -453,12 +419,6 @@ namespace System.Runtime.Remoting.Channels {
case TypeCode.UInt32: return (uint)0;
case TypeCode.UInt64: return (ulong)0;
default:
-#if TARGET_JVM
- if (paramType.IsValueType)
- {
- return Activator.CreateInstance(paramType);
- }
-#endif
return null;
}
}
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.MetadataServices/MetaData.cs b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.MetadataServices/MetaData.cs
index f8dcf058f67..703b97fd828 100644
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.MetadataServices/MetaData.cs
+++ b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting.MetadataServices/MetaData.cs
@@ -35,10 +35,8 @@ using System.Text;
using System.Xml;
using System.Reflection;
using System.Net;
-#if !TARGET_JVM
using System.CodeDom.Compiler;
using Microsoft.CSharp;
-#endif
namespace System.Runtime.Remoting.MetadataServices
{
@@ -56,7 +54,6 @@ namespace System.Runtime.Remoting.MetadataServices
{
}
-#if !TARGET_JVM
[MonoTODO ("strong name")]
public static void ConvertCodeSourceFileToAssemblyFile (
string codePath,
@@ -133,7 +130,6 @@ namespace System.Runtime.Remoting.MetadataServices
memStream.Position = 0;
cg.GenerateCode (clientProxy, outputDirectory, memStream, outCodeStreamList, proxyUrl, proxyNamespace);
}
-#endif
public static void ConvertTypesToSchemaToFile (ServiceType [] types, SdlType sdlType, string path)
{
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.csproj b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.csproj
deleted file mode 100644
index c4d97e043ba..00000000000
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.csproj
+++ /dev/null
@@ -1,176 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{C4523363-42B4-486B-9422-B52B7D4CA3CF}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Runtime.Remoting</RootNamespace>
- <AssemblyName>System.Runtime.Remoting</AssemblyName>
- <JDKName>1.4.2</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <jarserver>ipa</jarserver>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_1_1;TARGET_JVM;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <jarserver>ipa</jarserver>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>DEBUG;TRACE;JAVA;NET_1_1;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_1_1;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>DEBUG;TRACE;JAVA;NET_1_1;TARGET_JVM;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>true</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <jarserver>ipa</jarserver>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\AggregateDictionary.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\HttpChannel.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\HttpClientChannel.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\HttpHelper.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\HttpRemotingHandler.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\HttpRemotingHandlerFactory.jvm.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\HttpServer.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Http\HttpServerChannel.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpChannel.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpClientChannel.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpClientTransportSink.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpClientTransportSinkProvider.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpConnectionPool.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpMessageIO.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpServerChannel.cs" />
- <Compile Include="System.Runtime.Remoting.Channels.Tcp\TcpServerTransportSink.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\BinaryClientFormatterSink.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\BinaryClientFormatterSinkProvider.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\BinaryCore.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\BinaryServerFormatterSink.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\BinaryServerFormatterSinkProvider.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\ChannelCore.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\CommonTransportKeys.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\IAuthorizeRemotingConnection.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\RemotingThreadPool.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\SoapClientFormatterSink.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\SoapClientFormatterSinkProvider.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\SoapCore.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\SoapMessageFormatter.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\SoapServerFormatterSink.cs" />
- <Compile Include="System.Runtime.Remoting.Channels\SoapServerFormatterSinkProvider.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\MetaData.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\MetaDataCodeGenerator.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\MetaDataExporter.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\SdlChannelSink.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\SdlChannelSinkProvider.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\SdlType.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\ServiceType.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\SUDSGeneratorException.cs" />
- <Compile Include="System.Runtime.Remoting.MetadataServices\SUDSParserException.cs" />
- <Compile Include="System.Runtime.Remoting.Services\RemotingClientProxy.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Runtime.Remoting.Services\RemotingService.cs">
- <SubType>Component</SubType>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers, Version=0.0.0.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\lib\J2SE.Helpers.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="rt, Version=1.4.2.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Runtime.Serialization.Formatters.Soap">
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Web">
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Xml" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(GHROOT)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-j2se-helpers="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\J2SE.Helpers.jar" REFS-JarPath-system-web="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Web.jar" REFS-JarPath-system-runtime-serialization-formatters-soap="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Runtime.Serialization.Formatters.Soap.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-system-data="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Data.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.4.2" />
- </VisualStudio>
- </ProjectExtensions>
-</Project>
diff --git a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.sln b/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.sln
deleted file mode 100644
index 31ba6eeb312..00000000000
--- a/mcs/class/System.Runtime.Remoting/System.Runtime.Remoting_2_0.sln
+++ /dev/null
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Runtime.Remoting_2_0", "System.Runtime.Remoting_2_0.csproj", "{C4523363-42B4-486B-9422-B52B7D4CA3CF}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {C4523363-42B4-486B-9422-B52B7D4CA3CF}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.exclude.sources b/mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.exclude.sources
deleted file mode 100644
index 347b530c155..00000000000
--- a/mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.exclude.sources
+++ /dev/null
@@ -1,4 +0,0 @@
-System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.cs
-System.Runtime.Remoting.Channels.Ipc/*.cs
-System.Runtime.Remoting.Channels.Ipc.Unix/*.cs
-System.Runtime.Remoting.Channels.Ipc.Win32/*.cs
diff --git a/mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.sources b/mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.sources
deleted file mode 100644
index c30dad473c9..00000000000
--- a/mcs/class/System.Runtime.Remoting/net_1_1_java_System.Runtime.Remoting.dll.sources
+++ /dev/null
@@ -1,3 +0,0 @@
-#include System.Runtime.Remoting.dll.sources
-
-System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.jvm.cs
diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/.gitattributes b/mcs/class/System.Runtime.Serialization.Formatters.Soap/.gitattributes
index e315fd55783..735f5b4f53a 100644
--- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/.gitattributes
+++ b/mcs/class/System.Runtime.Serialization.Formatters.Soap/.gitattributes
@@ -1,4 +1,3 @@
/README -crlf
/Sample.txt -crlf
/makefile.build -crlf
-/net_1_1_java_System.Runtime.Serialization.Formatters.Soap.dll.sources -crlf
diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/Assembly/AssemblyInfo.cs b/mcs/class/System.Runtime.Serialization.Formatters.Soap/Assembly/AssemblyInfo.cs
index cf07f16e8c5..645e25adde1 100644
--- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Runtime.Serialization.Formatters.Soap/Assembly/AssemblyInfo.cs
@@ -53,11 +53,9 @@ using System.Runtime.InteropServices;
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../msfinal.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: ComVisible (true)]
diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapReader.cs b/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapReader.cs
index d2a076e4b82..e55f763132e 100644
--- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapReader.cs
+++ b/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapReader.cs
@@ -499,7 +499,7 @@ namespace System.Runtime.Serialization.Formatters.Soap {
object objReturn =
FormatterServices.GetUninitializedObject(type);
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
objMgr.RaiseOnDeserializingEvent (objReturn);
#endif
if(objReturn is ISerializable)
diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapWriter.cs b/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapWriter.cs
index 1bc703e216f..ceb67d53c1f 100644
--- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapWriter.cs
+++ b/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap/SoapWriter.cs
@@ -84,7 +84,7 @@ namespace System.Runtime.Serialization.Formatters.Soap {
private FormatterAssemblyStyle _assemblyFormat = FormatterAssemblyStyle.Full;
private FormatterTypeStyle _typeFormat = FormatterTypeStyle.TypesWhenNeeded;
private static string defaultMessageNamespace;
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
SerializationObjectManager _manager;
#endif
@@ -106,7 +106,7 @@ namespace System.Runtime.Serialization.Formatters.Soap {
_xmlWriter.Formatting = Formatting.Indented;
_surrogateSelector = selector;
_context = context;
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
_manager = new SerializationObjectManager (_context);
#endif
}
@@ -207,7 +207,7 @@ namespace System.Runtime.Serialization.Formatters.Soap {
Thread.CurrentThread.CurrentCulture = savedCi;
}
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
_manager.RaiseOnSerializedEvent ();
#endif
}
@@ -373,7 +373,7 @@ namespace System.Runtime.Serialization.Formatters.Soap {
}
if(currentObject is ISerializable || surrogate != null) needsSerializationInfo = true;
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
_manager.RegisterObject (currentObject);
#endif
diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.csproj b/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.csproj
deleted file mode 100644
index e7ea4da3a0c..00000000000
--- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.csproj
+++ /dev/null
@@ -1,130 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Runtime.Serialization.Formatters.Soap</RootNamespace>
- <AssemblyName>System.Runtime.Serialization.Formatters.Soap</AssemblyName>
- <JDKName>1.4.2</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <jarserver>ipa</jarserver>
- <StartupObject>
- </StartupObject>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_2_0;NET_1_1</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>true</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <jarserver>iap2</jarserver>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>true</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TARGET_JVM;NET_2_0;NET_1_1</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>true</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <jarserver>iap2</jarserver>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(GHROOT)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system-xml="..\lib\System.Xml.jar" REFS-JarPath-system-data="..\lib\System.Data.jar" REFS-JarPath-system="..\lib\System.jar" REFS-JarPath-mscorlib="..\lib\mscorlib.jar" REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.4.2" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="rt, Version=1.4.2.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Runtime.Serialization.Formatters.Soap\SoapFormatter.cs" />
- <Compile Include="System.Runtime.Serialization.Formatters.Soap\SoapReader.cs" />
- <Compile Include="System.Runtime.Serialization.Formatters.Soap\SoapTypeMapper.cs" />
- <Compile Include="System.Runtime.Serialization.Formatters.Soap\SoapWriter.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
-</Project>
diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.sln b/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.sln
deleted file mode 100644
index feadf9c2451..00000000000
--- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap20.sln
+++ /dev/null
@@ -1,23 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Runtime.Serialization.Formatters.Soap20", "System.Runtime.Serialization.Formatters.Soap20.csproj", "{3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {3D1A5F49-3717-4D6B-BD34-10F30CB6DC4F}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/net_1_1_java_System.Runtime.Serialization.Formatters.Soap.dll.sources b/mcs/class/System.Runtime.Serialization.Formatters.Soap/net_1_1_java_System.Runtime.Serialization.Formatters.Soap.dll.sources
deleted file mode 100644
index c1233ccf295..00000000000
--- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/net_1_1_java_System.Runtime.Serialization.Formatters.Soap.dll.sources
+++ /dev/null
@@ -1 +0,0 @@
-#include System.Runtime.Serialization.Formatters.Soap.dll.sources
diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.csproj b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.csproj
deleted file mode 100644
index d9f6df6d148..00000000000
--- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization.csproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{A9DA8BA0-BEE0-4C51-AE51-BC67583337A9}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Runtime.Serialization</RootNamespace>
- <AssemblyName>System.Runtime.Serialization</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
- <SignAssembly>false</SignAssembly>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DelaySign>false</DelaySign>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\DeclaredTypeElement.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\DeclaredTypeElementCollection.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\ParameterElement.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\ParameterElementCollection.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\SerializationSectionGroup.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\TypeElement.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\TypeElementCollection.cs" />
- <Compile Include="System.Runtime.Serialization.Configuration\XmlFormatterSection.cs" />
- <Compile Include="System.Runtime.Serialization\CollectionDataContractAttribute.cs" />
- <Compile Include="System.Runtime.Serialization\ContractNamespaceAttribute.cs" />
- <Compile Include="System.Runtime.Serialization\DataContractAttribute.cs" />
- <Compile Include="System.Runtime.Serialization\DataContractSerializer.cs" />
- <Compile Include="System.Runtime.Serialization\DataMemberAttribute.cs" />
- <Compile Include="System.Runtime.Serialization\EnumMemberAttribute.cs" />
- <Compile Include="System.Runtime.Serialization\ExportOptions.cs" />
- <Compile Include="System.Runtime.Serialization\ExtensionDataObject.cs" />
- <Compile Include="System.Runtime.Serialization\IDataContractSurrogate.cs" />
- <Compile Include="System.Runtime.Serialization\IExtensibleDataObject.cs" />
- <Compile Include="System.Runtime.Serialization\ImportOptions.cs" />
- <Compile Include="System.Runtime.Serialization\InvalidDataContractException.cs" />
- <Compile Include="System.Runtime.Serialization\KnownTypeAttribute.cs" />
- <Compile Include="System.Runtime.Serialization\KnownTypeCollection.cs" />
- <Compile Include="System.Runtime.Serialization\NetDataContractSerializer.cs" />
- <Compile Include="System.Runtime.Serialization\SerializationMap.cs" />
- <Compile Include="System.Runtime.Serialization\XmlFormatterDeserializer.cs" />
- <Compile Include="System.Runtime.Serialization\XmlFormatterSerializer.cs" />
- <Compile Include="System.Runtime.Serialization\XmlObjectSerializer.cs" />
- <Compile Include="System.Runtime.Serialization\XmlSerializableServices.cs" />
- <Compile Include="System.Runtime.Serialization\XsdDataContractExporter.cs" />
- <Compile Include="System.Runtime.Serialization\XsdDataContractImporter.cs" />
- <Compile Include="System.Xml\IStreamProvider.cs" />
- <Compile Include="System.Xml\IXmlBinaryReaderInitializer.cs" />
- <Compile Include="System.Xml\IXmlBinaryWriterInitializer.cs" />
- <Compile Include="System.Xml\IXmlDictionary.cs" />
- <Compile Include="System.Xml\IXmlMtomReaderInitializer.cs" />
- <Compile Include="System.Xml\IXmlMtomWriterInitializer.cs" />
- <Compile Include="System.Xml\IXmlUTF8ReaderInitializer.cs" />
- <Compile Include="System.Xml\IXmlUTF8WriterInitializer.cs" />
- <Compile Include="System.Xml\OnXmlDictionaryReaderClose.cs" />
- <Compile Include="System.Xml\UniqueId.cs" />
- <Compile Include="System.Xml\XmlBinaryDictionaryReader.cs" />
- <Compile Include="System.Xml\XmlBinaryDictionaryWriter.cs" />
- <Compile Include="System.Xml\XmlBinaryFormat.cs" />
- <Compile Include="System.Xml\XmlBinaryReaderSession.cs" />
- <Compile Include="System.Xml\XmlBinaryWriterSession.cs" />
- <Compile Include="System.Xml\XmlC14NWriter.cs" />
- <Compile Include="System.Xml\XmlCanonicalWriter.cs" />
- <Compile Include="System.Xml\XmlDictionary.cs" />
- <Compile Include="System.Xml\XmlDictionaryReader.cs" />
- <Compile Include="System.Xml\XmlDictionaryReaderAutoGen.cs" />
- <Compile Include="System.Xml\XmlDictionaryReaderQuotas.cs" />
- <Compile Include="System.Xml\XmlDictionaryString.cs" />
- <Compile Include="System.Xml\XmlDictionaryWriter.cs" />
- <Compile Include="System.Xml\XmlDictionaryWriterAutoGen.cs" />
- <Compile Include="System.Xml\XmlSimpleDictionaryReader.cs" />
- <Compile Include="System.Xml\XmlSimpleDictionaryWriter.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="resources\mstypes.schema" >
- <LogicalName>mstypes.schema</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PostBuildEvent>@rem "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "$(TargetPath)" /f
-@rem "C:\Program Files\Mono-1.2.6\bin\gacutil.bat" -i "$(TargetPath)"</PostBuildEvent>
- </PropertyGroup>
-</Project>
diff --git a/mcs/class/System.Security/System.Security.csproj b/mcs/class/System.Security/System.Security.csproj
deleted file mode 100644
index bc5016e396f..00000000000
--- a/mcs/class/System.Security/System.Security.csproj
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <NoWarn>414</NoWarn>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0,SECURITY_DEP</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System.Xml"/>
- <Reference Include="System"/>
- <Reference Include="Mono.Security">
- <HintPath>..\lib\net_2_0\Mono.Security.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs
index 891be5db3ee..2d11b1727ae 100644
--- a/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs
+++ b/mcs/class/System.ServiceModel.Web/System.Runtime.Serialization.Json/JavaScriptReader.cs
@@ -26,7 +26,7 @@ namespace System.Runtime.Serialization.Json
{
object v = ReadCore ();
SkipSpaces ();
- if (r.Read () >= 0)
+ if (ReadChar () >= 0)
throw JsonError (String.Format ("extra characters in JSON input"));
return v;
}
@@ -68,8 +68,10 @@ namespace System.Runtime.Serialization.Json
}
while (true) {
SkipSpaces ();
- if (PeekChar () == '}')
+ if (PeekChar () == '}') {
+ ReadChar ();
break;
+ }
string name = ReadStringLiteral ();
SkipSpaces ();
Expect (':');
@@ -160,98 +162,89 @@ namespace System.Runtime.Serialization.Json
// It could return either int, long or decimal, depending on the parsed value.
object ReadNumericLiteral ()
{
+ var sb = new StringBuilder ();
+
bool negative = false;
if (PeekChar () == '-') {
negative = true;
- ReadChar ();
- if (PeekChar () < 0)
- throw JsonError ("Invalid JSON numeric literal; extra negation");
+ sb.Append ((char) ReadChar ());
}
int c;
- decimal val = 0;
int x = 0;
bool zeroStart = PeekChar () == '0';
for (; ; x++) {
c = PeekChar ();
if (c < '0' || '9' < c)
break;
- val = val * 10 + (c - '0');
- ReadChar ();
- if (zeroStart && x == 1 && c == '0')
- throw JsonError ("leading multiple zeros are not allowed");
+ sb.Append ((char) ReadChar ());
+ if (zeroStart && x == 1)
+ throw JsonError ("leading zeros are not allowed");
}
+ if (x == 0) // Reached e.g. for "- "
+ throw JsonError ("Invalid JSON numeric literal; no digit found");
// fraction
-
bool hasFrac = false;
- decimal frac = 0;
int fdigits = 0;
if (PeekChar () == '.') {
hasFrac = true;
- ReadChar ();
+ sb.Append ((char) ReadChar ());
if (PeekChar () < 0)
throw JsonError ("Invalid JSON numeric literal; extra dot");
- decimal d = 10;
while (true) {
c = PeekChar ();
if (c < '0' || '9' < c)
break;
- ReadChar ();
- frac += (c - '0') / d;
- d *= 10;
+ sb.Append ((char) ReadChar ());
fdigits++;
}
if (fdigits == 0)
throw JsonError ("Invalid JSON numeric literal; extra dot");
}
- frac = Decimal.Round (frac, fdigits);
c = PeekChar ();
if (c != 'e' && c != 'E') {
if (!hasFrac) {
- if (negative && int.MinValue <= -val ||
- !negative && val <= int.MaxValue)
- return (int) (negative ? -val : val);
- if (negative && long.MinValue <= -val ||
- !negative && val <= long.MaxValue)
- return (long) (negative ? -val : val);
+ int valueInt;
+ if (int.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueInt))
+ return valueInt;
+
+ long valueLong;
+ if (long.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueLong))
+ return valueLong;
+
+ ulong valueUlong;
+ if (ulong.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueUlong))
+ return valueUlong;
}
- var v = val + frac;
- return negative ? -v : v;
- }
-
- // exponent
-
- ReadChar ();
-
- int exp = 0;
- if (PeekChar () < 0)
- throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent");
+ decimal valueDecimal;
+ if (decimal.TryParse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture, out valueDecimal) && valueDecimal != 0)
+ return valueDecimal;
+ } else {
+ // exponent
+ sb.Append ((char) ReadChar ());
+ if (PeekChar () < 0)
+ throw new ArgumentException ("Invalid JSON numeric literal; incomplete exponent");
- bool negexp = false;
- c = PeekChar ();
- if (c == '-') {
- ReadChar ();
- negexp = true;
- }
- else if (c == '+')
- ReadChar ();
-
- if (PeekChar () < 0)
- throw JsonError ("Invalid JSON numeric literal; incomplete exponent");
- while (true) {
c = PeekChar ();
- if (c < '0' || '9' < c)
- break;
- exp = exp * 10 + (c - '0');
- ReadChar ();
+ if (c == '-') {
+ sb.Append ((char) ReadChar ());
+ }
+ else if (c == '+')
+ sb.Append ((char) ReadChar ());
+
+ if (PeekChar () < 0)
+ throw JsonError ("Invalid JSON numeric literal; incomplete exponent");
+ while (true) {
+ c = PeekChar ();
+ if (c < '0' || '9' < c)
+ break;
+ sb.Append ((char) ReadChar ());
+ }
}
- // it is messy to handle exponent, so I just use Decimal.Parse() with assured JSON format.
- if (negexp)
- return new Decimal ((double) (val + frac) / Math.Pow (10, exp));
- int [] bits = Decimal.GetBits (val + frac);
- return new Decimal (bits [0], bits [1], bits [2], negative, (byte) exp);
+
+ return double.Parse (sb.ToString (), NumberStyles.Float, CultureInfo.InvariantCulture);
}
StringBuilder vb = new StringBuilder ();
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web.csproj b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web.csproj
deleted file mode 100644
index 4cc599658a6..00000000000
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web.csproj
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{9B58C41D-B301-4136-8694-E4585BCC01A6}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.ServiceModel.Web</RootNamespace>
- <AssemblyName>System.ServiceModel.Web</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_3_5</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NET_3_5</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.IdentityModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Runtime.Serialization.Json\DataContractJsonSerializer.cs" />
- <Compile Include="System.Runtime.Serialization.Json\IXmlJsonReaderInitializer.cs" />
- <Compile Include="System.Runtime.Serialization.Json\IXmlJsonWriterInitializer.cs" />
- <Compile Include="System.Runtime.Serialization.Json\JsonReader.cs" />
- <Compile Include="System.Runtime.Serialization.Json\JsonReaderWriterFactory.cs" />
- <Compile Include="System.Runtime.Serialization.Json\JsonSerializationReader.cs" />
- <Compile Include="System.Runtime.Serialization.Json\JsonSerializationWriter.cs" />
- <Compile Include="System.Runtime.Serialization.Json\JsonWriter.cs" />
- <Compile Include="System.Runtime.Serialization.Json\TypeMap.cs" />
- <Compile Include="System.ServiceModel.Activation\WebScriptServiceHostFactory.cs" />
- <Compile Include="System.ServiceModel.Activation\WebServiceHostFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\WebBodyFormatMessageProperty.cs" />
- <Compile Include="System.ServiceModel.Channels\WebContentFormat.cs" />
- <Compile Include="System.ServiceModel.Channels\WebContentTypeMapper.cs" />
- <Compile Include="System.ServiceModel.Channels\WebMessageEncoder.cs" />
- <Compile Include="System.ServiceModel.Channels\WebMessageEncoderFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\WebMessageEncodingBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WebHttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WebHttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WebHttpElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WebHttpSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WebMessageEncodingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WebScriptEnablingElement.cs" />
- <Compile Include="System.ServiceModel.Description\WebHttpBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\WebScriptEnablingBehavior.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\JsonQueryStringConverter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\QueryStringConverter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\WebHttpDispatchOperationSelector.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\WebMessageFormatter.cs" />
- <Compile Include="System.ServiceModel.Syndication\Atom10FeedFormatter.cs" />
- <Compile Include="System.ServiceModel.Syndication\Atom10FeedFormatter_1.cs" />
- <Compile Include="System.ServiceModel.Syndication\Atom10ItemFormatter.cs" />
- <Compile Include="System.ServiceModel.Syndication\Atom10ItemFormatter_1.cs" />
- <Compile Include="System.ServiceModel.Syndication\ISyndicationElement.cs" />
- <Compile Include="System.ServiceModel.Syndication\Rss20FeedFormatter.cs" />
- <Compile Include="System.ServiceModel.Syndication\Rss20FeedFormatter_1.cs" />
- <Compile Include="System.ServiceModel.Syndication\Rss20ItemFormatter.cs" />
- <Compile Include="System.ServiceModel.Syndication\Rss20ItemFormatter_1.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationCategory.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationContent.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationElementExtension.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationElementExtensionCollection.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationExtensions.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationFeed.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationFeedFormatter.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationItem.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationItemFormatter.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationLink.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationPerson.cs" />
- <Compile Include="System.ServiceModel.Syndication\SyndicationVersions.cs" />
- <Compile Include="System.ServiceModel.Syndication\TextSyndicationContent.cs" />
- <Compile Include="System.ServiceModel.Syndication\TextSyndicationContentKind.cs" />
- <Compile Include="System.ServiceModel.Syndication\UrlSyndicationContent.cs" />
- <Compile Include="System.ServiceModel.Syndication\XmlSyndicationContent.cs" />
- <Compile Include="System.ServiceModel.Web\IncomingWebRequestContext.cs" />
- <Compile Include="System.ServiceModel.Web\IncomingWebResponseContext.cs" />
- <Compile Include="System.ServiceModel.Web\OutgoingWebRequestContext.cs" />
- <Compile Include="System.ServiceModel.Web\OutgoingWebResponseContext.cs" />
- <Compile Include="System.ServiceModel.Web\WebAttributeInfo.cs" />
- <Compile Include="System.ServiceModel.Web\WebChannelFactory.cs" />
- <Compile Include="System.ServiceModel.Web\WebGetAttribute.cs" />
- <Compile Include="System.ServiceModel.Web\WebInvokeAttribute.cs" />
- <Compile Include="System.ServiceModel.Web\WebMessageBodyStyle.cs" />
- <Compile Include="System.ServiceModel.Web\WebMessageFormat.cs" />
- <Compile Include="System.ServiceModel.Web\WebOperationContext.cs" />
- <Compile Include="System.ServiceModel.Web\WebServiceHost.cs" />
- <Compile Include="System.ServiceModel\WebHttpBinding.cs" />
- <Compile Include="System.ServiceModel\WebHttpSecurity.cs" />
- <Compile Include="System.ServiceModel\WebHttpSecurityMode.cs" />
- <Compile Include="System\UriTemplate.cs" />
- <Compile Include="System\UriTemplateEquivalenceComparer.cs" />
- <Compile Include="System\UriTemplateMatch.cs" />
- <Compile Include="System\UriTemplateMatchException.cs" />
- <Compile Include="System\UriTemplateTable.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PostBuildEvent>@rem "C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "$(TargetPath)" /f
-@rem "C:\Program Files\Mono-1.2.6\bin\gacutil.bat" -i "$(TargetPath)"</PostBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.csproj b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.csproj
deleted file mode 100644
index 4032d2da96d..00000000000
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.csproj
+++ /dev/null
@@ -1,112 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{05A2DAF1-316D-4350-B07B-B73BE591DE57}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MonoTests.System.ServiceModel.Web</RootNamespace>
- <AssemblyName>System.ServiceModel.Web_test_net_3_5</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_3_5</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Drawing" />
- <Reference Include="System.IdentityModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.IdentityModel.Selectors">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Messaging" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Security" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.ServiceModel.Web">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Transactions" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Services" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Test\System.Runtime.Serialization.Json\DataContractJsonSerializerTest.cs" />
- <Compile Include="Test\System.Runtime.Serialization.Json\JsonReaderTest.cs" />
- <Compile Include="Test\System.Runtime.Serialization.Json\JsonWriterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\WebBodyFormatMessagePropertyTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\WebMessageEncodingBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\WebHttpBehaviorTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\JsonQueryStringConverterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\QueryStringConverterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\WebHttpDispatchOperationSelectorTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\Atom10FeedFormatterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\Atom10ItemFormatterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\Rss20FeedFormatterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\Rss20ItemFormatterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\SyndicationElementExtensionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\SyndicationFeedTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\SyndicationItemTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\SyndicationLinkTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\TextSyndicationContentTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\UrlSyndicationContentTest.cs" />
- <Compile Include="Test\System.ServiceModel.Syndication\XmlSyndicationContentTest.cs" />
- <Compile Include="Test\System.ServiceModel.Web\WebGetAttributeTest.cs" />
- <Compile Include="Test\System.ServiceModel.Web\WebInvokeAttributeTest.cs" />
- <Compile Include="Test\System.ServiceModel.Web\WebServiceHostTest.cs" />
- <Compile Include="Test\System.ServiceModel\WebHttpBindingTest.cs" />
- <Compile Include="Test\System\UriTemplateTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\nunit20\framework\nunit.framework.dll20.csproj">
- <Project>{83DD7E12-A705-4DBA-9D71-09C8973D9382}</Project>
- <Name>nunit.framework.dll20</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PostBuildEvent>copy $(TargetDir)..\..\nunit20\nunit-console\bin\$(ConfigurationName)\*.exe $(TargetDir)
-copy $(TargetDir)..\..\nunit20\nunit-console\bin\$(ConfigurationName)\*.dll $(TargetDir)</PostBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.sln b/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.sln
deleted file mode 100644
index d13ef64f45d..00000000000
--- a/mcs/class/System.ServiceModel.Web/System.ServiceModel.Web_Test.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.ServiceModel.Web_Test", "System.ServiceModel.Web_Test.csproj", "{05A2DAF1-316D-4350-B07B-B73BE591DE57}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.dll20", "..\..\nunit20\framework\nunit.framework.dll20.csproj", "{83DD7E12-A705-4DBA-9D71-09C8973D9382}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug-Strong|Any CPU = Debug-Strong|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug-Strong|Any CPU.ActiveCfg = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug-Strong|Any CPU.Build.0 = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Release|Any CPU.Build.0 = Release|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug-Strong|Any CPU.ActiveCfg = Debug-Strong|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug-Strong|Any CPU.Build.0 = Debug-Strong|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.csproj b/mcs/class/System.ServiceModel/System.ServiceModel.csproj
deleted file mode 100644
index ebe0d847734..00000000000
--- a/mcs/class/System.ServiceModel/System.ServiceModel.csproj
+++ /dev/null
@@ -1,1129 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{0CD5DD13-89FF-4710-BAE2-4957418F4251}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.ServiceModel</RootNamespace>
- <AssemblyName>System.ServiceModel</AssemblyName>
- <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NET_2_0,TARGET_DOTNET</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.IdentityModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.IdentityModel.Selectors">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Messaging" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Security" />
- <Reference Include="System.Transactions" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Services" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Math.Prime.Generator\NextPrimeFinder.cs">
- <Link>Mono.Math.Prime.Generator\NextPrimeFinder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Math.Prime.Generator\PrimeGeneratorBase.cs">
- <Link>Mono.Math.Prime.Generator\PrimeGeneratorBase.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Math.Prime.Generator\SequentialSearchPrimeGeneratorBase.cs">
- <Link>Mono.Math.Prime.Generator\SequentialSearchPrimeGeneratorBase.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Math.Prime\ConfidenceFactor.cs">
- <Link>Mono.Math.Prime\ConfidenceFactor.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Math.Prime\PrimalityTests.cs">
- <Link>Mono.Math.Prime\PrimalityTests.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Math\BigInteger.cs">
- <Link>Mono.Math\BigInteger.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\ARC4Managed.cs">
- <Link>Mono.Security.Cryptography\ARC4Managed.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\CryptoConvert.cs">
- <Link>Mono.Security.Cryptography\CryptoConvert.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\CryptoTools.cs">
- <Link>Mono.Security.Cryptography\CryptoTools.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\MD2.cs">
- <Link>Mono.Security.Cryptography\MD2.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\MD2Managed.cs">
- <Link>Mono.Security.Cryptography\MD2Managed.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\MD4.cs">
- <Link>Mono.Security.Cryptography\MD4.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\MD4Managed.cs">
- <Link>Mono.Security.Cryptography\MD4Managed.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\PKCS1.cs">
- <Link>Mono.Security.Cryptography\PKCS1.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\PKCS8.cs">
- <Link>Mono.Security.Cryptography\PKCS8.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\RC4.cs">
- <Link>Mono.Security.Cryptography\RC4.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.Cryptography\RSAManaged.cs">
- <Link>Mono.Security.Cryptography\RSAManaged.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtension.cs">
- <Link>Mono.Security.X509.Extensions\AuthorityKeyIdentifierExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\BasicConstraintsExtension.cs">
- <Link>Mono.Security.X509.Extensions\BasicConstraintsExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\CertificatePoliciesExtension.cs">
- <Link>Mono.Security.X509.Extensions\CertificatePoliciesExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\CRLDistributionPointsExtension.cs">
- <Link>Mono.Security.X509.Extensions\CRLDistributionPointsExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\ExtendedKeyUsageExtension.cs">
- <Link>Mono.Security.X509.Extensions\ExtendedKeyUsageExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\GeneralNames.cs">
- <Link>Mono.Security.X509.Extensions\GeneralNames.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\KeyAttributesExtension.cs">
- <Link>Mono.Security.X509.Extensions\KeyAttributesExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\KeyUsageExtension.cs">
- <Link>Mono.Security.X509.Extensions\KeyUsageExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\NetscapeCertTypeExtension.cs">
- <Link>Mono.Security.X509.Extensions\NetscapeCertTypeExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\PrivateKeyUsagePeriodExtension.cs">
- <Link>Mono.Security.X509.Extensions\PrivateKeyUsagePeriodExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\SubjectAltNameExtension.cs">
- <Link>Mono.Security.X509.Extensions\SubjectAltNameExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509.Extensions\SubjectKeyIdentifierExtension.cs">
- <Link>Mono.Security.X509.Extensions\SubjectKeyIdentifierExtension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\ITrustAnchors.cs">
- <Link>Mono.Security.X509\ITrustAnchors.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\PKCS12.cs">
- <Link>Mono.Security.X509\PKCS12.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\TrustAnchors.cs">
- <Link>Mono.Security.X509\TrustAnchors.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X501Name.cs">
- <Link>Mono.Security.X509\X501Name.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509Builder.cs">
- <Link>Mono.Security.X509\X509Builder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509Certificate.cs">
- <Link>Mono.Security.X509\X509Certificate.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509CertificateBuilder.cs">
- <Link>Mono.Security.X509\X509CertificateBuilder.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509CertificateCollection.cs">
- <Link>Mono.Security.X509\X509CertificateCollection.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509Chain.cs">
- <Link>Mono.Security.X509\X509Chain.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509ChainStatusFlags.cs">
- <Link>Mono.Security.X509\X509ChainStatusFlags.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509CRL.cs">
- <Link>Mono.Security.X509\X509CRL.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509Extension.cs">
- <Link>Mono.Security.X509\X509Extension.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509Extensions.cs">
- <Link>Mono.Security.X509\X509Extensions.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509Store.cs">
- <Link>Mono.Security.X509\X509Store.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509StoreManager.cs">
- <Link>Mono.Security.X509\X509StoreManager.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X509Stores.cs">
- <Link>Mono.Security.X509\X509Stores.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security.X509\X520Attributes.cs">
- <Link>Mono.Security.X509\X520Attributes.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security\ASN1.cs">
- <Link>Mono.Security\ASN1.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security\ASN1Convert.cs">
- <Link>Mono.Security\ASN1Convert.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security\PKCS7.cs">
- <Link>Mono.Security\PKCS7.cs</Link>
- </Compile>
- <Compile Include="..\..\..\mcs\class\Mono.Security\Mono.Security\StrongName.cs">
- <Link>Mono.Security\StrongName.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- <Compile Include="Mono.CodeGeneration\CodeAdd.cs" />
- <Compile Include="Mono.CodeGeneration\CodeAnd.cs" />
- <Compile Include="Mono.CodeGeneration\CodeArgument.cs" />
- <Compile Include="Mono.CodeGeneration\CodeArgumentReference.cs" />
- <Compile Include="Mono.CodeGeneration\CodeArithmeticOperation.cs" />
- <Compile Include="Mono.CodeGeneration\CodeArrayItem.cs" />
- <Compile Include="Mono.CodeGeneration\CodeArrayLength.cs" />
- <Compile Include="Mono.CodeGeneration\CodeAssignment.cs" />
- <Compile Include="Mono.CodeGeneration\CodeBinaryComparison.cs" />
- <Compile Include="Mono.CodeGeneration\CodeBinaryOperation.cs" />
- <Compile Include="Mono.CodeGeneration\CodeBlock.cs" />
- <Compile Include="Mono.CodeGeneration\CodeBuilder.cs" />
- <Compile Include="Mono.CodeGeneration\CodeCast.cs" />
- <Compile Include="Mono.CodeGeneration\CodeClass.cs" />
- <Compile Include="Mono.CodeGeneration\CodeCustomAttribute.cs" />
- <Compile Include="Mono.CodeGeneration\CodeDecrement.cs" />
- <Compile Include="Mono.CodeGeneration\CodeEquals.cs" />
- <Compile Include="Mono.CodeGeneration\CodeExpression.cs" />
- <Compile Include="Mono.CodeGeneration\CodeFieldReference.cs" />
- <Compile Include="Mono.CodeGeneration\CodeFor.cs" />
- <Compile Include="Mono.CodeGeneration\CodeForeach.cs" />
- <Compile Include="Mono.CodeGeneration\CodeGenerationHelper.cs" />
- <Compile Include="Mono.CodeGeneration\CodeIf.cs" />
- <Compile Include="Mono.CodeGeneration\CodeIncrement.cs" />
- <Compile Include="Mono.CodeGeneration\CodeIs.cs" />
- <Compile Include="Mono.CodeGeneration\CodeItem.cs" />
- <Compile Include="Mono.CodeGeneration\CodeLiteral.cs" />
- <Compile Include="Mono.CodeGeneration\CodeMethod.cs" />
- <Compile Include="Mono.CodeGeneration\CodeMethodCall.cs" />
- <Compile Include="Mono.CodeGeneration\CodeModule.cs" />
- <Compile Include="Mono.CodeGeneration\CodeNew.cs" />
- <Compile Include="Mono.CodeGeneration\CodeNewArray.cs" />
- <Compile Include="Mono.CodeGeneration\CodeNotEquals.cs" />
- <Compile Include="Mono.CodeGeneration\CodeOr.cs" />
- <Compile Include="Mono.CodeGeneration\CodeProperty.cs" />
- <Compile Include="Mono.CodeGeneration\CodePropertyReference.cs" />
- <Compile Include="Mono.CodeGeneration\CodeReturn.cs" />
- <Compile Include="Mono.CodeGeneration\CodeSelect.cs" />
- <Compile Include="Mono.CodeGeneration\CodeSelfIncrement.cs" />
- <Compile Include="Mono.CodeGeneration\CodeUnaryOperation.cs" />
- <Compile Include="Mono.CodeGeneration\CodeValueReference.cs" />
- <Compile Include="Mono.CodeGeneration\CodeVariableDeclaration.cs" />
- <Compile Include="Mono.CodeGeneration\CodeVariableReference.cs" />
- <Compile Include="Mono.CodeGeneration\CodeWhen.cs" />
- <Compile Include="Mono.CodeGeneration\CodeWhile.cs" />
- <Compile Include="Mono.CodeGeneration\CodeWriter.cs" />
- <Compile Include="Mono.CodeGeneration\Exp.cs" />
- <Compile Include="Mono.Security.Cryptography\MD5SHA1.cs" />
- <Compile Include="Mono.Security.Cryptography\TlsHMAC.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\BitConverterLE.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\ChallengeResponse.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\MessageBase.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\NtlmFlags.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\NtlmTargetInformation.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\NtlmVersion.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\Type1Message.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\Type2Message.cs" />
- <Compile Include="Mono.Security.Protocol.Ntlm\Type3Message.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsClientCertificate.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsClientCertificateVerify.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsClientFinished.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsClientHello.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsClientKeyExchange.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsServerCertificate.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsServerCertificateRequest.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsServerFinished.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsServerHello.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsServerHelloDone.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Client\TlsServerKeyExchange.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsClientCertificate.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsClientCertificateVerify.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsClientFinished.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsClientHello.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsClientKeyExchange.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsServerCertificate.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsServerCertificateRequest.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsServerFinished.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsServerHello.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsServerHelloDone.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake.Server\TlsServerKeyExchange.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake\ClientCertificateType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake\HandshakeMessage.cs" />
- <Compile Include="Mono.Security.Protocol.Tls.Handshake\HandshakeType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\Alert.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\CipherAlgorithmType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\CipherSuite.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\CipherSuiteCollection.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\CipherSuiteFactory.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\ClientContext.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\ClientRecordProtocol.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\ClientSessionCache.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\ContentType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\Context.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\DebugHelper.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\ExchangeAlgorithmType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\HandshakeState.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\HashAlgorithmType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\HttpsClientStream.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\RecordProtocol.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\RSASslSignatureDeformatter.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\RSASslSignatureFormatter.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SecurityCompressionType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SecurityParameters.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SecurityProtocolType.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\ServerContext.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\ServerRecordProtocol.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SslCipherSuite.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SslClientStream.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SslHandshakeHash.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SslServerStream.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\SslStreamBase.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\TlsCipherSuite.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\TlsClientSettings.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\TlsException.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\TlsServerSettings.cs" />
- <Compile Include="Mono.Security.Protocol.Tls\TlsStream.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocument2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocumentBuilder2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocumentWriter2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathNavigator2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathNode2.cs" />
- <Compile Include="System.Collections.Generic\KeyedByTypeCollection.cs" />
- <Compile Include="System.Collections.Generic\SynchronizedCollection.cs" />
- <Compile Include="System.Collections.Generic\SynchronizedKeyedCollection.cs" />
- <Compile Include="System.Collections.Generic\SynchronizedReadOnlyCollection.cs" />
- <Compile Include="System.ServiceModel.Activation\AspNetIntegrationRequirementsAttribute.cs" />
- <Compile Include="System.ServiceModel.Activation\HttpHandler.cs" />
- <Compile Include="System.ServiceModel.Activation\HttpModule.cs" />
- <Compile Include="System.ServiceModel.Activation\IServiceHostFactory.cs" />
- <Compile Include="System.ServiceModel.Activation\ServiceHostFactory.cs" />
- <Compile Include="System.ServiceModel.Activation\ServiceHostFactoryBase.cs" />
- <Compile Include="System.ServiceModel.Channels\AddressHeader.cs" />
- <Compile Include="System.ServiceModel.Channels\AddressHeaderCollection.cs" />
- <Compile Include="System.ServiceModel.Channels\AddressingVersion.cs" />
- <Compile Include="System.ServiceModel.Channels\AspNetReplyChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\AspNetRequestContext.cs" />
- <Compile Include="System.ServiceModel.Channels\AsymmetricSecurityBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\BinaryMessageEncoder.cs" />
- <Compile Include="System.ServiceModel.Channels\BinaryMessageEncoderFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\BinaryMessageEncodingBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\Binding.cs" />
- <Compile Include="System.ServiceModel.Channels\BindingContext.cs" />
- <Compile Include="System.ServiceModel.Channels\BindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\BindingElementCollection.cs" />
- <Compile Include="System.ServiceModel.Channels\BindingParameterCollection.cs" />
- <Compile Include="System.ServiceModel.Channels\BodyWriter.cs" />
- <Compile Include="System.ServiceModel.Channels\BufferManager.cs" />
- <Compile Include="System.ServiceModel.Channels\CachingCompiler.cs" />
- <Compile Include="System.ServiceModel.Channels\ChannelBase.cs" />
- <Compile Include="System.ServiceModel.Channels\ChannelFactoryBase.cs" />
- <Compile Include="System.ServiceModel.Channels\ChannelListenerBase.cs" />
- <Compile Include="System.ServiceModel.Channels\ChannelListenerBase_1.cs" />
- <Compile Include="System.ServiceModel.Channels\ChannelManagerBase.cs" />
- <Compile Include="System.ServiceModel.Channels\ChannelParameterCollection.cs" />
- <Compile Include="System.ServiceModel.Channels\ChannelPoolSettings.cs" />
- <Compile Include="System.ServiceModel.Channels\CommunicationObject.cs" />
- <Compile Include="System.ServiceModel.Channels\CompilationException.cs" />
- <Compile Include="System.ServiceModel.Channels\CompositeDuplexBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\CompositeDuplexBindingElementImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\ConnectionOrientedTransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\CustomBinding.cs" />
- <Compile Include="System.ServiceModel.Channels\DeliveryFailure.cs" />
- <Compile Include="System.ServiceModel.Channels\DeliveryStatus.cs" />
- <Compile Include="System.ServiceModel.Channels\DirectionalAction.cs" />
- <Compile Include="System.ServiceModel.Channels\DuplexSessionChannelBase.cs" />
- <Compile Include="System.ServiceModel.Channels\FaultConverter.cs" />
- <Compile Include="System.ServiceModel.Channels\HostedTransportConfiguration.cs" />
- <Compile Include="System.ServiceModel.Channels\HtmlizedException.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpChannelFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpChannelListener.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpChannelManager.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpReplyChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpRequestChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpRequestContext.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpRequestMessageProperty.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpResponseMessageProperty.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpsTransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\HttpTransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\IBindingDeliveryCapabilities.cs" />
- <Compile Include="System.ServiceModel.Channels\IBindingMulticastCapabilities.cs" />
- <Compile Include="System.ServiceModel.Channels\IBindingRuntimePreferences.cs" />
- <Compile Include="System.ServiceModel.Channels\IChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IChannelFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\IChannelListener.cs" />
- <Compile Include="System.ServiceModel.Channels\IDuplexChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IDuplexSession.cs" />
- <Compile Include="System.ServiceModel.Channels\IDuplexSessionChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IInputChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IInputSession.cs" />
- <Compile Include="System.ServiceModel.Channels\IInputSessionChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IMessageProperty.cs" />
- <Compile Include="System.ServiceModel.Channels\InputChannelBase.cs" />
- <Compile Include="System.ServiceModel.Channels\InvalidChannelBindingException.cs" />
- <Compile Include="System.ServiceModel.Channels\IOutputChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IOutputSession.cs" />
- <Compile Include="System.ServiceModel.Channels\IOutputSessionChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IReplyChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IReplySessionChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IRequestChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\IRequestSessionChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\ISecurityCapabilities.cs" />
- <Compile Include="System.ServiceModel.Channels\ISession.cs" />
- <Compile Include="System.ServiceModel.Channels\ISessionChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\ITransactedBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\ITransportTokenAssertionProvider.cs" />
- <Compile Include="System.ServiceModel.Channels\LayeredCommunicationObject.cs" />
- <Compile Include="System.ServiceModel.Channels\LayeredOutputChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\LayeredReplyChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\LayeredRequestChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\LocalClientSecuritySettings.cs" />
- <Compile Include="System.ServiceModel.Channels\Message.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageBuffer.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageBufferImpl.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageEncoder.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageEncoderFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageEncodingBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageEncodingBindingElementImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageFault.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageFaultBodyWriter.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageHeader.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageHeaderInfo.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageHeaders.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageImpl.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageProperties.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageSecurityBindingSupport.cs" />
- <Compile Include="System.ServiceModel.Channels\MessageVersion.cs" />
- <Compile Include="System.ServiceModel.Channels\MsmqBindingElementBase.cs" />
- <Compile Include="System.ServiceModel.Channels\MsmqChannelFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\MsmqChannelListener.cs" />
- <Compile Include="System.ServiceModel.Channels\MsmqInputChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\MsmqMessageProperty.cs" />
- <Compile Include="System.ServiceModel.Channels\MsmqOutputChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\MsmqTransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\MtomMessageEncoder.cs" />
- <Compile Include="System.ServiceModel.Channels\MtomMessageEncoderFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\MtomMessageEncodingBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\NamedPipeConnectionPoolSettings.cs" />
- <Compile Include="System.ServiceModel.Channels\NamedPipetransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\OneWayBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\OneWayBindingElementImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\OutputChannelBase.cs" />
- <Compile Include="System.ServiceModel.Channels\PeerResolverBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\PeerTransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\PnrpPeerResolverBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\ReliableSessionBindingElementImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\ReplyChannelBase.cs" />
- <Compile Include="System.ServiceModel.Channels\RequestChannelBase.cs" />
- <Compile Include="System.ServiceModel.Channels\RequestContext.cs" />
- <Compile Include="System.ServiceModel.Channels\SecureMessageDecryptor.cs" />
- <Compile Include="System.ServiceModel.Channels\SecureMessageGenerator.cs" />
- <Compile Include="System.ServiceModel.Channels\SecurityBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\SecurityBindingElementImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\SecurityChannelFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\SecurityChannelListener.cs" />
- <Compile Include="System.ServiceModel.Channels\SecurityOutputChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\SecurityRequestChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\SecurityRequestContext.cs" />
- <Compile Include="System.ServiceModel.Channels\ServiceHostParser.cs" />
- <Compile Include="System.ServiceModel.Channels\SslStreamSecurityBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\SslStreamSecurityUpgradeAcceptor.cs" />
- <Compile Include="System.ServiceModel.Channels\SslStreamSecurityUpgradeProvider.cs" />
- <Compile Include="System.ServiceModel.Channels\StandardBindingImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\StreamSecurityUpgradeAcceptor.cs" />
- <Compile Include="System.ServiceModel.Channels\StreamSecurityUpgradeInitiator.cs" />
- <Compile Include="System.ServiceModel.Channels\StreamSecurityUpgradeProvider.cs" />
- <Compile Include="System.ServiceModel.Channels\StreamUpgradeAcceptor.cs" />
- <Compile Include="System.ServiceModel.Channels\StreamUpgradeBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\StreamUpgradeInitiator.cs" />
- <Compile Include="System.ServiceModel.Channels\StreamUpgradeProvider.cs" />
- <Compile Include="System.ServiceModel.Channels\SvcHttpHandler.cs" />
- <Compile Include="System.ServiceModel.Channels\SvcHttpHandlerFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\SymmetricSecurityBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\TcpChannelFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\TcpChannelListener.cs" />
- <Compile Include="System.ServiceModel.Channels\TcpConnectionPoolSettings.cs" />
- <Compile Include="System.ServiceModel.Channels\TcpDuplexSessionChannel.cs" />
- <Compile Include="System.ServiceModel.Channels\TcpTransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\TextMessageEncoder.cs" />
- <Compile Include="System.ServiceModel.Channels\TextMessageEncoderFactory.cs" />
- <Compile Include="System.ServiceModel.Channels\TextMessageEncodingBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\TransactionFlowBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\TransactionFlowBindingElementImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\TransactionMessageProperty.cs" />
- <Compile Include="System.ServiceModel.Channels\TransportBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\TransportBindingElementImporter.cs" />
- <Compile Include="System.ServiceModel.Channels\TransportSecurityBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\UnderstoodHeaders.cs" />
- <Compile Include="System.ServiceModel.Channels\UseManagedPresentationBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\WindowsStreamSecurityBindingElement.cs" />
- <Compile Include="System.ServiceModel.Channels\WSEncryptedXml.cs" />
- <Compile Include="System.ServiceModel.Channels\WSSecurityMessageHeader.cs" />
- <Compile Include="System.ServiceModel.Channels\WSSignedXml.cs" />
- <Compile Include="System.ServiceModel.Channels\XmlObjectSerializerBodyWriter.cs" />
- <Compile Include="System.ServiceModel.Channels\XmlReaderBodyWriter.cs" />
- <Compile Include="System.ServiceModel.ComIntegration\Dummy.cs" />
- <Compile Include="System.ServiceModel.Configuration\AddressHeaderCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\AllowedAudienceUriElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\AllowedAudienceUriElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\AuthenticationMode.cs" />
- <Compile Include="System.ServiceModel.Configuration\AuthorizationPolicyTypeElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\AuthorizationPolicyTypeElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\BaseAddressElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BaseAddressElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\BasicHttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BasicHttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BasicHttpMessageSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BasicHttpSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BehaviorExtensionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BehaviorsSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\BinaryMessageEncodingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BindingElementExtensionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\BindingsSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\CallbackDebugElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\CallbackTimeoutsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\CertificateElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\CertificateReferenceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ChannelEndpointElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ChannelEndpointElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ChannelPoolSettingsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ClaimTypeElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ClaimTypeElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ClientCredentialsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ClientSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ClientViaElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComContractElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComContractElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComContractsSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComMethodElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComMethodElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\CommonBehaviorsSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\CommonEndpointBehaviorElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\CommonServiceBehaviorElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComPersistableTypeElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComPersistableTypeElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\CompositeDuplexElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComUdtElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ComUdtElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ConfigUtil.cs" />
- <Compile Include="System.ServiceModel.Configuration\ConnectionOrientedTransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\CustomBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\CustomBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\CustomBindingElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\DataContractSerializerElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\DiagnosticSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\DnsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\EncodingConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\EndpointAddressElementBase.cs" />
- <Compile Include="System.ServiceModel.Configuration\EndpointBehaviorElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\EndpointBehaviorElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ExtensionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ExtensionElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ExtensionsSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\FederatedMessageSecurityOverHttpElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\HostElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\HostTimeoutsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\HttpDigestClientElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\HttpsTransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\HttpTransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\HttpTransportSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\IBindingConfigurationElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\IdentityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\IPAddressConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\IssuedTokenClientBehaviorsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\IssuedTokenClientBehaviorsElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\IssuedTokenClientElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\IssuedTokenParametersElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\IssuedTokenParametersEndpointAddressElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\IssuedTokenServiceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\LocalClientSecuritySettingsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\LocalServiceSecuritySettingsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MessageLoggingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MessageSecurityOverHttpElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MessageSecurityOverMsmqElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MessageSecurityOverTcpElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MessageSecurityVersionConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\MessageVersionConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\MetadataElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MethodStubs.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexBindingBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexHttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexHttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexHttpsBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexHttpsBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexNamedPipeBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexNamedPipeBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexTcpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MexTcpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqBindingElementBase.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqElementBase.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqIntegrationBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqIntegrationBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqIntegrationElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqIntegrationSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqTransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MsmqTransportSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\MtomMessageEncodingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NamedPipeConnectionPoolSettingsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NamedPipeTransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NamedPipeTransportSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NamedServiceModelExtensionCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetMsmqBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetMsmqBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetMsmqSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetNamedPipeBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetNamedPipeBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetNamedPipeSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetPeerTcpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetPeerTcpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetTcpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetTcpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NetTcpSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\NonDualMessageSecurityOverHttpElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\OneWayElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PeerCredentialElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PeerCustomResolverElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PeerResolverElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PeerSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PeerTransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PeerTransportSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PnrpPeerResolverElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PolicyImporterElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\PolicyImporterElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\PolicyVersionConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\PrivacyNoticeElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ReliableMessagingVersionConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\ReliableSessionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\RsaElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\SecureConversationServiceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\SecurityAlgorithmSuiteConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\SecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\SecurityElementBase.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceAuthorizationElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceBehaviorElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceBehaviorElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceCredentialsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceDebugElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceEndpointElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceEndpointElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceHostingEnvironmentSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceMetadataPublishingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceModelConfigurationElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceModelEnhancedConfigurationElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceModelExtensionCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceModelExtensionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceModelSectionGroup.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServicePrincipalNameElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceSecurityAuditElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServicesSection.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceThrottlingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\ServiceTimeoutsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\SslStreamSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\StandardBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\StandardBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\StandardBindingElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\StandardBindingOptionalReliableSessionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\StandardBindingReliableSessionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\SynchronousReceiveElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TcpConnectionPoolSettingsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TcpTransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TcpTransportSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TextMessageEncodingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TransactedBatchingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TransactionFlowElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TransactionProtocolConverter.cs" />
- <Compile Include="System.ServiceModel.Configuration\TransportConfigurationTypeElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\TransportConfigurationTypeElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\TransportElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\UseManagedPresentationElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\UserNameServiceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\UserPrincipalNameElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WindowsClientElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WindowsServiceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WindowsStreamSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WS2007FederationHttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WS2007FederationHttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WS2007HttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WS2007HttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WsdlImporterElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WsdlImporterElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSDualHttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSDualHttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSDualHttpSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSFederationHttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSFederationHttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSFederationHttpSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSHttpBindingBaseElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSHttpBindingCollectionElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSHttpBindingElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSHttpSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\WSHttpTransportSecurityElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509CertificateTrustedIssuerElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509CertificateTrustedIssuerElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509ClientCertificateAuthenticationElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509ClientCertificateCredentialsElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509DefaultServiceCertificateElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509InitiatorCertificateClientElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509InitiatorCertificateServiceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509PeerCertificateAuthenticationElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509PeerCertificateElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509RecipientCertificateClientElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509RecipientCertificateServiceElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509ScopedServiceCertificateElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509ScopedServiceCertificateElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\X509ServiceCertificateAuthenticationElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\XmlDictionaryReaderQuotasElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\XmlElementElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\XmlElementElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\XPathMessageFilterElement.cs" />
- <Compile Include="System.ServiceModel.Configuration\XPathMessageFilterElementCollection.cs" />
- <Compile Include="System.ServiceModel.Configuration\XPathMessageFilterElementComparer.cs" />
- <Compile Include="System.ServiceModel.Description\CallbackDebugBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\CallbackTimeoutsBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\ClientCredentials.cs" />
- <Compile Include="System.ServiceModel.Description\ClientViaBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\ContractDescription.cs" />
- <Compile Include="System.ServiceModel.Description\ContractDescriptionGenerator.cs" />
- <Compile Include="System.ServiceModel.Description\DataContractSerializerMessageContractImporter.cs" />
- <Compile Include="System.ServiceModel.Description\DataContractSerializerOperationBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\FaultDescription.cs" />
- <Compile Include="System.ServiceModel.Description\FaultDescriptionCollection.cs" />
- <Compile Include="System.ServiceModel.Description\HostedBindingBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\IContractBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\IContractBehaviorAttribute.cs" />
- <Compile Include="System.ServiceModel.Description\IEndpointBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\IMetadataExchange.cs" />
- <Compile Include="System.ServiceModel.Description\IOperationBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\IOperationContractGenerationExtension.cs" />
- <Compile Include="System.ServiceModel.Description\IpolicyExporter.cs" />
- <Compile Include="System.ServiceModel.Description\IPolicyImporter.cs" />
- <Compile Include="System.ServiceModel.Description\IServiceBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\IServiceContractGenerationExtension.cs" />
- <Compile Include="System.ServiceModel.Description\IWsdlExporter.cs" />
- <Compile Include="System.ServiceModel.Description\IWsdlImporter.cs" />
- <Compile Include="System.ServiceModel.Description\LocalServiceSecuritySettings.cs" />
- <Compile Include="System.ServiceModel.Description\MessageBodyDescription.cs" />
- <Compile Include="System.ServiceModel.Description\MessageDescription.cs" />
- <Compile Include="System.ServiceModel.Description\MessageDescriptionCollection.cs" />
- <Compile Include="System.ServiceModel.Description\MessageHeaderDescription.cs" />
- <Compile Include="System.ServiceModel.Description\MessageHeaderDescriptionCollection.cs" />
- <Compile Include="System.ServiceModel.Description\MessagePartDescription.cs" />
- <Compile Include="System.ServiceModel.Description\MessagePartDescriptionCollection.cs" />
- <Compile Include="System.ServiceModel.Description\MessagePropertyDescription.cs" />
- <Compile Include="System.ServiceModel.Description\MessagePropertyDescriptionCollection.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataBundle.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataConversionError.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataExchangeBindings.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataExchangeClient.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataExporter.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataImporter.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataLocation.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataReference.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataResolver.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataSection.cs" />
- <Compile Include="System.ServiceModel.Description\MetadataSectionSerializerBase.cs" />
- <Compile Include="System.ServiceModel.Description\MustUnderstandBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\OperationContractGenerationContext.cs" />
- <Compile Include="System.ServiceModel.Description\OperationDescription.cs" />
- <Compile Include="System.ServiceModel.Description\OperationDescriptionCollection.cs" />
- <Compile Include="System.ServiceModel.Description\PolicyAssertionCollection.cs" />
- <Compile Include="System.ServiceModel.Description\PolicyConversionContext.cs" />
- <Compile Include="System.ServiceModel.Description\PolicyVersion.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceAuthorizationBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceContractGenerationContext.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceContractGenerator.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceCredentials.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceDebugBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceDescription.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceEndpoint.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceEndpointCollection.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceMetadataBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceMetadataExtension.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceSecurityAuditBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceThrottlingBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\ServiceTimeoutsBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\SynchronousReceiveBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\TransactedBatchingBehavior.cs" />
- <Compile Include="System.ServiceModel.Description\TypedMessageConverter.cs" />
- <Compile Include="System.ServiceModel.Description\WebServiceHelper.cs" />
- <Compile Include="System.ServiceModel.Description\WsdlContractConversionContext.cs" />
- <Compile Include="System.ServiceModel.Description\WsdlEndpointConversionContext.cs" />
- <Compile Include="System.ServiceModel.Description\WsdlExporter.cs" />
- <Compile Include="System.ServiceModel.Description\WsdlImporter.cs" />
- <Compile Include="System.ServiceModel.Description\WSTrustMessageConverters.cs" />
- <Compile Include="System.ServiceModel.Description\WSTrustSTSContract.cs" />
- <Compile Include="System.ServiceModel.Description\XmlSerializerMessageContractImporter.cs" />
- <Compile Include="System.ServiceModel.Description\XmlSerializerOperationBehavior.cs" />
- <Compile Include="System.ServiceModel.Diagnostics\PerformanceCounterScope.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ActionMessageFilter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ActionMessageFilterTable.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\InputOrReplyRequestProcessor.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\OperationContextScopeHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\PostReceiveRequestHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\BaseMessagesFormatter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ChannelDispatcher.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ChannelDispatcherBase.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ChannelDispatcherCollection.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ClientOperation.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ClientRuntime.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\DataContractSerializerServiceBehavior.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\DefaultInstanceContextProvider.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\DispatchOperation.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\DispatchRuntime.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\EndpointAddressMessageFilter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\EndpointAddressMessageFilterTable.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\EndpointDispatcher.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ErrorProcessingHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ExceptionHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\FaultContractInfo.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\FilterInvalidBodyAccessException.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\FinalizeProcessingHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ICallContextInitializer.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IChannelInitializer.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IClientMessageFormatter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IClientMessageInspector.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IClientOperationSelector.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IDispatchMessageFormatter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IDispatchMessageInspector.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IDispatchOperationSelector.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IErrorHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IInputSessionShutdown.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IInstanceContextInitializer.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IInstanceContextProvider.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IInstanceProvider.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IInteractiveChannelInitializer.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IMessageFilterTable.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\BaseRequestProcessorHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\InstanceBehavior.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\InitializingHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\InstanceContextIdleCallback.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\InvalidBodyAccessException.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IOperationInvoker.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\IParameterInspector.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MatchAllMessageFilter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MatchNoneMessageFilter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MessageFilter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MessageFilterNodeQuotaExceededException.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MessageFilterTable.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MessageProcessingContext.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\BaseRequestProcessor.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MexInstanceContextProvider.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\MultipleMessageFilterMatchesException.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\NavigatorInvalidBodyAccessException.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\OperationInvokerHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\PrefixEndpointAddressMessageFilter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ReplyHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\SecurityHandler.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\SeekableXPathNavigator.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\ServiceThrottle.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\SingletonInstanceContextProvider.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\XPathMessageContext.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\XPathMessageFilter.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\XPathMessageFilterTable.cs" />
- <Compile Include="System.ServiceModel.Dispatcher\XPathNavigatorException.cs" />
- <Compile Include="System.ServiceModel.MsmqIntegration\MsmqIntegrationBinding.cs" />
- <Compile Include="System.ServiceModel.MsmqIntegration\MsmqIntegrationBindingElement.cs" />
- <Compile Include="System.ServiceModel.MsmqIntegration\MsmqIntegrationMessageProperty.cs" />
- <Compile Include="System.ServiceModel.MsmqIntegration\MsmqIntegrationSecurity.cs" />
- <Compile Include="System.ServiceModel.MsmqIntegration\MsmqMessage.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\CustomPeerResolverService.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\IPeerResolverContract.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\PeerCustomResolverSettings.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\PeerReferralPolicy.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\PeerResolverMode.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\PeerResolverSettings.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\RefreshInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\RefreshResponseInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\RefreshResult.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\RegisterInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\RegisterResponseInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\ResolveInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\ResolveResponseInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\ServiceSettingsResponseInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\UnregisterInfo.cs" />
- <Compile Include="System.ServiceModel.PeerResolvers\UpdateInfo.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\AuthenticatorCommunicationObject.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\BinarySecretSecurityToken.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\ClaimTypeRequirement.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\CommunicationSecurityTokenAuthenticator.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\CommunicationSecurityTokenProvider.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\DerivedKeySecurityToken.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\IIssuanceSecurityTokenAuthenticator.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\InitiatorServiceModelSecurityTokenRequirement.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\InternalEncryptedKeyIdentifierClause.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\ISecurityContextSecurityTokenCache.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\IssuedSecurityTokenHandler.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\IssuedSecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\IssuedSecurityTokenProvider.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\IssuedTokenCommunicationObject.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\KerberosSecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\ProviderCommunicationObject.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\RecipientServiceModelSecurityTokenRequirement.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\RenewedSecurityTokenHandler.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\RsaSecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SecureConversationSecurityTokenAuthenticator.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SecureConversationSecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SecurityContextSecurityToken.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SecurityContextSecurityTokenAuthenticator.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SecurityContextSecurityTokenResolver.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SecurityTokenReferenceStyle.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\ServiceModelSecurityTokenRequirement.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\ServiceModelSecurityTokenTypes.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SpnegoSecurityTokenAuthenticator.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SpnegoSecurityTokenProvider.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SslnegoCookieResolver.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SslSecurityTokenAuthenticator.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SslSecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SslSecurityTokenProvider.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SspiClientSecurityTokenAuthenticator.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SspiSecurityToken.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SspiSecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SspiSession.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\SupportingTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\TlsClientSession.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\TlsServerSession.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\UserNameSecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\WrappedKeySecurityToken.cs" />
- <Compile Include="System.ServiceModel.Security.Tokens\X509SecurityTokenParameters.cs" />
- <Compile Include="System.ServiceModel.Security\BasicSecurityProfileVersion.cs" />
- <Compile Include="System.ServiceModel.Security\BinarySecretKeyIdentifierClause.cs" />
- <Compile Include="System.ServiceModel.Security\ChannelProtectionRequirements.cs" />
- <Compile Include="System.ServiceModel.Security\DataProtectionSecurityStateEncoder.cs" />
- <Compile Include="System.ServiceModel.Security\ExpiredSecurityTokenException.cs" />
- <Compile Include="System.ServiceModel.Security\HttpDigestClientCredential.cs" />
- <Compile Include="System.ServiceModel.Security\IdentityVerifier.cs" />
- <Compile Include="System.ServiceModel.Security\IEndpointIdentityProvider.cs" />
- <Compile Include="System.ServiceModel.Security\InfocardInteractiveChannelInitializer.cs" />
- <Compile Include="System.ServiceModel.Security\ISecureConversationSession.cs" />
- <Compile Include="System.ServiceModel.Security\ISecuritySession.cs" />
- <Compile Include="System.ServiceModel.Security\IssuedTokenClientCredential.cs" />
- <Compile Include="System.ServiceModel.Security\IssuedTokenServiceCredential.cs" />
- <Compile Include="System.ServiceModel.Security\KeyEntropyMode.cs" />
- <Compile Include="System.ServiceModel.Security\KeyNameIdentifierClause.cs" />
- <Compile Include="System.ServiceModel.Security\MessagePartSpecification.cs" />
- <Compile Include="System.ServiceModel.Security\MessageProtectionOrder.cs" />
- <Compile Include="System.ServiceModel.Security\MessageSecurityException.cs" />
- <Compile Include="System.ServiceModel.Security\PeerCredential.cs" />
- <Compile Include="System.ServiceModel.Security\ScopedMessagePartSpecification.cs" />
- <Compile Include="System.ServiceModel.Security\SecureConversationServiceCredential.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityAccessDeniedException.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityAlgorithmSuite.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityContextKeyIdentifierClause.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityCredentialsManager.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityMessageProperty.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityNegotiationException.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityStateEncoder.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityTokenAttachmentMode.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityTokenSpecification.cs" />
- <Compile Include="System.ServiceModel.Security\SecurityVersion.cs" />
- <Compile Include="System.ServiceModel.Security\ServiceCredentialsSecurityTokenManager.cs" />
- <Compile Include="System.ServiceModel.Security\SspiSecurityTokenProvider.cs" />
- <Compile Include="System.ServiceModel.Security\SupportingTokenSpecification.cs" />
- <Compile Include="System.ServiceModel.Security\UnionSecurityTokenResolver.cs" />
- <Compile Include="System.ServiceModel.Security\UserNamePasswordClientCredential.cs" />
- <Compile Include="System.ServiceModel.Security\UserNamePasswordServiceCredential.cs" />
- <Compile Include="System.ServiceModel.Security\WindowsClientCredential.cs" />
- <Compile Include="System.ServiceModel.Security\WindowsServiceCredential.cs" />
- <Compile Include="System.ServiceModel.Security\WSSecurityTokenSerializer.cs" />
- <Compile Include="System.ServiceModel.Security\X509CertificateInitiatorClientCredential.cs" />
- <Compile Include="System.ServiceModel.Security\X509CertificateInitiatorServiceCredential.cs" />
- <Compile Include="System.ServiceModel.Security\X509CertificateRecipientClientCredential.cs" />
- <Compile Include="System.ServiceModel.Security\X509CertificateRecipientServiceCredential.cs" />
- <Compile Include="System.ServiceModel.Security\X509ClientCertificateAuthentication.cs" />
- <Compile Include="System.ServiceModel.Security\X509PeerCertificateAuthentication.cs" />
- <Compile Include="System.ServiceModel.Security\X509ServiceCertificateAuthentication.cs" />
- <Compile Include="System.ServiceModel\ActionNotSupportedException.cs" />
- <Compile Include="System.ServiceModel\AddressAccessDeniedException.cs" />
- <Compile Include="System.ServiceModel\AddressAlreadyInUseException.cs" />
- <Compile Include="System.ServiceModel\AllEnums.cs" />
- <Compile Include="System.ServiceModel\BasicHttpBinding.cs" />
- <Compile Include="System.ServiceModel\BasicHttpMessageSecurity.cs" />
- <Compile Include="System.ServiceModel\BasicHttpSecurity.cs" />
- <Compile Include="System.ServiceModel\CallbackBehaviorAttribute.cs" />
- <Compile Include="System.ServiceModel\ChannelFactory.cs" />
- <Compile Include="System.ServiceModel\ChannelFactory_1.cs" />
- <Compile Include="System.ServiceModel\ClientBase.cs" />
- <Compile Include="System.ServiceModel\ClientCredentialsSecurityTokenManager.cs" />
- <Compile Include="System.ServiceModel\ClientProxyGenerator.cs" />
- <Compile Include="System.ServiceModel\ClientRuntimeChannel.cs" />
- <Compile Include="System.ServiceModel\CommunicationException.cs" />
- <Compile Include="System.ServiceModel\CommunicationObjectFaultedException.cs" />
- <Compile Include="System.ServiceModel\Constants.cs" />
- <Compile Include="System.ServiceModel\DataContractFormatAttribute.cs" />
- <Compile Include="System.ServiceModel\DefaultCommunicationTimeouts.cs" />
- <Compile Include="System.ServiceModel\DeliveryRequirementsAttribute.cs" />
- <Compile Include="System.ServiceModel\DnsEndpointIdentity.cs" />
- <Compile Include="System.ServiceModel\Dummy.cs" />
- <Compile Include="System.ServiceModel\DuplexChannelFactory.cs" />
- <Compile Include="System.ServiceModel\DuplexClientBase.cs" />
- <Compile Include="System.ServiceModel\EndpointAddress.cs" />
- <Compile Include="System.ServiceModel\EndpointAddress10.cs" />
- <Compile Include="System.ServiceModel\EndpointAddressAugust2004.cs" />
- <Compile Include="System.ServiceModel\EndpointAddressBuilder.cs" />
- <Compile Include="System.ServiceModel\EndpointIdentity.cs" />
- <Compile Include="System.ServiceModel\EndpointNotFoundException.cs" />
- <Compile Include="System.ServiceModel\EnvelopeVersion.cs" />
- <Compile Include="System.ServiceModel\ExceptionDetail.cs" />
- <Compile Include="System.ServiceModel\ExtensionCollection.cs" />
- <Compile Include="System.ServiceModel\FaultCode.cs" />
- <Compile Include="System.ServiceModel\FaultContractAttribute.cs" />
- <Compile Include="System.ServiceModel\FaultException.cs" />
- <Compile Include="System.ServiceModel\FaultException_1.cs" />
- <Compile Include="System.ServiceModel\FaultReason.cs" />
- <Compile Include="System.ServiceModel\FaultReasonText.cs" />
- <Compile Include="System.ServiceModel\FederatedMessageSecurityOverHttp.cs" />
- <Compile Include="System.ServiceModel\HttpTransportSecurity.cs" />
- <Compile Include="System.ServiceModel\IClientChannel.cs" />
- <Compile Include="System.ServiceModel\ICommunicationObject.cs" />
- <Compile Include="System.ServiceModel\IContextChannel.cs" />
- <Compile Include="System.ServiceModel\IDefaultCommunicationTimeouts.cs" />
- <Compile Include="System.ServiceModel\IDuplexClientChannel.cs" />
- <Compile Include="System.ServiceModel\IExtensibleObject.cs" />
- <Compile Include="System.ServiceModel\IExtension.cs" />
- <Compile Include="System.ServiceModel\IExtensionCollection.cs" />
- <Compile Include="System.ServiceModel\InstanceContext.cs" />
- <Compile Include="System.ServiceModel\InvalidMessageContractException.cs" />
- <Compile Include="System.ServiceModel\IServiceChannel.cs" />
- <Compile Include="System.ServiceModel\MessageBodyAttribute.cs" />
- <Compile Include="System.ServiceModel\MessageContractAttribute.cs" />
- <Compile Include="System.ServiceModel\MessageContractMemberAttribute.cs" />
- <Compile Include="System.ServiceModel\MessageHeaderArrayAttribute.cs" />
- <Compile Include="System.ServiceModel\MessageHeaderAttribute.cs" />
- <Compile Include="System.ServiceModel\MessageHeaderException.cs" />
- <Compile Include="System.ServiceModel\MessageHeader_1.cs" />
- <Compile Include="System.ServiceModel\MessageParameterAttribute.cs" />
- <Compile Include="System.ServiceModel\MessagePropertyAttribute.cs" />
- <Compile Include="System.ServiceModel\MessageSecurityOverHttp.cs" />
- <Compile Include="System.ServiceModel\MessageSecurityOverMsmq.cs" />
- <Compile Include="System.ServiceModel\MessageSecurityOverTcp.cs" />
- <Compile Include="System.ServiceModel\MessageSecurityVersion.cs" />
- <Compile Include="System.ServiceModel\MsmqBindingBase.cs" />
- <Compile Include="System.ServiceModel\MsmqException.cs" />
- <Compile Include="System.ServiceModel\MsmqPoisonMessageException.cs" />
- <Compile Include="System.ServiceModel\MsmqTransportSecurity.cs" />
- <Compile Include="System.ServiceModel\NetMsmqBinding.cs" />
- <Compile Include="System.ServiceModel\NetMsmqSecurity.cs" />
- <Compile Include="System.ServiceModel\NetPeerTcpBinding.cs" />
- <Compile Include="System.ServiceModel\NetTcpBinding.cs" />
- <Compile Include="System.ServiceModel\NetTcpSecurity.cs" />
- <Compile Include="System.ServiceModel\NonDualMessageSecurityOverHttp.cs" />
- <Compile Include="System.ServiceModel\OperationBehaviorAttribute.cs" />
- <Compile Include="System.ServiceModel\OperationContext.cs" />
- <Compile Include="System.ServiceModel\OperationContextScope.cs" />
- <Compile Include="System.ServiceModel\OperationContractAttribute.cs" />
- <Compile Include="System.ServiceModel\OptionalReliableSession.cs" />
- <Compile Include="System.ServiceModel\PeerMessagePropagationMessageFilter.cs" />
- <Compile Include="System.ServiceModel\PeerNode.cs" />
- <Compile Include="System.ServiceModel\PeerNodeAddress.cs" />
- <Compile Include="System.ServiceModel\PeerResolver.cs" />
- <Compile Include="System.ServiceModel\PeerResolverImpl.cs" />
- <Compile Include="System.ServiceModel\PeerSecuritySettings.cs" />
- <Compile Include="System.ServiceModel\PoisonMessageException.cs" />
- <Compile Include="System.ServiceModel\ProtocolException.cs" />
- <Compile Include="System.ServiceModel\QuotaExceededException.cs" />
- <Compile Include="System.ServiceModel\ReliableMessagingVersion.cs" />
- <Compile Include="System.ServiceModel\ReliableSession.cs" />
- <Compile Include="System.ServiceModel\RsaEndpointIdentity.cs" />
- <Compile Include="System.ServiceModel\ServiceAuthorizationManager.cs" />
- <Compile Include="System.ServiceModel\ServiceBehaviorAttribute.cs" />
- <Compile Include="System.ServiceModel\ServiceContractAttribute.cs" />
- <Compile Include="System.ServiceModel\ServiceHost.cs" />
- <Compile Include="System.ServiceModel\ServiceHostBase.cs" />
- <Compile Include="System.ServiceModel\ServiceHostingEnvironment.cs" />
- <Compile Include="System.ServiceModel\ServiceKnownTypeAttribute.cs" />
- <Compile Include="System.ServiceModel\ServiceRuntimeChannel.cs" />
- <Compile Include="System.ServiceModel\ServiceSecurityContext.cs" />
- <Compile Include="System.ServiceModel\SpnEndpointIdentity.cs" />
- <Compile Include="System.ServiceModel\TcpTransportSecurity.cs" />
- <Compile Include="System.ServiceModel\TransactionProtocol.cs" />
- <Compile Include="System.ServiceModel\TransferMode.cs" />
- <Compile Include="System.ServiceModel\UnknownMessageReceivedEventArgs.cs" />
- <Compile Include="System.ServiceModel\UpnEndpointIdentity.cs" />
- <Compile Include="System.ServiceModel\UriSchemeKeyedCollection.cs" />
- <Compile Include="System.ServiceModel\WS2007FederationHttpBinding.cs" />
- <Compile Include="System.ServiceModel\WS2007HttpBinding.cs" />
- <Compile Include="System.ServiceModel\WSDualHttpBinding.cs" />
- <Compile Include="System.ServiceModel\WSDualHttpSecurity.cs" />
- <Compile Include="System.ServiceModel\WSFederationHttpBinding.cs" />
- <Compile Include="System.ServiceModel\WSFederationHttpSecurity.cs" />
- <Compile Include="System.ServiceModel\WSHttpBinding.cs" />
- <Compile Include="System.ServiceModel\WSHttpBindingBase.cs" />
- <Compile Include="System.ServiceModel\WSHttpSecurity.cs" />
- <Compile Include="System.ServiceModel\X509CertificateEndpointIdentity.cs" />
- <Compile Include="System.ServiceModel\XmlSerializerFormatAttribute.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- <Folder Include="Test\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PostBuildEvent>"C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "$(TargetPath)" /f
-"C:\Program Files\Mono-1.2.6\bin\gacutil.bat" -i "$(TargetPath)"</PostBuildEvent>
- </PropertyGroup>
-</Project>
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
index e4d1f452fea..777573fc1fd 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/AllEnums.cs
@@ -411,6 +411,8 @@ namespace System.ServiceModel.Security
Custom,
}
+#if !NET_4_5
+
public enum X509CertificateValidationMode
{
None,
@@ -419,6 +421,7 @@ namespace System.ServiceModel.Security
PeerOrChainTrust,
Custom,
}
+#endif
}
namespace System.ServiceModel.Security.Tokens
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
index 702217017d0..07952e04f14 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
@@ -389,7 +389,7 @@ namespace System.ServiceModel
var od = cd.Operations.Find (methodName);
if (od == null)
throw new ArgumentException (String.Format ("Operation '{0}' not found in the service contract '{1}' in namespace '{2}'", methodName, cd.Name, cd.Namespace));
- return Inner.Process (od.SyncMethod, methodName, args);
+ return Inner.Process (od.SyncMethod, methodName, args, OperationContext.Current);
}
protected IAsyncResult BeginInvoke (string methodName, object [] args, AsyncCallback callback, object state)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs
index 1c94718b6b9..41d75e98f9c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRealProxy.cs
@@ -108,8 +108,7 @@ namespace System.ServiceModel
// sync invocation
pl = new object [inmsg.MethodBase.GetParameters ().Length];
Array.Copy (inmsg.Args, pl, inmsg.ArgCount);
- channel.Context = OperationContext.Current;
- ret = channel.Process (inmsg.MethodBase, od.Name, pl);
+ ret = channel.Process (inmsg.MethodBase, od.Name, pl, OperationContext.Current);
method = od.SyncMethod;
} else if (inmsg.MethodBase.Equals (od.BeginMethod)) {
// async invocation
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
index 909e0bcb24b..3fa8170565c 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ClientRuntimeChannel.cs
@@ -46,9 +46,7 @@ namespace System.ServiceModel.MonoInternal
{
ContractDescription Contract { get; }
- OperationContext Context { set; }
-
- object Process (MethodBase method, string operationName, object [] parameters);
+ object Process (MethodBase method, string operationName, object [] parameters, OperationContext context);
IAsyncResult BeginProcess (MethodBase method, string operationName, object [] parameters, AsyncCallback callback, object asyncState);
@@ -69,12 +67,11 @@ namespace System.ServiceModel.MonoInternal
TimeSpan default_open_timeout, default_close_timeout;
IChannel channel;
IChannelFactory factory;
- OperationContext context;
#region delegates
readonly ProcessDelegate _processDelegate;
- delegate object ProcessDelegate (MethodBase method, string operationName, object [] parameters);
+ delegate object ProcessDelegate (MethodBase method, string operationName, object [] parameters, OperationContext context);
readonly RequestDelegate requestDelegate;
@@ -149,10 +146,6 @@ namespace System.ServiceModel.MonoInternal
get { return channel as IDuplexChannel; }
}
- public OperationContext Context {
- set { context = value; }
- }
-
#region IClientChannel
bool did_interactive_initialization;
@@ -445,36 +438,28 @@ namespace System.ServiceModel.MonoInternal
public IAsyncResult BeginProcess (MethodBase method, string operationName, object [] parameters, AsyncCallback callback, object asyncState)
{
- if (context != null)
- throw new InvalidOperationException ("another operation is in progress");
- context = OperationContext.Current;
-
- return _processDelegate.BeginInvoke (method, operationName, parameters, callback, asyncState);
+ return _processDelegate.BeginInvoke (method, operationName, parameters, OperationContext.Current, callback, asyncState);
}
public object EndProcess (MethodBase method, string operationName, object [] parameters, IAsyncResult result)
{
-
if (result == null)
throw new ArgumentNullException ("result");
if (parameters == null)
throw new ArgumentNullException ("parameters");
// FIXME: the method arguments should be verified to be
// identical to the arguments in the corresponding begin method.
- object asyncResult = _processDelegate.EndInvoke (result);
- context = null;
- return asyncResult;
+ return _processDelegate.EndInvoke (result);
}
- public object Process (MethodBase method, string operationName, object [] parameters)
+ public object Process (MethodBase method, string operationName, object [] parameters, OperationContext context)
{
var previousContext = OperationContext.Current;
try {
// Inherit the context from the calling thread
- if (this.context != null)
- OperationContext.Current = this.context;
+ OperationContext.Current = context;
- return DoProcess (method, operationName, parameters);
+ return DoProcess (method, operationName, parameters, context);
} catch (Exception ex) {
throw;
} finally {
@@ -483,7 +468,7 @@ namespace System.ServiceModel.MonoInternal
}
}
- object DoProcess (MethodBase method, string operationName, object [] parameters)
+ object DoProcess (MethodBase method, string operationName, object [] parameters, OperationContext context)
{
if (AllowInitializationUI)
DisplayInitializationUI ();
@@ -493,9 +478,9 @@ namespace System.ServiceModel.MonoInternal
Open ();
if (!od.IsOneWay)
- return Request (od, parameters);
+ return Request (od, parameters, context);
else {
- Output (od, parameters);
+ Output (od, parameters, context);
return null;
}
}
@@ -513,17 +498,17 @@ namespace System.ServiceModel.MonoInternal
return od;
}
- void Output (OperationDescription od, object [] parameters)
+ void Output (OperationDescription od, object [] parameters, OperationContext context)
{
ClientOperation op = runtime.Operations [od.Name];
- Send (CreateRequest (op, parameters), OperationTimeout);
+ Send (CreateRequest (op, parameters, context), OperationTimeout);
}
- object Request (OperationDescription od, object [] parameters)
+ object Request (OperationDescription od, object [] parameters, OperationContext context)
{
ClientOperation op = runtime.Operations [od.Name];
object [] inspections = new object [runtime.MessageInspectors.Count];
- Message req = CreateRequest (op, parameters);
+ Message req = CreateRequest (op, parameters, context);
for (int i = 0; i < inspections.Length; i++)
inspections [i] = runtime.MessageInspectors [i].BeforeSendRequest (ref req, this);
@@ -615,7 +600,7 @@ namespace System.ServiceModel.MonoInternal
}
#endregion
- Message CreateRequest (ClientOperation op, object [] parameters)
+ Message CreateRequest (ClientOperation op, object [] parameters, OperationContext context)
{
MessageVersion version = message_version;
if (version == null)
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceRuntimeChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceRuntimeChannel.cs
index 0fe0d47b3dc..7bc54823627 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/ServiceRuntimeChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/ServiceRuntimeChannel.cs
@@ -114,9 +114,9 @@ namespace System.ServiceModel.MonoInternal
return client.EndProcess (method, operationName, parameters, result);
}
- public object Process (MethodBase method, string operationName, object [] parameters)
+ public object Process (MethodBase method, string operationName, object [] parameters, OperationContext context)
{
- return client.Process (method, operationName, parameters);
+ return client.Process (method, operationName, parameters, context);
}
}
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj b/mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj
deleted file mode 100644
index 4285497c45d..00000000000
--- a/mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj
+++ /dev/null
@@ -1,290 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{05A2DAF1-316D-4350-B07B-B73BE591DE57}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MonoTests.System.ServiceModel</RootNamespace>
- <AssemblyName>System.ServiceModel_test_net_3_0</AssemblyName>
- <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_3_5</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.IdentityModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.IdentityModel.Selectors">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Messaging" />
- <Reference Include="System.Runtime.Serialization">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Security" />
- <Reference Include="System.ServiceModel">
- <RequiredTargetFramework>3.0</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Transactions" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Services" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <None Include="System.ServiceModel_test_net_3_0.dll.config" />
- <None Include="Test\config\basicHttpBinding" />
- <None Include="Test\config\basicHttpBinding.config" />
- <None Include="Test\config\ChangeLog" />
- <None Include="Test\config\client.endpoint" />
- <None Include="Test\config\client.endpoint.config" />
- <None Include="Test\config\client.metadata" />
- <None Include="Test\config\client.metadata.config" />
- <None Include="Test\config\customBinding" />
- <None Include="Test\config\customBinding.config" />
- <None Include="Test\config\empty" />
- <None Include="Test\config\empty.config" />
- <None Include="Test\config\endpointBehaviors" />
- <None Include="Test\config\endpointBehaviors.config" />
- <None Include="Test\config\extensions" />
- <None Include="Test\config\extensions.config" />
- <None Include="Test\config\netTcpBinding" />
- <None Include="Test\config\netTcpBinding.config" />
- <None Include="Test\config\service" />
- <None Include="Test\config\service.config" />
- <None Include="Test\config\serviceBehaviors" />
- <None Include="Test\config\serviceBehaviors.config" />
- <None Include="Test\config\test1" />
- <None Include="Test\config\test1.config" />
- <None Include="Test\config\userBinding" />
- <None Include="Test\config\userBinding.config" />
- <None Include="Test\config\wsHttpBinding" />
- <None Include="Test\config\wsHttpBinding.config" />
- <None Include="Test\Resources\test.cer" />
- <None Include="Test\Resources\test.pfx" />
- <None Include="Test\Resources\test2.pfx" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Test\FeatureBased\Features.Contracts\OperationContractServer.xml" />
- <Content Include="Test\System.ServiceModel.Description\dump.xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Test\FeatureBased\Features.Client\AsyncCallTesterProxy.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\AsyncPatternServer.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\DataContractTesterProxy.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\ExitProcessHelperServer.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\FaultsTesterProxy.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\KnownTypeTesterProxy.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\MessageContractTesterProxy.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\OperationContractServer.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\PrimitiveTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Client\UntypedMessageTesterProxy.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\AsyncCallTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\AsyncPatternContract.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\DualContract.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\DataContractTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\ExitpProcessHelper.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\FaultsTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\KnownTypeTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\MessageContractTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\OperationContract.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\PrimitiveTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Contracts\UntypedMessageTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\AsyncCallTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Test\FeatureBased\Features.Serialization\AsyncPatternTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\DataContractSerializerTest.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\DualContractTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\ExitProcessHelper.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\FaultsTest.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\KnownTypeTest.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\MessageContractTest.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\OperationContractTester.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\PrimitiveTesterTest.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\UntypedMessageTest.cs" />
- <Compile Include="Test\FeatureBased\Features.Serialization\XmlComparer.cs" />
- <Compile Include="Test\FeatureBased\TestFixtureBase.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\AddressHeaderTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\AddressingVersionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\AsymmetricSecurityBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\BindingContextTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\BindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\CalcSampleProxy.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\CommunicationObjectTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\CustomBindingTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\DebugBindingElement.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\EmptyFaultExceptionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\EnvelopeVersionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\FaultConverterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\FaultExceptionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\HandlerBodyWriter.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\HandlerTransportBindingElement.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\HttpTransportBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\InterceptorBindingElement.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\InvalidBindingElement.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\LocalClientSecuritySettingsTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MessageBufferTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MessageEncoderTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MessageEncodingBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MessageHeadersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MessageHeaderTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MessageTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MessageVersionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\MsmqTransportBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\NamedPipeTransportBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\OneWayBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\OutputChannelBase.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\ReplyChannelBase.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\RequestChannelBase.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\SecurityAssert.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\SecurityBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\SslStreamSecurityBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\SymmetricSecurityBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\TcpTransportBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\TextMessageEncodingBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Channels\TransactionFlowBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\AddressHeaderCollectionElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\BasicHttpBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\BehaviorsSectionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\BindingsSectionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\ChannelEndpointElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\CustomBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\EndpointBehaviorElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\ExtensionsSectionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\MetadataElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\MexBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\NetNamedPipeBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\NetPeerTcpBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\NetTcpBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\ServiceBehaviorElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\ServiceElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\ServiceModelConfigurationElementCollectionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\ServiceModelSectionGroupTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\StandardBindingCollectionElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\StandardBindingElementCollectionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\StandardBindingElementTest.cs" />
- <Compile Include="Test\System.ServiceModel.Configuration\UserBinding.cs" />
- <Compile Include="Test\System.ServiceModel.Description\ClientCredentialsTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\ContractDescriptionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\MetadataResolverTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\OperationDescriptionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\ServiceAuthorizationBehaviorTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\ServiceCredentialsTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\ServiceDebugBehaviorTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\ServiceMetadataBehaviorTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\TypedMessageConverterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\WsdlExporterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Description\WsdlImporterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\ActionFilterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\DispatchOperationTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\DispatchRuntimeTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\EndpointAddressMessageFilterTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\EndpointDispatcherTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\ExceptionHandlerTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\FilterTableTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\InvalidBodyAccessExceptionTest.cs" />
- <Compile Include="Test\System.ServiceModel.Dispatcher\PrefixEndpointAddressMessageFilterTest.cs" />
- <Compile Include="Test\System.ServiceModel.PeerResolvers\CustomPeerResolverServiceTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\IssuedSecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\IssuedSecurityTokenProviderTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\RsaSecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\SecureConversationSecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\SecurityContextSecurityTokenTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\SecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\ServiceModelSecurityTokenTypesTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\SslSecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\SspiSecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\UserNameSecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\WrappedKeySecurityTokenTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\X509ListedCertificateValidator.cs" />
- <Compile Include="Test\System.ServiceModel.Security.Tokens\X509SecurityTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\ChannelProtectionRequirementsTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\MessagePartSpecificationTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\ScopedMessagePartSpecificationTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\SecurityAlgorithmSuiteTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\SecurityMessagePropertyTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\SecurityTokenSpeficicationTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\ServiceCredentialsSecurityTokenManagerTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\ServiceSecurityContextTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\SupportingTokenParametersTest.cs" />
- <Compile Include="Test\System.ServiceModel.Security\WSSecurityTokenSerializerTest.cs" />
- <Compile Include="Test\System.ServiceModel\BasicHttpBindingTest.cs" />
- <Compile Include="Test\System.ServiceModel\ChannelFactoryTest.cs" />
- <Compile Include="Test\System.ServiceModel\ChannelFactory_1Test.cs" />
- <Compile Include="Test\System.ServiceModel\ClientBaseTest.cs" />
- <Compile Include="Test\System.ServiceModel\ClientCredentialsSecurityTokenManagerTest.cs" />
- <Compile Include="Test\System.ServiceModel\CommonUseCases.cs" />
- <Compile Include="Test\System.ServiceModel\EndpointAddress10Test.cs" />
- <Compile Include="Test\System.ServiceModel\EndpointAddressBuilderTest.cs" />
- <Compile Include="Test\System.ServiceModel\EndpointAddressTest.cs" />
- <Compile Include="Test\System.ServiceModel\EndpointBehaviorCollectionTest.cs" />
- <Compile Include="Test\System.ServiceModel\EndpointIdentityTest.cs" />
- <Compile Include="Test\System.ServiceModel\FaultCodeTest.cs" />
- <Compile Include="Test\System.ServiceModel\FaultReasonTest.cs" />
- <Compile Include="Test\System.ServiceModel\IntegratedConnectionTest.cs" />
- <Compile Include="Test\System.ServiceModel\MessageSecurityVersionTest.cs" />
- <Compile Include="Test\System.ServiceModel\NetMsmqBindingTest.cs" />
- <Compile Include="Test\System.ServiceModel\ServiceAssert.cs" />
- <Compile Include="Test\System.ServiceModel\ServiceEndpointCollectionTest.cs" />
- <Compile Include="Test\System.ServiceModel\ServiceEndpointTest.cs" />
- <Compile Include="Test\System.ServiceModel\ServiceHostBaseTest.cs" />
- <Compile Include="Test\System.ServiceModel\ServiceHostTest.cs" />
- <Compile Include="Test\System.ServiceModel\SynchronizedReadOnlyCollectionTest.cs" />
- <Compile Include="Test\System.ServiceModel\TransactionProtocolTest.cs" />
- <Compile Include="Test\System.ServiceModel\UriSchemeKeyedCollectionTest.cs" />
- <Compile Include="Test\System.ServiceModel\WSFederationHttpBindingTest.cs" />
- <Compile Include="Test\System.ServiceModel\WSHttpBindingTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\nunit20\framework\nunit.framework.dll20.csproj">
- <Project>{83DD7E12-A705-4DBA-9D71-09C8973D9382}</Project>
- <Name>nunit.framework.dll20</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\nunit20\nunit-console\nunit-console20.csproj">
- <Project>{9367EC89-6A38-42BA-9607-0DC288E4BC3A}</Project>
- <Name>nunit-console20</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- <Folder Include="Test\FeatureBased\Features.Binding\" />
- <Folder Include="Test\FeatureBased\Features.Metadata\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <PropertyGroup>
- <PostBuildEvent>copy $(TargetDir)..\..\nunit20\nunit-console\bin\$(ConfigurationName)\*.exe $(TargetDir)
-copy $(TargetDir)..\..\nunit20\nunit-console\bin\$(ConfigurationName)\*.dll $(TargetDir)</PostBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj.user b/mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj.user
deleted file mode 100644
index a79f3e9cfb9..00000000000
--- a/mcs/class/System.ServiceModel/System.ServiceModel_Test.csproj.user
+++ /dev/null
@@ -1,10 +0,0 @@
-<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectView>ShowAllFiles</ProjectView>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <StartAction>Program</StartAction>
- <StartProgram>nunit-console.exe</StartProgram>
- <StartArguments>System.ServiceModel_test_net_3_0.dll /out:TestResults.txt</StartArguments>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel_Test.sln b/mcs/class/System.ServiceModel/System.ServiceModel_Test.sln
deleted file mode 100644
index 51a2a3da867..00000000000
--- a/mcs/class/System.ServiceModel/System.ServiceModel_Test.sln
+++ /dev/null
@@ -1,71 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.ServiceModel_Test", "System.ServiceModel_Test.csproj", "{05A2DAF1-316D-4350-B07B-B73BE591DE57}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.dll20", "..\..\nunit20\framework\nunit.framework.dll20.csproj", "{83DD7E12-A705-4DBA-9D71-09C8973D9382}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.core.dll20", "..\..\nunit20\core\nunit.core.dll20.csproj", "{EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.util.dll20", "..\..\nunit20\util\nunit.util.dll20.csproj", "{61CE9CE5-943E-44D4-A381-814DC1406767}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit-console20", "..\..\nunit20\nunit-console\nunit-console20.csproj", "{9367EC89-6A38-42BA-9607-0DC288E4BC3A}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwitchMode", "Test\SwitchMode\SwitchMode.csproj", "{59F7BE17-5E8C-4FA3-BC04-56604E2F00F1}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFServers", "Test\WCFServers\WCFServers.csproj", "{88AB909A-C341-4639-B99C-729AC1581E7D}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug-Strong|Any CPU = Debug-Strong|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug-Strong|Any CPU.ActiveCfg = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Debug-Strong|Any CPU.Build.0 = Debug|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {05A2DAF1-316D-4350-B07B-B73BE591DE57}.Release|Any CPU.Build.0 = Release|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug-Strong|Any CPU.ActiveCfg = Debug-Strong|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Debug-Strong|Any CPU.Build.0 = Debug-Strong|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {83DD7E12-A705-4DBA-9D71-09C8973D9382}.Release|Any CPU.Build.0 = Release|Any CPU
- {EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}.Debug-Strong|Any CPU.ActiveCfg = Debug-Strong|Any CPU
- {EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}.Debug-Strong|Any CPU.Build.0 = Debug-Strong|Any CPU
- {EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EBD43A7F-AFCA-4281-BB53-5CDD91F966A3}.Release|Any CPU.Build.0 = Release|Any CPU
- {61CE9CE5-943E-44D4-A381-814DC1406767}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {61CE9CE5-943E-44D4-A381-814DC1406767}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {61CE9CE5-943E-44D4-A381-814DC1406767}.Debug-Strong|Any CPU.ActiveCfg = Debug|Any CPU
- {61CE9CE5-943E-44D4-A381-814DC1406767}.Debug-Strong|Any CPU.Build.0 = Debug|Any CPU
- {61CE9CE5-943E-44D4-A381-814DC1406767}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {61CE9CE5-943E-44D4-A381-814DC1406767}.Release|Any CPU.Build.0 = Release|Any CPU
- {9367EC89-6A38-42BA-9607-0DC288E4BC3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9367EC89-6A38-42BA-9607-0DC288E4BC3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9367EC89-6A38-42BA-9607-0DC288E4BC3A}.Debug-Strong|Any CPU.ActiveCfg = Debug|Any CPU
- {9367EC89-6A38-42BA-9607-0DC288E4BC3A}.Debug-Strong|Any CPU.Build.0 = Debug|Any CPU
- {9367EC89-6A38-42BA-9607-0DC288E4BC3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9367EC89-6A38-42BA-9607-0DC288E4BC3A}.Release|Any CPU.Build.0 = Release|Any CPU
- {59F7BE17-5E8C-4FA3-BC04-56604E2F00F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {59F7BE17-5E8C-4FA3-BC04-56604E2F00F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {59F7BE17-5E8C-4FA3-BC04-56604E2F00F1}.Debug-Strong|Any CPU.ActiveCfg = Debug|Any CPU
- {59F7BE17-5E8C-4FA3-BC04-56604E2F00F1}.Debug-Strong|Any CPU.Build.0 = Debug|Any CPU
- {59F7BE17-5E8C-4FA3-BC04-56604E2F00F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {59F7BE17-5E8C-4FA3-BC04-56604E2F00F1}.Release|Any CPU.Build.0 = Release|Any CPU
- {88AB909A-C341-4639-B99C-729AC1581E7D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {88AB909A-C341-4639-B99C-729AC1581E7D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {88AB909A-C341-4639-B99C-729AC1581E7D}.Debug-Strong|Any CPU.ActiveCfg = Debug|Any CPU
- {88AB909A-C341-4639-B99C-729AC1581E7D}.Debug-Strong|Any CPU.Build.0 = Debug|Any CPU
- {88AB909A-C341-4639-B99C-729AC1581E7D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {88AB909A-C341-4639-B99C-729AC1581E7D}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs
index 1650bead02d..798a77915f1 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.Channels/CommunicationObjectSyncTest.cs
@@ -35,7 +35,7 @@ using System.ServiceModel.Channels;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Mono.Moonlight.UnitTesting;
-namespace MoonTest.ServiceModel {
+namespace MonoTests.System.ServiceModel.Channels {
[TestClass]
public class CommunicationObjectSyncTest {
diff --git a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
index a6bc6c5e6fc..593ded1b011 100644
--- a/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
+++ b/mcs/class/System.ServiceModel/Test/System.ServiceModel.PeerResolvers/CustomPeerResolverServiceTest.cs
@@ -30,6 +30,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
}
[Test]
+ [Category ("NotWorking")]
public void CloseTest ()
{
cprs.Open ();
@@ -79,6 +80,7 @@ namespace MonoTests.System.ServiceModel.PeerResolvers
[Test]
[ExpectedException (typeof (InvalidOperationException))]
+ [Category ("NotWorking")]
public void OpenTest4 ()
{
cprs.Open ();
diff --git a/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceBaseTest.cs b/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceBaseTest.cs
index 7a3c014f7cd..ec6a3a236b8 100644
--- a/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceBaseTest.cs
+++ b/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceBaseTest.cs
@@ -27,10 +27,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.ComponentModel;
using System.ServiceProcess;
using NUnit.Framework;
-namespace Test
+namespace MonoTests.System.ServiceProcess
{
[TestFixture]
public class ServiceBaseTest
@@ -84,7 +85,7 @@ namespace Test
/// <summary>
/// Required designer variable.
/// </summary>
- private System.ComponentModel.IContainer components = null;
+ private IContainer components = null;
/// <summary>
/// Clean up any resources being used.
@@ -107,7 +108,7 @@ namespace Test
/// </summary>
private void InitializeComponent()
{
- components = new System.ComponentModel.Container();
+ components = new Container();
this.ServiceName = "ServiceFoo";
}
diff --git a/mcs/class/System.Transactions/Assembly/AssemblyInfo.cs b/mcs/class/System.Transactions/Assembly/AssemblyInfo.cs
index 6f48fbc3926..dc036a32be8 100644
--- a/mcs/class/System.Transactions/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Transactions/Assembly/AssemblyInfo.cs
@@ -55,11 +55,9 @@ using System.Security.Permissions;
[assembly: ComCompatibleVersion (1, 0, 3300, 0)]
[assembly: AllowPartiallyTrustedCallers]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../ecma.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: BestFitMapping (false)]
diff --git a/mcs/class/System.Transactions/System.Transactions.csproj b/mcs/class/System.Transactions/System.Transactions.csproj
deleted file mode 100644
index b9f22d98626..00000000000
--- a/mcs/class/System.Transactions/System.Transactions.csproj
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs b/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
index 9c9648c0f74..d996b785700 100644
--- a/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
+++ b/mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
@@ -62,7 +62,6 @@ namespace System.Transactions
{
}
- [MonoTODO ("No TimeoutException is thrown")]
public TransactionScope (TransactionScopeOption option,
TimeSpan timeout)
{
@@ -92,6 +91,10 @@ namespace System.Transactions
completed = false;
isRoot = false;
nested = 0;
+
+ if (timeout < TimeSpan.Zero)
+ throw new ArgumentOutOfRangeException ("timeout");
+
this.timeout = timeout;
oldTransaction = Transaction.CurrentInternal;
diff --git a/mcs/class/System.Transactions/Test/TransactionScopeTest.cs b/mcs/class/System.Transactions/Test/TransactionScopeTest.cs
index 80925e27f52..1dbda6e1d22 100644
--- a/mcs/class/System.Transactions/Test/TransactionScopeTest.cs
+++ b/mcs/class/System.Transactions/Test/TransactionScopeTest.cs
@@ -19,6 +19,24 @@ namespace MonoTests.System.Transactions
{
[Test]
+ public void TransactionScopeWithInvalidTimeSpanThrows ()
+ {
+ try {
+ TransactionScope scope = new TransactionScope (TransactionScopeOption.Required, TimeSpan.FromSeconds (-1));
+ Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
+ } catch (ArgumentOutOfRangeException ex) {
+ Assert.AreEqual (ex.ParamName, "timeout");
+ }
+
+ try {
+ TransactionScope scope = new TransactionScope (null, TimeSpan.FromSeconds (-1));
+ Assert.Fail ("Expected exception when passing TransactionScopeOption and an invalid TimeSpan.");
+ } catch (ArgumentOutOfRangeException ex) {
+ Assert.AreEqual (ex.ParamName, "timeout");
+ }
+ }
+
+ [Test]
public void TransactionScopeCommit ()
{
Assert.IsNull (Transaction.Current, "Ambient transaction exists (before)");
diff --git a/mcs/class/System.Web.Extensions.Design/Assembly/AssemblyInfo.cs b/mcs/class/System.Web.Extensions.Design/Assembly/AssemblyInfo.cs
index b412d40fef0..ac4763edfbf 100644
--- a/mcs/class/System.Web.Extensions.Design/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web.Extensions.Design/Assembly/AssemblyInfo.cs
@@ -57,7 +57,7 @@ using System.Security;
[assembly: NeutralResourcesLanguage ("en-US")]
-#if !(TARGET_JVM || TARGET_DOTNET)
+#if !(TARGET_DOTNET)
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../winfx.pub")]
diff --git a/mcs/class/System.Web.Extensions.Design/System.Web.Extensions.Design.csproj b/mcs/class/System.Web.Extensions.Design/System.Web.Extensions.Design.csproj
deleted file mode 100644
index 7ab072cf100..00000000000
--- a/mcs/class/System.Web.Extensions.Design/System.Web.Extensions.Design.csproj
+++ /dev/null
@@ -1,94 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java20</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{54EEEB65-F3A8-4D10-B916-B76A0BDD66CF}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Web.Extensions.Design</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <RootNamespace>System.Web.Extensions.Design</RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_2_0;NET_1_1;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_2_0;NET_1_1;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="System.Web.Extensions.Design\AsyncPostBackTriggerControlIDConverter.cs" />
- <Compile Include="System.Web.Extensions.Design\AsyncPostBackTriggerEventNameConverter.cs" />
- <Compile Include="System.Web.Extensions.Design\CollectionEditorBase.cs" />
- <Compile Include="System.Web.Extensions.Design\ExtenderControlDesigner.cs" />
- <Compile Include="System.Web.Extensions.Design\PostBackTriggerControlIDConverter.cs" />
- <Compile Include="System.Web.Extensions.Design\ScriptManagerDesigner.cs" />
- <Compile Include="System.Web.Extensions.Design\ScriptManagerProxyDesigner.cs" />
- <Compile Include="System.Web.Extensions.Design\TimerDesigner.cs" />
- <Compile Include="System.Web.Extensions.Design\UpdatePanelDesigner.cs" />
- <Compile Include="System.Web.Extensions.Design\UpdatePanelTriggerCollectionEditor.cs" />
- <Compile Include="System.Web.Extensions.Design\UpdateProgressAssociatedUpdatePanelIDConverter.cs" />
- <Compile Include="System.Web.Extensions.Design\UpdateProgressDesigner.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86" />
- <Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-rt="repository:jre:sun:1.6.0" REFS-JarPath-rt="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system="" REFS-JarPath-system-design="" REFS-RefInfo-system-design="repository:vmw:framework:2.0" REFS-JarPath-system-drawing="" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-JarPath-system-windows-forms="" REFS-RefInfo-system-windows-forms="repository:vmw:framework:2.0" REFS-JarPath-system-web="" REFS-RefInfo-system-web="repository:vmw:framework:2.0" REFS-JarPath-system-configuration="" REFS-RefInfo-system-configuration="repository:vmw:framework:2.0" />
- </VisualStudio>
- </ProjectExtensions>
-</Project>
diff --git a/mcs/class/System.Web.Extensions/Assembly/AssemblyInfo.cs b/mcs/class/System.Web.Extensions/Assembly/AssemblyInfo.cs
index 53bce36c63a..905c63c4e7f 100644
--- a/mcs/class/System.Web.Extensions/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web.Extensions/Assembly/AssemblyInfo.cs
@@ -59,7 +59,7 @@ using System.Security.Permissions;
[assembly: NeutralResourcesLanguage ("en-US")]
-#if !(TARGET_JVM || TARGET_DOTNET)
+#if !(TARGET_DOTNET)
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../winfx.pub")]
diff --git a/mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.csproj b/mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.csproj
deleted file mode 100644
index 018c3907fb3..00000000000
--- a/mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.csproj
+++ /dev/null
@@ -1,261 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{39836A5C-64D0-4801-9493-DEF694338EF5}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Web.Extensions</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <RootNamespace>System.Web.Extensions</RootNamespace>
- <StartupObject>
- </StartupObject>
- <jarserver>ip2</jarserver>
- <RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>3.5</OldToolsVersion>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA,NET_2_0,TARGET_JVM, TARGET_J2EE,SYSTEM_WEB_EXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>4194304</BaseAddress>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA,NET_2_0,TARGET_JVM, TARGET_J2EE,SYSTEM_WEB_EXTENSIONS</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>4194304</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-myfaces="repository:vmw:framework:2.0" REFS-JarPath-myfaces="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" REFS-JarPath-rt="" REFS-JarPath-system="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system-configuration="" REFS-RefInfo-system-configuration="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-drawing="" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-JarPath-system-web="" REFS-RefInfo-system-web="repository:vmw:framework:2.0" REFS-JarPath-system-web-services="" REFS-RefInfo-system-web-services="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="J2SE.Helpers">
- <Private>False</Private>
- <HintPath>..\lib\J2SE.Helpers.dll</HintPath>
- </Reference>
- <Reference Include="Mainsoft.Configuration, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <HintPath>..\lib\Mainsoft.Configuration.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="myfaces, Version=1.6.65535.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Assembly\Consts.cs.in</Link>
- </Compile>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Assembly\Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>Assembly\MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="..\System.Web\System.Web.Configuration_2.0\MachineKeySectionUtils.cs">
- <Link>System.Web.Handlers\MachineKeySectionUtils.cs</Link>
- </Compile>
- <Compile Include="..\System.Web\System.Web.Handlers\AssemblyResourceLoader.cs">
- <Link>System.Web.Handlers\AssemblyResourceLoader.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Web.Configuration\Converter.cs" />
- <Compile Include="System.Web.Configuration\ConvertersCollection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingAuthenticationServiceSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingJsonSerializationSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingProfileServiceSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingScriptResourceHandlerSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingSectionGroup.cs" />
- <Compile Include="System.Web.Configuration\ScriptingWebServicesSectionGroup.cs" />
- <Compile Include="System.Web.Configuration\SystemWebExtensionsSectionGroup.cs" />
- <Compile Include="System.Web.Handlers\ScriptModule.cs" />
- <Compile Include="System.Web.Handlers\ScriptResourceHandler.cs" />
- <Compile Include="System.Web.Script.Serialization\JavaScriptConverter.cs" />
- <Compile Include="System.Web.Script.Serialization\JavaScriptSerializer.cs" />
- <Compile Include="System.Web.Script.Serialization\JavaScriptTypeResolver.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\CountingTextWriter.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptConstructor.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptConvert.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptParameters.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptUtils.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonReader.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonReaderException.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonSerializationException.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonSerializer.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonToken.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonWriter.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonWriterException.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\ReflectionUtils.cs" />
- <Compile Include="System.Web.Script.Serialization\ScriptIgnoreAttribute.cs" />
- <Compile Include="System.Web.Script.Serialization\SimpleTypeResolver.cs" />
- <Compile Include="System.Web.Script.Services\AuthenticationService.cs" />
- <Compile Include="System.Web.Script.Services\ClientProxyHandler.cs" />
- <Compile Include="System.Web.Script.Services\GenerateScriptTypeAttribute.cs" />
- <Compile Include="System.Web.Script.Services\LogicalTypeInfo.cs" />
- <Compile Include="System.Web.Script.Services\ProfileService.cs" />
- <Compile Include="System.Web.Script.Services\ProxyGenerator.cs" />
- <Compile Include="System.Web.Script.Services\ResponseFormat.cs" />
- <Compile Include="System.Web.Script.Services\RestHandler.cs" />
- <Compile Include="System.Web.Script.Services\ScriptHandlerFactory.cs" />
- <Compile Include="System.Web.Script.Services\ScriptMethodAttribute.cs" />
- <Compile Include="System.Web.Script.Services\ScriptServiceAttribute.cs" />
- <Compile Include="System.Web.UI\AsyncPostBackErrorEventArgs.cs" />
- <Compile Include="System.Web.UI\AsyncPostBackTrigger.cs" />
- <Compile Include="System.Web.UI\AuthenticationServiceManager.cs" />
- <Compile Include="System.Web.UI\ExtenderControl.cs" />
- <Compile Include="System.Web.UI\IExtenderControl.cs" />
- <Compile Include="System.Web.UI\IScriptControl.cs" />
- <Compile Include="System.Web.UI\PostBackTrigger.cs" />
- <Compile Include="System.Web.UI\ProfileServiceManager.cs" />
- <Compile Include="System.Web.UI\ScriptBehaviorDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptComponentDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptControl.cs" />
- <Compile Include="System.Web.UI\ScriptControlDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptManager.cs" />
- <Compile Include="System.Web.UI\ScriptManagerProxy.cs" />
- <Compile Include="System.Web.UI\ScriptMode.cs" />
- <Compile Include="System.Web.UI\ScriptReference.cs" />
- <Compile Include="System.Web.UI\ScriptReferenceCollection.cs" />
- <Compile Include="System.Web.UI\ScriptReferenceEventArgs.cs" />
- <Compile Include="System.Web.UI\ScriptResourceAttribute.cs" />
- <Compile Include="System.Web.UI\ServiceReference.cs" />
- <Compile Include="System.Web.UI\ServiceReferenceCollection.cs" />
- <Compile Include="System.Web.UI\TargetControlTypeAttribute.cs" />
- <Compile Include="System.Web.UI\Timer.cs" />
- <Compile Include="System.Web.UI\UpdatePanel.cs" />
- <Compile Include="System.Web.UI\UpdatePanelControlTrigger.cs" />
- <Compile Include="System.Web.UI\UpdatePanelRenderMode.cs" />
- <Compile Include="System.Web.UI\UpdatePanelTrigger.cs" />
- <Compile Include="System.Web.UI\UpdatePanelTriggerCollection.cs" />
- <Compile Include="System.Web.UI\UpdatePanelUpdateMode.cs" />
- <Compile Include="System.Web.UI\UpdateProgress.cs" />
- <Compile Include="System.Web.UI\RegisteredArrayDeclaration.cs" />
- <Compile Include="System.Web.UI\RegisteredDisposeScript.cs" />
- <Compile Include="System.Web.UI\RegisteredExpandoAttribute.cs" />
- <Compile Include="System.Web.UI\RegisteredHiddenField.cs" />
- <Compile Include="System.Web.UI\RegisteredScript.cs" />
- <Compile Include="System.Web.UI\RegisteredScriptType.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\3.5.0.0\3.5.21022.8\MicrosoftAjax.debug.jvm.js">
- <Link>Resources\MicrosoftAjax.debug.jvm.js</Link>
- <LogicalName>MicrosoftAjax.debug.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\3.5.0.0\3.5.21022.8\MicrosoftAjax.jvm.js">
- <Link>Resources\MicrosoftAjax.jvm.js</Link>
- <LogicalName>MicrosoftAjax.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\3.5.0.0\3.5.21022.8\MicrosoftAjaxTimer.debug.js">
- <Link>Resources\MicrosoftAjaxTimer.debug.js</Link>
- <LogicalName>MicrosoftAjaxTimer.debug.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\3.5.0.0\3.5.21022.8\MicrosoftAjaxTimer.js">
- <Link>Resources\MicrosoftAjaxTimer.js</Link>
- <LogicalName>MicrosoftAjaxTimer.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\3.5.0.0\3.5.21022.8\MicrosoftAjaxWebForms.debug.js">
- <Link>Resources\MicrosoftAjaxWebForms.debug.js</Link>
- <LogicalName>MicrosoftAjaxWebForms.debug.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\3.5.0.0\3.5.21022.8\MicrosoftAjaxWebForms.js">
- <Link>Resources\MicrosoftAjaxWebForms.js</Link>
- <LogicalName>MicrosoftAjaxWebForms.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="Resources\MicrosoftAjaxExtension.js">
- <LogicalName>MicrosoftAjaxExtension.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="Resources\MicrosoftAjaxWebFormsExtension.js">
- <LogicalName>MicrosoftAjaxWebFormsExtension.js</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <PropertyGroup>
- <PostBuildEvent></PostBuildEvent>
- </PropertyGroup>
- <ItemGroup>
- <ProjectReference Include="..\System.Web.Services\System.Web.Services20.csproj">
- <Project>{B37A8704-33AB-48D9-B0C2-1D919755B69A}</Project>
- <Name>System.Web.Services20</Name>
- </ProjectReference>
- <ProjectReference Include="..\System.Web\System.Web20.csproj">
- <Project>{0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}</Project>
- <Name>System.Web20</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.sln b/mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.sln
deleted file mode 100644
index bd1aa93cfc5..00000000000
--- a/mcs/class/System.Web.Extensions/System.Web.Extensions.JavaEE.sln
+++ /dev/null
@@ -1,60 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Extensions.JavaEE", "System.Web.Extensions.JavaEE.csproj", "{39836A5C-64D0-4801-9493-DEF694338EF5}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web20", "..\System.Web\System.Web20.csproj", "{0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Services20", "..\System.Web.Services\System.Web.Services20.csproj", "{B37A8704-33AB-48D9-B0C2-1D919755B69A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20_prepare|Any CPU = Debug_Java20_prepare|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20_prepare|Any CPU = Release_Java20_prepare|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Debug_Java20_prepare|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Debug_Java20_prepare|Any CPU.Build.0 = Debug_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Debug_Java20|Any CPU.Build.0 = Debug_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Release_Java20_prepare|Any CPU.ActiveCfg = Release_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Release_Java20_prepare|Any CPU.Build.0 = Release_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Release_Java20|Any CPU.ActiveCfg = Release_Java|Any CPU
- {39836A5C-64D0-4801-9493-DEF694338EF5}.Release_Java20|Any CPU.Build.0 = Release_Java|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java|Any CPU.Build.0 = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20_prepare|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20_prepare|Any CPU.Build.0 = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java|Any CPU.Build.0 = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20_prepare|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20_prepare|Any CPU.Build.0 = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java|Any CPU.Build.0 = Debug_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20_prepare|Any CPU.ActiveCfg = Debug_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20_prepare|Any CPU.Build.0 = Debug_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java|Any CPU.Build.0 = Release_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20_prepare|Any CPU.ActiveCfg = Release_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20_prepare|Any CPU.Build.0 = Release_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Web.Extensions/System.Web.Extensions.csproj b/mcs/class/System.Web.Extensions/System.Web.Extensions.csproj
deleted file mode 100644
index 2a5157c7a6b..00000000000
--- a/mcs/class/System.Web.Extensions/System.Web.Extensions.csproj
+++ /dev/null
@@ -1,164 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{3D36DB5F-6DBC-4B95-8CA0-9B627357C7BD}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Web.Extensions</RootNamespace>
- <AssemblyName>System.Web.Extensions</AssemblyName>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;SYSTEM_WEB_EXTENSIONS;NET_2_0;NET_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;SYSTEM_WEB_EXTENSIONS;NET_2_0;NET_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Services" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Assembly\Consts.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Assembly\Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>Assembly\MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="..\System.Web\System.Web.Handlers\AssemblyResourceLoader.cs">
- <Link>System.Web.Handlers\AssemblyResourceLoader.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Web.Configuration\Converter.cs" />
- <Compile Include="System.Web.Configuration\ConvertersCollection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingAuthenticationServiceSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingJsonSerializationSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingProfileServiceSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingScriptResourceHandlerSection.cs" />
- <Compile Include="System.Web.Configuration\ScriptingSectionGroup.cs" />
- <Compile Include="System.Web.Configuration\ScriptingWebServicesSectionGroup.cs" />
- <Compile Include="System.Web.Configuration\SystemWebExtensionsSectionGroup.cs" />
- <Compile Include="System.Web.Handlers\ScriptModule.cs" />
- <Compile Include="System.Web.Handlers\ScriptResourceHandler.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\CountingTextWriter.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptConstructor.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptConvert.cs" />
- <Compile Include="System.Web.Script.Serialization\JavaScriptConverter.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptParameters.cs" />
- <Compile Include="System.Web.Script.Serialization\JavaScriptSerializer.cs" />
- <Compile Include="System.Web.Script.Serialization\JavaScriptTypeResolver.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JavaScriptUtils.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonReader.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonReaderException.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Script.Serialization\JSON\JsonSerializationException.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonSerializer.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonToken.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonWriter.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\JsonWriterException.cs" />
- <Compile Include="System.Web.Script.Serialization\JSON\ReflectionUtils.cs" />
- <Compile Include="System.Web.Script.Serialization\ScriptIgnoreAttribute.cs" />
- <Compile Include="System.Web.Script.Serialization\SimpleTypeResolver.cs" />
- <Compile Include="System.Web.Script.Services\ClientProxyHandler.cs" />
- <Compile Include="System.Web.Script.Services\GenerateScriptTypeAttribute.cs" />
- <Compile Include="System.Web.Script.Services\LogicalTypeInfo.cs" />
- <Compile Include="System.Web.Script.Services\ProfileService.cs" />
- <Compile Include="System.Web.Script.Services\ResponseFormat.cs" />
- <Compile Include="System.Web.Script.Services\RestHandler.cs" />
- <Compile Include="System.Web.Script.Services\ScriptHandlerFactory.cs" />
- <Compile Include="System.Web.Script.Services\ScriptMethodAttribute.cs" />
- <Compile Include="System.Web.Script.Services\ScriptServiceAttribute.cs" />
- <Compile Include="System.Web.UI\AsyncPostBackErrorEventArgs.cs" />
- <Compile Include="System.Web.UI\AsyncPostBackTrigger.cs" />
- <Compile Include="System.Web.UI\AuthenticationServiceManager.cs" />
- <Compile Include="System.Web.UI\ExtenderControl.cs" />
- <Compile Include="System.Web.UI\IExtenderControl.cs" />
- <Compile Include="System.Web.UI\IScriptControl.cs" />
- <Compile Include="System.Web.UI\PostBackTrigger.cs" />
- <Compile Include="System.Web.UI\ProfileServiceManager.cs" />
- <Compile Include="System.Web.UI\ScriptBehaviorDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptComponentDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptControl.cs" />
- <Compile Include="System.Web.UI\ScriptControlDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptDescriptor.cs" />
- <Compile Include="System.Web.UI\ScriptManager.cs" />
- <Compile Include="System.Web.UI\ScriptManagerProxy.cs" />
- <Compile Include="System.Web.UI\ScriptMode.cs" />
- <Compile Include="System.Web.UI\ScriptReference.cs" />
- <Compile Include="System.Web.UI\ScriptReferenceCollection.cs" />
- <Compile Include="System.Web.UI\ScriptReferenceEventArgs.cs" />
- <Compile Include="System.Web.UI\ScriptResourceAttribute.cs" />
- <Compile Include="System.Web.UI\ServiceReference.cs" />
- <Compile Include="System.Web.UI\ServiceReferenceCollection.cs" />
- <Compile Include="System.Web.UI\TargetControlTypeAttribute.cs" />
- <Compile Include="System.Web.UI\Timer.cs" />
- <Compile Include="System.Web.UI\UpdatePanel.cs" />
- <Compile Include="System.Web.UI\UpdatePanelControlTrigger.cs" />
- <Compile Include="System.Web.UI\UpdatePanelRenderMode.cs" />
- <Compile Include="System.Web.UI\UpdatePanelTrigger.cs" />
- <Compile Include="System.Web.UI\UpdatePanelTriggerCollection.cs" />
- <Compile Include="System.Web.UI\UpdatePanelUpdateMode.cs" />
- <Compile Include="System.Web.UI\UpdateProgress.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0\MicrosoftAjax.debug.js">
- <Link>Resources\MicrosoftAjax.debug.js</Link>
- <LogicalName>MicrosoftAjax.debug.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0\MicrosoftAjax.js">
- <Link>Resources\MicrosoftAjax.js</Link>
- <LogicalName>MicrosoftAjax.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0\MicrosoftAjaxTimer.debug.js">
- <Link>Resources\MicrosoftAjaxTimer.debug.js</Link>
- <LogicalName>MicrosoftAjaxTimer.debug.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0\MicrosoftAjaxTimer.js">
- <Link>Resources\MicrosoftAjaxTimer.js</Link>
- <LogicalName>MicrosoftAjaxTimer.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0\MicrosoftAjaxWebForms.debug.js">
- <Link>Resources\MicrosoftAjaxWebForms.debug.js</Link>
- <LogicalName>MicrosoftAjaxWebForms.debug.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="..\MicrosoftAjaxLibrary\System.Web.Extensions\1.0.61025.0\MicrosoftAjaxWebForms.js">
- <Link>Resources\MicrosoftAjaxWebForms.js</Link>
- <LogicalName>MicrosoftAjaxWebForms.js</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web.Extensions/System.Web.Handlers/ScriptResourceHandler.cs b/mcs/class/System.Web.Extensions/System.Web.Handlers/ScriptResourceHandler.cs
index 3ec1c00cc9b..3961c952845 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Handlers/ScriptResourceHandler.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Handlers/ScriptResourceHandler.cs
@@ -211,18 +211,12 @@ namespace System.Web.Handlers
rset = new ResourceManager (scriptResourceName, assembly).GetResourceSet (Threading.Thread.CurrentThread.CurrentUICulture, true, true);
}
catch (MissingManifestResourceException) {
-#if TARGET_JVM // GetResourceSet does not throw MissingManifestResourceException if ressource is not exists
- }
- if (rset == null) {
-#endif
if (scriptResourceName.EndsWith (".resources", RuntimeHelpers.StringComparison)) {
scriptResourceName = scriptResourceName.Substring (0, scriptResourceName.Length - 10);
rset = new ResourceManager (scriptResourceName, assembly).GetResourceSet (Threading.Thread.CurrentThread.CurrentUICulture, true, true);
}
-#if !TARGET_JVM
else
throw;
-#endif
}
if (rset == null)
break;
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
index 70e6fc9bebd..14a03b2f0dc 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Serialization/JavaScriptSerializer.cs
@@ -203,6 +203,10 @@ namespace System.Web.Script.Serialization
return ConvertToType<T> (DeserializeObjectInternal(input));
}
+ public object Deserialize (string input, Type targetType) {
+ return DeserializeObjectInternal (input);
+ }
+
static object Evaluate (object value) {
return Evaluate (value, false);
}
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
index 5f8defbff81..a9b6fc01711 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Services/LogicalTypeInfo.cs
@@ -411,7 +411,7 @@ if (typeof({0}) === 'undefined') {{", className);
var ret = new Dictionary <string, object> ();
for (int i = nvc.Count - 1; i >= 0; i--)
- ret.Add (nvc.GetKey (i), JavaScriptSerializer.DefaultSerializer.DeserializeObjectInternal (nvc.Get (i)));
+ ret.Add (nvc.GetKey (i), nvc.Get (i));
return ret;
}
diff --git a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs
index 9836cca9209..76e841fc5ab 100644
--- a/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs
+++ b/mcs/class/System.Web.Extensions/System.Web.Script.Services/ScriptHandlerFactory.cs
@@ -55,9 +55,7 @@ namespace System.Web.Script.Services
if (url.EndsWith (AuthenticationService.DefaultWebServicePath, StringComparison.Ordinal))
handlerType = typeof(AuthenticationService);
else {
-#if !TARGET_JVM
handlerType = BuildManager.GetCompiledType (url);
-#endif
if (handlerType == null)
handlerType = WebServiceParser.GetCompiledType (url, context);
}
diff --git a/mcs/class/System.Web.Extensions/Test/AUT/SystemWebExtensionsAUT.JavaEE.csproj b/mcs/class/System.Web.Extensions/Test/AUT/SystemWebExtensionsAUT.JavaEE.csproj
deleted file mode 100644
index 202fad1ad47..00000000000
--- a/mcs/class/System.Web.Extensions/Test/AUT/SystemWebExtensionsAUT.JavaEE.csproj
+++ /dev/null
@@ -1,747 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{ED1876F0-1796-408A-B6B9-1BAAB80FA083}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>SystemWebExtensionsAUT</AssemblyName>
- <JDKName>1.6.0</JDKName>
- <GHProjectType>3</GHProjectType>
- <Version>2.0</Version>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <RootNamespace>SystemWebExtensionsAUT</RootNamespace>
- <jarserver>ipa</jarserver>
- <ApplicationServerType>tomcat</ApplicationServerType>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin_Java\</OutputPath>
- <DefineConstants>DEBUG;TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>4194304</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <PreCompile>false</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>4194304</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <PreCompile>true</PreCompile>
- <DeploymentMethod>1</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <PlatformTarget>AnyCPU</PlatformTarget>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
- <WebProjectProperties>
- <UseIIS>True</UseIIS>
- <AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>0</DevelopmentServerPort>
- <DevelopmentServerVPath>/SystemWebExtensionsAUT</DevelopmentServerVPath>
- <IISUrl>
- </IISUrl>
- <NTLMAuthentication>False</NTLMAuthentication>
- </WebProjectProperties>
- </FlavorProperties>
- <UserProperties REFS-RefInfo-myfaces="repository:vmw:framework:2.0" REFS-JarPath-myfaces="" REFS-RefInfo-System-Web-Extensions="repository:vmw:framework:2.0" REFS-JarPath-System-Web-Extensions="" REFS-RefInfo-system-web-mobile="repository:vmw:framework:2.0" REFS-JarPath-system-web-mobile="" REFS-RefInfo-system-enterpriseservices="repository:vmw:framework:2.0" REFS-JarPath-system-enterpriseservices="" REFS-RefInfo-system-web-services="repository:vmw:framework:2.0" REFS-JarPath-system-web-services="" REFS-RefInfo-system-configuration="repository:vmw:framework:2.0" REFS-JarPath-system-configuration="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-web="repository:vmw:framework:2.0" REFS-JarPath-system-web="" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-JarPath-system-drawing="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system="" REFS-JarPath-mainsoft-web-aspnetconfig="..\..\..\..\..\..\..\..\Program Files\Mainsoft for Java EE\java_refs\framework\WSAT\Mainsoft.Web.AspnetConfig.jar" REFS-RefInfo-mainsoft-web-aspnetconfig="repository:vmw:framework:2.0" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="Mainsoft.Web.AspnetConfig, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="myfaces, Version=1.6.65535.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86" />
- <Reference Include="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86" />
- <Reference Include="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
- <Reference Include="System.Web.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="AjaxClientApp\AjaxScript.aspx" />
- <Content Include="AjaxClientApp\AjaxScriptComplete.aspx" />
- <Content Include="AjaxClientApp\HelloWorldService.asmx" />
- <Content Include="App_Data\Contacts.xml" />
- <Content Include="App_Data\SurveyQuestions.xml" />
- <Content Include="ArrayTypeExtensions\ArrayMembersSampleCSharp.aspx" />
- <Content Include="BooleanTypeExtensions\BooleanParseSampleCSharp.aspx" />
- <Content Include="CalendarInCalendarOut.aspx" />
- <Content Include="CancelPostback.js" />
- <Content Include="ClientEventExample1\ClientEventTest.js" />
- <Content Include="ClientEventExample1\default.aspx" />
- <Content Include="ClientEventExample2\default.aspx" />
- <Content Include="ClientEventExample2\EventSyntax.js" />
- <Content Include="ClientPageLifecycleEvents.aspx" />
- <Content Include="CustomEvents2\Default.aspx" />
- <Content Include="CustomEvents2\Question.js" />
- <Content Include="CustomEvents2\Section.js" />
- <Content Include="CustomEvents\Default.aspx" />
- <Content Include="CustomEvents\Question.js" />
- <Content Include="CustomEvents\Section.js" />
- <Content Include="EnhancingJavaScript\Enumeration.aspx" />
- <Content Include="EnhancingJavaScript\Enumeration.js" />
- <Content Include="EnhancingJavaScript\Inheritance.aspx" />
- <Content Include="EnhancingJavaScript\Inheritance.js" />
- <Content Include="EnhancingJavaScript\Interface.aspx" />
- <Content Include="EnhancingJavaScript\Interface.js" />
- <Content Include="EnhancingJavaScript\Namespace.aspx" />
- <Content Include="EnhancingJavaScript\Namespace.js" />
- <Content Include="EnhancingJavaScript\Reflection.aspx" />
- <Content Include="ErrorTypeExtensions\ErrorArgumentNullSampleCSharp.aspx" />
- <Content Include="ErrorTypeExtensions\ErrorCreateSampleCSharp.aspx" />
- <Content Include="ExtenderControlTutorial1\Default.aspx" />
- <Content Include="ExtenderControlTutorial1\FocusBehavior.js" />
- <Content Include="LocalizingDateTutorial1\localeFormat.aspx" />
- <Content Include="NoScriptManager.aspx" />
- <Content Include="StopAsynchronousPostback.aspx" />
- <Content Include="TwoPanelsProgress.aspx" />
- <Content Include="TwoScriptManagers.aspx" />
- <Content Include="TwoUpdatePanels.aspx" />
- <Content Include="UpdateButtonInside.aspx" />
- <Content Include="UpdateButtonOutside.aspx" />
- <Content Include="WEB-INF\web.xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ExtenderControlTutorial1\FocusExtender.cs" />
- <Compile Include="IScriptControlTutorial1\SampleTextBox.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="LocalizingClientResourcesWalkthrough\ClientVerification.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="System.Web.Configuration\ConfigSectionSample.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Script.Serialization.ScriptIgnoreAttribute\ScriptIgnoreSample.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Script.Serialization.TypeResolver\TypeResolver.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Script.Serialization\ListItemCollectionConverter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.Controls.Timer.Walkthrough2Panels\Default.aspx.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.Controls.Timer.Walkthrough2Panels\Default.aspx.designer.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- </Compile>
- <Compile Include="System.Web.UI.Controls.Timer.Walkthrough\Default.aspx.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.Controls.Timer.Walkthrough\Default.aspx.designer.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- </Compile>
- <Compile Include="System.Web.UI.ScriptReference\customcontrol.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.UpdatePanel.ContentTemplate\CustomContentTemplate.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.UpdatePanel.CreateContentTemplateContainer\CustomUpdatePanel.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="UpdatePanelTutorialCustom\ProductsView.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="UpdatePanelUserControlTutorial1\Default.aspx.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="UpdatePanelUserControlTutorial1\Default.aspx.designer.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- </Compile>
- <Compile Include="UpdatePanelUserControlTutorial1\EmployeeInfo.ascx.cs">
- <DependentUpon>EmployeeInfo.ascx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="UpdatePanelUserControlTutorial1\EmployeeInfo.ascx.designer.cs">
- <DependentUpon>EmployeeInfo.ascx</DependentUpon>
- </Compile>
- <Compile Include="UpdatePanelUserControlTutorial1\EmployeeList.ascx.cs">
- <DependentUpon>EmployeeList.ascx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="UpdatePanelUserControlTutorial1\EmployeeList.ascx.designer.cs">
- <DependentUpon>EmployeeList.ascx</DependentUpon>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <Content Include="Web.config" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="LocalizingDateTutorial1\web.config" />
- <Content Include="LocalizingDateTutorial2\localeFormat.aspx" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="LocalizingDateTutorial2\web.config" />
- <Content Include="LocalizingDateTutorial3\localeFormat.aspx" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="LocalizingDateTutorial3\web.config" />
- <Content Include="LocalizingDateTutorial4\localeFormat.aspx" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="LocalizingDateTutorial4\web.config" />
- <Content Include="MyAuthenticationService\MyAuthenticationService.asmx" />
- <Content Include="MyProfileService\MyProfileService.asmx" />
- <Content Include="NumberTypeExtensions\NumberParseSampleCSharp.aspx" />
- <Content Include="PageRequestManagerOverview1\images\calendar.gif" />
- <Content Include="PageRequestManagerOverview1\TicketExampleCS.aspx" />
- <Content Include="PartialPageRenderingOverview\PartialPageRenderingOverviewCS.aspx" />
- <Content Include="PartialPageRenderingOverview\PartialPageRenderingOverviewSyntaxCS.aspx" />
- <Content Include="ResourcesInScriptFile\Default.aspx" />
- <Content Include="ResourcesInScriptFile\scripts\CheckAnswer.it-IT.js" />
- <Content Include="ResourcesInScriptFile\scripts\CheckAnswer.js" />
- <Content Include="SampleAJAXApplication\Employees.aspx" />
- <Content Include="StringBuilder\js\JavaScript\StringBuilderOverviewSample.aspx" />
- <Content Include="Sys.Application\Default.aspx" />
- <Content Include="Sys.Application\HighVis.js" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="System.Web.UI.ScriptReference.Path\Default.aspx" />
- <Content Include="System.Web.UI.ScriptReferenceEventArgs\Default.aspx" />
- <Content Include="System.Web.UI.ScriptReferenceEventArgs\scripts\CustomScript.js" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="IScriptControlTutorial1\Default.aspx" />
- <Content Include="IScriptControlTutorial1\SampleTextBox.js" />
- <Content Include="LocalizingClientResourcesWalkthrough\CheckAnswer.js" />
- <Content Include="LocalizingClientResourcesWalkthrough\Default.aspx" />
- <Content Include="Sys.CultureInfo.CurrentCulture.dateTimeFormat\default.aspx" />
- <Content Include="Sys.CultureInfo.CurrentCulture.dateTimeFormat\web.config" />
- <Content Include="Sys.CultureInfo.CurrentCulture.numberFormat\default.aspx" />
- <Content Include="Sys.CultureInfo.CurrentCulture.numberFormat\web.config" />
- <Content Include="Sys.Debug\Default.aspx" />
- <Content Include="Sys.EventHandlerList\Default.aspx" />
- <Content Include="Sys.EventHandlerList\HoverButton.js" />
- <Content Include="Sys.Net.CallWebServiceMethods\CallWebServiceMethods.aspx" />
- <Content Include="Sys.Net.CallWebServiceMethods\CallWebServiceMethods.js" />
- <Content Include="Sys.Net.CallWebServiceMethods\WebService.asmx" />
- <Content Include="Sys.Net.ConnectingEndPoints\ConnectingEndPoints.aspx" />
- <Content Include="Sys.Net.ConnectingEndPoints\ConnectingEndPoints.js" />
- <Content Include="Sys.Net.ConnectingEndPoints\getTarget.htm" />
- <Content Include="Sys.Net.ConnectingEndPoints\postTarget.aspx" />
- <Content Include="Sys.Net.ErrorHandlingTutorial\WebService.asmx" />
- <Content Include="Sys.Net.ErrorHandlingTutorial\WebServiceMethodError.aspx" />
- <Content Include="Sys.Net.ErrorHandlingTutorial\WebServiceMethodError.js" />
- <Content Include="Sys.Net.ExchangeComplexTypes\default.aspx" />
- <Content Include="Sys.Net.ExchangeComplexTypes\HandleColor.asmx" />
- <Content Include="Sys.Net.ExchangeComplexTypes\HandleColor.js" />
- <Content Include="Sys.Net.JsonSerialization\ClientDeserializeServerSerialize.aspx" />
- <Content Include="Sys.Net.JsonSerialization\ClientSerializeServerDeserialize.aspx" />
- <Content Include="Sys.Net.MultipleCallers\multiplecallers.aspx" />
- <Content Include="Sys.Net.MultipleCallers\WebService.asmx" />
- <Content Include="Sys.Net.MultipleCallers\WebServiceMultipleCallers.js" />
- <Content Include="Sys.Net.PageMethod\PageMethod.aspx" />
- <Content Include="Sys.Net.PageMethod\PageMethod.js" />
- <Content Include="Sys.Net.PassComplexType\default.aspx" />
- <Content Include="Sys.Net.PassComplexType\HandleColor.asmx" />
- <Content Include="Sys.Net.PassComplexType\HandleColor.js" />
- <Content Include="Sys.Net.ReturnComplexType\default.aspx" />
- <Content Include="Sys.Net.ReturnComplexType\HandleColor.asmx" />
- <Content Include="Sys.Net.ReturnComplexType\HandleColor.js" />
- <Content Include="Sys.Net.ServerSupport\default.aspx" />
- <Content Include="Sys.Net.ServerSupport\ServerTypes.asmx" />
- <Content Include="Sys.Net.ServerSupport\ServerTypes.js" />
- <Content Include="Sys.Net.ServerTime\ServerTime.asmx" />
- <Content Include="Sys.Net.ServerTime\ServerTime.aspx" />
- <Content Include="Sys.Net.SimpleWebService\SimpleWebService.asmx" />
- <Content Include="Sys.Net.SimpleWebService\SimpleWebService.aspx" />
- <Content Include="Sys.Net.UsingProxyClass\default.aspx" />
- <Content Include="Sys.Net.UsingProxyClass\UsingProxyClass.asmx" />
- <Content Include="Sys.Net.UsingProxyClass\UsingProxyClass.js" />
- <Content Include="Sys.Net.WebRequestManager\getTarget.htm" />
- <Content Include="Sys.Net.WebRequestManager\WebRequestManager.aspx" />
- <Content Include="Sys.Net.WebRequestManager\WebRequestManager.js" />
- <Content Include="Sys.Net.WebRequest\getTarget.htm" />
- <Content Include="Sys.Net.WebRequest\postTarget.aspx" />
- <Content Include="Sys.Net.WebRequest\webrequest.aspx" />
- <Content Include="Sys.Net.WebRequest\WebRequest.js" />
- <Content Include="Sys.Net.WebServiceGenerics\default.aspx" />
- <Content Include="Sys.Net.WebServiceGenerics\generics.js" />
- <Content Include="Sys.Net.WebServiceGenerics\WebService.asmx" />
- <Content Include="Sys.Net.WebServiceProxy\WebService.asmx" />
- <Content Include="Sys.Net.WebServiceProxy\WebServiceProxy.aspx" />
- <Content Include="Sys.Net.WebServiceProxy\WebServiceProxy.js" />
- <Content Include="Sys.Net.XmlHttpExecutor\getTarget.htm" />
- <Content Include="Sys.Net.XmlHttpExecutor\getTarget.xml" />
- <Content Include="Sys.Net.XmlHttpExecutor\XmlHttpExecutor.aspx" />
- <Content Include="Sys.Net.XmlHttpExecutor\XmlHttpExecutor.js" />
- <Content Include="Sys.Services.AuthenticationServiceTutorial\Authentication.js" />
- <Content Include="Sys.Services.AuthenticationServiceTutorial\CreateNewUser.aspx" />
- <Content Include="Sys.Services.AuthenticationServiceTutorial\login.aspx" />
- <Content Include="Sys.Services.AuthenticationServiceTutorial\secured\Default.aspx" />
- <Content Include="Sys.Services.AuthenticationServiceTutorial\secured\Web.config.txt" />
- <Content Include="Sys.Services.AuthenticationUserControl\Login.aspx" />
- <Content Include="Sys.Services.AuthenticationUserControl\LoginControl.ascx" />
- <Content Include="Sys.Services.AuthenticationUserControl\secured\Default.aspx" />
- <Content Include="Sys.Services.AuthenticationUserControl\secured\Web.config" />
- <Content Include="Sys.Services.ProfileServiceTutorial\login.aspx" />
- <Content Include="Sys.Services.ProfileServiceTutorial\Profile.js" />
- <Content Include="Sys.Services.ProfileUserControl\LoginProfileControl.ascx" />
- <Content Include="Sys.Services.ProfileUserControl\Profile.aspx" />
- <Content Include="Sys.UI.DomElement\default.aspx" />
- <Content Include="Sys.UI.DomEvent.addHandlers\default.aspx" />
- <Content Include="Sys.UI.DomEvent2\default.aspx" />
- <Content Include="Sys.UI.DomEvent\default.aspx" />
- <Content Include="Sys.WebForms.EndRequestEventArgs\default.aspx" />
- <Content Include="Sys.WebForms.PageRequestManager.abortPostBack\PageRequestManager_AbortPostBackCS.aspx" />
- <Content Include="Sys.WebForms.PageRequestManager.beginRequest\default.aspx" />
- <Content Include="Sys.WebForms.PageRequestManager.endRequest\default.aspx" />
- <Content Include="Sys.WebForms.PageRequestManager.initializeRequest\default.aspx" />
- <Content Include="Sys.WebForms.PageRequestManager.isInAsyncPostBack\PageRequestManager_isInAsyncPostBack.aspx" />
- <Content Include="Sys.WebForms.PageRequestManager.pageLoaded\default.aspx" />
- <Content Include="System.Web.Configuration\DefaultDummy.aspx" />
- <Content Include="System.Web.Script.Serialization.ScriptIgnoreAttribute\DefaultDummy.aspx" />
- <Content Include="System.Web.Script.Serialization.TypeResolver\Default.aspx" />
- <Content Include="System.Web.Script.Serialization\Default.aspx" />
- <Content Include="System.Web.Script.Serialization\images\spinner.gif" />
- <Content Include="System.Web.Script.Services.GenerateScriptTypeAttribute\GenerateScriptTypeSample.asmx" />
- <Content Include="System.Web.Script.Services.ScriptMethodAttribute\WebService.asmx" />
- <Content Include="System.Web.Script.Services.ScriptServiceAttribute\ScriptServiceSample.asmx" />
- <Content Include="System.Web.UI.AsyncPostBackTrigger\AsyncPostBackTriggerCS.aspx" />
- <Content Include="System.Web.UI.CompareValidator\UpdatePanelWizardValidatorsCS.aspx" />
- <Content Include="System.Web.UI.Controls.Timer.Interval\Default.aspx" />
- <Content Include="System.Web.UI.Controls.Timer.Tick\Default.aspx" />
- <Content Include="System.Web.UI.Controls.Timer.Walkthrough2Panels\Default.aspx" />
- <Content Include="System.Web.UI.Controls.Timer.Walkthrough\Default.aspx" />
- <Content Include="System.Web.UI.Controls.Timer\Default.aspx" />
- <Content Include="System.WEb.UI.PostBackTrigger\PostBackTriggerCS.aspx" />
- <Content Include="System.Web.UI.ScriptManager.AsyncPostBackErrorMessage\ScriptManager_AsyncPostBackErrorMessageCS.aspx" />
- <Content Include="System.Web.UI.ScriptManager.EnableScriptGlobalization\default.aspx" />
- <Content Include="System.Web.UI.ScriptManager.OnAsyncPostBackError\default.aspx" />
- <Content Include="System.Web.UI.ScriptManager.OnAsyncPostBackError\ErrorHandling.js" />
- <Content Include="System.Web.UI.ScriptManager.RegisterAsyncPostBackControl\Controls\WebUserControl.ascx" />
- <Content Include="System.Web.UI.ScriptManager.RegisterAsyncPostBackControl\ScriptManager1CS.aspx" />
- <Content Include="System.Web.UI.ScriptManager.RegisterAsyncPostBackControl\ScriptManager2CS.aspx" />
- <Content Include="System.Web.UI.ScriptManager.RegisterClientScriptBlock\App_Data\Contacts.xml" />
- <Content Include="System.Web.UI.ScriptManager.RegisterClientScriptBlock\ScriptManager_RegisterClientScriptBlockCS.aspx" />
- <Content Include="System.Web.UI.ScriptManager.RegisterClientScriptInclude\ScriptManager_RegisterClientScriptIncludeCS.aspx" />
- <Content Include="System.Web.UI.ScriptManager.RegisterClientScriptInclude\scripts\script_alertdiv.js" />
- <Content Include="System.Web.UI.ScriptManager.RegisterDataItem\ScriptManagerRegisterDataItemCS.aspx" />
- <Content Include="System.Web.UI.ScriptMode\CustomClient.js" />
- <Content Include="System.Web.UI.ScriptMode\Default.aspx" />
- <Content Include="System.Web.UI.ScriptReference.Path\scripts\UpdatePanelAnimation.js" />
- <Content Include="System.Web.UI.ScriptReference\Default.aspx" />
- <EmbeddedResource Include="System.Web.UI.ScriptReference\UpdatePanelAnimation.js" />
- <Content Include="System.Web.UI.UpdatePanel.Constructor\UpdatePanelConstructorCS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel.ContentTemplate\UpdatePanelContentTemplateCS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel.ContentTemplate\UpdatePanelContentTemplateDynamicCS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel.CreateContentTemplateContainer\UpdatePanelCreateContentTemplateContainerCS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel.RenderMode\UpdatePanelRenderModeCS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel.UpdateMode\UpdatePanelUpdateMode2CS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel.UpdateMode\UpdatePanelUpdateMode3CS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel.UpdateMode\UpdatePanelUpdateModeCS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel\UpdatePanelExample1CS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel\UpdatePanelExample2CS.aspx" />
- <Content Include="System.Web.UI.UpdatePanel\UpdatePanelExample3CS.aspx" />
- <Content Include="System.Web.UI.UpdateProgress1\default.aspx" />
- <Content Include="System.Web.UI.UpdateProgress2\default.aspx" />
- <Content Include="System.Web.UI.UpdateProgress3\default.aspx" />
- <Content Include="System.Web.UI.UpdateProgress4\default.aspx" />
- <Content Include="System.Web.UI.UpdateProgress5\default.aspx" />
- <Content Include="System.Web.UI.ValidationSummary2\WizardValidationSummaryCS.aspx" />
- <Content Include="System.Web.UI.ValidationSummary\ValidationSummaryCS.aspx" />
- <Content Include="UpdatePanelApplicationSample1\images\calendar.gif" />
- <Content Include="UpdatePanelApplicationSample1\UpdatePanel1CS.aspx" />
- <Content Include="UpdatePanelApplicationSample1\UpdatePanel2CS.aspx" />
- <Content Include="UpdatePanelApplicationSample1\UpdatePanel3CS.aspx" />
- <Content Include="UpdatePanelApplicationSample1\UpdatePanel4CS.aspx" />
- <Content Include="UpdatePanelHowTo10\ErrorHandlingBasicsCS.aspx" />
- <Content Include="UpdatePanelHowTo10\ErrorHandlingExampleCS.aspx" />
- <Content Include="UpdatePanelHowTo1\UpdatePanelHowToNoUpdatePanel.aspx" />
- <Content Include="UpdatePanelHowTo1\UpdatePanelHowToWithUpdatePanel.aspx" />
- <Content Include="UpdatePanelHowTo2\Controls\WebUserControl.ascx" />
- <Content Include="UpdatePanelHowTo2\UpdatePanelHowTo1CS.aspx" />
- <Content Include="UpdatePanelHowTo2\UpdatePanelHowTo2CS.aspx" />
- <Content Include="UpdatePanelHowTo3\MasterPageCS.master" />
- <Content Include="UpdatePanelHowTo3\UpdatePanelContentPage2CS.aspx" />
- <Content Include="UpdatePanelHowTo3\UpdatePanelContentPage3CS.aspx" />
- <Content Include="UpdatePanelHowTo3\UpdatePanelContentPageCS.aspx" />
- <Content Include="UpdatePanelHowTo3\UpdatePanelContentPageDisablePartialRenderingCS.aspx" />
- <Content Include="UpdatePanelHowTo4\UpdatePanelDynamicallyUpdatedCS1.aspx" />
- <Content Include="UpdatePanelHowTo4\UpdatePanelDynamicallyUpdatedCS2.aspx" />
- <Content Include="UpdatePanelHowTo4\UpdatePanelDynamicallyUpdatedCS3.aspx" />
- <Content Include="UpdatePanelHowTo5\UpdatePanelTriggerBasicsCS.aspx" />
- <Content Include="UpdatePanelHowTo5\UpdatePanelTriggerExampleCS.aspx" />
- <Content Include="UpdatePanelHowTo6\SurveyQuestionsExample.aspx" />
- <Content Include="UpdatePanelHowTo7\NewsHeadLineExampleCS.aspx" />
- <Content Include="UpdatePanelHowTo7\SimpleExample1CS.aspx" />
- <Content Include="UpdatePanelHowTo7\SimpleExample2CS.aspx" />
- <Content Include="UpdatePanelHowTo8\SimpleExample1CS.aspx" />
- <Content Include="UpdatePanelHowTo8\SimpleExample2CS.aspx" />
- <Content Include="UpdatePanelHowTo8\SimpleExample3CS.aspx" />
- <Content Include="UpdatePanelHowTo9\ExclusivePostBackBasicsCS.aspx" />
- <Content Include="UpdatePanelHowTo9\ExclusivePostBackCS.aspx" />
- <Content Include="UpdatePanelTechnologyOverview1\MasterCS.master" />
- <Content Include="UpdatePanelTechnologyOverview1\UpdatePanelContentPageCS.aspx" />
- <Content Include="UpdatePanelTechnologyOverview1\UpdatePanelCS.aspx" />
- <Content Include="UpdatePanelTechnologyOverview1\UpdatePanelNestedCS.aspx" />
- <Content Include="UpdatePanelTechnologyOverview1\UpdatePanelProgrammaticallyCS.aspx" />
- <Content Include="UpdatePanelTutorial12\default.aspx" />
- <Content Include="UpdatePanelTutorial13\default.aspx" />
- <Content Include="UpdatePanelTutorial14\default.aspx" />
- <Content Include="UpdatePanelTutorial14\ProductQueryScript.js" />
- <Content Include="UpdatePanelTutorial14\ProductQueryService.asmx" />
- <Content Include="UpdatePanelTutorial15\default.aspx" />
- <Content Include="UpdatePanelTutorial15\ProductQueryScript.js" />
- <Content Include="UpdatePanelTutorial15\ProductQueryService.asmx" />
- <Content Include="UpdatePanelTutorial16\default.aspx" />
- <Content Include="UpdatePanelTutorial16\UpdatePanelAnimation.js" />
- <Content Include="UpdatePanelTutorial17\CancelPostback.js" />
- <Content Include="UpdatePanelTutorial17\default.aspx" />
- <Content Include="UpdatePanelTutorial18\default.aspx" />
- <Content Include="UpdatePanelTutorial18\PostbackPrecedence.js" />
- <Content Include="UpdatePanelTutorial19\default.aspx" />
- <Content Include="UpdatePanelTutorial20\default.aspx" />
- <Content Include="UpdatePanelTutorialChildTriggers\ChildTriggers.aspx" />
- <Content Include="UpdatePanelTutorialCustom\images\awc_jersey_female_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\awc_jersey_male_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\awc_tee_female_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\awc_tee_male_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\awc_tee_male_yellow_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\bikepump_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\bike_lock_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\bike_shoes_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\bike_shorts_female_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\bike_shorts_male_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\chain_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\chain_lube_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\clipless_pedals_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\co2_4tire_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\double_headlight_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\fork_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\frame_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\frame_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\frame_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\frame_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\frame_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\frame_yellow_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\handlebar_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\handpump_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_f_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\hotrodbike_yellow_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\innertube_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_f_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_f_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_f_gold_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_f_green_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_f_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_gold_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_green_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\julianax_r_02_yellow_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\mb_shoes_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\mb_tires_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\no_image_available_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\pedal_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_black_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_blue_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_green_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_green_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer02_yellow_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\racer_yellow_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_green_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_green_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_purple_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_purple_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_red_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_yellow_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\roadster_yellow_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\saddle_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\shorts_female_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\shorts_male_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\silver_chain_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\silver_pedal_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\silver_sprocket_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\single_headlight_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\sprocket_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\street_tires_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_black_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_black_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_blue_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_blue_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_metalicgreen_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_metalicgreen_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_red_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_red_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_silver_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_silver_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_yellow_f_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\superlight_yellow_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\tail_lights_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\awc_jersey_female_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\awc_jersey_male_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\awc_tee_female_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\awc_tee_male_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\awc_tee_male_yellow_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\bikepump_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\bike_lock_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\bike_shoes_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\bike_shorts_female_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\bike_shorts_male_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\chain_lube_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\chain_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\clipless_pedals_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\co2_4tire_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\double_headlight_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\fork_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\frame_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\frame_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\frame_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\frame_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\frame_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\frame_yellow_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\handlebar_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\handpump_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_f_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\hotrodbike_yellow_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\innertube_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_f_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_f_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_f_gold_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_f_green_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_f_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_gold_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_green_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\julianax_r_02_yellow_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\mb_shoes_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\mb_tires_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\no_image_available_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\pedal_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_black_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_blue_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_green_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_green_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer02_yellow_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\racer_yellow_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_green_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_green_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_purple_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_purple_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_red_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_yellow_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\roadster_yellow_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\saddle_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\shorts_female_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\shorts_male_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\silver_chain_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\silver_pedal_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\silver_sprocket_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\single_headlight_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\sprocket_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\street_tires_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_black_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_black_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_blue_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_blue_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_metalicgreen_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_metalicgreen_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_red_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_red_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_silver_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_silver_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_yellow_f_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\superlight_yellow_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\tail_lights_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\tirepatch_kit_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\water_bottle_cage_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\water_bottle_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\thumbnails\wheel_small.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\tirepatch_kit_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\water_bottle_cage_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\water_bottle_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\images\wheel_large.gif" />
- <Content Include="UpdatePanelTutorialCustom\ShowProducts.aspx" />
- <Content Include="UpdatePanelTutorialIntro1\default.aspx" />
- <Content Include="UpdatePanelTutorialIntro2\default.aspx" />
- <Content Include="UpdatePanelTutorialIntro3\default.aspx" />
- <Content Include="UpdatePanelTutorialIntro4\default.aspx" />
- <Content Include="UpdatePanelTutorialIntro5\default.aspx" />
- <Content Include="UpdatePanelTutorialIntro8\default.aspx" />
- <Content Include="UpdatePanelTutorialIntro9\default.aspx" />
- <Content Include="UpdatePanelTutorialNested\NestedPanels.aspx" />
- <Content Include="UpdatePanelTutorialSibling\DataEntry.aspx" />
- <Content Include="UpdatePanelUserControlTutorial1\Default.aspx" />
- <Content Include="UpdatePanelUserControlTutorial1\EmployeeInfo.ascx" />
- <Content Include="UpdatePanelUserControlTutorial1\EmployeeList.ascx" />
- <Content Include="UpdatePanelWalkthrough1\DeclarativeMarkupCS.aspx" />
- <Content Include="UpdatePanelWalkthrough1\WizardWithoutUpdatePanelCS.aspx" />
- <Content Include="UpdatePanelWalkthrough1\WizardWithUpdatePanelCS.aspx" />
- <Content Include="UpdatePanelWalkthrough2\SearchResultsWithoutUpdatePanelCS.aspx" />
- <Content Include="UpdatePanelWalkthrough2\SearchResultsWithUpdatePanelCS.aspx" />
- <Content Include="UpdatePanelWalkthrough2\TriggersDeclarativeMarkupCS.aspx" />
- <Content Include="UpdatePanelWalkthrough3\DeclarativeMasterPageCS.master" />
- <Content Include="UpdatePanelWalkthrough3\DelcarativeContentPageCS.aspx" />
- <Content Include="UpdatePanelWalkthrough3\NorthwindTradersContentPageCS.aspx" />
- <Content Include="UpdatePanelWalkthrough3\NorthwindTradersMasterPageCS.master" />
- <Content Include="UpdatePanelWalkthrough4\SurveyExampleCS.aspx" />
- <Content Include="UpdateProgressOverview1\default.aspx" />
- <Content Include="UpdateProgressOverview2\default.aspx" />
- <Content Include="UpdateProgressTutorialIntro10\default.aspx" />
- <Content Include="UpdateProgressTutorialIntro11\default.aspx" />
- <Content Include="UpdateProgressTutorialIntro6\default.aspx" />
- <Content Include="UpdateProgressTutorialIntro7\default.aspx" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="LocalizingClientResourcesWalkthrough\VerificationResources.it.resx">
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="LocalizingClientResourcesWalkthrough\VerificationResources.resx">
- <SubType>Designer</SubType>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <Content Include="DynamicScriptReferencesHowTo\DynamicScriptReferences1.aspx" />
- <Content Include="DynamicScriptReferencesHowTo\DynamicScriptReferences2.aspx" />
- <EmbeddedResource Include="DynamicScriptReferencesHowTo\Scripts\Scripts.debug.js" />
- <EmbeddedResource Include="DynamicScriptReferencesHowTo\Scripts\Scripts.js" />
- <Content Include="Selenium\QuickStarts\DynamicScriptReferencesHowTo\DynamicScriptReferences1.html" />
- <Content Include="Selenium\QuickStarts\DynamicScriptReferencesHowTo\DynamicScriptReferences2.html" />
- <Content Include="Selenium\QuickStarts\EnhancingJavaScript\Enumeration.html" />
- <Content Include="Selenium\QuickStarts\EnhancingJavaScript\Inheritance.html" />
- <Content Include="Selenium\QuickStarts\EnhancingJavaScript\Interface.html" />
- <Content Include="Selenium\QuickStarts\EnhancingJavaScript\Namespace.html" />
- <Content Include="Selenium\QuickStarts\EnhancingJavaScript\Reflection.html" />
- <Content Include="Selenium\QuickStarts\ErrorTypeExtensions\ErrorArgumentNullSampleCSharp.html" />
- <Content Include="Selenium\QuickStarts\ErrorTypeExtensions\ErrorCreateSampleCSharp.html" />
- <Content Include="Selenium\QuickStarts\ExtenderControlTutorial1\Default.html" />
- <Content Include="Selenium\QuickStarts\IScriptControlTutorial1\Default.html" />
- <Content Include="Selenium\QuickStarts\LocalizingClientResourcesWalkthrough\Default.html" />
- <Content Include="Selenium\QuickStarts\LocalizingDateTutorial1\localeFormat.html" />
- <Content Include="Selenium\QuickStarts\LocalizingDateTutorial2\localeFormat.html" />
- <Content Include="Selenium\QuickStarts\LocalizingDateTutorial3\localeFormat.html" />
- <Content Include="Selenium\QuickStarts\LocalizingDateTutorial4\localeFormat.html" />
- <Content Include="Selenium\QuickStarts\PartialPageRenderingOverview\PartialPageRenderingOverviewCS.html" />
- <Content Include="Selenium\QuickStarts\PartialPageRenderingOverview\PartialPageRenderingOverviewSyntaxCS.html" />
- <Content Include="Selenium\QuickStarts\QuickStartTestSuite.html" />
- <Content Include="Selenium\QuickStarts\ResourcesInScriptFile\Default.html" />
- <Content Include="Selenium\QuickStarts\StringBuilder\StringBuilderOverviewSample.html" />
- <Content Include="Selenium\QuickStarts\Sys.Application\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.CultureInfo.CurrentCulture.dateTimeFormat\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.CultureInfo.CurrentCulture.numberFormat\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Debug\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.EventHandlerList\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.CallWebServiceMethods\CallWebServiceMethods.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.ConnectingEndPoints\ConnectingEndPoints.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.ErrorHandlingTutorial\WebServiceMethodError.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.ExchangeComplexTypes\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.JsonSerialization\ClientDeserializeServerSerialize.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.JsonSerialization\ClientSerializeServerDeserialize.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.MultipleCallers\multiplecallers.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.PageMethod\PageMethod.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.PassComplexType\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.ReturnComplexType\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.ServerSupport\Default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.ServerTime\ServerTime.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.SimpleWebService\SimpleWebService.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.UsingProxyClass\default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.WebRequestManager\WebRequestManager.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.WebRequest\webrequest.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.WebServiceGenerics\default.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.WebServiceProxy\WebServiceProxy.html" />
- <Content Include="Selenium\QuickStarts\Sys.Net.XmlHttpExecutor\XmlHttpExecutor.html" />
- <Content Include="Selenium\QuickStarts\Sys.UI.DomElement\default.html" />
- <Content Include="Selenium\QuickStarts\Sys.UI.DomEvent.addHandlers\default.html" />
- <Content Include="Selenium\QuickStarts\Sys.UI.DomEvent2\default.html" />
- <Content Include="Selenium\QuickStarts\Sys.UI.DomEvent\default.html" />
- <Content Include="Selenium\Sys.WebForms\PageRequestManager\PageRequestManagerTestSuite.html" />
- <Content Include="Selenium\Sys.WebForms\PageRequestManager\TestClientPageLifecycleEvents.html" />
- <Content Include="Selenium\Sys.WebForms\PageRequestManager\TestStopAsynchronousPostback.html" />
- <Content Include="Selenium\System.Web.UI\UpdatePanel\CallCloseExplorer.html" />
- <Content Include="Selenium\System.Web.UI\UpdatePanel\TestCalendarInCalendarOut.html" />
- <Content Include="Selenium\System.Web.UI\UpdatePanel\TestNoScriptManager.html" />
- <Content Include="Selenium\System.Web.UI\UpdatePanel\TestTwoScriptManagers.html" />
- <Content Include="Selenium\System.Web.UI\UpdatePanel\TestUpdateButtonInside.html" />
- <Content Include="Selenium\System.Web.UI\UpdatePanel\TestUpdateButtonOutside.html" />
- <Content Include="Selenium\System.Web.UI\UpdatePanel\UpdatePanelTestSuite.html" />
- <Content Include="Sys.Application\HoverButton.js" />
- <Content Include="Sys.Net.XmlHttpExecutor\getTarget.aspx" />
- <Content Include="UpdatePanelTutorialIntro8\MasterPage.master" />
- <Content Include="UpdatePanelTutorialIntro9\MasterPage.master" />
- <Content Include="WEB-INF\faces-config.xml" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.csproj b/mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.csproj
deleted file mode 100644
index 65678f949b5..00000000000
--- a/mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.csproj
+++ /dev/null
@@ -1,85 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Web.Extensions.Test</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <RootNamespace>System.Web.Extensions.Test</RootNamespace>
- <jarserver>ipa</jarserver>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="rt, Version=1.6.0.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86" />
- <Reference Include="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="System.Web.Script.Serialization\JavaScriptSerializerTest.cs" />
- <Compile Include="System.Web.UI\ScriptBehaviorDescriptorTest.cs" />
- <Compile Include="System.Web.UI\ScriptComponentDescriptorTest.cs" />
- <Compile Include="System.Web.UI\ScriptControlDescriptorTest.cs" />
- <Compile Include="System.Web.UI\UpdateProgressTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj">
- <Project>{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}</Project>
- <Name>nunit.framework.dll20.J2EE</Name>
- <Private>False</Private>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-JarPath-system-drawing="" REFS-RefInfo-system-web-extensions="repository:vmw:framework:2.0" REFS-JarPath-system-web-extensions="" REFS-RefInfo-system-web="repository:vmw:framework:2.0" REFS-JarPath-system-web="" REFS-JarPath-system="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.sln b/mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.sln
deleted file mode 100644
index 1f5fb38c2ae..00000000000
--- a/mcs/class/System.Web.Extensions/Test/System.Web.Extensions.Test.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Extensions.Test", "System.Web.Extensions.Test.csproj", "{B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nunit.framework.dll20.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj", "{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Debug_Java20|Any CPU.Build.0 = Debug_Java|Any CPU
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Release_Java20|Any CPU.ActiveCfg = Release_Java|Any CPU
- {B05A102E-5F7E-4DE6-AFAF-B04CA363FD6C}.Release_Java20|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.Build.0 = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptBehaviorDescriptorTest.cs b/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptBehaviorDescriptorTest.cs
index 69d065ec5fd..f4a78612162 100644
--- a/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptBehaviorDescriptorTest.cs
+++ b/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptBehaviorDescriptorTest.cs
@@ -90,11 +90,7 @@ namespace Tests.System.Web.UI
scd.AddComponentProperty ("myName2", "myCompId2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, null, null, {\"myName2\":\"myCompId2\",\"myName1\":\"myCompId1\"}, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, null, null, {\"myName1\":\"myCompId1\",\"myName2\":\"myCompId2\"}, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -105,11 +101,7 @@ namespace Tests.System.Web.UI
scd.AddElementProperty ("myName2", "myElemId2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":$get(\"myElemId2\"),\"myName1\":$get(\"myElemId1\")}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":$get(\"myElemId1\"),\"myName2\":$get(\"myElemId2\")}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -120,11 +112,7 @@ namespace Tests.System.Web.UI
scd.AddProperty ("myName2", "myValue2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":\"myValue2\",\"myName1\":\"myValue1\"}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":\"myValue1\",\"myName2\":\"myValue2\"}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -135,11 +123,7 @@ namespace Tests.System.Web.UI
scd.AddProperty ("myName2", null);
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":null,\"myName1\":null}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":null,\"myName2\":null}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -150,11 +134,7 @@ namespace Tests.System.Web.UI
scd.AddEvent ("myName2", "myHandler2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, null, {\"myName2\":myHandler2,\"myName1\":myHandler1}, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, null, {\"myName1\":myHandler1,\"myName2\":myHandler2}, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -165,11 +145,7 @@ namespace Tests.System.Web.UI
scd.AddScriptProperty ("myName2", "myScript2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":myScript2,\"myName1\":myScript1}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":myScript1,\"myName2\":myScript2}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Test]
diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptComponentDescriptorTest.cs b/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptComponentDescriptorTest.cs
index cbf47d716e2..0e4fb3abbaf 100644
--- a/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptComponentDescriptorTest.cs
+++ b/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptComponentDescriptorTest.cs
@@ -84,11 +84,7 @@ namespace Tests.System.Web.UI
scd.AddComponentProperty ("myName2", "myCompId2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, null, null, {\"myName2\":\"myCompId2\",\"myName1\":\"myCompId1\"});", script);
-#else
Assert.AreEqual ("$create(My.Type, null, null, {\"myName1\":\"myCompId1\",\"myName2\":\"myCompId2\"});", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -99,11 +95,7 @@ namespace Tests.System.Web.UI
scd.AddElementProperty ("myName2", "myElemId2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":$get(\"myElemId2\"),\"myName1\":$get(\"myElemId1\")}, null, null);", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":$get(\"myElemId1\"),\"myName2\":$get(\"myElemId2\")}, null, null);", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -114,11 +106,7 @@ namespace Tests.System.Web.UI
scd.AddProperty ("myName2", "myValue2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":\"myValue2\",\"myName1\":\"myValue1\"}, null, null);", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":\"myValue1\",\"myName2\":\"myValue2\"}, null, null);", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -129,11 +117,7 @@ namespace Tests.System.Web.UI
scd.AddProperty ("myName2", null);
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":null,\"myName1\":null}, null, null);", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":null,\"myName2\":null}, null, null);", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -144,11 +128,7 @@ namespace Tests.System.Web.UI
scd.AddEvent ("myName2", "myHandler2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, null, {\"myName2\":myHandler2,\"myName1\":myHandler1}, null);", script);
-#else
Assert.AreEqual ("$create(My.Type, null, {\"myName1\":myHandler1,\"myName2\":myHandler2}, null);", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -159,11 +139,7 @@ namespace Tests.System.Web.UI
scd.AddScriptProperty ("myName2", "myScript2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":myScript2,\"myName1\":myScript1}, null, null);", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":myScript1,\"myName2\":myScript2}, null, null);", script);
-#endif
}
[Test]
diff --git a/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptControlDescriptorTest.cs b/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptControlDescriptorTest.cs
index 8df2646880e..98c155b7e04 100644
--- a/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptControlDescriptorTest.cs
+++ b/mcs/class/System.Web.Extensions/Test/System.Web.UI/ScriptControlDescriptorTest.cs
@@ -80,11 +80,7 @@ namespace Tests.System.Web.UI
scd.AddComponentProperty ("myName2", "myCompId2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, null, null, {\"myName2\":\"myCompId2\",\"myName1\":\"myCompId1\"}, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, null, null, {\"myName1\":\"myCompId1\",\"myName2\":\"myCompId2\"}, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -95,11 +91,7 @@ namespace Tests.System.Web.UI
scd.AddElementProperty ("myName2", "myElemId2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":$get(\"myElemId2\"),\"myName1\":$get(\"myElemId1\")}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":$get(\"myElemId1\"),\"myName2\":$get(\"myElemId2\")}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -110,11 +102,7 @@ namespace Tests.System.Web.UI
scd.AddProperty ("myName2", "myValue2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":\"myValue2\",\"myName1\":\"myValue1\"}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":\"myValue1\",\"myName2\":\"myValue2\"}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -125,11 +113,7 @@ namespace Tests.System.Web.UI
scd.AddProperty ("myName2", null);
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":null,\"myName1\":null}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":null,\"myName2\":null}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -140,11 +124,7 @@ namespace Tests.System.Web.UI
scd.AddEvent ("myName2", "myHandler2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, null, {\"myName2\":myHandler2,\"myName1\":myHandler1}, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, null, {\"myName1\":myHandler1,\"myName2\":myHandler2}, null, $get(\"Element1\"));", script);
-#endif
}
[Category("NotWorking")] // One must not depend on the order of keys in dictionary
@@ -155,11 +135,7 @@ namespace Tests.System.Web.UI
scd.AddScriptProperty ("myName2", "myScript2");
string script = scd.DoGetScript ();
-#if TARGET_JVM
- Assert.AreEqual ("$create(My.Type, {\"myName2\":myScript2,\"myName1\":myScript1}, null, null, $get(\"Element1\"));", script);
-#else
Assert.AreEqual ("$create(My.Type, {\"myName1\":myScript1,\"myName2\":myScript2}, null, null, $get(\"Element1\"));", script);
-#endif
}
[Test]
diff --git a/mcs/class/System.Web.Services/Assembly/AssemblyInfo.cs b/mcs/class/System.Web.Services/Assembly/AssemblyInfo.cs
index b9b695d0229..a4057864063 100644
--- a/mcs/class/System.Web.Services/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web.Services/Assembly/AssemblyInfo.cs
@@ -54,11 +54,9 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
[assembly: AllowPartiallyTrustedCallers]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile("../msfinal.pub")]
-#endif
[assembly: AssemblyFileVersion (Consts.FxFileVersion)]
[assembly: CompilationRelaxations (CompilationRelaxations.NoStringInterning)]
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Configuration/WebServicesConfigurationSectionHandler.cs b/mcs/class/System.Web.Services/System.Web.Services.Configuration/WebServicesConfigurationSectionHandler.cs
index e642a6202dd..c4936a4bb34 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Configuration/WebServicesConfigurationSectionHandler.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Configuration/WebServicesConfigurationSectionHandler.cs
@@ -50,19 +50,7 @@ namespace System.Web.Services.Configuration
class WSConfig
{
-#if !TARGET_JVM
volatile static WSConfig instance;
-#else
- static WSConfig instance {
- get {
- return (WSConfig)AppDomain.CurrentDomain.GetData("WSConfig.instance");
- }
- set {
- AppDomain.CurrentDomain.SetData("WSConfig.instance", value);
- }
- }
-
-#endif
WSProtocol protocols;
string wsdlHelpPage;
string filePath;
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs
index 0d321e7725a..ede0ad15ec7 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs
@@ -35,9 +35,7 @@ using System.Xml;
namespace System.Web.Services.Description {
public sealed class ServiceDescriptionCollection : ServiceDescriptionBaseCollection {
-#if !TARGET_JVM //code generation is not supported
ServiceDescriptionImporter importer;
-#endif
#region Constructors
@@ -69,12 +67,10 @@ namespace System.Web.Services.Description {
#endregion // Properties
#region Methods
-#if !TARGET_JVM //code generation is not supported
internal void SetImporter (ServiceDescriptionImporter i)
{
importer = i;
}
-#endif
public int Add (ServiceDescription serviceDescription)
{
Insert (Count, serviceDescription);
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionSerializerBase2.cs b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionSerializerBase2.cs
index 69e87d037ad..9a1832792fd 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionSerializerBase2.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionSerializerBase2.cs
@@ -2479,7 +2479,6 @@ namespace System.Web.Services.Description
}
}
- #if !TARGET_JVM
internal class XmlSerializerContract : System.Xml.Serialization.XmlSerializerImplementation
{
System.Collections.Hashtable readMethods = null;
@@ -2550,7 +2549,6 @@ namespace System.Web.Services.Description
}
}
- #endif
}
#endif
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Description/SoapTransportImporter.cs b/mcs/class/System.Web.Services/System.Web.Services.Description/SoapTransportImporter.cs
index a73d6d235b1..f13e0cf1271 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Description/SoapTransportImporter.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Description/SoapTransportImporter.cs
@@ -35,18 +35,7 @@ namespace System.Web.Services.Description {
public abstract class SoapTransportImporter {
#region Fields
-#if !TARGET_JVM
static ArrayList transportImporters;
-#else
- static ArrayList transportImporters {
- get {
- return (ArrayList)AppDomain.CurrentDomain.GetData("SoapTransportImporter.transportImporters");
- }
- set {
- AppDomain.CurrentDomain.SetData("SoapTransportImporter.transportImporters", value);
- }
- }
-#endif
SoapProtocolImporter importContext;
#endregion // Fields
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapDocumentationHandler.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapDocumentationHandler.cs
index 178161b1c95..66d88ee943b 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapDocumentationHandler.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapDocumentationHandler.cs
@@ -100,10 +100,8 @@ namespace System.Web.Services.Protocols
string physPath = Path.Combine (path, help);
-#if !TARGET_JVM
if (!File.Exists (physPath))
throw new InvalidOperationException ("Documentation page '" + physPath + "' not found");
-#endif
_pageHandler = PageParser.GetCompiledPageInstance (vpath, physPath, context);
}
@@ -137,11 +135,7 @@ namespace System.Web.Services.Protocols
if (key == "wsdl") GenerateWsdlDocument (context, req.QueryString ["wsdl"]);
else if (key == "schema") GenerateSchema (context, req.QueryString ["schema"]);
-#if !TARGET_JVM //code generation is not supported
else if (key == "code") GenerateCode (context, req.QueryString ["code"]);
-#else
- else if (key == "code") throw new Exception("Code generation is not supported.");
-#endif
else if (key == "disco") GenerateDiscoDocument (context);
else throw new Exception ("This should never happen");
}
@@ -212,7 +206,6 @@ namespace System.Web.Services.Protocols
GetSchemas() [di].Write (xtw);
}
-#if !TARGET_JVM
void GenerateCode (HttpContext context, string langId)
{
context.Response.ContentType = "text/plain; charset=utf-8";
@@ -256,7 +249,6 @@ namespace System.Web.Services.Protocols
return provider;
}
-#endif
internal ServiceDescriptionCollection GetDescriptions ()
{
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapExtension.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapExtension.cs
index 854cc1a4dce..66359e79948 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapExtension.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/SoapExtension.cs
@@ -62,18 +62,7 @@ namespace System.Web.Services.Protocols {
public abstract void ProcessMessage (SoapMessage message);
-#if !TARGET_JVM
static ArrayList[] globalExtensions;
-#else
- static ArrayList[] globalExtensions {
- get {
- return (ArrayList[])AppDomain.CurrentDomain.GetData("SoapExtension.globalExtensions");
- }
- set {
- AppDomain.CurrentDomain.SetData("SoapExtension.globalExtensions", value);
- }
- }
-#endif
internal static SoapExtension[] CreateExtensionChain (SoapExtensionRuntimeConfig[] extensionConfigs)
{
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/TypeStubManager.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/TypeStubManager.cs
index 28d03f04f99..5ea34917e87 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/TypeStubManager.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/TypeStubManager.cs
@@ -280,28 +280,7 @@ namespace System.Web.Services.Protocols {
//
internal class TypeStubManager
{
-#if !TARGET_JVM
static Hashtable type_to_manager;
-#else
- const string type_to_manager_key = "TypeStubManager.type_to_manager";
- static Hashtable type_to_manager {
- get {
- Hashtable hash = (Hashtable)AppDomain.CurrentDomain.GetData(type_to_manager_key);
-
- if (hash != null)
- return hash;
-
- lock(type_to_manager_key) {
- AppDomain.CurrentDomain.SetData(type_to_manager_key, new Hashtable());
- }
-
- return (Hashtable)AppDomain.CurrentDomain.GetData(type_to_manager_key);
- }
- set {
- //do nothing: we manage our type_to_manager per domain
- }
- }
-#endif
static TypeStubManager ()
{
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebClientProtocol.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebClientProtocol.cs
index a5c12538886..59bb8bfbd51 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebClientProtocol.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebClientProtocol.cs
@@ -59,18 +59,7 @@ namespace System.Web.Services.Protocols {
//
WebRequest current_request;
-#if !TARGET_JVM
static HybridDictionary cache;
-#else
- static HybridDictionary cache {
- get {
- return (HybridDictionary)AppDomain.CurrentDomain.GetData("WebClientProtocol.cache");
- }
- set {
- AppDomain.CurrentDomain.SetData("WebClientProtocol.cache", value);
- }
- }
-#endif
#endregion
#region Constructors
diff --git a/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandlerFactory.cs b/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandlerFactory.cs
index fd10eac8573..37dc32ba653 100644
--- a/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandlerFactory.cs
+++ b/mcs/class/System.Web.Services/System.Web.Services.Protocols/WebServiceHandlerFactory.cs
@@ -106,7 +106,7 @@ namespace System.Web.Services.Protocols
#endif
Type type;
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
type = BuildManager.GetCompiledType (url);
#else
type = WebServiceParser.GetCompiledType (fp, context);
diff --git a/mcs/class/System.Web.Services/System.Web.Services20.csproj b/mcs/class/System.Web.Services/System.Web.Services20.csproj
deleted file mode 100755
index ebab2a69748..00000000000
--- a/mcs/class/System.Web.Services/System.Web.Services20.csproj
+++ /dev/null
@@ -1,418 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20_prepare|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20_prepare\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;TARGET_JVM;TARGET_J2EE;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <PreCompile>false</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <UseTestingPage>true</UseTestingPage>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{B37A8704-33AB-48D9-B0C2-1D919755B69A}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Web.Services</RootNamespace>
- <AssemblyName>System.Web.Services</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <jarserver>ip2</jarserver>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;NET_1_1;TARGET_JVM;TARGET_J2EE;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- <MergeExternal>DefaultWsdlHelpGenerator\bin\DefaultWsdlHelpGenerator.jar</MergeExternal>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;TARGET_JVM;TARGET_J2EE;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- <MergeExternal>DefaultWsdlHelpGenerator\bin\DefaultWsdlHelpGenerator.jar</MergeExternal>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;TARGET_JVM;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;NET_1_1;TARGET_JVM;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20_prepare|AnyCPU' ">
- <OutputPath>bin\Release_Java20_prepare\</OutputPath>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <PreCompile>false</PreCompile>
- <DeploymentMethod>0</DeploymentMethod>
- <CompressionLevel>1</CompressionLevel>
- <UseTestingPage>true</UseTestingPage>
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <DefineConstants>TRACE;NET_1_1;TARGET_JVM;TARGET_J2EE;NET_2_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <BaseAddress>285212672</BaseAddress>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Configuration" />
- <Reference Include="System.Xml" />
- <Reference Include="J2EE.Helpers">
- <Private>False</Private>
- <HintPath>..\lib\J2EE.Helpers.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="System.Web.Services.Configuration\DiagnosticsElement.cs" />
- <Compile Include="System.Web.Services.Configuration\PriorityGroup.cs" />
- <Compile Include="System.Web.Services.Configuration\ProtocolElement.cs" />
- <Compile Include="System.Web.Services.Configuration\ProtocolElementCollection.cs" />
- <Compile Include="System.Web.Services.Configuration\SoapEnvelopeProcessingElement.cs" />
- <Compile Include="System.Web.Services.Configuration\SoapExtensionTypeElement.cs" />
- <Compile Include="System.Web.Services.Configuration\SoapExtensionTypeElementCollection.cs" />
- <Compile Include="System.Web.Services.Configuration\TypeElement.cs" />
- <Compile Include="System.Web.Services.Configuration\TypeElementCollection.cs" />
- <Compile Include="System.Web.Services.Configuration\TypeTypeConverter.cs" />
- <Compile Include="System.Web.Services.Configuration\WebServiceProtocols.cs" />
- <Compile Include="System.Web.Services.Configuration\WebServicesConfigurationSectionHandler.cs" />
- <Compile Include="System.Web.Services.Configuration\WebServicesSection.cs" />
- <Compile Include="System.Web.Services.Configuration\WsdlHelpGeneratorElement.cs" />
- <Compile Include="System.Web.Services.Configuration\WsiProfilesElement.cs" />
- <Compile Include="System.Web.Services.Configuration\WsiProfilesElementCollection.cs" />
- <Compile Include="System.Web.Services.Configuration\XmlFormatExtensionAttribute.cs" />
- <Compile Include="System.Web.Services.Configuration\XmlFormatExtensionPointAttribute.cs" />
- <Compile Include="System.Web.Services.Configuration\XmlFormatExtensionPrefixAttribute.cs" />
- <Compile Include="System.Web.Services.Description\BasicProfileChecker.cs" />
- <Compile Include="System.Web.Services.Description\BasicProfileViolation.cs" />
- <Compile Include="System.Web.Services.Description\BasicProfileViolationCollection.cs" />
- <Compile Include="System.Web.Services.Description\BasicProfileViolationEnumerator.cs" />
- <Compile Include="System.Web.Services.Description\Binding.cs" />
- <Compile Include="System.Web.Services.Description\BindingCollection.cs" />
- <Compile Include="System.Web.Services.Description\ConformanceChecker.cs" />
- <Compile Include="System.Web.Services.Description\DocumentableItem.cs" />
- <Compile Include="System.Web.Services.Description\ExtensionManager.cs" />
- <Compile Include="System.Web.Services.Description\FaultBinding.cs" />
- <Compile Include="System.Web.Services.Description\FaultBindingCollection.cs" />
- <Compile Include="System.Web.Services.Description\HttpAddressBinding.cs" />
- <Compile Include="System.Web.Services.Description\HttpBinding.cs" />
- <Compile Include="System.Web.Services.Description\HttpGetProtocolReflector.cs" />
- <Compile Include="System.Web.Services.Description\HttpOperationBinding.cs" />
- <Compile Include="System.Web.Services.Description\HttpPostProtocolReflector.cs" />
- <Compile Include="System.Web.Services.Description\HttpSimpleProtocolReflector.cs" />
- <Compile Include="System.Web.Services.Description\HttpUrlEncodedBinding.cs" />
- <Compile Include="System.Web.Services.Description\HttpUrlReplacementBinding.cs" />
- <Compile Include="System.Web.Services.Description\Import.cs" />
- <Compile Include="System.Web.Services.Description\ImportCollection.cs" />
- <Compile Include="System.Web.Services.Description\InputBinding.cs" />
- <Compile Include="System.Web.Services.Description\Message.cs" />
- <Compile Include="System.Web.Services.Description\MessageBinding.cs" />
- <Compile Include="System.Web.Services.Description\MessageCollection.cs" />
- <Compile Include="System.Web.Services.Description\MessagePart.cs" />
- <Compile Include="System.Web.Services.Description\MessagePartCollection.cs" />
- <Compile Include="System.Web.Services.Description\MimeContentBinding.cs" />
- <Compile Include="System.Web.Services.Description\MimeMultipartRelatedBinding.cs" />
- <Compile Include="System.Web.Services.Description\MimePart.cs" />
- <Compile Include="System.Web.Services.Description\MimePartCollection.cs" />
- <Compile Include="System.Web.Services.Description\MimeTextBinding.cs" />
- <Compile Include="System.Web.Services.Description\MimeTextMatch.cs" />
- <Compile Include="System.Web.Services.Description\MimeTextMatchCollection.cs" />
- <Compile Include="System.Web.Services.Description\MimeXmlBinding.cs" />
- <Compile Include="System.Web.Services.Description\NamedItem.cs" />
- <Compile Include="System.Web.Services.Description\Operation.cs" />
- <Compile Include="System.Web.Services.Description\OperationBinding.cs" />
- <Compile Include="System.Web.Services.Description\OperationBindingCollection.cs" />
- <Compile Include="System.Web.Services.Description\OperationCollection.cs" />
- <Compile Include="System.Web.Services.Description\OperationFault.cs" />
- <Compile Include="System.Web.Services.Description\OperationFaultCollection.cs" />
- <Compile Include="System.Web.Services.Description\OperationFlow.cs" />
- <Compile Include="System.Web.Services.Description\OperationInput.cs" />
- <Compile Include="System.Web.Services.Description\OperationMessage.cs" />
- <Compile Include="System.Web.Services.Description\OperationMessageCollection.cs" />
- <Compile Include="System.Web.Services.Description\OperationOutput.cs" />
- <Compile Include="System.Web.Services.Description\OutputBinding.cs" />
- <Compile Include="System.Web.Services.Description\Port.cs" />
- <Compile Include="System.Web.Services.Description\PortCollection.cs" />
- <Compile Include="System.Web.Services.Description\PortType.cs" />
- <Compile Include="System.Web.Services.Description\PortTypeCollection.cs" />
- <Compile Include="System.Web.Services.Description\ProtocolReflector.cs" />
- <Compile Include="System.Web.Services.Description\Service.cs" />
- <Compile Include="System.Web.Services.Description\ServiceCollection.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescription.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionBaseCollection.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionCollection.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionFormatExtension.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionFormatExtensionCollection.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionImportStyle.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionImportWarnings.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionReflector.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionSerializerBase.cs" />
- <Compile Include="System.Web.Services.Description\ServiceDescriptionSerializerBase2.cs" />
- <Compile Include="System.Web.Services.Description\Soap12AddressBinding.cs" />
- <Compile Include="System.Web.Services.Description\Soap12Binding.cs" />
- <Compile Include="System.Web.Services.Description\Soap12BodyBinding.cs" />
- <Compile Include="System.Web.Services.Description\Soap12FaultBinding.cs" />
- <Compile Include="System.Web.Services.Description\Soap12HeaderBinding.cs" />
- <Compile Include="System.Web.Services.Description\Soap12OperationBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapAddressBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapBindingStyle.cs" />
- <Compile Include="System.Web.Services.Description\SoapBindingUse.cs" />
- <Compile Include="System.Web.Services.Description\SoapBodyBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapExtensionReflector.cs" />
- <Compile Include="System.Web.Services.Description\SoapFaultBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapHeaderBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapHeaderFaultBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapOperationBinding.cs" />
- <Compile Include="System.Web.Services.Description\SoapProtocolReflector.cs" />
- <Compile Include="System.Web.Services.Description\Types.cs" />
- <Compile Include="System.Web.Services.Description\WebReference.cs" />
- <Compile Include="System.Web.Services.Description\WebReferenceCollection.cs" />
- <Compile Include="System.Web.Services.Description\WebReferenceOptions.cs" />
- <Compile Include="System.Web.Services.Description\WebReferenceOptionsSerializer.cs" />
- <Compile Include="System.Web.Services.Description\WebServicesInteroperability.cs" />
- <Compile Include="System.Web.Services.Discovery\ContractReference.cs" />
- <Compile Include="System.Web.Services.Discovery\ContractSearchPattern.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryClientDocumentCollection.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryClientProtocol.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services.Discovery\DiscoveryClientReferenceCollection.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryClientResult.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryClientResultCollection.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryDocument.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryDocumentLinksPattern.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryDocumentReference.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryDocumentSearchPattern.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryDocumentSerializer.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryExceptionDictionary.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryReference.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryReferenceCollection.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoveryRequestHandler.cs" />
- <Compile Include="System.Web.Services.Discovery\DiscoverySearchPattern.cs" />
- <Compile Include="System.Web.Services.Discovery\DynamicDiscoveryDocument.cs" />
- <Compile Include="System.Web.Services.Discovery\ExcludePathInfo.cs" />
- <Compile Include="System.Web.Services.Discovery\SchemaReference.cs" />
- <Compile Include="System.Web.Services.Discovery\SoapBinding.cs" />
- <Compile Include="System.Web.Services.Discovery\XmlSchemaSearchPattern.cs" />
- <Compile Include="System.Web.Services.Protocols\AnyReturnReader.cs" />
- <Compile Include="System.Web.Services.Protocols\Fault.cs" />
- <Compile Include="System.Web.Services.Protocols\Fault12.cs" />
- <Compile Include="System.Web.Services.Protocols\Fault12Serializer.cs" />
- <Compile Include="System.Web.Services.Protocols\HtmlFormParameterReader.cs" />
- <Compile Include="System.Web.Services.Protocols\HtmlFormParameterWriter.cs" />
- <Compile Include="System.Web.Services.Protocols\HttpGetClientProtocol.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services.Protocols\HttpGetTypeStubInfo.cs" />
- <Compile Include="System.Web.Services.Protocols\HttpMethodAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\HttpPostClientProtocol.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services.Protocols\HttpPostTypeStubInfo.cs" />
- <Compile Include="System.Web.Services.Protocols\HttpSimpleClientProtocol.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services.Protocols\HttpSimpleTypeStubInfo.cs" />
- <Compile Include="System.Web.Services.Protocols\HttpSimpleWebServiceHandler.cs" />
- <Compile Include="System.Web.Services.Protocols\HttpSoapWebServiceHandler.cs" />
- <Compile Include="System.Web.Services.Protocols\HttpWebClientProtocol.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services.Protocols\InvokeCompletedEventArgs.cs" />
- <Compile Include="System.Web.Services.Protocols\InvokeCompletedEventHandler.cs" />
- <Compile Include="System.Web.Services.Protocols\LogicalMethodInfo.cs" />
- <Compile Include="System.Web.Services.Protocols\LogicalMethodTypes.cs" />
- <Compile Include="System.Web.Services.Protocols\MatchAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\Methods.cs" />
- <Compile Include="System.Web.Services.Protocols\MimeFormatter.cs" />
- <Compile Include="System.Web.Services.Protocols\MimeParameterReader.cs" />
- <Compile Include="System.Web.Services.Protocols\MimeParameterWriter.cs" />
- <Compile Include="System.Web.Services.Protocols\MimeReturnReader.cs" />
- <Compile Include="System.Web.Services.Protocols\MimeReturnWriter.cs" />
- <Compile Include="System.Web.Services.Protocols\NopReturnReader.cs" />
- <Compile Include="System.Web.Services.Protocols\PatternMatcher.cs" />
- <Compile Include="System.Web.Services.Protocols\ServerProtocol.cs" />
- <Compile Include="System.Web.Services.Protocols\ServerProtocolFactory.cs" />
- <Compile Include="System.Web.Services.Protocols\ServerType.cs" />
- <Compile Include="System.Web.Services.Protocols\Soap12FaultCodes.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapClientMessage.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapClientMethod.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapDocumentationHandler.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapDocumentMethodAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapDocumentServiceAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapException.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapExtension.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapExtensionAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapFaultSubcode.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHeader.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHeaderAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHeaderCollection.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHeaderDirection.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHeaderException.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHeaderHandling.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHeaderMapping.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapHttpClientProtocol.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services.Protocols\SoapMessage.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapMessageStage.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapParameterStyle.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapProtocolVersion.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapRpcMethodAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapRpcServiceAttribute.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapServerMessage.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapServerMethod.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapServerProtocol.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapServerProtocolFactory.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapServerType.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapServiceRoutingStyle.cs" />
- <Compile Include="System.Web.Services.Protocols\SoapUnknownHeader.cs" />
- <Compile Include="System.Web.Services.Protocols\TextReturnReader.cs" />
- <Compile Include="System.Web.Services.Protocols\TypeStubManager.cs" />
- <Compile Include="System.Web.Services.Protocols\UrlEncodedParameterWriter.cs" />
- <Compile Include="System.Web.Services.Protocols\UrlParameterReader.cs" />
- <Compile Include="System.Web.Services.Protocols\UrlParameterWriter.cs" />
- <Compile Include="System.Web.Services.Protocols\ValueCollectionParameterReader.cs" />
- <Compile Include="System.Web.Services.Protocols\WebClientAsyncResult.cs" />
- <Compile Include="System.Web.Services.Protocols\WebClientProtocol.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services.Protocols\WebServiceHandler.cs" />
- <Compile Include="System.Web.Services.Protocols\WebServiceHandlerFactory.cs" />
- <Compile Include="System.Web.Services.Protocols\WebServiceHelper.cs" />
- <Compile Include="System.Web.Services.Protocols\XmlReturnReader.cs" />
- <Compile Include="System.Web.Services.Protocols\XmlReturnWriter.cs" />
- <Compile Include="System.Web.Services\WebMethodAttribute.cs" />
- <Compile Include="System.Web.Services\WebService.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.Services\WebServiceAttribute.cs" />
- <Compile Include="System.Web.Services\WebServiceBindingAttribute.cs" />
- <Compile Include="System.Web.Services\WebServicesDescriptionAttribute.cs" />
- <Compile Include="System.Web.Services\WsiProfiles.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </None>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="System.Web.Services.Description\wsdl-1.1.xsd">
- <LogicalName>wsdl-1.1.xsd</LogicalName>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- <EmbeddedResource Include="System.Web.Services.Description\web-reference.xsd">
- <LogicalName>web-reference.xsd</LogicalName>
- <SubType>Designer</SubType>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\System.Web\System.Web20.csproj">
- <Project>{0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}</Project>
- <Name>System.Web20</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system-xml="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-system-configuration="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Configuration.jar" REFS-JarPath-system-web="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Web.jar" />
- </VisualStudio>
- </ProjectExtensions>
- <PropertyGroup>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web.Services/System.Web.Services20.sln b/mcs/class/System.Web.Services/System.Web.Services20.sln
deleted file mode 100755
index 8cf0baa8d07..00000000000
--- a/mcs/class/System.Web.Services/System.Web.Services20.sln
+++ /dev/null
@@ -1,61 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Services20", "System.Web.Services20.csproj", "{B37A8704-33AB-48D9-B0C2-1D919755B69A}"
- ProjectSection(ProjectDependencies) = postProject
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851} = {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}
- EndProjectSection
-EndProject
-Project("{00000000-0000-0000-0000-000000000000}") = "DefaultWsdlHelpGenerator", "DefaultWsdlHelpGenerator\DefaultWsdlHelpGenerator.csproj", "{BC1CF9B3-F696-4988-A4D1-E190CB6D2851}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web20", "..\System.Web\System.Web20.csproj", "{0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20_prepare|Any CPU = Debug_Java20_prepare|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20_prepare|Any CPU = Release_Java20_prepare|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20_prepare|Any CPU.ActiveCfg = Debug_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20_prepare|Any CPU.Build.0 = Debug_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20_prepare|Any CPU.ActiveCfg = Release_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20_prepare|Any CPU.Build.0 = Release_Java20_prepare|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {B37A8704-33AB-48D9-B0C2-1D919755B69A}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Debug_Java20_prepare|Any CPU.ActiveCfg = Debug_Java20_prepare|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Release_Java20_prepare|Any CPU.ActiveCfg = Release_Java20_prepare|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {BC1CF9B3-F696-4988-A4D1-E190CB6D2851}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20_prepare|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20_prepare|Any CPU.Build.0 = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20_prepare|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20_prepare|Any CPU.Build.0 = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Web/Assembly/AssemblyInfo.cs b/mcs/class/System.Web/Assembly/AssemblyInfo.cs
index 7baf1314ac1..0b133b04193 100644
--- a/mcs/class/System.Web/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.Web/Assembly/AssemblyInfo.cs
@@ -55,11 +55,7 @@ using System.Web.UI;
#if !NET_4_0
[assembly: AssemblyTrademark("")]
#endif
-#if TARGET_JVM
-[assembly: CLSCompliant(false)]
-#else
[assembly: CLSCompliant(true)]
-#endif
[assembly: ComVisible(false)]
[assembly: AssemblyDefaultAlias("System.Web.dll")]
[assembly: AssemblyInformationalVersion("0.0.0.1")]
@@ -67,7 +63,7 @@ using System.Web.UI;
[assembly: AllowPartiallyTrustedCallers()]
[assembly: TagPrefix("System.Web.UI.WebControls", "asp")]
-#if !(TARGET_JVM || TARGET_DOTNET)
+#if !(TARGET_DOTNET)
[assembly: AssemblyDelaySign(true)]
[assembly: AssemblyKeyFile("../msfinal.pub")]
diff --git a/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.jvm.cs b/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.jvm.cs
deleted file mode 100644
index 2efc3a0f4e0..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/AppResourcesCompiler.jvm.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// System.Web.Compilation.AppResourceFilesCollection
-//
-// Authors:
-// Marek Habersack (grendello@gmail.com)
-//
-// (C) 2006 Marek Habersack
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-using System;
-using System.CodeDom;
-using System.CodeDom.Compiler;
-using System.Collections;
-using System.Collections.Generic;
-using System.Globalization;
-using System.IO;
-using System.Reflection;
-using System.Resources;
-using System.Web;
-using System.Web.Caching;
-using System.Web.Configuration;
-using System.Web.Util;
-
-namespace System.Web.Compilation
-{
- internal class AppResourcesCompiler
- {
- public AppResourcesCompiler (string path) { }
- public Assembly Compile () { return null; }
- internal static Assembly GetCachedLocalResourcesAssembly (string path)
- {
- string localResourcesPath = UrlUtils.Combine (path, "App_LocalResources");
- return System.Web.J2EE.PageMapper.GetObjectAssembly (HttpContext.Current, localResourcesPath);
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.Compilation/BuildManager.jvm.cs b/mcs/class/System.Web/System.Web.Compilation/BuildManager.jvm.cs
deleted file mode 100644
index 46045f7fb17..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/BuildManager.jvm.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// System.Web.Compilation.BuildManager
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-
-using System;
-using System.CodeDom;
-using System.CodeDom.Compiler;
-using System.Collections;
-using System.Collections.Generic;
-using System.IO;
-using System.Reflection;
-using System.Web;
-using System.Web.Configuration;
-using System.Web.Hosting;
-
-namespace System.Web.Compilation {
- public sealed class BuildManager {
- // Assemblies built from the App_Code directory
- public static IList CodeAssemblies {
- get { return null; }
- }
-
- internal static IList TopLevelAssemblies {
- get { return null; }
- }
- }
-}
-
-#endif
-
diff --git a/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.jvm.cs b/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.jvm.cs
deleted file mode 100644
index 097bc82030f..00000000000
--- a/mcs/class/System.Web/System.Web.Compilation/ThemeDirectoryCompiler.jvm.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// System.Web.UI.ThemeDirectoryCompiler
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-// (C) 2006 Novell, Inc. (http://www.novell.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-
-using System;
-using System.Collections;
-using System.IO;
-using System.Web;
-using System.Web.Compilation;
-using System.Web.Util;
-using System.Web.J2EE;
-
-namespace System.Web.UI
-{
- internal sealed class ThemeDirectoryCompiler
- {
- public static PageTheme GetCompiledInstance (string virtualPath, HttpContext context)
- {
- virtualPath = "~/App_Themes/" + virtualPath + "/";
- string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPath).TrimEnd('/');
- Type tmpType = PageMapper.GetObjectType (context, resolvedUrl);
- if (tmpType == null)
- throw new InvalidOperationException("ThemeDirectoryCompiler '" + virtualPath + "' not found");
-
- Object obj = Activator.CreateInstance(tmpType);
- return (PageTheme)obj;
- }
- }
-}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/AppSettings.jvm.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/AppSettings.jvm.cs
deleted file mode 100644
index 47fa9fd5d1f..00000000000
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/AppSettings.jvm.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-//
-// System.Web.Configuration.AppSettings.jvm.cs
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (C) 2008 Mainsoft corp. (http://www.mainsoft.com)
-//
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections.Specialized;
-using javax.servlet;
-
-namespace System.Web.Configuration
-{
- sealed class KeyValueMergedCollection : NameValueCollection
- {
- readonly NameValueCollection _wrapped;
- public KeyValueMergedCollection (HttpContext hc, NameValueCollection wrapped)
- : base (wrapped) {
- _wrapped = wrapped;
-
- ServletConfig config = (ServletConfig) AppDomain.CurrentDomain.GetData (vmw.common.IAppDomainConfig.SERVLET_CONFIG);
- if (config != null) {
-
- ServletContext context = config.getServletContext ();
-
- for (java.util.Enumeration e = context.getInitParameterNames (); e.hasMoreElements (); ) {
- string key = (string) e.nextElement ();
- Set (key, context.getInitParameter (key));
- }
-
- for (java.util.Enumeration e = config.getInitParameterNames (); e.hasMoreElements (); ) {
- string key = (string) e.nextElement ();
- Set (key, config.getInitParameter (key));
- }
- }
- }
-
- public override void Add (string name, string val) {
- Set (name, val);
- }
-
- public override void Remove (string name) {
- _wrapped.Remove (name);
- base.Remove (name);
- }
-
- public override void Clear () {
- _wrapped.Clear ();
- base.Clear ();
- }
-
- public override void Set (string name, string value) {
- _wrapped.Set (name, value);
- base.Set (name, value);
- }
- }
-}
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs
index bd0fc291f3b..ee74b4ea645 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/CompilationSection.cs
@@ -67,11 +67,9 @@ namespace System.Web.Configuration
ConfigurationPropertyOptions.None);
assemblyPostProcessorTypeProp = new ConfigurationProperty ("assemblyPostProcessorType", typeof (string), "");
batchProp = new ConfigurationProperty ("batch", typeof (bool), true);
-#if !TARGET_JVM
buildProvidersProp = new ConfigurationProperty ("buildProviders", typeof (BuildProviderCollection), null,
null, PropertyHelper.DefaultValidator,
ConfigurationPropertyOptions.None);
-#endif
batchTimeoutProp = new ConfigurationProperty ("batchTimeout", typeof (TimeSpan), new TimeSpan (0, 15, 0),
PropertyHelper.TimeSpanSecondsOrInfiniteConverter,
PropertyHelper.PositiveTimeSpanValidator,
@@ -109,9 +107,7 @@ namespace System.Web.Configuration
properties.Add (assembliesProp);
properties.Add (assemblyPostProcessorTypeProp);
properties.Add (batchProp);
-#if !TARGET_JVM
properties.Add (buildProvidersProp);
-#endif
properties.Add (batchTimeoutProp);
properties.Add (codeSubDirectoriesProp);
properties.Add (compilersProp);
@@ -171,12 +167,10 @@ namespace System.Web.Configuration
set { base [batchTimeoutProp] = value; }
}
-#if !TARGET_JVM
[ConfigurationProperty ("buildProviders")]
public BuildProviderCollection BuildProviders {
get { return (BuildProviderCollection) base [buildProvidersProp]; }
}
-#endif
[ConfigurationProperty ("codeSubDirectories")]
public CodeSubDirectoriesCollection CodeSubDirectories {
diff --git a/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs b/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs
index 959e2ce6916..5d1ff36f882 100644
--- a/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs
+++ b/mcs/class/System.Web/System.Web.Configuration_2.0/SystemWebSectionGroup.cs
@@ -65,12 +65,10 @@ namespace System.Web.Configuration
get { return (ClientTargetSection)Sections ["clientTarget"]; }
}
-#if !TARGET_JVM
[ConfigurationProperty ("compilation")]
public CompilationSection Compilation {
get { return (CompilationSection)Sections ["compilation"]; }
}
-#endif
[ConfigurationProperty ("customErrors")]
public CustomErrorsSection CustomErrors {
diff --git a/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs b/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs
index be1814d62ae..4efb0e0b921 100644
--- a/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs
+++ b/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs
@@ -314,16 +314,12 @@ namespace System.Web.Handlers
extra = QueryParamSeparator + "n=" + (notifyScriptLoaded ? "t" : "f");
#endif
-#if TARGET_JVM
- atime = QueryParamSeparator + "t=" + assemblyName.GetHashCode ();
-#else
if (includeTimeStamp) {
if (!String.IsNullOrEmpty (assemblyPath) && File.Exists (assemblyPath))
atime = QueryParamSeparator + "t=" + File.GetLastWriteTimeUtc (assemblyPath).Ticks;
else
atime = QueryParamSeparator + "t=" + DateTime.UtcNow.Ticks;
}
-#endif
string d = HttpUtility.UrlEncode (assemblyNameHash + "_" + resourceNameHash + (debug ? "_t" : "_f"));
string href = HandlerFileName + "?d=" + d + atime + extra;
HttpContext ctx = HttpContext.Current;
diff --git a/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs b/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
index 7fc71250f09..539056db3e3 100644
--- a/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
+++ b/mcs/class/System.Web/System.Web.Hosting/ApplicationHost.cs
@@ -126,9 +126,6 @@ namespace System.Web.Hosting {
//
// http://www.west-wind.com/presentations/aspnetruntime/aspnetruntime.asp
//
-#if TARGET_JVM
- [MonoNotSupported ("")]
-#endif
[SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
public static object CreateApplicationHost (Type hostType, string virtualDir, string physicalDir)
{
diff --git a/mcs/class/System.Web/System.Web.J2EE/J2EEConsts.cs b/mcs/class/System.Web/System.Web.J2EE/J2EEConsts.cs
deleted file mode 100644
index 0f38933e3fd..00000000000
--- a/mcs/class/System.Web/System.Web.J2EE/J2EEConsts.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace System.Web.J2EE
-{
- internal sealed class J2EEConsts
- {
- public const string SESSION_STATE = "GH_SESSION_STATE";
-
- public const string CLASS_LOADER = "GH_ContextClassLoader";
- public const string SERVLET_CONFIG = "GH_ServletConfig";
- public const string RESOURCE_LOADER = "GH_ResourceLoader";
-
- public const string APP_DOMAIN = "AppDomain";
-
- public const string Enable_Session_Persistency = "EnableSessionPersistency";
-
- //Used to save assemblies.xml file per application.
- public const string ASSEMBLIES_FILE = "AssembliesXml";
-
- //Used to save FileList.xml file per application.
- public const string FILE_LIST_FILE = "FileListXml";
-
- public const string MAP_PATH_CACHE = "MapPathCache";
-
- //Used to save servlet request of current Servlet.
- public const string SERVLET_REQUEST = "GH_ServletRequest";
- //Used to save servlet response of current Servlet.
- public const string SERVLET_RESPONSE = "GH_ServletResponse";
- //Used to save current Servlet.
- public const string CURRENT_SERVLET = "GH_Servlet";
-
- public const string DESERIALIZER_CONST = "GH_DeserializeWorkAround";
- //Used to control file system access in web app context
- public const string FILESYSTEM_ACCESS = "WebFileSystemAccess";
- public const string ACCESS_FULL = "Full";
- public const string ACCESS_VIRTUAL = "Virtual";
-
- public const string ACTION_URL_PREFIX = "ActionURL:";
- public const string RENDER_URL_PREFIX = "RenderURL:";
- }
-}
diff --git a/mcs/class/System.Web/System.Web.J2EE/J2EEUtils.cs b/mcs/class/System.Web/System.Web.J2EE/J2EEUtils.cs
deleted file mode 100644
index 64592c9667e..00000000000
--- a/mcs/class/System.Web/System.Web.J2EE/J2EEUtils.cs
+++ /dev/null
@@ -1,334 +0,0 @@
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Web.Util;
-using System.IO;
-using vmw.@internal.io;
-using vmw.common;
-using System.ComponentModel;
-using System.Threading;
-using javax.servlet;
-using System.Diagnostics;
-
-namespace System.Web.J2EE
-{
- internal static class J2EEUtils
- {
- #region InputStreamWrapper
-
- public sealed class InputStreamWrapper : Stream
- {
- readonly java.io.InputStream _ins;
-
- public InputStreamWrapper (java.io.InputStream ins) {
- _ins = ins;
- }
-
- public override bool CanRead {
- get { return true; }
- }
-
- public override bool CanSeek {
- get { return _ins.markSupported (); }
- }
-
- public override bool CanWrite {
- get { return false; }
- }
-
- public override void Flush () {
- }
-
- public override long Length {
- get { return _ins.available (); }
- }
-
- public override long Position {
- get {
- throw new NotSupportedException ();
- }
- set {
- throw new NotSupportedException ();
- }
- }
-
- public override int Read (byte [] buffer, int offset, int count) {
- int r = _ins.read (TypeUtils.ToSByteArray (buffer), offset, count);
- return r < 0 ? 0 : r;
- }
-
- public override long Seek (long offset, SeekOrigin origin) {
- throw new NotImplementedException ();
- }
-
- public override void SetLength (long value) {
- throw new NotSupportedException ();
- }
-
- public override void Write (byte [] buffer, int offset, int count) {
- throw new NotSupportedException ();
- }
-
- public override void Close () {
- _ins.close ();
- }
- }
-
- #endregion
-
- public static int RunProc(string[] cmd)
- {
- java.lang.Runtime rt = java.lang.Runtime.getRuntime();
- java.lang.Process proc = rt.exec(cmd);
-
- StreamGobbler errorGobbler = new
- StreamGobbler(proc.getErrorStream(), "ERROR");
-
- StreamGobbler outputGobbler = new
- StreamGobbler(proc.getInputStream(), "OUTPUT");
-
- errorGobbler.start();
- outputGobbler.start();
-
- int exitVal = proc.waitFor();
- return exitVal;
- }
- }
-
- public class StreamGobbler : java.lang.Thread
- {
- java.io.InputStream _is;
- String _type;
-
- public StreamGobbler(java.io.InputStream ins, String type)
- {
- this._is = ins;
- this._type = type;
- }
-
- public override void run()
- {
- try
- {
- java.io.InputStreamReader isr = new java.io.InputStreamReader(_is);
- java.io.BufferedReader br = new java.io.BufferedReader(isr);
- String line=null;
- while ( (line = br.readLine()) != null)
- {
- Debug.WriteLine(_type + ">" + line);
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine (ex);
- }
- }
- }
-}
-
-#region FileSystemWatcher Stub
-
-namespace System.IO
-{
- [DefaultEvent ("Changed")]
-#if NET_2_0
- [IODescription ("")]
-#endif
- public class FileSystemWatcher : Component, ISupportInitialize
- {
- public FileSystemWatcher ()
- : this (String.Empty) {
- }
-
- public FileSystemWatcher (string path)
- : this (path, "*.*") {
- }
-
- public FileSystemWatcher (string path, string filter) {
- }
-
- #region Properties
-
- [DefaultValue (false)]
- [IODescription ("Flag to indicate if this instance is active")]
- public bool EnableRaisingEvents {
- get { return false; }
- set { }
- }
-
- [DefaultValue ("*.*")]
- [IODescription ("File name filter pattern")]
- [RecommendedAsConfigurable (true)]
- [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
- public string Filter {
- get { return "*.*"; }
- set { }
- }
-
- [DefaultValue (false)]
- [IODescription ("Flag to indicate we want to watch subdirectories")]
- public bool IncludeSubdirectories {
- get { return false; }
- set { }
- }
-
- [Browsable (false)]
- [DefaultValue (8192)]
- public int InternalBufferSize {
- get { return 8192; }
- set { }
- }
-
- [DefaultValue (NotifyFilters.FileName | NotifyFilters.DirectoryName | NotifyFilters.LastWrite)]
- [IODescription ("Flag to indicate which change event we want to monitor")]
- public NotifyFilters NotifyFilter {
- get { return NotifyFilters.FileName | NotifyFilters.DirectoryName | NotifyFilters.LastWrite; }
- set { }
- }
-
- [DefaultValue ("")]
- [IODescription ("The directory to monitor")]
- [RecommendedAsConfigurable (true)]
- [TypeConverter ("System.Diagnostics.Design.StringValueConverter, " + Consts.AssemblySystem_Design)]
- [Editor ("System.Diagnostics.Design.FSWPathEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
- public string Path {
- get { return String.Empty; }
- set { }
- }
-
- [DefaultValue (null)]
- [IODescription ("The object used to marshal the event handler calls resulting from a directory change")]
-#if NET_2_0
- [Browsable (false)]
-#endif
- public ISynchronizeInvoke SynchronizingObject {
- get { return null; }
- set { }
- }
-
- #endregion // Properties
-
- #region Methods
-
- protected override void Dispose (bool disposing) {
- base.Dispose (disposing);
- }
-
- enum EventType
- {
- FileSystemEvent,
- ErrorEvent,
- RenameEvent
- }
-
- void RaiseEvent (Delegate ev, EventArgs arg, EventType evtype) {
- if (ev == null)
- return;
-
- if (SynchronizingObject == null) {
- Delegate [] delegates = ev.GetInvocationList ();
- if (evtype == EventType.RenameEvent) {
- foreach (RenamedEventHandler d in delegates) {
- d.BeginInvoke (this, (RenamedEventArgs) arg, null, null);
- }
- }
- else if (evtype == EventType.ErrorEvent) {
- foreach (ErrorEventHandler d in delegates) {
- d.BeginInvoke (this, (ErrorEventArgs) arg, null, null);
- }
- }
- else {
- foreach (FileSystemEventHandler d in delegates) {
- d.BeginInvoke (this, (FileSystemEventArgs) arg, null, null);
- }
- }
- return;
- }
-
- SynchronizingObject.BeginInvoke (ev, new object [] { this, arg });
- }
-
- protected void OnChanged (FileSystemEventArgs e) {
- RaiseEvent (Changed, e, EventType.FileSystemEvent);
- }
-
- protected void OnCreated (FileSystemEventArgs e) {
- RaiseEvent (Created, e, EventType.FileSystemEvent);
- }
-
- protected void OnDeleted (FileSystemEventArgs e) {
- RaiseEvent (Deleted, e, EventType.FileSystemEvent);
- }
-
- protected void OnError (ErrorEventArgs e) {
- RaiseEvent (Error, e, EventType.ErrorEvent);
- }
-
- protected void OnRenamed (RenamedEventArgs e) {
- RaiseEvent (Renamed, e, EventType.RenameEvent);
- }
-
- public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType) {
- return WaitForChanged (changeType, Timeout.Infinite);
- }
-
- public WaitForChangedResult WaitForChanged (WatcherChangeTypes changeType, int timeout) {
- return new WaitForChangedResult ();
- }
-
- #endregion
-
- #region Events and Delegates
-
- [IODescription ("Occurs when a file/directory change matches the filter")]
- public event FileSystemEventHandler Changed;
-
- [IODescription ("Occurs when a file/directory creation matches the filter")]
- public event FileSystemEventHandler Created;
-
- [IODescription ("Occurs when a file/directory deletion matches the filter")]
- public event FileSystemEventHandler Deleted;
-
- [Browsable (false)]
- public event ErrorEventHandler Error;
-
- [IODescription ("Occurs when a file/directory rename matches the filter")]
- public event RenamedEventHandler Renamed;
-
- #endregion // Events and Delegates
-
- #region ISupportInitialize Members
-
- public void BeginInit () {
- }
-
- public void EndInit () {
- }
-
- #endregion
- }
-}
-#endregion
diff --git a/mcs/class/System.Web/System.Web.J2EE/ObjectInputStream.cs b/mcs/class/System.Web/System.Web.J2EE/ObjectInputStream.cs
deleted file mode 100644
index 35b063f46a8..00000000000
--- a/mcs/class/System.Web/System.Web.J2EE/ObjectInputStream.cs
+++ /dev/null
@@ -1,244 +0,0 @@
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-// Authors:
-// Vladimir Krasnov <vladimirk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using java.io;
-
-namespace Mainsoft.Web.Hosting
-{
- public sealed class ObjectInputStream : System.IO.Stream, ObjectInput
- {
- readonly ObjectInput _javaObjectInput;
-
- public ObjectInputStream (ObjectInput stream)
- {
- _javaObjectInput = stream;
- }
-
- public override bool CanRead
- {
- get
- {
- return true;
- }
- }
-
- public override bool CanWrite
- {
- get
- {
- return false;
- }
- }
-
- public override bool CanSeek
- {
- get
- {
- return true;
- }
- }
-
- public override long Length
- {
- get
- {
- throw new NotSupportedException ();
- }
- }
-
- public override long Position
- {
- get
- {
- throw new NotSupportedException ();
- }
- set
- {
- throw new NotSupportedException ();
- }
- }
-
- public override void Flush ()
- {
- throw new NotSupportedException ();
- }
-
- public override long Seek (long offset, System.IO.SeekOrigin origin)
- {
- if (origin == System.IO.SeekOrigin.Current)
- return _javaObjectInput.skip (offset);
-
- throw new NotSupportedException ();
- }
-
- public override void SetLength (long value)
- {
- throw new NotSupportedException ();
- }
-
- public override int Read (byte [] buffer, int offset, int count)
- {
- int rv = _javaObjectInput.read (vmw.common.TypeUtils.ToSByteArray (buffer), offset, count);
- return rv > 0 ? rv : 0;
- }
-
- public override void Write (byte [] buffer, int offset, int count)
- {
- throw new NotSupportedException ();
- }
-
- public override int ReadByte ()
- {
- return _javaObjectInput.read ();
- }
-
- public override void Close ()
- {
- _javaObjectInput.close ();
- }
-
- #region ObjectInput Members
-
- public int available ()
- {
- return _javaObjectInput.available ();
- }
-
- public void close ()
- {
- _javaObjectInput.close ();
- }
-
- public int read (sbyte [] __p1, int __p2, int __p3)
- {
- return _javaObjectInput.read (__p1, __p2, __p3);
- }
-
- public int read (sbyte [] __p1)
- {
- return _javaObjectInput.read (__p1);
- }
-
- public int read ()
- {
- return _javaObjectInput.read ();
- }
-
- public object readObject ()
- {
- return _javaObjectInput.readObject ();
- }
-
- public long skip (long __p1)
- {
- return _javaObjectInput.skip (__p1);
- }
-
- #endregion
-
- #region DataInput Members
-
- public bool readBoolean ()
- {
- return _javaObjectInput.readBoolean ();
- }
-
- public sbyte readByte ()
- {
- return _javaObjectInput.readByte ();
- }
-
- public char readChar ()
- {
- return _javaObjectInput.readChar ();
- }
-
- public double readDouble ()
- {
- return _javaObjectInput.readDouble ();
- }
-
- public float readFloat ()
- {
- return _javaObjectInput.readFloat ();
- }
-
- public void readFully (sbyte [] __p1, int __p2, int __p3)
- {
- _javaObjectInput.readFully (__p1, __p2, __p3);
- }
-
- public void readFully (sbyte [] __p1)
- {
- _javaObjectInput.readFully (__p1);
- }
-
- public int readInt ()
- {
- return _javaObjectInput.readInt ();
- }
-
- public string readLine ()
- {
- return _javaObjectInput.readLine ();
- }
-
- public long readLong ()
- {
- return _javaObjectInput.readLong ();
- }
-
- public short readShort ()
- {
- return _javaObjectInput.readShort ();
- }
-
- public string readUTF ()
- {
- return _javaObjectInput.readUTF ();
- }
-
- public int readUnsignedByte ()
- {
- return _javaObjectInput.readUnsignedByte ();
- }
-
- public int readUnsignedShort ()
- {
- return _javaObjectInput.readUnsignedShort ();
- }
-
- public int skipBytes (int __p1)
- {
- return _javaObjectInput.skipBytes (__p1);
- }
-
- #endregion
- }
-
-}
diff --git a/mcs/class/System.Web/System.Web.J2EE/ObjectOutputStream.cs b/mcs/class/System.Web/System.Web.J2EE/ObjectOutputStream.cs
deleted file mode 100644
index 18f780b70dd..00000000000
--- a/mcs/class/System.Web/System.Web.J2EE/ObjectOutputStream.cs
+++ /dev/null
@@ -1,220 +0,0 @@
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-// Authors:
-// Vladimir Krasnov <vladimirk@mainsoft.com>
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using java.io;
-
-namespace Mainsoft.Web.Hosting
-{
- public sealed class ObjectOutputStream : System.IO.Stream, ObjectOutput
- {
- readonly ObjectOutput _javaObjectOutput;
-
- public ObjectOutputStream (ObjectOutput stream)
- {
- _javaObjectOutput = stream;
- }
-
- public override bool CanRead
- {
- get
- {
- return false;
- }
- }
-
- public override bool CanSeek
- {
- get
- {
- return false;
- }
- }
-
- public override bool CanWrite
- {
- get
- {
- return true;
- }
- }
-
- public override void Close ()
- {
- _javaObjectOutput.close ();
- }
-
- public override void Flush ()
- {
- _javaObjectOutput.flush ();
- }
-
- public override long Length
- {
- get
- {
- throw new NotSupportedException ();
- }
- }
-
- public override long Position
- {
- get
- {
- throw new NotSupportedException ();
- }
- set
- {
- throw new NotSupportedException ();
- }
- }
-
- public override long Seek (long offset, System.IO.SeekOrigin origin)
- {
- throw new NotSupportedException ();
- }
-
- public override void SetLength (long value)
- {
- throw new NotSupportedException ();
- }
-
- public override int Read (byte [] buffer, int offset, int count)
- {
- throw new NotSupportedException ();
- }
-
- public override void Write (byte [] buffer, int offset, int count)
- {
- _javaObjectOutput.write (vmw.common.TypeUtils.ToSByteArray (buffer), offset, count);
- }
-
- public override void WriteByte (byte value)
- {
- _javaObjectOutput.write (value);
- }
-
- public ObjectOutput NativeStream
- {
- get { return _javaObjectOutput; }
- }
-
- #region ObjectOutput Members
-
- public void close ()
- {
- _javaObjectOutput.close ();
- }
-
- public void flush ()
- {
- _javaObjectOutput.flush ();
- }
-
- public void write (sbyte [] __p1, int __p2, int __p3)
- {
- _javaObjectOutput.write (__p1, __p2, __p3);
- }
-
- public void write (sbyte [] __p1)
- {
- _javaObjectOutput.write (__p1);
- }
-
- public void write (int __p1)
- {
- _javaObjectOutput.write (__p1);
- }
-
- public void writeObject (object __p1)
- {
- _javaObjectOutput.writeObject (__p1);
- }
-
- #endregion
-
- #region DataOutput Members
-
-
- public void writeBoolean (bool __p1)
- {
- _javaObjectOutput.writeBoolean (__p1);
- }
-
- public void writeByte (int __p1)
- {
- _javaObjectOutput.writeByte (__p1);
- }
-
- public void writeBytes (string __p1)
- {
- _javaObjectOutput.writeBytes (__p1);
- }
-
- public void writeChar (int __p1)
- {
- _javaObjectOutput.writeChar (__p1);
- }
-
- public void writeChars (string __p1)
- {
- _javaObjectOutput.writeChars (__p1);
- }
-
- public void writeDouble (double __p1)
- {
- _javaObjectOutput.writeDouble (__p1);
- }
-
- public void writeFloat (float __p1)
- {
- _javaObjectOutput.writeFloat (__p1);
- }
-
- public void writeInt (int __p1)
- {
- _javaObjectOutput.writeInt (__p1);
- }
-
- public void writeLong (long __p1)
- {
- _javaObjectOutput.writeLong (__p1);
- }
-
- public void writeShort (int __p1)
- {
- _javaObjectOutput.writeShort (__p1);
- }
-
- public void writeUTF (string __p1)
- {
- _javaObjectOutput.writeUTF (__p1);
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs b/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
deleted file mode 100644
index a405e77ad72..00000000000
--- a/mcs/class/System.Web/System.Web.J2EE/PageMapper.cs
+++ /dev/null
@@ -1,576 +0,0 @@
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Xml;
-using System.IO;
-using System.Collections;
-using System.Web.Compilation;
-using System.Collections.Specialized;
-using System.Threading;
-using vmw.common;
-using System.Reflection;
-using System.Diagnostics;
-
-namespace System.Web.J2EE
-{
- /// <summary>
- /// Class that allows reading assemblies.xml file for getting information about different types.
- /// </summary>
- public class PageMapper
- {
- //private static readonly string _fileListName = "/filelist.xml";
- static readonly object LOCK_GETASSEMBLIESCACHEDDOCUMENT = new object();
- //private static readonly object LOCK_GETFROMMAPPATHCACHE = new object();
-
-
- static Assembly CurrentDomain_AssemblyResolve (object sender, ResolveEventArgs args)
- {
- Assembly resolvedAssembly = null;
- try
- {
- resolvedAssembly = GetCachedAssembly (HttpContext.Current, String.Concat (HttpContext.Current.Request.ApplicationPath, "/", args.Name));
- }
- catch (Exception ex)
- {
- Debug.WriteLine (ex.ToString ());
- resolvedAssembly = null;
- }
-
- return resolvedAssembly;
- }
-
-#if UNUSED
-
- public static string GetFromMapPathCache(string key)
- {
- Hashtable answer = null;
- lock(LOCK_GETFROMMAPPATHCACHE)
- {
- answer = (Hashtable) AppDomain.CurrentDomain.GetData(J2EEConsts.MAP_PATH_CACHE);
- if (answer == null)
- {
- answer = new Hashtable();
- CachedDocumentTypeStorage storage = (CachedDocumentTypeStorage)GetAssembliesCachedDocument();
- IDictionaryEnumerator e = storage.GetEnumerator();
- e.Reset();
- while (e.MoveNext())
- {
- string currentFile = (string)((DictionaryEntry)e.Current).Key;
- answer[currentFile]= IAppDomainConfig.WAR_ROOT_SYMBOL + currentFile;
- }
- AppDomain.CurrentDomain.SetData(J2EEConsts.MAP_PATH_CACHE,answer);
- }
- }
- return (string)answer[key];
- }
-
- // UNUSED METHOD
- //The method was used by runtime to force file names casesensitivity
- // problem. The filelist.xml file should contain correct file names,
- // but currently it is unused
- public static void LoadFileList()
- {
- Hashtable hashTable = (Hashtable) AppDomain.CurrentDomain.GetData(J2EEConsts.FILE_LIST_FILE);
- if (hashTable == null)
- {
- XmlDocument doc;
- try
- {
- Stream fs = (Stream)IOUtils.getStream(_fileListName);
- if (fs == null)
- {
- AppDomain.CurrentDomain.SetData(J2EEConsts.FILE_LIST_FILE, new Hashtable());
- return;
- }
-
- doc = new XmlDocument();
- doc.Load(fs);
- }
- catch (Exception)
- {
-// Console.WriteLine("filelist.xml was not found!!!");
- AppDomain.CurrentDomain.SetData(J2EEConsts.FILE_LIST_FILE, new Hashtable());
- return;
- }
-// Console.WriteLine("filelist.xml was found!!!");
- if (doc != null && doc.DocumentElement.HasChildNodes)
- {
- hashTable = CollectionsUtil.CreateCaseInsensitiveHashtable();
- XmlNodeList nodeList = doc.DocumentElement.ChildNodes;
- for (int i = 0;i < nodeList.Count ; i++)
- {
- string fileName = nodeList.Item(i).InnerText;
- hashTable.Add(fileName,fileName);
- }
- AppDomain.CurrentDomain.SetData(J2EEConsts.FILE_LIST_FILE, hashTable);
- }
- }
-
- }
-#endif
- static ICachedXmlDoc GetAssembliesCachedDocument(HttpContext context)
- {
- ICachedXmlDoc doc = (ICachedXmlDoc) AppDomain.CurrentDomain.GetData (J2EEConsts.ASSEMBLIES_FILE);
-
- if (doc == null) {
- lock (LOCK_GETASSEMBLIESCACHEDDOCUMENT) {
- doc = (ICachedXmlDoc) AppDomain.CurrentDomain.GetData (J2EEConsts.ASSEMBLIES_FILE);
- if (doc == null) {
- doc = CreateDocument ();
- if (doc != null) {
- AppDomain.CurrentDomain.SetData (J2EEConsts.ASSEMBLIES_FILE, doc);
-
- AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler (CurrentDomain_AssemblyResolve);
- try {
- //Try to load the global resources
- HttpContext.AppGlobalResourcesAssembly = GetCachedAssembly (context, context.Request.ApplicationPath + "/app_globalresources");
- }
- catch (Exception ex) {
- Debug.WriteLine (ex.ToString ());
- }
- }
- }
- }
- }
-
- return doc;
- }
-
- static String NormalizeName(string url)
- {
-#if NET_2_0
- url = System.Web.Util.UrlUtils.RemoveDoubleSlashes(url);
-#endif
- if (url.StartsWith(IAppDomainConfig.WAR_ROOT_SYMBOL, StringComparison.Ordinal))
- url = url.Substring(IAppDomainConfig.WAR_ROOT_SYMBOL.Length);
- return url;
- }
- static ICachedXmlDoc CreateDocument()
- {
- return new CachedDocumentTypeStorage();
- }
-
- public static Type GetObjectType (HttpContext context, string url)
- {
- return GetCachedType(context, NormalizeName(url), true);
- }
-
- public static Type GetObjectType (HttpContext context, string url, bool throwException) {
- return GetCachedType (context, NormalizeName (url), throwException);
- }
-
- public static Assembly GetObjectAssembly (HttpContext context, string url)
- {
- return GetCachedAssembly (context, NormalizeName (url));
- }
- public static string GetAssemblyResource (HttpContext context, string url)
- {
- return GetCachedResource (context, NormalizeName (url));
- }
- static string GetCachedResource (HttpContext context, string url)
- {
- ICachedXmlDoc doc = PageMapper.GetAssembliesCachedDocument(context);
- return doc.GetAssemblyResourceName (context, url);
- }
- static Assembly GetCachedAssembly (HttpContext context, string url)
- {
- ICachedXmlDoc doc = PageMapper.GetAssembliesCachedDocument(context);
- return doc.GetAssembly (context, url);
- }
- static Type GetCachedType (HttpContext context, string url) {
- return GetCachedType (context, url, true);
- }
- static Type GetCachedType (HttpContext context, string url, bool throwException)
- {
- ICachedXmlDoc doc = PageMapper.GetAssembliesCachedDocument(context);
- Type t = doc.GetType(context, url);
- if (t == null && throwException)
- throw new HttpException(404,"The requested resource (" + url + ") is not available.");
-
- return t;
- }
-
- #region ICachedXmlDoc interface
- interface ICachedXmlDoc
- {
- Type GetType (HttpContext context, string key);
- Assembly GetAssembly (HttpContext context, string key);
- string GetAssemblyResourceName (HttpContext context, string key);
- }
- #endregion
-
- #region CachedDocumentTypeStorage class
- class CachedDocumentTypeStorage : ICachedXmlDoc
- {
- static readonly object _fuse = new object();
- public static readonly ICachedXmlDoc DEFAULT_DOC =
- new CachedDocumentTypeStorage(0);
-
- static readonly int DEFAULT_PAGES_NUMBER = 25;
-
- Hashtable _table;
-
- CachedDocumentTypeStorage(int initTableSize)
- {
- _table = Hashtable.Synchronized(new Hashtable(initTableSize));
- }
-
- public CachedDocumentTypeStorage() :
- this(DEFAULT_PAGES_NUMBER)
- {}
-
- string ICachedXmlDoc.GetAssemblyResourceName (HttpContext context, string o)
- {
- MetaProvider p = GetMetaByURL (context, o);
- if (p == null)
- return null;
- return p.Resource;
- }
- Type ICachedXmlDoc.GetType (HttpContext context, string o)
- {
- MetaProvider p = GetMetaByURL (context, o);
- if (p == null)
- return null;
- return p.Type;
- }
- Assembly ICachedXmlDoc.GetAssembly (HttpContext context, string o)
- {
- MetaProvider p = GetMetaByURL (context, o);
- if (p == null)
- return null;
- return p.Assembly;
- }
-
- internal IDictionaryEnumerator GetEnumerator()
- {
- return _table.GetEnumerator();
- }
-
- //rewamped for perfomance reasons
- //It looks like issue is not important in development mode,
- //but only will became important in production mode when dynamyc compilation will be enabled
- //Anyway, locking whole table and compiling under lock looks odd
- //spivak.December 07 2006
- //
- //prevent DOS attack. dont cache MetaProvider for not valid resource
- //igorz. May 16 2007
- public MetaProvider GetMetaByURL(HttpContext context, string url)
- {
- string lwUrl = url.ToLowerInvariant ();
- MetaProvider retVal = (MetaProvider) _table [lwUrl];
- if (retVal == null) {
- retVal = PageCompiler.GetCompiler (context, url);
- if (retVal.Type == null && retVal.Assembly == null)
- return null;
- _table [lwUrl] = retVal;
- }
-
- return retVal;
- }
- }
-
-
- #endregion
- }
-
- public interface MetaProvider
- {
- Type Type { get;}
- Assembly Assembly {get;}
- string Resource { get;}
- }
- public class PageCompiler : MetaProvider
- {
- static readonly string PAGE_XPATH = "preserve";
- static readonly string ASSEM_ATTRIB_NAME = "assem";
- static readonly string TYPE_ATTRIB_NAME = "type";
- static string _parser = null;
-
- Type _type = null;
- string _typeName = null;
- Assembly _assembly = null;
- string _origAssemblyName = null;
- string _xmlDescriptor = null;
- string _url = null;
- string _session = null;
- readonly HttpContext _context;
-
- PageCompiler(HttpContext context, string url)
- {
- _url = url;
- _context = context;
- _xmlDescriptor = GetDescFromUrl();
- _session = DateTime.Now.Ticks.ToString();
- LoadTypeAndAssem();
- }
-
- public static PageCompiler GetCompiler(HttpContext context, string url)
- {
- return new PageCompiler(context, url);
- }
-
- Type MetaProvider.Type
- {
- get{
- return _type;
- }
- }
- Assembly MetaProvider.Assembly
- {
- get{
- return _assembly;
- }
- }
- string MetaProvider.Resource
- {
- get
- {
- return _origAssemblyName != null ? _origAssemblyName + ".ghres" : "dll.ghres";
- }
- }
- void LoadTypeAndAssem()
- {
- if (_assembly == null)
- {
- string typeName = GetCachedTypeName();
- Debug.WriteLine ("Loading type:" + typeName);
- if (typeName != null)
- {
- if ((_type = Type.GetType (typeName)) != null)
- _assembly = _type.Assembly;
- else {
- if (_origAssemblyName == null)
- throw new TypeLoadException ("Cannot load type '" + typeName + "'");
- _assembly = Assembly.Load (_origAssemblyName);
- }
- }
-
- Debug.WriteLine ("Loaded type:" + _type);
- Debug.WriteLine ("Loaded assembly:" + _assembly);
- }
- }
- bool InternalCompile()
- {
- string fileName = VirtualPathUtility.GetFileName (_url);
-
- string fullFileName = (fileName.ToLower () == "global.asax") ? _url : _context.Request.MapPath (_url);
- Debug.WriteLine ("fullFileName=" + fullFileName);
- //type not found - run aspxparser
- if (false/*File.Exists(fullFileName) || Directory.Exists(fullFileName)*/) //dynamic compilation currently is not supported
- {
- string[] command = GetParserCmd(fileName.ToLower() == "global.asax");
- if (J2EEUtils.RunProc(command) != 0)
- throw GetCompilerError();
-
- return true;
- }
- else
- {
- return false;
- //string message = "The requested resource (" + _url + ") is not available.";
- //throw new HttpException(404, message);
- }
- }
- string GetDescriptorPath()
- {
- return String.Join("/", new string[] { "assemblies", _xmlDescriptor });
- }
- string GetTypeNameFromAppFolder()
- {
- try
- {
- using (StreamReader sr = new StreamReader(_context.Request.MapPath("~/" + GetDescriptorPath())))
- {
- return GetTypeFromDescStream(sr.BaseStream);
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- throw ex;
- }
- }
- internal string GetTypeFromResources()
- {
- string typeName = null;
-
- //if the desciptor exists in the war - get the type
- string descPath = GetDescriptorPath();
-
- try
- {
- Debug.WriteLine(descPath);
- using (Stream fs = (Stream)IOUtils.getStreamRecursive("/" + descPath))
- {
- if (fs != null)
- {
- return GetTypeFromDescStream(fs);
- }
- }
- }
- catch (Exception ex)
- {
- Debug.WriteLine(ex);
- }
- return null;
- }
- internal string GetCachedTypeName()
- {
- string typeName = GetTypeFromResources();
- if (typeName == null)
- {
- //spawn dynamic compilation and lookup typename from created folder
- if (InternalCompile())
- typeName = GetTypeNameFromAppFolder();
- }
- return typeName;
- }
- string GetTypeName()
- {
- return String.Format("{0}, {1}", _typeName, _origAssemblyName);
- }
- bool LoadMetaFromXmlStream(Stream fs)
- {
- if (fs != null)
- {
- try
- {
- XmlDocument descXml = new XmlDocument();
- descXml.Load(fs);
- _origAssemblyName = descXml.SelectSingleNode(PAGE_XPATH).Attributes[ASSEM_ATTRIB_NAME].Value;
- _typeName = descXml.SelectSingleNode(PAGE_XPATH).Attributes[TYPE_ATTRIB_NAME].Value;
- return true;
- }
- catch
- {
- Debug.WriteLine("Failed to load typename from stream");
- }
- }
- return false;
- }
-
- string GetTypeFromDescStream(Stream fs)
- {
- if (LoadMetaFromXmlStream(fs))
- return GetTypeName();
- return null;
- }
-
- string[] GetParserCmd(bool globalAsax)
- {
- string[] cmd = null;
- if (globalAsax)
- {
- cmd = new string[4];
- cmd[3] = "/buildglobalasax";
- }
- else
- {
- cmd = new string[5];
- cmd[3] = "/aspxFiles:" + _url;
- cmd[4] = "/compilepages";
- }
- cmd[0] = GetParser();
- cmd[1] = "/session:" + _session;
- cmd[2] = "/appDir:" + (string)AppDomain.CurrentDomain.GetData(IAppDomainConfig.APP_PHYS_DIR);
- return cmd;
- }
-
- string GetParser()
- {
- if (_parser == null)
- {
- StreamReader sr =
- File.OpenText (_context.Request.MapPath ("~/AspxParser.params"));
- _parser = sr.ReadLine();
- sr.Close();
- }
-
- return _parser;
- }
-
- string GetDescFromUrl()
- {
- string fileName = VirtualPathUtility.GetFileName (_url);
-
- if (fileName.ToLower() == "global.asax")
- return "global.asax.xml";
-
- string id = GetIdFromUrl(_url);
- string[] descName = new string[3] {fileName, id, ".xml"} ;
- return string.Concat(descName).ToLowerInvariant();
- }
-
- string GetIdFromUrl(string path)
- {
- string fileName = VirtualPathUtility.GetFileName(path);
- string id = string.Empty;
-
- if (VirtualPathUtility.IsAbsolute (path))
- path = path.Substring (_context.Request.ApplicationPath.Length + 1);
-
- if (path.Length > fileName.Length)
- id = "." + path.Substring(0,path.Length - fileName.Length).Replace('/','_');
- return id;
- }
-
- Exception GetCompilerError()
- {
- string _errFile = _context.Request.MapPath ("~/" + _session + ".vmwerr");
-
- if (!File.Exists(_errFile))
- throw new FileNotFoundException("Internal Error",_errFile);
-
- StreamReader sr = new StreamReader(_errFile);
- string message = string.Empty, line = null, file = null, lineInFile = "0";
-
- while ((line = sr.ReadLine()) != null)
- {
- if (line.StartsWith("Message: "))
- message = line.Substring("Message: ".Length);
- else if (line.StartsWith("File: "))
- file = line.Substring("File: ".Length);
- else if (line.StartsWith("Line: "))
- lineInFile = line.Substring("Line: ".Length);
- }
-
- sr.Close();
-
- if (file != null)
- {
- Location loc = new Location(null);
- loc.Filename = file;
- loc.BeginLine = int.Parse(lineInFile);
- return new ParseException(loc,message);
- }
-
- if (message.IndexOf(typeof(FileNotFoundException).Name) != -1 &&
- message.IndexOf(_url.Trim('\\','/').Replace('/','\\')) != -1)
- message = "The requested resource (" + _url + ") is not available.";
- return new HttpException(404,(message != null ? message : string.Empty));
- }
- }
-}
diff --git a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
index adbcf92aa5a..ad72d9f44ee 100644
--- a/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
+++ b/mcs/class/System.Web/System.Web.Mail/SmtpClient.cs
@@ -68,11 +68,6 @@ namespace System.Web.Mail {
void ChangeToSSLSocket ()
{
-#if TARGET_JVM
- java.lang.Class c = vmw.common.TypeUtils.ToClass (smtp.Stream);
- java.lang.reflect.Method m = c.getMethod ("ChangeToSSLSocket", null);
- m.invoke (smtp.Stream, new object[]{});
-#else
// Load Mono.Security.dll
Assembly a;
try {
@@ -94,7 +89,6 @@ namespace System.Web.Mail {
if (objSslClientStream != null)
smtp = new SmtpStream ((Stream)objSslClientStream);
-#endif
}
void ReadFields (MailMessageWrapper msg)
diff --git a/mcs/class/System.Web/System.Web.Profile/ProfileParser.jvm.cs b/mcs/class/System.Web/System.Web.Profile/ProfileParser.jvm.cs
deleted file mode 100644
index a3883df76d2..00000000000
--- a/mcs/class/System.Web/System.Web.Profile/ProfileParser.jvm.cs
+++ /dev/null
@@ -1,101 +0,0 @@
-//
-// System.Web.UI.MasterPageParser
-//
-// Authors:
-// Vladimir Krasnov (vladimirk@mainsoft.com)
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-
-using System;
-using System.Collections;
-using System.IO;
-using System.Web;
-using System.Web.Compilation;
-using System.Web.Util;
-using System.Web.J2EE;
-
-namespace System.Web.Profile
-{
- internal sealed class ProfileParser
- {
- const string virtualPathCommon = "~/App_Code/ProfileCommon";
- const string virtualPathGroup = "~/App_Code/ProfileGroup";
-
- internal ProfileParser (HttpContext context)
- {
- }
-
- public static Type GetProfileCommonType (HttpContext context)
- {
- if (!ProfileCommonTypeExists)
- return null;
-
- string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPathCommon).TrimEnd ('/');
- Type profileBaseType = PageMapper.GetObjectType (context, resolvedUrl, false);
-
- ProfileCommonTypeExists = profileBaseType != null;
- return profileBaseType;
- }
-
- public static Type GetProfileGroupType (HttpContext context, string groupName)
- {
- if (!ProfileGroupTypeExists)
- return null;
-
- string resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPathGroup + groupName).TrimEnd ('/');
- Type profileGroupType = PageMapper.GetObjectType (context, resolvedUrl, false);
-
- ProfileGroupTypeExists = profileGroupType != null;
- return profileGroupType;
- }
-
- const string profileKey = "Profile.ProfileCommonType";
- static bool ProfileCommonTypeExists
- {
- get
- {
- object o = AppDomain.CurrentDomain.GetData (profileKey);
- if (o == null)
- return true;
- return (bool) o;
- }
- set { AppDomain.CurrentDomain.SetData (profileKey, value); }
- }
-
- const string groupKey = "Profile.ProfileGroupType";
- static bool ProfileGroupTypeExists
- {
- get
- {
- object o = AppDomain.CurrentDomain.GetData (groupKey);
- if (o == null)
- return true;
- return (bool) o;
- }
- set { AppDomain.CurrentDomain.SetData (groupKey, value); }
- }
- }
-}
-
-#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.Security/AnonymousIdentificationModule.cs b/mcs/class/System.Web/System.Web.Security/AnonymousIdentificationModule.cs
index b8e7bfa11a4..55d223b7056 100644
--- a/mcs/class/System.Web/System.Web.Security/AnonymousIdentificationModule.cs
+++ b/mcs/class/System.Web/System.Web.Security/AnonymousIdentificationModule.cs
@@ -114,26 +114,7 @@ namespace System.Web.Security {
}
}
-#if TARGET_JVM
- static AnonymousIdentificationSection Config
- {
- get
- {
- AnonymousIdentificationSection config = (AnonymousIdentificationSection) AppDomain.CurrentDomain.GetData ("Anonymous.Config");
- if (config == null) {
- lock (typeof (AnonymousIdentificationModule)) {
- config = (AnonymousIdentificationSection) AppDomain.CurrentDomain.GetData ("Anonymous.Config");
- if (config == null)
- config = (AnonymousIdentificationSection) WebConfigurationManager.GetSection ("system.web/anonymousIdentification");
- AppDomain.CurrentDomain.SetData ("Anonymous.Config", config);
- }
- }
- return config;
- }
- }
-#else
static AnonymousIdentificationSection Config = (AnonymousIdentificationSection) WebConfigurationManager.GetSection ("system.web/anonymousIdentification");
-#endif
}
}
#endif
diff --git a/mcs/class/System.Web/System.Web.Testing.csproj b/mcs/class/System.Web/System.Web.Testing.csproj
deleted file mode 100644
index 1869cfe9b4a..00000000000
--- a/mcs/class/System.Web/System.Web.Testing.csproj
+++ /dev/null
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{BB170E99-8793-4179-A19B-440539F6879F}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Web</RootNamespace>
- <AssemblyName>System.Web.Testing</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>mono.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;NET_2_0;TARGET_DOTNET;VISUAL_STUDIO</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.EnterpriseServices" />
- <Reference Include="System.Web" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- </Compile>
- <Compile Include="..\..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Web.Util\AltSerialization.cs" />
- <Compile Include="System.Web.Util\DataSourceHelper.cs" />
- <Compile Include="System.Web.Util\DataSourceResolver.cs" />
- <Compile Include="System.Web.Util\FileUtils.cs" />
- <Compile Include="System.Web.Util\ICalls.cs" />
- <Compile Include="System.Web.Util\IWebObjectFactory.cs" />
- <Compile Include="System.Web.Util\IWebPropertyAccessor.cs" />
- <Compile Include="System.Web.Util\SearchPattern.cs" />
- <Compile Include="System.Web.Util\SerializationHelper.cs" />
- <Compile Include="System.Web.Util\StrUtils.cs" />
- <Compile Include="System.Web.Util\TimeUtil.cs" />
- <Compile Include="System.Web.Util\TransactedCallback.cs" />
- <Compile Include="System.Web.Util\Transactions.cs" />
- <Compile Include="System.Web.Util\UrlUtils.cs" />
- <Compile Include="System.Web.Util\WebEncoding.cs" />
- <Compile Include="System.Web.Util\WebTrace.cs" />
- <Compile Include="System.Web.Util\WorkItem.cs" />
- <Compile Include="System.Web.Util\WorkItemCallback.cs" />
- </ItemGroup>
- <ItemGroup>
- <None Include="mono.snk" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Content.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Content.cs
index a1b8f553a28..e57513c761e 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/Content.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/Content.cs
@@ -35,9 +35,7 @@ namespace System.Web.UI.WebControls
{
[ToolboxItem (false)]
[DesignerAttribute ("System.Web.UI.Design.WebControls.ContentDesigner, " + Consts.AssemblySystem_Design, "System.ComponentModel.Design.IDesigner")]
-#if !TARGET_JVM
[ControlBuilder(typeof(ContentBuilderInternal))]
-#endif
public class Content: Control, INamingContainer, INonBindingContainer
{
[ThemeableAttribute (false)]
diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs
index 7f71951ba00..56bb47679f4 100644
--- a/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs
+++ b/mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs
@@ -504,12 +504,7 @@ namespace System.Web.UI.WebControls
public void ToggleExpandState ()
{
-#if TARGET_JVM //No support for Nullable<bool>.GetValueOrDefault() yet
- bool? value = Expanded;
- Expanded = value.HasValue ? !value.Value : true;
-#else
Expanded = !Expanded.GetValueOrDefault(false);
-#endif
}
void IStateManager.LoadViewState (object savedState)
diff --git a/mcs/class/System.Web/System.Web.UI/BaseParser.jvm.cs b/mcs/class/System.Web/System.Web.UI/BaseParser.jvm.cs
deleted file mode 100644
index 8a3d1d2fb8f..00000000000
--- a/mcs/class/System.Web/System.Web.UI/BaseParser.jvm.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// System.Web.UI.BaseParser.cs
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2002 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Collections;
-using System.IO;
-using System.Security.Permissions;
-using System.Web.Compilation;
-using System.Web.Configuration;
-using System.Web.Util;
-
-namespace System.Web.UI
-{
- public class BaseParser
- {
- public BaseParser () {
- throw new NotImplementedException ();
- }
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.jvm.cs b/mcs/class/System.Web/System.Web.UI/ClientScriptManager.jvm.cs
deleted file mode 100644
index 95a48919e42..00000000000
--- a/mcs/class/System.Web/System.Web.UI/ClientScriptManager.jvm.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// (C) 2007 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Web.UI;
-using System.Collections.Specialized;
-using System.Collections;
-
-namespace System.Web.UI
-{
- partial class ClientScriptManager : IStateManager
- {
- #region IStateManager Members
-
- void IStateManager.LoadViewState (object state) {
- throw new NotSupportedException ();
- }
-
- object IStateManager.SaveViewState () {
- if (hiddenFields != null) {
- Hashtable clone = (Hashtable) hiddenFields.Clone ();
- clone.Remove ("__VIEWSTATE");
- clone.Remove (Page.postEventArgumentID);
- clone.Remove (Page.postEventSourceID);
- clone.Remove (Page.CallbackArgumentID);
- clone.Remove (Page.CallbackSourceID);
- if (clone.Keys.Count > 0)
- return clone;
- }
- return null;
- }
-
- void IStateManager.TrackViewState () {
- throw new NotSupportedException ();
- }
-
- bool IStateManager.IsTrackingViewState {
- get { throw new NotSupportedException (); }
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.jvm.cs b/mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.jvm.cs
deleted file mode 100644
index cf47ba35a90..00000000000
--- a/mcs/class/System.Web/System.Web.UI/ComplexPropertyEntry.jvm.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// System.Web.UI.ComplexPropertyEntry.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-namespace System.Web.UI
-{
- public class ComplexPropertyEntry : BuilderPropertyEntry
- {
- public bool IsCollectionItem {
- get { throw new NotImplementedException (); }
- }
-
- public bool ReadOnly {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/Control.jvm.cs b/mcs/class/System.Web/System.Web.UI/Control.jvm.cs
deleted file mode 100644
index 01f0b44ad8d..00000000000
--- a/mcs/class/System.Web/System.Web.UI/Control.jvm.cs
+++ /dev/null
@@ -1,301 +0,0 @@
-//
-// System.Web.UI.ControlS.jvm.cs
-//
-// Authors:
-// Eyal Alaluf (eyala@mainsoft.com)
-//
-// (C) 2006 Mainsoft Co. (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Web.Hosting;
-using System.Text;
-using javax.faces.component;
-using java.util;
-using javax.faces.el;
-using javax.faces.@event;
-using javax.faces.context;
-
-namespace System.Web.UI
-{
- public partial class Control : UIComponent, StateHolder
- {
- ComponentChildrenList _childrenList;
- HashMap _attributes;
- HashMap _facets;
-
- protected override void addFacesListener (FacesListener __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void broadcast (FacesEvent __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void decode (FacesContext context) {
- // do nothing
- }
-
- public override void encodeBegin (FacesContext __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void encodeChildren (FacesContext __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void encodeEnd (FacesContext __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override UIComponent findComponent (string __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override Map getAttributes () {
- return _attributes ?? (_attributes = new HashMap ());
- }
-
- public override int getChildCount () {
- return HasControls () ? Controls.Count : 0;
- }
-
- public override List getChildren () {
- if (_childrenList == null)
- _childrenList = new ComponentChildrenList (this);
- return _childrenList;
- }
-
- public override string getClientId (FacesContext __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- protected override FacesContext getFacesContext () {
- Control nc = NamingContainer;
- if (nc != null)
- return nc.getFacesContext ();
- return FacesContext.getCurrentInstance ();
- }
-
- protected override FacesListener [] getFacesListeners (java.lang.Class __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override UIComponent getFacet (string __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override Map getFacets () {
- return _facets ?? (_facets = new HashMap ());
- }
-
- public override Iterator getFacetsAndChildren () {
- // TODO: consider facets.
- return getChildren ().iterator ();
- }
-
- public override string getFamily () {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override string getId () {
- return ID;
- }
-
- public override UIComponent getParent () {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- protected override javax.faces.render.Renderer getRenderer (FacesContext __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override string getRendererType () {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override bool getRendersChildren () {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override ValueBinding getValueBinding (string name) {
- return null;
- }
-
- public override bool isRendered () {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- // TODO: implement
- public override void processDecodes (FacesContext context) {
- // call processDecodes for all jsf children
- }
-
- public override void processRestoreState (FacesContext context, object state) {
- throw new NotSupportedException ();
- }
-
- public override object processSaveState (FacesContext context) {
- throw new NotSupportedException ();
- }
-
- // TODO: implement
- public override void processUpdates (FacesContext context) {
- // call processUpdates for all jsf children
- }
-
- // TODO: implement
- public override void processValidators (FacesContext context) {
- // call processValidators for all jsf children
- }
-
- public override void queueEvent (FacesEvent __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- protected override void removeFacesListener (FacesListener __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void setId (string __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void setParent (UIComponent __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void setRendered (bool __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void setRendererType (string __p1) {
- throw new Exception ("The method or operation is not implemented.");
- }
-
- public override void setValueBinding (string name, ValueBinding binding) {
- throw new NotSupportedException ();
- }
-
- #region StateHolder Members
-
- bool StateHolder.isTransient () {
- return !EnableViewState;
- }
-
- void StateHolder.restoreState (FacesContext context, object state) {
- LoadViewState (state);
- }
-
- object StateHolder.saveState (FacesContext context) {
- return SaveViewState ();
- }
-
- void StateHolder.setTransient (bool newTransientValue) {
- EnableViewState = !newTransientValue;
- }
-
- #endregion
-
- class ComponentChildrenList : AbstractList
- {
- Control _owner;
-
- public ComponentChildrenList (Control owner) {
- _owner = owner;
- }
-
- public override object get (int index) {
- return _owner.Controls [index];
- }
-
- public override int size () {
- return _owner.Controls.Count;
- }
- }
-
- public virtual string TemplateSourceDirectory
- {
- get
- {
- if (_templateSourceDirectory == null) {
- _templateSourceDirectory = VirtualPathUtility.ToAbsolute (AppRelativeTemplateSourceDirectory, false);
-
- if (_templateSourceDirectory.Length > 1 &&
- _templateSourceDirectory [_templateSourceDirectory.Length - 1] == '/')
- _templateSourceDirectory = _templateSourceDirectory.Substring (0, _templateSourceDirectory.Length - 1);
- }
-
- return _templateSourceDirectory;
- }
- }
-
- string ResolveAppRelativeFromFullPath (string url) {
- try {
- Uri uri = new Uri (url);
- if (String.Compare (uri.Scheme, Page.Request.Url.Scheme, StringComparison.OrdinalIgnoreCase) == 0 &&
- String.Compare (uri.Host, Page.Request.Url.Host, StringComparison.OrdinalIgnoreCase) == 0 &&
- uri.Port == Page.Request.Url.Port)
- return VirtualPathUtility.ToAppRelative (uri.PathAndQuery);
- }
- catch (Exception e) {
- //don't care
-#if DEBUG
- Console.WriteLine (e.ToString ());
-#endif
- }
- return url;
- }
-
- internal string CreateActionUrl (string relativeUrl) {
- relativeUrl = ResolveClientUrlInternal (relativeUrl);
-
- FacesContext faces = getFacesContext ();
- if (faces == null)
- return relativeUrl;
-
- string url;
- if (relativeUrl.IndexOf (':') >= 0)
- url = ResolveAppRelativeFromFullPath (relativeUrl);
- else if (VirtualPathUtility.IsAbsolute (relativeUrl))
- url = VirtualPathUtility.ToAppRelative (relativeUrl);
- else
- return faces.getApplication ().getViewHandler ().getActionURL (faces, relativeUrl);
-
-
- if (VirtualPathUtility.IsAppRelative (url)) {
- url = url.Substring (1);
- url = url.Length == 0 ? "/" : url;
- return faces.getApplication ().getViewHandler ().getActionURL (faces, url);
- }
- return relativeUrl;
- }
-
- internal string ResolveClientUrl (string relativeUrl, bool usePortletRenderResolve) {
- if (usePortletRenderResolve)
- return ResolveClientUrl (relativeUrl);
- else
- return ResolveUrl (relativeUrl);
- }
- }
-}
diff --git a/mcs/class/System.Web/System.Web.UI/ControlBuilder.jvm.cs b/mcs/class/System.Web/System.Web.UI/ControlBuilder.jvm.cs
deleted file mode 100644
index 922121024d7..00000000000
--- a/mcs/class/System.Web/System.Web.UI/ControlBuilder.jvm.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// System.Web.UI/ControlBuilder.jvm.cs
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-
-namespace System.Web.UI
-{
- public class ControlBuilder
- {
- public virtual bool AllowWhitespaceLiterals ()
- {
- return true;
- }
-
- public virtual bool HasBody ()
- {
- return true;
- }
-
- public virtual Type GetChildControlType (string tagName, IDictionary attribs)
- {
- return null;
- }
-
- public virtual bool HtmlDecodeLiterals ()
- {
- return false;
- }
- public virtual void AppendSubBuilder (ControlBuilder subBuilder)
- {
- }
- public virtual bool NeedsTagInnerText ()
- {
- return false;
- }
- public virtual void SetTagInnerText (string text)
- {
- }
- public virtual void AppendLiteralString (string s)
- {
- }
- internal virtual object CreateInstance ()
- {
- return null;
- }
-#if NET_2_0
- public virtual object BuildObject ()
- {
- return CreateInstance ();
- }
-#endif
- public virtual void Init (
- TemplateParser parser,
- ControlBuilder parentBuilder,
- Type type,
- string tagName,
- string id,
- IDictionary attribs
- )
- {
- throw new NotImplementedException ();
- }
- }
-}
diff --git a/mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter .jvm.cs b/mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter .jvm.cs
deleted file mode 100644
index 51abde11ce6..00000000000
--- a/mcs/class/System.Web/System.Web.UI/DataSourceCacheDurationConverter .jvm.cs
+++ /dev/null
@@ -1,93 +0,0 @@
-//
-// System.Web.UI.DataSourceCacheDurationConverter.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System.Collections;
-using System.ComponentModel;
-using System.Globalization;
-
-#if NET_2_0
-namespace System.Web.UI
-{
- public class DataSourceCacheDurationConverter : Int32Converter
- {
- public DataSourceCacheDurationConverter () {
- throw new NotImplementedException ();
- }
- public bool CanConvertFrom (Type sourceType) {
- throw new NotImplementedException ();
- }
- public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) {
- throw new NotImplementedException ();
- }
- public bool CanConvertTo (Type destinationType) {
- throw new NotImplementedException ();
- }
- public override bool CanConvertTo (ITypeDescriptorContext context, Type destinationType) {
- throw new NotImplementedException ();
- }
- public Object ConvertFrom (Object value) {
- throw new NotImplementedException ();
- }
- public override Object ConvertFrom (ITypeDescriptorContext context,
- CultureInfo culture,
- Object value) {
- throw new NotImplementedException ();
- }
- public Object ConvertTo (Object value, Type destinationType) {
- throw new NotImplementedException ();
- }
- public override Object ConvertTo (ITypeDescriptorContext context,
- CultureInfo culture,
- Object value,
- Type destinationType) {
- throw new NotImplementedException ();
- }
- public ICollection GetStandardValues () {
- throw new NotImplementedException ();
- }
- public override StandardValuesCollection GetStandardValues (ITypeDescriptorContext context) {
- throw new NotImplementedException ();
- }
- public bool GetStandardValuesExclusive () {
- throw new NotImplementedException ();
- }
- public override bool GetStandardValuesExclusive (ITypeDescriptorContext context) {
- throw new NotImplementedException ();
- }
- public bool GetStandardValuesSupported () {
- throw new NotImplementedException ();
- }
- public override bool GetStandardValuesSupported (ITypeDescriptorContext context) {
- throw new NotImplementedException ();
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/DesignTimeParseData.jvm.cs b/mcs/class/System.Web/System.Web.UI/DesignTimeParseData.jvm.cs
deleted file mode 100644
index fcdaa5fe131..00000000000
--- a/mcs/class/System.Web/System.Web.UI/DesignTimeParseData.jvm.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// System.Web.DesignTimeParseData class
-//
-//
-// Author:
-// Miguel de Icaza (miguel@novell.com)
-//
-
-//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Collections;
-using System.ComponentModel.Design;
-using System.Security.Permissions;
-
-namespace System.Web.UI {
-
- public sealed class DesignTimeParseData {
-
- public DesignTimeParseData (IDesignerHost designerHost, string parseText)
- {
- throw new NotImplementedException ();
-
- }
-#if NET_2_0
- public DesignTimeParseData (IDesignerHost designerHost, string parseText, string filter)
- : this (designerHost, parseText)
- {
- throw new NotImplementedException ();
- }
-#endif
-
- public EventHandler DataBindingHandler {
- get {
- throw new NotImplementedException ();
- }
-
- set {
- throw new NotImplementedException ();
- }
- }
-
- public IDesignerHost DesignerHost {
- get {
- throw new NotImplementedException ();
- }
- }
-
- public string DocumentUrl {
- get {
- throw new NotImplementedException ();
- }
-
- set {
- throw new NotImplementedException ();
- }
- }
-
- public string ParseText {
- get {
- throw new NotImplementedException ();
- }
- }
-#if NET_2_0
- public string Filter {
- get {throw new NotImplementedException (); }
- }
-
- public bool ShouldApplyTheme {
- get {throw new NotImplementedException (); }
- set {throw new NotImplementedException (); }
- }
-
- // FIXME: there's probably a way to set this somewhere...
- public ICollection UserControlRegisterEntries {
- get { throw new NotImplementedException (); }
- }
-#endif
- }
-}
diff --git a/mcs/class/System.Web/System.Web.UI/EventEntry.jvm.cs b/mcs/class/System.Web/System.Web.UI/EventEntry.jvm.cs
deleted file mode 100644
index cc8c6871ef4..00000000000
--- a/mcs/class/System.Web/System.Web.UI/EventEntry.jvm.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// System.Web.UI.EventEntry.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-namespace System.Web.UI
-{
- public class EventEntry
- {
- public EventEntry () { throw new NotImplementedException (); }
- public string HandlerMethodName {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- public Type HandlerType {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- public string Name {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
- }
-}
-#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs b/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs
index 4cc18bd3a31..45ce22e46e9 100644
--- a/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs
+++ b/mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs
@@ -133,10 +133,6 @@ namespace System.Web.UI {
protected virtual void AddAttribute (string name, string value, HtmlTextWriterAttribute key)
{
NextAttrStack ();
-#if TARGET_JVM
- if (attrs [attrs_pos] == null)
- attrs [attrs_pos] = new AddedAttr ();
-#endif
attrs [attrs_pos].name = name;
attrs [attrs_pos].value = value;
attrs [attrs_pos].key = key;
@@ -146,10 +142,6 @@ namespace System.Web.UI {
protected virtual void AddStyleAttribute (string name, string value, HtmlTextWriterStyle key)
{
NextStyleStack ();
-#if TARGET_JVM
- if (styles [styles_pos] == null)
- styles [styles_pos] = new AddedStyle ();
-#endif
styles [styles_pos].name = name;
value = HttpUtility.HtmlAttributeEncode (value);
styles [styles_pos].value = value;
@@ -765,10 +757,6 @@ namespace System.Web.UI {
return tagstack [tagstack_pos].key;
}
set {
-#if TARGET_JVM
- if (tagstack [tagstack_pos] == null)
- tagstack [tagstack_pos] = new AddedTag ();
-#endif
tagstack [tagstack_pos].key = value;
tagstack [tagstack_pos].name = GetTagName (value);
}
@@ -782,10 +770,6 @@ namespace System.Web.UI {
return tagstack [tagstack_pos].name;
}
set {
-#if TARGET_JVM
- if (tagstack [tagstack_pos] == null)
- tagstack [tagstack_pos] = new AddedTag ();
-#endif
tagstack [tagstack_pos].name = value;
tagstack [tagstack_pos].key = GetTagKey (value);
if (tagstack [tagstack_pos].key != HtmlTextWriterTag.Unknown)
@@ -828,33 +812,21 @@ namespace System.Web.UI {
int styles_pos = -1, attrs_pos = -1, tagstack_pos = -1;
-#if TARGET_JVM
- class
-#else
struct
-#endif
AddedTag {
public string name;
public HtmlTextWriterTag key;
public bool ignore;
}
-#if TARGET_JVM
- class
-#else
struct
-#endif
AddedStyle {
public string name;
public HtmlTextWriterStyle key;
public string value;
}
-#if TARGET_JVM
- class
-#else
struct
-#endif
AddedAttr {
public string name;
public HtmlTextWriterAttribute key;
diff --git a/mcs/class/System.Web/System.Web.UI/IScriptManager.cs b/mcs/class/System.Web/System.Web.UI/IScriptManager.cs
index 842c1ff8806..de727f794aa 100644
--- a/mcs/class/System.Web/System.Web.UI/IScriptManager.cs
+++ b/mcs/class/System.Web/System.Web.UI/IScriptManager.cs
@@ -34,7 +34,7 @@ using System.Text;
namespace System.Web.UI
{
-#if (TARGET_JVM || TARGET_DOTNET)
+#if (TARGET_DOTNET)
public
#endif
interface IScriptManager
diff --git a/mcs/class/System.Web/System.Web.UI/IndexedString.jvm.cs b/mcs/class/System.Web/System.Web.UI/IndexedString.jvm.cs
deleted file mode 100644
index 24441fee8ef..00000000000
--- a/mcs/class/System.Web/System.Web.UI/IndexedString.jvm.cs
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// System.Web.UI.IndexedString.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-namespace System.Web.UI
-{
- [SerializableAttribute]
- public sealed class IndexedString
- {
- public IndexedString (string s)
- {
- throw new NotImplementedException ();
- }
-
- public string Value { get { throw new NotImplementedException (); } }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/MasterPage.cs b/mcs/class/System.Web/System.Web.UI/MasterPage.cs
index d68be867801..2a08d709579 100644
--- a/mcs/class/System.Web/System.Web.UI/MasterPage.cs
+++ b/mcs/class/System.Web/System.Web.UI/MasterPage.cs
@@ -115,13 +115,7 @@ namespace System.Web.UI
var req = context.Request;
if (req != null)
masterPageFile = HostingEnvironment.VirtualPathProvider.CombineVirtualPaths (req.CurrentExecutionFilePath, masterPageFile);
-#if TARGET_JVM
- MasterPage masterPage = MasterPageParser.GetCompiledMasterInstance (masterPageFile,
- owner.Page.MapPath (masterPageFile),
- context);
-#else
MasterPage masterPage = BuildManager.CreateInstanceFromVirtualPath (masterPageFile, typeof (MasterPage)) as MasterPage;
-#endif
if (masterPage == null)
throw new HttpException ("Failed to create MasterPage instance for '" + masterPageFile + "'.");
diff --git a/mcs/class/System.Web/System.Web.UI/MasterPageParser.jvm.cs b/mcs/class/System.Web/System.Web.UI/MasterPageParser.jvm.cs
deleted file mode 100644
index da72d87e945..00000000000
--- a/mcs/class/System.Web/System.Web.UI/MasterPageParser.jvm.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-//
-// System.Web.UI.MasterPageParser
-//
-// Authors:
-// Lluis Sanchez Gual (lluis@novell.com)
-//
-// (C) 2005 Novell, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-
-using System;
-using System.Collections;
-using System.IO;
-using System.Web;
-using System.Web.Compilation;
-using System.Web.Util;
-using System.Web.J2EE;
-
-namespace System.Web.UI
-{
- internal sealed class MasterPageParser
- {
- internal MasterPageParser (string virtualPath, string inputFile, HttpContext context)
- {
- }
-
- public static MasterPage GetCompiledMasterInstance (string virtualPath, string inputFile, HttpContext context)
- {
- string resolvedUrl;
- if (VirtualPathUtility.IsAbsolute (virtualPath))
- resolvedUrl = virtualPath;
- else if (VirtualPathUtility.IsAppRelative (virtualPath))
- resolvedUrl = System.Web.Util.UrlUtils.ResolveVirtualPathFromAppAbsolute (virtualPath);
- else
- resolvedUrl = VirtualPathUtility.Combine (VirtualPathUtility.GetDirectory (context.Request.FilePath, false), virtualPath);
- Type tmpType = PageMapper.GetObjectType (context, resolvedUrl);
- if (tmpType == null)
- throw new InvalidOperationException ("Master page '" + virtualPath + "' not found");
-
- Object obj = Activator.CreateInstance (tmpType);
- return (MasterPage) obj;
- }
-
- public static Type GetCompiledMasterType (string virtualPath, string inputFile, HttpContext context)
- {
- return null;
- }
- }
-}
-
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ObjectPersistData.jvm.cs b/mcs/class/System.Web/System.Web.UI/ObjectPersistData.jvm.cs
deleted file mode 100644
index c332eb16e6c..00000000000
--- a/mcs/class/System.Web/System.Web.UI/ObjectPersistData.jvm.cs
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// System.Web.UI.ObjectPersistData.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-using System.Collections;
-using System.Web.UI;
-
-namespace System.Web.UI
-{
- public class ObjectPersistData
- {
- public ObjectPersistData (ControlBuilder builder, IDictionary builtObjects) {
- throw new NotImplementedException ();
- }
- public ICollection AllPropertyEntries { get { throw new NotImplementedException (); } }
- public IDictionary BuiltObjects { get { throw new NotImplementedException (); } }
- public ICollection CollectionItems { get { throw new NotImplementedException (); } }
- public ICollection EventEntries { get { throw new NotImplementedException (); } }
- public bool IsCollection { get { throw new NotImplementedException (); } }
- public bool Localize { get { throw new NotImplementedException (); } }
- public Type ObjectType { get { throw new NotImplementedException (); } }
- public string ResourceKey { get { throw new NotImplementedException (); } }
- public void AddToObjectControlBuilderTable (IDictionary table) {
- throw new NotImplementedException ();
- }
- public IDictionary GetFilteredProperties (string filter) {
- throw new NotImplementedException ();
- }
- public PropertyEntry GetFilteredProperty (string filter, string name) {
- throw new NotImplementedException ();
- }
- public ICollection GetPropertyAllFilters (string name) {
- throw new NotImplementedException ();
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/Page.cs b/mcs/class/System.Web/System.Web.UI/Page.cs
index e6c79483a0d..95919aba332 100644
--- a/mcs/class/System.Web/System.Web.UI/Page.cs
+++ b/mcs/class/System.Web/System.Web.UI/Page.cs
@@ -544,15 +544,11 @@ public partial class Page : TemplateControl, IHttpHandler
if (ps != null)
_styleSheetTheme = ps.StyleSheetTheme;
}
-#if TARGET_JVM
- if (_styleSheetTheme != null && _styleSheetTheme != "")
- _styleSheetPageTheme = ThemeDirectoryCompiler.GetCompiledInstance (_styleSheetTheme, Context);
-#else
+
if (!String.IsNullOrEmpty (_styleSheetTheme)) {
string virtualPath = "~/App_Themes/" + _styleSheetTheme;
_styleSheetPageTheme = BuildManager.CreateInstanceFromVirtualPath (virtualPath, typeof (PageTheme)) as PageTheme;
}
-#endif
}
void InitializeTheme ()
@@ -562,19 +558,13 @@ public partial class Page : TemplateControl, IHttpHandler
if (ps != null)
_theme = ps.Theme;
}
-#if TARGET_JVM
- if (_theme != null && _theme != "") {
- _pageTheme = ThemeDirectoryCompiler.GetCompiledInstance (_theme, Context);
- _pageTheme.SetPage (this);
- }
-#else
+
if (!String.IsNullOrEmpty (_theme)) {
string virtualPath = "~/App_Themes/" + _theme;
_pageTheme = BuildManager.CreateInstanceFromVirtualPath (virtualPath, typeof (PageTheme)) as PageTheme;
if (_pageTheme != null)
_pageTheme.SetPage (this);
}
-#endif
}
#if NET_4_0
public Control AutoPostBackControl {
@@ -1298,11 +1288,7 @@ public partial class Page : TemplateControl, IHttpHandler
OnError (EventArgs.Empty);
if (_context.HasError (e)) {
_context.ClearError (e);
-#if TARGET_JVM
- vmw.common.TypeUtils.Throw (e);
-#else
throw new HttpUnhandledException (null, e);
-#endif
}
}
@@ -2277,26 +2263,6 @@ public partial class Page : TemplateControl, IHttpHandler
}
if (asyncResults.Count > 0) {
-#if TARGET_JVM
- TimeSpan timeout = AsyncTimeout;
- long t1 = DateTime.Now.Ticks;
- bool signalled = true;
- for (int i = 0; i < asyncResults.Count; i++) {
- if (asyncResults [i].IsCompleted)
- continue;
-
- if (signalled)
- signalled = asyncResults [i].AsyncWaitHandle.WaitOne (timeout, false);
-
- if (signalled) {
- long t2 = DateTime.Now.Ticks;
- timeout = AsyncTimeout - TimeSpan.FromTicks (t2 - t1);
- if (timeout.Ticks <= 0)
- signalled = false;
- } else
- localParallelTasks [i].TimeoutHandler (asyncResults [i]);
- }
-#else
WaitHandle [] waitArray = new WaitHandle [asyncResults.Count];
int i = 0;
for (i = 0; i < asyncResults.Count; i++) {
@@ -2311,7 +2277,6 @@ public partial class Page : TemplateControl, IHttpHandler
}
}
}
-#endif
}
DateTime endWait = DateTime.Now;
TimeSpan elapsed = endWait - startExecution;
diff --git a/mcs/class/System.Web/System.Web.UI/Page.jvm.cs b/mcs/class/System.Web/System.Web.UI/Page.jvm.cs
deleted file mode 100644
index 1dc70f7a762..00000000000
--- a/mcs/class/System.Web/System.Web.UI/Page.jvm.cs
+++ /dev/null
@@ -1,496 +0,0 @@
-//
-// System.Web.UI.Page.jvm.cs
-//
-// Authors:
-// Eyal Alaluf (eyala@mainsoft.com)
-//
-// (C) 2006 Mainsoft Co. (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using javax.servlet.http;
-using System.Collections.Specialized;
-using System.Globalization;
-using System.Web.Hosting;
-using System.Web.J2EE;
-using System.ComponentModel;
-using System.IO;
-using javax.faces.context;
-using javax.faces.render;
-using javax.servlet;
-using javax.faces;
-using javax.faces.application;
-using javax.faces.@event;
-using javax.faces.el;
-using javax.faces.component;
-using System.Threading;
-using System.Web.Configuration;
-using Mainsoft.Web.Hosting;
-
-namespace System.Web.UI
-{
- public partial class Page
- {
- string _namespace = null;
- StateManager.SerializedView _facesSerializedView;
- MethodBinding _action;
- MethodBinding _actionListener;
- bool _immediate;
- bool [] _validatorsState;
- ICallbackEventHandler _callbackTarget;
- string _callbackEventError = String.Empty;
- static readonly object CrossPagePostBack = new object ();
- FacesContext _facesContext;
- const string RenderBodyContentOnlyKey = "mainsoft.render.body.content.only";
-
- static readonly java.util.List emptyList = java.util.Collections.unmodifiableList (new java.util.ArrayList ());
-
- bool _isMultiForm = false;
- bool _isMultiFormInited = false;
-
- internal string Namespace
- {
- get {
- if (_namespace == null) {
-
- if (getFacesContext () != null) {
- _namespace = getFacesContext ().getExternalContext ().encodeNamespace (String.Empty);
- }
-
- _namespace = _namespace ?? String.Empty;
- }
- return _namespace;
- }
- }
-
- internal Pair PageState { get; set; }
-
- internal string theForm {
- get {
- return "theForm" + Namespace;
- }
- }
-
- internal bool IsMultiForm {
- get {
- if (!_isMultiFormInited) {
- string isMultiForm = WebConfigurationManager.AppSettings ["mainsoft.use.portlet.namespace"];
- _isMultiForm = isMultiForm != null ? Boolean.Parse(isMultiForm) : false;
-
- _isMultiFormInited = true;
- }
- return _isMultiForm;
- }
- }
-
- IHttpHandler EnterThread () {
-
- IHttpHandler jsfHandler = _context.CurrentHandler;
- _context.PopHandler ();
- _context.PushHandler (this);
- if (jsfHandler == _context.Handler)
- _context.Handler = this;
-
- _context.CurrentHandlerInternal = this;
-
- return jsfHandler;
- }
-
- void ExitThread (IHttpHandler jsfHandler) {
- // TODO
- //if (context.getResponseComplete ())
- // Response.End ();
-
- _context.PopHandler ();
- _context.PushHandler (jsfHandler);
- if (this == _context.Handler)
- _context.Handler = jsfHandler;
-
- }
-
- public override void encodeBegin (FacesContext context) {
- // do nothing
- }
-
- public override void encodeChildren (FacesContext context) {
- System.Diagnostics.Trace.WriteLine ("encodeChildren");
-
- // reset _facesContext if changed between action and render phases (such portal).
- _facesContext = null;
-
- IHttpHandler jsfHandler = EnterThread ();
- bool wasException = false;
- try {
- if (!context.getResponseComplete ()) {
-
- if (IsCallback) {
- string result = ProcessGetCallbackResult (_callbackTarget, _callbackEventError);
- HtmlTextWriter callbackOutput = new HtmlTextWriter (Response.Output);
- callbackOutput.Write (result);
- callbackOutput.Flush ();
- return;
- }
-
- // ensure lifecycle complete.
- if (!IsLoaded) {
- ProcessLoad ();
- RestoreValidatorsState (_validatorsState);
- }
- if (!IsPrerendered)
- ProcessLoadComplete ();
-
- RenderPage ();
- }
- }
- catch (Exception ex) {
- wasException = true;
- HandleException (ex);
- }
- finally {
- try {
- if (!wasException)
- ProcessUnload ();
- }
- finally {
- ExitThread (jsfHandler);
- }
- }
- }
-
- public override void encodeEnd (FacesContext context) {
- // do nothing
- }
-
- // BUGBUG: must return correct value. Currently returns 0 as performance optimization.
- public override int getChildCount ()
- {
- return 0;
- }
-
- // BUGBUG: must return correct value. Currently returns empty list as performance optimization.
- public override java.util.List getChildren ()
- {
- return emptyList;
- }
-
- public override UIComponent getParent () {
- return null;
- }
-
- public override void setParent (UIComponent parent) {
- //ignore: parent is root
- }
-
- // TODO: consider validators state
- public override object processSaveState (FacesContext context) {
- System.Diagnostics.Trace.WriteLine ("processSaveState");
-
- object state = new Pair (PageState, GetValidatorsState ());
- return new StateSerializer (state);
- }
-
- public override void processRestoreState (FacesContext context, object state) {
- System.Diagnostics.Trace.WriteLine ("processRestoreState");
-
- if (state == null) {
- Console.WriteLine ("WARNING: processRestoreState was called with null state.");
- return; //throw new ArgumentNullException ("state");
- }
- IHttpHandler jsfHandler = EnterThread ();
- try {
- state = ((StateSerializer) state).State;
- PageState = (Pair) ((Pair) state).First;
- _validatorsState = (bool []) ((Pair) state).Second;
- RestorePageState ();
- }
- catch (Exception ex) {
- HandleException (ex);
- }
- finally {
- ExitThread (jsfHandler);
- }
- }
-
- public override void processDecodes (FacesContext context) {
- System.Diagnostics.Trace.WriteLine ("processDecodes");
-
- IHttpHandler jsfHandler = EnterThread ();
- try {
- ProcessPostData ();
-
- EventRaiserFacesEvent facesEvent = new EventRaiserFacesEvent (this);
- facesEvent.setPhaseId (PhaseId.INVOKE_APPLICATION);
- context.getViewRoot ().queueEvent (facesEvent);
-
- base.processDecodes (context);
- }
- catch (Exception ex) {
- HandleException (ex);
- }
- finally {
- ExitThread (jsfHandler);
- }
- }
-
- public override void processValidators (FacesContext context) {
- System.Diagnostics.Trace.WriteLine ("processValidators");
-
- IHttpHandler jsfHandler = EnterThread ();
- try {
- base.processValidators (context);
- }
- catch (Exception ex) {
- HandleException (ex);
- }
- finally {
- ExitThread (jsfHandler);
- }
- }
-
- public override void processUpdates (FacesContext context) {
- System.Diagnostics.Trace.WriteLine ("processUpdates");
-
- IHttpHandler jsfHandler = EnterThread ();
- try {
- base.processUpdates (context);
- }
- catch (Exception ex) {
- HandleException (ex);
- }
- finally {
- ExitThread (jsfHandler);
- }
- }
-
- public override void broadcast (FacesEvent e) {
- System.Diagnostics.Trace.WriteLine ("broadcast");
-
- if (!(e is EventRaiserFacesEvent))
- throw new NotSupportedException ("FacesEvent of class " + e.GetType ().Name + " not supported by Page");
-
- IHttpHandler jsfHandler = EnterThread ();
- bool doUnload = false;
- try {
- ProcessRaiseEvents ();
- doUnload = (ProcessLoadComplete () && IsCrossPagePostBack);
- }
- catch (Exception ex) {
- doUnload = false;
- HandleException (ex);
- }
- finally {
- try {
- if (doUnload) {
- getFacesContext ().responseComplete ();
- ProcessUnload ();
- }
- }
- finally {
- ExitThread (jsfHandler);
- }
- }
- }
-
- void HandleException (Exception ex) {
- try {
- if (ex is ThreadAbortException) {
- if (FlagEnd.Value == ((ThreadAbortException) ex).ExceptionState) {
- Thread.ResetAbort ();
- return;
- }
- vmw.common.TypeUtils.Throw (ex);
- }
- else
- ProcessException (ex);
- }
- finally {
- if (getFacesContext () != null)
- getFacesContext ().responseComplete ();
- ProcessUnload ();
- }
- }
-
- bool [] GetValidatorsState () {
- if (is_validated && Validators.Count > 0) {
- bool [] validatorsState = new bool [Validators.Count];
- bool isValid = true;
- for (int i = 0; i < Validators.Count; i++) {
- IValidator val = Validators [i];
- if (!val.IsValid)
- isValid = false;
- else
- validatorsState [i] = true;
- }
- return validatorsState;
- }
- return null;
- }
-
- void RestoreValidatorsState (bool [] validatorsState) {
- if (validatorsState == null)
- return;
-
- is_validated = true;
- for (int i = 0; i < Math.Min (validatorsState.Length, Validators.Count); i++) {
- IValidator val = Validators [i];
- val.IsValid = validatorsState [i];
- }
- }
-
- ResponseWriter SetupResponseWriter (TextWriter httpWriter) { //TODO
- FacesContext facesContext = getFacesContext ();
-
- ResponseWriter oldWriter = facesContext.getResponseWriter ();
- if (oldWriter == null)
- throw new InvalidOperationException ();
-
- ResponseWriter writer = oldWriter.cloneWithWriter (new AspNetResponseWriter (httpWriter));
-
- facesContext.setResponseWriter (writer);
- return oldWriter;
- }
-
- string DecodeNamespace (string id) {
- if (Namespace.Length > 0 && id.Length > Namespace.Length && id.StartsWith (Namespace, StringComparison.Ordinal))
- id = id.Substring (Namespace.Length);
- return id;
- }
-
- protected override FacesContext getFacesContext () {
- return _facesContext ?? (_facesContext = FacesContext.getCurrentInstance ());
- }
-
- internal FacesContext FacesContext {
- get { return getFacesContext (); }
- }
-
- #region EventRaiserFacesEvent
- sealed class EventRaiserFacesEvent : FacesEvent
- {
- public EventRaiserFacesEvent (Page page)
- : base (page) {
- }
-
- public override bool isAppropriateListener (FacesListener __p1) {
- throw new NotSupportedException ();
- }
-
- public override void processListener (FacesListener __p1) {
- throw new NotSupportedException ();
- }
- }
- #endregion
-
- #region AspNetResponseWriter
- sealed class AspNetResponseWriter : java.io.Writer
- {
- readonly TextWriter _writer;
- public AspNetResponseWriter (TextWriter writer) {
- _writer = writer;
- }
- public override void close () {
- _writer.Close ();
- }
-
- public override void flush () {
- _writer.Flush ();
- }
-
- public override void write (char [] __p1, int __p2, int __p3) {
- _writer.Write (__p1, __p2, __p3);
- }
-
- public override void write (int __p1) {
- _writer.Write ((char) __p1);
- }
-
- public override void write (char [] __p1) {
- _writer.Write (__p1);
- }
-
- public override void write (string __p1) {
- _writer.Write (__p1);
- }
-
- public override void write (string __p1, int __p2, int __p3) {
- _writer.Write (__p1, __p2, __p3);
- }
- }
- #endregion
-
- #region StateSerializer
- public sealed class StateSerializer : java.io.Externalizable
- {
- object _state;
-
- public StateSerializer ()
- {
- }
-
- public StateSerializer (object state)
- {
- _state = state;
- }
-
- public object State
- {
- get { return _state; }
- }
-
- public void readExternal (java.io.ObjectInput __p1)
- {
- Page page = CurrentPage;
- ObjectStateFormatter osf = new ObjectStateFormatter (page);
- ObjectInputStream inputStream = new ObjectInputStream (__p1);
-
- if (page.NeedViewStateEncryption || page.EnableViewStateMac)
- _state = osf.Deserialize ((string) inputStream.readObject ());
- else
- _state = osf.Deserialize (inputStream);
- }
-
- public void writeExternal (java.io.ObjectOutput __p1)
- {
- Page page = CurrentPage;
- ObjectStateFormatter osf = new ObjectStateFormatter (page);
- ObjectOutputStream outputStream = new ObjectOutputStream (__p1);
-
- if (page.NeedViewStateEncryption || page.EnableViewStateMac)
- outputStream.writeObject (osf.Serialize (_state));
- else
- osf.Serialize (outputStream, _state);
- }
-
- Page CurrentPage
- {
- get
- {
- HttpContext context = HttpContext.Current;
- if (context.CurrentHandler is Page)
- return (Page) context.CurrentHandler;
-
- return context.CurrentHandlerInternal;
- }
- }
- }
- #endregion
- }
-}
diff --git a/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.jvm.cs b/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.jvm.cs
deleted file mode 100644
index 59e3dc2add4..00000000000
--- a/mcs/class/System.Web/System.Web.UI/PageHandlerFactory.jvm.cs
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Web;
-using System.Web.J2EE;
-using vmw.common;
-//using System.Web.Compilation;
-
-
-namespace System.Web.UI
-{
- public class PageHandlerFactory : IHttpHandlerFactory
- {
- public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path)
- {
- if (!path.StartsWith(IAppDomainConfig.WAR_ROOT_SYMBOL))
- path = context.Request.MapPath(path);
- Type tmpType = PageMapper.GetObjectType(path);
- Object obj = Activator.CreateInstance(tmpType);
- return (IHttpHandler) obj;
- }
-
- public virtual void ReleaseHandler (IHttpHandler handler)
- {
- }
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web.UI/PageParser.jvm.cs b/mcs/class/System.Web/System.Web.UI/PageParser.jvm.cs
deleted file mode 100644
index c96093806da..00000000000
--- a/mcs/class/System.Web/System.Web.UI/PageParser.jvm.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// System.Web.UI.PageParser
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Collections;
-using System.Collections.Specialized;
-using System.Globalization;
-using System.Security.Permissions;
-using System.Text;
-using System.Web.Compilation;
-using System.Web.Configuration;
-using System.Web.Util;
-using System.Web.J2EE;
-
-namespace System.Web.UI
-{
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public sealed class PageParser
- {
- public static IHttpHandler GetCompiledPageInstance (string virtualPath,
- string inputFile,
- HttpContext context)
- {
- Type tmpType = PageMapper.GetObjectType(context, virtualPath);
- if (tmpType == null)
- throw new InvalidOperationException ("Documentation page '" + virtualPath + "' not found");
- Object obj = Activator.CreateInstance(tmpType);
- return (IHttpHandler) obj;
- }
-
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web.UI/PageParserFilter.jvm.cs b/mcs/class/System.Web/System.Web.UI/PageParserFilter.jvm.cs
deleted file mode 100644
index b26e2b94d2c..00000000000
--- a/mcs/class/System.Web/System.Web.UI/PageParserFilter.jvm.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-//
-// System.Web.UI.PageParserFilter.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-using System.Collections;
-
-namespace System.Web.UI
-{
- public abstract class PageParserFilter
- {
- protected PageParserFilter () {
- throw new NotImplementedException ();
- }
- public virtual bool AllowCode {
- get {
- throw new NotImplementedException ();
- }
- }
- public virtual int NumberOfControlsAllowed {
- get {
- throw new NotImplementedException ();
- }
- }
- public virtual int NumberOfDirectDependenciesAllowed {
- get {
- throw new NotImplementedException ();
- }
- }
- public virtual int TotalNumberOfDependenciesAllowed {
- get {
- throw new NotImplementedException ();
- }
- }
- protected string VirtualPath {
- get {
- throw new NotImplementedException ();
- }
- }
- public virtual bool AllowBaseType (
- Type baseType
- ) {
- throw new NotImplementedException ();
- }
- public virtual bool AllowControl (Type controlType, ControlBuilder builder) {
- throw new NotImplementedException ();
- }
- public virtual bool AllowServerSideInclude (string includeVirtualPath) {
- throw new NotImplementedException ();
- }
- public virtual bool AllowVirtualReference (string referenceVirtualPath, VirtualReferenceType referenceType) {
- throw new NotImplementedException ();
- }
- public virtual CompilationMode GetCompilationMode (CompilationMode current) {
- throw new NotImplementedException ();
- }
- public virtual void ParseComplete (ControlBuilder rootBuilder) {
- throw new NotImplementedException ();
- }
- public virtual void PreprocessDirective (string directiveName, IDictionary attributes) {
- throw new NotImplementedException ();
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/RootBuilder.jvm.cs b/mcs/class/System.Web/System.Web.UI/RootBuilder.jvm.cs
deleted file mode 100644
index 713434ffc00..00000000000
--- a/mcs/class/System.Web/System.Web.UI/RootBuilder.jvm.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-//
-// System.Web.UI.RootBuilder
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Collections;
-using System.Security.Permissions;
-using System.Web.Compilation;
-using System.Web.UI.HtmlControls;
-
-namespace System.Web.UI {
-
-#if NET_2_0
- public class RootBuilder : TemplateBuilder {
-
- public RootBuilder ()
- {
- }
-#else
- public sealed class RootBuilder : TemplateBuilder {
-#endif
- public RootBuilder (TemplateParser parser)
- {
- throw new NotImplementedException ();
- }
-
- public override Type GetChildControlType (string tagName, IDictionary attribs)
- {
- throw new NotImplementedException ();
-
- }
-
-#if NET_2_0
- // FIXME: it's empty (but not null) when using the new default ctor
- // but I'm not sure when something should gets in...
- public IDictionary BuiltObjects {
- get {
- throw new NotImplementedException ();
- }
- }
-#endif
- }
-}
diff --git a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.jvm.cs b/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.jvm.cs
deleted file mode 100644
index 67e7cc1ff34..00000000000
--- a/mcs/class/System.Web/System.Web.UI/SimpleWebHandlerParser.jvm.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// System.Web.UI.SimpleWebHandlerParser
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2002,2003 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.CodeDom.Compiler;
-using System.Collections;
-using System.IO;
-using System.Reflection;
-using System.Security.Permissions;
-using System.Text;
-using System.Web.Compilation;
-using System.Web.Configuration;
-using System.Web.Util;
-
-namespace System.Web.UI
-{
- public abstract class SimpleWebHandlerParser
- {
- protected SimpleWebHandlerParser (HttpContext context, string virtualPath, string physicalPath)
- {
- throw new NotImplementedException ();
- }
-
- protected Type GetCompiledTypeFromCache ()
- {
- throw new NotImplementedException ();
- }
-
- // Properties
- protected abstract string DefaultDirectiveName { get; }
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateControl.jvm.cs b/mcs/class/System.Web/System.Web.UI/TemplateControl.jvm.cs
deleted file mode 100644
index 28a3f0f7970..00000000000
--- a/mcs/class/System.Web/System.Web.UI/TemplateControl.jvm.cs
+++ /dev/null
@@ -1,699 +0,0 @@
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections;
-using System.ComponentModel;
-using System.Reflection;
-using System.Web;
-using System.IO;
-using System.Web.J2EE;
-using System.Xml;
-using vmw.common;
-using System.Web.Util;
-using System.Collections.Generic;
-
-namespace System.Web.UI {
-
- public abstract class TemplateControl : Control, INamingContainer
- {
- static readonly object abortTransaction = new object ();
- static readonly object commitTransaction = new object ();
- static readonly object error = new object ();
- static readonly string [] methodNames = { "Page_Init",
-#if NET_2_0
- "Page_PreInit",
- "Page_PreLoad",
- "Page_LoadComplete",
- "Page_PreRenderComplete",
- "Page_SaveStateComplete",
- "Page_InitComplete",
-#endif
- "Page_Load",
- "Page_DataBind",
- "Page_PreRender",
- "Page_Disposed",
- "Page_Unload",
- "Page_Error",
- "Page_AbortTransaction",
- "Page_CommitTransaction" };
-
- static readonly object [] EventKeys = {
- Control.InitEvent,
-#if NET_2_0
- Page.PreInitEvent,
- Page.PreLoadEvent,
- Page.LoadCompleteEvent,
- Page.PreRenderCompleteEvent,
- Page.SaveStateCompleteEvent,
- Page.InitCompleteEvent,
-#endif
- Control.LoadEvent,
- Control.DataBindingEvent,
- Control.PreRenderEvent,
- Control.DisposedEvent,
- Control.UnloadEvent,
- error,
- abortTransaction,
- commitTransaction
- };
-
- enum LifeCycleEvent
- {
- Init,
-#if NET_2_0
- PreInit,
- PreLoad,
- LoadComplete,
- PreRenderComplete,
- SaveStateComplete,
- InitComplete,
-#endif
- Load,
- DataBinding,
- PreRender,
- Disposed,
- Unload,
- Error,
- AbortTransaction,
- CommitTransaction
- }
-
- const BindingFlags bflags = BindingFlags.Public |
- BindingFlags.NonPublic |
- BindingFlags.Instance;
-
- byte [] GetResourceBytes (Type type)
- {
- Hashtable table = (Hashtable) AppDomain.CurrentDomain.GetData ("TemplateControl.RES_BYTES");
- if (table == null) {
- return null;
- }
- return (byte []) table [type];
- }
- void SetResourceBytes (Type type, byte [] bytes)
- {
- Hashtable table = (Hashtable) AppDomain.CurrentDomain.GetData ("TemplateControl.RES_BYTES");
- if (table == null) {
- table = new Hashtable ();
- AppDomain.CurrentDomain.SetData ("TemplateControl.RES_BYTES", table);
- }
- table [type] = bytes;
- return;
- }
-
- Hashtable ResourceHash
- {
- get
- {
- Hashtable table = (Hashtable) AppDomain.CurrentDomain.GetData ("TemplateControl.RES_STRING");
- if (table == null) {
- table = new Hashtable ();
- AppDomain.CurrentDomain.SetData ("TemplateControl.RES_STRING", table);
- }
- return table;
- }
- set
- {
- AppDomain.CurrentDomain.SetData ("TemplateControl.RES_STRING", value);
- }
- }
-
- string CachedString (Type type, int offset, int size)
- {
- CacheKey key = new CacheKey (type, offset, size);
-
- string strObj = (string) ResourceHash [key];
- if (strObj == null) {
- char [] tmp = System.Text.Encoding.UTF8.GetChars (GetResourceBytes (this.GetType ()), offset, size);
- strObj = new string (tmp);
-
- Hashtable tmpResourceHash = (Hashtable) ResourceHash.Clone ();
- tmpResourceHash.Add (key, strObj);
- ResourceHash = tmpResourceHash;
- }
- return strObj;
- }
- public virtual string TemplateSourceDirectory_Private
- {
- get { return null; }
- }
-
- #region Constructor
- protected TemplateControl ()
- {
- Construct ();
- }
-
- #endregion
-
- #region Properties
- [EditorBrowsable (EditorBrowsableState.Never)]
- protected virtual int AutoHandlers
- {
- get { return 0; }
- set { }
- }
-
- [EditorBrowsable (EditorBrowsableState.Never)]
- protected virtual bool SupportAutoEvents
- {
- get { return true; }
- }
-
- #endregion
-
- #region Methods
-
- protected virtual void Construct ()
- {
- }
-
- [MonoTODO]
- protected LiteralControl CreateResourceBasedLiteralControl (int offset,
- int size,
- bool fAsciiOnly)
- {
- string str = CachedString (this.GetType (), offset, size);
- return new LiteralControl (str);
- }
-
- sealed class EventMethodMap
- {
- public EventMethodMap (LifeCycleEvent EventKeyIndex, MethodInfo Method, bool NoParameters)
- {
- this.EventKeyIndex = EventKeyIndex;
- this.Method = Method;
- this.NoParameters = NoParameters;
- }
-
- public readonly LifeCycleEvent EventKeyIndex;
- public readonly MethodInfo Method;
- public readonly bool NoParameters;
- }
-
- // This hashtable cashes methods and events found in user code
- const string eventMethodCacheKey = "eventMethodCacheKey";
- static Hashtable EventMethodCache
- {
- get { return (Hashtable) AppDomain.CurrentDomain.GetData (eventMethodCacheKey); }
- set { AppDomain.CurrentDomain.SetData (eventMethodCacheKey, value); }
- }
-
- internal void WireupAutomaticEvents ()
- {
- Type cacheKey = this.GetType ();
- Hashtable eventMethodCache = EventMethodCache;
- ArrayList eventMethodList = eventMethodCache == null ? null : (ArrayList) eventMethodCache [cacheKey];
-
- if (eventMethodList == null) {
- eventMethodList = new ArrayList ();
-
- if (!SupportAutoEvents || !AutoEventWireup)
- return;
-
- Type thisType = typeof (TemplateControl);
- Type voidType = typeof (void);
- Type [] DefaultParams = new Type [] {
- typeof (object),
- typeof (EventArgs) };
-
- LifeCycleEvent[] _pageEvents = new LifeCycleEvent[] {
- LifeCycleEvent.PreInit,
- LifeCycleEvent.PreLoad,
- LifeCycleEvent.LoadComplete,
- LifeCycleEvent.PreRenderComplete,
- LifeCycleEvent.SaveStateComplete,
- LifeCycleEvent.InitComplete
- };
- List<LifeCycleEvent> pageEvents = new List<LifeCycleEvent>(_pageEvents);
-
- bool isPage = Page.GetType().IsAssignableFrom(GetType());
-
- for (int i = 0; i < methodNames.Length; i++) {
-
- // Don't look for page-only events in non-page controls.
- if (!isPage && pageEvents.Contains((LifeCycleEvent)i))
- continue;
-
- string methodName = methodNames [i];
- MethodInfo method;
- bool noParams = false;
- Type type = GetType ();
- do {
- method = type.GetMethod (methodName, bflags, null, DefaultParams, null);
- if (method != null) {
- break;
- }
-
- type = type.BaseType;
- }
- while (type != thisType);
-
- if (method == null) {
- type = GetType ();
- do {
- method = type.GetMethod (methodName, bflags, null, Type.EmptyTypes, null);
- if (method != null) {
- noParams = true;
- break;
- }
-
- type = type.BaseType;
- }
- while (type != thisType);
-
- if (method == null)
- continue;
- }
- if (method.ReturnType != voidType)
- continue;
-
- eventMethodList.Add (new EventMethodMap ((LifeCycleEvent) i, method, noParams));
- }
- // We copy to not lock
-
- Hashtable newEventMethodCache = eventMethodCache == null ? new Hashtable () : (Hashtable) eventMethodCache.Clone ();
- newEventMethodCache [cacheKey] = eventMethodList;
- EventMethodCache = newEventMethodCache;
- }
-
- foreach (EventMethodMap eventMethod in eventMethodList) {
- EventHandler handler = eventMethod.NoParameters ?
- new NoParamsInvoker (this, eventMethod.Method).FakeDelegate :
- (EventHandler)Delegate.CreateDelegate (typeof (EventHandler), this, eventMethod.Method);
-
- object eventKey = EventKeys [(int) eventMethod.EventKeyIndex];
-
- Delegate existing = Events [eventKey];
- if (existing != null && handler.Equals(existing))
- continue;
-
- switch (eventMethod.EventKeyIndex) {
- case LifeCycleEvent.Init:
- Init += handler;
- break;
-#if NET_2_0
- case LifeCycleEvent.PreInit:
- ((Page)this).PreInit += handler;
- break;
- case LifeCycleEvent.PreLoad:
- ((Page) this).PreLoad += handler;
- break;
- case LifeCycleEvent.LoadComplete:
- ((Page) this).LoadComplete += handler;
- break;
- case LifeCycleEvent.PreRenderComplete:
- ((Page) this).PreRenderComplete += handler;
- break;
- case LifeCycleEvent.SaveStateComplete:
- ((Page) this).SaveStateComplete += handler;
- break;
- case LifeCycleEvent.InitComplete:
- ((Page) this).InitComplete += handler;
- break;
-#endif
- case LifeCycleEvent.Load:
- Load += handler;
- break;
- case LifeCycleEvent.DataBinding:
- DataBinding += handler;
- break;
- case LifeCycleEvent.PreRender:
- PreRender += handler;
- break;
- case LifeCycleEvent.Disposed:
- Disposed += handler;
- break;
- case LifeCycleEvent.Unload:
- Unload += handler;
- break;
- case LifeCycleEvent.Error:
- Error += handler;
- break;
- case LifeCycleEvent.AbortTransaction:
- AbortTransaction += handler;
- break;
- case LifeCycleEvent.CommitTransaction:
- CommitTransaction += handler;
- break;
- }
- }
- }
-
- [EditorBrowsable (EditorBrowsableState.Never)]
- protected virtual void FrameworkInitialize ()
- {
- }
-
- Type GetTypeFromControlPath (string virtualPath)
- {
- if (virtualPath == null)
- throw new ArgumentNullException ("virtualPath");
-
- string vpath = UrlUtils.Combine (TemplateSourceDirectory, virtualPath);
- return PageMapper.GetObjectType (Context, vpath);
- }
-
- public Control LoadControl (string virtualPath)
- {
-#if NET_2_0
- if (virtualPath == null)
- throw new ArgumentNullException ("virtualPath");
-#else
- if (virtualPath == null)
- throw new HttpException ("virtualPath is null");
-#endif
- Type type = GetTypeFromControlPath (virtualPath);
- return LoadControl (type, null);
- }
-
- public Control LoadControl (Type type, object [] parameters)
- {
- object [] attrs = type.GetCustomAttributes (typeof (PartialCachingAttribute), true);
- if (attrs != null && attrs.Length == 1) {
- PartialCachingAttribute attr = (PartialCachingAttribute) attrs [0];
- PartialCachingControl ctrl = new PartialCachingControl (type, parameters);
- ctrl.VaryByParams = attr.VaryByParams;
- ctrl.VaryByControls = attr.VaryByControls;
- ctrl.VaryByCustom = attr.VaryByCustom;
- return ctrl;
- }
-
- object control = Activator.CreateInstance (type, parameters);
- if (control is UserControl)
- ((UserControl) control).InitializeAsUserControl (Page);
-
- return (Control) control;
- }
-
- public ITemplate LoadTemplate (string virtualPath)
- {
- Type t = GetTypeFromControlPath (virtualPath);
- return new SimpleTemplate (t);
- }
-
- protected virtual void OnAbortTransaction (EventArgs e)
- {
- EventHandler eh = Events [abortTransaction] as EventHandler;
- if (eh != null)
- eh (this, e);
- }
-
- protected virtual void OnCommitTransaction (EventArgs e)
- {
- EventHandler eh = Events [commitTransaction] as EventHandler;
- if (eh != null)
- eh (this, e);
- }
-
- protected virtual void OnError (EventArgs e)
- {
- EventHandler eh = Events [error] as EventHandler;
- if (eh != null)
- eh (this, e);
- }
-
- [MonoNotSupported ("Not supported")]
- public Control ParseControl (string content)
- {
- throw new NotSupportedException ();
- }
-
- [MonoLimitation ("Always returns false")]
- public virtual bool TestDeviceFilter (string filterName)
- {
- return false;
- }
-
- [MonoTODO]
- [EditorBrowsable (EditorBrowsableState.Never)]
- public static object ReadStringResource (Type t)
- {
- return t;
- }
-#if NET_2_0
- [MonoTODO ("is this correct?")]
- public Object ReadStringResource ()
- {
- return this.GetType ();
- }
-#endif
- [MonoTODO]
- [EditorBrowsable (EditorBrowsableState.Never)]
- protected void SetStringResourcePointer (object stringResourcePointer,
- int maxResourceOffset)
- {
- if (GetResourceBytes (this.GetType ()) != null)
- return;
-
- java.lang.Class c = vmw.common.TypeUtils.ToClass (stringResourcePointer);
- java.lang.ClassLoader contextClassLoader = c.getClassLoader ();
-
- //TODO:move this code to page mapper
- string assemblyName = PageMapper.GetAssemblyResource (Context, VirtualPathUtility.ToAbsolute (AppRelativeVirtualPath));
- if (assemblyName == null)
- throw new HttpException (404, "The requested resource (" + this.AppRelativeVirtualPath + ") is not available.");
-
- java.io.InputStream inputStream = contextClassLoader.getResourceAsStream (assemblyName);
-
- System.IO.Stream strim = null;
- if (inputStream == null) {
- string descPath = String.Join ("/", new string [] { "assemblies", this.GetType ().Assembly.GetName ().Name, assemblyName });
- try {
- strim = new StreamReader (HttpContext.Current.Request.MapPath ("/" + descPath)).BaseStream;
- }
- catch (Exception ex) {
- throw new System.IO.IOException ("couldn't open resource file:" + assemblyName, ex);
- }
- if (strim == null)
- throw new System.IO.IOException ("couldn't open resource file:" + assemblyName);
- }
-
- try {
- if (strim == null)
- strim = (System.IO.Stream) vmw.common.IOUtils.getStream (inputStream);
- int capacity = (int) strim.Length;
- byte [] resourceBytes = new byte [capacity];
- strim.Read (resourceBytes, 0, capacity);
- SetResourceBytes (this.GetType (), resourceBytes);
- }
- catch (Exception e) {
- throw new HttpException ("problem with dll.ghres file", e);
- }
- finally {
- if (strim != null)
- strim.Close ();
- if (inputStream != null)
- inputStream.close ();
- }
- }
-
- [MonoTODO]
- [EditorBrowsable (EditorBrowsableState.Never)]
- protected void WriteUTF8ResourceString (HtmlTextWriter output, int offset,
- int size, bool fAsciiOnly)
- {
- string str = CachedString (this.GetType (), offset, size);
- output.Write (str);
- }
-
- #endregion
-
- #region Events
-
- [WebSysDescription ("Raised when the user aborts a transaction.")]
- public event EventHandler AbortTransaction
- {
- add { Events.AddHandler (abortTransaction, value); }
- remove { Events.RemoveHandler (abortTransaction, value); }
- }
-
- [WebSysDescription ("Raised when the user initiates a transaction.")]
- public event EventHandler CommitTransaction
- {
- add { Events.AddHandler (commitTransaction, value); }
- remove { Events.RemoveHandler (commitTransaction, value); }
- }
-
- [WebSysDescription ("Raised when an exception occurs that cannot be handled.")]
- public event EventHandler Error
- {
- add { Events.AddHandler (error, value); }
- remove { Events.RemoveHandler (error, value); }
- }
-
- #endregion
-
- class SimpleTemplate : ITemplate
- {
- Type type;
-
- public SimpleTemplate (Type type)
- {
- this.type = type;
- }
-
- public void InstantiateIn (Control control)
- {
- Control template = Activator.CreateInstance (type) as Control;
- template.SetBindingContainer (false);
- control.Controls.Add (template);
- }
- }
-
- sealed class CacheKey
- {
- readonly Type _type;
- readonly int _offset;
- readonly int _size;
-
- public CacheKey (Type type, int offset, int size)
- {
- _type = type;
- _offset = offset;
- _size = size;
- }
-
- public override int GetHashCode ()
- {
- return _type.GetHashCode () ^ _offset ^ _size;
- }
-
- public override bool Equals (object obj)
- {
- if (obj == null || !(obj is CacheKey))
- return false;
-
- CacheKey key = (CacheKey) obj;
- return key._type == _type && key._offset == _offset && key._size == _size;
- }
- }
-
-#if NET_2_0
-
- string _appRelativeVirtualPath = null;
-
- public string AppRelativeVirtualPath
- {
- get { return _appRelativeVirtualPath; }
- set
- {
- if (value == null)
- throw new ArgumentNullException ("value");
- if (!UrlUtils.IsRooted (value) && !(value.Length > 0 && value [0] == '~'))
- throw new ArgumentException ("The path that is set is not rooted");
- _appRelativeVirtualPath = value;
-
- int lastSlash = _appRelativeVirtualPath.LastIndexOf ('/');
- AppRelativeTemplateSourceDirectory = (lastSlash > 0) ? _appRelativeVirtualPath.Substring (0, lastSlash + 1) : "~/";
- }
- }
-
- internal override TemplateControl TemplateControlInternal {
- get { return this; }
- }
-
- protected internal object Eval (string expression)
- {
- return DataBinder.Eval (Page.GetDataItem (), expression);
- }
-
- protected internal string Eval (string expression, string format)
- {
- return DataBinder.Eval (Page.GetDataItem (), expression, format);
- }
-
- protected internal object XPath (string xpathexpression)
- {
- return XPathBinder.Eval (Page.GetDataItem (), xpathexpression);
- }
-
- protected internal object XPath (string xpathexpression, IXmlNamespaceResolver resolver)
- {
- return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, null, resolver);
- }
-
- protected internal string XPath (string xpathexpression, string format)
- {
- return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, format);
- }
-
- protected internal string XPath (string xpathexpression, string format, IXmlNamespaceResolver resolver)
- {
- return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, format, resolver);
- }
-
- protected internal IEnumerable XPathSelect (string xpathexpression)
- {
- return XPathBinder.Select (Page.GetDataItem (), xpathexpression);
- }
-
- protected internal IEnumerable XPathSelect (string xpathexpression, IXmlNamespaceResolver resolver)
- {
- return XPathBinder.Select (Page.GetDataItem (), xpathexpression, resolver);
- }
-
- protected object GetGlobalResourceObject (string className, string resourceKey)
- {
- return HttpContext.GetGlobalResourceObject (className, resourceKey);
- }
-
- protected object GetGlobalResourceObject (string className, string resourceKey, Type objType, string propName)
- {
- return ConvertResource (GetGlobalResourceObject (className, resourceKey), objType, propName);
- }
-
- protected Object GetLocalResourceObject (string resourceKey)
- {
- return HttpContext.GetLocalResourceObject (Context.Request.Path, resourceKey);
- }
-
- protected Object GetLocalResourceObject (string resourceKey, Type objType, string propName)
- {
- return ConvertResource (GetLocalResourceObject (resourceKey), objType, propName);
- }
-
- static Object ConvertResource (Object resource, Type objType, string propName) {
- if (resource == null)
- return resource;
-
- PropertyDescriptor pdesc = TypeDescriptor.GetProperties (objType) [propName];
- if (pdesc == null)
- return resource;
-
- TypeConverter converter = pdesc.Converter;
- if (converter == null)
- return resource;
-
- return resource is string ?
- converter.ConvertFromInvariantString ((string) resource) :
- converter.ConvertFrom (resource);
- }
-
-#endif
-
- }
-}
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateControlParser.jvm.cs b/mcs/class/System.Web/System.Web.UI/TemplateControlParser.jvm.cs
deleted file mode 100644
index 10a6fb45cc1..00000000000
--- a/mcs/class/System.Web/System.Web.UI/TemplateControlParser.jvm.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// System.Web.UI.TemplateControlParser
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Collections;
-using System.IO;
-using System.Reflection;
-using System.Security.Permissions;
-using System.Web.Compilation;
-using System.Web.Configuration;
-using System.Web.Util;
-
-namespace System.Web.UI {
- public abstract class TemplateControlParser
-#if NET_2_0
- : BaseTemplateParser
-#else
- : TemplateParser
-#endif
- {
- protected TemplateControlParser ()
- {
- throw new NotImplementedException ();
- }
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web.UI/TemplateParser.jvm.cs b/mcs/class/System.Web/System.Web.UI/TemplateParser.jvm.cs
deleted file mode 100644
index 3b3a8b676da..00000000000
--- a/mcs/class/System.Web/System.Web.UI/TemplateParser.jvm.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// System.Web.UI.TemplateParser
-//
-// Authors:
-// Duncan Mak (duncan@ximian.com)
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2002,2003 Ximian, Inc. (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.CodeDom.Compiler;
-using System.Collections;
-using System.ComponentModel;
-using System.Globalization;
-using System.IO;
-using System.Reflection;
-using System.Security.Permissions;
-using System.Web.Compilation;
-using System.Web.Configuration;
-using System.Web.Util;
-
-#if NET_2_0
-using System.Collections.Generic;
-#endif
-
-namespace System.Web.UI {
-
- public abstract class TemplateParser : BaseParser
- {
- protected abstract Type CompileIntoType ();
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.jvm.cs b/mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.jvm.cs
deleted file mode 100644
index 391145a1305..00000000000
--- a/mcs/class/System.Web/System.Web.UI/TemplatePropertyEntry.jvm.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// System.Web.UI.TemplatePropertyEntry.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-namespace System.Web.UI
-{
- public class TemplatePropertyEntry : BuilderPropertyEntry
- {
- public TemplatePropertyEntry()
- {
- throw new NotImplementedException ();
- }
- public bool BindableTemplate { get { throw new NotImplementedException (); } }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ThemeProvider.jvm.cs b/mcs/class/System.Web/System.Web.UI/ThemeProvider.jvm.cs
deleted file mode 100644
index 0ef47297aec..00000000000
--- a/mcs/class/System.Web/System.Web.UI/ThemeProvider.jvm.cs
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// System.Web.UI.ThemeProvider.cs
-//
-// Authors:
-// Chris Toshok (toshok@ximian.com)
-//
-// (C) 2006 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-
-using System.Collections;
-using System.Collections.Specialized;
-using System.ComponentModel;
-using System.ComponentModel.Design;
-
-namespace System.Web.UI {
-
- public sealed class ThemeProvider
- {
- public ThemeProvider (IDesignerHost host,
- string name,
- string themeDefinition,
- string[] cssFiles,
- string themePath)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO("Not implemented")]
- public SkinBuilder GetSkinBuilder (Control control)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO ("Not implemented")]
- public IDictionary GetSkinControlBuildersForControlType (Type type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO ("Not implemented")]
- public ICollection GetSkinsForControl (Type type)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO ("Not implemented")]
- public int ContentHashCode {
- get { throw new NotImplementedException (); }
- }
-
- public ICollection CssFiles {
- get { throw new NotImplementedException (); }
- }
-
- public IDesignerHost DesignerHost {
- get { throw new NotImplementedException (); }
- }
-
- public string ThemeName {
- get { throw new NotImplementedException (); }
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/VerificationAttribute.jvm.cs b/mcs/class/System.Web/System.Web.UI/VerificationAttribute.jvm.cs
deleted file mode 100644
index b021b3fca71..00000000000
--- a/mcs/class/System.Web/System.Web.UI/VerificationAttribute.jvm.cs
+++ /dev/null
@@ -1,114 +0,0 @@
-//
-// System.Web.UI.VerificationAttribute.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-namespace System.Web.UI
-{
- [AttributeUsageAttribute (AttributeTargets.Class | AttributeTargets.Property, AllowMultiple = true)]
- public sealed class VerificationAttribute : Attribute
- {
- public VerificationAttribute (string guideline,
- string checkpoint,
- VerificationReportLevel reportLevel,
- int priority,
- string message) {
- }
- public VerificationAttribute (string guideline,
- string checkpoint,
- VerificationReportLevel reportLevel,
- int priority,
- string message,
- VerificationRule rule,
- string conditionalProperty) {
- }
- public VerificationAttribute (string guideline,
- string checkpoint,
- VerificationReportLevel reportLevel,
- int priority,
- string message,
- VerificationRule rule,
- string conditionalProperty,
- VerificationConditionalOperator conditionalOperator,
- string conditionalValue,
- string guidelineUrl) {
- }
- public string Checkpoint {
- get {
- throw new NotImplementedException ();
- }
- }
- public string ConditionalProperty {
- get {
- throw new NotImplementedException ();
- }
- }
- public string ConditionalValue {
- get {
- throw new NotImplementedException ();
- }
- }
- public string Guideline {
- get {
- throw new NotImplementedException ();
- }
- }
- public string GuidelineUrl {
- get {
- throw new NotImplementedException ();
- }
- }
- public string Message {
- get {
- throw new NotImplementedException ();
- }
- }
- public int Priority {
- get {
- throw new NotImplementedException ();
- }
- }
- public VerificationConditionalOperator VerificationConditionalOperator {
- get {
- throw new NotImplementedException ();
- }
- }
- public VerificationReportLevel VerificationReportLevel {
- get {
- throw new NotImplementedException ();
- }
- }
- public VerificationRule VerificationRule {
- get {
- throw new NotImplementedException ();
- }
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/ViewStateException .jvm.cs b/mcs/class/System.Web/System.Web.UI/ViewStateException .jvm.cs
deleted file mode 100644
index 91f8312ff95..00000000000
--- a/mcs/class/System.Web/System.Web.UI/ViewStateException .jvm.cs
+++ /dev/null
@@ -1,87 +0,0 @@
-//
-// System.Web.UI.ViewStateException.cs
-//
-// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0
-using System.Runtime.Serialization;
-
-namespace System.Web.UI
-{
- [SerializableAttribute]
- public sealed class ViewStateException : Exception, ISerializable
- {
- public ViewStateException () {
- throw new NotImplementedException ();
- }
- public bool IsConnected {
- get {
- throw new NotImplementedException ();
- }
- }
- public override string Message {
- get {
- throw new NotImplementedException ();
- }
- }
- public string Path {
- get {
- throw new NotImplementedException ();
- }
- }
- public string PersistedState {
- get {
- throw new NotImplementedException ();
- }
- }
- public string Referer {
- get {
- throw new NotImplementedException ();
- }
- }
- public string RemoteAddress {
- get {
- throw new NotImplementedException ();
- }
- }
- public string RemotePort {
- get {
- throw new NotImplementedException ();
- }
- }
- public string UserAgent {
- get {
- throw new NotImplementedException ();
- }
- }
- public override void GetObjectData (SerializationInfo info, StreamingContext context) {
- throw new NotImplementedException ();
- }
- }
-}
-#endif
diff --git a/mcs/class/System.Web/System.Web.UI/WebServiceParser.jvm.cs b/mcs/class/System.Web/System.Web.UI/WebServiceParser.jvm.cs
deleted file mode 100644
index 1bf88292b4e..00000000000
--- a/mcs/class/System.Web/System.Web.UI/WebServiceParser.jvm.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// System.Web.UI.WebServiceParser
-//
-// Authors:
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// (C) 2002 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Security.Permissions;
-using System.Web.Compilation;
-using System.Web.J2EE;
-
-namespace System.Web.UI {
-
- // CAS
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- public class WebServiceParser
- {
- public static Type GetCompiledType (string inputFile, HttpContext context)
- {
- return PageMapper.GetObjectType (context, inputFile);
- }
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web.csproj b/mcs/class/System.Web/System.Web.csproj
deleted file mode 100644
index 2d72589f18b..00000000000
--- a/mcs/class/System.Web/System.Web.csproj
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Default.targets"/>
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <NoWarn>612,618</NoWarn>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0,INSIDE_SYSTEM_WEB</DefineConstants>
- </PropertyGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <Reference Include="System"/>
- <Reference Include="System.Drawing"/>
- <Reference Include="System.Data"/>
- <Reference Include="System.Xml"/>
- <Reference Include="System.Configuration"/>
- <Reference Include="System.EnterpriseServices"/>
- <Reference Include="Mono.Data.Sqlite">
- <HintPath>..\lib\net_2_0\Mono.Data.Sqlite.dll</HintPath>
- </Reference>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web/System.Web/BaseParamsCollection.cs b/mcs/class/System.Web/System.Web/BaseParamsCollection.cs
index 67773409477..fa996942545 100644
--- a/mcs/class/System.Web/System.Web/BaseParamsCollection.cs
+++ b/mcs/class/System.Web/System.Web/BaseParamsCollection.cs
@@ -69,15 +69,11 @@ namespace System.Web
public override string Get (string name)
{
if (!_loaded) {
-#if TARGET_JVM
- return InternalGet (name);
-#else
string s = InternalGet (name);
if (s != null && s.Length > 0)
return s;
LoadInfo ();
-#endif
}
return base.Get (name);
diff --git a/mcs/class/System.Web/System.Web/CapabilitiesLoader.cs b/mcs/class/System.Web/System.Web/CapabilitiesLoader.cs
index 46ef73cda87..d44c0878a26 100644
--- a/mcs/class/System.Web/System.Web/CapabilitiesLoader.cs
+++ b/mcs/class/System.Web/System.Web/CapabilitiesLoader.cs
@@ -51,11 +51,7 @@ namespace System.Web
BrowserData parent;
string text;
string pattern;
-#if TARGET_JVM
- java.util.regex.Pattern regex;
-#else
Regex regex;
-#endif
ListDictionary data;
public BrowserData (string pattern)
@@ -153,17 +149,9 @@ namespace System.Web
lock (this_lock) {
if (regex == null)
-#if TARGET_JVM
- regex = java.util.regex.Pattern.compile (pattern);
-#else
regex = new Regex (pattern);
-#endif
}
-#if TARGET_JVM
- return regex.matcher ((java.lang.CharSequence) (object) expression).matches ();
-#else
return regex.Match (expression).Success;
-#endif
}
}
@@ -173,46 +161,9 @@ namespace System.Web
static Hashtable defaultCaps;
static readonly object lockobj = new object ();
-#if TARGET_JVM
- static bool loaded {
- get {
- return alldata != null;
- }
- set {
- if (alldata == null)
- alldata = new ArrayList ();
- }
- }
-
- const string alldataKey = "System.Web.CapabilitiesLoader.alldata";
- static ICollection alldata {
- get {
- return (ICollection) AppDomain.CurrentDomain.GetData (alldataKey);
- }
- set {
- AppDomain.CurrentDomain.SetData (alldataKey, value);
- }
- }
-
- const string userAgentsCacheKey = "System.Web.CapabilitiesLoader.userAgentsCache";
- static Hashtable userAgentsCache {
- get {
- lock (typeof (CapabilitiesLoader)) {
- Hashtable agentsCache = (Hashtable) AppDomain.CurrentDomain.GetData (userAgentsCacheKey);
- if (agentsCache == null) {
- agentsCache = Hashtable.Synchronized (new Hashtable (userAgentsCacheSize + 10));
- AppDomain.CurrentDomain.SetData (userAgentsCacheKey, agentsCache);
- }
-
- return agentsCache;
- }
- }
- }
-#else
static volatile bool loaded;
static ICollection alldata;
static Hashtable userAgentsCache = Hashtable.Synchronized(new Hashtable(userAgentsCacheSize+10));
-#endif
CapabilitiesLoader () {}
diff --git a/mcs/class/System.Web/System.Web/HttpApplication.cs b/mcs/class/System.Web/System.Web/HttpApplication.cs
index 47979167629..efa4432011a 100644
--- a/mcs/class/System.Web/System.Web/HttpApplication.cs
+++ b/mcs/class/System.Web/System.Web/HttpApplication.cs
@@ -1277,10 +1277,6 @@ namespace System.Web
context.Handler = handler;
context.PushHandler (handler);
} catch (FileNotFoundException fnf){
-#if TARGET_JVM
- Console.WriteLine ("$$$$$$$$$$:Sys.Web Pipeline");
- Console.WriteLine (fnf.ToString ());
-#endif
if (context.Request.IsLocal)
ProcessError (HttpException.NewWithCode (404,
String.Format ("File not found {0}", fnf.FileName),
@@ -1510,9 +1506,7 @@ namespace System.Web
th.CurrentUICulture = new_app_culture;
}
-#if !TARGET_JVM
prev_user = Thread.CurrentPrincipal;
-#endif
}
void PostDone ()
@@ -1523,10 +1517,8 @@ namespace System.Web
}
Thread th = Thread.CurrentThread;
-#if !TARGET_JVM
if (Thread.CurrentPrincipal != prev_user)
Thread.CurrentPrincipal = prev_user;
-#endif
if (prev_appui_culture != null && prev_appui_culture != th.CurrentUICulture)
th.CurrentUICulture = prev_appui_culture;
if (prev_app_culture != null && prev_app_culture != th.CurrentCulture)
@@ -1672,11 +1664,7 @@ namespace System.Web
cultures [0] = Thread.CurrentThread.CurrentCulture;
cultures [1] = Thread.CurrentThread.CurrentUICulture;
-#if TARGET_JVM
- if (true)
-#else
if (Thread.CurrentThread.IsThreadPoolThread)
-#endif
Start (null);
else
ThreadPool.QueueUserWorkItem (x => {
@@ -1816,7 +1804,6 @@ namespace System.Web
if (type != null)
return type;
-#if !TARGET_JVM
Assembly [] assemblies = AppDomain.CurrentDomain.GetAssemblies ();
foreach (Assembly ass in assemblies) {
type = ass.GetType (typeName, false);
@@ -1845,7 +1832,6 @@ namespace System.Web
if (type != null)
return type;
-#endif
if (throwOnMissing)
throw new TypeLoadException (String.Format ("Type '{0}' cannot be found", typeName), loadException);
diff --git a/mcs/class/System.Web/System.Web/HttpApplication.jvm.cs b/mcs/class/System.Web/System.Web/HttpApplication.jvm.cs
deleted file mode 100644
index c356aa9bb7c..00000000000
--- a/mcs/class/System.Web/System.Web/HttpApplication.jvm.cs
+++ /dev/null
@@ -1,1714 +0,0 @@
-//
-// System.Web.HttpApplication.cs
-//
-// Author:
-// Miguel de Icaza (miguel@novell.com)
-// Gonzalo Paniagua (gonzalo@ximian.com)
-//
-//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// The Application Processing Pipeline.
-//
-// The Http application pipeline implemented in this file is a
-// beautiful thing. The application pipeline invokes a number of
-// hooks at various stages of the processing of a request. These
-// hooks can be either synchronous or can be asynchronous.
-//
-// The pipeline must ensure that every step is completed before
-// moving to the next step. A trivial thing for synchronous
-// hooks, but asynchronous hooks introduce an extra layer of
-// complexity: when the hook is invoked, the thread must
-// relinquish its control so that the thread can be reused in
-// another operation while waiting.
-//
-// To implement this functionality we used C# iterators manually;
-// we drive the pipeline by executing the various hooks from the
-// `RunHooks' routine which is an enumerator that will yield the
-// value `false' if execution must proceed or `true' if execution
-// must be stopped.
-//
-// By yielding values we can suspend execution of RunHooks.
-//
-// Special attention must be given to `in_begin' and `must_yield'
-// variables. These are used in the case that an async hook
-// completes synchronously as its important to not yield in that
-// case or we would hang.
-//
-// Many of Mono modules used to be declared async, but they would
-// actually be completely synchronous, this might resurface in the
-// future with other modules.
-//
-// TODO:
-// Events Disposed
-//
-
-using System.IO;
-using System.Collections;
-using System.ComponentModel;
-using System.Globalization;
-using System.Security.Permissions;
-using System.Security.Principal;
-using System.Threading;
-using System.Web.Configuration;
-using System.Web.SessionState;
-using System.Web.UI;
-
-namespace System.Web {
-
- // CAS
- [AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- [AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
- // attributes
- [ToolboxItem(false)]
- public class HttpApplication : IHttpAsyncHandler, IHttpHandler, IComponent, IDisposable {
- HttpContext context;
- HttpSessionState session;
- ISite isite;
-
- // The source, and the exposed API (cache).
- HttpModuleCollection modcoll;
-
- string assemblyLocation;
-
- //
- // The factory for the handler currently running.
- //
- IHttpHandlerFactory factory;
-
- //
- // Whether the pipeline should be stopped
- //
- bool stop_processing;
-
- //
- // The Pipeline
- //
- IEnumerator pipeline;
-
- // To flag when we are done processing a request from BeginProcessRequest.
- ManualResetEvent done;
-
- // The current IAsyncResult for the running async request handler in the pipeline
- AsyncRequestState begin_iar;
-
- // Tracks the current AsyncInvocation being dispatched
- AsyncInvoker current_ai;
-
- // We don't use the EventHandlerList here, but derived classes might do
- EventHandlerList events;
-
- // Culture and IPrincipal
- CultureInfo app_culture;
- CultureInfo appui_culture;
- CultureInfo prev_app_culture;
- CultureInfo prev_appui_culture;
- IPrincipal prev_user;
-
- //
- // These are used to detect the case where the EndXXX method is invoked
- // from within the BeginXXXX delegate, so we detect whether we kick the
- // pipeline from here, or from the the RunHook routine
- //
- bool must_yield;
- bool in_begin;
-
- public HttpApplication ()
- {
- done = new ManualResetEvent (false);
- }
-
- internal void InitOnce (bool full_init)
- {
- lock (this) {
- if (modcoll != null)
- return;
-
-#if NET_2_0
- HttpModulesSection modules;
- modules = (HttpModulesSection) WebConfigurationManager.GetSection ("system.web/httpModules");
-#else
- ModulesConfiguration modules;
-
- modules = (ModulesConfiguration) HttpContext.GetAppConfig ("system.web/httpModules");
-#endif
-
- modcoll = modules.LoadModules (this);
-
- if (full_init)
- HttpApplicationFactory.AttachEvents (this);
-
-#if NET_2_0
- GlobalizationSection cfg;
- cfg = (GlobalizationSection) WebConfigurationManager.GetSection ("system.web/globalization");
- app_culture = cfg.GetCulture();
- appui_culture = cfg.GetUICulture();
-#else
- GlobalizationConfiguration cfg;
- cfg = GlobalizationConfiguration.GetInstance (null);
- if (cfg != null) {
- app_culture = cfg.Culture;
- appui_culture = cfg.UICulture;
- }
-#endif
- }
- }
-
- internal string AssemblyLocation {
- get {
- if (assemblyLocation == null)
- assemblyLocation = GetType ().Assembly.Location;
- return assemblyLocation;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public HttpApplicationState Application {
- get {
- return HttpApplicationFactory.ApplicationState;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public HttpContext Context {
- get {
- return context;
- }
- }
-
- protected EventHandlerList Events {
- get {
- if (events == null)
- events = new EventHandlerList ();
-
- return events;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public HttpModuleCollection Modules {
- [AspNetHostingPermission (SecurityAction.Demand, Level = AspNetHostingPermissionLevel.High)]
- get {
- if (modcoll == null)
- modcoll = new HttpModuleCollection ();
-
- return modcoll;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public HttpRequest Request {
- get {
- if (context == null)
- throw new HttpException (Locale.GetText ("No context is available."));
-
- if (false == HttpApplicationFactory.ContextAvailable)
- throw new HttpException (Locale.GetText ("Request is not available in this context."));
-
- return context.Request;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public HttpResponse Response {
- get {
- if (context == null)
- throw new HttpException (Locale.GetText ("No context is available."));
-
- if (false == HttpApplicationFactory.ContextAvailable)
- throw new HttpException (Locale.GetText ("Response is not available in this context."));
-
- return context.Response;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public HttpServerUtility Server {
- get {
- if (context != null)
- return context.Server;
-
- //
- // This is so we can get the Server and call a few methods
- // which are not context sensitive, see HttpServerUtilityTest
- //
- return new HttpServerUtility ((HttpContext) null);
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public HttpSessionState Session {
- get {
- // Only used for Session_End
- if (session != null)
- return session;
-
- if (context == null)
- throw new HttpException (Locale.GetText ("No context is available."));
- return context.Session;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public virtual ISite Site {
- get {
- return isite;
- }
-
- set {
- isite = value;
- }
- }
-
- [Browsable (false)]
- [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public IPrincipal User {
- get {
- if (context == null)
- throw new HttpException (Locale.GetText ("No context is available."));
- if (context.User == null)
- throw new HttpException (Locale.GetText ("No currently authenticated user."));
-
- return context.User;
- }
- }
-
- public virtual event EventHandler Disposed;
- public virtual event EventHandler Error;
-
- public event EventHandler PreSendRequestHeaders;
- internal void TriggerPreSendRequestHeaders ()
- {
- if (PreSendRequestHeaders != null)
- PreSendRequestHeaders (this, EventArgs.Empty);
- }
-
- public event EventHandler PreSendRequestContent;
- internal void TriggerPreSendRequestContent ()
- {
- if (PreSendRequestContent != null)
- PreSendRequestContent (this, EventArgs.Empty);
- }
-
- public event EventHandler AcquireRequestState;
- public void AddOnAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- AcquireRequestState += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler AuthenticateRequest;
- public void AddOnAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- AuthenticateRequest += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler AuthorizeRequest;
- public void AddOnAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- AuthorizeRequest += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler BeginRequest;
- public void AddOnBeginRequestAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- BeginRequest += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler EndRequest;
- public void AddOnEndRequestAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- EndRequest += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PostRequestHandlerExecute;
- public void AddOnPostRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- PostRequestHandlerExecute += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PreRequestHandlerExecute;
- public void AddOnPreRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- PreRequestHandlerExecute += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler ReleaseRequestState;
- public void AddOnReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- ReleaseRequestState += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler ResolveRequestCache;
- public void AddOnResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- ResolveRequestCache += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler UpdateRequestCache;
- public void AddOnUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh);
- UpdateRequestCache += new EventHandler (invoker.Invoke);
- }
-
-#if NET_2_0
- public event EventHandler PostAuthenticateRequest;
- public void AddOnPostAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AddOnPostAuthenticateRequestAsync (bh, eh, null);
- }
-
- public void AddOnPostAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostAuthenticateRequest += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PostAuthorizeRequest;
- public void AddOnPostAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AddOnPostAuthorizeRequestAsync (bh, eh, null);
- }
-
- public void AddOnPostAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostAuthorizeRequest += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PostResolveRequestCache;
- public void AddOnPostResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AddOnPostResolveRequestCacheAsync (bh, eh, null);
- }
-
- public void AddOnPostResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostResolveRequestCache += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PostMapRequestHandler;
- public void AddOnPostMapRequestHandlerAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AddOnPostMapRequestHandlerAsync (bh, eh, null);
- }
-
- public void AddOnPostMapRequestHandlerAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostMapRequestHandler += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PostAcquireRequestState;
- public void AddOnPostAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AddOnPostAcquireRequestStateAsync (bh, eh, null);
- }
-
- public void AddOnPostAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostAcquireRequestState += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PostReleaseRequestState;
- public void AddOnPostReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AddOnPostReleaseRequestStateAsync (bh, eh, null);
- }
-
- public void AddOnPostReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostReleaseRequestState += new EventHandler (invoker.Invoke);
- }
-
- public event EventHandler PostUpdateRequestCache;
- public void AddOnPostUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh)
- {
- AddOnPostUpdateRequestCacheAsync (bh, eh, null);
- }
-
- public void AddOnPostUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostUpdateRequestCache += new EventHandler (invoker.Invoke);
- }
-
- //
- // The new overloads that take a data parameter
- //
- public void AddOnAcquireRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- AcquireRequestState += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnAuthenticateRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- AuthenticateRequest += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnAuthorizeRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- AuthorizeRequest += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnBeginRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- BeginRequest += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnEndRequestAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- EndRequest += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnPostRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PostRequestHandlerExecute += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnPreRequestHandlerExecuteAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- PreRequestHandlerExecute += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnReleaseRequestStateAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- ReleaseRequestState += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnResolveRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- ResolveRequestCache += new EventHandler (invoker.Invoke);
- }
-
- public void AddOnUpdateRequestCacheAsync (BeginEventHandler bh, EndEventHandler eh, object data)
- {
- AsyncInvoker invoker = new AsyncInvoker (bh, eh, data);
- UpdateRequestCache += new EventHandler (invoker.Invoke);
- }
-#endif
-
- internal event EventHandler DefaultAuthentication;
-
- //
- // Bypass all the event on the Http pipeline and go directly to EndRequest
- //
- public void CompleteRequest ()
- {
- stop_processing = true;
- }
-
- internal bool RequestCompleted {
- set { stop_processing = value; }
- }
-
- public virtual void Dispose ()
- {
- if (modcoll != null) {
- for (int i = modcoll.Count; i >= 0; i--) {
- modcoll.Get (i).Dispose ();
- }
- modcoll = null;
- }
-
- if (Disposed != null)
- Disposed (this, EventArgs.Empty);
-
- done.Close ();
- done = null;
- }
-
- public virtual string GetVaryByCustomString (HttpContext context, string custom)
- {
- if (custom == null) // Sigh
- throw new NullReferenceException ();
-
- if (0 == String.Compare (custom, "browser", true, CultureInfo.InvariantCulture))
- return context.Request.Browser.Type;
-
- return null;
- }
-
- //
- // If we catch an error, queue this error
- //
- void ProcessError (Exception e)
- {
- bool first = context.Error == null;
-
- context.AddError (e);
- if (first){
- if (Error != null){
- try {
- Error (this, EventArgs.Empty);
- } catch (ThreadAbortException ee){
- // This happens on Redirect() or End()
- Thread.ResetAbort ();
- } catch (Exception ee){
- context.AddError (ee);
- }
- }
- }
- stop_processing = true;
- }
-
- //
- // Ticks the clock: next step on the pipeline.
- //
- void Tick ()
- {
- try {
- if (pipeline.MoveNext ()){
- if ((bool)pipeline.Current)
- PipelineDone ();
- }
- } catch (Exception e) {
- Console.WriteLine ("Tick caught an exception that has not been propagated:\n" + e);
- }
- }
-
- void Resume ()
- {
- if (in_begin)
- must_yield = false;
- else
- Tick ();
- }
-
- //
- // Invoked when our async callback called from RunHooks completes,
- // we restart the pipeline here.
- //
- void async_callback_completed_cb (IAsyncResult ar)
- {
- if (current_ai.end != null){
- try {
- current_ai.end (ar);
- } catch (Exception e) {
- ProcessError (e);
- }
- }
-
- Resume ();
- }
-
- void async_handler_complete_cb (IAsyncResult ar)
- {
- IHttpAsyncHandler async_handler = ((IHttpAsyncHandler) ar.AsyncState);
-
- try {
- async_handler.EndProcessRequest (ar);
- } catch (Exception e){
- ProcessError (e);
- }
-
- Resume ();
- }
-
- //
- // This enumerator yields whether processing must be stopped:
- // true: processing of the pipeline must be stopped
- // false: processing of the pipeline must not be stopped
- //
-#if TARGET_JVM && !NET_2_0
- sealed class RunHooksEnumerator : IEnumerable, IEnumerator
- {
- Delegate [] delegates;
- int currentStep = 0;
- HttpApplication app;
-
- internal RunHooksEnumerator(HttpApplication app, Delegate list)
- {
- this.app = app;
- delegates = list.GetInvocationList ();
- }
-
- public IEnumerator GetEnumerator() { return this; }
- public object Current { get{ return app.stop_processing; } }
- public void Reset()
- {
- throw new NotImplementedException("HttpApplication.RunHooksEnumerator.Reset called.");
- }
- public bool MoveNext ()
- {
- while (currentStep < delegates.Length) {
- if (ProcessDelegate((EventHandler)delegates[currentStep++]))
- return true;
- }
- return false;
- }
-
- bool ProcessDelegate(EventHandler d)
- {
- if (d.Target != null && (d.Target is AsyncInvoker)){
- app.current_ai = (AsyncInvoker) d.Target;
-
- try {
- app.must_yield = true;
- app.in_begin = true;
- app.context.BeginTimeoutPossible ();
- app.current_ai.begin (app, EventArgs.Empty, new AsyncCallback(app.async_callback_completed_cb), app.current_ai.data);
- }
- catch (ThreadAbortException taex){
- object obj = taex.ExceptionState;
- Thread.ResetAbort ();
- app.stop_processing = true;
- if (obj is StepTimeout)
- app.ProcessError (new HttpException ("The request timed out."));
- }
- catch (Exception e){
- app.ProcessError (e);
- }
- finally {
- app.in_begin = false;
- app.context.EndTimeoutPossible ();
- }
-
- //
- // If things are still moving forward, yield this
- // thread now
- //
- if (app.must_yield)
- return true;
- else if (app.stop_processing)
- return true;
- }
- else {
- try {
- app.context.BeginTimeoutPossible ();
- d (app, EventArgs.Empty);
- } catch (ThreadAbortException taex){
- object obj = taex.ExceptionState;
- Thread.ResetAbort ();
- app.stop_processing = true;
- if (obj is StepTimeout)
- app.ProcessError (new HttpException ("The request timed out."));
- }
- catch (Exception e){
- app.ProcessError (e);
- }
- finally {
- app.context.EndTimeoutPossible ();
- }
- if (app.stop_processing)
- return true;
- }
- return false;
- }
- }
-
- IEnumerable RunHooks (Delegate list)
- {
- return new RunHooksEnumerator(this, list);
- }
-#else
- IEnumerable RunHooks (Delegate list)
- {
- Delegate [] delegates = list.GetInvocationList ();
-
- foreach (EventHandler d in delegates){
- if (d.Target != null && (d.Target is AsyncInvoker)){
- current_ai = (AsyncInvoker) d.Target;
-
- try {
- must_yield = true;
- in_begin = true;
- context.BeginTimeoutPossible ();
- current_ai.begin (this, EventArgs.Empty, async_callback_completed_cb, current_ai.data);
- } catch (ThreadAbortException taex){
- object obj = taex.ExceptionState;
- Thread.ResetAbort ();
- stop_processing = true;
- if (obj is StepTimeout)
- ProcessError (new HttpException ("The request timed out."));
- } catch (Exception e){
- ProcessError (e);
- } finally {
- in_begin = false;
- context.EndTimeoutPossible ();
- }
-
- //
- // If things are still moving forward, yield this
- // thread now
- //
- if (must_yield)
- yield return stop_processing;
- else if (stop_processing)
- yield return true;
- } else {
- try {
- context.BeginTimeoutPossible ();
- d (this, EventArgs.Empty);
- } catch (ThreadAbortException taex){
- object obj = taex.ExceptionState;
- Thread.ResetAbort ();
- stop_processing = true;
- if (obj is StepTimeout)
- ProcessError (new HttpException ("The request timed out."));
- } catch (Exception e){
- ProcessError (e);
- } finally {
- context.EndTimeoutPossible ();
- }
- if (stop_processing)
- yield return true;
- }
- }
- }
-#endif
-
- static void FinalErrorWrite (HttpResponse response, string error)
- {
- try {
- response.Write (error);
- response.Flush (true);
- } catch {
- response.Close ();
- }
- }
-
- void OutputPage ()
- {
- if (context.Error == null){
- try {
- context.Response.Flush (true);
- } catch (Exception e){
- context.AddError (e);
- }
- }
-
- Exception error = context.Error;
- if (error != null){
- HttpResponse response = context.Response;
-
- if (!response.HeadersSent){
- response.ClearHeaders ();
- response.ClearContent ();
-
- if (error is HttpException){
- response.StatusCode = ((HttpException)error).GetHttpCode ();
- } else {
- error = new HttpException ("", error);
- response.StatusCode = 500;
- }
- if (!RedirectCustomError ())
- FinalErrorWrite (response, ((HttpException) error).GetHtmlErrorMessage ());
- else
- response.Flush (true);
- } else {
- if (!(error is HttpException))
- error = new HttpException ("", error);
- FinalErrorWrite (response, ((HttpException) error).GetHtmlErrorMessage ());
- }
- }
-
- }
-
- //
- // Invoked at the end of the pipeline execution
- //
- void PipelineDone ()
- {
- try {
- if (EndRequest != null)
- EndRequest (this, EventArgs.Empty);
- } catch (Exception e){
- ProcessError (e);
- }
-
- try {
-
- OutputPage ();
- } catch (Exception e) {
- Console.WriteLine ("Internal error: OutputPage threw an exception " + e);
- } finally {
- context.WorkerRequest.EndOfRequest();
- if (begin_iar != null){
- try {
- begin_iar.Complete ();
- } catch {
- //
- // TODO: if this throws an error, we have no way of reporting it
- // Not really too bad, since the only failure might be
- // `HttpRuntime.request_processed'
- //
- }
- }
-
- done.Set ();
-
- if (factory != null && context.Handler != null){
- factory.ReleaseHandler (context.Handler);
- factory = null;
- }
-
- context.Handler = null;
- // context = null; -> moved to PostDone
- pipeline = null;
- current_ai = null;
- }
- PostDone ();
- }
-
- //
- // Events fired as described in `Http Runtime Support, HttpModules,
- // Handling Public Events'
- //
-#if TARGET_JVM && !NET_2_0
- sealed class PipeLineEnumerator : IEnumerator
- {
- readonly HttpApplication _this;
-
- object current;
- int currentYield;
- IEnumerator currentEnumerator;
-
- IHttpHandler handler = null;
-
- internal PipeLineEnumerator(HttpApplication app) {
- _this = app;
- }
-
- public object Current { get{ return currentEnumerator != null ? currentEnumerator.Current : current; } }
- public void Reset() {
- currentEnumerator = null;
- currentYield = 0;
- }
-
- void ResetEnumerator() {
- if (currentEnumerator != null) {
- current = currentEnumerator.Current;
- currentEnumerator = null;
- }
- }
-
- public bool MoveNext () {
- switch (currentYield) {
- case 0: break;
- case 1: goto yield_1;
- case 2: goto yield_2;
- case 3: goto yield_3;
- case 4: goto yield_4;
-#if NET_2_0
- case 5: goto yield_5;
-#endif
- case 6: goto yield_6;
-#if NET_2_0
- case 7: goto yield_7;
-#endif
- case 8: goto yield_8;
- case 9: goto yield_9;
-#if NET_2_0
- case 10: goto yield_10;
- case 11: goto yield_11;
-#endif
- case 12: goto yield_12;
-#if NET_2_0
- case 13: goto yield_13;
-#endif
- case 14: goto yield_14;
- case 15: goto yield_15;
-#if NET_2_0
- case 16: goto yield_16;
-#endif
- case 17: goto yield_17;
-#if NET_2_0
- case 18: goto yield_18;
-#endif
- default: goto yield_19;
- }
-
- if (_this.stop_processing) {
- //yield return true;
- current = true;
- currentYield = 1;
- return true;
- }
-yield_1:
-yield_2:
- if (_this.BeginRequest != null) {
- //foreach (bool stop in RunHooks (BeginRequest))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 2;
- currentEnumerator = _this.RunHooks(_this.BeginRequest).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-yield_3:
- if (_this.AuthenticateRequest != null) {
- //foreach (bool stop in RunHooks (AuthenticateRequest))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 3;
- currentEnumerator = _this.RunHooks(_this.AuthenticateRequest).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-yield_4:
- if (_this.DefaultAuthentication != null) {
- //foreach (bool stop in RunHooks (DefaultAuthentication))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 4;
- currentEnumerator = _this.RunHooks(_this.DefaultAuthentication).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-
-#if NET_2_0
-yield_5:
- if (_this.PostAuthenticateRequest != null) {
- //foreach (bool stop in RunHooks (AuthenticateRequest))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 5;
- currentEnumerator = _this.RunHooks(_this.PostAuthenticateRequest).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-#endif
-yield_6:
- if (_this.AuthorizeRequest != null) {
- //foreach (bool stop in RunHooks (AuthorizeRequest))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 6;
- currentEnumerator = _this.RunHooks(_this.AuthorizeRequest).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-#if NET_2_0
-yield_7:
- if (_this.PostAuthorizeRequest != null) {
- //foreach (bool stop in RunHooks (PostAuthorizeRequest))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 7;
- currentEnumerator = _this.RunHooks(_this.PostAuthorizeRequest).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-#endif
-yield_8:
- if (_this.ResolveRequestCache != null) {
- //foreach (bool stop in RunHooks (ResolveRequestCache))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 8;
- currentEnumerator = _this.RunHooks(_this.ResolveRequestCache).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-
- // Obtain the handler for the request.
- //IHttpHandler handler = null;
- try {
- handler = _this.GetHandler (_this.context);
- } catch (FileNotFoundException fnf){
- if (_this.context.Request.IsLocal)
- _this.ProcessError (new HttpException (404, String.Format ("File not found {0}", fnf.FileName), fnf));
- else
- _this.ProcessError (new HttpException (404, "File not found", fnf));
- } catch (DirectoryNotFoundException dnf){
- _this.ProcessError (new HttpException (404, "Directory not found", dnf));
- } catch (Exception e) {
- _this.ProcessError (e);
- }
-
- if (_this.stop_processing) {
- //yield return true;
- current = true;
- currentYield = 9;
- return true;
- }
-yield_9:
-#if NET_2_0
-yield_10:
- if (_this.PostResolveRequestCache != null) {
- //foreach (bool stop in RunHooks (PostResolveRequestCache))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 10;
- currentEnumerator = _this.RunHooks(_this.PostResolveRequestCache).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-yield_11:
- if (_this.PostMapRequestHandler != null) {
- //foreach (bool stop in RunHooks (PostMapRequestHandler))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 11;
- currentEnumerator = _this.RunHooks(_this.PostMapRequestHandler).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-
-#endif
-yield_12:
- if (_this.AcquireRequestState != null){
- //foreach (bool stop in RunHooks (AcquireRequestState))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 12;
- currentEnumerator = _this.RunHooks(_this.AcquireRequestState).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-
-#if NET_2_0
-yield_13:
- if (_this.PostAcquireRequestState != null){
- //foreach (bool stop in RunHooks (PostAcquireRequestState))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 13;
- currentEnumerator = _this.RunHooks(_this.PostAcquireRequestState).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-#endif
-
- //
- // From this point on, we need to ensure that we call
- // ReleaseRequestState, so the code below jumps to
- // `release:' to guarantee it rather than yielding.
- //
- if (_this.PreRequestHandlerExecute != null)
- foreach (bool stop in _this.RunHooks (_this.PreRequestHandlerExecute))
- if (stop)
- goto release;
-
- try {
- _this.context.BeginTimeoutPossible ();
- if (handler != null){
- IHttpAsyncHandler async_handler = handler as IHttpAsyncHandler;
-
- if (async_handler != null){
- _this.must_yield = true;
- _this.in_begin = true;
- async_handler.BeginProcessRequest (_this.context, new AsyncCallback(_this.async_handler_complete_cb), handler);
- } else {
- _this.must_yield = false;
- handler.ProcessRequest (_this.context);
- }
- }
- } catch (ThreadAbortException taex){
- object obj = taex.ExceptionState;
- Thread.ResetAbort ();
- _this.stop_processing = true;
- if (obj is StepTimeout)
- _this.ProcessError (new HttpException ("The request timed out."));
- } catch (Exception e){
- _this.ProcessError (e);
- } finally {
- _this.in_begin = false;
- _this.context.EndTimeoutPossible ();
- }
- if (_this.must_yield) {
- //yield return stop_processing;
- current = _this.stop_processing;
- currentYield = 14;
- return true;
- }
- else if (_this.stop_processing)
- goto release;
-yield_14:
- // These are executed after the application has returned
-
- if (_this.PostRequestHandlerExecute != null)
- foreach (bool stop in _this.RunHooks (_this.PostRequestHandlerExecute))
- if (stop)
- goto release;
-
- release:
- if (_this.ReleaseRequestState != null){
- foreach (bool stop in _this.RunHooks (_this.ReleaseRequestState)){
- //
- // Ignore the stop signal while release the state
- //
-
- }
- }
-
- if (_this.stop_processing) {
- //yield return true;
- current = true;
- currentYield = 15;
- return true;
- }
-yield_15:
-#if NET_2_0
-yield_16:
- if (_this.PostReleaseRequestState != null) {
- //foreach (bool stop in RunHooks (PostReleaseRequestState))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 16;
- currentEnumerator = _this.RunHooks(_this.PostReleaseRequestState).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-#endif
-
- if (_this.context.Error == null)
- _this.context.Response.DoFilter (true);
-yield_17:
- if (_this.UpdateRequestCache != null) {
- //foreach (bool stop in RunHooks (UpdateRequestCache))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 17;
- currentEnumerator = _this.RunHooks(_this.UpdateRequestCache).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-
-#if NET_2_0
-yield_18:
- if (_this.PostUpdateRequestCache != null) {
- //foreach (bool stop in RunHooks (PostUpdateRequestCache))
- // yield return stop;
- if (currentEnumerator == null) {
- currentYield = 18;
- currentEnumerator = _this.RunHooks(_this.PostUpdateRequestCache).GetEnumerator();
- }
- while (currentEnumerator.MoveNext())
- return true;
-
- ResetEnumerator();
- }
-#endif
- _this.PipelineDone ();
- currentYield = 19;
-yield_19:
- return false;
- }
- }
-
- IEnumerator Pipeline ()
- {
- return new PipeLineEnumerator(this);
- }
-#else
- IEnumerator Pipeline ()
- {
- if (stop_processing)
- yield return true;
-
- if (BeginRequest != null)
- foreach (bool stop in RunHooks (BeginRequest))
- yield return stop;
-
- if (AuthenticateRequest != null)
- foreach (bool stop in RunHooks (AuthenticateRequest))
- yield return stop;
-
- if (DefaultAuthentication != null)
- foreach (bool stop in RunHooks (DefaultAuthentication))
- yield return stop;
-
-#if NET_2_0
- if (PostAuthenticateRequest != null)
- foreach (bool stop in RunHooks (AuthenticateRequest))
- yield return stop;
-#endif
- if (AuthorizeRequest != null)
- foreach (bool stop in RunHooks (AuthorizeRequest))
- yield return stop;
-#if NET_2_0
- if (PostAuthorizeRequest != null)
- foreach (bool stop in RunHooks (PostAuthorizeRequest))
- yield return stop;
-#endif
-
- if (ResolveRequestCache != null)
- foreach (bool stop in RunHooks (ResolveRequestCache))
- yield return stop;
-
- // Obtain the handler for the request.
- IHttpHandler handler = null;
- try {
- handler = GetHandler (context);
- } catch (FileNotFoundException fnf){
- if (context.Request.IsLocal)
- ProcessError (new HttpException (404, String.Format ("File not found {0}", fnf.FileName), fnf));
- else
- ProcessError (new HttpException (404, "File not found", fnf));
- } catch (DirectoryNotFoundException dnf){
- ProcessError (new HttpException (404, "Directory not found", dnf));
- } catch (Exception e) {
- ProcessError (e);
- }
-
- if (stop_processing)
- yield return true;
-
-#if NET_2_0
- if (PostResolveRequestCache != null)
- foreach (bool stop in RunHooks (PostResolveRequestCache))
- yield return stop;
-
- if (PostMapRequestHandler != null)
- foreach (bool stop in RunHooks (PostMapRequestHandler))
- yield return stop;
-
-#endif
- if (AcquireRequestState != null){
- foreach (bool stop in RunHooks (AcquireRequestState))
- yield return stop;
- }
-
-#if NET_2_0
- if (PostAcquireRequestState != null){
- foreach (bool stop in RunHooks (PostAcquireRequestState))
- yield return stop;
- }
-#endif
-
- //
- // From this point on, we need to ensure that we call
- // ReleaseRequestState, so the code below jumps to
- // `release:' to guarantee it rather than yielding.
- //
- if (PreRequestHandlerExecute != null)
- foreach (bool stop in RunHooks (PreRequestHandlerExecute))
- if (stop)
- goto release;
-
- try {
- context.BeginTimeoutPossible ();
- if (handler != null){
- IHttpAsyncHandler async_handler = handler as IHttpAsyncHandler;
-
- if (async_handler != null){
- must_yield = true;
- in_begin = true;
- async_handler.BeginProcessRequest (context, async_handler_complete_cb, handler);
- } else {
- must_yield = false;
- handler.ProcessRequest (context);
- }
- }
- } catch (ThreadAbortException taex){
- object obj = taex.ExceptionState;
- Thread.ResetAbort ();
- stop_processing = true;
- if (obj is StepTimeout)
- ProcessError (new HttpException ("The request timed out."));
- } catch (Exception e){
- ProcessError (e);
- } finally {
- in_begin = false;
- context.EndTimeoutPossible ();
- }
- if (must_yield)
- yield return stop_processing;
- else if (stop_processing)
- goto release;
-
- // These are executed after the application has returned
-
- if (PostRequestHandlerExecute != null)
- foreach (bool stop in RunHooks (PostRequestHandlerExecute))
- if (stop)
- goto release;
-
- release:
- if (ReleaseRequestState != null){
- foreach (bool stop in RunHooks (ReleaseRequestState)){
- //
- // Ignore the stop signal while release the state
- //
-
- }
- }
-
- if (stop_processing)
- yield return true;
-
-#if NET_2_0
- if (PostReleaseRequestState != null)
- foreach (bool stop in RunHooks (PostReleaseRequestState))
- yield return stop;
-#endif
-
- if (context.Error == null)
- context.Response.DoFilter (true);
-
- if (UpdateRequestCache != null)
- foreach (bool stop in RunHooks (UpdateRequestCache))
- yield return stop;
-
-#if NET_2_0
- if (PostUpdateRequestCache != null)
- foreach (bool stop in RunHooks (PostUpdateRequestCache))
- yield return stop;
-#endif
- PipelineDone ();
- }
-#endif
-
- void PreStart ()
- {
-#if !TARGET_J2EE
- HttpRuntime.TimeoutManager.Add (context);
-#endif
- Thread th = Thread.CurrentThread;
- if (app_culture != null) {
- prev_app_culture = th.CurrentCulture;
- th.CurrentCulture = app_culture;
- }
-
- if (appui_culture != null) {
- prev_appui_culture = th.CurrentUICulture;
- th.CurrentUICulture = appui_culture;
- }
-
-#if !TARGET_JVM
- prev_user = Thread.CurrentPrincipal;
-#endif
- }
-
- void PostDone ()
- {
- Thread th = Thread.CurrentThread;
-#if !TARGET_JVM
- if (Thread.CurrentPrincipal != prev_user)
- Thread.CurrentPrincipal = prev_user;
-#endif
- if (prev_appui_culture != null && prev_appui_culture != th.CurrentUICulture)
- th.CurrentUICulture = prev_appui_culture;
- if (prev_app_culture != null && prev_app_culture != th.CurrentCulture)
- th.CurrentCulture = prev_app_culture;
-
-#if !TARGET_J2EE
- HttpRuntime.TimeoutManager.Remove (context);
-#endif
- context = null;
- session = null;
- HttpContext.Current = null;
- }
-
- void Start (object x)
- {
- InitOnce (true);
- PreStart ();
- pipeline = Pipeline ();
- Tick ();
- }
-
- // Used by HttpServerUtility.Execute
- internal IHttpHandler GetHandler (HttpContext context)
- {
- HttpRequest request = context.Request;
- string verb = request.RequestType;
- string url = request.FilePath;
-
- IHttpHandler handler = null;
-#if NET_2_0
- HttpHandlersSection section = (HttpHandlersSection) WebConfigurationManager.GetSection ("system.web/httpHandlers");
- object o = section.LocateHandler (verb, url);
-#else
- HandlerFactoryConfiguration factory_config = (HandlerFactoryConfiguration) HttpContext.GetAppConfig ("system.web/httpHandlers");
- object o = factory_config.LocateHandler (verb, url);
-#endif
-
- factory = o as IHttpHandlerFactory;
-
- if (factory == null) {
- handler = (IHttpHandler) o;
- } else {
- handler = factory.GetHandler (context, verb, url, request.PhysicalPath);
- }
- context.Handler = handler;
-
- return handler;
- }
-
- void IHttpHandler.ProcessRequest (HttpContext context)
- {
- begin_iar = null;
- this.context = context;
- done.Reset ();
-
- Start (null);
- done.WaitOne ();
- }
-
- //
- // This is used by FireOnAppStart, when we init the application
- // as the context is required to be set at that point (the user
- // might call methods that require it on that hook).
- //
- internal void SetContext (HttpContext context)
- {
- this.context = context;
- }
-
- internal void SetSession (HttpSessionState session)
- {
- this.session = session;
- }
-
- IAsyncResult IHttpAsyncHandler.BeginProcessRequest (HttpContext context, AsyncCallback cb, object extraData)
- {
- this.context = context;
- done.Reset ();
-
- begin_iar = new AsyncRequestState (done, cb, extraData);
-#if TARGET_JVM
- if (true)
-#else
- if (Thread.CurrentThread.IsThreadPoolThread)
-#endif
- Start (null);
- else
- ThreadPool.QueueUserWorkItem (new WaitCallback (Start), null);
-
- return begin_iar;
- }
-
- void IHttpAsyncHandler.EndProcessRequest (IAsyncResult result)
- {
- if (!result.IsCompleted)
- result.AsyncWaitHandle.WaitOne ();
- begin_iar = null;
- }
-
- public virtual void Init ()
- {
- }
-
- bool IHttpHandler.IsReusable {
- get {
- return true;
- }
- }
-
-#region internals
- internal void ClearError ()
- {
- context.ClearError ();
- }
-
- bool RedirectErrorPage (string error_page)
- {
- if (context.Request.QueryString ["aspxerrorpath"] != null)
- return false;
-
- Response.Redirect (error_page + "?aspxerrorpath=" + Request.Path, false);
- return true;
- }
-
- bool RedirectCustomError ()
- {
- if (!context.IsCustomErrorEnabled)
- return false;
-
-#if NET_2_0
- CustomErrorsSection config = (CustomErrorsSection)WebConfigurationManager.GetSection ("system.web/customErrors");
-#else
- CustomErrorsConfig config = null;
- try {
- config = (CustomErrorsConfig) context.GetConfig ("system.web/customErrors");
- } catch { }
-#endif
-
- if (config == null) {
- if (context.ErrorPage != null)
- return RedirectErrorPage (context.ErrorPage);
-
- return false;
- }
-
-#if NET_2_0
- CustomError err = config.Errors [context.Response.StatusCode.ToString()];
- string redirect = err == null ? null : err.Redirect;
-#else
- string redirect = config [context.Response.StatusCode];
-#endif
- if (redirect == null) {
- redirect = context.ErrorPage;
- if (redirect == null)
- redirect = config.DefaultRedirect;
- }
-
- if (redirect == null)
- return false;
-
- return RedirectErrorPage (redirect);
- }
-#endregion
- }
-
- //
- // Based on Fritz' Onion's AsyncRequestState class for asynchronous IHttpAsyncHandlers
- //
- class AsyncRequestState : IAsyncResult {
- AsyncCallback cb;
- object cb_data;
- bool completed;
- ManualResetEvent complete_event = null;
-
- internal AsyncRequestState (ManualResetEvent complete_event, AsyncCallback cb, object cb_data)
- {
- this.cb = cb;
- this.cb_data = cb_data;
- this.complete_event = complete_event;
- }
-
- internal void Complete ()
- {
- completed = true;
- if (cb != null)
- cb (this);
-
- complete_event.Set ();
- }
-
- public object AsyncState {
- get {
- return cb_data;
- }
- }
-
- public bool CompletedSynchronously {
- get {
- return false;
- }
- }
-
- public bool IsCompleted {
- get {
- return completed;
- }
- }
-
- public WaitHandle AsyncWaitHandle {
- get {
- return complete_event;
- }
- }
- }
-
-#region Helper classes
-
- //
- // A wrapper to keep track of begin/end pairs
- //
- class AsyncInvoker {
- public BeginEventHandler begin;
- public EndEventHandler end;
- public object data;
-
- public AsyncInvoker (BeginEventHandler bh, EndEventHandler eh, object d)
- {
- begin = bh;
- end = eh;
- data = d;
- }
-
- public AsyncInvoker (BeginEventHandler bh, EndEventHandler eh)
- {
- begin = bh;
- end = eh;
- }
-
- public void Invoke (object sender, EventArgs e)
- {
- throw new Exception ("This is just a dummy");
- }
- }
-#endregion
-}
-
diff --git a/mcs/class/System.Web/System.Web/HttpContext.cs b/mcs/class/System.Web/System.Web/HttpContext.cs
index 7876e8e7a30..9b3a291640b 100644
--- a/mcs/class/System.Web/System.Web/HttpContext.cs
+++ b/mcs/class/System.Web/System.Web/HttpContext.cs
@@ -85,15 +85,7 @@ namespace System.Web
[ThreadStatic]
static Dictionary <string, IResourceProvider> resource_providers;
-#if TARGET_JVM
- const string app_global_res_key = "HttpContext.app_global_res_key";
- internal static Assembly AppGlobalResourcesAssembly {
- get { return (Assembly) AppDomain.CurrentDomain.GetData (app_global_res_key); }
- set { AppDomain.CurrentDomain.SetData (app_global_res_key, value); }
- }
-#else
internal static Assembly AppGlobalResourcesAssembly;
-#endif
ProfileBase profile = null;
LinkedList<IHttpHandler> handlers;
@@ -178,7 +170,6 @@ namespace System.Web
// The "Current" property is set just after we have constructed it with
// the 'HttpContext (HttpWorkerRequest)' constructor.
//
-#if !TARGET_JVM // No remoting CallContext support in Grasshopper
public static HttpContext Current {
get {
return (HttpContext) CallContext.GetData ("c");
@@ -188,7 +179,6 @@ namespace System.Web
CallContext.SetData ("c", value);
}
}
-#endif
public Exception Error {
get {
@@ -228,11 +218,9 @@ namespace System.Web
return (cfg.Mode == CustomErrorMode.RemoteOnly) && !Request.IsLocal;
}
}
-#if !TARGET_JVM
public bool IsDebuggingEnabled {
get { return RuntimeHelpers.DebuggingEnabled; }
}
-#endif
public IDictionary Items {
get {
if (items == null)
diff --git a/mcs/class/System.Web/System.Web/HttpContext.jvm.cs b/mcs/class/System.Web/System.Web/HttpContext.jvm.cs
deleted file mode 100644
index d383db4d7c9..00000000000
--- a/mcs/class/System.Web/System.Web/HttpContext.jvm.cs
+++ /dev/null
@@ -1,141 +0,0 @@
-//
-// System.Web.HttpContext.cs
-//
-// Author:
-// Eyal Alaluf (eyala@mainsoft.com)
-//
-
-//
-// Copyright (C) 2005 Mainsoft Co. (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Collections;
-using System.Configuration;
-using System.Threading;
-using javax.servlet.http;
-using javax.faces.context;
-using System.Web.J2EE;
-using System.Web.UI;
-using javax.servlet;
-using System.Collections.Specialized;
-using Mainsoft.Web;
-
-namespace System.Web {
-
- public sealed partial class HttpContext {
- static readonly LocalDataStoreSlot _ContextSlot = Thread.GetNamedDataSlot ("Context");
- // No remoting support (CallContext) yet in Grasshopper
- [MonoInternalNote("Context - Use System.Remoting.Messaging.CallContext instead of Thread storage")]
- public static HttpContext Current
- {
- get { return (HttpContext) Thread.GetData (_ContextSlot); }
- set { Thread.SetData (_ContextSlot, value); }
- }
-
- public bool IsDebuggingEnabled { get { return false; } }
-
- internal bool IsServletRequest {
- get { return ServletRequest != null; }
- }
-
- internal object GetWorkerService(Type t)
- {
- IServiceProvider prv = WorkerRequest as IServiceProvider;
- return prv != null ? prv.GetService(t) : null;
- }
-
- internal HttpServlet Servlet {
- get { return (HttpServlet)GetWorkerService(typeof(HttpServlet)); }
- }
-
- internal HttpServletRequest ServletRequest {
- get { return (HttpServletRequest)GetWorkerService(typeof(HttpServletRequest)); }
- }
-
- internal NameValueCollection RequestParameters {
- get { return (NameValueCollection) GetWorkerService (typeof (NameValueCollection)); }
- }
-
- internal HttpServletResponse ServletResponse {
- get { return (HttpServletResponse)GetWorkerService(typeof(HttpServletResponse)); }
- }
-
- HttpRuntime _httpRuntime = null;
- internal HttpRuntime HttpRuntimeInstance {
- get
- {
- if (_httpRuntime == null)
- _httpRuntime = (HttpRuntime) AppDomain.CurrentDomain.GetData ("HttpRuntime");
- return _httpRuntime;
- }
- }
-
- static Hashtable resourceManagerCache
- {
- get
- {
- Hashtable cache = (Hashtable) AppDomain.CurrentDomain.GetData ("ResourceManagerCache");
- if (cache == null) {
- cache = new Hashtable ();
- AppDomain.CurrentDomain.SetData ("ResourceManagerCache", cache);
- }
- return cache;
- }
- set
- {
- AppDomain.CurrentDomain.SetData ("ResourceManagerCache", value);
- }
- }
-
- // Timeout is not supported in GH
- internal bool CheckIfTimeout (DateTime t)
- {
- return false;
- }
-
- internal bool TimeoutPossible
- {
- get { return true; }
- }
-
- internal void BeginTimeoutPossible ()
- {
- }
-
- internal void EndTimeoutPossible ()
- {
- }
-
- internal void SetWorkerRequest (HttpWorkerRequest wr) {
- WorkerRequest = wr;
- Request.SetWorkerRequest (wr);
- Response.SetWorkerRequest (wr);
- }
-
- Page _currentHandlerInternal;
- internal Page CurrentHandlerInternal
- {
- get { return _currentHandlerInternal; }
- set { _currentHandlerInternal = value; }
- }
- }
-}
diff --git a/mcs/class/System.Web/System.Web/HttpRequest.cs b/mcs/class/System.Web/System.Web/HttpRequest.cs
index de51fc897a0..a2dd750eff4 100755
--- a/mcs/class/System.Web/System.Web/HttpRequest.cs
+++ b/mcs/class/System.Web/System.Web/HttpRequest.cs
@@ -289,11 +289,9 @@ namespace System.Web
}
}
-#if !TARGET_JVM
public WindowsIdentity LogonUserIdentity {
get { throw new NotImplementedException (); }
}
-#endif
string anonymous_id;
public string AnonymousID {
@@ -580,10 +578,8 @@ namespace System.Web
// GetSubStream returns a 'copy' of the InputStream with Position set to 0.
static Stream GetSubStream (Stream stream)
{
-#if !TARGET_JVM
if (stream is IntPtrStream)
return new IntPtrStream (stream);
-#endif
if (stream is MemoryStream) {
MemoryStream other = (MemoryStream) stream;
@@ -797,7 +793,6 @@ namespace System.Web
input_stream = new MemoryStream (ms.GetBuffer (), 0, (int) ms.Length, false, true);
}
-#if !TARGET_JVM
const int INPUT_BUFFER_SIZE = 32*1024;
TempFileStream GetTempStream ()
@@ -951,7 +946,6 @@ namespace System.Web
if (total < content_length)
throw HttpException.NewWithCode (411, "The request body is incomplete.", WebEventCodes.WebErrorOtherError);
}
-#endif
internal void ReleaseResources ()
{
@@ -1563,14 +1557,10 @@ namespace System.Web
if (!isAppVirtualPath && !virtualPath.StartsWith (appVirtualPath, RuntimeHelpers.StringComparison))
throw new InvalidOperationException (String.Format ("Failed to map path '{0}'", virtualPath));
-#if TARGET_JVM
- return worker_request.MapPath (virtualPath);
-#else
string path = worker_request.MapPath (virtualPath);
if (virtualPath [virtualPath.Length - 1] != '/' && path [path.Length - 1] == System.IO.Path.DirectorySeparatorChar)
path = path.TrimEnd (System.IO.Path.DirectorySeparatorChar);
return path;
-#endif
}
public void SaveAs (string filename, bool includeHeaders)
diff --git a/mcs/class/System.Web/System.Web/HttpRequest.jvm.cs b/mcs/class/System.Web/System.Web/HttpRequest.jvm.cs
deleted file mode 100644
index febf9e987cc..00000000000
--- a/mcs/class/System.Web/System.Web/HttpRequest.jvm.cs
+++ /dev/null
@@ -1,237 +0,0 @@
-//
-// System.Web.HttpRequest.jvm.cs
-//
-//
-// Author:
-// Eyal Alaluf <eyala@mainsoft.com>
-//
-
-//
-// Copyright (C) 2006 Mainsoft, Co. (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System.Web.Hosting;
-using javax.servlet.http;
-using System.Web.Configuration;
-using System.IO;
-using System.Collections;
-using System.Collections.Specialized;
-using Mainsoft.Web;
-
-namespace System.Web
-{
- public sealed partial class HttpRequest
- {
- const string SessionLock = "vmw.session.lock";
- const string SessionCookies = "vmw.session.cookies";
-
- static object GetJavaSessionLock (HttpSession javaSession)
- {
- lock (SessionLock) {
- object sessionLock = javaSession.getAttribute (SessionLock);
- if (sessionLock == null) {
- sessionLock = String.Copy (SessionLock);
- javaSession.setAttribute (SessionLock, sessionLock);
- }
- return sessionLock;
- }
- }
-
- void LoadWwwForm ()
- {
- HttpServletRequest servletReq = context.ServletRequest;
- if (servletReq == null) {
- NameValueCollection requestParameters = context.RequestParameters;
- if (requestParameters != null)
- form.Add (requestParameters);
- else
- RawLoadWwwForm ();
- return;
- }
-
- servletReq.setCharacterEncoding (ContentEncoding.WebName);
-
- for (java.util.Enumeration e = servletReq.getParameterNames(); e.hasMoreElements() ;) {
- string key = (string) e.nextElement();
- string [] qvalue = QueryString.GetValues (key);
- string [] qfvalue = servletReq.getParameterValues (key);
-
- for (int i = (qvalue != null) ? qvalue.Length : 0; i < qfvalue.Length; i++)
- form.Add (key, qfvalue [i]);
- }
- }
-
- const int INPUT_BUFFER_SIZE = 1024;
-
- void MakeInputStream ()
- {
- if (worker_request == null)
- throw new HttpException ("No HttpWorkerRequest");
-
- // consider for perf:
- // return ((ServletWorkerRequest)worker_request).InputStream();
-
- //
- // Use an unmanaged memory block as this might be a large
- // upload
- //
- int content_length = ContentLength;
-#if NET_2_0
- HttpRuntimeSection config = (HttpRuntimeSection) WebConfigurationManager.GetSection ("system.web/httpRuntime");
-#else
- HttpRuntimeConfig config = (HttpRuntimeConfig) HttpContext.GetAppConfig ("system.web/httpRuntime");
-#endif
- if (content_length > (config.MaxRequestLength * 1024))
- throw new HttpException ("File exceeds httpRuntime limit");
-
- byte[] content = new byte[content_length];
- if (content == null)
- throw new HttpException (String.Format ("Not enough memory to allocate {0} bytes", content_length));
-
- int total;
- byte [] buffer;
- buffer = worker_request.GetPreloadedEntityBody ();
- if (buffer != null){
- total = buffer.Length;
- if (content_length > 0)
- total = Math.Min (content_length, total);
- Array.Copy (buffer, content, total);
- }
- else
- total = 0;
-
- buffer = new byte [INPUT_BUFFER_SIZE];
- while (total < content_length) {
- int n;
- n = worker_request.ReadEntityBody (buffer, Math.Min (content_length-total, INPUT_BUFFER_SIZE));
- if (n <= 0)
- break;
- Array.Copy (buffer, 0, content, total, n);
- total += n;
- }
- if (total < content_length)
- throw new HttpException (411, "The uploaded file is incomplete");
-
- input_stream = new MemoryStream (content, 0, content.Length, false, true);
-
- DoFilter (buffer);
- }
-
- internal void GetSessionCookiesForPortal (HttpCookieCollection cookies)
- {
- if (context == null)
- return;
- if (!(context.WorkerRequest is IHttpExtendedWorkerRequest))
- return;
- IHttpExtendedWorkerRequest exWorker = (IHttpExtendedWorkerRequest) context.WorkerRequest;
- HttpSession javaSession = exWorker.GetSession (false);
- if (javaSession == null)
- return;
-
- object sessionLock = GetJavaSessionLock (javaSession);
- lock (sessionLock) {
- Hashtable sessionCookies = (Hashtable) javaSession.getAttribute (SessionCookies);
- if (sessionCookies == null)
- return;
-
- ArrayList expiredCookies = null;
- foreach (string key in sessionCookies.Keys) {
- HttpCookie sessionCookie = (HttpCookie) sessionCookies [key];
- if (sessionCookie.Expires.Ticks != 0 &&
- sessionCookie.Expires.Ticks < DateTime.Now.Ticks) {
- if (cookies [key] != null)
- cookies.Remove (key);
- else {
- if (expiredCookies == null)
- expiredCookies = new ArrayList();
- expiredCookies.Add (key);
- }
- }
- else
- cookies.Set (sessionCookie);
- }
-
- if (expiredCookies != null)
- foreach (object key in expiredCookies)
- sessionCookies.Remove (key);
- }
- }
-
- internal void SetSessionCookiesForPortal (HttpCookieCollection cookies)
- {
- if (cookies == null || cookies.Count == 0)
- return;
-
- if (!(context.WorkerRequest is IHttpExtendedWorkerRequest))
- return;
- IHttpExtendedWorkerRequest exWorker = (IHttpExtendedWorkerRequest) context.WorkerRequest;
- bool inPortletMode = !context.IsServletRequest;
- bool shouldStoreCookiesCollection = false;
- HttpSession javaSession = exWorker.GetSession (false);
-
- if (javaSession == null && inPortletMode)
- javaSession = exWorker.GetSession (true);
-
- if (javaSession == null)
- return;
-
- object sessionLock = GetJavaSessionLock (javaSession);
- lock (sessionLock) {
- Hashtable sessionCookies = (Hashtable)javaSession.getAttribute (SessionCookies);
- if (sessionCookies == null)
- if (inPortletMode) {
- sessionCookies = new Hashtable ();
- shouldStoreCookiesCollection = true;
- }
- else
- return;
-
- ArrayList sessionStoredCookies = null;
- for (int i=0; i < cookies.Count; i++) {
- HttpCookie cookie = cookies[i];
- if (sessionCookies [cookie.Name] != null || inPortletMode) {
- sessionCookies [cookie.Name] = cookie;
- if (sessionStoredCookies == null)
- sessionStoredCookies = new ArrayList();
- sessionStoredCookies. Add (cookie.Name);
- }
- }
-
- if (sessionStoredCookies != null)
- foreach (object key in sessionStoredCookies)
- cookies.Remove ((string) key);
-
- if (shouldStoreCookiesCollection)
- javaSession.setAttribute (SessionCookies, sessionCookies);
- }
- }
-
- internal void SetWorkerRequest (HttpWorkerRequest wr) {
- worker_request = wr;
- current_exe_path = null;
- file_path = null;
- base_virtual_dir = null;
- form = null;
- all_params = null;
- }
-
- }
-}
diff --git a/mcs/class/System.Web/System.Web/HttpResponse.cs b/mcs/class/System.Web/System.Web/HttpResponse.cs
index 2491c9035d1..65718e5cd9b 100644
--- a/mcs/class/System.Web/System.Web/HttpResponse.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponse.cs
@@ -1157,11 +1157,6 @@ namespace System.Web
Flush ();
}
-#if TARGET_JVM
- public void WriteFile (IntPtr fileHandle, long offset, long size) {
- throw new PlatformNotSupportedException("IntPtr not supported");
- }
-#else
public void WriteFile (IntPtr fileHandle, long offset, long size)
{
if (offset < 0)
@@ -1182,7 +1177,6 @@ namespace System.Web
output_stream.ApplyFilter (false);
Flush ();
}
-#endif
public void WriteFile (string filename, long offset, long size)
{
diff --git a/mcs/class/System.Web/System.Web/HttpResponse.jvm.cs b/mcs/class/System.Web/System.Web/HttpResponse.jvm.cs
deleted file mode 100644
index 367688c940b..00000000000
--- a/mcs/class/System.Web/System.Web/HttpResponse.jvm.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace System.Web
-{
- partial class HttpResponse
- {
- internal void SetWorkerRequest (HttpWorkerRequest wr) {
- WorkerRequest = wr;
- }
-
- }
-}
diff --git a/mcs/class/System.Web/System.Web/HttpResponseStream.cs b/mcs/class/System.Web/System.Web/HttpResponseStream.cs
index a7ec533a0e7..b180d341b5c 100644
--- a/mcs/class/System.Web/System.Web/HttpResponseStream.cs
+++ b/mcs/class/System.Web/System.Web/HttpResponseStream.cs
@@ -75,75 +75,6 @@ namespace System.Web
filter = value;
}
}
-#if TARGET_JVM
-
- class BlockManager {
- const int PreferredLength = 16 * 1024;
- static readonly byte[] EmptyBuffer = new byte[0];
-
- byte[] buffer = EmptyBuffer;
- int position;
-
- public BlockManager () {
- }
-
- public int Position {
- get { return position; }
- }
-
- void EnsureCapacity (int capacity) {
- if (buffer.Length >= capacity)
- return;
-
- capacity += PreferredLength;
- capacity = (capacity / PreferredLength) * PreferredLength;
- byte[] temp = new byte[capacity];
- Array.Copy(buffer, 0, temp, 0, buffer.Length);
- buffer = temp;
- }
-
- public void Write (byte [] buffer, int offset, int count) {
- if (count == 0)
- return;
-
- EnsureCapacity (position + count);
- Array.Copy(buffer, offset, this.buffer, position, count);
- position += count;
- }
-
- public void Send (HttpWorkerRequest wr, int start, int end) {
- int length = end - start;
- if (length <= 0)
- return;
-
- if (length > buffer.Length - start)
- length = buffer.Length - start;
-
- if (start > 0) {
- byte[] temp = new byte[length];
- Array.Copy(buffer, start, temp, 0, length);
- buffer = temp;
- }
- wr.SendResponseFromMemory(buffer, length);
- }
-
- public void Send (Stream stream, int start, int end) {
- int length = end - start;
- if (length <= 0)
- return;
-
- if (length > buffer.Length - start)
- length = buffer.Length - start;
-
- stream.Write(buffer, start, length);
- }
-
- public void Dispose () {
- buffer = null;
- }
- }
-
-#else // TARGET_JVM
unsafe sealed class BlockManager {
const int PreferredLength = 128 * 1024;
byte *data;
@@ -234,7 +165,6 @@ namespace System.Web
}
}
-#endif
abstract class Bucket {
public Bucket Next;
@@ -247,9 +177,7 @@ namespace System.Web
public abstract int Length { get; }
}
-#if !TARGET_JVM
unsafe
-#endif
class ByteBucket : Bucket {
int start;
int length;
@@ -559,24 +487,12 @@ namespace System.Web
}
}
-#if TARGET_JVM
- void UnsafeWrite (HttpWorkerRequest wr, byte [] buffer, int offset, int count)
- {
- if (count <= 0)
- return;
-
- byte[] copy = new byte[count];
- Array.Copy(buffer, offset, copy, 0, count);
- wr.SendResponseFromMemory (copy, count);
- }
-#else
unsafe void UnsafeWrite (HttpWorkerRequest wr, byte [] buffer, int offset, int count)
{
fixed (byte *ptr = buffer) {
wr.SendResponseFromMemory ((IntPtr) (ptr + offset), count);
}
}
-#endif
void AppendBuffer (byte [] buffer, int offset, int count)
{
if (!(cur_bucket is ByteBucket))
diff --git a/mcs/class/System.Web/System.Web/HttpResponseStream.jvm.cs b/mcs/class/System.Web/System.Web/HttpResponseStream.jvm.cs
deleted file mode 100644
index bbbc1cd2d64..00000000000
--- a/mcs/class/System.Web/System.Web/HttpResponseStream.jvm.cs
+++ /dev/null
@@ -1,637 +0,0 @@
-//
-// System.Web.HttpResponseStream.cs
-//
-//
-// Author:
-// Miguel de Icaza (miguel@novell.com)
-// Ben Maurer (bmaurer@ximian.com)
-//
-//
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using System.Text;
-using System.Globalization;
-using System.Runtime.InteropServices;
-
-namespace System.Web
-{
-
- //
- // HttpResponseStream implements the "OutputStream" from HttpResponse
- //
- // The MS implementation is broken in that it does not hook up this
- // to HttpResponse, so calling "Flush" on Response.OutputStream does not
- // flush the contents and produce the headers.
- //
- // You must call HttpResponse.Flush which does the actual header generation
- // and actual data flushing
- //
- internal class HttpResponseStream : Stream
- {
- Bucket first_bucket;
- Bucket cur_bucket;
- HttpResponse response;
- bool dirty = false;
-
- Stream filter;
-
- public HttpResponseStream (HttpResponse response)
- {
- this.response = response;
- }
-
- internal bool HaveFilter
- {
- get { return filter != null; }
- }
-
- public Stream Filter
- {
- get
- {
- if (filter == null)
- filter = new OutputFilterStream (this);
- return filter;
- }
- set
- {
- filter = value;
- }
- }
- abstract class Bucket
- {
- public Bucket Next;
-
- public virtual void Dispose ()
- {
- }
-
- public abstract void Send (HttpWorkerRequest wr);
- public abstract void Send (Stream stream);
- public abstract int Length { get; }
- public abstract int FreeSpace { get; }
- }
-
- class ByteBucket : Bucket
- {
-
- const int _preferredLength = 16 * 1024;
-
- int _position = 0;
- int _freeSpace = _preferredLength;
- byte [] buffer = new byte [_preferredLength];
-
- public ByteBucket ()
- {
- }
-
- public override int Length
- {
- get { return _position; }
- }
-
- public override int FreeSpace
- {
- get { return _freeSpace; }
- }
-
- public int Write (byte [] buf, int offset, int count)
- {
- if (count > _freeSpace)
- throw new InvalidOperationException ("Out of bucket space");
-
- Array.Copy (buf, offset, buffer, _position, count);
- _position += count;
- _freeSpace = _preferredLength - _position;
- return count;
- }
-
- public override void Dispose ()
- {
- buffer = null;
- }
-
- public override void Send (HttpWorkerRequest wr)
- {
- if (_position == 0)
- return;
-
- wr.SendResponseFromMemory (buffer, _position);
- }
-
- public override void Send (Stream stream)
- {
- if (_position == 0)
- return;
-
- stream.Write (buffer, 0, _position);
- }
- }
-
- class CharBucket : Bucket
- {
- const int _preferredLength = 8 * 1024;
-
- int _position = 0;
- int _freeSpace = _preferredLength;
- char [] buffer = new char [_preferredLength];
- readonly Encoding _encoding;
-
- public CharBucket (Encoding encoding)
- {
- _encoding = encoding;
- }
-
- public override int Length
- {
- get
- {
- HttpContext current = HttpContext.Current;
- Encoding enc = (current != null) ? current.Response.ContentEncoding : Encoding.UTF8;
- return enc.GetByteCount (buffer, 0, _position);
- }
- }
-
- public override int FreeSpace
- {
- get { return _freeSpace; }
- }
-
- public int Write (string buf, int offset, int count)
- {
- if (count > _freeSpace)
- throw new InvalidOperationException ("Out of bucket space");
-
- buf.CopyTo (offset, buffer, _position, count);
- _position += count;
-
- _freeSpace = _preferredLength - _position;
- return count;
- }
-
- public int Write (char [] buf, int offset, int count)
- {
- if (count > _freeSpace)
- throw new InvalidOperationException ("Out of bucket space");
-
- if (count == 1)
- buffer [_position] = buf [offset];
- else
- Array.Copy (buf, offset, buffer, _position, count);
-
- _position += count;
- _freeSpace = _preferredLength - _position;
- return count;
- }
-
- public override void Dispose ()
- {
- buffer = null;
- }
-
- public override void Send (HttpWorkerRequest wr)
- {
- if (_position == 0)
- return;
-
- wr.SendResponseFromMemory (buffer, 0, _position, _encoding);
- }
-
- public override void Send (Stream stream)
- {
- if (_position == 0)
- return;
-
- byte[] bytesToWrite =_encoding.GetBytes (buffer, 0, _position);
- stream.Write (bytesToWrite, 0, bytesToWrite.Length);
- }
- }
-
- class BufferedFileBucket : Bucket
- {
- string file;
- long offset;
- long length;
-
- public BufferedFileBucket (string f, long off, long len)
- {
- file = f;
- offset = off;
- length = len;
- }
-
- public override int Length
- {
- get { return (int) length; }
- }
-
- public override int FreeSpace
- {
- get { return int.MaxValue; }
- }
-
- public override void Send (HttpWorkerRequest wr)
- {
- wr.SendResponseFromFile (file, offset, length);
- }
-
- public override void Send (Stream stream)
- {
- using (FileStream fs = File.OpenRead (file)) {
- byte [] buffer = new byte [Math.Min (fs.Length, 32 * 1024)];
-
- long remain = fs.Length;
- int n;
- while (remain > 0 && (n = fs.Read (buffer, 0, (int) Math.Min (remain, 32 * 1024))) != 0) {
- remain -= n;
- stream.Write (buffer, 0, n);
- }
- }
- }
-
- public override string ToString ()
- {
- return String.Format ("file {0} {1} bytes from position {2}", file, length, offset);
- }
- }
-
- void AppendBucket (Bucket b)
- {
- if (first_bucket == null) {
- cur_bucket = first_bucket = b;
- return;
- }
-
- cur_bucket.Next = b;
- cur_bucket = b;
- }
-
- //
- // Nothing happens here, broken by requirement.
- // See note at the start
- //
- public override void Flush ()
- {
- }
-
- internal void Flush (HttpWorkerRequest wr, bool final_flush)
- {
- if (!dirty && !final_flush)
- return;
-
- for (Bucket b = first_bucket; b != null; b = b.Next) {
- b.Send (wr);
- }
-
- wr.FlushResponse (final_flush);
- Clear ();
- }
-
- internal int GetTotalLength ()
- {
- int size = 0;
- for (Bucket b = first_bucket; b != null; b = b.Next)
- size += b.Length;
-
- return size;
- }
-
- internal MemoryStream GetData ()
- {
- MemoryStream stream = new MemoryStream ();
- for (Bucket b = first_bucket; b != null; b = b.Next)
- b.Send (stream);
- return stream;
- }
-
- public void WriteFile (string f, long offset, long length)
- {
- if (length == 0)
- return;
-
- dirty = true;
-
- AppendBucket (new BufferedFileBucket (f, offset, length));
- // Flush () is called from HttpResponse if needed (WriteFile/TransmitFile)
- }
-
- bool filtering;
- internal void ApplyFilter (bool close)
- {
- if (filter == null)
- return;
-
- filtering = true;
- Bucket one = first_bucket;
- first_bucket = null; // This will recreate new buckets for the filtered content
- cur_bucket = null;
- dirty = false;
- for (Bucket b = one; b != null; b = b.Next)
- b.Send (filter);
-
- for (Bucket b = one; b != null; b = b.Next)
- b.Dispose ();
-
- if (close) {
- filter.Flush ();
- filter.Close ();
- filter = null;
- }
- else {
- filter.Flush ();
- }
- filtering = false;
- }
-
- public void Write (char [] buffer, int offset, int count)
- {
- bool buffering = response.BufferOutput;
-
- if (buffering) {
- // It does not matter whether we're in ApplyFilter or not
- AppendBuffer (buffer, offset, count);
- }
- else if (filter == null || filtering) {
- response.WriteHeaders (false);
- HttpWorkerRequest wr = response.WorkerRequest;
- // Direct write because not buffering
- wr.SendResponseFromMemory (buffer, offset, count, response.ContentEncoding);
- wr.FlushResponse (false);
- }
- else {
- // Write to the filter, which will call us back, and then Flush
- filtering = true;
- try {
- byte [] bytesToWrite = response.ContentEncoding.GetBytes (buffer, offset, count);
- filter.Write (bytesToWrite, 0, bytesToWrite.Length);
- }
- finally {
- filtering = false;
- }
- Flush (response.WorkerRequest, false);
- }
- }
-
- public void Write (string s, int offset, int count)
- {
- bool buffering = response.BufferOutput;
-
- if (buffering) {
- // It does not matter whether we're in ApplyFilter or not
- AppendBuffer (s, offset, count);
- }
- else if (filter == null || filtering) {
- response.WriteHeaders (false);
- HttpWorkerRequest wr = response.WorkerRequest;
- // Direct write because not buffering
- wr.SendResponseFromMemory (s, offset, count, response.ContentEncoding);
- wr.FlushResponse (false);
- }
- else {
- // Write to the filter, which will call us back, and then Flush
- filtering = true;
- try {
- byte [] bytesToWrite = response.ContentEncoding.GetBytes (s.ToCharArray (), offset, count);
- filter.Write (bytesToWrite, 0, bytesToWrite.Length);
- }
- finally {
- filtering = false;
- }
- Flush (response.WorkerRequest, false);
- }
- }
-
- public override void Write (byte [] buffer, int offset, int count)
- {
- bool buffering = response.BufferOutput;
-
- if (buffering) {
- // It does not matter whether we're in ApplyFilter or not
- AppendBuffer (buffer, offset, count);
- }
- else if (filter == null || filtering) {
- response.WriteHeaders (false);
- HttpWorkerRequest wr = response.WorkerRequest;
- // Direct write because not buffering
- if (offset == 0) {
- wr.SendResponseFromMemory (buffer, count);
- }
- else {
- UnsafeWrite (wr, buffer, offset, count);
- }
- wr.FlushResponse (false);
- }
- else {
- // Write to the filter, which will call us back, and then Flush
- filtering = true;
- try {
- filter.Write (buffer, offset, count);
- }
- finally {
- filtering = false;
- }
- Flush (response.WorkerRequest, false);
- }
- }
-
-#if TARGET_JVM
- void UnsafeWrite (HttpWorkerRequest wr, byte [] buffer, int offset, int count)
- {
- if (count <= 0)
- return;
-
- byte [] copy = new byte [count];
- Array.Copy (buffer, offset, copy, 0, count);
- wr.SendResponseFromMemory (copy, count);
- }
-#else
- unsafe void UnsafeWrite (HttpWorkerRequest wr, byte [] buffer, int offset, int count)
- {
- fixed (byte *ptr = buffer) {
- wr.SendResponseFromMemory ((IntPtr) (ptr + offset), count);
- }
- }
-#endif
- void AppendBuffer (byte [] buffer, int offset, int count)
- {
- if (!(cur_bucket is ByteBucket))
- AppendBucket (new ByteBucket ());
-
- dirty = true;
-
- while (count > 0) {
- if (cur_bucket.FreeSpace == 0)
- AppendBucket (new ByteBucket ());
-
- int len = count;
- int freeSpace = cur_bucket.FreeSpace;
-
- if (len > freeSpace)
- len = freeSpace;
-
- ((ByteBucket) cur_bucket).Write (buffer, offset, len);
- offset += len;
- count -= len;
- }
-
- }
-
- void AppendBuffer (char [] buffer, int offset, int count)
- {
- if (!(cur_bucket is CharBucket))
- AppendBucket (new CharBucket (response.ContentEncoding));
-
- dirty = true;
-
- while (count > 0) {
- if (cur_bucket.FreeSpace == 0)
- AppendBucket (new CharBucket (response.ContentEncoding));
-
- int len = count;
- int freeSpace = cur_bucket.FreeSpace;
-
- if (len > freeSpace)
- len = freeSpace;
-
- ((CharBucket) cur_bucket).Write (buffer, offset, len);
- offset += len;
- count -= len;
- }
- }
-
- void AppendBuffer (string buffer, int offset, int count)
- {
- if (!(cur_bucket is CharBucket))
- AppendBucket (new CharBucket (response.ContentEncoding));
-
- dirty = true;
-
- while (count > 0) {
- if (cur_bucket.FreeSpace == 0)
- AppendBucket (new CharBucket (response.ContentEncoding));
-
- int len = count;
- int freeSpace = cur_bucket.FreeSpace;
-
- if (len > freeSpace)
- len = freeSpace;
-
- ((CharBucket) cur_bucket).Write (buffer, offset, len);
- offset += len;
- count -= len;
- }
- }
-
- //
- // This should not flush/close or anything else, its called
- // just to free any memory we might have allocated (when we later
- // implement something with unmanaged memory).
- //
- internal void ReleaseResources (bool close_filter)
- {
- if (close_filter && filter != null) {
- filter.Close ();
- filter = null;
- }
-
- for (Bucket b = first_bucket; b != null; b = b.Next)
- b.Dispose ();
-
- first_bucket = null;
- cur_bucket = null;
- }
-
- public void Clear ()
- {
- //
- // IMPORTANT: you must dispose *AFTER* using all the buckets Byte chunks might be
- // split across two buckets if there is a file between the data.
- //
- ReleaseResources (false);
- dirty = false;
- }
-
- public override bool CanRead
- {
- get
- {
- return false;
- }
- }
-
- public override bool CanSeek
- {
- get
- {
- return false;
- }
- }
- public override bool CanWrite
- {
- get
- {
- return true;
- }
- }
-
- const string notsupported = "HttpResponseStream is a forward, write-only stream";
-
- public override long Length
- {
- get
- {
- throw new InvalidOperationException (notsupported);
- }
- }
-
- public override long Position
- {
- get
- {
- throw new InvalidOperationException (notsupported);
- }
- set
- {
- throw new InvalidOperationException (notsupported);
- }
- }
-
- public override long Seek (long offset, SeekOrigin origin)
- {
- throw new InvalidOperationException (notsupported);
- }
-
- public override void SetLength (long value)
- {
- throw new InvalidOperationException (notsupported);
- }
-
- public override int Read (byte [] buffer, int offset, int count)
- {
- throw new InvalidOperationException (notsupported);
- }
- }
-}
-
diff --git a/mcs/class/System.Web/System.Web/HttpRuntime.cs b/mcs/class/System.Web/System.Web/HttpRuntime.cs
index 2f234ef4ed3..709c57dc088 100644
--- a/mcs/class/System.Web/System.Web/HttpRuntime.cs
+++ b/mcs/class/System.Web/System.Web/HttpRuntime.cs
@@ -601,13 +601,6 @@ namespace System.Web
}
#endif
-#if TARGET_JVM
- [MonoNotSupported ("UnloadAppDomain is not supported")]
- public static void UnloadAppDomain ()
- {
- throw new NotImplementedException ("UnloadAppDomain is not supported");
- }
-#else
//
// Called when we are shutting down or we need to reload an application
// that has been modified (touch global.asax)
@@ -628,7 +621,6 @@ namespace System.Web
}
});
}
-#endif
//
// Shuts down the AppDomain
//
diff --git a/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs b/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs
index 95980123ae4..0c91350483c 100755
--- a/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs
+++ b/mcs/class/System.Web/System.Web/HttpWorkerRequest.cs
@@ -317,7 +317,6 @@ namespace System.Web
// apparently does nothing in MS.NET
}
-#if !TARGET_JVM
public virtual void SendResponseFromMemory (IntPtr data, int length)
{
if (data != IntPtr.Zero) {
@@ -326,7 +325,6 @@ namespace System.Web
SendResponseFromMemory (copy, length);
}
}
-#endif
public virtual void SetEndOfSendNotification (HttpWorkerRequest.EndOfSendNotification callback, object extraData)
{
diff --git a/mcs/class/System.Web/System.Web/HttpWorkerRequest.jvm.cs b/mcs/class/System.Web/System.Web/HttpWorkerRequest.jvm.cs
deleted file mode 100644
index 6fbecbd461a..00000000000
--- a/mcs/class/System.Web/System.Web/HttpWorkerRequest.jvm.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// System.Web.HttpWorkerRequest partial
-//
-// Authors:
-// Vladimir Krasnov (vladimirk@mainsoft.com)
-//
-// (C) 2006 Mainsoft
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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 TARGET_JVM
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace System.Web
-{
- public abstract partial class HttpWorkerRequest
- {
- java.io.Writer _outputWriter;
-
- public virtual void SendResponseFromMemory (IntPtr data, int length)
- {
- throw new NotImplementedException ("SendResponseFromMemory: unsafe buffers (IntPtr) are not supported");
- }
-
- internal void SendResponseFromMemory (string data, int offset, int length, Encoding encoding) {
- java.io.Writer writer = GetOutputWriter (encoding);
- if (writer == null) //if was redirected - silently returns null
- return;
-
- writer.write (data, offset, length);
- }
-
- internal void SendResponseFromMemory (char [] data, int offset, int length, Encoding encoding) {
- java.io.Writer writer = GetOutputWriter (encoding);
- if (writer == null) //if was redirected - silently returns null
- return;
-
- writer.write (data, offset, length);
- }
-
- java.io.Writer GetOutputWriter (Encoding encoding) {
- if (_outputWriter == null) {
- IServiceProvider prov = this as IServiceProvider;
- if (prov == null)
- ; //throw ;
-
- javax.servlet.http.HttpServletResponse sr = (javax.servlet.http.HttpServletResponse) prov.GetService (typeof (javax.servlet.http.HttpServletResponse));
- if (sr != null)
- sr.setCharacterEncoding (encoding.HeaderName);
-
- return (java.io.Writer) prov.GetService (typeof (java.io.Writer));
- }
- return _outputWriter;
- }
-
- }
-}
-
-
-#endif
diff --git a/mcs/class/System.Web/System.Web/HttpWriter.cs b/mcs/class/System.Web/System.Web/HttpWriter.cs
index b33e6707e96..de5d13ab1bd 100644
--- a/mcs/class/System.Web/System.Web/HttpWriter.cs
+++ b/mcs/class/System.Web/System.Web/HttpWriter.cs
@@ -143,14 +143,10 @@ namespace System.Web
{
if (buffer == null || index < 0 || count < 0 || (buffer.Length - index) < count)
throw new ArgumentOutOfRangeException ();
-#if TARGET_JVM
- output_stream.Write (buffer, index, count);
-#else
int length = encoding.GetMaxByteCount (count);
byte [] bytebuffer = GetByteBuffer (length);
int realLength = encoding.GetBytes (buffer, index, count, bytebuffer, 0);
output_stream.Write (bytebuffer, 0, realLength);
-#endif
if (response.buffer)
return;
@@ -171,14 +167,10 @@ namespace System.Web
if (index < 0 || count < 0 || ((index + count > s.Length)))
throw new ArgumentOutOfRangeException ();
-#if TARGET_JVM
- output_stream.Write (s, index, count);
-#else
int length = encoding.GetMaxByteCount (count);
byte [] bytebuffer = GetByteBuffer (length);
int realLength = encoding.GetBytes (s, index, count, bytebuffer, 0);
output_stream.Write (bytebuffer, 0, realLength);
-#endif
if (response.buffer)
return;
diff --git a/mcs/class/System.Web/System.Web/MimeTypes.cs b/mcs/class/System.Web/System.Web/MimeTypes.cs
index 82ce306f60b..673507d1cf8 100644
--- a/mcs/class/System.Web/System.Web/MimeTypes.cs
+++ b/mcs/class/System.Web/System.Web/MimeTypes.cs
@@ -195,6 +195,7 @@ namespace System.Web
mimeTypes.Add ("htx", "text/html");
mimeTypes.Add ("ice", "x-conference/x-cooltalk");
mimeTypes.Add ("ico", "image/x-icon");
+ mimeTypes.Add ("ics", "text/calendar");
mimeTypes.Add ("idc", "text/plain");
mimeTypes.Add ("ief", "image/ief");
mimeTypes.Add ("iefs", "image/ief");
@@ -232,6 +233,7 @@ namespace System.Web
mimeTypes.Add ("la", "audio/nspaudio");
mimeTypes.Add ("lam", "audio/x-liveaudio");
mimeTypes.Add ("latex", "application/x-latex");
+ mimeTypes.Add ("less", "text/css");
mimeTypes.Add ("list", "text/plain");
mimeTypes.Add ("lma", "audio/nspaudio");
mimeTypes.Add ("log", "text/plain");
@@ -271,11 +273,11 @@ namespace System.Web
mimeTypes.Add ("mme", "application/base64");
mimeTypes.Add ("mny", "application/x-msmoney");
mimeTypes.Add ("mod", "audio/mod");
- mimeTypes.Add ("moov", "video/quicktime");
- mimeTypes.Add ("movie", "video/x-sgi-movie");
mimeTypes.Add ("mov", "video/quicktime");
+ mimeTypes.Add ("movie", "video/x-sgi-movie");
+ mimeTypes.Add ("moov", "video/quicktime");
mimeTypes.Add ("mp2", "video/mpeg");
- mimeTypes.Add ("mp3", "audio/mpeg3");
+ mimeTypes.Add ("mp3", "audio/mpeg");
mimeTypes.Add ("mp4", "video/mp4");
//mimeTypes.Add ("mp4a", "audio/mp4"); // A common but unofficial alternative to m4a
mimeTypes.Add ("mpa", "audio/mpeg");
@@ -528,7 +530,7 @@ namespace System.Web
mimeTypes.Add ("wmls", "text/vnd.wap.wmlscript");
mimeTypes.Add ("wml", "text/vnd.wap.wml");
mimeTypes.Add ("wmp", "video/x-ms-wmp");
- mimeTypes.Add ("woff", "application/x-woff");
+ mimeTypes.Add ("woff", "application/font-woff");
mimeTypes.Add ("word", "application/msword");
mimeTypes.Add ("wp5", "application/wordperfect");
mimeTypes.Add ("wp6", "application/wordperfect");
diff --git a/mcs/class/System.Web/System.Web/SiteMap.cs b/mcs/class/System.Web/System.Web/SiteMap.cs
index 245ff6b2f8f..e64d6c21c70 100644
--- a/mcs/class/System.Web/System.Web/SiteMap.cs
+++ b/mcs/class/System.Web/System.Web/SiteMap.cs
@@ -93,23 +93,8 @@ namespace System.Web
}
}
-#if TARGET_JVM
- const string SiteMap_provider = "SiteMap_provider";
- const string SiteMap_providers = "SiteMap_providers";
- static SiteMapProvider provider
- {
- get { return (SiteMapProvider) AppDomain.CurrentDomain.GetData (SiteMap_provider); }
- set { AppDomain.CurrentDomain.SetData (SiteMap_provider, value); }
- }
- static SiteMapProviderCollection providers
- {
- get { return (SiteMapProviderCollection) AppDomain.CurrentDomain.GetData (SiteMap_providers); }
- set { AppDomain.CurrentDomain.SetData (SiteMap_providers, value); }
- }
-#else
static SiteMapProvider provider;
static SiteMapProviderCollection providers;
-#endif
static object locker = new object ();
}
}
diff --git a/mcs/class/System.Web/System.Web/SiteMapNodeCollection.cs b/mcs/class/System.Web/System.Web/SiteMapNodeCollection.cs
index 12ffbce0e53..84a92091ce6 100644
--- a/mcs/class/System.Web/System.Web/SiteMapNodeCollection.cs
+++ b/mcs/class/System.Web/System.Web/SiteMapNodeCollection.cs
@@ -41,16 +41,7 @@ namespace System.Web
public class SiteMapNodeCollection : IList, IHierarchicalEnumerable
{
ArrayList list;
-#if TARGET_JVM
- const string _siteMapNodeCollection_EmptyList = "SiteMapNodeCollection.EmptyList";
- internal static SiteMapNodeCollection EmptyList
- {
- get { return (SiteMapNodeCollection) AppDomain.CurrentDomain.GetData (_siteMapNodeCollection_EmptyList); }
- set { AppDomain.CurrentDomain.SetData (_siteMapNodeCollection_EmptyList, value); }
- }
-#else
internal static SiteMapNodeCollection EmptyList;
-#endif
static SiteMapNodeCollection ()
{
diff --git a/mcs/class/System.Web/System.Web/StaticFileHandler.cs b/mcs/class/System.Web/System.Web/StaticFileHandler.cs
index 76b6e1087c0..810f24c5644 100644
--- a/mcs/class/System.Web/System.Web/StaticFileHandler.cs
+++ b/mcs/class/System.Web/System.Web/StaticFileHandler.cs
@@ -86,24 +86,7 @@ namespace System.Web
if (strHeader != null) {
DateTime dtIfModifiedSince = DateTime.ParseExact (strHeader, "r", null);
DateTime ftime;
-#if TARGET_JVM
- try
- {
- ftime = fi.LastWriteTime.ToUniversalTime ();
- }
- catch (NotSupportedException)
- {
- // The file is in a WAR, it might be modified with last redeploy.
- try {
- ftime = (DateTime) AppDomain.CurrentDomain.GetData (".appStartTime");
- }
- catch {
- ftime = DateTime.MaxValue;
- }
- }
-#else
ftime = fi.LastWriteTime.ToUniversalTime ();
-#endif
if (ftime <= dtIfModifiedSince) {
response.ContentType = MimeTypes.GetMimeType (fileName);
response.StatusCode = 304;
diff --git a/mcs/class/System.Web/System.Web20.csproj b/mcs/class/System.Web/System.Web20.csproj
deleted file mode 100644
index d13684c62e8..00000000000
--- a/mcs/class/System.Web/System.Web20.csproj
+++ /dev/null
@@ -1,1509 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{0F744BEF-F9B1-4953-BB86-9ADBF73C3CD4}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Web</RootNamespace>
- <AssemblyName>System.Web</AssemblyName>
- <JDKName>1.4.2</JDKName>
- <GHProjectType>1</GHProjectType>
- <!-- workaqround that should be changed to be "framework" when we will be able to compile without MS refs -->
- <GHProjectKind>runtime</GHProjectKind>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <jarserver>ip2</jarserver>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TARGET_JVM;TARGET_J2EE;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <NoStdLib>false</NoStdLib>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>False</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- <NoWarn>67,168,169,219,414,612,618,649</NoWarn>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;TARGET_J2EE;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <NoWarn>67,168,169,219,414,612,618,649</NoWarn>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TARGET_JVM;TARGET_J2EE;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <NoWarn>67,168,169,219,414,612,618,649</NoWarn>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;TARGET_J2EE;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- <NoWarn>67,168,169,219,414,612,618,649</NoWarn>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="System.Web.Caching\Cache.cs" />
- <Compile Include="System.Web.Caching\CacheDependency.cs" />
- <Compile Include="System.Web.Caching\CachedRawResponse.cs" />
- <Compile Include="System.Web.Caching\CachedVaryBy.cs" />
- <Compile Include="System.Web.Caching\CacheItemPriority.cs" />
- <Compile Include="System.Web.Caching\CacheItemRemovedCallback.cs" />
- <Compile Include="System.Web.Caching\CacheItemRemovedReason.cs" />
- <Compile Include="System.Web.Caching\OutputCacheModule.cs" />
- <Compile Include="System.Web.Configuration.Internal\IInternalConfigWebHost.cs" />
- <Compile Include="System.Web.Configuration\AuthConfig.cs" />
- <Compile Include="System.Web.Configuration\AuthenticationConfigHandler.cs" />
- <Compile Include="System.Web.Configuration\AuthenticationMode.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationConfig.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationConfigHandler.cs" />
- <Compile Include="System.Web.Configuration\ClientTargetSectionHandler.cs" />
- <Compile Include="System.Web.Configuration\CompilationConfiguration.cs" />
- <Compile Include="System.Web.Configuration\CompilationConfigurationHandler.cs" />
- <Compile Include="System.Web.Configuration\CustomErrorsConfigHandler.cs" />
- <Compile Include="System.Web.Configuration\FormsAuthPasswordFormat.cs" />
- <Compile Include="System.Web.Configuration\FormsProtectionEnum.cs" />
- <Compile Include="System.Web.Configuration\GlobalizationConfiguration.cs" />
- <Compile Include="System.Web.Configuration\GlobalizationConfigurationHandler.cs" />
- <Compile Include="System.Web.Configuration\HandlerFactoryConfiguration.cs" />
- <Compile Include="System.Web.Configuration\HttpCapabilitiesBase.cs" />
- <Compile Include="System.Web.Configuration\HttpConfigurationContext.cs" />
- <Compile Include="System.Web.Configuration\HttpHandlersSectionHandler.cs" />
- <Compile Include="System.Web.Configuration\HttpModulesConfigurationHandler.cs" />
- <Compile Include="System.Web.Configuration\HttpRuntimeConfig.cs" />
- <Compile Include="System.Web.Configuration\HttpRuntimeConfigurationHandler.cs" />
- <Compile Include="System.Web.Configuration\MachineKeyConfig.cs" />
- <Compile Include="System.Web.Configuration\MachineKeyConfigHandler.cs" />
- <Compile Include="System.Web.Configuration\MachineKeyValidation.cs" />
- <Compile Include="System.Web.Configuration\ModulesConfiguration.cs" />
- <Compile Include="System.Web.Configuration\PagesConfiguration.cs" />
- <Compile Include="System.Web.Configuration\PagesConfigurationHandler.cs" />
- <Compile Include="System.Web.Configuration\TraceConfig.cs" />
- <Compile Include="System.Web.Configuration\TraceConfigurationHandler.cs" />
- <Compile Include="System.Web.Configuration\WebControlsSectionHandler.cs" />
- <Compile Include="System.Web.Configuration_2.0\AdapterDictionary.cs" />
- <Compile Include="System.Web.Configuration_2.0\AnonymousIdentificationSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\AssemblyCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\AssemblyInfo.cs" />
- <Compile Include="System.Web.Configuration_2.0\AuthenticationSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\AuthorizationRule.cs" />
- <Compile Include="System.Web.Configuration_2.0\AuthorizationRuleAction.cs" />
- <Compile Include="System.Web.Configuration_2.0\AuthorizationRuleCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\AuthorizationSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\BufferModesCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\BufferModeSettings.cs" />
- <Compile Include="System.Web.Configuration_2.0\BuildProvider.cs" />
- <Compile Include="System.Web.Configuration_2.0\CacheSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\ClientTarget.cs" />
- <Compile Include="System.Web.Configuration_2.0\ClientTargetCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\ClientTargetSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\CodeSubDirectoriesCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\CodeSubDirectory.cs" />
- <Compile Include="System.Web.Configuration_2.0\CompilationSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\Compiler.cs" />
- <Compile Include="System.Web.Configuration_2.0\CompilerCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\CustomError.cs" />
- <Compile Include="System.Web.Configuration_2.0\CustomErrorCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\CustomErrorsMode.cs" />
- <Compile Include="System.Web.Configuration_2.0\CustomErrorsSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\DeploymentSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\EventMappingSettings.cs" />
- <Compile Include="System.Web.Configuration_2.0\EventMappingSettingsCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\ExpressionBuilder.cs" />
- <Compile Include="System.Web.Configuration_2.0\ExpressionBuilderCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\FormsAuthenticationConfiguration.cs" />
- <Compile Include="System.Web.Configuration_2.0\FormsAuthenticationCredentials.cs" />
- <Compile Include="System.Web.Configuration_2.0\FormsAuthenticationUser.cs" />
- <Compile Include="System.Web.Configuration_2.0\FormsAuthenticationUserCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\GlobalizationSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HealthMonitoringSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HostingEnvironmentSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpCapabilitiesBase.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpConfigurationSystem.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpCookiesSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpHandlerAction.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpHandlerActionCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpHandlersSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpModuleAction.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpModuleActionCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpModulesSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\HttpRuntimeSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\IdentitySection.cs" />
- <Compile Include="System.Web.Configuration_2.0\IRemoteWebConfigurationHostServer.cs" />
- <Compile Include="System.Web.Configuration_2.0\LowerCaseStringConverter.cs" />
- <Compile Include="System.Web.Configuration_2.0\MachineKeySection.cs" />
- <Compile Include="System.Web.Configuration_2.0\MachineKeyValidationConverter.cs" />
- <Compile Include="System.Web.Configuration_2.0\MembershipSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\NamespaceCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\NamespaceInfo.cs" />
- <Compile Include="System.Web.Configuration_2.0\NullableStringValidator.cs" />
- <Compile Include="System.Web.Configuration_2.0\OutputCacheProfile.cs" />
- <Compile Include="System.Web.Configuration_2.0\OutputCacheProfileCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\OutputCacheSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\OutputCacheSettingsSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\PagesEnableSessionState.cs" />
- <Compile Include="System.Web.Configuration_2.0\PagesSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\PassportAuthentication.cs" />
- <Compile Include="System.Web.Configuration_2.0\PositiveTimeSpanValidator.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProcessModelComAuthenticationLevel.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProcessModelComImpersonationLevel.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProcessModelLogLevel.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProcessModelSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfileGroupSettings.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfileGroupSettingsCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfilePropertyNameValidator.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfilePropertySettings.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfilePropertySettingsCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfileSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfileSettings.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProfileSettingsCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\PropertyHelper.cs" />
- <Compile Include="System.Web.Configuration_2.0\ProvidersHelper.cs" />
- <Compile Include="System.Web.Configuration_2.0\RegexWorker.cs" />
- <Compile Include="System.Web.Configuration_2.0\RoleManagerSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\RootProfilePropertySettingsCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\RuleSettings.cs" />
- <Compile Include="System.Web.Configuration_2.0\RuleSettingsCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\SecurityPolicySection.cs" />
- <Compile Include="System.Web.Configuration_2.0\SerializationMode.cs" />
- <Compile Include="System.Web.Configuration_2.0\SessionPageStateSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\SessionStateSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\SiteMapSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\SqlCacheDependencyDatabase.cs" />
- <Compile Include="System.Web.Configuration_2.0\SqlCacheDependencyDatabaseCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\SqlCacheDependencySection.cs" />
- <Compile Include="System.Web.Configuration_2.0\SystemWebCachingSectionGroup.cs" />
- <Compile Include="System.Web.Configuration_2.0\SystemWebSectionGroup.cs" />
- <Compile Include="System.Web.Configuration_2.0\TagMapCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\TagMapInfo.cs" />
- <Compile Include="System.Web.Configuration_2.0\TagPrefixCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\TagPrefixInfo.cs" />
- <Compile Include="System.Web.Configuration_2.0\TraceDisplayMode.cs" />
- <Compile Include="System.Web.Configuration_2.0\TraceSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\TransformerInfo.cs" />
- <Compile Include="System.Web.Configuration_2.0\TransformerInfoCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\TrustLevel.cs" />
- <Compile Include="System.Web.Configuration_2.0\TrustLevelCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\TrustSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\UrlMapping.cs" />
- <Compile Include="System.Web.Configuration_2.0\UrlMappingCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\UrlMappingsSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\VirtualDirectoryMapping.cs" />
- <Compile Include="System.Web.Configuration_2.0\VirtualDirectoryMappingCollection.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebApplicationLevel.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebConfigurationFileMap.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebConfigurationHost.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebConfigurationManager.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebContext.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebControlsSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebPartsPersonalization.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebPartsPersonalizationAuthorization.cs" />
- <Compile Include="System.Web.Configuration_2.0\WebPartsSection.cs" />
- <Compile Include="System.Web.Configuration_2.0\XhtmlConformanceMode.cs" />
- <Compile Include="System.Web.Configuration_2.0\XhtmlConformanceSection.cs" />
- <Compile Include="System.Web.Handlers\AssemblyResourceLoader.cs" />
- <Compile Include="System.Web.Handlers\TraceHandler.cs" />
- <Compile Include="System.Web.Hosting\AppDomainFactory.cs" />
- <Compile Include="System.Web.Hosting\ApplicationHost.cs" />
- <Compile Include="System.Web.Hosting\ApplicationInfo.cs" />
- <Compile Include="System.Web.Hosting\ApplicationManager.cs" />
- <Compile Include="System.Web.Hosting\AppManagerAppDomainFactory.cs" />
- <Compile Include="System.Web.Hosting\BareApplicationHost.cs" />
- <Compile Include="System.Web.Hosting\DefaultVirtualDirectory.cs" />
- <Compile Include="System.Web.Hosting\DefaultVirtualFile.cs" />
- <Compile Include="System.Web.Hosting\DefaultVirtualPathProvider.cs" />
- <Compile Include="System.Web.Hosting\HostingEnvironment.cs" />
- <Compile Include="System.Web.Hosting\IAppDomainFactory.cs" />
- <Compile Include="System.Web.Hosting\IAppManagerAppDomainFactory.cs" />
- <Compile Include="System.Web.Hosting\IISAPIRuntime.cs" />
- <Compile Include="System.Web.Hosting\IRegisteredObject.cs" />
- <Compile Include="System.Web.Hosting\ISAPIRuntime.cs" />
- <Compile Include="System.Web.Hosting\SimpleWorkerRequest.cs" />
- <Compile Include="System.Web.Hosting\VirtualDirectory.cs" />
- <Compile Include="System.Web.Hosting\VirtualFile.cs" />
- <Compile Include="System.Web.Hosting\VirtualFileBase.cs" />
- <Compile Include="System.Web.Hosting\VirtualPathProvider.cs" />
- <Compile Include="System.Web.J2EE\J2EEConsts.cs" />
- <Compile Include="System.Web.J2EE\J2EEUtils.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.J2EE\PageMapper.cs" />
- <Compile Include="System.Web.Mail\Base64AttachmentEncoder.cs" />
- <Compile Include="System.Web.Mail\IAttachmentEncoder.cs" />
- <Compile Include="System.Web.Mail\MailAddress.cs" />
- <Compile Include="System.Web.Mail\MailAddressCollection.cs" />
- <Compile Include="System.Web.Mail\MailAttachment.cs" />
- <Compile Include="System.Web.Mail\MailEncoding.cs" />
- <Compile Include="System.Web.Mail\MailFormat.cs" />
- <Compile Include="System.Web.Mail\MailHeader.cs" />
- <Compile Include="System.Web.Mail\MailMessage.cs" />
- <Compile Include="System.Web.Mail\MailMessageWrapper.cs" />
- <Compile Include="System.Web.Mail\MailPriority.cs" />
- <Compile Include="System.Web.Mail\MailUtil.cs" />
- <Compile Include="System.Web.Mail\RelatedBodyPart.cs" />
- <Compile Include="System.Web.Mail\SmtpClient.cs" />
- <Compile Include="System.Web.Mail\SmtpException.cs" />
- <Compile Include="System.Web.Mail\SmtpMail.cs" />
- <Compile Include="System.Web.Mail\SmtpResponse.cs" />
- <Compile Include="System.Web.Mail\SmtpStream.cs" />
- <Compile Include="System.Web.Mail\ToUUEncodingTransform.cs" />
- <Compile Include="System.Web.Mail\UUAttachmentEncoder.cs" />
- <Compile Include="System.Web.Management\EventNotificationType.cs" />
- <Compile Include="System.Web.Management\IRegiisUtility.cs" />
- <Compile Include="System.Web.Management\IWebEventCustomEvaluator.cs" />
- <Compile Include="System.Web.Management\RuleFiringRecord.cs" />
- <Compile Include="System.Web.Management\SessionStateType.cs" />
- <Compile Include="System.Web.Management\SqlFeatures.cs" />
- <Compile Include="System.Web.Management\WebApplicationInformation.cs" />
- <Compile Include="System.Web.Management\WebBaseEvent.cs" />
- <Compile Include="System.Web.Management\WebEventFormatter.cs" />
- <Compile Include="System.Web.Profile\CustomProviderDataAttribute.cs" />
- <Compile Include="System.Web.Profile\DefaultProfile.cs" />
- <Compile Include="System.Web.Profile\ProfileAuthenticationOption.cs" />
- <Compile Include="System.Web.Profile\ProfileAutoSaveEventArgs.cs" />
- <Compile Include="System.Web.Profile\ProfileAutoSaveEventHandler.cs" />
- <Compile Include="System.Web.Profile\ProfileBase.cs" />
- <Compile Include="System.Web.Profile\ProfileEventArgs.cs" />
- <Compile Include="System.Web.Profile\ProfileEventHandler.cs" />
- <Compile Include="System.Web.Profile\ProfileGroupBase.cs" />
- <Compile Include="System.Web.Profile\ProfileInfo.cs" />
- <Compile Include="System.Web.Profile\ProfileInfoCollection.cs" />
- <Compile Include="System.Web.Profile\ProfileManager.cs" />
- <Compile Include="System.Web.Profile\ProfileParser.jvm.cs" />
- <Compile Include="System.Web.Profile\ProfileMigrateEventArgs.cs" />
- <Compile Include="System.Web.Profile\ProfileMigrateEventHandler.cs" />
- <Compile Include="System.Web.Profile\ProfileModule.cs" />
- <Compile Include="System.Web.Profile\ProfileProvider.cs" />
- <Compile Include="System.Web.Profile\ProfileProviderAttribute.cs" />
- <Compile Include="System.Web.Profile\ProfileProviderCollection.cs" />
- <Compile Include="System.Web.Profile\SettingsAllowAnonymousAttribute.cs" />
- <Compile Include="System.Web.Profile\SqlProfileProvider.cs" />
- <Compile Include="System.Web.Security\ActiveDirectoryConnectionProtection.cs" />
- <Compile Include="System.Web.Security\ActiveDirectoryMembershipProvider.cs" />
- <Compile Include="System.Web.Security\AnonymousIdentificationEventArgs.cs" />
- <Compile Include="System.Web.Security\AnonymousIdentificationEventHandler.cs" />
- <Compile Include="System.Web.Security\AnonymousIdentificationModule.cs" />
- <Compile Include="System.Web.Security\CookieProtection.cs" />
- <Compile Include="System.Web.Security\DefaultAuthenticationEventArgs.cs" />
- <Compile Include="System.Web.Security\DefaultAuthenticationEventHandler.cs" />
- <Compile Include="System.Web.Security\DefaultAuthenticationModule.cs" />
- <Compile Include="System.Web.Security\FileAuthorizationModule.cs" />
- <Compile Include="System.Web.Security\FormsAuthentication.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationEventArgs.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationEventHandler.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationModule.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationTicket.cs" />
- <Compile Include="System.Web.Security\FormsIdentity.cs" />
- <Compile Include="System.Web.Security\Membership.cs" />
- <Compile Include="System.Web.Security\MembershipCreateStatus.cs" />
- <Compile Include="System.Web.Security\MembershipCreateUserException.cs" />
- <Compile Include="System.Web.Security\MembershipOnlineStatus.cs" />
- <Compile Include="System.Web.Security\MembershipPasswordException.cs" />
- <Compile Include="System.Web.Security\MembershipPasswordFormat.cs" />
- <Compile Include="System.Web.Security\MembershipProvider.cs" />
- <Compile Include="System.Web.Security\MembershipProviderCollection.cs" />
- <Compile Include="System.Web.Security\MembershipSortOptions.cs" />
- <Compile Include="System.Web.Security\MembershipUser.cs" />
- <Compile Include="System.Web.Security\MembershipUserCollection.cs" />
- <Compile Include="System.Web.Security\MembershipValidatePasswordEventHandler.cs" />
- <Compile Include="System.Web.Security\PassportAuthenticationEventArgs.cs" />
- <Compile Include="System.Web.Security\PassportAuthenticationEventHandler.cs" />
- <Compile Include="System.Web.Security\PassportAuthenticationModule.cs" />
- <Compile Include="System.Web.Security\PassportIdentity.cs" />
- <Compile Include="System.Web.Security\RoleManagerEventArgs.cs" />
- <Compile Include="System.Web.Security\RoleManagerEventHandler.cs" />
- <Compile Include="System.Web.Security\RoleManagerModule.cs" />
- <Compile Include="System.Web.Security\RolePrincipal.cs" />
- <Compile Include="System.Web.Security\RoleProvider.cs" />
- <Compile Include="System.Web.Security\RoleProviderCollection.cs" />
- <Compile Include="System.Web.Security\Roles.cs" />
- <Compile Include="System.Web.Security\SqlMembershipProvider.cs" />
- <Compile Include="System.Web.Security\SqlRoleProvider.cs" />
- <Compile Include="System.Web.Security\UrlAuthorizationModule.cs" />
- <Compile Include="System.Web.Security\ValidatePasswordEventArgs.cs" />
- <Compile Include="System.Web.SessionState\IReadOnlySessionState.cs" />
- <Compile Include="System.Web.SessionState\IRequiresSessionState.cs" />
- <Compile Include="System.Web.SessionState\IStateRuntime.cs" />
- <Compile Include="System.Web.SessionState\RemoteStateServer.cs" />
- <Compile Include="System.Web.SessionState\SessionConfig.cs" />
- <Compile Include="System.Web.SessionState\SessionDictionary.cs" />
- <Compile Include="System.Web.SessionState\SessionId.cs" />
- <Compile Include="System.Web.SessionState\SessionSQLServerHandler.cs" />
- <Compile Include="System.Web.SessionState\SessionStateMode.cs" />
- <Compile Include="System.Web.SessionState\StateRuntime.cs" />
- <Compile Include="System.Web.SessionState\StateServerItem.cs" />
- <Compile Include="System.Web.SessionState_2.0\HttpSessionState.cs" />
- <Compile Include="System.Web.SessionState_2.0\HttpSessionStateContainer.cs" />
- <Compile Include="System.Web.SessionState_2.0\IHttpSessionState.cs" />
- <Compile Include="System.Web.SessionState_2.0\ISessionIDManager.cs" />
- <Compile Include="System.Web.SessionState_2.0\ISessionStateItemCollection.cs" />
- <Compile Include="System.Web.SessionState_2.0\RemoteStateServer.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionIDManager.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionInProcHandler.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionSQLServerHandler.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateActions.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateItemCollection.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateItemExpireCallback.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateModule.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateServerHandler.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateStoreData.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateStoreProviderBase.cs" />
- <Compile Include="System.Web.SessionState_2.0\SessionStateUtility.cs" />
- <Compile Include="System.Web.SessionState_2.0\StateServerItem.cs" />
- <Compile Include="System.Web.UI.Adapters\ControlAdapter.cs" />
- <Compile Include="System.Web.UI.Adapters\PageAdapter.cs" />
- <Compile Include="System.Web.UI.Adapters\WmlPostFieldType.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlAnchor.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlButton.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlContainerControl.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlControl.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlForm.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlGenericControl.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlHead.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlImage.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputButton.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputCheckBox.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputControl.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputFile.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputHidden.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputImage.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputPassword.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputRadioButton.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputReset.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputSubmit.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputText.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlLink.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlMeta.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelect.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTable.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCell.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCellCollection.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableRow.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableRowCollection.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTextArea.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTitle.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\DataBoundControlAdapter.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\HideDisabledControlAdapter.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\HierarchicalDataBoundControlAdapter.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\MenuAdapter.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\WebControlAdapter.cs" />
- <Compile Include="System.Web.UI.WebControls\AccessDataSource.cs" />
- <Compile Include="System.Web.UI.WebControls\AccessDataSourceView.cs" />
- <Compile Include="System.Web.UI.WebControls\AdCreatedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\AdCreatedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\AdRotator.cs" />
- <Compile Include="System.Web.UI.WebControls\AssociatedControlConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\AuthenticateEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\AuthenticateEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\AutoCompleteType.cs" />
- <Compile Include="System.Web.UI.WebControls\AutoGeneratedField.cs" />
- <Compile Include="System.Web.UI.WebControls\AutoGeneratedFieldProperties.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseCompareValidator.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataBoundControl.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataList.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseValidator.cs" />
- <Compile Include="System.Web.UI.WebControls\BorderStyle.cs" />
- <Compile Include="System.Web.UI.WebControls\BoundColumn.cs" />
- <Compile Include="System.Web.UI.WebControls\BoundField.cs" />
- <Compile Include="System.Web.UI.WebControls\BulletedList.cs" />
- <Compile Include="System.Web.UI.WebControls\BulletedListDisplayMode.cs" />
- <Compile Include="System.Web.UI.WebControls\BulletedListEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\BulletedListEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\BulletStyle.cs" />
- <Compile Include="System.Web.UI.WebControls\Button.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonColumn.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonColumnType.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonField.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonFieldBase.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonType.cs" />
- <Compile Include="System.Web.UI.WebControls\Calendar.cs" />
- <Compile Include="System.Web.UI.WebControls\CalendarDay.cs" />
- <Compile Include="System.Web.UI.WebControls\CalendarSelectionMode.cs" />
- <Compile Include="System.Web.UI.WebControls\ChangePassword.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBox.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxField.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxList.cs" />
- <Compile Include="System.Web.UI.WebControls\ChildTable.cs" />
- <Compile Include="System.Web.UI.WebControls\CircleHotSpot.cs" />
- <Compile Include="System.Web.UI.WebControls\CollectionDataSource.cs" />
- <Compile Include="System.Web.UI.WebControls\CommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\CommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\CommandField.cs" />
- <Compile Include="System.Web.UI.WebControls\CompareValidator.cs" />
- <Compile Include="System.Web.UI.WebControls\CompleteWizardStep.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeControl.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeDataBoundControl.cs" />
- <Compile Include="System.Web.UI.WebControls\ContainedTable.cs" />
- <Compile Include="System.Web.UI.WebControls\Content.cs" />
- <Compile Include="System.Web.UI.WebControls\ContentDirection.cs" />
- <Compile Include="System.Web.UI.WebControls\ContentPlaceHolder.cs" />
- <Compile Include="System.Web.UI.WebControls\ControlIDConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\ControlParameter.cs" />
- <Compile Include="System.Web.UI.WebControls\ControlPropertyNameConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\CookieParameter.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserErrorEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserErrorEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserWizard.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserWizardStep.cs" />
- <Compile Include="System.Web.UI.WebControls\CustomValidator.cs" />
- <Compile Include="System.Web.UI.WebControls\DataBoundControl.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlButton.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlCellType.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlCommands.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlField.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlFieldCell.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlFieldCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlFieldHeaderCell.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlRowState.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlRowType.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGrid.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridColumn.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridColumnCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItem.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridPageChangedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridPageChangedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridPagerStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridSortCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridSortCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKey.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyArray.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\DataList.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItem.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DataSourceCacheManager.cs" />
- <Compile Include="System.Web.UI.WebControls\DayNameFormat.cs" />
- <Compile Include="System.Web.UI.WebControls\DayRenderEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DayRenderEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsView.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewDeletedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewDeletedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewDeleteEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewDeleteEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewInsertedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewInsertedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewInsertEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewInsertEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewMode.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewModeEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewModeEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewPageEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewPageEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewPagerRow.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewRow.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewRowCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewUpdatedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewUpdatedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewUpdateEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewUpdateEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\DropDownList.cs" />
- <Compile Include="System.Web.UI.WebControls\EditCommandColumn.cs" />
- <Compile Include="System.Web.UI.WebControls\EmbeddedMailObject.cs" />
- <Compile Include="System.Web.UI.WebControls\EmbeddedMailObjectsCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\FileUpload.cs" />
- <Compile Include="System.Web.UI.WebControls\FirstDayOfWeek.cs" />
- <Compile Include="System.Web.UI.WebControls\FontInfo.cs" />
- <Compile Include="System.Web.UI.WebControls\FontNamesConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\FontSize.cs" />
- <Compile Include="System.Web.UI.WebControls\FontUnit.cs" />
- <Compile Include="System.Web.UI.WebControls\FontUnitConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\FormParameter.cs" />
- <Compile Include="System.Web.UI.WebControls\FormView.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewDeletedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewDeletedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewDeleteEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewDeleteEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewInsertedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewInsertedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewInsertEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewInsertEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewMode.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewModeEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewModeEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewPageEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewPageEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewRow.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewPagerRow.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewUpdatedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewUpdatedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewUpdateEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewUpdateEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridLines.cs" />
- <Compile Include="System.Web.UI.WebControls\GridView.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewCancelEditEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewCancelEditEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewDeletedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewDeletedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewDeleteEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewDeleteEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewEditEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewEditEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewPageEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewPageEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRow.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRowCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRowEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRowEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewSelectEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewSelectEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewSortEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewSortEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewUpdatedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewUpdatedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewUpdateEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewUpdateEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\HiddenField.cs" />
- <Compile Include="System.Web.UI.WebControls\HierarchicalDataBoundControl.cs" />
- <Compile Include="System.Web.UI.WebControls\HorizontalAlign.cs" />
- <Compile Include="System.Web.UI.WebControls\HorizontalAlignConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\HotSpot.cs" />
- <Compile Include="System.Web.UI.WebControls\HotSpotCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\HotSpotMode.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLink.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkColumn.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkField.cs" />
- <Compile Include="System.Web.UI.WebControls\IButtonControl.cs" />
- <Compile Include="System.Web.UI.WebControls\ICallbackContainer.cs" />
- <Compile Include="System.Web.UI.WebControls\ICompositeControlDesignerAccessor.cs" />
- <Compile Include="System.Web.UI.WebControls\Image.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageAlign.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageButton.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageField.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageMap.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageMapEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageMapEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\IPostBackContainer.cs" />
- <Compile Include="System.Web.UI.WebControls\IRepeatInfoUser.cs" />
- <Compile Include="System.Web.UI.WebControls\Label.cs" />
- <Compile Include="System.Web.UI.WebControls\LinkButton.cs" />
- <Compile Include="System.Web.UI.WebControls\ListBox.cs" />
- <Compile Include="System.Web.UI.WebControls\ListControl.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItem.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemType.cs" />
- <Compile Include="System.Web.UI.WebControls\ListSelectionMode.cs" />
- <Compile Include="System.Web.UI.WebControls\Literal.cs" />
- <Compile Include="System.Web.UI.WebControls\LiteralMode.cs" />
- <Compile Include="System.Web.UI.WebControls\Localize.cs" />
- <Compile Include="System.Web.UI.WebControls\Login.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginCancelEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginCancelEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginFailureAction.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginName.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginStatus.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginTextLayout.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginView.cs" />
- <Compile Include="System.Web.UI.WebControls\LogoutAction.cs" />
- <Compile Include="System.Web.UI.WebControls\MailDefinition.cs" />
- <Compile Include="System.Web.UI.WebControls\MailMessageEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\MailMessageEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\Menu.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuItem.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuItemBinding.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuItemBindingCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuItemCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuItemStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\MenuItemStyleCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\MenuItemTemplateContainer.cs" />
- <Compile Include="System.Web.UI.WebControls\MonthChangedEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\MonthChangedEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\MultiView.cs" />
- <Compile Include="System.Web.UI.WebControls\NextPrevFormat.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSource.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceDisposingEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceDisposingEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceFilteringEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceFilteringEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceMethodEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceMethodEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceSelectingEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceSelectingEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceStatusEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceStatusEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceView.cs" />
- <Compile Include="System.Web.UI.WebControls\Orientation.cs" />
- <Compile Include="System.Web.UI.WebControls\PagedDataSource.cs" />
- <Compile Include="System.Web.UI.WebControls\PagerButtons.cs" />
- <Compile Include="System.Web.UI.WebControls\PagerMode.cs" />
- <Compile Include="System.Web.UI.WebControls\PagerPosition.cs" />
- <Compile Include="System.Web.UI.WebControls\PagerSettings.cs" />
- <Compile Include="System.Web.UI.WebControls\Panel.cs" />
- <Compile Include="System.Web.UI.WebControls\PanelStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\Parameter.cs" />
- <Compile Include="System.Web.UI.WebControls\ParameterCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\PasswordRecovery.cs" />
- <Compile Include="System.Web.UI.WebControls\PathDirection.cs" />
- <Compile Include="System.Web.UI.WebControls\PlaceHolder.cs" />
- <Compile Include="System.Web.UI.WebControls\PolygonHotSpot.cs" />
- <Compile Include="System.Web.UI.WebControls\ProfileParameter.cs" />
- <Compile Include="System.Web.UI.WebControls\QueryStringParameter.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButton.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButtonList.cs" />
- <Compile Include="System.Web.UI.WebControls\RangeValidator.cs" />
- <Compile Include="System.Web.UI.WebControls\RectangleHotSpot.cs" />
- <Compile Include="System.Web.UI.WebControls\RegularExpressionValidator.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatDirection.cs" />
- <Compile Include="System.Web.UI.WebControls\Repeater.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterItem.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterItemCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterItemEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterItemEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfo.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatLayout.cs" />
- <Compile Include="System.Web.UI.WebControls\RequiredFieldValidator.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroup.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\ScrollBars.cs" />
- <Compile Include="System.Web.UI.WebControls\SelectedDatesCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\SendMailErrorEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\SendMailErrorEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\ServerValidateEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\ServerValidateEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\SessionParameter.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapDataSource.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapDataSourceView.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapHierarchicalDataSourceView.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapNodeItem.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapNodeItemEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapNodeItemEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapNodeItemType.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapPath.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapViewType.cs" />
- <Compile Include="System.Web.UI.WebControls\SortDirection.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSource.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceCommandEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceCommandEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceCommandType.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceFilteringEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceFilteringEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceMode.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceSelectingEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceSelectingEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceStatusEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceStatusEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceView.cs" />
- <Compile Include="System.Web.UI.WebControls\StringArrayConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\Style.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\SubMenuStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\SubMenuStyleCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\Table.cs" />
- <Compile Include="System.Web.UI.WebControls\TableCaptionAlign.cs" />
- <Compile Include="System.Web.UI.WebControls\TableCell.cs" />
- <Compile Include="System.Web.UI.WebControls\TableCellCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\TableFooterRow.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderCell.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderRow.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderScope.cs" />
- <Compile Include="System.Web.UI.WebControls\TableItemStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableRow.cs" />
- <Compile Include="System.Web.UI.WebControls\TableRowCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\TableRowSection.cs" />
- <Compile Include="System.Web.UI.WebControls\TableSectionStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TargetConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\TemplateColumn.cs" />
- <Compile Include="System.Web.UI.WebControls\TemplatedWizardStep.cs" />
- <Compile Include="System.Web.UI.WebControls\TemplateField.cs" />
- <Compile Include="System.Web.UI.WebControls\TextAlign.cs" />
- <Compile Include="System.Web.UI.WebControls\TextBox.cs" />
- <Compile Include="System.Web.UI.WebControls\TextBoxMode.cs" />
- <Compile Include="System.Web.UI.WebControls\TitleFormat.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNode.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeBinding.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeBindingCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeSelectAction.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeStyle.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TreeNodeStyleCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeTypes.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeView.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeViewImageSet.cs" />
- <Compile Include="System.Web.UI.WebControls\Unit.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitType.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidatedControlConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidationCompareOperator.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidationDataType.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidationSummary.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidationSummaryDisplayMode.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidatorDisplay.cs" />
- <Compile Include="System.Web.UI.WebControls\VerticalAlign.cs" />
- <Compile Include="System.Web.UI.WebControls\VerticalAlignConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\View.cs" />
- <Compile Include="System.Web.UI.WebControls\ViewCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\WebColorConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\WebControl.cs" />
- <Compile Include="System.Web.UI.WebControls\Wizard.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardNavigationEventArgs.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardNavigationEventHandler.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStep.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepBase.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepCollection.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepType.cs" />
- <Compile Include="System.Web.UI.WebControls\Xml.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSource.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSourceNodeDescriptor.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSourcePropertyDescriptor.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSourceView.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlHierarchicalDataSourceView.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlHierarchicalEnumerable.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlHierarchyData.cs" />
- <Compile Include="System.Web.UI\AttributeCollection.cs" />
- <Compile Include="System.Web.UI\BasePartialCachingControl.cs" />
- <Compile Include="System.Web.UI\BoundPropertyEntry.cs" />
- <Compile Include="System.Web.UI\BuildMethod.cs" />
- <Compile Include="System.Web.UI\BuildTemplateMethod.cs" />
- <Compile Include="System.Web.UI\ChtmlTextWriter.cs" />
- <Compile Include="System.Web.UI\ClientScriptManager.cs" />
- <Compile Include="System.Web.UI\CompilationMode.cs" />
- <Compile Include="System.Web.UI\CompiledBindableTemplateBuilder.cs" />
- <Compile Include="System.Web.UI\CompiledTemplateBuilder.cs" />
- <Compile Include="System.Web.UI\ConflictOptions.cs" />
- <Compile Include="System.Web.UI\ConstructorNeedsTagAttribute.cs" />
- <Compile Include="System.Web.UI\Control.cs" />
- <Compile Include="System.Web.UI\Control.jvm.cs" />
- <Compile Include="System.Web.UI\ControlBuilderAttribute.cs" />
- <Compile Include="System.Web.UI\ControlCachePolicy.cs" />
- <Compile Include="System.Web.UI\ControlCollection.cs" />
- <Compile Include="System.Web.UI\ControlSkin.cs" />
- <Compile Include="System.Web.UI\ControlSkinDelegate.cs" />
- <Compile Include="System.Web.UI\ControlValuePropertyAttribute.cs" />
- <Compile Include="System.Web.UI\CssStyleCollection.cs" />
- <Compile Include="System.Web.UI\DataBinder.cs" />
- <Compile Include="System.Web.UI\DataBinding.cs" />
- <Compile Include="System.Web.UI\DataBindingCollection.cs" />
- <Compile Include="System.Web.UI\DataBindingHandlerAttribute.cs" />
- <Compile Include="System.Web.UI\DataBoundLiteralControl.cs" />
- <Compile Include="System.Web.UI\DataSourceCacheExpiry.cs" />
- <Compile Include="System.Web.UI\DataSourceCapabilities.cs" />
- <Compile Include="System.Web.UI\DataSourceControl.cs" />
- <Compile Include="System.Web.UI\DataSourceOperation.cs" />
- <Compile Include="System.Web.UI\DataSourceSelectArguments.cs" />
- <Compile Include="System.Web.UI\DataSourceView.cs" />
- <Compile Include="System.Web.UI\DataSourceViewOperationCallback.cs" />
- <Compile Include="System.Web.UI\DataSourceViewSelectCallback.cs" />
- <Compile Include="System.Web.UI\DesignerDataBoundLiteralControl.cs" />
- <Compile Include="System.Web.UI\EmptyControlCollection.cs" />
- <Compile Include="System.Web.UI\ExpressionBinding.cs" />
- <Compile Include="System.Web.UI\ExpressionBindingCollection.cs" />
- <Compile Include="System.Web.UI\ExtractTemplateValuesMethod.cs" />
- <Compile Include="System.Web.UI\FilterableAttribute.cs" />
- <Compile Include="System.Web.UI\HiddenFieldPageStatePersister.cs" />
- <Compile Include="System.Web.UI\HierarchicalDataSourceControl.cs" />
- <Compile Include="System.Web.UI\HierarchicalDataSourceView.cs" />
- <Compile Include="System.Web.UI\Html32TextWriter.cs" />
- <Compile Include="System.Web.UI\HtmlControlPersistableAttribute.cs" />
- <Compile Include="System.Web.UI\HtmlTextWriter.cs" />
- <Compile Include="System.Web.UI\HtmlTextWriterAttribute.cs" />
- <Compile Include="System.Web.UI\HtmlTextWriterStyle.cs" />
- <Compile Include="System.Web.UI\HtmlTextWriterTag.cs" />
- <Compile Include="System.Web.UI\IAttributeAccessor.cs" />
- <Compile Include="System.Web.UI\IBindableTemplate.cs" />
- <Compile Include="System.Web.UI\ICallbackEventHandler.cs" />
- <Compile Include="System.Web.UI\ICheckBoxControl.cs" />
- <Compile Include="System.Web.UI\IControlBuilderAccessor.cs" />
- <Compile Include="System.Web.UI\IControlDesignerAccessor.cs" />
- <Compile Include="System.Web.UI\IDataBindingsAccessor.cs" />
- <Compile Include="System.Web.UI\IDataItemContainer.cs" />
- <Compile Include="System.Web.UI\IDataSource.cs" />
- <Compile Include="System.Web.UI\IDataSourceViewSchemaAccessor.cs" />
- <Compile Include="System.Web.UI\IDReferencePropertyAttribute.cs" />
- <Compile Include="System.Web.UI\IEditableTextControl.cs" />
- <Compile Include="System.Web.UI\IExpressionsAccessor.cs" />
- <Compile Include="System.Web.UI\IFilterResolutionService.cs" />
- <Compile Include="System.Web.UI\IgnoreUnknownContentAttribute.cs" />
- <Compile Include="System.Web.UI\IHierarchicalDataSource.cs" />
- <Compile Include="System.Web.UI\IHierarchicalEnumerable.cs" />
- <Compile Include="System.Web.UI\IHierarchyData.cs" />
- <Compile Include="System.Web.UI\ImageClickEventArgs.cs" />
- <Compile Include="System.Web.UI\ImageClickEventHandler.cs" />
- <Compile Include="System.Web.UI\INamingContainer.cs" />
- <Compile Include="System.Web.UI\INavigateUIData.cs" />
- <Compile Include="System.Web.UI\IParserAccessor.cs" />
- <Compile Include="System.Web.UI\IPostBackDataHandler.cs" />
- <Compile Include="System.Web.UI\IPostBackEventHandler.cs" />
- <Compile Include="System.Web.UI\IResourceUrlGenerator.cs" />
- <Compile Include="System.Web.UI\IStateFormatter.cs" />
- <Compile Include="System.Web.UI\IStateManager.cs" />
- <Compile Include="System.Web.UI\IStyleSheet.cs" />
- <Compile Include="System.Web.UI\ITagNameToTypeMapper.cs" />
- <Compile Include="System.Web.UI\ITemplate.cs" />
- <Compile Include="System.Web.UI\ITextControl.cs" />
- <Compile Include="System.Web.UI\IUrlResolutionService.cs" />
- <Compile Include="System.Web.UI\IUserControlDesignerAccessor.cs" />
- <Compile Include="System.Web.UI\IUserControlTypeResolutionService.cs" />
- <Compile Include="System.Web.UI\IValidator.cs" />
- <Compile Include="System.Web.UI\KeyedList.cs" />
- <Compile Include="System.Web.UI\KeyedListEnumerator.cs" />
- <Compile Include="System.Web.UI\ListSourceHelper.cs" />
- <Compile Include="System.Web.UI\LiteralControl.cs" />
- <Compile Include="System.Web.UI\LosFormatter.cs" />
- <Compile Include="System.Web.UI\MasterPage.cs" />
- <Compile Include="System.Web.UI\MinimizableAttributeTypeConverter.cs" />
- <Compile Include="System.Web.UI\NonVisualControlAttribute.cs" />
- <Compile Include="System.Web.UI\ObjectConverter.cs" />
- <Compile Include="System.Web.UI\ObjectStateFormatter.cs" />
- <Compile Include="System.Web.UI\ObjectTag.cs" />
- <Compile Include="System.Web.UI\OutputCacheLocation.cs" />
- <Compile Include="System.Web.UI\OutputCacheParameters.cs" />
- <Compile Include="System.Web.UI\PageHandlerFactory.cs" />
- <Compile Include="System.Web.UI\PageStatePersister.cs" />
- <Compile Include="System.Web.UI\PageTheme.cs" />
- <Compile Include="System.Web.UI\Pair.cs" />
- <Compile Include="System.Web.UI\ParseChildrenAttribute.cs" />
- <Compile Include="System.Web.UI\PartialCachingAttribute.cs" />
- <Compile Include="System.Web.UI\PartialCachingControl.cs" />
- <Compile Include="System.Web.UI\PersistChildrenAttribute.cs" />
- <Compile Include="System.Web.UI\PersistenceMode.cs" />
- <Compile Include="System.Web.UI\PersistenceModeAttribute.cs" />
- <Compile Include="System.Web.UI\PostBackOptions.cs" />
- <Compile Include="System.Web.UI\PropertyConverter.cs" />
- <Compile Include="System.Web.UI\PropertyEntry.cs" />
- <Compile Include="System.Web.UI\RenderMethod.cs" />
- <Compile Include="System.Web.UI\SimplePropertyEntry.cs" />
- <Compile Include="System.Web.UI\StateBag.cs" />
- <Compile Include="System.Web.UI\StateItem.cs" />
- <Compile Include="System.Web.UI\StateManagedCollection.cs" />
- <Compile Include="System.Web.UI\StaticPartialCachingControl.cs" />
- <Compile Include="System.Web.UI\SupportsEventValidationAttribute.cs" />
- <Compile Include="System.Web.UI\TagPrefixAttribute.cs" />
- <Compile Include="System.Web.UI\TemplateContainerAttribute.cs" />
- <Compile Include="System.Web.UI\TemplateContentType.cs" />
- <Compile Include="System.Web.UI\TemplateInstance.cs" />
- <Compile Include="System.Web.UI\TemplateInstanceAttribute.cs" />
- <Compile Include="System.Web.UI\ThemeableAttribute.cs" />
- <Compile Include="System.Web.UI\ToolboxDataAttribute.cs" />
- <Compile Include="System.Web.UI\Triplet.cs" />
- <Compile Include="System.Web.UI\UrlPropertyAttribute.cs" />
- <Compile Include="System.Web.UI\UrlTypes.cs" />
- <Compile Include="System.Web.UI\UserControl.cs" />
- <Compile Include="System.Web.UI\ValidationPropertyAttribute.cs" />
- <Compile Include="System.Web.UI\ValidatorCollection.cs" />
- <Compile Include="System.Web.UI\VerificationConditionalOperator.cs" />
- <Compile Include="System.Web.UI\VerificationReportLevel.cs" />
- <Compile Include="System.Web.UI\VerificationRule.cs" />
- <Compile Include="System.Web.UI\ViewStateEncryptionMode.cs" />
- <Compile Include="System.Web.UI\VirtualReferenceType.cs" />
- <Compile Include="System.Web.UI\WebResourceAttribute.cs" />
- <Compile Include="System.Web.UI\XhtmlMobileDocType.cs" />
- <Compile Include="System.Web.UI\XhtmlTextWriter.cs" />
- <Compile Include="System.Web.UI\XPathBinder.cs" />
- <Compile Include="System.Web.Util\AltSerialization.cs" />
- <Compile Include="System.Web.Util\DataSourceHelper.cs" />
- <Compile Include="System.Web.Util\DataSourceResolver.cs" />
- <Compile Include="System.Web.Util\IWebObjectFactory.cs" />
- <Compile Include="System.Web.Util\IWebPropertyAccessor.cs" />
- <Compile Include="System.Web.Util\StrUtils.cs" />
- <Compile Include="System.Web.Util\TimeUtil.cs" />
- <Compile Include="System.Web.Util\TransactedCallback.cs" />
- <Compile Include="System.Web.Util\UrlUtils.cs" />
- <Compile Include="System.Web.Util\WebEncoding.cs" />
- <Compile Include="System.Web.Util\WebTrace.cs" />
- <Compile Include="System.Web.Util\WorkItem.cs" />
- <Compile Include="System.Web.Util\WorkItemCallback.cs" />
- <Compile Include="System.Web\ApplicationShutdownReason.cs" />
- <Compile Include="System.Web\BeginEventHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\BrowserCapabilities.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\CapabilitiesLoader.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\DefaultHttpHandler.cs" />
- <Compile Include="System.Web\EndEventHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HtmlizedException.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpApplicationFactory.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpApplicationState.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpBrowserCapabilities.cs" />
- <Compile Include="System.Web\HttpCacheability.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCachePolicy.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheRevalidation.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheValidateHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheVaryByHeaders.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheVaryByParams.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpClientCertificate.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpContext.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpContext.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCookie.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCookieCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCookieMode.cs" />
- <Compile Include="System.Web\HttpException.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpFileCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpForbiddenHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpMethodNotAllowedHandler.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpModuleCollection.cs" />
- <Compile Include="System.Web\HttpNotFoundHandler.cs" />
- <Compile Include="System.Web\HttpNotImplementedHandler.cs" />
- <Compile Include="System.Web\HttpParseException.cs" />
- <Compile Include="System.Web\HttpPostedFile.cs" />
- <Compile Include="System.Web\HttpRequest.cs" />
- <Compile Include="System.Web\HttpRequest.jvm.cs" />
- <Compile Include="System.Web\HttpRequestValidationException.cs" />
- <Compile Include="System.Web\HttpResponse.cs" />
- <Compile Include="System.Web\HttpResponseHeader.cs" />
- <Compile Include="System.Web\HttpResponseSubstitutionCallback.cs" />
- <Compile Include="System.Web\HttpRuntime.cs" />
- <Compile Include="System.Web\HttpServerUtility.cs" />
- <Compile Include="System.Web\HttpUnhandledException.cs" />
- <Compile Include="System.Web\HttpUtility.cs" />
- <Compile Include="System.Web\HttpValidationStatus.cs" />
- <Compile Include="System.Web\HttpWorkerRequest.cs" />
- <Compile Include="System.Web\HttpWriter.cs" />
- <Compile Include="System.Web\IHttpAsyncHandler.cs" />
- <Compile Include="System.Web\IHttpExtendedHandler.cs" />
- <Compile Include="System.Web\IHttpHandler.cs" />
- <Compile Include="System.Web\IHttpHandlerFactory.cs" />
- <Compile Include="System.Web\IHttpMapPath.cs" />
- <Compile Include="System.Web\IHttpModule.cs" />
- <Compile Include="System.Web\InputFilterStream.cs" />
- <Compile Include="System.Web\MimeTypes.cs" />
- <Compile Include="System.Web\NoParamsInvoker.cs" />
- <Compile Include="System.Web\OutputFilterStream.cs" />
- <Compile Include="System.Web\ParserError.cs" />
- <Compile Include="System.Web\ParserErrorCollection.cs" />
- <Compile Include="System.Web\ProcessInfo.cs" />
- <Compile Include="System.Web\ProcessModelInfo.cs" />
- <Compile Include="System.Web\ProcessShutdownReason.cs" />
- <Compile Include="System.Web\ProcessStatus.cs" />
- <Compile Include="System.Web\QueueManager.cs" />
- <Compile Include="System.Web\ServerVariablesCollection.cs" />
- <Compile Include="System.Web\SiteMap.cs" />
- <Compile Include="System.Web\SiteMapNode.cs" />
- <Compile Include="System.Web\SiteMapNodeCollection.cs" />
- <Compile Include="System.Web\SiteMapProvider.cs" />
- <Compile Include="System.Web\SiteMapProviderCollection.cs" />
- <Compile Include="System.Web\SiteMapResolveEventArgs.cs" />
- <Compile Include="System.Web\StaticFileHandler.cs" />
- <Compile Include="System.Web\StaticSiteMapProvider.cs" />
- <Compile Include="System.Web\TempFileStream.cs" />
- <Compile Include="System.Web\TraceContext.cs" />
- <Compile Include="System.Web\TraceContextEventArgs.cs" />
- <Compile Include="System.Web\TraceContextEventHandler.cs" />
- <Compile Include="System.Web\TraceData.cs" />
- <Compile Include="System.Web\TraceManager.cs" />
- <Compile Include="System.Web\TraceMode.cs" />
- <Compile Include="System.Web\VirtualPathUtility.cs" />
- <Compile Include="System.Web\WebCategoryAttribute.cs" />
- <Compile Include="System.Web\WebROCollection.cs" />
- <Compile Include="System.Web\WebSysDescriptionAttribute.cs" />
- <Compile Include="System.Web\XmlSiteMapProvider.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Consts.cs.in</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Web.Compilation\AppSettingsExpressionBuilder.cs" />
- <Compile Include="System.Web.Compilation\BuildManager.jvm.cs" />
- <Compile Include="System.Web.Compilation\ConnectionStringsExpressionBuilder.cs" />
- <Compile Include="System.Web.Compilation\AppResourcesCompiler.jvm.cs" />
- <Compile Include="System.Web.Compilation\ExpressionBuilder.cs" />
- <Compile Include="System.Web.Compilation\ExpressionBuilderContext.cs" />
- <Compile Include="System.Web.Compilation\ExpressionEditorAttribute.cs" />
- <Compile Include="System.Web.Compilation\ExpressionPrefixAttribute.cs" />
- <Compile Include="System.Web.Compilation\ILocation.cs" />
- <Compile Include="System.Web.Compilation\IResourceProvider.cs" />
- <Compile Include="System.Web.Compilation\ResourceProviderFactory.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Compilation\Location.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Compilation\ParseException.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Compilation\TagAttributes.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Compilation\TagType.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Compilation\ThemeDirectoryCompiler.jvm.cs" />
- <Compile Include="System.Web.Configuration\FileMatchingInfo.cs" />
- <Compile Include="System.Web.Configuration_2.0\AppSettings.jvm.cs" />
- <Compile Include="System.Web.Configuration_2.0\CapabilitiesBuild.cs" />
- <Compile Include="System.Web.Configuration_2.0\CapabilitiesChecksum.cs" />
- <Compile Include="System.Web.Configuration_2.0\CapabilitiesResult.cs" />
- <Compile Include="System.Web.Configuration_2.0\ICapabilitiesProcess.cs" />
- <Compile Include="System.Web.Configuration_2.0\MachineKeySectionUtils.cs" />
- <Compile Include="System.Web.Configuration_2.0\nBrowser\Build.cs" />
- <Compile Include="System.Web.Configuration_2.0\nBrowser\Exception.cs" />
- <Compile Include="System.Web.Configuration_2.0\nBrowser\File.cs" />
- <Compile Include="System.Web.Configuration_2.0\nBrowser\Identification.cs" />
- <Compile Include="System.Web.Configuration_2.0\nBrowser\Node.cs" />
- <Compile Include="System.Web.Configuration_2.0\nBrowser\NodeTypes.cs" />
- <Compile Include="System.Web.Configuration_2.0\nBrowser\Result.cs" />
- <Compile Include="System.Web.J2EE\ObjectInputStream.cs" />
- <Compile Include="System.Web.J2EE\ObjectOutputStream.cs" />
- <Compile Include="System.Web.Security\AspNetDBSchemaChecker.cs" />
- <Compile Include="System.Web.SessionState\HttpSessionState.cs" />
- <Compile Include="System.Web.SessionState\ISessionHandler.cs" />
- <Compile Include="System.Web.SessionState\SessionStateModule.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlEmptyTagControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlHeadBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ContentPlaceHolderBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\HyperLinkControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LabelControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LinkButtonControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ListItemControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LiteralControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\PlaceHolderControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableCellControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TextBoxControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\WizardStepControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\XmlBuilder.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ClientScriptManager.jvm.cs" />
- <Compile Include="System.Web.UI\BaseParser.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\BaseTemplateParser.jvm.cs" />
- <Compile Include="System.Web.UI\BuilderPropertyEntry .jvm.cs" />
- <Compile Include="System.Web.UI\ComplexPropertyEntry.jvm.cs" />
- <Compile Include="System.Web.UI\ControlBuilder.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DataSourceCacheDurationConverter .jvm.cs" />
- <Compile Include="System.Web.UI\DataSourceControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DesignTimeParseData.jvm.cs" />
- <Compile Include="System.Web.UI\EventEntry.jvm.cs" />
- <Compile Include="System.Web.UI\FileLevelControlBuilderAttribute .jvm.cs" />
- <Compile Include="System.Web.UI\FileLevelPageControlBuilder.jvm.cs" />
- <Compile Include="System.Web.UI\FileLevelUserControlBuilder.jvm.cs" />
- <Compile Include="System.Web.UI\IndexedString.jvm.cs" />
- <Compile Include="System.Web.UI\IScriptManager.cs" />
- <Compile Include="System.Web.UI\IThemeResolutionService.cs" />
- <Compile Include="System.Web.UI\MasterPageControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\MasterPageParser.jvm.cs" />
- <Compile Include="System.Web.UI\ObjectPersistData.jvm.cs" />
- <Compile Include="System.Web.UI\ObjectTagBuilder.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\Page.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\Page.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\PageAsyncTask.cs" />
- <Compile Include="System.Web.UI\PageParser.jvm.cs" />
- <Compile Include="System.Web.UI\PageParserFilter.jvm.cs" />
- <Compile Include="System.Web.UI\ReadOnlyDataSourceView.cs" />
- <Compile Include="System.Web.UI\RootBuilder.jvm.cs" />
- <Compile Include="System.Web.UI\SessionPageStatePersister.jvm.cs" />
- <Compile Include="System.Web.UI\SimpleWebHandlerParser.jvm.cs" />
- <Compile Include="System.Web.UI\SkinBuilder.jvm.cs" />
- <Compile Include="System.Web.UI\TemplateBuilder.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\TemplateControl.jvm.cs" />
- <Compile Include="System.Web.UI\TemplateControlParser.jvm.cs" />
- <Compile Include="System.Web.UI\TemplateParser.jvm.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\TemplatePropertyEntry.jvm.cs" />
- <Compile Include="System.Web.UI\ThemeProvider.jvm.cs" />
- <Compile Include="System.Web.UI\UserControlControlBuilder.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\VerificationAttribute.jvm.cs" />
- <Compile Include="System.Web.UI\ViewStateException .jvm.cs" />
- <Compile Include="System.Web.UI\ViewStateModeByIdAttribute.jvm.cs" />
- <Compile Include="System.Web.UI\WebServiceParser.jvm.cs" />
- <Compile Include="System.Web.Util\ICalls.jvm.cs" />
- <Compile Include="System.Web\BaseParamsCollection.cs" />
- <Compile Include="System.Web\HeadersCollection.cs" />
- <Compile Include="System.Web\HttpApplication.cs" />
- <Compile Include="System.Web\HttpCacheVaryByContentEncodings.cs" />
- <Compile Include="System.Web\HttpParamsCollection.cs" />
- <Compile Include="System.Web\HttpResponse.jvm.cs" />
- <Compile Include="System.Web\HttpResponseStream.jvm.cs" />
- <Compile Include="System.Web\HttpStaticObjectsCollection.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpWorkerRequest.jvm.cs" />
- <Compile Include="System.Web\IHttpExtendedWorkerRequest.cs" />
- <Compile Include="System.Web\RequestNotification.cs" />
- <Compile Include="System.Web\RequestNotificationStatus.cs" />
- <Compile Include="System.Web\UplevelHelper.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="resources\file.gif">
- <LogicalName>file.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\folder.gif">
- <LogicalName>folder.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\computer.gif">
- <LogicalName>computer.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\arrow_down.gif">
- <LogicalName>arrow_down.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\arrow_minus.gif">
- <LogicalName>arrow_minus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\arrow_noexpand.gif">
- <LogicalName>arrow_noexpand.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\arrow_plus.gif">
- <LogicalName>arrow_plus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\arrow_up.gif">
- <LogicalName>arrow_up.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\box_empty.gif">
- <LogicalName>box_empty.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\box_full.gif">
- <LogicalName>box_full.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\box_minus.gif">
- <LogicalName>box_minus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\box_noexpand.gif">
- <LogicalName>box_noexpand.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\box_plus.gif">
- <LogicalName>box_plus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\contact.gif">
- <LogicalName>contact.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\dot_empty.gif">
- <LogicalName>dot_empty.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\dot_full.gif">
- <LogicalName>dot_full.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\dots.gif">
- <LogicalName>dots.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\inbox.gif">
- <LogicalName>inbox.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\star_empty.gif">
- <LogicalName>star_empty.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\star_full.gif">
- <LogicalName>star_full.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\transparent.gif">
- <LogicalName>transparent.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_dash.gif">
- <LogicalName>TreeView_dash.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_dashminus.gif">
- <LogicalName>TreeView_dashminus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_dashplus.gif">
- <LogicalName>TreeView_dashplus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_i.gif">
- <LogicalName>TreeView_i.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_l.gif">
- <LogicalName>TreeView_l.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_lminus.gif">
- <LogicalName>TreeView_lminus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_lplus.gif">
- <LogicalName>TreeView_lplus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_minus.gif">
- <LogicalName>TreeView_minus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_noexpand.gif">
- <LogicalName>TreeView_noexpand.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_plus.gif">
- <LogicalName>TreeView_plus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_r.gif">
- <LogicalName>TreeView_r.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_rminus.gif">
- <LogicalName>TreeView_rminus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_rplus.gif">
- <LogicalName>TreeView_rplus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_t.gif">
- <LogicalName>TreeView_t.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_tminus.gif">
- <LogicalName>TreeView_tminus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\TreeView_tplus.gif">
- <LogicalName>TreeView_tplus.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\warning.gif">
- <LogicalName>warning.gif</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\webform.js">
- <LogicalName>webform.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="resources\WebUIValidation_2.0.js">
- <LogicalName>WebUIValidation_2.0.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="System.Web.UI.WebControls\GridView.js">
- <LogicalName>GridView.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="System.Web.UI.WebControls\DetailsView.js">
- <LogicalName>DetailsView.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="System.Web.UI.WebControls\Menu.js">
- <LogicalName>Menu.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="System.Web.UI.WebControls\TreeView.js">
- <LogicalName>TreeView.js</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <Reference Include="J2SE.Helpers, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="JavaEE, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="myfaces, Version=1.6.65535.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="Mainsoft.Configuration, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="rt, Version=1.4.2.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="..\..\..\mono\data\browscap.ini">
- <Link>browscap.ini</Link>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-mainsoft-mscorlib="repository:vmw:framework:2.0" REFS-RefInfo-mainsoft-configuration="repository:vmw:framework:2.0" REFS-JarPath-mainsoft-configuration="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-RefInfo-j2se-helpers="repository:vmw:framework:2.0" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-RefInfo-system-configuration="repository:vmw:framework:2.0" REFS-RefInfo-j2ee-helpers="repository:vmw:framework:2.0" REFS-RefInfo-javaee="repository:JavaEE:tomcat:1.3" REFS-JarPath-javaee="" REFS-JarPath-j2se-helpers="" REFS-JarPath-j2ee-helpers="" REFS-JarPath-j2ee="..\lib\j2ee.jar" REFS-RefInfo-rt="repository:jre:sun:1.4.2" REFS-JarPath-rt="" REFS-JarPath-mscorlib="" REFS-JarPath-system="" REFS-JarPath-system-xml="" REFS-JarPath-system-drawing="" REFS-JarPath-system-data="" REFS-JarPath-system-configuration="" REFS-RefInfo-myfaces="repository:vmw:framework:2.0" REFS-JarPath-myfaces="" />
- </VisualStudio>
- </ProjectExtensions>
- <PropertyGroup>
- <PreBuildEvent>"$(ProjectDir)..\..\class\lib\net_2_0\culevel.exe" -o "$(ProjectDir)System.Web\UplevelHelper.cs" "$(ProjectDir)UplevelHelperDefinitions.xml"</PreBuildEvent>
- </PropertyGroup>
-</Project>
diff --git a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs
index d2bd8ce643f..1440358de4d 100644
--- a/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.Caching/OutputCacheTest.cs
@@ -135,8 +135,8 @@ namespace MonoTests.System.Web.Caching
static readonly byte[] badSubstitutionResponseElement = { 0x0, 0x1, 0x0, 0x0, 0x0, 0xFF, 0xFF, 0xFF, 0xFF, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xC, 0x2, 0x0, 0x0, 0x0, 0x4D, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2C, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x3D, 0x34, 0x2E, 0x30, 0x2E, 0x30, 0x2E, 0x30, 0x2C, 0x20, 0x43, 0x75, 0x6C, 0x74, 0x75, 0x72, 0x65, 0x3D, 0x6E, 0x65, 0x75, 0x74, 0x72, 0x61, 0x6C, 0x2C, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x4B, 0x65, 0x79, 0x54, 0x6F, 0x6B, 0x65, 0x6E, 0x3D, 0x62, 0x30, 0x33, 0x66, 0x35, 0x66, 0x37, 0x66, 0x31, 0x31, 0x64, 0x35, 0x30, 0x61, 0x33, 0x61, 0x5, 0x1, 0x0, 0x0, 0x0, 0x2E, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2E, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6E, 0x67, 0x2E, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6F, 0x6E, 0x52, 0x65, 0x73, 0x70, 0x6F, 0x6E, 0x73, 0x65, 0x45, 0x6C, 0x65, 0x6D, 0x65, 0x6E, 0x74, 0x2, 0x0, 0x0, 0x0, 0xF, 0x5F, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x4E, 0x61, 0x6D, 0x65, 0xB, 0x5F, 0x6D, 0x65, 0x74, 0x68, 0x6F, 0x64, 0x4E, 0x61, 0x6D, 0x65, 0x1, 0x1, 0x2, 0x0, 0x0, 0x0, 0x6, 0x3, 0x0, 0x0, 0x0, 0x41, 0x4D, 0x6F, 0x6E, 0x6F, 0x54, 0x65, 0x73, 0x74, 0x73, 0x2E, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x65, 0x62, 0x2E, 0x43, 0x61, 0x63, 0x68, 0x69, 0x6E, 0x67, 0x2E, 0x4F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x43, 0x61, 0x63, 0x68, 0x65, 0x54, 0x65, 0x73, 0x74, 0x2C, 0x20, 0x44, 0x6F, 0x74, 0x4E, 0x65, 0x74, 0x34, 0x5F, 0x4E, 0x55, 0x6E, 0x69, 0x74, 0x5F, 0x54, 0x65, 0x73, 0x74, 0x73, 0x6, 0x4, 0x0, 0x0, 0x0, 0x1C, 0x44, 0x75, 0x6D, 0x6D, 0x79, 0x42, 0x61, 0x64, 0x53, 0x75, 0x62, 0x73, 0x74, 0x69, 0x74, 0x75, 0x74, 0x69, 0x6F, 0x6E, 0x43, 0x61, 0x6C, 0x6C, 0x62, 0x61, 0x63, 0x6B, 0xB, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 };
#else
#if NET_4_5
- static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
- static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
+ static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x8,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x9,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0xA,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xB,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x4,0x7,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0xA,0x0,0x0,0x0,0x9,0xB,0x0,0x0,0x0,0x9,0x4,0x0,0x0,0x0,0x6,0xC,0x0,0x0,0x0,0x3F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
+ static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x3,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x7,0x6D,0x65,0x74,0x68,0x6F,0x64,0x30,0x3,0x4,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x1C,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x6F,0x6E,0x6F,0x4D,0x65,0x74,0x68,0x6F,0x64,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x9,0x9,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0xA,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xB,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xC,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xD,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x35,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xE,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0x4,0x9,0x0,0x0,0x0,0x2F,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x52,0x65,0x66,0x6C,0x65,0x63,0x74,0x69,0x6F,0x6E,0x2E,0x4D,0x65,0x6D,0x62,0x65,0x72,0x49,0x6E,0x66,0x6F,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x6,0x0,0x0,0x0,0xC,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x4E,0x61,0x6D,0x65,0x9,0x43,0x6C,0x61,0x73,0x73,0x4E,0x61,0x6D,0x65,0x4,0x4E,0x61,0x6D,0x65,0x9,0x53,0x69,0x67,0x6E,0x61,0x74,0x75,0x72,0x65,0xA,0x4D,0x65,0x6D,0x62,0x65,0x72,0x54,0x79,0x70,0x65,0x10,0x47,0x65,0x6E,0x65,0x72,0x69,0x63,0x41,0x72,0x67,0x75,0x6D,0x65,0x6E,0x74,0x73,0x1,0x1,0x1,0x1,0x0,0x3,0x8,0xD,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x54,0x79,0x70,0x65,0x5B,0x5D,0x9,0xD,0x0,0x0,0x0,0x9,0xE,0x0,0x0,0x0,0x9,0x4,0x0,0x0,0x0,0x6,0xF,0x0,0x0,0x0,0x42,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x53,0x74,0x72,0x69,0x6E,0x67,0x20,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x28,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x43,0x6F,0x6E,0x74,0x65,0x78,0x74,0x29,0x8,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
#else
static readonly byte[] substitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x19,0x44,0x75,0x6D,0x6D,0x79,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x1,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x9,0x6,0x0,0x0,0x0,0x4,0x6,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x7,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0x8,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0xA,0x6,0x9,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xA,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
static readonly byte[] badSubstitutionResponseElement = {0x0,0x1,0x0,0x0,0x0,0xFF,0xFF,0xFF,0xFF,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC,0x2,0x0,0x0,0x0,0xA,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5,0x1,0x0,0x0,0x0,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x45,0x6C,0x65,0x6D,0x65,0x6E,0x74,0x3,0x0,0x0,0x0,0x8,0x74,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0x19,0x3C,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x3E,0x6B,0x5F,0x5F,0x42,0x61,0x63,0x6B,0x69,0x6E,0x67,0x46,0x69,0x65,0x6C,0x64,0x1,0x1,0x4,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x2,0x0,0x0,0x0,0x2,0x0,0x0,0x0,0x6,0x3,0x0,0x0,0x0,0x88,0x1,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x2C,0x20,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0x4,0x0,0x0,0x0,0x1C,0x44,0x75,0x6D,0x6D,0x79,0x42,0x61,0x64,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x9,0x5,0x0,0x0,0x0,0xC,0x6,0x0,0x0,0x0,0x17,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x4,0x5,0x0,0x0,0x0,0x22,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2,0x0,0x0,0x0,0x8,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x3,0x4,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x6,0x0,0x0,0x0,0x9,0x7,0x0,0x0,0x0,0x9,0x8,0x0,0x0,0x0,0x4,0x7,0x0,0x0,0x0,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x7,0x0,0x0,0x0,0x4,0x74,0x79,0x70,0x65,0x8,0x61,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0x6,0x74,0x61,0x72,0x67,0x65,0x74,0x12,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x41,0x73,0x73,0x65,0x6D,0x62,0x6C,0x79,0xE,0x74,0x61,0x72,0x67,0x65,0x74,0x54,0x79,0x70,0x65,0x4E,0x61,0x6D,0x65,0xA,0x6D,0x65,0x74,0x68,0x6F,0x64,0x4E,0x61,0x6D,0x65,0xD,0x64,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x1,0x1,0x2,0x1,0x1,0x1,0x3,0x30,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x53,0x65,0x72,0x69,0x61,0x6C,0x69,0x7A,0x61,0x74,0x69,0x6F,0x6E,0x48,0x6F,0x6C,0x64,0x65,0x72,0x2B,0x44,0x65,0x6C,0x65,0x67,0x61,0x74,0x65,0x45,0x6E,0x74,0x72,0x79,0x6,0x9,0x0,0x0,0x0,0x2B,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x48,0x74,0x74,0x70,0x52,0x65,0x73,0x70,0x6F,0x6E,0x73,0x65,0x53,0x75,0x62,0x73,0x74,0x69,0x74,0x75,0x74,0x69,0x6F,0x6E,0x43,0x61,0x6C,0x6C,0x62,0x61,0x63,0x6B,0x6,0xA,0x0,0x0,0x0,0x4D,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x34,0x2E,0x30,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x62,0x30,0x33,0x66,0x35,0x66,0x37,0x66,0x31,0x31,0x64,0x35,0x30,0x61,0x33,0x61,0x6,0xB,0x0,0x0,0x0,0x7,0x74,0x61,0x72,0x67,0x65,0x74,0x30,0x6,0xC,0x0,0x0,0x0,0x5A,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x5F,0x74,0x65,0x73,0x74,0x5F,0x6E,0x65,0x74,0x5F,0x34,0x5F,0x30,0x2C,0x20,0x56,0x65,0x72,0x73,0x69,0x6F,0x6E,0x3D,0x31,0x2E,0x33,0x2E,0x30,0x2E,0x30,0x2C,0x20,0x43,0x75,0x6C,0x74,0x75,0x72,0x65,0x3D,0x6E,0x65,0x75,0x74,0x72,0x61,0x6C,0x2C,0x20,0x50,0x75,0x62,0x6C,0x69,0x63,0x4B,0x65,0x79,0x54,0x6F,0x6B,0x65,0x6E,0x3D,0x33,0x31,0x62,0x66,0x33,0x38,0x35,0x36,0x61,0x64,0x33,0x36,0x34,0x65,0x33,0x35,0x6,0xD,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x9,0x4,0x0,0x0,0x0,0xA,0x5,0x8,0x0,0x0,0x0,0x2C,0x4D,0x6F,0x6E,0x6F,0x54,0x65,0x73,0x74,0x73,0x2E,0x53,0x79,0x73,0x74,0x65,0x6D,0x2E,0x57,0x65,0x62,0x2E,0x43,0x61,0x63,0x68,0x69,0x6E,0x67,0x2E,0x4F,0x75,0x74,0x70,0x75,0x74,0x43,0x61,0x63,0x68,0x65,0x54,0x65,0x73,0x74,0x0,0x0,0x0,0x0,0x6,0x0,0x0,0x0,0xB,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
@@ -208,7 +208,7 @@ namespace MonoTests.System.Web.Caching
AssertExtensions.AreEqual (bytes, substitutionResponseElement, "#B3");
bytes = SerializeElement (sreBad);
- AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B3");
+ AssertExtensions.AreEqual (bytes, badSubstitutionResponseElement, "#B4");
}
[Test]
diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
index 9d2f2f77413..9adcf765873 100644
--- a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs
@@ -88,9 +88,7 @@ namespace MonoTests.System.Web.Compilation {
[Test]
[NUnit.Framework.Category ("NunitWeb")]
-#if !TARGET_JVM
[NUnit.Framework.Category ("NotWorking")]
-#endif
public void ReadOnlyPropertyBindTest ()
{
new WebTest ("ReadOnlyPropertyBind.aspx").Run ();
diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs b/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs
index d2b3a8f8636..b7f4d5138d9 100644
--- a/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs
@@ -115,9 +115,6 @@ namespace MonoTests.System.Web.Hosting {
[Test]
[ExpectedException(typeof(SerializationException))]
-#if TARGET_JVM //System.Security.Policy.Evidence not implemented
- [Category ("NotWorking")]
-#endif
public void Constructor_PlainType ()
{
ApplicationHost.CreateApplicationHost (typeof (ApplicationHostTest), "/app", Environment.CurrentDirectory);
diff --git a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs
index db2ea356666..1990089323b 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs
@@ -165,7 +165,6 @@ namespace MonoTests.System.Web.UI.Adapters
pd.SaveStateComplete = RenderPostBackEvent_OnSaveStateComplete;
t.Invoker = new PageInvoker (pd);
string html = t.Run ();
- File.WriteAllText("response.html", html);
}
public static void RenderPostBackEvent_OnSaveStateComplete (Page p)
diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs
index 9b9293fec9f..1e396709536 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs
@@ -55,7 +55,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
}
}
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
public void SetContext ()
{
SetContext (Context);
@@ -201,7 +201,7 @@ namespace MonoTests.System.Web.UI.HtmlControls {
}
#if NET_2_0
-#if !TARGET_DOTNET && !TARGET_JVM
+#if !TARGET_DOTNET
[Test]
public void ActionStringWithQuery ()
{
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs
index 728dbe59540..ff795378998 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs
@@ -144,9 +144,6 @@ namespace MonoTests.System.Web.UI.WebControls
[Test]
[Category ("NunitWeb")]
-#if TARGET_JVM
- [Ignore ("TD #7024")]
-#endif
public void ActiveStepIndex () {
new WebTest (PageInvoker.CreateOnLoad (ActiveStepIndex_Load)).Run ();
}
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs
index b4018381128..67cf6946ee3 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs
@@ -205,9 +205,6 @@ namespace MonoTests.System.Web.UI.WebControls
[Test]
[Category ("NunitWeb")]
-#if TARGET_JVM
- [Ignore ("TD #6665")]
-#endif
public void DataBoundControl_DataBindFlow2 () {
new WebTest (PageInvoker.CreateOnLoad (DataBoundControl_DataBindFlow2_Load)).Run ();
}
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs
index d1a26186f43..416a8b9a1d1 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs
@@ -1567,9 +1567,6 @@ CommandEventArgs cargs = new CommandEventArgs ("Page", "Prev");
[Test]
[Category ("NunitWeb")]
-//#if TARGET_JVM //BUG #6518
-// [Category ("NotWorking")]
-//#endif
public void FormView_RenderSimpleTemplate()
{
string renderedPageHtml = new WebTest ("FormViewTest1.aspx").Run ();
@@ -1585,9 +1582,6 @@ CommandEventArgs cargs = new CommandEventArgs ("Page", "Prev");
[Test]
[Category ("NunitWeb")]
-//#if TARGET_JVM //BUG #6518
-// [Category ("NotWorking")]
-//#endif
public void FormView_RenderFooterAndPager()
{
string renderedPageHtml = new WebTest ("FormViewTest1_2.aspx").Run ();
@@ -1602,9 +1596,6 @@ CommandEventArgs cargs = new CommandEventArgs ("Page", "Prev");
[Test]
[Category ("NunitWeb")]
-//#if TARGET_JVM //BUG #6518
-// [Category ("NotWorking")]
-//#endif
public void FormView_RenderWithHeader()
{
string renderedPageHtml = new WebTest ("FormViewTest1_4.aspx").Run ();
@@ -1620,9 +1611,6 @@ CommandEventArgs cargs = new CommandEventArgs ("Page", "Prev");
[Test]
[Category ("NunitWeb")]
-//#if TARGET_JVM //BUG #6518
-// [Category ("NotWorking")]
-//#endif
public void FormView_Render ()
{
string RenderedPageHtml = new WebTest ("FormViewTest1_3.aspx").Run ();
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs
index eff56d1123f..f79222deb05 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs
@@ -135,9 +135,7 @@ namespace MonoTests.System.Web.UI.WebControls
[Test]
[Category("NunitWeb")]
-#if !TARGET_JVM
[Category("NotWorking")]
-#endif
public void SessionParameter_Evaluate()
{
SessionParameterPoker sessionParam = new SessionParameterPoker("employee",TypeCode.String ,"id") ;
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceDerbyTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceDerbyTest.cs
deleted file mode 100644
index 2de9c7f8ba0..00000000000
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceDerbyTest.cs
+++ /dev/null
@@ -1,268 +0,0 @@
-//
-// Tests for System.Web.UI.WebControls.SqlDataSource
-// This test uses Derby, java embedded database.
-//
-// Author:
-// Vladimir Krasnov (vladimirk@mainsoft.com)
-//
-
-//
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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_2_0 && TARGET_JVM
-
-using NUnit.Framework;
-using System;
-using System.Configuration;
-using System.Data;
-using System.Data.OleDb;
-using System.Data.Common;
-using System.IO;
-using System.Globalization;
-using System.Web;
-using System.Web.UI;
-using System.Web.UI.WebControls;
-using System.Collections.Specialized;
-
-namespace MonoTests.System.Web.UI.WebControls
-{
- [TestFixture]
- public class SqlDataSourceDerbyTest {
- [TestFixtureSetUp]
- public void setup ()
- {
- if (Directory.Exists (_dataDir))
- Directory.Delete (_dataDir, true);
-
- string initSql = @"CREATE TABLE Table1 (
- UserId int NOT NULL PRIMARY KEY,
- UserName varchar(256) NOT NULL,
- Description varchar(256)
- )";
-
- OleDbConnection connection = new OleDbConnection (_connectionString);
- try {
- connection.Open ();
- DbCommand cmd = connection.CreateCommand ();
- cmd.CommandText = initSql;
- cmd.CommandType = CommandType.Text;
- cmd.ExecuteNonQuery ();
- }
- catch (Exception) {
- }
- finally {
- connection.Close ();
- }
- }
-
- [Test]
- public void SelectTest1 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1";
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ());
-
- Assert.AreEqual (10, dataView.Count);
- }
-
- [Test]
- public void SelectTest2 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1";
- ds.FilterExpression = "UserId > 5";
-
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ());
- Assert.AreEqual (4, dataView.Count);
- }
-
- [Test]
- public void SelectTest3 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1";
-
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ("Description"));
- Assert.AreEqual ("Description", dataView.Sort);
- }
-
- [Test]
- public void SelectTest4 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1";
- try {
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments (1, 2));
- }
- catch (NotSupportedException) {
- Assert.AreEqual (true, true);
- }
- }
-
- [Test]
- public void SelectTest5 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1 WHERE UserId = ?";
- ds.SelectParameters.Add (new Parameter ("UserId", TypeCode.Int32, "5"));
-
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ());
- Assert.AreEqual (1, dataView.Count);
- }
-
- [Test]
- public void UpdateTest1 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1 WHERE UserName = ?";
- ds.SelectParameters.Add (new Parameter ("UserName", TypeCode.String, "superuser"));
-
- ds.UpdateCommand = "UPDATE Table1 SET UserName = ? WHERE UserId = ?";
- ds.UpdateParameters.Add (new Parameter ("UserName", TypeCode.String, "superuser"));
- ds.UpdateParameters.Add (new Parameter ("UserId", TypeCode.Int32, "5"));
-
- int records = ds.Update ();
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ());
- Assert.AreEqual (1, dataView.Count);
- Assert.AreEqual (1, records);
-
- }
-
- [Test]
- public void UpdateTest2 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1 WHERE UserName = ?";
- ds.SelectParameters.Add (new Parameter ("UserName", TypeCode.String, "SimpleUser"));
-
- ds.UpdateCommand = "UPDATE Table1 SET UserName = ? WHERE UserId = ?";
- ds.UpdateParameters.Add (new Parameter ("UserName", TypeCode.String, "superuser"));
- ds.UpdateParameters.Add (new Parameter ("UserId", TypeCode.Int32, "5"));
- ds.OldValuesParameterFormatString = "original_{0}";
-
- SqlDataSourceView view = (SqlDataSourceView) ((IDataSource) ds).GetView ("");
-
- OrderedDictionary keys = new OrderedDictionary ();
- keys.Add ("UserId", 7);
-
- OrderedDictionary values = new OrderedDictionary ();
- values.Add ("UserName", "SimpleUser");
-
- OrderedDictionary oldvalues = new OrderedDictionary ();
- oldvalues.Add ("UserName", "user7");
-
- int records = view.Update (keys, values, oldvalues);
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ());
- Assert.AreEqual (1, dataView.Count);
- Assert.AreEqual (1, records);
-
- }
-
- [Test]
- public void InsertTest1 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1 WHERE UserName = ?";
- ds.SelectParameters.Add (new Parameter ("UserName", TypeCode.String, "newuser"));
-
- ds.InsertCommand = "INSERT INTO Table1 (UserId, UserName, Description) VALUES (?, ?, ?)";
- ds.InsertParameters.Add (new Parameter ("UserId", TypeCode.Int32, "15"));
- ds.InsertParameters.Add (new Parameter ("UserName", TypeCode.String, "newuser"));
- ds.InsertParameters.Add (new Parameter ("Description", TypeCode.String, "newuser"));
-
- int records = ds.Insert ();
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ());
- Assert.AreEqual (1, dataView.Count);
- Assert.AreEqual (1, records);
-
- }
-
- [Test]
- public void InsertTest2 ()
- {
- SqlDataSource ds = CreateDataSource ();
- ds.SelectCommand = "SELECT * FROM Table1 WHERE UserName = ?";
- ds.SelectParameters.Add (new Parameter ("UserName", TypeCode.String, "newuser2"));
-
- ds.InsertCommand = "INSERT INTO Table1 (UserId, UserName, Description) VALUES (?, ?, ?)";
- ds.InsertParameters.Add (new Parameter ("UserId", TypeCode.Int32, "5"));
- ds.InsertParameters.Add (new Parameter ("UserName", TypeCode.String, "newuser"));
- ds.InsertParameters.Add (new Parameter ("Description", TypeCode.String, "newuser"));
-
- SqlDataSourceView view = (SqlDataSourceView) ((IDataSource) ds).GetView ("");
-
- OrderedDictionary values = new OrderedDictionary ();
- values.Add ("UserId", "17");
- values.Add ("UserName", "newuser2");
- values.Add ("Description", "newuser2");
-
- int records = view.Insert (values);
- DataView dataView = (DataView) ds.Select (new DataSourceSelectArguments ());
- Assert.AreEqual (1, dataView.Count);
- Assert.AreEqual (1, records);
-
- }
-
-
- const string _dataDir = "DataDir";
- const string _connectionString = "JdbcDriverClassName=org.apache.derby.jdbc.EmbeddedDriver;JdbcURL=jdbc:derby:" + _dataDir + ";create=true";
- private SqlDataSource CreateDataSource ()
- {
- SqlDataSource ds = new SqlDataSource ();
- ds.ConnectionString = _connectionString;
- ds.ProviderName = "System.Data.OleDb";
- ds.DataSourceMode = SqlDataSourceMode.DataSet;
- return ds;
- }
-
- [SetUp]
- public void RestoreData ()
- {
- string insertSql = @"INSERT INTO Table1 VALUES ({0}, '{1}', '{2}')";
- string deleteSql = @"DELETE FROM Table1";
-
- OleDbConnection connection = new OleDbConnection (_connectionString);
- connection.Open ();
- try {
- DbCommand dc = connection.CreateCommand ();
- dc.CommandText = deleteSql;
- dc.CommandType = CommandType.Text;
- dc.ExecuteNonQuery ();
-
- for (int i = 0; i < 10; i++) {
- DbCommand ic = connection.CreateCommand ();
- ic.CommandText = string.Format (insertSql, i.ToString (), "user" + i.ToString (), (9 - i).ToString ());
- ic.CommandType = CommandType.Text;
- ic.ExecuteNonQuery ();
- }
- }
- catch (Exception) {
- }
- finally {
- connection.Close ();
- }
- }
- }
-
-}
-
-#endif
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs
index 64eeca09aa7..bad00c96544 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs
@@ -38,9 +38,6 @@ using NUnit.Framework;
namespace MonoTests.System.Web.UI.WebControls {
-#if TARGET_JVM
- [vmw.common.ChangeInterfaceMethodNames]
-#endif
public interface ITableRowTest {
// testing
diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs
index 11dc1a62be6..3a9400f64b3 100644
--- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs
@@ -409,9 +409,6 @@ namespace MonoTests.System.Web.UI.WebControls
[Test]
[Category ("NunitWeb")]
-#if TARGET_JVM
- [Category ("NotWorking")] // File watcher is not supported
-#endif
public void Save ()
{
string origin = @"<div>
diff --git a/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs
index ddf3812bfad..f08db8bc34d 100644
--- a/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs
@@ -816,11 +816,7 @@ namespace MonoTests.System.Web.UI
public static void ResolveUrl_Load (Page p)
{
-#if TARGET_JVM
- string appPath = "/MainsoftWebApp20";
-#else
string appPath = "/NunitWeb";
-#endif
Control ctrl = new Control ();
p.Controls.Add (ctrl);
Assert.AreEqual (appPath + "/MyPage.aspx", ctrl.ResolveUrl ("~/MyPage.aspx"), "ResolveClientUrl Failed");
@@ -866,11 +862,7 @@ namespace MonoTests.System.Web.UI
public static void ResolveUrl2_Load (Page p)
{
-#if TARGET_JVM
- string appPath = "/MainsoftWebApp20";
-#else
string appPath = "/NunitWeb";
-#endif
Control uc = p.FindControl ("WebUserControl1");
Control ctrl = uc.FindControl ("Label");
diff --git a/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs b/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs
index a09c17f6cd6..59a23595bcd 100644
--- a/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs
@@ -784,9 +784,7 @@ namespace MonoTests.System.Web.UI {
[Test]
[Category ("NunitWeb")]
-#if !TARGET_JVM
[Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
-#endif
public void AddOnPreRenderCompleteAsync ()
{
WebTest t = new WebTest ("AsyncPage.aspx");
@@ -801,9 +799,7 @@ namespace MonoTests.System.Web.UI {
}
[Test]
-#if !TARGET_JVM
[Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
-#endif
[Category ("NunitWeb")]
public void ExecuteRegisteredAsyncTasks ()
{
@@ -820,9 +816,7 @@ namespace MonoTests.System.Web.UI {
[Test]
[Category ("NunitWeb")]
-#if !TARGET_JVM
[Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
-#endif
[ExpectedException (typeof (Exception))]
public void AddOnPreRenderCompleteAsyncBeginThrows ()
{
@@ -833,9 +827,7 @@ namespace MonoTests.System.Web.UI {
[Test]
[Category ("NunitWeb")]
-#if !TARGET_JVM
[Category ("NotWorking")] // Mono PageParser does not handle @Page Async=true
-#endif
[ExpectedException (typeof (Exception))]
public void AddOnPreRenderCompleteAsyncEndThrows ()
{
diff --git a/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs
index 2fc169593fa..0c7f0fa1962 100644
--- a/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs
+++ b/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs
@@ -115,14 +115,6 @@ namespace MonoTests.System.Web.UI.WebControls
Assert.AreEqual (true, t.DoSupportAutoEvents, "SupportAutoEvents");
}
-#if TARGET_JVM
- [Test]
- public void TemplateControl_DefaultPropertyNotWorking ()
- {
- PokerTemplateControl t = new PokerTemplateControl ();
- Assert.AreEqual (null, t.AppRelativeVirtualPath, "AppRelativeVirtualPath");
- }
-#endif
[Test]
[Category ("NunitWeb")]
@@ -343,23 +335,6 @@ namespace MonoTests.System.Web.UI.WebControls
}
-#if TARGET_JVM
- [Test]
- [ExpectedException(typeof(ArgumentNullException))]
- public void TemplateControl_AppRelativeVirtualPathException1 ()
- {
- PokerTemplateControl t = new PokerTemplateControl ();
- t.AppRelativeVirtualPath = null;
- }
-
- [Test]
- [ExpectedException (typeof (ArgumentException))]
- public void TemplateControl_AppRelativeVirtualPathException2 ()
- {
- PokerTemplateControl t = new PokerTemplateControl ();
- t.AppRelativeVirtualPath = "fake";
- }
-#endif
[TestFixtureTearDown]
public void TearDown ()
{
@@ -367,4 +342,4 @@ namespace MonoTests.System.Web.UI.WebControls
}
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs b/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs
index 839b260e714..bb4c3c779a6 100644
--- a/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs
+++ b/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs
@@ -263,9 +263,6 @@ namespace MonoTests.System.Web {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")] // char output stream in gh make this test fail
-#endif
public void Test_Response ()
{
FakeHttpWorkerRequest2 f;
@@ -287,9 +284,6 @@ namespace MonoTests.System.Web {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")] // char output stream in gh make this test fail
-#endif
public void TestResponse_Chunked ()
{
FakeHttpWorkerRequest2 f;
diff --git a/mcs/class/System.Web/Test/System.Web/HttpServerUtilityTest.cs b/mcs/class/System.Web/Test/System.Web/HttpServerUtilityTest.cs
index a6a48011253..47bfa8e1cee 100644
--- a/mcs/class/System.Web/Test/System.Web/HttpServerUtilityTest.cs
+++ b/mcs/class/System.Web/Test/System.Web/HttpServerUtilityTest.cs
@@ -65,9 +65,6 @@ namespace MonoTests.System.Web {
[Test]
[Category ("NotDotNet")]
-#if TARGET_JVM
- [Ignore ("TD #6954")]
-#endif
public void HtmlEncode_XSS ()
{
string problem = "\xff1cscript\xff1e"; // unicode looks alike <script>
diff --git a/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs b/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs
index eccc9dbe634..4c7228dd6a2 100644
--- a/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs
+++ b/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs
@@ -151,9 +151,6 @@ namespace MonoTests.System.Web {
[Test]
[Category ("NotDotNet")]
-#if TARGET_JVM
- [Ignore ("TD #6954")]
-#endif
public void HtmlEncode_XSS ()
{
string problem = "\xff1cscript\xff1e"; // unicode looks alike <script>
@@ -306,9 +303,7 @@ namespace MonoTests.System.Web {
}
#endif
[Test]
-#if !TARGET_JVM
[Category ("NotWorking")]
-#endif
public void HtmlEncode ()
{
for (char c = char.MinValue; c < char.MaxValue; c++) {
@@ -608,9 +603,6 @@ namespace MonoTests.System.Web {
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD #6956")]
-#endif
public void UrlEncodeUnicodeTest ()
{
string str = "sch" + (char) 0xf6 + "n";
@@ -757,9 +749,6 @@ namespace MonoTests.System.Web {
[Test]
-#if TARGET_JVM
- [Ignore ("TD #6956")]
-#endif
public void ParseQueryString ()
{
ParseQueryString_Helper (HttpUtility.ParseQueryString ("name=value"), "#1",
diff --git a/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs b/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs
index 77a14064602..ee9dda1ece1 100644
--- a/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs
+++ b/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs
@@ -268,9 +268,6 @@ namespace MonoTests.System.Web {
}
-#if TARGET_JVM //BUG #6499
- [Category ("NotWorking")]
-#endif
[Test] public void TestDefaults ()
{
FakeHttpWorkerRequest f = new FakeHttpWorkerRequest ();
diff --git a/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs b/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs
index afa944a7058..71e7580aa8b 100644
--- a/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs
+++ b/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs
@@ -43,11 +43,7 @@ namespace MonoTests.System.Web {
[TestFixture]
public class VirtualPathUtilityTest {
-#if TARGET_JVM
- const string NunitWebAppName = "MainsoftWebApp20";
-#else
const string NunitWebAppName = "NunitWeb";
-#endif
[Test]
public void AppendTrailingSlash ()
diff --git a/mcs/class/System.Web/Test/System.Web_test_net_2_0.csproj b/mcs/class/System.Web/Test/System.Web_test_net_2_0.csproj
deleted file mode 100644
index 241c5a785ad..00000000000
--- a/mcs/class/System.Web/Test/System.Web_test_net_2_0.csproj
+++ /dev/null
@@ -1,978 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{6B1B3FE4-0AC2-4740-8F93-933D9A74F505}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>MonoTests</RootNamespace>
- <AssemblyName>System.Web_test_net_2_0</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;NET_2_0;NET_3_5;TARGET_DOTNET;VISUAL_STUDIO</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="nunit.framework, Version=2.5.2.9222, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
- <Reference Include="System" />
- <Reference Include="System.configuration" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.EnterpriseServices" />
- <Reference Include="System.Web" />
- <Reference Include="System.Web.Extensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.XML" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Cas\AspNetHostingMinimal.cs" />
- <Compile Include="Cas\AspNetHostingNone.cs" />
- <Compile Include="Cas\AspNetHostingPermissionHelper.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\crc32.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\Header.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\HtmlAttribute.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\HtmlDocument.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\HtmlEntity.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\HtmlNode.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\HtmlNodeNavigator.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\HtmlWeb.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\MixedCodeDocument.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\ParseReader.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\HtmlAgilityPack\tools.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\NunitWebTest.cs" />
- <Compile Include="mainsoft\MainsoftWebTest\XmlComparer.cs" />
- <EmbeddedResource Include="mainsoft\NunitWebResources\NoDoubleOnInitOnRemoveAdd.aspx.cs">
- <SubType>ASPXCodeBehind</SubType>
- <LogicalName>NoDoubleOnInitOnRemoveAdd.aspx.cs</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\UrlProperty.ascx.cs">
- <SubType>ASPXCodeBehind</SubType>
- <LogicalName>UrlProperty.ascx.cs</LogicalName>
- </EmbeddedResource>
- <Compile Include="mainsoft\NunitWeb\NunitWeb\BaseControl.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\BaseControlCollection.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\BaseInvoker.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\BaseRequest.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\BaseWorkerRequest.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\CustomSection.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\FakeMembershipProvider.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\FormRequest.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\Global.asax.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\HandlerInvoker.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\IForeignData.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\MyHandler.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\MyHost.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\MyPageHandlerFactory.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\MyTemplateControls.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\PageDelegates.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\PageInvoker.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\PostableRequest.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\PostableWorkerRequest.cs" />
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\MyPage.aspx.cs">
- <DependentUpon>MyPage.aspx</DependentUpon>
- <LogicalName>MyPage.aspx.cs</LogicalName>
- <SubType>ASPXCodeBehind</SubType>
- </EmbeddedResource>
- <Compile Include="mainsoft\NunitWeb\NunitWeb\Response.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\StandardUrl.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\Tests\TagsNestedInClientTag.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="mainsoft\NunitWeb\NunitWeb\Tests\TestSiteMapProvider.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\WebTest.cs" />
- <Compile Include="mainsoft\NunitWeb\NunitWeb\WebTestResourcesSetupAttribute.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="System.Web.Caching\AggregateCacheDependencyTest.cs" />
- <Compile Include="System.Web.Caching\CacheCas.cs" />
- <Compile Include="System.Web.Caching\CacheDependencyCas.cs" />
- <Compile Include="System.Web.Caching\CacheStress.cs" />
- <Compile Include="System.Web.Compilation\AppSettingsExpressionBuilderTest.cs" />
- <Compile Include="System.Web.Compilation\ClientBuildManagerParameterTest.cs" />
- <Compile Include="System.Web.Compilation\TemplateControlCompilerTest.cs" />
- <Compile Include="System.Web.Configuration\AnonymousIdentificationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\AssemblyCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\AssemblyInfoTest.cs" />
- <Compile Include="System.Web.Configuration\AuthenticationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationRuleCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationRuleTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\BufferModeSettingsTest.cs" />
- <Compile Include="System.Web.Configuration\BuildProviderTest.cs" />
- <Compile Include="System.Web.Configuration\CacheSectionTest.cs" />
- <Compile Include="System.Web.Configuration\ClientTargetSectionTest.cs" />
- <Compile Include="System.Web.Configuration\ClientTargetTest.cs" />
- <Compile Include="System.Web.Configuration\CodeSubDirectoryTest.cs" />
- <Compile Include="System.Web.Configuration\CompilationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\CustomErrorCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\CustomErrorsSectionTest.cs" />
- <Compile Include="System.Web.Configuration\DeploymentSectionTest.cs" />
- <Compile Include="System.Web.Configuration\GlobalizationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\HealthMonitoringSectionTest.cs" />
- <Compile Include="System.Web.Configuration\HostingEnvironmentSectionTest.cs" />
- <Compile Include="System.Web.Configuration\HttpCapabilitiesBaseCas.cs" />
- <Compile Include="System.Web.Configuration\MachineKeyValidationConverterTest.cs" />
- <Compile Include="System.Web.Configuration\NullableStringValidatorTest.cs" />
- <Compile Include="System.Web.Configuration\ProfilePropertySettingsTest.cs" />
- <Compile Include="System.Web.Configuration\SiteMapSectionTest.cs" />
- <Compile Include="System.Web.Configuration\WebConfigurationManagerTest.cs" />
- <Compile Include="System.Web.Handlers\TraceHandlerCas.cs" />
- <Compile Include="System.Web.Hosting\AppDomainFactoryCas.cs" />
- <Compile Include="System.Web.Hosting\ApplicationHostCas.cs" />
- <Compile Include="System.Web.Hosting\ApplicationHostTest.cs" />
- <Compile Include="System.Web.Hosting\HostingEnvironmentTest.cs" />
- <Compile Include="System.Web.Hosting\ISAPIRuntimeCas.cs" />
- <Compile Include="System.Web.Hosting\SimpleWorkerRequestCas.cs" />
- <Compile Include="System.Web.Hosting\SimpleWorkerRequestTest.cs" />
- <Compile Include="System.Web.Hosting\VirtualPathProviderTest.cs" />
- <Compile Include="System.Web.Mail\MailAttachmentCas.cs" />
- <Compile Include="System.Web.Mail\MailMessageCas.cs" />
- <Compile Include="System.Web.Mail\SmtpMailCas.cs" />
- <Compile Include="System.Web.Profile\ProfileInfoTest.cs" />
- <Compile Include="System.Web.Security\DefaultAuthenticationEventArgsCas.cs" />
- <Compile Include="System.Web.Security\DefaultAuthenticationModuleCas.cs" />
- <Compile Include="System.Web.Security\FileAuthorizationModuleCas.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationCas.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationEventArgsCas.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationModuleCas.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationTest.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationTicketCas.cs" />
- <Compile Include="System.Web.Security\FormsIdentityCas.cs" />
- <Compile Include="System.Web.Security\FormsIdentityTest.cs" />
- <Compile Include="System.Web.Security\MembershipProviderCollectionTest.cs" />
- <Compile Include="System.Web.Security\MembershipProviderTest.cs" />
- <Compile Include="System.Web.Security\MembershipTest.cs" />
- <Compile Include="System.Web.Security\MembershipUserCollectionTest.cs" />
- <Compile Include="System.Web.Security\PassportAuthenticationEventArgsCas.cs" />
- <Compile Include="System.Web.Security\PassportAuthenticationModuleCas.cs" />
- <Compile Include="System.Web.Security\PassportIdentityCas.cs" />
- <Compile Include="System.Web.Security\RolePrincipalTest.cs" />
- <Compile Include="System.Web.Security\RolesTest.cs" />
- <Compile Include="System.Web.Security\UrlAuthorizationModuleCas.cs" />
- <Compile Include="System.Web.Security\WindowsAuthenticationEventArgsCas.cs" />
- <Compile Include="System.Web.Security\WindowsAuthenticationModuleCas.cs" />
- <Compile Include="System.Web.SessionState\SessionStateModuleCas.cs" />
- <Compile Include="System.Web.SessionState\StateRuntimeCas.cs" />
- <Compile Include="System.Web.UI.Adapters\ControlAdapterTest.cs" />
- <Compile Include="System.Web.UI.Adapters\PageAdapterTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlAnchorCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlAnchorTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlButtonCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlButtonTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlContainerControlCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlContainerControlTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlEmptyTagControlBuilderCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlFormCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlFormTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlGenericControlCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlHeadBuilderCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlHeadCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlImageCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlImageTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputButtonCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputButtonTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputCheckBoxCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputCheckBoxTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputControlCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputControlTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputFileCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputFileTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputHiddenCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputHiddenTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputImageCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputPasswordCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputPasswordTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputRadioButtonCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputRadioButtonTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputResetCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputResetTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputSubmitCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputSubmitTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputTextCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputTextTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlLinkCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlLinkTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlMetaCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlMetaTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectBuilderCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCellCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCellTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableRowCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableRowTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTextAreaCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTextAreaTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTitleCas.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\DataBoundControlAdapterTest.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\HideDisabledControlAdapterTest.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\HierarchicalDataBoundControlAdapterTest.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\MenuAdapterTest.cs" />
- <Compile Include="System.Web.UI.WebControls.Adapters\WebControlAdapterTest.cs" />
- <Compile Include="System.Web.UI.WebControls.WebParts\ConnectionInterfaceCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls.WebParts\WebPartTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AccessDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AdCreatedEventArgsCas.cs" />
- <Compile Include="System.Web.UI.WebControls\AdCreatedEventArgsTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AutoGeneratedFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseCompareValidatorCas.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseCompareValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataBoundControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataListCas.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseValidatorCas.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BoundColumnCas.cs" />
- <Compile Include="System.Web.UI.WebControls\BoundColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BoundFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BulletedListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonColumnCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonFieldBaseTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CalandarCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CalendarDayCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CalendarDayTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CalendarTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CallBackTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ChangePasswordTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxListCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CircleHotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CommandFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompareValidatorCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CompareValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompleteWizardStepTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeDataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ContentTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ControlParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CookieParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserWizardStepTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserWizardTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CrossPagePostingTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CustomValidatorCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CustomValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataBoundControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlFieldCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridColumnCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemCollectionCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridPagerStyleCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridPagerStyleTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyArrayTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyCollectionCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemCollectionCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataSourceControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataSourceViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewRowCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DropDownListCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DropDownListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\EditCommandColumnCas.cs" />
- <Compile Include="System.Web.UI.WebControls\EditCommandColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FileUploadTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FontInfoCas.cs" />
- <Compile Include="System.Web.UI.WebControls\FontInfoTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FontNamesConverterCas.cs" />
- <Compile Include="System.Web.UI.WebControls\FontNamesConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FontUnitCas.cs" />
- <Compile Include="System.Web.UI.WebControls\FontUnitTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FormParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewCas.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRowCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HierarchicalDataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HotSpotCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkCas.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkColumnCas.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageButtonCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageMapTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LabelCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LabelTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LinkButtonCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LinkButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListBoxCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ListBoxTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ListControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemCollectionCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LiteralCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LiteralTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginNameCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginNameTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginStatusCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginStatusTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MappingUrlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MasterPageTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\MenuTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MonthChangedEventArgsCas.cs" />
- <Compile Include="System.Web.UI.WebControls\MonthChangedEventArgsTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MultiViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PagedDataSourceCas.cs" />
- <Compile Include="System.Web.UI.WebControls\PagedDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PagerSettingsTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PanelCas.cs" />
- <Compile Include="System.Web.UI.WebControls\PanelTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PasswordRecoveryTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PolygonHotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\QueryStringParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButtonCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButtonListCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButtonListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RangeValidatorCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RangeValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RectangleHotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RegularExpressionValidatorCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RegularExpressionValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.auto.2.0.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.auto.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.gen.cs" />
- <Compile Include="System.Web.UI.WebControls\RequiredFieldValidatorCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupCollectionCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SelectedDatesCollectionCas.cs" />
- <Compile Include="System.Web.UI.WebControls\SelectedDatesCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SessionParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapPathTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceDerbyTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\StyleCas.cs" />
- <Compile Include="System.Web.UI.WebControls\StyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableCellCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableCellTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableFooterRowCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableFooterRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderCellCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderCellTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderRowCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableItemStyleCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableItemStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableRowCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableSectionStyleCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableSectionStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableStyleCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TargetConverterCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TargetConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TemplateFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TestControlIDConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\TextBoxCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TextBoxTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ThemeTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeBindingCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeBindingTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeStyleCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeStyleTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeViewCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitCas.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitConverterCas.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidatedControlConverterCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidatedControlConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidationSummaryCas.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidationSummaryTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WebColorConverterCas.cs" />
- <Compile Include="System.Web.UI.WebControls\WebColorConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WebControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\WebControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepBaseTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardTest.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSourceCas.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlTest.cs" />
- <Compile Include="System.Web.UI\AttributeCollectionCas.cs" />
- <Compile Include="System.Web.UI\AttributeCollectionTest.cs" />
- <Compile Include="System.Web.UI\BaseParserCas.cs" />
- <Compile Include="System.Web.UI\ChtmlTextWriterTest.cs" />
- <Compile Include="System.Web.UI\CleanHtmlTextWriter.cs" />
- <Compile Include="System.Web.UI\ClientScriptManagerTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI\CompiledTemplateBuilderCas.cs" />
- <Compile Include="System.Web.UI\ConstructorNeedsTagAttributeCas.cs" />
- <Compile Include="System.Web.UI\ControlBuilderAttributeCas.cs" />
- <Compile Include="System.Web.UI\ControlBuilderCas.cs" />
- <Compile Include="System.Web.UI\ControlCas.cs" />
- <Compile Include="System.Web.UI\ControlCollectionCas.cs" />
- <Compile Include="System.Web.UI\ControlCollectionTest.cs" />
- <Compile Include="System.Web.UI\ControlTest.cs" />
- <Compile Include="System.Web.UI\CssStyleCollectionCas.cs" />
- <Compile Include="System.Web.UI\CssStyleCollectionTest.cs" />
- <Compile Include="System.Web.UI\DataBinderCas.cs" />
- <Compile Include="System.Web.UI\DataBinderTest.cs" />
- <Compile Include="System.Web.UI\DataBindingCas.cs" />
- <Compile Include="System.Web.UI\DataBindingCollectionCas.cs" />
- <Compile Include="System.Web.UI\DataBindingCollectionTest.cs" />
- <Compile Include="System.Web.UI\DataBindingHandlerAttributeCas.cs" />
- <Compile Include="System.Web.UI\DataBindingHandlerAttributeTest.cs" />
- <Compile Include="System.Web.UI\DataBoundLiteralControlCas.cs" />
- <Compile Include="System.Web.UI\DataSourceSelectArgumentsTest.cs" />
- <Compile Include="System.Web.UI\DesignerDataBoundLiteralControlCas.cs" />
- <Compile Include="System.Web.UI\DesignTimeParseDataCas.cs" />
- <Compile Include="System.Web.UI\DesignTimeTemplateParserCas.cs" />
- <Compile Include="System.Web.UI\EmptyCollectionCas.cs" />
- <Compile Include="System.Web.UI\Html32TextWriterCas.cs" />
- <Compile Include="System.Web.UI\HtmlTextWriterCas.cs" />
- <Compile Include="System.Web.UI\HtmlTextWriterTest.cs" />
- <Compile Include="System.Web.UI\ImageClickEventArgsCas.cs" />
- <Compile Include="System.Web.UI\LiteralControlCas.cs" />
- <Compile Include="System.Web.UI\LiteralControlTest.cs" />
- <Compile Include="System.Web.UI\LosFormatterCas.cs" />
- <Compile Include="System.Web.UI\LosFormatterTest.cs" />
- <Compile Include="System.Web.UI\MinimizableAttributeTypeConverterTest.cs" />
- <Compile Include="System.Web.UI\ObjectConverterCas.cs" />
- <Compile Include="System.Web.UI\ObjectTagBuilderCas.cs" />
- <Compile Include="System.Web.UI\OutputCacheParametersTest.cs" />
- <Compile Include="System.Web.UI\PageCas.cs" />
- <Compile Include="System.Web.UI\PageParserFilterTest.cs" />
- <Compile Include="System.Web.UI\PageParserTest.cs" />
- <Compile Include="System.Web.UI\PageTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI\PairCas.cs" />
- <Compile Include="System.Web.UI\ParseChildrenAttributeCas.cs" />
- <Compile Include="System.Web.UI\PartialCachingAttributeCas.cs" />
- <Compile Include="System.Web.UI\PersistChildrenAttributeCas.cs" />
- <Compile Include="System.Web.UI\PersistenceModeAttributeCas.cs" />
- <Compile Include="System.Web.UI\PostBackOptionsTest.cs" />
- <Compile Include="System.Web.UI\PropertyConverterCas.cs" />
- <Compile Include="System.Web.UI\PropertyConverterTest.cs" />
- <Compile Include="System.Web.UI\RootBuilderCas.cs" />
- <Compile Include="System.Web.UI\StateBagCas.cs" />
- <Compile Include="System.Web.UI\StateBagTest.cs" />
- <Compile Include="System.Web.UI\StateItemCas.cs" />
- <Compile Include="System.Web.UI\StaticPartialCachingControlCas.cs" />
- <Compile Include="System.Web.UI\TagPrefixAttributeCas.cs" />
- <Compile Include="System.Web.UI\TemplateBuilderCas.cs" />
- <Compile Include="System.Web.UI\TemplateContainerAttributeCas.cs" />
- <Compile Include="System.Web.UI\TemplateControlCas.cs" />
- <Compile Include="System.Web.UI\TemplateControlTest.cs" />
- <Compile Include="System.Web.UI\TemplateInstanceAttributeTest.cs" />
- <Compile Include="System.Web.UI\TestUrlPropertyAttribute.cs" />
- <Compile Include="System.Web.UI\ToolboxDataAttributeCas.cs" />
- <Compile Include="System.Web.UI\ToolboxDataAttributeTest.cs" />
- <Compile Include="System.Web.UI\TripletCas.cs" />
- <Compile Include="System.Web.UI\UserControlCas.cs" />
- <Compile Include="System.Web.UI\UserControlControlBuilderCas.cs" />
- <Compile Include="System.Web.UI\ValidationPropertyAttributeCas.cs" />
- <Compile Include="System.Web.UI\ValidatorCollectionCas.cs" />
- <Compile Include="System.Web.UI\XhtmlTextWriterTest.cs" />
- <Compile Include="System.Web.Util\TransactionsCas.cs" />
- <Compile Include="System.Web.Util\UrlUtilsTest.cs" />
- <Compile Include="System.Web.Util\WorkItemCas.cs" />
- <Compile Include="System.Web\AppBrowsersTest.cs" />
- <Compile Include="System.Web\HttpApplicationCas.cs" />
- <Compile Include="System.Web\HttpApplicationStateCas.cs" />
- <Compile Include="System.Web\HttpBrowserCapabilitiesCas.cs" />
- <Compile Include="System.Web\HttpBrowserCapabilitiesTest.cs" />
- <Compile Include="System.Web\HttpCachePolicyCas.cs" />
- <Compile Include="System.Web\HttpCacheVaryByContentEncodingsTest.cs" />
- <Compile Include="System.Web\HttpCacheVaryByHeadersCas.cs" />
- <Compile Include="System.Web\HttpCacheVaryByHeadersTest.cs" />
- <Compile Include="System.Web\HttpCacheVaryByParamsCas.cs" />
- <Compile Include="System.Web\HttpCacheVaryByParamsTest.cs" />
- <Compile Include="System.Web\HttpClientCertificateCas.cs" />
- <Compile Include="System.Web\HttpClientCertificateTest.cs" />
- <Compile Include="System.Web\HttpCompileExceptionCas.cs" />
- <Compile Include="System.Web\HttpContext.cs" />
- <Compile Include="System.Web\HttpContextCas.cs" />
- <Compile Include="System.Web\HttpCookieCas.cs" />
- <Compile Include="System.Web\HttpCookieCollectionCas.cs" />
- <Compile Include="System.Web\HttpCookieCollectionTest.cs" />
- <Compile Include="System.Web\HttpCookieTest.cs" />
- <Compile Include="System.Web\HttpExceptionCas.cs" />
- <Compile Include="System.Web\HttpFileCollectionCas.cs" />
- <Compile Include="System.Web\HttpModuleCollectionCas.cs" />
- <Compile Include="System.Web\HttpParseExceptionCas.cs" />
- <Compile Include="System.Web\HttpRequestCas.cs" />
- <Compile Include="System.Web\HttpRequestTest.cs" />
- <Compile Include="System.Web\HttpRequestValidationExceptionCas.cs" />
- <Compile Include="System.Web\HttpResponseCas.cs" />
- <Compile Include="System.Web\HttpResponseTest.cs" />
- <Compile Include="System.Web\HttpRuntimeCas.cs" />
- <Compile Include="System.Web\HttpRuntimeTest.cs" />
- <Compile Include="System.Web\HttpServerUtilityCas.cs" />
- <Compile Include="System.Web\HttpServerUtilityTest.cs" />
- <Compile Include="System.Web\HttpStaticObjectsCollectionCas.cs" />
- <Compile Include="System.Web\HttpUnhandledExceptionCas.cs" />
- <Compile Include="System.Web\HttpUtilityCas.cs" />
- <Compile Include="System.Web\HttpUtilityTest.cs" />
- <Compile Include="System.Web\HttpWorkerRequestCas.cs" />
- <Compile Include="System.Web\HttpWorkerRequestTest.cs" />
- <Compile Include="System.Web\HttpWriter.cs" />
- <Compile Include="System.Web\HttpWriterCas.cs" />
- <Compile Include="System.Web\ProcessInfoCas.cs" />
- <Compile Include="System.Web\ProcessModelInfoCas.cs" />
- <Compile Include="System.Web\SiteMapNodeTest.cs" />
- <Compile Include="System.Web\SiteMapProviderTest.cs" />
- <Compile Include="System.Web\StaticSiteMapProviderTest.cs" />
- <Compile Include="System.Web\TraceContextCas.cs" />
- <Compile Include="System.Web\TraceContextRecordTest.cs" />
- <Compile Include="System.Web\VirtualPathUtilityTest.cs" />
- <Compile Include="System.Web\XmlSiteMapProviderTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\Global.asax">
- <LogicalName>Global.asax</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\MyPage.aspx">
- <LogicalName>MyPage.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\MyPageWithDerivedMaster.aspx">
- <LogicalName>MyPageWithDerivedMaster.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\MyPageWithMaster.aspx">
- <LogicalName>MyPageWithMaster.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\MyPageWithMasterInvalidPlaceHolder.aspx">
- <LogicalName>MyPageWithMasterInvalidPlaceHolder.aspx</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\My.ashx">
- <LogicalName>My.ashx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\My.master">
- <LogicalName>My.master</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\sub_map_01.sitemap">
- <LogicalName>sub_map_01.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_01.sitemap">
- <LogicalName>test_map_01.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_02.sitemap">
- <LogicalName>test_map_02.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_03.sitemap">
- <LogicalName>test_map_03.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_04.sitemap">
- <LogicalName>test_map_04.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_05.sitemap">
- <LogicalName>test_map_05.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_06.sitemap">
- <LogicalName>test_map_06.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_07.sitemap">
- <LogicalName>test_map_07.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_08.sitemap">
- <LogicalName>test_map_08.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\test_map_09.sitemap">
- <LogicalName>test_map_09.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\Web.config">
- <LogicalName>Web.config</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\Web.config.1.1">
- <LogicalName>Web.config.1.1</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\Web.mono.config">
- <LogicalName>Web.mono.config</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWeb\NunitWeb\Resources\Web.mono.config.1.1">
- <LogicalName>Web.mono.config.1.1</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="mainsoft\NunitWebResources\adapters.browser">
- <LogicalName>adapters.browser</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ContentPlaceHolderInTemplate.master">
- <LogicalName>ContentPlaceHolderInTemplate.master</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\MyDerived.master">
- <LogicalName>MyDerived.master</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\TestCapability.browser">
- <LogicalName>TestCapability.browser</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\Theme1.skin">
- <LogicalName>Theme1.skin</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\Theme2.skin">
- <LogicalName>Theme2.skin</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\Web.sitemap">
- <LogicalName>Web.sitemap</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\WebControl.config">
- <LogicalName>WebControl.config</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\WebLogin.config">
- <LogicalName>WebLogin.config</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\WebMapping.config">
- <LogicalName>WebMapping.config</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\WizardTest.skin">
- <LogicalName>WizardTest.skin</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="mainsoft\NunitWebResources\AsyncPage.aspx">
- <LogicalName>AsyncPage.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\Bluehills.jpg">
- <LogicalName>Bluehills.jpg</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\CallbackTest1.aspx">
- <LogicalName>CallbackTest1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\CallbackTest2.aspx">
- <LogicalName>CallbackTest2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ClearErrorOnError.aspx">
- <LogicalName>ClearErrorOnError.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ClientScript.js">
- <LogicalName>ClientScript.js</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ConditionalClientComments.aspx">
- <LogicalName>ConditionalClientComments.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ContentPlaceHolderInTemplate.aspx">
- <LogicalName>ContentPlaceHolderInTemplate.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\CrossPagePosting1.aspx">
- <LogicalName>CrossPagePosting1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\CrossPagePosting2.aspx">
- <LogicalName>CrossPagePosting2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\CustomSectionEmptyCollection.aspx">
- <LogicalName>CustomSectionEmptyCollection.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\DataGrid.aspx">
- <LogicalName>DataGrid.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\DetailsViewDataActions.aspx">
- <LogicalName>DetailsViewDataActions.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\DetailsViewProperties1.aspx">
- <LogicalName>DetailsViewProperties1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\DetailsViewTemplates.aspx">
- <LogicalName>DetailsViewTemplates.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\DuplicateControlsInClientComment.aspx">
- <LogicalName>DuplicateControlsInClientComment.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\EvalTest.aspx">
- <LogicalName>EvalTest.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\EventValidationTest1.aspx">
- <LogicalName>EventValidationTest1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\EventValidationTest2.aspx">
- <LogicalName>EventValidationTest2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ExpressionInListControl.aspx">
- <LogicalName>EventValidationTest2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\FooterTemplateTest.aspx">
- <LogicalName>FooterTemplateTest.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\FormView.aspx">
- <LogicalName>FormView.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\FormViewInsertEditDelete.aspx">
- <LogicalName>FormViewInsertEditDelete.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\FormViewTest1.aspx">
- <LogicalName>FormViewTest1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\FullTagsInText.aspx">
- <LogicalName>FullTagsInText.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\GridViewUpdate.aspx">
- <LogicalName>GridViewUpdate.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\InvalidPropertyBind1.aspx">
- <LogicalName>InvalidPropertyBind1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\InvalidPropertyBind2.aspx">
- <LogicalName>InvalidPropertyBind2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\InvalidPropertyBind3.aspx">
- <LogicalName>InvalidPropertyBind3.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\InvalidPropertyBind4.aspx">
- <LogicalName>InvalidPropertyBind4.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\LinkInHeadWithEmbeddedExpression.aspx">
- <LogicalName>LinkInHeadWithEmbeddedExpression.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ListControlPage.aspx">
- <LogicalName>ListControlPage.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\LoginDisplayRememberMe.aspx">
- <LogicalName>LoginDisplayRememberMe.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\LoginViewTest1.aspx">
- <LogicalName>LoginViewTest1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\Mapping.aspx">
- <LogicalName>Mapping.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\Mapping1.aspx">
- <LogicalName>Mapping1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\MasterTypeTest1.aspx">
- <LogicalName>MasterTypeTest1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\MasterTypeTest2.aspx">
- <LogicalName>MasterTypeTest2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\menuclass.aspx">
- <LogicalName>menuclass.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\MissingMasterFile.aspx">
- <LogicalName>MissingMasterFile.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\MyPageWithDerivedMaster.aspx">
- <LogicalName>MyPageWithDerivedMaster.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\NewlineInCodeExpression.aspx">
- <LogicalName>NewlineInCodeExpression.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\NoBindForMethodsWithBindInName.aspx">
- <LogicalName>NoBindForMethodsWithBindInName.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\NoDoubleOnInitOnRemoveAdd.aspx">
- <LogicalName>NoDoubleOnInitOnRemoveAdd.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\NoEventValidation.aspx">
- <LogicalName>NoEventValidation.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\OneLetterIdentifierInCodeRender.aspx">
- <LogicalName>OneLetterIdentifierInCodeRender.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PageCultureTest.aspx">
- <LogicalName>PageCultureTest.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PageLifecycleTest.aspx">
- <LogicalName>PageLifecycleTest.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PageValidationTest.aspx">
- <LogicalName>PageValidationTest.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PageWithAdapter.aspx">
- <LogicalName>PageWithAdapter.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PageWithStyleSheet.aspx">
- <LogicalName>PageWithStyleSheet.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PageWithTheme.aspx">
- <LogicalName>PageWithTheme.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PostBackMenuTest.aspx">
- <LogicalName>PostBackMenuTest.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\PreprocessorDirectivesInMarkup.aspx">
- <LogicalName>PreprocessorDirectivesInMarkup.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ReadOnlyPropertyBind.aspx">
- <LogicalName>ReadOnlyPropertyBind.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ReadOnlyPropertyControl.ascx">
- <LogicalName>ReadOnlyPropertyControl.ascx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ReadWritePropertyControl.ascx">
- <LogicalName>ReadWritePropertyControl.ascx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\RedirectOnError.aspx">
- <LogicalName>RedirectOnError.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ResolveUrl.ascx">
- <LogicalName>ResolveUrl.ascx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ResolveUrl.aspx">
- <LogicalName>ResolveUrl.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\RunTimeSetTheme.aspx">
- <LogicalName>RunTimeSetTheme.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ServerControlInClientSideComment.aspx">
- <LogicalName>ServerControlInClientSideComment.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ServerSideControlsInScriptBlock.aspx">
- <LogicalName>ServerSideControlsInScriptBlock.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\TagsExpressionsAndCommentsInText.aspx">
- <LogicalName>TagsExpressionsAndCommentsInText.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\TagsNestedInClientTag.aspx">
- <LogicalName>TagsNestedInClientTag.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\TemplateControlParsingTest.aspx">
- <LogicalName>TemplateControlParsingTest.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\TemplateUserControl.ascx">
- <LogicalName>TemplateUserControl.ascx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\TextBoxTestlPage.aspx">
- <LogicalName>TextBoxTestlPage.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\UnquotedAngleBrackets.aspx">
- <LogicalName>UnquotedAngleBrackets.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\UrlProperty.ascx">
- <LogicalName>UrlProperty.ascx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\UrlProperty.aspx">
- <LogicalName>UrlProperty.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ValidPropertyBind1.aspx">
- <LogicalName>ValidPropertyBind1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ValidPropertyBind2.aspx">
- <LogicalName>ValidPropertyBind2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ValidPropertyBind3.aspx">
- <LogicalName>ValidPropertyBind3.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ValidPropertyBind4.aspx">
- <LogicalName>ValidPropertyBind4.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\ValidPropertyBind5.aspx">
- <LogicalName>ValidPropertyBind5.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\XMLDataSourceTest.xml">
- <LogicalName>XMLDataSourceTest.xml</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\XMLDataSourceTest.xsl">
- <LogicalName>XMLDataSourceTest.xsl</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\XMLDataSourceTest1.aspx">
- <LogicalName>XMLDataSourceTest1.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\XMLDataSourceTest2.aspx">
- <LogicalName>XMLDataSourceTest2.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\XMLDataSourceTest3.aspx">
- <LogicalName>XMLDataSourceTest3.aspx</LogicalName>
- </EmbeddedResource>
- <EmbeddedResource Include="mainsoft\NunitWebResources\XMLDataSourceTest4.aspx">
- <LogicalName>XMLDataSourceTest4.aspx</LogicalName>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\SystemWebTestShim\SystemWebTestShim.csproj">
- <Project>{3D20F8D4-EE91-4FA5-85D9-4C36E8D68805}</Project>
- <Name>SystemWebTestShim</Name>
- </ProjectReference>
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web/Test/TestMonoWeb.J2EE20.sln b/mcs/class/System.Web/Test/TestMonoWeb.J2EE20.sln
deleted file mode 100644
index e9d9de8f72e..00000000000
--- a/mcs/class/System.Web/Test/TestMonoWeb.J2EE20.sln
+++ /dev/null
@@ -1,46 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual Studio 2008
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMonoWeb20", "TestMonoWeb20.csproj", "{7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NunitWeb20", "mainsoft\NunitWeb\NunitWeb\NunitWeb20.csproj", "{DC2320EB-CC91-4648-AF2B-8937F6794A14}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlCompare20", "mainsoft\MainsoftWebTest\HtmlCompare20.csproj", "{C3375963-9409-41A1-ADD2-1076F5A90BDE}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MainsoftWebApp20", "mainsoft\MainsoftWebApp20\MainsoftWebApp20.csproj", "{C14E7AA4-23AD-417D-9A63-62DE9036C9BB}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {DC2320EB-CC91-4648-AF2B-8937F6794A14}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {DC2320EB-CC91-4648-AF2B-8937F6794A14}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {DC2320EB-CC91-4648-AF2B-8937F6794A14}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {DC2320EB-CC91-4648-AF2B-8937F6794A14}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {DC2320EB-CC91-4648-AF2B-8937F6794A14}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {DC2320EB-CC91-4648-AF2B-8937F6794A14}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {C3375963-9409-41A1-ADD2-1076F5A90BDE}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {C3375963-9409-41A1-ADD2-1076F5A90BDE}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {C3375963-9409-41A1-ADD2-1076F5A90BDE}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {C3375963-9409-41A1-ADD2-1076F5A90BDE}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {C3375963-9409-41A1-ADD2-1076F5A90BDE}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {C3375963-9409-41A1-ADD2-1076F5A90BDE}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {C14E7AA4-23AD-417D-9A63-62DE9036C9BB}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {C14E7AA4-23AD-417D-9A63-62DE9036C9BB}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {C14E7AA4-23AD-417D-9A63-62DE9036C9BB}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {C14E7AA4-23AD-417D-9A63-62DE9036C9BB}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {C14E7AA4-23AD-417D-9A63-62DE9036C9BB}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {C14E7AA4-23AD-417D-9A63-62DE9036C9BB}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.Web/Test/TestMonoWeb.csproj b/mcs/class/System.Web/Test/TestMonoWeb.csproj
deleted file mode 100644
index b02181ce246..00000000000
--- a/mcs/class/System.Web/Test/TestMonoWeb.csproj
+++ /dev/null
@@ -1,969 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <ProjectType>Local</ProjectType>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{D4128FAA-D11C-4BC2-8950-E94B4E8B8ACE}</ProjectGuid>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ApplicationIcon>
- </ApplicationIcon>
- <AssemblyKeyContainerName>
- </AssemblyKeyContainerName>
- <AssemblyName>TestMonoWeb</AssemblyName>
- <AssemblyOriginatorKeyFile>
- </AssemblyOriginatorKeyFile>
- <DefaultClientScript>JScript</DefaultClientScript>
- <DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
- <DefaultTargetSchema>IE50</DefaultTargetSchema>
- <DelaySign>false</DelaySign>
- <OutputType>Library</OutputType>
- <RootNamespace>
- </RootNamespace>
- <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
- <StartupObject>
- </StartupObject>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <OutputPath>bin\</OutputPath>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>TRACE;DEBUG;NET_1_1;NET_2_0</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>true</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>1595</NoWarn>
- <Optimize>false</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>full</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <OutputPath>bin\Release_Java\</OutputPath>
- <AllowUnsafeBlocks>false</AllowUnsafeBlocks>
- <BaseAddress>285212672</BaseAddress>
- <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
- <ConfigurationOverrideFile>
- </ConfigurationOverrideFile>
- <DefineConstants>TRACE;JAVA;NET_1_1;ONLY_1_1;TARGET_JVM</DefineConstants>
- <DocumentationFile>
- </DocumentationFile>
- <DebugSymbols>false</DebugSymbols>
- <FileAlignment>4096</FileAlignment>
- <NoStdLib>false</NoStdLib>
- <NoWarn>1595</NoWarn>
- <Optimize>true</Optimize>
- <RegisterForComInterop>false</RegisterForComInterop>
- <RemoveIntegerChecks>false</RemoveIntegerChecks>
- <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
- <WarningLevel>4</WarningLevel>
- <DebugType>none</DebugType>
- <ErrorReport>prompt</ErrorReport>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="HtmlCompare, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>mainsoft\NunitWeb\NunitWeb\bin\Debug\HtmlCompare.dll</HintPath>
- </Reference>
- <Reference Include="nunit.framework, Version=2.3.6162.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
- <Reference Include="NunitWeb, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>mainsoft\NunitWeb\NunitWeb\bin\Debug\NunitWeb.dll</HintPath>
- </Reference>
- <Reference Include="System">
- <Name>System</Name>
- </Reference>
- <Reference Include="System.configuration" />
- <Reference Include="System.Data">
- <Name>System.Data</Name>
- </Reference>
- <Reference Include="System.Drawing">
- <Name>System.Drawing</Name>
- </Reference>
- <Reference Include="System.Web">
- <Name>System.Web</Name>
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Xml">
- <Name>System.Xml</Name>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Cas\AspNetHostingMinimal.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Cas\AspNetHostingNone.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="Cas\AspNetHostingPermissionHelper.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Caching\CacheCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Caching\CacheDependencyCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Caching\CacheStress.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Compilation\ClientBuildManagerParameterTest.cs" />
- <Compile Include="System.Web.Configuration\AnonymousIdentificationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\AssemblyCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\AssemblyInfoTest.cs" />
- <Compile Include="System.Web.Configuration\AuthenticationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationRuleCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationRuleTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\BufferModeSettingsTest.cs" />
- <Compile Include="System.Web.Configuration\BuildProviderTest.cs" />
- <Compile Include="System.Web.Configuration\CacheSectionTest.cs" />
- <Compile Include="System.Web.Configuration\ClientTargetSectionTest.cs" />
- <Compile Include="System.Web.Configuration\ClientTargetTest.cs" />
- <Compile Include="System.Web.Configuration\CodeSubDirectoryTest.cs" />
- <Compile Include="System.Web.Configuration\CompilationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\CustomErrorCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\CustomErrorsSectionTest.cs" />
- <Compile Include="System.Web.Configuration\DeploymentSectionTest.cs" />
- <Compile Include="System.Web.Configuration\GlobalizationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\HealthMonitoringSectionTest.cs" />
- <Compile Include="System.Web.Configuration\HostingEnvironmentSectionTest.cs" />
- <Compile Include="System.Web.Configuration\HttpCapabilitiesBaseCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Configuration\MachineKeyValidationConverterTest.cs" />
- <Compile Include="System.Web.Configuration\ProfilePropertySettingsTest.cs" />
- <Compile Include="System.Web.Configuration\WebConfigurationManagerTest.cs" />
- <Compile Include="System.Web.Handlers\TraceHandlerCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Hosting\HostingEnvironmentTest.cs" />
- <Compile Include="System.Web.Hosting\SimpleWorkerRequestCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Hosting\VirtualPathProviderTest.cs" />
- <Compile Include="System.Web.Mail\MailAttachmentCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Mail\MailMessageCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Mail\SmtpMailCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Profile\ProfileInfoTest.cs" />
- <Compile Include="System.Web.Security\DefaultAuthenticationEventArgsCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\DefaultAuthenticationModuleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FileAuthorizationModuleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FormsAuthenticationCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FormsAuthenticationEventArgsCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FormsAuthenticationModuleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FormsAuthenticationTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FormsAuthenticationTicketCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FormsIdentityCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\FormsIdentityTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Security\MembershipProviderCollectionTest.cs" />
- <Compile Include="System.Web.Security\MembershipProviderTest.cs" />
- <Compile Include="System.Web.Security\MembershipTest.cs" />
- <Compile Include="System.Web.Security\MembershipUserCollectionTest.cs" />
- <Compile Include="System.Web.Security\RolePrincipalTest.cs" />
- <Compile Include="System.Web.Security\RolesTest.cs" />
- <Compile Include="System.Web.Security\UrlAuthorizationModuleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.SessionState\SessionStateModuleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlAnchorCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlAnchorTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlButtonCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlButtonTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlContainerControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlContainerControlTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlEmptyTagControlBuilderCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlFormCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlFormTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlGenericControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlHeadBuilderCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlHeadCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlImageCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlImageTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputButtonCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputButtonTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputCheckBoxCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputCheckBoxTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputControlTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputFileCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputFileTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputHiddenCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputHiddenTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputImageCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputPasswordCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputPasswordTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputRadioButtonCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputRadioButtonTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputResetCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputResetTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputSubmitCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputSubmitTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputTextCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputTextTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlLinkCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlLinkTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlMetaCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlMetaTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectBuilderCas.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCellCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCellTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableRowCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableRowTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTextAreaCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTextAreaTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlTitleCas.cs" />
- <Compile Include="System.Web.UI.WebControls.WebParts\ConnectionInterfaceCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls.WebParts\WebPartTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AccessDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AdCreatedEventArgsCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\AdCreatedEventArgsTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\BaseDataBoundControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataListCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\BaseDataListTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\BaseValidatorCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\BaseValidatorTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\BoundColumnCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\BoundColumnTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ButtonColumnCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ButtonColumnTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ButtonTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CalandarCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CalendarDayCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CalendarDayTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CalendarTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CheckBoxCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CheckBoxListCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CheckBoxListTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CheckBoxTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CompareValidatorCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CompareValidatorTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CompositeControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CustomValidatorCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\CustomValidatorTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataBoundControlCas.cs" />
- <Compile Include="System.Web.UI.WebControls\DataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridColumnCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridColumnTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridItemCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridItemCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridItemCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridItemTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridPagerStyleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridPagerStyleTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataGridTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataKeyCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataKeyCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataListCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataListItemCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataListItemCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataListItemCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataListItemTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DataListTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DropDownListCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\DropDownListTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\EditCommandColumnCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\EditCommandColumnTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\FontInfoCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\FontInfoTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\FontNamesConverterCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\FontNamesConverterTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\FontUnitCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\FontUnitTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\FormViewCas.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\HyperLinkColumnCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\HyperLinkColumnTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\HyperLinkTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ImageButtonCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ImageButtonTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ImageCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ImageTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LabelCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LabelTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LinkButtonCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LinkButtonTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ListBoxCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ListBoxTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ListControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ListControlTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ListItemCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ListItemCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LiteralCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LiteralTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LoginCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginNameCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginNameTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LoginStatusCas.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginStatusTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MonthChangedEventArgsCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\MonthChangedEventArgsTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\PagedDataSourceCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\PagedDataSourceTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\PanelCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\PanelTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RadioButtonCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RadioButtonListCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RadioButtonListTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RadioButtonTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RangeValidatorCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RangeValidatorTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RegularExpressionValidatorCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RegularExpressionValidatorTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RepeaterCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RepeaterTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RepeatInfoCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.auto.2.0.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.auto.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.gen.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RequiredFieldValidatorCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\RoleGroupCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupCollectionCas.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SelectedDatesCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\SelectedDatesCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\StyleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\StyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableCellCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableCellTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableItemStyleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableItemStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableSectionStyleCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TableSectionStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableStyleCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TestControlIDConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\TextBoxCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TextBoxTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TreeViewCas.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\UnitConverterCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\UnitConverterTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\UnitTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ValidationSummaryCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ValidationSummaryTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\ValidatorTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\WebControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\WebControlTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\XmlDataSourceCas.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSourceTest.cs" />
- <Compile Include="System.Web.UI\AttributeCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\AttributeCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ChtmlTextWriterTest.cs" />
- <Compile Include="System.Web.UI\CleanHtmlTextWriter.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\CompiledTemplateBuilderCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ConstructorNeedsTagAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ControlBuilderAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ControlCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ControlCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ControlTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\CssStyleCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DataBinderCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DataBindingCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DataBindingCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DataBindingCollectionTest.cs" />
- <Compile Include="System.Web.UI\DataBindingHandlerAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DataBindingHandlerAttributeTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DataBoundLiteralControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DesignerDataBoundLiteralControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\DesignTimeParseDataCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\EmptyCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\Html32TextWriterCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\HtmlTextWriterCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\HtmlTextWriterTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ImageClickEventArgsCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\LiteralControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\LosFormatterCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\MinimizableAttributeTypeConverterTest.cs" />
- <Compile Include="System.Web.UI\PageTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI\PairCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ParseChildrenAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\PartialCachingAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\PersistChildrenAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\PersistenceModeAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\StateBagCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\StateBagTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\StateItemCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\StaticPartialCachingControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\TagPrefixAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\TemplateContainerAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\TemplateControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\TestUrlPropertyAttribute.cs" />
- <Compile Include="System.Web.UI\ToolboxDataAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ToolboxDataAttributeTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\TripletCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\UserControlCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\UserControlControlBuilderCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ValidationPropertyAttributeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ValidatorCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.UI\XhtmlTextWriterTest.cs" />
- <Compile Include="System.Web.Util\WorkItemCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpApplicationCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpApplicationStateCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpBrowserCapabilitiesCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCachePolicyCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheVaryByHeadersCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheVaryByHeadersTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheVaryByParamsCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCacheVaryByParamsTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpClientCertificateCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpClientCertificateTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCompileExceptionCas.cs" />
- <Compile Include="System.Web\HttpContext.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpContextCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCookieCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCookieCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCookieCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpCookieTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpExceptionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpFileCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpModuleCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpParseExceptionCas.cs" />
- <Compile Include="System.Web\HttpRequestCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpRequestTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpRequestValidationExceptionCas.cs" />
- <Compile Include="System.Web\HttpResponseTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpRuntimeCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpStaticObjectsCollectionCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpUnhandledExceptionCas.cs" />
- <Compile Include="System.Web\HttpWorkerRequestCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\HttpWriterCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\ProcessInfoCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\ProcessModelInfoCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\TraceContextCas.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web\VirtualPathUtilityTest.cs" />
- <None Include="Cas\ChangeLog" />
- <None Include="System.Web.Caching\ChangeLog" />
- <None Include="System.Web.Caching\Makefile" />
- <None Include="System.Web.Caching\README" />
- <None Include="System.Web.Compilation\ChangeLog" />
- <None Include="System.Web.Configuration\ChangeLog" />
- <None Include="System.Web.Handlers\ChangeLog" />
- <None Include="System.Web.Hosting\ChangeLog" />
- <None Include="System.Web.Mail\ChangeLog" />
- <None Include="System.Web.Security\ChangeLog" />
- <None Include="System.Web.SessionState\ChangeLog" />
- <None Include="System.Web.UI.HtmlControls\ChangeLog" />
- <None Include="System.Web.UI.WebControls.WebParts\ChangeLog" />
- <None Include="System.Web.UI.WebControls\ChangeLog" />
- <None Include="System.Web.UI\ChangeLog" />
- <None Include="System.Web.Util\ChangeLog" />
- <None Include="System.Web\ChangeLog" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <PropertyGroup>
- <PreBuildEvent>
- </PreBuildEvent>
- <PostBuildEvent>
- </PostBuildEvent>
- </PropertyGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web/Test/TestMonoWeb20.csproj b/mcs/class/System.Web/Test/TestMonoWeb20.csproj
deleted file mode 100644
index 030e12694f7..00000000000
--- a/mcs/class/System.Web/Test/TestMonoWeb20.csproj
+++ /dev/null
@@ -1,458 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7180B7A7-D0AB-4397-AC0A-CDB1A9DE6417}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>
- </RootNamespace>
- <AssemblyName>TestMonoWeb</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <StartupObject>
- </StartupObject>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <OldToolsVersion>2.0</OldToolsVersion>
- <jarserver>ip2</jarserver>
- <PublishUrl>publish\</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Disk</InstallFrom>
- <UpdateEnabled>false</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>false</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>False</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-RefInfo-system-drawing="repository:vmw:framework:2.0" REFS-RefInfo-system-configuration="repository:vmw:framework:2.0" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-rt="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-htmlcompare="mainsoft\MainsoftWebTest\bin\Debug_Java\HtmlCompare.jar" REFS-JarPath-nunit-framework="..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.jar" REFS-JarPath-nunitweb="mainsoft\NunitWeb\NunitWeb\bin\Debug_Java20\NunitWeb.jar" REFS-JarPath-system="" REFS-JarPath-system-configuration="" REFS-JarPath-system-data="" REFS-JarPath-system-drawing="" REFS-JarPath-system-web="" REFS-JarPath-system-xml="" REFS-RefInfo-nunit-framework="j2il:" REFS-RefInfo-system-web="repository:vmw:framework:2.0" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-j2se-helpers="" REFS-RefInfo-j2se-helpers="repository:vmw:framework:2.0" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="J2SE.Helpers, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.dll</HintPath>
- </Reference>
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" />
- <Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
- <Reference Include="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="System.Web.Configuration\AnonymousIdentificationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\AssemblyCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\AssemblyInfoTest.cs" />
- <Compile Include="System.Web.Configuration\AuthenticationSectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Configuration\AuthorizationRuleCollectionTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationRuleTest.cs" />
- <Compile Include="System.Web.Configuration\AuthorizationSectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Configuration\BufferModeSettingsTest.cs" />
- <Compile Include="System.Web.Configuration\BuildProviderTest.cs" />
- <Compile Include="System.Web.Configuration\CacheSectionTest.cs" />
- <Compile Include="System.Web.Configuration\ClientTargetSectionTest.cs" />
- <Compile Include="System.Web.Configuration\ClientTargetTest.cs" />
- <Compile Include="System.Web.Configuration\CodeSubDirectoryTest.cs" />
- <Compile Include="System.Web.Configuration\CustomErrorCollectionTest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Web.Configuration\CustomErrorsSectionTest.cs" />
- <Compile Include="System.Web.Configuration\DeploymentSectionTest.cs" />
- <Compile Include="System.Web.Configuration\GlobalizationSectionTest.cs" />
- <Compile Include="System.Web.Configuration\HostingEnvironmentSectionTest.cs" />
- <Compile Include="System.Web.Configuration\MachineKeyValidationConverterTest.cs" />
- <Compile Include="System.Web.Configuration\NullableStringValidatorTest.cs" />
- <Compile Include="System.Web.Configuration\ProfilePropertySettingsTest.cs" />
- <Compile Include="System.Web.Configuration\SiteMapSectionTest.cs" />
- <Compile Include="System.Web.Configuration\WebConfigurationManagerTest.cs" />
- <Compile Include="System.Web.Profile\ProfileInfoTest.cs" />
- <Compile Include="System.Web.Security\FormsAuthenticationTest.cs" />
- <Compile Include="System.Web.Security\FormsIdentityTest.cs" />
- <Compile Include="System.Web.Security\MembershipProviderCollectionTest.cs" />
- <Compile Include="System.Web.Security\MembershipProviderTest.cs" />
- <Compile Include="System.Web.Security\MembershipTest.cs" />
- <Compile Include="System.Web.Security\MembershipUserCollectionTest.cs" />
- <Compile Include="System.Web.Security\RolePrincipalTest.cs" />
- <Compile Include="System.Web.Security\RolesTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlAnchorTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlButtonTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlContainerControlTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlFormTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlImageTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputButtonTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputCheckBoxTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputControlTest.cs">
- </Compile>
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputFileTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputHiddenTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputPasswordTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputRadioButtonTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputResetTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputSubmitTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlInputTextTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlLinkTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlMetaTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlSelectTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableCellTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableRowTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTableTest.cs" />
- <Compile Include="System.Web.UI.HtmlControls\HtmlTextAreaTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AccessDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AdCreatedEventArgsTest.cs" />
- <Compile Include="System.Web.UI.WebControls\AutoGeneratedFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseCompareValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseDataListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BaseValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BoundColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BoundFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\BulletedListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonFieldBaseTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CalendarDayTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CalendarTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CallBackTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ChangePasswordTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CheckBoxTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CircleHotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CommandFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompareValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompleteWizardStepTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CompositeDataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ContentTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ControlParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CookieParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserWizardStepTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CreateUserWizardTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CrossPagePostingTest.cs" />
- <Compile Include="System.Web.UI.WebControls\CustomValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlFieldCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataControlFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridItemTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridPagerStyleTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataGridTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyArrayTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataKeyTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListItemTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataSourceControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DataSourceViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewRowCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DetailsViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\DropDownListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\EditCommandColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FileUploadTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FontInfoTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FontNamesConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FontUnitTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FormParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\FormViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRowCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\GridViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HierarchicalDataBoundControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HotSpotCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkColumnTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\HyperLinkTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageMapTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ImageTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LabelTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LinkButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListBoxTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ListItemTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LiteralTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginNameTest.cs">
- </Compile>
- <Compile Include="System.Web.UI.WebControls\LoginStatusTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginTest.cs" />
- <Compile Include="System.Web.UI.WebControls\LoginViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MappingUrlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MasterPageTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\MenuTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MonthChangedEventArgsTest.cs" />
- <Compile Include="System.Web.UI.WebControls\MultiViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ObjectDataSourceViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PagedDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PagerSettingsTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PanelTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PasswordRecoveryTest.cs" />
- <Compile Include="System.Web.UI.WebControls\PolygonHotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\QueryStringParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButtonListTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RadioButtonTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RangeValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RectangleHotSpotTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RegularExpressionValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterItemCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeaterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.auto.2.0.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.auto.cs" />
- <Compile Include="System.Web.UI.WebControls\RepeatInfoTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\RoleGroupTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SelectedDatesCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SessionParameterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SiteMapPathTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceDerbyTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\SqlDataSourceViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\StyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableCellTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableFooterRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderCellTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableHeaderRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableItemStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableRowTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TableSectionStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableStyleTest.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Web.UI.WebControls\TableTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TargetConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TemplateFieldTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TestControlIDConverter.cs" />
- <Compile Include="System.Web.UI.WebControls\TextBoxTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ThemeTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeBindingCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeBindingTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeStyleCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeStyleTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeNodeTest.cs" />
- <Compile Include="System.Web.UI.WebControls\TreeViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\UnitTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidatedControlConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidationSummaryTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ValidatorTest.cs" />
- <Compile Include="System.Web.UI.WebControls\ViewTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WebColorConverterTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WebControlTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepBaseTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepCollectionTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardStepTest.cs" />
- <Compile Include="System.Web.UI.WebControls\WizardTest.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlDataSourceTest.cs" />
- <Compile Include="System.Web.UI.WebControls\XmlTest.cs" />
- <Compile Include="System.Web.UI\AttributeCollectionTest.cs" />
- <Compile Include="System.Web.UI\ChtmlTextWriterTest.cs" />
- <Compile Include="System.Web.UI\CleanHtmlTextWriter.cs" />
- <Compile Include="System.Web.UI\ClientScriptManagerTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI\ControlCollectionTest.cs" />
- <Compile Include="System.Web.UI\ControlTest.cs" />
- <Compile Include="System.Web.UI\CssStyleCollectionTest.cs" />
- <Compile Include="System.Web.UI\DataBindingCollectionTest.cs" />
- <Compile Include="System.Web.UI\DataBindingHandlerAttributeTest.cs" />
- <Compile Include="System.Web.UI\DataSourceSelectArgumentsTest.cs" />
- <Compile Include="System.Web.UI\HtmlTextWriterTest.cs" />
- <Compile Include="System.Web.UI\LiteralControlTest.cs" />
- <Compile Include="System.Web.UI\MinimizableAttributeTypeConverterTest.cs" />
- <Compile Include="System.Web.UI\OutputCacheParametersTest.cs" />
- <Compile Include="System.Web.UI\PageTest.cs">
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="System.Web.UI\PostBackOptionsTest.cs" />
- <Compile Include="System.Web.UI\PropertyConverterTest.cs" />
- <Compile Include="System.Web.UI\StateBagTest.cs" />
- <Compile Include="System.Web.UI\TemplateControlTest.cs" />
- <Compile Include="System.Web.UI\TemplateInstanceAttributeTest.cs" />
- <Compile Include="System.Web.UI\TestUrlPropertyAttribute.cs" />
- <Compile Include="System.Web.UI\ToolboxDataAttributeTest.cs" />
- <Compile Include="System.Web.UI\XhtmlTextWriterTest.cs" />
- <Compile Include="System.Web\HttpBrowserCapabilitiesTest.cs" />
- <Compile Include="System.Web\HttpCacheVaryByHeadersTest.cs" />
- <Compile Include="System.Web\HttpCacheVaryByParamsTest.cs" />
- <Compile Include="System.Web\HttpClientCertificateTest.cs" />
- <Compile Include="System.Web\HttpContext.cs" />
- <Compile Include="System.Web\HttpCookieCollectionTest.cs" />
- <Compile Include="System.Web\HttpCookieTest.cs" />
- <Compile Include="System.Web\HttpRequestTest.cs" />
- <Compile Include="System.Web\HttpResponseTest.cs" />
- <Compile Include="System.Web\HttpServerUtilityTest.cs" />
- <Compile Include="System.Web\HttpUtilityTest.cs" />
- <Compile Include="System.Web\HttpWorkerRequestTest.cs" />
- <Compile Include="System.Web\SiteMapNodeTest.cs" />
- <Compile Include="System.Web\SiteMapProviderTest.cs" />
- <Compile Include="System.Web\StaticSiteMapProviderTest.cs" />
- <Compile Include="System.Web\VirtualPathUtilityTest.cs">
- <SubType>Code</SubType>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <None Include="System.Web.Caching\ChangeLog" />
- <None Include="System.Web.Caching\Makefile" />
- <None Include="System.Web.Caching\README" />
- <None Include="System.Web.Configuration\ChangeLog" />
- <None Include="System.Web.Handlers\ChangeLog" />
- <None Include="System.Web.Mail\ChangeLog" />
- <None Include="System.Web.Security\ChangeLog" />
- <None Include="System.Web.SessionState\ChangeLog" />
- <None Include="System.Web.UI.HtmlControls\ChangeLog" />
- <None Include="System.Web.UI.WebControls\ChangeLog" />
- <None Include="System.Web.UI\ChangeLog" />
- <None Include="System.Web.Util\ChangeLog" />
- <None Include="System.Web\ChangeLog" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="mainsoft\MainsoftWebTest\HtmlCompare20.csproj">
- <Project>{C3375963-9409-41A1-ADD2-1076F5A90BDE}</Project>
- <Name>HtmlCompare20</Name>
- </ProjectReference>
- <ProjectReference Include="mainsoft\NunitWeb\NunitWeb\NunitWeb20.csproj">
- <Project>{DC2320EB-CC91-4648-AF2B-8937F6794A14}</Project>
- <Name>NunitWeb20</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="System.Web.Compilation\" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/AssemblyInfo.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/AssemblyInfo.cs
index e2f207a1098..8432eafdddb 100644
--- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/AssemblyInfo.cs
+++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/AssemblyInfo.cs
@@ -62,7 +62,7 @@ using System.Runtime.CompilerServices;
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
-#if !(TARGET_JVM || TARGET_DOTNET)
+#if !(TARGET_DOTNET)
[assembly: AssemblyDelaySign (true)]
[assembly: AssemblyKeyFile ("../winfx.pub")]
#endif
diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/HtmlWeb.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/HtmlWeb.cs
index 519935bdf43..53ed256edda 100644
--- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/HtmlWeb.cs
+++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/HtmlWeb.cs
@@ -7,7 +7,6 @@ using System.Xml.Serialization;
using System.Xml.Xsl;
using Microsoft.Win32;
-#if !TARGET_JVM
namespace HtmlAgilityPack
{
/// <summary>
@@ -821,4 +820,3 @@ namespace HtmlAgilityPack
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/tools.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/tools.cs
index e59b639382a..092998110f8 100644
--- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/tools.cs
+++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebTest/HtmlAgilityPack/tools.cs
@@ -23,58 +23,6 @@ namespace HtmlAgilityPack
File.Copy(source, target, true);
}
}
-#if TARGET_JVM1
- internal struct HtmlLibrary
- {
- [Conditional("DEBUG")]
- internal static void GetVersion(out string version)
- {
- System.Diagnostics.StackFrame sf = new System.Diagnostics.StackFrame(1, true);
- version = sf.GetMethod().DeclaringType.Assembly.GetName().Version.ToString();
- }
-
- [Conditional("DEBUG")]
- [Conditional("TRACE")]
- internal static void Trace(object Value)
- {
- // category is the method
- string name = null;
- GetCurrentMethodName(2, out name);
- System.Diagnostics.Trace.WriteLine(Value, name);
- }
-
- [Conditional("DEBUG")]
- [Conditional("TRACE")]
- internal static void TraceStackFrame(int steps)
- {
- string name = null;
- GetCurrentMethodName(2, out name);
- string trace = "";
- for(int i=1;i<steps;i++)
- {
- System.Diagnostics.StackFrame sf = new System.Diagnostics.StackFrame(i, true);
- trace += sf.ToString();
- }
- System.Diagnostics.Trace.WriteLine(trace, name);
- System.Diagnostics.Trace.WriteLine("");
- }
-
- [Conditional("DEBUG")]
- internal static void GetCurrentMethodName(out string name)
- {
- name = null;
- GetCurrentMethodName(2, out name);
- }
-
- [Conditional("DEBUG")]
- internal static void GetCurrentMethodName(int skipframe, out string name)
- {
- StackFrame sf = new StackFrame(skipframe, true);
- name = sf.GetMethod().DeclaringType.Name + "." + sf.GetMethod().Name;
- }
-
- }
-#endif
internal class HtmlCmdLine
{
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs
index bfd8e53031b..5980fbdd7d9 100644
--- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/MyHost.jvm.cs
@@ -81,11 +81,7 @@ namespace MonoTests.SystemWeb.Framework
headers.Add (INVOKER_HEADER, Serialize (t.Invoker));
headers.Add (USER_HEADER, Serialize (t.UserData));
WebRequest wr = t.Request.CreateWebRequest (
-#if TARGET_JVM
- new Uri ("http://localhost:8080/MainsoftWebApp20/"),
-#else
new Uri ("http://localhost:59598/NunitWebTest/"),
-#endif
headers);
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs
index 296b2b19304..6bbaa24ed0f 100644
--- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs
@@ -1,7 +1,3 @@
-#if TARGET_JVM
-#define BUG_78521_FIXED
-#endif
-
using System;
using System.Web.UI;
@@ -106,11 +102,8 @@ namespace MonoTests.SystemWeb.Framework
_page = (Page) parameters[0];
#if NET_2_0
-#if BUG_78521_FIXED
- _page.PreInit += OnPreInit;
-#else
OnPreInit (null, null);
-#endif
+
_page.LoadComplete += OnLoadComplete;
_page.PreLoad += OnPreLoad;
_page.PreRenderComplete += OnPreRenderComplete;
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs
index a8873618549..750f40c752d 100644
--- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Resources/MyPage.aspx.cs
@@ -1,7 +1,3 @@
-#if TARGET_JVM
-#define BUG_78521_FIXED
-#endif
-
using System;
using System.Web.UI;
using MonoTests.SystemWeb.Framework;
@@ -9,11 +5,7 @@ using MonoTests.SystemWeb.Framework;
public partial class MyPage : System.Web.UI.Page
{
//FIXME: mono defines its own constructor here
-#if BUG_78521_FIXED
- public MyPage ()
-#else
protected override void OnPreInit (EventArgs e)
-#endif
{
WebTest t = WebTest.CurrentTest;
if (t != null)
diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
index d7d386cdef2..f01d9f8795a 100644
--- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
+++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTest.cs
@@ -1,7 +1,3 @@
-#if TARGET_JVM_FOR_WEBTEST
-#define TARGET_JVM
-#endif
-
using System;
using System.Reflection;
using System.IO;
@@ -202,7 +198,6 @@ namespace MonoTests.SystemWeb.Framework
/// </summary>
public static void CleanApp ()
{
-#if !TARGET_JVM
if (host != null) {
lock (_appUnloadedSync) {
EventHandler handler = new EventHandler(PulseAppUnloadedSync);
@@ -218,7 +213,6 @@ namespace MonoTests.SystemWeb.Framework
baseDir = null;
binDir = null;
}
-#endif
}
private static object _appUnloadedSync = new object();
@@ -305,7 +299,6 @@ namespace MonoTests.SystemWeb.Framework
{
if (type == null)
throw new ArgumentNullException ("type");
-#if !TARGET_JVM
using (Stream source = type.Assembly.GetManifestResourceStream (resourceName)) {
if (source == null)
throw new ArgumentException ("resource not found: " + resourceName, "resourceName");
@@ -313,7 +306,6 @@ namespace MonoTests.SystemWeb.Framework
source.Read (array, 0, array.Length);
CopyBinary (array, targetUrl);
}
-#endif
}
public static void CopyPrefixedResources (Type type, string namePrefix, string targetDir)
@@ -347,9 +339,6 @@ namespace MonoTests.SystemWeb.Framework
/// <example><code>CopyBinary (System.Text.Encoding.UTF8.GetBytes ("Hello"), "App_Data/Greeting.txt");</code></example>
public static string CopyBinary (byte[] sourceArray, string targetUrl)
{
-#if TARGET_JVM
- return null;
-#else
EnsureWorkingDirectories ();
EnsureDirectoryExists (Path.Combine (baseDir, Path.GetDirectoryName (targetUrl)));
string targetFile = Path.Combine (baseDir, targetUrl);
@@ -386,7 +375,6 @@ namespace MonoTests.SystemWeb.Framework
}
return targetFile;
-#endif
}
static WebTestResourcesSetupAttribute.SetupHandler CheckResourcesSetupHandler ()
@@ -408,14 +396,9 @@ namespace MonoTests.SystemWeb.Framework
{
if (host != null)
return;
-#if TARGET_JVM
- host = new MyHost ();
- return;
-#else
host = AppDomain.CurrentDomain.GetData (HOST_INSTANCE_NAME) as MyHost;
if (host == null)
SetupHosting ();
-#endif
}
public static void SetupHosting ()
@@ -425,16 +408,10 @@ namespace MonoTests.SystemWeb.Framework
public static void SetupHosting (WebTestResourcesSetupAttribute.SetupHandler resHandler)
{
-#if !TARGET_JVM
if (host == null)
host = AppDomain.CurrentDomain.GetData (HOST_INSTANCE_NAME) as MyHost;
-#endif
if (host != null)
CleanApp ();
-#if TARGET_JVM
- host = new MyHost ();
- return;
-#else
if (resHandler == null)
resHandler = CheckResourcesSetupHandler ();
if (resHandler == null)
@@ -452,7 +429,6 @@ namespace MonoTests.SystemWeb.Framework
AppDomain.CurrentDomain.SetData (HOST_INSTANCE_NAME, host);
host.AppDomain.SetData (HOST_INSTANCE_NAME, host);
host.AppDomain.DomainUnload += new EventHandler (_unloadHandler.OnUnload);
-#endif
}
private static UnloadHandler _unloadHandler = new UnloadHandler();
@@ -485,7 +461,6 @@ namespace MonoTests.SystemWeb.Framework
public void OnUnload (object o, EventArgs args)
{
-#if !TARGET_JVM
// Block new requests from starting
lock (_syncUnloading) {
// Wait for pending requests to finish
@@ -501,7 +476,6 @@ namespace MonoTests.SystemWeb.Framework
if (handler != null)
handler(this, null);
}
-#endif
}
}
@@ -509,15 +483,10 @@ namespace MonoTests.SystemWeb.Framework
public static string TestBaseDir {
get {
-#if !TARGET_JVM
return baseDir;
-#else
- return String.Empty;
-#endif
}
}
-#if !TARGET_JVM
const string VIRTUAL_BASE_DIR = "/NunitWeb";
private static string baseDir;
private static string binDir;
@@ -608,6 +577,5 @@ namespace MonoTests.SystemWeb.Framework
}
static partial void CopyResourcesLocal ();
-#endif
}
}
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj b/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj
deleted file mode 100644
index e041b9ef813..00000000000
--- a/mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.csproj
+++ /dev/null
@@ -1,211 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{73F9BAEA-A04B-4254-A736-D3B8B9947340}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Windows.Forms.DataVisualization.Charting</RootNamespace>
- <AssemblyName>System.Windows.Forms.DataVisualization</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE;NET_4_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Accessibility">
- <EmbedInteropTypes>True</EmbedInteropTypes>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Configuration" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Axis.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScaleView.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartArea3DStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartGraphics.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartPaintEventArgs.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ElementPosition.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\FormatNumberEventArgs.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Margins.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\MarkerStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPathPoint.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPathPointCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Annotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationPositionChangingEventArgs.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnovaResult.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AreaAlignmentOrientations.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AreaAlignmentStyles.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ArrowAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ArrowStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisArrowStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisEnabled.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisName.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScaleBreakStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\BorderSkinStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\BreakLineStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CalloutStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Chart.cs">
- <SubType>Component</SubType>
- </Compile>
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartArea.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AntiAliasingStyles.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartAreaCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartColorPalette.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartDashStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElement.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElementCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartElementType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartHatchStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartImageAlignmentStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartImageFormat.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartImageWrapMode.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartNamedElement.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartNamedElementCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartValueType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CursorEventArgs.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomLabel.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomLabelCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CompareMethod.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\DataPoint.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\DataPointCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\DataPointCustomProperties.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\DateRangeType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\DateTimeIntervalType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Docking.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\FinancialFormula.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\GradientStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Grid.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\GridTickTypes.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\IDataPointFilter.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\IntervalAutoMode.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\IntervalType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LabelAlignmentStyles.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LabelAutoFitStyles.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LabelCalloutStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LabelMarkStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LabelOutsidePlotAreaStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellColumnType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendImageStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendItemOrder.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendSeparatorStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendTableStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LightStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LineAnchorCapStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\NamedImage.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\NamedImagesCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Point3D.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\PointSortOrder.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ScrollBarButtonStyles.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ScrollBarButtonType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ScrollType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\SerializationContents.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\SerializationFormat.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Series.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\SeriesChartType.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\SeriesCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\StartFromZero.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TextAntiAliasingQuality.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TextOrientation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TextStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMark.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TickMarkStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ToolTipEventArgs.cs" />
- <Compile Include="..\..\build\common\Consts.cs">
- <Link>Consts.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LabelStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AxisScrollBar.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\StripLine.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\StripLinesCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Legend.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellColumn.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ScrollBarEventArgs.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ViewEventArgs.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\HitTestResult.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendItem.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\SmartLabelStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomProperties.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Title.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ChartSerializer.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\DataManipulator.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\PrintingManager.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TitleCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\DataFormula.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\BorderSkin.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellColumnCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendItemsCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCell.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LegendCellCollection.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CalloutAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TextAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\LineAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\RectangleAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationGroup.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\AnnotationSmartLabelStyle.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Cursor.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\CustomizeLegendEventArgs.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\PolylineAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\Border3DAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\EllipseAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\HorizontalLineAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ImageAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\PolygonAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\VerticalLineAnnotation.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\StatisticFormula.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\FTestResult.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\TTestResult.cs" />
- <Compile Include="System.Windows.Forms.DataVisualization.Charting\ZTestResult.cs" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- <Folder Include="common\" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPointTest.cs b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPointTest.cs
index 1933373d27b..a802e4b8c03 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPointTest.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnnotationPathPointTest.cs
@@ -27,7 +27,7 @@ using System;
using System.Windows.Forms.DataVisualization.Charting;
using NUnit.Framework;
-namespace ChartingTests
+namespace MonoTests.System.Windows.Forms.DataVisualization.Charting
{
[TestFixture]
public class AnnotationPathPointTest
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnovaResultTest.cs b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnovaResultTest.cs
index 8a146d266bd..ef1f648777d 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnovaResultTest.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AnovaResultTest.cs
@@ -27,7 +27,7 @@ using System;
using System.Windows.Forms.DataVisualization.Charting;
using NUnit.Framework;
-namespace ChartingTests
+namespace MonoTests.System.Windows.Forms.DataVisualization.Charting
{
[TestFixture]
public class AnovaResultTest
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotationTest.cs b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotationTest.cs
index ccc57005014..9fced81aade 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotationTest.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ArrowAnnotationTest.cs
@@ -27,7 +27,7 @@ using System;
using System.Windows.Forms.DataVisualization.Charting;
using NUnit.Framework;
-namespace ChartingTests
+namespace MonoTests.System.Windows.Forms.DataVisualization.Charting
{
[TestFixture]
public class ArrowAnnotationTest
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyleTest.cs b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyleTest.cs
index e820427d526..3871898efdf 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyleTest.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/AxisScaleBreakStyleTest.cs
@@ -28,7 +28,7 @@ using System.Windows.Forms.DataVisualization.Charting;
using NUnit.Framework;
using System.Drawing;
-namespace ChartingTests
+namespace MonoTests.System.Windows.Forms.DataVisualization.Charting
{
[TestFixture]
public class AxisScaleBreakStyleTest
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ChartElementTest.cs b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ChartElementTest.cs
index c7053c6a7ee..3afeffe4238 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ChartElementTest.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/ChartElementTest.cs
@@ -27,7 +27,7 @@ using System;
using System.Windows.Forms.DataVisualization.Charting;
using NUnit.Framework;
-namespace ChartingTests
+namespace MonoTests.System.Windows.Forms.DataVisualization.Charting
{
[TestFixture]
public class ChartElementTest
diff --git a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/DataPointTest.cs b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/DataPointTest.cs
index 5431d77ea52..ec98463aa9b 100644
--- a/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/DataPointTest.cs
+++ b/mcs/class/System.Windows.Forms.DataVisualization/Test/System.Windows.Forms.DataVisualization.Charting/DataPointTest.cs
@@ -27,7 +27,7 @@ using System;
using System.Windows.Forms.DataVisualization.Charting;
using NUnit.Framework;
-namespace ChartingTests
+namespace MonoTests.System.Windows.Forms.DataVisualization.Charting
{
[TestFixture]
public class DataPointTest
diff --git a/mcs/class/System.XML/Assembly/AssemblyInfo.cs b/mcs/class/System.XML/Assembly/AssemblyInfo.cs
index 01bd1e8c073..4f3d1edbb29 100644
--- a/mcs/class/System.XML/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System.XML/Assembly/AssemblyInfo.cs
@@ -53,7 +53,6 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
-#if !TARGET_JVM
[assembly: CLSCompliant (true)]
[assembly: AssemblyDelaySign (true)]
#if NET_2_1
@@ -61,7 +60,6 @@ using System.Runtime.InteropServices;
#else
[assembly: AssemblyKeyFile ("../ecma.pub")]
#endif
-#endif
#if NET_2_1
[assembly: InternalsVisibleTo ("System.Runtime.Serialization, PublicKey=00240000048000009400000006020000002400005253413100040000010001008D56C76F9E8649383049F383C44BE0EC204181822A6C31CF5EB7EF486944D032188EA1D3920763712CCB12D75FB77E9811149E6148E5D32FBAAB37611C1878DDC19E20EF135D0CB2CFF2BFEC3D115810C3D9069638FE4BE215DBF795861920E5AB6F7DB2E2CEEF136AC23D5DD2BF031700AEC232F6C6B1C785B4305C123B37AB")]
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslLiteralElement.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslLiteralElement.cs
index 88c2d44f8bf..dcd56eb8192 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslLiteralElement.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslLiteralElement.cs
@@ -140,7 +140,8 @@ namespace Mono.Xml.Xsl.Operations {
if (children != null) children.Evaluate (p);
- if (isEmptyElement)
+ var templateContent = children as XslTemplateContent;
+ if (isEmptyElement || (templateContent != null && templateContent.IsEmptyElement))
p.Out.WriteEndElement ();
else
p.Out.WriteFullEndElement ();
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs
index 3315373cbe6..736e6b69449 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl.Operations/XslTemplateContent.cs
@@ -46,6 +46,7 @@ namespace Mono.Xml.Xsl.Operations
int stackSize;
XPathNodeType parentType;
bool xslForEach;
+ bool isEmptyElement;
public XslTemplateContent (Compiler c,
XPathNodeType parentType, bool xslForEach)
@@ -60,6 +61,10 @@ namespace Mono.Xml.Xsl.Operations
get { return parentType; }
}
+ public bool IsEmptyElement {
+ get { return isEmptyElement; }
+ }
+
protected override void Compile (Compiler c)
{
if (c.Debugger != null)
@@ -178,6 +183,14 @@ namespace Mono.Xml.Xsl.Operations
} while (c.Input.MoveToNext ());
+ isEmptyElement = true;
+ foreach (var n in content) {
+ if (n is XslAttribute)
+ continue;
+
+ isEmptyElement = false;
+ break;
+ }
if (hasStack) {
stackSize = c.PopScope ().VariableHighTide;
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/MSXslScriptManager.cs b/mcs/class/System.XML/Mono.Xml.Xsl/MSXslScriptManager.cs
index 545ca1cb277..5f6e12ff71f 100644
--- a/mcs/class/System.XML/Mono.Xml.Xsl/MSXslScriptManager.cs
+++ b/mcs/class/System.XML/Mono.Xml.Xsl/MSXslScriptManager.cs
@@ -129,7 +129,7 @@ namespace Mono.Xml.Xsl {
public object Compile (XPathNavigator node)
{
-#if TARGET_JVM || MOBILE
+#if MOBILE
throw new NotImplementedException ();
#else
string suffix = "";
diff --git a/mcs/class/System.XML/Mono.Xml.Xsl/XslDecimalFormat.jvm.cs b/mcs/class/System.XML/Mono.Xml.Xsl/XslDecimalFormat.jvm.cs
deleted file mode 100644
index 8be09aad626..00000000000
--- a/mcs/class/System.XML/Mono.Xml.Xsl/XslDecimalFormat.jvm.cs
+++ /dev/null
@@ -1,155 +0,0 @@
-//
-// XslDecimalFormat.jvm.cs
-//
-// Authors:
-// Andrew Skiba <andrews@mainsoft.com>
-//
-// (C) 2005 Mainsoft Corporation (http://www.mainsoft.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Xml;
-using System.Xml.XPath;
-using System.Xml.Xsl;
-
-using QName = System.Xml.XmlQualifiedName;
-
-namespace Mono.Xml.Xsl {
- internal class XslDecimalFormat {
-
- java.text.DecimalFormatSymbols javaFormat;
- string baseUri;
- int lineNumber;
- int linePosition;
-
- public static readonly XslDecimalFormat Default = new XslDecimalFormat ();
-
- XslDecimalFormat ()
- {
- javaFormat = new java.text.DecimalFormatSymbols ();
- javaFormat.setNaN ("NaN");
- javaFormat.setInfinity ("Infinity");
- }
-
- public XslDecimalFormat (Compiler c)
- :this ()
- {
- Initialize(c);
- }
-
- private void Initialize(Compiler c)
- {
- XPathNavigator n = c.Input;
-
- IXmlLineInfo li = n as IXmlLineInfo;
- if (li != null) {
- lineNumber = li.LineNumber;
- linePosition = li.LinePosition;
- }
- baseUri = n.BaseURI;
-
- if (n.MoveToFirstAttribute ()) {
- do {
- if (n.NamespaceURI != String.Empty)
- continue;
-
- switch (n.LocalName) {
- case "name": break; // already handled
- case "decimal-separator":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT decimal-separator value must be exact one character.", null, n);
- javaFormat.setDecimalSeparator (n.Value[0]);
- break;
-
- case "grouping-separator":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT grouping-separator value must be exact one character.", null, n);
- javaFormat.setGroupingSeparator (n.Value[0]);
- break;
-
- case "infinity":
- javaFormat.setInfinity (n.Value);
- break;
- case "minus-sign":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT minus-sign value must be exact one character.", null, n);
- javaFormat.setMinusSign (n.Value[0]);
- break;
- case "NaN":
- javaFormat.setNaN (n.Value);
- break;
- case "percent":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT percent value must be exact one character.", null, n);
- javaFormat.setPercent (n.Value[0]);
- break;
- case "per-mille":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT per-mille value must be exact one character.", null, n);
- javaFormat.setPerMill (n.Value[0]);
- break;
- case "digit":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT digit value must be exact one character.", null, n);
- javaFormat.setDigit (n.Value[0]);
- break;
- case "zero-digit":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT zero-digit value must be exact one character.", null, n);
- javaFormat.setZeroDigit (n.Value [0]);
- break;
- case "pattern-separator":
- if (n.Value.Length != 1)
- throw new XsltCompileException ("XSLT pattern-separator value must be exact one character.", null, n);
- javaFormat.setPatternSeparator (n.Value [0]);
- break;
- }
- } while (n.MoveToNextAttribute ());
- n.MoveToParent ();
- }
- }
-
- public void CheckSameAs (XslDecimalFormat other)
- {
- if (! this.javaFormat.Equals (other.javaFormat))
- throw new XsltCompileException (null, other.baseUri, other.lineNumber, other.linePosition);
- }
-
- public string FormatNumber (double number, string pattern)
- {
- java.text.DecimalFormat frm = new java.text.DecimalFormat("", javaFormat);
-
- frm.applyLocalizedPattern (pattern);
-
- //TODO: the next 4 string could be replaced by just
- //return frm.format (number);
- //I don't want to do that before release
- java.lang.StringBuffer buffer= new java.lang.StringBuffer ();
- java.text.FieldPosition fld = new java.text.FieldPosition (0);
-
- frm.format (number, buffer, fld);
- return buffer.ToString();
- }
- }
-}
diff --git a/mcs/class/System.XML/System.Xml.Serialization/SchemaImporter.cs b/mcs/class/System.XML/System.Xml.Serialization/SchemaImporter.cs
index d996c360e7e..45cf17a17ea 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/SchemaImporter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/SchemaImporter.cs
@@ -31,9 +31,7 @@
#if NET_2_0
using System;
-#if !TARGET_JVM
using System.Xml.Serialization.Advanced;
-#endif
namespace System.Xml.Serialization
{
diff --git a/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs b/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
index 86c63bc66a2..0ac2cd5e0ba 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/SerializationCodeGenerator.cs
@@ -580,7 +580,7 @@ namespace System.Xml.Serialization
WriteLine (string.Empty);
}
- WriteLine ("string " + GetGetEnumValueName (map) + " (" + map.TypeData.CSharpFullName + " val)");
+ WriteLine ("string " + GetGetEnumValueName (map) + " (" + GetTypeFullName (map.TypeData) + " val)");
WriteLineInd ("{");
@@ -616,7 +616,7 @@ namespace System.Xml.Serialization
void GenerateWriteObject (XmlTypeMapping typeMap)
{
- WriteLine ("void " + GetWriteObjectName (typeMap) + " (" + typeMap.TypeData.CSharpFullName + " ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)");
+ WriteLine ("void " + GetWriteObjectName (typeMap) + " (" + GetTypeFullName (typeMap.TypeData) + " ob, string element, string namesp, bool isNullable, bool needType, bool writeWrappingElem)");
WriteLineInd ("{");
PushHookContext ();
@@ -653,9 +653,9 @@ namespace System.Xml.Serialization
if (typeMap.TypeData.SchemaType == SchemaTypes.XmlNode)
{
if (_format == SerializationFormat.Literal)
- WriteLine ("WriteElementLiteral (ob, \"\", \"\", true, false);");
+ WriteLine ("WriteElementLiteral (ob, \"\", \"\", true, " + GetLiteral(typeMap.IsAny) + ");");
else
- WriteLine ("WriteElementEncoded (ob, \"\", \"\", true, false);");
+ WriteLine ("WriteElementEncoded (ob, \"\", \"\", true, " + GetLiteral(typeMap.IsAny) + ");");
GenerateEndHook ();
WriteLineUni ("}");
@@ -666,7 +666,7 @@ namespace System.Xml.Serialization
if (typeMap.TypeData.SchemaType == SchemaTypes.XmlSerializable)
{
- WriteLine ("WriteSerializable (ob, element, namesp, isNullable);");
+ WriteLine ("WriteSerializable (ob, element, namesp, isNullable, " + GetLiteral(!typeMap.IsAny) + ");");
GenerateEndHook ();
WriteLineUni ("}");
@@ -971,7 +971,7 @@ namespace System.Xml.Serialization
void GenerateWriteAnyElementContent (XmlTypeMapMemberAnyElement member, string memberValue)
{
- bool singleElement = (member.TypeData.Type == typeof (XmlElement));
+ bool singleElement = (member.TypeData.Type == typeof (XmlElement) || member.TypeData.Type == typeof (XmlNode));
string var, var2;
var = GetObTempVar ();
@@ -1371,9 +1371,11 @@ namespace System.Xml.Serialization
else
WriteLine ("return ReadXmlNode (false);");
} else {
- WriteLineInd ("if (Reader.LocalName != " + GetLiteral (typeMap.ElementName) + " || Reader.NamespaceURI != " + GetLiteral (typeMap.Namespace) + ")");
- WriteLine ("throw CreateUnknownNodeException();");
- Unindent ();
+ if (!typeMap.IsAny) {
+ WriteLineInd ("if (Reader.LocalName != " + GetLiteral (typeMap.ElementName) + " || Reader.NamespaceURI != " + GetLiteral (typeMap.Namespace) + ")");
+ WriteLine ("throw CreateUnknownNodeException();");
+ Unindent ();
+ }
WriteLine ("return " + GetReadObjectCall (typeMap, GetLiteral(typeMap.IsNullable), "true") + ";");
}
@@ -1384,12 +1386,15 @@ namespace System.Xml.Serialization
WriteLine ("Reader.MoveToContent();");
WriteLine ("if (Reader.NodeType == System.Xml.XmlNodeType.Element) ");
WriteLineInd ("{");
- WriteLineInd ("if (Reader.LocalName == " + GetLiteral(typeMap.ElementName) + " && Reader.NamespaceURI == " + GetLiteral (typeMap.Namespace) + ")");
+ if (!typeMap.IsAny)
+ WriteLineInd ("if (Reader.LocalName == " + GetLiteral(typeMap.ElementName) + " && Reader.NamespaceURI == " + GetLiteral (typeMap.Namespace) + ")");
WriteLine ("ob = ReadReferencedElement();");
Unindent ();
- WriteLineInd ("else ");
- WriteLine ("throw CreateUnknownNodeException();");
- Unindent ();
+ if (!typeMap.IsAny) {
+ WriteLineInd ("else ");
+ WriteLine ("throw CreateUnknownNodeException();");
+ Unindent ();
+ }
WriteLineUni ("}");
WriteLineInd ("else ");
WriteLine ("UnknownNode(null);");
@@ -1489,7 +1494,7 @@ namespace System.Xml.Serialization
{
string isNullable;
if (_format == SerializationFormat.Literal) {
- WriteLine ("public " + typeMap.TypeData.CSharpFullName + " " + GetReadObjectName (typeMap) + " (bool isNullable, bool checkType)");
+ WriteLine ("public " + GetTypeFullName(typeMap.TypeData) + " " + GetReadObjectName (typeMap) + " (bool isNullable, bool checkType)");
isNullable = "isNullable";
}
else {
@@ -2466,10 +2471,14 @@ namespace System.Xml.Serialization
WriteLine ("Reader.MoveToContent ();");
WriteLine ("if (Reader.NodeType == XmlNodeType.Element)");
WriteLineInd ("{");
- WriteLine ("if (Reader.LocalName == " + GetLiteral (typeMap.ElementName) + " && Reader.NamespaceURI == " + GetLiteral (typeMap.Namespace) + ")");
+ if (!typeMap.IsAny)
+ WriteLineInd ("if (Reader.LocalName == " + GetLiteral (typeMap.ElementName) + " && Reader.NamespaceURI == " + GetLiteral (typeMap.Namespace) + ")");
WriteLine (String.Format ("\treturn ({0}) ReadSerializable (({0}) Activator.CreateInstance(typeof({0}), true));", typeMap.TypeData.CSharpFullName));
- WriteLine ("else");
- WriteLine ("\tthrow CreateUnknownNodeException ();");
+ Unindent ();
+ if (!typeMap.IsAny) {
+ WriteLine ("else");
+ WriteLine ("\tthrow CreateUnknownNodeException ();");
+ }
WriteLineUni ("}");
WriteLine ("else UnknownNode (null);");
WriteLine ("");
@@ -2659,7 +2668,7 @@ namespace System.Xml.Serialization
string GetRootTypeName ()
{
- if (_typeMap is XmlTypeMapping) return ((XmlTypeMapping)_typeMap).TypeData.CSharpFullName;
+ if (_typeMap is XmlTypeMapping) return GetTypeFullName (((XmlTypeMapping)_typeMap).TypeData);
else return "object[]";
}
@@ -2769,10 +2778,7 @@ namespace System.Xml.Serialization
string GetCast (TypeData td, string val)
{
- if (td.IsNullable && td.IsValueType)
- return "((" + td.CSharpFullName + "?) " + val + ")";
- else
- return "((" + td.CSharpFullName + ") " + val + ")";
+ return "((" + GetTypeFullName (td) + ") " + val + ")";
}
string GetCast (Type td, string val)
@@ -2782,13 +2788,20 @@ namespace System.Xml.Serialization
string GetTypeOf (TypeData td)
{
- return "typeof(" + td.CSharpFullName + ")";
+ return "typeof(" + GetTypeFullName (td) + ")";
}
string GetTypeOf (Type td)
{
return "typeof(" + ToCSharpFullName (td) + ")";
}
+
+ string GetTypeFullName (TypeData td) {
+ if (td.IsNullable && td.IsValueType)
+ return td.CSharpFullName + "?";
+
+ return td.CSharpFullName;
+ }
string GetLiteral (object ob)
{
diff --git a/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs b/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs
index 158f5f222ca..e22bb56d06a 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/TypeTranslator.cs
@@ -45,44 +45,13 @@ namespace System.Xml.Serialization
static Hashtable primitiveArrayTypes;
static Hashtable nullableTypes;
-#if TARGET_JVM
- static readonly object AppDomain_TypeTranslatorCacheLock = new object ();
- const string AppDomain_nameCacheName = "System.Xml.Serialization.TypeTranslator.nameCache";
- const string AppDomain_nullableTypesName = "System.Xml.Serialization.TypeTranslator.nullableTypes";
-
- static Hashtable AppDomain_nameCache {
- get { return GetAppDomainCache (AppDomain_nameCacheName); }
- }
-
- static Hashtable AppDomain_nullableTypes {
- get { return GetAppDomainCache (AppDomain_nullableTypesName); }
- }
-
- static Hashtable GetAppDomainCache(string name) {
- Hashtable res = (Hashtable) AppDomain.CurrentDomain.GetData (name);
-
- if (res == null) {
- lock (AppDomain_TypeTranslatorCacheLock) {
- res = (Hashtable) AppDomain.CurrentDomain.GetData (name);
- if (res == null) {
- res = Hashtable.Synchronized (new Hashtable ());
- AppDomain.CurrentDomain.SetData (name, res);
- }
- }
- }
-
- return res;
- }
-#endif
static TypeTranslator ()
{
nameCache = new Hashtable ();
primitiveArrayTypes = Hashtable.Synchronized (new Hashtable ());
-#if !TARGET_JVM
nameCache = Hashtable.Synchronized (nameCache);
-#endif
// XSD Types with direct map to CLR types
nameCache.Add (typeof (bool), new TypeData (typeof (bool), "boolean", true));
@@ -211,18 +180,10 @@ namespace System.Xml.Serialization
TypeData pt = GetTypeData (type); // beware this recursive call btw ...
if (pt != null) {
TypeData tt = (TypeData) nullableTypes [pt.XmlType];
-#if TARGET_JVM
- if (tt == null)
- tt = (TypeData) AppDomain_nullableTypes [pt.XmlType];
-#endif
if (tt == null) {
tt = new TypeData (type, pt.XmlType, false);
tt.IsNullable = true;
-#if TARGET_JVM
- AppDomain_nullableTypes [pt.XmlType] = tt;
-#else
nullableTypes [pt.XmlType] = tt;
-#endif
}
return tt;
}
@@ -232,11 +193,6 @@ namespace System.Xml.Serialization
TypeData typeData = nameCache[runtimeType] as TypeData;
if (typeData != null) return typeData;
-#if TARGET_JVM
- Hashtable dynamicCache = AppDomain_nameCache;
- typeData = dynamicCache[runtimeType] as TypeData;
- if (typeData != null) return typeData;
-#endif
string name;
if (type.IsArray) {
@@ -258,11 +214,7 @@ namespace System.Xml.Serialization
typeData = new TypeData (type, name, false);
if (nullableOverride)
typeData.IsNullable = true;
-#if TARGET_JVM
- dynamicCache[runtimeType] = typeData;
-#else
nameCache[runtimeType] = typeData;
-#endif
return typeData;
}
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs
index e61c599490b..b68d33eec94 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlMemberMapping.cs
@@ -126,7 +126,7 @@ namespace System.Xml.Serialization
{
get { return _mapMember.Name; }
}
-#if !TARGET_JVM && !NET_2_1
+#if !NET_2_1
public string GenerateTypeName (System.CodeDom.Compiler.CodeDomProvider codeProvider)
{
string ret = codeProvider.CreateValidIdentifier (_mapMember.TypeData.FullTypeName);
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
index 901e4b9988b..14afa1d0610 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs
@@ -326,21 +326,21 @@ namespace System.Xml.Serialization {
return map;
}
- XmlTypeMapping ImportClassMapping (Type type, XmlRootAttribute root, string defaultNamespace)
+ XmlTypeMapping ImportClassMapping (Type type, XmlRootAttribute root, string defaultNamespace, bool isBaseType = false)
{
TypeData typeData = TypeTranslator.GetTypeData (type);
- return ImportClassMapping (typeData, root, defaultNamespace);
+ return ImportClassMapping (typeData, root, defaultNamespace, isBaseType);
}
- XmlTypeMapping ImportClassMapping (TypeData typeData, XmlRootAttribute root, string defaultNamespace)
+ XmlTypeMapping ImportClassMapping (TypeData typeData, XmlRootAttribute root, string defaultNamespace, bool isBaseType = false)
{
Type type = typeData.Type;
+ if (!allowPrivateTypes && !isBaseType)
+ ReflectionHelper.CheckSerializableType (type, false);
+
XmlTypeMapping map = helper.GetRegisteredClrType (type, GetTypeNamespace (typeData, root, defaultNamespace));
if (map != null) return map;
-
- if (!allowPrivateTypes)
- ReflectionHelper.CheckSerializableType (type, false);
map = CreateTypeMapping (typeData, root, null, defaultNamespace);
helper.RegisterClrType (map, type, map.XmlTypeNamespace);
@@ -372,7 +372,7 @@ namespace System.Xml.Serialization {
string ns = map.XmlTypeNamespace;
if (rmember.XmlAttributes.XmlIgnore) continue;
if (rmember.DeclaringType != null && rmember.DeclaringType != type) {
- XmlTypeMapping bmap = ImportClassMapping (rmember.DeclaringType, root, defaultNamespace);
+ XmlTypeMapping bmap = ImportClassMapping (rmember.DeclaringType, root, defaultNamespace, true);
if (bmap.HasXmlTypeNamespace)
ns = bmap.XmlTypeNamespace;
}
@@ -400,7 +400,7 @@ namespace System.Xml.Serialization {
if (type.BaseType != null)
{
- XmlTypeMapping bmap = ImportClassMapping (type.BaseType, root, defaultNamespace);
+ XmlTypeMapping bmap = ImportClassMapping (type.BaseType, root, defaultNamespace, true);
ClassMap cbmap = bmap.ObjectMap as ClassMap;
if (type.BaseType != typeof (object)) {
@@ -709,16 +709,6 @@ namespace System.Xml.Serialization {
// Read all Fields via reflection.
ArrayList fieldList = new ArrayList();
FieldInfo[] tfields = type.GetFields (BindingFlags.Instance | BindingFlags.Public);
-#if TARGET_JVM
- // This statement ensures fields are ordered starting from the base type.
- for (int ti=0; ti<typeList.Count; ti++) {
- for (int i=0; i<tfields.Length; i++) {
- FieldInfo field = tfields[i];
- if (field.DeclaringType == typeList[ti])
- fieldList.Add (field);
- }
- }
-#else
currentType = null;
int currentIndex = 0;
foreach (FieldInfo field in tfields)
@@ -731,22 +721,9 @@ namespace System.Xml.Serialization {
}
fieldList.Insert(currentIndex++, field);
}
-#endif
// Read all Properties via reflection.
ArrayList propList = new ArrayList();
PropertyInfo[] tprops = type.GetProperties (BindingFlags.Instance | BindingFlags.Public);
-#if TARGET_JVM
- // This statement ensures properties are ordered starting from the base type.
- for (int ti=0; ti<typeList.Count; ti++) {
- for (int i=0; i<tprops.Length; i++) {
- PropertyInfo prop = tprops[i];
- if (!prop.CanRead) continue;
- if (prop.GetIndexParameters().Length > 0) continue;
- if (prop.DeclaringType == typeList[ti])
- propList.Add (prop);
- }
- }
-#else
currentType = null;
currentIndex = 0;
foreach (PropertyInfo prop in tprops)
@@ -761,7 +738,6 @@ namespace System.Xml.Serialization {
if (prop.GetIndexParameters().Length > 0) continue;
propList.Insert(currentIndex++, prop);
}
-#endif
var members = new List<XmlReflectionMember>();
int fieldIndex=0;
int propIndex=0;
@@ -1041,6 +1017,9 @@ namespace System.Xml.Serialization {
if (choiceEnumMap != null) {
string cname = choiceEnumMap.GetEnumName (choiceEnumType.FullName, elem.ElementName);
+ if (cname == null && elem.Namespace != null)
+ cname = choiceEnumMap.GetEnumName (choiceEnumType.FullName,
+ elem.Namespace.ToString () + ":" + elem.ElementName);
if (cname == null)
throw new InvalidOperationException (string.Format (
CultureInfo.InvariantCulture, "Type {0} is missing"
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs
index 0ea81302af1..f907453399f 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs
@@ -30,7 +30,7 @@
//
using System.Xml;
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
using System.CodeDom.Compiler;
#endif
using System.Xml.Schema;
@@ -98,7 +98,7 @@ namespace System.Xml.Serialization
this.typeIdentifiers = typeIdentifiers;
}
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
[MonoTODO]
public XmlSchemaImporter (XmlSchemas schemas, CodeGenerationOptions options, CodeDomProvider codeProvider, ImportContext context)
{
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs
index b1d06576b97..1853ad14976 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationReaderInterpreter.cs
@@ -178,7 +178,7 @@ namespace System.Xml.Serialization
}
else
{
- if (Reader.LocalName != rootMap.ElementName || Reader.NamespaceURI != rootMap.Namespace)
+ if (!rootMap.IsAny && (Reader.LocalName != rootMap.ElementName || Reader.NamespaceURI != rootMap.Namespace))
throw CreateUnknownNodeException();
return ReadObject (rootMap, rootMap.IsNullable, true);
@@ -585,6 +585,10 @@ namespace System.Xml.Serialization
void SetMemberValue (XmlTypeMapMember member, object ob, object value, bool isValueList)
{
+ var memberType = member.TypeData.Type;
+ if (value != null && !value.GetType().IsAssignableFrom (memberType))
+ value = XmlSerializationWriterInterpreter.ImplicitConvert (value, memberType);
+
if (isValueList)
((object[])ob)[member.GlobalIndex] = value;
else
@@ -835,7 +839,7 @@ namespace System.Xml.Serialization
Reader.MoveToContent ();
if (Reader.NodeType == XmlNodeType.Element)
{
- if (Reader.LocalName == typeMap.ElementName && Reader.NamespaceURI == typeMap.Namespace)
+ if (typeMap.IsAny || (Reader.LocalName == typeMap.ElementName && Reader.NamespaceURI == typeMap.Namespace))
{
object ob = CreateInstance (typeMap.TypeData.Type, true);
return ReadSerializable ((IXmlSerializable)ob);
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriter.cs
index 3cd8036884c..fc6e534988b 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriter.cs
@@ -315,6 +315,8 @@ namespace System.Xml.Serialization
if (isNullable)
WriteNullTagEncoded (name, ns);
}
+ else if (any)
+ WriteXmlNode (node);
else
{
Writer.WriteStartElement (name, ns);
@@ -335,6 +337,8 @@ namespace System.Xml.Serialization
if (isNullable)
WriteNullTagLiteral (name, ns);
}
+ else if (any)
+ WriteXmlNode (node);
else
{
Writer.WriteStartElement (name, ns);
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriterInterpreter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriterInterpreter.cs
index 27733a7299d..cf7985349eb 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriterInterpreter.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializationWriterInterpreter.cs
@@ -109,17 +109,21 @@ namespace System.Xml.Serialization
if (ob is XmlNode)
{
- if (_format == SerializationFormat.Literal) WriteElementLiteral((XmlNode)ob, "", "", true, false);
- else WriteElementEncoded((XmlNode)ob, "", "", true, false);
+ if (_format == SerializationFormat.Literal) WriteElementLiteral((XmlNode)ob, "", "", true, typeMap.IsAny);
+ else WriteElementEncoded((XmlNode)ob, "", "", true, typeMap.IsAny);
return;
}
if (typeMap.TypeData.SchemaType == SchemaTypes.XmlSerializable)
{
- WriteSerializable ((IXmlSerializable)ob, element, namesp, isNullable);
+ WriteSerializable ((IXmlSerializable)ob, element, namesp, isNullable, !typeMap.IsAny);
return;
}
+ var obExpectedType = typeMap.TypeData.Type;
+ if (!ob.GetType().IsAssignableFrom (obExpectedType))
+ ob = ImplicitConvert (ob, obExpectedType);
+
XmlTypeMapping map = typeMap.GetRealTypeMap (ob.GetType());
if (map == null)
@@ -355,20 +359,19 @@ namespace System.Xml.Serialization
}
}
- object ImplicitConvert (object obj, Type type)
+ internal static object ImplicitConvert (object obj, Type type)
{
if (obj == null)
return null;
- for (Type t = type; t != typeof (object); t = t.BaseType) {
- MethodInfo mi = t.GetMethod ("op_Implicit", new Type [] {t});
- if (mi != null && mi.ReturnType.IsAssignableFrom (obj.GetType ()))
- return mi.Invoke (null, new object [] {obj});
- }
for (Type t = obj.GetType (); t != typeof (object); t = t.BaseType) {
MethodInfo mi = t.GetMethod ("op_Implicit", new Type [] {t});
if (mi != null && mi.ReturnType == type)
return mi.Invoke (null, new object [] {obj});
+
+ mi = type.GetMethod ("op_Implicit", new Type [] {t});
+ if (mi != null && mi.ReturnType == type)
+ return mi.Invoke (null, new object [] {obj});
}
return obj;
}
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
index 719d23e98b4..474e8178375 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSerializer.cs
@@ -37,7 +37,7 @@ using System.Reflection;
using System.Xml;
using System.Xml.Schema;
using System.Text;
-#if !TARGET_JVM && !NET_2_1
+#if !NET_2_1
using System.CodeDom;
using System.CodeDom.Compiler;
using Microsoft.CSharp;
@@ -68,6 +68,7 @@ namespace System.Xml.Serialization
internal class SerializerData
{
public int UsageCount;
+ public bool Generated;
public Type ReaderType;
public MethodInfo ReaderMethod;
public Type WriterType;
@@ -120,7 +121,7 @@ namespace System.Xml.Serialization
// debugging pourposes by adding the "nofallback" option.
// For example: MONO_XMLSERIALIZER_THS=0,nofallback
-#if TARGET_JVM || NET_2_1
+#if NET_2_1
string db = null;
string th = null;
generationThreshold = -1;
@@ -145,7 +146,6 @@ namespace System.Xml.Serialization
else {
generationThreshold = int.Parse (th, CultureInfo.InvariantCulture);
backgroundGeneration = (generationThreshold != 0);
- if (generationThreshold < 1) generationThreshold = 1;
}
}
#endif
@@ -521,7 +521,7 @@ namespace System.Xml.Serialization
throw new NotImplementedException ();
}
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
public static Assembly GenerateSerializer (Type[] types, XmlMapping[] mappings)
{
return GenerateSerializer (types, mappings, null);
@@ -630,7 +630,7 @@ namespace System.Xml.Serialization
return new XmlSerializationReaderInterpreter (typeMapping);
}
-#if TARGET_JVM || NET_2_1
+#if NET_2_1
void CheckGeneratedTypes (XmlMapping typeMapping)
{
throw new NotImplementedException();
@@ -664,7 +664,10 @@ namespace System.Xml.Serialization
bool generate = false;
lock (serializerData)
{
- generate = (++serializerData.UsageCount == generationThreshold);
+ if (serializerData.UsageCount >= generationThreshold && !serializerData.Generated)
+ serializerData.Generated = generate = true;
+
+ serializerData.UsageCount++;
}
if (generate)
diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs
index 4a690af482a..533953b67f2 100644
--- a/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs
+++ b/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapping.cs
@@ -49,6 +49,7 @@ namespace System.Xml.Serialization
string documentation;
bool includeInSchema;
bool isNullable = true;
+ bool isAny;
ArrayList _derivedTypes = new ArrayList();
@@ -158,6 +159,12 @@ namespace System.Xml.Serialization
set { isNullable = value; }
}
+ internal bool IsAny
+ {
+ get { return isAny; }
+ set { isAny = value; }
+ }
+
internal XmlTypeMapping GetRealTypeMap (Type objectType)
{
if (TypeData.SchemaType == SchemaTypes.Enum)
@@ -205,6 +212,13 @@ namespace System.Xml.Serialization
XmlSchemaProviderAttribute schemaProvider = (XmlSchemaProviderAttribute) Attribute.GetCustomAttribute (typeData.Type, typeof (XmlSchemaProviderAttribute));
if (schemaProvider != null) {
+ _schemaTypeName = XmlQualifiedName.Empty;
+
+ if (schemaProvider.IsAny) {
+ IsAny = true;
+ return;
+ }
+
string method = schemaProvider.MethodName;
MethodInfo mi = typeData.Type.GetMethod (method, BindingFlags.Static | BindingFlags.Public | BindingFlags.FlattenHierarchy);
if (mi == null)
@@ -216,7 +230,6 @@ namespace System.Xml.Serialization
throw new InvalidOperationException (String.Format ("Method '{0}' indicated by XmlSchemaProviderAttribute must have its return type as XmlQualifiedName", method));
XmlSchemaSet xs = new XmlSchemaSet ();
object retVal = mi.Invoke (null, new object [] { xs });
- _schemaTypeName = XmlQualifiedName.Empty;
if (retVal == null)
return;
diff --git a/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs b/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs
index fd1c854ee3b..dbcb807c309 100644
--- a/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs
+++ b/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform.cs
@@ -47,7 +47,7 @@ namespace System.Xml.Xsl
bool enable_debug;
object debugger;
CompiledStylesheet s;
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
// TempFileCollection temporary_files;
#endif
XmlWriterSettings output_settings = new XmlWriterSettings ();
@@ -70,7 +70,7 @@ namespace System.Xml.Xsl
get { return output_settings; }
}
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
[MonoTODO]
public TempFileCollection TemporaryFiles {
get { return null; /*temporary_files;*/ }
diff --git a/mcs/class/System.XML/System.Xml.csproj b/mcs/class/System.XML/System.Xml.csproj
deleted file mode 100644
index a9ac57386aa..00000000000
--- a/mcs/class/System.XML/System.Xml.csproj
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoWarn>0618,0612,0642</NoWarn>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'basic|AnyCPU' ">
- <DefineConstants>BOOTSTRAP_BASIC,NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="System.Xml.XPath\Parser.cs"/>
- <Compile Include="Mono.Xml.Xsl\PatternParser.cs"/>
- <Compile Include="Mono.Xml.Xsl\PatternTokenizer.cs"/>
- <Reference Include="System.dll"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- <Exec Command="..\..\jay\jay.exe -ct &lt; ..\..\jay\skeleton.cs System.Xml.XPath\Parser.jay &gt; System.Xml.XPath\Parser.cs"/>
- <Copy SourceFiles="System.Xml.XPath\Parser.jay" DestinationFiles="Mono.Xml.Xsl\PatternParser.jay"/>
- <MSBuild.ExtensionPack.FileSystem.File TaskAction="Replace" RegexPattern="%start Expr" Replacement="%start Pattern" TextEncoding="Windows-1252" Files="Mono.Xml.Xsl\PatternParser.jay"/>
- <Exec Command="echo #define XSLT_PATTERN &gt; Mono.Xml.Xsl\PatternParser.cs"/>
- <Exec Command="..\..\jay\jay.exe -ct Mono.Xml.Xsl\PatternParser.jay &lt; ..\..\jay\skeleton.cs &gt;&gt; Mono.Xml.Xsl\PatternParser.cs"/>
- <Exec Command="echo #define XSLT_PATTERN &gt; Mono.Xml.Xsl\PatternTokenizer.cs"/>
- <Exec Command="type System.Xml.XPath\Tokenizer.cs &gt;&gt; Mono.Xml.Xsl\PatternTokenizer.cs"/>
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.XML/System.Xml/XmlConvert.cs b/mcs/class/System.XML/System.Xml/XmlConvert.cs
index bac049be278..28e0013590e 100644
--- a/mcs/class/System.XML/System.Xml/XmlConvert.cs
+++ b/mcs/class/System.XML/System.Xml/XmlConvert.cs
@@ -838,7 +838,6 @@ namespace System.Xml {
}
#if NET_2_0 // actually NET_3_5
-#if !TARGET_JVM
public static DateTimeOffset ToDateTimeOffset (string s)
{
@@ -867,7 +866,6 @@ namespace System.Xml {
{
return value.ToString (format, CultureInfo.InvariantCulture);
}
-#endif
// it is used only from 2.1 System.Xml.Serialization.dll from
// MS Silverlight SDK. We don't use it so far.
diff --git a/mcs/class/System.XML/System.Xml/XmlInputStream.cs b/mcs/class/System.XML/System.Xml/XmlInputStream.cs
index 457485172d3..3efa2f3d991 100644
--- a/mcs/class/System.XML/System.Xml/XmlInputStream.cs
+++ b/mcs/class/System.XML/System.Xml/XmlInputStream.cs
@@ -466,12 +466,6 @@ namespace System.Xml
}
}
}
-#if TARGET_JVM
- else {
- if (bufLength >= 10 && Encoding.Unicode.GetString (buffer, 2, 8) == "?xml")
- enc = Encoding.Unicode;
- }
-#endif
bufPos = 0;
break;
default:
diff --git a/mcs/class/System.XML/System.Xml/XmlReader.cs b/mcs/class/System.XML/System.Xml/XmlReader.cs
index bb8030264e0..a93760ee12c 100644
--- a/mcs/class/System.XML/System.Xml/XmlReader.cs
+++ b/mcs/class/System.XML/System.Xml/XmlReader.cs
@@ -494,12 +494,12 @@ namespace System.Xml
void IDisposable.Dispose()
#endif
{
- Dispose (false);
+ Dispose (true);
}
protected virtual void Dispose (bool disposing)
{
- if (ReadState != ReadState.Closed)
+ if (disposing && ReadState != ReadState.Closed)
Close ();
}
#endif
diff --git a/mcs/class/System.XML/System.Xml20.csproj b/mcs/class/System.XML/System.Xml20.csproj
deleted file mode 100755
index 1f5d3da962d..00000000000
--- a/mcs/class/System.XML/System.Xml20.csproj
+++ /dev/null
@@ -1,555 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{E2969437-970A-41A5-A621-B0027938EA16}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Xml</RootNamespace>
- <AssemblyName>System.Xml</AssemblyName>
- <JDKName>1.4.2</JDKName>
- <GHProjectType>1</GHProjectType>
- <GHProjectKind>framework</GHProjectKind>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;NET_1_1;TARGET_JVM;NET_2_0;CONFIGURATION_DEP</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <NoWarn>67,169,612,618,649,3021</NoWarn>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;NET_1_1;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;TARGET_JVM;NET_2_0;CONFIGURATION_DEP</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <NoWarn>67,169,612,618,649,3021</NoWarn>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20_Prepare|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>bin\Debug_Java20_Prepare\</OutputPath>
- <DefineConstants>TRACE;DEBUG;NET_1_1;TARGET_JVM;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <NoWarn>67,169,612,618,649,3021</NoWarn>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20_Prepare|AnyCPU' ">
- <OutputPath>bin\Release_Java20_Prepare\</OutputPath>
- <DefineConstants>TRACE;NET_1_1;TARGET_JVM;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <Optimize>true</Optimize>
- <DebugType>pdbonly</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <NoWarn>67,169,612,618,649,3021</NoWarn>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.4.2</JDKName>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="rt, Version=1.4.2.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System">
- <HintPath>..\lib\System.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System.Configuration">
- <HintPath>..\lib\System.Configuration.dll</HintPath>
- <Private>False</Private>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Assembly\Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>Assembly\MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="Mono.Xml.Schema\XmlSchemaValidatingReader.cs" />
- <Compile Include="Mono.Xml.Schema\XsdIdentityPath.cs" />
- <Compile Include="Mono.Xml.Schema\XsdIdentityState.cs" />
- <Compile Include="Mono.Xml.Schema\XsdKeyTable.cs" />
- <Compile Include="Mono.Xml.Schema\XsdParticleValidationState.cs" />
- <Compile Include="Mono.Xml.Schema\XsdValidatingReader.cs" />
- <Compile Include="Mono.Xml.Schema\XsdWildcard.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocument.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocument2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocumentBuilder.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocumentBuilder2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocumentWriter.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathDocumentWriter2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathNavigator.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathNavigator2.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathNode.cs" />
- <Compile Include="Mono.Xml.XPath\DTMXPathNode2.cs" />
- <Compile Include="Mono.Xml.XPath\IdPattern.cs" />
- <Compile Include="Mono.Xml.XPath\KeyPattern.cs" />
- <Compile Include="Mono.Xml.XPath\LocationPathPattern.cs" />
- <Compile Include="Mono.Xml.XPath\Pattern.cs" />
- <Compile Include="Mono.Xml.XPath\UnionPattern.cs" />
- <Compile Include="Mono.Xml.XPath\XPathEditableDocument.cs" />
- <Compile Include="Mono.Xml.XPath\XPathNavigatorReader.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslApplyImports.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslApplyTemplates.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslAttribute.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslAvt.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslCallTemplate.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslChoose.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslComment.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslCompiledElement.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslCopy.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslCopyOf.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslElement.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslFallback.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslForEach.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslIf.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslLiteralElement.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslMessage.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslNotSupportedOperation.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslNumber.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslOperation.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslProcessingInstruction.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslTemplateContent.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslText.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslValueOf.cs" />
- <Compile Include="Mono.Xml.Xsl.Operations\XslVariable.cs" />
- <Compile Include="Mono.Xml.Xsl\Attribute.cs" />
- <Compile Include="Mono.Xml.Xsl\Compiler.cs" />
- <Compile Include="Mono.Xml.Xsl\Debug.cs" />
- <Compile Include="Mono.Xml.Xsl\Emitter.cs" />
- <Compile Include="Mono.Xml.Xsl\GenericOutputter.cs" />
- <Compile Include="Mono.Xml.Xsl\HtmlEmitter.cs" />
- <Compile Include="Mono.Xml.Xsl\MSXslScriptManager.cs" />
- <Compile Include="Mono.Xml.Xsl\Outputter.cs" />
- <Compile Include="Mono.Xml.Xsl\PatternParser.cs" />
- <Compile Include="Mono.Xml.Xsl\PatternTokenizer.cs" />
- <Compile Include="Mono.Xml.Xsl\TextEmitter.cs" />
- <Compile Include="Mono.Xml.Xsl\TextOutputter.cs" />
- <Compile Include="Mono.Xml.Xsl\XmlWriterEmitter.cs" />
- <Compile Include="Mono.Xml.Xsl\XslAttributeSet.cs" />
- <Compile Include="Mono.Xml.Xsl\XslDecimalFormat.jvm.cs" />
- <Compile Include="Mono.Xml.Xsl\XslFunctions.cs" />
- <Compile Include="Mono.Xml.Xsl\XslKey.cs" />
- <Compile Include="Mono.Xml.Xsl\XslOutput.cs" />
- <Compile Include="Mono.Xml.Xsl\XslSortEvaluator.cs" />
- <Compile Include="Mono.Xml.Xsl\XslStylesheet.cs" />
- <Compile Include="Mono.Xml.Xsl\XsltCompiledContext.cs" />
- <Compile Include="Mono.Xml.Xsl\XslTemplate.cs" />
- <Compile Include="Mono.Xml.Xsl\XslTransformProcessor.cs" />
- <Compile Include="Mono.Xml\IHasXmlParserContext.cs" />
- <Compile Include="Mono.Xml\IHasXmlSchemaInfo.cs" />
- <Compile Include="Mono.Xml\SubtreeXmlReader.cs" />
- <Compile Include="Mono.Xml\XmlFilterReader.cs" />
- <Compile Include="Mono.Xml\XmlNodeWriter.cs" />
- <Compile Include="System.Xml.Schema\BuiltInDatatype.cs" />
- <Compile Include="System.Xml.Schema\IXmlSchemaInfo.cs" />
- <Compile Include="System.Xml.Schema\SchemaDataValueType.cs" />
- <Compile Include="System.Xml.Schema\ValidationEventArgs.cs" />
- <Compile Include="System.Xml.Schema\ValidationHandler.cs" />
- <Compile Include="System.Xml.Schema\XmlAtomicValue.cs" />
- <Compile Include="System.Xml.Schema\XmlSchema.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAll.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAnnotated.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAnnotation.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAny.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAnyAttribute.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAppInfo.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAttribute.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAttributeGroup.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaAttributeGroupRef.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaChoice.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaCollection.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaCollectionEnumerator.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaCompilationSettings.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaComplexContent.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaComplexContentExtension.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaComplexContentRestriction.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaComplexType.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaContent.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaContentModel.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaContentProcessing.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaContentType.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaDatatype.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaDatatypeVariety.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaDerivationMethod.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaDocumentation.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaElement.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaEnumerationFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaException.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaExternal.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaForm.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaFractionDigitsFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaGroup.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaGroupBase.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaGroupRef.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaIdentityConstraint.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaImport.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaInclude.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaInference.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaInferenceException.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaInfo.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaKey.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaKeyref.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaLengthFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaMaxExclusiveFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaMaxInclusiveFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaMaxLengthFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaMinExclusiveFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaMinInclusiveFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaMinLengthFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaNotation.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaNumericFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaObject.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaObjectCollection.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaObjectEnumerator.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaObjectTable.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaParticle.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaPatternFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaReader.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaRedefine.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSequence.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSerializer.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleContent.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleContentExtension.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleContentRestriction.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleType.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleTypeContent.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleTypeList.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleTypeRestriction.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSimpleTypeUnion.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaTotalDigitsFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaType.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaUnique.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaUse.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaUtil.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaValidationException.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaValidationFlags.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaValidator.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaValidity.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaWhiteSpaceFacet.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaXPath.cs" />
- <Compile Include="System.Xml.Schema\XmlSeverityType.cs" />
- <Compile Include="System.Xml.Schema\XmlTypeCode.cs" />
- <Compile Include="System.Xml.Schema\XmlValueConverter.cs" />
- <Compile Include="System.Xml.Schema\XmlValueGetter.cs" />
- <Compile Include="System.Xml.Serialization\CodeGenerationOptions.cs" />
- <Compile Include="System.Xml.Serialization\CodeIdentifier.cs" />
- <Compile Include="System.Xml.Serialization\CodeIdentifiers.cs" />
- <Compile Include="System.Xml.Serialization\ImportContext.cs" />
- <Compile Include="System.Xml.Serialization\IXmlSerializable.cs" />
- <Compile Include="System.Xml.Serialization\IXmlTextParser.cs" />
- <Compile Include="System.Xml.Serialization\ReflectionHelper.cs" />
- <Compile Include="System.Xml.Serialization\SchemaTypes.cs" />
- <Compile Include="System.Xml.Serialization\SerializationCodeGenerator.cs" />
- <Compile Include="System.Xml.Serialization\SerializationCodeGeneratorConfiguration.cs" />
- <Compile Include="System.Xml.Serialization\SerializationSource.cs" />
- <Compile Include="System.Xml.Serialization\SoapAttributeAttribute.cs" />
- <Compile Include="System.Xml.Serialization\SoapAttributeOverrides.cs" />
- <Compile Include="System.Xml.Serialization\SoapAttributes.cs" />
- <Compile Include="System.Xml.Serialization\SoapElementAttribute.cs" />
- <Compile Include="System.Xml.Serialization\SoapEnumAttribute.cs" />
- <Compile Include="System.Xml.Serialization\SoapIgnoreAttribute.cs" />
- <Compile Include="System.Xml.Serialization\SoapIncludeAttribute.cs" />
- <Compile Include="System.Xml.Serialization\SoapReflectionImporter.cs" />
- <Compile Include="System.Xml.Serialization\SoapSchemaExporter.cs" />
- <Compile Include="System.Xml.Serialization\SoapSchemaMember.cs" />
- <Compile Include="System.Xml.Serialization\SoapTypeAttribute.cs" />
- <Compile Include="System.Xml.Serialization\TypeData.cs" />
- <Compile Include="System.Xml.Serialization\TypeMember.cs" />
- <Compile Include="System.Xml.Serialization\TypeTranslator.cs" />
- <Compile Include="System.Xml.Serialization\UnreferencedObjectEventArgs.cs" />
- <Compile Include="System.Xml.Serialization\UnreferencedObjectEventHandler.cs" />
- <Compile Include="System.Xml.Serialization\XmlAnyAttributeAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlAnyElementAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlAnyElementAttributes.cs" />
- <Compile Include="System.Xml.Serialization\XmlArrayAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlArrayItemAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlArrayItemAttributes.cs" />
- <Compile Include="System.Xml.Serialization\XmlAttributeAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlAttributeEventArgs.cs" />
- <Compile Include="System.Xml.Serialization\XmlAttributeEventHandler.cs" />
- <Compile Include="System.Xml.Serialization\XmlAttributeOverrides.cs" />
- <Compile Include="System.Xml.Serialization\XmlAttributes.cs" />
- <Compile Include="System.Xml.Serialization\XmlChoiceIdentifierAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlCustomFormatter.cs" />
- <Compile Include="System.Xml.Serialization\XmlDeserializationEvents.cs" />
- <Compile Include="System.Xml.Serialization\XmlElementAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlElementAttributes.cs" />
- <Compile Include="System.Xml.Serialization\XmlElementEventArgs.cs" />
- <Compile Include="System.Xml.Serialization\XmlElementEventHandler.cs" />
- <Compile Include="System.Xml.Serialization\XmlEnumAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlIgnoreAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlIncludeAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlMapping.cs" />
- <Compile Include="System.Xml.Serialization\XmlMappingAccess.cs" />
- <Compile Include="System.Xml.Serialization\XmlMemberMapping.cs" />
- <Compile Include="System.Xml.Serialization\XmlMembersMapping.cs" />
- <Compile Include="System.Xml.Serialization\XmlNamespaceDeclarationsAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlNodeEventArgs.cs" />
- <Compile Include="System.Xml.Serialization\XmlNodeEventHandler.cs" />
- <Compile Include="System.Xml.Serialization\XmlReflectionImporter.cs" />
- <Compile Include="System.Xml.Serialization\XmlReflectionMember.cs" />
- <Compile Include="System.Xml.Serialization\XmlRootAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlSchemaEnumerator.cs" />
- <Compile Include="System.Xml.Serialization\XmlSchemaExporter.cs" />
- <Compile Include="System.Xml.Serialization\XmlSchemaProviderAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlSchemas.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationCollectionFixupCallback.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationFixupCallback.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationGeneratedCode.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationReadCallback.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationReader.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationReaderInterpreter.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationWriteCallback.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationWriter.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationWriterInterpreter.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializer.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerAssemblyAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerFactory.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerImplementation.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerNamespaces.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerVersionAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlTextAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeMapElementInfo.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeMapMember.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeMapMemberAttribute.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeMapMemberElement.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeMapMemberNamespaces.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeMapping.cs" />
- <Compile Include="System.Xml.Serialization.Configuration\DateTimeSerializationSection.cs" />
- <Compile Include="System.Xml.Serialization.Configuration\SchemaImporterExtensionElement.cs" />
- <Compile Include="System.Xml.Serialization.Configuration\SchemaImporterExtensionElementCollection.cs" />
- <Compile Include="System.Xml.Serialization.Configuration\SchemaImporterExtensionsSection.cs" />
- <Compile Include="System.Xml.Serialization.Configuration\SerializationSectionGroup.cs" />
- <Compile Include="System.Xml.Serialization.Configuration\XmlSerializerSection.cs" />
- <Compile Include="System.Xml.XPath\DefaultContext.cs" />
- <Compile Include="System.Xml.XPath\Expression.cs" />
- <Compile Include="System.Xml.XPath\Iterator.cs" />
- <Compile Include="System.Xml.XPath\IXPathNavigable.cs" />
- <Compile Include="System.Xml.XPath\Parser.cs" />
- <Compile Include="System.Xml.XPath\Tokenizer.cs" />
- <Compile Include="System.Xml.XPath\XmlCaseOrder.cs" />
- <Compile Include="System.Xml.XPath\XmlDataType.cs" />
- <Compile Include="System.Xml.XPath\XmlSortOrder.cs" />
- <Compile Include="System.Xml.XPath\XPathComparer.cs" />
- <Compile Include="System.Xml.XPath\XPathDocument.cs" />
- <Compile Include="System.Xml.XPath\XPathException.cs" />
- <Compile Include="System.Xml.XPath\XPathExpression.cs" />
- <Compile Include="System.Xml.XPath\XPathItem.cs" />
- <Compile Include="System.Xml.XPath\XPathNamespaceScope.cs" />
- <Compile Include="System.Xml.XPath\XPathNavigator.cs" />
- <Compile Include="System.Xml.XPath\XPathNodeIterator.cs" />
- <Compile Include="System.Xml.XPath\XPathNodeType.cs" />
- <Compile Include="System.Xml.XPath\XPathResultType.cs" />
- <Compile Include="System.Xml.Xsl\IXsltContextFunction.cs" />
- <Compile Include="System.Xml.Xsl\IXsltContextVariable.cs" />
- <Compile Include="System.Xml.Xsl\XslCompiledTransform.cs" />
- <Compile Include="System.Xml.Xsl\XsltArgumentList.cs" />
- <Compile Include="System.Xml.Xsl\XsltCompileException.cs" />
- <Compile Include="System.Xml.Xsl\XsltContext.cs" />
- <Compile Include="System.Xml.Xsl\XsltException.cs" />
- <Compile Include="System.Xml.Xsl\XsltMessageEncounteredEventArgs.cs" />
- <Compile Include="System.Xml.Xsl\XsltMessageEncounteredEventHandler.cs" />
- <Compile Include="System.Xml.Xsl\XslTransform.cs" />
- <Compile Include="System.Xml.Xsl\XsltSettings.cs" />
- <Compile Include="System.Xml\ConformanceLevel.cs" />
- <Compile Include="System.Xml\DTDAutomata.cs" />
- <Compile Include="System.Xml\DTDObjectModel.cs" />
- <Compile Include="System.Xml\DTDReader.cs" />
- <Compile Include="System.Xml\DTDValidatingReader2.cs" />
- <Compile Include="System.Xml\EntityHandling.cs" />
- <Compile Include="System.Xml\EntityResolvingXmlReader.cs" />
- <Compile Include="System.Xml\Formatting.cs" />
- <Compile Include="System.Xml\IHasXmlChildNode.cs" />
- <Compile Include="System.Xml\IHasXmlNode.cs" />
- <Compile Include="System.Xml\IXmlLineInfo.cs" />
- <Compile Include="System.Xml\IXmlNamespaceResolver.cs" />
- <Compile Include="System.Xml\MonoFIXAttribute.cs" />
- <Compile Include="System.Xml\NameTable.cs" />
- <Compile Include="System.Xml\NewLineHandling.cs" />
- <Compile Include="System.Xml\ReadState.cs" />
- <Compile Include="System.Xml\ValidationType.cs" />
- <Compile Include="System.Xml\WhitespaceHandling.cs" />
- <Compile Include="System.Xml\WriteState.cs" />
- <Compile Include="System.Xml\XmlAttribute.cs" />
- <Compile Include="System.Xml\XmlAttributeCollection.cs" />
- <Compile Include="System.Xml\XmlCDataSection.cs" />
- <Compile Include="System.Xml\XmlChar.cs" />
- <Compile Include="System.Xml\XmlCharacterData.cs" />
- <Compile Include="System.Xml\XmlComment.cs" />
- <Compile Include="System.Xml\XmlConstructs.cs" />
- <Compile Include="System.Xml\XmlConvert.cs" />
- <Compile Include="System.Xml\XmlDateTimeSerializationMode.cs" />
- <Compile Include="System.Xml\XmlDeclaration.cs" />
- <Compile Include="System.Xml\XmlDocument.cs" />
- <Compile Include="System.Xml\XmlDocumentFragment.cs" />
- <Compile Include="System.Xml\XmlDocumentNavigator.cs" />
- <Compile Include="System.Xml\XmlDocumentType.cs" />
- <Compile Include="System.Xml\XmlElement.cs" />
- <Compile Include="System.Xml\XmlEntity.cs" />
- <Compile Include="System.Xml\XmlEntityReference.cs" />
- <Compile Include="System.Xml\XmlException.cs" />
- <Compile Include="System.Xml\XmlImplementation.cs" />
- <Compile Include="System.Xml\XmlInputStream.cs" />
- <Compile Include="System.Xml\XmlIteratorNodeList.cs" />
- <Compile Include="System.Xml\XmlLinkedNode.cs" />
- <Compile Include="System.Xml\XmlNamedNodeMap.cs" />
- <Compile Include="System.Xml\XmlNameEntry.cs" />
- <Compile Include="System.Xml\XmlNameEntryCache.cs" />
- <Compile Include="System.Xml\XmlNamespaceManager.cs" />
- <Compile Include="System.Xml\XmlNamespaceScope.cs" />
- <Compile Include="System.Xml\XmlNameTable.cs" />
- <Compile Include="System.Xml\XmlNode.cs" />
- <Compile Include="System.Xml\XmlNodeArrayList.cs" />
- <Compile Include="System.Xml\XmlNodeChangedAction.cs" />
- <Compile Include="System.Xml\XmlNodeChangedEventArgs.cs" />
- <Compile Include="System.Xml\XmlNodeChangedEventHandler.cs" />
- <Compile Include="System.Xml\XmlNodeList.cs" />
- <Compile Include="System.Xml\XmlNodeListChildren.cs" />
- <Compile Include="System.Xml\XmlNodeOrder.cs" />
- <Compile Include="System.Xml\XmlNodeReader2.cs" />
- <Compile Include="System.Xml\XmlNodeReaderImpl.cs" />
- <Compile Include="System.Xml\XmlNodeType.cs" />
- <Compile Include="System.Xml\XmlNotation.cs" />
- <Compile Include="System.Xml\XmlOutputMethod.cs" />
- <Compile Include="System.Xml\XmlParserContext.cs" />
- <Compile Include="System.Xml\XmlParserInput.cs" />
- <Compile Include="System.Xml\XmlProcessingInstruction.cs" />
- <Compile Include="System.Xml\XmlQualifiedName.cs" />
- <Compile Include="System.Xml\XmlReader.cs" />
- <Compile Include="System.Xml\XmlReaderBinarySupport.cs" />
- <Compile Include="System.Xml\XmlReaderSettings.cs" />
- <Compile Include="System.Xml\XmlResolver.cs" />
- <Compile Include="System.Xml\XmlSecureResolver.cs" />
- <Compile Include="System.Xml\XmlSignificantWhitespace.cs" />
- <Compile Include="System.Xml\XmlSpace.cs" />
- <Compile Include="System.Xml\XmlText.cs" />
- <Compile Include="System.Xml\XmlTextReader2.cs" />
- <Compile Include="System.Xml\XmlTextWriter2.cs" />
- <Compile Include="System.Xml\XmlTokenizedType.cs" />
- <Compile Include="System.Xml\XmlUrlResolver.cs" />
- <Compile Include="System.Xml\XmlValidatingReader.cs" />
- <Compile Include="System.Xml\XmlWhitespace.cs" />
- <Compile Include="System.Xml\XmlWriter.cs" />
- <Compile Include="System.Xml\XmlWriterSettings.cs" />
- <Compile Include="System.Xml\XQueryConvert.cs" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Assembly\Consts.cs.in</Link>
- </Compile>
- <Compile Include="Mono.Xml.Xsl\XsltDebuggerWrapper.cs" />
- <Compile Include="System.Xml\XmlTextReader.cs">
- <SubType>Code</SubType>
- </Compile>
- <None Include="Mono.Xml.Xsl\PatternParser.jay" />
- <None Include="System.Xml.XPath\Parser.jay" />
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.4.2" REFS-JarPath-system="..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" />
- </VisualStudio>
- </ProjectExtensions>
- <PropertyGroup>
- <PreBuildEvent>$(ProjectDir)\jay.bat $(ProjectDir)</PreBuildEvent>
- </PropertyGroup>
-</Project>
diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/ComplexDataStructure.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/ComplexDataStructure.cs
index a69c1045b76..e05a22d7e91 100644
--- a/mcs/class/System.XML/Test/System.Xml.Serialization/ComplexDataStructure.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Serialization/ComplexDataStructure.cs
@@ -23,9 +23,6 @@ namespace MonoTests.System.XmlSerialization
{
[Test]
[NUnit.Framework.Category("NotDotNet")] // FDBK50639
-#if TARGET_JVM
- [Ignore ("JVM returns fields in different order")]
-#endif
public void WriteLiteral ()
{
Test data = BuildTestObject ();
diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs
index 3fe094b3901..0b6e112b724 100644
--- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs
@@ -2303,6 +2303,53 @@ namespace MonoTests.System.XmlSerialization
"Novell bug #594490 (https://bugzilla.novell.com/show_bug.cgi?id=594490) not fixed.");
}
}
+
+ /*
+ * The following code was generated from Microsoft's xsd.exe with the /classes switch.
+ * It only includes the relevent details but was based on the following namespaces:
+ * urn:oasis:names:tc:SAML:2.0:protocol
+ * urn:oasis:names:tc:SAML:2.0:assertion
+ * http://www.w3.org/2000/09/xmldsig#
+ * http://www.w3.org/2001/04/xmlenc
+ */
+
+ [XmlTypeAttribute (Namespace = "urn:oasis:names:tc:SAML:2.0:protocol")]
+ [XmlRootAttribute ("RequestedAuthnContext", Namespace = "urn:oasis:names:tc:SAML:2.0:protocol", IsNullable = false)]
+ public class RequestedAuthnContext
+ {
+ string[] items;
+ ItemsChoice7[] itemsElementName;
+
+ [XmlElementAttribute ("AuthnContextClassRef", typeof (string), Namespace = "urn:oasis:names:tc:SAML:2.0:assertion", DataType = "anyURI")]
+ [XmlElementAttribute ("AuthnContextDeclRef", typeof (string), Namespace = "urn:oasis:names:tc:SAML:2.0:assertion", DataType = "anyURI")]
+ [XmlChoiceIdentifierAttribute ("ItemsElementName")]
+ public string[] Items {
+ get { return this.items; }
+ set { this.items = value; }
+ }
+
+ [XmlElementAttribute ("ItemsElementName")]
+ [XmlIgnoreAttribute ()]
+ public ItemsChoice7[] ItemsElementName {
+ get { return this.itemsElementName; }
+ set { this.itemsElementName = value; }
+ }
+ }
+
+ [XmlTypeAttribute (Namespace = "urn:oasis:names:tc:SAML:2.0:protocol", IncludeInSchema = false)]
+ public enum ItemsChoice7 {
+ [XmlEnumAttribute ("urn:oasis:names:tc:SAML:2.0:assertion:AuthnContextClassRef")]
+ AuthnContextClassRef,
+ [XmlEnumAttribute ("urn:oasis:names:tc:SAML:2.0:assertion:AuthnContextDeclRef")]
+ AuthnContextDeclRef,
+ }
+ // End snippet from xsd.exe
+
+ [Test]
+ public void FullyQualifiedName_XmlEnumAttribute ()
+ {
+ var serializer = new XmlSerializer (typeof (RequestedAuthnContext));
+ }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs
index 62b3698c837..d486b3bcea8 100644
--- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs
@@ -1117,5 +1117,48 @@ namespace MonoTests.System.Xml.TestClasses
[XmlElement ("Extra", Order=1)]
public string[] Extra;
}
+
+ public class SimpleObjectA
+ {
+ [XmlAttribute]
+ public string Text
+ {
+ get; set;
+ }
+
+ public static implicit operator SimpleObjectA (SimpleObjectB o)
+ {
+ return new SimpleObjectA { Text = o.Text };
+ }
+
+ public static implicit operator SimpleObjectB (SimpleObjectA o)
+ {
+ return new SimpleObjectB { Text = o.Text };
+ }
+ }
+
+ public class SimpleObjectB
+ {
+ [XmlAttribute]
+ public string Text
+ {
+ get; set;
+ }
+ }
+
+ public class ObjectWithElementRequiringImplicitCast
+ {
+ public ObjectWithElementRequiringImplicitCast () { }
+ public ObjectWithElementRequiringImplicitCast (string text)
+ {
+ Object = new SimpleObjectB { Text = text };
+ }
+
+ [XmlElement(Type = typeof (SimpleObjectA))]
+ public SimpleObjectB Object
+ {
+ get; set;
+ }
+ }
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
index e9a161c6e3f..28f6827c9b6 100644
--- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs
@@ -34,6 +34,7 @@ using System.Xml;
using System.Data;
using System.Xml.Schema;
using System.Xml.Serialization;
+using System.Reflection;
#if NET_2_0
using System.Collections.Generic;
#endif
@@ -861,9 +862,6 @@ namespace MonoTests.System.XmlSerialization
}
[Test]
-#if TARGET_JVM
- [Ignore ("JVM returns fields in different order")]
-#endif
public void TestSerializeGroup ()
{
Group myGroup = new Group ();
@@ -2196,7 +2194,7 @@ namespace MonoTests.System.XmlSerialization
ser.Deserialize (new XmlTextReader (xml, XmlNodeType.Document, null));
}
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
[Test]
public void GenerateSerializerGenerics ()
{
@@ -3223,5 +3221,182 @@ namespace MonoTests.System.XmlSerialization
SoapReflectionImporter importer = new SoapReflectionImporter (ao, defaultNamespace);
return importer.ImportTypeMapping (type);
}
+
+ [XmlSchemaProvider (null, IsAny = true)]
+ public class AnySchemaProviderClass : IXmlSerializable {
+
+ public string Text;
+
+ void IXmlSerializable.WriteXml (XmlWriter writer)
+ {
+ writer.WriteElementString ("text", Text);
+ }
+
+ void IXmlSerializable.ReadXml (XmlReader reader)
+ {
+ Text = reader.ReadElementString ("text");
+ }
+
+ XmlSchema IXmlSerializable.GetSchema ()
+ {
+ return null;
+ }
+ }
+
+ [Test]
+ public void SerializeAnySchemaProvider ()
+ {
+ string expected = "<?xml version=\"1.0\" encoding=\"utf-16\"?>" +
+ Environment.NewLine + "<text>test</text>";
+
+ var ser = new XmlSerializer (typeof (AnySchemaProviderClass));
+
+ var obj = new AnySchemaProviderClass {
+ Text = "test",
+ };
+
+ using (var t = new StringWriter ()) {
+ ser.Serialize (t, obj);
+ Assert.AreEqual (expected, t.ToString ());
+ }
+ }
+
+ [Test]
+ public void DeserializeAnySchemaProvider ()
+ {
+ string expected = "<?xml version=\"1.0\" encoding=\"utf-16\"?>" +
+ Environment.NewLine + "<text>test</text>";
+
+ var ser = new XmlSerializer (typeof (AnySchemaProviderClass));
+
+ using (var t = new StringReader (expected)) {
+ var obj = (AnySchemaProviderClass) ser.Deserialize (t);
+ Assert.AreEqual ("test", obj.Text);
+ }
+ }
+
+ public class SubNoParameterlessConstructor : NoParameterlessConstructor
+ {
+ public SubNoParameterlessConstructor ()
+ : base ("")
+ {
+ }
+ }
+
+ public class NoParameterlessConstructor
+ {
+ [XmlElement ("Text")]
+ public string Text;
+
+ public NoParameterlessConstructor (string parameter)
+ {
+ }
+ }
+
+ [Test]
+ public void BaseClassWithoutParameterlessConstructor ()
+ {
+ var ser = new XmlSerializer (typeof (SubNoParameterlessConstructor));
+
+ var obj = new SubNoParameterlessConstructor {
+ Text = "test",
+ };
+
+ using (var w = new StringWriter ()) {
+ ser.Serialize (w, obj);
+ using (var r = new StringReader ( w.ToString ())) {
+ var desObj = (SubNoParameterlessConstructor) ser.Deserialize (r);
+ Assert.AreEqual (obj.Text, desObj.Text);
+ }
+ }
+ }
+
+ public class ClassWithXmlAnyElement
+ {
+ [XmlAnyElement ("Contents")]
+ public XmlNode Contents;
+ }
+
+ [Test] // bug #3211
+ public void TestClassWithXmlAnyElement ()
+ {
+ var d = new XmlDocument ();
+ var e = d.CreateElement ("Contents");
+ e.AppendChild (d.CreateElement ("SomeElement"));
+
+ var c = new ClassWithXmlAnyElement {
+ Contents = e,
+ };
+
+ var ser = new XmlSerializer (typeof (ClassWithXmlAnyElement));
+ using (var sw = new StringWriter ())
+ ser.Serialize (sw, c);
+ }
+
+ [Test]
+ public void ClassWithImplicitlyConvertibleElement ()
+ {
+ var ser = new XmlSerializer (typeof (ObjectWithElementRequiringImplicitCast));
+
+ var obj = new ObjectWithElementRequiringImplicitCast ("test");
+
+ using (var w = new StringWriter ()) {
+ ser.Serialize (w, obj);
+ using (var r = new StringReader ( w.ToString ())) {
+ var desObj = (ObjectWithElementRequiringImplicitCast) ser.Deserialize (r);
+ Assert.AreEqual (obj.Object.Text, desObj.Object.Text);
+ }
+ }
+ }
+ }
+
+ // Test generated serialization code.
+ public class XmlSerializerGeneratorTests : XmlSerializerTests {
+
+ private FieldInfo backgroundGeneration;
+ private FieldInfo generationThreshold;
+ private FieldInfo generatorFallback;
+
+ private bool backgroundGenerationOld;
+ private int generationThresholdOld;
+ private bool generatorFallbackOld;
+
+ [SetUp]
+ public void SetUp ()
+ {
+ // Make sure XmlSerializer static constructor is called
+ XmlSerializer.FromTypes (new Type [] {});
+
+ const BindingFlags binding = BindingFlags.Static | BindingFlags.NonPublic;
+ backgroundGeneration = typeof (XmlSerializer).GetField ("backgroundGeneration", binding);
+ generationThreshold = typeof (XmlSerializer).GetField ("generationThreshold", binding);
+ generatorFallback = typeof (XmlSerializer).GetField ("generatorFallback", binding);
+
+ if (backgroundGeneration == null)
+ Assert.Ignore ("Unable to access field backgroundGeneration");
+ if (generationThreshold == null)
+ Assert.Ignore ("Unable to access field generationThreshold");
+ if (generatorFallback == null)
+ Assert.Ignore ("Unable to access field generatorFallback");
+
+ backgroundGenerationOld = (bool) backgroundGeneration.GetValue (null);
+ generationThresholdOld = (int) generationThreshold.GetValue (null);
+ generatorFallbackOld = (bool) generatorFallback.GetValue (null);
+
+ backgroundGeneration.SetValue (null, false);
+ generationThreshold.SetValue (null, 0);
+ generatorFallback.SetValue (null, false);
+ }
+
+ [TearDown]
+ public void TearDown ()
+ {
+ if (backgroundGeneration == null || generationThreshold == null || generatorFallback == null)
+ return;
+
+ backgroundGeneration.SetValue (null, backgroundGenerationOld);
+ generationThreshold.SetValue (null, generationThresholdOld);
+ generatorFallback.SetValue (null, generatorFallbackOld);
+ }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Test20.csproj b/mcs/class/System.XML/Test/System.Xml.Test20.csproj
deleted file mode 100755
index 0c68cea2720..00000000000
--- a/mcs/class/System.XML/Test/System.Xml.Test20.csproj
+++ /dev/null
@@ -1,197 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{11664246-C466-4600-ADC9-8ED9F0FE4AD2}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Xml.Test</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <RootNamespace>System.Xml.Test20</RootNamespace>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>DEBUG;TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>True</SkipValidation>
- <KeepIntermediate>False</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System">
- <HintPath>..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll</HintPath>
- </Reference>
- <Reference Include="System.Data">
- <HintPath>..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll</HintPath>
- </Reference>
- <Reference Include="System.Xml">
- <HintPath>..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="System.Xml.Schema\XmlSchemaAssertion.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaBuiltInDatatypeTests.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaCollectionTests.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaDatatypeTests.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaExceptionCas.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaLengthFacetTests.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaSetTests.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaTests.cs" />
- <Compile Include="System.Xml.Schema\XmlSchemaTypeTests.cs" />
- <Compile Include="System.Xml.Serialization\CodeIdentifiersTests.cs" />
- <Compile Include="System.Xml.Serialization\ComplexDataStructure.cs" />
- <Compile Include="System.Xml.Serialization\DeserializeTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapAttributeAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapAttributesTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapElementAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapEnumAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapIncludeAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapReflectionImporterTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapSchemaExporterTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapSchemaMemberTests.cs" />
- <Compile Include="System.Xml.Serialization\SoapTypeAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlAnyElementAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlArrayAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlArrayItemAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlAttributeAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlAttributesTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlChoiceIdentifierAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlElementAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlEnumAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlIncludeAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlReflectionImporterTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlRootAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlSchemaExporterTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationReaderTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializationWriterTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerImplementationTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerTestClasses.cs" />
- <Compile Include="System.Xml.Serialization\XmlSerializerTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlTextAttributeTests.cs" />
- <Compile Include="System.Xml.Serialization\XmlTypeAttributeTests.cs" />
- <Compile Include="System.Xml.XPath\SelectNodesTests.cs" />
- <Compile Include="System.Xml.XPath\XPathEditableNavigatorTests.cs" />
- <Compile Include="System.Xml.XPath\XPathNavigatorCommonTests.cs" />
- <Compile Include="System.Xml.XPath\XPathNavigatorEvaluateTests.cs" />
- <Compile Include="System.Xml.XPath\XPathNavigatorMatchesTests.cs" />
- <Compile Include="System.Xml.XPath\XPathNavigatorReaderTests.cs" />
- <Compile Include="System.Xml.XPath\XPathNavigatorTests.cs" />
- <Compile Include="System.Xml.Xsl\XsltExceptionTests.cs" />
- <Compile Include="System.Xml.Xsl\XslTransformTests.cs" />
- <Compile Include="System.Xml\NameTableTests.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\Attr\Attr.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\CharacterData\CharacterData.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\Comment\Comment.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\Document\Document.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\DOMImplementation\DOMImplementation.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\Element\Element.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\NamedNodeMap\NamedNodeMap.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\NodeList\NodeList.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\Node\Node.cs" />
- <Compile Include="System.Xml\nist_dom\fundamental\Text\Text.cs" />
- <Compile Include="System.Xml\nist_dom\ITest.cs">
- <SubType>Code</SubType>
- </Compile>
- <Compile Include="System.Xml\nist_dom\util.cs" />
- <Compile Include="System.Xml\XmlAssert.cs" />
- <Compile Include="System.Xml\XmlAttributeCollectionTests.cs" />
- <Compile Include="System.Xml\XmlAttributeTests.cs" />
- <Compile Include="System.Xml\XmlCDataSectionTests.cs" />
- <Compile Include="System.Xml\XmlCharacterDataTests.cs" />
- <Compile Include="System.Xml\XmlCharTests.cs" />
- <Compile Include="System.Xml\XmlCommentTests.cs" />
- <Compile Include="System.Xml\XmlConvertTests.cs" />
- <Compile Include="System.Xml\XmlDeclarationTests.cs" />
- <Compile Include="System.Xml\XmlDefaultReader.cs" />
- <Compile Include="System.Xml\XmlDocumentEventTests.cs" />
- <Compile Include="System.Xml\XmlDocumentFragmentTests.cs" />
- <Compile Include="System.Xml\XmlDocumentTests.cs" />
- <Compile Include="System.Xml\XmlDocumentTypeTests.cs" />
- <Compile Include="System.Xml\XmlElementTests.cs" />
- <Compile Include="System.Xml\XmlEntityReferenceTests.cs" />
- <Compile Include="System.Xml\XmlEntityTests.cs" />
- <Compile Include="System.Xml\XmlNamespaceManagerTests.cs" />
- <Compile Include="System.Xml\XmlNodeListTests.cs" />
- <Compile Include="System.Xml\XmlNodeReaderTests.cs" />
- <Compile Include="System.Xml\XmlNodeTests.cs" />
- <Compile Include="System.Xml\XmlProcessingInstructionTests.cs" />
- <Compile Include="System.Xml\XmlReaderCommonTests.cs" />
- <Compile Include="System.Xml\XmlReaderSettingsTests.cs" />
- <Compile Include="System.Xml\XmlSignificantWhitespaceTests.cs" />
- <Compile Include="System.Xml\XmlTextReaderTests.cs" />
- <Compile Include="System.Xml\XmlTextTests.cs" />
- <Compile Include="System.Xml\XmlTextWriterTests.cs" />
- <Compile Include="System.Xml\XmlUrlResolverTests.cs" />
- <Compile Include="System.Xml\XmlValidatingReaderTests.cs" />
- <Compile Include="System.Xml\XmlWhiteSpaceTests.cs" />
- <Compile Include="System.Xml\XmlWriterSettingsTests.cs" />
- <Compile Include="System.Xml\XmlWriterTests.cs" />
- <Compile Include="System.Xml\XsdParticleValidationTests.cs" />
- <Compile Include="System.Xml\XsdValidatingReaderTests.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj">
- <Project>{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}</Project>
- <Name>nunit.framework.dll20.J2EE</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-mscorlib="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\mscorlib.jar" REFS-JarPath-system="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.jar" REFS-JarPath-system-data="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.Data.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\java_refs\framework\System.Xml.jar" REFS-JarPath-rt="..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE V2\jre5\lib\rt.jar" />
- </VisualStudio>
- </ProjectExtensions>
-</Project>
diff --git a/mcs/class/System.XML/Test/System.Xml.Test20.sln b/mcs/class/System.XML/Test/System.Xml.Test20.sln
deleted file mode 100755
index 2f2c2497e6a..00000000000
--- a/mcs/class/System.XML/Test/System.Xml.Test20.sln
+++ /dev/null
@@ -1,36 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "System.Xml.Test20", "System.Xml.Test20.csproj", "{11664246-C466-4600-ADC9-8ED9F0FE4AD2}"
-EndProject
-Project("{83B010C7-76FC-4FAD-A26C-00D7EFE60256}") = "nunit.framework.dll20.J2EE", "..\..\..\nunit20\framework\nunit.framework.dll20.J2EE.csproj", "{ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Release_Java20|Any CPU.ActiveCfg = Release_Java|Any CPU
- {11664246-C466-4600-ADC9-8ED9F0FE4AD2}.Release_Java20|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.ActiveCfg = Release_Java20|Any CPU
- {ACDA29DB-62AB-4AF8-8862-B3B4FC755BBC}.Release_Java20|Any CPU.Build.0 = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs
index 284f213e6d7..9f129614328 100644
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs
@@ -108,5 +108,38 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
t.Transform (new XPathDocument (new XmlTextReader (new StringReader ("<root attr='D'><foo attr='A'/><foo attr='B'/><foo attr='C'/></root>"))), null, sw);
Assert.AreEqual ("<?xml version=\"1.0\" encoding=\"utf-16\"?><root><bar>D</bar><baz>foo: A,foo: B,foo: C</baz></root>", sw.ToString ());
}
+
+ [Test]
+ public void ElementToAttribute ()
+ {
+ var xsl = @"<?xml version='1.0' encoding='utf-8'?>
+<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
+ <xsl:output method='xml'/>
+ <xsl:template match='/'>
+ <Node>
+ <xsl:attribute name='name'>
+ <xsl:call-template name='makeName'>
+ <xsl:with-param name='Name' select='Node/Name' />
+ </xsl:call-template>
+ </xsl:attribute>
+ </Node>
+ </xsl:template>
+
+ <xsl:template name='makeName'>
+ <xsl:param name='Name' />
+ <xsl:value-of select='$Name' />
+ </xsl:template>
+</xsl:stylesheet>";
+
+ var t = new XslCompiledTransform ();
+ t.Load (new XmlTextReader (new StringReader (xsl)));
+
+ var source = "<?xml version='1.0' encoding='utf-8' ?><Node><Name>123</Name></Node>";
+ var expected = "<?xml version=\"1.0\" encoding=\"utf-16\"?><Node name=\"123\" />";
+
+ StringWriter sw = new StringWriter ();
+ t.Transform (new XPathDocument (new XmlTextReader (new StringReader (source))), null, sw);
+ Assert.AreEqual (expected, sw.ToString ());
+ }
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs
index a1b678c6186..d82db8f554e 100644
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs
@@ -47,10 +47,8 @@ namespace MonoCasTests.System.Xml.Xsl {
Assert.IsNull (xsltException.SourceUri, "#4");
Assert.IsNull (xsltException.InnerException, "#5");
Assert.IsNull (xsltException.Source, "#6");
-#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#7");
Assert.IsNull (xsltException.TargetSite, "#8");
-#endif
}
[Test]
@@ -65,10 +63,8 @@ namespace MonoCasTests.System.Xml.Xsl {
Assert.IsNull (xsltException.SourceUri, "#4");
Assert.IsNull (xsltException.InnerException, "#5");
Assert.IsNull (xsltException.Source, "#6");
-#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#7");
Assert.IsNull (xsltException.TargetSite, "#8");
-#endif
}
#endif
@@ -85,10 +81,8 @@ namespace MonoCasTests.System.Xml.Xsl {
Assert.IsNull (xsltException.SourceUri, "#A4");
Assert.AreSame (cause, xsltException.InnerException, "#A5");
Assert.IsNull (xsltException.Source, "#A6");
-#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#A7");
Assert.IsNull (xsltException.TargetSite, "#A8");
-#endif
xsltException = new XsltException ((string) null, cause);
Assert.AreEqual (0, xsltException.LineNumber, "#B1");
Assert.AreEqual (0, xsltException.LinePosition, "#B2");
@@ -97,10 +91,8 @@ namespace MonoCasTests.System.Xml.Xsl {
Assert.IsNull (xsltException.SourceUri, "#B5");
Assert.AreSame (cause, xsltException.InnerException, "#B6");
Assert.IsNull (xsltException.Source, "#B7");
-#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#B8");
Assert.IsNull (xsltException.TargetSite, "#B9");
-#endif
xsltException = new XsltException (msg, (Exception) null);
Assert.AreEqual (0, xsltException.LineNumber, "#C1");
Assert.AreEqual (0, xsltException.LinePosition, "#C2");
@@ -108,10 +100,8 @@ namespace MonoCasTests.System.Xml.Xsl {
Assert.IsNull (xsltException.SourceUri, "#C4");
Assert.IsNull (xsltException.InnerException, "#C5");
Assert.IsNull (xsltException.Source, "#C6");
-#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#C7");
Assert.IsNull (xsltException.TargetSite, "#C8");
-#endif
xsltException = new XsltException ((string) null, (Exception) null);
Assert.AreEqual (0, xsltException.LineNumber, "#D1");
Assert.AreEqual (0, xsltException.LinePosition, "#D2");
@@ -119,10 +109,8 @@ namespace MonoCasTests.System.Xml.Xsl {
Assert.IsNull (xsltException.SourceUri, "#D4");
Assert.IsNull (xsltException.InnerException, "#D5");
Assert.IsNull (xsltException.Source, "#D6");
-#if !TARGET_JVM
Assert.IsNull (xsltException.StackTrace, "#D7");
Assert.IsNull (xsltException.TargetSite, "#D8");
-#endif
}
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/README.j2ee b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/README.j2ee
deleted file mode 100755
index 29e6a9ba613..00000000000
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/README.j2ee
+++ /dev/null
@@ -1,13 +0,0 @@
-To build and run this testsuite following steps are neccessary:
-
-1) Build nunit.core, framework, util and nunit-console
-2) Copy jars from step 2. to java_refs
-3) Edit java_refs/settings.xml to include core, framework and util, for example:
- <package readonly="true"
- identity="nunit.core"
- dllname="C:\views\DevQA\studio\GH\DevQA\tests\utils\nunit\nunit-2.2.0\nunit-console\bin\Debug_Java\nunit.core.dll">
- <jar>nunit.core.jar</jar>
- </package>
-4) Build W3 solution
-5) Edit run-test.j2ee.bat to refer correct path to java_refs
-6) Run bat
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/run-test.j2ee.bat b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/run-test.j2ee.bat
deleted file mode 100755
index f2f25db03cd..00000000000
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/run-test.j2ee.bat
+++ /dev/null
@@ -1,3 +0,0 @@
-set JGAC_PATH=c:\Program Files\Mainsoft\Visual MainWin for J2EE\java_refs\framework\
-java -cp "%JGAC_PATH%mscorlib.jar;%JGAC_PATH%System.jar;%JGAC_PATH%System.Xml.jar;%JGAC_PATH%nunit.core.jar;%JGAC_PATH%nunit.framework.jar;%JGAC_PATH%nunit.util.jar;%JGAC_PATH%J2SE.Helpers.jar;xslt.jar;nunit-console.jar" NUnit.Console.ConsoleUi xslt.jar /fixture:MonoTests.oasis_xslt.SuiteBuilder /xml=TestResult.xml /include=KnownFailures
-
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.csproj b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.csproj
deleted file mode 100644
index 22b3f2a53b6..00000000000
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.csproj
+++ /dev/null
@@ -1,106 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{52564015-7939-46EF-B930-BB017FB6D26A}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>xslt</RootNamespace>
- <AssemblyName>xslt</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <jarserver>iap2</jarserver>
- <StartupObject>
- </StartupObject>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>.\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>.\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_2_0;NET_1_1</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <jarserver>iap2</jarserver>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-nunit-framework="..\..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.framework.jar" REFS-JarPath-nunit-core="..\..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.core.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-rt="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="nunit.core, Version=0.0.0.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.core.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="nunit.framework, Version=0.0.0.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="XmlCompare.cs" />
- <Compile Include="xslttest.cs" />
- <Compile Include="XsltTestUtils.cs" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.sln b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.sln
deleted file mode 100644
index 880a6637f17..00000000000
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslt20.J2EE.sln
+++ /dev/null
@@ -1,31 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xslt20.J2EE", "xslt20.J2EE.csproj", "{52564015-7939-46EF-B930-BB017FB6D26A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Debug|Any CPU = Debug|Any CPU
- Debug-Strong|Any CPU = Debug-Strong|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug_Java|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug_Java|Any CPU.Build.0 = Debug_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug|Any CPU.Build.0 = Debug_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug-Strong|Any CPU.ActiveCfg = Debug_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Debug-Strong|Any CPU.Build.0 = Debug_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Release|Any CPU.ActiveCfg = Release_Java|Any CPU
- {52564015-7939-46EF-B930-BB017FB6D26A}.Release|Any CPU.Build.0 = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs
index 0761338aef3..b1b6f6e45a0 100644
--- a/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs
+++ b/mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests/xslttest.cs
@@ -26,11 +26,7 @@ namespace MonoTests.oasis_xslt {
string exceptionsFilename = Path.Combine (EnvOptions.OutputDir, "res-exceptions.lst");
Helpers.ReadStrings (skipTargets, "ignore.lst");
-#if TARGET_JVM
- Helpers.ReadStrings (knownFailures, "knownFailures.jvm.lst");
-#else
Helpers.ReadStrings (knownFailures, "knownFailures.lst");
-#endif
Helpers.ReadStrings (fixmeList, "fixme.lst");
ArrayList exceptionsArray = new ArrayList();
Helpers.ReadStrings (exceptionsArray, exceptionsFilename);
diff --git a/mcs/class/System.XML/Test/System.Xml/W3C/README.j2ee b/mcs/class/System.XML/Test/System.Xml/W3C/README.j2ee
deleted file mode 100644
index 29e6a9ba613..00000000000
--- a/mcs/class/System.XML/Test/System.Xml/W3C/README.j2ee
+++ /dev/null
@@ -1,13 +0,0 @@
-To build and run this testsuite following steps are neccessary:
-
-1) Build nunit.core, framework, util and nunit-console
-2) Copy jars from step 2. to java_refs
-3) Edit java_refs/settings.xml to include core, framework and util, for example:
- <package readonly="true"
- identity="nunit.core"
- dllname="C:\views\DevQA\studio\GH\DevQA\tests\utils\nunit\nunit-2.2.0\nunit-console\bin\Debug_Java\nunit.core.dll">
- <jar>nunit.core.jar</jar>
- </package>
-4) Build W3 solution
-5) Edit run-test.j2ee.bat to refer correct path to java_refs
-6) Run bat
diff --git a/mcs/class/System.XML/Test/System.Xml/W3C/W3C.J2EE.csproj b/mcs/class/System.XML/Test/System.Xml/W3C/W3C.J2EE.csproj
deleted file mode 100644
index 297c0eb443d..00000000000
--- a/mcs/class/System.XML/Test/System.Xml/W3C/W3C.J2EE.csproj
+++ /dev/null
@@ -1,79 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{9DCE5474-B890-4237-ADAF-4C1375D1FA3A}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>W3C</RootNamespace>
- <AssemblyName>W3C</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <jarserver>iap2</jarserver>
- <StartupObject>
- </StartupObject>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <NoStdLib>false</NoStdLib>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <NoStdLib>true</NoStdLib>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-nunit-framework="..\..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.framework.jar" REFS-JarPath-nunit-core="..\..\..\..\..\nunit20\core\bin\Debug_Java20\nunit.core.jar" REFS-JarPath-mscorlib="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-system="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-system-xml="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-rt="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="nunit.core, Version=2.3.6162.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
- <Reference Include="nunit.framework, Version=2.3.6162.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL" />
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\jre5\rt.dll</HintPath>
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.XML" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="xmlconf.cs" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.csproj b/mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.csproj
deleted file mode 100644
index 41d4084d0c8..00000000000
--- a/mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.csproj
+++ /dev/null
@@ -1,104 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>W3C</RootNamespace>
- <AssemblyName>W3C</AssemblyName>
- <JDKName>1.5.0_05</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <jarserver>iap2</jarserver>
- <StartupObject>
- </StartupObject>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;ONLY_1_1</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- <AdditionalClassPath>
- </AdditionalClassPath>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>.\</OutputPath>
- <DefineConstants>TRACE;DEBUG;TARGET_JVM;NET_1_1;NET_2_0</DefineConstants>
- <BaseAddress>285212672</BaseAddress>
- <DebugType>full</DebugType>
- <PlatformTarget>AnyCPU</PlatformTarget>
- <ErrorReport>prompt</ErrorReport>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <GHProjectType>1</GHProjectType>
- <PreCompile>false</PreCompile>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <ApplicationServerType>
- </ApplicationServerType>
- <Version>2.0</Version>
- <JDKName>1.5.0_05</JDKName>
- <jarserver>iap2</jarserver>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system-xml="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.Xml.jar" REFS-JarPath-system="..\..\..\..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\System.jar" REFS-JarPath-mscorlib="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\java_refs\framework\mscorlib.jar" REFS-JarPath-rt="..\..\..\..\..\Program Files\Mainsoft\Visual MainWin for J2EE 2\jre5\lib\rt.jar" REFS-JarPath-nunit-core="..\..\..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.core.jar" REFS-JarPath-nunit-framework="..\..\..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.framework.jar" />
- </VisualStudio>
- </ProjectExtensions>
- <ItemGroup>
- <Reference Include="nunit.core, Version=0.0.0.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.core.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="nunit.framework, Version=0.0.0.0, Culture=neutral">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\..\..\nunit20\nunit-console\bin\Debug_Java20\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="rt, Version=0.0.0.0, Culture=neutral">
- <Private>False</Private>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="xmlconf.cs" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.sln b/mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.sln
deleted file mode 100644
index b14342dc39e..00000000000
--- a/mcs/class/System.XML/Test/System.Xml/W3C/W3C20.J2EE.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "W3C20.J2EE", "W3C20.J2EE.csproj", "{4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug_Java|Any CPU = Debug_Java|Any CPU
- Debug_Java20|Any CPU = Debug_Java20|Any CPU
- Release_Java|Any CPU = Release_Java|Any CPU
- Release_Java20|Any CPU = Release_Java20|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Debug_Java|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Debug_Java|Any CPU.Build.0 = Debug_Java20|Any CPU
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Debug_Java20|Any CPU.ActiveCfg = Debug_Java20|Any CPU
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Debug_Java20|Any CPU.Build.0 = Debug_Java20|Any CPU
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Release_Java|Any CPU.ActiveCfg = Release_Java|Any CPU
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Release_Java|Any CPU.Build.0 = Release_Java|Any CPU
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Release_Java20|Any CPU.ActiveCfg = Release_Java|Any CPU
- {4A29F8EF-255A-444D-BAB9-3AB3A2CD72AD}.Release_Java20|Any CPU.Build.0 = Release_Java|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/System.XML/Test/System.Xml/W3C/run-test.j2ee.bat b/mcs/class/System.XML/Test/System.Xml/W3C/run-test.j2ee.bat
deleted file mode 100644
index 1f87a6603a6..00000000000
--- a/mcs/class/System.XML/Test/System.Xml/W3C/run-test.j2ee.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-set JGAC_PATH=c:\Program Files\Mainsoft\Visual MainWin for J2EE\java_refs\framework\
-java -cp "%JGAC_PATH%mscorlib.jar;%JGAC_PATH%System.jar;%JGAC_PATH%System.Xml.jar;%JGAC_PATH%nunit.core.jar;%JGAC_PATH%nunit.framework.jar;%JGAC_PATH%nunit.util.jar;%JGAC_PATH%J2SE.Helpers.jar;W3C.jar;nunit-console.jar" NUnit.Console.ConsoleUi /fixture=MonoTests.W3C_xmlconf.CleanTests W3C.jar /xml=TestsResult.xml
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs b/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs
index fcdc34e7f7a..80a46e5c99f 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs
@@ -33,7 +33,7 @@ using System.Xml;
using NUnit.Framework;
-namespace MonoTest.System.Xml {
+namespace MonoTests.System.Xml {
[TestFixture]
public class XmlResolverTest {
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs
index 52de90d1414..2e5316c1ffe 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs
@@ -38,7 +38,7 @@ using System.Security.Permissions;
using System.Security.Policy;
using System.Xml;
-using MonoTestsXml;
+using MonoTests.System.Xml;
namespace MonoCasTests.System.Xml {
@@ -85,4 +85,4 @@ namespace MonoCasTests.System.Xml {
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs
index c97407de984..a2eaa8b1064 100644
--- a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs
+++ b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs
@@ -20,7 +20,7 @@ using System.Security.Permissions;
using System.Xml;
using NUnit.Framework;
-namespace MonoTestsXml
+namespace MonoTests.System.Xml
{
[TestFixture]
public class XmlSecureResolverTests
diff --git a/mcs/class/System.XML/net_1_1_java_System.Xml.dll.exclude.sources b/mcs/class/System.XML/net_1_1_java_System.Xml.dll.exclude.sources
deleted file mode 100644
index 9e7b8bc49e8..00000000000
--- a/mcs/class/System.XML/net_1_1_java_System.Xml.dll.exclude.sources
+++ /dev/null
@@ -1,5 +0,0 @@
-Mono.Xml.Xsl/ScriptCompilerInfo.cs
-System.Xml.Serialization/MapCodeGenerator.cs
-System.Xml.Serialization/SoapCodeExporter.cs
-System.Xml.Serialization/XmlCodeExporter.cs
-Mono.Xml.Xsl/XslDecimalFormat.cs
diff --git a/mcs/class/System.XML/net_1_1_java_System.Xml.dll.sources b/mcs/class/System.XML/net_1_1_java_System.Xml.dll.sources
deleted file mode 100644
index 7048fcad151..00000000000
--- a/mcs/class/System.XML/net_1_1_java_System.Xml.dll.sources
+++ /dev/null
@@ -1,2 +0,0 @@
-#include System.Xml.dll.sources
-Mono.Xml.Xsl/XslDecimalFormat.jvm.cs
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq.csproj b/mcs/class/System.Xml.Linq/System.Xml.Linq.csproj
deleted file mode 100644
index 3fcfc2547d5..00000000000
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq.csproj
+++ /dev/null
@@ -1,151 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{8EF1DA1B-BB96-4248-B059-8F2C8F40721D}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Xml.Linq</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>3.5</OldToolsVersion>
- <RootNamespace>System.Xml.Linq</RootNamespace>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <jarserver>ipa</jarserver>
- <PublishUrl>http://localhost/System.Xml.Linq/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java20|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java20\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_1_1;NET_2_0;NET_3_5;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java20|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java20\</OutputPath>
- <DefineConstants>TRACE;JAVA;NET_1_1;NET_2_0;NET_3_5;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Locale.cs">
- <Link>Assembly\Locale.cs</Link>
- </Compile>
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs">
- <Link>Assembly\MonoTODOAttribute.cs</Link>
- </Compile>
- <Compile Include="System.Xml.Linq\Extensions.cs" />
- <Compile Include="System.Xml.Linq\LoadOptions.cs" />
- <Compile Include="System.Xml.Linq\SaveOptions.cs" />
- <Compile Include="System.Xml.Linq\XAttribute.cs" />
- <Compile Include="System.Xml.Linq\XCData.cs" />
- <Compile Include="System.Xml.Linq\XComment.cs" />
- <Compile Include="System.Xml.Linq\XContainer.cs" />
- <Compile Include="System.Xml.Linq\XDeclaration.cs" />
- <Compile Include="System.Xml.Linq\XDocument.cs" />
- <Compile Include="System.Xml.Linq\XDocumentType.cs" />
- <Compile Include="System.Xml.Linq\XElement.cs" />
- <Compile Include="System.Xml.Linq\XIterators.cs" />
- <Compile Include="System.Xml.Linq\XName.cs" />
- <Compile Include="System.Xml.Linq\XNamespace.cs" />
- <Compile Include="System.Xml.Linq\XNode.cs" />
- <Compile Include="System.Xml.Linq\XNodeDocumentOrderComparer.cs" />
- <Compile Include="System.Xml.Linq\XNodeEqualityComparer.cs" />
- <Compile Include="System.Xml.Linq\XNodeNavigator.cs" />
- <Compile Include="System.Xml.Linq\XNodeReader.cs" />
- <Compile Include="System.Xml.Linq\XNodeWriter.cs" />
- <Compile Include="System.Xml.Linq\XObject.cs" />
- <Compile Include="System.Xml.Linq\XObjectChange.cs" />
- <Compile Include="System.Xml.Linq\XObjectChangeEventArgs.cs" />
- <Compile Include="System.Xml.Linq\XProcessingInstruction.cs" />
- <Compile Include="System.Xml.Linq\XStreamingElement.cs" />
- <Compile Include="System.Xml.Linq\XText.cs" />
- <Compile Include="System.Xml.Linq\XUtil.cs" />
- <Compile Include="System.Xml.Schema\Extensions.cs" />
- <Compile Include="System.Xml.XPath\Extensions.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="rt, Version=1.6.0.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\..\build\common\Consts.cs.in">
- <Link>Assembly\Consts.cs.in</Link>
- </Compile>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-JarPath-system="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-rt="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs
index f5214b78446..7fcdd61e63c 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XAttribute.cs
@@ -94,7 +94,6 @@ namespace System.Xml.Linq
return attribute.value == null ? (DateTime?) null : XUtil.ToDateTime (attribute.value);
}
-#if !TARGET_JVM // Same as for System.Xml.XmlConvert.ToDateTimeOffset
[CLSCompliant (false)]
public static explicit operator DateTimeOffset (XAttribute attribute)
@@ -113,7 +112,6 @@ namespace System.Xml.Linq
return attribute.value == null ? (DateTimeOffset?) null : XmlConvert.ToDateTimeOffset (attribute.value);
}
-#endif
[CLSCompliant (false)]
public static explicit operator decimal (XAttribute attribute)
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
index af5fd976403..25e967583cb 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XContainer.cs
@@ -72,6 +72,9 @@ namespace System.Xml.Linq
foreach (object o in XUtil.ExpandArray (content))
{
+ if (o == null)
+ continue;
+
if (!OnAddingObject (o, false, last, false))
{
var node = XUtil.ToNode (o);
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
index 9c39d12d1a9..4fa7889633c 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XElement.cs
@@ -135,7 +135,6 @@ namespace System.Xml.Linq
return element.Value == null ? (DateTime?) null : XUtil.ToDateTime (element.Value);
}
-#if !TARGET_JVM // Same as for System.Xml.XmlConvert.ToDateTimeOffset
[CLSCompliant (false)]
public static explicit operator DateTimeOffset (XElement element)
@@ -154,7 +153,6 @@ namespace System.Xml.Linq
return element.Value == null ? (DateTimeOffset?) null : XmlConvert.ToDateTimeOffset (element.Value);
}
-#endif
[CLSCompliant (false)]
public static explicit operator decimal (XElement element)
diff --git a/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs b/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs
index c620e4f5992..0e094d0c474 100644
--- a/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs
+++ b/mcs/class/System.Xml.Linq/System.Xml.Linq/XObject.cs
@@ -208,16 +208,16 @@ namespace System.Xml.Linq
{
if (Changing != null)
Changing (sender, args);
- if (Parent != null)
- Parent.OnChanging (sender, args);
+ if (Owner != null)
+ Owner.OnChanging (sender, args);
}
void OnChanged (object sender, XObjectChangeEventArgs args)
{
if (Changed != null)
Changed (sender, args);
- if (Parent != null)
- Parent.OnChanged (sender, args);
+ if (Owner != null)
+ Owner.OnChanged (sender, args);
}
}
}
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq.Tests.csproj b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq.Tests.csproj
deleted file mode 100644
index 8a8aff2d38f..00000000000
--- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq.Tests.csproj
+++ /dev/null
@@ -1,134 +0,0 @@
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug_Java</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{EF1A17B1-3987-44F1-B796-7F89C9A1642A}</ProjectGuid>
- <ProjectTypeGuids>{F6B19D50-1E2E-4e87-ADFB-10393B439DE0};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <AssemblyName>System.Xml.Linq.Tests</AssemblyName>
- <JDKName>1.6</JDKName>
- <GHProjectType>1</GHProjectType>
- <Version>2.0</Version>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AdditionalClassPath>
- </AdditionalClassPath>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>3.5</OldToolsVersion>
- <RootNamespace>System.Xml.Linq.Tests</RootNamespace>
- <UpgradeBackupLocation>
- </UpgradeBackupLocation>
- <jarserver>ipa</jarserver>
- <PublishUrl>http://localhost/System.Xml.Linq.Tests/</PublishUrl>
- <Install>true</Install>
- <InstallFrom>Web</InstallFrom>
- <UpdateEnabled>true</UpdateEnabled>
- <UpdateMode>Foreground</UpdateMode>
- <UpdateInterval>7</UpdateInterval>
- <UpdateIntervalUnits>Days</UpdateIntervalUnits>
- <UpdatePeriodically>false</UpdatePeriodically>
- <UpdateRequired>false</UpdateRequired>
- <MapFileExtensions>true</MapFileExtensions>
- <ApplicationRevision>0</ApplicationRevision>
- <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
- <IsWebBootstrapper>true</IsWebBootstrapper>
- <UseApplicationTrust>false</UseApplicationTrust>
- <BootstrapperEnabled>true</BootstrapperEnabled>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug_Java|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug_Java\</OutputPath>
- <DefineConstants>TRACE;DEBUG;JAVA;NET_1_1;NET_2_0;NET_3_5;TARGET_JVM</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release_Java|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release_Java\</OutputPath>
- <DefineConstants>TRACE;JAVA</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <BaseAddress>285212672</BaseAddress>
- <SkipValidation>false</SkipValidation>
- <KeepIntermediate>false</KeepIntermediate>
- <TargetPlatform>0</TargetPlatform>
- </PropertyGroup>
- <ItemGroup>
- <Compile Include="System.Xml.Linq\ExtensionsTest.cs" />
- <Compile Include="System.Xml.Linq\XAttributeTest.cs" />
- <Compile Include="System.Xml.Linq\XDocumentTest.cs" />
- <Compile Include="System.Xml.Linq\XElementTest.cs" />
- <Compile Include="System.Xml.Linq\XNamespaceTest.cs" />
- <Compile Include="System.Xml.Linq\XNameTest.cs" />
- <Compile Include="System.Xml.Linq\XNodeDocumentOrderComparerTest.cs" />
- <Compile Include="System.Xml.Linq\XNodeEqualityComparerTest.cs" />
- <Compile Include="System.Xml.Linq\XNodeNavigatorTest.cs" />
- <Compile Include="System.Xml.Linq\XNodeReaderTest.cs" />
- <Compile Include="System.Xml.Linq\XNodeWriterTest.cs" />
- <Compile Include="System.Xml.Linq\XObjectTest.cs" />
- <Compile Include="System.Xml.Linq\XProcessingInstructionTest.cs" />
- <Compile Include="System.Xml.Linq\XTextTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <Reference Include="nunit.framework">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\..\nunit20\framework\bin\Debug_Java20\nunit.framework.dll</HintPath>
- <Private>True</Private>
- </Reference>
- <Reference Include="rt, Version=1.6.0.65535, Culture=neutral, processorArchitecture=MSIL" />
- <Reference Include="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=x86" />
- <Reference Include="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL" />
- <Reference Include="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
- <Install>true</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
- <Visible>False</Visible>
- <ProductName>.NET Framework 3.5</ProductName>
- <Install>false</Install>
- </BootstrapperPackage>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="Properties\" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.csharp.targets" />
- <Import Project="$(VMW_HOME)\bin\Mainsoft.Common.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <UserProperties REFS-RefInfo-system-xml-linq="repository:vmw:framework:2.0" REFS-JarPath-system-xml-linq="" REFS-RefInfo-rt="repository:jre:sun:1.6.0" REFS-JarPath-rt="" REFS-RefInfo-system-xml="repository:vmw:framework:2.0" REFS-JarPath-system-xml="" REFS-RefInfo-system-data="repository:vmw:framework:2.0" REFS-JarPath-system-data="" REFS-RefInfo-system="repository:vmw:framework:2.0" REFS-JarPath-system="" />
- </VisualStudio>
- </ProjectExtensions>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XDocumentTest.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XDocumentTest.cs
index 7a1fbcb06b5..afceb3b5c61 100644
--- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XDocumentTest.cs
+++ b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XDocumentTest.cs
@@ -126,5 +126,22 @@ namespace MonoTests.System.Xml.Linq
doc.WriteTo (writer);
Assert.IsTrue (sw.ToString ().StartsWith ("<?xml"), "#1");
}
+
+ [Test] // bug #18772
+ public void ChangedEvent ()
+ {
+ const string xml = "<?xml version='1.0' encoding='utf-8'?><Start><Ele1/></Start>";
+ var testXmlDoc = XDocument.Load (new MemoryStream(Encoding.UTF8.GetBytes(xml)));
+
+ var changed = false;
+ testXmlDoc.Changed += (sender, e) => {
+ changed = true;
+ };
+
+ XElement p = new XElement ("Hello");
+ testXmlDoc.Root.Add (p);
+
+ Assert.IsTrue (changed);
+ }
}
}
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
index fd5cd82bf94..70616aa0da0 100644
--- a/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
+++ b/mcs/class/System.Xml.Linq/Test/System.Xml.Linq/XElementTest.cs
@@ -2097,5 +2097,13 @@ namespace MonoTests.System.Xml.Linq
Assert.AreEqual (xe.Content.ToString (), "<Data />", "#3");
}
#endif
+
+ [Test] // Bug #20151
+ public void XElementFromArrayWithNullValuesAsObject ()
+ {
+ string[] content = {null, "content1", null, "content2"};
+ var el = new XElement ("test", (object)content);
+ Assert.AreEqual ("<test>content1content2</test>", el.ToString ());
+ }
}
}
diff --git a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
index 2a01ab93d62..88c95c9a905 100644
--- a/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
+++ b/mcs/class/System/Microsoft.CSharp/CSharpCodeCompiler.cs
@@ -44,6 +44,7 @@ namespace Mono.CSharp
using System.Text.RegularExpressions;
using System.Threading;
using System.Collections.Generic;
+ using System.Globalization;
internal class CSharpCodeCompiler : CSharpCodeGenerator, ICodeCompiler
{
@@ -194,7 +195,14 @@ namespace Mono.CSharp
if (Environment.GetEnvironmentVariable ("MONO_TESTS_IN_PROGRESS") != null) {
string monoPath = Environment.GetEnvironmentVariable ("MONO_PATH");
if (!String.IsNullOrEmpty (monoPath)) {
- monoPath = monoPath.Replace ("/class/lib/net_2_0", "/class/lib/net_4_0");
+ const string basePath = "/class/lib/";
+ const string profile = "net_2_0";
+ var basePathIndex = monoPath.IndexOf (basePath, StringComparison.Ordinal);
+ if (basePathIndex > 0 && basePathIndex + basePath.Length + profile.Length <= monoPath.Length) {
+ var currentProfile = monoPath.Substring (basePathIndex + basePath.Length, profile.Length);
+ if (currentProfile.Equals (profile, StringComparison.OrdinalIgnoreCase))
+ monoPath = monoPath.Replace (basePath + currentProfile, basePath + "net_4_0");
+ }
mcs.StartInfo.EnvironmentVariables ["MONO_PATH"] = monoPath;
}
}
diff --git a/mcs/class/System/System.Collections.Generic/RBTree.cs b/mcs/class/System/System.Collections.Generic/RBTree.cs
index 9b8a7ca4541..4b311e67e73 100644
--- a/mcs/class/System/System.Collections.Generic/RBTree.cs
+++ b/mcs/class/System/System.Collections.Generic/RBTree.cs
@@ -114,17 +114,8 @@ namespace System.Collections.Generic
uint version;
#if ONE_MEMBER_CACHE
-#if TARGET_JVM
- static readonly LocalDataStoreSlot _cachedPathStore = System.Threading.Thread.AllocateDataSlot ();
-
- static List<Node> cached_path {
- get { return (List<Node>) System.Threading.Thread.GetData (_cachedPathStore); }
- set { System.Threading.Thread.SetData (_cachedPathStore, value); }
- }
-#else
[ThreadStatic]
static List<Node> cached_path;
-#endif
static List<Node> alloc_path ()
{
diff --git a/mcs/class/System/System.ComponentModel/Component.cs b/mcs/class/System/System.ComponentModel/Component.cs
index 10951616484..c5878914610 100644
--- a/mcs/class/System/System.ComponentModel/Component.cs
+++ b/mcs/class/System/System.ComponentModel/Component.cs
@@ -100,18 +100,11 @@ namespace System.ComponentModel {
Dispose (false);
}
-#if TARGET_JVM
- public virtual void Dispose ()
- {
- Dispose (true);
- }
-#else
public void Dispose ()
{
Dispose (true);
GC.SuppressFinalize (this);
}
-#endif
// <summary>
// Controls disposal of resources used by this.
diff --git a/mcs/class/System/System.ComponentModel/MarshalByValueComponent.cs b/mcs/class/System/System.ComponentModel/MarshalByValueComponent.cs
index 08c0a14832e..68630ac975e 100644
--- a/mcs/class/System/System.ComponentModel/MarshalByValueComponent.cs
+++ b/mcs/class/System/System.ComponentModel/MarshalByValueComponent.cs
@@ -70,12 +70,10 @@ namespace System.ComponentModel
// Set fields to null
}
-#if !TARGET_JVM
~MarshalByValueComponent ()
{
Dispose (false);
}
-#endif
public virtual object GetService (Type service)
{
diff --git a/mcs/class/System/System.ComponentModel/PropertyDescriptorCollection.cs b/mcs/class/System/System.ComponentModel/PropertyDescriptorCollection.cs
index b7fa48ad0ad..e84115ff8bd 100644
--- a/mcs/class/System/System.ComponentModel/PropertyDescriptorCollection.cs
+++ b/mcs/class/System/System.ComponentModel/PropertyDescriptorCollection.cs
@@ -92,7 +92,6 @@ namespace System.ComponentModel
properties.Clear ();
}
-#if !TARGET_JVM // DUAL_IFACE_CONFLICT
void IList.Clear ()
{
Clear ();
@@ -102,19 +101,12 @@ namespace System.ComponentModel
{
Clear ();
}
-#endif
public bool Contains (PropertyDescriptor value)
{
return properties.Contains (value);
}
-#if TARGET_JVM // DUAL_IFACE_CONFLICT
- public bool Contains (object value)
- {
- return Contains ((PropertyDescriptor) value);
- }
-#else
bool IList.Contains (object value)
{
@@ -125,7 +117,6 @@ namespace System.ComponentModel
{
return Contains ((PropertyDescriptor) value);
}
-#endif
public void CopyTo (Array array, int index)
{
@@ -198,12 +189,6 @@ namespace System.ComponentModel
properties.Remove (value);
}
-#if TARGET_JVM// DUAL_IFACE_CONFLICT
- public void Remove (object value)
- {
- Remove ((PropertyDescriptor) value);
- }
-#else
void IDictionary.Remove (object value)
{
Remove ((PropertyDescriptor) value);
@@ -213,7 +198,6 @@ namespace System.ComponentModel
{
Remove ((PropertyDescriptor) value);
}
-#endif
public void RemoveAt (int index)
{
if (readOnly) {
@@ -322,30 +306,22 @@ namespace System.ComponentModel
return new PropertyDescriptorCollection (descriptors, true);
}
-#if TARGET_JVM //DUAL_IFACE_CONFLICT
- public bool IsFixedSize
-#else
bool IDictionary.IsFixedSize
{
get {return ((IList)this).IsFixedSize;}
}
bool IList.IsFixedSize
-#endif
{
get
{
return readOnly;
}
}
-#if TARGET_JVM //DUAL_IFACE_CONFLICT
- public bool IsReadOnly
-#else
bool IDictionary.IsReadOnly
{
get {return ((IList)this).IsReadOnly;}
}
bool IList.IsReadOnly
-#endif
{
get
{
diff --git a/mcs/class/System/System.ComponentModel/TypeDescriptor.cs b/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
index 9ebeeddd36d..df7f55bcecf 100644
--- a/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
+++ b/mcs/class/System/System.ComponentModel/TypeDescriptor.cs
@@ -600,12 +600,10 @@ public sealed class TypeDescriptor
editor = CreateEditor (editorType, componentType);
if (editorType == null || editor == null) {
-#if !TARGET_JVM
// Make sure the editorBaseType's static constructor has been called,
// since that's where we're putting the initialization of its editor table.
System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (editorBaseType.TypeHandle);
-#endif
if (editors != null)
editor = FindEditorInTable (componentType, editorBaseType, editors [editorBaseType] as Hashtable);
}
diff --git a/mcs/class/System/System.ComponentModel/Win32Exception.cs b/mcs/class/System/System.ComponentModel/Win32Exception.cs
index 10f0fedaa87..9746541b7e0 100644
--- a/mcs/class/System/System.ComponentModel/Win32Exception.cs
+++ b/mcs/class/System/System.ComponentModel/Win32Exception.cs
@@ -43,9 +43,6 @@ namespace System.ComponentModel
private int native_error_code;
// [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
-#if TARGET_JVM
- [MonoNotSupported("")]
-#endif
public Win32Exception ()
: base (W32ErrorMessage (Marshal.GetLastWin32Error ()))
{
@@ -66,18 +63,12 @@ namespace System.ComponentModel
native_error_code = error;
}
[SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
-#if TARGET_JVM
- [MonoNotSupported ("")]
-#endif
public Win32Exception (string message)
: base (message)
{
native_error_code = Marshal.GetLastWin32Error ();
}
-#if TARGET_JVM
- [MonoNotSupported ("")]
-#endif
[SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
public Win32Exception (string message, Exception innerException)
: base (message, innerException)
diff --git a/mcs/class/System/System.Configuration/AppSettingsReader.cs b/mcs/class/System/System.Configuration/AppSettingsReader.cs
index 4fbff57411b..57aa6b19880 100644
--- a/mcs/class/System/System.Configuration/AppSettingsReader.cs
+++ b/mcs/class/System/System.Configuration/AppSettingsReader.cs
@@ -28,7 +28,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if CONFIGURATION_DEP && !TARGET_JVM
+#if CONFIGURATION_DEP
extern alias PrebuiltSystem;
using NameValueCollection = PrebuiltSystem.System.Collections.Specialized.NameValueCollection;
#endif
diff --git a/mcs/class/System/System.Configuration/ApplicationSettingsBase.cs b/mcs/class/System/System.Configuration/ApplicationSettingsBase.cs
index 940f45fe5a7..58ebcd7a5f7 100644
--- a/mcs/class/System/System.Configuration/ApplicationSettingsBase.cs
+++ b/mcs/class/System/System.Configuration/ApplicationSettingsBase.cs
@@ -20,7 +20,7 @@
// Copyright (C) 2005, 2006 Novell, Inc (http://www.novell.com)
//
-#if CONFIGURATION_DEP && !TARGET_JVM
+#if CONFIGURATION_DEP
extern alias PrebuiltSystem;
using NameValueCollection = PrebuiltSystem.System.Collections.Specialized.NameValueCollection;
#endif
diff --git a/mcs/class/System/System.Configuration/ConfigurationSettings.cs b/mcs/class/System/System.Configuration/ConfigurationSettings.cs
index 84995699644..968532966e3 100644
--- a/mcs/class/System/System.Configuration/ConfigurationSettings.cs
+++ b/mcs/class/System/System.Configuration/ConfigurationSettings.cs
@@ -32,7 +32,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if CONFIGURATION_DEP && !TARGET_JVM
+#if CONFIGURATION_DEP
extern alias PrebuiltSystem;
using NameValueCollection = PrebuiltSystem.System.Collections.Specialized.NameValueCollection;
#endif
@@ -47,32 +47,12 @@ using System.Security.Permissions;
using System.Xml;
using System.Xml.XPath;
#endif
-#if TARGET_JVM
-using vmw.common;
-using vmw.@internal.io;
-#endif
namespace System.Configuration
{
public sealed class ConfigurationSettings
{
-#if !TARGET_JVM
static IConfigurationSystem config = DefaultConfig.GetInstance ();
-#else
- static IConfigurationSystem config {
- get {
- IConfigurationSystem conf = (IConfigurationSystem) AppDomain.CurrentDomain.GetData ("ConfigurationSettings.Config");
- if (conf == null) {
- conf = DefaultConfig.GetInstance ();
- AppDomain.CurrentDomain.SetData ("ConfigurationSettings.Config", conf);
- }
- return conf;
- }
- set {
- AppDomain.CurrentDomain.SetData ("ConfigurationSettings.Config", value);
- }
- }
-#endif
static object lockobj = new object ();
private ConfigurationSettings ()
{
@@ -123,23 +103,7 @@ namespace System.Configuration
//
class DefaultConfig : IConfigurationSystem
{
-#if !TARGET_JVM
static readonly DefaultConfig instance = new DefaultConfig ();
-#else
- static DefaultConfig instance {
- get {
- DefaultConfig conf = (DefaultConfig) AppDomain.CurrentDomain.GetData ("DefaultConfig.instance");
- if (conf == null) {
- conf = new DefaultConfig ();
- AppDomain.CurrentDomain.SetData ("DefaultConfig.instance", conf);
- }
- return conf;
- }
- set {
- AppDomain.CurrentDomain.SetData ("DefaultConfig.instance", value);
- }
- }
-#endif
ConfigurationData config;
private DefaultConfig ()
@@ -185,16 +149,6 @@ namespace System.Configuration
config = data;
}
}
-#if TARGET_JVM
- internal static string GetBundledMachineConfig ()
- {
- return null;
- }
- internal static string GetMachineConfigPath ()
- {
- return System.Runtime.InteropServices.RuntimeEnvironment.SystemConfigurationFile;
- }
-#else
[MethodImplAttribute(MethodImplOptions.InternalCall)]
extern private static string get_bundled_machine_config ();
internal static string GetBundledMachineConfig ()
@@ -207,7 +161,6 @@ namespace System.Configuration
{
return get_machine_config_path ();
}
-#endif
private static string GetAppConfigPath ()
{
AppDomainSetup currentInfo = AppDomain.CurrentDomain.SetupInformation;
@@ -291,29 +244,14 @@ namespace System.Configuration
#if (XML_DEP)
this.fileName = fileName;
if (fileName == null
-#if !TARGET_JVM
|| !File.Exists (fileName)
-#endif
)
return false;
XmlTextReader reader = null;
try {
-#if !TARGET_JVM
FileStream fs = new FileStream (fileName, FileMode.Open, FileAccess.Read);
-#else
- Stream fs = (Stream) vmw.common.IOUtils.getStream (fileName);
-
- //patch for machine.config
- if (fs == null && fileName.EndsWith ("machine.config")) {
- fs = (Stream) IOUtils.getStreamForGHConfigs (fileName);
- }
-
- if (fs == null) {
- return false;
- }
-#endif
reader = new XmlTextReader (fs);
if (InitRead (reader))
ReadConfigFile (reader);
diff --git a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
index 34528367290..02f2087cc42 100644
--- a/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
+++ b/mcs/class/System/System.Configuration/CustomizableFileSettingsProvider.cs
@@ -29,9 +29,7 @@
#if CONFIGURATION_DEP
-#if !TARGET_JVM
extern alias PrebuiltSystem;
-#endif
using System;
using System.Collections;
@@ -44,11 +42,7 @@ using System.Security.Cryptography;
using System.Text;
using System.Xml;
-#if TARGET_JVM
-using NameValueCollection = System.Collections.Specialized.NameValueCollection;
-#else
using NameValueCollection = PrebuiltSystem.System.Collections.Specialized.NameValueCollection;
-#endif
namespace System.Configuration
{
@@ -264,7 +258,6 @@ namespace System.Configuration
return attrs [0].Company;
}
-#if !TARGET_JVM
MethodInfo entryPoint = assembly.EntryPoint;
Type entryType = entryPoint != null ? entryPoint.DeclaringType : null;
if (entryType != null && !String.IsNullOrEmpty (entryType.Namespace)) {
@@ -272,9 +265,6 @@ namespace System.Configuration
return end < 0 ? entryType.Namespace : entryType.Namespace.Substring (0, end);
}
return "Program";
-#else
- return assembly.GetName ().Name;
-#endif
}
private static string GetProductName ()
@@ -283,20 +273,11 @@ namespace System.Configuration
if (assembly == null)
assembly = Assembly.GetCallingAssembly ();
-#if !TARGET_JVM
byte [] pkt = assembly.GetName ().GetPublicKeyToken ();
return String.Format ("{0}_{1}_{2}",
AppDomain.CurrentDomain.FriendlyName,
pkt != null && pkt.Length > 0 ? "StrongName" : "Url",
GetEvidenceHash());
-#else // AssemblyProductAttribute-based code
- AssemblyProductAttribute [] attrs = (AssemblyProductAttribute[]) assembly.GetCustomAttributes (typeof (AssemblyProductAttribute), true);
-
- if ((attrs != null) && attrs.Length > 0) {
- return attrs [0].Product;
- }
- return assembly.GetName ().Name;
-#endif
}
// Note: Changed from base64() to hex output to avoid unexpected chars like '\' or '/' with filesystem meaning.
@@ -341,19 +322,15 @@ namespace System.Configuration
ProductVersion = GetProductVersion ().Split('.');
// C:\Documents and Settings\(user)\Application Data
-#if !TARGET_JVM
if (userRoamingBasePath == "")
userRoamingPath = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData);
else
-#endif
userRoamingPath = userRoamingBasePath;
// C:\Documents and Settings\(user)\Local Settings\Application Data (on Windows)
-#if !TARGET_JVM
if (userLocalBasePath == "")
userLocalPath = Environment.GetFolderPath (Environment.SpecialFolder.LocalApplicationData);
else
-#endif
userLocalPath = userLocalBasePath;
if (isCompany) {
@@ -366,13 +343,11 @@ namespace System.Configuration
Assembly assembly = Assembly.GetEntryAssembly ();
if (assembly == null)
assembly = Assembly.GetCallingAssembly ();
-#if !TARGET_JVM
byte [] pkt = assembly.GetName ().GetPublicKeyToken ();
ProductName = String.Format ("{0}_{1}_{2}",
ProductName,
pkt != null ? "StrongName" : "Url",
GetEvidenceHash());
-#endif
}
userRoamingPath = Path.Combine (userRoamingPath, ProductName);
userLocalPath = Path.Combine (userLocalPath, ProductName);
diff --git a/mcs/class/System/System.Configuration/LocalFileSettingsProvider.cs b/mcs/class/System/System.Configuration/LocalFileSettingsProvider.cs
index 14358d1f262..d0ca5ab0a48 100644
--- a/mcs/class/System/System.Configuration/LocalFileSettingsProvider.cs
+++ b/mcs/class/System/System.Configuration/LocalFileSettingsProvider.cs
@@ -28,7 +28,7 @@
//
#if CONFIGURATION_DEP
-#if CONFIGURATION_DEP && !TARGET_JVM
+#if CONFIGURATION_DEP
extern alias PrebuiltSystem;
using NameValueCollection = PrebuiltSystem.System.Collections.Specialized.NameValueCollection;
#endif
@@ -59,14 +59,7 @@ namespace System.Configuration
public override SettingsPropertyValueCollection GetPropertyValues (SettingsContext context,
SettingsPropertyCollection properties)
{
-#if TARGET_JVM
- SettingsPropertyValueCollection pv = new SettingsPropertyValueCollection ();
- foreach (SettingsProperty prop in properties)
- pv.Add (new SettingsPropertyValue (prop));
- return pv;
-#else
return impl.GetPropertyValues (context, properties);
-#endif
}
#if CONFIGURATION_DEP
diff --git a/mcs/class/System/System.Diagnostics/.gitattributes b/mcs/class/System/System.Diagnostics/.gitattributes
deleted file mode 100644
index 7438071d6a5..00000000000
--- a/mcs/class/System/System.Diagnostics/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-/Debugger.jvm.cs -crlf
-/StackFrame.jvm.cs -crlf
-/StackTrace.jvm.cs -crlf
-/TraceEventCache.jvm.cs -crlf
diff --git a/mcs/class/System/System.Diagnostics/Debugger.jvm.cs b/mcs/class/System/System.Diagnostics/Debugger.jvm.cs
deleted file mode 100644
index d2e2440c552..00000000000
--- a/mcs/class/System/System.Diagnostics/Debugger.jvm.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// System.Diagnostics.Debugger.cs
-//
-// Author:
-// John R. Hicks (angryjohn69@nc.rr.com)
-//
-// (C) 2001
-//
-using System;
-
-namespace System.Diagnostics
-{
- /// <summary>
- /// Enables communication with a debugger.
- /// </summary>
- [MonoTODO]
- public sealed class Debugger
- {
- private static bool isAttached;
-
- /// <summary>
- /// Represents the default category of a message with a constant.
- /// </summary>
- public static readonly string DefaultCategory = "";
-
- /// <summary>
- /// Returns a Boolean indicating whether a debugger is attached to a process.
- /// </summary>
- /// <value>
- /// true if debugger is attached; otherwise, false.
- /// </value>
- public static bool IsAttached
- {
- get
- {
- return isAttached;
- }
- }
-
- /// <summary>
- /// Causes a breakpoint to be signaled to an attached debugger.
- /// </summary>
- [MonoTODO]
- public static void Break()
- {
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Checks to see if logging is enabled by an attached debugger.
- /// </summary>
- [MonoTODO]
- public static bool IsLogging()
- {
- // Return false. DefaultTraceListener invokes this method, so throwing
- // a NotImplementedException wouldn't be appropriate.
- return false;
-
- }
-
- /// <summary>
- /// Launches and attaches a debugger to the process.
- /// </summary>
- [MonoTODO]
- public static bool Launch()
- {
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Posts a message for the attached debugger.
- /// </summary>
- /// <param name="level">
- /// A description of the importance of this message
- /// </param>
- /// <param name="category">
- /// A string describing the category of this message.
- /// </param>
- /// <param name="message">
- /// A string representing the message to show.
- /// </param>
- [MonoTODO]
- public static void Log(int level, string category, string message)
- {
- // Do nothing. DefaultTraceListener invokes this method, so throwing
- // a NotImplementedException wouldn't be appropriate.
- }
-
- public Debugger()
- {
- isAttached = false;
- }
- }
-}
diff --git a/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs b/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs
index 8eda0fa240f..9750c53b34a 100644
--- a/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs
+++ b/mcs/class/System/System.Diagnostics/DefaultTraceListener.cs
@@ -64,14 +64,10 @@ namespace System.Diagnostics {
OnWin32 = (Path.DirectorySeparatorChar == '\\');
if (!OnWin32) {
-#if TARGET_JVM
- string trace = java.lang.System.getProperty("MONO_TRACE");
-#else
// If we're running on Unix, we don't have OutputDebugString.
// Instead, send output to...wherever the MONO_TRACE_LISTENER environment
// variables says to.
String trace = Environment.GetEnvironmentVariable("MONO_TRACE_LISTENER");
-#endif
#if MOBILE
if (trace == null)
@@ -215,10 +211,6 @@ namespace System.Diagnostics {
Abort
}
-#if TARGET_JVM
- private void WriteDebugString (string message)
- {
-#else
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static void WriteWindowsDebugString (string message);
@@ -227,7 +219,6 @@ namespace System.Diagnostics {
if (OnWin32)
WriteWindowsDebugString (message);
else
-#endif
WriteMonoTrace (message);
}
diff --git a/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs b/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
index 49c2b04f6e1..149ad3bc5ba 100644
--- a/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
+++ b/mcs/class/System/System.Diagnostics/DiagnosticsConfigurationHandler.cs
@@ -186,7 +186,6 @@ namespace System.Diagnostics
// them
private void AddSwitchesNode (IDictionary d, XmlNode node)
{
-#if !TARGET_JVM
// There are no attributes on <switch/>
ValidateInvalidAttributes (node.Attributes, node);
@@ -224,7 +223,6 @@ namespace System.Diagnostics
}
d [node.Name] = newNodes;
-#endif
}
private static object GetSwitchValue (string name, string value)
@@ -367,7 +365,6 @@ namespace System.Diagnostics
// for add, "name" is required; initializeData is optional; "type" is required in 1.x, optional in 2.0.
private void AddTraceListeners (IDictionary d, XmlNode listenersNode, TraceListenerCollection listeners)
{
-#if !TARGET_JVM
// There are no attributes on <listeners/>
ValidateInvalidAttributes (listenersNode.Attributes, listenersNode);
@@ -398,7 +395,6 @@ namespace System.Diagnostics
else
ThrowUnrecognizedNode (child);
}
-#endif
}
private void AddTraceListener (IDictionary d, XmlNode child, XmlAttributeCollection attributes, TraceListenerCollection listeners)
diff --git a/mcs/class/System/System.Diagnostics/SourceSwitch.cs b/mcs/class/System/System.Diagnostics/SourceSwitch.cs
index d991271478e..e9b29ca3b85 100644
--- a/mcs/class/System/System.Diagnostics/SourceSwitch.cs
+++ b/mcs/class/System/System.Diagnostics/SourceSwitch.cs
@@ -59,15 +59,11 @@ namespace System.Diagnostics
{
switch (eventType) {
case TraceEventType.Critical:
- return (Level & SourceLevels.Critical) != 0;
case TraceEventType.Error:
- return (Level & SourceLevels.Error) != 0;
case TraceEventType.Warning:
- return (Level & SourceLevels.Warning) != 0;
case TraceEventType.Information:
- return (Level & SourceLevels.Information) != 0;
case TraceEventType.Verbose:
- return (Level & SourceLevels.Verbose) != 0;
+ return (Level & (SourceLevels)eventType) != 0;
case TraceEventType.Start:
case TraceEventType.Stop:
case TraceEventType.Suspend:
@@ -78,6 +74,7 @@ namespace System.Diagnostics
}
}
+
protected override void OnValueChanged ()
{
SwitchSetting = (int) Enum.Parse (typeof (SourceLevels),
diff --git a/mcs/class/System/System.Diagnostics/StackFrame.jvm.cs b/mcs/class/System/System.Diagnostics/StackFrame.jvm.cs
deleted file mode 100644
index f752a68c6f1..00000000000
--- a/mcs/class/System/System.Diagnostics/StackFrame.jvm.cs
+++ /dev/null
@@ -1,347 +0,0 @@
-//
-// System.Diagnostics.StackFrame.cs
-//
-// Author:
-// Alexander Klyubin (klyubin@aqris.com)
-// Dietmar Maurer (dietmar@ximian.com)
-//
-// (C) 2001
-//
-
-using System;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-namespace System.Diagnostics {
- /// <summary>
- /// Stack frame.
- /// </summary>
-
- [Serializable]
- public class StackFrame {
- /// <value>
- /// Constant returned when the native or IL offset is unknown.
- /// </value>
- public const int OFFSET_UNKNOWN = -1;
-
- /// <value>
- /// Offset from the start of the IL code for the method
- /// being executed.
- /// </value>
- private int ilOffset = OFFSET_UNKNOWN;
-
- /// <value>
- /// Offset from the start of the native code for the method
- /// being executed.
- /// </value>
- private int nativeOffset = OFFSET_UNKNOWN;
-
- /// <value>
- /// Method associated with this stack frame.
- /// </value>
- private MethodBase methodBase;
-
- /// <value>
- /// File name.
- /// </value>
- private string fileName;
-
- /// <value>
- /// Line number.
- /// </value>
- private int lineNumber;
-
- /// <value>
- /// Column number.
- /// </value>
- private int columnNumber;
-#if TARGET_JVM
- static bool get_frame_info (int skip, bool needFileInfo, out MethodBase method,
- out int iloffset, out int native_offset,
- out string file, out int line, out int column)
- {
- native_offset = 0;
- line = 0;
- column = 0;
- file = "";
- iloffset = 0;
- method = null;
- return false;
- }
-#else
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static bool get_frame_info (int skip, bool needFileInfo, out MethodBase method,
- out int iloffset, out int native_offset,
- out string file, out int line, out int column);
-#endif
- /// <summary>
- /// Initializes a new StackFrame object corresponding to the
- /// active stack frame.
- /// </summary>
- public StackFrame()
- {
- get_frame_info (2, false, out methodBase, out ilOffset,
- out nativeOffset, out fileName, out lineNumber,
- out columnNumber);
- }
-
- /// <summary>
- /// Initializes a new StackFrame object corresponding to the
- /// active stack frame.
- /// </summary>
- /// <param name="needFileInfo">
- /// TODO:
- /// </param>
- public StackFrame(bool needFileInfo) : this() {
- get_frame_info (2, needFileInfo, out methodBase, out ilOffset,
- out nativeOffset, out fileName, out lineNumber,
- out columnNumber);
- }
-
- /// <summary>
- /// Initializes a new StackFrame object corresponding to the
- /// active stack frame.
- /// </summary>
- /// <param name="skipFrames">
- /// The number of frames up the stack to skip.
- /// </param>
- public StackFrame(int skipFrames) {
- get_frame_info (skipFrames + 2, false, out methodBase, out ilOffset,
- out nativeOffset, out fileName, out lineNumber,
- out columnNumber);
- }
-
- /// <summary>
- /// Initializes a new StackFrame object corresponding to the
- /// active stack frame.
- /// </summary>
- /// <param name="skipFrames">
- /// The number of frames up the stack to skip.
- /// </param>
- /// <param name="needFileInfo">
- /// TODO:
- /// </param>
- public StackFrame(int skipFrames, bool needFileInfo) {
- get_frame_info (skipFrames + 2, needFileInfo, out methodBase, out ilOffset,
- out nativeOffset, out fileName, out lineNumber,
- out columnNumber);
- }
-
- /// <summary>
- /// Constructs a fake stack frame that just contains the
- /// given file name and line number. Use this constructor
- /// when you do not want to use the debugger's line mapping
- /// logic.
- /// </summary>
- /// <param name="fileName">
- /// The given file name.
- /// </param>
- /// <param name="lineNumber">
- /// The line number in the specified file.
- /// </param>
- // LAMESPEC: According to the MSDN docs, this creates a
- // fake stack frame. But MS fills out the frame info as well
- public StackFrame(string fileName, int lineNumber) {
- get_frame_info (2, false, out methodBase, out ilOffset,
- out nativeOffset, out fileName, out lineNumber,
- out columnNumber);
- this.fileName = fileName;
- this.lineNumber = lineNumber;
- this.columnNumber = 0;
- }
-
- /// <summary>
- /// Constructs a fake stack frame that just contains the
- /// given file name and line number. Use this constructor
- /// when you do not want to use the debugger's line mapping
- /// logic.
- /// </summary>
- /// <param name="fileName">
- /// The given file name.
- /// </param>
- /// <param name="lineNumber">
- /// The line number in the specified file.
- /// </param>
- /// <param name="colNumber">
- /// The column number in the specified file.
- /// </param>
- // LAMESPEC: According to the MSDN docs, this creates a
- // fake stack frame. But MS fills out the frame info as well
- public StackFrame(string fileName,
- int lineNumber,
- int colNumber) {
- get_frame_info (2, false, out methodBase, out ilOffset,
- out nativeOffset, out fileName, out lineNumber,
- out columnNumber);
- this.fileName = fileName;
- this.lineNumber = lineNumber;
- this.columnNumber = colNumber;
- }
-
-
- /// <summary>
- /// Gets the line number in the file containing the code
- /// being executed. This information is typically extracted
- /// from the debugging symbols for the executable.
- /// </summary>
- /// <returns>
- /// The file line number or zero if it cannot be determined.
- /// </returns>
- public virtual int GetFileLineNumber()
- {
- return lineNumber;
- }
-
- /// <summary>
- /// Gets the column number in the file containing the code
- /// being executed. This information is typically extracted
- /// from the debugging symbols for the executable.
- /// </summary>
- /// <returns>
- /// The file column number or zero if it cannot be determined.
- /// </returns>
- public virtual int GetFileColumnNumber()
- {
- return columnNumber;
- }
-
- /// <summary>
- /// Gets the file name containing the code being executed.
- /// This information is typically extracted from the
- /// debugging symbols for the executable.
- /// </summary>
- /// <returns>
- /// The file name or null if it cannot be determined.
- /// </returns>
- public virtual string GetFileName()
- {
- return fileName;
- }
-
- /// <summary>
- /// Gets the offset from the start of the IL code for the
- /// method being executed. This offset may be approximate
- /// depending on whether the JIT compiler is generating
- /// debugging code or not.
- /// </summary>
- /// <returns>
- /// The offset from the start of the IL code for the method
- /// being executed.
- /// </returns>
- public virtual int GetILOffset()
- {
- return ilOffset;
- }
-
- /// <summary>
- /// Gets the method in which the frame is executing.
- /// </summary>
- /// <returns>
- /// The method the frame is executing in.
- /// </returns>
- public virtual MethodBase GetMethod()
- {
- return methodBase;
- }
-
- /// <summary>
- /// Gets the offset from the start of the native
- /// (JIT-compiled) code for the method being executed.
- /// </summary>
- /// <returns>
- /// The offset from the start of the native (JIT-compiled)
- /// code or the method being executed.
- /// </returns>
- public virtual int GetNativeOffset()
- {
- return nativeOffset;
- }
-
- /// <summary>
- /// Builds a readable representation of the stack frame.
- /// </summary>
- /// <returns>
- /// A readable representation of the stack frame.
- /// </returns>
- public override string ToString() {
- string methodNameString =
- (GetMethod() == null)
- ? "<unknown method>"
- : GetMethod().Name;
- string offsetString =
- (GetILOffset() == OFFSET_UNKNOWN)
- ? "<unknown offset>"
- : "offset " + GetILOffset();
- string fileNameString =
- (GetFileName() == null)
- ? "<filename unknown>" : GetFileName();
- return methodNameString + " at " + offsetString
- + " in file:line:column " + fileNameString
- + ":" + GetFileLineNumber()
- + ":" + GetFileColumnNumber();
- }
-
- public override bool Equals(Object obj) {
- if ((obj == null) || (!(obj is StackFrame))) {
- return false;
- }
-
- StackFrame rhs = (StackFrame) obj;
-
- if (!ObjectsEqual(GetMethod(), rhs.GetMethod())) {
- return false;
- }
-
- if (!ObjectsEqual(GetFileName(), rhs.GetFileName())) {
- return false;
- }
-
- if (GetFileLineNumber() != rhs.GetFileLineNumber()) {
- return false;
- }
-
- if (GetFileColumnNumber() != rhs.GetFileColumnNumber()) {
- return false;
- }
-
- if (GetILOffset() != rhs.GetILOffset()) {
- return false;
- }
-
- if (GetNativeOffset() != rhs.GetNativeOffset()) {
- return false;
- }
-
- return true;
-
- }
-
- public override int GetHashCode() {
- return GetFileLineNumber();
- }
-
- /// <summary>
- /// Checks whether two objects are equal.
- /// The objects are assumed equal if and only if either
- /// both of the references are <code>null</code> or they
- /// equal via <code>Equals</code> method.
- /// </summary>
- /// <param name="obj1">
- /// First object.
- /// </param>
- /// <param name="obj2">
- /// Second object.
- /// </param>
- /// <returns>
- /// <code>true</code> if the two objects are equal,
- /// </code>false</code> otherwise.
- /// </returns>
- private static bool ObjectsEqual(Object obj1, Object obj2) {
- if (obj1 == null) {
- return (obj2 == null);
- } else {
- return obj1.Equals(obj2);
- }
- }
- }
-}
diff --git a/mcs/class/System/System.Diagnostics/StackTrace.jvm.cs b/mcs/class/System/System.Diagnostics/StackTrace.jvm.cs
deleted file mode 100644
index 191e38a2cef..00000000000
--- a/mcs/class/System/System.Diagnostics/StackTrace.jvm.cs
+++ /dev/null
@@ -1,287 +0,0 @@
-//
-// System.Diagnostics.StackTrace.cs
-//
-// Author:
-// Alexander Klyubin (klyubin@aqris.com)
-// Dietmar Maurer (dietmar@ximian.com)
-//
-// (C) 2001
-//
-
-using System;
-using System.Reflection;
-using System.Threading;
-using System.Runtime.CompilerServices;
-using System.Collections;
-
-namespace System.Diagnostics {
- /// <summary>
- /// Stack trace.
- /// TODO: more information.
- /// </summary>
- [Serializable]
- public class StackTrace {
- /// <value>
- /// Uses a constant to define the number of methods that are
- /// to be omitted from the stack trace.
- /// </value>
- public const int METHODS_TO_SKIP = 0;
-
- /// <value>
- /// Frames. First frame is the last stack frame pushed.
- /// </value>
- private StackFrame[] frames;
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class.
- /// </summary>
- [MonoTODO]
- public StackTrace() {
- init_frames (METHODS_TO_SKIP, false);
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class.
- /// </summary>
- /// <param name="needFileInfo">
- /// TODO:
- /// </param>
- public StackTrace(bool needFileInfo) {
- init_frames (METHODS_TO_SKIP, needFileInfo);
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class
- /// from the current location, in a caller's frame.
- /// </summary>
- /// <param name="skipFrames">
- /// The number of frames up the stack to start the trace
- /// from.
- /// </param>
- public StackTrace(int skipFrames) {
- init_frames (skipFrames, false);
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class
- /// from the current location, in a caller's frame.
- /// </summary>
- /// <param name="skipFrames">
- /// The number of frames up the stack to start the trace
- /// from.
- /// </param>
- /// <param name="needFileInfo">
- /// TODO:
- /// </param>
- public StackTrace(int skipFrames, bool needFileInfo) {
- init_frames (skipFrames, needFileInfo);
- }
-
- void init_frames (int skipFrames, bool needFileInfo)
- {
- StackFrame sf;
- ArrayList al = new ArrayList ();
-
- skipFrames += 2;
-
- while ((sf = new StackFrame (skipFrames, needFileInfo)) != null &&
- sf.GetMethod () != null) {
-
- al.Add (sf);
- skipFrames++;
- };
-
- frames = (StackFrame [])al.ToArray (typeof (StackFrame));
- }
-#if TARGET_JVM
- static StackFrame [] get_trace (Exception e, int skipFrames, bool needFileInfo)
- {
- return null;
- }
-#else
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static StackFrame [] get_trace (Exception e, int skipFrames, bool needFileInfo);
-#endif
- /// <summary>
- /// Initializes a new instance of the StackTrace class.
- /// </summary>
- /// <param name="e">
- /// TODO:
- /// </param>
- public StackTrace(Exception e)
- {
- frames = get_trace (e, METHODS_TO_SKIP, false);
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class,
- /// using the provided exception object. The resulting stack
- /// trace describes the stack at the time of the exception.
- /// </summary>
- /// <param name="e">
- /// TODO:
- /// </param>
- /// <param name="needFileInfo">
- /// TODO:
- /// </param>
- public StackTrace(Exception e, bool needFileInfo) {
- frames = get_trace (e, METHODS_TO_SKIP, needFileInfo);
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class,
- /// using the provided exception object. The resulting stack
- /// trace describes the stack at the time of the exception.
- /// </summary>
- /// <param name="e">
- /// Exception.
- /// </param>
- /// <param name="skipFrames">
- /// The number of frames up the stack to start the trace
- /// from.
- /// </param>
- public StackTrace(Exception e, int skipFrames) {
- frames = get_trace (e, skipFrames, false);
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class,
- /// using the provided exception object. The resulting stack
- /// trace describes the stack at the time of the exception.
- /// </summary>
- /// <param name="e">
- /// Exception.
- /// </param>
- /// <param name="skipFrames">
- /// The number of frames up the stack to start the trace
- /// from.
- /// </param>
- /// <param name="needFileInfo">
- /// TODO:
- /// </param>
- public StackTrace(Exception e, int skipFrames, bool needFileInfo) {
- frames = get_trace (e, skipFrames, needFileInfo);
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class
- /// containing a single frame.
- /// </summary>
- /// <param name="frame">
- /// The frame that the StackTrace object should contain.
- /// </param>
- public StackTrace(StackFrame frame) {
- this.frames = new StackFrame[1];
- this.frames[0] = frame;
- }
-
- /// <summary>
- /// Initializes a new instance of the StackTrace class.
- /// </summary>
- /// <param name="targetThread">
- /// TODO:
- /// </param>
- /// <param name="needFileInfo">
- /// TODO:
- /// </param>
- [MonoTODO]
- public StackTrace(Thread targetThread, bool needFileInfo) {
- throw new NotImplementedException();
- }
-
- /// <summary>
- /// Holds the number of frames in the stack trace.
- /// </summary>
- public virtual int FrameCount {
- get {
- return (frames == null) ? 0 : frames.Length;
- }
- }
-
- /// <summary>
- /// Gets the specified stack frame.
- /// </summary>
- /// <param name="index">
- /// The index of the stack frame requested.
- /// </param>
- /// <returns>
- /// The specified stack frame. Returns <code>null</code> if
- /// frame with specified index does not exist in this stack
- /// trace.
- /// </returns>
- /// <remarks>
- /// Stack frames are numbered starting at zero, which is the
- /// last stack frame pushed.
- /// </remarks>
- public virtual StackFrame GetFrame(int index) {
- if ((index < 0) || (index >= FrameCount)) {
- return null;
- }
-
- return frames[index];
- }
-
- /// <summary>
- /// Builds a readable representation of the stack trace.
- /// </summary>
- /// <returns>
- /// A readable representation of the stack trace.
- /// </returns>
- public override string ToString() {
- string result = "";
- for (int i = 0; i < FrameCount; i++) {
- StackFrame frame = GetFrame(i);
- result += "\n\tat " + FrameToString(frame);
- }
-
- return result;
- }
-
- public override bool Equals(Object obj) {
- if ((obj == null) || (!(obj is StackTrace))) {
- return false;
- }
-
- StackTrace rhs = (StackTrace) obj;
-
- if (FrameCount != rhs.FrameCount) {
- return false;
- }
-
- for (int i = 0; i < FrameCount; i++) {
- if (!GetFrame(i).Equals(rhs.GetFrame(i))) {
- return false;
- }
- }
-
- return true;
- }
-
- public override int GetHashCode() {
- return FrameCount;
- }
-
- /// <summary>
- /// Converts single stack frame to string to be used in
- /// ToString method.
- /// </summary>
- /// <param name="frame">
- /// Frame to convert.
- /// </param>
- /// <returns>
- /// A readable representation of stack frame for using
- /// ToString.
- /// </returns>
- private static String FrameToString(StackFrame frame) {
- MethodBase method = frame.GetMethod();
- if (method != null) {
- // Method information available
- return method.DeclaringType.FullName
- + "." + method.Name + "()";
- } else {
- // Method information not available
- return "<unknown method>";
- }
- }
- }
-}
diff --git a/mcs/class/System/System.Diagnostics/Switch.cs b/mcs/class/System/System.Diagnostics/Switch.cs
index 216cde7fa24..94d1f4d19fe 100644
--- a/mcs/class/System/System.Diagnostics/Switch.cs
+++ b/mcs/class/System/System.Diagnostics/Switch.cs
@@ -64,8 +64,8 @@ namespace System.Diagnostics
protected Switch(string displayName, string description)
{
- this.name = displayName;
- this.description = description;
+ this.name = displayName ?? string.Empty;
+ this.description = description ?? string.Empty;
}
protected Switch(string displayName, string description, string defaultSwitchValue)
diff --git a/mcs/class/System/System.Diagnostics/TraceEventCache.jvm.cs b/mcs/class/System/System.Diagnostics/TraceEventCache.jvm.cs
deleted file mode 100755
index 420876d3ba1..00000000000
--- a/mcs/class/System/System.Diagnostics/TraceEventCache.jvm.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-///
-/// Stub class
-///
-
-using System;
-using System.Collections;
-using System.Text;
-using System.Threading;
-
-namespace System.Diagnostics
-{
- [MonoTODO]
- public class TraceEventCache
- {
- [MonoTODO]
- public string Callstack
- {
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public DateTime DateTime
- {
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public Stack LogicalOperationStack
- {
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public int ProcessId
- {
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public string ThreadId
- {
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public long Timestamp
- {
- get { throw new NotImplementedException(); }
- }
- }
-}
-
diff --git a/mcs/class/System/System.Diagnostics/TraceListener.cs b/mcs/class/System/System.Diagnostics/TraceListener.cs
index 7bb49150b5e..f4dbc6e58ec 100644
--- a/mcs/class/System/System.Diagnostics/TraceListener.cs
+++ b/mcs/class/System/System.Diagnostics/TraceListener.cs
@@ -43,55 +43,6 @@ namespace System.Diagnostics {
public abstract class TraceListener : MarshalByRefObject, IDisposable {
-#if TARGET_JVM
- readonly LocalDataStoreSlot _indentLevelStore = System.Threading.Thread.AllocateDataSlot ();
- readonly LocalDataStoreSlot _indentSizeStore = System.Threading.Thread.AllocateDataSlot ();
- readonly LocalDataStoreSlot _attributesStore = System.Threading.Thread.AllocateDataSlot ();
- readonly LocalDataStoreSlot _filterStore = System.Threading.Thread.AllocateDataSlot ();
- readonly LocalDataStoreSlot _optionsStore = System.Threading.Thread.AllocateDataSlot ();
-
- private int indentLevel {
- get {
- object o = System.Threading.Thread.GetData (_indentLevelStore);
- if (o == null)
- return 0;
- return (int) o;
- }
- set { System.Threading.Thread.SetData (_indentLevelStore, value); }
- }
-
- private int indentSize {
- get {
- object o = System.Threading.Thread.GetData (_indentSizeStore);
- if (o == null)
- return 4;
- return (int) o;
- }
- set { System.Threading.Thread.SetData (_indentSizeStore, value); }
- }
-
- private StringDictionary attributes {
- get { return (StringDictionary) System.Threading.Thread.GetData (_attributesStore); }
- set { System.Threading.Thread.SetData (_attributesStore, value); }
- }
-
-#if !MOBILE
- private TraceFilter filter {
- get { return (TraceFilter) System.Threading.Thread.GetData (_filterStore); }
- set { System.Threading.Thread.SetData (_filterStore, value); }
- }
-#endif
-
- private TraceOptions options {
- get {
- object o = System.Threading.Thread.GetData (_optionsStore);
- if (o == null)
- return TraceOptions.None;
- return (TraceOptions) o;
- }
- set { System.Threading.Thread.SetData (_optionsStore, value); }
- }
-#else
[ThreadStatic]
private int indentLevel = 0;
@@ -106,7 +57,6 @@ namespace System.Diagnostics {
#endif
[ThreadStatic]
private TraceOptions options;
-#endif
private string name;
private bool needIndent = true;
diff --git a/mcs/class/System/System.IO.Compression/DefalteStream.jvm.cs b/mcs/class/System/System.IO.Compression/DefalteStream.jvm.cs
deleted file mode 100644
index 2c5cc758a7a..00000000000
--- a/mcs/class/System/System.IO.Compression/DefalteStream.jvm.cs
+++ /dev/null
@@ -1,369 +0,0 @@
-//
-// DeflateStream.cs
-//
-// Authors:
-// Konstantin Triger <kostat@mainsoft.com>
-//
-// (c) 2008 Mainsoft corp. <http://www.mainsoft.com>
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Runtime.Remoting.Messaging;
-using java.io;
-using java.util.zip;
-using vmw.common;
-
-namespace System.IO.Compression
-{
- public class DeflateStream : Stream
- {
- readonly Stream _baseStream;
- readonly InflaterInputStream _reader;
- readonly DeflaterOutputStream _writer;
-
- readonly bool _leaveOpen;
- bool _open;
-
- delegate int ReadMethod (byte [] array, int offset, int count);
- delegate void WriteMethod (byte [] array, int offset, int count);
-
- internal DeflateStream (Stream compressedStream, CompressionMode mode, bool leaveOpen, bool gzip) {
- if (compressedStream == null)
- throw new ArgumentNullException ("compressedStream");
-
- switch (mode) {
- case CompressionMode.Compress:
- if (!compressedStream.CanWrite)
- throw new ArgumentException ("The base stream is not writeable.");
- OutputStream outStream = new OutputStreamImpl(compressedStream);
- _writer = gzip ? new GZIPOutputStream (outStream) : new DeflaterOutputStream (outStream, new Deflater (Deflater.DEFAULT_COMPRESSION, true));
- break;
- case CompressionMode.Decompress:
- if (!compressedStream.CanRead)
- throw new ArgumentException ("The base stream is not readable.");
- InputStream inStream = new InputStreamImpl (compressedStream);
- _reader = gzip ? new GZIPInputStream (inStream) : new InflaterInputStream (inStream, new Inflater (true));
- break;
- default:
- throw new ArgumentException ("mode");
- }
-
- _baseStream = compressedStream;
- _leaveOpen = leaveOpen;
- _open = true;
- }
-
- public DeflateStream (Stream compressedStream, CompressionMode mode)
- :
- this (compressedStream, mode, false, false) { }
-
- public DeflateStream (Stream compressedStream, CompressionMode mode, bool leaveOpen)
- :
- this (compressedStream, mode, leaveOpen, false) { }
-
- protected override void Dispose (bool disposing) {
- if (!_open) {
- base.Dispose (disposing);
- return;
- }
-
- try {
- FlushInternal (true);
- base.Dispose (disposing);
- }
- finally {
- _open = false;
- if (!_leaveOpen)
- _baseStream.Close ();
- }
- }
-
- private int ReadInternal (byte [] array, int offset, int count) {
- int r = _reader.read (TypeUtils.ToSByteArray (array), offset, count);
- return r < 0 ? 0 : r;
- }
-
- public override int Read (byte [] dest, int dest_offset, int count) {
- if (!_open)
- throw new ObjectDisposedException ("DeflateStream");
- if (dest == 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)
- throw new ArgumentException ("Dest or count is negative.");
- if (dest_offset > len)
- throw new ArgumentException ("destination offset is beyond array size");
- if ((dest_offset + count) > len)
- throw new ArgumentException ("Reading would overrun buffer");
-
- return ReadInternal (dest, dest_offset, count);
- }
-
- private void WriteInternal (byte [] array, int offset, int count) {
- _writer.write (TypeUtils.ToSByteArray (array), offset, count);
- }
-
- public override void Write (byte [] src, int src_offset, int count) {
- if (!_open)
- throw new ObjectDisposedException ("DeflateStream");
-
- if (src == null)
- throw new ArgumentNullException ("src");
-
- if (src_offset < 0)
- throw new ArgumentOutOfRangeException ("src_offset");
-
- if (count < 0)
- throw new ArgumentOutOfRangeException ("count");
-
- if (!CanWrite)
- throw new NotSupportedException ("Stream does not support writing");
-
- WriteInternal (src, src_offset, count);
- }
-
- private void FlushInternal (bool finish) {
- if (!_open)
- throw new ObjectDisposedException ("DeflateStream");
-
- if (_writer != null) {
- _writer.flush ();
-
- if (finish)
- _writer.finish ();
- }
- }
-
- public override void Flush () {
- FlushInternal (false);
- }
-
- public override long Seek (long offset, SeekOrigin origin) {
- throw new System.NotSupportedException ();
- }
-
- public override void SetLength (long value) {
- throw new System.NotSupportedException ();
- }
-
- public override IAsyncResult BeginRead (byte [] buffer, int offset, int count,
- AsyncCallback cback, object state) {
- if (!_open)
- throw new ObjectDisposedException ("DeflateStream");
-
- if (!CanRead)
- throw new NotSupportedException ("This stream does not support reading");
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (count < 0)
- throw new ArgumentOutOfRangeException ("count", "Must be >= 0");
-
- if (offset < 0)
- throw new ArgumentOutOfRangeException ("offset", "Must be >= 0");
-
- if (count + offset > buffer.Length)
- throw new ArgumentException ("Buffer too small. count/offset wrong.");
-
- ReadMethod r = new ReadMethod (ReadInternal);
- return r.BeginInvoke (buffer, offset, count, cback, state);
- }
-
- public override IAsyncResult BeginWrite (byte [] buffer, int offset, int count,
- AsyncCallback cback, object state) {
- if (!_open)
- throw new ObjectDisposedException ("DeflateStream");
-
- if (!CanWrite)
- throw new InvalidOperationException ("This stream does not support writing");
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (count < 0)
- throw new ArgumentOutOfRangeException ("count", "Must be >= 0");
-
- if (offset < 0)
- throw new ArgumentOutOfRangeException ("offset", "Must be >= 0");
-
- if (count + offset > buffer.Length)
- throw new ArgumentException ("Buffer too small. count/offset wrong.");
-
- WriteMethod w = new WriteMethod (WriteInternal);
- return w.BeginInvoke (buffer, offset, count, cback, state);
- }
-
- public override int EndRead (IAsyncResult async_result) {
- if (async_result == null)
- throw new ArgumentNullException ("async_result");
-
- AsyncResult ares = async_result as AsyncResult;
- if (ares == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
-
- ReadMethod r = ares.AsyncDelegate as ReadMethod;
- if (r == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
-
- return r.EndInvoke (async_result);
- }
-
- public override void EndWrite (IAsyncResult async_result) {
- if (async_result == null)
- throw new ArgumentNullException ("async_result");
-
- AsyncResult ares = async_result as AsyncResult;
- if (ares == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
-
- WriteMethod w = ares.AsyncDelegate as WriteMethod;
- if (w == null)
- throw new ArgumentException ("Invalid IAsyncResult", "async_result");
-
- w.EndInvoke (async_result);
- }
-
- public Stream BaseStream {
- get {
- return _baseStream;
- }
- }
- public override bool CanRead {
- get {
- return _open && _reader != null;
- }
- }
- public override bool CanSeek {
- get {
- return false;
- }
- }
- public override bool CanWrite {
- get {
- return _open && _writer != null;
- }
- }
- public override long Length {
- get {
- throw new NotSupportedException ();
- }
- }
- public override long Position {
- get {
- throw new NotSupportedException ();
- }
- set {
- throw new NotSupportedException ();
- }
- }
-
- #region InputStreamImpl
-
- sealed class InputStreamImpl : InputStream
- {
- readonly Stream _stream;
-
- public InputStreamImpl (Stream stream) {
- _stream = stream;
- }
-
- public override void close () {
- BaseStream.Close ();
- }
-
- public override int read () {
- return BaseStream.ReadByte ();
- }
-
- public override int read (sbyte [] b, int off, int len) {
- int r = BaseStream.Read ((byte []) TypeUtils.ToByteArray (b), off, len);
- return r == 0 ? -1 : r;
- }
-
- public override long skip (long n) {
- return BaseStream.Seek (n, SeekOrigin.Current);
- }
-
- public override bool Equals (object obj) {
- return (obj is InputStreamImpl) &&
- BaseStream.Equals (((InputStreamImpl) obj).BaseStream);
- }
-
- public override int GetHashCode () {
- return _stream.GetHashCode ();
- }
-
- public Stream BaseStream {
- get { return _stream; }
- }
- }
-
- #endregion
-
- #region OutputStreamImpl
-
- sealed class OutputStreamImpl : OutputStream
- {
- readonly Stream _stream;
-
- public OutputStreamImpl (Stream stream) {
- _stream = stream;
- }
-
- public override void close () {
- BaseStream.Close ();
- }
-
- public override void flush () {
- BaseStream.Flush ();
- }
-
- public override void write (int b) {
- BaseStream.WriteByte ((byte) (b & 0xFF));
- }
-
- public override void write (sbyte [] b, int off, int len) {
- BaseStream.Write ((byte []) TypeUtils.ToByteArray (b), off, len);
- }
-
- public override bool Equals (object obj) {
- return (obj is OutputStreamImpl) &&
- BaseStream.Equals (((OutputStreamImpl) obj).BaseStream);
- }
-
- public override int GetHashCode () {
- return _stream.GetHashCode ();
- }
-
- public Stream BaseStream {
- get { return _stream; }
- }
- }
-
- #endregion
- }
-}
diff --git a/mcs/class/System/System.IO.Compression/DeflateStream.cs b/mcs/class/System/System.IO.Compression/DeflateStream.cs
index 02c0c9f6b02..726edf3f113 100644
--- a/mcs/class/System/System.IO.Compression/DeflateStream.cs
+++ b/mcs/class/System/System.IO.Compression/DeflateStream.cs
@@ -81,19 +81,20 @@ namespace System.IO.Compression
}
#if NET_4_5
- [MonoTODO]
public DeflateStream (Stream stream, CompressionLevel compressionLevel)
- : this (stream, CompressionMode.Compress)
+ : this (stream, compressionLevel, false, false)
{
- throw new NotImplementedException ();
}
- [MonoTODO]
public DeflateStream (Stream stream, CompressionLevel compressionLevel, bool leaveOpen)
- : this (stream, CompressionMode.Compress, leaveOpen)
+ : this (stream, compressionLevel, leaveOpen, false)
{
- throw new NotImplementedException ();
}
+
+ internal DeflateStream (Stream stream, CompressionLevel compressionLevel, bool leaveOpen, bool gzip)
+ : this (stream, CompressionMode.Compress, leaveOpen, gzip)
+ {
+ }
#endif
protected override void Dispose (bool disposing)
@@ -395,24 +396,15 @@ namespace System.IO.Compression
int UnmanagedRead (IntPtr buffer, int length)
{
- int total = 0;
- int n = 1;
- while (length > 0 && n > 0) {
- if (io_buffer == null)
- io_buffer = new byte [BufferSize];
+ if (io_buffer == null)
+ io_buffer = new byte [BufferSize];
- int count = Math.Min (length, io_buffer.Length);
- n = base_stream.Read (io_buffer, 0, count);
- if (n > 0) {
- Marshal.Copy (io_buffer, 0, buffer, n);
- unsafe {
- buffer = new IntPtr ((byte *) buffer.ToPointer () + n);
- }
- length -= n;
- total += n;
- }
- }
- return total;
+ int count = Math.Min (length, io_buffer.Length);
+ int n = base_stream.Read (io_buffer, 0, count);
+ if (n > 0)
+ Marshal.Copy (io_buffer, 0, buffer, n);
+
+ return n;
}
#if MONOTOUCH
diff --git a/mcs/class/System/System.IO.Compression/GZipStream.cs b/mcs/class/System/System.IO.Compression/GZipStream.cs
index 5ee3ccccff5..96fe159a441 100644
--- a/mcs/class/System/System.IO.Compression/GZipStream.cs
+++ b/mcs/class/System/System.IO.Compression/GZipStream.cs
@@ -50,18 +50,14 @@ namespace System.IO.Compression {
#if NET_4_5
- [MonoTODO]
public GZipStream (Stream stream, CompressionLevel compressionLevel)
- : this (stream, CompressionMode.Compress)
+ : this (stream, compressionLevel, false)
{
- throw new NotImplementedException ();
}
- [MonoTODO]
public GZipStream (Stream stream, CompressionLevel compressionLevel, bool leaveOpen)
- : this (stream, CompressionMode.Compress, leaveOpen)
{
- throw new NotImplementedException ();
+ this.deflateStream = new DeflateStream (stream, compressionLevel, leaveOpen, true);
}
#endif
diff --git a/mcs/class/System/System.IO.Ports/SerialPort.cs b/mcs/class/System/System.IO.Ports/SerialPort.cs
index 6d091336989..08a9a655b2e 100644
--- a/mcs/class/System/System.IO.Ports/SerialPort.cs
+++ b/mcs/class/System/System.IO.Ports/SerialPort.cs
@@ -572,12 +572,10 @@ namespace System.IO.Ports
if (is_open)
throw new InvalidOperationException ("Port is already open");
-#if !TARGET_JVM
if (IsWindows) // Use windows kernel32 backend
stream = new WinSerialStream (port_name, baud_rate, data_bits, parity, stop_bits, dtr_enable,
rts_enable, handshake, read_timeout, write_timeout, readBufferSize, writeBufferSize);
else // Use standard unix backend
-#endif
stream = new SerialPortStream (port_name, baud_rate, data_bits, parity, stop_bits, dtr_enable,
rts_enable, handshake, read_timeout, write_timeout, readBufferSize, writeBufferSize);
diff --git a/mcs/class/System/System.IO.Ports/SerialPortStream.cs b/mcs/class/System/System.IO.Ports/SerialPortStream.cs
index dd4ac22f98b..b9bac730668 100644
--- a/mcs/class/System/System.IO.Ports/SerialPortStream.cs
+++ b/mcs/class/System/System.IO.Ports/SerialPortStream.cs
@@ -211,7 +211,10 @@ namespace System.IO.Ports
~SerialPortStream ()
{
- Dispose (false);
+ try {
+ Dispose (false);
+ } catch (IOException) {
+ }
}
void CheckDisposed ()
diff --git a/mcs/class/System/System.IO.Ports/WinSerialStream.cs b/mcs/class/System/System.IO.Ports/WinSerialStream.cs
index fc0d45dbd20..3470f2a8768 100644
--- a/mcs/class/System/System.IO.Ports/WinSerialStream.cs
+++ b/mcs/class/System/System.IO.Ports/WinSerialStream.cs
@@ -238,7 +238,6 @@ namespace System.IO.Ports
throw new NotSupportedException();
}
-#if !TARGET_JVM
[DllImport("kernel32", SetLastError = true)]
static extern unsafe bool ReadFile (int handle, byte* buffer, int bytes_to_read,
out int bytes_read, IntPtr overlapped);
@@ -246,7 +245,6 @@ namespace System.IO.Ports
[DllImport("kernel32", SetLastError = true)]
static extern unsafe bool GetOverlappedResult (int handle, IntPtr overlapped,
ref int bytes_transfered, bool wait);
-#endif
public override int Read ([In, Out] byte [] buffer, int offset, int count)
{
@@ -283,11 +281,9 @@ namespace System.IO.Ports
return bytes_read;
}
-#if !TARGET_JVM
[DllImport("kernel32", SetLastError = true)]
static extern unsafe bool WriteFile (int handle, byte* buffer, int bytes_to_write,
out int bytes_written, IntPtr overlapped);
-#endif
public override void Write (byte [] buffer, int offset, int count)
{
diff --git a/mcs/class/System/System.Net.Mail/SmtpClient.cs b/mcs/class/System/System.Net.Mail/SmtpClient.cs
index 4188a96c321..81a5a04d1b6 100644
--- a/mcs/class/System/System.Net.Mail/SmtpClient.cs
+++ b/mcs/class/System/System.Net.Mail/SmtpClient.cs
@@ -661,16 +661,8 @@ namespace System.Net.Mail {
sfre.Add (new SmtpFailedRecipientException (status.StatusCode, message.Bcc [i].Address));
}
-#if TARGET_JVM // List<T>.ToArray () is not supported
- if (sfre.Count > 0) {
- SmtpFailedRecipientException[] xs = new SmtpFailedRecipientException[sfre.Count];
- sfre.CopyTo (xs);
- throw new SmtpFailedRecipientsException ("failed recipients", xs);
- }
-#else
if (sfre.Count >0)
throw new SmtpFailedRecipientsException ("failed recipients", sfre.ToArray ());
-#endif
// DATA
status = SendCommand ("DATA");
@@ -978,11 +970,7 @@ try {
case TransferEncoding.Base64:
byte [] content = new byte [av.ContentStream.Length];
av.ContentStream.Read (content, 0, content.Length);
-#if TARGET_JVM
- SendData (Convert.ToBase64String (content));
-#else
SendData (Convert.ToBase64String (content, Base64FormattingOptions.InsertLineBreaks));
-#endif
break;
case TransferEncoding.QuotedPrintable:
byte [] bytes = new byte [av.ContentStream.Length];
@@ -1022,11 +1010,7 @@ try {
case TransferEncoding.Base64:
byte [] content = new byte [lr.ContentStream.Length];
lr.ContentStream.Read (content, 0, content.Length);
-#if TARGET_JVM
- SendData (Convert.ToBase64String (content));
-#else
SendData (Convert.ToBase64String (content, Base64FormattingOptions.InsertLineBreaks));
-#endif
break;
case TransferEncoding.QuotedPrintable:
byte [] bytes = new byte [lr.ContentStream.Length];
@@ -1058,11 +1042,7 @@ try {
att.ContentStream.Read (content, 0, content.Length);
switch (att.TransferEncoding) {
case TransferEncoding.Base64:
-#if TARGET_JVM
- SendData (Convert.ToBase64String (content));
-#else
SendData (Convert.ToBase64String (content, Base64FormattingOptions.InsertLineBreaks));
-#endif
break;
case TransferEncoding.QuotedPrintable:
SendData (ToQuotedPrintable (content));
@@ -1198,9 +1178,7 @@ try {
throw new SmtpException (SmtpStatusCode.GeneralFailure, "Server does not support secure connections.");
}
-#if TARGET_JVM
- ((NetworkStream) stream).ChangeToSSLSocket ();
-#elif SECURITY_DEP
+#if SECURITY_DEP
SslStream sslStream = new SslStream (stream, false, callback, null);
CheckCancellation ();
sslStream.AuthenticateAsClient (Host, this.ClientCertificates, SslProtocols.Default, false);
diff --git a/mcs/class/System/System.Net.Mail/SmtpException.cs b/mcs/class/System/System.Net.Mail/SmtpException.cs
index 4c76fd9bb9d..ceda2dd7b9c 100644
--- a/mcs/class/System/System.Net.Mail/SmtpException.cs
+++ b/mcs/class/System/System.Net.Mail/SmtpException.cs
@@ -98,12 +98,10 @@ namespace System.Net.Mail {
base.GetObjectData (info, context);
info.AddValue ("Status", statusCode, typeof (int));
}
-#if !TARGET_JVM //remove private implementation
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
{
GetObjectData (info, context);
}
-#endif
}
}
diff --git a/mcs/class/System/System.Net.Mail/SmtpFailedRecipientException.cs b/mcs/class/System/System.Net.Mail/SmtpFailedRecipientException.cs
index 5d8c462364b..c4dbe9c0341 100644
--- a/mcs/class/System/System.Net.Mail/SmtpFailedRecipientException.cs
+++ b/mcs/class/System/System.Net.Mail/SmtpFailedRecipientException.cs
@@ -98,12 +98,10 @@ namespace System.Net.Mail {
base.GetObjectData (serializationInfo, streamingContext);
serializationInfo.AddValue ("failedRecipient", failedRecipient);
}
-#if !TARGET_JVM //remove private implementation
void ISerializable.GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
GetObjectData (serializationInfo, streamingContext);
}
-#endif
#endregion // Methods
}
diff --git a/mcs/class/System/System.Net.Mail/SmtpFailedRecipientsException.cs b/mcs/class/System/System.Net.Mail/SmtpFailedRecipientsException.cs
index dcfab22b6d4..6f2e3af8e50 100644
--- a/mcs/class/System/System.Net.Mail/SmtpFailedRecipientsException.cs
+++ b/mcs/class/System/System.Net.Mail/SmtpFailedRecipientsException.cs
@@ -88,12 +88,10 @@ namespace System.Net.Mail {
info.AddValue ("innerExceptions", innerExceptions);
}
-#if !TARGET_JVM //remove private implementation
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
{
GetObjectData (info, context);
}
-#endif
#endregion // Methods
}
diff --git a/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs b/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs
index 249a55b0f4c..feeaec42d50 100644
--- a/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs
+++ b/mcs/class/System/System.Net.NetworkInformation/LinuxNetworkInterfaceMarshal.cs
@@ -85,8 +85,15 @@ namespace System.Net.NetworkInformation {
public ushort sll_hatype;
public byte sll_pkttype;
public byte sll_halen;
-
+#if MONODROID
+ // In MonoDroid the structure has larger space allocated for the address part since there exist
+ // addresses (Infiniband, ipv6 tunnels) which exceed the standard 8 bytes. In fact, glibc's
+ // getifaddrs implementation also uses the bigger size, but for compatibility with other libc
+ // implementations we use the standard address size
+ [MarshalAs (UnmanagedType.ByValArray, SizeConst=24)]
+#else
[MarshalAs (UnmanagedType.ByValArray, SizeConst=8)]
+#endif
public byte[] sll_addr;
}
@@ -96,11 +103,18 @@ namespace System.Net.NetworkInformation {
PRONET = 4,
ATM = 19,
SLIP = 256,
+ CSLIP = 257,
+ SLIP6 = 258,
+ CSLIP6 = 259,
PPP = 512,
LOOPBACK = 772,
FDDI = 774,
TUNNEL = 768,
- TUNNEL6 = 769
+ TUNNEL6 = 769,
+ SIT = 776, // IPv6-in-IPv4 tunnel
+ IPDDP = 777, // IP over DDP tunnel
+ IPGRE = 778, // GRE over IP
+ IP6GRE = 823 // GRE over IPv6
}
}
diff --git a/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs b/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
index 18b3b471642..edaa12dafb3 100644
--- a/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
+++ b/mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
@@ -238,11 +238,29 @@ namespace System.Net.NetworkInformation {
get { return iface_path; }
}
+ static int GetInterfaceAddresses (out IntPtr ifap)
+ {
+#if MONODROID
+ return AndroidPlatform.GetInterfaceAddresses (out ifap);
+#else
+ return getifaddrs (out ifap);
+#endif
+ }
+
+ static void FreeInterfaceAddresses (IntPtr ifap)
+ {
+#if MONODROID
+ AndroidPlatform.FreeInterfaceAddresses (ifap);
+#else
+ freeifaddrs (ifap);
+#endif
+ }
+
public static NetworkInterface [] ImplGetAllNetworkInterfaces ()
{
var interfaces = new Dictionary <string, LinuxNetworkInterface> ();
IntPtr ifap;
- if (getifaddrs (out ifap) != 0)
+ if (GetInterfaceAddresses (out ifap) != 0)
throw new SystemException ("getifaddrs() failed");
try {
@@ -254,6 +272,7 @@ namespace System.Net.NetworkInformation {
int index = -1;
byte[] macAddress = null;
NetworkInterfaceType type = NetworkInterfaceType.Unknown;
+ int nullNameCount = 0;
if (addr.ifa_addr != IntPtr.Zero) {
sockaddr_in sockaddr = (sockaddr_in) Marshal.PtrToStructure (addr.ifa_addr, typeof (sockaddr_in));
@@ -295,6 +314,9 @@ namespace System.Net.NetworkInformation {
break;
case LinuxArpHardware.SLIP:
+ case LinuxArpHardware.CSLIP:
+ case LinuxArpHardware.SLIP6:
+ case LinuxArpHardware.CSLIP6:
type = NetworkInterfaceType.Slip;
break;
@@ -311,9 +333,11 @@ namespace System.Net.NetworkInformation {
type = NetworkInterfaceType.Fddi;
break;
+ case LinuxArpHardware.SIT:
+ case LinuxArpHardware.IPDDP:
+ case LinuxArpHardware.IPGRE:
+ case LinuxArpHardware.IP6GRE:
case LinuxArpHardware.TUNNEL6:
- goto case LinuxArpHardware.TUNNEL;
-
case LinuxArpHardware.TUNNEL:
type = NetworkInterfaceType.Tunnel;
break;
@@ -324,6 +348,9 @@ namespace System.Net.NetworkInformation {
LinuxNetworkInterface iface = null;
+ if (String.IsNullOrEmpty (name))
+ name = "\0" + (++nullNameCount).ToString ();
+
if (!interfaces.TryGetValue (name, out iface)) {
iface = new LinuxNetworkInterface (name);
interfaces.Add (name, iface);
@@ -344,7 +371,7 @@ namespace System.Net.NetworkInformation {
next = addr.ifa_next;
}
} finally {
- freeifaddrs (ifap);
+ FreeInterfaceAddresses (ifap);
}
NetworkInterface [] result = new NetworkInterface [interfaces.Count];
diff --git a/mcs/class/System/System.Net.Sockets/.gitattributes b/mcs/class/System/System.Net.Sockets/.gitattributes
deleted file mode 100644
index ac3f5b46e34..00000000000
--- a/mcs/class/System/System.Net.Sockets/.gitattributes
+++ /dev/null
@@ -1,4 +0,0 @@
-/GHSocket.jvm.cs -crlf
-/GHSocketFactory.jvm.cs -crlf
-/GHStreamSocket.jvm.cs -crlf
-/GHStreamSocketSSL.jvm.cs -crlf
diff --git a/mcs/class/System/System.Net.Sockets/GHSocket.jvm.cs b/mcs/class/System/System.Net.Sockets/GHSocket.jvm.cs
deleted file mode 100644
index 616cac1f3c8..00000000000
--- a/mcs/class/System/System.Net.Sockets/GHSocket.jvm.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using System;
-using System.Net;
-
-namespace System.Net.Sockets
-{
- /// <summary>
- /// Summary description for GHSocket.
- /// </summary>
- internal interface GHSocket
- {
- int Available_internal(out int error);
-
- void Blocking_internal(bool block, out int error);
-
- EndPoint LocalEndPoint_internal(out int error);
-
- EndPoint RemoteEndPoint_internal(out int error);
-
- GHSocket Accept_internal(out int error);
-
- void Bind_internal(EndPoint sa, out int error);
-
- void Close_internal(out int error);
-
- void Connect_internal(EndPoint sa, out int error);
-
- void GetSocketOption_obj_internal(SocketOptionLevel level, SocketOptionName name,
- out object obj_val, out int error);
-
- void GetSocketOption_arr_internal(SocketOptionLevel level, SocketOptionName name,
- ref byte[] byte_val, out int error);
-
- int WSAIoctl (int ioctl_code, byte [] input, byte [] output, out int error);
-
- void Listen_internal(int backlog, out int error);
-
- bool Poll_internal (SelectMode mode, int timeout, Socket source, out int error);
-
- int Receive_internal(byte[] buffer, int offset, int count, SocketFlags flags,
- out int error);
-
- int RecvFrom_internal(byte[] buffer, int offset, int count, SocketFlags flags,
- ref SocketAddress sockaddr, out int error);
-
- int Send_internal(byte[] buf, int offset, int count, SocketFlags flags,
- out int error);
-
- int SendTo_internal(byte[] buffer, int offset, int count,
- SocketFlags flags, SocketAddress sa, out int error);
-
- void SetSocketOption_internal (SocketOptionLevel level,
- SocketOptionName name, object obj_val,
- byte [] byte_val, int int_val, out int error);
-
- void Shutdown_internal(SocketShutdown how, out int error);
-
- void RegisterSelector(java.nio.channels.Selector selector, int mode, Socket source, out int error);
-
- bool CheckConnectionFinished();
-
- GHSocket ChangeToSSL(EndPoint remote_end);
- }
-}
diff --git a/mcs/class/System/System.Net.Sockets/GHSocketFactory.jvm.cs b/mcs/class/System/System.Net.Sockets/GHSocketFactory.jvm.cs
deleted file mode 100644
index 5e7f4ad966b..00000000000
--- a/mcs/class/System/System.Net.Sockets/GHSocketFactory.jvm.cs
+++ /dev/null
@@ -1,210 +0,0 @@
-using System;
-using System.Net;
-
-namespace System.Net.Sockets
-{
- /// <summary>
- /// Summary description for GHSocketFactory.
- /// </summary>
- public class GHSocketFactory
- {
- internal static GHSocket Socket_internal(AddressFamily family,
- SocketType type,
- ProtocolType proto,
- out int error)
- {
- if ( family == AddressFamily.InterNetwork &&
- //(family == AddressFamily.InterNetwork || family == AddressFamily.InterNetworkV6) &&
- (type == SocketType.Stream || type == SocketType.Unknown) &&
- (proto == ProtocolType.Tcp || proto == ProtocolType.Unknown || proto == ProtocolType.Unspecified) )
- {
- error = 0;
- return new GHStreamSocket();
- }
-
- error = 10044; //WSAESOCKTNOSUPPORT (Socket type not supported)
- return null;
- }
-
- internal static void Select_internal (ref Socket [] sockets, int microSeconds, out int error)
- {
- error = 0;
-
- java.nio.channels.Selector selector = java.nio.channels.Selector.open();
-
- int mode = 0;
- int count = sockets.Length;
- for (int i = 0; i < count; i++)
- {
- if (sockets [i] == null)
- { // separator
- mode++;
- continue;
- }
-
- GHSocket sock = sockets [i].GHHandle;
- if (sock == null)
- {
- throw new ArgumentNullException ("GHSocket handle is null");
- }
-
- sock.RegisterSelector(selector, mode, sockets [i], out error);
- if (error != 0)
- {
- error = 0;
- sockets = null;
- CloseSelector(selector);
- return;
- }
- }
-
- sockets = null;
-
- long timeOutMillis = 1;
- if (microSeconds < 0)
- {
- timeOutMillis = 0;
- }
- else if (microSeconds > 999)
- {
- timeOutMillis = (long)(microSeconds / 1000);
- }
-
- int readyCount = 0;
- try
- {
- readyCount = selector.select(timeOutMillis);
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Select_internal selector.select - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (readyCount > 0)
- {
- try
- {
- sockets = new Socket[readyCount+2];
- Socket[] writeList = new Socket[readyCount];
- Socket[] errorList = new Socket[readyCount];
-
- int readListCount = 0;
- int writeListCount = 0;
- int errorListCount = 0;
-
- java.util.Set readyKeys = selector.selectedKeys();
- java.util.Iterator it = readyKeys.iterator();
-
- while (it.hasNext())
- {
- java.nio.channels.SelectionKey key = (java.nio.channels.SelectionKey)it.next();
-
- if (key.isAcceptable() || key.isReadable())
- {
- sockets[readListCount] = (Socket)key.attachment();
- readListCount++;
- }
- if (key.isWritable())
- {
- writeList[writeListCount] = (Socket)key.attachment();
- writeListCount++;
- }
- if (key.isConnectable())
- {
- Socket source = (Socket)key.attachment();
- if (source.GHHandle.CheckConnectionFinished())
- {
- writeList[writeListCount] = source;
- writeListCount++;
- }
- else
- {
- errorList[errorListCount] = source;
- errorListCount++;
- }
- }
- }
-
- sockets[readListCount] = null;
- readListCount++;
- for (int i = 0; i < writeListCount; i++, readListCount++)
- {
- sockets[readListCount] = writeList[i];
- }
- sockets[readListCount] = null;
- readListCount++;
- for (int i = 0; i < errorListCount; i++, readListCount++)
- {
- sockets[readListCount] = errorList[i];
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Select_internal iterate selected keys - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- CloseSelector(selector);
- }
-
- internal static void CloseSelector (java.nio.channels.Selector selector)
- {
- java.util.Set keys = selector.keys();
- java.util.Iterator it = keys.iterator();
-
- try
- {
- selector.close();
- }
- catch (Exception e)
- {
-#if DEBUG
- Console.WriteLine("Caught exception during CloseSelector selector.close - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- while (it.hasNext())
- {
- java.nio.channels.SelectionKey key = (java.nio.channels.SelectionKey)it.next();
- Socket source = (Socket)key.attachment();
- key.cancel ();
- try
- {
- if (source.Blocking)
- {
- /*
- A channel must be placed into non-blocking mode before being registered
- with a selector, and may not be returned to blocking mode until it has been
- deregistered. So, I need set the channel back to the blocking mode, if it was
- in blocking mode before select operation
- */
- source.Blocking = true;
- }
- }
- catch (Exception be)
- {
-#if DEBUG
- Console.WriteLine("Caught exception during CloseSelector source.Blocking - {0}: {1}\n{2}", be.GetType(), be.Message, be.StackTrace);
-#endif
- }
- }
-
- try
- {
- selector.close();
- }
- catch (Exception e)
- {
-#if DEBUG
- Console.WriteLine("Caught exception during CloseSelector selector.close - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
- }
-}
diff --git a/mcs/class/System/System.Net.Sockets/GHStreamSocket.jvm.cs b/mcs/class/System/System.Net.Sockets/GHStreamSocket.jvm.cs
deleted file mode 100644
index c446a5ef0c6..00000000000
--- a/mcs/class/System/System.Net.Sockets/GHStreamSocket.jvm.cs
+++ /dev/null
@@ -1,1273 +0,0 @@
-using java.nio.channels;
-using java.security;
-using javax.net.ssl;
-
-namespace System.Net.Sockets
-{
- /// <summary>
- /// Summary description for GHStreamSocket.
- /// </summary>
- internal class GHStreamSocket : GHSocket
- {
- java.net.ServerSocket jServerSocket;
- java.net.Socket jSocket;
- java.nio.channels.ServerSocketChannel jServerSocketChannel;
- java.nio.channels.SocketChannel jSocketChannel;
-
- // This field I need because a bug in the java.nio.channels.SocketAdapter, which
- // returns local port 0 if the socket is not connected (even if the socket is bound)
- // so I need temporary use regular socket (not channel socket) to bind it to the
- // local address and use this address in the LocalPoint property and to create the
- // actual client/server channel sockets
- // The bug #5076965 (SocketChannel does not report local address after binding to a wildcard )
- // See: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5076965
- java.net.InetSocketAddress jTempLocalSocketAddress;
-
- public GHStreamSocket()
- {
- jSocketChannel = java.nio.channels.SocketChannel.open();
- jSocket = jSocketChannel.socket();
- }
-
- public GHStreamSocket(java.nio.channels.SocketChannel socketChannel)
- {
- jSocketChannel = socketChannel;
- jSocket = jSocketChannel.socket();
- }
-
- public override int GetHashCode ()
- {
- if (jSocket == null && jServerSocket == null)
- return -1;
-
- if (jServerSocket != null) {
- return jServerSocket.ToString ().GetHashCode ();
- }
-
- return jSocket.ToString ().GetHashCode ();
- }
-
- public int Available_internal(out int error)
- {
- error = 0;
- int r = 0;
-
- if (jSocket == null || !jSocket.isConnected())
- {
- return r;
- }
-
- try
- {
- r = jSocket.getInputStream().available();
- }
- catch (Exception e)
- {
- error = 10054; //WSAECONNRESET (Connection reset by peer)
- r = 0;
-#if DEBUG
- Console.WriteLine("Caught exception during Available_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- return r;
- }
-
- public void Blocking_internal(bool block, out int error)
- {
- error = 0;
-
- if (jSocket == null && jServerSocket == null)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- try
- {
- if (jServerSocket != null)
- {
- jServerSocketChannel.configureBlocking(block);
- }
- else
- {
- jSocketChannel.configureBlocking(block);
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Blocking_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public EndPoint LocalEndPoint_internal(out int error)
- {
- error = 0;
- java.net.InetSocketAddress localAddr = null;
-
- try
- {
- if (jTempLocalSocketAddress != null)
- {
- localAddr = jTempLocalSocketAddress;
- }
- else if (jServerSocket != null)
- {
- localAddr = (java.net.InetSocketAddress)jServerSocket.getLocalSocketAddress();
- }
- else
- {
- localAddr = (java.net.InetSocketAddress)jSocket.getLocalSocketAddress();
- }
- }
- catch (Exception e)
- {
- localAddr = null;
-#if DEBUG
- Console.WriteLine("Caught exception during LocalEndPoint_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (localAddr == null || localAddr.getAddress() == null || localAddr.getPort() < 0)
- {
- return null;
- }
-
- IPHostEntry lipa = Dns.Resolve(localAddr.getHostName());
- IPEndPoint ret = new IPEndPoint(lipa.AddressList[0], localAddr.getPort());
- return ret;
- }
-
- public EndPoint RemoteEndPoint_internal(out int error)
- {
- error = 0;
- java.net.InetSocketAddress remoteAddr = null;
-
- if (jSocket == null || !jSocket.isBound())
- {
- return null;
- }
-
- try
- {
- remoteAddr = (java.net.InetSocketAddress)jSocket.getRemoteSocketAddress();
- }
- catch (Exception e)
- {
- remoteAddr = null;
-#if DEBUG
- Console.WriteLine("Caught exception during RemoteEndPoint_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (remoteAddr == null || remoteAddr.getAddress() == null || remoteAddr.getPort() <= 0)
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return null;
- }
-
- IPHostEntry lipa = Dns.Resolve(remoteAddr.getHostName());
- IPEndPoint ret = new IPEndPoint(lipa.AddressList[0], remoteAddr.getPort());
- return ret;
- }
-
- public GHSocket Accept_internal(out int error)
- {
- error = 0;
-
- if (jServerSocket == null)
- {
- throw new InvalidOperationException("You must call Bind and Listen before calling Accept.");
- }
-
- try
- {
- /*
- If this channel is in non-blocking mode then this method will immediately
- return null if there are no pending connections.
- Otherwise it will block indefinitely until a new connection is
- available or an I/O error occurs.
- */
- java.nio.channels.SocketChannel acceptedSocket = jServerSocketChannel.accept();
- if (acceptedSocket == null)
- {
- error = 10035; //WSAEWOULDBLOCK (Resource temporarily unavailable)
-#if DEBUG
- Console.WriteLine("The Accept_internal is in non-blocking mode and no pending connections are available");
-#endif
- return null;
- }
-
- return new GHStreamSocket(acceptedSocket);
- }
- catch (AsynchronousCloseException) {
- error = 10004;
- }
- catch (Exception e)
- {
- error = 10061; //WSAECONNREFUSED (Connection refused)
-#if DEBUG
- Console.WriteLine("Caught exception during Accept_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- return null;
- }
-
- public void Bind_internal(EndPoint sa, out int error)
- {
- error = 0;
- IPEndPoint addr = sa as IPEndPoint;
- if (addr == null)
- {
- error = 10044; //WSAESOCKTNOSUPPORT (Socket type not supported)
- return;
- }
-
- if (jSocket == null || jSocket.isBound() || jSocket.isConnected() || jSocketChannel.isConnectionPending())
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- try
- {
- // This code I need because a bug in the java.nio.channels.SocketAdapter, which
- // returns local port 0 if the socket is not connected (even if the socket is bound)
- // so I need temporary use regular socket (not channel socket) to bind it to the
- // local address and use this address in the LocalPoint property and to create the
- // actual client/server channel sockets
- // The bug #5076965 (SocketChannel does not report local address after binding to a wildcard )
- // See: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5076965
- java.net.Socket jTempSocket = new java.net.Socket();
- jTempSocket.bind(new java.net.InetSocketAddress(java.net.InetAddress.getByName(addr.Address.ToString()),
- addr.Port));
- jTempLocalSocketAddress = (java.net.InetSocketAddress)jTempSocket.getLocalSocketAddress();
- jTempSocket.close();
- jSocket.bind(jTempLocalSocketAddress);
- }
- catch (Exception e)
- {
- error = 10048; //WSAEADDRINUSE (Address already in use)
-#if DEBUG
- Console.WriteLine("Caught exception during Bind_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public void Close_internal(out int error)
- {
- error = 0;
-
- if (jServerSocket != null)
- {
- try
- {
- jServerSocket.close();
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Close_internal jServerSocket - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- try
- {
- jServerSocketChannel.close();
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Close_internal jServerSocketChannel - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- jServerSocket = null;
- jServerSocketChannel = null;
- }
- else if (jSocket != null)
- {
- try
- {
- jSocket.close();
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Close_internal jSocket - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- try
- {
- jSocketChannel.close();
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Close_internal jSocketChannel - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- jSocket = null;
- jSocketChannel = null;
- }
- }
-
- public void Connect_internal(EndPoint sa, out int error)
- {
- error = 0;
-
- IPEndPoint addr = sa as IPEndPoint;
- if (addr == null)
- {
- error = 10044; //WSAESOCKTNOSUPPORT (Socket type not supported)
- return;
- }
-
- if (jSocket == null)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- if (jSocket.isConnected() || jSocketChannel.isConnectionPending())
- {
- error = 10056; //WSAEISCONN (Socket is already connected)
- return;
- }
-
- try
- {
- /*
- If this channel is in non-blocking mode then an invocation of this method
- initiates a non-blocking connection operation. If the connection is
- established immediately, as can happen with a local connection, then this
- method returns true. Otherwise this method returns false.
- If this channel is in blocking mode then an invocation of this method
- will block until the connection is established or an I/O error occurs.
- */
- bool status = jSocketChannel.connect(new java.net.InetSocketAddress(
- java.net.InetAddress.getByName(addr.Address.ToString()),
- addr.Port));
- if (!status)
- {
- error = 10035; //WSAEWOULDBLOCK (Resource temporarily unavailable)
- }
- }
- catch (java.nio.channels.AlreadyConnectedException ae)
- {
- error = 10056; //WSAEISCONN (Socket is already connected)
- }
- catch (java.nio.channels.ConnectionPendingException cpe)
- {
- error = 10036; //WSAEINPROGRESS (Operation now in progress)
- }
- catch (java.nio.channels.UnresolvedAddressException uae)
- {
- error = 10039; //WSAEDESTADDRREQ (Destination address required)
- }
- catch (java.nio.channels.UnsupportedAddressTypeException uate)
- {
- error = 10041; //WSAEPROTOTYPE (Protocol wrong type for socket)
- }
- catch (AsynchronousCloseException) {
- error = 10004;
- }
- catch (Exception e)
- {
- error = 10061; //WSAECONNREFUSED (Connection refused)
-#if DEBUG
- Console.WriteLine("Caught exception during Connect_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public void Listen_internal(int backlog, out int error)
- {
- error = 0;
-
- if (jSocket == null || !jSocket.isBound())
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- if (jSocket.isConnected() || jSocketChannel.isConnectionPending())
- {
- error = 10056; //WSAEISCONN (Socket is already connected)
- return;
- }
-
- bool blockMode = jSocketChannel.isBlocking();
- bool reuseAddr = jSocket.getReuseAddress();
-
- try
- {
- jSocket.close();
- }
- catch (Exception e)
- {
-#if DEBUG
- Console.WriteLine("Caught exception during Listen_internal close old jSocket - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- try
- {
- jSocketChannel.close();
- }
- catch (Exception e)
- {
-#if DEBUG
- Console.WriteLine("Caught exception during Listen_internal close old jSocketChannel - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- jSocket = null;
- jSocketChannel = null;
-
- try
- {
- jServerSocketChannel = java.nio.channels.ServerSocketChannel.open();
- jServerSocket = jServerSocketChannel.socket();
- jServerSocket.bind(jTempLocalSocketAddress, backlog);
- jServerSocketChannel.configureBlocking(blockMode);
- jServerSocket.setReuseAddress(reuseAddr);
- }
- catch (Exception e)
- {
- error = 10048; //WSAEADDRINUSE (Address already in use)
-#if DEBUG
- Console.WriteLine("Caught exception during Listen_internal create server socket - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public bool Poll_internal (SelectMode mode, int timeout, Socket source, out int error)
- {
- error = 0;
-
- if (mode == SelectMode.SelectError && !jSocketChannel.isConnectionPending())
- {
- return false;
- }
-
- java.nio.channels.Selector selector = java.nio.channels.Selector.open();
- RegisterSelector(selector, ((mode == SelectMode.SelectRead)?0:1), source, out error);
-
- if (error != 0)
- {
- error = 0;
- GHSocketFactory.CloseSelector(selector);
- return (mode == SelectMode.SelectError);
- }
-
- bool retVal = false;
-
- long timeOutMillis = 1;
- if (timeout < 0)
- {
- timeOutMillis = 0;
- }
- else if (timeout > 999)
- {
- timeOutMillis = (long)(timeout / 1000);
- }
-
- int readyCount = 0;
- try
- {
- readyCount = selector.select(timeOutMillis);
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Poll_internal selector.select - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (readyCount > 0)
- {
- if (jSocket != null && jSocketChannel.isConnectionPending())
- {
- bool status = false;
- try
- {
- status = jSocketChannel.finishConnect();
- }
- catch (Exception e)
- {
-#if DEBUG
- Console.WriteLine("Caught exception during Poll_internal, finishConnect - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- if (status)
- {
- retVal = (mode != SelectMode.SelectError);
- }
- else
- {
- retVal = (mode == SelectMode.SelectError);
- }
- }
- else
- {
- retVal = true;
- }
- }
-
- GHSocketFactory.CloseSelector(selector);
-
- return retVal;
- }
-
- public void RegisterSelector(java.nio.channels.Selector selector, int mode, Socket source, out int error)
- {
- error = 0;
- if (jServerSocket != null)
- {
- // only accept operation, which included to the read list, is allowed for server sockets
- if (mode != 0)
- {
-// error = 10038; //WSAENOTSOCK (Socket operation on nonsocket)
-#if DEBUG
- Console.WriteLine("RegisterSelector, invalid mode {0} for the server socket", mode);
-#endif
- return;
- }
-
- try
- {
- if (jServerSocketChannel.isBlocking())
- {
- /*
- A channel must be placed into non-blocking mode before being registered
- with a selector, and may not be returned to blocking mode until it has been
- deregistered.
- */
- jServerSocketChannel.configureBlocking(false);
- }
-
- jServerSocketChannel.register(selector, java.nio.channels.SelectionKey.OP_ACCEPT, source);
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during RegisterSelector, register server socket - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
- else
- {
- try
- {
- int ops = java.nio.channels.SelectionKey.OP_READ;
- if (mode > 0)
- {
- if (jSocketChannel.isConnectionPending())
- {
- ops = java.nio.channels.SelectionKey.OP_CONNECT;
- }
- else
- {
- ops = java.nio.channels.SelectionKey.OP_WRITE;
- }
- }
-
- if (jSocketChannel.isBlocking())
- {
- /*
- A channel must be placed into non-blocking mode before being registered
- with a selector, and may not be returned to blocking mode until it has been
- deregistered.
- */
- jSocketChannel.configureBlocking(false);
- }
-
- jSocketChannel.register(selector, ops, source);
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during RegisterSelector, register client socket - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
- }
-
- public bool CheckConnectionFinished()
- {
- bool status = true;
- if (jSocket != null && jSocketChannel.isConnectionPending())
- {
- try
- {
- status = jSocketChannel.finishConnect();
- }
- catch (Exception e)
- {
- status = false;
-#if DEBUG
- Console.WriteLine("Caught exception during Poll_internal, finishConnect - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- return status;
- }
-
- public int Receive_internal(byte[] buffer, int offset, int count, SocketFlags flags,
- out int error)
- {
- error = 0;
- int ret = 0;
-
- if (jSocket == null)
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return ret;
- }
-
- try
- {
- if (jSocketChannel.isConnectionPending())
- {
- bool status = jSocketChannel.finishConnect();
- if (!status)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Receive_internal, jSocketChannel.finishConnect return false");
-#endif
- return 0;
- }
- }
- else if (!jSocketChannel.isConnected())
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return ret;
- }
-
- java.nio.ByteBuffer readBuff = java.nio.ByteBuffer.wrap(vmw.common.TypeUtils.ToSByteArray(buffer), offset, count);
- ret = jSocketChannel.read(readBuff);
- if (ret < 0) ret = 0;
- }
- catch (Exception e)
- {
- error = 10054; //WSAECONNRESET (Connection reset by peer)
- ret = 0;
-#if DEBUG
- Console.WriteLine("Caught exception during Receive_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (ret == 0 && !jSocketChannel.isBlocking())
- {
- error = 10035; //WSAEWOULDBLOCK (Resource temporarily unavailable)
- }
- return ret;
- }
-
- public int RecvFrom_internal(byte[] buffer, int offset, int count, SocketFlags flags,
- ref SocketAddress sockaddr, out int error)
- {
- return Receive_internal(buffer, offset, count, flags, out error);
- }
-
- public int Send_internal(byte[] buf, int offset, int count, SocketFlags flags,
- out int error)
- {
- error = 0;
- int ret = 0;
-
- if (jSocket == null)
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return ret;
- }
-
- try
- {
- if (jSocketChannel.isConnectionPending())
- {
- bool status = jSocketChannel.finishConnect();
- if (!status)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Send_internal, jSocketChannel.finishConnect return false");
-#endif
- return 0;
- }
- }
- else if (!jSocketChannel.isConnected())
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return ret;
- }
-
- java.nio.ByteBuffer writeBuff = java.nio.ByteBuffer.wrap(vmw.common.TypeUtils.ToSByteArray(buf), offset, count);
- ret = jSocketChannel.write(writeBuff);
- if (ret < 0) ret = 0;
- }
- catch (Exception e)
- {
- error = 10054; //WSAECONNRESET (Connection reset by peer)
- ret = 0;
-#if DEBUG
- Console.WriteLine("Caught exception during Send_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (ret == 0 && !jSocketChannel.isBlocking())
- {
- error = 10035; //WSAEWOULDBLOCK (Resource temporarily unavailable)
- }
- return ret;
- }
-
- public int SendTo_internal(byte[] buffer, int offset, int count,
- SocketFlags flags, SocketAddress sa, out int error)
- {
- return Send_internal(buffer, offset, count, flags, out error);
- }
-
- public void SetSocketOption_internal (SocketOptionLevel level,
- SocketOptionName name, object obj_val,
- byte [] byte_val, int int_val, out int error)
- {
- error = 0;
-
- if (byte_val != null)
- {
- error = -1;
- throw new NotImplementedException();
- }
-
- if (jSocket == null && jServerSocket == null)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- switch (level)
- {
- case SocketOptionLevel.IPv6:
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- case SocketOptionLevel.IP:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- }
- break;
- case SocketOptionLevel.Udp:
- if (name == SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- }
- else
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- }
- return;
- case SocketOptionLevel.Tcp:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
- break;
- }
-
- try
- {
- bool bval = false;
- int ival = 0;
- switch (name)
- {
- case SocketOptionName.DontLinger:
- jSocket.setSoLinger(false, 0);
- break;
- case SocketOptionName.Linger:
- LingerOption lval = obj_val as LingerOption;
- if (lval != null)
- {
- jSocket.setSoLinger(lval.Enabled, lval.LingerTime);
- }
- else
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- }
- break;
- case SocketOptionName.KeepAlive:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- jSocket.setKeepAlive(bval);
- break;
- case SocketOptionName.NoDelay:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- jSocket.setTcpNoDelay(bval);
- break;
- case SocketOptionName.ReceiveBuffer:
- ival = int_val;
- if (obj_val != null)
- {
- ival = (int) obj_val;
- }
- if (jServerSocket != null)
- {
- jServerSocket.setReceiveBufferSize(ival);
- }
- else
- {
- jSocket.setReceiveBufferSize(ival);
- }
- break;
- case SocketOptionName.ReceiveTimeout:
- ival = int_val;
- if (obj_val != null)
- {
- ival = (int) obj_val;
- }
- if (jServerSocket != null)
- {
- jServerSocket.setSoTimeout(ival);
- }
- else
- {
- jSocket.setSoTimeout(ival);
- }
- break;
- case SocketOptionName.ReuseAddress:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- if (jServerSocket != null)
- {
- jServerSocket.setReuseAddress(bval);
- }
- else
- {
- jSocket.setReuseAddress(bval);
- }
- break;
- case SocketOptionName.SendBuffer:
- ival = int_val;
- if (obj_val != null)
- {
- ival = (int) obj_val;
- }
- jSocket.setSendBufferSize(ival);
- break;
- case SocketOptionName.OutOfBandInline:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- jSocket.setOOBInline(bval);
- break;
- default:
- error = 10022; //WSAEINVAL (Invalid argument)
- break;
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- obj_val = null;
- }
- }
-
- public void GetSocketOption_obj_internal(SocketOptionLevel level, SocketOptionName name,
- out object obj_val, out int error)
- {
- obj_val = null;
- error = 0;
-
- if (jSocket == null && jServerSocket == null)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- switch (level)
- {
- case SocketOptionLevel.IPv6:
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- case SocketOptionLevel.IP:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- }
- break;
- case SocketOptionLevel.Udp:
- if (name == SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- }
- else
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- }
- return;
- case SocketOptionLevel.Tcp:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
- break;
- }
-
- try
- {
- bool bval = false;
- int ival = 0;
- switch (name)
- {
- case SocketOptionName.DontLinger:
- ival = jSocket.getSoLinger();
- if (ival == -1)
- {
- obj_val = 1;
- }
- else
- {
- obj_val = 0;
- }
- break;
- case SocketOptionName.Linger:
- ival = jSocket.getSoLinger();
- if (ival == -1)
- {
- ival = 0;
- }
- LingerOption ret = new LingerOption((ival != 0), ival);
- obj_val = ret;
- break;
- case SocketOptionName.KeepAlive:
- bval = jSocket.getKeepAlive();
- obj_val = ((bval)?1:0);
- break;
- case SocketOptionName.NoDelay:
- bval = jSocket.getTcpNoDelay();
- obj_val = ((bval)?1:0);
- break;
- case SocketOptionName.ReceiveBuffer:
- if (jServerSocket != null)
- {
- ival = jServerSocket.getReceiveBufferSize();
- }
- else
- {
- ival = jSocket.getReceiveBufferSize();
- }
- obj_val = ival;
- break;
- case SocketOptionName.ReceiveTimeout:
- if (jServerSocket != null)
- {
- ival = jServerSocket.getSoTimeout();
- }
- else
- {
- ival = jSocket.getSoTimeout();
- }
- obj_val = ival;
- break;
- case SocketOptionName.ReuseAddress:
- if (jServerSocket != null)
- {
- bval = jServerSocket.getReuseAddress();
- }
- else
- {
- bval = jSocket.getReuseAddress();
- }
- obj_val = ((bval)?1:0);
- break;
- case SocketOptionName.SendBuffer:
- ival = jSocket.getSendBufferSize();
- obj_val = ival;
- break;
- case SocketOptionName.OutOfBandInline:
- bval = jSocket.getOOBInline();
- obj_val = ((bval)?1:0);
- break;
- default:
- error = 10022; //WSAEINVAL (Invalid argument)
- break;
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- obj_val = null;
- }
- }
-
- public void GetSocketOption_arr_internal(SocketOptionLevel level, SocketOptionName name,
- ref byte[] byte_val, out int error)
- {
- error = -1;
- throw new NotImplementedException();
- }
-
- public int WSAIoctl (int ioctl_code, byte [] input, byte [] output, out int error)
- {
- error = -1;
- throw new NotImplementedException();
- }
-
- public void Shutdown_internal(SocketShutdown how, out int error)
- {
- error = 0;
-
- if (jServerSocket != null || jSocket == null || !jSocket.isConnected())
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return;
- }
-
- try
- {
- switch (how)
- {
- case SocketShutdown.Receive:
- jSocket.shutdownInput();
- break;
- case SocketShutdown.Send:
- jSocket.shutdownOutput();
- break;
- case SocketShutdown.Both:
- jSocket.shutdownInput();
- jSocket.shutdownOutput();
- break;
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Shutdown_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- private java.io.FileInputStream searchDefaultCacerts()
- {
- try
- {
- string javaHome = java.lang.System.getProperty("java.home");
- if(javaHome == null)
- return null;
-
- string keyStorePath = javaHome + "/lib/security/cacerts";
- //Console.WriteLine("keyStorePath = {0}", keyStorePath);
-
- java.io.File f = new java.io.File(keyStorePath);
- if(!f.exists())
- return null;
- return new java.io.FileInputStream(f);
- }
- catch(Exception e)
- {
-#if DEBUG
- //todo log it
- Console.WriteLine(e.GetType() + ":" + e.Message + "\n" + e.StackTrace);
-#endif
- return null;
- }
- }
-
- private SSLSocketFactory getSSLSocketFactory()
- {
- SSLSocketFactory factory = null;
-
- try
- {
- //reading the keyStore path and password from the environment properties
- string keyStorePath = java.lang.System.getProperty("javax.net.ssl.keyStore");
- java.io.FileInputStream keyStoreStream = null;
- if (keyStorePath != null)
- {
- java.io.File file = new java.io.File(keyStorePath);
- if(file.exists())
- keyStoreStream = new java.io.FileInputStream(file);
- else
- keyStoreStream = searchDefaultCacerts();
- }
- else
- keyStoreStream = searchDefaultCacerts();
-
- string keyStorePassWord = java.lang.System.getProperty("javax.net.ssl.keyStorePassword");
- if (keyStorePassWord == null)
- keyStorePassWord = "changeit";
- char[] passphrase = keyStorePassWord.ToCharArray();
-
- //initiating SSLContext
- SSLContext ctx = SSLContext.getInstance("TLS");
- KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
- TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
- KeyStore ks = KeyStore.getInstance("JKS");
- if (keyStoreStream != null)
- ks.load(keyStoreStream,passphrase);
- else
- ks.load(null,null);
- kmf.init(ks, passphrase);
- tmf.init(ks);
- ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
-
- factory = ctx.getSocketFactory();
- }
- catch (Exception e)
- {
- factory = null;
-#if DEBUG
- Console.WriteLine("Can't get SSL Socket Factory, the exception is {0}, {1}", e.GetType(), e.Message);
-#endif
- }
-
- return factory;
- }
-
- public GHSocket ChangeToSSL(EndPoint remote_end)
- {
- if (jSocket == null)
- {
- throw new InvalidOperationException("The underlying socket is null");
- }
-
- if (!jSocketChannel.isBlocking())
- {
- throw new NotImplementedException("The SSL Socket for non-blocking mode is not supported");
- }
-
- SSLSocketFactory factory = getSSLSocketFactory();
- if (factory == null)
- {
- throw new ApplicationException("Can't get SSL Socket Factory");
- }
-
- int err;
-
- // The problem with local address, when I closed the socket and try to create the new one
- // bounded to the given local address, I receive exception "Address already in use"
- IPEndPoint localEndPoint = null;
-// IPEndPoint localEndPoint = (IPEndPoint) LocalEndPoint_internal(out err);
-// if (err != 0)
-// localEndPoint = null;
-
- IPEndPoint remoteEndPoint = remote_end as IPEndPoint;
- if (remoteEndPoint == null)
- {
- remoteEndPoint = (IPEndPoint) RemoteEndPoint_internal(out err);
- if (err != 0)
- remoteEndPoint = null;
- }
-
- java.net.Socket sslSocket = null;
- try
- {
- if (remoteEndPoint != null)
- {
- if (localEndPoint != null)
- {
- sslSocket = factory.createSocket(
- java.net.InetAddress.getByName(remoteEndPoint.Address.ToString()),
- remoteEndPoint.Port,
- java.net.InetAddress.getByName(localEndPoint.Address.ToString()),
- localEndPoint.Port);
- }
- else
- {
- sslSocket = factory.createSocket(
- jSocket,
- remoteEndPoint.Address.ToString(),
- remoteEndPoint.Port,
- false);
- }
-
- if (sslSocket != null)
- {
- String[] protocols = { "TLSv1", "SSLv3" };
- ((SSLSocket)sslSocket).setUseClientMode(true);
- ((SSLSocket)sslSocket).startHandshake();
- }
-
- }
- else
- {
- sslSocket = factory.createSocket();
- }
- }
- catch (Exception e)
- {
- sslSocket = null;
-#if DEBUG
- Console.WriteLine("Can't create SSL Socket, the exception is {0}, {1}", e.GetType(), e.Message);
-#endif
- }
-
- if (sslSocket == null)
- {
-// throw new ApplicationException("Can't create SSL Socket");
- // it is important to the Socket class to distinguish if the underlying
- // handle (GHSocket) is still valid and can be used as non-SSL, or it is already
- // closed by this function and can't be used any more.
- return null;
- }
-
-/*
- string[] arr = ((SSLSocket)sslSocket).getEnabledProtocols();
- if (arr != null)
- {
- foreach (string s in arr)
- Console.WriteLine("s:"+s);
- }
- string [] arr1 = ((SSLSocket)sslSocket).getEnabledCipherSuites();
- if (arr1 != null)
- {
- foreach (string s in arr1)
- Console.WriteLine("s:"+s);
- }
-*/
-
- return new GHStreamSocketSSL(sslSocket);
- }
- }
-}
diff --git a/mcs/class/System/System.Net.Sockets/GHStreamSocketSSL.jvm.cs b/mcs/class/System/System.Net.Sockets/GHStreamSocketSSL.jvm.cs
deleted file mode 100644
index 429dae43332..00000000000
--- a/mcs/class/System/System.Net.Sockets/GHStreamSocketSSL.jvm.cs
+++ /dev/null
@@ -1,620 +0,0 @@
-using System;
-using System.Net;
-
-namespace System.Net.Sockets
-{
- /// <summary>
- /// Summary description for GHStreamSocket.
- /// </summary>
- internal class GHStreamSocketSSL : GHSocket
- {
- java.net.Socket jSocket;
-
- public GHStreamSocketSSL(java.net.Socket sslSocket)
- {
- jSocket = sslSocket;
- }
-
- public override int GetHashCode ()
- {
- if (jSocket == null)
- return -1;
-
- return jSocket.ToString().GetHashCode();
- }
-
- public int Available_internal(out int error)
- {
- error = 0;
- int r = 0;
-
- if (jSocket == null || !jSocket.isConnected())
- {
- return r;
- }
-
- try
- {
- r = jSocket.getInputStream().available();
- }
- catch (Exception e)
- {
- error = 10054; //WSAECONNRESET (Connection reset by peer)
- r = 0;
-#if DEBUG
- Console.WriteLine("Caught exception during Available_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- return r;
- }
-
- public void Blocking_internal(bool block, out int error)
- {
- //SVETA: see in the non-blocking io
- error = 0;
-
- if (block == false)
- throw new NotSupportedException();
- }
-
- public EndPoint LocalEndPoint_internal(out int error)
- {
- error = 0;
- java.net.InetSocketAddress localAddr = null;
-
- try
- {
- localAddr = (java.net.InetSocketAddress)jSocket.getLocalSocketAddress();
- }
- catch (Exception e)
- {
- localAddr = null;
-#if DEBUG
- Console.WriteLine("Caught exception during LocalEndPoint_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (localAddr == null || localAddr.getAddress() == null || localAddr.getPort() < 0)
- {
- return null;
- }
-
- IPHostEntry lipa = Dns.Resolve(localAddr.getHostName());
- IPEndPoint ret = new IPEndPoint(lipa.AddressList[0], localAddr.getPort());
- return ret;
- }
-
- public EndPoint RemoteEndPoint_internal(out int error)
- {
- error = 0;
- java.net.InetSocketAddress remoteAddr = null;
-
- if (jSocket == null || !jSocket.isBound())
- {
- return null;
- }
-
- try
- {
- remoteAddr = (java.net.InetSocketAddress)jSocket.getRemoteSocketAddress();
- }
- catch (Exception e)
- {
- remoteAddr = null;
-#if DEBUG
- Console.WriteLine("Caught exception during RemoteEndPoint_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- if (remoteAddr == null || remoteAddr.getAddress() == null || remoteAddr.getPort() <= 0)
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return null;
- }
-
- IPHostEntry lipa = Dns.Resolve(remoteAddr.getHostName());
- IPEndPoint ret = new IPEndPoint(lipa.AddressList[0], remoteAddr.getPort());
- return ret;
- }
-
- public GHSocket Accept_internal(out int error)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return null;
- }
-
- public void Bind_internal(EndPoint sa, out int error)
- {
- error = 0;
- IPEndPoint addr = sa as IPEndPoint;
- if (addr == null)
- {
- error = 10044; //WSAESOCKTNOSUPPORT (Socket type not supported)
- return;
- }
-
- if (jSocket == null || jSocket.isBound() || jSocket.isConnected())
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- try
- {
- jSocket.bind(new java.net.InetSocketAddress(java.net.InetAddress.getByName(addr.Address.ToString()),
- addr.Port));
- }
- catch (Exception e)
- {
- error = 10048; //WSAEADDRINUSE (Address already in use)
-#if DEBUG
- Console.WriteLine("Caught exception during Bind_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public void Close_internal(out int error)
- {
- error = 0;
-
- try
- {
- if (jSocket != null)
- {
- jSocket.close();
- jSocket = null;
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Close_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public void Connect_internal(EndPoint sa, out int error)
- {
- error = 0;
-
- IPEndPoint addr = sa as IPEndPoint;
- if (addr == null)
- {
- error = 10044; //WSAESOCKTNOSUPPORT (Socket type not supported)
- return;
- }
-
- if (jSocket == null)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- if (jSocket.isConnected())
- {
- error = 10056; //WSAEISCONN (Socket is already connected)
- return;
- }
-
- try
- {
- jSocket.connect(new java.net.InetSocketAddress(
- java.net.InetAddress.getByName(addr.Address.ToString()),
- addr.Port));
- }
- catch (Exception e)
- {
- error = 10061; //WSAECONNREFUSED (Connection refused)
-#if DEBUG
- Console.WriteLine("Caught exception during Connect_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public void Listen_internal(int backlog, out int error)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- public bool Poll_internal (SelectMode mode, int timeout, Socket source, out int error)
- {
- error = 0;
- throw new NotImplementedException();
- }
-
- public int Receive_internal(byte[] buffer, int offset, int count, SocketFlags flags,
- out int error)
- {
- error = 0;
- int ret = 0;
-
- if (jSocket == null || !jSocket.isConnected())
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return ret;
- }
-
- try
- {
- ret = jSocket.getInputStream().read(vmw.common.TypeUtils.ToSByteArray(buffer), offset, count);
- if (ret < 0) ret = 0;
- }
- catch (Exception e)
- {
- error = 10054; //WSAECONNRESET (Connection reset by peer)
- ret = 0;
-#if DEBUG
- Console.WriteLine("Caught exception during Receive_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- return ret;
- }
-
- public int RecvFrom_internal(byte[] buffer, int offset, int count, SocketFlags flags,
- ref SocketAddress sockaddr, out int error)
- {
- return Receive_internal(buffer, offset, count, flags, out error);
- }
-
- public int Send_internal(byte[] buf, int offset, int count, SocketFlags flags,
- out int error)
- {
- error = 0;
- int ret = 0;
-
- if (jSocket == null || !jSocket.isConnected())
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return ret;
- }
-
- try
- {
- jSocket.getOutputStream().write(vmw.common.TypeUtils.ToSByteArray(buf), offset, count);
- ret = count;
- }
- catch (Exception e)
- {
- error = 10054; //WSAECONNRESET (Connection reset by peer)
- ret = 0;
-#if DEBUG
- Console.WriteLine("Caught exception during Send_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
-
- return ret;
- }
-
- public int SendTo_internal(byte[] buffer, int offset, int count,
- SocketFlags flags, SocketAddress sa, out int error)
- {
- return Send_internal(buffer, offset, count, flags, out error);
- }
-
- public void SetSocketOption_internal (SocketOptionLevel level,
- SocketOptionName name, object obj_val,
- byte [] byte_val, int int_val, out int error)
- {
- error = 0;
-
- if (byte_val != null)
- {
- error = -1;
- throw new NotImplementedException();
- }
-
- if (jSocket == null)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- switch (level)
- {
- case SocketOptionLevel.IPv6:
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- case SocketOptionLevel.IP:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- }
- break;
- case SocketOptionLevel.Udp:
- if (name == SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- }
- else
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- }
- return;
- case SocketOptionLevel.Tcp:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
- break;
- }
-
- try
- {
- bool bval = false;
- int ival = 0;
- switch (name)
- {
- case SocketOptionName.DontLinger:
- jSocket.setSoLinger(false, 0);
- break;
- case SocketOptionName.Linger:
- LingerOption lval = obj_val as LingerOption;
- if (lval != null)
- {
- jSocket.setSoLinger(lval.Enabled, lval.LingerTime);
- }
- else
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- }
- break;
- case SocketOptionName.KeepAlive:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- jSocket.setKeepAlive(bval);
- break;
- case SocketOptionName.NoDelay:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- jSocket.setTcpNoDelay(bval);
- break;
- case SocketOptionName.ReceiveBuffer:
- ival = int_val;
- if (obj_val != null)
- {
- ival = (int) obj_val;
- }
- jSocket.setReceiveBufferSize(ival);
- break;
- case SocketOptionName.ReceiveTimeout:
- ival = int_val;
- if (obj_val != null)
- {
- ival = (int) obj_val;
- }
- jSocket.setSoTimeout(ival);
- break;
- case SocketOptionName.ReuseAddress:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- jSocket.setReuseAddress(bval);
- break;
- case SocketOptionName.SendBuffer:
- ival = int_val;
- if (obj_val != null)
- {
- ival = (int) obj_val;
- }
- jSocket.setSendBufferSize(ival);
- break;
- case SocketOptionName.OutOfBandInline:
- if (obj_val != null)
- {
- bval = ((int)obj_val == 0)?false:true;
- }
- else
- {
- bval = (int_val == 0)?false:true;
- }
- jSocket.setOOBInline(bval);
- break;
- default:
- error = 10022; //WSAEINVAL (Invalid argument)
- break;
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- obj_val = null;
- }
- }
-
- public void GetSocketOption_obj_internal(SocketOptionLevel level, SocketOptionName name,
- out object obj_val, out int error)
- {
- obj_val = null;
- error = 0;
-
- if (jSocket == null)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
-
- switch (level)
- {
- case SocketOptionLevel.IPv6:
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- case SocketOptionLevel.IP:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- return;
- }
- break;
- case SocketOptionLevel.Udp:
- if (name == SocketOptionName.NoDelay)
- {
- error = 10042; //WSAENOPROTOOPT (Bad protocol option)
- }
- else
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- }
- return;
- case SocketOptionLevel.Tcp:
- if (name != SocketOptionName.NoDelay)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- return;
- }
- break;
- }
-
- try
- {
- bool bval = false;
- int ival = 0;
- switch (name)
- {
- case SocketOptionName.DontLinger:
- ival = jSocket.getSoLinger();
- if (ival == -1)
- {
- obj_val = 1;
- }
- else
- {
- obj_val = 0;
- }
- break;
- case SocketOptionName.Linger:
- ival = jSocket.getSoLinger();
- if (ival == -1)
- {
- ival = 0;
- }
- LingerOption ret = new LingerOption((ival != 0), ival);
- obj_val = ret;
- break;
- case SocketOptionName.KeepAlive:
- bval = jSocket.getKeepAlive();
- obj_val = ((bval)?1:0);
- break;
- case SocketOptionName.NoDelay:
- bval = jSocket.getTcpNoDelay();
- obj_val = ((bval)?1:0);
- break;
- case SocketOptionName.ReceiveBuffer:
- ival = jSocket.getReceiveBufferSize();
- obj_val = ival;
- break;
- case SocketOptionName.ReceiveTimeout:
- ival = jSocket.getSoTimeout();
- obj_val = ival;
- break;
- case SocketOptionName.ReuseAddress:
- bval = jSocket.getReuseAddress();
- obj_val = ((bval)?1:0);
- break;
- case SocketOptionName.SendBuffer:
- ival = jSocket.getSendBufferSize();
- obj_val = ival;
- break;
- case SocketOptionName.OutOfBandInline:
- bval = jSocket.getOOBInline();
- obj_val = ((bval)?1:0);
- break;
- default:
- error = 10022; //WSAEINVAL (Invalid argument)
- break;
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
- obj_val = null;
- }
- }
-
- public void GetSocketOption_arr_internal(SocketOptionLevel level, SocketOptionName name,
- ref byte[] byte_val, out int error)
- {
- error = -1;
- throw new NotImplementedException();
- }
-
- public int WSAIoctl (int ioctl_code, byte [] input, byte [] output, out int error)
- {
- error = -1;
- throw new NotImplementedException();
- }
-
- public void Shutdown_internal(SocketShutdown how, out int error)
- {
- error = 0;
-
- if (jSocket == null || !jSocket.isConnected())
- {
- error = 10057; //WSAENOTCONN (Socket is not connected)
- return;
- }
-
- try
- {
- switch (how)
- {
- case SocketShutdown.Receive:
- jSocket.shutdownInput();
- break;
- case SocketShutdown.Send:
- jSocket.shutdownOutput();
- break;
- case SocketShutdown.Both:
- jSocket.shutdownInput();
- jSocket.shutdownOutput();
- break;
- }
- }
- catch (Exception e)
- {
- error = 10022; //WSAEINVAL (Invalid argument)
-#if DEBUG
- Console.WriteLine("Caught exception during Shutdown_internal - {0}: {1}\n{2}", e.GetType(), e.Message, e.StackTrace);
-#endif
- }
- }
-
- public void RegisterSelector(java.nio.channels.Selector selector, int mode, Socket source, out int error)
- {
- throw new InvalidOperationException();
- }
-
- public bool CheckConnectionFinished()
- {
- throw new InvalidOperationException();
- }
-
- public GHSocket ChangeToSSL(EndPoint remote_end)
- {
- return this;
- }
-
- }
-}
diff --git a/mcs/class/System/System.Net.Sockets/NetworkStream.cs b/mcs/class/System/System.Net.Sockets/NetworkStream.cs
index a9500a435e9..27f3c54aec8 100644
--- a/mcs/class/System/System.Net.Sockets/NetworkStream.cs
+++ b/mcs/class/System/System.Net.Sockets/NetworkStream.cs
@@ -143,9 +143,6 @@ namespace System.Net.Sockets
}
#if !NET_2_1 || MOBILE
-#if TARGET_JVM
- [MonoNotSupported ("Not supported since Socket.ReceiveTimeout is not supported")]
-#endif
public override int ReadTimeout
{
get {
@@ -179,9 +176,6 @@ namespace System.Net.Sockets
}
#if !NET_2_1 || MOBILE
-#if TARGET_JVM
- [MonoNotSupported ("Not supported since Socket.SendTimeout is not supported")]
-#endif
public override int WriteTimeout
{
get {
@@ -431,12 +425,6 @@ namespace System.Net.Sockets
throw new ObjectDisposedException (GetType().FullName);
}
-#if TARGET_JVM
- public void ChangeToSSLSocket()
- {
- socket.ChangeToSSL();
- }
-#endif
}
}
diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs
index a453d70e43f..cecabd1e18a 100644
--- a/mcs/class/System/System.Net.Sockets/Socket.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket.cs
@@ -68,12 +68,10 @@ namespace System.Net.Sockets
sockets.Add (null);
}
-#if !TARGET_JVM
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static void Select_internal (ref Socket [] sockets,
int microSeconds,
out int error);
-#endif
public static void Select (IList checkRead, IList checkWrite, IList checkError, int microSeconds)
{
var list = new List<Socket> ();
@@ -200,11 +198,9 @@ namespace System.Net.Sockets
}
#endif
-#if !TARGET_JVM
// Returns the amount of data waiting to be read on socket
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static int Available_internal(IntPtr socket, out int error);
-#endif
public int Available {
get {
@@ -404,11 +400,9 @@ namespace System.Net.Sockets
}
}
-#if !TARGET_JVM
// Returns the local endpoint details in addr and port
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static SocketAddress LocalEndPoint_internal(IntPtr socket, int family, out int error);
-#endif
// Wish: support non-IP endpoints.
public EndPoint LocalEndPoint {
diff --git a/mcs/class/System/System.Net.Sockets/Socket.jvm.cs b/mcs/class/System/System.Net.Sockets/Socket.jvm.cs
deleted file mode 100644
index 2e4eae7b7fe..00000000000
--- a/mcs/class/System/System.Net.Sockets/Socket.jvm.cs
+++ /dev/null
@@ -1,2586 +0,0 @@
-// System.Net.Sockets.Socket.cs
-//
-// Authors:
-// Phillip Pearson (pp@myelin.co.nz)
-// Dick Porter <dick@ximian.com>
-// Gonzalo Paniagua Javier (gonzalo@ximian.com)
-//
-// Copyright (C) 2001, 2002 Phillip Pearson and Ximian, Inc.
-// http://www.myelin.co.nz
-// (c) 2004 Novell, Inc. (http://www.novell.com)
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Collections;
-using System.Collections.Generic;
-using System.Net.Configuration;
-using System.Runtime.InteropServices;
-using System.Threading;
-
-namespace System.Net.Sockets
-{
- public class Socket : IDisposable
- {
- enum SocketOperation
- {
- Accept,
- Connect,
- Receive,
- ReceiveFrom,
- Send,
- SendTo
- }
-
- [StructLayout (LayoutKind.Sequential)]
- private sealed class SocketAsyncResult: IAsyncResult
- {
- /* Same structure in the runtime */
- public Socket Sock;
-#if !TARGET_JVM
- public IntPtr handle;
-#else
- public GHSocket handle;
-#endif
- object state;
- AsyncCallback callback;
- WaitHandle waithandle;
-
- Exception delayedException;
-
- public EndPoint EndPoint; // Connect,ReceiveFrom,SendTo
- public byte [] Buffer; // Receive,ReceiveFrom,Send,SendTo
- public int Offset; // Receive,ReceiveFrom,Send,SendTo
- public int Size; // Receive,ReceiveFrom,Send,SendTo
- public SocketFlags SockFlags; // Receive,ReceiveFrom,Send,SendTo
-
- // Return values
- Socket acc_socket;
- int total;
-
- bool completed_sync;
- bool completed;
- public bool blocking;
- internal int error;
- SocketOperation operation;
- public object ares;
-
- public SocketAsyncResult (Socket sock, object state, AsyncCallback callback, SocketOperation operation)
- {
- this.Sock = sock;
- this.blocking = sock.blocking;
- this.handle = sock.socket;
- this.state = state;
- this.callback = callback;
- this.operation = operation;
- SockFlags = SocketFlags.None;
- }
-
- public void CheckIfThrowDelayedException ()
- {
- if (delayedException != null)
- throw delayedException;
-
- if (error != 0)
- throw new SocketException (error);
- }
-
- void CompleteAllOnDispose (Queue queue)
- {
- object [] pending = queue.ToArray ();
- queue.Clear ();
-
- WaitCallback cb;
- for (int i = 0; i < pending.Length; i++)
- {
- SocketAsyncResult ares = (SocketAsyncResult) pending [i];
- cb = new WaitCallback (ares.CompleteDisposed);
- ThreadPool.QueueUserWorkItem (cb, null);
- }
- }
-
- void CompleteDisposed (object unused)
- {
- Complete ();
- }
-
- public void Complete ()
- {
- if (operation != SocketOperation.Receive && Sock.disposed)
- delayedException = new ObjectDisposedException (Sock.GetType ().ToString ());
-
- IsCompleted = true;
-
- Queue queue = null;
- if (operation == SocketOperation.Receive || operation == SocketOperation.ReceiveFrom)
- {
- queue = Sock.readQ;
- }
- else if (operation == SocketOperation.Send || operation == SocketOperation.SendTo)
- {
- queue = Sock.writeQ;
- }
-
- if (queue != null)
- {
- SocketAsyncCall sac = null;
- SocketAsyncResult req = null;
- lock (queue)
- {
- queue.Dequeue (); // remove ourselves
- if (queue.Count > 0)
- {
- req = (SocketAsyncResult) queue.Peek ();
- if (!Sock.disposed)
- {
- Worker worker = new Worker (req);
- sac = GetDelegate (worker, req.operation);
- }
- else
- {
- CompleteAllOnDispose (queue);
- }
- }
- }
-
- if (sac != null)
- sac.BeginInvoke (null, req);
- }
-
- if (callback != null)
- callback (this);
- }
-
- SocketAsyncCall GetDelegate (Worker worker, SocketOperation op)
- {
- switch (op)
- {
- case SocketOperation.Receive:
- return new SocketAsyncCall (worker.Receive);
- case SocketOperation.ReceiveFrom:
- return new SocketAsyncCall (worker.ReceiveFrom);
- case SocketOperation.Send:
- return new SocketAsyncCall (worker.Send);
- case SocketOperation.SendTo:
- return new SocketAsyncCall (worker.SendTo);
- default:
- return null; // never happens
- }
- }
-
- public void Complete (bool synch)
- {
- completed_sync = synch;
- Complete ();
- }
-
- public void Complete (int total)
- {
- this.total = total;
- Complete ();
- }
-
- public void Complete (Exception e, bool synch)
- {
- completed_sync = synch;
- delayedException = e;
- Complete ();
- }
-
- public void Complete (Exception e)
- {
- delayedException = e;
- Complete ();
- }
-
- public void Complete (Socket s)
- {
- acc_socket = s;
- Complete ();
- }
-
- public object AsyncState
- {
- get
- {
- return state;
- }
- }
-
- public WaitHandle AsyncWaitHandle
- {
- get
- {
- lock (this)
- {
- if (waithandle == null)
- waithandle = new ManualResetEvent (completed);
- }
-
- return waithandle;
- }
- set
- {
- waithandle=value;
- }
- }
-
- public bool CompletedSynchronously
- {
- get
- {
- return(completed_sync);
- }
- }
-
- public bool IsCompleted
- {
- get
- {
- return(completed);
- }
- set
- {
- completed=value;
- lock (this)
- {
- if (waithandle != null && value)
- {
- ((ManualResetEvent) waithandle).Set ();
- }
- }
- }
- }
-
- public Socket Socket
- {
- get
- {
- return acc_socket;
- }
- }
-
- public int Total
- {
- get
- {
- return total;
- }
- set
- {
- total = value;
- }
- }
- }
-
- private sealed class Worker
- {
- SocketAsyncResult result;
-
- public Worker (SocketAsyncResult ares)
- {
- this.result = ares;
- }
-
- public void Accept ()
- {
- Socket acc_socket = null;
- try
- {
- acc_socket = result.Sock.Accept ();
- }
- catch (Exception e)
- {
- result.Complete (e);
- return;
- }
-
- result.Complete (acc_socket);
- }
-
- public void Connect ()
- {
- try
- {
- result.Sock.Connect (result.EndPoint);
- result.Sock.connected = true;
- }
- catch (Exception e)
- {
- result.Complete (e);
- return;
- }
-
- result.Complete ();
- }
-
-#if !TARGET_JVM
- public void Receive ()
- {
- // Actual recv() done in the runtime
- result.Complete ();
- }
-#else
- public void Receive ()
- {
- int total = 0;
- try
- {
- total = result.Sock.Receive_nochecks (result.Buffer,
- result.Offset,
- result.Size,
- result.SockFlags);
- }
- catch (Exception e)
- {
- result.Complete (e);
- return;
- }
-
- result.Complete (total);
- }
-#endif
-
- public void ReceiveFrom ()
- {
- int total = 0;
- try
- {
- total = result.Sock.ReceiveFrom_nochecks (result.Buffer,
- result.Offset,
- result.Size,
- result.SockFlags,
- ref result.EndPoint);
- }
- catch (Exception e)
- {
- result.Complete (e);
- return;
- }
-
- result.Complete (total);
- }
-
- int send_so_far;
-
- void UpdateSendValues (int last_sent)
- {
- if (result.error == 0)
- {
- send_so_far += last_sent;
- result.Offset += last_sent;
- result.Size -= last_sent;
- }
- }
-
-#if !TARGET_JVM
- public void Send ()
- {
- // Actual send() done in the runtime
- if (result.error == 0)
- {
- UpdateSendValues (result.Total);
- if (result.Sock.disposed)
- {
- result.Complete ();
- return;
- }
-
- if (result.Size > 0)
- {
- SocketAsyncCall sac = new SocketAsyncCall (this.Send);
- sac.BeginInvoke (null, result);
- return; // Have to finish writing everything. See bug #74475.
- }
- result.Total = send_so_far;
- }
- result.Complete ();
- }
-#else
- public void Send ()
- {
- int total = 0;
- try
- {
- total = result.Sock.Send_nochecks (result.Buffer,
- result.Offset,
- result.Size,
- result.SockFlags);
-
- UpdateSendValues (total);
- if (result.Size > 0)
- {
- SocketAsyncCall sac = new SocketAsyncCall (this.SendTo);
- sac.BeginInvoke (null, result);
- return; // Have to finish writing everything. See bug #74475.
- }
- result.Total = send_so_far;
- }
- catch (Exception e)
- {
- result.Complete (e);
- return;
- }
-
- result.Complete ();
- }
-#endif
-
- public void SendTo ()
- {
- int total = 0;
- try
- {
- total = result.Sock.SendTo_nochecks (result.Buffer,
- result.Offset,
- result.Size,
- result.SockFlags,
- result.EndPoint);
-
- UpdateSendValues (total);
- if (result.Size > 0)
- {
- SocketAsyncCall sac = new SocketAsyncCall (this.SendTo);
- sac.BeginInvoke (null, result);
- return; // Have to finish writing everything. See bug #74475.
- }
- result.Total = send_so_far;
- }
- catch (Exception e)
- {
- result.Complete (e);
- return;
- }
-
- result.Complete ();
- }
- }
-
-
- /* the field "socket" is looked up by name by the runtime */
-#if !TARGET_JVM
- private IntPtr socket;
-#else
- private GHSocket socket;
-#endif
- private AddressFamily address_family;
- private SocketType socket_type;
- private ProtocolType protocol_type;
- internal bool blocking=true;
- private Queue readQ = new Queue (2);
- private Queue writeQ = new Queue (2);
-
-
- delegate void SocketAsyncCall ();
- /*
- * These two fields are looked up by name by the runtime, don't change
- * their name without also updating the runtime code.
- */
- private static int ipv4Supported = -1, ipv6Supported = -1;
-
- /* When true, the socket was connected at the time of
- * the last IO operation
- */
- private bool connected=false;
- /* true if we called Close_internal */
- private bool closed;
- internal bool disposed;
-
- /* Used in LocalEndPoint and RemoteEndPoint if the
- * Mono.Posix assembly is available
- */
- private static object unixendpoint=null;
- private static Type unixendpointtype=null;
-
- static void AddSockets (ArrayList sockets, IList list, string name)
- {
- if (list != null)
- {
- foreach (Socket sock in list)
- {
- if (sock == null) // MS throws a NullRef
- throw new ArgumentNullException (name, "Contains a null element");
- sockets.Add (sock);
- }
- }
-
- sockets.Add (null);
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Select_internal (ref Socket [] sockets,
- int microSeconds,
- out int error);
-#else
- private static void Select_internal (ref Socket [] sockets, int microSeconds, out int error)
- {
- GHSocketFactory.Select_internal(ref sockets, microSeconds, out error);
- }
-#endif
-
- public static void Select (IList checkRead, IList checkWrite, IList checkError, int microSeconds)
- {
- ArrayList list = new ArrayList ();
- AddSockets (list, checkRead, "checkRead");
- AddSockets (list, checkWrite, "checkWrite");
- AddSockets (list, checkError, "checkError");
-
- if (list.Count == 3)
- {
- throw new ArgumentNullException ("checkRead, checkWrite, checkError",
- "All the lists are null or empty.");
- }
-
- int error;
- /*
- * The 'sockets' array contains: READ socket 0-n, null,
- * WRITE socket 0-n, null,
- * ERROR socket 0-n, null
- */
- Socket [] sockets = (Socket []) list.ToArray (typeof (Socket));
- Select_internal (ref sockets, microSeconds, out error);
-
- if (error != 0)
- throw new SocketException (error);
-
- if (checkRead != null)
- checkRead.Clear ();
-
- if (checkWrite != null)
- checkWrite.Clear ();
-
- if (checkError != null)
- checkError.Clear ();
-
- if (sockets == null)
- return;
-
- int mode = 0;
- int count = sockets.Length;
- IList currentList = checkRead;
- for (int i = 0; i < count; i++)
- {
- Socket sock = sockets [i];
- if (sock == null)
- { // separator
- currentList = (mode == 0) ? checkWrite : checkError;
- mode++;
- continue;
- }
-
- if (currentList != null)
- {
- sock.connected = true;
- currentList.Add (sock);
- }
- }
- }
-
-#if !TARGET_JVM
- static Socket()
- {
- Assembly ass;
-
- try {
- ass = Assembly.Load (Consts.AssemblyMono_Posix);
- } catch (FileNotFoundException) {
- return;
- }
-
- unixendpointtype=ass.GetType("Mono.Posix.UnixEndPoint");
-
- /* The endpoint Create() method is an instance
- * method :-(
- */
- Type[] arg_types=new Type[1];
- arg_types[0]=typeof(string);
- ConstructorInfo cons=unixendpointtype.GetConstructor(arg_types);
-
- object[] args=new object[1];
- args[0]="";
-
- unixendpoint=cons.Invoke(args);
- }
-#endif
-
-#if !TARGET_JVM
- // private constructor used by Accept, which already
- // has a socket handle to use
- private Socket(AddressFamily family, SocketType type,
- ProtocolType proto, IntPtr sock)
-#else
- // private constructor used by Accept, which already
- // has a socket handle to use
- private Socket(AddressFamily family, SocketType type,
- ProtocolType proto, GHSocket sock)
- {
-#endif
- address_family=family;
- socket_type=type;
- protocol_type=proto;
-
- socket=sock;
- connected=true;
- }
-
-
-#if !TARGET_JVM
- // Creates a new system socket, returning the handle
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern IntPtr Socket_internal(AddressFamily family,
- SocketType type,
- ProtocolType proto,
- out int error);
-#else
- private GHSocket Socket_internal(AddressFamily family,
- SocketType type,
- ProtocolType proto,
- out int error)
- {
- return GHSocketFactory.Socket_internal(family, type, proto, out error);
- }
-#endif
-
- public Socket(AddressFamily family, SocketType type,
- ProtocolType proto)
- {
- address_family=family;
- socket_type=type;
- protocol_type=proto;
- int error;
-
- socket=Socket_internal(family, type, proto, out error);
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-
- public AddressFamily AddressFamily
- {
- get
- {
- return(address_family);
- }
- }
-
-#if !TARGET_JVM
- // Returns the amount of data waiting to be read on socket
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static int Available_internal(IntPtr socket,
- out int error);
-#else
- private int Available_internal(GHSocket socket, out int error)
- {
- return socket.Available_internal(out error);
- }
-#endif
-
- public int Available
- {
- get
- {
- EnsureStillUsable();
-
- int ret, error;
-
- ret = Available_internal(socket, out error);
-
- if (error != 0)
- {
- throw new SocketException (error);
- }
-
- return(ret);
- }
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Blocking_internal(IntPtr socket,
- bool block,
- out int error);
-#else
- private void Blocking_internal(GHSocket socket, bool block, out int error)
- {
- socket.Blocking_internal(block, out error);
- }
-#endif
-
- public bool Blocking
- {
- get
- {
- return(blocking);
- }
- set
- {
- EnsureStillUsable();
-
- int error;
-
- Blocking_internal(socket, value, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
-
- blocking=value;
- }
- }
-
- public bool Connected
- {
- get
- {
- return(connected);
- }
- }
-
-#if !TARGET_JVM
- public IntPtr Handle
- {
- get
- {
- return(socket);
- }
- }
-#else
- public IntPtr Handle
- {
- get
- {
- throw new NotImplementedException ();
- }
- }
-
- internal GHSocket GHHandle
- {
- get
- {
- return socket;
- }
- }
-#endif
-
-#if !TARGET_JVM
- // Returns the local endpoint details in addr and port
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static SocketAddress LocalEndPoint_internal(IntPtr socket, out int error);
-
- [MonoTODO("Support non-IP endpoints")]
- public EndPoint LocalEndPoint
- {
- get
- {
- if (disposed && closed)
- throw new ObjectDisposedException (GetType ().ToString ());
-
- SocketAddress sa;
- int error;
-
- sa=LocalEndPoint_internal(socket, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
-
- if(sa.Family==AddressFamily.InterNetwork || sa.Family==AddressFamily.InterNetworkV6) {
- // Stupidly, EndPoint.Create() is an
- // instance method
- return new IPEndPoint(0, 0).Create(sa);
- } else if (sa.Family==AddressFamily.Unix &&
- unixendpoint!=null) {
- return((EndPoint)unixendpointtype.InvokeMember("Create", BindingFlags.InvokeMethod|BindingFlags.Instance|BindingFlags.Public, null, unixendpoint, new object[] {sa}));
- } else {
- throw new NotImplementedException();
- }
- }
- }
-#else
- private EndPoint LocalEndPoint_internal(GHSocket socket, out int error)
- {
- return socket.LocalEndPoint_internal(out error);
- }
-
- public EndPoint LocalEndPoint
- {
- get
- {
- EnsureStillUsable();
-
- int error;
-
- EndPoint ret = LocalEndPoint_internal(socket, out error);
-
- if (error != 0)
- {
- throw new SocketException (error);
- }
-
- return ret;
- }
- }
-#endif
-
- public ProtocolType ProtocolType
- {
- get
- {
- return(protocol_type);
- }
- }
-
-#if !TARGET_JVM
- // Returns the remote endpoint details in addr and port
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static SocketAddress RemoteEndPoint_internal(IntPtr socket, out int error);
-
- [MonoTODO("Support non-IP endpoints")]
- public EndPoint RemoteEndPoint
- {
- get
- {
- if (disposed && closed)
- throw new ObjectDisposedException (GetType ().ToString ());
-
- SocketAddress sa;
- int error;
-
- sa=RemoteEndPoint_internal(socket, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
-
- if(sa.Family==AddressFamily.InterNetwork || sa.Family==AddressFamily.InterNetworkV6 ) {
- // Stupidly, EndPoint.Create() is an
- // instance method
- return new IPEndPoint(0, 0).Create(sa);
- } else if (sa.Family==AddressFamily.Unix &&
- unixendpoint!=null) {
- return((EndPoint)unixendpointtype.InvokeMember("Create", BindingFlags.InvokeMethod|BindingFlags.Instance|BindingFlags.Public, null, unixendpoint, new object[] {sa}));
- } else {
- throw new NotImplementedException();
- }
- }
- }
-#else
- private EndPoint RemoteEndPoint_internal(GHSocket socket, out int error)
- {
- return socket.RemoteEndPoint_internal(out error);
- }
-
- public EndPoint RemoteEndPoint
- {
- get
- {
- EnsureStillUsable();
-
- int error;
-
- EndPoint ret = RemoteEndPoint_internal(socket, out error);
-
- if (error != 0)
- {
- throw new SocketException (error);
- }
-
- return ret;
- }
- }
-#endif
-
- public SocketType SocketType
- {
- get
- {
- return(socket_type);
- }
- }
-
- public static bool SupportsIPv4
- {
- get
- {
- CheckProtocolSupport();
- return ipv4Supported == 1;
- }
- }
-
- public static bool SupportsIPv6
- {
- get
- {
- CheckProtocolSupport();
- return ipv6Supported == 1;
- }
- }
-
- internal static void CheckProtocolSupport()
- {
- if(ipv4Supported == -1)
- {
- try
- {
- Socket tmp = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- tmp.Close();
-
- ipv4Supported = 1;
- }
- catch
- {
- ipv4Supported = 0;
- }
- }
-
- if(ipv6Supported == -1)
- {
-#if CONFIGURATION_DEP
- SettingsSection config;
- config = (SettingsSection) System.Configuration.ConfigurationManager.GetSection ("system.net/settings");
- if (config != null)
- ipv6Supported = config.Ipv6.Enabled ? -1 : 0;
-#else
- NetConfig config = (NetConfig)System.Configuration.ConfigurationSettings.GetConfig("system.net/settings");
-
- if(config != null)
- ipv6Supported = config.ipv6Enabled?-1:0;
-#endif
- if(ipv6Supported != 0)
- {
- try
- {
- Socket tmp = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
- tmp.Close();
-
- ipv6Supported = 1;
- }
- catch { }
- }
- }
- }
-
-#if !TARGET_JVM
- // Creates a new system socket, returning the handle
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static IntPtr Accept_internal(IntPtr sock,
- out int error);
-#else
- private GHSocket Accept_internal(GHSocket sock, out int error)
- {
- return sock.Accept_internal(out error);
- }
-#endif
-
- public Socket Accept()
- {
- EnsureStillUsable();
-
- int error = 0;
-#if !TARGET_JVM
- IntPtr sock = (IntPtr) (-1);
-#else
- GHSocket sock = null;
-#endif
- sock = Accept_internal(socket, out error);
- if (error != 0) {
- throw new SocketException (error);
- }
-
- Socket accepted = new Socket(this.AddressFamily,
- this.SocketType,
- this.ProtocolType, sock);
-
- accepted.Blocking = this.Blocking;
- return(accepted);
- }
-
- public IAsyncResult BeginAccept(AsyncCallback callback,
- object state)
- {
-
- EnsureStillUsable();
-
- SocketAsyncResult req = new SocketAsyncResult (this, state, callback, SocketOperation.Accept);
- Worker worker = new Worker (req);
- SocketAsyncCall sac = new SocketAsyncCall (worker.Accept);
- sac.BeginInvoke (null, req);
- return(req);
- }
-
- public IAsyncResult BeginConnect(EndPoint end_point,
- AsyncCallback callback,
- object state)
- {
-
- EnsureStillUsable();
-
- if (end_point == null)
- throw new ArgumentNullException ("end_point");
-
- SocketAsyncResult req = new SocketAsyncResult (this, state, callback, SocketOperation.Connect);
- req.EndPoint = end_point;
-
- // Bug #75154: Connect() should not succeed for .Any addresses.
- if (end_point is IPEndPoint)
- {
- IPEndPoint ep = (IPEndPoint) end_point;
- if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))
- {
- req.Complete (new SocketException (10049), true);
- return req;
- }
- }
-
- int error = 0;
- if (!blocking)
- {
-#if !TARGET_JVM
- SocketAddress serial = end_point.Serialize ();
- Connect_internal (socket, serial, out error);
-#else
- Connect_internal (socket, end_point, out error);
-#endif
- if (error == 0)
- {
- // succeeded synch
- connected = true;
- req.Complete (true);
- }
- else if (error != 10036 && error != 10035)
- {
- // error synch
- connected = false;
- req.Complete (new SocketException (error), true);
- }
- }
-
- if (blocking || error == 10036 || error == 10035)
- {
- // continue asynch
- connected = false;
- Worker worker = new Worker (req);
- SocketAsyncCall sac = new SocketAsyncCall (worker.Connect);
- sac.BeginInvoke (null, req);
- }
-
- return(req);
- }
-
- public IAsyncResult BeginReceive(byte[] buffer, int offset,
- int size,
- SocketFlags socket_flags,
- AsyncCallback callback,
- object state)
- {
-
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (offset < 0 || offset > buffer.Length)
- throw new ArgumentOutOfRangeException ("offset");
-
- if (size < 0 || offset + size > buffer.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- SocketAsyncResult req;
- lock (readQ)
- {
- req = new SocketAsyncResult (this, state, callback, SocketOperation.Receive);
- req.Buffer = buffer;
- req.Offset = offset;
- req.Size = size;
- req.SockFlags = socket_flags;
- readQ.Enqueue (req);
- if (readQ.Count == 1)
- {
- Worker worker = new Worker (req);
- SocketAsyncCall sac = new SocketAsyncCall (worker.Receive);
- sac.BeginInvoke (null, req);
- }
- }
-
- return req;
- }
-
- public IAsyncResult BeginReceiveFrom(byte[] buffer, int offset,
- int size,
- SocketFlags socket_flags,
- ref EndPoint remote_end,
- AsyncCallback callback,
- object state)
- {
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (offset < 0)
- throw new ArgumentOutOfRangeException ("offset must be >= 0");
-
- if (size < 0)
- throw new ArgumentOutOfRangeException ("size must be >= 0");
-
- if (offset + size > buffer.Length)
- throw new ArgumentOutOfRangeException ("offset + size exceeds the buffer length");
-
- SocketAsyncResult req;
- lock (readQ)
- {
- req = new SocketAsyncResult (this, state, callback, SocketOperation.ReceiveFrom);
- req.Buffer = buffer;
- req.Offset = offset;
- req.Size = size;
- req.SockFlags = socket_flags;
- req.EndPoint = remote_end;
- readQ.Enqueue (req);
- if (readQ.Count == 1)
- {
- Worker worker = new Worker (req);
- SocketAsyncCall sac = new SocketAsyncCall (worker.ReceiveFrom);
- sac.BeginInvoke (null, req);
- }
- }
- return req;
- }
-
- public IAsyncResult BeginSend (byte[] buffer, int offset, int size, SocketFlags socket_flags,
- AsyncCallback callback, object state)
- {
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (offset < 0)
- throw new ArgumentOutOfRangeException ("offset must be >= 0");
-
- if (size < 0)
- throw new ArgumentOutOfRangeException ("size must be >= 0");
-
- if (offset + size > buffer.Length)
- throw new ArgumentOutOfRangeException ("offset + size exceeds the buffer length");
-
- SocketAsyncResult req;
- lock (writeQ)
- {
- req = new SocketAsyncResult (this, state, callback, SocketOperation.Send);
- req.Buffer = buffer;
- req.Offset = offset;
- req.Size = size;
- req.SockFlags = socket_flags;
- writeQ.Enqueue (req);
- if (writeQ.Count == 1)
- {
- Worker worker = new Worker (req);
- SocketAsyncCall sac = new SocketAsyncCall (worker.Send);
- sac.BeginInvoke (null, req);
- }
- }
- return req;
- }
-
- public IAsyncResult BeginSendTo(byte[] buffer, int offset,
- int size,
- SocketFlags socket_flags,
- EndPoint remote_end,
- AsyncCallback callback,
- object state)
- {
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (offset < 0)
- throw new ArgumentOutOfRangeException ("offset must be >= 0");
-
- if (size < 0)
- throw new ArgumentOutOfRangeException ("size must be >= 0");
-
- if (offset + size > buffer.Length)
- throw new ArgumentOutOfRangeException ("offset + size exceeds the buffer length");
-
- SocketAsyncResult req;
- lock (writeQ)
- {
- req = new SocketAsyncResult (this, state, callback, SocketOperation.SendTo);
- req.Buffer = buffer;
- req.Offset = offset;
- req.Size = size;
- req.SockFlags = socket_flags;
- req.EndPoint = remote_end;
- writeQ.Enqueue (req);
- if (writeQ.Count == 1)
- {
- Worker worker = new Worker (req);
- SocketAsyncCall sac = new SocketAsyncCall (worker.SendTo);
- sac.BeginInvoke (null, req);
- }
- }
- return req;
- }
-
-#if !TARGET_JVM
- // Creates a new system socket, returning the handle
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Bind_internal(IntPtr sock,
- SocketAddress sa,
- out int error);
-
- public void Bind(EndPoint local_end)
- {
- if (disposed && closed)
- throw new ObjectDisposedException (GetType ().ToString ());
-
- if(local_end==null) {
- throw new ArgumentNullException("local_end");
- }
-
- int error;
-
- Bind_internal(socket, local_end.Serialize(),
- out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-#else
- private void Bind_internal(GHSocket sock,
- EndPoint sa,
- out int error)
- {
- sock.Bind_internal(sa, out error);
- }
-
- public void Bind(EndPoint local_end)
- {
- EnsureStillUsable();
-
- if(local_end==null) {
- throw new ArgumentNullException("local_end");
- }
-
- int error;
-
- Bind_internal(socket, local_end,
- out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-#endif
-
-#if !TARGET_JVM
- // Closes the socket
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Close_internal(IntPtr socket,
- out int error);
-#else
- private void Close_internal(GHSocket socket, out int error)
- {
- socket.Close_internal(out error);
- }
-#endif
-
- public void Close()
- {
- ((IDisposable) this).Dispose ();
- }
-
-#if !TARGET_JVM
- // Connects to the remote address
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Connect_internal(IntPtr sock,
- SocketAddress sa,
- out int error);
-#else
- private void Connect_internal(GHSocket sock,
- EndPoint sa,
- out int error)
- {
- sock.Connect_internal(sa, out error);
- }
-#endif
-
- public void Connect(EndPoint remote_end)
- {
- EnsureStillUsable();
-
- if(remote_end==null) {
- throw new ArgumentNullException("remote_end");
- }
-
- if (remote_end is IPEndPoint) {
- IPEndPoint ep = (IPEndPoint) remote_end;
- if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any))
- throw new SocketException (10049);
- }
-
- int error = 0;
-
-#if !TARGET_JVM
- Connect_internal (socket, remote_end.Serialize(), out error);
-#else
- Connect_internal (socket, remote_end, out error);
-#endif
- if (error != 0) {
- throw new SocketException (error);
- }
-
- connected=true;
- }
-
-#if TARGET_JVM
- public void ChangeToSSL()
- {
- try
- {
- GHSocket tmp = socket.ChangeToSSL(null);
- if (tmp != null)
- {
- socket = tmp;
- }
- }
- catch (Exception e)
- {
-#if DEBUG
- Console.WriteLine("Caught exception during ChangeToSSL: {0}, {1}", e.GetType(), e.Message);
-#endif
- throw new SocketException(10045);
- }
- }
-#endif
-
- public Socket EndAccept(IAsyncResult result)
- {
- EnsureStillUsable();
-
- if (result == null)
- throw new ArgumentNullException ("result");
-
- SocketAsyncResult req = result as SocketAsyncResult;
- if (req == null)
- throw new ArgumentException ("Invalid IAsyncResult", "result");
-
- if (!result.IsCompleted)
- result.AsyncWaitHandle.WaitOne();
-
- req.CheckIfThrowDelayedException();
- return req.Socket;
- }
-
- public void EndConnect(IAsyncResult result) {
- EnsureStillUsable();
-
- if (result == null)
- throw new ArgumentNullException ("result");
-
- SocketAsyncResult req = result as SocketAsyncResult;
- if (req == null)
- throw new ArgumentException ("Invalid IAsyncResult", "result");
-
- if (!result.IsCompleted)
- result.AsyncWaitHandle.WaitOne();
-
- req.CheckIfThrowDelayedException();
- }
-
- [MonoNotSupported ("")]
- public void EndDisconnect (IAsyncResult asyncResult)
- {
- throw new NotImplementedException ();
- }
-
- public int EndReceive(IAsyncResult result) {
- EnsureStillUsable();
-
- if (result == null)
- throw new ArgumentNullException ("result");
-
- SocketAsyncResult req = result as SocketAsyncResult;
- if (req == null)
- throw new ArgumentException ("Invalid IAsyncResult", "result");
-
- if (!result.IsCompleted)
- result.AsyncWaitHandle.WaitOne();
-
- req.CheckIfThrowDelayedException();
- return req.Total;
- }
-
- public int EndReceiveFrom(IAsyncResult result,
- ref EndPoint end_point)
- {
- EnsureStillUsable();
-
- if (result == null)
- throw new ArgumentNullException ("result");
-
- SocketAsyncResult req = result as SocketAsyncResult;
- if (req == null)
- throw new ArgumentException ("Invalid IAsyncResult", "result");
-
- if (!result.IsCompleted)
- result.AsyncWaitHandle.WaitOne();
-
- req.CheckIfThrowDelayedException();
- end_point = req.EndPoint;
- return req.Total;
- }
-
- public int EndSend(IAsyncResult result) {
- EnsureStillUsable();
-
- if (result == null)
- throw new ArgumentNullException ("result");
-
- SocketAsyncResult req = result as SocketAsyncResult;
- if (req == null)
- throw new ArgumentException ("Invalid IAsyncResult", "result");
-
- if (!result.IsCompleted)
- result.AsyncWaitHandle.WaitOne();
-
- req.CheckIfThrowDelayedException();
- return req.Total;
- }
-
- public int EndSendTo(IAsyncResult result) {
- EnsureStillUsable();
-
- if (result == null)
- throw new ArgumentNullException ("result");
-
- SocketAsyncResult req = result as SocketAsyncResult;
- if (req == null)
- throw new ArgumentException ("Invalid IAsyncResult", "result");
-
- if (!result.IsCompleted)
- result.AsyncWaitHandle.WaitOne();
-
- req.CheckIfThrowDelayedException();
- return req.Total;
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void GetSocketOption_obj_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error);
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void GetSocketOption_arr_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val, out int error);
-#else
- private void GetSocketOption_obj_internal(GHSocket socket, SocketOptionLevel level,
- SocketOptionName name, out object obj_val, out int error)
- {
- EnsureStillUsable();
-
- socket.GetSocketOption_obj_internal(level, name, out obj_val, out error);
- }
- private void GetSocketOption_arr_internal(GHSocket socket, SocketOptionLevel level,
- SocketOptionName name, ref byte[] byte_val, out int error)
- {
- EnsureStillUsable();
-
- socket.GetSocketOption_arr_internal(level, name, ref byte_val, out error);
- }
-#endif
-
- public object GetSocketOption(SocketOptionLevel level,
- SocketOptionName name) {
- object obj_val;
- int error;
-
- GetSocketOption_obj_internal(socket, level, name,
- out obj_val, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
-
- if(name==SocketOptionName.Linger) {
- return((LingerOption)obj_val);
- } else if (name==SocketOptionName.AddMembership ||
- name==SocketOptionName.DropMembership) {
- return((MulticastOption)obj_val);
- } else if (obj_val is int) {
- return((int)obj_val);
- } else {
- return(obj_val);
- }
- }
-
- public void GetSocketOption(SocketOptionLevel level,
- SocketOptionName name,
- byte[] opt_value) {
- int error;
-
- GetSocketOption_arr_internal(socket, level, name,
- ref opt_value, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-
- public byte[] GetSocketOption(SocketOptionLevel level,
- SocketOptionName name,
- int length) {
- byte[] byte_val=new byte[length];
- int error;
-
- GetSocketOption_arr_internal(socket, level, name,
- ref byte_val, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
-
- return(byte_val);
- }
-
-#if !TARGET_JVM
- // See Socket.IOControl, WSAIoctl documentation in MSDN. The
- // common options between UNIX and Winsock are FIONREAD,
- // FIONBIO and SIOCATMARK. Anything else will depend on the
- // system.
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static int WSAIoctl (IntPtr sock, int ioctl_code,
- byte [] input, byte [] output,
- out int error);
-#else
- int WSAIoctl (GHSocket sock, int ioctl_code,
- byte [] input, byte [] output,
- out int error)
- {
- return sock.WSAIoctl(ioctl_code, input, output, out error);
- }
-#endif
-
- public int IOControl (int ioctl_code, byte [] in_value, byte [] out_value)
- {
- if (disposed)
- throw new ObjectDisposedException (GetType ().ToString ());
-
- int error;
- int result = WSAIoctl (socket, ioctl_code, in_value,
- out_value, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
-
- if (result == -1)
- throw new InvalidOperationException ("Must use Blocking property instead.");
-
- return result;
- }
-
- [MonoNotSupported ("")]
- public int IOControl (IOControlCode ioControlCode, byte [] optionInValue, byte [] optionOutValue)
- {
- throw new NotImplementedException ();
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Listen_internal(IntPtr sock,
- int backlog,
- out int error);
-#else
- private void Listen_internal(GHSocket sock,
- int backlog,
- out int error)
- {
- EnsureStillUsable();
-
- sock.Listen_internal(backlog, out error);
- }
-#endif
-
- public void Listen(int backlog)
- {
- int error;
-
- Listen_internal(socket, backlog, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static bool Poll_internal (IntPtr socket, SelectMode mode, int timeout, out int error);
-#else
- bool Poll_internal (GHSocket socket, SelectMode mode, int timeout, out int error)
- {
- return socket.Poll_internal(mode, timeout, this, out error);
- }
-#endif
-
- public bool Poll(int time_us, SelectMode mode)
- {
- EnsureStillUsable();
-
- if (mode != SelectMode.SelectRead &&
- mode != SelectMode.SelectWrite &&
- mode != SelectMode.SelectError)
- throw new NotSupportedException ("'mode' parameter is not valid.");
-
- int error;
- bool result = Poll_internal (socket, mode, time_us, out error);
- if (error != 0)
- throw new SocketException (error);
-
- if (result == true) {
- /* Update the connected state; for
- * non-blocking Connect()s this is
- * when we can find out that the
- * connect succeeded.
- */
- connected = true;
- }
-
- return result;
- }
-
- public int Receive (byte [] buf)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- return Receive_nochecks (buf, 0, buf.Length, SocketFlags.None);
- }
-
- public int Receive (byte [] buf, SocketFlags flags)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- return Receive_nochecks (buf, 0, buf.Length, flags);
- }
-
- public int Receive (byte [] buf, int size, SocketFlags flags)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- if (size < 0 || size > buf.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return Receive_nochecks (buf, 0, size, flags);
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static int Receive_internal(IntPtr sock,
- byte[] buffer,
- int offset,
- int count,
- SocketFlags flags,
- out int error);
-#else
- private int Receive_internal(GHSocket sock,
- byte[] buffer,
- int offset,
- int count,
- SocketFlags flags,
- out int error)
- {
- return sock.Receive_internal(buffer, offset, count, flags, out error);
- }
-#endif
-
- public int Receive (byte [] buf, int offset, int size, SocketFlags flags)
- {
- EnsureStillUsable();
-
- if(buf==null)
- throw new ArgumentNullException ("buf");
-
- if (offset < 0 || offset > buf.Length)
- throw new ArgumentOutOfRangeException ("offset");
-
- if (size < 0 || offset + size > buf.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return Receive_nochecks (buf, offset, size, flags);
- }
-
- int Receive_nochecks (byte [] buf, int offset, int size, SocketFlags flags)
- {
- int ret, error;
- ret = Receive_internal (socket, buf, offset, size, flags, out error);
-
- if(error != 0) {
- if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
- connected=false;
-
- throw new SocketException (error);
- }
-
- connected=true;
-
- return ret;
- }
-
- public int ReceiveFrom (byte [] buf, ref EndPoint remote_end)
- {
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
-
- return ReceiveFrom_nochecks (buf, 0, buf.Length, SocketFlags.None, ref remote_end);
- }
-
- public int ReceiveFrom (byte [] buf, SocketFlags flags, ref EndPoint remote_end)
- {
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
-
-
- return ReceiveFrom_nochecks (buf, 0, buf.Length, flags, ref remote_end);
- }
-
- public int ReceiveFrom(byte[] buf, int size, SocketFlags flags,
- ref EndPoint remote_end)
- {
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
-
- if (size < 0 || size > buf.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return ReceiveFrom_nochecks (buf, 0, size, flags, ref remote_end);
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static int RecvFrom_internal(IntPtr sock,
- byte[] buffer,
- int offset,
- int count,
- SocketFlags flags,
- ref SocketAddress sockaddr,
- out int error);
-#else
- private int RecvFrom_internal(GHSocket sock,
- byte[] buffer,
- int offset,
- int count,
- SocketFlags flags,
- ref SocketAddress sockaddr,
- out int error)
- {
- return sock.RecvFrom_internal(buffer, offset, count, flags, ref sockaddr, out error);
- }
-
-#endif
-
- public int ReceiveFrom(byte[] buf, int offset, int size, SocketFlags flags,
- ref EndPoint remote_end)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
-
- if (offset < 0 || offset > buf.Length)
- throw new ArgumentOutOfRangeException ("offset");
-
- if (size < 0 || offset + size > buf.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return ReceiveFrom_nochecks (buf, offset, size, flags, ref remote_end);
- }
-
- int ReceiveFrom_nochecks (byte [] buf, int offset, int size, SocketFlags flags,
- ref EndPoint remote_end)
- {
- EnsureStillUsable();
-
- SocketAddress sockaddr=remote_end.Serialize();
- int cnt, error;
-
- cnt = RecvFrom_internal (socket, buf, offset, size, flags, ref sockaddr, out error);
-
- if (error != 0) {
- if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
- connected=false;
-
- throw new SocketException (error);
- }
-
- connected=true;
-
- // If sockaddr is null then we're a connection
- // oriented protocol and should ignore the
- // remote_end parameter (see MSDN
- // documentation for Socket.ReceiveFrom(...) )
-
- if ( sockaddr != null ) {
- // Stupidly, EndPoint.Create() is an
- // instance method
- remote_end=remote_end.Create(sockaddr);
- }
-
- return cnt;
- }
-
- public int Send (byte [] buf)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- return Send_nochecks (buf, 0, buf.Length, SocketFlags.None);
- }
-
- public int Send (byte [] buf, SocketFlags flags)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- return Send_nochecks (buf, 0, buf.Length, flags);
- }
-
- public int Send (byte [] buf, int size, SocketFlags flags)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buf");
-
- if (size < 0 || size > buf.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return Send_nochecks (buf, 0, size, flags);
- }
-
- [MonoNotSupported ("")]
- public int Send (byte [] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public int Send (IList<ArraySegment<byte>> buffers)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public int Send (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags)
- {
- throw new NotImplementedException ();
- }
-
- //[CLSCompliantAttribute (false)]
- [MonoNotSupported ("")]
- public int Send (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out SocketError errorCode)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public int Receive (byte [] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public int Receive (IList<ArraySegment<byte>> buffers)
- {
- throw new NotImplementedException ();
- }
-
- //[CLSCompliantAttribute (false)]
- [MonoNotSupported ("")]
- public int Receive (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags)
- {
- throw new NotImplementedException ();
- }
-
- //[CLSCompliantAttribute (false)]
- [MonoNotSupported ("")]
- public int Receive (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out SocketError errorCode)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public int ReceiveMessageFrom (byte [] buffer, int offset, int size, ref SocketFlags socketFlags, ref EndPoint remoteEP, out IPPacketInformation ipPacketInformation)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public IAsyncResult BeginReceiveMessageFrom (byte [] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback callback, Object state)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public int EndReceiveMessageFrom (IAsyncResult asyncResult, ref SocketFlags socketFlags, ref EndPoint endPoint, out IPPacketInformation ipPacketInformation)
- {
- throw new NotImplementedException ();
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static int Send_internal(IntPtr sock,
- byte[] buf, int offset,
- int count,
- SocketFlags flags,
- out int error);
-#else
- private int Send_internal(GHSocket sock,
- byte[] buf, int offset,
- int count,
- SocketFlags flags,
- out int error)
- {
- return sock.Send_internal(buf, offset, count, flags, out error);
- }
-#endif
-
- public int Send (byte[] buf, int offset, int size, SocketFlags flags)
- {
- EnsureStillUsable();
-
- if (buf == null)
- throw new ArgumentNullException ("buffer");
-
- if (offset < 0 || offset > buf.Length)
- throw new ArgumentOutOfRangeException ("offset");
-
- if (size < 0 || offset + size > buf.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return Send_nochecks (buf, offset, size, flags);
- }
-
- int Send_nochecks (byte [] buf, int offset, int size, SocketFlags flags)
- {
- if (size == 0)
- return 0;
-
- int ret, error;
-
- ret = Send_internal (socket, buf, offset, size, flags, out error);
-
- if (error != 0) {
- if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
- connected = false;
-
- throw new SocketException (error);
- }
- connected = true;
-
- return ret;
- }
-
- public int SendTo (byte [] buffer, EndPoint remote_end)
- {
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
-
- return SendTo_nochecks (buffer, 0, buffer.Length, SocketFlags.None, remote_end);
- }
-
- public int SendTo (byte [] buffer, SocketFlags flags, EndPoint remote_end)
- {
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
-
- return SendTo_nochecks (buffer, 0, buffer.Length, flags, remote_end);
- }
-
- public int SendTo (byte [] buffer, int size, SocketFlags flags, EndPoint remote_end)
- {
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (remote_end == null)
- throw new ArgumentNullException ("remote_end");
-
- if (size < 0 || size > buffer.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return SendTo_nochecks (buffer, 0, size, flags, remote_end);
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static int SendTo_internal(IntPtr sock,
- byte[] buffer,
- int offset,
- int count,
- SocketFlags flags,
- SocketAddress sa,
- out int error);
-#else
- private int SendTo_internal(GHSocket sock,
- byte[] buffer,
- int offset,
- int count,
- SocketFlags flags,
- SocketAddress sa,
- out int error)
- {
- return sock.SendTo_internal(buffer, offset, count, flags, sa, out error);
- }
-#endif
-
- public int SendTo(byte[] buffer, int offset, int size, SocketFlags flags,
- EndPoint remote_end)
- {
- EnsureStillUsable();
-
- if (buffer == null)
- throw new ArgumentNullException ("buffer");
-
- if (remote_end == null)
- throw new ArgumentNullException("remote_end");
-
- if (offset < 0 || offset > buffer.Length)
- throw new ArgumentOutOfRangeException ("offset");
-
- if (size < 0 || offset + size > buffer.Length)
- throw new ArgumentOutOfRangeException ("size");
-
- return SendTo_nochecks (buffer, offset, size, flags, remote_end);
- }
-
- int SendTo_nochecks (byte [] buffer, int offset, int size, SocketFlags flags,
- EndPoint remote_end)
- {
- SocketAddress sockaddr=remote_end.Serialize();
-
- int ret, error;
-
- ret = SendTo_internal (socket, buffer, offset, size, flags, sockaddr, out error);
-
- if (error != 0) {
- if (error != 10035 && error != 10036) // WSAEWOULDBLOCK && WSAEINPROGRESS
- connected=false;
-
- throw new SocketException (error);
- }
-
- connected=true;
-
- return ret;
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void SetSocketOption_internal (IntPtr socket, SocketOptionLevel level,
- SocketOptionName name, object obj_val,
- byte [] byte_val, int int_val,
- out int error);
-#else
- private void SetSocketOption_internal (GHSocket socket, SocketOptionLevel level,
- SocketOptionName name, object obj_val,
- byte [] byte_val, int int_val,
- out int error)
- {
- socket.SetSocketOption_internal(level, name, obj_val, byte_val, int_val, out error);
- }
-#endif
-
- public void SetSocketOption (SocketOptionLevel level, SocketOptionName name, byte[] opt_value)
- {
- EnsureStillUsable();
-
- int error;
-
- SetSocketOption_internal(socket, level, name, null,
- opt_value, 0, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-
- public void SetSocketOption (SocketOptionLevel level, SocketOptionName name, int opt_value)
- {
- EnsureStillUsable();
-
- int error;
-
- SetSocketOption_internal(socket, level, name, null,
- null, opt_value, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-
- public void SetSocketOption (SocketOptionLevel level, SocketOptionName name, object opt_value)
- {
-
- EnsureStillUsable();
-
- if(opt_value==null) {
- throw new ArgumentNullException();
- }
-
- int error;
- /* From MS documentation on SetSocketOption: "For an
- * option with a Boolean data type, specify a nonzero
- * value to enable the option, and a zero value to
- * disable the option."
- * Booleans are only handled in 2.0
- */
-
- if (opt_value is System.Boolean) {
- bool bool_val = (bool) opt_value;
- int int_val = (bool_val) ? 1 : 0;
-
- SetSocketOption_internal (socket, level, name, null, null, int_val, out error);
- } else {
- SetSocketOption_internal (socket, level, name, opt_value, null, 0, out error);
- }
-
- if (error != 0)
- throw new SocketException (error);
- }
-
- public void SetSocketOption (SocketOptionLevel level, SocketOptionName name, bool optionValue) {
- EnsureStillUsable();
-
- int error;
- int int_val = (optionValue) ? 1 : 0;
- SetSocketOption_internal (socket, level, name, null, null, int_val, out error);
- if (error != 0)
- throw new SocketException (error);
- }
-
-#if !TARGET_JVM
- [MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Shutdown_internal(IntPtr socket, SocketShutdown how, out int error);
-#else
- private void Shutdown_internal(GHSocket socket, SocketShutdown how, out int error)
- {
- socket.Shutdown_internal(how, out error);
- }
-#endif
-
- public void Shutdown(SocketShutdown how)
- {
- EnsureStillUsable();
-
- int error;
-
- Shutdown_internal(socket, how, out error);
-
- if (error != 0) {
- throw new SocketException (error);
- }
- }
-
-#if !TARGET_JVM
- public override int GetHashCode ()
- {
- return (int) socket;
- }
-#else
- public override int GetHashCode ()
- {
- if (socket == null)
- return -1;
-
- return socket.GetHashCode();
- }
-#endif
-
-#if !TARGET_JVM
- protected virtual void Dispose (bool explicitDisposing)
- {
- if (disposed)
- return;
-
- disposed = true;
- connected = false;
- if ((int) socket != -1)
- {
- int error;
- closed = true;
- IntPtr x = socket;
- socket = (IntPtr) (-1);
- Close_internal (x, out error);
- if (blocking_thread != null)
- {
- blocking_thread.Abort ();
- blocking_thread = null;
- }
-
- if (error != 0)
- throw new SocketException (error);
- }
- }
-#else
- private void EnsureStillUsable()
- {
- if (disposed && closed)
- throw new ObjectDisposedException(this.GetType().ToString());
- }
- protected virtual void Dispose (bool explicitDisposing)
- {
- if (disposed)
- return;
-
- disposed = true;
- connected = false;
- if (socket != null)
- {
- int error;
- closed = true;
- GHSocket x = socket;
- socket = null;
- Close_internal (x, out error);
-
- if (error != 0)
- throw new SocketException (error);
- }
- }
-#endif
-
- #region .Net 2.0 properties and methods
-
- #region Properties
- [MonoTODO]
- public int ReceiveBufferSize
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public int SendBufferSize
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public bool UseOnlyOverlappedIO
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public bool NoDelay
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public bool IsBound
- {
- get { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public bool ExclusiveAddressUse
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO("udp sockets are not supported")]
- public bool DontFragment
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public bool EnableBroadcast
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public bool MulticastLoopback
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public short Ttl
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public int ReceiveTimeout
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- [MonoTODO]
- public int SendTimeout
- {
- get { throw new NotImplementedException(); }
- set { throw new NotImplementedException(); }
- }
-
- #endregion //Properties
-
- #region Methods
-
- [MonoTODO]
- public IAsyncResult BeginConnect(IPAddress address, int port,
- AsyncCallback requestCallback,
- object state)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IAsyncResult BeginConnect(IPAddress[] addresses, int port,
- AsyncCallback requestCallback,
- object state)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IAsyncResult BeginConnect(string host, int port,
- AsyncCallback requestCallback,
- object state)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IAsyncResult BeginAccept(int receiveSize, AsyncCallback callback, object state)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public IAsyncResult BeginAccept( Socket acceptSocket,int receiveSize,
- AsyncCallback callback, object state)
- {
- throw new NotImplementedException();
- }
-
- [MonoNotSupported ("")]
- public Socket EndAccept (out byte [] buffer, IAsyncResult asyncResult)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public Socket EndAccept (out byte [] buffer, out int bytesTransferred, IAsyncResult asyncResult)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public IAsyncResult BeginDisconnect(bool reuseSocket, AsyncCallback callback, object state)
- {
- throw new NotImplementedException();
- }
-
- [MonoNotSupported ("")]
- public IAsyncResult BeginSend (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- [CLSCompliantAttribute (false)]
- public IAsyncResult BeginSend (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags,
- out SocketError errorCode, AsyncCallback callback,
- object state)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public IAsyncResult BeginSend(byte[] buffer, int offset, int size,
- SocketFlags socketFlags, out SocketError errorCode,
- AsyncCallback callback, object state)
- {
- throw new NotImplementedException();
- }
-
- [MonoNotSupported ("")]
- public int EndSend (IAsyncResult asyncResult, out SocketError errorCode)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public IAsyncResult BeginReceive (byte [] buffer, int offset, int size, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback callback, Object state)
- {
- throw new NotImplementedException ();
- }
-
- [CLSCompliantAttribute (false)]
- [MonoNotSupported ("")]
- public IAsyncResult BeginReceive (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, AsyncCallback callback, Object state)
- {
- throw new NotImplementedException ();
- }
-
- [CLSCompliantAttribute (false)]
- [MonoNotSupported ("")]
- public IAsyncResult BeginReceive (IList<ArraySegment<byte>> buffers, SocketFlags socketFlags, out SocketError errorCode, AsyncCallback callback, Object state)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public int EndReceive (IAsyncResult asyncResult, out SocketError errorCode)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void SendFile (string fileName)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void SendFile (string fileName, byte [] preBuffer, byte [] postBuffer, TransmitFileOptions flags)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public IAsyncResult BeginSendFile (string fileName, AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public IAsyncResult BeginSendFile (string fileName, byte [] preBuffer, byte [] postBuffer, TransmitFileOptions flags, AsyncCallback callback, object state)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public void EndSendFile (IAsyncResult asyncResult)
- {
- throw new NotImplementedException ();
- }
-
- [MonoTODO]
- public void Close(int timeout)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public void Connect(IPAddress address, int port)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public void Connect(IPAddress[] address, int port)
- {
- throw new NotImplementedException();
- }
-
- [MonoTODO]
- public void Connect(string host, int port)
- {
- throw new NotImplementedException();
- }
-
- [MonoNotSupported ("")]
- public void Disconnect (bool reuseSocket)
- {
- throw new NotImplementedException ();
- }
-
- [MonoNotSupported ("")]
- public SocketInformation DuplicateAndClose (int targetProcessId)
- {
- throw new NotImplementedException ();
- }
- #endregion //Methods
-
- #endregion
-
- void IDisposable.Dispose ()
- {
- Dispose (true);
- GC.SuppressFinalize (this);
- }
-
- ~Socket () {
- Dispose(false);
- }
-
- }
-}
diff --git a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
index 609583a73f2..a7eeb67d883 100644
--- a/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
+++ b/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs
@@ -231,7 +231,7 @@ namespace System.Net.Sockets
else if (op == SocketAsyncOperation.Disconnect)
args.DisconnectCallback (ares);
else if (op == SocketAsyncOperation.Connect)
- args.ConnectCallback ();
+ args.ConnectCallback (ares);
/*
else if (op == Socket.SocketOperation.ReceiveMessageFrom)
else if (op == Socket.SocketOperation.SendPackets)
@@ -254,10 +254,12 @@ namespace System.Net.Sockets
}
}
- void ConnectCallback ()
+ void ConnectCallback (IAsyncResult ares)
{
try {
- SocketError = (SocketError) Worker.result.error;
+ curSocket.EndConnect (ares);
+ } catch (SocketException se) {
+ SocketError = se.SocketErrorCode;
} finally {
OnCompleted (this);
}
diff --git a/mcs/class/System/System.Net.Sockets/SocketException.cs b/mcs/class/System/System.Net.Sockets/SocketException.cs
index 895c765e121..d5b217bfdf5 100644
--- a/mcs/class/System/System.Net.Sockets/SocketException.cs
+++ b/mcs/class/System/System.Net.Sockets/SocketException.cs
@@ -37,15 +37,10 @@ namespace System.Net.Sockets
[Serializable]
public class SocketException : Win32Exception
{
-#if TARGET_JVM
- public SocketException ()
- : base (-2147467259)
-#else
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private static extern int WSAGetLastError_internal ();
public SocketException ()
: base (WSAGetLastError_internal ())
-#endif
{
}
diff --git a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
index 11a7eda8a45..b0295bef71b 100644
--- a/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket_2_1.cs
@@ -901,14 +901,12 @@ namespace System.Net.Sockets {
}
}
-#if !TARGET_JVM
// Creates a new system socket, returning the handle
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern IntPtr Socket_internal(AddressFamily family,
SocketType type,
ProtocolType proto,
out int error);
-#endif
public Socket(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
{
@@ -964,12 +962,10 @@ namespace System.Net.Sockets {
get { return address_family; }
}
-#if !TARGET_JVM
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static void Blocking_internal(IntPtr socket,
bool block,
out int error);
-#endif
public bool Blocking {
get {
@@ -1253,7 +1249,7 @@ namespace System.Net.Sockets {
throw new SocketException (error);
}
- if (socket_type == SocketType.Dgram && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)))
+ if (socket_type == SocketType.Dgram && ep != null && (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)))
connected = false;
else
connected = true;
diff --git a/mcs/class/System/System.Net.Sockets/TcpClient.cs b/mcs/class/System/System.Net.Sockets/TcpClient.cs
index f1842706fcc..a66e55abadf 100644
--- a/mcs/class/System/System.Net.Sockets/TcpClient.cs
+++ b/mcs/class/System/System.Net.Sockets/TcpClient.cs
@@ -130,9 +130,6 @@ namespace System.Net.Sockets
get { return client.Connected; }
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.ExclusiveAddressUse is not supported")]
-#endif
public bool ExclusiveAddressUse {
get {
return(client.ExclusiveAddressUse);
@@ -372,25 +369,16 @@ namespace System.Net.Sockets
client.EndConnect (asyncResult);
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.BeginConnect is not supported")]
-#endif
public IAsyncResult BeginConnect (IPAddress address, int port, AsyncCallback requestCallback, object state)
{
return client.BeginConnect (address, port, requestCallback, state);
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.BeginConnect is not supported")]
-#endif
public IAsyncResult BeginConnect (IPAddress[] addresses, int port, AsyncCallback requestCallback, object state)
{
return client.BeginConnect (addresses, port, requestCallback, state);
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.BeginConnect is not supported")]
-#endif
public IAsyncResult BeginConnect (string host, int port, AsyncCallback requestCallback, object state)
{
return client.BeginConnect (host, port, requestCallback, state);
diff --git a/mcs/class/System/System.Net.Sockets/TcpListener.cs b/mcs/class/System/System.Net.Sockets/TcpListener.cs
index 8047d9b38a3..d9322f52e67 100644
--- a/mcs/class/System/System.Net.Sockets/TcpListener.cs
+++ b/mcs/class/System/System.Net.Sockets/TcpListener.cs
@@ -148,9 +148,6 @@ namespace System.Net.Sockets
/// Specifies whether the TcpListener allows only one
/// underlying socket to listen to a specific port
/// </summary>
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.ExclusiveAddressUse is not supported")]
-#endif
public bool ExclusiveAddressUse
{
get {
diff --git a/mcs/class/System/System.Net.Sockets/UdpClient.cs b/mcs/class/System/System.Net.Sockets/UdpClient.cs
index 1840a8e7bbc..a8bc06de5a8 100644
--- a/mcs/class/System/System.Net.Sockets/UdpClient.cs
+++ b/mcs/class/System/System.Net.Sockets/UdpClient.cs
@@ -520,9 +520,6 @@ namespace System.Net.Sockets
}
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.DontFragment is not supported")]
-#endif
public bool DontFragment
{
get {
@@ -533,9 +530,6 @@ namespace System.Net.Sockets
}
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.EnableBroadcast is not supported")]
-#endif
public bool EnableBroadcast
{
get {
@@ -546,9 +540,6 @@ namespace System.Net.Sockets
}
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.ExclusiveAddressUse is not supported")]
-#endif
public bool ExclusiveAddressUse
{
get {
@@ -559,9 +550,6 @@ namespace System.Net.Sockets
}
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.MulticastLoopback is not supported")]
-#endif
public bool MulticastLoopback
{
get {
@@ -572,9 +560,6 @@ namespace System.Net.Sockets
}
}
-#if TARGET_JVM
- [MonoNotSupported ("Not supported as Socket.Ttl is not supported")]
-#endif
public short Ttl
{
get {
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
index 3778c740538..d7e999c46f3 100644
--- a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
+++ b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
@@ -61,6 +61,7 @@ namespace System.Net.WebSockets
const int HeaderMaxLength = 14;
byte[] headerBuffer;
byte[] sendBuffer;
+ long remaining;
public ClientWebSocket ()
{
@@ -196,39 +197,73 @@ namespace System.Net.WebSockets
underlyingSocket.Send (sendBuffer, 0, buffer.Count + headerLength, SocketFlags.None);
});
}
+
+ const int messageTypeText = 1;
+ const int messageTypeBinary = 2;
+ const int messageTypeClose = 8;
+ static WebSocketMessageType WireToMessageType (byte msgType)
+ {
+
+ if (msgType == messageTypeText)
+ return WebSocketMessageType.Text;
+ if (msgType == messageTypeBinary)
+ return WebSocketMessageType.Binary;
+ return WebSocketMessageType.Close;
+ }
+
+ static byte MessageTypeToWire (WebSocketMessageType type)
+ {
+ if (type == WebSocketMessageType.Text)
+ return messageTypeText;
+ if (type == WebSocketMessageType.Binary)
+ return messageTypeBinary;
+ return messageTypeClose;
+ }
+
public override Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer, CancellationToken cancellationToken)
{
EnsureWebSocketConnected ();
ValidateArraySegment (buffer);
return Task.Run (() => {
EnsureWebSocketState (WebSocketState.Open, WebSocketState.CloseSent);
- // First read the two first bytes to know what we are doing next
- connection.Read (req, headerBuffer, 0, 2);
- var isLast = (headerBuffer[0] >> 7) > 0;
- var isMasked = (headerBuffer[1] >> 7) > 0;
- int mask = 0;
- var type = (WebSocketMessageType)(headerBuffer[0] & 0xF);
- long length = headerBuffer[1] & 0x7F;
- int offset = 0;
- if (length == 126) {
- offset = 2;
- connection.Read (req, headerBuffer, 2, offset);
+
+ bool isLast;
+ WebSocketMessageType type;
+ long length;
+
+ if (remaining == 0) {
+ // First read the two first bytes to know what we are doing next
+ connection.Read (req, headerBuffer, 0, 2);
+ isLast = (headerBuffer[0] >> 7) > 0;
+ var isMasked = (headerBuffer[1] >> 7) > 0;
+ int mask = 0;
+ type = WireToMessageType ((byte)(headerBuffer[0] & 0xF));
+ length = headerBuffer[1] & 0x7F;
+ int offset = 0;
+ if (length == 126) {
+ offset = 2;
+ connection.Read (req, headerBuffer, 2, offset);
length = (headerBuffer[2] << 8) | headerBuffer[3];
- } else if (length == 127) {
- offset = 8;
- connection.Read (req, headerBuffer, 2, offset);
- length = 0;
- for (int i = 2; i <= 9; i++)
- length = (length << 8) | headerBuffer[i];
- }
+ } else if (length == 127) {
+ offset = 8;
+ connection.Read (req, headerBuffer, 2, offset);
+ length = 0;
+ for (int i = 2; i <= 9; i++)
+ length = (length << 8) | headerBuffer[i];
+ }
- if (isMasked) {
- connection.Read (req, headerBuffer, 2 + offset, 4);
- for (int i = 0; i < 4; i++) {
- var pos = i + offset + 2;
- mask = (mask << 8) | headerBuffer[pos];
+ if (isMasked) {
+ connection.Read (req, headerBuffer, 2 + offset, 4);
+ for (int i = 0; i < 4; i++) {
+ var pos = i + offset + 2;
+ mask = (mask << 8) | headerBuffer[pos];
+ }
}
+ } else {
+ isLast = (headerBuffer[0] >> 7) > 0;
+ type = WireToMessageType ((byte)(headerBuffer[0] & 0xF));
+ length = remaining;
}
if (type == WebSocketMessageType.Close) {
@@ -241,8 +276,9 @@ namespace System.Net.WebSockets
} else {
var readLength = (int)(buffer.Count < length ? buffer.Count : length);
connection.Read (req, buffer.Array, buffer.Offset, readLength);
+ remaining = length - readLength;
- return new WebSocketReceiveResult ((int)length, type, isLast);
+ return new WebSocketReceiveResult ((int)readLength, type, isLast && remaining == 0);
}
});
}
@@ -279,7 +315,7 @@ namespace System.Net.WebSockets
int WriteHeader (WebSocketMessageType type, ArraySegment<byte> buffer, bool endOfMessage)
{
- var opCode = (byte)type;
+ var opCode = MessageTypeToWire (type);
var length = buffer.Count;
headerBuffer[0] = (byte)(opCode | (endOfMessage ? 0 : 0x80));
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
index 50cbc003c0f..f6cb2fc2a86 100644
--- a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
@@ -35,9 +35,9 @@ namespace System.Net.WebSockets
{
public enum WebSocketMessageType
{
- Text = 1,
- Binary = 2,
- Close = 8
+ Text = 0,
+ Binary = 1,
+ Close = 2
}
}
diff --git a/mcs/class/System/System.Net/.gitattributes b/mcs/class/System/System.Net/.gitattributes
index 4301d3ff678..712a1fe6b41 100644
--- a/mcs/class/System/System.Net/.gitattributes
+++ b/mcs/class/System/System.Net/.gitattributes
@@ -6,16 +6,11 @@
/FileWebResponse.cs -crlf
/FtpStatus.cs -crlf
/HttpContinueDelegate.cs -crlf
-/HttpProvider.jvm.cs -crlf
-/HttpStateCache.jvm.cs -crlf
/HttpVersion.cs -crlf
-/HttpWebRequest.jvm.cs -crlf
-/HttpWebResponse.jvm.cs -crlf
/IPv6Address.cs -crlf
/MonoHttpDate.cs -crlf
/ProtocolViolationException.cs -crlf
/SocketPermission.cs -crlf
-/VMWHttpProvider.jvm.cs -crlf
/WebException.cs -crlf
/WebResponse.cs -crlf
/WebUtility.cs -crlf
diff --git a/mcs/class/System/System.Net/ChunkStream.cs b/mcs/class/System/System.Net/ChunkStream.cs
index 1337fce4fce..addcc28907b 100644
--- a/mcs/class/System/System.Net/ChunkStream.cs
+++ b/mcs/class/System/System.Net/ChunkStream.cs
@@ -39,6 +39,7 @@ namespace System.Net
{
enum State {
None,
+ PartialSize,
Body,
BodyFinished,
Trailer
@@ -139,9 +140,9 @@ namespace System.Net
void InternalWrite (byte [] buffer, ref int offset, int size)
{
- if (state == State.None) {
+ if (state == State.None || state == State.PartialSize) {
state = GetChunkSize (buffer, ref offset, size);
- if (state == State.None)
+ if (state == State.PartialSize)
return;
saved.Length = 0;
@@ -262,7 +263,7 @@ namespace System.Net
ThrowProtocolViolation ("Cannot parse chunk size.");
}
- return State.None;
+ return State.PartialSize;
}
chunkRead = 0;
diff --git a/mcs/class/System/System.Net/CookieException.cs b/mcs/class/System/System.Net/CookieException.cs
index 75251e415d3..1c1209cfda1 100644
--- a/mcs/class/System/System.Net/CookieException.cs
+++ b/mcs/class/System/System.Net/CookieException.cs
@@ -53,13 +53,11 @@ namespace System.Net
{
}
-#if !TARGET_JVM
// Methods
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
{
base.GetObjectData (info, context);
}
-#endif
public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
diff --git a/mcs/class/System/System.Net/Dns.cs b/mcs/class/System/System.Net/Dns.cs
index fb532cd22c2..81da4fa2084 100644
--- a/mcs/class/System/System.Net/Dns.cs
+++ b/mcs/class/System/System.Net/Dns.cs
@@ -282,7 +282,6 @@ namespace System.Net {
}
-#if !TARGET_JVM
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static bool GetHostByName_internal(string host, out string h_name, out string[] h_aliases, out string[] h_addr_list);
@@ -291,7 +290,6 @@ namespace System.Net {
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private extern static bool GetHostName_internal(out string h_name);
-#endif
static void Error_11001 (string hostName)
{
@@ -362,29 +360,9 @@ namespace System.Net {
string h_name;
string[] h_aliases, h_addrlist;
-#if TARGET_JVM
- h_name = null;
- h_aliases = null;
- h_addrlist = null;
- try {
- java.net.InetAddress[] iaArr =
- java.net.InetAddress.getAllByName(address);
- if (iaArr != null && iaArr.Length > 0)
- h_name = iaArr[0].getHostName();
- if (iaArr != null && iaArr.Length > 0)
- {
- h_addrlist = new String[iaArr.Length];
- for (int i = 0; i < h_addrlist.Length; i++)
- h_addrlist[i] = iaArr[i].getHostAddress();
- }
- } catch (java.net.UnknownHostException jUHE) {
- throw new SocketException((int)SocketError.HostNotFound, jUHE.Message);
- }
-#else
bool ret = GetHostByAddr_internal(address, out h_name, out h_aliases, out h_addrlist);
if (!ret)
Error_11001 (address);
-#endif
return (hostent_to_IPHostEntry (address, h_name, h_aliases, h_addrlist));
}
@@ -437,26 +415,6 @@ namespace System.Net {
{
if (hostName == null)
throw new ArgumentNullException ("hostName");
-#if TARGET_JVM
- if (hostName.Length == 0)
- hostName = "localhost";
- try {
- java.net.InetAddress[] iaArr = java.net.InetAddress.getAllByName(hostName);
- IPHostEntry host = new IPHostEntry();
- if (iaArr != null && iaArr.Length > 0)
- {
- host.HostName = iaArr[0].getHostName();
- IPAddress[] ipArr = new IPAddress[iaArr.Length];
- for (int i = 0; i < iaArr.Length; i++)
- ipArr[i] = IPAddress.Parse(iaArr[i].getHostAddress());
-
- host.AddressList = ipArr;
- }
- return host;
- } catch (java.net.UnknownHostException jUHE) {
- throw new SocketException((int)SocketError.HostNotFound, jUHE.Message);
- }
-#else
string h_name;
string[] h_aliases, h_addrlist;
@@ -465,14 +423,10 @@ namespace System.Net {
Error_11001 (hostName);
return(hostent_to_IPHostEntry(hostName, h_name, h_aliases, h_addrlist));
-#endif
}
public static string GetHostName ()
{
-#if TARGET_JVM
- return java.net.InetAddress.getLocalHost ().getHostName ();
-#else
string hostName;
bool ret = GetHostName_internal(out hostName);
@@ -481,7 +435,6 @@ namespace System.Net {
Error_11001 (hostName);
return hostName;
-#endif
}
[Obsolete ("Use GetHostEntry instead")]
diff --git a/mcs/class/System/System.Net/FileWebResponse.cs b/mcs/class/System/System.Net/FileWebResponse.cs
index 73a18f35863..79f878cf591 100644
--- a/mcs/class/System/System.Net/FileWebResponse.cs
+++ b/mcs/class/System/System.Net/FileWebResponse.cs
@@ -145,11 +145,7 @@ namespace System.Net
((IDisposable) this).Dispose ();
}
-#if TARGET_JVM //enable overrides for extenders
- public override void Dispose()
-#else
void IDisposable.Dispose()
-#endif
{
Dispose (true);
diff --git a/mcs/class/System/System.Net/FtpWebRequest.cs b/mcs/class/System/System.Net/FtpWebRequest.cs
index 3354b2a8097..76fec164546 100644
--- a/mcs/class/System/System.Net/FtpWebRequest.cs
+++ b/mcs/class/System/System.Net/FtpWebRequest.cs
@@ -1165,10 +1165,7 @@ namespace System.Net
#endif
internal bool ChangeToSSLSocket (ref Stream stream) {
-#if TARGET_JVM
- stream.ChangeToSSLSocket ();
- return true;
-#elif SECURITY_DEP
+#if SECURITY_DEP
SslStream sslStream = new SslStream (stream, true, callback, null);
//sslStream.AuthenticateAsClient (Host, this.ClientCertificates, SslProtocols.Default, false);
//TODO: client certificates
diff --git a/mcs/class/System/System.Net/HttpListenerContext.cs b/mcs/class/System/System.Net/HttpListenerContext.cs
index cd0ef417b68..a1cdf3f8b2a 100644
--- a/mcs/class/System/System.Net/HttpListenerContext.cs
+++ b/mcs/class/System/System.Net/HttpListenerContext.cs
@@ -32,6 +32,11 @@ using System.Collections.Specialized;
using System.IO;
using System.Security.Principal;
using System.Text;
+#if NET_4_5
+using System.Threading.Tasks;
+using System.Net.WebSockets;
+#endif
+
namespace System.Net {
public sealed class HttpListenerContext {
HttpListenerRequest request;
@@ -133,6 +138,23 @@ namespace System.Net {
return null;
}
}
+
+#if NET_4_5
+ public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval)
+ {
+ throw new NotImplementedException ();
+ }
+
+ public Task<HttpListenerWebSocketContext> AcceptWebSocketAsync (string subProtocol, int receiveBufferSize, TimeSpan keepAliveInterval, ArraySegment<byte> internalBuffer)
+ {
+ throw new NotImplementedException ();
+ }
+#endif
}
}
#endif
diff --git a/mcs/class/System/System.Net/HttpProvider.jvm.cs b/mcs/class/System/System.Net/HttpProvider.jvm.cs
deleted file mode 100644
index 5d1b1f0b108..00000000000
--- a/mcs/class/System/System.Net/HttpProvider.jvm.cs
+++ /dev/null
@@ -1,331 +0,0 @@
-using System;
-using System.Security.Cryptography.X509Certificates;
-using System.IO;
-
-namespace System.Net
-{
- [Serializable]
- internal abstract class HttpProvider
- {
- #region Fields
-
- protected static int _defaultMaxResponseHeadersLength;
- protected static int _defaultMaxRedirectsNum = 50;
-
- protected Uri _originalUri;
- protected WebHeaderCollection _headers;
- protected bool _allowAutoRedirect;
- protected bool _allowWriteStreamBuffering = true;
- protected X509CertificateCollection _certificates;
- protected string _connectionGroupName;
- protected HttpContinueDelegate _continueDelegate;
- protected CookieContainer _cookieContainer;
- protected ICredentials _credentials;
- protected bool _keepAlive = true;
- protected int _maxResponseHeadersLength = _defaultMaxResponseHeadersLength;
- protected int _maxAutoRedirections = _defaultMaxRedirectsNum;
- protected int _readWriteTimeout = 300000;
- protected string _mediaType = string.Empty;
- protected string _methodName = "GET";
- protected bool _pipelined = true;
- protected bool _preAuthenticate;
- protected Version _version = HttpVersion.Version11;
- protected IWebProxy _proxy;
- protected bool _sendChunked;
- protected ServicePoint _servicePoint;
- protected int _timeout = 100000;
-
- protected bool _isAborted;
- protected long _contentLength = -1L;
-
-
-
-
- #endregion /* Fields */
-
- #region Constructors and Factory Methods
- protected HttpProvider(Uri uri)
- {
- _originalUri = uri;
- _headers = new WebHeaderCollection(true);
- _allowAutoRedirect = true;
- _proxy = GlobalProxySelection.Select;
- }
-
- public static HttpProvider GetHttpProvider(Uri uri)
- {
- return new VMWHttpProvider(uri);
- }
-
- public static HttpProvider GetHttpProvider(string provider, Uri uri)
- {
- Type type = Type.GetType(provider, true);
- if(type != null)
- return GetHttpProvider(type, uri);
- //log it as an error
- return new VMWHttpProvider(uri);
- }
-
- public static HttpProvider GetHttpProvider(Type provider, Uri uri)
- {
- try
- {
- return (HttpProvider)Activator.CreateInstance(provider,
- new object[]{uri});
- }
- catch
- {
- //log it as an error
- return new VMWHttpProvider(uri);
- }
- }
-
- #endregion
-
- #region Properties
- internal virtual WebHeaderCollection Headers
- {
- get{return _headers;}
- set
- {
- if(IsRequestStarted ())
- throw new InvalidOperationException("Connection already opened");
- WebHeaderCollection newHeaders = new WebHeaderCollection (true);
- int count = value.Count;
- for (int i = 0; i < count; i++)
- newHeaders.Add (value.GetKey (i), value.Get (i));
-
- _headers = newHeaders;
- }
- }
-
- internal virtual bool AllowAutoRedirect
- {
- get{return _allowAutoRedirect;}
- set{_allowAutoRedirect = value;}
- }
-
- internal virtual bool AllowWriteStreamBuffering
- {
- get{return _allowWriteStreamBuffering;}
- set{_allowWriteStreamBuffering = value;}
- }
-
- internal virtual string ConnectionGroupName
- {
- get{return _connectionGroupName;}
- set{_connectionGroupName = value;}
- }
-
- internal virtual HttpContinueDelegate ContinueDelegate
- {
- get{return _continueDelegate;}
- set{_continueDelegate = value;}
- }
-
- internal virtual CookieContainer CookieContainer
- {
- get{return _cookieContainer;}
- set{_cookieContainer = value;}
- }
-
- internal virtual ICredentials Credentials
- {
- get{return _credentials;}
- set{_credentials = value;}
- }
- internal static int DefaultMaxResponseHeadersLength
- {
- get{return _defaultMaxResponseHeadersLength;}
- set
- {
- if (value < 0 && value != -1)
- throw new ArgumentOutOfRangeException("Argument should be positive");
- _defaultMaxResponseHeadersLength = value;
- }
- }
-
- internal virtual bool KeepAlive
- {
- get{return _keepAlive;}
- set{_keepAlive = value;}
- }
-
- internal virtual int MaxAutoRedirections
- {
- get{return _maxAutoRedirections;}
- set
- {
- if (value <= 0)
- throw new ArgumentException("Must be > 0", "value");
- _maxAutoRedirections = value;
- }
- }
-
- internal virtual int MaximumResponseHeadersLength
- {
- get{return _maxResponseHeadersLength;}
- set
- {
- if (IsRequestStarted())
- {
- throw new InvalidOperationException("Request has been already submitted.");
- }
- if (value < 0 && value != -1)
- throw new ArgumentOutOfRangeException("The argument must be positive or -1");
- _maxResponseHeadersLength = value;
- }
- }
-
- internal virtual string MediaType
- {
- get{return _mediaType;}
- set{_mediaType = value;}
- }
-
- internal virtual string MethodName
- {
- get{return _methodName;}
- set
- {
- if (value == null || value.Trim () == "")
- throw new ArgumentException ("not a valid method");
-
- _methodName = value;
- }
- }
- internal virtual bool Pipelined
- {
- get{return _pipelined;}
- set{_pipelined = value;}
- }
-
- internal virtual bool PreAuthenticate
- {
- get { return _preAuthenticate; }
- set { _preAuthenticate = value; }
- }
-
- internal virtual Version ProtocolVersion
- {
- get{return _version;}
- set
- {
- if (value != HttpVersion.Version10 && value != HttpVersion.Version11)
- throw new ArgumentException ("value");
-
- _version = value;
- }
- }
- internal virtual IWebProxy Proxy
- {
- get{return _proxy;}
- set
- {
- if(IsRequestStarted())
- throw new InvalidOperationException("Request already has been submitted");
- if(value == null)
- throw new ArgumentNullException("value");
- if(!(value is WebProxy))
- throw new NotImplementedException("The supported proxy objects only of type System.Net.WebProxy");
- _proxy = value;
- }
- }
- internal virtual int ReadWriteTimeout
- {
- get{return _readWriteTimeout;}
- set
- {
- if (IsRequestStarted())
- throw new InvalidOperationException("Request has been submitted.");
-
- if (value < 0 && value != -1)
- throw new ArgumentOutOfRangeException("value");
-
- _readWriteTimeout = value;
- }
- }
-
- internal virtual bool SendChunked
- {
- get{return _sendChunked;}
- set
- {
- if(IsRequestStarted ())
- throw new InvalidOperationException("Request has been submitted.");
- _sendChunked = value;
- }
- }
-
- internal virtual ServicePoint ServicePoint
- {
- get{return _servicePoint;}
- }
-
- internal virtual int Timeout
- {
- get{return _timeout;}
- set
- {
- if (value < -1)
- throw new ArgumentOutOfRangeException ("value");
-
- _timeout = value;
- }
- }
-
- internal virtual long ContentLength
- {
- get{return _contentLength;}
- set
- {
- if(value < 0)
- throw new ArgumentOutOfRangeException("value", "The Content-Length property value must be positive");
- _contentLength = value;
- }
- }
-
-
-
- #endregion
-
- #region Methods
-
- public virtual Uri GetOriginalAddress()
- {
- return _originalUri;
- }
-
- public virtual X509CertificateCollection GetX509Certificates()
- {
- if(_certificates == null)
- _certificates = new X509CertificateCollection();
- return _certificates;
- }
-
- public abstract bool IsRequestStarted();
-
- public abstract Uri GetAddress();
-
- public abstract bool IsHaveResponse();
-
- public abstract void Abort();
-
- public abstract Stream GetRequestStream();
-
- public abstract WebResponse GetResponse();
-
- public abstract IAsyncResult BeginGetRequestStream(AsyncCallback callback, object state);
-
- public abstract Stream EndGetRequestStream(IAsyncResult asyncResult);
-
- public abstract IAsyncResult BeginGetResponse(AsyncCallback callback, object state);
-
- public abstract WebResponse EndGetResponse(IAsyncResult asyncResult);
-
-
- #endregion
-
-
- }
-}
diff --git a/mcs/class/System/System.Net/HttpStateCache.jvm.cs b/mcs/class/System/System.Net/HttpStateCache.jvm.cs
deleted file mode 100644
index 81e60523a76..00000000000
--- a/mcs/class/System/System.Net/HttpStateCache.jvm.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-using System;
-using System.Collections;
-
-using mainsoft.apache.commons.httpclient;
-
-namespace System.Net
-{
-
- class HttpStateCache
- {
- private static readonly int MAX_SIZE = 30;
-
- private Stack _states;
- private int _currentSize;
-
- internal HttpStateCache()
- {
- _states = new Stack(20);
- }
-
- internal HttpState GetHttpState()
- {
- lock(this)
- {
- if(_states.Count > 0)
- return (HttpState) _states.Pop();
- }
- return new HttpState();
- }
-
- internal void ReleaseHttpState(HttpState state)
- {
- lock(this)
- {
- if(_states.Count < MAX_SIZE)
- {
- state.clear();
- _states.Push(state);
- }
- }
- }
- }
-}
diff --git a/mcs/class/System/System.Net/HttpUtility.cs b/mcs/class/System/System.Net/HttpUtility.cs
index 957661f1e5a..57992d18f82 100644
--- a/mcs/class/System/System.Net/HttpUtility.cs
+++ b/mcs/class/System/System.Net/HttpUtility.cs
@@ -1315,11 +1315,7 @@ namespace System.Net {
// MS starts encoding with &# from 160 and stops at 255.
// We don't do that. One reason is the 65308/65310 unicode
// characters that look like '<' and '>'.
-#if TARGET_JVM
- if (c > 159 && c < 256) {
-#else
if (c > 159) {
-#endif
output.Append ("&#");
if (char.IsSurrogate (c))
output.Append (char.ConvertToUtf32 (s, i++));
diff --git a/mcs/class/System/System.Net/HttpWebRequest.jvm.cs b/mcs/class/System/System.Net/HttpWebRequest.jvm.cs
deleted file mode 100644
index a2809219275..00000000000
--- a/mcs/class/System/System.Net/HttpWebRequest.jvm.cs
+++ /dev/null
@@ -1,614 +0,0 @@
-
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Configuration;
-using System.Globalization;
-using System.IO;
-using System.Runtime;
-using System.Runtime.CompilerServices;
-using System.Runtime.Serialization;
-using System.Security;
-using System.Security.Cryptography.X509Certificates;
-using System.Security.Permissions;
-using System.Text;
-using System.Threading;
-using System.Net;
-
-namespace System.Net
-{
- [Serializable]
- public class HttpWebRequest : WebRequest
- {
- #region Fields
-
-
- private static readonly int DEFAULT_MAX_RESP_HEADER_LEN = 64;
-
- private static int _defaultMaxResponseHeadersLength = DEFAULT_MAX_RESP_HEADER_LEN;
-
-
- private HttpProvider _provider;
-
- #endregion
-
- #region Constructors
-
- internal HttpWebRequest(Uri uri)
- {
- _provider = HttpProvider.GetHttpProvider(uri);
-// Console.WriteLine("uri to string: " + uri.ToString());
- }
-
-
- #endregion
-
- #region Properties
-
-
- public string Accept
- {
- get{return Headers["Accept"];}
- set
- {
- if(_provider.IsRequestStarted ())
- throw new InvalidOperationException ("request started");
- _provider.Headers.RemoveAndAdd ("Accept", value);
- }
- }
-
- public Uri Address
- {
- get{return _provider.GetAddress();}
- }
-
- public bool AllowAutoRedirect
- {
- get{return _provider.AllowAutoRedirect;}
- set{_provider.AllowAutoRedirect = value;}
- }
-
- public bool AllowWriteStreamBuffering
- {
- get{return _provider.AllowWriteStreamBuffering;}
- set{_provider.AllowWriteStreamBuffering = value;}
- }
-
- [MonoTODO] //documentation related
- public X509CertificateCollection ClientCertificates
- {
- [MonoTODO]
- get{return _provider.GetX509Certificates();}
- [MonoNotSupported("")]
- set { throw new NotImplementedException (); }
- }
-
- public string Connection
- {
- get { return Headers["Connection"]; }
- set
- {
- if(_provider.IsRequestStarted())
- throw new InvalidOperationException ("request started");
-
- string val = value;
- if (val != null)
- val = val.Trim ().ToLower (CultureInfo.InvariantCulture);
-
- if (val == null || val.Length == 0)
- {
- Headers.RemoveInternal ("Connection");
- return;
- }
-
- if (val == "keep-alive" || val == "close")
- throw new ArgumentException ("Keep-Alive and Close may not be set with this property");
-
-// if (this.KeepAlive && val.IndexOf ("keep-alive") == -1)
-// value = value + ", Keep-Alive";
-
- Headers.RemoveAndAdd ("Connection", value);
- }
- }
-
- public override string ConnectionGroupName
- {
- get{return _provider.ConnectionGroupName;}
- set{_provider.ConnectionGroupName = value;}
- }
-
- public override long ContentLength
- {
- get{return _provider.ContentLength;}
- set
- {
- if(_provider.IsRequestStarted())
- throw new InvalidOperationException("Connection already opened");
- _provider.ContentLength = value;
- }
- }
-
- public override string ContentType
- {
- get { return Headers["Content-Type"]; }
- set
- {
- if (value == null || value.Trim().Length == 0)
- {
- Headers.RemoveInternal ("Content-Type");
- return;
- }
- Headers.RemoveAndAdd ("Content-Type", value);
- }
- }
- [MonoTODO] //needed for automatic documentation tools,
- //since currently we don't support this feature
- public HttpContinueDelegate ContinueDelegate
- {
- [MonoTODO]
- get{return _provider.ContinueDelegate;}
- [MonoTODO]
- set{_provider.ContinueDelegate = value;}
- }
-
- public CookieContainer CookieContainer
- {
- get{return _provider.CookieContainer;}
- set{_provider.CookieContainer = value;}
- }
-
- public override ICredentials Credentials
- {
- get{return _provider.Credentials;}
- set{_provider.Credentials = value;}
- }
-
- public static int DefaultMaximumResponseHeadersLength
- {
- get{return HttpProvider.DefaultMaxResponseHeadersLength;}
- set{HttpProvider.DefaultMaxResponseHeadersLength = value;}
- }
-
- public string Expect
- {
- get{return Headers["Expect"];}
- set
- {
- if(_provider.IsRequestStarted ())
- throw new InvalidOperationException("Connection already opened");
- string val = value;
- if (val != null)
- val = val.Trim ().ToLower (CultureInfo.InvariantCulture);
-
- if (val == null || val.Length == 0)
- {
- Headers.RemoveInternal ("Expect");
- return;
- }
-
- if (val == "100-continue")
- throw new ArgumentException ("100-Continue cannot be set with this property.",
- "value");
- Headers.RemoveAndAdd ("Expect", value);
- }
- }
-
- public bool HaveResponse
- {
- get{return _provider.IsHaveResponse();}
- }
-
- public override WebHeaderCollection Headers
- {
- get{return _provider.Headers;}
- set{_provider.Headers = value;}
- }
-
- public DateTime IfModifiedSince
- {
- get
- {
- string str = Headers["If-Modified-Since"];
- if (str == null)
- return DateTime.Now;
- try
- {
- return MonoHttpDate.Parse (str);
- }
- catch (Exception)
- {
- return DateTime.Now;
- }
- }
- set
- {
- if(_provider.IsRequestStarted ())
- throw new InvalidOperationException("Connection already started");
- // rfc-1123 pattern
- Headers.SetInternal ("If-Modified-Since",
- value.ToUniversalTime ().ToString ("r", null));
- // TODO: check last param when using different locale
- }
- }
-
- public bool KeepAlive
- {
- get{return _provider.KeepAlive;}
- set{_provider.KeepAlive = value;}
- }
-
- public int MaximumAutomaticRedirections
- {
- get{return _provider.MaxAutoRedirections;}
- set{_provider.MaxAutoRedirections = value;}
- }
-
- [MonoTODO] //documentation
- public int MaximumResponseHeadersLength
- {
- [MonoTODO]
- get{return _provider.MaximumResponseHeadersLength;}
- [MonoTODO]
- set{_provider.MaximumResponseHeadersLength = value;}
- }
-
- public string MediaType
- {
- get{return _provider.MediaType;}
- set{_provider.MediaType = value;}
- }
-
- public override string Method
- {
- get{return _provider.MethodName;}
- set{_provider.MethodName = value;}
- }
- [MonoTODO] //for documentation related - limited.
- public bool Pipelined
- {
- [MonoTODO]
- get{return _provider.Pipelined;}
- [MonoTODO]
- set{_provider.Pipelined = value;}
- }
-
- public override bool PreAuthenticate
- {
- get{return _provider.PreAuthenticate;}
- set{_provider.PreAuthenticate = value;}
- }
-
- public Version ProtocolVersion
- {
- get{return _provider.ProtocolVersion;}
- set{_provider.ProtocolVersion = value;}
- }
-
- public override IWebProxy Proxy
- {
- get{return _provider.Proxy;}
- set{_provider.Proxy = value;}
- }
-
- public int ReadWriteTimeout
- {
- get{return _provider.ReadWriteTimeout;}
- set{_provider.ReadWriteTimeout = value;}
- }
-
- public string Referer
- {
- get {return Headers["Referer"];}
- set
- {
- if(_provider.IsRequestStarted ())
- throw new InvalidOperationException("Connection already opened");
- if (value == null || value.Trim().Length == 0)
- {
- Headers.RemoveInternal ("Referer");
- return;
- }
- Headers.SetInternal ("Referer", value);
- }
- }
- internal Uri AuthUri
- {
- get { return RequestUri; }
- }
- public override Uri RequestUri
- {
- get{return _provider.GetOriginalAddress();}
- }
-
- public bool SendChunked
- {
- get{return _provider.SendChunked;}
- set{_provider.SendChunked = value;}
- }
-
- public ServicePoint ServicePoint
- {
- get{return _provider.ServicePoint;}
- }
- [MonoTODO] //once again - needed since our impl. still
- //doesn't support this feature we need document it..
- public override int Timeout
- {
- [MonoTODO]
- get{return _provider.Timeout;}
- [MonoTODO]
- set{_provider.Timeout = value;}
- }
-
-
- public string TransferEncoding
- {
- get { return Headers ["Transfer-Encoding"]; }
- set
- {
- if(_provider.IsRequestStarted ())
- {
- throw new InvalidOperationException("Connection has been already opened");
- }
- string val = value;
- if (val != null)
- val = val.Trim ().ToLower (CultureInfo.InvariantCulture);
-
- if (val == null || val.Length == 0)
- {
- Headers.RemoveInternal ("Transfer-Encoding");
- return;
- }
-
- if (val == "chunked")
- throw new ArgumentException ("Chunked encoding must be set with the SendChunked property");
-
- if (!this.SendChunked)
- throw new InvalidOperationException ("SendChunked must be True");
-
- Headers.RemoveAndAdd ("Transfer-Encoding", value);
- }
- }
-
-
- public bool UnsafeAuthenticatedConnectionSharing
- {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
- }
-
- public string UserAgent
- {
- get { return Headers ["User-Agent"]; }
- set { Headers.SetInternal ("User-Agent", value); }
- }
-
-
-
-
- #endregion
-
- #region Methods
-
- //todo
- public override void Abort()
- {
- _provider.Abort();
-// _connection.disconnect();
-// _haveResponse = true;
-// //aborted = true;
-// if (_asyncWrite != null)
-// {
-// GHWebAsyncResult r = _asyncWrite;
-// WebException wexc = new WebException ("Aborted.", WebExceptionStatus.RequestCanceled);
-// r.SetCompleted (false, wexc);
-// r.DoCallback ();
-// _asyncWrite = null;
-// }
-//
-// if (_asyncRead != null)
-// {
-// GHWebAsyncResult r = _asyncRead;
-// WebException wexc = new WebException ("Aborted.", WebExceptionStatus.RequestCanceled);
-// r.SetCompleted (false, wexc);
-// r.DoCallback ();
-// _asyncRead = null;
-// }
-//
-//// if (abortHandler != null)
-//// {
-//// try
-//// {
-//// abortHandler (this, EventArgs.Empty);
-//// }
-//// catch {}
-//// abortHandler = null;
-//// }
-//
-// if (_writeStream != null)
-// {
-// try
-// {
-// _writeStream.Close ();
-// _writeStream = null;
-// }
-// catch {}
-// }
-//
-// if (_response != null)
-// {
-// try
-// {
-// _response.Close ();
-// _response = null;
-// }
-// catch {}
-// }
- }
-
- public void AddRange (int range)
- {
- AddRange ("bytes", range);
- }
-
- public void AddRange (int from, int to)
- {
- AddRange ("bytes", from, to);
- }
-
- public void AddRange (string rangeSpecifier, int range)
- {
- if (rangeSpecifier == null)
- throw new ArgumentNullException ("rangeSpecifier");
- string value = Headers ["Range"];
- if (value == null || value.Length == 0)
- value = rangeSpecifier + "=";
- else if (value.StartsWith (rangeSpecifier.ToLower () + "=", StringComparison.InvariantCultureIgnoreCase))
- value += ",";
- else
- throw new InvalidOperationException ("rangeSpecifier");
- Headers.RemoveAndAdd ("Range", value + range + "-");
- }
-
- public void AddRange (string rangeSpecifier, int from, int to)
- {
- if (rangeSpecifier == null)
- throw new ArgumentNullException ("rangeSpecifier");
- if (from < 0 || to < 0 || from > to)
- throw new ArgumentOutOfRangeException ();
- string value = Headers ["Range"];
- if (value == null || value.Length == 0)
- value = rangeSpecifier + "=";
- else if (value.StartsWith (rangeSpecifier.ToLower () + "=", StringComparison.InvariantCultureIgnoreCase))
- value += ",";
- else
- throw new InvalidOperationException ("rangeSpecifier");
- Headers.RemoveAndAdd ("Range", value + from + "-" + to);
- }
-
- public override Stream GetRequestStream()
- {
- return _provider.GetRequestStream();
-// lock(this)
-// {
-// Type t = Type.GetType("System.IO.ConsoleWriteStream", true);
-// _connection.setDoOutput(true);
-//
-//
-//// Console.WriteLine("Request is sent with following headers:");
-//// java.util.Map map = _connection.getRequestProperties();
-//// for(java.util.Iterator iter = map.keySet().iterator(); iter.hasNext();)
-//// {
-//// string key = (string) iter.next();
-//// Console.WriteLine(key + ": " + map.get(key));
-//// }
-//
-// foreach(string k in Headers)
-// {
-// string val = Headers[k];
-// val = (val == null) ? "" : val;
-// _connection.setRequestProperty(k, val);
-// }
-//
-// _writeStream = (Stream) Activator.CreateInstance(t, new object[]{_connection.getOutputStream()});
-// _haveRequest = true;
-// return _writeStream;
-// }
- }
-
- public override WebResponse GetResponse()
- {
- return _provider.GetResponse();
- }
- /*
- private void CommonChecks (bool putpost)
- {
- string method = _connection.getRequestMethod();
-
- if (method == null)
- throw new ProtocolViolationException ("Method is null.");
-
- bool keepAlive = _headers["Keep-Alive"] == null;
- bool allowBuffering = true;
- bool sendChunked = true;
- long contentLength = _connection.getContentLength();
-
- if (putpost && ((!keepAlive || (contentLength == -1 && !sendChunked)) && !allowBuffering))
- throw new ProtocolViolationException ("Content-Length not set");
-
- string transferEncoding = TransferEncoding;
- if (!sendChunked && transferEncoding != null && transferEncoding.Trim () != "")
- throw new ProtocolViolationException ("SendChunked should be true.");
- }
- */
-
- public override IAsyncResult BeginGetRequestStream(AsyncCallback callback, object state)
- {
- return _provider.BeginGetRequestStream(callback, state);
- }
-
- public override Stream EndGetRequestStream(IAsyncResult asyncResult)
- {
- return _provider.EndGetRequestStream(asyncResult);
- }
-
- public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
- {
- //todo check input, http headers etc.
-
- return _provider.BeginGetResponse(callback, state);
- }
-
- public override WebResponse EndGetResponse(IAsyncResult asyncResult)
- {
- return _provider.EndGetResponse(asyncResult);
- }
-
-
-
-
- #endregion
-
- #region Inner Classes
-
-// #region JavaHeaders class
-// [Serializable]
-// internal sealed class JavaHeaders : WebHeaderCollection
-// {
-// private java.net.HttpURLConnection _connection;
-//
-// internal JavaHeaders(java.net.HttpURLConnection con)
-// {
-// _connection = con;
-// }
-//
-// public string this[string key]
-// {
-// get
-// {
-// return _connection.getHeaderField(key);
-// }
-// set
-// {
-// _connection.addRequestProperty(key, value);
-// }
-// }
-// }
-// #endregion
-
-
-
-
- #endregion
- public DecompressionMethods AutomaticDecompression
- {
- get {
- throw new NotSupportedException ();
- }
- set {
- throw new NotSupportedException ();
- }
- }
-
- }
-}
diff --git a/mcs/class/System/System.Net/HttpWebResponse.jvm.cs b/mcs/class/System/System.Net/HttpWebResponse.jvm.cs
deleted file mode 100644
index f22222b027f..00000000000
--- a/mcs/class/System/System.Net/HttpWebResponse.jvm.cs
+++ /dev/null
@@ -1,534 +0,0 @@
-using System;
-using System.Collections.Specialized;
-using System.Globalization;
-using System.IO;
-using System.Runtime;
-using System.Runtime.Serialization;
-using System.Security.Cryptography.X509Certificates;
-
-namespace System.Net
-{
- [Serializable]
- public class HttpWebResponse : WebResponse, IDisposable
- {
- #region Fields
- private mainsoft.apache.commons.httpclient.HttpMethod _httpMethod;
- private CookieCollection _cookies;
- private WebHeaderCollection _headers;
- private string _statusDescription;
- private Version _version = null;
- private Uri _uri;
- private string _method;
- private Stream _responseStream;
- private mainsoft.apache.commons.httpclient.HttpState _state;
- private HttpStateCache _stateCache;
- private HttpStatusCode _statusCode;
- private bool _isStatusCodeInitialized = false;
-
- private Type _httpStatusCodeType = typeof(HttpStatusCode);
-
- private sbyte [] _responseBody;
- private bool _isHttpMethodClosed = false;
- #endregion
-
- #region Constructors
-
- internal HttpWebResponse(mainsoft.apache.commons.httpclient.HttpMethod httpMethod,
- mainsoft.apache.commons.httpclient.HttpState state,
- HttpStateCache stateCache,
- Uri uri, string method)
- {
- _httpMethod = httpMethod;
- _uri = uri;
- _method = method;
- _state = state;
- _stateCache = stateCache;
- }
-
- #endregion
-
- #region Properties
-
- public CookieCollection Cookies
- {
- get
- {
- if(_cookies == null)
- {
- _cookies = new CookieCollection();
- FillCookies();
-
- }
- return _cookies;
- }
-
- set
- {
- _cookies = value;
- }
- }
-
- public override WebHeaderCollection Headers
- {
- get
- {
- if(_headers == null)
- {
- _headers = new WebHeaderCollection();
- FillHeaders();
- }
- return _headers;
- }
- }
- public override long ContentLength
- {
- get
- {
- string val = Headers["Content-Length"];
- if(val == null || val.Trim().Equals(""))
- return -1L;
- try
- {
- return Int64.Parse(val);
- }
- catch
- {
- return -1L;
- }
- }
- }
-
-
- public string ContentEncoding
- {
- get
- {
- return Headers["Content-Encoding"];
- }
- }
-
- public override string ContentType
- {
- get
- {
- return Headers["Content-Type"];
- }
- }
-
- public string CharacterSet
- {
- get
- {
- string contentType = ContentType;
- if (contentType == null)
- return "ISO-8859-1";
- int pos = contentType.IndexOf ("charset=", StringComparison.OrdinalIgnoreCase);
- if (pos == -1)
- return "ISO-8859-1";
- pos += 8;
- int pos2 = contentType.IndexOf (';', pos);
- return (pos2 == -1)
- ? contentType.Substring (pos)
- : contentType.Substring (pos, pos2 - pos);
- }
- }
-
- public string Server
- {
- get
- {
- return Headers ["Server"];
- }
- }
-
- public DateTime LastModified
- {
- get
- {
- try
- {
- string val = Headers["Last-Modified"];
- return MonoHttpDate.Parse(val);
- }
- catch
- {
- return DateTime.Now;
- }
- }
- }
-
- public HttpStatusCode StatusCode
- {
- get
- {
- if(_isStatusCodeInitialized == false)
- {
- int status = _httpMethod.getStatusCode();
- _statusCode = (HttpStatusCode)Enum.Parse(_httpStatusCodeType,
- Enum.GetName(_httpStatusCodeType, status));
- _isStatusCodeInitialized = true;
- }
-
- return _statusCode;
- }
- }
-
- public string StatusDescription
- {
- get
- {
- if(_statusDescription == null)
- _statusDescription = _httpMethod.getStatusText();
- return _statusDescription;
- }
- }
-
- public Version ProtocolVersion
- {
- get
- {
- if(_version == null)
- ParseVersion();
- return _version;
- }
- }
-
- public override Uri ResponseUri
- {
- get
- {
- return _uri;
- }
- }
-
- public string Method
- {
- get
- {
- return _method;
- }
- }
- #endregion
-
- #region Methods
-
- internal void ReadAllAndClose()
- {
- if (_responseBody != null)
- return;
-
- object temp = null;
- if(_cookies == null)
- {
- temp = this.Cookies;
- }
- if(_headers == null)
- {
- temp = this.Headers;
- }
- if(_isStatusCodeInitialized == false)
- {
- temp = this.StatusCode;
- }
- if(_statusDescription == null)
- {
- temp = this.StatusDescription;
- }
- if(_version == null)
- {
- temp = this.ProtocolVersion;
- }
-
- _responseBody = _httpMethod.getResponseBody();
-#if DEBUG
- Console.WriteLine("The response body as string == {0}", System.Text.Encoding.UTF8.GetString((byte[])vmw.common.TypeUtils.ToByteArray(_responseBody)));
-#endif
- this.Close();
- }
-
- public override Stream GetResponseStream()
- {
- try
- {
- if(_responseStream == null)
- {
- Type t = Type.GetType("System.IO.ConsoleReadStream", true);
- object [] param = null;
- if (_responseBody == null)
- {
- param = new object[]{_httpMethod.getResponseBodyAsStream()};
- }
- else
- {
- param = new object[]{new java.io.ByteArrayInputStream(_responseBody)};
- }
- _responseStream = (Stream) Activator.CreateInstance(t, param);
- }
- return _responseStream;
- }
- catch(Exception e)
- {
- Console.WriteLine("Exception caught!");
- Console.WriteLine(e.GetType() + ":" + e.Message + "\n" + e.StackTrace);
- throw e;
- }
- }
-
- public override void Close()
- {
- try
- {
- if(_responseStream != null)
- _responseStream.Close();
- }
- finally
- {
- _responseStream = null;
-
- if (!_isHttpMethodClosed)
- {
- _httpMethod.releaseConnection();
- if(_stateCache != null && _state != null)
- {
- _stateCache.ReleaseHttpState(_state);
- _state = null;
- _stateCache = null;
- }
- _isHttpMethodClosed = true;
- }
- }
- }
-
- public string GetResponseHeader(string headerName)
- {
- return Headers[headerName];
- }
-
- public override int GetHashCode()
- {
- return base.GetHashCode();
- }
-
-
- protected virtual void Dispose(bool disposing)
- {
- try
- {
- if(_responseStream != null)
- _responseStream.Close();
- }
- finally
- {
- _responseStream = null;
-
- if (!_isHttpMethodClosed)
- {
- _httpMethod.releaseConnection();
- _isHttpMethodClosed = true;
- }
- }
- }
-
- private void FillHeaders()
- {
- mainsoft.apache.commons.httpclient.Header[] respHeaders =
- _httpMethod.getResponseHeaders();
- if(respHeaders == null)
- return;
- for(int i = 0; i < respHeaders.Length; i++)
- {
-
- mainsoft.apache.commons.httpclient.HeaderElement[] elements = respHeaders[i].getElements();
- for(int j = 0; j < elements.Length; j++)
- {
- string key = elements[j].getName();
- string val = elements[j].getValue();
- string pair = (key == null) ? ((val == null) ? "" : val) : ((val==null) ? key : key + "=" + val);
- _headers.Add(respHeaders[i].getName(), pair);
- }
-
- }
- ParseVersion();
- }
-
- private void ParseVersion()
- {
- mainsoft.apache.commons.httpclient.StatusLine statusLine =
- _httpMethod.getStatusLine();
- string ver = statusLine.getHttpVersion().Trim().ToUpper();
- if(ver == "HTTP/1.1")
- _version = HttpVersion.Version11;
- else if(ver == "HTTP/1.0")
- _version = HttpVersion.Version10;
- else
- _version = null;
- }
-
- private mainsoft.apache.commons.httpclient.Cookie FindCookie (mainsoft.apache.commons.httpclient.Cookie [] cookies, string name) {
- for (int i = 0; i < cookies.Length; ++i)
- if (cookies [i].getName () == name)
- return cookies [i];
- return null;
- }
-
- private mainsoft.apache.commons.httpclient.Cookie [] FetchResponseCookies (mainsoft.apache.commons.httpclient.Header [] headers,
- mainsoft.apache.commons.httpclient.Cookie [] stateCookies) {
- System.Collections.ArrayList list = new System.Collections.ArrayList();
- foreach (mainsoft.apache.commons.httpclient.Header h in headers) {
- foreach (mainsoft.apache.commons.httpclient.HeaderElement element in h.getValues ()) {
- mainsoft.apache.commons.httpclient.Cookie c = FindCookie (stateCookies, element.getName ());
- if (c != null)
- list.Add(c);
- }
- }
-
- return (mainsoft.apache.commons.httpclient.Cookie[]) list.ToArray(typeof(mainsoft.apache.commons.httpclient.Cookie));
- }
-
- private void FillCookies ()
- {
- if(_state == null)
- return;
-
- mainsoft.apache.commons.httpclient.Cookie[] javaCookies =
- _state.getCookies();
-
- if(javaCookies == null)
- return;
-
- mainsoft.apache.commons.httpclient.Header [] headers = _httpMethod.getResponseHeaders ("Set-Cookie");
- if (headers != null)
- javaCookies = FetchResponseCookies (headers, javaCookies);
-
- for(int i = 0; i < javaCookies.Length; i++)
- {
- bool httpsProtocol = _httpMethod.getURI().ToString().StartsWith("https");
- if(!httpsProtocol && javaCookies[i].getSecure())
- continue;
- Cookie c = new Cookie(javaCookies[i].getName(),
- javaCookies[i].getValue(),
- (javaCookies[i].getPath() == null) ? "" : javaCookies[i].getPath(),
- (javaCookies[i].getDomain() == null) ? "" : javaCookies[i].getDomain());
- java.util.Calendar jCalendar = java.util.Calendar.getInstance();
- java.util.Date jDate = javaCookies[i].getExpiryDate();
- if(jDate != null)
- {
- jCalendar.setTime(javaCookies[i].getExpiryDate());
- c.Expires = (DateTime) vmw.common.DateTimeUtils.CalendarToDateTime(jCalendar);
- }
-
- _cookies.Add(c);
- }
-
- }
-
- //todo remove unused methods
- private void FillCookies_old ()
- {
-
- string val = Headers["Set-Cookie"];
- if (val != null && val.Trim () != "")
- SetCookie (val);
-
- val = Headers["Set-Cookie2"];
- if (val != null && val.Trim () != "")
- SetCookie2 (val);
- }
-
- static string [] SplitValue (string input)
- {
- string [] result = new string [2];
- int eq = input.IndexOf ('=');
- if (eq == -1)
- {
- result [0] = "invalid";
- }
- else
- {
- result [0] = input.Substring (0, eq).Trim ().ToUpper ();
- result [1] = input.Substring (eq + 1);
- }
-
- return result;
- }
-
- private void SetCookie(string val)
- {
-// Console.WriteLine("in set cookie 1 - got value : " + val);
- string[] parts = null;
- Collections.Queue options = null;
- Cookie cookie = null;
-
- options = new Collections.Queue (val.Split (';'));
- parts = SplitValue ((string) options.Dequeue()); // NAME=VALUE must be first
-
- cookie = new Cookie (parts[0], parts[1]);
-
- while (options.Count > 0)
- {
- parts = SplitValue ((string) options.Dequeue());
- switch (parts [0])
- {
- case "COMMENT":
- if (cookie.Comment == null)
- cookie.Comment = parts[1];
- break;
- case "COMMENTURL":
- if (cookie.CommentUri == null)
- cookie.CommentUri = new Uri(parts[1]);
- break;
- case "DISCARD":
- cookie.Discard = true;
- break;
- case "DOMAIN":
- if (cookie.Domain == "")
- cookie.Domain = parts[1];
- break;
- case "MAX-AGE": // RFC Style Set-Cookie2
- if (cookie.Expires == DateTime.MinValue)
- cookie.Expires = cookie.TimeStamp.AddSeconds (Int32.Parse (parts[1]));
- break;
- case "EXPIRES": // Netscape Style Set-Cookie
- if (cookie.Expires == DateTime.MinValue)
- {
- //FIXME: Does DateTime parse something like: "Sun, 17-Jan-2038 19:14:07 GMT"?
- //cookie.Expires = DateTime.ParseExact (parts[1]);
- cookie.Expires = DateTime.Now.AddDays (1);
- }
- break;
- case "PATH":
- cookie.Path = parts[1];
- break;
- case "PORT":
- if (cookie.Port == null)
- cookie.Port = parts[1];
- break;
- case "SECURE":
- cookie.Secure = true;
- break;
- case "VERSION":
- cookie.Version = Int32.Parse (parts[1]);
- break;
- } // switch
- } // while
-
- if (_cookies == null)
- _cookies = new CookieCollection();
-
- if (cookie.Domain == "")
- cookie.Domain = _uri.Host;
-
-// Console.WriteLine("adding cookie " + cookie + " to collection");
- _cookies.Add (cookie);
-// Console.WriteLine("exit from method...");
- }
-
- private void SetCookie2 (string cookies_str)
- {
- string [] cookies = cookies_str.Split (',');
- foreach (string cookie_str in cookies)
- SetCookie (cookie_str);
- }
- #endregion
- }
-}
diff --git a/mcs/class/System/System.Net/ProtocolViolationException.cs b/mcs/class/System/System.Net/ProtocolViolationException.cs
index b005f061123..0587dfe5333 100644
--- a/mcs/class/System/System.Net/ProtocolViolationException.cs
+++ b/mcs/class/System/System.Net/ProtocolViolationException.cs
@@ -50,12 +50,10 @@ namespace System.Net
}
// Methods
-#if !TARGET_JVM
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
{
base.GetObjectData (info, context);
}
-#endif
public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
diff --git a/mcs/class/System/System.Net/ServicePoint.cs b/mcs/class/System/System.Net/ServicePoint.cs
index 1d72e569fdb..e7d0f70be87 100644
--- a/mcs/class/System/System.Net/ServicePoint.cs
+++ b/mcs/class/System/System.Net/ServicePoint.cs
@@ -381,7 +381,6 @@ namespace System.Net
protocolVersion = version;
}
-#if !TARGET_JVM
internal EventHandler SendRequest (HttpWebRequest request, string groupName)
{
WebConnection cnc;
@@ -399,7 +398,6 @@ namespace System.Net
return cnc.SendRequest (request);
}
-#endif
public bool CloseConnectionGroup (string connectionGroupName)
{
lock (this) {
diff --git a/mcs/class/System/System.Net/ServicePointManager.cs b/mcs/class/System/System.Net/ServicePointManager.cs
index 66cdc7296fe..dc7412d725a 100644
--- a/mcs/class/System/System.Net/ServicePointManager.cs
+++ b/mcs/class/System/System.Net/ServicePointManager.cs
@@ -137,11 +137,7 @@ namespace System.Net
private static bool _checkCRL = false;
private static SecurityProtocolType _securityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls;
-#if TARGET_JVM
- static bool expectContinue = false;
-#else
static bool expectContinue = true;
-#endif
static bool useNagle;
static RemoteCertificateValidationCallback server_cert_cb;
static bool tcp_keepalive;
@@ -373,6 +369,15 @@ namespace System.Net
return sp;
}
+
+ internal static void CloseConnectionGroup (string connectionGroupName)
+ {
+ lock (servicePoints) {
+ foreach (ServicePoint sp in servicePoints.Values) {
+ sp.CloseConnectionGroup (connectionGroupName);
+ }
+ }
+ }
#if SECURITY_DEP
internal class ChainValidationHelper {
diff --git a/mcs/class/System/System.Net/VMWHttpProvider.jvm.cs b/mcs/class/System/System.Net/VMWHttpProvider.jvm.cs
deleted file mode 100644
index 38470440dd4..00000000000
--- a/mcs/class/System/System.Net/VMWHttpProvider.jvm.cs
+++ /dev/null
@@ -1,1305 +0,0 @@
-using System;
-using System.IO;
-using System.Threading;
-
-using mainsoft.apache.commons.httpclient;
-using mainsoft.apache.commons.httpclient.methods;
-using mainsoft.apache.commons.httpclient.@params;
-using mainsoft.apache.commons.httpclient.auth;
-using mainsoft.apache.commons.httpclient.auth.negotiate;
-using javax.security.auth;
-using org.ietf.jgss;
-using java.security;
-using System.Collections.Specialized;
-using System.Collections;
-using mainsoft.apache.commons.httpclient.cookie;
-
-namespace System.Net
-{
- /// <summary>
- /// Summary description for VMWHttpProvider.
- /// </summary>
- internal class VMWHttpProvider : HttpProvider
- {
- protected static HttpClient _sclient;
- protected static HttpStateCache _stateCache = new HttpStateCache();
-
- protected static object LOCK_OBJECT = new object();
-
- protected HttpClient _client;
- protected bool _disableHttpConnectionPooling = false;
-
- protected HttpMethod _method;
- protected HttpState _state;
- protected HostConfiguration _hostConfig;
-
- protected HttpWebResponse _response;
- protected bool _hasResponse;
- protected bool _hasRequest;
- protected Stream _writeStream;
- private GHWebAsyncResult _asyncWrite;
-
- private bool _isConnectionOpened;
-
- static VMWHttpProvider()
- {
- if(java.lang.System.getProperty("mainsoft.apache.commons.logging.Log") == null)
- java.lang.System.setProperty("mainsoft.apache.commons.logging.Log",
- "mainsoft.apache.commons.logging.impl.SimpleLog");
- if(java.lang.System.getProperty("mainsoft.apache.commons.logging.simplelog.showdatetime") == null)
- java.lang.System.setProperty("mainsoft.apache.commons.logging.simplelog.showdatetime",
- "true");
- if(java.lang.System.getProperty("mainsoft.apache.commons.logging.simplelog.log.httpclient.wire") == null)
- java.lang.System.setProperty("mainsoft.apache.commons.logging.simplelog.log.httpclient.wire",
- "error");
- if(java.lang.System.getProperty("mainsoft.apache.commons.logging.simplelog.log.mainsoft.apache.commons.httpclient")
- == null)
- java.lang.System.setProperty("mainsoft.apache.commons.logging.simplelog.log.mainsoft.apache.commons.httpclient",
- "error");
- if(java.lang.System.getProperty("mainsoft.apache.commons.logging.simplelog.log.httpclient.wire.header")
- == null)
- java.lang.System.setProperty("mainsoft.apache.commons.logging.simplelog.log.httpclient.wire.header",
- "error");
-
- }
- public VMWHttpProvider(Uri uri) : base (uri)
- {
- string s = System.Configuration.ConfigurationSettings.AppSettings["disableHttpConnectionPooling"];
- if (s != null)
- {
- _disableHttpConnectionPooling = bool.Parse(s);
- }
- InitDefaultCredentialsProvider ();
- InitSPNProviders ();
- }
-
- internal override ServicePoint ServicePoint
- {
- get {throw new NotImplementedException();}
- }
-
-
-
- public override bool IsRequestStarted()
- {
- if(_method == null)
- return false;
- return _method.isRequestSent();
- }
-
- public override Uri GetAddress()
- {
- if(_method == null)
- return GetOriginalAddress();
- mainsoft.apache.commons.httpclient.URI javaURI = _method.getURI();
- return new Uri(javaURI.ToString());
- }
-
- public override bool IsHaveResponse()
- {
- return _hasResponse;
- }
-
- private void SetJavaCredential(NetworkCredential nc, string type)
- {
- SetJavaCredential(nc, type, false);
- }
-
- private void SetJavaCredential(NetworkCredential nc, string type, bool proxyCredentials)
- {
- string host = null;
-
- if(!proxyCredentials)
- host = GetOriginalAddress().Host;
- else
- host = ((WebProxy)this.Proxy).Address.Host;
-
- string domain = (nc.Domain == null) ? host : nc.Domain;
-
- if(String.Compare (type, "any", StringComparison.InvariantCultureIgnoreCase) == 0)
- {
- if(!proxyCredentials)
- {
- _state.setCredentials(AuthScope.ANY,
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- _state.setCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM, "Ntlm"),
- new NTCredentials(nc.UserName, nc.Password, host, domain));
- }
- else
- {
- _state.setProxyCredentials(AuthScope.ANY,
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- _state.setProxyCredentials(new AuthScope(AuthScope.ANY_HOST, AuthScope.ANY_PORT, AuthScope.ANY_REALM, "Ntlm"),
- new NTCredentials(nc.UserName, nc.Password, host, domain));
- }
- }
- else if(String.Compare (type, "basic", StringComparison.InvariantCultureIgnoreCase) == 0)
- {
- if(!proxyCredentials)
- {
- _state.setCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, "basic"),
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- }
- else
- {
- _state.setProxyCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, "basic"),
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- }
- }
- else if(String.Compare (type, "digest", StringComparison.InvariantCultureIgnoreCase) == 0)
- {
- if(!proxyCredentials)
- {
- _state.setCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, "digest"),
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- }
- else
- {
- _state.setProxyCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, "digest"),
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- }
- }
- else if(String.Compare (type, "ntlm", StringComparison.InvariantCultureIgnoreCase) == 0)
- {
- if(!proxyCredentials)
- {
- _state.setCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, "ntlm"),
- new NTCredentials(nc.UserName, nc.Password, host, domain));
- }
- else
- {
- _state.setProxyCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, "ntlm"),
- new NTCredentials(nc.UserName, nc.Password, host, domain));
- }
- }
- else if(String.Compare (type, "negotiate", StringComparison.InvariantCultureIgnoreCase) == 0)
- {
- SetAuthenticationScheme (AuthPolicy.NEGOTIATE);
- }
- else
- {
- if(!proxyCredentials)
- {
- _state.setCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, type),
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- }
- else
- {
- _state.setProxyCredentials(new AuthScope(AuthScope.ANY_HOST,
- AuthScope.ANY_PORT, AuthScope.ANY_REALM, type),
- new UsernamePasswordCredentials(nc.UserName, nc.Password));
- }
- }
- }
-
- private void SetAuthenticationScheme (string type) {
- _method.getHostAuthState ().setAuthScheme (AuthPolicy.getAuthScheme (type));
- if (type != null && type.ToLower () == AuthPolicy.NEGOTIATE.ToLower ()) {
- _method.getParams ().setParameter (CredentialsProvider__Finals.PROVIDER, new HTTPClientCredentialsBridge( DefaultCredentialsProvider));
- _method.getParams ().setParameter (NegotiateScheme.SPN_LIST_PARAM, SPNProviders);
- }
- }
-
- private java.util.ArrayList SPNProviders {
- get {
- return (java.util.ArrayList) AppDomain.CurrentDomain.GetData ("GH$SPNProviders");
- }
- set {
- AppDomain.CurrentDomain.SetData ("GH$SPNProviders", value);
- }
- }
-
- private void InitSPNProviders () {
- if (SPNProviders != null)
- return;
- java.util.ArrayList spnProviders = new java.util.ArrayList ();
- NameValueCollection configAttributes = System.Configuration.ConfigurationSettings.AppSettings;
- string providersList = configAttributes ["SPNProviders"];
- if (providersList == null)
- return;
- string[] tokens = providersList.Split (',');
- foreach (string spnClass in tokens) {
- try {
- spnProviders.add (Activator.CreateInstance (Type.GetType (spnClass)));
- }
- catch (Exception) { }
- }
- SPNProviders = spnProviders;
- }
-
- private vmw.@internal.auth.CredentialsProvider DefaultCredentialsProvider {
- get {
- return (vmw.@internal.auth.CredentialsProvider) AppDomain.CurrentDomain.GetData ("GH$DefaultCredentialsProvider");
- }
- set {
- AppDomain.CurrentDomain.SetData ("GH$DefaultCredentialsProvider", value);
- }
- }
-
- private void InitDefaultCredentialsProvider () {
- if (DefaultCredentialsProvider != null)
- return;
- vmw.@internal.auth.CredentialsProvider defaultProvider = null;
- NameValueCollection configAttributes = System.Configuration.ConfigurationSettings.AppSettings;
-
- string defaultProviderClass = configAttributes ["DefaultCredentialsProvider"];
- if (defaultProviderClass != null) {
- try {
- defaultProvider = (vmw.@internal.auth.CredentialsProvider)
- Activator.CreateInstance (Type.GetType (defaultProviderClass));
- }
- catch (Exception e) {
- Console.WriteLine ("Failed to initialize Credentials Provider: " + defaultProviderClass + " Message: " + e.Message);
- }
- }
-
- if (defaultProvider == null)
- defaultProvider = new vmw.@internal.auth.SubjectCredentialsPrvider ();
-
- defaultProvider.init (ConvertToTable (configAttributes));
- DefaultCredentialsProvider = defaultProvider;
- }
-
- private java.util.Properties ConvertToTable (NameValueCollection col) {
- java.util.Properties table = new java.util.Properties ();
- foreach (String key in col.Keys)
- table.put (key, col [key]);
- return table;
- }
-
- private void InitProxyCredentials () {
- if (this.Proxy == null)
- return;
-
- if (!(this.Proxy is WebProxy))
- return;
-
- WebProxy proxy = (WebProxy) this.Proxy;
- ICredentials creds = proxy.Credentials;
-
- if(creds == null)
- return;
-
- if(creds is CredentialCache)
- {
- string type = "basic";
- NetworkCredential nc = ((CredentialCache)creds).GetCredential(proxy.Address, "basic");
- if(nc == null)
- {
- type = "digest";
- nc = ((CredentialCache)creds).GetCredential(proxy.Address, "digest");
- if(nc == null)
- {
- type = "ntlm";
- nc = ((CredentialCache)creds).GetCredential(proxy.Address, "ntlm");
- if (nc == null) {
- nc = ((CredentialCache) _credentials).GetCredential (GetOriginalAddress (), "negotiate");
- type = "negotiate";
- }
- }
- }
- if(nc != null)
- {
- SetJavaCredential(nc, type, true);
- }
- }
- else if (creds is NetworkCredential)
- {
- SetJavaCredential((NetworkCredential)creds, "any", true);
- }
-
- _method.setDoAuthentication(true);
- }
-
- private void InitCredentials()
- {
- if(_credentials == null)
- return;
- if (_credentials == CredentialCache.DefaultCredentials) {
- SetAuthenticationScheme (AuthPolicy.NEGOTIATE);
- }
- else if (_credentials is CredentialCache) {
- NetworkCredential nc = ((CredentialCache) _credentials).GetCredential (GetOriginalAddress (), "basic");
- string type = "basic";
- if(nc == null)
- {
- nc = ((CredentialCache)_credentials).GetCredential(GetOriginalAddress(), "digest");
- type = "digest";
- if(nc == null)
- {
- nc = ((CredentialCache)_credentials).GetCredential(GetOriginalAddress(), "ntlm");
- type = "ntlm";
- if (nc == null) {
- nc = ((CredentialCache) _credentials).GetCredential (GetOriginalAddress (), "negotiate");
- type = "negotiate";
- }
- }
- }
- if(nc != null)
- {
- SetJavaCredential(nc, type);
- }
- }
- else if(_credentials is NetworkCredential)
- {
- SetJavaCredential((NetworkCredential)_credentials, "any");
- }
-
- _method.setDoAuthentication(true);
- }
-
- private void InitHostConfig()
- {
- if (this.Proxy == null || this.Proxy == WebRequest.DefaultWebProxy)
- return;
- if(this.Proxy.IsBypassed(GetOriginalAddress()))
- return;
-
- _hostConfig = new HostConfiguration();
- _hostConfig.setHost(new HttpHost(_method.getURI()));
-
-
- if(this.Proxy is WebProxy)
- {
- WebProxy wp = (WebProxy) this.Proxy;
- _hostConfig.setProxyHost(new ProxyHost(wp.Address.Host, wp.Address.Port));
- }
- else
- throw new NotImplementedException("Cannot accept Proxy which is not System.Net.WebProxy instance");
-
-
- }
-
- private void SetConnectionHeader(string val)
- {
- string connectionHeader = (this.Proxy != null) ? "Proxy-Connection" : "Connection";
- Headers.RemoveInternal ((this.Proxy != null) ? "Proxy-Connection" : "Connection");
-
- if(val != null)
- _method.setRequestHeader(connectionHeader, val);
-
- if (_keepAlive)
- {
- _method.addRequestHeader (connectionHeader, "keep-alive");
- Headers.SetInternal(connectionHeader,"keep-alive");
- }
- else if (!_keepAlive && _version == HttpVersion.Version11)
- {
- _method.addRequestHeader (connectionHeader, "close");
- Headers.SetInternal(connectionHeader,"close");
- }
-
- }
- private bool OpenConnection()
- {
- lock(this)
- {
- if(_isConnectionOpened)
- return false;
- _isConnectionOpened = true;
- }
- InitClient();
- InitMethod();
-
- _state = _stateCache.GetHttpState();
-
- //todo insert needed Authontication, Cookies info to state!
- _method.setDoAuthentication(this.PreAuthenticate);
-
- InitHostConfig();
- InitCredentials();
- InitProxyCredentials();
-
- if(this.ProtocolVersion == HttpVersion.Version11)
- _method.getParams().setVersion(mainsoft.apache.commons.httpclient.HttpVersion.HTTP_1_1);
- else if(ProtocolVersion == HttpVersion.Version10)
- _method.getParams().setVersion(mainsoft.apache.commons.httpclient.HttpVersion.HTTP_1_0);
- else
- throw new ProtocolViolationException("Unsupported protocol version: " + ProtocolVersion);
-
- if(!(_method is mainsoft.apache.commons.httpclient.methods.EntityEnclosingMethod))
- {
- _method.setFollowRedirects(this.AllowAutoRedirect);
- }
- else
- {
- if(!AllowWriteStreamBuffering && _contentLength < 0 && !SendChunked)
- throw new ProtocolViolationException();
- if(SendChunked)
- ((EntityEnclosingMethod)_method).setContentChunked(SendChunked);
- }
- if(MaxAutoRedirections != _defaultMaxRedirectsNum)
- {
- _method.getParams().setParameter(HttpClientParams.MAX_REDIRECTS,
- new java.lang.Integer(MaxAutoRedirections));
- }
-
-
-
- foreach(string k in Headers)
- {
- if(String.Compare (k, "connection", StringComparison.InvariantCultureIgnoreCase) == 0)
- continue;
- string val = Headers[k];
- val = (val == null) ? "" : val;
- _method.setRequestHeader(k, val);
- }
-
- if (this.CookieContainer != null)
- {
- string cookieHeader = this.CookieContainer.GetCookieHeader (this.GetOriginalAddress());
- if (cookieHeader != "")
- _method.setRequestHeader("Cookie", cookieHeader);
- }
- SetConnectionHeader(Headers["Connection"]);
-
- _method.getParams().setSoTimeout(ReadWriteTimeout);
-
- return true;
-
- }
-
- private void InitClient()
- {
- lock(LOCK_OBJECT)
- {
- if((!_disableHttpConnectionPooling) && (_client == null))
- {
- _client = _sclient;
- }
- if(_client == null)
- {
- mainsoft.apache.commons.httpclient.MultiThreadedHttpConnectionManager manager =
- new mainsoft.apache.commons.httpclient.MultiThreadedHttpConnectionManager();
- manager.setConnectionStaleCheckingEnabled(false);
- manager.setMaxTotalConnections(200);
- //by some reasons RFC something - the default
- //value will be 2 , so we need to change it ...
- manager.setMaxConnectionsPerHost(20);
- _client = new HttpClient(manager);
- _client.getParams().setIntParameter(HttpClientParams.MAX_REDIRECTS, _defaultMaxRedirectsNum);
- _client.getParams().setParameter(HttpClientParams.ALLOW_CIRCULAR_REDIRECTS, new java.lang.Boolean(true));
- _client.getParams().setParameter(HttpClientParams.CONNECTION_MANAGER_TIMEOUT, new java.lang.Long(30000));
- _client.getParams().setParameter(HttpClientParams.USER_AGENT,
- "VMW4J HttpClient (based on Jakarta Commons HttpClient)");
- _client.getParams ().setBooleanParameter (HttpClientParams.SINGLE_COOKIE_HEADER, true);
- java.util.ArrayList schemas = new java.util.ArrayList ();
- schemas.add ("Ntlm");
- schemas.add ("Digest");
- schemas.add ("Basic");
- schemas.add ("Negotiate");
- _client.getParams ().setParameter (AuthPolicy.AUTH_SCHEME_PRIORITY, schemas);
- if (!_disableHttpConnectionPooling) {
- _sclient = _client;
- }
- }
- }
- }
-
- private void InitMethod()
- {
- lock(this)
- {
- if(_method == null)
- {
- string uriString = this.GetOriginalAddress().AbsoluteUri;
-
- if(this.MethodName == null || this.MethodName == "")
- {
- this.MethodName = "GET";
- }
-
- string name = this.MethodName.ToUpper().Trim();
-
- switch(name)
- {
- case "GET" : _method = new GetMethod(uriString); break;
- case "PUT" : _method = new PutMethod(uriString);
- if (ServicePointManager.Expect100Continue)
- _method.getParams ().setBooleanParameter (HttpMethodParams.USE_EXPECT_CONTINUE, true);
- break;
- case "POST": _method = new PostMethod(uriString);
- if (ServicePointManager.Expect100Continue)
- _method.getParams ().setBooleanParameter (HttpMethodParams.USE_EXPECT_CONTINUE, true);
- break;
- case "HEAD": _method = new HeadMethod(uriString); break;
- case "TRACE": _method = new TraceMethod(uriString);break;
- case "DELETE": _method = new DeleteMethod(uriString);break;
- case "OPTIONS": _method = new OptionsMethod(uriString);break;
- default: _method = new GenericMethod(uriString, MethodName); break;
- }
- }
- }
- }
-
- private void InitHostConfiguration()
- {
- lock(this)
- {
- if(_hostConfig == null)
- {
- _hostConfig = new HostConfiguration();
- }
- }
- }
-
-
-
- public override Stream GetRequestStream()
- {
- bool isPutPost = String.Compare("post", MethodName, true) == 0
- || String.Compare("put", MethodName, true) == 0;
- if(!isPutPost)
- throw new ProtocolViolationException();
- lock(this)
- {
- if (_isAborted)
- throw new WebException ("The operation has been aborted.", WebExceptionStatus.RequestCanceled);
- if(_writeStream != null)
- return _writeStream;
- this.OpenConnection();
-
- //java.io.PipedInputStream inJavaStream = new java.io.PipedInputStream();
- //java.io.PipedOutputStream outJavaStream = new java.io.PipedOutputStream(inJavaStream);
-
- long contLen = _contentLength;
-
- OutputStreamRequestEntity reqEntity = new OutputStreamRequestEntity(contLen);
-
- _writeStream = new VMWRequestStream(reqEntity, contLen);
-
- EntityEnclosingMethod method = (EntityEnclosingMethod)_method;
- if(AllowWriteStreamBuffering )
- method.setRequestEntity(reqEntity);
- else if(!AllowWriteStreamBuffering && contLen < 0 && !SendChunked)
- throw new ProtocolViolationException();
- else
- method.setRequestEntity(reqEntity);
-
- _hasRequest = true;
- return _writeStream;
- }
- }
- private static bool isRedirectNeeded(HttpMethod method)
- {
- switch (method.getStatusCode())
- {
- case 302:
- case 301:
- case 303:
- case 307:
- return true;
- default:
- return false;
- } //end of switch
- }
-
- private void synchHeaders()
- {
- foreach(string k in Headers)
- {
- if (String.Compare (k, "connection", StringComparison.InvariantCultureIgnoreCase) == 0)
- continue;
- string val = Headers[k];
- val = (val == null) ? "" : val;
- _method.setRequestHeader(k, val);
- }
- }
-
- delegate WebResponse GetResponseDelegate();
- private sealed class AsyncContext
- {
- public readonly AsyncCallback AsyncCallback;
- public readonly Delegate AsyncDelegate;
- public readonly object AsyncState;
- public readonly DelegateAsyncResult DelegateAsyncResult;
-
- public AsyncContext (Delegate @delegate, DelegateAsyncResult delegateAsyncResult, AsyncCallback asyncCallback, object userState) {
- AsyncDelegate = @delegate;
- AsyncCallback = asyncCallback;
- AsyncState = userState;
- DelegateAsyncResult = delegateAsyncResult;
- }
- }
- private sealed class DelegateAsyncResult : IAsyncResult
- {
-
- IAsyncResult _asyncResult;
-
- public IAsyncResult AsyncResult {
- get { return _asyncResult; }
- set { _asyncResult = value; }
- }
-
- AsyncContext AsyncContext {
- get { return (AsyncContext) _asyncResult.AsyncState; }
- }
-
- public static void Callback (IAsyncResult result) {
- AsyncContext context = (AsyncContext) result.AsyncState;
- context.AsyncCallback.Invoke (context.DelegateAsyncResult);
- }
-
- public Delegate AsyncDelegate {
- get { return AsyncContext.AsyncDelegate; }
- }
-
- #region IAsyncResult Members
-
- public object AsyncState {
- get { return AsyncContext.AsyncState; }
- }
-
- public WaitHandle AsyncWaitHandle {
- get { return _asyncResult.AsyncWaitHandle; }
- }
-
- public bool CompletedSynchronously {
- get { return _asyncResult.CompletedSynchronously; }
- }
-
- public bool IsCompleted {
- get { return _asyncResult.IsCompleted; }
- }
-
- #endregion
- }
-
- WebResponse GetAsyncResponse()
- {
- try {
- return GetResponse ();
- }
- catch {
- return null;
- }
- }
-
- public override WebResponse GetResponse()
- {
- lock(this)
- {
- if (_isAborted)
- throw new WebException ("The operation has been aborted.", WebExceptionStatus.RequestCanceled);
- if(!_isConnectionOpened)
- OpenConnection();
- if(_response == null)
- {
- try
- {
- synchHeaders();
- InternalExecuteMethod ();
- int numOfRedirects = 0;
- while (isRedirectNeeded (_method) && _allowAutoRedirect && numOfRedirects < MaxAutoRedirections) {
- if (!HandleManualyRedirect ())
- break;
- numOfRedirects++;
- }
-
- //todo right place to re-put all headers again...
- mainsoft.apache.commons.httpclient.Header hostHeader =
- _method.getRequestHeader("Host");
- if(hostHeader != null)
- Headers.SetInternal("Host", hostHeader.getValue());
-
- _response = new HttpWebResponse(_method, _state, _stateCache, GetAddress(), this.MethodName);
-
- if(_response != null &&
- _response.Cookies != null &&
- _response.Cookies.Count > 0)
- {
- if(CookieContainer != null)
- {
- foreach(Cookie cooky in _response.Cookies)
- {
- CookieContainer.Add(GetAddress(), cooky);
- }
- }
- }
-
- _hasResponse = true;
- int respCodeAsInt = (int) _response.StatusCode;
- if(respCodeAsInt >= 400)
- {
- // The WebException contains the readable (not closed) response stream.
- // So, in case of WebException, we should read all data from the
- // network response stream into the memory stream, and after that
- // close the underlying network stream. The following requests to read
- // from the stream will actually read from the memory stream.
- // So, the this.Abort() should not be called in this case.
- _response.ReadAllAndClose();
- //this.Abort();
- throw new WebException("The remote server returned an error: (" + respCodeAsInt +") " +_response.StatusCode, null, WebExceptionStatus.ProtocolError, _response);
- }
- Header location = _method.getResponseHeader ("location");
- if (isRedirectNeeded (_method) && location == null && _method.getFollowRedirects ())
- {
- // See comments above for the error >= 400
- _response.ReadAllAndClose();
- //this.Abort();
- throw new WebException("Got response code "+_response.StatusCode+", but no location provided", null, WebExceptionStatus.ProtocolError, _response);
- }
- }
- catch(ProtocolException e)
- {
- throw new WebException("", e);
- }
- catch(java.net.ConnectException e)
- {
- throw new WebException("Unable to connect to the remote server.", e);
- }
- catch(java.net.SocketTimeoutException e)
- {
- throw new WebException("Timeout exceeded", e);
- }
- catch(java.io.IOException e)
- {
- throw new WebException("", e);
- }
- }
- return _response;
- }
-
- }
-
- private void InternalExecuteMethod () {
- _client.executeMethod (_hostConfig, _method, _state);
- }
-
- private bool HandleManualyRedirect () {
- Header redirectHeader = _method.getResponseHeader ("location");
- if (redirectHeader == null) {
- // See comments above for the error >= 400
- _response.ReadAllAndClose ();
- //this.Abort();
- throw new WebException ("Got response code " + _response.StatusCode + ", but no location provided", null, WebExceptionStatus.ProtocolError, _response);
- }
-
- mainsoft.apache.commons.httpclient.HttpMethod originalMethod = _method;
- try {
- string location = redirectHeader.getValue ();
- URI currentUri = _method.getURI ();
- URI redirectUri = null;
-
- redirectUri = new URI (location, true);
- if (redirectUri.isRelativeURI ()) {
- //location is incomplete, use current values for defaults
- redirectUri = new URI (currentUri, redirectUri);
- }
-
- _method = new GetMethod ();
- foreach(Header h in originalMethod.getRequestHeaders())
- _method.addRequestHeader(h);
- _method.setURI (redirectUri);
- InternalExecuteMethod ();
- return true;
- }
- catch (URIException e) {
- _method = originalMethod;
- return false;
- }
- }
-
- public override void Abort()
- {
- lock (this) {
- if (_isAborted)
- return;
- _isAborted = true;
- try {
- if (_hasResponse) {
- _response.Close ();
- }
- }
- finally {
- if (_method != null)
- _method.releaseConnection ();
- _method = null;
- _hasResponse = false;
- _response = null;
- }
- }
- }
-
- public override IAsyncResult BeginGetRequestStream(AsyncCallback callback, object state)
- {
- lock(this)
- {
- if(_asyncWrite != null)
- {
- throw new InvalidOperationException ("Cannot re-call start of asynchronous " +
- "method while a previous call is still in progress.");
- }
-
- _asyncWrite = new GHWebAsyncResult (this, callback, state);
- if (_hasRequest)
- {
- if (_writeStream != null)
- {
- _asyncWrite.SetCompleted (true, _writeStream);
- _asyncWrite.DoCallback ();
- return _asyncWrite;
- }
- }
-
-
- try
- {
- this.GetRequestStream();
- }
- catch(Exception e)
- {
- _asyncWrite.SetCompleted(false, e);
- _asyncWrite.DoCallback ();
- return _asyncWrite;
- }
-
- _asyncWrite.SetCompleted (true, _writeStream);
- _asyncWrite.DoCallback ();
- return _asyncWrite;
-
- }
- }
-
- public override Stream EndGetRequestStream(IAsyncResult asyncResult)
- {
- if (asyncResult == null)
- throw new ArgumentNullException ("asyncResult");
-
- GHWebAsyncResult result = asyncResult as GHWebAsyncResult;
- if (result == null)
- throw new ArgumentException ("Invalid IAsyncResult");
-
- _asyncWrite = result;
-
- result.WaitUntilComplete ();
-
- Exception e = result.Exception;
-
- if (e != null)
- throw e;
-
- return result.WriteStream;
- }
-
- public override IAsyncResult BeginGetResponse(AsyncCallback callback, object state)
- {
- GetResponseDelegate d = new GetResponseDelegate (GetAsyncResponse);
- DelegateAsyncResult result = new DelegateAsyncResult ();
- AsyncContext userContext = new AsyncContext (d, result, callback, state);
- result.AsyncResult = d.BeginInvoke (new AsyncCallback (DelegateAsyncResult.Callback), userContext);
- return result;
- }
-
- public override WebResponse EndGetResponse(IAsyncResult asyncResult)
- {
- if (_isAborted)
- throw new WebException ("The operation has been aborted.", WebExceptionStatus.RequestCanceled);
- if (asyncResult == null)
- throw new ArgumentNullException ("asyncResult");
-
- DelegateAsyncResult result = asyncResult as DelegateAsyncResult;
- if (result == null)
- throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
-
- return ((GetResponseDelegate) result.AsyncDelegate).EndInvoke (result.AsyncResult);
- }
-
-
-
-
-
-
-
-
-
-
-
-
- #region VMWRequestStream class
- internal class VMWRequestStream : Stream, IDisposable
- {
-
- private java.io.OutputStream _javaOutput;
- private long _len;
- private long _contentLength;
-
- internal VMWRequestStream (java.io.OutputStream stream) :
- this(stream , -1L)
- {
- }
-
- internal VMWRequestStream (java.io.OutputStream stream, long contentLength)
- {
- _javaOutput = stream;
- _contentLength = contentLength;
- _len = 0;
- }
- public override bool CanRead
- {
- get {return false;}
- }
-
- public override bool CanWrite
- {
- get{return true;}
- }
-
- public override bool CanSeek
- {
- get { return false;}
- }
-
- public override long Length
- {
- get{ return _len;}
- }
-
- public override long Position
- {
- get
- {
- return _len;
- }
-
- set
- {
- throw new NotSupportedException();
- }
- }
-
- private volatile bool _closed = false;
-
- public override void Close()
- {
- if(!_closed)
- {
- lock(this)
- {
- if(!_closed)
- {
- try {
- _closed = true;
- _javaOutput.close ();
- }
- catch (Exception e) {
- throw new WebException ("The request was aborted: The request was canceled.",
- e, WebExceptionStatus.RequestCanceled, null);
- }
- }
- }
- }
- }
-
- public override void Flush()
- {
- _javaOutput.flush();
- }
-
- public override int ReadByte()
- {
- throw new NotSupportedException();
- }
-
- public override int Read(byte[] buffer, int offset, int count)
- {
- throw new NotSupportedException();
- }
-
- public override void Write(byte[] buffer, int offset, int count)
- {
- if(_contentLength >= 0)
- {
- _len += count;
- if(_len > _contentLength)
- {
- throw new System.Net.ProtocolViolationException(
- "Bytes to be written to the stream exceed Content-Length bytes size specified.");
- }
- }
- _javaOutput.write(vmw.common.TypeUtils.ToSByteArray(buffer), offset, count);
-
- if(_contentLength == _len)
- {
- _javaOutput.flush();
- _javaOutput.close();
- }
- }
-
- public override long Seek(long offset, SeekOrigin origin)
- {
- throw new NotSupportedException();
- }
-
- public override void SetLength(long length)
- {
- throw new NotSupportedException();
- }
-
- void IDisposable.Dispose()
- {
- Close ();
- }
- }
-
- #endregion
-
- #region GHWebAsyncResult
- internal class GHWebAsyncResult : IAsyncResult
- {
- private object _state;
- private AsyncCallback _callback;
- private ManualResetEvent _handle;
- private bool _isCompleted = false;
- private bool _callbackDone;
- private Stream _writeStream;
- private HttpProvider _provider;
-
- private Exception _exception;
-
- #region Constructors
-
- public GHWebAsyncResult(HttpProvider provider,
- AsyncCallback callback, object state) :
- this(state, callback)
- {
- _provider = provider;
- }
-
- public GHWebAsyncResult(object state, AsyncCallback callback)
- {
- _state = state;
- _callback = callback;
- }
- #endregion
-
- #region IAsyncResult Members
-
- public object AsyncState
- {
- get
- {
- return _state;
- }
- }
-
- public bool CompletedSynchronously
- {
- get
- {
- // TODO: Add HWebAsyncResult.CompletedSynchronously getter implementation
- return false;
- }
- }
-
- public WaitHandle AsyncWaitHandle
- {
- get
- {
- if (_handle == null)
- {
- lock (this)
- {
- if (_handle == null)
- _handle = new ManualResetEvent (_isCompleted);
- }
- }
-
- return _handle;
- }
- }
-
- public bool IsCompleted
- {
- get
- {
- return _isCompleted;
- }
- }
-
- #endregion
-
- #region Internal Properties
-
- internal Stream WriteStream
- {
- get
- {
- return _writeStream;
- }
- }
-
- internal Exception Exception
- {
- get
- {
- return _exception;
- }
- }
-
- internal HttpWebResponse Response
- {
- get
- {
- return ((VMWHttpProvider)_provider)._response;
- }
- }
-
- #endregion
-
- #region Internal Methods
-
- internal void SetCompleted(bool res, Stream writeStream)
- {
- _isCompleted = res;
- _writeStream = writeStream;
- ((ManualResetEvent) AsyncWaitHandle).Set ();
- }
-
- internal void SetCompleted(bool res, Exception exc)
- {
- _isCompleted = res;
- _exception = exc;
- ((ManualResetEvent) AsyncWaitHandle).Set ();
- }
-
- internal void DoCallback()
- {
- if (!_callbackDone && _callback != null)
- {
- _callbackDone = true;
- _callback (this);
- }
- }
-
- internal void WaitUntilComplete()
- {
- if(_isCompleted)
- return;
- AsyncWaitHandle.WaitOne ();
- }
-
- internal bool WaitUntilComplete (int timeout, bool exitContext)
- {
- if (_isCompleted)
- return true;
-
- return AsyncWaitHandle.WaitOne (timeout, exitContext);
- }
- #endregion
-
- }
-
- #endregion
-
- #region OutputStreamRequestEntity
-
- internal class OutputStreamRequestEntity : java.io.OutputStream, RequestEntity
- {
- private long _contentLength;
- private java.io.ByteArrayOutputStream _out;
- private sbyte[] _buffer;
-
- internal OutputStreamRequestEntity(): this(-1)
- {
- }
-
- internal OutputStreamRequestEntity(long length)
- {
- _contentLength = length;
- int tmp = (int) _contentLength;
-
- if(tmp <=0)
- tmp = 4096;
- _out = new java.io.ByteArrayOutputStream(tmp);
- }
-
- #region RequestEntity Members
-
- public bool isRepeatable()
- {
- return ((_out != null) || (_buffer != null));
- }
-
- public long getContentLength()
- {
- if(_out != null)
- {
- _buffer = _out.toByteArray();
- }
- if(_buffer != null)
- {
- _contentLength = _buffer.Length;
- _out = null;
- }
- return _contentLength;
- }
-
- public void writeRequest(java.io.OutputStream output)
- {
- if(_out != null)
- _buffer = _out.toByteArray();
- if(_buffer != null)
- {
- output.write(_buffer, 0, _buffer.Length);
- _out = null;
- }
- else throw new ApplicationException();
- }
-
- public string getContentType()
- {
- return null;
- }
-
- #endregion
-
- public override void write(int i)
- {
- _out.write(i);
- }
-
- public override void close ()
- {
- int size = _out.size ();
- _out.close ();
-
- if (size < _contentLength) {
- throw new IOException ("Cannot close stream until all bytes are written.");
- }
- }
- }
-
- #endregion
-
-
-
-
-
-
-
- }
-
- class HTTPClientCredentialsBridge : CredentialsProvider
- {
- private vmw.@internal.auth.CredentialsProvider m_internalProvider;
-
- public HTTPClientCredentialsBridge (vmw.@internal.auth.CredentialsProvider internalProvider) {
- m_internalProvider = internalProvider;
- }
-
- public Credentials getCredentials (AuthScheme scheme, string __p2, int __p3, bool __p4) {
- if (scheme.isComplete ())
- return null;
- GSSCredential creds = m_internalProvider.getCredentials ();
- return new DelegatedCredentials (creds);
- }
- }
-}
diff --git a/mcs/class/System/System.Net/WebClient.cs b/mcs/class/System/System.Net/WebClient.cs
index 97f9759dcc3..ded7767114a 100644
--- a/mcs/class/System/System.Net/WebClient.cs
+++ b/mcs/class/System/System.Net/WebClient.cs
@@ -408,7 +408,7 @@ namespace System.Net
SetBusy ();
async = false;
WebRequest request = SetupRequest (address, method, true);
- return request.GetRequestStream ();
+ return OpenWriteStream (request);
} catch (WebException) {
throw;
} catch (Exception ex) {
@@ -419,6 +419,15 @@ namespace System.Net
}
}
+ Stream OpenWriteStream (WebRequest request)
+ {
+ var stream = request.GetRequestStream ();
+ var wcs = stream as WebConnectionStream;
+ if (wcs != null)
+ wcs.GetResponseOnClose = true;
+ return stream;
+ }
+
private string DetermineMethod (Uri address, string method, bool is_upload)
{
if (method != null)
@@ -1268,7 +1277,7 @@ namespace System.Net
WebRequest request = null;
try {
request = SetupRequest ((Uri) args [0], (string) args [1], true);
- Stream stream = request.GetRequestStream ();
+ var stream = OpenWriteStream (request);
OnOpenWriteCompleted (
new OpenWriteCompletedEventArgs (stream, null, false, args [2]));
} catch (ThreadInterruptedException){
@@ -1841,8 +1850,12 @@ namespace System.Net
try {
SetBusy ();
cts = new CancellationTokenSource ();
- request = SetupRequest (address);
- return await request.GetRequestStreamAsync ().ConfigureAwait (false);
+ request = await SetupRequestAsync (address, method, true).ConfigureAwait (false);
+ var stream = await request.GetRequestStreamAsync ();
+ var wcs = stream as WebConnectionStream;
+ if (wcs != null)
+ wcs.GetResponseOnClose = true;
+ return stream;
} catch (WebException) {
throw;
} catch (OperationCanceledException) {
@@ -2183,6 +2196,12 @@ namespace System.Net
if (data == null)
throw new ArgumentNullException ("data");
+ string cType = Headers ["Content-Type"];
+ if (cType != null && String.Compare (cType, urlEncodedCType, true) != 0)
+ throw new WebException ("Content-Type header cannot be changed from its default " +
+ "value for this request.");
+ Headers ["Content-Type"] = urlEncodedCType;
+
WebRequest request = null;
try {
SetBusy ();
@@ -2209,14 +2228,8 @@ namespace System.Net
CancellationToken token)
{
token.ThrowIfCancellationRequested ();
- string cType = Headers ["Content-Type"];
- if (cType != null && String.Compare (cType, urlEncodedCType, true) != 0)
- throw new WebException ("Content-Type header cannot be changed from its default " +
- "value for this request.");
WebResponse response = null;
-
- Headers ["Content-Type"] = urlEncodedCType;
try {
MemoryStream tmpStream = new MemoryStream ();
foreach (string key in data) {
diff --git a/mcs/class/System/System.Net/WebConnection.cs b/mcs/class/System/System.Net/WebConnection.cs
index 0f35c49b3e4..d54c0cab147 100644
--- a/mcs/class/System/System.Net/WebConnection.cs
+++ b/mcs/class/System/System.Net/WebConnection.cs
@@ -490,11 +490,7 @@ namespace System.Net
if (e == null) { // At least we now where it comes from
try {
-#if TARGET_JVM
- throw new Exception ();
-#else
throw new Exception (new System.Diagnostics.StackTrace ().ToString ());
-#endif
} catch (Exception e2) {
e = e2;
}
diff --git a/mcs/class/System/System.Net/WebConnectionStream.cs b/mcs/class/System/System.Net/WebConnectionStream.cs
index b946654f329..8ef558d72fd 100644
--- a/mcs/class/System/System.Net/WebConnectionStream.cs
+++ b/mcs/class/System/System.Net/WebConnectionStream.cs
@@ -755,8 +755,22 @@ namespace System.Net
disposed = true;
}
+ internal bool GetResponseOnClose {
+ get; set;
+ }
+
public override void Close ()
{
+ if (GetResponseOnClose) {
+ if (disposed)
+ return;
+ disposed = true;
+ var response = (HttpWebResponse)request.GetResponse ();
+ response.ReadAll ();
+ response.Close ();
+ return;
+ }
+
if (sendChunked) {
if (disposed)
return;
diff --git a/mcs/class/System/System.Net/WebException.cs b/mcs/class/System/System.Net/WebException.cs
index a6a82590de3..e6b3c161444 100644
--- a/mcs/class/System/System.Net/WebException.cs
+++ b/mcs/class/System/System.Net/WebException.cs
@@ -88,12 +88,10 @@ namespace System.Net
}
// Methods
-#if !TARGET_JVM
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
{
base.GetObjectData (info, context);
}
-#endif
public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
diff --git a/mcs/class/System/System.Net/WebHeaderCollection.cs b/mcs/class/System/System.Net/WebHeaderCollection.cs
index a2516b0cc39..ae72774bdf1 100644
--- a/mcs/class/System/System.Net/WebHeaderCollection.cs
+++ b/mcs/class/System/System.Net/WebHeaderCollection.cs
@@ -340,13 +340,11 @@ namespace System.Net
return sb.Append("\r\n").ToString();
}
-#if !TARGET_JVM
void ISerializable.GetObjectData (SerializationInfo serializationInfo,
StreamingContext streamingContext)
{
GetObjectData (serializationInfo, streamingContext);
}
-#endif
public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
{
int count = base.Count;
diff --git a/mcs/class/System/System.Net/WebResponse.cs b/mcs/class/System/System.Net/WebResponse.cs
index 9b9fab50815..bf0b79eec1b 100644
--- a/mcs/class/System/System.Net/WebResponse.cs
+++ b/mcs/class/System/System.Net/WebResponse.cs
@@ -106,9 +106,7 @@ namespace System.Net
{
throw new NotSupportedException ();
}
-#if TARGET_JVM //enable overrides for extenders
- public virtual void Dispose()
-#elif NET_4_0
+#if NET_4_0
public void Dispose ()
#else
void IDisposable.Dispose()
diff --git a/mcs/class/System/System.Text.RegularExpressions/.gitattributes b/mcs/class/System/System.Text.RegularExpressions/.gitattributes
index a2e89651115..74f27084bec 100644
--- a/mcs/class/System/System.Text.RegularExpressions/.gitattributes
+++ b/mcs/class/System/System.Text.RegularExpressions/.gitattributes
@@ -1,6 +1,4 @@
/BaseMachine.cs -crlf
-/LookBehindWithUndefinedLength.jvm.cs -crlf
-/NotAllowedConstruct.jvm.cs -crlf
/RegexRunnerFactory.cs -crlf
/cache.cs -crlf
/category.cs -crlf
diff --git a/mcs/class/System/System.Text.RegularExpressions/BackReferenceConstruct.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/BackReferenceConstruct.jvm.cs
deleted file mode 100644
index 4718731a707..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/BackReferenceConstruct.jvm.cs
+++ /dev/null
@@ -1,146 +0,0 @@
-//
-// BackReferenceConstruct.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class BackReferenceConstruct : IConstructType
- {
- private const string NUMBER_BACK_REFERENCE_PATTERN = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823})\\(\d+)";
- private const string NAME_1_BACK_REFERENCE_PATTERN = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823})\\k<(\w+)>";
- private const string NAME_2_BACK_REFERENCE_PATTERN = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823})\\k'(\w+)'";
- private const string NUMBER = @"\d+";
-
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- if (JavaUtils.IsMatch (pattern, NUMBER_BACK_REFERENCE_PATTERN)) {
- return true;
- }
-
- if (JavaUtils.IsMatch (pattern, NAME_1_BACK_REFERENCE_PATTERN)) {
- return true;
- }
-
- return JavaUtils.IsMatch (pattern, NAME_2_BACK_REFERENCE_PATTERN);
- }
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- if (!HasConstruct (reformattedPattern, options)) {
- return reformattedPattern;
- }
-
- if (patternGrouping.GroupCount >= 0 && patternGrouping.SameGroupsFlag) {
- return null;
- }
-
- Matcher m = JavaUtils.Matcher (reformattedPattern, NUMBER_BACK_REFERENCE_PATTERN);
- if (m.find ()) {
- reformattedPattern = ReplaceGroupNumber (m, reformattedPattern, patternGrouping, options);
- if (reformattedPattern == null)
- return null;
- }
-
- m = JavaUtils.Matcher(reformattedPattern, NAME_1_BACK_REFERENCE_PATTERN);
- if (m.find ()) {
- reformattedPattern = ReplaceGroupName (m, reformattedPattern, patternGrouping, options);
- if (reformattedPattern == null)
- return null;
- }
-
- m = JavaUtils.Matcher(reformattedPattern, NAME_2_BACK_REFERENCE_PATTERN);
- if (m.find ()) {
- reformattedPattern = ReplaceGroupName (m, reformattedPattern, patternGrouping, options);
- if (reformattedPattern == null)
- return null;
- }
-
- return reformattedPattern;
- }
-
- private string ReplaceGroupNumber (Matcher match,
- string reformattedPattern,
- PatternGrouping patternGrouping,
- RegexOptions options) {
- int groupNumber = int.Parse (match.group (1));
- int javaGroupNumber = groupNumber;
- int groupCount = patternGrouping.GroupCount;
-
- if (groupCount == -1) {
- if ((options & RegexOptions.ExplicitCapture) == RegexOptions.ExplicitCapture) {
- groupCount = 0;
- }
- else {
- groupCount = JavaUtils.GroupCount (reformattedPattern);
- }
- }
- else {
- javaGroupNumber = patternGrouping.NetToJavaNumbersMap [groupNumber];
- }
-
- if (groupNumber > groupCount) {
- return null;
- }
-
- return match.replaceFirst (@"\\" + javaGroupNumber);
- }
-
- private string ReplaceGroupName (Matcher match,
- string reformattedPattern,
- PatternGrouping patternGrouping,
- RegexOptions options) {
-
- if (patternGrouping.GroupCount == -1){
- return null;
- }
-
- string groupName = match.group (1);
- Pattern p = Pattern.compile (NUMBER);
- Matcher m = p.matcher ((CharSequence) (object) groupName);
- if (m.matches ()) {
- return ReplaceGroupNumber (match, reformattedPattern, patternGrouping, options);
- }
-
- if (!patternGrouping.GroupNameToNumberMap.Contains (groupName)) {
- return null;
- }
-
- int javaGroupNumber = patternGrouping.NetToJavaNumbersMap [(int) patternGrouping.GroupNameToNumberMap [groupName]];
- return match.replaceFirst (@"\\" + javaGroupNumber);
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs b/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs
index d6104cc6607..6f588775b49 100644
--- a/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/BaseMachine.cs
@@ -89,14 +89,16 @@ namespace System.Text.RegularExpressions
if (!regex.RightToLeft && ptr <= input.Length)
splits.Add (input.Substring (ptr));
- return splits.ToArray ();
+ return splits.ToArray ();
}
- virtual public Match Scan (Regex regex, string text, int start, int end)
+ public Match Scan (Regex regex, string text, int start, int end)
{
- throw new NotImplementedException ("Scan method must be implemented in derived classes");
+ return Scan (regex, text, start, end, false);
}
+ public abstract Match Scan (Regex regex, string text, int start, int end, bool substring_mode);
+
virtual public string Result (string replacement, Match match)
{
return ReplacementEvaluator.Evaluate (replacement, match);
diff --git a/mcs/class/System/System.Text.RegularExpressions/CommentsConstruct.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/CommentsConstruct.jvm.cs
deleted file mode 100644
index bed41d0b5d4..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/CommentsConstruct.jvm.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-//
-// CommentsConstruct.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class CommentsConstruct : IConstructType
- {
- private const string INLINE_COMMENT_PATTERN = @"\(\?#[^\)]*\)";
- private const string COMMENT_PATTERN = @"\#[^\n\r]*";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- if (JavaUtils.IsMatch (pattern, INLINE_COMMENT_PATTERN))
- return true;
-
- if ((options & RegexOptions.IgnorePatternWhitespace) == 0)
- return false;
-
- return JavaUtils.IsMatch (pattern, COMMENT_PATTERN);
- }
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
-
- reformattedPattern = JavaUtils.ReplaceAll (reformattedPattern, INLINE_COMMENT_PATTERN, String.Empty);
-
- if ((options & RegexOptions.IgnorePatternWhitespace) == 0)
- return reformattedPattern;
-
- reformattedPattern = JavaUtils.ReplaceAll (reformattedPattern, COMMENT_PATTERN, String.Empty);
-
- return reformattedPattern;
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/Group.cs b/mcs/class/System/System.Text.RegularExpressions/Group.cs
index cdc1cb683c8..ca7c74a1edd 100644
--- a/mcs/class/System/System.Text.RegularExpressions/Group.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/Group.cs
@@ -41,11 +41,9 @@ namespace System.Text.RegularExpressions {
}
internal static Group Fail = new Group ();
-#if !TARGET_JVM
public CaptureCollection Captures {
get { return captures; }
}
-#endif
public bool Success {
get { return success; }
}
diff --git a/mcs/class/System/System.Text.RegularExpressions/InlineExplicitCaptureConstruct.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/InlineExplicitCaptureConstruct.jvm.cs
deleted file mode 100644
index 779a124bc72..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/InlineExplicitCaptureConstruct.jvm.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// InlineExplicitCaptureConstruct.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class InlineExplicitCaptureConstruct : IConstructType
- {
- private const string DEFINITION = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823}\()\?[imsx]*n[-imsx]*:[^\)]+\)";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- return JavaUtils.IsMatch (pattern, DEFINITION);
- }
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- throw new NotImplementedException("Reformat for inline explicit capture construct is not implemented.");
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/JavaUtils.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/JavaUtils.jvm.cs
deleted file mode 100644
index 2e5b653560b..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/JavaUtils.jvm.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-//
-// JavaUtils.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class JavaUtils
- {
- private const string ASTERISK_PATTERN = @"\*";
- private static readonly Pattern _asteriskPattern = Pattern.compile (ASTERISK_PATTERN);
-
- internal static bool IsMatch (string input, string pattern) {
- Pattern p = Pattern.compile (pattern);
- Matcher m = p.matcher ((CharSequence) (object) input);
-
- return m.find ();
- }
-
- internal static Matcher Matcher (string input, string pattern) {
- Pattern p = Pattern.compile (pattern);
- return p.matcher ((CharSequence) (object) input);
- }
-
- internal static string ReplaceAll (string input, string pattern, string replacement) {
- Pattern p = Pattern.compile (pattern);
- Matcher m = p.matcher ((CharSequence) (object) input);
- return m.replaceAll (replacement);
- }
-
- internal static string ReplaceAllAdvanced (string input, string pattern, string replacement) {
- Matcher m = _asteriskPattern.matcher ((CharSequence) (object) pattern);
- string readyPattern = m.replaceAll ("{0," + pattern.Length + "}");
-
- return ReplaceAll (input, readyPattern, replacement);
- }
-
- internal static int GroupCount (string pattern) {
- Pattern javaPattern = Pattern.compile (pattern);
- Matcher emptyMatcher = javaPattern.matcher ((CharSequence) (object) String.Empty);
- return emptyMatcher.groupCount ();
- }
-
- internal static string ReplaceWithLookBehind (string input, string pattern, string lookBehindPattern, string replacement) {
- Pattern p = Pattern.compile (pattern);
- Pattern behindPattern = Pattern.compile (lookBehindPattern);
-
- Matcher m = p.matcher ((CharSequence) (object) input);
- StringBuffer sb = new StringBuffer ();
-
- while (m.find ()) {
- Matcher pm = behindPattern.matcher ((CharSequence) (object) input.Substring (0, m.start()));
- if(pm.find())
- m.appendReplacement(sb, replacement);
- }
-
- m.appendTail (sb);
- return sb.ToString();
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/JvmReMachine.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/JvmReMachine.jvm.cs
deleted file mode 100644
index ac7df075c02..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/JvmReMachine.jvm.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-//
-// JvmReMachine.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Collections;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class JvmReMachine : BaseMachine
- {
- readonly PatternData _patternData;
-
- internal JvmReMachine (PatternData patternData) {
- this._patternData = patternData;
- }
-
- #region Properties
-
- internal PatternData PatternData {
- get { return _patternData; }
- }
-
- internal Pattern JavaPattern {
- get { return _patternData.JavaPattern; }
- }
-
- internal IDictionary Mapping {
- get { return _patternData.GroupNameToNumberMap; }
- set { throw new NotImplementedException ("Mapping setter of JvmReMachine should not be called."); }//We must implement the setter of interface but it is not in use
- }
-
- internal string [] NamesMapping {
- get { return _patternData.GroupNumberToNameMap; }
- set { throw new NotImplementedException ("NamesMapping setter of JvmReMachine should not be called."); }//We must implement the setter of interface but it is not in use
- }
-
- internal int GroupCount {
- get { return _patternData.GroupCount; }
- }
-
- #endregion Properties
-
- #region Implementations of IMachine Interface
-
- public override Match Scan (Regex regex, string text, int start, int end) {
-
- if (start > end)
- return Match.Empty;
-
- Matcher m = JavaPattern.matcher (((CharSequence) (object) text).subSequence(0, end));
-
- if (!m.find (start)) {
- return System.Text.RegularExpressions.Match.Empty;
- }
-
- GroupCollection groups = new GroupCollection (regex.GroupCount + 1);
- Match match = new Match (regex, this, groups, text, text.Length,
- m.start (), m.end () - m.start ());
- for (int javaGroupNumber = 1; javaGroupNumber <= m.groupCount (); ++javaGroupNumber) {
- AddGroup (m, groups, javaGroupNumber, text, match);
- }
-
- return match;
- }
-
- public override string [] Split (Regex regex, string input, int count, int startat) {
-
- string [] splitArray = JavaPattern.split ((CharSequence) (object) input.Substring (startat), count);
-
- if (regex.GroupCount == 0 || splitArray.Length == 1) {
- return splitArray;
- }
-
- if (count == 0)
- count = Int32.MaxValue;
-
- Matcher m = JavaPattern.matcher ((CharSequence) (object) input.Substring (startat));
-
- int splitArrayIndex = 1;
-
- List<string> splits = new List<string> (splitArray.Length * (1 + regex.GroupCount));
- splits.Add (splitArray [0]);
-
- for (int number = 0; number < count; ++number) {
-
- if (!m.find ())
- break;
-
- for (int i = 1; i <= m.groupCount (); ++i) {
- splits.Add (m.group (i));
- }
-
- splits.Add (splitArray [splitArrayIndex++]);
- }
-
- return splits.ToArray ();
- }
-
- public override string Replace (Regex regex, string input, string replacement, int count, int startat) {
-
- if (regex.SameGroupNamesFlag) {
- return base.Replace (regex, input, replacement, count, startat);
- }
-
- if (count < 0) {
- count = Int32.MaxValue;
- }
-
- string replacementPattern = ReplacementData.Reformat (regex, replacement);
- Matcher m = JavaPattern.matcher ((CharSequence) (object) input);
-
- StringBuffer sb = new StringBuffer ();
- if (count > 0 && m.find (startat)) {
- ReplacementData.ReplaceMatch (replacementPattern, m, sb, input, _patternData);
- }
-
- for (int matchesCounter = 1; matchesCounter < count; ++matchesCounter) {
- if (!m.find ()) {
- break;
- }
- ReplacementData.ReplaceMatch (replacementPattern, m, sb, input, _patternData);
- }
-
-
- m.appendTail (sb);
- return sb.ToString ();
-
- }
-
- public override string Result (string replacement, Match match) {
- if (match.Length == 0)
- return String.Empty;
-
- string result = Replace (match.Regex, match.Text, replacement, 1, 0);
- return result.Substring (match.Index, result.Length - (match.Text.Length - match.Length));
-
- }
-
- #endregion Implementations of IMachine Interface
-
- private void AddGroup (Matcher m, GroupCollection groups, int javaGroupNumber, string text, Match match) {
- int netGroupNumber = _patternData.JavaToNetGroupNumbersMap [javaGroupNumber];
- if (netGroupNumber == -1) {
- return;
- }
-
- int index = m.start (javaGroupNumber);
-
- if (index < 0){
- if(groups[netGroupNumber] == null)
- groups.SetValue (new Group (), netGroupNumber);
- return;
- }
-
- Group group = new Group (text, index, m.end (javaGroupNumber) - index, match, netGroupNumber);
-
- groups.SetValue (group, netGroupNumber);
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/LookBehindWithUndefinedLength.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/LookBehindWithUndefinedLength.jvm.cs
deleted file mode 100644
index 0c69f5ea260..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/LookBehindWithUndefinedLength.jvm.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class LookBehindWithUndefinedLength : IConstructType
- {
- //private const string DEFINITION = @"\(\?<[=!].*(?:[\*\+]|\{\d+,\}).*\)";
- private const string DEFINITION = @"\(\?<[=!][^\)]*\)";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- return JavaUtils.IsMatch (pattern, DEFINITION);
- }
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- throw new NotImplementedException ("Reformat for look ahead with undefined length construct is not implemented.");
- }
- }
-}
diff --git a/mcs/class/System/System.Text.RegularExpressions/Match.cs b/mcs/class/System/System.Text.RegularExpressions/Match.cs
index d23358ccb30..e5a232ab90c 100644
--- a/mcs/class/System/System.Text.RegularExpressions/Match.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/Match.cs
@@ -91,7 +91,6 @@ namespace System.Text.RegularExpressions {
this.machine = machine;
this.text_length = text_length;
}
-#if !TARGET_JVM
internal Match (Regex regex, IMachine machine, string text, int text_length, int n_groups,
int index, int length, int n_caps) :
base (text, index, length, n_caps)
@@ -103,7 +102,6 @@ namespace System.Text.RegularExpressions {
this.groups = new GroupCollection (n_groups, regex.Gap);
groups.SetValue (this, 0);
}
-#endif
internal Regex Regex {
get { return regex; }
}
diff --git a/mcs/class/System/System.Text.RegularExpressions/Match.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/Match.jvm.cs
deleted file mode 100644
index 0065341e1bf..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/Match.jvm.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-//
-// Match.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
-
- public partial class Match : Group
- {
- #region Fields
-
- GroupCollection _monoGroups;
- readonly object _monoGroupsLock = new object ();
-
- #endregion Fields
-
- #region Ctors
-
- internal Match (Regex regex, IMachine machine, string text, int text_length, int n_groups,
- int index, int length, int n_caps)
- : this (regex, machine, new GroupCollection (n_groups), text,
- text_length, index, length, n_caps) { }
-
- internal Match (Regex regex, IMachine machine,
- GroupCollection groups,
- string text, int text_length,
- int index, int length)
- : this (regex, machine, groups, text, text_length, index, length, 1) { }
-
- private Match (Regex regex, IMachine machine,
- GroupCollection groups,
- string text, int text_length,
- int index, int length, int n_caps)
- : base (text, index, length, n_caps) {
- this.regex = regex;
- this.machine = machine;
- this.text_length = text_length;
-
- this.groups = groups;
- groups.SetValue (this, 0);
- }
-
- #endregion Ctors
-
- #region Properties
- private GroupCollection MonoGroups {
- get {
- lock (_monoGroupsLock) {
- if (_monoGroups != null)
- return _monoGroups;
-
- Match monoMatch = regex.GetMonoMachine ().Scan (regex, text, index, index + length);
- _monoGroups = monoMatch.Groups;
- }
-
- return _monoGroups;
- }
- }
-
- #endregion Properties
-
- internal void FillMonoCaptures (Group group) {
- group.Captures = MonoGroups [group.GroupNumber].Captures;
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/NamingGroupsConstruct.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/NamingGroupsConstruct.jvm.cs
deleted file mode 100644
index ef8cddc4d1c..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/NamingGroupsConstruct.jvm.cs
+++ /dev/null
@@ -1,197 +0,0 @@
-//
-// NamingGroupsConstruct.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class NamingGroupsConstruct : IConstructType
- {
- private const string NAMED_GROUP_PATTERN_1 = @"\(\?<[A-Za-z]\w*>.*\)";
- private const string NAMED_GROUP_PATTERN_2 = @"\(\?'[A-Za-z]\w*'.*\)";
- private const string NUMBERED_GROUP_PATTERN_1 = @"\(\?<\d+>.*\)";
- private const string NUMBERED_GROUP_PATTERN_2 = @"\(\?'\d+'.*\)";
- private const string LEFT_PAREN = @"\(";
- private const string ESCAPED_LEFT_PAREN_TEMPL = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823})\\\(";
- private const string NON_CAPTURED_GROUP_PATTERN = @"(?:^\?[:imnsx=!>-]|^\?<[!=])";
- private const string NAMED_GROUP_PATTERN1 = @"^\?<([A-Za-z]\w*)>";
- private const string NAMED_GROUP_PATTERN2 = @"^\?'([A-Za-z]\w*)'";
- private const string NUMBERED_GROUP_PATTERN1 = @"^\?<(\d+)>";
- private const string NUMBERED_GROUP_PATTERN2 = @"^\?'(\d+)'";
- private const string QUESTION = "?";
- private const string REMOVED_NAME_PATTERN_TEMPL1 = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823}\()\?<[A-Za-z]\w*>";
- private const string REMOVED_NAME_PATTERN_TEMPL2 = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823}\()\?'[A-Za-z]\w*'";
- private const string REMOVED_NUMBERED_PATTERN_TEMPL1 = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823}\()\?<\d+>";
- private const string REMOVED_NUMBERED_PATTERN_TEMPL2 = @"(?<=(?:[^\\]|\A)(?:[\\]{2}){0,1073741823}\()\?'\d+'";
-
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- if (JavaUtils.IsMatch (pattern, NAMED_GROUP_PATTERN_1)) {
- return true;
- }
- if (JavaUtils.IsMatch (pattern, NAMED_GROUP_PATTERN_2)) {
- return true;
- }
- if (JavaUtils.IsMatch (pattern, NUMBERED_GROUP_PATTERN_1)) {
- return true;
- }
- if (JavaUtils.IsMatch (pattern, NUMBERED_GROUP_PATTERN_2)) {
- return true;
- }
- return false;
- }
-
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- if (!HasConstruct (reformattedPattern, options)) {
- return reformattedPattern;
- }
-
- UpdateGroupMapping (reformattedPattern, options, patternGrouping);
-
- return ReformatPattern (reformattedPattern);
- }
-
- private static string ReformatPattern (string reformattedPattern) {
- //Reformat pattern
- reformattedPattern = JavaUtils.ReplaceAll (reformattedPattern, REMOVED_NAME_PATTERN_TEMPL1, String.Empty);
- reformattedPattern = JavaUtils.ReplaceAll (reformattedPattern, REMOVED_NAME_PATTERN_TEMPL2, String.Empty);
- reformattedPattern = JavaUtils.ReplaceAll (reformattedPattern, REMOVED_NUMBERED_PATTERN_TEMPL1, String.Empty);
- reformattedPattern = JavaUtils.ReplaceAll (reformattedPattern, REMOVED_NUMBERED_PATTERN_TEMPL2, String.Empty);
-
- return reformattedPattern;
- }
-
- private static void UpdateGroupMapping (string reformattedPattern,
- RegexOptions options,
- PatternGrouping patternGrouping) {
-
- CharSequence workString = (CharSequence) (object) JavaUtils.ReplaceAll (reformattedPattern, ESCAPED_LEFT_PAREN_TEMPL, String.Empty);
-
- //Split pattern by left parenthesis
- Pattern p = Pattern.compile (LEFT_PAREN);
- string [] parts = p.split (workString);
-
- Pattern nonCapturedGroupPattern = Pattern.compile (NON_CAPTURED_GROUP_PATTERN);
- Pattern groupNamePattern1 = Pattern.compile (NAMED_GROUP_PATTERN1);
- Pattern groupNamePattern2 = Pattern.compile (NAMED_GROUP_PATTERN2);
- Pattern groupNumPattern1 = Pattern.compile (NUMBERED_GROUP_PATTERN1);
- Pattern groupNumPattern2 = Pattern.compile (NUMBERED_GROUP_PATTERN2);
-
- int enoughLength = parts.Length;
- string [] namedGroups = new string [enoughLength];
- int [] javaGroupNumberToNetGroupNumber = new int [enoughLength];
- int capturedGroupsCount = 0;
- int namedGroupsCount = 0;
- int nonamedGroupsCount = 0;
- int sameGroupsCounter = 0;
-
- //Scan of groups
- for (int i = 1; i < parts.Length; ++i) {
- //nonamed group
- if (parts [i].StartsWith (QUESTION) == false) {
- javaGroupNumberToNetGroupNumber [++capturedGroupsCount] = ++nonamedGroupsCount;
- continue;
- }
-
- //Skip non captured groups
- Matcher partMatcher =
- nonCapturedGroupPattern.matcher ((CharSequence) (object) parts [i]);
- if (partMatcher.find ()) {
- continue;
- }
-
- //Find named groups by 2 patterns
- partMatcher = groupNamePattern1.matcher ((CharSequence) (object) parts [i]);
- if (partMatcher.find ()) {
- namedGroups [namedGroupsCount++] = partMatcher.group (1);
- javaGroupNumberToNetGroupNumber [++capturedGroupsCount] = -1;
- continue;
- }
- partMatcher = groupNamePattern2.matcher ((CharSequence) (object) parts [i]);
- if (partMatcher.find ()) {
- namedGroups [namedGroupsCount++] = partMatcher.group (1);
- javaGroupNumberToNetGroupNumber [++capturedGroupsCount] = -1;
- continue;
- }
-
- //Find explicitly numbered groups by 2 patterns
- partMatcher = groupNumPattern1.matcher ((CharSequence) (object) parts [i]);
- if (partMatcher.find ()) {
- int netGroupNumber = int.Parse (partMatcher.group (1));
- if ((options & RegexOptions.ExplicitCapture) == RegexOptions.ExplicitCapture) {
- namedGroups [namedGroupsCount++] = partMatcher.group (1);
- javaGroupNumberToNetGroupNumber [++capturedGroupsCount] = -1;
- }
- else {
- javaGroupNumberToNetGroupNumber [++capturedGroupsCount] = netGroupNumber;
- if (javaGroupNumberToNetGroupNumber [capturedGroupsCount] != netGroupNumber) {
- ++sameGroupsCounter;
- }
- }
- continue;
- }
- partMatcher = groupNumPattern2.matcher ((CharSequence) (object) parts [i]);
- if (partMatcher.find ()) {
- int netGroupNumber = int.Parse (partMatcher.group (1));
- if ((options & RegexOptions.ExplicitCapture) == RegexOptions.ExplicitCapture) {
- namedGroups [namedGroupsCount++] = partMatcher.group (1);
- javaGroupNumberToNetGroupNumber [++capturedGroupsCount] = -1;
- }
- else {
- javaGroupNumberToNetGroupNumber [++capturedGroupsCount] = netGroupNumber;
- if (javaGroupNumberToNetGroupNumber [capturedGroupsCount] != netGroupNumber) {
- ++sameGroupsCounter;
- }
- }
- continue;
- }
- }
-
- //Filling grouping
- patternGrouping.SetGroups (namedGroups,
- javaGroupNumberToNetGroupNumber,
- nonamedGroupsCount,
- capturedGroupsCount,
- sameGroupsCounter,
- options);
-
- return;
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/NotAllowedConstruct.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/NotAllowedConstruct.jvm.cs
deleted file mode 100644
index 53c96abcadf..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/NotAllowedConstruct.jvm.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class NotAllowedConstruct : IConstructType
- {
- private const string DEFINITION = @"(\A|((\A|[^\\])([\\]{2})*\((\?([:>=!]|<([=!]|(\w+>))))?))\{\d+(,(\d+)?)?\}";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- return JavaUtils.IsMatch (pattern, DEFINITION);
- }
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- throw new NotImplementedException ("Reformat for not allowed constructs is not implemented.");
- }
- }
-}
diff --git a/mcs/class/System/System.Text.RegularExpressions/PatternData.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/PatternData.jvm.cs
deleted file mode 100644
index 519c925701e..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/PatternData.jvm.cs
+++ /dev/null
@@ -1,134 +0,0 @@
-//
-// PatternData.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
-
- sealed class PatternData
- {
- readonly Pattern _javaPattern;
- readonly PatternGrouping _patternGrouping;
-
- #region Properties
-
- internal int [] NetToJavaNumbersMap {
- get { return _patternGrouping.NetToJavaNumbersMap; }
- }
-
- internal IDictionary GroupNameToNumberMap {
- get { return _patternGrouping.GroupNameToNumberMap; }
- }
-
- internal string [] GroupNumberToNameMap {
- get { return _patternGrouping.GroupNumberToNameMap; }
- }
-
- internal int [] JavaToNetGroupNumbersMap {
- get { return _patternGrouping.JavaToNetGroupNumbersMap; }
- }
-
- internal int GroupCount {
- get { return _patternGrouping.GroupCount; }
- }
-
- internal Pattern JavaPattern {
- get { return _javaPattern; }
- }
-
- internal bool SameGroupsFlag {
- get { return _patternGrouping.SameGroupsFlag; }
- }
-
- #endregion Properties
-
- #region Ctors
-
- internal PatternData (
- RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
-
- this._patternGrouping = patternGrouping;
-
- _javaPattern = Pattern.compile (reformattedPattern, GetJavaFlags (options));
-
- FillGroups (options);
- }
-
-
- #endregion Ctors
-
- #region Private methods
-
- private void FillGroups (RegexOptions options) {
- if (_patternGrouping.GroupCount >= 0) {
- return;
- }
-
- Matcher m = JavaPattern.matcher ((CharSequence) (object) String.Empty);
-
- if ((options & RegexOptions.ExplicitCapture) == RegexOptions.ExplicitCapture) {
- _patternGrouping.SetGroups (0, m.groupCount());
- }
- else {
- _patternGrouping.SetGroups (m.groupCount(), m.groupCount ());
- }
- }
-
- private int GetJavaFlags (RegexOptions options) {
- int flags = Pattern.UNIX_LINES; // .NET treats only the "\n" character as newline, UNIX_LINES implies the same behavior in Java.
-
- if ((options & RegexOptions.IgnoreCase) == RegexOptions.IgnoreCase) {
- flags |= Pattern.CASE_INSENSITIVE;
- }
- if ((options & RegexOptions.Multiline) == RegexOptions.Multiline) {
- flags |= Pattern.MULTILINE;
- }
- if ((options & RegexOptions.Singleline) == RegexOptions.Singleline) {
- flags |= Pattern.DOTALL;
- }
- if ((options & RegexOptions.IgnorePatternWhitespace) == RegexOptions.IgnorePatternWhitespace) {
- flags |= Pattern.COMMENTS;
- }
- return flags;
- }
-
- #endregion Private methods
- }
-}
diff --git a/mcs/class/System/System.Text.RegularExpressions/PatternDataBuilder.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/PatternDataBuilder.jvm.cs
deleted file mode 100644
index 70a833f4be2..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/PatternDataBuilder.jvm.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-//
-// PatternDataBuilder.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
-
-namespace System.Text.RegularExpressions
-{
- sealed class PatternDataBuilder
- {
- private static readonly List<IConstructType> _monoConstructTypesList = new List<IConstructType>();
- private static readonly List<IConstructType> _jvmOrderedConstructTypesList = new List<IConstructType> ();
-
- static PatternDataBuilder () {
- FillMonoConstructTypesList ();
- FillJvmOrderedConstructTypesList ();
- }
-
- internal static PatternData GetPatternData (string pattern, RegexOptions options) {
-
- foreach (IConstructType construct in _monoConstructTypesList) {
- if (construct.HasConstruct (pattern, options)) {
- return null;
- }
- }
-
- PatternGrouping patternGrouping = new PatternGrouping ();
- string reformattedPattern = pattern;
-
- foreach (IConstructType construct in _jvmOrderedConstructTypesList) {
-
- reformattedPattern = construct.Reformat (options, reformattedPattern, patternGrouping);
-
- if (reformattedPattern == null)
- return null;
- }
-
- return new PatternData (options, reformattedPattern, patternGrouping);
- }
-
- private static void FillMonoConstructTypesList () {
- _monoConstructTypesList.Add (new CategoryConstruct ());
- _monoConstructTypesList.Add (new BalancingGroupConstruct ());
- _monoConstructTypesList.Add (new AlternationBackReferenceConstruct ());
- _monoConstructTypesList.Add (new AlternationExpressionConstruct ());
- _monoConstructTypesList.Add (new RightToLeftOptionConstruct ());
- _monoConstructTypesList.Add (new InlineExplicitCaptureConstruct ());
- _monoConstructTypesList.Add (new LookBehindWithUndefinedLength ());
- _monoConstructTypesList.Add (new NotAllowedConstruct ());
- }
-
- private static void FillJvmOrderedConstructTypesList () {
-
- //The order is meaningful
- _jvmOrderedConstructTypesList.Add (new CommentsConstruct ());
- _jvmOrderedConstructTypesList.Add (new NamingGroupsConstruct ());
- _jvmOrderedConstructTypesList.Add (new ReplacedRegularCharacterConstruct ());
- _jvmOrderedConstructTypesList.Add (new BackReferenceConstruct ());
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/PatternGrouping.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/PatternGrouping.jvm.cs
deleted file mode 100644
index 9684ac277d9..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/PatternGrouping.jvm.cs
+++ /dev/null
@@ -1,196 +0,0 @@
-//
-// PatternGrouping.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Collections;
-
-namespace System.Text.RegularExpressions
-{
- sealed class PatternGrouping
- {
- int _groupCount;
- IDictionary _groupNameToNumberMap;
- int [] _javaToNetGroupNumbersMap;
- string [] _groupNumberToNameMap;
- int [] _netToJavaNumbersMap;
- bool _sameGroupsFlag;
-
- internal string [] GroupNumberToNameMap {
- get { return _groupNumberToNameMap; }
- }
-
- internal int [] JavaToNetGroupNumbersMap {
- get { return _javaToNetGroupNumbersMap; }
- }
-
- internal IDictionary GroupNameToNumberMap {
- get { return _groupNameToNumberMap; }
- }
-
- internal int [] NetToJavaNumbersMap {
- get { return _netToJavaNumbersMap; }
- }
-
- internal bool SameGroupsFlag {
- get { return _sameGroupsFlag; }
- }
-
- internal int GroupCount {
- get { return _groupCount; }
- }
-
- internal PatternGrouping () {
- this._groupCount = -1;
- }
-
- internal void SetGroups (int netGroupCount, int javaGroupCount) {
- this._groupCount = netGroupCount;
-
- _groupNameToNumberMap = new Hashtable (_groupCount + 1);
- _javaToNetGroupNumbersMap = new int [javaGroupCount + 1];
- _groupNumberToNameMap = new string [_groupCount + 1];
- _netToJavaNumbersMap = new int [_groupCount + 1];
-
- for (int i = 0; i <= _groupCount; ++i) {
- _groupNameToNumberMap.Add (i.ToString (), i);
- _javaToNetGroupNumbersMap [i] = i;
- _groupNumberToNameMap [i] = i.ToString ();
- _netToJavaNumbersMap [i] = i;
- }
- for (int i = _groupCount + 1; i <= javaGroupCount; ++i) {
- _javaToNetGroupNumbersMap [i] = -1;
- }
- }
-
- internal void SetGroups (string [] namedGroups,
- int [] javaGroupNumberToNetGroupNumber,
- int noNamedGroupNumber,
- int capturedGroupsCount,
- int sameGroupsCounter,
- RegexOptions options) {
- _groupNumberToNameMap = new string [capturedGroupsCount + 1];
- _groupNameToNumberMap = new Hashtable (capturedGroupsCount + 1);
- _netToJavaNumbersMap = new int [capturedGroupsCount + 1];
-
- _javaToNetGroupNumbersMap = javaGroupNumberToNetGroupNumber;
-
- if ((options & RegexOptions.ExplicitCapture) == RegexOptions.ExplicitCapture) {
- FillExplicitGroupMaps (namedGroups,
- capturedGroupsCount,
- sameGroupsCounter,
- options);
- return;
- }
- else {
- FillImplicitGroupMaps (namedGroups,
- noNamedGroupNumber + 1,
- capturedGroupsCount,
- sameGroupsCounter,
- options);
- }
-
- }
-
- private void FillImplicitGroupMaps (string [] namedGroups,
- int namedGroupNumber,
- int capturedGroupsCount,
- int sameGroupsCounter,
- RegexOptions options) {
- int addedNamedGroupsCount = 0;
-
- for (int i = 0; i < capturedGroupsCount + 1; ++i) {
- int netGroupNumber = _javaToNetGroupNumbersMap [i];
- if (netGroupNumber == -1) {
- if (_groupNameToNumberMap.Contains (namedGroups [addedNamedGroupsCount])) {
- _javaToNetGroupNumbersMap [i] = (int) _groupNameToNumberMap [namedGroups [addedNamedGroupsCount]];
- ++sameGroupsCounter;
- }
- else {
- _javaToNetGroupNumbersMap [i] = namedGroupNumber;
- _groupNumberToNameMap [namedGroupNumber] = namedGroups [addedNamedGroupsCount];
- ++namedGroupNumber;
- }
-
- netGroupNumber = _javaToNetGroupNumbersMap [i];
- ++addedNamedGroupsCount;
- }
- else {
- _groupNumberToNameMap [netGroupNumber] =
- netGroupNumber.ToString ();
- }
- _groupNameToNumberMap [_groupNumberToNameMap [netGroupNumber]] = netGroupNumber;
- _netToJavaNumbersMap [_javaToNetGroupNumbersMap [i]] = i;
- }
- _groupCount = capturedGroupsCount - sameGroupsCounter;
- _sameGroupsFlag = (sameGroupsCounter != 0);
-
- }
-
- private void FillExplicitGroupMaps (string [] namedGroups,
- int capturedGroupsCount,
- int sameGroupsCounter,
- RegexOptions options) {
- int addedNamedGroupsCount = 0;
- int namedGroupNumber = 1;
- int nonCapturedGroupsNumber = 0;
-
- for (int i = 1; i < capturedGroupsCount + 1; ++i) {
- int netGroupNumber = _javaToNetGroupNumbersMap [i];
- if (netGroupNumber >= 0) {
- _javaToNetGroupNumbersMap [i] = -1;
- ++nonCapturedGroupsNumber;
- continue;
- }
-
- if (_groupNameToNumberMap.Contains (namedGroups [addedNamedGroupsCount])) {
- _javaToNetGroupNumbersMap [i] = (int) _groupNameToNumberMap [namedGroups [addedNamedGroupsCount]];
- ++sameGroupsCounter;
- }
- else {
- _javaToNetGroupNumbersMap [i] = namedGroupNumber;
- _groupNumberToNameMap [namedGroupNumber] = namedGroups [addedNamedGroupsCount];
- ++namedGroupNumber;
- }
-
- netGroupNumber = _javaToNetGroupNumbersMap [i];
- ++addedNamedGroupsCount;
-
- _groupNameToNumberMap [_groupNumberToNameMap [netGroupNumber]] = netGroupNumber;
- _netToJavaNumbersMap [_javaToNetGroupNumbersMap [i]] = i;
- }
- _groupCount = capturedGroupsCount - sameGroupsCounter - nonCapturedGroupsNumber;
- _sameGroupsFlag = (sameGroupsCounter != 0);
- }
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/Regex.cs b/mcs/class/System/System.Text.RegularExpressions/Regex.cs
index 9307a632bce..ac662abc630 100644
--- a/mcs/class/System/System.Text.RegularExpressions/Regex.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/Regex.cs
@@ -47,7 +47,7 @@ namespace System.Text.RegularExpressions {
[Serializable]
public partial class Regex : ISerializable {
-#if !TARGET_JVM && !FULL_AOT_RUNTIME
+#if !FULL_AOT_RUNTIME
[MonoTODO]
public static void CompileToAssembly (RegexCompilationInfo [] regexes, AssemblyName aname)
{
@@ -306,7 +306,6 @@ namespace System.Text.RegularExpressions {
throw new ArgumentOutOfRangeException ("options");
}
-#if !TARGET_JVM
private void Init ()
{
this.machineFactory = cache.Lookup (this.pattern, this.roptions);
@@ -320,7 +319,6 @@ namespace System.Text.RegularExpressions {
this.group_names = this.machineFactory.NamesMapping;
}
}
-#endif
private void InitNewRegex ()
{
@@ -458,7 +456,7 @@ namespace System.Text.RegularExpressions {
throw new ArgumentNullException ("input");
if (startat < 0 || startat > input.Length)
throw new ArgumentOutOfRangeException ("startat");
- return CreateMachine ().Scan (this, input, startat, input.Length);
+ return CreateMachine ().Scan (this, input, startat, input.Length, false);
}
public Match Match (string input, int beginning, int length)
@@ -469,7 +467,7 @@ namespace System.Text.RegularExpressions {
throw new ArgumentOutOfRangeException ("beginning");
if (length < 0 || length > input.Length - beginning)
throw new ArgumentOutOfRangeException ("length");
- return CreateMachine ().Scan (this, input, beginning, beginning + length);
+ return CreateMachine ().Scan (this, input, beginning, beginning + length, true);
}
public MatchCollection Matches (string input)
diff --git a/mcs/class/System/System.Text.RegularExpressions/Regex.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/Regex.jvm.cs
deleted file mode 100644
index 0578fa46b66..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/Regex.jvm.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-//
-// Regex.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Runtime.Serialization;
-
-namespace System.Text.RegularExpressions
-{
- public partial class Regex : ISerializable
- {
- IMachineFactory _monoFactory;
- readonly object _monoFactoryLock = new object ();
-
- internal bool SameGroupNamesFlag {
- get {
- return GetJvmMachine ().PatternData.SameGroupsFlag;
- }
- }
-
- internal IMachine GetMonoMachine () {
-
- lock (_monoFactoryLock) {
- if (_monoFactory != null)
- return _monoFactory.NewInstance ();
-
- _monoFactory = CreateMachineFactory (this.pattern, this.Options);
- }
-
- return _monoFactory.NewInstance ();
- }
-
- internal JvmReMachine GetJvmMachine () {
- if (machineFactory is InterpreterFactory)
- return null;
-
- return ((JvmReMachineFactory) machineFactory).GetMachine ();
- }
-
- internal int GetJavaNumberByNetNumber (int netNumber) {
- if (netNumber < 0 || netNumber > group_count) {
- return netNumber;
- }
-
- return GetJvmMachine ().PatternData.NetToJavaNumbersMap [netNumber];
- }
-
- private void Init () {
-
- this.machineFactory = cache.Lookup (this.pattern, this.roptions);
-
- if (this.machineFactory != null) {
-
- this.group_count = this.machineFactory.GroupCount;
- this.mapping = this.machineFactory.Mapping;
- this._groupNumberToNameMap = this.machineFactory.NamesMapping;
-
- return;
- }
-
- PatternData patternData = null;
- string errorMessage = null;
- try{
- patternData = PatternDataBuilder.GetPatternData(pattern, roptions);
- }catch(Exception e){
-#if DEBUG
- throw;
-#endif
- errorMessage = "Creating pattern on JVM failed for pattern " + pattern
- + "\n" + e.Message;
- }
-
- if (patternData == null){
- InitNewRegex();
- if (errorMessage != null)
- Console.WriteLine (errorMessage);
- }
- else
- InitJvmRegex (patternData);
-
- cache.Add (this.pattern, this.roptions, this.machineFactory);
- return;
- }
-
- private void InitJvmRegex (PatternData patternData) {
-
- machineFactory = new JvmReMachineFactory (patternData);
- this.group_count = this.machineFactory.GroupCount;
- this.mapping = this.machineFactory.Mapping;
- this._groupNumberToNameMap = this.machineFactory.NamesMapping;
- }
-
- }
-} \ No newline at end of file
diff --git a/mcs/class/System/System.Text.RegularExpressions/ReplacedRegularCharacterConstruct.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/ReplacedRegularCharacterConstruct.jvm.cs
deleted file mode 100644
index 673ed74c03b..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/ReplacedRegularCharacterConstruct.jvm.cs
+++ /dev/null
@@ -1,95 +0,0 @@
-//
-// ReplacedRegularCharacterConstruct.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class ReplacedRegularCharacterConstruct : IConstructType
- {
- private const string BACKSLASH_IN_CC_PATTERN = @"(?<=(?:[^\\]|\A)(?:[\\]{2})*(?:\[|\[[^\[\]]*[^\[\]\\])(?:[\\]{2})*)\\b(?=[^\[\]]*\])";
- private const string BRACKET_IN_CC_PATTERN = @"(?<=(?:[^\\]|\A)(?:[\\]{2})*(?:\[|\[[^\[\]]*[^\[\]\\])(?:[\\]{2})*)\[(?=[^\[\]]*\])";
- private const string BACKSLASH_PATTERN = @"\\b(?=[^\[\]]*\])";
- private const string BRACKET_PATTERN = @"\[(?=[^\[\]]*\])";
- private const string BACKSLASH_BEHIND_PATTERN = @"(?:[^\\]|\A)(?:[\\]{2})*\[(?:[^\[\]\\]*(\\[^b])*)*(?:[\\]{2})*$";
- private const string BRACKET_BEHIND_PATTERN = @"(?:[^\\]|\A)(?:[\\]{2})*(?:\[(?:[^\[\]]*[^\[\]\\])?)(?:[\\]{2})*$";
- private const string BACKSLASH = @"\\u0008";
- private const string BRACKET = @"\\[";
-
- private const string LEFT_FIGURE_PAREN = @"(?<=(?:[^\\\{]|\A)(?:[\\]{2})*)(?<!(?:[^\\]|\A)(?:[\\]{2})*\\[pP])\{(?!\d\d*(,(\d\d*)?)?\})";
- private const string RIGHT_FIGURE_PAREN = @"(?<!(?:[^\\]|\A)(\\{2})*(?:\\(?:[pP]\{\w\w*)?|(?:\{\d\d*(,(\d\d*)?)?)))\}";
- private const string ESC_LEFT_FIGURE = @"\\{";
- private const string ESC_RIGHT_FIGURE = @"\\}";
- private const string NULL_PATTERN = @"(?<=(?:[^\\]|\A)(?:[\\]{2})*)\\0(?!\d)";
- private const string JAVA_NULL = @"\\u0000";
-
- public bool HasConstruct (string pattern, RegexOptions options) {
- if (JavaUtils.IsMatch (pattern, BACKSLASH_IN_CC_PATTERN)) {
- //TODO Store result
- return true;
- }
- if (JavaUtils.IsMatch (pattern, LEFT_FIGURE_PAREN)) {
- //TODO Store result
- return true;
- }
- if (JavaUtils.IsMatch (pattern, RIGHT_FIGURE_PAREN)) {
- //TODO Store result
- return true;
- }
- if (JavaUtils.IsMatch (pattern, BRACKET_IN_CC_PATTERN)) {
- //TODO Store result
- return true;
- }
- if (JavaUtils.IsMatch (pattern, NULL_PATTERN)) {
- //TODO Store result
- return true;
- }
-
- return false;
- }
-
-
- public string Reformat (RegexOptions options,
- string reformattedPattern,
- PatternGrouping patternGrouping) {
- reformattedPattern = JavaUtils.ReplaceWithLookBehind (reformattedPattern, BACKSLASH_PATTERN, BACKSLASH_BEHIND_PATTERN, BACKSLASH);
- reformattedPattern = JavaUtils.ReplaceAllAdvanced (reformattedPattern, LEFT_FIGURE_PAREN, ESC_LEFT_FIGURE);
- reformattedPattern = JavaUtils.ReplaceAllAdvanced (reformattedPattern, RIGHT_FIGURE_PAREN, ESC_RIGHT_FIGURE);
- reformattedPattern = JavaUtils.ReplaceWithLookBehind (reformattedPattern, BRACKET_PATTERN, BRACKET_BEHIND_PATTERN, BRACKET);
- reformattedPattern = JavaUtils.ReplaceAllAdvanced (reformattedPattern, NULL_PATTERN, JAVA_NULL);
-
- return reformattedPattern;
- }
- }
-}
diff --git a/mcs/class/System/System.Text.RegularExpressions/ReplacementData.jvm.cs b/mcs/class/System/System.Text.RegularExpressions/ReplacementData.jvm.cs
deleted file mode 100644
index 08b75ef3de8..00000000000
--- a/mcs/class/System/System.Text.RegularExpressions/ReplacementData.jvm.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-//
-// ReplacementData.jvm.cs
-//
-// Author:
-// Arina Itkes <arinai@mainsoft.com>
-//
-// Copyright (C) 2007 Mainsoft, Inc.
-//
-
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Text;
-using java.util.regex;
-using java.lang;
-
-namespace System.Text.RegularExpressions
-{
- sealed class ReplacementData
- {
- private const string SINGLE_DOLLAR_PATTERN = @"(?<=(?:\A|[^\\])(?:\\{2}){0,1073741823})\$(?:\{(\w+)\}|(\d+))?";
- private const string DOUBLE_DOLLAR_PATTERN = @"(?<=(?:\A|[^\\])(?:\\{2}){0,1073741823})\$\$";
- private const string BACKSLASH_PATTERN = @"\\";
- private const string COPY_ENTIRE_MATCH_PATTERN = @"(?<=(?:\A|[^\\])(?:\\{2}){0,1073741823})\\\$\&";
- private const string INPUT_BEFORE_MATCH_PATTERN = @"(?<=(?:\A|[^\\])(?:\\{2}){0,1073741823})\\\$\`";
- private const string INPUT_AFTER_MATCH_PATTERN = @"(?<=(?:\A|[^\\])(?:\\{2}){0,1073741823})\\\$\'";
- private const string LAST_CAPTURED_GROUP_PATTERN = @"(?<=(?:\A|[^\\])(?:\\{2}){0,1073741823})\\\$\+";
- private const string INPUT_PATTERN = @"(?<=(?:\A|[^\\])(?:\\{2}){0,1073741823})\\\$_";
- private const string JAVA_DOLLAR = @"\\\$";
- private const string JAVA_BACKSLASH = @"\\\\";
-
- internal static string Reformat (Regex regex, string replacement) {
-
- replacement = JavaUtils.ReplaceAll (replacement, BACKSLASH_PATTERN, JAVA_BACKSLASH);
- replacement = JavaUtils.ReplaceAll (replacement, DOUBLE_DOLLAR_PATTERN, JAVA_DOLLAR);
-
- Pattern p = Pattern.compile (SINGLE_DOLLAR_PATTERN);
- Matcher m = p.matcher ((CharSequence) (object) replacement);
-
- StringBuffer sb = new StringBuffer ();
- while (m.find ()) {
- if (m.start (1) >= 0) {
- int groupNumber = regex.GroupNumberFromName (m.group (1));
- if (groupNumber >= 0) {
- m.appendReplacement (sb, @"\$" + regex.GetJavaNumberByNetNumber (groupNumber));
- continue;
- }
- if (int.TryParse (m.group (1), out groupNumber) && groupNumber <= regex.GroupCount) {
- m.appendReplacement (sb, @"\$" + regex.GetJavaNumberByNetNumber (groupNumber));
- continue;
- }
-
- m.appendReplacement (sb, JAVA_DOLLAR + "{" + m.group (1) + "}");
- continue;
- }
- if (m.start (2) >= 0) {
- int netGroupNumber = int.Parse (m.group (2));
- if (netGroupNumber > regex.GroupCount) {
- m.appendReplacement (sb, JAVA_DOLLAR + netGroupNumber);
- continue;
- }
-
- m.appendReplacement (sb, @"\$" + regex.GetJavaNumberByNetNumber (netGroupNumber));
- continue;
- }
-
- m.appendReplacement (sb, JAVA_DOLLAR);
- }
-
- m.appendTail (sb);
-
- return sb.ToString ();
- }
-
- internal static void ReplaceMatch (string replacementPattern, Matcher match, StringBuffer sb, string input, PatternData patternData) {
-
- replacementPattern = JavaUtils.ReplaceAll (replacementPattern, COPY_ENTIRE_MATCH_PATTERN, match.group ());
- replacementPattern = JavaUtils.ReplaceAll (replacementPattern, INPUT_BEFORE_MATCH_PATTERN, input.Substring (0, match.start ()));
- replacementPattern = JavaUtils.ReplaceAll (replacementPattern, INPUT_AFTER_MATCH_PATTERN, input.Substring (match.end ()));
- replacementPattern = JavaUtils.ReplaceAll (replacementPattern, INPUT_PATTERN, input);
-
- int groupsNumber = match.groupCount ();
- if (groupsNumber > 0) {
- Pattern p = Pattern.compile (LAST_CAPTURED_GROUP_PATTERN);
- Matcher m = p.matcher ((CharSequence) (object) replacementPattern);
- if (m.find ()) {
- while (groupsNumber > 0) {
- if (match.start (patternData.NetToJavaNumbersMap [groupsNumber]) >= 0) {
- break;
- }
- --groupsNumber;
- }
- if (groupsNumber > 0) {
- replacementPattern = m.replaceAll (match.group (patternData.NetToJavaNumbersMap [groupsNumber]));
- }
- }
- }
-
- match.appendReplacement (sb, replacementPattern);
- }
- }
-}
diff --git a/mcs/class/System/System.Text.RegularExpressions/RxInterpreter.cs b/mcs/class/System/System.Text.RegularExpressions/RxInterpreter.cs
index 3f5d987ed91..cd8f259d747 100644
--- a/mcs/class/System/System.Text.RegularExpressions/RxInterpreter.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/RxInterpreter.cs
@@ -147,7 +147,7 @@ namespace System.Text.RegularExpressions {
ResetGroups ();
}
- public override Match Scan (Regex regex, string text, int start, int end) {
+ public override Match Scan (Regex regex, string text, int start, int end, bool substring_mode) {
str = text;
string_start = start;
string_end = end;
diff --git a/mcs/class/System/System.Text.RegularExpressions/arch.cs b/mcs/class/System/System.Text.RegularExpressions/arch.cs
index 72e9a15c690..89ce958e6b0 100644
--- a/mcs/class/System/System.Text.RegularExpressions/arch.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/arch.cs
@@ -101,6 +101,7 @@ namespace System.Text.RegularExpressions {
interface IMachine {
Match Scan (Regex regex, string text, int start, int end);
+ Match Scan (Regex regex, string text, int start, int end, bool substring_mode);
string [] Split (Regex regex, string input, int count, int startat);
string Replace (Regex regex, string input, string replacement, int count, int startat);
string Result (string replacement, Match match);
diff --git a/mcs/class/System/System.Text.RegularExpressions/interpreter.cs b/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
index cd0e5aef9f1..3c70a3b030c 100644
--- a/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
+++ b/mcs/class/System/System.Text.RegularExpressions/interpreter.cs
@@ -61,10 +61,23 @@ namespace System.Text.RegularExpressions {
// IMachine implementation
- public override Match Scan (Regex regex, string text, int start, int end) {
+ public override Match Scan (Regex regex, string text, int start, int end, bool substring_mode) {
+ this.regex_rtl = (regex.Options & RegexOptions.RightToLeft) != 0;
+
+ if (!initialized)
+ {
+ this.text_start = regex_rtl && substring_mode ? end : start;
+ this.text_end = regex_rtl ? substring_mode ? start : 0 : end;
+ this.initialized = true;
+ }
+ else
+ {
+ this.text_start = start;
+ this.text_end = end;
+ }
this.text = text;
- this.text_end = end;
- this.scan_ptr = start;
+ this.scan_ptr = text_start;
+ this.substring_mode = substring_mode;
if (Eval (Mode.Match, ref scan_ptr, program_start))
return GenerateMatch (regex);
@@ -94,7 +107,7 @@ namespace System.Text.RegularExpressions {
int anch_offset = program[pc + 2];
bool anch_reverse = (flags & OpFlags.RightToLeft) != 0;
int anch_ptr = anch_reverse ? ptr - anch_offset : ptr + anch_offset;
- int anch_end = text_end - match_min + anch_offset; // maximum anchor position
+ int anch_end = (regex_rtl ? text_start : text_end) - match_min + anch_offset; // maximum anchor position
int anch_begin = 0;
@@ -264,7 +277,7 @@ namespace System.Text.RegularExpressions {
if (reverse) {
ptr -= len;
- if (ptr < 0)
+ if ((!regex_rtl && ptr < 0) || (regex_rtl && ptr < text_end))
goto Fail;
}
else
@@ -298,7 +311,7 @@ namespace System.Text.RegularExpressions {
if (reverse) {
ptr -= len;
- if (ptr < 0)
+ if ((!regex_rtl && ptr < 0) || (regex_rtl && ptr < text_end))
goto Fail;
}
else if (ptr + len > text_end)
@@ -626,7 +639,7 @@ namespace System.Text.RegularExpressions {
while (true) {
int p = ptr + coff;
- if (c1 < 0 || (p >= 0 && p < text_end && (c1 == text[p] || c2 == text[p]))) {
+ if (c1 < 0 || (p >= 0 && ((regex_rtl && p >= text_end) || (!regex_rtl && p < text_end)) && (c1 == text[p] || c2 == text[p]))) {
deep = null;
if (Eval (Mode.Match, ref ptr, pc))
break;
@@ -662,7 +675,7 @@ namespace System.Text.RegularExpressions {
while (true) {
int p = ptr + coff;
- if (c1 < 0 || (p >= 0 && p < text_end && (c1 == text[p] || c2 == text[p]))) {
+ if (c1 < 0 || (p >= 0 && ((regex_rtl && p >= text_end) || (!regex_rtl && p < text_end)) && (c1 == text[p] || c2 == text[p]))) {
deep = null;
if (Eval (Mode.Match, ref ptr, pc))
break;
@@ -742,13 +755,13 @@ namespace System.Text.RegularExpressions {
if (!consumed) {
if ((flags & OpFlags.RightToLeft) != 0) {
- if (ptr <= 0)
+ if ((substring_mode && ptr <= (regex_rtl ? text_end : text_start)) || (!substring_mode && ptr <= 0))
return false;
c = text[-- ptr];
}
else {
- if (ptr >= text_end)
+ if ((!regex_rtl && ptr >= text_end) || (regex_rtl && ptr >= text_start))
return false;
c = text[ptr ++];
@@ -837,42 +850,42 @@ namespace System.Text.RegularExpressions {
private bool IsPosition (Position pos, int ptr) {
switch (pos) {
case Position.Start: case Position.StartOfString:
- return ptr == 0;
+ return ptr == 0 || (substring_mode && ((!regex_rtl && ptr == text_start) || (regex_rtl && ptr == text_end)));
case Position.StartOfLine:
- return ptr == 0 || text[ptr - 1] == '\n';
+ return ptr == 0 || text[ptr - 1] == '\n' || (substring_mode && ((!regex_rtl && ptr == text_start) || (regex_rtl && ptr == text_end)));
case Position.StartOfScan:
return ptr == scan_ptr;
case Position.End:
- return ptr == text_end ||
- (ptr == text_end - 1 && text[ptr] == '\n');
+ return (!regex_rtl && ptr == text_end) || (regex_rtl && ptr == text_start) ||
+ (((!regex_rtl && ptr == text_end - 1) || (regex_rtl && ptr == text_start - 1)) && text[ptr] == '\n');
case Position.EndOfLine:
- return ptr == text_end || text[ptr] == '\n';
+ return (!regex_rtl && ptr == text_end) || (regex_rtl && ptr == text_start) || text[ptr] == '\n';
case Position.EndOfString:
- return ptr == text_end;
+ return (!regex_rtl && ptr == text_end) || (regex_rtl && ptr == text_start);
case Position.Boundary:
- if (text_end == 0)
+ if ((!regex_rtl && text_end == 0) || (regex_rtl && text_start == 0))
return false;
if (ptr == 0)
return IsWordChar (text[ptr]);
- else if (ptr == text_end)
+ else if ((!regex_rtl && ptr == text_end) || (regex_rtl && ptr == text_start))
return IsWordChar (text[ptr - 1]);
else
return IsWordChar (text[ptr]) != IsWordChar (text[ptr - 1]);
case Position.NonBoundary:
- if (text_end == 0)
+ if ((!regex_rtl && text_end == 0) || (regex_rtl && text_start == 0))
return false;
if (ptr == 0)
return !IsWordChar (text[ptr]);
- else if (ptr == text_end)
+ else if ((!regex_rtl && ptr == text_end) || (regex_rtl && ptr == text_start))
return !IsWordChar (text[ptr - 1]);
else
return IsWordChar (text[ptr]) == IsWordChar (text[ptr - 1]);
@@ -1051,6 +1064,11 @@ namespace System.Text.RegularExpressions {
private int match_min;//, match_max; // match width information
private QuickSearch qs; // fast substring matcher
+ private bool regex_rtl;
+ private int text_start;
+ private bool substring_mode;
+ private bool initialized;
+
// match state
private int scan_ptr; // start of scan
diff --git a/mcs/class/System/System.Timers/Timer.cs b/mcs/class/System/System.Timers/Timer.cs
index 28a7011bb54..844ab30ed27 100644
--- a/mcs/class/System/System.Timers/Timer.cs
+++ b/mcs/class/System/System.Timers/Timer.cs
@@ -43,6 +43,7 @@ namespace System.Timers
System.Threading.Timer timer;
object _lock = new object ();
ISynchronizeInvoke so;
+ bool enabled;
[Category("Behavior")]
[TimersDescription("Occurs when the Interval has elapsed.")]
@@ -55,10 +56,11 @@ namespace System.Timers
public Timer (double interval)
{
// MSBUG: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=296761
- if (interval > 0x7FFFFFFF)
+ if (interval <= 0 || interval > 0x7FFFFFFF)
throw new ArgumentException ("Invalid value: " + interval, "interval");
autoReset = true;
+ timer = new System.Threading.Timer (Callback, this, Timeout.Infinite, Timeout.Infinite); //disabled
Interval = interval;
}
@@ -78,19 +80,25 @@ namespace System.Timers
{
get {
lock (_lock)
- return timer != null;
+ return enabled && timer != null;
}
set {
lock (_lock) {
- bool enabled = timer != null;
+ if (timer == null)
+ throw new ObjectDisposedException (GetType ().ToString (), "The object has been disposed");
+
if (enabled == value)
return;
if (value) {
- timer = new System.Threading.Timer (Callback, this, (int)interval, autoReset ? (int)interval: 0);
+ // As per MS docs (throw this only when the timer becomes enabled): http://msdn.microsoft.com/en-us/library/system.timers.timer.enabled(v=vs.110).aspx
+ if (interval > Int32.MaxValue)
+ throw new ArgumentException ("Invalid value: " + interval, "interval");
+ enabled = true;
+ timer.Change ((int)interval, autoReset ? (int)interval : 0);
} else {
- timer.Dispose ();
- timer = null;
+ enabled = false;
+ timer.Change (Timeout.Infinite, Timeout.Infinite);
}
}
}
@@ -107,10 +115,16 @@ namespace System.Timers
// The doc says 'less than 0', but 0 also throws the exception
if (value <= 0)
throw new ArgumentException ("Invalid value: " + value);
+ // As per MS docs (throw only if enabled, otherwise postpone throwing until it becomes enabled): http://msdn.microsoft.com/en-us/library/system.timers.timer.interval(v=vs.110).aspx
+ if (value > Int32.MaxValue && enabled)
+ throw new ArgumentException ("Invalid value: " + value);
lock (_lock) {
+ if (timer == null)
+ return;
interval = value;
- if (timer != null)
+ //call Change only if enabled, otherwise it will be called when Enabled = true, see the comment above on throwing ArgumentException
+ if (enabled)
timer.Change ((int)interval, autoReset? (int)interval: 0);
}
}
@@ -139,7 +153,8 @@ namespace System.Timers
public void Close ()
{
- Enabled = false;
+ lock (_lock)
+ Dispose (true);
}
public void EndInit ()
@@ -159,12 +174,19 @@ namespace System.Timers
protected override void Dispose (bool disposing)
{
+ // Could call Close() twice
+ if (timer == null)
+ return;
+
// If we're disposing explicitly, clear all
// fields. If not, all fields will have been
// nulled by the GC during finalization, so
// trying to lock on _lock will blow up.
if (disposing)
- Close ();
+ {
+ timer.Dispose ();
+ timer = null;
+ }
base.Dispose (disposing);
}
@@ -175,8 +197,20 @@ namespace System.Timers
if (timer.Enabled == false)
return;
ElapsedEventHandler events = timer.Elapsed;
- if (!timer.autoReset)
- timer.Enabled = false;
+
+ try
+ {
+ if (!timer.autoReset)
+ timer.Enabled = false; //this could throw ObjectDisposed if timer.Close() was just called, after the check for Enabled above
+ }
+ catch (ObjectDisposedException) {
+ //Probably the Elapsed event should not fire if this Timer is found here to be closed
+ return;
+ }
+
+ //If another thread calls Close() when this thread is right here (of further down), the Elapsed event might get called once more after this Timer was Closed()
+ //It's not a problem, it happens with all Timers, but it's good to know...
+
if (events == null)
return;
diff --git a/mcs/class/System/System.csproj b/mcs/class/System/System.csproj
deleted file mode 100644
index 4d5b6d5a1bd..00000000000
--- a/mcs/class/System/System.csproj
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>$(MSBuildProjectName)</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'basic|AnyCPU' ">
- <DefineConstants>BOOTSTRAP_BASIC,NET_1_1,NET_2_0,CONFIGURATION_2_0</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'basic_XML_DEP|AnyCPU' ">
- <DefineConstants>BOOTSTRAP_BASIC,NET_1_1,NET_2_0,CONFIGURATION_2_0,XML_DEP</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0,CONFIGURATION_2_0</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0_XML_DEP|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0,CONFIGURATION_2_0,XML_DEP,SECURITY_DEP</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0_ALL_DEP|AnyCPU' ">
- <DefineConstants>NET_1_1,NET_2_0,CONFIGURATION_2_0,XML_DEP,SECURITY_DEP,CONFIGURATION_DEP</DefineConstants>
- </PropertyGroup>
- <ItemGroup>
- <EmbeddedResource Include="resources\Asterisk.wav"/>
- <EmbeddedResource Include="resources\Beep.wav"/>
- <EmbeddedResource Include="resources\Exclamation.wav"/>
- <EmbeddedResource Include="resources\Hand.wav"/>
- <EmbeddedResource Include="resources\Question.wav"/>
- </ItemGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0_ALL_DEP|AnyCPU' ">
- <Reference Include="System.Xml"/>
- <Reference Include="System.Configuration"/>
- <Reference Include="System">
- <Aliases>PrebuiltSystem</Aliases>
- <HintPath>..\lib\net_2_0\System.dll</HintPath>
- </Reference>
- <Reference Include="Mono.Security">
- <HintPath>..\lib\net_2_0\Mono.Security.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0_XML_DEP|AnyCPU' ">
- <Reference Include="System.Xml"/>
- <Reference Include="System">
- <Aliases>PrebuiltSystem</Aliases>
- <HintPath>..\lib\net_2_0\System.dll</HintPath>
- </Reference>
- <Reference Include="Mono.Security">
- <HintPath>..\lib\net_2_0\Mono.Security.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup Condition=" '$(Configuration)|$(Platform)' == 'basic_XML_DEP|AnyCPU' ">
- <Reference Include="System.Xml"/>
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets"/>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/System/System.dll.sources b/mcs/class/System/System.dll.sources
index 55e98bb0f2f..dffa27ef690 100644
--- a/mcs/class/System/System.dll.sources
+++ b/mcs/class/System/System.dll.sources
@@ -1012,6 +1012,7 @@ System/Uri.cs
System/UriFormat.cs
System/UriFormatException.cs
System/UriHostNameType.cs
+System/UriHelper.cs
System/UriIdnScope.cs
System/UriKind.cs
System/UriParser.cs
diff --git a/mcs/class/System/System/AndroidPlatform.cs b/mcs/class/System/System/AndroidPlatform.cs
index 45adf27af71..e2e89448d18 100644
--- a/mcs/class/System/System/AndroidPlatform.cs
+++ b/mcs/class/System/System/AndroidPlatform.cs
@@ -38,12 +38,15 @@ using MSX = Mono.Security.X509;
namespace System {
internal static class AndroidPlatform {
-
+ delegate int GetInterfaceAddressesDelegate (out IntPtr ifap);
+ delegate void FreeInterfaceAddressesDelegate (IntPtr ifap);
+
#if SECURITY_DEP
static readonly Converter<List <byte[]>, bool> trustEvaluateSsl;
#endif // SECURITY_DEP
static readonly Func<IWebProxy> getDefaultProxy;
-
+ static readonly GetInterfaceAddressesDelegate getInterfaceAddresses;
+ static readonly FreeInterfaceAddressesDelegate freeInterfaceAddresses;
static AndroidPlatform ()
{
@@ -60,6 +63,16 @@ namespace System {
typeof (Func<IWebProxy>), t, "GetDefaultProxy",
ignoreCase:false,
throwOnBindFailure:true);
+
+ getInterfaceAddresses = (GetInterfaceAddressesDelegate)Delegate.CreateDelegate (
+ typeof (GetInterfaceAddressesDelegate), t, "GetInterfaceAddresses",
+ ignoreCase: false,
+ throwOnBindFailure: false);
+
+ freeInterfaceAddresses = (FreeInterfaceAddressesDelegate)Delegate.CreateDelegate (
+ typeof (FreeInterfaceAddressesDelegate), t, "FreeInterfaceAddresses",
+ ignoreCase: false,
+ throwOnBindFailure: false);
}
#if SECURITY_DEP
@@ -76,6 +89,23 @@ namespace System {
{
return getDefaultProxy ();
}
+
+ internal static int GetInterfaceAddresses (out IntPtr ifap)
+ {
+ ifap = IntPtr.Zero;
+ if (getInterfaceAddresses == null)
+ return -1;
+
+ return getInterfaceAddresses (out ifap);
+ }
+
+ internal static void FreeInterfaceAddresses (IntPtr ifap)
+ {
+ if (freeInterfaceAddresses == null)
+ return;
+
+ freeInterfaceAddresses (ifap);
+ }
}
}
#endif // MONODROID
diff --git a/mcs/class/System/System/Uri.cs b/mcs/class/System/System/Uri.cs
index 83bcb2a8810..fb9c14eead1 100644
--- a/mcs/class/System/System/Uri.cs
+++ b/mcs/class/System/System/Uri.cs
@@ -69,7 +69,6 @@ namespace System {
// o UNC is supported, as starts with "\\" for windows,
// or "//" with unix.
- private bool isUnixFilePath;
private string source;
private string scheme = String.Empty;
private string host = String.Empty;
@@ -79,7 +78,6 @@ namespace System {
private string fragment = String.Empty;
private string userinfo;
private bool isUnc;
- private bool isOpaquePart;
private bool isAbsoluteUri = true;
private long scope_id;
@@ -90,6 +88,13 @@ namespace System {
private string cachedToString;
private string cachedLocalPath;
private int cachedHashCode;
+
+ private static bool s_IriParsing;
+
+ internal static bool IriParsing {
+ get { return s_IriParsing; }
+ set { s_IriParsing = value; }
+ }
#if BOOTSTRAP_BASIC
private static readonly string hexUpperChars = "0123456789ABCDEF";
@@ -112,7 +117,11 @@ namespace System {
public static readonly string UriSchemeNntp = "nntp";
public static readonly string UriSchemeNetPipe = "net.pipe";
public static readonly string UriSchemeNetTcp = "net.tcp";
-
+
+ internal static readonly string UriSchemeTelnet = "telnet";
+ internal static readonly string UriSchemeLdap = "ldap";
+ internal static readonly string UriSchemeUuid = "uuid";
+
private static readonly string [] knownUriSchemes =
{
UriSchemeFile,
@@ -127,7 +136,20 @@ namespace System {
UriSchemeNetTcp
};
- // Constructors
+ // Constructors
+
+ static Uri ()
+ {
+#if NET_4_5
+ IriParsing = true;
+#endif
+
+ var iriparsingVar = Environment.GetEnvironmentVariable ("MONO_URI_IRIPARSING");
+ if (iriparsingVar == "true")
+ IriParsing = true;
+ else if (iriparsingVar == "false")
+ IriParsing = false;
+ }
public Uri (string uriString) : this (uriString, false)
{
@@ -138,14 +160,14 @@ namespace System {
string uri = serializationInfo.GetString ("AbsoluteUri");
if (uri.Length > 0) {
source = uri;
- ParseUri(UriKind.Absolute);
+ ParseUri (UriKind.Absolute);
} else {
uri = serializationInfo.GetString ("RelativeUri");
if (uri.Length > 0) {
source = uri;
- ParseUri(UriKind.Relative);
+ ParseUri (UriKind.Relative);
} else {
- throw new ArgumentException("Uri string was null or empty.");
+ throw new ArgumentException ("Uri string was null or empty.");
}
}
}
@@ -158,12 +180,12 @@ namespace System {
switch (uriKind) {
case UriKind.Absolute:
if (!IsAbsoluteUri)
- throw new UriFormatException("Invalid URI: The format of the URI could not be "
+ throw new UriFormatException ("Invalid URI: The format of the URI could not be "
+ "determined.");
break;
case UriKind.Relative:
if (IsAbsoluteUri)
- throw new UriFormatException("Invalid URI: The format of the URI could not be "
+ throw new UriFormatException ("Invalid URI: The format of the URI could not be "
+ "determined because the parameter 'uriString' represents an absolute URI.");
break;
case UriKind.RelativeOrAbsolute:
@@ -213,9 +235,6 @@ namespace System {
success = false;
break;
}
-
- if (success && isAbsoluteUri && (path.Length > 0))
- path = EscapeString (path);
}
}
@@ -233,7 +252,7 @@ namespace System {
source = uriString;
ParseUri (UriKind.Absolute);
if (!isAbsoluteUri)
- throw new UriFormatException("Invalid URI: The format of the URI could not be "
+ throw new UriFormatException ("Invalid URI: The format of the URI could not be "
+ "determined: " + uriString);
}
@@ -256,188 +275,95 @@ namespace System {
throw new ArgumentNullException ("baseUri");
if (!baseUri.IsAbsoluteUri)
throw new ArgumentOutOfRangeException ("baseUri");
- if (relativeUri == null)
- relativeUri = String.Empty;
-
- // See RFC 2396 Par 5.2 and Appendix C
-
- // Check Windows UNC (for // it is scheme/host separator)
- if (relativeUri.Length >= 2 && relativeUri [0] == '\\' && relativeUri [1] == '\\') {
- source = relativeUri;
+ if (string.IsNullOrEmpty (relativeUri)) {
+ source = baseUri.OriginalString;
ParseUri (UriKind.Absolute);
return;
}
- int pos = relativeUri.IndexOf (':');
- if (pos != -1) {
-
- int pos2 = relativeUri.IndexOfAny (new char [] {'/', '\\', '?'});
-
- // pos2 < 0 ... e.g. mailto
- // pos2 > pos ... to block ':' in query part
- if (pos2 > pos || pos2 < 0) {
- // in some cases, it is equivanent to new Uri (relativeUri, dontEscape):
- // 1) when the URI scheme in the
- // relative path is different from that
- // of the baseUri, or
- // 2) the URI scheme is non-standard
- // ones (non-standard URIs are always
- // treated as absolute here), or
- // 3) the relative URI path is absolute.
- if (String.CompareOrdinal (baseUri.Scheme, 0, relativeUri, 0, pos) != 0 ||
- !IsPredefinedScheme (baseUri.Scheme) ||
- (relativeUri.Length > pos + 1 && relativeUri [pos + 1] == '/')) {
- Uri tmp = null;
- if (Uri.TryCreate (relativeUri, UriKind.Absolute, out tmp)) {
- source = relativeUri;
- ParseUri (UriKind.Absolute);
- return;
- } else if (pos == 1) {
- // special case as this looks like a windows path
- string msg = ParseAsWindowsAbsoluteFilePath (relativeUri);
- if (msg != null)
- throw new UriFormatException (msg);
- }
- // otherwise continue with 'full' relativeUri
- }
- else
- relativeUri = relativeUri.Substring (pos + 1);
+ string error;
+ bool startsWithSlash = false;
+
+ UriElements baseEl;
+ if (!UriParseComponents.TryParseComponents (baseUri.OriginalString, UriKind.Absolute, out baseEl, out error))
+ throw new UriFormatException (error);
+
+ if (relativeUri.StartsWith (baseEl.scheme + ":", StringComparison.Ordinal))
+ relativeUri = relativeUri.Substring (baseEl.scheme.Length + 1);
+
+ if (relativeUri.Length >= 1 && relativeUri [0] == '/') {
+ if (relativeUri.Length >= 2 && relativeUri [1] == '/') {
+ source = baseEl.scheme + ":" + relativeUri;
+ ParseUri (UriKind.Absolute);
+ return;
}
+
+ relativeUri = relativeUri.Substring (1);
+ startsWithSlash = true;
}
- this.scheme = baseUri.scheme;
- this.host = baseUri.host;
- this.port = baseUri.port;
- this.userinfo = baseUri.userinfo;
- this.isUnc = baseUri.isUnc;
- this.isUnixFilePath = baseUri.isUnixFilePath;
- this.isOpaquePart = baseUri.isOpaquePart;
+ UriElements relativeEl;
+ if (!UriParseComponents.TryParseComponents (relativeUri, UriKind.RelativeOrAbsolute, out relativeEl, out error))
+ throw new UriFormatException (error);
- if (relativeUri.Length == 0) {
- this.path = baseUri.path;
- this.query = baseUri.query;
- this.fragment = baseUri.fragment;
+ if (relativeEl.isAbsoluteUri) {
+ source = relativeUri;
+ ParseUri (UriKind.Absolute);
return;
}
- // 8 fragment
- // Note that in relative constructor, file URI cannot handle '#' as a filename character, but just regarded as a fragment identifier.
- string original_fragment = String.Empty;
- pos = relativeUri.IndexOf ('#');
- if (pos != -1) {
- original_fragment = relativeUri.Substring (pos);
- if (userEscaped)
- fragment = original_fragment;
- else
- fragment = "#" + EscapeString (relativeUri.Substring (pos+1));
- relativeUri = pos == 0 ? String.Empty : relativeUri.Substring (0, pos);
- }
+ source = baseEl.scheme + baseEl.delimiter;
- bool consider_query = false;
+ if (baseEl.user != null)
+ source += baseEl.user + "@";
- // 6 query
- pos = relativeUri.IndexOf ('?');
- if (pos != -1) {
- query = relativeUri.Substring (pos);
- if (!userEscaped)
- query = EscapeString (query);
-#if !NET_4_0 && !MOBILE
- consider_query = query.Length > 0;
-#endif
- relativeUri = pos == 0 ? String.Empty : relativeUri.Substring (0, pos);
- } else if (relativeUri.Length == 0) {
- // if there is no relative path then we keep the Query and Fragment from the absolute
- query = baseUri.query;
- }
+ source += baseEl.host;
- if (relativeUri.Length > 0 && relativeUri [0] == '/') {
- if (relativeUri.Length > 1 && relativeUri [1] == '/') {
- source = scheme + ':' + relativeUri;
- ParseUri (UriKind.Absolute);
- return;
- } else {
- path = relativeUri;
- if (!userEscaped)
- path = EscapeString (path);
- return;
- }
- }
-
- // par 5.2 step 6 a)
- path = baseUri.path;
- if ((relativeUri.Length > 0) || consider_query) {
- pos = path.LastIndexOf ('/');
- if (pos >= 0)
- path = path.Substring (0, pos + 1);
- }
+ if (baseEl.port >= 0)
+ source += ":" + baseEl.port.ToString (CultureInfo.InvariantCulture);
- if (relativeUri.Length == 0) {
- // when merging URI the OriginalString is not quite original
- source = GetLeftPart (UriPartial.Authority) + query + original_fragment;
- return;
- }
-
- // 6 b)
- path += relativeUri;
-
- // 6 c)
- int startIndex = 0;
- while (true) {
- pos = path.IndexOf ("./", startIndex);
- if (pos == -1)
- break;
- if (pos == 0)
- path = path.Remove (0, 2);
- else if (path [pos - 1] != '.')
- path = path.Remove (pos, 2);
- else
- startIndex = pos + 1;
- }
-
- // 6 d)
- if (path.Length > 1 &&
- path [path.Length - 1] == '.' &&
- path [path.Length - 2] == '/')
- path = path.Remove (path.Length - 1, 1);
-
- // 6 e)
- startIndex = 0;
- while (true) {
- pos = path.IndexOf ("/../", startIndex);
- if (pos == -1)
- break;
- if (pos == 0) {
- startIndex = 3;
- continue;
+ var canUseBase = true;
+
+ string path;
+ if (!string.IsNullOrEmpty (relativeEl.path) || startsWithSlash) {
+ canUseBase = false;
+ path = relativeEl.path;
+ if (startsWithSlash)
+ path = relativeEl.path;
+ else {
+ var pathEnd = baseEl.path.LastIndexOf ('/');
+ path = (pathEnd > 0)? baseEl.path.Substring (0, pathEnd+1) : "";
+ path += relativeEl.path;
}
- int pos2 = path.LastIndexOf ('/', pos - 1);
- if (pos2 == -1) {
- startIndex = pos + 1;
- } else {
- if (path.Substring (pos2 + 1, pos - pos2 - 1) != "..")
- path = path.Remove (pos2 + 1, pos - pos2 + 3);
- else
- startIndex = pos + 1;
+ } else {
+ path = baseEl.path;
+#if !NET_4_0
+ if (relativeEl.query != null) {
+ var pathEnd = path.LastIndexOf ('/');
+ path = (pathEnd > 0)? path.Substring (0, pathEnd+1) : "";
}
+#endif
}
-
- // 6 f)
- if (path.Length > 3 && path.EndsWith ("/..")) {
- pos = path.LastIndexOf ('/', path.Length - 4);
- if (pos != -1)
- if (path.Substring (pos + 1, path.Length - pos - 4) != "..")
- path = path.Remove (pos + 1, path.Length - pos - 1);
- }
-
- // 6 g)
- while (path.StartsWith ("/../", StringComparison.Ordinal))
- path = path.Substring (3);
-
- if (!userEscaped)
- path = EscapeString (path);
- // when merging URI the OriginalString is not quite original
- source = GetLeftPart (UriPartial.Authority) + path + query + original_fragment;
+ if ((path.Length == 0 || path [0] != '/') && baseEl.delimiter == SchemeDelimiter)
+ path = "/" + path;
+
+ source += UriHelper.Reduce (path, true);
+
+ if (relativeEl.query != null) {
+ canUseBase = false;
+ source += "?" + relativeEl.query;
+ } else if (canUseBase && baseEl.query != null)
+ source += "?" + baseEl.query;
+
+ if (relativeEl.fragment != null)
+ source += "#" + relativeEl.fragment;
+ else if (canUseBase && baseEl.fragment != null)
+ source += "#" + baseEl.fragment;
+
+ ParseUri (UriKind.Absolute);
+
+ return;
}
// Properties
@@ -463,13 +389,10 @@ namespace System {
public string AbsoluteUri {
get {
EnsureAbsoluteUri ();
- if (cachedAbsoluteUri == null) {
- cachedAbsoluteUri = GetLeftPart (UriPartial.Path);
- if (query.Length > 0)
- cachedAbsoluteUri += query;
- if (fragment.Length > 0)
- cachedAbsoluteUri += fragment;
- }
+
+ if (cachedAbsoluteUri == null)
+ cachedAbsoluteUri = GetComponents (UriComponents.AbsoluteUri, UriFormat.UriEscaped);
+
return cachedAbsoluteUri;
}
}
@@ -576,24 +499,35 @@ namespace System {
if (cachedLocalPath != null)
return cachedLocalPath;
+ var formatFlags = UriHelper.FormatFlags.NoSlashReplace;
+
+ if (userEscaped)
+ formatFlags |= UriHelper.FormatFlags.UserEscaped;
+
+ string unescapedPath = UriHelper.FormatAbsolute (path, scheme,
+ UriComponents.Path, UriFormat.Unescaped, formatFlags);
+
+ if (path.StartsWith ("/", StringComparison.Ordinal) &&
+ !unescapedPath.StartsWith ("/", StringComparison.Ordinal))
+ unescapedPath = "/" + unescapedPath;
+
if (IsLocalIdenticalToAbsolutePath ()) {
- cachedLocalPath = Unescape (AbsolutePath);
+ cachedLocalPath = unescapedPath;
return cachedLocalPath;
}
if (!IsUnc) {
- string p = Unescape (path);
bool windows = (path.Length > 3 && path [1] == ':' &&
(path [2] == '\\' || path [2] == '/'));
if (windows)
- cachedLocalPath = p.Replace ('/', '\\');
+ cachedLocalPath = unescapedPath.Replace ('/', '\\');
else
- cachedLocalPath = p;
+ cachedLocalPath = unescapedPath;
} else {
// support *nix and W32 styles
if (path.Length > 1 && path [1] == ':')
- cachedLocalPath = Unescape (path.Replace (Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar));
+ cachedLocalPath = unescapedPath.Replace (Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
// LAMESPEC: ok, now we cannot determine
// if such URI like "file://foo/bar" is
@@ -603,12 +537,12 @@ namespace System {
string h = host;
if (path.Length > 0) {
if ((path.Length > 1) || (path[0] != '/')) {
- h += path.Replace ('/', '\\');
+ h += unescapedPath.Replace ('/', '\\');
}
}
- cachedLocalPath = "\\\\" + Unescape (h);
+ cachedLocalPath = "\\\\" + h;
} else
- cachedLocalPath = Unescape (path);
+ cachedLocalPath = unescapedPath;
}
if (cachedLocalPath.Length == 0)
cachedLocalPath = Path.DirectorySeparatorChar.ToString ();
@@ -727,13 +661,8 @@ namespace System {
get { return isAbsoluteUri; }
}
- // LAMESPEC: source field is supplied in such case that this
- // property makes sense. For such case that source field is
- // not supplied (i.e. .ctor(Uri, string), this property
- // makes no sense. To avoid silly regression it just returns
- // ToString() value now. See bug #78374.
public string OriginalString {
- get { return source != null ? source : ToString (); }
+ get { return source; }
}
// Methods
@@ -804,7 +733,7 @@ namespace System {
}
#if !NET_2_1
- [Obsolete("This method does nothing, it has been obsoleted")]
+ [Obsolete ("This method does nothing, it has been obsoleted")]
protected virtual void Canonicalize ()
{
//
@@ -1039,7 +968,7 @@ namespace System {
if (segments [k] != segments2 [k])
break;
- for (int i = k; i < segments.Length && segments [i].EndsWith ("/"); i++)
+ for (int i = k; i < segments.Length && segments [i].EndsWith ("/", StringComparison.Ordinal); i++)
result += "../";
for (int i = k; i < segments2.Length; i++)
result += segments2 [i];
@@ -1096,12 +1025,12 @@ namespace System {
return cachedToString;
if (isAbsoluteUri) {
- cachedToString = Unescape (GetLeftPart (UriPartial.Path), true);
- AppendQueryAndFragment (ref cachedToString);
- } else {
- // Everything is contained in path in this case.
- cachedToString = path;
- }
+ if (Parser is DefaultUriParser)
+ cachedToString = Parser.GetComponentsHelper (this, UriComponents.AbsoluteUri, UriHelper.ToStringUnescape);
+ else
+ cachedToString = Parser.GetComponents (this, UriComponents.AbsoluteUri, UriFormat.SafeUnescaped);
+ } else
+ cachedToString = UriHelper.FormatRelative (source, scheme, UriHelper.ToStringUnescape);
return cachedToString;
}
@@ -1111,8 +1040,8 @@ namespace System {
if (this.isAbsoluteUri) {
serializationInfo.AddValue ("AbsoluteUri", this.AbsoluteUri);
} else {
- serializationInfo.AddValue("AbsoluteUri", String.Empty);
- serializationInfo.AddValue("RelativeUri", this.OriginalString);
+ serializationInfo.AddValue ("AbsoluteUri", String.Empty);
+ serializationInfo.AddValue ("RelativeUri", this.OriginalString);
}
}
@@ -1173,7 +1102,7 @@ namespace System {
// or a letter from A-F (case-insensitive).
if (IsHexEncoding (str,i)) {
// if ,yes , copy it as is
- s.Append(str.Substring (i, 3));
+ s.Append (str.Substring (i, 3));
i += 2;
continue;
}
@@ -1216,21 +1145,17 @@ namespace System {
if (userEscaped)
return;
- // non-ascii characters are not escaped for the host name
- host = EscapeString (host, EscapeCommonHex, false);
if (host.Length > 1 && host [0] != '[' && host [host.Length - 1] != ']') {
// host name present (but not an IPv6 address)
host = host.ToLower (CultureInfo.InvariantCulture);
}
-
- if (isAbsoluteUri && (path.Length > 0))
- path = EscapeString (path);
}
[Obsolete]
protected virtual string Unescape (string path)
{
- return Unescape (path, false, false);
+ var formatFlags = UriHelper.FormatFlags.NoSlashReplace | UriHelper.FormatFlags.NoReduce;
+ return UriHelper.FormatAbsolute (path, scheme, UriComponents.Path, UriFormat.Unescaped, formatFlags);
}
internal static string Unescape (string str, bool excludeSpecial)
@@ -1312,7 +1237,6 @@ namespace System {
private void ParseAsUnixAbsoluteFilePath (string uriString)
{
- isUnixFilePath = true;
scheme = UriSchemeFile;
port = -1;
fragment = String.Empty;
@@ -1354,301 +1278,76 @@ namespace System {
private bool SupportsQuery ()
{
- return ((scheme != Uri.UriSchemeNntp) && (scheme != Uri.UriSchemeFtp) && (scheme != Uri.UriSchemeFile));
+ return UriHelper.SupportsQuery (scheme);
}
- //
- // This parse method will not throw exceptions on failure
- //
- // Returns null on success, or a description of the error in the parsing
- //
+
private string ParseNoExceptions (UriKind kind, string uriString)
{
- //
- // From RFC 2396 :
- //
- // ^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?
- // 12 3 4 5 6 7 8 9
- //
-
- uriString = uriString.Trim();
- int len = uriString.Length;
-
- if (len == 0){
- if (kind == UriKind.Relative || kind == UriKind.RelativeOrAbsolute){
- isAbsoluteUri = false;
- return null;
- }
- }
-
- if (len <= 1 && (kind == UriKind.Absolute))
- return "Absolute URI is too short";
-
- int pos = 0;
-
- // 1, 2
- // Identify Windows path, unix path, or standard URI.
- if (uriString [0] == '/' && Path.DirectorySeparatorChar == '/'){
- //Unix Path
- ParseAsUnixAbsoluteFilePath (uriString);
- if (kind == UriKind.Relative)
- isAbsoluteUri = false;
- return null;
- } else if (uriString.Length >= 2 && uriString [0] == '\\' && uriString [1] == '\\') {
- //Windows UNC
- ParseAsWindowsUNC (uriString);
- return null;
- }
+ UriElements elements;
+ string error;
+ if (!UriParseComponents.TryParseComponents (source, kind, out elements, out error))
+ return error;
+ scheme = elements.scheme;
+ var parser = UriParser.GetParser (scheme);
+ if (parser != null && !(parser is DefaultUriParser)) {
+ userinfo = Parser.GetComponents (this, UriComponents.UserInfo, UriFormat.UriEscaped);
+ host = Parser.GetComponents (this, UriComponents.Host, UriFormat.UriEscaped);
- pos = uriString.IndexOf (':');
- if (pos == 0) {
- if (kind == UriKind.Absolute)
- return "Invalid URI: The format of the URI could not be determined.";
- isAbsoluteUri = false;
- path = uriString;
- return null;
- } else if (pos < 0) {
- /* Relative path */
- isAbsoluteUri = false;
- path = uriString;
- return null;
- } else if (pos == 1) {
- if (!IsAlpha (uriString [0])) {
- if (kind == UriKind.Absolute)
- return "Invalid URI: The URI scheme is not valid.";
- isAbsoluteUri = false;
- path = uriString;
- return null;
- }
- // This means 'a:' == windows full path.
- string msg = ParseAsWindowsAbsoluteFilePath (uriString);
- if (msg != null)
- return msg;
- return null;
- }
+ var portStr = Parser.GetComponents (this, UriComponents.StrongPort, UriFormat.UriEscaped);
+ if (!string.IsNullOrEmpty (portStr))
+ port = int.Parse (portStr);
- // scheme
- scheme = uriString.Substring (0, pos).ToLower (CultureInfo.InvariantCulture);
+ path = Parser.GetComponents (this, UriComponents.Path | UriComponents.KeepDelimiter, UriFormat.UriEscaped);
+ query = Parser.GetComponents (this, UriComponents.Query, UriFormat.UriEscaped);
+ fragment = Parser.GetComponents (this, UriComponents.StrongPort, UriFormat.UriEscaped);
- // Check scheme name characters as specified in RFC2396.
- // Note: different checks in 1.x and 2.0
- if (!CheckSchemeName (scheme)) {
- if (kind == UriKind.Absolute)
- return "Invalid URI: The URI scheme is not valid.";
- isAbsoluteUri = false;
- path = uriString;
return null;
}
-
- scheme = TryGetKnownUriSchemeInstance (scheme);
- // from here we're practically working on uriString.Substring(startpos,endpos-startpos)
- int startpos = pos + 1;
- int endpos = uriString.Length;
+ var formatFlags = UriHelper.FormatFlags.None;
+ if (UriHelper.HasCharactersToNormalize (uriString))
+ formatFlags |= UriHelper.FormatFlags.HasUriCharactersToNormalize;
- // 8 fragment
- pos = uriString.IndexOf ('#', startpos);
- if (!IsUnc && pos != -1) {
- if (userEscaped)
- fragment = uriString.Substring (pos);
- else
- fragment = "#" + EscapeString (uriString.Substring (pos+1));
+ if (userEscaped)
+ formatFlags |= UriHelper.FormatFlags.UserEscaped;
- endpos = pos;
- }
+ if (elements.host != null)
+ formatFlags |= UriHelper.FormatFlags.HasHost;
- // special case: there is no query part for 'news'
- if (scheme == Uri.UriSchemeNews) {
- pos = scheme.Length + 1;
- path = EscapeString (uriString.Substring (pos, endpos - pos), EscapeNews);
- return null;
- }
+ userinfo = elements.user;
- // special case: there is no query part for 'nntp', 'file' and 'ftp' but there is an host, port, user...
- if (SupportsQuery ()) {
- // 6 query
- pos = uriString.IndexOf ('?', startpos, endpos-startpos);
- if (pos != -1) {
- query = uriString.Substring (pos, endpos-pos);
- endpos = pos;
- if (!userEscaped)
- query = EscapeString (query);
- }
+ if (elements.host != null) {
+ host = UriHelper.FormatAbsolute (elements.host, scheme,
+ UriComponents.Host, UriFormat.UriEscaped, formatFlags);
}
- // 3
- if (IsPredefinedScheme (scheme) && scheme != UriSchemeMailto && (
- (endpos-startpos < 2) ||
- (endpos-startpos >= 2 && uriString [startpos] == '/' && uriString [startpos+1] != '/')))
- return "Invalid URI: The Authority/Host could not be parsed.";
-
-
- bool startsWithSlashSlash = endpos-startpos >= 2 && uriString [startpos] == '/' && uriString [startpos+1] == '/';
- bool unixAbsPath = scheme == UriSchemeFile && startsWithSlashSlash && (endpos-startpos == 2 || uriString [startpos+2] == '/');
- bool windowsFilePath = false;
- if (startsWithSlashSlash) {
- if (kind == UriKind.Relative)
- return "Absolute URI when we expected a relative one";
-
- if (scheme != UriSchemeMailto)
- startpos += 2;
-
- if (scheme == UriSchemeFile) {
- int num_leading_slash = 2;
- for (int i = startpos; i < endpos; i++) {
- if (uriString [i] != '/')
- break;
- num_leading_slash++;
- }
- if (num_leading_slash >= 4) {
- unixAbsPath = false;
- while (startpos < endpos && uriString[startpos] == '/') {
- startpos++;
- }
- } else if (num_leading_slash >= 3) {
- startpos += 1;
- }
- }
-
- if (endpos - startpos > 1 && uriString [startpos + 1] == ':') {
- unixAbsPath = false;
- windowsFilePath = true;
- }
+ port = elements.port;
- } else if (!IsPredefinedScheme (scheme)) {
- path = uriString.Substring(startpos, endpos-startpos);
- isOpaquePart = true;
- return null;
- }
+ if (port == -1)
+ port = GetDefaultPort (scheme);
- // 5 path
- if (unixAbsPath) {
- pos = -1;
- } else {
- pos = uriString.IndexOf ('/', startpos, endpos - startpos);
- if (pos == -1 && windowsFilePath)
- pos = uriString.IndexOf ('\\', startpos, endpos - startpos);
- }
- if (pos != -1) {
- path = uriString.Substring (pos, endpos - pos);
- if (!SupportsQuery ()) {
- if (scheme != Uri.UriSchemeNntp)
- path = path.Replace ('\\', '/');
- path = EscapeString (path, EscapeNews);
- }
- endpos = pos;
- } else {
- if (scheme != Uri.UriSchemeMailto)
+ if (elements.path != null) {
+ path = UriHelper.FormatAbsolute (elements.path, scheme,
+ UriComponents.Path, UriFormat.UriEscaped, formatFlags);
+ if (elements.delimiter == SchemeDelimiter && string.IsNullOrEmpty (path))
path = "/";
}
- // 4.a user info
- if (unixAbsPath)
- pos = -1;
- else
- pos = uriString.IndexOf ('@', startpos, endpos-startpos);
- if (pos != -1) {
- // supplying username / password on a file URI is not supported
- if (scheme == UriSchemeFile)
- return "Invalid host";
- userinfo = uriString.Substring (startpos, pos-startpos);
- startpos = pos + 1;
+ if (elements.query != null) {
+ query = "?" + UriHelper.FormatAbsolute (elements.query, scheme,
+ UriComponents.Query, UriFormat.UriEscaped, formatFlags);
}
- // 4.b port
- bool valid_port = true;
- port = -1;
- if (unixAbsPath)
- pos = -1;
- else
- pos = uriString.LastIndexOf (':', endpos-1, endpos-startpos);
- if (pos != -1 && pos != endpos - 1) {
- string portStr = uriString.Substring(pos + 1, endpos - (pos + 1));
- if (portStr.Length > 0 && portStr[portStr.Length - 1] != ']') {
- if (!Int32.TryParse (portStr, NumberStyles.None, CultureInfo.InvariantCulture, out port) ||
- port < 0 || port > UInt16.MaxValue)
- valid_port = false; // delay reporting
- else
- endpos = pos;
- } else {
- if (port == -1) {
- port = GetDefaultPort (scheme);
- }
- }
- } else if (!IsFile) {
- // if no port is specified by a colon ':' is present then we must ignore it
- // since it would be part of the host name and, as such, would be invalid
- if (pos == endpos - 1)
- endpos--;
-
- if (port == -1)
- port = GetDefaultPort (scheme);
+ if (elements.fragment != null) {
+ fragment = "#" + UriHelper.FormatAbsolute (elements.fragment, scheme,
+ UriComponents.Fragment, UriFormat.UriEscaped, formatFlags);
}
-
- // 4 authority
- uriString = uriString.Substring(startpos, endpos-startpos);
- host = uriString;
-
- if (unixAbsPath) {
- path = Reduce ('/' + uriString, true);
- host = String.Empty;
- } else if (host.Length == 2 && host [1] == ':') {
- if (scheme != UriSchemeFile) {
- host = host [0].ToString ();
- } else {
- // windows filepath
- path = host + path;
- host = String.Empty;
- }
- } else if (isUnixFilePath) {
- uriString = "//" + uriString;
- host = String.Empty;
- } else if (scheme == UriSchemeFile) {
- // under Windows all file:// URI are considered UNC, which is not the case other MacOS (e.g. Silverlight)
-#if BOOTSTRAP_BASIC
- isUnc = isWin32;
-#else
- isUnc = Environment.IsRunningOnWindows;
-#endif
- } else if (host.Length == 0 &&
- (scheme == UriSchemeHttp || scheme == UriSchemeGopher || scheme == UriSchemeNntp ||
- scheme == UriSchemeHttps || scheme == UriSchemeFtp)) {
- return "Invalid URI: The Authority/Host could not be parsed.";
- }
-
- if (host.Length > 0) {
- switch (CheckHostName (host)) {
- case UriHostNameType.Unknown:
- if ((host [0] == ':') || (host [0] == '@'))
- return "Invalid URI: The hostname could not be parsed.";
- if (host.IndexOf (':') != -1)
- return "Invalid URI: Invalid port specified.";
- if (Parser is DefaultUriParser || Parser == null)
- return "Invalid URI: The hostname could not be parsed.";
- break;
- case UriHostNameType.IPv6:
- IPv6Address ipv6addr;
- if (IPv6Address.TryParse (host, out ipv6addr)) {
- host = "[" + ipv6addr.ToString (true) + "]";
- scope_id = ipv6addr.ScopeId;
- }
- break;
- }
- }
- // delayed reporting (to throw the expected exception in the right order)
- if (!valid_port)
- return "Invalid URI: Invalid port number";
- UriFormatException ex = null;
- if (Parser != null)
- Parser.InitializeAndValidate (this, out ex);
- if (ex != null)
- return ex.Message;
-
- if ((scheme != Uri.UriSchemeMailto) && (scheme != Uri.UriSchemeFile)) {
- path = Reduce (path, CompactEscaped (scheme));
- }
+ isAbsoluteUri = elements.isAbsoluteUri;
+ isUnc = elements.isUnc;
+ scope_id = elements.scopeId;
return null;
}
@@ -1769,20 +1468,27 @@ namespace System {
} else {
res.Append ('/');
}
- res.Append(part);
+ res.Append (part);
}
if (path [path.Length - 1] == '/')
res.Append ('/');
- return res.ToString();
+ return res.ToString ();
}
// A variant of HexUnescape() which can decode multi-byte escaped
// sequences such as (e.g.) %E3%81%8B into a single character
- private static char HexUnescapeMultiByte (string pattern, ref int index, out char surrogate)
+ internal static char HexUnescapeMultiByte (string pattern, ref int index, out char surrogate)
+ {
+ bool invalidEscape;
+ return HexUnescapeMultiByte (pattern, ref index, out surrogate, out invalidEscape);
+ }
+
+ internal static char HexUnescapeMultiByte (string pattern, ref int index, out char surrogate, out bool invalidEscape)
{
surrogate = char.MinValue;
+ invalidEscape = false;
if (pattern == null)
throw new ArgumentException ("pattern");
@@ -1810,8 +1516,11 @@ namespace System {
// We might be dealing with a single-byte character:
// If there was only 0 or 1 leading ones then we're not dealing
// with a multi-byte character.
- if (num_bytes <= 1)
- return (char) ((msb << 4) | lsb);
+ if (num_bytes <= 1) {
+ var c = (char) ((msb << 4) | lsb);
+ invalidEscape = c > 0x7F;
+ return c;
+ }
// Now that we know how many bytes *should* follow, we'll check them
// to ensure we are dealing with a valid multi-byte character.
@@ -1839,6 +1548,7 @@ namespace System {
// If what looked like a multi-byte character is invalid, then we'll
// just return the first byte as a single byte character.
if (all_invalid) {
+ invalidEscape = true;
index = orig_index + 3;
return (char) chars[0];
}
@@ -1888,6 +1598,7 @@ namespace System {
new UriScheme (UriSchemeFile, SchemeDelimiter, -1),
new UriScheme (UriSchemeMailto, ":", 25),
new UriScheme (UriSchemeNews, ":", 119),
+ new UriScheme (UriSchemeUuid, ":", -1),
new UriScheme (UriSchemeNntp, SchemeDelimiter, 119),
new UriScheme (UriSchemeGopher, SchemeDelimiter, 70),
};
@@ -1910,10 +1621,7 @@ namespace System {
private string GetOpaqueWiseSchemeDelimiter ()
{
- if (isOpaquePart)
- return ":";
- else
- return GetSchemeDelimiter (scheme);
+ return GetSchemeDelimiter (scheme);
}
[Obsolete]
@@ -2017,7 +1725,7 @@ namespace System {
private UriParser Parser {
get {
if (parser == null) {
- parser = UriParser.GetParser (Scheme);
+ parser = UriParser.GetParser (scheme);
// no specific parser ? then use a default one
if (parser == null)
parser = new DefaultUriParser ("*");
@@ -2029,6 +1737,9 @@ namespace System {
public string GetComponents (UriComponents components, UriFormat format)
{
+ if ((components & UriComponents.SerializationInfoString) == 0)
+ EnsureAbsoluteUri ();
+
return Parser.GetComponents (this, components, format);
}
@@ -2061,6 +1772,10 @@ namespace System {
if ((uri1 == null) && (uri2 == null))
return 0;
+ if (uri1 == null)
+ return -1;
+ if (uri2 == null)
+ return 1;
string s1 = uri1.GetComponents (partsToCompare, compareFormat);
string s2 = uri2.GetComponents (partsToCompare, compareFormat);
@@ -2072,19 +1787,33 @@ namespace System {
//
static bool NeedToEscapeDataChar (char b)
{
-#if NET_4_0
- // .NET 4.0 follows RFC 3986 Unreserved Characters
- return !((b >= 'A' && b <= 'Z') ||
- (b >= 'a' && b <= 'z') ||
- (b >= '0' && b <= '9') ||
- b == '-' || b == '.' || b == '_' || b == '~');
-#else
- return !((b >= 'A' && b <= 'Z') ||
- (b >= 'a' && b <= 'z') ||
- (b >= '0' && b <= '9') ||
- b == '_' || b == '~' || b == '!' || b == '\'' ||
- b == '(' || b == ')' || b == '*' || b == '-' || b == '.');
+ if ((b >= 'A' && b <= 'Z') ||
+ (b >= 'a' && b <= 'z') ||
+ (b >= '0' && b <= '9'))
+ return false;
+
+ switch (b) {
+ case '-':
+ case '.':
+ case '_':
+ case '~':
+ return false;
+ }
+
+#if !NET_4_5
+ switch (b) {
+ case '!':
+ case '\'':
+ case '(':
+ case ')':
+ case '*':
+ case '-':
+ case '.':
+ return false;
+ }
#endif
+
+ return true;
}
public static string EscapeDataString (string stringToEscape)
@@ -2135,15 +1864,15 @@ namespace System {
case '@':
case '_':
case '~':
-#if NET_4_0
- // .NET 4.0 follows RFC 3986
+ return false;
+#if NET_4_5
case '[':
case ']':
-#endif
return false;
- default:
- return true;
+#endif
}
+
+ return true;
}
public static string EscapeUriString (string stringToEscape)
diff --git a/mcs/class/System/System/UriElements.cs b/mcs/class/System/System/UriElements.cs
index 52319c64114..ef810620a41 100644
--- a/mcs/class/System/System/UriElements.cs
+++ b/mcs/class/System/System/UriElements.cs
@@ -33,20 +33,26 @@ namespace System {
public UriElements()
{
scheme = String.Empty;
- user = String.Empty;
+ delimiter = String.Empty;
host = String.Empty;
- port = String.Empty;
+ port = -1;
path = String.Empty;
- query = String.Empty;
- fragment = String.Empty;
+
+ isAbsoluteUri = true;
}
public string scheme;
+ public string delimiter;
public string user;
public string host;
- public string port;
+ public int port;
public string path;
public string query;
public string fragment;
+
+ public bool isAbsoluteUri;
+ public bool isUnixFilePath;
+ public bool isUnc;
+ public long scopeId;
}
}
diff --git a/mcs/class/System/System/UriHelper.cs b/mcs/class/System/System/UriHelper.cs
new file mode 100644
index 00000000000..397b508dcd8
--- /dev/null
+++ b/mcs/class/System/System/UriHelper.cs
@@ -0,0 +1,606 @@
+using System;
+using System.Globalization;
+using System.Text;
+using System.Collections.Generic;
+
+namespace System {
+ internal static class UriHelper {
+ internal const UriFormat ToStringUnescape = (UriFormat) 0x7FFF;
+
+ internal static bool IriParsing {
+ get { return Uri.IriParsing; }
+ }
+
+ [Flags]
+ internal enum FormatFlags {
+ None = 0,
+ HasComponentCharactersToNormalize = 1 << 0,
+ HasUriCharactersToNormalize = 1 << 1,
+ HasHost = 1 << 2,
+ HasFragmentPercentage = 1 << 3,
+ UserEscaped = 1 << 4,
+ IPv6Host = 1 << 5,
+ NoSlashReplace = 1 << 6,
+ NoReduce = 1 << 7,
+ HasWindowsPath = 1 << 8,
+ }
+
+ [Flags]
+ internal enum UriSchemes {
+ Http = 1 << 0,
+ Https = 1 << 1,
+ File = 1 << 2,
+ Ftp = 1 << 3,
+ Gopher = 1 << 4,
+ Ldap = 1 << 5,
+ Mailto = 1 << 6,
+ NetPipe = 1 << 7,
+ NetTcp = 1 << 8,
+ News = 1 << 9,
+ Nntp = 1 << 10,
+ Telnet = 1 << 11,
+ Uuid = 1 << 12,
+ Custom = 1 << 13,
+ CustomWithHost = 1 << 14,
+ All = ~0,
+ None = 0
+ }
+
+ private static UriSchemes GetScheme (string schemeName)
+ {
+ schemeName = schemeName.ToLowerInvariant ();
+
+ if (schemeName == "")
+ return UriSchemes.None;
+ if (schemeName == Uri.UriSchemeHttp)
+ return UriSchemes.Http;
+ if (schemeName == Uri.UriSchemeHttps)
+ return UriSchemes.Https;
+ if (schemeName == Uri.UriSchemeFile)
+ return UriSchemes.File;
+ if (schemeName == Uri.UriSchemeFtp)
+ return UriSchemes.Ftp;
+ if (schemeName == Uri.UriSchemeGopher)
+ return UriSchemes.Gopher;
+ if (schemeName == Uri.UriSchemeLdap)
+ return UriSchemes.Ldap;
+ if (schemeName == Uri.UriSchemeMailto)
+ return UriSchemes.Mailto;
+ if (schemeName == Uri.UriSchemeNetPipe)
+ return UriSchemes.NetPipe;
+ if (schemeName == Uri.UriSchemeNetTcp)
+ return UriSchemes.NetTcp;
+ if (schemeName == Uri.UriSchemeNews)
+ return UriSchemes.News;
+ if (schemeName == Uri.UriSchemeNntp)
+ return UriSchemes.Nntp;
+ if (schemeName == Uri.UriSchemeTelnet)
+ return UriSchemes.Telnet;
+ if (schemeName == Uri.UriSchemeUuid)
+ return UriSchemes.Uuid;
+
+ return UriSchemes.Custom;
+ }
+
+ internal static bool SchemeContains (UriSchemes keys, UriSchemes flag)
+ {
+ return (keys & flag) != 0;
+ }
+
+ internal static bool IsKnownScheme (string scheme)
+ {
+ return GetScheme (scheme) != UriSchemes.Custom;
+ }
+
+ internal static string HexEscapeMultiByte (char character)
+ {
+ const string hex_upper_chars = "0123456789ABCDEF";
+
+ var sb = new StringBuilder ();
+ byte [] bytes = Encoding.UTF8.GetBytes (new [] {character});
+ foreach (byte b in bytes) {
+ sb.Append ("%");
+ sb.Append (hex_upper_chars [(b & 0xf0) >> 4]);
+ sb.Append (hex_upper_chars [b & 0x0f]);
+ }
+
+ return sb.ToString ();
+ }
+
+ internal static bool SupportsQuery (string scheme)
+ {
+ return SupportsQuery (GetScheme (scheme));
+ }
+
+ internal static bool SupportsQuery (UriSchemes scheme)
+ {
+ if (SchemeContains (scheme, UriSchemes.File))
+ return IriParsing;
+
+ return !SchemeContains (scheme, UriSchemes.Ftp | UriSchemes.Gopher | UriSchemes.Nntp | UriSchemes.Telnet | UriSchemes.News);
+ }
+
+ internal static bool HasCharactersToNormalize (string str)
+ {
+ int len = str.Length;
+ for (int i = 0; i < len; i++) {
+ char c = str [i];
+ if (c != '%')
+ continue;
+
+ int iStart = i;
+ char surrogate;
+ char x = Uri.HexUnescapeMultiByte (str, ref i, out surrogate);
+
+ bool isEscaped = i - iStart > 1;
+ if (!isEscaped)
+ continue;
+
+ if ((x >= 'A' && x <= 'Z') || (x >= 'a' && x <= 'z') || (x >= '0' && x <= '9') ||
+ x == '-' || x == '.' || x == '_' || x == '~')
+ return true;
+
+ if (x > 0x7f)
+ return true;
+ }
+
+ return false;
+ }
+
+ internal static bool HasPercentage (string str)
+ {
+ int len = str.Length;
+ for (int i = 0; i < len; i++) {
+ char c = str [i];
+ if (c != '%')
+ continue;
+
+ int iStart = i;
+ char surrogate;
+ char x = Uri.HexUnescapeMultiByte (str, ref i, out surrogate);
+
+ if (x == '%')
+ return true;
+
+ bool isEscaped = i - iStart > 1;
+ if (!isEscaped)
+ return true;
+ }
+
+ return false;
+ }
+
+ internal static string FormatAbsolute (string str, string schemeName,
+ UriComponents component, UriFormat uriFormat, FormatFlags formatFlags = FormatFlags.None)
+ {
+ return Format (str, schemeName, UriKind.Absolute, component, uriFormat, formatFlags);
+ }
+
+ internal static string FormatRelative (string str, string schemeName, UriFormat uriFormat)
+ {
+ return Format (str, schemeName, UriKind.Relative, UriComponents.Path, uriFormat, FormatFlags.None);
+ }
+
+ private static string Format (string str, string schemeName, UriKind uriKind,
+ UriComponents component, UriFormat uriFormat, FormatFlags formatFlags)
+ {
+ if (string.IsNullOrEmpty (str))
+ return "";
+
+ if (UriHelper.HasCharactersToNormalize (str))
+ formatFlags |= UriHelper.FormatFlags.HasComponentCharactersToNormalize | FormatFlags.HasUriCharactersToNormalize;
+
+ if (component == UriComponents.Fragment && UriHelper.HasPercentage (str))
+ formatFlags |= UriHelper.FormatFlags.HasFragmentPercentage;
+
+ if (component == UriComponents.Host &&
+ str.Length > 1 && str [0] == '[' && str [str.Length - 1] == ']')
+ formatFlags |= UriHelper.FormatFlags.IPv6Host;
+
+ if (component == UriComponents.Path &&
+ str.Length >= 2 && str [1] != ':' &&
+ ('a' <= str [0] && str [0] <= 'z') || ('A' <= str [0] && str [0] <= 'Z'))
+ formatFlags |= UriHelper.FormatFlags.HasWindowsPath;
+
+ UriSchemes scheme = GetScheme (schemeName);
+
+ if (scheme == UriSchemes.Custom && (formatFlags & FormatFlags.HasHost) != 0)
+ scheme = UriSchemes.CustomWithHost;
+
+ var reduceAfter = UriSchemes.Http | UriSchemes.Https | UriSchemes.File | UriSchemes.NetPipe | UriSchemes.NetTcp;
+
+ if (IriParsing) {
+ reduceAfter |= UriSchemes.Ftp;
+ } else if (component == UriComponents.Path &&
+ (formatFlags & FormatFlags.NoSlashReplace) == 0) {
+ if (scheme == UriSchemes.Ftp)
+ str = Reduce (str.Replace ('\\', '/'), !IriParsing);
+ if (scheme == UriSchemes.CustomWithHost)
+ str = Reduce (str.Replace ('\\', '/'), false);
+ }
+
+ str = FormatString (str, scheme, uriKind, component, uriFormat, formatFlags);
+
+ if (component == UriComponents.Path &&
+ (formatFlags & FormatFlags.NoReduce) == 0) {
+ if (SchemeContains (scheme, reduceAfter))
+ str = Reduce (str, !IriParsing);
+ if (IriParsing && scheme == UriSchemes.CustomWithHost)
+ str = Reduce (str, false);
+ }
+
+ return str;
+ }
+
+ private static string FormatString (string str, UriSchemes scheme, UriKind uriKind,
+ UriComponents component, UriFormat uriFormat, FormatFlags formatFlags)
+ {
+ var s = new StringBuilder ();
+ int len = str.Length;
+ for (int i = 0; i < len; i++) {
+ char c = str [i];
+ if (c == '%') {
+ int iStart = i;
+ char surrogate;
+ bool invalidUnescape;
+ char x = Uri.HexUnescapeMultiByte (str, ref i, out surrogate, out invalidUnescape);
+
+
+ if (invalidUnescape
+#if !NET_4_0
+ && uriFormat == UriFormat.SafeUnescaped && char.IsControl (x)
+#endif
+ ) {
+ s.Append (c);
+ i = iStart;
+ continue;
+ }
+
+ string cStr = str.Substring (iStart, i-iStart);
+ s.Append (FormatChar (x, surrogate, cStr, scheme, uriKind, component, uriFormat, formatFlags));
+
+ i--;
+ } else
+ s.Append (FormatChar (c, char.MinValue, "" + c, scheme, uriKind, component, uriFormat, formatFlags));
+ }
+
+ return s.ToString ();
+ }
+
+ private static string FormatChar (char c, char surrogate, string cStr, UriSchemes scheme, UriKind uriKind,
+ UriComponents component, UriFormat uriFormat, FormatFlags formatFlags)
+ {
+ var isEscaped = cStr.Length != 1;
+
+ var userEscaped = (formatFlags & FormatFlags.UserEscaped) != 0;
+ if (!isEscaped && !userEscaped && NeedToEscape (c, scheme, component, uriKind, uriFormat, formatFlags))
+ return HexEscapeMultiByte (c);
+
+ if (isEscaped && (
+#if NET_4_0
+ (userEscaped && c < 0xFF) ||
+#endif
+ !NeedToUnescape (c, scheme, component, uriKind, uriFormat, formatFlags))) {
+ if (IriParsing &&
+ (c == '<' || c == '>' || c == '^' || c == '{' || c == '|' || c == '}' || c > 0x7F) &&
+ (formatFlags & FormatFlags.HasUriCharactersToNormalize) != 0)
+ return cStr.ToUpperInvariant (); //Upper case escape
+
+ return cStr; //Keep original case
+ }
+
+ if ((formatFlags & FormatFlags.NoSlashReplace) == 0 &&
+ c == '\\' && component == UriComponents.Path) {
+ if (!IriParsing && uriFormat != UriFormat.UriEscaped &&
+ SchemeContains (scheme, UriSchemes.Http | UriSchemes.Https))
+ return "/";
+
+ if (SchemeContains (scheme, UriSchemes.Http | UriSchemes.Https | UriSchemes.Ftp | UriSchemes.CustomWithHost))
+ return (isEscaped && uriFormat != UriFormat.UriEscaped) ? "\\" : "/";
+
+ if (SchemeContains (scheme, UriSchemes.NetPipe | UriSchemes.NetTcp | UriSchemes.File))
+ return "/";
+
+ if (SchemeContains (scheme, UriSchemes.Custom) &&
+ (formatFlags & FormatFlags.HasWindowsPath) == 0)
+ return "/";
+ }
+
+ var ret = c.ToString (CultureInfo.InvariantCulture);
+ if (surrogate != char.MinValue)
+ ret += surrogate.ToString (CultureInfo.InvariantCulture);
+
+ return ret;
+ }
+
+ private static bool NeedToUnescape (char c, UriSchemes scheme, UriComponents component, UriKind uriKind,
+ UriFormat uriFormat, FormatFlags formatFlags)
+ {
+ if ((formatFlags & FormatFlags.IPv6Host) != 0)
+ return false;
+
+ if (uriFormat == UriFormat.Unescaped)
+ return true;
+
+ UriSchemes sDecoders = UriSchemes.NetPipe | UriSchemes.NetTcp;
+
+ if (!IriParsing)
+ sDecoders |= UriSchemes.Http | UriSchemes.Https;
+
+ if (c == '/' || c == '\\') {
+ if (!IriParsing && uriKind == UriKind.Absolute && uriFormat != UriFormat.UriEscaped &&
+ uriFormat != UriFormat.SafeUnescaped)
+ return true;
+
+ if (SchemeContains (scheme, UriSchemes.File)) {
+ return component != UriComponents.Fragment &&
+ (component != UriComponents.Query || !IriParsing);
+ }
+
+ return component != UriComponents.Query && component != UriComponents.Fragment &&
+ SchemeContains (scheme, sDecoders);
+ }
+
+ if (c == '?') {
+ //Avoid creating new query
+ if (SupportsQuery (scheme) && component == UriComponents.Path)
+ return false;
+
+ if (!IriParsing && uriFormat == ToStringUnescape) {
+ if (SupportsQuery (scheme))
+ return component == UriComponents.Query || component == UriComponents.Fragment;
+
+ return component == UriComponents.Fragment;
+ }
+
+ return false;
+ }
+
+ if (c == '#')
+ return false;
+
+ if (uriFormat == ToStringUnescape && !IriParsing) {
+ if (uriKind == UriKind.Relative)
+ return false;
+
+ switch (c) {
+ case '$':
+ case '&':
+ case '+':
+ case ',':
+ case ';':
+ case '=':
+ case '@':
+ return true;
+ }
+
+ if (c < 0x20 || c == 0x7f)
+ return true;
+ }
+
+ if (uriFormat == UriFormat.SafeUnescaped || uriFormat == ToStringUnescape) {
+ switch (c) {
+ case '-':
+ case '.':
+ case '_':
+ case '~':
+ return true;
+ case ' ':
+ case '!':
+ case '"':
+ case '\'':
+ case '(':
+ case ')':
+ case '*':
+ case '<':
+ case '>':
+ case '^':
+ case '`':
+ case '{':
+ case '}':
+ case '|':
+ return uriKind != UriKind.Relative ||
+ (IriParsing && (formatFlags & FormatFlags.HasUriCharactersToNormalize) != 0);
+ case ':':
+ case '[':
+ case ']':
+ return uriKind != UriKind.Relative;
+ }
+
+ if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'))
+ return true;
+
+ if (c > 0x7f)
+ return true;
+
+ return false;
+ }
+
+ if (uriFormat == UriFormat.UriEscaped) {
+ if (!IriParsing) {
+ if (c == '.') {
+ if (SchemeContains (scheme, UriSchemes.File))
+ return component != UriComponents.Fragment;
+
+ return component != UriComponents.Query && component != UriComponents.Fragment &&
+ SchemeContains (scheme, sDecoders);
+ }
+
+ return false;
+ }
+
+ switch (c) {
+ case '-':
+ case '.':
+ case '_':
+ case '~':
+ return true;
+ }
+
+ if ((formatFlags & FormatFlags.HasUriCharactersToNormalize) != 0) {
+ switch (c) {
+ case '!':
+ case '\'':
+ case '(':
+ case ')':
+ case '*':
+ case ':':
+ case '[':
+ case ']':
+ return true;
+ }
+ }
+
+ if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9'))
+ return true;
+
+ return false;
+ }
+
+ return false;
+ }
+
+ private static bool NeedToEscape (char c, UriSchemes scheme, UriComponents component, UriKind uriKind,
+ UriFormat uriFormat, FormatFlags formatFlags)
+ {
+ if ((formatFlags & FormatFlags.IPv6Host) != 0)
+ return false;
+
+ if (c == '?') {
+ if (uriFormat == UriFormat.Unescaped)
+ return false;
+
+ if (!SupportsQuery (scheme))
+ return component != UriComponents.Fragment;
+
+ return false;
+ }
+
+ if (c == '#') {
+ //Avoid removing fragment
+ if (component == UriComponents.Path || component == UriComponents.Query)
+ return false;
+
+ if (component == UriComponents.Fragment &&
+ (uriFormat == ToStringUnescape || uriFormat == UriFormat.SafeUnescaped) &&
+ (formatFlags & FormatFlags.HasFragmentPercentage) != 0)
+ return true;
+
+#if NET_4_5
+ return false;
+#else
+ return uriFormat == UriFormat.UriEscaped ||
+ (uriFormat != UriFormat.Unescaped && (formatFlags & FormatFlags.HasComponentCharactersToNormalize) != 0);
+#endif
+ }
+
+ if (uriFormat == UriFormat.SafeUnescaped || uriFormat == ToStringUnescape) {
+ if (c == '%')
+ return uriKind != UriKind.Relative;
+ }
+
+ if (uriFormat == UriFormat.SafeUnescaped) {
+ if (c < 0x20 || c == 0x7F)
+ return true;
+ }
+
+ if (uriFormat == UriFormat.UriEscaped) {
+ if (c < 0x20 || c >= 0x7F)
+ return component != UriComponents.Host;
+
+ switch (c) {
+ case ' ':
+ case '"':
+ case '%':
+ case '<':
+ case '>':
+ case '^':
+ case '`':
+ case '{':
+ case '}':
+ case '|':
+ return true;
+ case '[':
+ case ']':
+ return !IriParsing;
+ case '\\':
+ return component != UriComponents.Path ||
+ SchemeContains (scheme,
+ UriSchemes.Gopher | UriSchemes.Ldap | UriSchemes.Mailto | UriSchemes.Nntp |
+ UriSchemes.Telnet | UriSchemes.News | UriSchemes.Custom);
+ }
+ }
+
+ return false;
+ }
+
+ // This is called "compacting" in the MSDN documentation
+ internal static string Reduce (string path, bool trimDots)
+ {
+ // quick out, allocation-free, for a common case
+ if (path == "/")
+ return path;
+
+ bool endWithSlash = false;
+
+ List<string> result = new List<string> ();
+
+ string[] segments = path.Split ('/');
+ int lastSegmentIndex = segments.Length - 1;
+ for (var i = 0; i <= lastSegmentIndex; i++) {
+ string segment = segments [i];
+
+ if (i == lastSegmentIndex &&
+ (segment.Length == 0 || segment == ".." || segment == "."))
+ endWithSlash = true;
+
+ if ((i == 0 || i == lastSegmentIndex) && segment.Length == 0)
+ continue;
+
+ if (segment == "..") {
+ int resultCount = result.Count;
+ // in 2.0 profile, skip leading ".." parts
+ if (resultCount == 0)
+ continue;
+
+ result.RemoveAt (resultCount - 1);
+ continue;
+ }
+
+ if (segment == "." ||
+ (trimDots && segment.EndsWith (".", StringComparison.Ordinal))) {
+ segment = segment.TrimEnd ('.');
+ if (segment == "" && i < lastSegmentIndex)
+ continue;
+ }
+
+ endWithSlash = false;
+
+ result.Add (segment);
+ }
+
+ if (result.Count == 0)
+ return "/";
+
+ StringBuilder res = new StringBuilder ();
+
+ if (path [0] == '/')
+ res.Append ('/');
+
+ bool first = true;
+ foreach (string part in result) {
+ if (first) {
+ first = false;
+ } else {
+ res.Append ('/');
+ }
+ res.Append (part);
+ }
+
+ if (path [path.Length - 1] == '/' || endWithSlash)
+ res.Append ('/');
+
+ return res.ToString ();
+ }
+ }
+}
diff --git a/mcs/class/System/System/UriParseComponents.cs b/mcs/class/System/System/UriParseComponents.cs
index cf3613078f8..0de6d8f91ef 100644
--- a/mcs/class/System/System/UriParseComponents.cs
+++ b/mcs/class/System/System/UriParseComponents.cs
@@ -26,93 +26,289 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System.IO;
+using System.Net;
using System.Text;
-
+using System.Globalization;
namespace System {
internal class ParserState
{
- public ParserState (string uri)
+ public ParserState (string uri, UriKind kind)
{
remaining = uri;
+ this.kind = kind;
elements = new UriElements ();
}
public string remaining;
+ public UriKind kind;
public UriElements elements;
+ public string error;
}
// Parse Uri components (scheme, userinfo, host, query, fragment)
// http://www.ietf.org/rfc/rfc3986.txt
internal static class UriParseComponents
{
- public static UriElements ParseComponents (string uri)
+ public static UriElements ParseComponents (string uri, UriKind kind)
+ {
+ UriElements elements;
+ string error;
+
+ if (!TryParseComponents (uri, kind, out elements, out error))
+ throw new UriFormatException (error);
+
+ return elements;
+ }
+
+ public static bool TryParseComponents (string uri, UriKind kind, out UriElements elements, out string error)
{
- ParserState state = new ParserState (uri);
+ uri = uri.Trim ();
+
+ ParserState state = new ParserState (uri, kind);
+ elements = state.elements;
+ error = null;
+
+ if (uri.Length == 0 && (kind == UriKind.Relative || kind == UriKind.RelativeOrAbsolute)){
+ state.elements.isAbsoluteUri = false;
+ return true;
+ }
- bool ok = ParseScheme (ref state);
- if (ok)
- ok = ParseAuthority (ref state);
- if (ok)
- ok = ParsePath (ref state);
- if (ok)
- ok = ParseQuery (ref state);
- if (ok)
- ParseFragment (ref state);
+ if (uri.Length <= 1 && kind == UriKind.Absolute) {
+ error = "Absolute URI is too short";
+ return false;
+ }
+
+ bool ok = ParseFilePath (state) &&
+ ParseScheme (state);
+
+ var scheme = state.elements.scheme;
+ UriParser parser = null;
+ if (!string.IsNullOrEmpty (scheme)) {
+ parser = UriParser.GetParser (scheme);
+ if (parser != null && !(parser is DefaultUriParser))
+ return true;
+ }
+
+ ok = ok &&
+ ParseAuthority (state) &&
+ ParsePath (state) &&
+ ParseQuery (state) &&
+ ParseFragment (state);
+
+ if (string.IsNullOrEmpty (state.elements.host) &&
+ (scheme == Uri.UriSchemeHttp || scheme == Uri.UriSchemeGopher || scheme == Uri.UriSchemeNntp ||
+ scheme == Uri.UriSchemeHttps || scheme == Uri.UriSchemeFtp))
+ state.error = "Invalid URI: The Authority/Host could not be parsed.";
+
+ if (!string.IsNullOrEmpty (state.elements.host) &&
+ Uri.CheckHostName (state.elements.host) == UriHostNameType.Unknown)
+ state.error = "Invalid URI: The hostname could not be parsed.";
+
+ if (!string.IsNullOrEmpty (state.error)) {
+ elements = null;
+ error = state.error;
+ return false;
+ }
- return state.elements;
+ return true;
}
+
// ALPHA
private static bool IsAlpha (char ch)
{
return (('a' <= ch) && (ch <= 'z')) ||
(('A' <= ch) && (ch <= 'Z'));
}
+
+ private static bool ParseFilePath (ParserState state)
+ {
+ return ParseWindowsFilePath (state) &&
+ ParseWindowsUNC (state) &&
+ ParseUnixFilePath (state);
+ }
+
+ private static bool ParseWindowsFilePath (ParserState state)
+ {
+ var scheme = state.elements.scheme;
+
+ if (!string.IsNullOrEmpty (scheme) &&
+ scheme != Uri.UriSchemeFile && UriHelper.IsKnownScheme (scheme))
+ return state.remaining.Length > 0;
+
+ string part = state.remaining;
+
+ if (part.Length > 0 && (part [0] == '/' || part [0] == '\\'))
+ part = part.Substring (1);
+
+ if (part.Length < 2 || part [1] != ':')
+ return state.remaining.Length > 0;
+
+ if (!IsAlpha (part [0])) {
+ if (state.kind == UriKind.Absolute) {
+ state.error = "Invalid URI: The URI scheme is not valid.";
+ return false;
+ }
+ state.elements.isAbsoluteUri = false;
+ state.elements.path = part;
+ return false;
+ }
+
+ if (part.Length > 2 && part [2] != '\\' && part [2] != '/') {
+ state.error = "Relative file path is not allowed.";
+ return false;
+ }
+
+ if (string.IsNullOrEmpty (scheme)) {
+ state.elements.scheme = Uri.UriSchemeFile;
+ state.elements.delimiter = "://";
+ }
+
+ state.elements.path = part.Replace ("\\", "/");
+
+ return false;
+ }
+
+ private static bool ParseWindowsUNC (ParserState state)
+ {
+ string part = state.remaining;
+
+ if (part.Length < 2 || part [0] != '\\' || part [1] != '\\')
+ return state.remaining.Length > 0;
+
+ state.elements.scheme = Uri.UriSchemeFile;
+ state.elements.delimiter = "://";
+ state.elements.isUnc = true;
+
+ part = part.TrimStart ('\\');
+ int pos = part.IndexOf ('\\');
+ if (pos > 0) {
+ state.elements.path = part.Substring (pos);
+ state.elements.host = part.Substring (0, pos);
+ } else { // "\\\\server"
+ state.elements.host = part;
+ state.elements.path = String.Empty;
+ }
+ state.elements.path = state.elements.path.Replace ("\\", "/");
+
+ return false;
+ }
+
+ private static bool ParseUnixFilePath (ParserState state)
+ {
+ string part = state.remaining;
+
+ if (part.Length < 1 || part [0] != '/' || Path.DirectorySeparatorChar != '/')
+ return state.remaining.Length > 0;
+
+ state.elements.scheme = Uri.UriSchemeFile;
+ state.elements.delimiter = "://";
+ state.elements.isUnixFilePath = true;
+ state.elements.isAbsoluteUri = (state.kind == UriKind.Relative)? false : true;
+
+ if (part.Length >= 2 && part [0] == '/' && part [1] == '/') {
+ part = part.TrimStart (new char [] {'/'});
+ state.elements.path = '/' + part;
+ } else
+ state.elements.path = part;
+
+ return false;
+ }
// 3.1) scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
- private static bool ParseScheme (ref ParserState state)
+ private static bool ParseScheme (ParserState state)
{
string part = state.remaining;
- if (!IsAlpha (part [0]))
- return part.Length > 0;
-
StringBuilder sb = new StringBuilder ();
sb.Append (part [0]);
int index;
for (index = 1; index < part.Length; index++ ) {
char ch = part [index];
- if (ch != '.' && ch != '-' && ch != '+' && !IsAlpha (ch))
+ if (ch != '.' && ch != '-' && ch != '+' && !IsAlpha (ch) && !Char.IsDigit (ch))
break;
sb.Append (ch);
}
- if (index + 1 <= part.Length && part [index] == ':') {
- state.elements.scheme = sb.ToString ();
- state.remaining = part.Substring (index + 1);
+ if (index == 0 || index >= part.Length) {
+ if (state.kind == UriKind.Absolute) {
+ state.error = "Invalid URI: The format of the URI could not be determined.";
+ return false;
+ }
+
+ state.elements.isAbsoluteUri = false;
+ return state.remaining.Length > 0;
+ }
+
+ if (part [index] != ':') {
+ if (state.kind == UriKind.Absolute) {
+ state.error = "Invalid URI: The URI scheme is not valid.";
+ return false;
+ }
+
+ state.elements.isAbsoluteUri = false;
+ return state.remaining.Length > 0;
+ }
+
+ state.elements.scheme = sb.ToString ().ToLowerInvariant ();
+ state.remaining = part.Substring (index);
+
+ // Check scheme name characters as specified in RFC2396.
+ // Note: different checks in 1.x and 2.0
+ if (!Uri.CheckSchemeName (state.elements.scheme)) {
+ if (state.kind == UriKind.Absolute) {
+ state.error = "Invalid URI: The URI scheme is not valid.";
+ return false;
+ }
+
+ state.elements.isAbsoluteUri = false;
+ return state.remaining.Length > 0;
+ }
+
+ if (state.elements.scheme == Uri.UriSchemeFile) {
+ // under Windows all file:// URI are considered UNC, which is not the case other MacOS (e.g. Silverlight)
+#if BOOTSTRAP_BASIC
+ state.elements.isUnc = (Path.DirectorySeparatorChar == '\\');
+#else
+ state.elements.isUnc = Environment.IsRunningOnWindows;
+#endif
+ }
+
+ return ParseDelimiter (state);
+ }
+
+ private static bool ParseDelimiter (ParserState state)
+ {
+ var delimiter = Uri.GetSchemeDelimiter (state.elements.scheme);
+
+ if (!state.remaining.StartsWith (delimiter, StringComparison.Ordinal)) {
+ if (UriHelper.IsKnownScheme (state.elements.scheme)) {
+ state.error = "Invalid URI: The Authority/Host could not be parsed.";
+ return false;
+ }
+
+ delimiter = ":";
}
+ state.elements.delimiter = delimiter;
+
+ state.remaining = state.remaining.Substring (delimiter.Length);
+
return state.remaining.Length > 0;
}
- private static bool ParseAuthority (ref ParserState state)
+ private static bool ParseAuthority (ParserState state)
{
- string part = state.remaining;
+ if (state.elements.delimiter != Uri.SchemeDelimiter && state.elements.scheme != Uri.UriSchemeMailto)
+ return state.remaining.Length > 0;
- if (part.Length < 2 || part [0] != '/' || part [1] != '/')
- return part.Length > 0;
-
- state.remaining = part.Substring (2);
-
- bool ok = ParseUser (ref state);
- if (ok)
- ok = ParseHost (ref state);
- if (ok)
- ok = ParsePort (ref state);
- return ok;
+ return ParseUser (state) &&
+ ParseHost (state) &&
+ ParsePort (state);
}
static bool IsUnreserved (char ch)
@@ -128,7 +324,7 @@ namespace System {
}
// userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
- private static bool ParseUser (ref ParserState state)
+ private static bool ParseUser (ParserState state)
{
string part = state.remaining;
StringBuilder sb = null;
@@ -152,6 +348,11 @@ namespace System {
}
if (index + 1 <= part.Length && part [index] == '@') {
+ if (state.elements.scheme == Uri.UriSchemeFile) {
+ state.error = "Invalid URI: The hostname could not be parsed.";
+ return false;
+ }
+
state.elements.user = sb == null ? "" : sb.ToString ();
state.remaining = state.remaining.Substring (index + 1);
}
@@ -160,32 +361,75 @@ namespace System {
}
// host = IP-literal / IPv4address / reg-name
- private static bool ParseHost (ref ParserState state)
+ private static bool ParseHost (ParserState state)
{
string part = state.remaining;
+
+ if (state.elements.scheme == Uri.UriSchemeFile && part.Length >= 2 &&
+ (part [0] == '\\' || part [0] == '/') && part [1] == part [0]) {
+ part = part.TrimStart (part [0]);
+ state.remaining = part;
+ }
+
+ if (!ParseWindowsFilePath (state))
+ return false;
+
StringBuilder sb = new StringBuilder ();
+ var tmpHost = "";
+
+ var possibleIpv6 = false;
+
int index;
for (index = 0; index < part.Length; index++) {
char ch = part [index];
- if (ch == '/' || ch == ':' || ch == '#' || ch == '?')
+ if (ch == '/' || ch == '#' || ch == '?')
break;
+
+ // Possible IPv6
+ if (string.IsNullOrEmpty (tmpHost) && ch == ':') {
+ tmpHost = sb.ToString ();
+ possibleIpv6 = true;
+ }
sb.Append (ch);
+
+ if (possibleIpv6 && ch == ']')
+ break;
}
- if (index <= part.Length)
- state.remaining = part.Substring (index);
-
- state.elements.host = sb.ToString();
+ if (possibleIpv6) {
+ IPv6Address ipv6addr;
+ if (IPv6Address.TryParse (sb.ToString (), out ipv6addr)) {
+#if NET_4_5
+ var ipStr = ipv6addr.ToString (false);
+#else
+ var ipStr = ipv6addr.ToString (true);
+#endif
+ //remove scope
+ ipStr = ipStr.Split ('%') [0];
+
+ state.elements.host = "[" + ipStr + "]";
+ state.elements.scopeId = ipv6addr.ScopeId;
+
+ state.remaining = part.Substring (sb.Length);
+ return state.remaining.Length > 0;
+ }
+ state.elements.host = tmpHost;
+ } else
+ state.elements.host = sb.ToString ();
+
+ state.elements.host = state.elements.host.ToLowerInvariant ();
+
+ state.remaining = part.Substring (state.elements.host.Length);
return state.remaining.Length > 0;
}
// port = *DIGIT
- private static bool ParsePort (ref ParserState state)
+ private static bool ParsePort (ParserState state)
{
string part = state.remaining;
if (part.Length == 0 || part [0] != ':')
@@ -197,21 +441,36 @@ namespace System {
for (index = 1; index < part.Length; index++ ) {
char ch = part [index];
- if (!char.IsDigit (ch))
- break;
+ if (!char.IsDigit (ch)) {
+ if (ch == '/' || ch == '#' || ch == '?')
+ break;
+
+ state.error = "Invalid URI: Invalid port specified.";
+ return false;
+ }
sb.Append (ch);
}
-
+
if (index <= part.Length)
state.remaining = part.Substring (index);
+
+ if (sb.Length == 0)
+ return state.remaining.Length > 0;
- state.elements.port = sb.ToString();
+ int port;
+ if (!Int32.TryParse (sb.ToString (), NumberStyles.None, CultureInfo.InvariantCulture, out port) ||
+ port < 0 || port > UInt16.MaxValue) {
+ state.error = "Invalid URI: Invalid port number";
+ return false;
+ }
+
+ state.elements.port = port;
return state.remaining.Length > 0;
}
- private static bool ParsePath (ref ParserState state)
+ private static bool ParsePath (ParserState state)
{
string part = state.remaining;
StringBuilder sb = new StringBuilder ();
@@ -221,7 +480,9 @@ namespace System {
char ch = part [index];
- if (ch == '#' || ch == '?')
+ var supportsQuery = UriHelper.SupportsQuery (state.elements.scheme);
+
+ if (ch == '#' || (supportsQuery && ch == '?'))
break;
sb.Append (ch);
@@ -235,9 +496,12 @@ namespace System {
return state.remaining.Length > 0;
}
- private static bool ParseQuery (ref ParserState state)
+ private static bool ParseQuery (ParserState state)
{
string part = state.remaining;
+
+ if (!UriHelper.SupportsQuery (state.elements.scheme))
+ return part.Length > 0;
if (part.Length == 0 || part [0] != '?')
return part.Length > 0;
@@ -263,7 +527,7 @@ namespace System {
return state.remaining.Length > 0;
}
- private static bool ParseFragment (ref ParserState state)
+ private static bool ParseFragment (ParserState state)
{
string part = state.remaining;
diff --git a/mcs/class/System/System/UriParser.cs b/mcs/class/System/System/UriParser.cs
index d5786bb04a6..5eda9aadc17 100644
--- a/mcs/class/System/System/UriParser.cs
+++ b/mcs/class/System/System/UriParser.cs
@@ -50,7 +50,22 @@ namespace System {
if ((format < UriFormat.UriEscaped) || (format > UriFormat.SafeUnescaped))
throw new ArgumentOutOfRangeException ("format");
- UriElements elements = UriParseComponents.ParseComponents (uri.OriginalString.Trim ());
+ if ((components & UriComponents.SerializationInfoString) != 0) {
+ if (components != UriComponents.SerializationInfoString)
+ throw new ArgumentOutOfRangeException ("components", "UriComponents.SerializationInfoString must not be combined with other UriComponents.");
+
+ if (!uri.IsAbsoluteUri)
+ return UriHelper.FormatRelative (uri.OriginalString, "", format);
+
+ components |= UriComponents.AbsoluteUri;
+ }
+
+ return GetComponentsHelper (uri, components, format);
+ }
+
+ internal string GetComponentsHelper (Uri uri, UriComponents components, UriFormat format)
+ {
+ UriElements elements = UriParseComponents.ParseComponents (uri.OriginalString.Trim (), UriKind.Absolute);
string scheme = scheme_name;
int dp = default_port;
@@ -62,29 +77,44 @@ namespace System {
throw new SystemException ("URI Parser: scheme mismatch: " + scheme + " vs. " + elements.scheme);
}
+ var formatFlags = UriHelper.FormatFlags.None;
+ if (UriHelper.HasCharactersToNormalize (uri.OriginalString))
+ formatFlags |= UriHelper.FormatFlags.HasUriCharactersToNormalize;
+
+ if (uri.UserEscaped)
+ formatFlags |= UriHelper.FormatFlags.UserEscaped;
+
+ if (!string.IsNullOrEmpty (elements.host))
+ formatFlags |= UriHelper.FormatFlags.HasHost;
+
// it's easier to answer some case directly (as the output isn't identical
// when mixed with others components, e.g. leading slash, # ...)
switch (components) {
case UriComponents.Scheme:
return scheme;
case UriComponents.UserInfo:
- return elements.user;
+ return elements.user ?? "";
case UriComponents.Host:
return elements.host;
case UriComponents.Port: {
- string p = elements.port;
- if (p != null && p.Length != 0 && p != dp.ToString ())
- return p;
+ int p = elements.port;
+ if (p >= 0 && p != dp)
+ return p.ToString (CultureInfo.InvariantCulture);
return String.Empty;
}
case UriComponents.Path:
- return Format (IgnoreFirstCharIf (elements.path, '/'), format);
+ var path = elements.path;
+ if (scheme != Uri.UriSchemeMailto && scheme != Uri.UriSchemeNews)
+ path = IgnoreFirstCharIf (elements.path, '/');
+ return UriHelper.FormatAbsolute (path, scheme, UriComponents.Path, format, formatFlags);
case UriComponents.Query:
- return Format (elements.query, format);
+ return UriHelper.FormatAbsolute (elements.query, scheme, UriComponents.Query, format, formatFlags);
case UriComponents.Fragment:
- return Format (elements.fragment, format);
+ return UriHelper.FormatAbsolute (elements.fragment, scheme, UriComponents.Fragment, format, formatFlags);
case UriComponents.StrongPort: {
- return elements.port.Length != 0 ? elements.port : dp.ToString ();
+ return elements.port >= 0
+ ? elements.port.ToString (CultureInfo.InvariantCulture)
+ : dp.ToString (CultureInfo.InvariantCulture);
}
case UriComponents.SerializationInfoString:
components = UriComponents.AbsoluteUri;
@@ -97,12 +127,12 @@ namespace System {
if ((components & UriComponents.Scheme) != 0) {
sb.Append (scheme);
- sb.Append (Uri.GetSchemeDelimiter (scheme));
+ sb.Append (elements.delimiter);
}
if ((components & UriComponents.UserInfo) != 0) {
string userinfo = elements.user;
- if (!String.IsNullOrEmpty (userinfo)) {
+ if (userinfo != null) {
sb.Append (elements.user);
sb.Append ('@');
}
@@ -115,7 +145,7 @@ namespace System {
// otherwise only display if ut's not the default port
if ((components & UriComponents.StrongPort) != 0) {
sb.Append (":");
- if (elements.port.Length != 0) {
+ if (elements.port >= 0) {
sb.Append (elements.port);
} else {
sb.Append (dp);
@@ -123,36 +153,38 @@ namespace System {
}
if ((components & UriComponents.Port) != 0) {
- string p = elements.port;
- if (p != null && p.Length != 0 && p != dp.ToString ()) {
+ int p = elements.port;
+ if (p >= 0 && p != dp) {
sb.Append (":");
sb.Append (elements.port);
}
}
if ((components & UriComponents.Path) != 0) {
+ string path = elements.path;
if ((components & UriComponents.PathAndQuery) != 0 &&
- (elements.path.Length == 0 || !elements.path.StartsWith ("/")))
+ (path.Length == 0 || !path.StartsWith ("/", StringComparison.Ordinal)) &&
+ elements.delimiter == Uri.SchemeDelimiter)
sb.Append ("/");
- sb.Append (elements.path);
+ sb.Append (UriHelper.FormatAbsolute (path, scheme, UriComponents.Path, format, formatFlags));
}
if ((components & UriComponents.Query) != 0) {
string query = elements.query;
- if (!String.IsNullOrEmpty (query)) {
+ if (query != null) {
sb.Append ("?");
- sb.Append (elements.query);
+ sb.Append (UriHelper.FormatAbsolute (query, scheme, UriComponents.Query, format, formatFlags));
}
}
- string result = Format (sb.ToString (), format);
if ((components & UriComponents.Fragment) != 0) {
string f = elements.fragment;
- if (!String.IsNullOrEmpty (f)) {
- result += "#" + Format (f, format);
+ if (f != null) {
+ sb.Append ("#");
+ sb.Append (UriHelper.FormatAbsolute (f, scheme, UriComponents.Fragment, format, formatFlags));
}
}
- return result;
+ return sb.ToString ();
}
protected internal virtual void InitializeAndValidate (Uri uri, out UriFormatException parsingError)
@@ -167,6 +199,11 @@ namespace System {
protected internal virtual bool IsBaseOf (Uri baseUri, Uri relativeUri)
{
+ if (baseUri == null)
+ throw new ArgumentNullException ("baseUri");
+ if (relativeUri == null)
+ throw new ArgumentNullException ("relativeUri");
+
// compare, not case sensitive, the scheme, host and port (+ user informations)
if (Uri.Compare (baseUri, relativeUri, UriComponents.SchemeAndServer | UriComponents.UserInfo, UriFormat.Unescaped, StringComparison.InvariantCultureIgnoreCase) != 0)
return false;
@@ -226,23 +263,6 @@ namespace System {
return s;
}
- private string Format (string s, UriFormat format)
- {
- if (s.Length == 0)
- return String.Empty;
-
- switch (format) {
- case UriFormat.UriEscaped:
- return Uri.EscapeString (s, Uri.EscapeCommonHexBrackets);
- case UriFormat.SafeUnescaped:
- return Uri.UnescapeDataString (s, true);
- case UriFormat.Unescaped:
- return Uri.Unescape (s, false);
- default:
- throw new ArgumentOutOfRangeException ("format");
- }
- }
-
// static methods
private static void CreateDefaults ()
diff --git a/mcs/class/System/System_test.dll.sources b/mcs/class/System/System_test.dll.sources
index 33f8326b2d6..6ff1a9488a3 100644
--- a/mcs/class/System/System_test.dll.sources
+++ b/mcs/class/System/System_test.dll.sources
@@ -25,11 +25,13 @@ System/LdapStyleUriParserTest.cs
System/NetPipeStyleUriParserTest.cs
System/NetTcpStyleUriParserTest.cs
System/NewsStyleUriParserTest.cs
+System/StringTester.cs
System/UriBuilderTest.cs
System/UriParserTest.cs
System/UriTest.cs
System/UriTest2.cs
System/UriTest3.cs
+System/UriPermutationsTest.cs
System/UriTypeConverterTest.cs
System.CodeDom/CodeArgumentReferenceExpressionTest.cs
System.CodeDom/CodeArrayCreateExpressionTest.cs
@@ -180,6 +182,7 @@ System.Diagnostics/DelimitedListTraceListenerTest.cs
System.Diagnostics/EventLogTest.cs
System.Diagnostics/StopwatchTest.cs
System.Diagnostics/SourceSwitchTest.cs
+System.Diagnostics/TextWriterTraceListenerHelper.cs
System.Diagnostics/TextWriterTraceListenerTest.cs
System.Diagnostics/TraceSourceTest.cs
System.Diagnostics/TraceListenerTest.cs
@@ -246,6 +249,7 @@ System.Net.Sockets/TcpClientTest.cs
System.Net.Sockets/TcpListenerTest.cs
System.Net.Sockets/SocketTest.cs
System.Net.Sockets/SocketAsyncEventArgsTest.cs
+System.Net.Sockets/SocketConnectAsyncTest.cs
System.Net.Sockets/UdpClientTest.cs
System.Net.Sockets/SocketAsyncTest.cs
System.Net.Mail/LinkedResourceTest.cs
diff --git a/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs b/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs
index bafbf392526..5c3a1a78c06 100644
--- a/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs
+++ b/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs
@@ -325,9 +325,6 @@ namespace MonoTests.System.Collections.Generic {
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void DeserializeTest ()
{
MemoryStream ms = new MemoryStream ();
diff --git a/mcs/class/System/Test/System.Collections.Generic/StackTest.cs b/mcs/class/System/Test/System.Collections.Generic/StackTest.cs
index 6ccb4051918..3f8b64ec0d0 100644
--- a/mcs/class/System/Test/System.Collections.Generic/StackTest.cs
+++ b/mcs/class/System/Test/System.Collections.Generic/StackTest.cs
@@ -292,9 +292,6 @@ namespace MonoTests.System.Collections.Generic
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif // TARGET_JVM
public void DeserializeTest ()
{
MemoryStream ms = new MemoryStream ();
diff --git a/mcs/class/System/Test/System.ComponentModel/ArrayConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/ArrayConverterTests.cs
index c966fb3db8a..5ec42d623b4 100644
--- a/mcs/class/System/Test/System.ComponentModel/ArrayConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/ArrayConverterTests.cs
@@ -45,9 +45,7 @@ namespace MonoTests.System.ComponentModel
numbers, (Type) null);
Assert.Fail ("#1");
} catch (ArgumentNullException ex) {
-#if !TARGET_JVM
Assert.AreEqual ("destinationType", ex.ParamName, "#2");
-#endif
}
}
diff --git a/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs
index ea5bd1b3163..504a30a2682 100644
--- a/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs
@@ -206,9 +206,6 @@ namespace MonoTests.System.ComponentModel
}
[Test]
-#if TARGET_JVM
- [NUnit.Framework.Category("NotWorking")]
-#endif
public void ConvertFrom_String_Flags ()
{
EnumConverter converter = new EnumConverter (typeof (E2));
diff --git a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs
index 4f3e26ceae9..4e635bc451f 100644
--- a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs
@@ -35,9 +35,6 @@ namespace MonoTests.System.ComponentModel
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7229")]
-#endif
public void Empty ()
{
PropertyDescriptorCollection descriptors = PropertyDescriptorCollection.Empty;
diff --git a/mcs/class/System/Test/System.ComponentModel/ToolboxItemAttributeTests.cs b/mcs/class/System/Test/System.ComponentModel/ToolboxItemAttributeTests.cs
index 5910489b474..df863e939d7 100644
--- a/mcs/class/System/Test/System.ComponentModel/ToolboxItemAttributeTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/ToolboxItemAttributeTests.cs
@@ -18,9 +18,6 @@ namespace MonoTests.System.ComponentModel
{
#if !MOBILE
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7215, 7216")]
-#endif
public void DefaultType ()
{
ToolboxItemAttribute attr = new ToolboxItemAttribute (true);
diff --git a/mcs/class/System/Test/System.ComponentModel/TypeConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/TypeConverterTests.cs
index ebadcbfac03..490fc126eb5 100644
--- a/mcs/class/System/Test/System.ComponentModel/TypeConverterTests.cs
+++ b/mcs/class/System/Test/System.ComponentModel/TypeConverterTests.cs
@@ -44,9 +44,6 @@ namespace MonoTests.System.ComponentModel
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7229")]
-#endif
public void GetProperties ()
{
PropertyDescriptorCollection properties = null;
diff --git a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs
index 98d87d4ab98..f100f43c3f4 100644
--- a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs
+++ b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs
@@ -288,9 +288,7 @@ namespace MonoTests.System.Configuration {
// This test will fail when there are newer versions
// of the test assemblies - so conditionalize it in
// such cases.
-#if TARGET_JVM
- string expected = "MonoTests.System.Configuration.ProviderPoker, System.Test, Version=0.0.0.0";
-#elif NET_4_5
+#if NET_4_5
string expected = "MonoTests.System.Configuration.ProviderPoker, System_test_net_4_5, Version=0.0.0.0";
#elif NET_4_0
string expected = "MonoTests.System.Configuration.ProviderPoker, System_test_net_4_0, Version=0.0.0.0";
diff --git a/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs b/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs
index 40939e9ef2d..cba19b160e4 100644
--- a/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs
+++ b/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs
@@ -44,9 +44,6 @@ namespace MonoTests.System.Configuration
[TestFixture]
public class SettingsBaseTest
{
-#if TARGET_JVM
- class CustomerException : Exception { }
-#endif
class MySettings : SettingsBase
{
[UserScopedSetting] // ignored in non-ApplicationSettingsBase
@@ -235,11 +232,7 @@ namespace MonoTests.System.Configuration
try {
Assert.AreEqual (100, s.Foo, "#1");
Assert.Fail ("#2");
-#if !TARGET_JVM
} catch (Win32Exception) {
-#else
- } catch (CustomerException) {
-#endif
}
}
@@ -264,11 +257,7 @@ namespace MonoTests.System.Configuration
{
public override SettingsPropertyValueCollection GetPropertyValues (SettingsContext context, SettingsPropertyCollection props)
{
-#if !TARGET_JVM
throw new Win32Exception (); // unlikely thrown otherwise.
-#else
- throw new CustomerException (); // unlikely thrown otherwise.
-#endif
}
}
diff --git a/mcs/class/System/Test/System.Diagnostics/SourceSwitchTest.cs b/mcs/class/System/Test/System.Diagnostics/SourceSwitchTest.cs
index 05e0a6d1294..820e84d2a89 100644
--- a/mcs/class/System/Test/System.Diagnostics/SourceSwitchTest.cs
+++ b/mcs/class/System/Test/System.Diagnostics/SourceSwitchTest.cs
@@ -31,6 +31,8 @@
#if !MOBILE
+#define TRACE
+
using NUnit.Framework;
using System;
using System.Text;
@@ -43,11 +45,15 @@ namespace MonoTests.System.Diagnostics
[TestFixture]
public class SourceSwitchTest
{
+ internal TraceSource traceSource { get; set; }
+ internal TestTextWriterTraceListener txtTraceListener;
+
+
[Test]
public void ConstructorNullName ()
{
SourceSwitch s = new SourceSwitch (null);
- Assert.IsNull (s.DisplayName);
+ Assert.IsEmpty (s.DisplayName);
}
[Test]
@@ -98,6 +104,80 @@ namespace MonoTests.System.Diagnostics
Assert.IsTrue (s.ShouldTrace (TraceEventType.Resume), "#9");
Assert.IsTrue (s.ShouldTrace (TraceEventType.Transfer), "#10");
}
+
+
+ [SetUp]
+ public void InitalizeSourceSwitchTest()
+ {
+ // Initializing the TraceSource instance
+ traceSource = new TraceSource ("LoggingTraceSource");
+ traceSource.Listeners.Remove("Default");
+ traceSource.Switch = new SourceSwitch ("MySwitch");
+
+ // Initializing the TraceListener instance
+ txtTraceListener = new TestTextWriterTraceListener (Console.Out);
+ traceSource.Listeners.Add (txtTraceListener);
+ }
+
+ [Test]
+ public void setSwitchToCritical()
+ {
+ traceSource.Switch.Level = SourceLevels.Critical;
+ LogAllTraceLevels ();
+ // Switch.Level is Critical so it should log Critical
+ Assert.AreEqual (1, txtTraceListener.TotalMessageCount);
+ Assert.AreEqual (1, txtTraceListener.CritialMessageCount);
+ }
+
+ [Test]
+ public void setSwitchToError()
+ {
+ traceSource.Switch.Level = SourceLevels.Error;
+ LogAllTraceLevels ();
+ // Switch.Level is Error so it should log Critical, Error
+ Assert.AreEqual (2, txtTraceListener.TotalMessageCount);
+ Assert.AreEqual (1, txtTraceListener.ErrorMessageCount);
+ }
+
+ [Test]
+ public void setSwitchToWarning()
+ {
+ traceSource.Switch.Level = SourceLevels.Warning;
+ LogAllTraceLevels ();
+ // Switch.Level is Warning so it should log Critical, Error, Warning
+ Assert.AreEqual (3, txtTraceListener.TotalMessageCount);
+ Assert.AreEqual (1, txtTraceListener.WarningMessageCount);
+ }
+
+ [Test]
+ public void setSwitchToInfo()
+ {
+ traceSource.Switch.Level = SourceLevels.Information;
+ LogAllTraceLevels ();
+ // Switch.Level is Information so it should log Critical, Error, Warning, Information
+ Assert.AreEqual (4, txtTraceListener.TotalMessageCount);
+ Assert.AreEqual (1, txtTraceListener.InfoMessageCount);
+ }
+
+ [Test]
+ public void setSwitchToVerbose()
+ {
+ traceSource.Switch.Level = SourceLevels.Verbose;
+ LogAllTraceLevels ();
+ // Switch.Level is Verbose so it should log Critical, Error, Warning, Information, Verbose
+ Assert.AreEqual (5, txtTraceListener.TotalMessageCount);
+ Assert.AreEqual (1, txtTraceListener.VerboseMessageCount);
+ }
+
+ void LogAllTraceLevels ()
+ {
+ traceSource.TraceEvent (TraceEventType.Critical, 123, "Critical Level message.");
+ traceSource.TraceEvent (TraceEventType.Error, 123, "Error Level message.");
+ traceSource.TraceEvent (TraceEventType.Warning, 123, "Warning Level message.");
+ traceSource.TraceEvent (TraceEventType.Information, 123, "Information Level message.");
+ traceSource.TraceEvent (TraceEventType.Verbose, 123, "Verbose Level message.");
+ traceSource.Flush ();
+ }
}
}
diff --git a/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs b/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs
index c21a1ca5248..4c52cb109af 100644
--- a/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs
+++ b/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs
@@ -80,6 +80,12 @@ namespace MonoTests.System.Diagnostics {
}
}
+ class TestNullSwitch : Switch {
+ public TestNullSwitch () : base (null, null)
+ {
+ }
+ }
+
[TestFixture]
public class SwitchesTest {
@@ -184,8 +190,16 @@ namespace MonoTests.System.Diagnostics {
BooleanSwitch s = new BooleanSwitch ("test", "", "hoge");
Assert.IsTrue (!s.Enabled);
}
+
+ [Test]
+ public void NullSwitchHasEmptyDisplayNameAndDescription ()
+ {
+ var s = new TestNullSwitch ();
+ Assert.IsEmpty (s.DisplayName);
+ Assert.IsEmpty (s.Description);
+ }
#endif
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/System/Test/System.Diagnostics/TextWriterTraceListenerHelper.cs b/mcs/class/System/Test/System.Diagnostics/TextWriterTraceListenerHelper.cs
new file mode 100644
index 00000000000..248e2ee0814
--- /dev/null
+++ b/mcs/class/System/Test/System.Diagnostics/TextWriterTraceListenerHelper.cs
@@ -0,0 +1,88 @@
+// TextWriterTraceListenerHelper.cs -
+// Test Helper for System.Diagnostics/SourceSwitchTest.cs
+
+//
+// Author:
+// Ramtin Raji Kermani
+//
+// Copyright (C) 2006 Novell, Inc (http://www.novell.com)
+//
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// 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 !MOBILE
+
+using System;
+using System.IO;
+using System.Diagnostics;
+
+namespace MonoTests.System.Diagnostics
+{
+ public class TestTextWriterTraceListener: TextWriterTraceListener
+ {
+ public int TotalMessageCount { set; get;}
+ public int CritialMessageCount { get; set;}
+ public int ErrorMessageCount { get; set;}
+ public int WarningMessageCount { get; set;}
+ public int InfoMessageCount { get; set;}
+ public int VerboseMessageCount { set; get;}
+
+ public TestTextWriterTraceListener(TextWriter textWriter): base(textWriter)
+ {
+ Console.WriteLine ("TextWriterTraceListener is instantiated.");
+ }
+
+
+ public override void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message)
+ {
+ base.TraceEvent (eventCache, source, eventType, id, message);
+ TotalMessageCount++;
+
+ switch (eventType) {
+ case TraceEventType.Critical:
+ CritialMessageCount++; break;
+ case TraceEventType.Error:
+ ErrorMessageCount++; break;
+ case TraceEventType.Warning:
+ WarningMessageCount++; break;
+ case TraceEventType.Information:
+ InfoMessageCount++; break;
+ case TraceEventType.Verbose:
+ VerboseMessageCount++; break;
+ default:
+ break;
+ }
+ }
+
+ public void clearMessageCounters()
+ {
+ TotalMessageCount = 0;
+ CritialMessageCount = 0;
+ WarningMessageCount = 0;
+ ErrorMessageCount = 0;
+ InfoMessageCount = 0;
+ VerboseMessageCount = 0;
+ }
+
+ }
+}
+
+#endif \ No newline at end of file
diff --git a/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs b/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs
index 61eda5b8030..27312640f5e 100644
--- a/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs
+++ b/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs
@@ -14,6 +14,7 @@ using NUnit.Framework;
using System;
using System.IO;
using System.IO.Compression;
+using System.Text;
namespace MonoTests.System.IO.Compression
{
@@ -297,6 +298,60 @@ namespace MonoTests.System.IO.Compression
}
}
}
+
+ class Bug19313Stream : MemoryStream
+ {
+ public Bug19313Stream (byte [] buffer)
+ : base (buffer)
+ {
+ }
+
+ public override int Read (byte [] buffer, int offset, int count)
+ {
+ // Thread was blocking when DeflateStream uses a NetworkStream.
+ // Because the NetworkStream.Read calls Socket.Receive that
+ // blocks the thread waiting for at least a byte to return.
+ // This assert guarantees that Read is called only when there
+ // is something to be read.
+ Assert.IsTrue (Position < Length, "Trying to read empty stream.");
+
+ return base.Read (buffer, offset, count);
+ }
+ }
+
+ [Test]
+ public void Bug19313 ()
+ {
+ byte [] buffer = new byte [512];
+ using (var backing = new Bug19313Stream (compressed_data))
+ using (var decompressing = new DeflateStream (backing, CompressionMode.Decompress))
+ decompressing.Read (buffer, 0, buffer.Length);
+ }
+
+ public MemoryStream GenerateStreamFromString(string s)
+ {
+ return new MemoryStream (Encoding.UTF8.GetBytes (s));
+ }
+
+#if NET_4_5
+ [Test]
+ public void CheckNet45Overloads () // Xambug #21982
+ {
+ MemoryStream dataStream = GenerateStreamFromString("Hello");
+ MemoryStream backing = new MemoryStream ();
+ DeflateStream compressing = new DeflateStream (backing, CompressionLevel.Fastest, true);
+ CopyStream (dataStream, compressing);
+ dataStream.Close();
+ compressing.Close();
+
+ backing.Seek (0, SeekOrigin.Begin);
+ DeflateStream decompressing = new DeflateStream (backing, CompressionMode.Decompress);
+ StreamReader reader = new StreamReader (decompressing);
+ Assert.AreEqual ("Hello", reader.ReadLine ());
+ decompressing.Close();
+ backing.Close();
+ }
+#endif
}
}
diff --git a/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs b/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs
index d59d607e59d..a72ffc6ee05 100644
--- a/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs
+++ b/mcs/class/System/Test/System.IO.Compression/GzipStreamTest.cs
@@ -12,6 +12,7 @@ using NUnit.Framework;
using System;
using System.IO;
using System.IO.Compression;
+using System.Text;
namespace MonoTests.System.IO.Compression
{
@@ -296,6 +297,31 @@ namespace MonoTests.System.IO.Compression
0x03, 0x74, 0x65, 0x73, 0x74, 0x00, 0xf3, 0x48, 0xcd,
0xc9, 0xc9, 0xe7, 0x02, 0x00, 0x16, 0x35, 0x96, 0x31,
0x06, 0x00, 0x00, 0x00};
+
+ public MemoryStream GenerateStreamFromString(string s)
+ {
+ return new MemoryStream (Encoding.UTF8.GetBytes (s));
+ }
+
+#if NET_4_5
+ [Test]
+ public void CheckNet45Overloads () // Xambug #21982
+ {
+ MemoryStream dataStream = GenerateStreamFromString("Hello");
+ MemoryStream backing = new MemoryStream ();
+ GZipStream compressing = new GZipStream (backing, CompressionLevel.Fastest, true);
+ CopyStream (dataStream, compressing);
+ dataStream.Close();
+ compressing.Close();
+
+ backing.Seek (0, SeekOrigin.Begin);
+ GZipStream decompressing = new GZipStream (backing, CompressionMode.Decompress);
+ StreamReader reader = new StreamReader (decompressing);
+ Assert.AreEqual ("Hello", reader.ReadLine ());
+ decompressing.Close();
+ backing.Close();
+ }
+#endif
}
}
diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs
new file mode 100644
index 00000000000..d9e6646554f
--- /dev/null
+++ b/mcs/class/System/Test/System.Net.Sockets/SocketConnectAsyncTest.cs
@@ -0,0 +1,133 @@
+using System;
+using System.Collections;
+using System.Threading;
+using System.Net;
+using System.Net.Sockets;
+using NUnit.Framework;
+
+namespace MonoTests.System.Net.Sockets
+{
+ [TestFixture]
+ public class SocketConnectAsyncTest
+ {
+ Socket serverSocket;
+ Socket clientSocket;
+ SocketAsyncEventArgs clientSocketAsyncArgs;
+ ManualResetEvent readyEvent;
+ ManualResetEvent mainEvent;
+ Exception error;
+
+ [TestFixtureSetUp]
+ public void SetUp ()
+ {
+ readyEvent = new ManualResetEvent (false);
+ mainEvent = new ManualResetEvent (false);
+ }
+
+ [TestFixtureTearDown]
+ public void TearDown ()
+ {
+ readyEvent.Close ();
+ mainEvent.Close ();
+ }
+
+ void StartServer()
+ {
+ readyEvent.Reset();
+ mainEvent.Reset();
+ ThreadPool.QueueUserWorkItem (_ => DoWork ());
+ readyEvent.WaitOne ();
+ }
+
+ void StopServer()
+ {
+ if (serverSocket != null)
+ serverSocket.Close ();
+ }
+
+ void DoWork ()
+ {
+ serverSocket = new Socket (
+ AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+ serverSocket.Bind (new IPEndPoint (IPAddress.Loopback, 0));
+ serverSocket.Listen (1);
+
+ var async = new SocketAsyncEventArgs ();
+ async.Completed += (s,e) => OnAccepted (e);
+
+ readyEvent.Set ();
+
+ if (!serverSocket.AcceptAsync (async))
+ OnAccepted (async);
+ }
+
+ void OnAccepted (SocketAsyncEventArgs e)
+ {
+ var acceptSocket = e.AcceptSocket;
+ mainEvent.Set ();
+ }
+
+ [Test]
+ [Category("NotWorking")]
+ public void Connect ()
+ {
+ StartServer();
+
+ EndPoint serverEndpoint = serverSocket.LocalEndPoint;
+
+ var m = new ManualResetEvent (false);
+ var e = new SocketAsyncEventArgs ();
+
+ clientSocket = new Socket (
+ AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+ clientSocketAsyncArgs = new SocketAsyncEventArgs();
+ clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint;
+ clientSocketAsyncArgs.Completed += (s,o) => {
+ if (o.SocketError != SocketError.Success)
+ error = new SocketException ((int)o.SocketError);
+ m.Set ();
+ };
+ bool res = clientSocket.ConnectAsync(clientSocketAsyncArgs);
+ if (res) {
+ if (!m.WaitOne (1500))
+ throw new TimeoutException ();
+ }
+
+ if (!mainEvent.WaitOne (1500))
+ throw new TimeoutException ();
+ if (error != null)
+ throw error;
+
+ m.Reset ();
+ mainEvent.Reset ();
+
+ StopServer();
+
+ // Try again to non-listening endpoint, expect error
+
+ error = null;
+ clientSocket = new Socket (
+ AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+ clientSocketAsyncArgs = new SocketAsyncEventArgs ();
+ clientSocketAsyncArgs.RemoteEndPoint = serverEndpoint;
+ clientSocketAsyncArgs.Completed += (s,o) => {
+ if (o.SocketError != SocketError.Success)
+ error = new SocketException ((int)o.SocketError);
+ m.Set ();
+ };
+ res = clientSocket.ConnectAsync (clientSocketAsyncArgs);
+ if (res) {
+ if (!m.WaitOne (1500))
+ throw new TimeoutException ();
+ }
+
+ Assert.IsTrue (error != null, "Connect - no error");
+ SocketException socketException = (SocketException)error;
+ Assert.IsTrue(socketException.ErrorCode == (int)SocketError.ConnectionRefused);
+
+ m.Reset ();
+ mainEvent.Reset ();
+ }
+
+ }
+} \ No newline at end of file
diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
index e8ab165dd5b..1f18e4705d0 100755
--- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
+++ b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs
@@ -205,7 +205,6 @@ namespace MonoTests.System.Net.Sockets
Assert.AreEqual (CFAConnected, false, "ConnectFail");
}
-#if !TARGET_JVM
[Test]
#if !NET_2_0
[ExpectedException (typeof (ArgumentException))]
@@ -220,7 +219,6 @@ namespace MonoTests.System.Net.Sockets
sock.Close ();
}
}
-#endif
[Test]
public void TestSelect1 ()
{
@@ -1648,7 +1646,15 @@ namespace MonoTests.System.Net.Sockets
{
Socket sock = (Socket)asyncResult.AsyncState;
- sock.EndConnect (asyncResult);
+ try {
+ sock.EndConnect (asyncResult);
+ } catch (Exception e) {
+ Console.WriteLine ("BCCallback exception:");
+ Console.WriteLine (e);
+
+ throw;
+ }
+
BCConnected = true;
BCCalledBack.Set ();
@@ -1783,9 +1789,22 @@ namespace MonoTests.System.Net.Sockets
/* Longer wait here, because the ms runtime
* takes a lot longer to not connect
*/
+ /*
if (BCCalledBack.WaitOne (30000, false) == false) {
Assert.Fail ("BeginConnectMultiple wait failed");
}
+ */
+
+ var sw = new global::System.Diagnostics.Stopwatch ();
+ sw.Start ();
+
+ BCCalledBack.WaitOne ();
+
+ sw.Stop ();
+ Console.WriteLine (sw.ElapsedMilliseconds);
+
+ if (sw.ElapsedMilliseconds > 30000)
+ Assert.Fail ("BeginConnectMultiple wait failed");
Assert.AreEqual (true, BCConnected, "BeginConnectMultiple #1");
Assert.AreEqual (AddressFamily.InterNetwork, sock.RemoteEndPoint.AddressFamily, "BeginConnectMultiple #2");
diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.jvm.cs b/mcs/class/System/Test/System.Net.Sockets/SocketTest.jvm.cs
deleted file mode 100755
index 464ffd7f337..00000000000
--- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.jvm.cs
+++ /dev/null
@@ -1,2947 +0,0 @@
-// System.Net.Sockets.SocketTest.cs
-//
-// Authors:
-// Brad Fitzpatrick (brad@danga.com)
-// Gonzalo Paniagua Javier (gonzalo@novell.com)
-//
-// (C) Copyright 2003 Brad Fitzpatrick
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
-//
-
-using System;
-using System.Collections;
-using System.Threading;
-using System.Net;
-using System.Net.Sockets;
-using NUnit.Framework;
-
-namespace MonoTests.System.Net.Sockets
-{
- [TestFixture]
- public class SocketTest
- {
- // note: also used in SocketCas tests
- public const string BogusAddress = "192.168.244.244";
- public const int BogusPort = 23483;
-
- [Test]
- public void ConnectIPAddressAny ()
- {
- IPEndPoint ep = new IPEndPoint (IPAddress.Any, 0);
-#if !TARGET_JVM
-//udp sockets are not supported
- try {
- using (Socket s = new Socket (AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)) {
- s.Connect (ep);
- s.Close ();
- }
- Assert.Fail ("#1");
- } catch (SocketException ex) {
- Assert.AreEqual (10049, ex.ErrorCode, "#2");
- }
-#endif
-
- try {
- using (Socket s = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)) {
- s.Connect (ep);
- s.Close ();
- }
- Assert.Fail ("#3");
- } catch (SocketException ex) {
- Assert.AreEqual (10049, ex.ErrorCode, "#4");
- }
- }
-
- [Test]
- [Ignore ("Bug #75158")]
- public void IncompatibleAddress ()
- {
- IPEndPoint epIPv6 = new IPEndPoint (IPAddress.IPv6Any,
- 0);
-
- try {
- using (Socket s = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.IP)) {
- s.Connect (epIPv6);
- s.Close ();
- }
- Assert.Fail ("#1");
- } catch (SocketException ex) {
-#if !NET_2_0
- // invalid argument
- int expectedError = 10022;
-#else
- // address incompatible with protocol
- int expectedError = 10047;
-#endif
- Assert.AreEqual (expectedError, ex.ErrorCode,
- "#2");
- }
- }
-
- [Test]
- [Category ("InetAccess")]
- public void EndConnect ()
- {
- IPAddress ipOne = IPAddress.Parse (BogusAddress);
- IPEndPoint ipEP = new IPEndPoint (ipOne, BogusPort);
- Socket sock = new Socket (ipEP.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
- IAsyncResult ar = sock.BeginConnect (ipEP, null, null);
- bool gotException = false;
-
- try {
- sock.EndConnect (ar); // should raise an exception because connect was bogus
- } catch {
- gotException = true;
- }
-
- Assertion.AssertEquals ("A01", gotException, true);
- }
-
- [Test]
- [ExpectedException (typeof (ArgumentNullException))]
- public void SelectEmpty ()
- {
- ArrayList list = new ArrayList ();
- Socket.Select (list, list, list, 1000);
- }
-
- private bool BlockingConnect (bool block)
- {
- IPEndPoint ep = new IPEndPoint(IPAddress.Loopback, 1234);
- Socket server = new Socket(AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- server.Bind(ep);
- server.Blocking=block;
-
- server.Listen(0);
-
- Socket conn = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- conn.Connect (ep);
-
- Socket client = server.Accept();
- bool client_block = client.Blocking;
-
- client.Close();
- conn.Close();
- server.Close();
-
- return(client_block);
- }
-
- [Test]
- public void AcceptBlockingStatus()
- {
- bool block;
-
- block = BlockingConnect(true);
- Assertion.AssertEquals ("BlockingStatus01",
- block, true);
-
- block = BlockingConnect(false);
- Assertion.AssertEquals ("BlockingStatus02",
- block, false);
- }
-
- static bool CFAConnected = false;
- static ManualResetEvent CFACalledBack;
-
- private static void CFACallback (IAsyncResult asyncResult)
- {
- Socket sock = (Socket)asyncResult.AsyncState;
- CFAConnected = sock.Connected;
-
- if (sock.Connected) {
- sock.EndConnect (asyncResult);
- }
-
- CFACalledBack.Set ();
- }
-
- [Test]
- public void ConnectFailAsync ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- sock.Blocking = false;
- CFACalledBack = new ManualResetEvent (false);
- CFACalledBack.Reset ();
-
- /* Need a port that is not being used for
- * anything...
- */
- sock.BeginConnect (new IPEndPoint (IPAddress.Loopback,
- 114),
- new AsyncCallback (CFACallback),
- sock);
- CFACalledBack.WaitOne ();
-
- Assertion.AssertEquals ("ConnectFail", CFAConnected,
- false);
- }
-
-#if !TARGET_JVM
- [Test]
-#if !NET_2_0
- [ExpectedException (typeof (ArgumentException))]
-#endif
- public void SetSocketOptionBoolean ()
- {
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1);
- Socket sock = new Socket (ep.Address.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
- try {
- sock.SetSocketOption (SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);
- } finally {
- sock.Close ();
- }
- }
-#endif
- [Test]
-#if TARGET_JVM
- [Ignore ("NMA")]
-#endif
- public void TestSelect1 ()
- {
- Socket srv = CreateServer ();
- ClientSocket clnt = new ClientSocket (srv.LocalEndPoint);
- Thread th = new Thread (new ThreadStart (clnt.ConnectSleepClose));
- Socket acc = null;
- try {
- th.Start ();
- acc = srv.Accept ();
- clnt.Write ();
- ArrayList list = new ArrayList ();
- ArrayList empty = new ArrayList ();
- list.Add (acc);
- Socket.Select (list, empty, empty, 100);
- Assertion.AssertEquals ("#01", 0, empty.Count);
- Assertion.AssertEquals ("#02", 1, list.Count);
- Socket.Select (empty, list, empty, 100);
- Assertion.AssertEquals ("#03", 0, empty.Count);
- Assertion.AssertEquals ("#04", 1, list.Count);
- Socket.Select (list, empty, empty, -1);
- Assertion.AssertEquals ("#05", 0, empty.Count);
- Assertion.AssertEquals ("#06", 1, list.Count);
- } finally {
- if (acc != null)
- acc.Close ();
- srv.Close ();
- }
- }
-
- static Socket CreateServer ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- sock.Bind (new IPEndPoint (IPAddress.Loopback, 0));
- sock.Listen (1);
- return sock;
- }
-
- class ClientSocket {
- Socket sock;
- EndPoint ep;
-
- public ClientSocket (EndPoint ep)
- {
- this.ep = ep;
- sock = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
- }
-
- public void ConnectSleepClose ()
- {
- sock.Connect (ep);
- Thread.Sleep (2000);
- sock.Close ();
- }
-
- public void Write ()
- {
- byte [] b = new byte [10];
- sock.Send (b);
- }
- }
-
- byte[] buf = new byte[100];
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed1 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.ReceiveFrom (buf, ref ep);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed2 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Blocking = true;
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed3 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.GetSocketOption (0, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed4 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.GetSocketOption (0, 0, null);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed5 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.GetSocketOption (0, 0, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed6 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Listen (5);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed7 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Poll (100, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed8 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Receive (buf);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed9 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Receive (buf, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed10 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Receive (buf, 10, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed11 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.Receive (buf, 0, 10, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed12 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.ReceiveFrom (buf, 0, ref ep);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed13 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.ReceiveFrom (buf, 10, 0, ref ep);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed14 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.ReceiveFrom (buf, 0, 10, 0, ref ep);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed15 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Send (buf);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed16 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Send (buf, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed17 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- s.Close();
-
- s.Send (buf, 10, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed18 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.Send (buf, 0, 10, 0);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed19 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.SendTo (buf, 0, ep);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed20 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.SendTo (buf, 10, 0, ep);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed21 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint(IPAddress.Any, 31337);
- s.Close();
-
- s.SendTo(buf, 0, 10, 0, ep);
-
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed22 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.SendTo (buf, ep);
- }
-
- [Test]
- [ExpectedException (typeof (ObjectDisposedException))]
- public void Disposed23 ()
- {
-#if TARGET_JVM
- //UDP sockets are not supported in GH
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
-#else
- Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
-#endif
- EndPoint ep = new IPEndPoint (IPAddress.Any, 31337);
- s.Close();
-
- s.Shutdown (0);
- }
-
- static ManualResetEvent SocketError_event = new ManualResetEvent (false);
-
- private static void SocketError_callback (IAsyncResult ar)
- {
- Socket sock = (Socket)ar.AsyncState;
-
- if(sock.Connected) {
- sock.EndConnect (ar);
- }
-
- SocketError_event.Set ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("NMA")]
-#endif
- public void SocketError ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- BogusPort);
-
- SocketError_event.Reset ();
-
- sock.Blocking = false;
- sock.BeginConnect (ep, SocketError_callback,
- sock);
-
- if (SocketError_event.WaitOne (2000, false) == false) {
- Assert.Fail ("SocketError wait timed out");
- }
-
- Assertion.AssertEquals ("SocketError #1", false,
- sock.Connected);
-
- int error;
-
- error = (int)sock.GetSocketOption (SocketOptionLevel.Socket, SocketOptionName.Error);
- Assertion.AssertEquals ("SocketError #2", 10061,
- error);
-
- error = (int)sock.GetSocketOption (SocketOptionLevel.Socket, SocketOptionName.Error);
- Assertion.AssertEquals ("SocketError #3", 10061,
- error);
-
- sock.Close ();
- }
-
-
-#if NET_2_0
- [Test]
- public void SocketInformationCtor ()
- {
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("Socket.DontFragment property is not supported")]
-#endif
- public void DontFragmentDefaultTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("DontFragmentDefaultTcp",
- false, sock.DontFragment);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("Socket.DontFragment property is not supported")]
-#endif
- public void DontFragmentChangeTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.DontFragment = true;
-
- Assertion.AssertEquals ("DontFragmentChangeTcp",
- true, sock.DontFragment);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("Socket.DontFragment property is not supported")]
-#endif
- public void DontFragmentDefaultUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- Assertion.AssertEquals ("DontFragmentDefaultUdp",
- false, sock.DontFragment);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("Socket.DontFragment property is not supported")]
-#endif
- public void DontFragmentChangeUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- sock.DontFragment = true;
-
- Assertion.AssertEquals ("DontFragmentChangeUdp",
- true, sock.DontFragment);
-
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("Socket.DontFragment property is not supported")]
-#endif
- public void DontFragmentClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- bool val = sock.DontFragment;
- }
-
- [Test]
- [Category ("NotWorking")] // Need to pick a non-IP AddressFamily that "works" on both mono and ms, this one only works on ms
- public void DontFragment ()
- {
- Socket sock = new Socket (AddressFamily.NetBios,
- SocketType.Seqpacket,
- ProtocolType.Unspecified);
-
- try {
- sock.DontFragment = true;
- Assert.Fail ("DontFragment #1");
- } catch (NotSupportedException) {
- } catch {
- Assert.Fail ("DontFragment #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.EnableBroadcast property is not supported")]
-#endif
- public void EnableBroadcastDefaultTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- bool value = sock.EnableBroadcast;
- Assert.Fail ("EnableBroadcastDefaultTcp #1");
- } catch (SocketException ex) {
- Assert.AreEqual (10042, ex.ErrorCode, "EnableBroadcastDefaultTcp #2");
- } catch {
- Assert.Fail ("EnableBroadcastDefaultTcp #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.EnableBroadcast property is not supported")]
-#endif
- public void EnableBroadcastDefaultUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- Assertion.AssertEquals ("EnableBroadcastDefaultUdp",
- false, sock.EnableBroadcast);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.EnableBroadcast property is not supported")]
-#endif
- public void EnableBroadcastChangeTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- sock.EnableBroadcast = true;
- Assert.Fail ("EnableBroadcastChangeTcp #1");
- } catch (SocketException ex) {
- Assert.AreEqual (10042, ex.ErrorCode, "EnableBroadcastChangeTcp #2");
- } catch {
- Assert.Fail ("EnableBroadcastChangeTcp #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.EnableBroadcast property is not supported")]
-#endif
- public void EnableBroadcastChangeUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- sock.EnableBroadcast = true;
-
- Assertion.AssertEquals ("EnableBroadcastChangeUdp",
- true, sock.EnableBroadcast);
-
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.EnableBroadcast property is not supported")]
-#endif
- public void EnableBroadcastClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- sock.Close ();
-
- bool val = sock.EnableBroadcast;
- }
-
- /* Can't test the default for ExclusiveAddressUse as
- * it's different on different versions and service
- * packs of windows
- */
- [Test]
- [Category ("NotWorking")] // Not supported on Linux
- public void ExclusiveAddressUseUnbound ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.ExclusiveAddressUse = true;
-
- Assertion.AssertEquals ("ExclusiveAddressUseUnbound",
- true,
- sock.ExclusiveAddressUse);
-
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(InvalidOperationException))]
- [Category ("NotWorking")] // Not supported on Linux
- public void ExclusiveAddressUseBound ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Bind (new IPEndPoint (IPAddress.Any, 1235));
- sock.ExclusiveAddressUse = true;
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.ExclusiveAddressUse is not supported")]
-#endif
- public void ExclusiveAddressUseClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- bool val = sock.ExclusiveAddressUse;
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.IsBound property isn't supported")]
-#endif
- public void IsBoundTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- BogusPort);
-
- Assertion.AssertEquals ("IsBoundTcp #1", false,
- sock.IsBound);
-
- sock.Bind (ep);
- Assertion.AssertEquals ("IsBoundTcp #2", true,
- sock.IsBound);
-
- sock.Listen (1);
-
- Socket sock2 = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("IsBoundTcp #3", false,
- sock2.IsBound);
-
- sock2.Connect (ep);
- Assertion.AssertEquals ("IsBoundTcp #4", true,
- sock2.IsBound);
-
- sock2.Close ();
- Assertion.AssertEquals ("IsBoundTcp #5", true,
- sock2.IsBound);
-
- sock.Close ();
- Assertion.AssertEquals ("IsBoundTcp #6", true,
- sock.IsBound);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.IsBound property isn't supported")]
-#endif
- public void IsBoundUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- BogusPort);
-
- Assertion.AssertEquals ("IsBoundUdp #1", false,
- sock.IsBound);
-
- sock.Bind (ep);
- Assertion.AssertEquals ("IsBoundUdp #2", true,
- sock.IsBound);
-
- sock.Close ();
- Assertion.AssertEquals ("IsBoundUdp #3", true,
- sock.IsBound);
-
-
- sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- Assertion.AssertEquals ("IsBoundUdp #4", false,
- sock.IsBound);
-
- sock.Connect (ep);
- Assertion.AssertEquals ("IsBoundUdp #5", true,
- sock.IsBound);
-
- sock.Close ();
- Assertion.AssertEquals ("IsBoundUdp #6", true,
- sock.IsBound);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.IsBound property is not supported")]
-#endif
- /* Should not throw an exception */
- public void IsBoundClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- bool val = sock.IsBound;
- }
-
- /* Nothing much to test for LingerState */
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.MulticastLoopback property is not supported")]
-#endif
- public void MulticastLoopbackDefaultTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- bool value = sock.MulticastLoopback;
- Assert.Fail ("MulticastLoopbackDefaultTcp #1");
- } catch (SocketException ex) {
- Assert.AreEqual (10042, ex.ErrorCode, "MulticastLoopbackDefaultTcp #2");
- } catch {
- Assert.Fail ("MulticastLoopbackDefaultTcp #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.MulticastLoopback property is not supported")]
-#endif
- public void MulticastLoopbackChangeTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- sock.MulticastLoopback = false;
- Assert.Fail ("MulticastLoopbackChangeTcp #1");
- } catch (SocketException ex) {
- Assert.AreEqual (10042, ex.ErrorCode, "MulticastLoopbackChangeTcp #2");
- } catch {
- Assert.Fail ("MulticastLoopbackChangeTcp #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("Udp sockets are not supported")]
-#endif
- public void MulticastLoopbackDefaultUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- Assertion.AssertEquals ("MulticastLoopbackDefaultUdp",
- true, sock.MulticastLoopback);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("Udp sockets are not supported")]
-#endif
- public void MulticastLoopbackChangeUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- sock.MulticastLoopback = false;
-
- Assertion.AssertEquals ("MulticastLoopbackChangeUdp",
- false, sock.MulticastLoopback);
-
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.MulticastLoopback property is not supported")]
-#endif
- public void MulticastLoopbackClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- bool val = sock.MulticastLoopback;
- }
-
- /* OSSupportsIPv6 depends on the environment */
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.ReseiveBufferSize property is not supported")]
-#endif
- public void ReceiveBufferSizeDefault ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("ReceiveBufferSizeDefault",
- 8192, sock.ReceiveBufferSize);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.ReseiveBufferSize property is not supported")]
-#endif
- public void ReceiveBufferSizeDefaultUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- Assertion.AssertEquals ("ReceiveBufferSizeDefaultUdp",
- 8192, sock.ReceiveBufferSize);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.ReseiveBufferSize property is not supported")]
-#endif
- public void ReceiveBufferSizeChange ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.ReceiveBufferSize = 16384;
-
- Assertion.AssertEquals ("ReceiveBufferSizeChange",
- 16384, sock.ReceiveBufferSize);
-
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.ReseiveBufferSize property is not supported")]
-#endif
- public void ReceiveBufferSizeClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- int val = sock.ReceiveBufferSize;
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.SendBufferSize property is not supported")]
-#endif
- public void SendBufferSizeDefault ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("SendBufferSizeDefault",
- 8192, sock.SendBufferSize);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.SendBufferSize property is not supported")]
-#endif
- public void SendBufferSizeDefaultUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- Assertion.AssertEquals ("SendBufferSizeDefaultUdp",
- 8192, sock.SendBufferSize);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.SendBufferSize property is not supported")]
-#endif
- public void SendBufferSizeChange ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.SendBufferSize = 16384;
-
- Assertion.AssertEquals ("SendBufferSizeChange",
- 16384, sock.SendBufferSize);
-
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.SendBufferSize property is not supported")]
-#endif
- public void SendBufferSizeClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- int val = sock.SendBufferSize;
- }
-
- /* No test for TTL default as it's platform dependent */
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Ttl property is not supported")]
-#endif
- public void TtlChange ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Ttl = 255;
-
- Assertion.AssertEquals ("TtlChange", 255, sock.Ttl);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Ttl property is not supported")]
-#endif
- public void TtlChangeOverflow ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- sock.Ttl = 256;
- Assert.Fail ("TtlChangeOverflow #1");
- } catch (SocketException ex) {
- Assert.AreEqual (10022, ex.ErrorCode,
- "TtlChangeOverflow #2");
- } catch {
- Assert.Fail ("TtlChangeoverflow #3");
- } finally {
- sock.Close ();
- }
- }
-
-/* Apparently you can set TTL=0 on the ms runtime!!
- try {
- sock.Ttl = 0;
- Assert.Fail ("TtlChangeOverflow #4");
- } catch (SocketException ex) {
- Assert.AreEqual (10022, ex.ErrorCode,
- "TtlChangeOverflow #5");
- } catch {
- Assert.Fail ("TtlChangeOverflow #6");
- } finally {
- sock.Close ();
- }
-*/
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Ttl property is not supported")]
-#endif
- public void TtlClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- int val = sock.Ttl;
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.UseOnlyOverlappedIO property is not supported")]
-#endif
- public void UseOnlyOverlappedIODefault ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("UseOnlyOverlappedIODefault",
- false,
- sock.UseOnlyOverlappedIO);
-
- sock.Close ();
- }
-
- //
- // We need this because the Linux kernel in certain configurations
- // will end up rounding up the values passed on to the kernel
- // for socket send/receive timeouts.
- //
- int Approximate (int target, int value)
- {
- int epsilon = 10;
-
- if (value > target-10 && value < target+10)
- return target;
- return value;
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.UseOnlyOverlappedIO property is not supported")]
-#endif
- public void UseOnlyOverlappedIOChange ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.UseOnlyOverlappedIO = true;
-
- Assertion.AssertEquals ("UseOnlyOverlappedIOChange",
- true,
- sock.UseOnlyOverlappedIO);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.UseOnlyOverlappedIO property is not supported")]
-#endif
- /* Should not throw an exception */
- public void UseOnlyOverlappedIOClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- bool val = sock.UseOnlyOverlappedIO;
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.SendTimeout property is not supported")]
-#endif
- public void SendTimeoutDefault ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("SendTimeoutDefault",
- 0, sock.SendTimeout);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.SendTimeout property is not supported")]
-#endif
- public void SendTimeoutChange ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- /* Should be rounded up to 500, according to
- * the MSDN docs, but the MS runtime doesn't
- */
- sock.SendTimeout = 50;
- Assertion.AssertEquals ("SendTimeoutChange #1",
- 50, Approximate (50, sock.SendTimeout));
-
- sock.SendTimeout = 2000;
- Assertion.AssertEquals ("SendTimeoutChange #2",
- 2000, Approximate (2000, sock.SendTimeout));
-
- sock.SendTimeout = 0;
- Assertion.AssertEquals ("SendTimeoutChange #3",
- 0, Approximate (0, sock.SendTimeout));
-
- /* Should be the same as setting 0 */
- sock.SendTimeout = -1;
- Assertion.AssertEquals ("SendTimeoutChange #4",
- 0, sock.SendTimeout);
-
- sock.SendTimeout = 65536;
- Assertion.AssertEquals ("SendTimeoutChange #5",
- 65536, Approximate (65536, sock.SendTimeout));
-
- try {
- sock.SendTimeout = -2;
- Assert.Fail ("SendTimeoutChange #8");
- } catch (ArgumentOutOfRangeException) {
- } catch {
- Assert.Fail ("SendTimeoutChange #9");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.SendTimeout property is not supported")]
-#endif
- public void SendTimeoutClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- int val = sock.SendTimeout;
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.ReceiveTimeout property is not supported")]
-#endif
- public void ReceiveTimeoutDefault ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("ReceiveTimeoutDefault",
- 0, sock.ReceiveTimeout);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.ReceiveTimeout property is not supported")]
-#endif
- public void ReceiveTimeoutChange ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.ReceiveTimeout = 50;
- Assertion.AssertEquals ("ReceiveTimeoutChange #1",
- 50, Approximate (50, sock.ReceiveTimeout));
-
- sock.ReceiveTimeout = 2000;
- Assertion.AssertEquals ("ReceiveTimeoutChange #2",
- 2000, Approximate (2000, sock.ReceiveTimeout));
-
- sock.ReceiveTimeout = 0;
- Assertion.AssertEquals ("ReceiveTimeoutChange #3",
- 0, sock.ReceiveTimeout);
-
- /* Should be the same as setting 0 */
- sock.ReceiveTimeout = -1;
- Assertion.AssertEquals ("ReceiveTimeoutChange #4",
- 0, sock.ReceiveTimeout);
-
- sock.ReceiveTimeout = 65536;
- Assertion.AssertEquals ("ReceiveTimeoutChange #5",
- 65536, Approximate (65536, sock.ReceiveTimeout));
-
- try {
- sock.ReceiveTimeout = -2;
- Assert.Fail ("ReceiveTimeoutChange #8");
- } catch (ArgumentOutOfRangeException) {
- } catch {
- Assert.Fail ("ReceiveTimeoutChange #9");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.ReceiveTimeout property is not supported")]
-#endif
- public void ReceiveTimeoutClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- int val = sock.ReceiveTimeout;
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.NoDelay property is not supported")]
-#endif
- public void NoDelayDefaultTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- Assertion.AssertEquals ("NoDelayDefaultTcp", false,
- sock.NoDelay);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.NoDelay property is not supported")]
-#endif
- public void NoDelayChangeTcp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.NoDelay = true;
-
- Assertion.AssertEquals ("NoDelayChangeTcp", true,
- sock.NoDelay);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.NoDelay property is not supported")]
-#endif
- public void NoDelayDefaultUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- try {
- bool val = sock.NoDelay;
- Assert.Fail ("NoDelayDefaultUdp #1");
- } catch (SocketException ex) {
- Assert.AreEqual (10042, ex.ErrorCode,
- "NoDelayDefaultUdp #2");
- } catch {
- Assert.Fail ("NoDelayDefaultUdp #3");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.NoDelay property is not supported")]
-#endif
- public void NoDelayChangeUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- try {
- sock.NoDelay = true;
- Assert.Fail ("NoDelayChangeUdp #1");
- } catch (SocketException ex) {
- Assert.AreEqual (10042, ex.ErrorCode,
- "NoDelayChangeUdp #2");
- } catch {
- Assert.Fail ("NoDelayChangeUdp #3");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.NoDelay property is not supported")]
-#endif
- public void NoDelayClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- bool val = sock.NoDelay;
- }
-
- static bool BAAccepted = false;
- static Socket BASocket = null;
- static ManualResetEvent BACalledBack = new ManualResetEvent (false);
-
- private static void BACallback (IAsyncResult asyncResult)
- {
- Socket sock = (Socket)asyncResult.AsyncState;
-
- BASocket = sock.EndAccept (asyncResult);
-
- BAAccepted = true;
- BACalledBack.Set ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("NMA")]
-#endif
- [ExpectedException (typeof(InvalidOperationException))]
- public void BeginAcceptNotBound ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.BeginAccept (BACallback, sock);
-
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("NMA")]
-#endif
- [ExpectedException (typeof(InvalidOperationException))]
- public void BeginAcceptNotListening ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Bind (new IPEndPoint (IPAddress.Any, 1236));
-
- sock.BeginAccept (BACallback, sock);
-
- sock.Close ();
- }
-
- [Test]
- public void BeginAccept ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1237);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- BACalledBack.Reset ();
-
- sock.BeginAccept (BACallback, sock);
-
- Socket conn = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- conn.Connect (ep);
-
- if (BACalledBack.WaitOne (2000, false) == false) {
- Assert.Fail ("BeginAccept wait timed out");
- }
-
- Assertion.AssertEquals ("BeginAccept #1", true,
- BAAccepted);
- Assertion.AssertEquals ("BeginAccept #2", true,
- BASocket.Connected);
- Assertion.AssertEquals ("BeginAccept #3", false,
- sock.Connected);
- Assertion.AssertEquals ("BeginAccept #4", true,
- conn.Connected);
-
- BASocket.Close ();
- conn.Close ();
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
- public void BeginAcceptClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- sock.BeginAccept (BACallback, sock);
- }
-
- static bool BADAccepted = false;
- static Socket BADSocket = null;
- static byte[] BADBytes;
- static int BADByteCount;
- static ManualResetEvent BADCalledBack = new ManualResetEvent (false);
-
- private static void BADCallback (IAsyncResult asyncResult)
- {
-#if !TARGET_JVM
- Socket sock = (Socket)asyncResult.AsyncState;
-
- BADSocket = sock.EndAccept (out BADBytes,
- out BADByteCount,
- asyncResult);
-
- BADAccepted = true;
- BADCalledBack.Set ();
-#endif
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.BeginAccept(int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginAcceptData ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1238);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- BADCalledBack.Reset ();
-
- sock.BeginAccept (256, BADCallback, sock);
-
- Socket conn = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- byte[] send_bytes = new byte[] {10, 11, 12, 13};
-
- conn.Connect (ep);
- conn.Send (send_bytes);
-
- if (BADCalledBack.WaitOne (2000, false) == false) {
- Assert.Fail ("BeginAcceptData wait timed out");
- }
-
- Assertion.AssertEquals ("BeginAcceptData #1", true,
- BADAccepted);
- Assertion.AssertEquals ("BeginAcceptData #2", true,
- BADSocket.Connected);
- Assertion.AssertEquals ("BeginAcceptData #3", false,
- sock.Connected);
- Assertion.AssertEquals ("BeginAcceptData #4", true,
- conn.Connected);
- Assertion.AssertEquals ("BeginAcceptData #5",
- send_bytes.Length,
- BADByteCount);
-
- /* The MS runtime gives the returned data in a
- * much bigger array. TODO: investigate
- * whether it the size correlates to the first
- * parameter in BeginAccept()
- */
- Assert.IsFalse (BADBytes.Length == send_bytes.Length,
- "BeginAcceptData #6");
-
- for(int i = 0; i < send_bytes.Length; i++) {
- Assertion.AssertEquals ("BeginAcceptData #" + (i+7).ToString (), send_bytes[i], BADBytes[i]);
- }
-
- BADSocket.Close ();
- conn.Close ();
- sock.Close ();
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginAccept(int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginAcceptDataClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- sock.BeginAccept (256, BADCallback, sock);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginAccept(Socket,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginAcceptSocketUdp ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket acc = new Socket (AddressFamily.InterNetwork,
- SocketType.Dgram,
- ProtocolType.Udp);
-
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1239);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- try {
- sock.BeginAccept (acc, 256, BADCallback, sock);
- Assert.Fail ("BeginAcceptSocketUdp #1");
- } catch (SocketException ex) {
- Assertion.AssertEquals ("BeginAcceptSocketUdp #2", 10022, ex.ErrorCode);
- } catch {
- Assert.Fail ("BeginAcceptSocketUdp #3");
- } finally {
- acc.Close ();
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginAccept(Socket,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginAcceptSocketBound ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket acc = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- IPEndPoint ep1 = new IPEndPoint (IPAddress.Loopback,
- 1240);
-
- IPEndPoint ep2 = new IPEndPoint (IPAddress.Loopback,
- 1241);
-
- sock.Bind (ep1);
- sock.Listen (1);
-
- acc.Bind (ep2);
-
- try {
- sock.BeginAccept (acc, 256, BADCallback, sock);
- Assert.Fail ("BeginAcceptSocketBound #1");
- } catch (InvalidOperationException) {
- } catch {
- Assert.Fail ("BeginAcceptSocketBound #2");
- } finally {
- acc.Close ();
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginAccept(Socket,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginAcceptSocket ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket acc = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1242);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- BADCalledBack.Reset ();
-
- sock.BeginAccept (acc, 256, BADCallback, sock);
-
- Socket conn = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- byte[] send_bytes = new byte[] {10, 11, 12, 13};
-
- conn.Connect (ep);
- conn.Send (send_bytes);
-
- if (BADCalledBack.WaitOne (2000, false) == false) {
- Assert.Fail ("BeginAcceptSocket wait timed out");
- }
-
- Assertion.AssertEquals ("BeginAcceptSocket #1", true,
- BADAccepted);
- Assertion.AssertEquals ("BeginAcceptSocket #2", true,
- BADSocket.Connected);
- Assertion.AssertEquals ("BeginAcceptSocket #3", false,
- sock.Connected);
- Assertion.AssertEquals ("BeginAcceptSocket #4", true,
- conn.Connected);
- Assertion.AssertEquals ("BeginAcceptSocket #5",
- send_bytes.Length,
- BADByteCount);
- Assertion.AssertEquals ("BeginAcceptSocket #6",
- AddressFamily.InterNetwork,
- acc.AddressFamily);
- Assertion.AssertEquals ("BeginAcceptSocket #7",
- SocketType.Stream,
- acc.SocketType);
- Assertion.AssertEquals ("BeginAcceptSocket #8",
- ProtocolType.Tcp,
- acc.ProtocolType);
- Assertion.AssertEquals ("BeginAcceptSocket #9",
- conn.LocalEndPoint,
- acc.RemoteEndPoint);
-
- /* The MS runtime gives the returned data in a
- * much bigger array. TODO: investigate
- * whether it the size correlates to the first
- * parameter in BeginAccept()
- */
- Assert.IsFalse (BADBytes.Length == send_bytes.Length,
- "BeginAcceptSocket #10");
-
- for(int i = 0; i < send_bytes.Length; i++) {
- Assertion.AssertEquals ("BeginAcceptSocket #" + (i+11).ToString (), send_bytes[i], BADBytes[i]);
- }
-
- BADSocket.Close ();
- conn.Close ();
- acc.Close ();
- sock.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginAccept(Socket,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginAcceptSocketClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket acc = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- try {
- sock.BeginAccept (acc, 256, BADCallback, null);
- Assert.Fail ("BeginAcceptSocketClosed #1");
- } catch (ObjectDisposedException) {
- } catch {
- Assert.Fail ("BeginAcceptSocketClosed #2");
- } finally {
- acc.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginAccept(Socket,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginAcceptSocketAccClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket acc = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1243);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- acc.Close ();
-
- BADCalledBack.Reset ();
-
- try {
- sock.BeginAccept (acc, 256, BADCallback, null);
- Assert.Fail ("BeginAcceptSocketAccClosed #1");
- } catch (ObjectDisposedException) {
- } catch {
- Assert.Fail ("BeginAcceptSocketAccClosed #2");
- } finally {
- sock.Close ();
- }
- }
-
- static bool BCConnected = false;
- static ManualResetEvent BCCalledBack = new ManualResetEvent (false);
-
- private static void BCCallback (IAsyncResult asyncResult)
- {
- Socket sock = (Socket)asyncResult.AsyncState;
-
- sock.EndConnect (asyncResult);
- BCConnected = true;
-
- BCCalledBack.Set ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectAddressPort ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket listen = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1244);
-
- listen.Bind (ep);
- listen.Listen (1);
-
- BCCalledBack.Reset ();
-
- BCConnected = false;
-
- sock.BeginConnect (ip, 1244, BCCallback, sock);
-
- if (BCCalledBack.WaitOne (2000, false) == false) {
- Assert.Fail ("BeginConnectAddressPort wait timed out");
- }
-
- Assertion.AssertEquals ("BeginConnectAddressPort #1",
- true, BCConnected);
-
- sock.Close ();
- listen.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectAddressPortNull ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = null;
-
- try {
- sock.BeginConnect (ip, 1244, BCCallback,
- sock);
- Assert.Fail ("BeginConnectAddressPortNull #1");
- } catch (ArgumentNullException) {
- } catch {
- Assert.Fail ("BeginConnectAddressPortNull #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectAddressPortListen ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1245);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- try {
- sock.BeginConnect (ip, 1245, BCCallback, sock);
- Assert.Fail ("BeginConnectAddressPortListen #1");
- } catch (InvalidOperationException) {
- } catch {
- Assert.Fail ("BeginConnectAddressPortListen #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectAddressPortClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
-
- sock.Close ();
-
- sock.BeginConnect (ip, 1244, BCCallback, sock);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress[],int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectMultiple ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket listen = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1246);
- IPAddress[] ips = new IPAddress[4];
-
- ips[0] = IPAddress.Parse ("127.0.0.4");
- ips[1] = IPAddress.Parse ("127.0.0.3");
- ips[2] = IPAddress.Parse ("127.0.0.2");
- ips[3] = IPAddress.Parse ("127.0.0.1");
-
- listen.Bind (ep);
- listen.Listen (1);
-
- BCCalledBack.Reset ();
-
- BCConnected = false;
-
- sock.BeginConnect (ips, 1246, BCCallback, sock);
-
- /* Longer wait here, because the ms runtime
- * takes a lot longer to not connect
- */
- if (BCCalledBack.WaitOne (10000, false) == false) {
- Assert.Fail ("BeginConnectMultiple wait failed");
- }
-
- Assertion.AssertEquals ("BeginConnectMultiple #1",
- true, BCConnected);
- Assertion.AssertEquals ("BeginConnectMultiple #2",
- AddressFamily.InterNetwork,
- sock.RemoteEndPoint.AddressFamily);
- IPEndPoint remep = (IPEndPoint)sock.RemoteEndPoint;
-
- Assertion.AssertEquals ("BeginConnectMultiple #2",
- IPAddress.Loopback,
- remep.Address);
-
- sock.Close ();
- listen.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress[],int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectMultipleNull ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress[] ips = null;
-
- try {
- sock.BeginConnect (ips, 1246, BCCallback,
- sock);
- Assert.Fail ("BeginConnectMultipleNull #1");
- } catch (ArgumentNullException) {
- } catch {
- Assert.Fail ("BeginConnectMultipleNull #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress[],int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectMultipleListen ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress[] ips = new IPAddress[4];
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1247);
-
- ips[0] = IPAddress.Parse ("127.0.0.4");
- ips[1] = IPAddress.Parse ("127.0.0.3");
- ips[2] = IPAddress.Parse ("127.0.0.2");
- ips[3] = IPAddress.Parse ("127.0.0.1");
-
- sock.Bind (ep);
- sock.Listen (1);
-
- try {
- sock.BeginConnect (ips, 1247, BCCallback,
- sock);
- Assert.Fail ("BeginConnectMultipleListen #1");
- } catch (InvalidOperationException) {
- } catch {
- Assert.Fail ("BeginConnectMultipleListen #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress[],int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectMultipleClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress[] ips = new IPAddress[4];
-
- ips[0] = IPAddress.Parse ("127.0.0.4");
- ips[1] = IPAddress.Parse ("127.0.0.3");
- ips[2] = IPAddress.Parse ("127.0.0.2");
- ips[3] = IPAddress.Parse ("127.0.0.1");
-
- sock.Close ();
-
- sock.BeginConnect (ips, 1247, BCCallback, sock);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(IPAddress,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectHostPortNull ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- sock.BeginConnect ((string)null, 0,
- BCCallback, sock);
- Assert.Fail ("BeginConnectHostPort #1");
- } catch (ArgumentNullException) {
- } catch {
- Assert.Fail ("BeginConnectHostPort #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(string,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectHostPortListen ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1248);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- try {
- sock.BeginConnect ("localhost", 1248,
- BCCallback, sock);
- Assert.Fail ("BeginConnectHostPortListen #1");
- } catch (InvalidOperationException) {
- } catch {
- Assert.Fail ("BeginConnectHostPortListen #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [Category ("NotWorking")] // Need to pick a non-IP AddressFamily that "works" on both mono and ms, this one only works on ms
- public void BeginConnectHostPortNotIP ()
- {
- Socket sock = new Socket (AddressFamily.NetBios,
- SocketType.Seqpacket,
- ProtocolType.Unspecified);
-
- try {
- sock.BeginConnect ("localhost", 0, BCCallback,
- sock);
- Assert.Fail ("BeginConnectHostPortNotIP #1");
- } catch (NotSupportedException) {
- } catch {
- Assert.Fail ("BeginConnectHostPortNotIP #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginConnect(string,int,AsyncCallback,object) is not supported")]
-#endif
- public void BeginConnectHostPortClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- sock.BeginConnect ("localhost", 0, BCCallback, sock);
- }
-
- static bool BDDisconnected = false;
- static ManualResetEvent BDCalledBack = new ManualResetEvent (false);
-
- private static void BDCallback (IAsyncResult asyncResult)
- {
-#if !TARGET_JVM
- Socket sock = (Socket)asyncResult.AsyncState;
-
- sock.EndDisconnect (asyncResult);
- BDDisconnected = true;
-
- BDCalledBack.Set ();
-#endif
- }
-
- [Test]
- [Category ("NotDotNet")] // "Needs XP or later"
- #if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.BeginDisconnect method is not supported")]
-#endif
- public void BeginDisconnect ()
- {
-#if !TARGET_JVM
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket listen = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1254);
-
- listen.Bind (ep);
- listen.Listen (1);
-
- sock.Connect (ip, 1254);
-
- Assertion.AssertEquals ("BeginDisconnect #1", true,
- sock.Connected);
-
- sock.Shutdown (SocketShutdown.Both);
-
- BDCalledBack.Reset ();
- BDDisconnected = false;
-
- sock.BeginDisconnect (false, BDCallback, sock);
-
- if (BDCalledBack.WaitOne (2000, false) == false) {
- Assert.Fail ("BeginDisconnect wait timed out");
- }
-
- Assertion.AssertEquals ("BeginDisconnect #2", true,
- BDDisconnected);
- Assertion.AssertEquals ("BeginDisconnect #3", false,
- sock.Connected);
-
- sock.Close ();
- listen.Close ();
-#endif
- }
-
- [Test]
- public void BeginReceiveSocketError ()
- {
- }
-
- [Test]
- public void BeginReceiveGeneric ()
- {
- }
-
- [Test]
- public void BeginReceiveGenericSocketError ()
- {
- }
-
- private static void BSCallback (IAsyncResult asyncResult)
- {
- Socket sock = (Socket)asyncResult.AsyncState;
-
- sock.EndSend (asyncResult);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.BeginSend(byte[] ...) is not supported")]
-#endif
- public void BeginSendNotConnected ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- byte[] send_bytes = new byte[] {10, 11, 12, 13};
-
- try {
- sock.BeginSend (send_bytes, 0,
- send_bytes.Length,
- SocketFlags.None, BSCallback,
- sock);
- Assert.Fail ("BeginSendNotConnected #1");
- } catch (SocketException ex) {
- Assertion.AssertEquals ("BeginSendNotConnected #2", 10057, ex.ErrorCode);
- } catch {
- Assert.Fail ("BeginSendNotConnected #3");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- public void BeginSendSocketError ()
- {
- }
-
- [Test]
- public void BeginSendGeneric ()
- {
- }
-
- [Test]
- public void BeginSendGenericSocketError ()
- {
- }
-
- [Test]
- public void BindTwice ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep1 = new IPEndPoint (IPAddress.Loopback,
- 1256);
- IPEndPoint ep2 = new IPEndPoint (IPAddress.Loopback,
- 1257);
-
- sock.Bind (ep1);
-
- try {
- sock.Bind (ep2);
- Assert.Fail ("BindTwice #1");
- } catch (SocketException ex) {
- Assertion.AssertEquals ("BindTwice #2",
- 10022, ex.ErrorCode);
- } catch {
- Assert.Fail ("BindTwice #3");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.Close(int) method is not supported")]
-#endif
- public void Close ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket listen = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1258);
-
- listen.Bind (ep);
- listen.Listen (1);
-
- sock.Connect (ep);
-
- Assertion.AssertEquals ("Close #1", true,
- sock.Connected);
-
- sock.Close (2);
-
- Thread.Sleep (3000);
-
- Assertion.AssertEquals ("Close #2", false,
- sock.Connected);
-
- listen.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress,int) is not supported")]
-#endif
- public void ConnectAddressPort ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket listen = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1249);
-
- listen.Bind (ep);
- listen.Listen (1);
-
- sock.Connect (ip, 1249);
-
- Assertion.AssertEquals ("ConnectAddressPort #1",
- true, sock.Connected);
-
- sock.Close ();
- listen.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress,int) is not supported")]
-#endif
- public void ConnectAddressPortNull ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = null;
-
- try {
- sock.Connect (ip, 1249);
- Assert.Fail ("ConnectAddressPortNull #1");
- } catch (ArgumentNullException) {
- } catch {
- Assert.Fail ("ConnectAddressPortNull #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress,int) is not supported")]
-#endif
- public void ConnectAddressPortListen ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1250);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- try {
- sock.Connect (ip, 1250);
- Assert.Fail ("ConnectAddressPortListen #1");
- } catch (InvalidOperationException) {
- } catch {
- Assert.Fail ("ConnectAddressPortListen #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress,int) is not supported")]
-#endif
- public void ConnectAddressPortClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
-
- sock.Close ();
-
- sock.Connect (ip, 1250);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress[],int) is not supported")]
-#endif
- public void ConnectMultiple ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket listen = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1251);
- IPAddress[] ips = new IPAddress[4];
-
- ips[0] = IPAddress.Parse ("127.0.0.4");
- ips[1] = IPAddress.Parse ("127.0.0.3");
- ips[2] = IPAddress.Parse ("127.0.0.2");
- ips[3] = IPAddress.Parse ("127.0.0.1");
-
- listen.Bind (ep);
- listen.Listen (1);
-
- sock.Connect (ips, 1251);
-
- Assertion.AssertEquals ("ConnectMultiple #1",
- true, sock.Connected);
- Assertion.AssertEquals ("ConnectMultiple #2",
- AddressFamily.InterNetwork,
- sock.RemoteEndPoint.AddressFamily);
- IPEndPoint remep = (IPEndPoint)sock.RemoteEndPoint;
-
- Assertion.AssertEquals ("ConnectMultiple #2",
- IPAddress.Loopback,
- remep.Address);
-
- sock.Close ();
- listen.Close ();
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress[],int) is not supported")]
-#endif
- public void ConnectMultipleNull ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress[] ips = null;
-
- try {
- sock.Connect (ips, 1251);
- Assert.Fail ("ConnectMultipleNull #1");
- } catch (ArgumentNullException) {
- } catch {
- Assert.Fail ("ConnectMultipleNull #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress[],int) is not supported")]
-#endif
- public void ConnectMultipleListen ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress[] ips = new IPAddress[4];
- IPEndPoint ep = new IPEndPoint (IPAddress.Loopback,
- 1252);
-
- ips[0] = IPAddress.Parse ("127.0.0.4");
- ips[1] = IPAddress.Parse ("127.0.0.3");
- ips[2] = IPAddress.Parse ("127.0.0.2");
- ips[3] = IPAddress.Parse ("127.0.0.1");
-
- sock.Bind (ep);
- sock.Listen (1);
-
- try {
- sock.Connect (ips, 1252);
- Assert.Fail ("ConnectMultipleListen #1");
- } catch (InvalidOperationException) {
- } catch {
- Assert.Fail ("ConnectMultipleListen #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(IPAddress[],int) is not supported")]
-#endif
- public void ConnectMultipleClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress[] ips = new IPAddress[4];
-
- ips[0] = IPAddress.Parse ("127.0.0.4");
- ips[1] = IPAddress.Parse ("127.0.0.3");
- ips[2] = IPAddress.Parse ("127.0.0.2");
- ips[3] = IPAddress.Parse ("127.0.0.1");
-
- sock.Close ();
-
- sock.Connect (ips, 1252);
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(string,int) is not supported")]
-#endif
- public void ConnectHostPortNull ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- sock.Connect ((string)null, 0);
- Assert.Fail ("ConnectHostPort #1");
- } catch (ArgumentNullException) {
- } catch {
- Assert.Fail ("ConnectHostPort #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(string,int) is not supported")]
-#endif
- public void ConnectHostPortListen ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1253);
-
- sock.Bind (ep);
- sock.Listen (1);
-
- try {
- sock.Connect ("localhost", 1253);
- Assert.Fail ("ConnectHostPortListen #1");
- } catch (InvalidOperationException) {
- } catch {
- Assert.Fail ("ConnectHostPortListen #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [Category ("NotWorking")] // Need to pick a non-IP AddressFamily that "works" on both mono and ms, this one only works on ms
- public void ConnectHostPortNotIP ()
- {
- Socket sock = new Socket (AddressFamily.NetBios,
- SocketType.Seqpacket,
- ProtocolType.Unspecified);
-
- try {
- sock.Connect ("localhost", 0);
- Assert.Fail ("ConnectHostPortNotIP #1");
- } catch (NotSupportedException) {
- } catch {
- Assert.Fail ("ConnectHostPortNotIP #2");
- } finally {
- sock.Close ();
- }
- }
-
- [Test]
- [ExpectedException (typeof(ObjectDisposedException))]
-#if TARGET_JVM
- [Ignore("System.Net.Sockets.Socket.Connect(string,int) is not supported")]
-#endif
- public void ConnectHostPortClosed ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- sock.Close ();
-
- sock.Connect ("localhost", 0);
- }
-
- [Test]
- [Category ("NotDotNet")] // "Needs XP or later"
-#if TARGET_JVM
- [Ignore ("System.Net.Sockets.Socket.Connect(IPAddress,int) is not supported")]
-#endif
- public void Disconnect ()
- {
-#if !TARGET_JVM
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- Socket listen = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
- IPAddress ip = IPAddress.Loopback;
- IPEndPoint ep = new IPEndPoint (ip, 1255);
-
- listen.Bind (ep);
- listen.Listen (1);
-
- sock.Connect (ip, 1255);
-
- Assertion.AssertEquals ("Disconnect #1", true,
- sock.Connected);
-
- sock.Shutdown (SocketShutdown.Both);
-
- sock.Disconnect (false);
-
- Assertion.AssertEquals ("BeginDisconnect #3", false,
- sock.Connected);
-
- sock.Close ();
- listen.Close ();
-#endif
- }
-
- [Test]
- public void DuplicateAndClose ()
- {
- }
-
- [Test]
- public void IOControl ()
- {
- }
-
- [Test]
- public void ReceiveGeneric ()
- {
- }
-
- [Test]
- public void ReceiveGenericSocketFlags ()
- {
- }
-
- [Test]
- public void ReceiveGenericSocketFlagsSocketError ()
- {
- }
-
- [Test]
- public void SendGeneric ()
- {
- }
-
- [Test]
- public void SendGenericSocketFlags ()
- {
- }
-
- [Test]
- public void SendGenericSocketFlagsSocketError ()
- {
- }
-
- [Test]
- public void ListenNotBound ()
- {
- Socket sock = new Socket (AddressFamily.InterNetwork,
- SocketType.Stream,
- ProtocolType.Tcp);
-
- try {
- sock.Listen (1);
- Assert.Fail ("ListenNotBound #1");
- } catch (SocketException ex) {
- Assertion.AssertEquals ("ListenNotBound #2",
- 10022, ex.ErrorCode);
- } catch {
- Assert.Fail ("ListenNotBound #3");
- } finally {
- sock.Close ();
- }
- }
-#endif
- }
-}
-
diff --git a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
index 488518c38bd..9b2453bd6f1 100644
--- a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
+++ b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs
@@ -13,9 +13,6 @@ using System.Threading;
using NUnit.Framework;
namespace MonoTests.System.Net.Sockets {
-#if TARGET_JVM
- [Ignore("UdpClient is not supported - since UDP sockets are not supported")]
-#endif
[TestFixture]
public class UdpClientTest {
[Test] // .ctor ()
diff --git a/mcs/class/System/Test/System.Net/DnsTest.cs b/mcs/class/System/Test/System.Net/DnsTest.cs
index 44797640651..2ce8e8447bf 100644
--- a/mcs/class/System/Test/System.Net/DnsTest.cs
+++ b/mcs/class/System/Test/System.Net/DnsTest.cs
@@ -28,8 +28,8 @@ namespace MonoTests.System.Net
[TestFixture]
public class DnsTest
{
- private String site1Name = "mono-project.com",
- site1Dot = "96.126.105.110",
+ private String site1Name = "jenkins.mono-project.com",
+ site1Dot = "162.253.133.196",
site2Name = "info.diku.dk",
site2Dot = "130.225.96.4",
noneExistingSite = "unlikely.xamarin.com";
@@ -44,7 +44,7 @@ namespace MonoTests.System.Net
IAsyncResult async = Dns.BeginGetHostByName (site1Name, null, null);
IPHostEntry entry = Dns.EndGetHostByName (async);
SubTestValidIPHostEntry (entry);
- Assert.IsTrue (entry.HostName == "www.mono-project.com" || entry.HostName == "mono-project.com");
+ Assert.IsTrue (entry.HostName == "jenkins.mono-project.com");
}
void GetHostByNameCallback (IAsyncResult ar)
@@ -191,7 +191,7 @@ namespace MonoTests.System.Net
[Test]
public void GetHostByName ()
{
- SubTestGetHostByName ("www.mono-project.com", site1Dot);
+ SubTestGetHostByName ("jenkins.mono-project.com", site1Dot);
SubTestGetHostByName (site2Name, site2Dot);
try {
var entry = Dns.GetHostByName (noneExistingSite);
@@ -252,9 +252,6 @@ namespace MonoTests.System.Net
[Test]
[ExpectedException (typeof (SocketException))]
-#if TARGET_JVM
- [Ignore ("Ignore failures in Sys.Net")]
-#endif
public void GetHostByAddressString2 ()
{
Dns.GetHostByAddress ("123.255.23");
diff --git a/mcs/class/System/Test/System.Net/FileWebRequestTest.cs b/mcs/class/System/Test/System.Net/FileWebRequestTest.cs
index 31af3609801..d5314d9caad 100644
--- a/mcs/class/System/Test/System.Net/FileWebRequestTest.cs
+++ b/mcs/class/System/Test/System.Net/FileWebRequestTest.cs
@@ -21,10 +21,6 @@ using System.Security.Permissions;
using NUnit.Framework;
-#if TARGET_JVM
-using System.Globalization;
-using System.Reflection;
-#endif
namespace MonoTests.System.Net
{
@@ -363,14 +359,12 @@ namespace MonoTests.System.Net
#else
Assert.AreEqual ("value", ex.Message, "#4");
#endif
-#if !TARGET_JVM
#if NET_2_0
Assert.IsNotNull (ex.ParamName, "#5");
Assert.AreEqual ("value", ex.ParamName, "#6");
#else
Assert.IsNull (ex.ParamName, "#5");
#endif
-#endif
Assert.IsNull (ex.InnerException, "#7");
}
}
@@ -588,11 +582,9 @@ namespace MonoTests.System.Net
} catch (WebException ex) {
Assert.AreEqual (typeof (WebException), ex.GetType (), "#1");
Assert.IsNotNull (ex.Message, "#2");
-#if !TARGET_JVM
Assert.IsTrue (ex.Message.IndexOf ("FileWebRequestTest.tmp") != -1, "#3");
Assert.IsNull (ex.Response, "#4");
Assert.IsNotNull (ex.InnerException, "#5");
-#endif
#if ONLY_1_1
FileNotFoundException fnf = ex.InnerException as FileNotFoundException;
@@ -631,13 +623,11 @@ namespace MonoTests.System.Net
} catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNotNull (ex.Message, "#3");
-#if !TARGET_JVM
#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#4");
#else
Assert.IsNull (ex.ParamName, "#4");
#endif
-#endif
Assert.IsNull (ex.InnerException, "#5");
}
}
@@ -652,13 +642,11 @@ namespace MonoTests.System.Net
} catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
Assert.IsNotNull (ex.Message, "#3");
-#if !TARGET_JVM
#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#4");
#else
Assert.IsNull (ex.ParamName, "#4");
#endif
-#endif
Assert.IsNull (ex.InnerException, "#5");
}
}
@@ -713,23 +701,17 @@ namespace MonoTests.System.Net
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#3");
Assert.IsNotNull (ex.Message, "#4");
-#if !TARGET_JVM
Assert.IsNotNull (ex.ParamName, "#5");
#if NET_2_0
Assert.IsFalse (ex.ParamName == "value", "#6");
#else
Assert.AreEqual ("value", ex.ParamName, "#6");
#endif
-#endif
Assert.IsNull (ex.InnerException, "#7");
}
}
[Test]
-#if TARGET_JVM
- //FIXME: include Java serialization compliant tests
- [Ignore ("The MS compliant binary serialization is not supported")]
-#endif
public void GetObjectData ()
{
FileWebRequest fwr = (FileWebRequest) WebRequest.Create ("file:///test.txt");
@@ -833,9 +815,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- [Ignore ("The MS compliant binary serialization is not supported")]
-#endif
public void Deserialize ()
{
MemoryStream ms = new MemoryStream ();
@@ -888,23 +867,6 @@ namespace MonoTests.System.Net
return new Uri ("file:///" + tempFile);
}
-#if TARGET_JVM
-
- private bool RunningOnUnix {
- get {
- Type t = Type.GetType("java.lang.System");
- MethodInfo mi = t.GetMethod("getProperty", new Type[] { typeof(string) });
- string osName = (string) mi.Invoke(null, new object[] { "os.name" });
-
- if(osName == null) {
- return false;
- }
-
- return !osName.StartsWith("win", true, CultureInfo.InvariantCulture);
- }
- }
-
-#else
private bool RunningOnUnix {
get {
// check for Unix platforms - see FAQ for more details
@@ -913,7 +875,6 @@ namespace MonoTests.System.Net
return ((platform == 4) || (platform == 128) || (platform == 6));
}
}
-#endif
private static readonly byte [] _serialized = new byte [] {
#if NET_2_0
diff --git a/mcs/class/System/Test/System.Net/FileWebResponseTest.cs b/mcs/class/System/Test/System.Net/FileWebResponseTest.cs
index 2a6b7379cb2..a29c3f9af97 100644
--- a/mcs/class/System/Test/System.Net/FileWebResponseTest.cs
+++ b/mcs/class/System/Test/System.Net/FileWebResponseTest.cs
@@ -13,10 +13,6 @@ using System.Net;
using NUnit.Framework;
-#if TARGET_JVM
-using System.Globalization;
-using System.Reflection;
-#endif
namespace MonoTests.System.Net
@@ -225,23 +221,6 @@ namespace MonoTests.System.Net
}
return new Uri ("file:///" + tempFile);
}
-#if TARGET_JVM
-
- private bool RunningOnUnix {
- get {
- Type t = Type.GetType("java.lang.System");
- MethodInfo mi = t.GetMethod("getProperty", new Type[] { typeof(string) });
- string osName = (string) mi.Invoke(null, new object[] { "os.name" });
-
- if(osName == null) {
- return false;
- }
-
- return !osName.StartsWith("win", true, CultureInfo.InvariantCulture);
- }
- }
-
-#else
private bool RunningOnUnix {
get {
// check for Unix platforms - see FAQ for more details
@@ -250,6 +229,5 @@ namespace MonoTests.System.Net
return ((platform == 4) || (platform == 128));
}
}
-#endif
}
}
diff --git a/mcs/class/System/Test/System.Net/HttpListener2Test.cs b/mcs/class/System/Test/System.Net/HttpListener2Test.cs
index f499921e47e..822bced9251 100644
--- a/mcs/class/System/Test/System.Net/HttpListener2Test.cs
+++ b/mcs/class/System/Test/System.Net/HttpListener2Test.cs
@@ -45,9 +45,6 @@ using NUnit.Framework;
namespace MonoTests.System.Net {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class HttpListener is not supported")]
-#endif
public class HttpListener2Test {
private HttpListener _listener = null;
diff --git a/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs b/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs
index 82f3c046825..d1de09391e8 100644
--- a/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs
+++ b/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs
@@ -33,9 +33,6 @@ using NUnit.Framework;
namespace MonoTests.System.Net {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class HttpListenerBasicIdentity - is not supported")]
-#endif
public class HttpListenerBasicIdentityTest {
[Test]
[ExpectedException (typeof (ArgumentNullException))]
diff --git a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
index b30b7cc6bea..b099f07d75e 100644
--- a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
+++ b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs
@@ -34,11 +34,7 @@ using HLPC=System.Net.HttpListenerPrefixCollection;
namespace MonoTests.System.Net {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class System.Net.HttpListenerPrefixCollection - is not supported")]
-#endif
public class HttpListenerPrefixCollectionTest {
-#if !TARGET_JVM
// NL -> Not listening -> tests when listener.IsListening == false
[Test]
public void NL_DefaultProperties ()
@@ -250,7 +246,6 @@ namespace MonoTests.System.Net {
}
Assert.AreEqual (items, 1);
}
-#endif
}
}
#endif
diff --git a/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs b/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs
index afe81eb33c3..4d8564237d6 100644
--- a/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs
+++ b/mcs/class/System/Test/System.Net/HttpListenerRequestTest.cs
@@ -38,9 +38,6 @@ using NUnit.Framework;
namespace MonoTests.System.Net
{
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class HttpListener is not supported")]
-#endif
public class HttpListenerRequestTest
{
[Test]
diff --git a/mcs/class/System/Test/System.Net/HttpListenerTest.cs b/mcs/class/System/Test/System.Net/HttpListenerTest.cs
index 83a335bc920..25f7b96a9b9 100644
--- a/mcs/class/System/Test/System.Net/HttpListenerTest.cs
+++ b/mcs/class/System/Test/System.Net/HttpListenerTest.cs
@@ -35,11 +35,7 @@ using NUnit.Framework;
namespace MonoTests.System.Net {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class HttpListener is not implemented")]
-#endif
public class HttpListenerTest {
-#if !TARGET_JVM
[Test]
public void DefaultProperties ()
{
@@ -454,7 +450,6 @@ namespace MonoTests.System.Net {
Event.Close ();
}
}
-#endif
}
}
#endif
diff --git a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
index 37a49de7333..889ad1b0a7c 100644
--- a/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
+++ b/mcs/class/System/Test/System.Net/HttpWebRequestTest.cs
@@ -45,9 +45,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- [Ignore ("Ignore failures in Sys.Net")]
-#endif
public void Proxy_Null ()
{
HttpWebRequest req = (HttpWebRequest) WebRequest.Create ("http://www.google.com");
@@ -58,9 +55,6 @@ namespace MonoTests.System.Net
[Test]
[Category("InetAccess")]
-#if TARGET_JVM
- [Ignore ("NMA - wrong cookies number returned")]
-#endif
public void Sync ()
{
HttpWebRequest req = (HttpWebRequest) WebRequest.Create ("http://www.google.com");
@@ -151,7 +145,7 @@ namespace MonoTests.System.Net
}
}
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
[Test]
[Ignore ("Fails on MS.NET")]
public void SslClientBlock ()
@@ -186,9 +180,6 @@ namespace MonoTests.System.Net
}
#endif
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void Missing_ContentEncoding ()
{
ServicePointManager.CertificatePolicy = new AcceptAllPolicy ();
@@ -211,9 +202,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void BadServer_ChunkedClose ()
{
// The server will send a chunked response without a 'last-chunked' mark
@@ -1002,9 +990,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
[Ignore ("This does not timeout any more. That's how MS works when reading small responses")]
public void ReadTimeout ()
{
@@ -1039,9 +1024,6 @@ namespace MonoTests.System.Net
}
[Test] // bug #324300
-#if TARGET_JVM
- [Category("NotWorking")]
-#endif
public void AllowAutoRedirect ()
{
IPEndPoint localEP = new IPEndPoint (IPAddress.Loopback, 8765);
@@ -1472,7 +1454,7 @@ namespace MonoTests.System.Net
}
}
- void TestTimeOut (string url)
+ void TestTimeOut (string url, WebExceptionStatus expectedExceptionStatus)
{
var timeoutWorker = new TimeoutTestHelper (url, three_seconds_in_milliseconds);
var threadStart = new ThreadStart (timeoutWorker.LaunchWebRequest);
@@ -1492,15 +1474,14 @@ namespace MonoTests.System.Net
Assert.Fail ("Should not be reached, timeout exception was not thrown and webrequest managed to retrieve an incorrect body: " + timeoutWorker.Body);
}
- Assert.IsNotNull (timeoutWorker.Exception,
- "Timeout exception was not thrown");
+ Assert.IsNotNull (timeoutWorker.Exception, "Exception was not thrown");
var webEx = timeoutWorker.Exception as WebException;
Assert.IsNotNull (webEx, "Exception thrown should be WebException, but was: " +
timeoutWorker.Exception.GetType ().FullName);
- Assert.AreEqual (webEx.Status, WebExceptionStatus.Timeout,
- "WebException was thrown, but with a wrong status (should be timeout): " + webEx.Status);
+ Assert.AreEqual (expectedExceptionStatus, webEx.Status,
+ "WebException was thrown, but with a wrong status (should be " + expectedExceptionStatus + "): " + webEx.Status);
Assert.IsFalse (timeoutWorker.End > (timeoutWorker.Start + TimeSpan.FromMilliseconds (three_seconds_in_milliseconds + 500)),
"Timeout exception should have been thrown shortly after timeout is reached, however it was at least half-second late");
@@ -1516,18 +1497,19 @@ namespace MonoTests.System.Net
{
responder.Start ();
- TestTimeOut (url);
+ TestTimeOut (url, WebExceptionStatus.Timeout);
responder.Stop ();
}
}
[Test] // 2nd possible case of https://bugzilla.novell.com/show_bug.cgi?id=MONO74177
- public void TestTimeoutPropertyWithServerThatDoesntExist ()
+ public void TestTimeoutWithEndpointThatDoesntExistThrowsConnectFailureBeforeTimeout ()
{
- string url = "http://10.128.200.100:8271/"; // some endpoint that is unlikely to exist
+ string url = "http://127.0.0.1:8271/"; // some endpoint that is unlikely to exist
- TestTimeOut (url);
+ // connecting to a non-existing endpoint should throw a ConnectFailure before the timeout is reached
+ TestTimeOut (url, WebExceptionStatus.ConnectFailure);
}
const string response_of_timeout_handler = "RESPONSE_OF_TIMEOUT_HANDLER";
@@ -2563,7 +2545,7 @@ namespace MonoTests.System.Net
}
}
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
class SslHttpServer : HttpServer {
X509Certificate _certificate;
@@ -2894,9 +2876,6 @@ namespace MonoTests.System.Net
}
[Test] // bug #324182
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void CanTimeout ()
{
IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 9128);
diff --git a/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs b/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs
index dd974917525..5866c34bbcc 100644
--- a/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs
+++ b/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs
@@ -666,9 +666,6 @@ namespace MonoTests.System.Net
#if NET_2_0
[Test] // bug #324182
-#if TARGET_JVM
- [Category ("NotWorking")]
-#endif
public void CanTimeout ()
{
IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 8000);
diff --git a/mcs/class/System/Test/System.Net/IPAddressTest.cs b/mcs/class/System/Test/System.Net/IPAddressTest.cs
index 1d389e131dd..a133684a8c6 100644
--- a/mcs/class/System/Test/System.Net/IPAddressTest.cs
+++ b/mcs/class/System/Test/System.Net/IPAddressTest.cs
@@ -416,9 +416,6 @@ public class IPAddressTest
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7213")]
-#endif
public void Constructor0_Address_Invalid ()
{
try {
@@ -473,9 +470,6 @@ public class IPAddressTest
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7213")]
-#endif
public void Constructor1_Address_4Byte ()
{
byte [] bytes = new byte [4] { 192, 202, 112, 37 };
diff --git a/mcs/class/System/Test/System.Net/NetworkCredentialTest.cs b/mcs/class/System/Test/System.Net/NetworkCredentialTest.cs
index 610b4aca31f..dbe3255cd68 100644
--- a/mcs/class/System/Test/System.Net/NetworkCredentialTest.cs
+++ b/mcs/class/System/Test/System.Net/NetworkCredentialTest.cs
@@ -31,7 +31,7 @@ using System.Net;
using NUnit.Framework;
-namespace MoonTest.System.Net {
+namespace MonoTests.System.Net {
[TestFixture]
public class NetworkCredentialTest {
diff --git a/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs b/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs
index 23b8d2b67c1..f0c3272f721 100644
--- a/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs
+++ b/mcs/class/System/Test/System.Net/ServicePointManagerTest.cs
@@ -44,9 +44,6 @@ public class ServicePointManagerTest
[Test, ExpectedException (typeof (InvalidOperationException))]
[Category ("InetAccess")]
-#if TARGET_JVM
- [Ignore ("Unsupported property - ServicePointManager.MaxServicePoints")]
-#endif
public void MaxServicePointManagers ()
{
Assert.AreEqual (0, ServicePointManager.MaxServicePoints, "#1");
diff --git a/mcs/class/System/Test/System.Net/ServicePointTest.cs b/mcs/class/System/Test/System.Net/ServicePointTest.cs
index 457dc5b29f1..98189c285be 100644
--- a/mcs/class/System/Test/System.Net/ServicePointTest.cs
+++ b/mcs/class/System/Test/System.Net/ServicePointTest.cs
@@ -35,9 +35,6 @@ public class ServicePointTest
[Test]
[Category ("InetAccess")]
-#if TARGET_JVM
- [Ignore ("Unsupported - ServicePointManager.FindServicePoint")]
-#endif
public void All ()
{
ServicePoint p = ServicePointManager.FindServicePoint (new Uri ("mailto:xx@yyy.com"));
@@ -119,9 +116,6 @@ public class ServicePointTest
[Test]
[Category ("InetAccess")]
-#if TARGET_JVM
- [Ignore ("The System.Net.ServicePointManager.FindServicePoint(Uri) is not supported")]
-#endif
public void ConnectionLimit ()
{
// the default is already 2, just in case it isn't..
@@ -155,9 +149,6 @@ public class ServicePointTest
#if NET_2_0
[Test]
[Category ("InetAccess")]
-#if TARGET_JVM
- [Ignore ("The System.Net.ServicePointManager.FindServicePoint(Uri) is not supported")]
-#endif
public void EndPointBind ()
{
Uri uri = new Uri ("http://www.go-mono.com/");
@@ -166,26 +157,22 @@ public class ServicePointTest
HttpWebRequest req = (HttpWebRequest) WebRequest.Create (uri);
bool called = false;
-#if !TARGET_JVM
sp.BindIPEndPointDelegate = delegate {
Assert.IsTrue (!called);
called = true;
return null;
};
-#endif
req.GetResponse ().Close ();
Assert.IsTrue (called);
req = (HttpWebRequest) WebRequest.Create (uri);
called = false;
-#if !TARGET_JVM
sp.BindIPEndPointDelegate = delegate(ServicePoint point, IPEndPoint remote, int times) {
Assert.IsTrue (times < 5);
called = true;
return new IPEndPoint(IPAddress.Parse("0.0.0.0"), 12345 + times);
};
-#endif
req.GetResponse ().Close ();
Assert.IsTrue (called);
diff --git a/mcs/class/System/Test/System.Net/WebHeaderCollectionTest.cs b/mcs/class/System/Test/System.Net/WebHeaderCollectionTest.cs
index 0e82e6314c7..9e4792acb94 100644
--- a/mcs/class/System/Test/System.Net/WebHeaderCollectionTest.cs
+++ b/mcs/class/System/Test/System.Net/WebHeaderCollectionTest.cs
@@ -277,11 +277,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- //FIXME: include Java serialization compliant tests - the order of object
- // in SerializationInfo should stay same to MS format...
- [Ignore ("The MS compliant binary serialization is not supported")]
-#endif
public void GetObjectData ()
{
SerializationInfo si = new SerializationInfo (typeof (WebHeaderCollection),
@@ -342,10 +337,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- //FIXME: include Java serialization compliant tests
- [Ignore ("The MS compliant binary serialization is not supported")]
-#endif
public void Serialize ()
{
WebHeaderCollection headers = new WebHeaderCollection ();
@@ -366,10 +357,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- //FIXME: include Java serialization compliant tests
- [Ignore ("The MS compliant binary serialization format is not supported")]
-#endif
public void Deserialize ()
{
MemoryStream ms = new MemoryStream ();
diff --git a/mcs/class/System/Test/System.Net/WebProxyTest.cs b/mcs/class/System/Test/System.Net/WebProxyTest.cs
index 49c7bbd7c93..2e3ffcb33df 100644
--- a/mcs/class/System/Test/System.Net/WebProxyTest.cs
+++ b/mcs/class/System/Test/System.Net/WebProxyTest.cs
@@ -171,9 +171,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- [Ignore ("TD BUG ID: 7213")]
-#endif
public void IsByPassed_Host_Null ()
{
WebProxy p = new WebProxy ("http://proxy.contoso.com", true);
@@ -229,9 +226,6 @@ namespace MonoTests.System.Net
}
[Test]
-#if TARGET_JVM
- [Ignore ("The MS compliant binary serialization is not supported")]
-#endif
public void GetObjectData ()
{
SerializationInfo si = new SerializationInfo (typeof (WebHeaderCollection),
diff --git a/mcs/class/System/Test/System.Net/WebUtilityTest.cs b/mcs/class/System/Test/System.Net/WebUtilityTest.cs
index 1d14bb8c19f..eb5c5c5fd71 100644
--- a/mcs/class/System/Test/System.Net/WebUtilityTest.cs
+++ b/mcs/class/System/Test/System.Net/WebUtilityTest.cs
@@ -60,9 +60,6 @@ namespace MonoTests.System.Net {
[Test]
[Category ("NotDotNet")]
-#if TARGET_JVM
- [Ignore ("TD #6954")]
-#endif
public void HtmlEncode_XSS ()
{
string problem = "\xff1cscript\xff1e"; // unicode looks alike <script>
diff --git a/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs b/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs
index bf3627336f8..71566982148 100644
--- a/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs
+++ b/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs
@@ -38,11 +38,7 @@ using System.Security.Cryptography.X509Certificates;
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class System.Security.Cryptography.AsnEncodedData - is not supported")]
-#endif
public class AsnEncodedDataTest {
-#if !TARGET_JVM
static byte[] asnNullBytes = { 0x05, 0x00 };
static string asnNullString = "05 00";
static byte[] asnLongBytes = { 0x30,0x5C,0x02,0x55,0x2D,0x58,0xE9,0xBF,0xF0,0x31,0xCD,0x79,0x06,0x50,0x5A,0xD5,0x9E,0x0E,0x2C,0xE6,0xC2,0xF7,0xF9,0xD2,0xCE,0x55,0x64,0x85,0xB1,0x90,0x9A,0x92,0xB3,0x36,0xC1,0xBC,0xEA,0xC8,0x23,0xB7,0xAB,0x3A,0xA7,0x64,0x63,0x77,0x5F,0x84,0x22,0x8E,0xE5,0xB6,0x45,0xDD,0x46,0xAE,0x0A,0xDD,0x00,0xC2,0x1F,0xBA,0xD9,0xAD,0xC0,0x75,0x62,0xF8,0x95,0x82,0xA2,0x80,0xB1,0x82,0x69,0xFA,0xE1,0xAF,0x7F,0xBC,0x7D,0xE2,0x7C,0x76,0xD5,0xBC,0x2A,0x80,0xFB,0x02,0x03,0x01,0x00,0x01 };
@@ -284,7 +280,6 @@ namespace MonoTests.System.Security.Cryptography {
Assert.AreEqual ("Subject Alternative Name", aed.Oid.FriendlyName, "FriendlyName");
// anyway the answer is most probably CryptoAPI
}
-#endif
}
}
diff --git a/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs b/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs
index 282d6999d28..8a3d778b7c9 100644
--- a/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs
+++ b/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs
@@ -17,11 +17,7 @@ using System.Security.Cryptography;
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class System.Security.Cryptography.OidCollection - is not supported")]
-#endif
public class OidCollectionTest {
-#if !TARGET_JVM
[Test]
public void Constructor ()
@@ -73,7 +69,6 @@ namespace MonoTests.System.Security.Cryptography {
Oid[] array = null;
oc.CopyTo (array, 0);
}
-#endif
}
}
diff --git a/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs b/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs
index 84085f13788..91dd1e55fe5 100644
--- a/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs
+++ b/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs
@@ -17,11 +17,7 @@ using System.Security.Cryptography;
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class System.Security.Cryptography.OidEnumerator - is not supported")]
-#endif
public class OidEnumeratorTest {
-#if !TARGET_JVM
private OidEnumerator GetEnumerator ()
{
OidCollection oc = new OidCollection ();
@@ -79,8 +75,7 @@ namespace MonoTests.System.Security.Cryptography {
enumerator.Reset ();
Assert.IsNotNull (enumerator.Current, "Current after reset");
}
-#endif
}
}
-#endif \ No newline at end of file
+#endif
diff --git a/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs b/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs
index 85fb05654d4..8555f9e21e2 100644
--- a/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs
+++ b/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs
@@ -37,12 +37,8 @@ using System.Security.Cryptography;
namespace MonoTests.System.Security.Cryptography {
[TestFixture]
-#if TARGET_JVM
- [Ignore ("The class System.Security.Cryptography.Oid - is not supported")]
-#endif
public class OidTest {
-#if !TARGET_JVM
static string invalidOid = "1.0";
static string invalidName = "friendlyName";
@@ -185,7 +181,6 @@ namespace MonoTests.System.Security.Cryptography {
// TODO: add other well known oid as we find them
}
-#endif
}
}
diff --git a/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs b/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs
index 4f077e47bc5..f5208ce99de 100644
--- a/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs
+++ b/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs
@@ -217,6 +217,27 @@ namespace MonoTests.System.Text.RegularExpressions
AddOptions(RegexOptions.RightToLeft)).Matches (null);
}
+ [Test]
+ public void Match_SubstringAnchors ()
+ {
+ Regex r = new Regex ("^ooba$",
+ AddOptions( RegexOptions.None ));
+ Match m = r.Match ("foobar", 1, 4);
+
+ Assert.IsTrue (m.Success);
+ Assert.AreEqual ("ooba", m.Value);
+ }
+
+ [Test]
+ public void Match_SubstringRtl ()
+ {
+ Regex r = new Regex(@".*", RegexOptions.RightToLeft);
+ Match m = r.Match("ABCDEFGHI", 2, 6);
+
+ Assert.IsTrue (m.Success);
+ Assert.AreEqual ("CDEFGH", m.Value);
+ }
+
[Test, ExpectedException (typeof (ArgumentNullException))]
public void Replace_InputNull ()
{
diff --git a/mcs/class/System/Test/System.Timers/TimerTest.cs b/mcs/class/System/Test/System.Timers/TimerTest.cs
index 79643c9beca..8ea60d22247 100644
--- a/mcs/class/System/Test/System.Timers/TimerTest.cs
+++ b/mcs/class/System/Test/System.Timers/TimerTest.cs
@@ -110,7 +110,6 @@ namespace MonoTests.System.Timers
[Test]
public void Constructor1_Interval_Max ()
{
-#if NET_2_0
try {
new Timer (0x80000000);
Assert.Fail ("#A1");
@@ -130,12 +129,97 @@ namespace MonoTests.System.Timers
Assert.IsNull (ex.InnerException, "#B3");
Assert.IsNotNull (ex.Message, "#B4");
}
-#else
- timer = new Timer (0x80000000);
- Assert.AreEqual (0x80000000, timer.Interval, "#1");
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Constructor1_Interval_Max_2 ()
+ {
timer = new Timer (double.MaxValue);
- Assert.AreEqual (double.MaxValue, timer.Interval, "#2");
-#endif
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Constructor1_Interval_Min_1 ()
+ {
+ timer = new Timer (0);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Constructor1_Interval_Min_2 ()
+ {
+ timer = new Timer (-5);
+ }
+
+ [Test]
+ public void Interval_TooHigh_Disabled_NoThrow ()
+ {
+ timer.Interval = double.MaxValue;
+ Assert.AreEqual (double.MaxValue, timer.Interval, "#3");
+ }
+
+ [Test]
+ public void Interval_TooHigh_ThrowOnEnabled ()
+ {
+ timer.Interval = 0x80000000;
+ Assert.AreEqual (0x80000000, timer.Interval, "#1");
+ try {
+ timer.Enabled = true;
+ Assert.Fail ("#2");
+ } catch (Exception ex) {
+ Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#3");
+ Assert.IsFalse (timer.Enabled);
+ }
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentException))]
+ public void Interval_TooHigh_Enabled_Throw ()
+ {
+ timer.Interval = 100;
+ timer.Enabled = true;
+ timer.Interval = double.MaxValue;
+ }
+
+ [Test]
+ public void DoubleClose_NoThrow ()
+ {
+ timer.Interval = 100;
+ timer.Start ();
+ timer.Close ();
+ timer.Close ();
+ }
+
+ [Test]
+ public void DisposedMeansDisabled_NoThrow ()
+ {
+ timer.Interval = 100;
+ timer.Start ();
+ timer.Close ();
+ Assert.IsFalse (timer.Enabled);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ObjectDisposedException))]
+ public void Disposed_ThrowOnEnabled ()
+ {
+ timer.Interval = 100;
+ timer.Start ();
+ timer.Close ();
+ timer.Enabled = false;
+ }
+
+ [Test]
+ public void Elapsed_DontFireIfDisposed ()
+ {
+ timer.Interval = 500;
+ var countElapsedCalls = 0;
+ timer.Elapsed += (_, __) => { countElapsedCalls++; };
+ timer.Start ();
+ timer.Close ();
+ ST.Thread.Sleep (500);
+ Assert.AreEqual (countElapsedCalls, 0);
}
[Test]
diff --git a/mcs/class/System/Test/System/StringTester.cs b/mcs/class/System/Test/System/StringTester.cs
new file mode 100644
index 00000000000..f3bd94274bb
--- /dev/null
+++ b/mcs/class/System/Test/System/StringTester.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Globalization;
+using System.IO;
+using System.Reflection;
+using System.Text;
+using System.Text.RegularExpressions;
+using NUnit.Framework;
+
+namespace MonoTests.System {
+ public class StringTester {
+ private const string ext = ".txt";
+ public static string Location = "./StringTests/";
+ public static bool CreateMode = false;
+
+ private static readonly Dictionary<string, Asserts> asserts = new Dictionary<string, Asserts> ();
+
+ public static void Assert (string id, string actual, string message = "")
+ {
+ string testFullName = GetTestMethodName ();
+
+ Asserts testAsserts;
+ if (!asserts.TryGetValue (testFullName, out testAsserts)) {
+ testAsserts = new Asserts ();
+
+ if (!CreateMode) {
+ string filePath = Path.GetFullPath (Path.Combine (Location, testFullName + ext));
+ if (!File.Exists (filePath)) {
+ NUnit.Framework.Assert.Ignore (filePath + " does not exist. \n" +
+ "The file should be generated by running on .NET the same test with StringTester.CreateMode = true.");
+ }
+
+ testAsserts.Load (filePath);
+ }
+
+ asserts.Add (testFullName, testAsserts);
+ }
+
+ if (CreateMode) {
+ testAsserts.AddExpected (id, actual);
+ return;
+ }
+
+ if (string.IsNullOrEmpty(message))
+ message = id;
+
+ string expected = testAsserts.GetExpected (id);
+ NUnit.Framework.Assert.AreEqual (expected, actual, message);
+ }
+
+ public static void Save ()
+ {
+ if (!CreateMode)
+ return;
+
+ foreach (var test in asserts)
+ test.Value.Save (Path.Combine (Location, test.Key + ext));
+ }
+
+ public static string GetTestMethodName ()
+ {
+ var stackTrace = new StackTrace ();
+ foreach (StackFrame stackFrame in stackTrace.GetFrames ()) {
+ MethodBase methodBase = stackFrame.GetMethod ();
+ Object [] attributes = methodBase.GetCustomAttributes (typeof (TestAttribute), false);
+ if (attributes.Length >= 1)
+ return methodBase.DeclaringType.FullName + "." + methodBase.Name;
+ }
+ return "Not called from a test method";
+ }
+
+ public class Asserts {
+ private const string escapes = "\n\t\0\r\\";
+ private const string unescapes = @"\n\t\0\r\\";
+ private static readonly Regex regex = new Regex (@"\\u(?<Value>[a-zA-Z0-9]{4})", RegexOptions.Compiled);
+ private readonly Dictionary<string, string> values = new Dictionary<string, string> ();
+
+ public void AddExpected (string id, string value)
+ {
+ values.Add (id, value);
+ }
+
+ public string GetExpected (string id)
+ {
+ return values [id];
+ }
+
+ public void Save (string filePath)
+ {
+ string dir = Path.GetDirectoryName (filePath);
+ if (!Directory.Exists (dir))
+ Directory.CreateDirectory (dir);
+
+ var sw = new StreamWriter (filePath, false, Encoding.UTF8);
+
+ foreach (var kv in values) {
+ sw.WriteLine (Escape (kv.Key));
+ sw.WriteLine (Escape (kv.Value));
+ }
+
+ sw.Close ();
+ }
+
+ public void Load (string filePath)
+ {
+ if (!File.Exists (filePath))
+ return;
+
+ var sr = new StreamReader (filePath, Encoding.UTF8);
+
+ while (sr.Peek () > 0) {
+ string id = Unescape (sr.ReadLine ());
+
+ if (sr.Peek () == 0)
+ break;
+
+ string value = Unescape (sr.ReadLine ());
+ values.Add (id, value);
+ }
+
+ sr.Close ();
+ }
+
+ private static string Escape (string str)
+ {
+ var sb = new StringBuilder ();
+ foreach (char c in str) {
+ int i = escapes.IndexOf (c);
+ if (i != -1) {
+ sb.Append (unescapes.Substring (i*2, 2));
+ continue;
+ }
+
+ if (c >= 0x7f || c < 0x20) {
+ sb.Append (string.Format (@"\u{0:x4}", (int) c));
+ continue;
+ }
+
+ sb.Append (c);
+ }
+ return sb.ToString ();
+ }
+
+ private static string Unescape (string str)
+ {
+ for (int i = 0; i < escapes.Length; i++)
+ str = str.Replace (unescapes.Substring (i*2, 2), "" + escapes [i]);
+
+ return regex.Replace (str,
+ m => ((char) int.Parse (m.Groups ["Value"].Value, NumberStyles.HexNumber)).ToString ());
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/class/System/Test/System/UriBuilderTest.cs b/mcs/class/System/Test/System/UriBuilderTest.cs
index bf341af8613..976620ce2c0 100644
--- a/mcs/class/System/Test/System/UriBuilderTest.cs
+++ b/mcs/class/System/Test/System/UriBuilderTest.cs
@@ -11,6 +11,7 @@
using NUnit.Framework;
using System;
+using System.Reflection;
namespace MonoTests.System
{
@@ -18,11 +19,20 @@ namespace MonoTests.System
public class UriBuilderTest
{
private UriBuilder b, b2, b3;
+ public bool IriParsing;
[SetUp]
public void GetReady()
{
b = new UriBuilder ("http", "www.ximian.com", 80, "foo/bar/index.html");
+
+ //Make sure Uri static constructor is called
+ Uri.EscapeDataString ("");
+
+ FieldInfo iriParsingField = typeof (Uri).GetField ("s_IriParsing",
+ BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
+ if (iriParsingField != null)
+ IriParsing = (bool) iriParsingField.GetValue (null);
}
[Test] // ctor ()
@@ -286,9 +296,13 @@ namespace MonoTests.System
{
UriBuilder ub = new UriBuilder ("http", "[1:2:3:4:5:6:7:8]", 8080, "/dir/subdir/file");
Assert.AreEqual ("[1:2:3:4:5:6:7:8]", ub.Host, "Host.1");
- Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", ub.Uri.Host, "Uri.Host");
- // once the Uri is created then some builder properties may change
- Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", ub.Host, "Host.2");
+ if (IriParsing)
+ Assert.AreEqual ("[1:2:3:4:5:6:7:8]", ub.Uri.Host, "Uri.Host");
+ else {
+ Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", ub.Uri.Host, "Uri.Host");
+ // once the Uri is created then some builder properties may change
+ Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", ub.Host, "Host.2");
+ }
}
[Test]
diff --git a/mcs/class/System/Test/System/UriParserTest.cs b/mcs/class/System/Test/System/UriParserTest.cs
index 3e551270df5..79111f90fc4 100644
--- a/mcs/class/System/Test/System/UriParserTest.cs
+++ b/mcs/class/System/Test/System/UriParserTest.cs
@@ -357,7 +357,7 @@ namespace MonoTests.System {
}
[Test]
- [ExpectedException (typeof (NullReferenceException))]
+ [ExpectedException (typeof (ArgumentNullException))]
public void IsBaseOf_UriNull ()
{
UnitTestUriParser p = new UnitTestUriParser ();
@@ -365,7 +365,7 @@ namespace MonoTests.System {
}
[Test]
- [ExpectedException (typeof (NullReferenceException))]
+ [ExpectedException (typeof (ArgumentNullException))]
public void IsBaseOf_NullUri ()
{
UnitTestUriParser p = new UnitTestUriParser ();
diff --git a/mcs/class/System/Test/System/UriPermutationsTest.cs b/mcs/class/System/Test/System/UriPermutationsTest.cs
new file mode 100644
index 00000000000..1010b6e5c1a
--- /dev/null
+++ b/mcs/class/System/Test/System/UriPermutationsTest.cs
@@ -0,0 +1,312 @@
+using System;
+using System.Text;
+using NUnit.Framework;
+
+namespace MonoTests.System {
+ [TestFixture]
+ public class UriPermutationsTest {
+
+ // Set this to true to generate the expected values
+ // The tests should run first on .NET with CreateMode = true
+ // The generated files should then be used when running the tests in Mono with CreateMode = false
+ private const bool createMode = false;
+
+ // The final location depends on NET_2_0, NET_4_0, NET_4_5.
+ private const string location = "./Test/System/UriPermutationsTest/";
+
+ private const string nonAsciiTestedChars = "☕";
+
+ // Chars that can change the current component.
+ // Those characters are tested alone.
+ private const string specialTestedChars = "@:?#";
+
+ // Scheme news: and custom: are not tested because there is a strange behavior on .NET 4.5
+ // new Uri("news:a/a%30").ToString() == "news:a/a%30a/a0"
+ private static readonly string [] schemes = {
+ "http://", "https://", "file://", "ftp://", "gopher://", "ldap://", "mailto:",
+ "net.pipe://", "net.tcp://", "nntp://", "telnet://", "custom://",
+ //"news:", "custom:"
+ };
+
+ private static readonly string [] componentLocations = {
+ "a/a{0}?", "b/a{0}#", "c/a?", "d/a#",
+ "a/a{0}?%30#", "a/a?{0}#%30", "a/a%30?#", // see why on TestChars comment
+ };
+
+ private static readonly string [] specialCases = {
+ "a/a#%#", "a/a#%25#", // '%' cause '#' to escape in some cases
+ "a/%80%81%B8%B9", // invalid utf8 encoding
+ };
+
+ private static readonly string [] reduceLocations = {
+ "a/b/{0}", "a/b/{0}a", "a/b/c{0}",
+ "a/b/{0}/a", "a/b/{0}a/a", "a/b/c{0}/a",
+ // Test '\\'
+ "a/b\\{0}", "a/b\\{0}a", "a/b\\c{0}",
+ "a/b\\{0}\\a", "a/b\\{0}a\\a", "a/b\\c{0}\\a",
+ // Test '/' %2F
+ "a/b%2F{0}", "a/b%2F{0}a", "a/b%2Fc{0}",
+ "a/b/{0}%2Fa", "a/b/{0}a%2Fa", "a/b/c{0}%2Fa",
+ "a/b%2F{0}/a", "a/b%2F{0}a/a", "a/b%2Fc{0}/a",
+ // Test '\\' %5C
+ "a/b%5C{0}", "a/b%5C{0}a", "a/b%5Cc{0}",
+ "a/b/{0}%5Ca", "a/b/{0}a%5Ca", "a/b/c{0}%5Ca",
+ "a/b%5C{0}/a", "a/b%5C{0}a/a", "a/b%5Cc{0}/a",
+ };
+
+ private static readonly string [] reduceElements = {
+ "", ".", "..", "...", "%2E", "%2E%2E", "%2E%2E%2E"
+ };
+
+ [SetUp]
+ public void Setup()
+ {
+ StringTester.CreateMode = createMode;
+#if NET_4_5
+ StringTester.Location = location + "NET_4_5";
+#elif NET_4_0
+ StringTester.Location = location + "NET_4_0";
+#else
+ StringTester.Location = location + "NET_2_0";
+#endif
+ }
+
+ [TearDown]
+ public void Teardown()
+ {
+ StringTester.Save();
+ }
+
+ // With IriParsing: http://a/a%21 does not unescape to http://a/a!
+ // but http://a/a%21%30 does unescape to http://a/a!0
+ // This happens with alpha numeric characters, non ASCII,'-','.','_' and '~'.
+ // So we tests characters with and without those characters.
+ private void TestChars (Action<string> action)
+ {
+ var sb1 = new StringBuilder ();
+ var sb2 = new StringBuilder ();
+ for (char c = '\0'; c <= 0x7f; c++) {
+ if (specialTestedChars.Contains ("" + c))
+ continue;
+
+ if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') ||
+ c == '-' || c == '.' || c == '_' || c == '~') {
+ sb2.Append (c);
+ continue;
+ }
+
+ sb1.Append (c);
+ sb2.Append (c);
+ }
+
+ foreach (char c in nonAsciiTestedChars)
+ sb2.Append (c);
+
+ action (sb1.ToString ());
+ action (sb2.ToString ());
+
+ foreach (char c in specialTestedChars)
+ action ("" + c);
+ }
+
+ internal static string HexEscapeMultiByte (char character, bool upper)
+ {
+ const string hex_upper_chars = "0123456789ABCDEF";
+ const string hex_lower_chars = "0123456789abcdef";
+
+ string hex_chars = (upper)? hex_upper_chars : hex_lower_chars;
+ string ret = "";
+ byte [] bytes = Encoding.UTF8.GetBytes (new [] {character});
+ foreach (byte b in bytes)
+ ret += "%" + hex_chars [((b & 0xf0) >> 4)] + hex_chars [((b & 0x0f))];
+
+ return ret;
+ }
+
+ private void TestScheme(Action<string> action)
+ {
+ foreach (string scheme in schemes)
+ action(scheme);
+ }
+
+ private delegate string UriToStringDelegate (Uri uri);
+
+ private void TestLocation (string id, string str, UriToStringDelegate toString, bool testRelative = true)
+ {
+ TestScheme (scheme => {
+ string uri = scheme + str;
+ string actual = toString (new Uri (scheme + str, UriKind.Absolute));
+ StringTester.Assert (scheme + id, actual);
+ });
+
+ if (!testRelative)
+ return;
+
+ string relActual = toString (new Uri ("./" + str, UriKind.Relative));
+ StringTester.Assert ("./" + id, relActual);
+ }
+
+ private void TestLocations (string [] locations, string id, string str, UriToStringDelegate toString,
+ bool testRelative = true)
+ {
+ foreach (string location in locations) {
+ if (location.Contains ("{0}"))
+ TestLocation (string.Format (location, id), string.Format (location, str), toString, testRelative);
+ else
+ TestLocation (location + id, location + str, toString, testRelative);
+ }
+ }
+
+ private void TestPercentageEncoding (UriToStringDelegate toString, bool testRelative = false, string id = "")
+ {
+ TestChars (unescapedStr => {
+ var sbUpper = new StringBuilder ();
+ var sbLower = new StringBuilder ();
+ foreach (char c in unescapedStr) {
+ sbUpper.Append (HexEscapeMultiByte (c, true));
+ sbLower.Append (HexEscapeMultiByte (c, false));
+ }
+ string escapedUpperStr = sbUpper.ToString ();
+ string escapedLowerStr = sbLower.ToString ();
+
+ TestLocations (componentLocations, unescapedStr+id, unescapedStr, toString, testRelative);
+ TestLocations (componentLocations, escapedUpperStr+id+"[Upper]", escapedUpperStr, toString, testRelative);
+ TestLocations (componentLocations, escapedLowerStr+id+"[Lower]", escapedLowerStr, toString, testRelative);
+ });
+
+ TestLocations (specialCases, id, "", toString, testRelative);
+ }
+
+ private void TestReduce (UriToStringDelegate toString, bool testRelative = true, string id = "")
+ {
+ foreach(var el in reduceElements)
+ TestLocations (reduceLocations, el + id, el, toString, testRelative);
+ }
+
+ private void TestComponent (UriComponents component)
+ {
+ TestPercentageEncoding (uri => uri.GetComponents (component, UriFormat.SafeUnescaped), id: "[SafeUnescaped]");
+ TestPercentageEncoding (uri => uri.GetComponents (component, UriFormat.Unescaped), id: "[Unescaped]");
+ TestPercentageEncoding (uri => uri.GetComponents (component, UriFormat.UriEscaped), id: "[UriEscaped]");
+ }
+
+ private delegate void TestStringDelegate (UriToStringDelegate toString, bool testRelative = true, string id = "");
+
+ [Test]
+ public void PercentageEncoding_AbsoluteUri ()
+ {
+ TestPercentageEncoding (uri => uri.AbsoluteUri);
+ }
+
+ [Test]
+ public void PercentageEncoding_AbsolutePath ()
+ {
+ TestPercentageEncoding (uri => uri.AbsolutePath);
+ }
+
+ [Test]
+ public void PercentageEncoding_Fragment ()
+ {
+ TestPercentageEncoding (uri => uri.Fragment);
+ }
+
+ [Test]
+ public void PercentageEncoding_GetComponents_AbsoluteUri ()
+ {
+ TestComponent (UriComponents.AbsoluteUri);
+ }
+
+ [Test]
+ public void PercentageEncoding_GetComponents_Fragment ()
+ {
+ TestComponent (UriComponents.Fragment);
+ }
+
+ [Test]
+ public void PercentageEncoding_GetComponents_Host ()
+ {
+ TestComponent (UriComponents.Host);
+ }
+
+ [Test]
+ public void PercentageEncoding_GetComponents_Path ()
+ {
+ TestComponent (UriComponents.Path);
+ }
+
+ [Test]
+ public void PercentageEncoding_GetComponents_PathAndQuery ()
+ {
+ TestComponent (UriComponents.PathAndQuery);
+ }
+
+ [Test]
+ public void PercentageEncoding_GetComponents_Query ()
+ {
+ TestComponent (UriComponents.Query);
+ }
+
+ [Test]
+ public void PercentageEncoding_Query ()
+ {
+ TestPercentageEncoding (uri => uri.Query);
+ }
+
+ [Test]
+ public void PercentageEncoding_ToString ()
+ {
+ TestPercentageEncoding (uri => uri.ToString (), true);
+ }
+
+ class UriEx : Uri
+ {
+ public UriEx (string s) : base (s)
+ {
+ }
+
+ public string UnescapeString (string s)
+ {
+ return Unescape (s);
+ }
+
+ public static string UnescapeString (string uri, string target)
+ {
+ return new UriEx (uri).UnescapeString (target);
+ }
+ }
+
+ [Test]
+ public void PercentageEncoding_Unescape ()
+ {
+ TestChars (str => {
+ var sbUpper = new StringBuilder ();
+ var sbLower = new StringBuilder ();
+ foreach (char c in str) {
+ sbUpper.Append (HexEscapeMultiByte (c, true));
+ sbLower.Append (HexEscapeMultiByte (c, false));
+ }
+ string escapedUpperStr = sbUpper.ToString ();
+ string escapedLowerStr = sbLower.ToString ();
+
+ StringTester.Assert (str + "[Unescaped]", UriEx.UnescapeString ("file://a/", str));
+ StringTester.Assert (escapedUpperStr + "[EscapedUpper]", UriEx.UnescapeString ("file://a/", escapedUpperStr));
+ StringTester.Assert (escapedLowerStr + "[EscapedLower]", UriEx.UnescapeString ("file://a/", escapedLowerStr));
+ });
+
+ foreach (var str in specialCases)
+ StringTester.Assert (str, UriEx.UnescapeString("file://a/", str));
+ }
+
+ [Test]
+ public void Reduce_AbsoluteUri ()
+ {
+ TestReduce (uri => uri.AbsoluteUri, false);
+ }
+
+ [Test]
+ public void Reduce_ToString ()
+ {
+ TestReduce (uri => uri.ToString (), true);
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/class/System/Test/System/UriTest.cs b/mcs/class/System/Test/System/UriTest.cs
index 65fd3a5847a..b3b33170c58 100644
--- a/mcs/class/System/Test/System/UriTest.cs
+++ b/mcs/class/System/Test/System/UriTest.cs
@@ -10,6 +10,7 @@
// (C) 2003 Ben Maurer
//
+using System.Reflection;
using NUnit.Framework;
using System;
using System.IO;
@@ -21,11 +22,20 @@ namespace MonoTests.System
public class UriTest
{
protected bool isWin32 = false;
+ public bool IriParsing;
[TestFixtureSetUp]
public void GetReady ()
{
isWin32 = (Path.DirectorySeparatorChar == '\\');
+
+ //Make sure Uri static constructor is called
+ Uri.EscapeDataString ("");
+
+ FieldInfo iriParsingField = typeof (Uri).GetField ("s_IriParsing",
+ BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
+ if (iriParsingField != null)
+ IriParsing = (bool)iriParsingField.GetValue (null);
}
[Test]
@@ -557,12 +567,10 @@ namespace MonoTests.System
Assert.AreEqual ("/", uri.AbsolutePath, "#7e");
Assert.AreEqual ("/", uri.PathAndQuery, "#7f");
Assert.AreEqual ("file://one_file.txt/", uri.GetLeftPart (UriPartial.Path), "#7g");
-#if !TARGET_JVM
if (isWin32)
Assert.AreEqual ("\\\\one_file.txt\\", uri.LocalPath, "#7b");
else
Assert.AreEqual ("/", uri.LocalPath, "#7b");
-#endif
Assert.AreEqual ("file", uri.Scheme, "#7c");
Assert.AreEqual ("one_file.txt", uri.Host, "#7d");
}
@@ -604,7 +612,11 @@ namespace MonoTests.System
Uri u1 = new Uri("http://localhost:8080/test.aspx?ReturnUrl=%2fSearchDoc%2fSearcher.aspx");
Uri u2 = new Uri("http://localhost:8080/test.aspx?ReturnUrl=%252fSearchDoc%252fSearcher.aspx");
- Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=/SearchDoc/Searcher.aspx", u1.ToString (), "QE1");
+ if (IriParsing)
+ Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=%2fSearchDoc%2fSearcher.aspx", u1.ToString (), "QE1");
+ else
+ Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=/SearchDoc/Searcher.aspx", u1.ToString (), "QE1");
+
Assert.AreEqual ("http://localhost:8080/test.aspx?ReturnUrl=%252fSearchDoc%252fSearcher.aspx", u2.ToString (), "QE2");
}
@@ -688,10 +700,15 @@ namespace MonoTests.System
{
Assert.AreEqual ("#", UriEx.UnescapeString ("file://localhost/c#", "%23"), "#1");
Assert.AreEqual ("c#", UriEx.UnescapeString ("file://localhost/c#", "c%23"), "#2");
- Assert.AreEqual ("\xA9", UriEx.UnescapeString ("file://localhost/c#", "%A9"), "#3");
Assert.AreEqual ("#", UriEx.UnescapeString ("http://localhost/c#", "%23"), "#1");
Assert.AreEqual ("c#", UriEx.UnescapeString ("http://localhost/c#", "c%23"), "#2");
+#if NET_4_0
+ Assert.AreEqual ("%A9", UriEx.UnescapeString ("file://localhost/c#", "%A9"), "#3");
+ Assert.AreEqual ("%A9", UriEx.UnescapeString ("http://localhost/c#", "%A9"), "#3");
+#else
+ Assert.AreEqual ("\xA9", UriEx.UnescapeString ("file://localhost/c#", "%A9"), "#3");
Assert.AreEqual ("\xA9", UriEx.UnescapeString ("http://localhost/c#", "%A9"), "#3");
+#endif
}
[Test]
@@ -767,9 +784,13 @@ namespace MonoTests.System
// 2-byte escape sequence, 2 individual characters
uri = new Uri ("file:///foo/a%C2%F8b", true);
path = uri.LocalPath;
+#if NET_4_0
+ Assert.AreEqual ("/foo/a%C2%F8b", path, "#7");
+#else
Assert.AreEqual (9, path.Length, "#7");
Assert.AreEqual (0xC2, path [6], "#8");
Assert.AreEqual (0xF8, path [7], "#9");
+#endif
}
[Test]
@@ -844,7 +865,12 @@ namespace MonoTests.System
public void Fragment_Escape ()
{
Uri u = new Uri("http://localhost/index.asp#main#start", false);
- Assert.AreEqual (u.Fragment, "#main%23start", "#1");
+
+#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");
@@ -853,7 +879,11 @@ namespace MonoTests.System
Uri b = new Uri ("http://www.gnome.org");
Uri n = new Uri (b, "blah#main#start");
- Assert.AreEqual (n.Fragment, "#main%23start", "#3");
+#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,8 +1101,14 @@ namespace MonoTests.System
// IPv6 Address
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]
@@ -1396,6 +1432,13 @@ namespace MonoTests.System
new Uri ("hey");
}
+ [Test]
+ public void SchemeWithDigits ()
+ {
+ Uri uri = new Uri ("net.p2p://foobar");
+ Assert.AreEqual ("net.p2p", uri.Scheme);
+ }
+
// on .NET 2.0 a port number is limited to UInt16.MaxValue
[ExpectedException (typeof (UriFormatException))]
[Test]
@@ -1480,13 +1523,19 @@ namespace MonoTests.System
for (int i = 0; i < 128; i++)
sb.Append ((char) i);
+#if NET_4_5
Assert.AreEqual (
-#if NET_4_0
"%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 ()));
+#elif NET_4_0
+ 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 ()));
#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
- Uri.EscapeDataString (sb.ToString ()));
Assert.AreEqual ("%C3%A1", Uri.EscapeDataString ("á"));
}
@@ -1497,13 +1546,19 @@ namespace MonoTests.System
for (int i = 0; i < 128; i++)
sb.Append ((char) i);
+#if NET_4_5
Assert.AreEqual (
-#if NET_4_0
"%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 ()));
+#elif NET_4_0
+ 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 ()));
#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",
-#endif
Uri.EscapeUriString (sb.ToString ()));
+#endif
Assert.AreEqual ("%C3%A1", Uri.EscapeDataString ("á"));
}
@@ -1896,5 +1951,54 @@ namespace MonoTests.System
Assert.IsTrue (Uri.TryCreate (mainUri, uriPath, out result), "#1");
Assert.AreEqual ("http://www.imdb.com/title/tt0106521", result.ToString (), "#2");
}
+
+ [Test]
+ public void GetSerializationInfoStringOnRelativeUri ()
+ {
+ var uri = new Uri ("/relative/path", UriKind.Relative);
+ var result = uri.GetComponents (UriComponents.SerializationInfoString, UriFormat.UriEscaped);
+
+ Assert.AreEqual (uri.OriginalString, result);
+ }
+
+ [Test]
+ [ExpectedException (typeof (ArgumentOutOfRangeException))]
+ public void GetSerializationInfoStringException ()
+ {
+ var uri = new Uri ("/relative/path", UriKind.Relative);
+ uri.GetComponents (UriComponents.SerializationInfoString | UriComponents.Host, UriFormat.UriEscaped);
+ }
+ }
+
+ // Tests non default IriParsing
+ [TestFixture]
+ public class UriTestAux : UriTest
+ {
+ private FieldInfo iriParsingField;
+ private bool originalIriParsing;
+
+ [TestFixtureSetUp]
+ public void GetReady ()
+ {
+ isWin32 = (Path.DirectorySeparatorChar == '\\');
+
+ //Make sure Uri static constructor is called
+ Uri.EscapeDataString ("");
+
+ iriParsingField = typeof (Uri).GetField ("s_IriParsing",
+ BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
+
+ originalIriParsing = (bool) iriParsingField.GetValue (null);
+
+ IriParsing = !originalIriParsing;
+
+ iriParsingField.SetValue (null, IriParsing);
+ }
+
+ [TestFixtureTearDown]
+ public void TearDown ()
+ {
+ iriParsingField.SetValue (null, originalIriParsing);
+ }
}
}
diff --git a/mcs/class/System/Test/System/UriTest2.cs b/mcs/class/System/Test/System/UriTest2.cs
index 2375fdf5ab6..73b143aae2f 100644
--- a/mcs/class/System/Test/System/UriTest2.cs
+++ b/mcs/class/System/Test/System/UriTest2.cs
@@ -1,538 +1,561 @@
-//
-// UriTest2.cs - More NUnit Test Cases for System.Uri
-//
-
-using System;
-using System.IO;
-using System.Reflection;
-using System.Text;
-using NUnit.Framework;
-
-namespace MonoTests.System
-{
- // help bring Moonlight tests back to mono/mcs nunit
-
- public delegate void TestCode ();
-
- static class Assert2 {
-
- public static void Throws<TException> (TestCode code, string message) where TException : Exception
- {
- Throws (code, typeof (TException), null, message);
- }
-
- public static void Throws (TestCode code, Type expected_exception, Type expected_inner_exception, string message)
- {
- bool failed = false;
- try {
- code ();
- failed = true;
- }
- catch (Exception ex) {
- if (!(ex.GetType () == expected_exception))
- throw new AssertionException (string.Format ("Expected '{0}', got '{1}'. {2}", expected_exception.FullName, ex.GetType ().FullName, message));
- //System.Diagnostics.Debug.WriteLine (ex.ToString ());
- if (expected_inner_exception != null) {
- // we only check if the inner exception was supplied
- if (ex.InnerException.GetType () != expected_inner_exception)
- throw new AssertionException (string.Format ("Expected InnerException '{0}', got '{1}'. {2}", expected_inner_exception.FullName, ex.InnerException.GetType ().FullName, message));
- }
- }
- if (failed)
- throw new AssertionException (string.Format ("Expected '{0}', but got no exception. {1}", expected_exception.FullName, message));
- }
- }
-
- [TestFixture]
- public class UriTest2
- {
- protected bool isWin32 = false;
-
- [SetUp]
- public void SetUp ()
- {
- isWin32 = (Path.DirectorySeparatorChar == '\\');
- }
-
- // Segments cannot be validated here...
- public void AssertUri (string relsrc, Uri uri,
- string toString,
- string absoluteUri,
- string scheme,
- string host,
- string localPath,
- string query,
- int port,
- bool isFile,
- bool isUnc,
- bool isLoopback,
- bool userEscaped,
- UriHostNameType hostNameType,
- string absolutePath,
- string pathAndQuery,
- string authority,
- string fragment,
- string userInfo)
- {
- Assert.AreEqual (absoluteUri, uri.AbsoluteUri, relsrc + " AbsoluteUri");
- Assert.AreEqual (scheme, uri.Scheme, relsrc + " Scheme");
- Assert.AreEqual (host, uri.Host, relsrc + " Host");
- Assert.AreEqual (port, uri.Port, relsrc + " Port");
- // Windows UNC path is not automatically testable on *nix environment,
- if (relsrc.StartsWith ("\\\\") && Path.DirectorySeparatorChar == '\\')
- Assert.AreEqual (localPath, uri.LocalPath, relsrc + " LocalPath");
- Assert.AreEqual (query, uri.Query, relsrc + " Query");
- Assert.AreEqual (fragment, uri.Fragment, relsrc + " Fragment");
- Assert.AreEqual (isFile, uri.IsFile, relsrc + " IsFile");
- Assert.AreEqual (isUnc, uri.IsUnc, relsrc + " IsUnc");
- Assert.AreEqual (isLoopback, uri.IsLoopback, relsrc + " IsLoopback");
- Assert.AreEqual (authority, uri.Authority, relsrc + " Authority");
- Assert.AreEqual (userEscaped, uri.UserEscaped, relsrc + " UserEscaped");
- Assert.AreEqual (userInfo, uri.UserInfo, relsrc + " UserInfo");
- Assert.AreEqual (hostNameType, uri.HostNameType, relsrc + " HostNameType");
- Assert.AreEqual (absolutePath, uri.AbsolutePath, relsrc + " AbsolutePath");
- Assert.AreEqual (pathAndQuery, uri.PathAndQuery, relsrc + " PathAndQuery");
- Assert.AreEqual (toString, uri.ToString (), relsrc + " ToString()");
- }
-
- [Test]
- [Ignore ("Tests needs to be updated for 2.0")]
- public void AbsoluteUriFromFile ()
- {
- FromResource ("test-uri-props.txt", null);
- }
-
- [Test]
- [Category("NotDotNet")]
- [Ignore ("Tests needs to be updated for 2.0")]
- public void AbsoluteUriFromFileManual ()
- {
- if (Path.DirectorySeparatorChar == '\\')
- return;
- FromResource ("test-uri-props-manual.txt", null);
- }
-
- [Test]
- [Ignore ("Tests needs to be updated for 2.0")]
- public void RelativeUriFromFile ()
- {
- FromResource ("test-uri-relative-props.txt", new Uri ("http://www.go-mono.com"));
- }
-
- private void FromResource (string res, Uri baseUri)
- {
- Assembly a = Assembly.GetExecutingAssembly ();
- Stream s = a.GetManifestResourceStream (res);
- StreamReader sr = new StreamReader (s, Encoding.UTF8);
- while (sr.Peek () > 0) {
- sr.ReadLine (); // skip
- string uriString = sr.ReadLine ();
-/*
-TextWriter sw = Console.Out;
- sw.WriteLine ("-------------------------");
- sw.WriteLine (uriString);
-*/
- if (uriString == null || uriString.Length == 0)
- break;
-
- try {
- Uri uri = baseUri == null ? new Uri (uriString) : new Uri (baseUri, uriString);
-/*
- sw.WriteLine ("ToString(): " + uri.ToString ());
- sw.WriteLine (uri.AbsoluteUri);
- sw.WriteLine (uri.Scheme);
- sw.WriteLine (uri.Host);
- sw.WriteLine (uri.LocalPath);
- sw.WriteLine (uri.Query);
- sw.WriteLine ("Port: " + uri.Port);
- sw.WriteLine (uri.IsFile);
- sw.WriteLine (uri.IsUnc);
- sw.WriteLine (uri.IsLoopback);
- sw.WriteLine (uri.UserEscaped);
- sw.WriteLine ("HostNameType: " + uri.HostNameType);
- sw.WriteLine (uri.AbsolutePath);
- sw.WriteLine ("PathAndQuery: " + uri.PathAndQuery);
- sw.WriteLine (uri.Authority);
- sw.WriteLine (uri.Fragment);
- sw.WriteLine (uri.UserInfo);
-*/
- AssertUri (uriString, uri,
- sr.ReadLine (),
- sr.ReadLine (),
- sr.ReadLine (),
- sr.ReadLine (),
- sr.ReadLine (),
- sr.ReadLine (),
- int.Parse (sr.ReadLine ()),
- bool.Parse (sr.ReadLine ()),
- bool.Parse (sr.ReadLine ()),
- bool.Parse (sr.ReadLine ()),
- bool.Parse (sr.ReadLine ()),
- (UriHostNameType) Enum.Parse (typeof (UriHostNameType), sr.ReadLine (), false),
- sr.ReadLine (),
- sr.ReadLine (),
- sr.ReadLine (),
- sr.ReadLine (),
- sr.ReadLine ());
-// Console.WriteLine ("Passed: " + uriString);
- } catch (UriFormatException ex) {
- Assert.Fail (String.Format ("Construction failed: [{0}] {1}", uriString, ex.Message));
- }
- }
- }
-
- [Test]
- public void MoreUnescape () // bug 733316
- {
- int index = 0;
- char unesc = Uri.HexUnescape ("%F6", ref index);
- Assert.AreEqual (3, index, "#01");
- Assert.AreEqual (0xf6, unesc, "#02");
- }
-
- [Test]
- public void UriScheme ()
- {
- Assert.AreEqual ("://", Uri.SchemeDelimiter, "://");
- Assert.AreEqual ("file", Uri.UriSchemeFile, "file");
- Assert.AreEqual ("ftp", Uri.UriSchemeFtp, "ftp");
- Assert.AreEqual ("gopher", Uri.UriSchemeGopher, "gopher");
- Assert.AreEqual ("http", Uri.UriSchemeHttp, "http");
- Assert.AreEqual ("https", Uri.UriSchemeHttps, "https");
- Assert.AreEqual ("mailto", Uri.UriSchemeMailto, "mailto");
- Assert.AreEqual ("news", Uri.UriSchemeNews, "news");
- Assert.AreEqual ("nntp", Uri.UriSchemeNntp, "file");
- Assert.AreEqual ("net.pipe", Uri.UriSchemeNetPipe, "net.pipe");
- Assert.AreEqual ("net.tcp", Uri.UriSchemeNetTcp, "net.tcp");
- }
-
- [Test] // bug #71049
- [ExpectedException (typeof (UriFormatException))]
- public void StarsInHost ()
- {
- new Uri ("http://w*w*w.go-mono.com");
- }
-
- [Test]
- public void NoHostName1_Bug76146 ()
- {
- Uri u = new Uri ("foo:///?bar");
- Assert.AreEqual ("/", u.AbsolutePath, "AbsolutePath");
- Assert.AreEqual ("foo:///?bar", u.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual (String.Empty, u.Authority, "Authority");
- Assert.AreEqual (String.Empty, u.Fragment, "Fragment");
- Assert.AreEqual (String.Empty, u.Host, "Host");
- // FIXME (2.0) - Normally this is never Basic without an Host name :(
- // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType");
- Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort");
- Assert.IsFalse (u.IsFile, "IsFile");
- // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback");
- Assert.IsFalse (u.IsUnc, "IsUnc");
- Assert.AreEqual ("/", u.LocalPath, "LocalPath");
- Assert.AreEqual ("/?bar", u.PathAndQuery, "PathAndQuery");
- Assert.AreEqual ("foo", u.Scheme, "Scheme");
- Assert.IsFalse (u.UserEscaped, "UserEscaped");
- Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo");
- }
-
- [Test]
- public void NoHostName2_Bug76146 ()
- {
- Uri u = new Uri ("foo:///bar");
- Assert.AreEqual ("/bar", u.AbsolutePath, "AbsolutePath");
- Assert.AreEqual ("foo:///bar", u.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual (String.Empty, u.Authority, "Authority");
- Assert.AreEqual (String.Empty, u.Fragment, "Fragment");
- Assert.AreEqual (String.Empty, u.Host, "Host");
- // FIXME (2.0) - Normally this is never Basic without an Host name :(
- // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType");
- Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort");
- Assert.IsFalse (u.IsFile, "IsFile");
- // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback");
- Assert.IsFalse (u.IsUnc, "IsUnc");
- Assert.AreEqual ("/bar", u.LocalPath, "LocalPath");
- Assert.AreEqual ("/bar", u.PathAndQuery, "PathAndQuery");
- Assert.AreEqual ("foo", u.Scheme, "Scheme");
- Assert.IsFalse (u.UserEscaped, "UserEscaped");
- Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo");
- }
-
- [Test]
- [ExpectedException (typeof (UriFormatException))]
- public void InvalidIPAddress_Bug76659 ()
- {
- new Uri ("http://127.0.0.1::::/");
- }
-
- [Test]
- public void File ()
- {
- string s = "file:///dir1%2f..%2fdir%2fapp.xap#header";
- Uri uri = new Uri (s);
- Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath");
- // default port is removed
- Assert.AreEqual ("file:///dir/app.xap#header", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual (String.Empty, uri.DnsSafeHost, "DnsSafeHost");
- Assert.AreEqual ("#header", uri.Fragment, "Fragment");
- Assert.AreEqual (String.Empty, uri.Host, "Host");
- Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
- Assert.IsFalse (uri.IsUnc, "IsUnc");
- Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath");
- Assert.AreEqual (s, uri.OriginalString, "OriginalString");
- Assert.AreEqual (-1, uri.Port, "Port");
- Assert.AreEqual (String.Empty, uri.Query, "Query");
- Assert.AreEqual ("file", uri.Scheme, "Scheme");
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
- Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
- Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
- }
-
- [Test]
- public void HttpWithDefaultPort ()
- {
- string s = "HTTP://host.domain.com:80/app.xap";
- Uri uri = new Uri (s);
- Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath");
- // default port is removed
- Assert.AreEqual ("http://host.domain.com/app.xap", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
- Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
- Assert.AreEqual ("host.domain.com", uri.Host, "Host");
- Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
- Assert.IsFalse (uri.IsUnc, "IsUnc");
- Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath");
- Assert.AreEqual (s, uri.OriginalString, "OriginalString");
- Assert.AreEqual (80, uri.Port, "Port");
- Assert.AreEqual (String.Empty, uri.Query, "Query");
- Assert.AreEqual ("http", uri.Scheme, "Scheme");
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
- Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
- Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
- }
-
- [Test]
- public void HttpWithoutPort ()
- {
- string s = "Http://host.DOMAIN.com/dir/app.xap#options";
- Uri uri = new Uri (s);
- Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath");
- Assert.AreEqual ("http://host.domain.com/dir/app.xap#options", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
- Assert.AreEqual ("#options", uri.Fragment, "Fragment");
- Assert.AreEqual ("host.domain.com", uri.Host, "Host");
- Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
- Assert.IsFalse (uri.IsUnc, "IsUnc");
- Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath");
- Assert.AreEqual (s, uri.OriginalString, "OriginalString");
- Assert.AreEqual (80, uri.Port, "Port");
- Assert.AreEqual (String.Empty, uri.Query, "Query");
- Assert.AreEqual ("http", uri.Scheme, "Scheme");
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
- Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
- Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
- }
-
- [Test]
- public void HttpWithNonStandardPort ()
- {
- string s = "http://monkey:s3kr3t@HOST.domain.Com:8080/dir/../app.xap?option=1";
- Uri uri = new Uri (s);
- Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath");
- // non-standard port is present
- Assert.AreEqual ("http://monkey:s3kr3t@host.domain.com:8080/app.xap?option=1", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
- Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
- Assert.AreEqual ("host.domain.com", uri.Host, "Host");
- Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
- Assert.IsFalse (uri.IsUnc, "IsUnc");
- Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath");
- Assert.AreEqual (s, uri.OriginalString, "OriginalString");
- Assert.AreEqual (8080, uri.Port, "Port");
- Assert.AreEqual ("?option=1", uri.Query, "Query");
- Assert.AreEqual ("http", uri.Scheme, "Scheme");
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
- Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo");
- Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
- }
-
- [Test]
- public void HttpsWithDefaultPort ()
- {
- string s = "httpS://host.domain.com:443/";
- Uri uri = new Uri (s);
- Assert.AreEqual ("/", uri.AbsolutePath, "AbsolutePath");
- // default port is removed
- Assert.AreEqual ("https://host.domain.com/", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
- Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
- Assert.AreEqual ("host.domain.com", uri.Host, "Host");
- Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
- Assert.IsFalse (uri.IsUnc, "IsUnc");
- Assert.AreEqual ("/", uri.LocalPath, "LocalPath");
- Assert.AreEqual (s, uri.OriginalString, "OriginalString");
- Assert.AreEqual (443, uri.Port, "Port");
- Assert.AreEqual (String.Empty, uri.Query, "Query");
- Assert.AreEqual ("https", uri.Scheme, "Scheme");
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
- Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
- Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
- }
-
- [Test]
- public void HttpsWithoutPort ()
- {
- string s = "Https://host.DOMAIN.com/dir%2fapp.xap#";
- Uri uri = new Uri (s);
- Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath");
- Assert.AreEqual ("https://host.domain.com/dir/app.xap#", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
- Assert.AreEqual ("#", uri.Fragment, "Fragment");
- Assert.AreEqual ("host.domain.com", uri.Host, "Host");
- Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
- Assert.IsFalse (uri.IsUnc, "IsUnc");
- Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath");
- Assert.AreEqual (s, uri.OriginalString, "OriginalString");
- Assert.AreEqual (443, uri.Port, "Port");
- Assert.AreEqual (String.Empty, uri.Query, "Query");
- Assert.AreEqual ("https", uri.Scheme, "Scheme");
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
- Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
- Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
- }
-
- [Test]
- public void HttpsWithNonStandardPort ()
- {
- string s = "https://monkey:s3kr3t@HOST.domain.Com:4430/dir/..%5Capp.xap?";
- Uri uri = new Uri (s);
- Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath");
- // non-standard port is present
- Assert.AreEqual ("https://monkey:s3kr3t@host.domain.com:4430/app.xap?", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
- Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
- Assert.AreEqual ("host.domain.com", uri.Host, "Host");
- Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
- Assert.IsFalse (uri.IsUnc, "IsUnc");
- Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath");
- Assert.AreEqual (s, uri.OriginalString, "OriginalString");
- Assert.AreEqual (4430, uri.Port, "Port");
- Assert.AreEqual ("?", uri.Query, "Query");
- Assert.AreEqual ("https", uri.Scheme, "Scheme");
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
- Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo");
- Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
- }
-
- [Test]
- public void Relative ()
- {
- Uri relative = new Uri ("/Moonlight", UriKind.Relative);
-
- Assert2.Throws<ArgumentNullException> (delegate {
- new Uri (null, "/Moonlight");
- }, "null,string");
- Assert2.Throws<ArgumentNullException> (delegate {
- new Uri (null, relative);
- }, "null,Uri");
-
- Assert2.Throws<ArgumentOutOfRangeException> (delegate {
- new Uri (relative, "/Moonlight");
- }, "Uri,string");
- Assert2.Throws<ArgumentOutOfRangeException> (delegate {
- new Uri (relative, relative);
- }, "Uri,Uri");
-
- Assert2.Throws<ArgumentOutOfRangeException> (delegate {
- new Uri (relative, (string) null);
- }, "Uri,string-null");
- Assert2.Throws<ArgumentOutOfRangeException> (delegate {
- new Uri (relative, (Uri) null);
- }, "Uri,Uri-null");
- }
-
- private void CheckRelativeUri (Uri uri)
- {
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.AbsolutePath);
- }, "AbsolutePath");
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.AbsoluteUri);
- }, "AbsoluteUri");
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.DnsSafeHost);
- }, "DnsSafeHost");
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.Fragment);
- }, "Fragment");
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.Host);
- }, "Host");
-
- Assert.IsFalse (uri.IsAbsoluteUri, "IsAbsoluteUri");
-
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.IsUnc);
- }, "IsUnc");
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.LocalPath);
- }, "LocalPath");
-
- Assert.AreEqual ("/Moonlight", uri.OriginalString, "OriginalString");
-
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.Port);
- }, "Port");
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.Query);
- }, "Query");
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.Scheme);
- }, "Scheme");
-
- Assert.IsFalse (uri.UserEscaped, "UserEscaped");
-
- Assert2.Throws<InvalidOperationException> (delegate {
- Assert.IsNotNull (uri.UserInfo);
- }, "UserInfo");
-
- Assert.AreEqual ("/Moonlight", uri.ToString (), "ToString");
- }
-
- [Test]
- public void Relative_AsRelative ()
- {
- Uri uri = new Uri ("/Moonlight", UriKind.Relative);
- CheckRelativeUri (uri);
- }
-
- [Test]
- public void Bug496783 ()
- {
- string s = "tcp://csve2.csse.unimelb.edu.au:9090/Aneka";
- Uri uri = new Uri (s);
- // this is not parsed by a known UriParser
- Assert.IsFalse (UriParser.IsKnownScheme (uri.Scheme), "UriParser");
-
- Uri uri2 = new Uri ("tcp://csve2.csse.unimelb.edu.au:9090/");
- Assert.IsTrue (uri2.IsBaseOf (uri), "IsBaseOf");
-
- Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.AbsoluteUri, UriFormat.Unescaped), "AbsoluteUri");
- Assert.AreEqual (uri.Fragment, uri.GetComponents (UriComponents.Fragment, UriFormat.Unescaped), "Fragment");
- Assert.AreEqual (uri.Host, uri.GetComponents (UriComponents.Host, UriFormat.Unescaped), "Host");
- Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.HostAndPort, UriFormat.Unescaped), "HostAndPort");
- Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.HttpRequestUrl, UriFormat.Unescaped), "HttpRequestUrl");
- Assert.AreEqual (String.Empty, uri.GetComponents (UriComponents.KeepDelimiter, UriFormat.Unescaped), "KeepDelimiter");
- Assert.AreEqual ("Aneka", uri.GetComponents (UriComponents.Path, UriFormat.Unescaped), "Path");
- Assert.AreEqual (uri.LocalPath, uri.GetComponents (UriComponents.PathAndQuery, UriFormat.Unescaped), "PathAndQuery");
- Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.Port, UriFormat.Unescaped), "Port");
- Assert.AreEqual (uri.Query, uri.GetComponents (UriComponents.Query, UriFormat.Unescaped), "Query");
- Assert.AreEqual (uri.Scheme, uri.GetComponents (UriComponents.Scheme, UriFormat.Unescaped), "Scheme");
- Assert.AreEqual ("tcp://csve2.csse.unimelb.edu.au:9090", uri.GetComponents (UriComponents.SchemeAndServer, UriFormat.Unescaped), "SchemeAndServer");
- Assert.AreEqual (uri.OriginalString, uri.GetComponents (UriComponents.SerializationInfoString, UriFormat.Unescaped), "SerializationInfoString");
- Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.StrongAuthority, UriFormat.Unescaped), "StrongAuthority");
- Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.StrongPort, UriFormat.Unescaped), "StrongPort");
- Assert.AreEqual (uri.UserInfo, uri.GetComponents (UriComponents.UserInfo, UriFormat.Unescaped), "UserInfo");
- }
+//
+// UriTest2.cs - More NUnit Test Cases for System.Uri
+//
+
+using System;
+using System.IO;
+using System.Reflection;
+using System.Text;
+using NUnit.Framework;
+
+namespace MonoTests.System
+{
+ // help bring Moonlight tests back to mono/mcs nunit
+
+ public delegate void TestCode ();
+
+ static class Assert2 {
+
+ public static void Throws<TException> (TestCode code, string message) where TException : Exception
+ {
+ Throws (code, typeof (TException), null, message);
+ }
+
+ public static void Throws (TestCode code, Type expected_exception, Type expected_inner_exception, string message)
+ {
+ bool failed = false;
+ try {
+ code ();
+ failed = true;
+ }
+ catch (Exception ex) {
+ if (!(ex.GetType () == expected_exception))
+ throw new AssertionException (string.Format ("Expected '{0}', got '{1}'. {2}", expected_exception.FullName, ex.GetType ().FullName, message));
+ //System.Diagnostics.Debug.WriteLine (ex.ToString ());
+ if (expected_inner_exception != null) {
+ // we only check if the inner exception was supplied
+ if (ex.InnerException.GetType () != expected_inner_exception)
+ throw new AssertionException (string.Format ("Expected InnerException '{0}', got '{1}'. {2}", expected_inner_exception.FullName, ex.InnerException.GetType ().FullName, message));
+ }
+ }
+ if (failed)
+ throw new AssertionException (string.Format ("Expected '{0}', but got no exception. {1}", expected_exception.FullName, message));
+ }
+ }
+
+ [TestFixture]
+ public class UriTest2
+ {
+ protected bool isWin32 = false;
+ public bool IriParsing;
+
+ [SetUp]
+ public void SetUp ()
+ {
+ isWin32 = (Path.DirectorySeparatorChar == '\\');
+
+ //Make sure Uri static constructor is called
+ Uri.EscapeDataString ("");
+
+ FieldInfo iriParsingField = typeof (Uri).GetField ("s_IriParsing",
+ BindingFlags.Static | BindingFlags.GetField | BindingFlags.NonPublic);
+ if (iriParsingField != null)
+ IriParsing = (bool)iriParsingField.GetValue (null);
+ }
+
+ // Segments cannot be validated here...
+ public void AssertUri (string relsrc, Uri uri,
+ string toString,
+ string absoluteUri,
+ string scheme,
+ string host,
+ string localPath,
+ string query,
+ int port,
+ bool isFile,
+ bool isUnc,
+ bool isLoopback,
+ bool userEscaped,
+ UriHostNameType hostNameType,
+ string absolutePath,
+ string pathAndQuery,
+ string authority,
+ string fragment,
+ string userInfo)
+ {
+ Assert.AreEqual (absoluteUri, uri.AbsoluteUri, relsrc + " AbsoluteUri");
+ Assert.AreEqual (scheme, uri.Scheme, relsrc + " Scheme");
+ Assert.AreEqual (host, uri.Host, relsrc + " Host");
+ Assert.AreEqual (port, uri.Port, relsrc + " Port");
+ // Windows UNC path is not automatically testable on *nix environment,
+ if (relsrc.StartsWith ("\\\\") && Path.DirectorySeparatorChar == '\\')
+ Assert.AreEqual (localPath, uri.LocalPath, relsrc + " LocalPath");
+ Assert.AreEqual (query, uri.Query, relsrc + " Query");
+ Assert.AreEqual (fragment, uri.Fragment, relsrc + " Fragment");
+ Assert.AreEqual (isFile, uri.IsFile, relsrc + " IsFile");
+ Assert.AreEqual (isUnc, uri.IsUnc, relsrc + " IsUnc");
+ Assert.AreEqual (isLoopback, uri.IsLoopback, relsrc + " IsLoopback");
+ Assert.AreEqual (authority, uri.Authority, relsrc + " Authority");
+ Assert.AreEqual (userEscaped, uri.UserEscaped, relsrc + " UserEscaped");
+ Assert.AreEqual (userInfo, uri.UserInfo, relsrc + " UserInfo");
+ Assert.AreEqual (hostNameType, uri.HostNameType, relsrc + " HostNameType");
+ Assert.AreEqual (absolutePath, uri.AbsolutePath, relsrc + " AbsolutePath");
+ Assert.AreEqual (pathAndQuery, uri.PathAndQuery, relsrc + " PathAndQuery");
+ Assert.AreEqual (toString, uri.ToString (), relsrc + " ToString()");
+ }
+
+ [Test]
+ [Ignore ("Tests needs to be updated for 2.0")]
+ public void AbsoluteUriFromFile ()
+ {
+ FromResource ("test-uri-props.txt", null);
+ }
+
+ [Test]
+ [Category("NotDotNet")]
+ [Ignore ("Tests needs to be updated for 2.0")]
+ public void AbsoluteUriFromFileManual ()
+ {
+ if (Path.DirectorySeparatorChar == '\\')
+ return;
+ FromResource ("test-uri-props-manual.txt", null);
+ }
+
+ [Test]
+ [Ignore ("Tests needs to be updated for 2.0")]
+ public void RelativeUriFromFile ()
+ {
+ FromResource ("test-uri-relative-props.txt", new Uri ("http://www.go-mono.com"));
+ }
+
+ private void FromResource (string res, Uri baseUri)
+ {
+ Assembly a = Assembly.GetExecutingAssembly ();
+ Stream s = a.GetManifestResourceStream (res);
+ StreamReader sr = new StreamReader (s, Encoding.UTF8);
+ while (sr.Peek () > 0) {
+ sr.ReadLine (); // skip
+ string uriString = sr.ReadLine ();
+/*
+TextWriter sw = Console.Out;
+ sw.WriteLine ("-------------------------");
+ sw.WriteLine (uriString);
+*/
+ if (uriString == null || uriString.Length == 0)
+ break;
+
+ try {
+ Uri uri = baseUri == null ? new Uri (uriString) : new Uri (baseUri, uriString);
+/*
+ sw.WriteLine ("ToString(): " + uri.ToString ());
+ sw.WriteLine (uri.AbsoluteUri);
+ sw.WriteLine (uri.Scheme);
+ sw.WriteLine (uri.Host);
+ sw.WriteLine (uri.LocalPath);
+ sw.WriteLine (uri.Query);
+ sw.WriteLine ("Port: " + uri.Port);
+ sw.WriteLine (uri.IsFile);
+ sw.WriteLine (uri.IsUnc);
+ sw.WriteLine (uri.IsLoopback);
+ sw.WriteLine (uri.UserEscaped);
+ sw.WriteLine ("HostNameType: " + uri.HostNameType);
+ sw.WriteLine (uri.AbsolutePath);
+ sw.WriteLine ("PathAndQuery: " + uri.PathAndQuery);
+ sw.WriteLine (uri.Authority);
+ sw.WriteLine (uri.Fragment);
+ sw.WriteLine (uri.UserInfo);
+*/
+ AssertUri (uriString, uri,
+ sr.ReadLine (),
+ sr.ReadLine (),
+ sr.ReadLine (),
+ sr.ReadLine (),
+ sr.ReadLine (),
+ sr.ReadLine (),
+ int.Parse (sr.ReadLine ()),
+ bool.Parse (sr.ReadLine ()),
+ bool.Parse (sr.ReadLine ()),
+ bool.Parse (sr.ReadLine ()),
+ bool.Parse (sr.ReadLine ()),
+ (UriHostNameType) Enum.Parse (typeof (UriHostNameType), sr.ReadLine (), false),
+ sr.ReadLine (),
+ sr.ReadLine (),
+ sr.ReadLine (),
+ sr.ReadLine (),
+ sr.ReadLine ());
+// Console.WriteLine ("Passed: " + uriString);
+ } catch (UriFormatException ex) {
+ Assert.Fail (String.Format ("Construction failed: [{0}] {1}", uriString, ex.Message));
+ }
+ }
+ }
+
+ [Test]
+ public void MoreUnescape () // bug 733316
+ {
+ int index = 0;
+ char unesc = Uri.HexUnescape ("%F6", ref index);
+ Assert.AreEqual (3, index, "#01");
+ Assert.AreEqual (0xf6, unesc, "#02");
+ }
+
+ [Test]
+ public void UriScheme ()
+ {
+ Assert.AreEqual ("://", Uri.SchemeDelimiter, "://");
+ Assert.AreEqual ("file", Uri.UriSchemeFile, "file");
+ Assert.AreEqual ("ftp", Uri.UriSchemeFtp, "ftp");
+ Assert.AreEqual ("gopher", Uri.UriSchemeGopher, "gopher");
+ Assert.AreEqual ("http", Uri.UriSchemeHttp, "http");
+ Assert.AreEqual ("https", Uri.UriSchemeHttps, "https");
+ Assert.AreEqual ("mailto", Uri.UriSchemeMailto, "mailto");
+ Assert.AreEqual ("news", Uri.UriSchemeNews, "news");
+ Assert.AreEqual ("nntp", Uri.UriSchemeNntp, "file");
+ Assert.AreEqual ("net.pipe", Uri.UriSchemeNetPipe, "net.pipe");
+ Assert.AreEqual ("net.tcp", Uri.UriSchemeNetTcp, "net.tcp");
+ }
+
+ [Test] // bug #71049
+ [ExpectedException (typeof (UriFormatException))]
+ public void StarsInHost ()
+ {
+ new Uri ("http://w*w*w.go-mono.com");
+ }
+
+ [Test]
+ public void NoHostName1_Bug76146 ()
+ {
+ Uri u = new Uri ("foo:///?bar");
+ Assert.AreEqual ("/", u.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("foo:///?bar", u.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual (String.Empty, u.Authority, "Authority");
+ Assert.AreEqual (String.Empty, u.Fragment, "Fragment");
+ Assert.AreEqual (String.Empty, u.Host, "Host");
+ // FIXME (2.0) - Normally this is never Basic without an Host name :(
+ // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType");
+ Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort");
+ Assert.IsFalse (u.IsFile, "IsFile");
+ // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback");
+ Assert.IsFalse (u.IsUnc, "IsUnc");
+ Assert.AreEqual ("/", u.LocalPath, "LocalPath");
+ Assert.AreEqual ("/?bar", u.PathAndQuery, "PathAndQuery");
+ Assert.AreEqual ("foo", u.Scheme, "Scheme");
+ Assert.IsFalse (u.UserEscaped, "UserEscaped");
+ Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo");
+ }
+
+ [Test]
+ public void NoHostName2_Bug76146 ()
+ {
+ Uri u = new Uri ("foo:///bar");
+ Assert.AreEqual ("/bar", u.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("foo:///bar", u.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual (String.Empty, u.Authority, "Authority");
+ Assert.AreEqual (String.Empty, u.Fragment, "Fragment");
+ Assert.AreEqual (String.Empty, u.Host, "Host");
+ // FIXME (2.0) - Normally this is never Basic without an Host name :(
+ // Assert.AreEqual (UriHostNameType.Basic, u.HostNameType, "HostNameType");
+ Assert.IsTrue (u.IsDefaultPort, "IsDefaultPort");
+ Assert.IsFalse (u.IsFile, "IsFile");
+ // FIXME Assert.IsTrue (u.IsLoopback, "IsLoopback");
+ Assert.IsFalse (u.IsUnc, "IsUnc");
+ Assert.AreEqual ("/bar", u.LocalPath, "LocalPath");
+ Assert.AreEqual ("/bar", u.PathAndQuery, "PathAndQuery");
+ Assert.AreEqual ("foo", u.Scheme, "Scheme");
+ Assert.IsFalse (u.UserEscaped, "UserEscaped");
+ Assert.AreEqual (String.Empty, u.UserInfo, "UserInfo");
+ }
+
+ [Test]
+ [ExpectedException (typeof (UriFormatException))]
+ public void InvalidIPAddress_Bug76659 ()
+ {
+ new Uri ("http://127.0.0.1::::/");
+ }
+
+ [Test]
+ public void File ()
+ {
+ string s = "file:///dir1%2f..%2fdir%2fapp.xap#header";
+ Uri uri = new Uri (s);
+ Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath");
+ // default port is removed
+ Assert.AreEqual ("file:///dir/app.xap#header", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual (String.Empty, uri.DnsSafeHost, "DnsSafeHost");
+ Assert.AreEqual ("#header", uri.Fragment, "Fragment");
+ Assert.AreEqual (String.Empty, uri.Host, "Host");
+ Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
+ Assert.IsFalse (uri.IsUnc, "IsUnc");
+ Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath");
+ Assert.AreEqual (s, uri.OriginalString, "OriginalString");
+ Assert.AreEqual (-1, uri.Port, "Port");
+ Assert.AreEqual (String.Empty, uri.Query, "Query");
+ Assert.AreEqual ("file", uri.Scheme, "Scheme");
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+ Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
+ Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void HttpWithDefaultPort ()
+ {
+ string s = "HTTP://host.domain.com:80/app.xap";
+ Uri uri = new Uri (s);
+ Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath");
+ // default port is removed
+ Assert.AreEqual ("http://host.domain.com/app.xap", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
+ Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
+ Assert.AreEqual ("host.domain.com", uri.Host, "Host");
+ Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
+ Assert.IsFalse (uri.IsUnc, "IsUnc");
+ Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath");
+ Assert.AreEqual (s, uri.OriginalString, "OriginalString");
+ Assert.AreEqual (80, uri.Port, "Port");
+ Assert.AreEqual (String.Empty, uri.Query, "Query");
+ Assert.AreEqual ("http", uri.Scheme, "Scheme");
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+ Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
+ Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void HttpWithoutPort ()
+ {
+ string s = "Http://host.DOMAIN.com/dir/app.xap#options";
+ Uri uri = new Uri (s);
+ Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("http://host.domain.com/dir/app.xap#options", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
+ Assert.AreEqual ("#options", uri.Fragment, "Fragment");
+ Assert.AreEqual ("host.domain.com", uri.Host, "Host");
+ Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
+ Assert.IsFalse (uri.IsUnc, "IsUnc");
+ Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath");
+ Assert.AreEqual (s, uri.OriginalString, "OriginalString");
+ Assert.AreEqual (80, uri.Port, "Port");
+ Assert.AreEqual (String.Empty, uri.Query, "Query");
+ Assert.AreEqual ("http", uri.Scheme, "Scheme");
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+ Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
+ Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void HttpWithNonStandardPort ()
+ {
+ string s = "http://monkey:s3kr3t@HOST.domain.Com:8080/dir/../app.xap?option=1";
+ Uri uri = new Uri (s);
+ Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath");
+ // non-standard port is present
+ Assert.AreEqual ("http://monkey:s3kr3t@host.domain.com:8080/app.xap?option=1", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
+ Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
+ Assert.AreEqual ("host.domain.com", uri.Host, "Host");
+ Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
+ Assert.IsFalse (uri.IsUnc, "IsUnc");
+ Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath");
+ Assert.AreEqual (s, uri.OriginalString, "OriginalString");
+ Assert.AreEqual (8080, uri.Port, "Port");
+ Assert.AreEqual ("?option=1", uri.Query, "Query");
+ Assert.AreEqual ("http", uri.Scheme, "Scheme");
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+ Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo");
+ Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void HttpsWithDefaultPort ()
+ {
+ string s = "httpS://host.domain.com:443/";
+ Uri uri = new Uri (s);
+ Assert.AreEqual ("/", uri.AbsolutePath, "AbsolutePath");
+ // default port is removed
+ Assert.AreEqual ("https://host.domain.com/", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
+ Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
+ Assert.AreEqual ("host.domain.com", uri.Host, "Host");
+ Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
+ Assert.IsFalse (uri.IsUnc, "IsUnc");
+ Assert.AreEqual ("/", uri.LocalPath, "LocalPath");
+ Assert.AreEqual (s, uri.OriginalString, "OriginalString");
+ Assert.AreEqual (443, uri.Port, "Port");
+ Assert.AreEqual (String.Empty, uri.Query, "Query");
+ Assert.AreEqual ("https", uri.Scheme, "Scheme");
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+ Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
+ Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void HttpsWithoutPort ()
+ {
+ string s = "Https://host.DOMAIN.com/dir%2fapp.xap#";
+ Uri uri = new Uri (s);
+
+ if (IriParsing) {
+ Assert.AreEqual ("/dir%2fapp.xap", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("https://host.domain.com/dir%2fapp.xap#", uri.AbsoluteUri, "AbsoluteUri");
+ } else {
+ Assert.AreEqual ("/dir/app.xap", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("https://host.domain.com/dir/app.xap#", uri.AbsoluteUri, "AbsoluteUri");
+ }
+
+ Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
+ Assert.AreEqual ("#", uri.Fragment, "Fragment");
+ Assert.AreEqual ("host.domain.com", uri.Host, "Host");
+ Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
+ Assert.IsFalse (uri.IsUnc, "IsUnc");
+ Assert.AreEqual ("/dir/app.xap", uri.LocalPath, "LocalPath");
+ Assert.AreEqual (s, uri.OriginalString, "OriginalString");
+ Assert.AreEqual (443, uri.Port, "Port");
+ Assert.AreEqual (String.Empty, uri.Query, "Query");
+ Assert.AreEqual ("https", uri.Scheme, "Scheme");
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+ Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
+ Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void HttpsWithNonStandardPort ()
+ {
+ string s = "https://monkey:s3kr3t@HOST.domain.Com:4430/dir/..%5Capp.xap?";
+ Uri uri = new Uri (s);
+
+ if (IriParsing) {
+ Assert.AreEqual ("/dir/..%5Capp.xap", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("https://monkey:s3kr3t@host.domain.com:4430/dir/..%5Capp.xap?", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("/dir/..\\app.xap", uri.LocalPath, "LocalPath");
+ } else {
+ Assert.AreEqual ("/app.xap", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("https://monkey:s3kr3t@host.domain.com:4430/app.xap?", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("/app.xap", uri.LocalPath, "LocalPath");
+ }
+
+ Assert.AreEqual ("host.domain.com", uri.DnsSafeHost, "DnsSafeHost");
+ Assert.AreEqual (String.Empty, uri.Fragment, "Fragment");
+ Assert.AreEqual ("host.domain.com", uri.Host, "Host");
+ Assert.IsTrue (uri.IsAbsoluteUri, "IsAbsoluteUri");
+ Assert.IsFalse (uri.IsUnc, "IsUnc");
+ Assert.AreEqual (s, uri.OriginalString, "OriginalString");
+ Assert.AreEqual (4430, uri.Port, "Port");
+ Assert.AreEqual ("?", uri.Query, "Query");
+ Assert.AreEqual ("https", uri.Scheme, "Scheme");
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+ Assert.AreEqual ("monkey:s3kr3t", uri.UserInfo, "UserInfo");
+ Assert.AreEqual (uri.AbsoluteUri, uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void Relative ()
+ {
+ Uri relative = new Uri ("/Moonlight", UriKind.Relative);
+
+ Assert2.Throws<ArgumentNullException> (delegate {
+ new Uri (null, "/Moonlight");
+ }, "null,string");
+ Assert2.Throws<ArgumentNullException> (delegate {
+ new Uri (null, relative);
+ }, "null,Uri");
+
+ Assert2.Throws<ArgumentOutOfRangeException> (delegate {
+ new Uri (relative, "/Moonlight");
+ }, "Uri,string");
+ Assert2.Throws<ArgumentOutOfRangeException> (delegate {
+ new Uri (relative, relative);
+ }, "Uri,Uri");
+
+ Assert2.Throws<ArgumentOutOfRangeException> (delegate {
+ new Uri (relative, (string) null);
+ }, "Uri,string-null");
+ Assert2.Throws<ArgumentOutOfRangeException> (delegate {
+ new Uri (relative, (Uri) null);
+ }, "Uri,Uri-null");
+ }
+
+ private void CheckRelativeUri (Uri uri)
+ {
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.AbsolutePath);
+ }, "AbsolutePath");
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.AbsoluteUri);
+ }, "AbsoluteUri");
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.DnsSafeHost);
+ }, "DnsSafeHost");
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.Fragment);
+ }, "Fragment");
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.Host);
+ }, "Host");
+
+ Assert.IsFalse (uri.IsAbsoluteUri, "IsAbsoluteUri");
+
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.IsUnc);
+ }, "IsUnc");
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.LocalPath);
+ }, "LocalPath");
+
+ Assert.AreEqual ("/Moonlight", uri.OriginalString, "OriginalString");
+
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.Port);
+ }, "Port");
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.Query);
+ }, "Query");
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.Scheme);
+ }, "Scheme");
+
+ Assert.IsFalse (uri.UserEscaped, "UserEscaped");
+
+ Assert2.Throws<InvalidOperationException> (delegate {
+ Assert.IsNotNull (uri.UserInfo);
+ }, "UserInfo");
+
+ Assert.AreEqual ("/Moonlight", uri.ToString (), "ToString");
+ }
+
+ [Test]
+ public void Relative_AsRelative ()
+ {
+ Uri uri = new Uri ("/Moonlight", UriKind.Relative);
+ CheckRelativeUri (uri);
+ }
+
+ [Test]
+ public void Bug496783 ()
+ {
+ string s = "tcp://csve2.csse.unimelb.edu.au:9090/Aneka";
+ Uri uri = new Uri (s);
+ // this is not parsed by a known UriParser
+ Assert.IsFalse (UriParser.IsKnownScheme (uri.Scheme), "UriParser");
+
+ Uri uri2 = new Uri ("tcp://csve2.csse.unimelb.edu.au:9090/");
+ Assert.IsTrue (uri2.IsBaseOf (uri), "IsBaseOf");
+
+ Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.AbsoluteUri, UriFormat.Unescaped), "AbsoluteUri");
+ Assert.AreEqual (uri.Fragment, uri.GetComponents (UriComponents.Fragment, UriFormat.Unescaped), "Fragment");
+ Assert.AreEqual (uri.Host, uri.GetComponents (UriComponents.Host, UriFormat.Unescaped), "Host");
+ Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.HostAndPort, UriFormat.Unescaped), "HostAndPort");
+ Assert.AreEqual (uri.AbsoluteUri, uri.GetComponents (UriComponents.HttpRequestUrl, UriFormat.Unescaped), "HttpRequestUrl");
+ Assert.AreEqual (String.Empty, uri.GetComponents (UriComponents.KeepDelimiter, UriFormat.Unescaped), "KeepDelimiter");
+ Assert.AreEqual ("Aneka", uri.GetComponents (UriComponents.Path, UriFormat.Unescaped), "Path");
+ Assert.AreEqual (uri.LocalPath, uri.GetComponents (UriComponents.PathAndQuery, UriFormat.Unescaped), "PathAndQuery");
+ Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.Port, UriFormat.Unescaped), "Port");
+ Assert.AreEqual (uri.Query, uri.GetComponents (UriComponents.Query, UriFormat.Unescaped), "Query");
+ Assert.AreEqual (uri.Scheme, uri.GetComponents (UriComponents.Scheme, UriFormat.Unescaped), "Scheme");
+ Assert.AreEqual ("tcp://csve2.csse.unimelb.edu.au:9090", uri.GetComponents (UriComponents.SchemeAndServer, UriFormat.Unescaped), "SchemeAndServer");
+ Assert.AreEqual (uri.OriginalString, uri.GetComponents (UriComponents.SerializationInfoString, UriFormat.Unescaped), "SerializationInfoString");
+ Assert.AreEqual (uri.Authority, uri.GetComponents (UriComponents.StrongAuthority, UriFormat.Unescaped), "StrongAuthority");
+ Assert.AreEqual (uri.Port.ToString (), uri.GetComponents (UriComponents.StrongPort, UriFormat.Unescaped), "StrongPort");
+ Assert.AreEqual (uri.UserInfo, uri.GetComponents (UriComponents.UserInfo, UriFormat.Unescaped), "UserInfo");
+ }
[Test]
public void Merge_Query_Fragment ()
@@ -717,7 +740,10 @@ TextWriter sw = Console.Out;
// special characters
uri = new Uri ("mono://host/<>%\"{}|\\^`;/:@&=+$,[]#abc");
- Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
+ if (IriParsing)
+ Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,[]", uri.AbsolutePath, "Special");
+ else
+ Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
}
[Test]
@@ -763,8 +789,11 @@ TextWriter sw = Console.Out;
// special escaped characters - they differs a bit from other URI
uri = new Uri ("news:novell.mono.moonlight/<>%\"{}|\\^`;/?:@&=+$,[]#abc");
- Assert.AreEqual ("novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
Assert.AreEqual ("#abc", uri.Fragment, "Special/Fragment");
+ if (IriParsing)
+ Assert.AreEqual ("novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,[]", uri.AbsolutePath, "Special");
+ else
+ Assert.AreEqual ("novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
}
[Test]
@@ -798,8 +827,11 @@ TextWriter sw = Console.Out;
// special escaped characters - they differs a bit from other URI
uri = new Uri ("nntp://news.mono-project.com/novell.mono.moonlight/<>%\"{}|\\^`;/?:@&=+$,[]#abc");
- Assert.AreEqual ("/novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
Assert.AreEqual ("#abc", uri.Fragment, "Special/Fragment");
+ if (IriParsing)
+ Assert.AreEqual ("/novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,[]", uri.AbsolutePath, "Special");
+ else
+ Assert.AreEqual ("/novell.mono.moonlight/%3C%3E%25%22%7B%7D%7C%5C%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
}
[Test]
@@ -832,16 +864,34 @@ TextWriter sw = Console.Out;
// special characters and fragment
uri = new Uri ("ftp://ftp.mono-project.com/<>%\"{}|\\^`;/?:@&=+$,[]#abc");
- Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
Assert.AreEqual ("#abc", uri.Fragment, "Special/Fragment");
+ if (IriParsing)
+ Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,[]", uri.AbsolutePath, "Special");
+ else
+ Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
}
[Test]
public void FileScheme ()
{
Uri uri = new Uri ("file://host/dir/subdir/file?this-is-not-a-query#but-this-is-a-fragment");
- Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.AbsolutePath, "AbsolutePath");
- Assert.AreEqual ("file://host/dir/subdir/file%3Fthis-is-not-a-query#but-this-is-a-fragment", uri.AbsoluteUri, "AbsoluteUri");
+
+ if (IriParsing) {
+ Assert.AreEqual ("/dir/subdir/file", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("file://host/dir/subdir/file?this-is-not-a-query#but-this-is-a-fragment", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual (isWin32 ? "\\\\host\\dir\\subdir\\file" : "/dir/subdir/file", uri.LocalPath, "LocalPath");
+ Assert.AreEqual ("/dir/subdir/file?this-is-not-a-query", uri.PathAndQuery, "PathAndQuery");
+ Assert.AreEqual ("?this-is-not-a-query", uri.Query, "Query");
+ Assert.AreEqual ("file", uri.Segments [3], "Segments [3]");
+ } else {
+ Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("file://host/dir/subdir/file%3Fthis-is-not-a-query#but-this-is-a-fragment", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual (isWin32 ? "\\\\host\\dir\\subdir\\file?this-is-not-a-query" : "/dir/subdir/file?this-is-not-a-query", uri.LocalPath, "LocalPath");
+ Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.PathAndQuery, "PathAndQuery");
+ Assert.AreEqual (String.Empty, uri.Query, "Query");
+ Assert.AreEqual ("file%3Fthis-is-not-a-query", uri.Segments [3], "Segments [3]");
+ }
+
Assert.AreEqual ("host", uri.Authority, "Authority");
Assert.AreEqual ("host", uri.DnsSafeHost, "DnsSafeHost");
Assert.AreEqual ("#but-this-is-a-fragment", uri.Fragment, "Fragment");
@@ -852,22 +902,21 @@ TextWriter sw = Console.Out;
Assert.IsTrue (uri.IsFile, "IsFile");
Assert.IsFalse (uri.IsLoopback, "IsLoopback");
Assert.AreEqual (isWin32, uri.IsUnc, "IsUnc");
- Assert.AreEqual (isWin32 ? "\\\\host\\dir\\subdir\\file?this-is-not-a-query" : "/dir/subdir/file?this-is-not-a-query", uri.LocalPath, "LocalPath");
Assert.AreEqual ("file://host/dir/subdir/file?this-is-not-a-query#but-this-is-a-fragment", uri.OriginalString, "OriginalString");
- Assert.AreEqual ("/dir/subdir/file%3Fthis-is-not-a-query", uri.PathAndQuery, "PathAndQuery");
Assert.AreEqual (-1, uri.Port, "Port");
- Assert.AreEqual (String.Empty, uri.Query, "Query");
Assert.AreEqual ("file", uri.Scheme, "Scheme");
Assert.AreEqual ("/", uri.Segments [0], "Segments [0]");
Assert.AreEqual ("dir/", uri.Segments [1], "Segments [1]");
Assert.AreEqual ("subdir/", uri.Segments [2], "Segments [2]");
- Assert.AreEqual ("file%3Fthis-is-not-a-query", uri.Segments [3], "Segments [3]");
Assert.IsFalse (uri.UserEscaped, "UserEscaped");
Assert.AreEqual (String.Empty, uri.UserInfo, "UserInfo");
// special characters
- uri = new Uri ("file://host/<>%\"{}|\\^`;/?:@&=+$,[]#abc");
- Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/%3F:@&=+$,%5B%5D", uri.AbsolutePath, "Special");
+ uri = new Uri ("file://host/<>%\"{}|\\^`;/:@&=+$,[]?#abc");
+ if (IriParsing)
+ Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,[]", uri.AbsolutePath, "Special");
+ else
+ Assert.AreEqual ("/%3C%3E%25%22%7B%7D%7C/%5E%60;/:@&=+$,%5B%5D%3F", uri.AbsolutePath, "Special");
}
[Test]
@@ -901,22 +950,37 @@ TextWriter sw = Console.Out;
{
Uri uri = new Uri ("http://[1:2:3:4:5:6:7:8]");
Assert.AreEqual (UriHostNameType.IPv6, uri.HostNameType, "1.HostNameType");
- Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Authority, "1.Authority");
- Assert.AreEqual ("0001:0002:0003:0004:0005:0006:0007:0008", uri.DnsSafeHost, "1.DnsSafeHost");
- Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Host, "1.Host");
+ if (IriParsing) {
+ Assert.AreEqual ("[1:2:3:4:5:6:7:8]", uri.Authority, "1.Authority");
+ Assert.AreEqual ("1:2:3:4:5:6:7:8", uri.DnsSafeHost, "1.DnsSafeHost");
+ Assert.AreEqual ("[1:2:3:4:5:6:7:8]", uri.Host, "1.Host");
+ } else {
+ Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Authority, "1.Authority");
+ Assert.AreEqual ("0001:0002:0003:0004:0005:0006:0007:0008", uri.DnsSafeHost, "1.DnsSafeHost");
+ Assert.AreEqual ("[0001:0002:0003:0004:0005:0006:0007:0008]", uri.Host, "1.Host");
+ }
uri = new Uri ("http://[fe80::200:39ff:fe36:1a2d%4]/temp/example.htm");
Assert.AreEqual (UriHostNameType.IPv6, uri.HostNameType, "1.HostNameType");
- Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Authority, "2.Authority");
- Assert.AreEqual ("FE80:0000:0000:0000:0200:39FF:FE36:1A2D%4", uri.DnsSafeHost, "2.DnsSafeHost");
- Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Host, "2.Host");
+ if (IriParsing) {
+ Assert.AreEqual ("[fe80::200:39ff:fe36:1a2d]", uri.Authority, "2.Authority");
+ Assert.AreEqual ("fe80::200:39ff:fe36:1a2d%4", uri.DnsSafeHost, "2.DnsSafeHost");
+ Assert.AreEqual ("[fe80::200:39ff:fe36:1a2d]", uri.Host, "2.Host");
+ } else {
+ Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Authority, "2.Authority");
+ Assert.AreEqual ("FE80:0000:0000:0000:0200:39FF:FE36:1A2D%4", uri.DnsSafeHost, "2.DnsSafeHost");
+ Assert.AreEqual ("[FE80:0000:0000:0000:0200:39FF:FE36:1A2D]", uri.Host, "2.Host");
+ }
}
[Test]
public void RelativeEscapes ()
{
Uri uri = new Uri ("%2e%2e/dir/%2e%2e/subdir/file?query#fragment", UriKind.Relative);
- Assert.AreEqual ("%2e%2e/dir/%2e%2e/subdir/file?query#fragment", uri.ToString (), "1.ToString");
+ if (IriParsing)
+ Assert.AreEqual ("../dir/../subdir/file?query#fragment", uri.ToString (), "1.ToString");
+ else
+ Assert.AreEqual ("%2e%2e/dir/%2e%2e/subdir/file?query#fragment", uri.ToString (), "1.ToString");
}
[Test]
@@ -963,26 +1027,38 @@ TextWriter sw = Console.Out;
public void Fragment_SpecialCharacters ()
{
Uri uri = new Uri ("http://host/dir/file#fragment <>%\"{}|\\^`;/?:@&=+$,[]#second");
- Assert.AreEqual ("#fragment%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D%23second", uri.Fragment, "Fragment");
Assert.AreEqual ("http://host/dir/file#fragment <>%25\"{}|\\^`;/?:@&=+$,[]%23second", uri.ToString (), "ToString");
+ if (IriParsing)
+ Assert.AreEqual ("#fragment%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,[]#second", uri.Fragment, "Fragment");
+ else
+ Assert.AreEqual ("#fragment%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D%23second", uri.Fragment, "Fragment");
}
[Test]
public void Query_SpecialCharacters ()
{
Uri uri = new Uri ("http://host/dir/file?query <>%\"{}|\\^`;/?:@&=+$,[]");
- Assert.AreEqual ("?query%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D", uri.Query, "Query");
Assert.AreEqual ("http://host/dir/file?query <>%25\"{}|\\^`;/?:@&=+$,[]", uri.ToString (), "ToString");
+ if (IriParsing)
+ Assert.AreEqual ("?query%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,[]", uri.Query, "Query");
+ else
+ Assert.AreEqual ("?query%20%3C%3E%25%22%7B%7D%7C%5C%5E%60;/?:@&=+$,%5B%5D", uri.Query, "Query");
}
[Test]
public void OriginalPathEscaped ()
{
Uri uri = new Uri ("http://www.mono-project.com/%41/%42/%43", UriKind.Absolute);
- Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.AbsoluteUri, "AbsoluteUri");
- Assert.AreEqual ("/%41/%42/%43", uri.AbsolutePath, "AbsolutePath");
Assert.AreEqual ("/A/B/C", uri.LocalPath, "LocalPath");
- Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.GetLeftPart (UriPartial.Path), "GetLeftPart(Path)");
+ if (IriParsing) {
+ Assert.AreEqual ("http://www.mono-project.com/A/B/C", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("/A/B/C", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("http://www.mono-project.com/A/B/C", uri.GetLeftPart (UriPartial.Path), "GetLeftPart(Path)");
+ } else {
+ Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.AbsoluteUri, "AbsoluteUri");
+ Assert.AreEqual ("/%41/%42/%43", uri.AbsolutePath, "AbsolutePath");
+ Assert.AreEqual ("http://www.mono-project.com/%41/%42/%43", uri.GetLeftPart (UriPartial.Path), "GetLeftPart(Path)");
+ }
}
[Test]
@@ -1037,5 +1113,5 @@ TextWriter sw = Console.Out;
Assert.AreEqual ("ftp", uri.Scheme, "Scheme");
Assert.AreEqual ("/", uri.Segments [0], "Segments [0]");
}
- }
-}
+ }
+}
diff --git a/mcs/class/System/Test/System/UriTest3.cs b/mcs/class/System/Test/System/UriTest3.cs
index 8fe73931954..0300aad9d57 100644
--- a/mcs/class/System/Test/System/UriTest3.cs
+++ b/mcs/class/System/Test/System/UriTest3.cs
@@ -340,6 +340,13 @@ namespace MonoTests.System
Uri u2 = null;
Assert.AreEqual (0, Uri.Compare (u1, u2, UriComponents.AbsoluteUri, UriFormat.UriEscaped, StringComparison.CurrentCulture), "null-null");
+ u1 = new Uri ("http://www.go-mono.com");
+ Assert.AreEqual (1, Uri.Compare (u1, u2, UriComponents.AbsoluteUri, UriFormat.UriEscaped, StringComparison.CurrentCulture), "non-null - null");
+
+ u1 = null;
+ u2 = new Uri ("http://www.go-mono.com");
+ Assert.AreEqual (-1, Uri.Compare (u1, u2, UriComponents.AbsoluteUri, UriFormat.UriEscaped, StringComparison.CurrentCulture), "null - non-null");
+
u1 = new Uri ("http://www.go-mono.com/Main Page");
u2 = new Uri ("http://www.go-mono.com/Main%20Page");
Assert.AreEqual (0, Uri.Compare (u1, u2, UriComponents.AbsoluteUri, UriFormat.Unescaped, StringComparison.CurrentCulture), "http/space-http/%20-unescaped");
@@ -418,13 +425,8 @@ namespace MonoTests.System
http.IsBaseOf (null);
Assert.Fail ();
}
-#if NET_4_0
catch (ArgumentNullException) {
}
-#else
- catch (NullReferenceException) {
- }
-#endif
}
[Test]
diff --git a/mcs/class/System/mobile_System.dll.sources b/mcs/class/System/mobile_System.dll.sources
index a26cf769906..6a014b9133a 100644
--- a/mcs/class/System/mobile_System.dll.sources
+++ b/mcs/class/System/mobile_System.dll.sources
@@ -318,6 +318,7 @@ System.IO.Compression/CompressionLevel.cs
System.IO.Compression/CompressionMode.cs
System.IO.Compression/DeflateStream.cs
System.IO.Compression/GZipStream.cs
+System.IO/InternalBufferOverflowException.cs
System.IO/InvalidDataException.cs
System.IO/MonoSyncFileStream.cs
System.Net.Cache/HttpCacheAgeControl.cs
@@ -680,6 +681,7 @@ System/UriBuilder.cs
System/UriComponents.cs
System/UriFormat.cs
System/UriFormatException.cs
+System/UriHelper.cs
System/UriHostNameType.cs
System/UriIdnScope.cs
System/UriKind.cs
diff --git a/mcs/class/WindowsBase/System.IO.Packaging/Check.cs b/mcs/class/WindowsBase/System.IO.Packaging/Check.cs
index 2fcd3d93f56..eba1b54ab8b 100644
--- a/mcs/class/WindowsBase/System.IO.Packaging/Check.cs
+++ b/mcs/class/WindowsBase/System.IO.Packaging/Check.cs
@@ -119,10 +119,10 @@ namespace System.IO.Packaging
public static void PartUriIsValid (Uri partUri)
{
if (!partUri.OriginalString.StartsWith ("/"))
- throw new UriFormatException ("PartUris must start with '/'");
+ throw new ArgumentException ("PartUris must start with '/'");
if (partUri.IsAbsoluteUri)
- throw new UriFormatException ("PartUris cannot be absolute");
+ throw new ArgumentException ("PartUris cannot be absolute");
}
public static void RelationshipTypeIsValid (string relationshipType)
diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackUriHelper.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackUriHelper.cs
index d7b5e2e31ad..7ed424368cc 100644
--- a/mcs/class/WindowsBase/System.IO.Packaging/PackUriHelper.cs
+++ b/mcs/class/WindowsBase/System.IO.Packaging/PackUriHelper.cs
@@ -42,24 +42,28 @@ namespace System.IO.Packaging {
public static int ComparePackUri (Uri firstPackUri, Uri secondPackUri)
{
- // FIXME: Do i need to do validation that it is a pack:// uri?
if (firstPackUri == null)
return secondPackUri == null ? 0 : -1;
if (secondPackUri == null)
return 1;
+ Check.PackUriIsValid (firstPackUri);
+ Check.PackUriIsValid (secondPackUri);
+
// FIXME: What exactly is compared. Lets assume originalstring
return firstPackUri.OriginalString.CompareTo (secondPackUri.OriginalString);
}
public static int ComparePartUri (Uri firstPartUri, Uri secondPartUri)
{
- // FIXME: Do i need to do validation that it is a part URI?
if (firstPartUri == null)
return secondPartUri == null ? 0 : -1;
if (secondPartUri == null)
return 1;
+ Check.PartUriIsValid (firstPartUri);
+ Check.PartUriIsValid (secondPartUri);
+
return firstPartUri.OriginalString.CompareTo (secondPartUri.OriginalString);
}
diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs
index 8e02384f58f..d6586ab4d5e 100644
--- a/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs
+++ b/mcs/class/WindowsBase/System.IO.Packaging/PackagePart.cs
@@ -165,7 +165,7 @@ namespace System.IO.Packaging {
if (node.Attributes["TargetMode"] != null)
mode = (TargetMode) Enum.Parse (typeof(TargetMode), node.Attributes ["TargetMode"].Value);
- CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.Relative),
+ CreateRelationship (new Uri (node.Attributes["Target"].Value.ToString(), UriKind.RelativeOrAbsolute),
mode,
node.Attributes["Type"].Value.ToString (),
node.Attributes["Id"].Value.ToString (),
diff --git a/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs b/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs
index a0f2aa67669..b9184aac055 100644
--- a/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs
+++ b/mcs/class/WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs
@@ -257,7 +257,14 @@ namespace System.IO.Packaging
if (ContentType != null)
coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "contentType", NSPackageProperties)).InnerXml = ContentType;
if (Created.HasValue)
- coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms)).InnerXml = Created.Value.ToString ();
+ {
+ XmlAttribute att = doc.CreateAttribute ("xsi", "type", NSXsi);
+ att.Value = "dcterms:W3CDTF";
+
+ XmlNode created = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "created", NSDcTerms));
+ created.Attributes.Append (att);
+ created.InnerXml = Created.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z";
+ }
if (Creator != null)
coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dc", "creator", NSDc)).InnerXml = Creator;
if (Description != null)
@@ -271,7 +278,11 @@ namespace System.IO.Packaging
if (LastModifiedBy != null)
coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastModifiedBy", NSPackageProperties)).InnerXml = LastModifiedBy;
if (LastPrinted.HasValue)
- coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties)).InnerXml = LastPrinted.Value.ToString ();
+ {
+ XmlNode lastPrinted = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "lastPrinted", NSPackageProperties));
+
+ lastPrinted.InnerXml = LastPrinted.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z";
+ }
if (Revision != null)
coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "revision", NSPackageProperties)).InnerXml = Revision;
if (Subject != null)
@@ -288,7 +299,7 @@ namespace System.IO.Packaging
XmlNode modified = coreProperties.AppendChild (doc.CreateNode (XmlNodeType.Element, "dcterms", "modified", NSDcTerms));
modified.Attributes.Append (att);
- modified.InnerXml = Modified.Value.ToString ();
+ modified.InnerXml = Modified.Value.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "Z";
}
doc.WriteContentTo (writer);
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackage.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackage.cs
index 54df0eb5e8e..2818cd5e453 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackage.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackage.cs
@@ -25,9 +25,11 @@
using System;
+using System.IO;
+using System.IO.Packaging;
using System.Collections.Generic;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
public class FakePackage : Package {
Dictionary<Uri, PackagePart> Parts { get; set; }
@@ -77,4 +79,4 @@ namespace System.IO.Packaging.Tests {
return p;
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePart.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePart.cs
index 9a7871c6ed0..1ca0bb20f05 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePart.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePart.cs
@@ -24,9 +24,11 @@
//
using System;
+using System.IO;
+using System.IO.Packaging;
using System.Collections.Generic;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
class FakePackagePart : PackagePart {
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePartTests.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePartTests.cs
index 731aed62ff9..216a1686f64 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePartTests.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackagePartTests.cs
@@ -26,9 +26,12 @@
using System;
using System.Linq;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Packaging;
+using System.Xml;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class FakePackagePartTests : TestBase {
@@ -146,7 +149,7 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [ExpectedException (typeof (Xml.XmlException))]
+ [ExpectedException (typeof (XmlException))]
public void CreateDupeRelationship ()
{
part.CreateRelationship (uris [1], TargetMode.External, "blah", "asda");
@@ -154,7 +157,7 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [ExpectedException (typeof (Xml.XmlException))]
+ [ExpectedException (typeof (XmlException))]
public void CreateDupeRelationshipId ()
{
part.CreateRelationship (uris [1], TargetMode.External, "blah", "asda");
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackageTests.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackageTests.cs
index bd751542927..bfea3c84973 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackageTests.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakePackageTests.cs
@@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests
+namespace MonoTests.System.IO.Packaging
{
[TestFixture]
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakeStream.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakeStream.cs
index b095375b177..aafc02e25ed 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/FakeStream.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/FakeStream.cs
@@ -25,9 +25,10 @@
using System;
+using System.IO;
using System.Collections.Generic;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
public class FakeStream : MemoryStream {
public bool canRead;
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackUriHelperTests.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackUriHelperTests.cs
index 91b5dc1adaa..d231315a0e9 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackUriHelperTests.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackUriHelperTests.cs
@@ -8,7 +8,7 @@ using System;
using System.IO.Packaging;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackUriHelperTests {
@@ -25,7 +25,6 @@ namespace System.IO.Packaging.Tests {
Uri main = new Uri ("/main.html", UriKind.Relative);
[Test]
- [Category("NotWorking")]
public void ComparePackUriTest ()
{
Assert.AreEqual (0, PackUriHelper.ComparePackUri (null, null), "#1");
@@ -44,7 +43,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
[ExpectedException (typeof (ArgumentException))]
public void NonPackUriCompareTest ()
{
@@ -52,7 +50,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
[ExpectedException (typeof (ArgumentException))]
public void NonPackUriCompareRelativeTest ()
{
@@ -60,7 +57,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
[ExpectedException (typeof (ArgumentException))]
public void InvalidPartUriCompareTest ()
{
@@ -76,7 +72,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
public void CreateTest ()
{
Assert.AreEqual ("pack://http:,,www.test.com,pack.pkg/",
@@ -92,7 +87,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
public void CreateTest2()
{
Uri uri = PackUriHelper.Create(new Uri("http://www.test.com/pack1.pkg"));
@@ -121,7 +115,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
public void CreateInvalidTest4 ()
{
PackUriHelper.Create (new Uri ("http://www.test.com/pack.pkg"), new Uri ("/main.html", UriKind.Relative));
@@ -168,7 +161,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
public void GetPackageUriTest ()
{
Assert.AreEqual (a, PackUriHelper.GetPackageUri (PackUriHelper.Create (a, new Uri ("/test.html", UriKind.Relative))));
@@ -189,7 +181,6 @@ namespace System.IO.Packaging.Tests {
}
[Test]
- [Category("NotWorking")]
public void GetPartUriTest ()
{
var pack = PackUriHelper.Create(new Uri("http://www.test.com/pack1.pkg"));
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartFileTests.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartFileTests.cs
index 3f2850b602b..557e4a98b51 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartFileTests.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartFileTests.cs
@@ -3,7 +3,7 @@ using System.IO;
using System.IO.Packaging;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests
+namespace MonoTests.System.IO.Packaging
{
[TestFixture]
public class PackagePartFileTests
@@ -135,4 +135,4 @@ namespace System.IO.Packaging.Tests
}
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartStreamTests.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartStreamTests.cs
index 915c2a09a98..1bf60221082 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartStreamTests.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartStreamTests.cs
@@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackagePartStreamTests : TestBase {
@@ -190,4 +192,4 @@ namespace System.IO.Packaging.Tests {
Assert.IsTrue (stream.Length > buffer.Length * 2, "#4");
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartTest.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartTest.cs
index 07015c20173..ad7eb968c3a 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartTest.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackagePartTest.cs
@@ -26,12 +26,14 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
using System.Xml;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackagePartTest : TestBase {
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageRelationshipTests.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageRelationshipTests.cs
index 8c4b031de95..6ce92d31e57 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageRelationshipTests.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageRelationshipTests.cs
@@ -28,12 +28,14 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Packaging;
using System.Linq;
using System.Text;
using System.Xml;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackageRelationshipTests : TestBase {
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageTest.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageTest.cs
index ae7c5945de9..933449052f3 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageTest.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/PackageTest.cs
@@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
[TestFixture]
public class PackageTest : TestBase {
@@ -411,8 +413,8 @@ namespace System.IO.Packaging.Tests {
[ExpectedException (typeof (FileFormatException))]
public void WriteOnlyAccessExists ()
{
- System.IO.File.Create (path).Close ();
+ File.Create (path).Close ();
package = Package.Open (path, FileMode.OpenOrCreate, FileAccess.Write);
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/WindowsBase/Test/System.IO.Packaging/TestBase.cs b/mcs/class/WindowsBase/Test/System.IO.Packaging/TestBase.cs
index 6d8b43d057e..28afcd43151 100644
--- a/mcs/class/WindowsBase/Test/System.IO.Packaging/TestBase.cs
+++ b/mcs/class/WindowsBase/Test/System.IO.Packaging/TestBase.cs
@@ -26,11 +26,13 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using System.IO.Packaging;
using System.Linq;
using System.Text;
using NUnit.Framework;
-namespace System.IO.Packaging.Tests {
+namespace MonoTests.System.IO.Packaging {
public abstract class TestBase {
protected string contentType = "mime/type";
diff --git a/mcs/class/WindowsBase/WindowsBase.csproj b/mcs/class/WindowsBase/WindowsBase.csproj
deleted file mode 100644
index 1d328a470ff..00000000000
--- a/mcs/class/WindowsBase/WindowsBase.csproj
+++ /dev/null
@@ -1,280 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.50727</ProductVersion>
- <ProjectGuid>{F6D9C4EA-ABFE-4596-81A0-89E9D5A2D567}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AssemblyName>WindowsBase</AssemblyName>
- <SchemaVersion>2.0</SchemaVersion>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug</OutputPath>
- <DefineConstants>DEBUG;NET_3_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>none</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Release</OutputPath>
- <DefineConstants>NET_3_0</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <ConsolePause>false</ConsolePause>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="nunit.framework, Version=2.2.0.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Core" />
- <Reference Include="zipsharp, Version=1.0.3223.25758, Culture=neutral" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <ProjectExtensions>
- <MonoDevelop>
- <Properties>
- <MonoDevelop.Autotools.MakefileInfo RelativeMakefileName="Makefile">
- <BuildFilesVar Sync="true" Name="LIBRARY" />
- <DeployFilesVar />
- <ResourcesVar />
- <OthersVar />
- <GacRefVar Name="TEST_MCS_FLAGS" Prefix="-r:" />
- <AsmRefVar Name="TEST_MCS_FLAGS" Prefix="-r:" />
- <ProjectRefVar Name="TEST_MCS_FLAGS" Prefix="-r:" />
- </MonoDevelop.Autotools.MakefileInfo>
- </Properties>
- </MonoDevelop>
- </ProjectExtensions>
- <ItemGroup>
- <Compile Include="Assembly\AssemblyInfo.cs" />
- <Compile Include="System.Windows.Threading\Dispatcher.cs" />
- <Compile Include="System.Windows.Threading\DispatcherEventArgs.cs" />
- <Compile Include="System.Windows.Threading\DispatcherFrame.cs" />
- <Compile Include="System.Windows.Threading\DispatcherHookEventArgs.cs" />
- <Compile Include="System.Windows.Threading\DispatcherHookEventHandler.cs" />
- <Compile Include="System.Windows.Threading\DispatcherHooks.cs" />
- <Compile Include="System.Windows.Threading\DispatcherObject.cs" />
- <Compile Include="System.Windows.Threading\DispatcherOperation.cs" />
- <Compile Include="System.Windows.Threading\DispatcherOperationCallback.cs" />
- <Compile Include="System.Windows.Threading\DispatcherOperationStatus.cs" />
- <Compile Include="System.Windows.Threading\DispatcherPriority.cs" />
- <Compile Include="System.Windows.Threading\DispatcherProcessingDisabled.cs" />
- <Compile Include="System.Windows.Threading\DispatcherSynchronizationContext.cs" />
- <Compile Include="System.Windows.Threading\DispatcherTimer.cs" />
- <Compile Include="System.Windows.Threading\DispatcherUnhandledExceptionEventArgs.cs" />
- <Compile Include="System.Windows.Threading\DispatcherUnhandledExceptionEventHandler.cs" />
- <Compile Include="System.Windows.Threading\DispatcherUnhandledExceptionFilterEventArgs.cs" />
- <Compile Include="System.Windows.Threading\DispatcherUnhandledExceptionFilterEventHandler.cs" />
- <Compile Include="System.Windows.Media.Converters\MatrixValueSerializer.cs" />
- <Compile Include="System.IO.Packaging\CertificateEmbeddingOption.cs" />
- <Compile Include="System.IO.Packaging\CompressionOption.cs" />
- <Compile Include="System.IO.Packaging\EncryptedPackageEnvelope.cs" />
- <Compile Include="System.IO.Packaging\EncryptionOption.cs" />
- <Compile Include="System.IO.Packaging\InvalidSignatureEventHandler.cs" />
- <Compile Include="System.IO.Packaging\Package.cs" />
- <Compile Include="System.IO.Packaging\PackageDigitalSignature.cs" />
- <Compile Include="System.IO.Packaging\PackageDigitalSignatureManager.cs" />
- <Compile Include="System.IO.Packaging\PackagePart.cs" />
- <Compile Include="System.IO.Packaging\PackagePartCollection.cs" />
- <Compile Include="System.IO.Packaging\PackageProperties.cs" />
- <Compile Include="System.IO.Packaging\PackageRelationship.cs" />
- <Compile Include="System.IO.Packaging\PackageRelationshipCollection.cs" />
- <Compile Include="System.IO.Packaging\PackageRelationshipSelector.cs" />
- <Compile Include="System.IO.Packaging\PackageRelationshipSelectorType.cs" />
- <Compile Include="System.IO.Packaging\PackUriHelper.cs" />
- <Compile Include="System.IO.Packaging\RightsManagementInformation.cs" />
- <Compile Include="System.IO.Packaging\SignatureVerificationEventArgs.cs" />
- <Compile Include="System.IO.Packaging\StorageInfo.cs" />
- <Compile Include="System.IO.Packaging\StreamInfo.cs" />
- <Compile Include="System.IO.Packaging\TargetMode.cs" />
- <Compile Include="System.IO.Packaging\VerifyResult.cs" />
- <Compile Include="System.IO.Packaging\ZipPackage.cs" />
- <Compile Include="System.IO.Packaging\ZipPackagePart.cs" />
- <Compile Include="System.IO\FileFormatException.cs" />
- <Compile Include="System.Diagnostics\PresentationTraceLevel.cs" />
- <Compile Include="System.Diagnostics\PresentationTraceSources.cs" />
- <Compile Include="System.Collections.ObjectModel\ObservableCollection.cs" />
- <Compile Include="System.Collections.ObjectModel\ReadOnlyObservableCollection.cs" />
- <Compile Include="System.Collections.Specialized\CollectionChangedEventManager.cs" />
- <Compile Include="System.Collections.Specialized\INotifyCollectionChanged.cs" />
- <Compile Include="System.Collections.Specialized\NotifyCollectionChangedAction.cs" />
- <Compile Include="System.Collections.Specialized\NotifyCollectionChangedEventArgs.cs" />
- <Compile Include="System.Collections.Specialized\NotifyCollectionChangedEventHandler.cs" />
- <Compile Include="System.ComponentModel\CurrentChangedEventManager.cs" />
- <Compile Include="System.ComponentModel\CurrentChangingEventArgs.cs" />
- <Compile Include="System.ComponentModel\CurrentChangingEventHandler.cs" />
- <Compile Include="System.ComponentModel\CurrentChangingEventManager.cs" />
- <Compile Include="System.ComponentModel\DependencyPropertyDescriptor.cs" />
- <Compile Include="System.ComponentModel\GroupDescription.cs" />
- <Compile Include="System.ComponentModel\ICollectionView.cs" />
- <Compile Include="System.ComponentModel\ICollectionViewFactory.cs" />
- <Compile Include="System.ComponentModel\PropertyChangedEventManager.cs" />
- <Compile Include="System.ComponentModel\PropertyFilterAttribute.cs" />
- <Compile Include="System.ComponentModel\PropertyFilterOptions.cs" />
- <Compile Include="System.ComponentModel\SortDescription.cs" />
- <Compile Include="System.ComponentModel\SortDescriptionCollection.cs" />
- <Compile Include="System.Security.Permissions\MediaPermission.cs" />
- <Compile Include="System.Security.Permissions\MediaPermissionAttribute.cs" />
- <Compile Include="System.Security.Permissions\MediaPermissionAudio.cs" />
- <Compile Include="System.Security.Permissions\MediaPermissionImage.cs" />
- <Compile Include="System.Security.Permissions\MediaPermissionVideo.cs" />
- <Compile Include="System.Security.Permissions\WebBrowserPermission.cs" />
- <Compile Include="System.Security.Permissions\WebBrowserPermissionAttribute.cs" />
- <Compile Include="System.Security.Permissions\WebBrowserPermissionLevel.cs" />
- <Compile Include="System.Security.RightsManagement\AuthenticationType.cs" />
- <Compile Include="System.Security.RightsManagement\ContentGrant.cs" />
- <Compile Include="System.Security.RightsManagement\ContentRight.cs" />
- <Compile Include="System.Security.RightsManagement\ContentUser.cs" />
- <Compile Include="System.Security.RightsManagement\CryptoProvider.cs" />
- <Compile Include="System.Security.RightsManagement\LocalizedNameDescriptionPair.cs" />
- <Compile Include="System.Security.RightsManagement\PublishLicense.cs" />
- <Compile Include="System.Security.RightsManagement\RightsManagementException.cs" />
- <Compile Include="System.Security.RightsManagement\RightsManagementFailureCode.cs" />
- <Compile Include="System.Security.RightsManagement\SecureEnvironment.cs" />
- <Compile Include="System.Security.RightsManagement\UnsignedPublishLicense.cs" />
- <Compile Include="System.Security.RightsManagement\UseLicense.cs" />
- <Compile Include="System.Security.RightsManagement\UserActivationMode.cs" />
- <Compile Include="System.Windows\AttachedPropertyBrowsableAttribute.cs" />
- <Compile Include="System.Windows\AttachedPropertyBrowsableForTypeAttribute.cs" />
- <Compile Include="System.Windows\AttachedPropertyBrowsableWhenAttributePresentAttribute.cs" />
- <Compile Include="System.Windows\CoerceValueCallback.cs" />
- <Compile Include="System.Windows\DependencyObject.cs" />
- <Compile Include="System.Windows\DependencyObjectType.cs" />
- <Compile Include="System.Windows\DependencyProperty.cs" />
- <Compile Include="System.Windows\DependencyPropertyChangedEventArgs.cs" />
- <Compile Include="System.Windows\DependencyPropertyChangedEventHandler.cs" />
- <Compile Include="System.Windows\DependencyPropertyKey.cs" />
- <Compile Include="System.Windows\Expression.cs" />
- <Compile Include="System.Windows\ExpressionConverter.cs" />
- <Compile Include="System.Windows\Freezable.cs" />
- <Compile Include="System.Windows\Int32Rect.cs" />
- <Compile Include="System.Windows\Int32RectConverter.cs" />
- <Compile Include="System.Windows\IWeakEventListener.cs" />
- <Compile Include="System.Windows\LocalValueEntry.cs" />
- <Compile Include="System.Windows\LocalValueEnumerator.cs" />
- <Compile Include="System.Windows\Point.cs" />
- <Compile Include="System.Windows\PointConverter.cs" />
- <Compile Include="System.Windows\PropertyChangedCallback.cs" />
- <Compile Include="System.Windows\PropertyMetadata.cs" />
- <Compile Include="System.Windows\Rect.cs" />
- <Compile Include="System.Windows\RectConverter.cs" />
- <Compile Include="System.Windows\Size.cs" />
- <Compile Include="System.Windows\SizeConverter.cs" />
- <Compile Include="System.Windows\ValidateValueCallback.cs" />
- <Compile Include="System.Windows\Vector.cs" />
- <Compile Include="System.Windows\VectorConverter.cs" />
- <Compile Include="System.Windows\WeakEventManager.cs" />
- <Compile Include="System.Windows.Converters\Int32RectValueSerializer.cs" />
- <Compile Include="System.Windows.Converters\PointValueSerializer.cs" />
- <Compile Include="System.Windows.Converters\RectValueSerializer.cs" />
- <Compile Include="System.Windows.Converters\SizeValueSerializer.cs" />
- <Compile Include="System.Windows.Converters\VectorValueSerializer.cs" />
- <Compile Include="System.Windows.Data\DataSourceProvider.cs" />
- <Compile Include="System.Windows.Input\FocusNavigationDirection.cs" />
- <Compile Include="System.Windows.Input\Key.cs" />
- <Compile Include="System.Windows.Input\KeyConverter.cs" />
- <Compile Include="System.Windows.Input\KeyInterop.cs" />
- <Compile Include="System.Windows.Input\KeyValueSerializer.cs" />
- <Compile Include="System.Windows.Input\ModifierKeys.cs" />
- <Compile Include="System.Windows.Input\ModifierKeysConverter.cs" />
- <Compile Include="System.Windows.Input\ModifierKeysValueSerializer.cs" />
- <Compile Include="System.Windows.Input\TraversalRequest.cs" />
- <Compile Include="System.Windows.Interop\ComponentDispatcher.cs" />
- <Compile Include="System.Windows.Interop\IKeyboardInputSink.cs" />
- <Compile Include="System.Windows.Interop\IKeyboardInputSite.cs" />
- <Compile Include="System.Windows.Interop\MSG.cs" />
- <Compile Include="System.Windows.Interop\ThreadMessageEventHandler.cs" />
- <Compile Include="System.Windows.Markup\ConstructorArgumentAttribute.cs" />
- <Compile Include="System.Windows.Markup\ContentPropertyAttribute.cs" />
- <Compile Include="System.Windows.Markup\ContentWrapperAttribute.cs" />
- <Compile Include="System.Windows.Markup\DateTimeValueSerializer.cs" />
- <Compile Include="System.Windows.Markup\DependsOnAttribute.cs" />
- <Compile Include="System.Windows.Markup\DesignerSerializationOptions.cs" />
- <Compile Include="System.Windows.Markup\DesignerSerializationOptionsAttribute.cs" />
- <Compile Include="System.Windows.Markup\IComponentConnector.cs" />
- <Compile Include="System.Windows.Markup\INameScope.cs" />
- <Compile Include="System.Windows.Markup\InternalTypeHelper.cs" />
- <Compile Include="System.Windows.Markup\IValueSerializerContext.cs" />
- <Compile Include="System.Windows.Markup\IXamlTypeResolver.cs" />
- <Compile Include="System.Windows.Markup\MarkupExtension.cs" />
- <Compile Include="System.Windows.Markup\MarkupExtensionReturnTypeAttribute.cs" />
- <Compile Include="System.Windows.Markup\RootNamespaceAttribute.cs" />
- <Compile Include="System.Windows.Markup\RuntimeNamePropertyAttribute.cs" />
- <Compile Include="System.Windows.Markup\ServiceProviders.cs" />
- <Compile Include="System.Windows.Markup\TrimSurroundingWhitespaceAttribute.cs" />
- <Compile Include="System.Windows.Markup\ValueSerializer.cs" />
- <Compile Include="System.Windows.Markup\ValueSerializerAttribute.cs" />
- <Compile Include="System.Windows.Markup\WhitespaceSignificantCollectionAttribute.cs" />
- <Compile Include="System.Windows.Markup\XmlLangPropertyAttribute.cs" />
- <Compile Include="System.Windows.Markup\XmlnsCompatibleWithAttribute.cs" />
- <Compile Include="System.Windows.Markup\XmlnsDefinitionAttribute.cs" />
- <Compile Include="System.Windows.Markup\XmlnsPrefixAttribute.cs" />
- <Compile Include="System.Windows.Markup.Primitives\MarkupObject.cs" />
- <Compile Include="System.Windows.Markup.Primitives\MarkupProperty.cs" />
- <Compile Include="System.Windows.Media\DisableDpiAwarenessAttribute.cs" />
- <Compile Include="System.Windows.Media\Matrix.cs" />
- <Compile Include="System.Windows.Media\MatrixConverter.cs" />
- <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />
- <Compile Include="..\..\build\common\Consts.cs" />
- <Compile Include="Test\System.IO.Packaging\FakePackage.cs" />
- <Compile Include="Test\System.IO.Packaging\FakeStream.cs" />
- <Compile Include="Test\System.IO.Packaging\PackagePartTest.cs" />
- <Compile Include="Test\System.IO.Packaging\PackageRelationshipTests.cs" />
- <Compile Include="Test\System.IO.Packaging\PackageTest.cs" />
- <Compile Include="Test\System.IO.Packaging\TestBase.cs" />
- <Compile Include="System.IO.Packaging\Check.cs" />
- <Compile Include="Test\System.IO.Packaging\FakePackagePart.cs" />
- <Compile Include="Test\System.IO.Packaging\FakePackagePartTests.cs" />
- <Compile Include="Test\System.IO.Packaging\FakePackageTests.cs" />
- <Compile Include="Test\System.IO.Packaging\PackagePartStreamTests.cs" />
- <Compile Include="System.IO.Packaging\ZipPartStream.cs" />
- <Compile Include="Test\System.Collections.ObjectModel\ObservableCollectionTest.cs" />
- <Compile Include="Test\System.Windows\DependencyObjectTest.cs" />
- <Compile Include="Test\System.Windows\DependencyObjectTypeTest.cs" />
- <Compile Include="Test\System.Windows\DependencyPropertyTest.cs" />
- <Compile Include="Test\System.Windows\FreezableTest.cs" />
- <Compile Include="Test\System.Windows\Int32RectConverterTest.cs" />
- <Compile Include="Test\System.Windows\Int32RectTest.cs" />
- <Compile Include="Test\System.Windows\PointConverterTest.cs" />
- <Compile Include="Test\System.Windows\PointTest.cs" />
- <Compile Include="Test\System.Windows\PropertyMetadataTest.cs" />
- <Compile Include="Test\System.Windows\RectConverterTest.cs" />
- <Compile Include="Test\System.Windows\RectTest.cs" />
- <Compile Include="Test\System.Windows\SizeConverterTest.cs" />
- <Compile Include="Test\System.Windows\SizeTest.cs" />
- <Compile Include="Test\System.Windows\VectorConverterTest.cs" />
- <Compile Include="Test\System.Windows\VectorTest.cs" />
- <Compile Include="ZipSharp\IOFunctions.cs" />
- <Compile Include="ZipSharp\NativeUnzip.cs" />
- <Compile Include="ZipSharp\NativeZip.cs" />
- <Compile Include="ZipSharp\UnzipArchive.cs" />
- <Compile Include="ZipSharp\UnzipFileInfo.cs" />
- <Compile Include="ZipSharp\UnzipHandle.cs" />
- <Compile Include="ZipSharp\UnzipReadStream.cs" />
- <Compile Include="ZipSharp\ZipArchive.cs" />
- <Compile Include="ZipSharp\ZipFileInfo.cs" />
- <Compile Include="ZipSharp\ZipHandle.cs" />
- <Compile Include="ZipSharp\ZipStream.cs" />
- <Compile Include="ZipSharp\ZipTime.cs" />
- <Compile Include="ZipSharp\ZipWriteStream.cs" />
- <Compile Include="System.IO.Packaging\PackagePropertiesPart.cs" />
- <Compile Include="Test\System.Collections.Specialized\CollectionChangedEventValidators.cs" />
- <Compile Include="Test\System.Collections.Specialized\NotifyCollectionChangedEventArgsTest.cs" />
- <Compile Include="Test\System.Collections.ObjectModel\ReadOnlyObservableCollectionTest.cs" />
- <Compile Include="Test\System.Windows.Markup\ConstructorArgumentAttributeTest.cs" />
- <Compile Include="Test\System.Windows.Markup\ContentPropertyAttributeTest.cs" />
- <Compile Include="Test\System.Windows.Markup\ContentWrapperAttributeTest.cs" />
- <Compile Include="Test\System.Windows.Markup\DateTimeValueSerializerTest.cs" />
- <Compile Include="Test\System.Windows.Markup\DependsOnAttributeTest.cs" />
- <Compile Include="Test\System.Windows.Markup\MarkupExtensionReturnTypeAttributeTest.cs" />
- <Compile Include="Test\System.Windows.Markup\ValueSerializerTest.cs" />
- <Compile Include="Test\System.IO.Packaging\PackUriHelperTests.cs" />
- <Compile Include="Test\System.IO.Packaging\PackagePartFileTests.cs" />
- </ItemGroup>
-</Project> \ No newline at end of file
diff --git a/mcs/class/WindowsBase/WindowsBase.sln b/mcs/class/WindowsBase/WindowsBase.sln
deleted file mode 100644
index 44a46f4ef2b..00000000000
--- a/mcs/class/WindowsBase/WindowsBase.sln
+++ /dev/null
@@ -1,21 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsBase", "WindowsBase.csproj", "{F6D9C4EA-ABFE-4596-81A0-89E9D5A2D567}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {F6D9C4EA-ABFE-4596-81A0-89E9D5A2D567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F6D9C4EA-ABFE-4596-81A0-89E9D5A2D567}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F6D9C4EA-ABFE-4596-81A0-89E9D5A2D567}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F6D9C4EA-ABFE-4596-81A0-89E9D5A2D567}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(MonoDevelopProperties) = preSolution
- name = WindowsBase
- StartupItem = WindowsBase.csproj
- EndGlobalSection
-EndGlobal
diff --git a/mcs/class/corlib/Makefile b/mcs/class/corlib/Makefile
index e716ed1a060..b9a11912d07 100644
--- a/mcs/class/corlib/Makefile
+++ b/mcs/class/corlib/Makefile
@@ -134,7 +134,7 @@ $(vtsdir)/$(PROFILE)_TestLib/%/Address.dll: $(vtsdir)/VersionTolerantSerializati
@mkdir -p $(dir $@)
$(CSCOMPILE) -target:library -r:$(corlib) -warn:0 -out:$@ $^
-$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll
+$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe: $(vtsdir)/BinarySerializationOverVersions.cs $(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll $(test_nunit_dep)
$(CSCOMPILE) $(test_nunit_ref) -warn:0 -r:$(corlib) \
-r:$(vtsdir)/$(PROFILE)_TestLib/1.0/Address.dll \
$(vtsdir)/BinarySerializationOverVersions.cs -out:$@
@@ -147,8 +147,10 @@ run-test-vts: test-vts
@echo Running vts tests...
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(TEST_HARNESS) -noshadow \
$(vtsdir)/$(PROFILE)_TestLib/BinarySerializationOverVersions.exe
+ifndef NO_TEST
test: test-vts
run-test: run-test-vts
+endif
EXTRA_DISTFILES += \
$(vtsdir)/VersionTolerantSerializationTestLib/1.0/Address.cs \
diff --git a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
index 74ee14d9a52..9fcc7475627 100644
--- a/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
+++ b/mcs/class/corlib/System.Collections.Generic/Dictionary.cs
@@ -79,7 +79,7 @@ namespace System.Collections.Generic {
// to be ORed with HASH_FLAG before comparing it with the save hashcode.
// "touchedSlots" and "emptySlot" manage the free space in the heap
- const int INITIAL_SIZE = 10;
+ const int INITIAL_SIZE = 4;
const float DEFAULT_LOAD_FACTOR = (90f / 100);
const int NO_SLOT = -1;
const int HASH_FLAG = -2147483648;
@@ -233,22 +233,25 @@ namespace System.Collections.Generic {
}
public Dictionary (int capacity)
+ : this (capacity, null)
{
- Init (capacity, null);
}
public Dictionary (IDictionary<TKey, TValue> dictionary, IEqualityComparer<TKey> comparer)
{
if (dictionary == null)
throw new ArgumentNullException ("dictionary");
- int capacity = dictionary.Count;
- Init (capacity, comparer);
+
+ Init (dictionary.Count, comparer);
foreach (KeyValuePair<TKey, TValue> entry in dictionary)
this.Add (entry.Key, entry.Value);
}
public Dictionary (int capacity, IEqualityComparer<TKey> comparer)
{
+ if (capacity < 0)
+ throw new ArgumentOutOfRangeException ("capacity");
+
Init (capacity, comparer);
}
@@ -257,22 +260,16 @@ namespace System.Collections.Generic {
serialization_info = info;
}
- private void Init (int capacity, IEqualityComparer<TKey> hcp)
+ void Init (int capacity, IEqualityComparer<TKey> hcp)
{
- if (capacity < 0)
- throw new ArgumentOutOfRangeException ("capacity");
- this.hcp = (hcp != null) ? hcp : EqualityComparer<TKey>.Default;
- if (capacity == 0)
- capacity = INITIAL_SIZE;
+ this.hcp = hcp ?? EqualityComparer<TKey>.Default;
- /* Modify capacity so 'capacity' elements can be added without resizing */
- capacity = (int)(capacity / DEFAULT_LOAD_FACTOR) + 1;
-
+ capacity = Math.Max (1, (int)(capacity / DEFAULT_LOAD_FACTOR));
InitArrays (capacity);
- generation = 0;
}
- private void InitArrays (int size) {
+ void InitArrays (int size)
+ {
table = new int [size];
linkSlots = new Link [size];
@@ -456,6 +453,9 @@ namespace System.Collections.Generic {
public void Clear ()
{
+ if (count == 0)
+ return;
+
count = 0;
// clear the hash table
Array.Clear (table, 0, table.Length);
diff --git a/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs b/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs
index 685c0f372fa..accba935b62 100644
--- a/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs
+++ b/mcs/class/corlib/System.Globalization/CalendricalCalculations.cs
@@ -466,6 +466,11 @@ static class CCGregorianCalendar {
/// <returns>An integer value representing the fixed day number.
/// </returns>
public static int fixed_from_dmy(int day, int month, int year) {
+ if (month > 12) {
+ year += CCMath.div_mod (out month, month - 1, 12);
+ month++;
+ }
+
int k = epoch - 1;
k += 365 * (year-1);
k += CCMath.div(year-1, 4);
@@ -944,6 +949,12 @@ static class CCJulianCalendar {
/// </returns>
public static int fixed_from_dmy(int day, int month, int year) {
int y = year < 0 ? year+1 : year;
+
+ if (month > 12) {
+ y += CCMath.div_mod (out month, month - 1, 12);
+ month++;
+ }
+
int k = epoch - 1;
k += 365 * (y-1);
k += CCMath.div(y-1, 4);
@@ -1371,6 +1382,13 @@ static class CCHebrewCalendar {
/// <returns>An integer value representing the fixed day number.
/// </returns>
public static int fixed_from_dmy(int day, int month, int year) {
+ var lastMonth = last_month_of_year (year);
+ while (month > lastMonth) {
+ year++;
+ month -= lastMonth;
+ lastMonth = last_month_of_year (year);
+ }
+
int m;
int k = epoch-1;
k += elapsed_days(year);
@@ -1686,6 +1704,11 @@ static class CCHijriCalendar {
/// <returns>An integer value representing the fixed day number.
/// </returns>
public static int fixed_from_dmy(int day, int month, int year) {
+ if (month > 12) {
+ year += CCMath.div_mod (out month, month - 1, 12);
+ month++;
+ }
+
int k = epoch - 1;
k += 354 * (year-1);
k += CCMath.div(3+11*year, 30);
diff --git a/mcs/class/corlib/System.IO/DirectoryInfo.cs b/mcs/class/corlib/System.IO/DirectoryInfo.cs
index ce558743516..09ed552f62e 100644
--- a/mcs/class/corlib/System.IO/DirectoryInfo.cs
+++ b/mcs/class/corlib/System.IO/DirectoryInfo.cs
@@ -6,10 +6,12 @@
// Jim Richardson, develop@wtfo-guru.com
// Dan Lewis, dihlewis@yahoo.co.uk
// Sebastien Pouliot <sebastien@ximian.com>
+// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2002 Ximian, Inc.
// Copyright (C) 2001 Moonlight Enterprises, All Rights Reserved
// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2014 Xamarin, Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -441,25 +443,19 @@ namespace System.IO {
throw MonoIO.GetException (Path.GetDirectoryName (path_with_pattern), (MonoIOError) error);
try {
- if (((rattr & FileAttributes.ReparsePoint) == 0)){
- if ((rattr & FileAttributes.Directory) != 0)
- yield return new DirectoryInfo (s);
- else
- yield return new FileInfo (s);
- }
-
- while ((s = MonoIO.FindNext (handle, out rattr, out error)) != null){
- if ((rattr & FileAttributes.ReparsePoint) != 0)
- continue;
- if ((rattr & FileAttributes.Directory) != 0)
- yield return new DirectoryInfo (s);
- else
- yield return new FileInfo (s);
-
+ do {
+ if (((rattr & FileAttributes.ReparsePoint) == 0)){
+ if ((rattr & FileAttributes.Directory) != 0)
+ yield return new DirectoryInfo (s);
+ else
+ yield return new FileInfo (s);
+ }
+
if (((rattr & FileAttributes.Directory) != 0) && subdirs)
foreach (FileSystemInfo child in EnumerateFileSystemInfos (s, searchPattern, searchOption))
yield return child;
- }
+
+ } while ((s = MonoIO.FindNext (handle, out rattr, out error)) != null);
} finally {
MonoIO.FindClose (handle);
}
diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs
index 7fdd8d6afc8..3ea8cfe0069 100644
--- a/mcs/class/corlib/System.IO/Path.cs
+++ b/mcs/class/corlib/System.IO/Path.cs
@@ -383,7 +383,11 @@ namespace System.IO {
canonicalize = start > 0;
}
- path = Directory.InsecureGetCurrentDirectory() + DirectorySeparatorStr + path;
+ var cwd = Directory.InsecureGetCurrentDirectory();
+ if (cwd [cwd.Length - 1] == DirectorySeparatorChar)
+ path = cwd + path;
+ else
+ path = cwd + DirectorySeparatorChar + path;
} else if (DirectorySeparatorChar == '\\' &&
path.Length >= 2 &&
IsDsc (path [0]) &&
diff --git a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
index 4083e35d73b..3c5bf402f1c 100644
--- a/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
+++ b/mcs/class/corlib/System.IO/UnmanagedMemoryStream.cs
@@ -33,6 +33,10 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
+#if NET_4_5
+using System.Threading;
+using System.Threading.Tasks;
+#endif
namespace System.IO
{
@@ -48,6 +52,9 @@ namespace System.IO
#if NET_4_0
SafeBuffer safebuffer;
#endif
+#if NET_4_5
+ Task<int> read_task;
+#endif
internal event EventHandler Closed;
@@ -209,6 +216,36 @@ namespace System.IO
return progress;
}
+#if NET_4_5
+ public override Task<int> ReadAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
+ {
+ if (buffer == null)
+ throw new ArgumentNullException("buffer");
+ if (offset < 0)
+ throw new ArgumentOutOfRangeException("offset", "Non-negative number required.");
+ if (count < 0)
+ throw new ArgumentOutOfRangeException("count", "Non-negative number required.");
+ if ((buffer.Length - offset) < count)
+ throw new ArgumentException("The length of the buffer array minus the offset parameter is less than the count parameter");
+
+ if (cancellationToken.IsCancellationRequested)
+ return TaskConstants<int>.Canceled;
+
+ try {
+ count = Read (buffer, offset, count);
+
+ // Try not to allocate a new task for every buffer read
+ if (read_task == null || read_task.Result != count)
+ read_task = Task<int>.FromResult (count);
+
+ return read_task;
+ } catch (Exception ex) {
+ return Task<int>.FromException (ex);
+ }
+ }
+
+#endif
+
public override int ReadByte ()
{
if (closed)
@@ -293,6 +330,21 @@ namespace System.IO
//This method performs no action for this class
//but is included as part of the Stream base class
}
+
+#if NET_4_5
+ public override Task FlushAsync (CancellationToken cancellationToken)
+ {
+ if (cancellationToken.IsCancellationRequested)
+ return TaskConstants.Canceled;
+
+ try {
+ Flush ();
+ return TaskConstants.Finished;
+ } catch (Exception ex) {
+ return Task<object>.FromException (ex);
+ }
+ }
+#endif
protected override void Dispose (bool disposing)
{
@@ -349,6 +401,32 @@ namespace System.IO
if (current_position > length)
length = current_position;
}
+
+#if NET_4_5
+ public override Task WriteAsync (byte[] buffer, int offset, int count, CancellationToken cancellationToken)
+ {
+ if (buffer == null)
+ throw new ArgumentNullException("The buffer parameter is a null reference");
+ if (offset < 0)
+ throw new ArgumentOutOfRangeException("offset", "Non-negative number required.");
+ if (count < 0)
+ throw new ArgumentOutOfRangeException("count", "Non-negative number required.");
+ if ((buffer.Length - offset) < count)
+ throw new ArgumentException("The length of the buffer array minus the offset parameter is less than the count parameter");
+ if (current_position > capacity - count)
+ throw new NotSupportedException ("Unable to expand length of this stream beyond its capacity.");
+
+ if (cancellationToken.IsCancellationRequested)
+ return TaskConstants.Canceled;
+
+ try {
+ Write (buffer, offset, count);
+ return TaskConstants.Finished;
+ } catch (Exception ex) {
+ return Task<object>.FromException (ex);
+ }
+ }
+#endif
public override void WriteByte (byte value)
{
diff --git a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
index 64b5bf4bde5..15e2f8a9757 100644
--- a/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
+++ b/mcs/class/corlib/System.Reflection.Emit/TypeBuilder.cs
@@ -808,6 +808,12 @@ namespace System.Reflection.Emit
if (parent == pmodule.assemblyb.corlib_enum_type && methods != null)
throw new TypeLoadException ("Could not load type '" + FullName + "' from assembly '" + Assembly + "' because it is an enum with methods.");
+ if (interfaces != null) {
+ foreach (var iface in interfaces) {
+ if (iface.IsNestedPrivate && iface.Assembly != Assembly)
+ throw new TypeLoadException ("Could not load type '" + FullName + "' from assembly '" + Assembly + "' because it is implements the inaccessible interface '" + iface.FullName + "'.");
+ }
+ }
if (methods != null) {
bool is_concrete = !IsAbstract;
diff --git a/mcs/class/corlib/System.Reflection/Assembly.cs b/mcs/class/corlib/System.Reflection/Assembly.cs
index 5e1dafbd3fc..1a744b8ab5c 100644
--- a/mcs/class/corlib/System.Reflection/Assembly.cs
+++ b/mcs/class/corlib/System.Reflection/Assembly.cs
@@ -752,13 +752,6 @@ namespace System.Reflection {
}
}
- //
- // The following functions are only for the Mono Debugger.
- //
-
- [MethodImplAttribute (MethodImplOptions.InternalCall)]
- internal static extern int MonoDebugger_GetMethodToken (MethodBase method);
-
[MonoTODO ("Currently it always returns zero")]
[ComVisible (false)]
public
diff --git a/mcs/class/corlib/System.Reflection/ParameterInfo.cs b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
index 1c00fb96c10..466ae0f70b5 100644
--- a/mcs/class/corlib/System.Reflection/ParameterInfo.cs
+++ b/mcs/class/corlib/System.Reflection/ParameterInfo.cs
@@ -35,6 +35,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Text;
+using System.Runtime.Serialization;
namespace System.Reflection
{
@@ -43,12 +44,16 @@ namespace System.Reflection
[Serializable]
[ClassInterfaceAttribute (ClassInterfaceType.None)]
[StructLayout (LayoutKind.Sequential)]
-#if MOBILE
- public partial class ParameterInfo : ICustomAttributeProvider {
-#else
- public partial class ParameterInfo : ICustomAttributeProvider, _ParameterInfo {
+ public partial class ParameterInfo : ICustomAttributeProvider
+
+#if !MOBILE
+ , _ParameterInfo
#endif
+#if NET_4_0
+ , IObjectReference
+#endif
+ {
protected Type ClassImpl;
protected object DefaultValueImpl;
protected MemberInfo MemberImpl;
@@ -245,6 +250,11 @@ namespace System.Reflection
return new object [0];
}
+ public object GetRealObject (StreamingContext context)
+ {
+ throw new NotImplementedException ();
+ }
+
public virtual bool IsDefined( Type attributeType, bool inherit) {
return false;
}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
index 995019325e2..c2e45b40c18 100644
--- a/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
+++ b/mcs/class/corlib/System.Runtime.InteropServices.WindowsRuntime/InterfaceImplementedInVersionAttribute.cs
@@ -1,4 +1,3 @@
-#if NET_4_5
//
// InterfaceImplementedInVersionAttribute.cs
//
@@ -24,12 +23,13 @@
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-using System;
+
+#if NET_4_5
using System.Runtime.CompilerServices;
namespace System.Runtime.InteropServices.WindowsRuntime
{
- [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = false, Inherited = false)]
+ [AttributeUsageAttribute(AttributeTargets.Class|AttributeTargets.Interface, AllowMultiple = true, Inherited = false)]
public sealed class InterfaceImplementedInVersionAttribute : Attribute
{
public InterfaceImplementedInVersionAttribute (Type interfaceType, byte majorVersion, byte minorVersion,
diff --git a/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs b/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
index 032ab2e5f27..f8171915a41 100644
--- a/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
+++ b/mcs/class/corlib/System.Runtime.Serialization/FormatterServices.cs
@@ -40,16 +40,23 @@ using System.Globalization;
namespace System.Runtime.Serialization
{
[System.Runtime.InteropServices.ComVisibleAttribute (true)]
- public sealed class FormatterServices
+#if NET_4_5
+ static
+#else
+ sealed
+#endif
+ public class FormatterServices
{
private const BindingFlags fieldFlags = BindingFlags.Public |
BindingFlags.Instance |
BindingFlags.NonPublic |
BindingFlags.DeclaredOnly;
+#if !NET_4_5
private FormatterServices ()
{
}
+#endif
public static object [] GetObjectData (object obj, MemberInfo [] members)
{
diff --git a/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.jvm.cs b/mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs
index e0e424d10f4..15b61d771d8 100644
--- a/mcs/class/System.Web/System.Web.UI/FileLevelUserControlBuilder.jvm.cs
+++ b/mcs/class/corlib/System.Runtime.Versioning/CompatibilitySwitch.cs
@@ -1,12 +1,10 @@
//
-// System.Web.UI.FileLevelControlBuilderAttribute.cs
+// CompatibilitySwitch.cs
//
// Authors:
-// Arina Itkes (arinai@mainsoft.com)
-//
-// (C) 2007 Mainsoft Co. (http://www.mainsoft.com)
-//
+// Marek Safar (marek.safar@gmail.com)
//
+// Copyright 2014 Xamarin Inc
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -28,17 +26,21 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
-using System.Web.UI;
+#if NET_4_5
-namespace System.Web.UI
-{
- public class FileLevelUserControlBuilder : RootBuilder
+namespace System.Runtime.Versioning {
+ public static class CompatibilitySwitch
{
- public FileLevelUserControlBuilder ()
+ public static bool IsEnabled (string compatibilitySwitchName)
+ {
+ return false;
+ }
+
+ public static string GetValue (string compatibilitySwitchName)
{
- throw new NotImplementedException ();
+ return null;
}
}
}
-#endif
+
+#endif \ No newline at end of file
diff --git a/mcs/class/corlib/System.Runtime/GCSettings.cs b/mcs/class/corlib/System.Runtime/GCSettings.cs
index dd7ce6a7e13..7e65ffa2e82 100644
--- a/mcs/class/corlib/System.Runtime/GCSettings.cs
+++ b/mcs/class/corlib/System.Runtime/GCSettings.cs
@@ -37,12 +37,21 @@ namespace System.Runtime
get { return false; }
}
- [MonoTODO ("Always returns GCLatencyMode.Interactive and ignores set (.NET 2.0 SP1 member)")]
+ [MonoTODO ("Always returns GCLatencyMode.Interactive and ignores set")]
public static GCLatencyMode LatencyMode {
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
get { return GCLatencyMode.Interactive; }
[ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
set { ; }
}
+
+#if NET_4_5
+ public static GCLargeObjectHeapCompactionMode LargeObjectHeapCompactionMode {
+ [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
+ get;
+ [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
+ set;
+ }
+#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Claims/AuthenticationTypes.cs b/mcs/class/corlib/System.Security.Claims/AuthenticationTypes.cs
deleted file mode 100644
index 23472dc074a..00000000000
--- a/mcs/class/corlib/System.Security.Claims/AuthenticationTypes.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// Claim.cs
-//
-// Authors:
-// Miguel de Icaza (miguel@xamarin.com)
-//
-// Copyright 2014 Xamarin Inc
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-
-namespace System.Security.Claims {
-
- public static class AuthenticationTypes {
- public const string Basic = "Basic";
- public const string Federation = "Federation";
- public const string Kerberos = "Kerberos";
- public const string Negotiate = "Negotiate";
- public const string Password = "Password";
- public const string Signature = "Signature";
- public const string Windows = "Windows";
- public const string X509 = "X509";
- }
-}
diff --git a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs
index e1fa6e36ecd..562c89d03be 100644
--- a/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs
+++ b/mcs/class/corlib/System.Security.Claims/ClaimTypes.cs
@@ -44,29 +44,25 @@ namespace System.Security.Claims
public const string AuthorizationDecision = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/authorizationdecision";
- public const string ClaimsType2005Namespace = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims";
-
- public const string ClaimsType2009Namespace = "http://schemas.xmlsoap.org/ws/2009/09/identity/claims";
-
- public const string ClaimsTypeNamespace = "http://schemas.microsoft.com/ws/2008/06/identity/claims";
-
public const string CookiePath = "http://schemas.microsoft.com/ws/2008/06/identity/claims/cookiepath";
public const string Country = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/country";
public const string DateOfBirth = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dateofbirth";
- public const string DenyOnlyPrimaryGroup = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarygroup";
+ public const string DenyOnlyPrimaryGroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarygroupsid";
public const string DenyOnlyPrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlyprimarysid";
public const string DenyOnlySid = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/denyonlysid";
+ public const string DenyOnlyWindowsDeviceGroup = "http://schemas.microsoft.com/ws/2008/06/identity/claims/denyonlywindowsdevicegroup";
+
public const string Dns = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/dns";
public const string Dsa = "http://schemas.microsoft.com/ws/2008/06/identity/claims/dsa";
- public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/email";
+ public const string Email = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress";
public const string Expiration = "http://schemas.microsoft.com/ws/2008/06/identity/claims/expiration";
@@ -96,8 +92,6 @@ namespace System.Security.Claims
public const string PostalCode = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/postalcode";
- public const string PPID = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/privatepersonalidentifier";
-
public const string PrimaryGroupSid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarygroupsid";
public const string PrimarySid = "http://schemas.microsoft.com/ws/2008/06/identity/claims/primarysid";
@@ -134,6 +128,16 @@ namespace System.Security.Claims
public const string WindowsAccountName = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname";
+ public const string WindowsDeviceClaim = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsdeviceclaim";
+
+ public const string WindowsDeviceGroup = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsdevicegroup";
+
+ public const string WindowsFqbnVersion = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsfqbnversion";
+
+ public const string WindowsSubAuthority = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowssubauthority";
+
+ public const string WindowsUserClaim = "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsuserclaim";
+
public const string X500DistinguishedName = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/x500distinguishedname";
}
}
diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs
index 7b62592da15..60092f73b38 100644
--- a/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs
+++ b/mcs/class/corlib/System.Security.Claims/ClaimsIdentity.cs
@@ -3,6 +3,7 @@
//
// Authors:
// Miguel de Icaza (miguel@xamarin.com)
+// Marek Safar (marek.safar@gmail.com)
//
// Copyright 2014 Xamarin Inc
//
@@ -26,10 +27,11 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_5
-using System;
+
using System.Collections.Generic;
using System.Security.Principal;
using System.Runtime.Serialization;
+
namespace System.Security.Claims {
[Serializable]
@@ -41,14 +43,18 @@ namespace System.Security.Claims {
[NonSerializedAttribute]
public const string DefaultIssuer = "LOCAL AUTHORITY";
- List<Claim> claims;
+ readonly List<Claim> claims;
ClaimsIdentity actor;
- string auth_type;
+ readonly string auth_type;
public ClaimsIdentity ()
: this (claims: null, authenticationType: null, nameType: null, roleType: null)
{ }
+ public ClaimsIdentity(IEnumerable<Claim> claims)
+ : this (claims: claims, authenticationType: null, nameType: null, roleType: null)
+ { }
+
public ClaimsIdentity (string authenticationType)
: this (claims: null, authenticationType: authenticationType, nameType: null, roleType: null)
{ }
@@ -68,43 +74,42 @@ namespace System.Security.Claims {
public ClaimsIdentity(IEnumerable<Claim> claims, string authenticationType, string nameType, string roleType)
: this (identity: null, claims: claims, authenticationType: authenticationType, nameType: nameType, roleType: roleType)
{
- claims = claims == null ? new List<Claim> (): new List<Claim> (claims);
-
- // Special case: if empty, set to null.
- if (authenticationType == "")
- auth_type = null;
- else
- auth_type = authenticationType;
-
- NameClaimType = nameType == null ? DefaultNameClaimType : nameType;
- RoleClaimType = roleType == null ? DefaultRoleClaimType : roleType;
}
public ClaimsIdentity (IIdentity identity, IEnumerable<Claim> claims)
: this (identity, claims, authenticationType: null, nameType: null, roleType: null)
- { }
+ {
+ }
public ClaimsIdentity (IIdentity identity, IEnumerable<Claim> claims, string authenticationType, string nameType, string roleType)
{
- var ci = identity as ClaimsIdentity;
- NameClaimType = nameType == null ? DefaultNameClaimType : nameType;
- RoleClaimType = roleType == null ? DefaultRoleClaimType : roleType;
-
+ NameClaimType = string.IsNullOrEmpty (nameType) ? DefaultNameClaimType : nameType;
+ RoleClaimType = string.IsNullOrEmpty (roleType) ? DefaultRoleClaimType : roleType;
+ auth_type = authenticationType;
+
this.claims = new List<Claim> ();
- if (ci != null){
- actor = ci.Actor;
- BootstrapContext = ci.BootstrapContext;
- foreach (var c in ci.Claims)
- this.claims.Add (c);
-
- if (claims != null) {
- foreach (var c in claims)
+
+ if (identity != null) {
+ if (string.IsNullOrEmpty (authenticationType))
+ auth_type = identity.AuthenticationType;
+
+ var ci = identity as ClaimsIdentity;
+ if (ci != null) {
+ actor = ci.Actor;
+ BootstrapContext = ci.BootstrapContext;
+ foreach (var c in ci.Claims)
this.claims.Add (c);
+
+ Label = ci.Label;
+ NameClaimType = string.IsNullOrEmpty (nameType) ? ci.NameClaimType : nameType;
+ RoleClaimType = string.IsNullOrEmpty (roleType) ? ci.RoleClaimType : roleType;
+ } else if (!string.IsNullOrEmpty (identity.Name)) {
+ AddDefaultClaim (identity.Name);
}
- Label = ci.Label;
- NameClaimType = ci.NameClaimType;
- RoleClaimType = ci.RoleClaimType;
- auth_type = ci.AuthenticationType;
+ }
+
+ if (claims != null) {
+ AddClaims (claims);
}
}
@@ -127,8 +132,9 @@ namespace System.Security.Claims {
return actor;
}
set {
- if (actor == this)
+ if (value == this)
throw new InvalidOperationException ("can not set the Actor property to this instance");
+
actor = value;
}
}
@@ -169,6 +175,10 @@ namespace System.Security.Claims {
{
if (claim == null)
throw new ArgumentNullException ("claim");
+
+ if (claim.Subject != this)
+ claim = claim.Clone (this);
+
claims.Add (claim);
}
@@ -176,8 +186,14 @@ namespace System.Security.Claims {
{
if (claims == null)
throw new ArgumentNullException ("claims");
+
foreach (var c in claims)
- this.claims.Add (c);
+ AddClaim (c);
+ }
+
+ internal void AddDefaultClaim (string identityName)
+ {
+ this.claims.Add (new Claim (NameClaimType, identityName, "http://www.w3.org/2001/XMLSchema#string", DefaultIssuer, DefaultIssuer, this));
}
public virtual ClaimsIdentity Clone ()
@@ -198,12 +214,12 @@ namespace System.Security.Claims {
yield return c;
}
- public virtual IEnumerable<Claim> FindAll(string type)
+ public virtual IEnumerable<Claim> FindAll (string type)
{
if (type == null)
throw new ArgumentNullException ("type");
foreach (var c in claims)
- if (c.Type == type)
+ if (string.Equals (c.Type, type, StringComparison.OrdinalIgnoreCase))
yield return c;
}
@@ -222,7 +238,7 @@ namespace System.Security.Claims {
if (type == null)
throw new ArgumentNullException ("type");
foreach (var c in claims)
- if (c.Type == type)
+ if (string.Equals (c.Type, type, StringComparison.OrdinalIgnoreCase))
return c;
return null;
}
@@ -244,7 +260,7 @@ namespace System.Security.Claims {
if (value == null)
throw new ArgumentNullException ("value");
foreach (var c in claims){
- if (c.Type == type && c.Value == value)
+ if (string.Equals (c.Type, type, StringComparison.OrdinalIgnoreCase) && c.Value == value)
return true;
}
return false;
diff --git a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs
index cf1fe29e9d1..b923e227665 100644..100755
--- a/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs
+++ b/mcs/class/corlib/System.Security.Claims/ClaimsPrincipal.cs
@@ -26,7 +26,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_5
-using System;
+
using System.Collections.Generic;
using System.Security.Principal;
using System.Runtime.Serialization;
@@ -68,7 +68,7 @@ namespace System.Security.Claims {
throw new ArgumentNullException ("identity");
identities = new List<ClaimsIdentity> ();
- identities.Add (new ClaimsIdentity (identity));
+ identities.Add (identity as ClaimsIdentity ?? new ClaimsIdentity (identity));
}
public ClaimsPrincipal (IPrincipal principal)
@@ -186,6 +186,29 @@ namespace System.Security.Claims {
}
return false;
}
+
+ public virtual bool HasClaim (string type, string value)
+ {
+ foreach(var claim in Claims){
+ if (claim.Type == type && claim.Value == value)
+ return true;
+ }
+ return false;
+ }
+
+ public virtual Claim FindFirst (string type)
+ {
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ return FindFirst(x => x.Type == type);
+ }
+
+ public virtual IEnumerable<Claim> FindAll (string type)
+ {
+ if (type == null)
+ throw new ArgumentNullException ("type");
+ return FindAll(x => x.Type == type);
+ }
}
}
diff --git a/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs b/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs
index ef7ec839c66..6bbf305af5b 100644
--- a/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs
+++ b/mcs/class/corlib/System.Security.Principal/GenericIdentity.cs
@@ -1,8 +1,9 @@
//
// System.Security.Principal.GenericIdentity.cs
//
-// Author:
+// Authors:
// Miguel de Icaza (miguel@ximian.com)
+// Marek Safar (marek.safar@gmail.com)
//
// (C) Ximian, Inc. http://www.ximian.com
// Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com)
@@ -28,12 +29,22 @@
//
using System.Runtime.InteropServices;
+using System.Collections.Generic;
+#if NET_4_5
+using System.Security.Claims;
+#endif
namespace System.Security.Principal {
[Serializable]
[ComVisible (true)]
- public class GenericIdentity : IIdentity {
+ public class GenericIdentity :
+#if NET_4_5
+ ClaimsIdentity
+#else
+ IIdentity
+#endif
+ {
// field names are serialization compatible with .net
private string m_name;
@@ -49,6 +60,10 @@ namespace System.Security.Principal {
m_name = name;
m_type = type;
+
+#if NET_4_5
+ AddDefaultClaim (name);
+#endif
}
public GenericIdentity (string name)
@@ -56,22 +71,52 @@ namespace System.Security.Principal {
{
}
- public virtual string AuthenticationType {
+#if NET_4_5
+ protected GenericIdentity (GenericIdentity identity)
+ : base (identity)
+ {
+ }
+#endif
+
+#if NET_4_5
+ override
+#else
+ virtual
+#endif
+ public string AuthenticationType {
get {
return m_type;
}
}
- public virtual string Name {
+#if NET_4_5
+ override
+#else
+ virtual
+#endif
+ public string Name {
get {
return m_name;
}
}
- public virtual bool IsAuthenticated {
+#if NET_4_5
+ override
+#else
+ virtual
+#endif
+ public bool IsAuthenticated {
get {
return (m_name.Length > 0);
}
}
+
+#if NET_4_5
+ public override IEnumerable<Claim> Claims {
+ get {
+ return base.Claims;
+ }
+ }
+#endif
}
}
diff --git a/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs b/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs
index 5272ad727ca..3b8e8d4bd20 100644
--- a/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs
+++ b/mcs/class/corlib/System.Security.Principal/GenericPrincipal.cs
@@ -29,12 +29,21 @@
//
using System.Runtime.InteropServices;
+#if NET_4_5
+using System.Security.Claims;
+#endif
namespace System.Security.Principal {
[Serializable]
[ComVisible (true)]
- public class GenericPrincipal : IPrincipal {
+ public class GenericPrincipal :
+#if NET_4_5
+ ClaimsPrincipal
+#else
+ IPrincipal
+#endif
+ {
// field names are serialization compatible with .net
private IIdentity m_identity;
@@ -58,11 +67,21 @@ namespace System.Security.Principal {
get { return m_roles; }
}
- public virtual IIdentity Identity {
+#if NET_4_5
+ override
+#else
+ virtual
+#endif
+ public IIdentity Identity {
get { return m_identity; }
}
- public virtual bool IsInRole (string role)
+#if NET_4_5
+ override
+#else
+ virtual
+#endif
+ public bool IsInRole (string role)
{
if (m_roles == null)
return false;
diff --git a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
index 3599d6429ec..698583f9ead 100644
--- a/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
+++ b/mcs/class/corlib/System.Security.Principal/WindowsIdentity.cs
@@ -52,6 +52,11 @@ namespace System.Security.Principal {
static private IntPtr invalidWindows = IntPtr.Zero;
+#if NET_4_5
+ [NonSerialized]
+ public new const string DefaultIssuer = "AD AUTHORITY";
+#endif
+
[SecurityPermission (SecurityAction.Demand, ControlPrincipal=true)]
public WindowsIdentity (IntPtr userToken)
: this (userToken, null, WindowsAccountType.Normal, false)
diff --git a/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs b/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs
index 7d7842e0b93..bbadfa47888 100644
--- a/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs
+++ b/mcs/class/corlib/System.Security.Principal/WindowsPrincipal.cs
@@ -30,13 +30,21 @@
using System.Collections;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
+#if NET_4_5
+using System.Security.Claims;
+#endif
namespace System.Security.Principal {
[Serializable]
[ComVisible (true)]
- public class WindowsPrincipal : IPrincipal {
-
+ public class WindowsPrincipal :
+#if NET_4_5
+ ClaimsPrincipal
+#else
+ IPrincipal
+#endif
+ {
private WindowsIdentity _identity;
// http://groups.google.ca/groups?q=WindowsPrincipal+m_roles&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=OghXf4OgCHA.4228%40tkmsftngp08&rnum=4
private string [] m_roles;
@@ -53,8 +61,12 @@ namespace System.Security.Principal {
}
// properties
-
- public virtual IIdentity Identity {
+#if NET_4_5
+ override
+#else
+ virtual
+#endif
+ public IIdentity Identity {
get { return _identity; }
}
@@ -102,7 +114,12 @@ namespace System.Security.Principal {
}
}
- public virtual bool IsInRole (string role)
+#if NET_4_5
+ override
+#else
+ virtual
+#endif
+ public bool IsInRole (string role)
{
if (role == null)
return false; // ArgumentNullException
diff --git a/mcs/class/corlib/System.Text/Encoding.cs b/mcs/class/corlib/System.Text/Encoding.cs
index 6bdfa546112..6be30b72494 100644
--- a/mcs/class/corlib/System.Text/Encoding.cs
+++ b/mcs/class/corlib/System.Text/Encoding.cs
@@ -1040,17 +1040,12 @@ public abstract class Encoding : ICloneable
}
// Forwarding decoder implementation.
- private sealed class ForwardingDecoder : Decoder
+ private sealed class ForwardingDecoder : EncodingDecoder
{
- private Encoding encoding;
-
// Constructor.
public ForwardingDecoder (Encoding enc)
+ : base (enc)
{
- encoding = enc;
- DecoderFallback fallback = encoding.DecoderFallback;
- if (fallback != null)
- Fallback = fallback;
}
// Override inherited methods.
@@ -1068,17 +1063,12 @@ public abstract class Encoding : ICloneable
} // class ForwardingDecoder
// Forwarding encoder implementation.
- private sealed class ForwardingEncoder : Encoder
+ private sealed class ForwardingEncoder : EncodingEncoder
{
- private Encoding encoding;
-
// Constructor.
public ForwardingEncoder (Encoding enc)
+ : base (enc)
{
- encoding = enc;
- EncoderFallback fallback = encoding.EncoderFallback;
- if (fallback != null)
- Fallback = fallback;
}
// Override inherited methods.
diff --git a/mcs/class/corlib/System.Text/EncodingDecoder.cs b/mcs/class/corlib/System.Text/EncodingDecoder.cs
new file mode 100644
index 00000000000..52b270a5266
--- /dev/null
+++ b/mcs/class/corlib/System.Text/EncodingDecoder.cs
@@ -0,0 +1,102 @@
+//
+// System.Text.EncodingDecoder.cs
+//
+// Authors:
+// Marcos Henrich (marcos.henrich@xamarin.com)
+//
+// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace System.Text {
+
+abstract class EncodingDecoder : Decoder {
+ protected readonly Encoding encoding;
+
+ // Constructor.
+ protected EncodingDecoder (Encoding encoding)
+ {
+ this.encoding = encoding;
+ var fallback = encoding.DecoderFallback;
+ if (fallback != null)
+ Fallback = fallback;
+ }
+
+ public unsafe override void Convert (
+ byte* bytes, int byteCount,
+ char* chars, int charCount, bool flush,
+ out int bytesUsed, out int charsUsed, out bool completed)
+ {
+ if (chars == null)
+ throw new ArgumentNullException ("chars");
+ if (bytes == null)
+ throw new ArgumentNullException ("bytes");
+ if (charCount < 0)
+ throw new ArgumentOutOfRangeException ("charCount");
+ if (byteCount < 0)
+ throw new ArgumentOutOfRangeException ("byteCount");
+
+ bytesUsed = encoding.GetByteCount(chars, charCount);
+
+ if (bytesUsed > byteCount) {
+ charsUsed = encoding.GetChars (bytes, byteCount, chars, charCount);
+ bytesUsed = encoding.GetByteCount (chars, charsUsed);
+ } else
+ charsUsed = encoding.GetChars (bytes, bytesUsed, chars, charCount);
+
+
+ completed = bytesUsed == byteCount;
+ }
+
+ public override void Convert (
+ byte [] bytes, int byteIndex, int byteCount,
+ char [] chars, int charIndex, int charCount, bool flush,
+ out int bytesUsed, out int charsUsed, out bool completed)
+ {
+ if (chars == null)
+ throw new ArgumentNullException ("chars");
+ if (bytes == null)
+ throw new ArgumentNullException ("bytes");
+ if (charIndex < 0)
+ throw new ArgumentOutOfRangeException ("charIndex");
+ if (charCount < 0 || chars.Length < charIndex + charCount)
+ throw new ArgumentOutOfRangeException ("charCount");
+ if (byteIndex < 0)
+ throw new ArgumentOutOfRangeException ("byteIndex");
+ if (byteCount < 0 || bytes.Length < byteIndex + byteCount)
+ throw new ArgumentOutOfRangeException ("byteCount");
+
+ bytesUsed = encoding.GetByteCount(chars, charIndex, charCount);
+
+ if (bytesUsed > byteCount) {
+ charsUsed = encoding.GetChars (bytes, byteIndex, byteCount, chars, charIndex);
+ bytesUsed = encoding.GetByteCount (chars, charIndex, charsUsed);
+ } else
+ charsUsed = encoding.GetChars (bytes, byteIndex, bytesUsed, chars, charIndex);
+
+ completed = bytesUsed == byteCount;
+ }
+}; // class EncodingDecoder
+
+}; // namespace System.Text
diff --git a/mcs/class/corlib/System.Text/EncodingEncoder.cs b/mcs/class/corlib/System.Text/EncodingEncoder.cs
new file mode 100644
index 00000000000..869c9b0ce55
--- /dev/null
+++ b/mcs/class/corlib/System.Text/EncodingEncoder.cs
@@ -0,0 +1,99 @@
+//
+// System.Text.EncodingEncoder.cs
+//
+// Authors:
+// Marcos Henrich (marcos.henrich@xamarin.com)
+//
+// Copyright (C) 2014 Xamarin Inc (http://www.xamarin.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Runtime.InteropServices;
+
+namespace System.Text {
+
+abstract class EncodingEncoder : Encoder {
+ protected readonly Encoding encoding;
+
+ // Constructor.
+ protected EncodingEncoder (Encoding encoding)
+ {
+ this.encoding = encoding;
+ var fallback = encoding.EncoderFallback;
+ if (fallback != null)
+ Fallback = fallback;
+ }
+
+ public unsafe override void Convert (
+ char* chars, int charCount,
+ byte* bytes, int byteCount, bool flush,
+ out int charsUsed, out int bytesUsed, out bool completed)
+ {
+ if (chars == null)
+ throw new ArgumentNullException ("chars");
+ if (bytes == null)
+ throw new ArgumentNullException ("bytes");
+ if (charCount < 0)
+ throw new ArgumentOutOfRangeException ("charCount");
+ if (byteCount < 0)
+ throw new ArgumentOutOfRangeException ("byteCount");
+
+ charsUsed = encoding.GetCharCount (bytes, byteCount);
+
+ if (charsUsed > charCount)
+ charsUsed = charCount;
+
+ bytesUsed = encoding.GetBytes (chars, charsUsed, bytes, byteCount);
+
+ completed = charsUsed == charCount;
+ }
+
+ public override void Convert (
+ char [] chars, int charIndex, int charCount,
+ byte [] bytes, int byteIndex, int byteCount, bool flush,
+ out int charsUsed, out int bytesUsed, out bool completed)
+ {
+ if (chars == null)
+ throw new ArgumentNullException ("chars");
+ if (bytes == null)
+ throw new ArgumentNullException ("bytes");
+ if (charIndex < 0)
+ throw new ArgumentOutOfRangeException ("charIndex");
+ if (charCount < 0 || chars.Length < charIndex + charCount)
+ throw new ArgumentOutOfRangeException ("charCount");
+ if (byteIndex < 0)
+ throw new ArgumentOutOfRangeException ("byteIndex");
+ if (byteCount < 0 || bytes.Length < byteIndex + byteCount)
+ throw new ArgumentOutOfRangeException ("byteCount");
+
+ charsUsed = encoding.GetCharCount (bytes, byteIndex, byteCount);
+
+ if (charsUsed > charCount)
+ charsUsed = charCount;
+
+ bytesUsed = encoding.GetBytes (chars, charIndex, charsUsed, bytes, byteIndex);
+
+ completed = charsUsed == charCount;
+ }
+}; // class EncodingEncoder
+
+}; // namespace System.Text
diff --git a/mcs/class/corlib/System.Text/UTF7Encoding.cs b/mcs/class/corlib/System.Text/UTF7Encoding.cs
index 60f716fad54..32f7409e59a 100644
--- a/mcs/class/corlib/System.Text/UTF7Encoding.cs
+++ b/mcs/class/corlib/System.Text/UTF7Encoding.cs
@@ -604,23 +604,24 @@ class UTF7Encoding : Encoding
// Get a UTF7-specific decoder that is attached to this instance.
public override Decoder GetDecoder ()
{
- return new UTF7Decoder ();
+ return new UTF7Decoder (this);
}
// Get a UTF7-specific encoder that is attached to this instance.
public override Encoder GetEncoder ()
{
- return new UTF7Encoder (allowOptionals);
+ return new UTF7Encoder (allowOptionals, this);
}
// UTF-7 decoder implementation.
- private sealed class UTF7Decoder : Decoder
+ private sealed class UTF7Decoder : EncodingDecoder
{
// Internal state.
private int leftOver;
// Constructor.
- public UTF7Decoder ()
+ public UTF7Decoder (Encoding encoding)
+ : base (encoding)
{
leftOver = 0;
}
@@ -640,14 +641,15 @@ class UTF7Encoding : Encoding
} // class UTF7Decoder
// UTF-7 encoder implementation.
- private sealed class UTF7Encoder : Encoder
+ private sealed class UTF7Encoder : EncodingEncoder
{
private bool allowOptionals;
private int leftOver = 0;
private bool isInShifted = false;
// Constructor.
- public UTF7Encoder (bool allowOptionals)
+ public UTF7Encoder (bool allowOptionals, UTF7Encoding encoding)
+ : base (encoding)
{
this.allowOptionals = allowOptionals;
}
diff --git a/mcs/class/corlib/System.Text/UTF8Encoding.cs b/mcs/class/corlib/System.Text/UTF8Encoding.cs
index 1aa56bc9f29..1ea7a9ea86a 100644
--- a/mcs/class/corlib/System.Text/UTF8Encoding.cs
+++ b/mcs/class/corlib/System.Text/UTF8Encoding.cs
@@ -436,7 +436,7 @@ fail_no_space:
private unsafe static int InternalGetCharCount (
byte[] bytes, int index, int count, uint leftOverBits,
uint leftOverCount, object provider,
- ref DecoderFallbackBuffer fallbackBuffer, ref byte [] bufferArg, bool flush)
+ ref DecoderFallbackBuffer fallbackBuffer, bool flush)
{
// Validate the parameters.
if (bytes == null) {
@@ -453,22 +453,22 @@ fail_no_space:
return 0;
fixed (byte *bptr = bytes)
return InternalGetCharCount (bptr + index, count,
- leftOverBits, leftOverCount, provider, ref fallbackBuffer, ref bufferArg, flush);
+ leftOverBits, leftOverCount, provider, ref fallbackBuffer, flush);
}
private unsafe static int InternalGetCharCount (
- byte* bytes, int count, uint leftOverBits,
+ byte* bytes, int byteCount, uint leftOverBits,
uint leftOverCount, object provider,
- ref DecoderFallbackBuffer fallbackBuffer, ref byte [] bufferArg, bool flush)
+ ref DecoderFallbackBuffer fallbackBuffer, bool flush)
{
- int index = 0;
+ int byteIndex = 0;
int length = 0;
if (leftOverCount == 0) {
- int end = index + count;
- for (; index < end; index++, count--) {
- if (bytes [index] < 0x80)
+ int end = byteIndex + byteCount;
+ for (; byteIndex < end; byteIndex++, byteCount--) {
+ if (bytes [byteIndex] < 0x80)
length++;
else
break;
@@ -480,9 +480,11 @@ fail_no_space:
uint leftBits = leftOverBits;
uint leftSoFar = (leftOverCount & (uint)0x0F);
uint leftSize = ((leftOverCount >> 4) & (uint)0x0F);
- while (count > 0) {
- ch = (uint)(bytes[index++]);
- --count;
+
+ int byteEnd = byteIndex + byteCount;
+ for(; byteIndex < byteEnd; byteIndex++) {
+ // Fetch the next character from the byte buffer.
+ ch = (uint)(bytes[byteIndex]);
if (leftSize == 0) {
// Process a UTF-8 start character.
if (ch < (uint)0x0080) {
@@ -515,7 +517,7 @@ fail_no_space:
leftSize = 6;
} else {
// Invalid UTF-8 start character.
- length += Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, index - 1, 1);
+ length += Fallback (provider, ref fallbackBuffer, bytes, byteIndex, 1);
}
} else {
// Process an extra byte in a multi-byte sequence.
@@ -544,34 +546,34 @@ fail_no_space:
break;
}
if (overlong) {
- length += Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, index - leftSoFar, leftSoFar);
+ length += Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar);
+ --byteIndex; //process byte again
}
else if ((leftBits & 0xF800) == 0xD800) {
// UTF-8 doesn't use surrogate characters
- length += Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, index - leftSoFar, leftSoFar);
+ length += Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar);
}
else
++length;
} else if (leftBits < (uint)0x110000) {
length += 2;
} else {
- length += Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, index - leftSoFar, leftSoFar);
+ length += Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar);
}
leftSize = 0;
}
} else {
// Invalid UTF-8 sequence: clear and restart.
- length += Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, index - leftSoFar, leftSoFar);
+ length += Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar);
leftSize = 0;
- --index;
- ++count;
+ --byteIndex;
}
}
}
if (flush && leftSize != 0) {
// We had left-over bytes that didn't make up
// a complete UTF-8 character sequence.
- length += Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, index - leftSoFar, leftSoFar);
+ length += Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar);
}
// Return the final length to the caller.
@@ -579,7 +581,7 @@ fail_no_space:
}
// for GetCharCount()
- static unsafe int Fallback (object provider, ref DecoderFallbackBuffer buffer, ref byte [] bufferArg, byte* bytes, long index, uint size)
+ static unsafe int Fallback (object provider, ref DecoderFallbackBuffer buffer, byte* bytes, long index, uint size)
{
if (buffer == null) {
DecoderFallback fb = provider as DecoderFallback;
@@ -588,20 +590,21 @@ fail_no_space:
else
buffer = ((Decoder) provider).FallbackBuffer;
}
- if (bufferArg == null)
- bufferArg = new byte [1];
- int ret = 0;
- for (int i = 0; i < size; i++) {
- bufferArg [0] = bytes [(int) index + i];
- buffer.Fallback (bufferArg, 0);
- ret += buffer.Remaining;
- buffer.Reset ();
- }
+
+ var bufferArg = new byte [size];
+
+ for (int i = 0; i < size; i++)
+ bufferArg [i] = bytes [(int) index + i];
+
+ buffer.Fallback (bufferArg, 0);
+ int ret = buffer.Remaining;
+ buffer.Reset ();
+
return ret;
}
// for GetChars()
- static unsafe void Fallback (object provider, ref DecoderFallbackBuffer buffer, ref byte [] bufferArg, byte* bytes, long byteIndex, uint size,
+ static unsafe void Fallback (object provider, ref DecoderFallbackBuffer buffer, byte* bytes, long byteIndex, uint size,
char* chars, ref int charIndex)
{
if (buffer == null) {
@@ -611,23 +614,23 @@ fail_no_space:
else
buffer = ((Decoder) provider).FallbackBuffer;
}
- if (bufferArg == null)
- bufferArg = new byte [1];
- for (int i = 0; i < size; i++) {
- bufferArg [0] = bytes [byteIndex + i];
- buffer.Fallback (bufferArg, 0);
- while (buffer.Remaining > 0)
- chars [charIndex++] = buffer.GetNextChar ();
- buffer.Reset ();
- }
+
+ var bufferArg = new byte [size];
+
+ for (int i = 0; i < size; i++)
+ bufferArg [i] = bytes [byteIndex + i];
+
+ buffer.Fallback (bufferArg, 0);
+ while (buffer.Remaining > 0)
+ chars [charIndex++] = buffer.GetNextChar ();
+ buffer.Reset ();
}
// Get the number of characters needed to decode a byte buffer.
public override int GetCharCount (byte[] bytes, int index, int count)
{
DecoderFallbackBuffer buf = null;
- byte [] bufferArg = null;
- return InternalGetCharCount (bytes, index, count, 0, 0, DecoderFallback, ref buf, ref bufferArg, true);
+ return InternalGetCharCount (bytes, index, count, 0, 0, DecoderFallback, ref buf, true);
}
[CLSCompliant (false)]
@@ -635,8 +638,7 @@ fail_no_space:
public unsafe override int GetCharCount (byte* bytes, int count)
{
DecoderFallbackBuffer buf = null;
- byte [] bufferArg = null;
- return InternalGetCharCount (bytes, count, 0, 0, DecoderFallback, ref buf, ref bufferArg, true);
+ return InternalGetCharCount (bytes, count, 0, 0, DecoderFallback, ref buf, true);
}
// Get the characters that result from decoding a byte buffer.
@@ -644,7 +646,7 @@ fail_no_space:
byte[] bytes, int byteIndex, int byteCount, char[] chars,
int charIndex, ref uint leftOverBits, ref uint leftOverCount,
object provider,
- ref DecoderFallbackBuffer fallbackBuffer, ref byte [] bufferArg, bool flush)
+ ref DecoderFallbackBuffer fallbackBuffer, bool flush)
{
// Validate the parameters.
if (bytes == null) {
@@ -668,10 +670,10 @@ fail_no_space:
fixed (char* cptr = chars) {
if (byteCount == 0 || byteIndex == bytes.Length)
- return InternalGetChars (null, 0, cptr + charIndex, chars.Length - charIndex, ref leftOverBits, ref leftOverCount, provider, ref fallbackBuffer, ref bufferArg, flush);
+ return InternalGetChars (null, 0, cptr + charIndex, chars.Length - charIndex, ref leftOverBits, ref leftOverCount, provider, ref fallbackBuffer, flush);
// otherwise...
fixed (byte* bptr = bytes)
- return InternalGetChars (bptr + byteIndex, byteCount, cptr + charIndex, chars.Length - charIndex, ref leftOverBits, ref leftOverCount, provider, ref fallbackBuffer, ref bufferArg, flush);
+ return InternalGetChars (bptr + byteIndex, byteCount, cptr + charIndex, chars.Length - charIndex, ref leftOverBits, ref leftOverCount, provider, ref fallbackBuffer, flush);
}
}
@@ -679,7 +681,7 @@ fail_no_space:
byte* bytes, int byteCount, char* chars, int charCount,
ref uint leftOverBits, ref uint leftOverCount,
object provider,
- ref DecoderFallbackBuffer fallbackBuffer, ref byte [] bufferArg, bool flush)
+ ref DecoderFallbackBuffer fallbackBuffer, bool flush)
{
int charIndex = 0, byteIndex = 0;
int length = charCount;
@@ -744,7 +746,7 @@ fail_no_space:
leftSize = 6;
} else {
// Invalid UTF-8 start character.
- Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, byteIndex, 1, chars, ref posn);
+ Fallback (provider, ref fallbackBuffer, bytes, byteIndex, 1, chars, ref posn);
}
} else {
// Process an extra byte in a multi-byte sequence.
@@ -773,11 +775,12 @@ fail_no_space:
break;
}
if (overlong) {
- Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
+ Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
+ --byteIndex; //process byte again
}
else if ((leftBits & 0xF800) == 0xD800) {
// UTF-8 doesn't use surrogate characters
- Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
+ Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
}
else {
if (posn >= length) {
@@ -797,13 +800,13 @@ fail_no_space:
chars[posn++] =
(char)((leftBits & (uint)0x3FF) + (uint)0xDC00);
} else {
- Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
+ Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
}
leftSize = 0;
}
} else {
// Invalid UTF-8 sequence: clear and restart.
- Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
+ Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
leftSize = 0;
--byteIndex;
}
@@ -812,7 +815,7 @@ fail_no_space:
if (flush && leftSize != 0) {
// We had left-over bytes that didn't make up
// a complete UTF-8 character sequence.
- Fallback (provider, ref fallbackBuffer, ref bufferArg, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
+ Fallback (provider, ref fallbackBuffer, bytes, byteIndex - leftSoFar, leftSoFar, chars, ref posn);
}
leftOverBits = leftBits;
leftOverCount = (leftSoFar | (leftSize << 4));
@@ -830,7 +833,7 @@ fail_no_space:
DecoderFallbackBuffer buf = null;
byte [] bufferArg = null;
return InternalGetChars (bytes, byteIndex, byteCount, chars,
- charIndex, ref leftOverBits, ref leftOverCount, DecoderFallback, ref buf, ref bufferArg, true);
+ charIndex, ref leftOverBits, ref leftOverCount, DecoderFallback, ref buf, true);
}
[CLSCompliant (false)]
@@ -838,11 +841,10 @@ fail_no_space:
public unsafe override int GetChars (byte* bytes, int byteCount, char* chars, int charCount)
{
DecoderFallbackBuffer buf = null;
- byte [] bufferArg = null;
uint leftOverBits = 0;
uint leftOverCount = 0;
return InternalGetChars (bytes, byteCount, chars,
- charCount, ref leftOverBits, ref leftOverCount, DecoderFallback, ref buf, ref bufferArg, true);
+ charCount, ref leftOverBits, ref leftOverCount, DecoderFallback, ref buf, true);
}
// Get the maximum number of bytes needed to encode a
@@ -882,13 +884,13 @@ fail_no_space:
// Get a UTF8-specific decoder that is attached to this instance.
public override Decoder GetDecoder ()
{
- return new UTF8Decoder (DecoderFallback);
+ return new UTF8Decoder (this);
}
// Get a UTF8-specific encoder that is attached to this instance.
public override Encoder GetEncoder ()
{
- return new UTF8Encoder (EncoderFallback, emitIdentifier);
+ return new UTF8Encoder (this);
}
// Get the UTF8 preamble.
@@ -935,15 +937,15 @@ fail_no_space:
// UTF-8 decoder implementation.
[Serializable]
- private class UTF8Decoder : Decoder
+ private class UTF8Decoder : EncodingDecoder
{
private uint leftOverBits;
private uint leftOverCount;
// Constructor.
- public UTF8Decoder (DecoderFallback fallback)
+ public UTF8Decoder (Encoding encoding)
+ : base (encoding)
{
- Fallback = fallback;
leftOverBits = 0;
leftOverCount = 0;
}
@@ -952,34 +954,31 @@ fail_no_space:
public override int GetCharCount (byte[] bytes, int index, int count)
{
DecoderFallbackBuffer buf = null;
- byte [] bufferArg = null;
return InternalGetCharCount (bytes, index, count,
- leftOverBits, leftOverCount, this, ref buf, ref bufferArg, false);
+ leftOverBits, leftOverCount, this, ref buf, false);
}
public override int GetChars (byte[] bytes, int byteIndex,
int byteCount, char[] chars, int charIndex)
{
DecoderFallbackBuffer buf = null;
- byte [] bufferArg = null;
return InternalGetChars (bytes, byteIndex, byteCount,
- chars, charIndex, ref leftOverBits, ref leftOverCount, this, ref buf, ref bufferArg, false);
+ chars, charIndex, ref leftOverBits, ref leftOverCount, this, ref buf, false);
}
} // class UTF8Decoder
// UTF-8 encoder implementation.
[Serializable]
- private class UTF8Encoder : Encoder
+ private class UTF8Encoder : EncodingEncoder
{
// private bool emitIdentifier;
private char leftOverForCount;
private char leftOverForConv;
// Constructor.
- public UTF8Encoder (EncoderFallback fallback, bool emitIdentifier)
+ public UTF8Encoder (UTF8Encoding encoding)
+ : base (encoding)
{
- Fallback = fallback;
-// this.emitIdentifier = emitIdentifier;
leftOverForCount = '\0';
leftOverForConv = '\0';
}
diff --git a/mcs/class/corlib/System.Text/UnicodeEncoding.cs b/mcs/class/corlib/System.Text/UnicodeEncoding.cs
index 6332b1509b3..edb57e69ca2 100644
--- a/mcs/class/corlib/System.Text/UnicodeEncoding.cs
+++ b/mcs/class/corlib/System.Text/UnicodeEncoding.cs
@@ -362,7 +362,7 @@ public class UnicodeEncoding : Encoding
// Get a Unicode-specific decoder that is attached to this instance.
public override Decoder GetDecoder ()
{
- return new UnicodeDecoder (bigEndian);
+ return new UnicodeDecoder (bigEndian, this);
}
// Get the Unicode preamble.
@@ -516,13 +516,14 @@ public class UnicodeEncoding : Encoding
}
// Unicode decoder implementation.
- private sealed class UnicodeDecoder : Decoder
+ private sealed class UnicodeDecoder : EncodingDecoder
{
private bool bigEndian;
private int leftOverByte;
// Constructor.
- public UnicodeDecoder (bool bigEndian)
+ public UnicodeDecoder (bool bigEndian, UnicodeEncoding encoding)
+ : base (encoding)
{
this.bigEndian = bigEndian;
leftOverByte = -1;
diff --git a/mcs/class/corlib/System.Threading.Tasks/Task.cs b/mcs/class/corlib/System.Threading.Tasks/Task.cs
index 60cb2ff9980..1f8165a0d48 100644
--- a/mcs/class/corlib/System.Threading.Tasks/Task.cs
+++ b/mcs/class/corlib/System.Threading.Tasks/Task.cs
@@ -1364,7 +1364,7 @@ namespace System.Threading.Tasks
bool IAsyncResult.CompletedSynchronously {
get {
- return true;
+ return false;
}
}
diff --git a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
index 1c352ff7d3e..54fe237c793 100644
--- a/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
+++ b/mcs/class/corlib/System.Threading/CancellationTokenRegistration.cs
@@ -26,14 +26,13 @@
#if NET_4_0
using System;
-using System.Threading;
namespace System.Threading
{
public struct CancellationTokenRegistration: IDisposable, IEquatable<CancellationTokenRegistration>
{
- int id;
- CancellationTokenSource source;
+ readonly int id;
+ readonly CancellationTokenSource source;
internal CancellationTokenRegistration (int id, CancellationTokenSource source)
{
@@ -52,7 +51,7 @@ namespace System.Threading
#region IEquatable<CancellationTokenRegistration> implementation
public bool Equals (CancellationTokenRegistration other)
{
- return this.id == other.id && this.source == other.source;
+ return id == other.id && source == other.source;
}
public static bool operator== (CancellationTokenRegistration left, CancellationTokenRegistration right)
@@ -73,7 +72,7 @@ namespace System.Threading
public override bool Equals (object obj)
{
- return (obj is CancellationTokenRegistration) ? Equals ((CancellationTokenRegistration)obj) : false;
+ return (obj is CancellationTokenRegistration) && Equals ((CancellationTokenRegistration)obj);
}
}
}
diff --git a/mcs/class/corlib/System.Threading/Volatile.cs b/mcs/class/corlib/System.Threading/Volatile.cs
index 5e92c3c8e41..92646ceee50 100644
--- a/mcs/class/corlib/System.Threading/Volatile.cs
+++ b/mcs/class/corlib/System.Threading/Volatile.cs
@@ -91,6 +91,7 @@ namespace System.Threading
public extern static float Read (ref float location);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
+ [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
public extern static T Read<T> (ref T location) where T : class;
[MethodImplAttribute (MethodImplOptions.InternalCall)]
@@ -151,6 +152,7 @@ namespace System.Threading
public extern static void Write (ref float location, float value);
[MethodImplAttribute (MethodImplOptions.InternalCall)]
+ [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
public extern static void Write<T>(ref T location, T value) where T : class;
}
}
diff --git a/mcs/class/corlib/System/AndroidPlatform.cs b/mcs/class/corlib/System/AndroidPlatform.cs
index 5a2483dcc3e..75e3d6a855f 100644
--- a/mcs/class/corlib/System/AndroidPlatform.cs
+++ b/mcs/class/corlib/System/AndroidPlatform.cs
@@ -27,6 +27,7 @@
//
#if MONODROID
+using System.Reflection;
using System.Threading;
namespace System {
@@ -35,20 +36,26 @@ namespace System {
static readonly Func<SynchronizationContext> getDefaultSyncContext;
static readonly Func<string> getDefaultTimeZone;
+ static readonly Func<TimeZone> getCurrentSystemTimeZone;
static AndroidPlatform ()
{
+ Type androidRuntime = Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true);
+
getDefaultSyncContext = (Func<SynchronizationContext>)
Delegate.CreateDelegate (typeof(Func<SynchronizationContext>),
- Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true)
- .GetMethod ("GetDefaultSyncContext",
+ androidRuntime.GetMethod ("GetDefaultSyncContext",
System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic));
getDefaultTimeZone = (Func<string>)
Delegate.CreateDelegate (typeof(Func<string>),
- Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true)
- .GetMethod ("GetDefaultTimeZone",
+ androidRuntime.GetMethod ("GetDefaultTimeZone",
System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic));
+
+ MethodInfo mi = androidRuntime.GetMethod ("GetCurrentSystemTimeZone",
+ System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic);
+ if (mi != null)
+ getCurrentSystemTimeZone = (Func<TimeZone>) Delegate.CreateDelegate (typeof(Func<TimeZone>), mi);
}
internal static SynchronizationContext GetDefaultSyncContext ()
@@ -60,6 +67,13 @@ namespace System {
{
return getDefaultTimeZone ();
}
+
+ internal static TimeZone GetCurrentSystemTimeZone ()
+ {
+ if (getCurrentSystemTimeZone == null)
+ return null;
+ return getCurrentSystemTimeZone ();
+ }
}
}
#endif
diff --git a/mcs/class/corlib/System/DateTime.cs b/mcs/class/corlib/System/DateTime.cs
index 30bc6f8edf8..8ff4901e4a3 100644
--- a/mcs/class/corlib/System/DateTime.cs
+++ b/mcs/class/corlib/System/DateTime.cs
@@ -107,7 +107,7 @@ namespace System
"H:mzzz",
"H:m",
"H tt", // Specifies AM to disallow '8'.
- "H'\u6642'm'\u5206's'\u79D2'",
+ "H'\u6642'm'\u5206's'\u79D2'"
};
// DateTime.Parse date patterns extend ParseExact patterns as follows:
@@ -885,6 +885,9 @@ namespace System
if (_DoParse (s, firstPart, ParseTimeFormats [j], false, out result, out dto, dfi, styles, true, ref incompleteFormat, ref longYear))
return true;
}
+
+ if (_DoParse (s, firstPart, "zzz", false, out result, out dto, dfi, styles, true, ref incompleteFormat, ref longYear))
+ return true;
}
//
@@ -928,10 +931,10 @@ namespace System
}
// Try as a last resort all the patterns
- if (ParseExact (s, dfi.GetAllDateTimePatternsInternal (), dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception))
+ if (CoreParseExact (s, dfi.GetAllDateTimePatternsInternal (), dfi, styles, out result, out dto, false, ref longYear, setExceptionOnError, ref exception))
return true;
- if (ParseExact (s, ExoticAndNonStandardFormats, dfi, styles, out result, false, ref longYear, setExceptionOnError, ref exception))
+ if (CoreParseExact (s, ExoticAndNonStandardFormats, dfi, styles, out result, out dto, false, ref longYear, setExceptionOnError, ref exception))
return true;
if (!setExceptionOnError)
@@ -1142,7 +1145,8 @@ namespace System
DateTimeStyles style,
bool firstPartIsDate,
ref bool incompleteFormat,
- ref bool longYear)
+ ref bool longYear,
+ bool dateTimeOffset = false)
{
bool useutc = false;
bool use_invariant = false;
@@ -1155,7 +1159,7 @@ namespace System
bool afterTFormat = false;
DateTimeFormatInfo invInfo = DateTimeFormatInfo.InvariantInfo;
if (format.Length == 1)
- format = DateTimeUtils.GetStandardPattern (format [0], dfi, out useutc, out use_invariant);
+ format = DateTimeUtils.GetStandardPattern (format [0], dfi, out useutc, out use_invariant, dateTimeOffset);
result = new DateTime (0);
if (format == null)
@@ -1396,13 +1400,8 @@ namespace System
} else if (num < 3) {
year = _ParseNumber (s, valuePos, 1, 2, true, sloppy_parsing, out num_parsed);
} else {
- year = _ParseNumber (s, valuePos, exact ? 4 : 3, 4, false, sloppy_parsing, out num_parsed);
- if ((year >= 1000) && (num_parsed == 4) && (!longYear) && (s.Length > 4 + valuePos)) {
- int np = 0;
- int ly = _ParseNumber (s, valuePos, 5, 5, false, sloppy_parsing, out np);
- longYear = (ly > 9999);
- }
- num = 3;
+ year = _ParseNumber (s, valuePos, exact ? num + 1 : 3, num + 1, false, sloppy_parsing, out num_parsed);
+ longYear = (year > 9999);
}
//FIXME: We should do use dfi.Calendat.TwoDigitYearMax
@@ -1470,6 +1469,25 @@ namespace System
if (num_parsed == -1)
return false;
fractionalSeconds = decimalNumber / Math.Pow(10.0, num_parsed);
+
+ //Parse ISO8601 with an unlimited number of fractional digits.
+ if (!exact && num == 6 && hour != -1 && minute != -1 && second != -1) {
+ var total_num_parsed = num_parsed;
+ while (true) {
+ valuePos += num_parsed;
+ decimalNumber = (double) _ParseNumber (s, valuePos, 0, 1, leading_zeros, sloppy_parsing, out num_parsed);
+ if (num_parsed < 1) {
+ num_parsed = 0;
+ break;
+ }
+
+ total_num_parsed += num_parsed;
+ if (total_num_parsed > 15)
+ continue; //not enough precision, ignore additional digits.
+
+ fractionalSeconds += decimalNumber / Math.Pow (10.0, total_num_parsed);
+ }
+ }
break;
case 't':
if (!_ParseAmPm (s, valuePos, num > 0 ? 0 : 1, dfi, exact, out num_parsed, ref ampm))
@@ -1538,7 +1556,6 @@ namespace System
valuePos += num_parsed;
tzoffmin = _ParseNumber (s, valuePos, 0, 2, true, sloppy_parsing, out num_parsed);
- num = 2;
if (num_parsed < 0)
return false;
}
@@ -1727,7 +1744,16 @@ namespace System
if (tzsign == -1) {
if (result != DateTime.MinValue) {
try {
- dto = new DateTimeOffset (result);
+ if (((style & DateTimeStyles.AssumeUniversal) != 0) || useutc) {
+ dto = new DateTimeOffset (result, TimeSpan.Zero);
+ } else if ((style & DateTimeStyles.AssumeLocal) != 0) {
+ var offset = use_invariant ?
+ TimeSpan.Zero :
+ TimeZone.CurrentTimeZone.GetUtcOffset (DateTime.Now);
+ dto = new DateTimeOffset (result, offset);
+ } else {
+ dto = new DateTimeOffset (result);
+ }
} catch { } // We handle this error in DateTimeOffset.Parse
}
} else {
@@ -1794,9 +1820,10 @@ namespace System
throw new FormatException ("Format specifier was invalid.");
DateTime result;
+ DateTimeOffset dto;
bool longYear = false;
Exception e = null;
- if (!ParseExact (s, formats, dfi, style, out result, true, ref longYear, true, ref e))
+ if (!CoreParseExact (s, formats, dfi, style, out result, out dto, true, ref longYear, true, ref e))
throw e;
return result;
}
@@ -1860,21 +1887,25 @@ namespace System
{
try {
DateTimeFormatInfo dfi = DateTimeFormatInfo.GetInstance (provider);
+ DateTimeOffset dto;
bool longYear = false;
Exception e = null;
- return ParseExact (s, formats, dfi, style, out result, true, ref longYear, false, ref e);
+ return CoreParseExact (s, formats, dfi, style, out result, out dto, true, ref longYear, false, ref e);
} catch {
result = MinValue;
return false;
}
}
- private static bool ParseExact (string s, string [] formats,
- DateTimeFormatInfo dfi, DateTimeStyles style, out DateTime ret,
+ internal static bool CoreParseExact (string s, string [] formats,
+ DateTimeFormatInfo dfi, DateTimeStyles style,
+ out DateTime ret, out DateTimeOffset dto,
bool exact, ref bool longYear,
- bool setExceptionOnError, ref Exception exception)
+ bool setExceptionOnError, ref Exception exception,
+ bool dateTimeOffset = false)
{
+ dto = new DateTimeOffset (0, TimeSpan.Zero);
int i;
bool incompleteFormat = false;
for (i = 0; i < formats.Length; i++)
@@ -1884,8 +1915,7 @@ namespace System
if (format == null || format == String.Empty)
break;
- DateTimeOffset dto;
- if (_DoParse (s, formats[i], null, exact, out result, out dto, dfi, style, false, ref incompleteFormat, ref longYear)) {
+ if (_DoParse (s, formats[i], null, exact, out result, out dto, dfi, style, false, ref incompleteFormat, ref longYear, dateTimeOffset)) {
ret = result;
return true;
}
diff --git a/mcs/class/corlib/System/DateTimeOffset.cs b/mcs/class/corlib/System/DateTimeOffset.cs
index d2f45bca927..1267f9270de 100644
--- a/mcs/class/corlib/System/DateTimeOffset.cs
+++ b/mcs/class/corlib/System/DateTimeOffset.cs
@@ -343,370 +343,19 @@ namespace System
if ((styles & DateTimeStyles.AssumeLocal) != 0 && (styles & DateTimeStyles.AssumeUniversal) != 0)
throw new ArgumentException ("styles parameter contains incompatible flags");
+ DateTimeFormatInfo dfi = DateTimeFormatInfo.GetInstance (formatProvider);
+ DateTime d;
DateTimeOffset result;
- if (!ParseExact (input, formats, DateTimeFormatInfo.GetInstance (formatProvider), styles, out result))
- throw new FormatException ("Invalid format string");
-
- return result;
- }
-
- private static bool ParseExact (string input, string [] formats,
- DateTimeFormatInfo dfi, DateTimeStyles styles, out DateTimeOffset ret)
- {
- foreach (string format in formats)
- {
- if (format == null || format == String.Empty)
- throw new FormatException ("Invalid format string");
-
- DateTimeOffset result;
- if (DoParse (input, format, false, out result, dfi, styles)) {
- ret = result;
- return true;
- }
- }
- ret = DateTimeOffset.MinValue;
- return false;
- }
-
- private static bool DoParse (string input,
- string format,
- bool exact,
- out DateTimeOffset result,
- DateTimeFormatInfo dfi,
- DateTimeStyles styles)
- {
- if ((styles & DateTimeStyles.AllowLeadingWhite) != 0) {
- format = format.TrimStart (null);
- input = input.TrimStart (null);
- }
-
- if ((styles & DateTimeStyles.AllowTrailingWhite) != 0) {
- format = format.TrimEnd (null);
- input = input.TrimEnd (null);
- }
-
- bool allow_white_spaces = false;
- if ((styles & DateTimeStyles.AllowInnerWhite) != 0)
- allow_white_spaces = true;
-
- result = DateTimeOffset.MinValue;
-
- bool useutc = false, use_invariants = false;
- if (format.Length == 1) {
- format = DateTimeUtils.GetStandardPattern (format[0], dfi, out useutc, out use_invariants, true);
- if (format == null)
- return false;
- }
-
- int year = -1;
- int month = -1;
- int day = -1;
- int partial_hour = -1; // for 'hh tt' formats
- int hour = -1;
- int minute = -1;
- int second = -1;
- double fraction = -1;
- int temp_int = -1;
- TimeSpan offset = TimeSpan.MinValue;
-
- int fi = 0; //format iterator
- int ii = 0; //input iterator
- while (fi < format.Length) {
- int tokLen;
- char ch = format [fi];
-
- switch (ch) {
- case 'd':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (day != -1 || tokLen > 4)
- return false;
-
- if (tokLen <= 2)
- ii += ParseNumber (input, ii, 2, tokLen == 2, allow_white_spaces, out day);
- else
- ii += ParseEnum (input, ii, tokLen == 3 ? dfi.AbbreviatedDayNames : dfi.DayNames, allow_white_spaces, out temp_int);
- break;
- case 'f':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- ii += ParseNumber (input, ii, tokLen, true, allow_white_spaces, out temp_int);
- if (fraction >= 0 || tokLen > 7 || temp_int == -1)
- return false;
- fraction = (double)temp_int / Math.Pow (10, tokLen);
- break;
- case 'F':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- int digits;
- int read = ParseNumber (input, ii, tokLen, true, allow_white_spaces, out temp_int, out digits);
- if (temp_int == -1)
- ii += ParseNumber (input, ii, digits, true, allow_white_spaces, out temp_int);
- else
- ii += read;
- if (fraction >= 0 || tokLen > 7 || temp_int == -1)
- return false;
- fraction = (double)temp_int / Math.Pow (10, digits);
- break;
- case 'h':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (hour != -1 || tokLen > 2)
- return false;
-
- ii += ParseNumber (input, ii, 2, tokLen == 2, allow_white_spaces, out temp_int);
- if (temp_int == -1)
- return false;
-
- if (partial_hour == -1)
- partial_hour = temp_int;
- else
- hour = partial_hour + temp_int;
- break;
- case 'H':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (hour != -1 || tokLen > 2)
- return false;
-
- ii += ParseNumber (input, ii, 2, tokLen == 2, allow_white_spaces, out hour);
- break;
- case 'm':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (minute != -1 || tokLen > 2)
- return false;
-
- ii += ParseNumber (input, ii, 2, tokLen == 2, allow_white_spaces, out minute);
- break;
- case 'M':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (month != -1 || tokLen > 4)
- return false;
-
- if (tokLen <= 2)
- ii += ParseNumber (input, ii, 2, tokLen == 2, allow_white_spaces, out month);
- else {
- ii += ParseEnum (input, ii, tokLen == 3 ? dfi.AbbreviatedMonthNames : dfi.MonthNames, allow_white_spaces, out month);
- month += 1;
- }
-
- break;
- case 's':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (second != -1 || tokLen > 2)
- return false;
- ii += ParseNumber (input, ii, 2, tokLen == 2, allow_white_spaces, out second);
- break;
- case 't':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (hour != -1 || tokLen > 2)
- return false;
-
- ii += ParseEnum (input, ii,
- tokLen == 1 ? new string[] {new string (dfi.AMDesignator[0], 1), new string (dfi.PMDesignator[0], 0)}
- : new string[] {dfi.AMDesignator, dfi.PMDesignator},
- allow_white_spaces, out temp_int);
- if (temp_int == -1)
- return false;
-
- if (partial_hour == -1)
- partial_hour = temp_int * 12;
- else
- hour = partial_hour + temp_int * 12;
- break;
- case 'y':
- if (year != -1)
- return false;
-
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (tokLen <= 2) {
- ii += ParseNumber (input, ii, 2, tokLen == 2, allow_white_spaces, out year);
- if (year != -1)
- year = dfi.Calendar.ToFourDigitYear (year);
- } else if (tokLen <= 4) { // yyy and yyyy accept up to 5 digits with leading 0
- int digit_parsed;
- ii += ParseNumber (input, ii, 5, false, allow_white_spaces, out year, out digit_parsed);
- if (digit_parsed < tokLen || (digit_parsed > tokLen && (year / Math.Pow (10, digit_parsed - 1) < 1)))
- return false;
- } else
- ii += ParseNumber (input, ii, tokLen, true, allow_white_spaces, out year);
- break;
-
- // The documentation is incorrect, they claim that K is the same as 'zz', but
- // it actually allows the format to contain 4 digits for the offset
- case 'K':
- tokLen = 1;
- int off_h, off_m = 0, sign;
- temp_int = 0;
- ii += ParseEnum (input, ii, new string [] {"-", "+"}, allow_white_spaces, out sign);
- ii += ParseNumber (input, ii, 4, false, false, out off_h);
- if (off_h == -1 || off_m == -1 || sign == -1)
- return false;
-
- if (sign == 0)
- sign = -1;
- offset = new TimeSpan (sign * off_h, sign * off_m, 0);
- break;
-
- case 'z':
- tokLen = DateTimeUtils.CountRepeat (format, fi, ch);
- if (offset != TimeSpan.MinValue || tokLen > 3)
- return false;
-
- off_m = 0;
- temp_int = 0;
- ii += ParseEnum (input, ii, new string [] {"-", "+"}, allow_white_spaces, out sign);
- ii += ParseNumber (input, ii, 2, tokLen != 1, false, out off_h);
- if (tokLen == 3) {
- ii += ParseEnum (input, ii, new string [] {dfi.TimeSeparator}, false, out temp_int);
- ii += ParseNumber (input, ii, 2, true, false, out off_m);
- }
- if (off_h == -1 || off_m == -1 || sign == -1)
- return false;
-
- if (sign == 0)
- sign = -1;
- offset = new TimeSpan (sign * off_h, sign * off_m, 0);
- break;
- case ':':
- tokLen = 1;
- ii += ParseEnum (input, ii, new string [] {dfi.TimeSeparator}, false, out temp_int);
- if (temp_int == -1)
- return false;
- break;
- case '/':
- tokLen = 1;
- ii += ParseEnum (input, ii, new string [] {dfi.DateSeparator}, false, out temp_int);
- if (temp_int == -1)
- return false;
- break;
- case '%':
- tokLen = 1;
- if (fi != 0)
- return false;
- break;
- case ' ':
- tokLen = 1;
- ii += ParseChar (input, ii, ' ', false, out temp_int);
- if (temp_int == -1)
- return false;
- break;
- case '\\':
- tokLen = 2;
- ii += ParseChar (input, ii, format [fi + 1], allow_white_spaces, out temp_int);
- if (temp_int == -1)
- return false;
- break;
- case '\'':
- case '"':
- tokLen = 1;
- while (ii < input.Length) {
- var ftoken = format [fi + tokLen];
- ++tokLen;
- if (ftoken == format [fi]) {
- if (useutc && tokLen == 5 && input [ii - 3] == 'G' && input [ii - 2] == 'M' && input [ii - 1] == 'T') {
- offset = TimeSpan.Zero;
- }
-
- break;
- }
-
- if (ftoken != input [ii++])
- return false;
- }
-
- break;
- default:
- //Console.WriteLine ("un-parsed character: {0}", ch);
- tokLen = 1;
- ii += ParseChar (input, ii, format [fi], allow_white_spaces, out temp_int);
- if (temp_int == -1)
- return false;
- break;
- }
- fi += tokLen;
- }
-
- //Console.WriteLine ("{0}-{1}-{2} {3}:{4} {5}", year, month, day, hour, minute, offset);
- if (offset == TimeSpan.MinValue) {
- if ((styles & DateTimeStyles.AssumeUniversal) != 0) {
- offset = TimeSpan.Zero;
- } else if ((styles & DateTimeStyles.AssumeLocal) != 0) {
- offset = use_invariants ?
- TimeSpan.Zero :
- TimeZone.CurrentTimeZone.GetUtcOffset (DateTime.Now);
- }
- }
-
-
- if (hour < 0) hour = 0;
- if (minute < 0) minute = 0;
- if (second < 0) second = 0;
- if (fraction < 0) fraction = 0;
- if (year > 0 && month > 0 && day > 0) {
- result = new DateTimeOffset (year, month, day, hour, minute, second, 0, offset);
- result = result.AddSeconds (fraction);
- if ((styles & DateTimeStyles.AdjustToUniversal) != 0)
- result = result.ToUniversalTime ();
- return true;
- }
-
- return false;
- }
-
- private static int ParseNumber (string input, int pos, int digits, bool leading_zero, bool allow_leading_white, out int result)
- {
- int digit_parsed;
- return ParseNumber (input, pos, digits, leading_zero, allow_leading_white, out result, out digit_parsed);
- }
-
- private static int ParseNumber (string input, int pos, int digits, bool leading_zero, bool allow_leading_white, out int result, out int digit_parsed)
- {
- int char_parsed = 0;
- digit_parsed = 0;
- result = 0;
- for (; allow_leading_white && pos < input.Length && input[pos] == ' '; pos++)
- char_parsed++;
-
- for (; pos < input.Length && Char.IsDigit (input[pos]) && digits > 0; pos ++, char_parsed++, digit_parsed++, digits --)
- result = 10 * result + (byte) (input[pos] - '0');
-
- if (leading_zero && digits > 0)
- result = -1;
-
- if (digit_parsed == 0)
- result = -1;
-
- return char_parsed;
- }
-
- private static int ParseEnum (string input, int pos, string [] enums, bool allow_leading_white, out int result)
- {
- int char_parsed = 0;
- result = -1;
- for (; allow_leading_white && pos < input.Length && input[pos] == ' '; pos++)
- char_parsed ++;
-
- for (int i = 0; i < enums.Length; i++)
- if (input.Substring(pos).StartsWith (enums [i])) {
- result = i;
- break;
- }
-
- if (result >= 0)
- char_parsed += enums[result].Length;
-
- return char_parsed;
- }
-
- private static int ParseChar (string input, int pos, char c, bool allow_leading_white, out int result)
- {
- int char_parsed = 0;
- result = -1;
- for (; allow_leading_white && pos < input.Length && input[pos] == ' '; pos++, char_parsed++)
- ;
-
- if (pos < input.Length && input[pos] == c){
- result = (int) c;
- char_parsed ++;
+ Exception exception = null;
+ bool longYear = false;
+ try {
+ if (!DateTime.CoreParseExact (input, formats, dfi, styles, out d, out result, true, ref longYear, true, ref exception, true))
+ throw exception;
+ } catch (ArgumentOutOfRangeException ex) {
+ throw new FormatException ("The UTC representation falls outside the 1-9999 year range", ex);
}
- return char_parsed;
+ return result;
}
public TimeSpan Subtract (DateTimeOffset value)
diff --git a/mcs/class/corlib/System/Decimal.cs b/mcs/class/corlib/System/Decimal.cs
index ac564eb2343..54ac8dea8ae 100644
--- a/mcs/class/corlib/System/Decimal.cs
+++ b/mcs/class/corlib/System/Decimal.cs
@@ -574,6 +574,14 @@ namespace System
dec_part = Decimal.Floor(dec_part);
dec_part /= (10000000000000000000000000000M / p);
dec_part = Math.Round (dec_part, mode);
+
+ // ignore trailing zeros
+ while (decimals > 0 && (dec_part % 10) == 0) {
+ decimals--;
+ dec_part /= 10;
+ p /= 10;
+ }
+
dec_part /= p;
decimal result = int_part + dec_part;
diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs
index 507153c421a..8b9ade4dd46 100644
--- a/mcs/class/corlib/System/Delegate.cs
+++ b/mcs/class/corlib/System/Delegate.cs
@@ -5,12 +5,11 @@
// Miguel de Icaza (miguel@ximian.com)
// Daniel Stodden (stodden@in.tum.de)
// Dietmar Maurer (dietmar@ximian.com)
+// Marek Safar (marek.safar@gmail.com)
//
// (C) Ximian, Inc. http://www.ximian.com
-//
-
-//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+// Copyright 2014 Xamarin, Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@ -41,9 +40,11 @@ using System.Runtime.InteropServices;
namespace System
{
/* Contains the rarely used fields of Delegate */
- class DelegateData {
+ sealed class DelegateData
+ {
public Type target_type;
public string method_name;
+ public bool curried_first_arg;
}
[ClassInterface (ClassInterfaceType.AutoDual)]
@@ -230,6 +231,8 @@ namespace System
return null;
bool argsMatch;
+ DelegateData delegate_data = new DelegateData ();
+
if (target != null) {
if (!method.IsStatic) {
argsMatch = arg_type_match_this (target.GetType (), method.DeclaringType, true);
@@ -238,7 +241,9 @@ namespace System
} else {
argsMatch = arg_type_match (target.GetType (), args [0].ParameterType);
for (int i = 1; i < args.Length; i++)
- argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType);
+ argsMatch &= arg_type_match (delargs [i - 1].ParameterType, args [i].ParameterType);
+
+ delegate_data.curried_first_arg = true;
}
} else {
if (!method.IsStatic) {
@@ -259,6 +264,8 @@ namespace System
argsMatch = !(args [0].ParameterType.IsValueType || args [0].ParameterType.IsByRef) && allowClosed;
for (int i = 0; i < delargs.Length; i++)
argsMatch &= arg_type_match (delargs [i].ParameterType, args [i + 1].ParameterType);
+
+ delegate_data.curried_first_arg = true;
} else {
argsMatch = true;
for (int i = 0; i < args.Length; i++)
@@ -276,6 +283,8 @@ namespace System
Delegate d = CreateDelegate_internal (type, target, method, throwOnBindFailure);
if (d != null)
d.original_method_info = method;
+ if (delegate_data != null)
+ d.data = delegate_data;
return d;
}
@@ -398,6 +407,21 @@ namespace System
return DynamicInvokeImpl (args);
}
+ void InitializeDelegateData ()
+ {
+ DelegateData delegate_data = new DelegateData ();
+ if (method_info.IsStatic) {
+ if (m_target != null) {
+ delegate_data.curried_first_arg = true;
+ } else {
+ MethodInfo invoke = GetType ().GetMethod ("Invoke");
+ if (invoke.GetParametersCount () + 1 == method_info.GetParametersCount ())
+ delegate_data.curried_first_arg = true;
+ }
+ }
+ this.data = delegate_data;
+ }
+
protected virtual object DynamicInvokeImpl (object[] args)
{
if (Method == null) {
@@ -408,20 +432,34 @@ namespace System
method_info = m_target.GetType ().GetMethod (data.method_name, mtypes);
}
- if (Method.IsStatic && (args != null ? args.Length : 0) == Method.GetParametersCount () - 1) {
+ var target = m_target;
+ if (this.data == null)
+ InitializeDelegateData ();
+
+ if (Method.IsStatic) {
+ //
// The delegate is bound to m_target
- if (args != null) {
- object[] newArgs = new object [args.Length + 1];
- args.CopyTo (newArgs, 1);
- newArgs [0] = m_target;
- args = newArgs;
- } else {
- args = new object [] { m_target };
+ //
+ if (data.curried_first_arg) {
+ if (args == null) {
+ args = new [] { target };
+ } else {
+ Array.Resize (ref args, args.Length + 1);
+ Array.Copy (args, 0, args, 1, args.Length - 1);
+ args [0] = target;
+ }
+
+ target = null;
+ }
+ } else {
+ if (m_target == null && args != null && args.Length > 0) {
+ target = args [0];
+ Array.Copy (args, 1, args, 0, args.Length - 1);
+ Array.Resize (ref args, args.Length - 1);
}
- return Method.Invoke (null, args);
}
- return Method.Invoke (m_target, args);
+ return Method.Invoke (target, args);
}
public virtual object Clone ()
@@ -440,8 +478,13 @@ namespace System
/* Uncommon case */
if (d.data != null && data != null)
return (d.data.target_type == data.target_type && d.data.method_name == data.method_name);
- else
+ else {
+ if (d.data != null)
+ return d.data.target_type == null;
+ if (data != null)
+ return data.target_type == null;
return false;
+ }
}
return true;
}
diff --git a/mcs/class/corlib/System/DelegateSerializationHolder.cs b/mcs/class/corlib/System/DelegateSerializationHolder.cs
index c36dbc7de7c..74d704422d2 100644
--- a/mcs/class/corlib/System/DelegateSerializationHolder.cs
+++ b/mcs/class/corlib/System/DelegateSerializationHolder.cs
@@ -46,7 +46,7 @@ namespace System
{
string type;
string assembly;
- public object target;
+ object target;
string targetTypeAssembly;
string targetTypeName;
string methodName;
@@ -64,15 +64,18 @@ namespace System
methodName = del.Method.Name;
}
- public Delegate DeserializeDelegate (SerializationInfo info)
+ public Delegate DeserializeDelegate (SerializationInfo info, int index)
{
object realTarget = null;
if (target != null)
realTarget = info.GetValue (target.ToString(), typeof(object));
+ var key = "method" + index;
+ var method = info.HasKey (key) ? (MethodInfo)info.GetValue (key, typeof (MethodInfo)) : null;
+
Assembly dasm = Assembly.Load (assembly);
Type dt = dasm.GetType (type);
- Delegate del;
+
if (realTarget != null) {
#if !DISABLE_REMOTING
if (RemotingServices.IsTransparentProxy (realTarget)) {
@@ -86,15 +89,16 @@ namespace System
throw new RemotingException ("Unexpected proxy type.");
}
#endif
- del = Delegate.CreateDelegate (dt, realTarget, methodName);
- }
- else {
- Assembly tasm = Assembly.Load (targetTypeAssembly);
- Type tt = tasm.GetType (targetTypeName);
- del = Delegate.CreateDelegate (dt, tt, methodName);
+ return method == null ?
+ Delegate.CreateDelegate (dt, realTarget, methodName) :
+ Delegate.CreateDelegate (dt, realTarget, method);
}
- return del;
+ if (method != null)
+ return Delegate.CreateDelegate (dt, realTarget, method);
+
+ Type tt2 = Assembly.Load (targetTypeAssembly).GetType (targetTypeName);
+ return Delegate.CreateDelegate (dt, tt2, methodName);
}
}
@@ -112,14 +116,14 @@ namespace System
// Deserializes and combines the delegates
if (count == 1)
- _delegate = entryChain.DeserializeDelegate (info);
+ _delegate = entryChain.DeserializeDelegate (info, 0);
else
{
Delegate[] delegates = new Delegate[count];
entry = entryChain;
for (int n=0; n<count; n++)
{
- delegates[n] = entry.DeserializeDelegate (info);
+ delegates[n] = entry.DeserializeDelegate (info, n);
entry = entry.delegateEntry;
}
_delegate = Delegate.Combine (delegates);
@@ -145,6 +149,8 @@ namespace System
lastEntry = entry;
if (del.Target != null)
info.AddValue (targetLabel, del.Target);
+
+ info.AddValue ("method" + n, del.Method);
}
info.SetType (typeof (DelegateSerializationHolder));
}
diff --git a/mcs/class/corlib/System/NumberFormatter.cs b/mcs/class/corlib/System/NumberFormatter.cs
index c3016efc17b..4d3b0e9ccad 100644
--- a/mcs/class/corlib/System/NumberFormatter.cs
+++ b/mcs/class/corlib/System/NumberFormatter.cs
@@ -28,12 +28,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// NumberFormatter is shared with Grasshopper and hence the #if TARGET_JVM for
-// marking the use of unsafe code that is not supported in Grasshopper.
-#if !TARGET_JVM
-#define UNSAFE_TABLES
-#endif
-
using System.Globalization;
using System.Text;
using System.Threading;
@@ -72,7 +66,6 @@ namespace System
const double MinRoundtripVal = -1.79769313486231E+308;
const double MaxRoundtripVal = 1.79769313486231E+308;
-#if UNSAFE_TABLES
// The below arrays are taken from mono/metatdata/number-formatter.h
private static readonly unsafe ulong* MantissaBitsTable;
@@ -96,9 +89,7 @@ namespace System
out DigitLowerTable, out DigitUpperTable, out TenPowersList, out DecHexDigits);
}
- unsafe
-#endif
- static long GetTenPowerOf(int i)
+ unsafe static long GetTenPowerOf(int i)
{
return TenPowersList [i];
}
@@ -212,10 +203,7 @@ namespace System
// Helper to translate an int in the range 0 .. 9999 to its
// Hexadecimal digits representation.
-#if UNSAFE_TABLES
- unsafe
-#endif
- private static uint FastToDecHex (int val)
+ unsafe private static uint FastToDecHex (int val)
{
if (val < 100)
return (uint)DecHexDigits [val];
@@ -440,10 +428,7 @@ namespace System
_decPointPos = _digitsLen = DecHexLen ();
}
-#if UNSAFE_TABLES // No unsafe code under TARGET_JVM
- unsafe
-#endif
- private void Init (string format, double value, int defPrecision)
+ unsafe private void Init (string format, double value, int defPrecision)
{
Init (format);
@@ -1236,17 +1221,11 @@ namespace System
return new string (_cbuf, 0, _ind);
}
-#if UNSAFE_TABLES // No unsafe code under TARGET_JVM
- unsafe
-#endif
- private string FormatHexadecimal (int precision)
+ unsafe private string FormatHexadecimal (int precision)
{
int size = Math.Max (precision, _decPointPos);
-#if UNSAFE_TABLES
char* digits = _specifierIsUpper ? DigitUpperTable : DigitLowerTable;
-#else
- char[] digits = _specifierIsUpper ? DigitUpperTable : DigitLowerTable;
-#endif
+
ResetCharBuf (size);
_ind = size;
ulong val = _val1 | ((ulong)_val2 << 32);
@@ -1769,10 +1748,7 @@ namespace System
_cbuf [_ind++] = (char)('0' | v & 0xf);
}
-#if UNSAFE_TABLES // No unsafe code under TARGET_JVM
- unsafe
-#endif
- private void FastAppendDigits (int val, bool force)
+ unsafe private void FastAppendDigits (int val, bool force)
{
int i = _ind;
int digits;
diff --git a/mcs/class/corlib/System/NumberFormatter.jvm.cs b/mcs/class/corlib/System/NumberFormatter.jvm.cs
deleted file mode 100644
index 238b11143d9..00000000000
--- a/mcs/class/corlib/System/NumberFormatter.jvm.cs
+++ /dev/null
@@ -1,1020 +0,0 @@
-//
-// System.NumberFormatter.cs
-//
-// Author:
-// Eyal Alaluf (eyala@mainsoft.com)
-//
-// Copyright (C) 2008 Mainsoft Co. (http://www.mainsoft.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// 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 !TARGET_JVM
-#define UNSAFE_TABLES
-#endif
-
-namespace System
-{
-#if !UNSAFE_TABLES
- partial class NumberFormatter
- {
- static internal readonly char[] DigitLowerTable = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
- static internal readonly char[] DigitUpperTable = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
-
- private static readonly long[] TenPowersList = new long[] {
- 1,
- 10,
- 100,
- 1000,
- 10000,
- 100000,
- 1000000,
- 10000000,
- 100000000,
- 1000000000,
- 10000000000,
- 100000000000,
- 1000000000000,
- 10000000000000,
- 100000000000000,
- 1000000000000000,
- 10000000000000000,
- 100000000000000000,
- 1000000000000000000
- };
-
- // DecHexDigits s a translation table from a decimal number to its
- // digits hexadecimal representation (e.g. DecHexDigits [34] = 0x34).
- static readonly int[] DecHexDigits = {
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19,
- 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29,
- 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
- 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
- 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
- 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
- 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79,
- 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89,
- 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99};
-
- static readonly ulong[] MantissaBitsTable = {
- 4556951262222748432, 9113902524445496865, 1822780504889099373,
- 3645561009778198746, 7291122019556397492, 14582244039112794984,
- 2916448807822558996, 5832897615645117993, 11665795231290235987,
- 2333159046258047197, 4666318092516094394, 9332636185032188789,
- 1866527237006437757, 3733054474012875515, 7466108948025751031,
- 14932217896051502063, 2986443579210300412, 5972887158420600825,
- 11945774316841201651, 2389154863368240330, 4778309726736480660,
- 9556619453472961320, 1911323890694592264, 3822647781389184528,
- 7645295562778369056, 15290591125556738113, 3058118225111347622,
- 6116236450222695245, 12232472900445390490, 2446494580089078098,
- 4892989160178156196, 9785978320356312392, 1957195664071262478,
- 3914391328142524957, 7828782656285049914, 15657565312570099828,
- 3131513062514019965, 6263026125028039931, 12526052250056079862,
- 2505210450011215972, 5010420900022431944, 10020841800044863889,
- 2004168360008972777, 4008336720017945555, 8016673440035891111,
- 16033346880071782223, 3206669376014356444, 6413338752028712889,
- 12826677504057425779, 2565335500811485155, 5130671001622970311,
- 10261342003245940623, 2052268400649188124, 4104536801298376249,
- 8209073602596752498, 16418147205193504997, 3283629441038700999,
- 6567258882077401998, 13134517764154803997, 2626903552830960799,
- 5253807105661921599, 10507614211323843198, 2101522842264768639,
- 4203045684529537279, 8406091369059074558, 16812182738118149117,
- 3362436547623629823, 6724873095247259646, 13449746190494519293,
- 2689949238098903858, 5379898476197807717, 10759796952395615435,
- 2151959390479123087, 4303918780958246174, 8607837561916492348,
- 17215675123832984696, 3443135024766596939, 6886270049533193878,
- 13772540099066387756, 2754508019813277551, 5509016039626555102,
- 11018032079253110205, 2203606415850622041, 4407212831701244082,
- 8814425663402488164, 17628851326804976328, 3525770265360995265,
- 7051540530721990531, 14103081061443981063, 2820616212288796212,
- 5641232424577592425, 11282464849155184850, 2256492969831036970,
- 4512985939662073940, 9025971879324147880, 18051943758648295760,
- 3610388751729659152, 7220777503459318304, 14441555006918636608,
- 2888311001383727321, 5776622002767454643, 11553244005534909286,
- 2310648801106981857, 4621297602213963714, 9242595204427927429,
- 1848519040885585485, 3697038081771170971, 7394076163542341943,
- 14788152327084683887, 2957630465416936777, 5915260930833873554,
- 11830521861667747109, 2366104372333549421, 4732208744667098843,
- 9464417489334197687, 1892883497866839537, 3785766995733679075,
- 7571533991467358150, 15143067982934716300, 3028613596586943260,
- 6057227193173886520, 12114454386347773040, 2422890877269554608,
- 4845781754539109216, 9691563509078218432, 1938312701815643686,
- 3876625403631287372, 7753250807262574745, 15506501614525149491,
- 3101300322905029898, 6202600645810059796, 12405201291620119593,
- 2481040258324023918, 4962080516648047837, 9924161033296095674,
- 1984832206659219134, 3969664413318438269, 7939328826636876539,
- 15878657653273753079, 3175731530654750615, 6351463061309501231,
- 12702926122619002463, 2540585224523800492, 5081170449047600985,
- 10162340898095201970, 2032468179619040394, 4064936359238080788,
- 8129872718476161576, 16259745436952323153, 3251949087390464630,
- 6503898174780929261, 13007796349561858522, 2601559269912371704,
- 5203118539824743409, 10406237079649486818, 2081247415929897363,
- 4162494831859794727, 8324989663719589454, 16649979327439178909,
- 3329995865487835781, 6659991730975671563, 13319983461951343127,
- 2663996692390268625, 5327993384780537250, 10655986769561074501,
- 2131197353912214900, 4262394707824429800, 8524789415648859601,
- 17049578831297719202, 3409915766259543840, 6819831532519087681,
- 13639663065038175362, 2727932613007635072, 5455865226015270144,
- 10911730452030540289, 2182346090406108057, 4364692180812216115,
- 8729384361624432231, 17458768723248864463, 3491753744649772892,
- 6983507489299545785, 13967014978599091570, 2793402995719818314,
- 5586805991439636628, 11173611982879273256, 2234722396575854651,
- 4469444793151709302, 8938889586303418605, 17877779172606837210,
- 3575555834521367442, 7151111669042734884, 14302223338085469768,
- 2860444667617093953, 5720889335234187907, 11441778670468375814,
- 2288355734093675162, 4576711468187350325, 9153422936374700651,
- 1830684587274940130, 3661369174549880260, 7322738349099760521,
- 14645476698199521043, 2929095339639904208, 5858190679279808417,
- 11716381358559616834, 2343276271711923366, 4686552543423846733,
- 9373105086847693467, 1874621017369538693, 3749242034739077387,
- 7498484069478154774, 14996968138956309548, 2999393627791261909,
- 5998787255582523819, 11997574511165047638, 2399514902233009527,
- 4799029804466019055, 9598059608932038110, 1919611921786407622,
- 3839223843572815244, 7678447687145630488, 15356895374291260977,
- 3071379074858252195, 6142758149716504390, 12285516299433008781,
- 2457103259886601756, 4914206519773203512, 9828413039546407025,
- 1965682607909281405, 3931365215818562810, 7862730431637125620,
- 15725460863274251240, 3145092172654850248, 6290184345309700496,
- 12580368690619400992, 2516073738123880198, 5032147476247760397,
- 10064294952495520794, 2012858990499104158, 4025717980998208317,
- 8051435961996416635, 16102871923992833270, 3220574384798566654,
- 6441148769597133308, 12882297539194266616, 2576459507838853323,
- 5152919015677706646, 10305838031355413293, 2061167606271082658,
- 4122335212542165317, 8244670425084330634, 16489340850168661269,
- 3297868170033732253, 6595736340067464507, 13191472680134929015,
- 2638294536026985803, 5276589072053971606, 10553178144107943212,
- 2110635628821588642, 4221271257643177284, 8442542515286354569,
- 16885085030572709139, 3377017006114541827, 6754034012229083655,
- 13508068024458167311, 2701613604891633462, 5403227209783266924,
- 10806454419566533849, 2161290883913306769, 4322581767826613539,
- 8645163535653227079, 17290327071306454158, 3458065414261290831,
- 6916130828522581663, 13832261657045163327, 2766452331409032665,
- 5532904662818065330, 11065809325636130661, 2213161865127226132,
- 4426323730254452264, 8852647460508904529, 17705294921017809058,
- 3541058984203561811, 7082117968407123623, 14164235936814247246,
- 2832847187362849449, 5665694374725698898, 11331388749451397797,
- 2266277749890279559, 4532555499780559119, 9065110999561118238,
- 1813022199912223647, 3626044399824447295, 7252088799648894590,
- 14504177599297789180, 2900835519859557836, 5801671039719115672,
- 11603342079438231344, 2320668415887646268, 4641336831775292537,
- 9282673663550585075, 1856534732710117015, 3713069465420234030,
- 7426138930840468060, 14852277861680936121, 2970455572336187224,
- 5940911144672374448, 11881822289344748896, 2376364457868949779,
- 4752728915737899558, 9505457831475799117, 1901091566295159823,
- 3802183132590319647, 7604366265180639294, 15208732530361278588,
- 3041746506072255717, 6083493012144511435, 12166986024289022870,
- 2433397204857804574, 4866794409715609148, 9733588819431218296,
- 1946717763886243659, 3893435527772487318, 7786871055544974637,
- 15573742111089949274, 3114748422217989854, 6229496844435979709,
- 12458993688871959419, 2491798737774391883, 4983597475548783767,
- 9967194951097567535, 1993438990219513507, 3986877980439027014,
- 7973755960878054028, 15947511921756108056, 3189502384351221611,
- 6379004768702443222, 12758009537404886445, 2551601907480977289,
- 5103203814961954578, 10206407629923909156, 2041281525984781831,
- 4082563051969563662, 8165126103939127325, 16330252207878254650,
- 3266050441575650930, 6532100883151301860, 13064201766302603720,
- 2612840353260520744, 5225680706521041488, 10451361413042082976,
- 2090272282608416595, 4180544565216833190, 8361089130433666380,
- 16722178260867332761, 3344435652173466552, 6688871304346933104,
- 13377742608693866209, 2675548521738773241, 5351097043477546483,
- 10702194086955092967, 2140438817391018593, 4280877634782037187,
- 8561755269564074374, 17123510539128148748, 3424702107825629749,
- 6849404215651259499, 13698808431302518998, 2739761686260503799,
- 5479523372521007599, 10959046745042015198, 2191809349008403039,
- 4383618698016806079, 8767237396033612159, 17534474792067224318,
- 3506894958413444863, 7013789916826889727, 14027579833653779454,
- 2805515966730755890, 5611031933461511781, 11222063866923023563,
- 2244412773384604712, 4488825546769209425, 8977651093538418850,
- 17955302187076837701, 3591060437415367540, 7182120874830735080,
- 14364241749661470161, 2872848349932294032, 5745696699864588064,
- 11491393399729176129, 2298278679945835225, 4596557359891670451,
- 9193114719783340903, 1838622943956668180, 3677245887913336361,
- 7354491775826672722, 14708983551653345445, 2941796710330669089,
- 5883593420661338178, 11767186841322676356, 2353437368264535271,
- 4706874736529070542, 9413749473058141084, 1882749894611628216,
- 3765499789223256433, 7530999578446512867, 15061999156893025735,
- 3012399831378605147, 6024799662757210294, 12049599325514420588,
- 2409919865102884117, 4819839730205768235, 9639679460411536470,
- 1927935892082307294, 3855871784164614588, 7711743568329229176,
- 15423487136658458353, 3084697427331691670, 6169394854663383341,
- 12338789709326766682, 2467757941865353336, 4935515883730706673,
- 9871031767461413346, 1974206353492282669, 3948412706984565338,
- 7896825413969130677, 15793650827938261354, 3158730165587652270,
- 6317460331175304541, 12634920662350609083, 2526984132470121816,
- 5053968264940243633, 10107936529880487266, 2021587305976097453,
- 4043174611952194906, 8086349223904389813, 16172698447808779626,
- 3234539689561755925, 6469079379123511850, 12938158758247023701,
- 2587631751649404740, 5175263503298809480, 10350527006597618960,
- 2070105401319523792, 4140210802639047584, 8280421605278095168,
- 16560843210556190337, 3312168642111238067, 6624337284222476135,
- 13248674568444952270, 2649734913688990454, 5299469827377980908,
- 10598939654755961816, 2119787930951192363, 4239575861902384726,
- 8479151723804769452, 16958303447609538905, 3391660689521907781,
- 6783321379043815562, 13566642758087631124, 2713328551617526224,
- 5426657103235052449, 10853314206470104899, 2170662841294020979,
- 4341325682588041959, 8682651365176083919, 17365302730352167839,
- 3473060546070433567, 6946121092140867135, 13892242184281734271,
- 2778448436856346854, 5556896873712693708, 11113793747425387417,
- 2222758749485077483, 4445517498970154966, 8891034997940309933,
- 17782069995880619867, 3556413999176123973, 7112827998352247947,
- 14225655996704495894, 2845131199340899178, 5690262398681798357,
- 11380524797363596715, 2276104959472719343, 4552209918945438686,
- 9104419837890877372, 1820883967578175474, 3641767935156350948,
- 7283535870312701897, 14567071740625403795, 2913414348125080759,
- 5826828696250161518, 11653657392500323036, 2330731478500064607,
- 4661462957000129214, 9322925914000258429, 1864585182800051685,
- 3729170365600103371, 7458340731200206743, 14916681462400413486,
- 2983336292480082697, 5966672584960165394, 11933345169920330789,
- 2386669033984066157, 4773338067968132315, 9546676135936264631,
- 1909335227187252926, 3818670454374505852, 7637340908749011705,
- 15274681817498023410, 3054936363499604682, 6109872726999209364,
- 12219745453998418728, 2443949090799683745, 4887898181599367491,
- 9775796363198734982, 1955159272639746996, 3910318545279493993,
- 7820637090558987986, 15641274181117975972, 3128254836223595194,
- 6256509672447190388, 12513019344894380777, 2502603868978876155,
- 5005207737957752311, 10010415475915504622, 2002083095183100924,
- 4004166190366201848, 8008332380732403697, 16016664761464807395,
- 3203332952292961479, 6406665904585922958, 12813331809171845916,
- 2562666361834369183, 5125332723668738366, 10250665447337476733,
- 2050133089467495346, 4100266178934990693, 8200532357869981386,
- 16401064715739962772, 3280212943147992554, 6560425886295985109,
- 13120851772591970218, 2624170354518394043, 5248340709036788087,
- 10496681418073576174, 2099336283614715234, 4198672567229430469,
- 8397345134458860939, 16794690268917721879, 3358938053783544375,
- 6717876107567088751, 13435752215134177503, 2687150443026835500,
- 5374300886053671001, 10748601772107342002, 2149720354421468400,
- 4299440708842936801, 8598881417685873602, 17197762835371747204,
- 3439552567074349440, 6879105134148698881, 13758210268297397763,
- 2751642053659479552, 5503284107318959105, 11006568214637918210,
- 2201313642927583642, 4402627285855167284, 8805254571710334568,
- 17610509143420669137, 3522101828684133827, 7044203657368267654,
- 14088407314736535309, 2817681462947307061, 5635362925894614123,
- 11270725851789228247, 2254145170357845649, 4508290340715691299,
- 9016580681431382598, 18033161362862765196, 3606632272572553039,
- 7213264545145106078, 14426529090290212157, 2885305818058042431,
- 5770611636116084862, 11541223272232169725, 2308244654446433945,
- 4616489308892867890, 9232978617785735780, 1846595723557147156,
- 3693191447114294312, 7386382894228588624, 14772765788457177249,
- 2954553157691435449, 5909106315382870899, 11818212630765741799,
- 2363642526153148359, 4727285052306296719, 9454570104612593439,
- 1890914020922518687, 3781828041845037375, 7563656083690074751,
- 15127312167380149503, 3025462433476029900, 6050924866952059801,
- 12101849733904119602, 2420369946780823920, 4840739893561647841,
- 9681479787123295682, 1936295957424659136, 3872591914849318272,
- 7745183829698636545, 15490367659397273091, 3098073531879454618,
- 6196147063758909236, 12392294127517818473, 2478458825503563694,
- 4956917651007127389, 9913835302014254778, 1982767060402850955,
- 3965534120805701911, 7931068241611403822, 15862136483222807645,
- 3172427296644561529, 6344854593289123058, 12689709186578246116,
- 2537941837315649223, 5075883674631298446, 10151767349262596893,
- 2030353469852519378, 4060706939705038757, 8121413879410077514,
- 16242827758820155028, 3248565551764031005, 6497131103528062011,
- 12994262207056124023, 2598852441411224804, 5197704882822449609,
- 10395409765644899218, 2079081953128979843, 4158163906257959687,
- 8316327812515919374, 16632655625031838749, 3326531125006367749,
- 6653062250012735499, 13306124500025470999, 2661224900005094199,
- 5322449800010188399, 10644899600020376799, 2128979920004075359,
- 4257959840008150719, 8515919680016301439, 17031839360032602879,
- 3406367872006520575, 6812735744013041151, 13625471488026082303,
- 2725094297605216460, 5450188595210432921, 10900377190420865842,
- 2180075438084173168, 4360150876168346337, 8720301752336692674,
- 17440603504673385348, 3488120700934677069, 6976241401869354139,
- 13952482803738708279, 2790496560747741655, 5580993121495483311,
- 11161986242990966623, 2232397248598193324, 4464794497196386649,
- 8929588994392773298, 17859177988785546597, 3571835597757109319,
- 7143671195514218638, 14287342391028437277, 2857468478205687455,
- 5714936956411374911, 11429873912822749822, 2285974782564549964,
- 4571949565129099928, 9143899130258199857, 1828779826051639971,
- 3657559652103279943, 7315119304206559886, 14630238608413119772,
- 2926047721682623954, 5852095443365247908, 11704190886730495817,
- 2340838177346099163, 4681676354692198327, 9363352709384396654,
- 1872670541876879330, 3745341083753758661, 7490682167507517323,
- 14981364335015034646, 2996272867003006929, 5992545734006013858,
- 11985091468012027717, 2397018293602405543, 4794036587204811087,
- 9588073174409622174, 1917614634881924434, 3835229269763848869,
- 7670458539527697739, 15340917079055395478, 3068183415811079095,
- 6136366831622158191, 12272733663244316382, 2454546732648863276,
- 4909093465297726553, 9818186930595453106, 1963637386119090621,
- 3927274772238181242, 7854549544476362484, 15709099088952724969,
- 3141819817790544993, 6283639635581089987, 12567279271162179975,
- 2513455854232435995, 5026911708464871990, 10053823416929743980,
- 2010764683385948796, 4021529366771897592, 8043058733543795184,
- 16086117467087590369, 3217223493417518073, 6434446986835036147,
- 12868893973670072295, 2573778794734014459, 5147557589468028918,
- 10295115178936057836, 2059023035787211567, 4118046071574423134,
- 8236092143148846269, 16472184286297692538, 3294436857259538507,
- 6588873714519077015, 13177747429038154030, 2635549485807630806,
- 5271098971615261612, 10542197943230523224, 2108439588646104644,
- 4216879177292209289, 8433758354584418579, 16867516709168837158,
- 3373503341833767431, 6747006683667534863, 13494013367335069727,
- 2698802673467013945, 5397605346934027890, 10795210693868055781,
- 2159042138773611156, 4318084277547222312, 8636168555094444625,
- 17272337110188889250, 3454467422037777850, 6908934844075555700,
- 13817869688151111400, 2763573937630222280, 5527147875260444560,
- 11054295750520889120, 2210859150104177824, 4421718300208355648,
- 8843436600416711296, 17686873200833422592, 3537374640166684518,
- 7074749280333369037, 14149498560666738074, 2829899712133347614,
- 5659799424266695229, 11319598848533390459, 2263919769706678091,
- 4527839539413356183, 9055679078826712367, 1811135815765342473,
- 3622271631530684947, 7244543263061369894, 14489086526122739788,
- 2897817305224547957, 5795634610449095915, 11591269220898191830,
- 2318253844179638366, 4636507688359276732, 9273015376718553464,
- 1854603075343710692, 3709206150687421385, 7418412301374842771,
- 14836824602749685542, 2967364920549937108, 5934729841099874217,
- 11869459682199748434, 2373891936439949686, 4747783872879899373,
- 9495567745759798747, 1899113549151959749, 3798227098303919498,
- 7596454196607838997, 15192908393215677995, 3038581678643135599,
- 6077163357286271198, 12154326714572542396, 2430865342914508479,
- 4861730685829016958, 9723461371658033917, 1944692274331606783,
- 3889384548663213566, 7778769097326427133, 15557538194652854267,
- 3111507638930570853, 6223015277861141707, 12446030555722283414,
- 2489206111144456682, 4978412222288913365, 9956824444577826731,
- 1991364888915565346, 3982729777831130692, 7965459555662261385,
- 15930919111324522770, 3186183822264904554, 6372367644529809108,
- 12744735289059618216, 2548947057811923643, 5097894115623847286,
- 10195788231247694572, 2039157646249538914, 4078315292499077829,
- 8156630584998155658, 16313261169996311316, 3262652233999262263,
- 6525304467998524526, 13050608935997049053, 2610121787199409810,
- 5220243574398819621, 10440487148797639242, 2088097429759527848,
- 4176194859519055697, 8352389719038111394, 16704779438076222788,
- 3340955887615244557, 6681911775230489115, 13363823550460978230,
- 2672764710092195646, 5345529420184391292, 10691058840368782584,
- 2138211768073756516, 4276423536147513033, 8552847072295026067,
- 17105694144590052135, 3421138828918010427, 6842277657836020854,
- 13684555315672041708, 2736911063134408341, 5473822126268816683,
- 10947644252537633366, 2189528850507526673, 4379057701015053346,
- 8758115402030106693, 17516230804060213386, 3503246160812042677,
- 7006492321624085354, 14012984643248170709, 2802596928649634141,
- 5605193857299268283, 11210387714598536567, 2242077542919707313,
- 4484155085839414626, 8968310171678829253, 17936620343357658507,
- 3587324068671531701, 7174648137343063403, 14349296274686126806,
- 2869859254937225361, 5739718509874450722, 11479437019748901445,
- 2295887403949780289, 4591774807899560578, 9183549615799121156,
- 1836709923159824231, 3673419846319648462, 7346839692639296924,
- 14693679385278593849, 2938735877055718769, 5877471754111437539,
- 11754943508222875079, 2350988701644575015, 4701977403289150031,
- 9403954806578300063, 1880790961315660012, 3761581922631320025,
- 7523163845262640050, 15046327690525280101, 3009265538105056020,
- 6018531076210112040, 12037062152420224081, 2407412430484044816,
- 4814824860968089632, 9629649721936179265, 1925929944387235853,
- 3851859888774471706, 7703719777548943412, 15407439555097886824,
- 3081487911019577364, 6162975822039154729, 12325951644078309459,
- 2465190328815661891, 4930380657631323783, 9860761315262647567,
- 1972152263052529513, 3944304526105059027, 7888609052210118054,
- 15777218104420236108, 3155443620884047221, 6310887241768094443,
- 12621774483536188886, 2524354896707237777, 5048709793414475554,
- 10097419586828951109, 2019483917365790221, 4038967834731580443,
- 8077935669463160887, 16155871338926321774, 3231174267785264354,
- 6462348535570528709, 12924697071141057419, 2584939414228211483,
- 5169878828456422967, 10339757656912845935, 2067951531382569187,
- 4135903062765138374, 8271806125530276748, 16543612251060553497,
- 3308722450212110699, 6617444900424221398, 13234889800848442797,
- 2646977960169688559, 5293955920339377119, 10587911840678754238,
- 2117582368135750847, 4235164736271501695, 8470329472543003390,
- 16940658945086006781, 3388131789017201356, 6776263578034402712,
- 13552527156068805425, 2710505431213761085, 5421010862427522170,
- 10842021724855044340, 2168404344971008868, 4336808689942017736,
- 8673617379884035472, 17347234759768070944, 3469446951953614188,
- 6938893903907228377, 13877787807814456755, 2775557561562891351,
- 5551115123125782702, 11102230246251565404, 2220446049250313080,
- 4440892098500626161, 8881784197001252323, 17763568394002504646,
- 3552713678800500929, 7105427357601001858, 14210854715202003717,
- 2842170943040400743, 5684341886080801486, 11368683772161602973,
- 2273736754432320594, 4547473508864641189, 9094947017729282379,
- 1818989403545856475, 3637978807091712951, 7275957614183425903,
- 14551915228366851806, 2910383045673370361, 5820766091346740722,
- 11641532182693481445, 2328306436538696289, 4656612873077392578,
- 9313225746154785156, 1862645149230957031, 3725290298461914062,
- 7450580596923828125, 14901161193847656250, 2980232238769531250,
- 5960464477539062500, 11920928955078125000, 2384185791015625000,
- 4768371582031250000, 9536743164062500000, 1907348632812500000,
- 3814697265625000000, 7629394531250000000, 15258789062500000000,
- 3051757812500000000, 6103515625000000000, 12207031250000000000,
- 2441406250000000000, 4882812500000000000, 9765625000000000000,
- 1953125000000000000, 3906250000000000000, 7812500000000000000,
- 15625000000000000000, 3125000000000000000, 6250000000000000000,
- 12500000000000000000, 2500000000000000000, 5000000000000000000,
- 10000000000000000000, 2000000000000000000, 4000000000000000000,
- 8000000000000000000, 16000000000000000000, 3200000000000000000,
- 6400000000000000000, 12800000000000000000, 2560000000000000000,
- 5120000000000000000, 10240000000000000000, 2048000000000000000,
- 4096000000000000000, 8192000000000000000, 16384000000000000000,
- 3276800000000000000, 6553600000000000000, 13107200000000000000,
- 2621440000000000000, 5242880000000000000, 10485760000000000000,
- 2097152000000000000, 4194304000000000000, 8388608000000000000,
- 16777216000000000000, 3355443200000000000, 6710886400000000000,
- 13421772800000000000, 2684354560000000000, 5368709120000000000,
- 10737418240000000000, 2147483648000000000, 4294967296000000000,
- 8589934592000000000, 17179869184000000000, 3435973836800000000,
- 6871947673600000000, 13743895347200000000, 2748779069440000000,
- 5497558138880000000, 10995116277760000000, 2199023255552000000,
- 4398046511104000000, 8796093022208000000, 17592186044416000000,
- 3518437208883200000, 7036874417766400000, 14073748835532800000,
- 2814749767106560000, 5629499534213120000, 11258999068426240000,
- 2251799813685248000, 4503599627370496000, 9007199254740992000,
- 18014398509481984000, 3602879701896396800, 7205759403792793600,
- 14411518807585587200, 2882303761517117440, 5764607523034234880,
- 11529215046068469760, 2305843009213693952, 4611686018427387904,
- 9223372036854775808, 1844674407370955161, 3689348814741910323,
- 7378697629483820646, 14757395258967641292, 2951479051793528258,
- 5902958103587056517, 11805916207174113034, 2361183241434822606,
- 4722366482869645213, 9444732965739290427, 1888946593147858085,
- 3777893186295716170, 7555786372591432341, 15111572745182864683,
- 3022314549036572936, 6044629098073145873, 12089258196146291747,
- 2417851639229258349, 4835703278458516698, 9671406556917033397,
- 1934281311383406679, 3868562622766813359, 7737125245533626718,
- 15474250491067253436, 3094850098213450687, 6189700196426901374,
- 12379400392853802748, 2475880078570760549, 4951760157141521099,
- 9903520314283042199, 1980704062856608439, 3961408125713216879,
- 7922816251426433759, 15845632502852867518, 3169126500570573503,
- 6338253001141147007, 12676506002282294014, 2535301200456458802,
- 5070602400912917605, 10141204801825835211, 2028240960365167042,
- 4056481920730334084, 8112963841460668169, 16225927682921336339,
- 3245185536584267267, 6490371073168534535, 12980742146337069071,
- 2596148429267413814, 5192296858534827628, 10384593717069655257,
- 2076918743413931051, 4153837486827862102, 8307674973655724205,
- 16615349947311448411, 3323069989462289682, 6646139978924579364,
- 13292279957849158729, 2658455991569831745, 5316911983139663491,
- 10633823966279326983, 2126764793255865396, 4253529586511730793,
- 8507059173023461586, 17014118346046923173, 3402823669209384634,
- 6805647338418769269, 13611294676837538538, 2722258935367507707,
- 5444517870735015415, 10889035741470030830, 2177807148294006166,
- 4355614296588012332, 8711228593176024664, 17422457186352049329,
- 3484491437270409865, 6968982874540819731, 13937965749081639463,
- 2787593149816327892, 5575186299632655785, 11150372599265311570,
- 2230074519853062314, 4460149039706124628, 8920298079412249256,
- 17840596158824498513, 3568119231764899702, 7136238463529799405,
- 14272476927059598810, 2854495385411919762, 5708990770823839524,
- 11417981541647679048, 2283596308329535809, 4567192616659071619,
- 9134385233318143238, 1826877046663628647, 3653754093327257295,
- 7307508186654514591, 14615016373309029182, 2923003274661805836,
- 5846006549323611672, 11692013098647223345, 2338402619729444669,
- 4676805239458889338, 9353610478917778676, 1870722095783555735,
- 3741444191567111470, 7482888383134222941, 14965776766268445882,
- 2993155353253689176, 5986310706507378352, 11972621413014756705,
- 2394524282602951341, 4789048565205902682, 9578097130411805364,
- 1915619426082361072, 3831238852164722145, 7662477704329444291,
- 15324955408658888583, 3064991081731777716, 6129982163463555433,
- 12259964326927110866, 2451992865385422173, 4903985730770844346,
- 9807971461541688693, 1961594292308337738, 3923188584616675477,
- 7846377169233350954, 15692754338466701909, 3138550867693340381,
- 6277101735386680763, 12554203470773361527, 2510840694154672305,
- 5021681388309344611, 10043362776618689222, 2008672555323737844,
- 4017345110647475688, 8034690221294951377, 16069380442589902755,
- 3213876088517980551, 6427752177035961102, 12855504354071922204,
- 2571100870814384440, 5142201741628768881, 10284403483257537763,
- 2056880696651507552, 4113761393303015105, 8227522786606030210,
- 16455045573212060421, 3291009114642412084, 6582018229284824168,
- 13164036458569648337, 2632807291713929667, 5265614583427859334,
- 10531229166855718669, 2106245833371143733, 4212491666742287467,
- 8424983333484574935, 16849966666969149871, 3369993333393829974,
- 6739986666787659948, 13479973333575319897, 2695994666715063979,
- 5391989333430127958, 10783978666860255917, 2156795733372051183,
- 4313591466744102367, 8627182933488204734, 17254365866976409468,
- 3450873173395281893, 6901746346790563787, 13803492693581127574,
- 2760698538716225514, 5521397077432451029, 11042794154864902059,
- 2208558830972980411, 4417117661945960823, 8834235323891921647,
- 17668470647783843295, 3533694129556768659, 7067388259113537318,
- 14134776518227074636, 2826955303645414927, 5653910607290829854,
- 11307821214581659709, 2261564242916331941, 4523128485832663883,
- 9046256971665327767, 18092513943330655534, 3618502788666131106,
- 7237005577332262213, 14474011154664524427, 2894802230932904885,
- 5789604461865809771, 11579208923731619542, 2315841784746323908,
- 4631683569492647816, 9263367138985295633, 1852673427797059126,
- 3705346855594118253, 7410693711188236507, 14821387422376473014,
- 2964277484475294602, 5928554968950589205, 11857109937901178411,
- 2371421987580235682, 4742843975160471364, 9485687950320942729,
- 1897137590064188545, 3794275180128377091, 7588550360256754183,
- 15177100720513508366, 3035420144102701673, 6070840288205403346,
- 12141680576410806693, 2428336115282161338, 4856672230564322677,
- 9713344461128645354, 1942668892225729070, 3885337784451458141,
- 7770675568902916283, 15541351137805832567, 3108270227561166513,
- 6216540455122333026, 12433080910244666053, 2486616182048933210,
- 4973232364097866421, 9946464728195732843, 1989292945639146568,
- 3978585891278293137, 7957171782556586274, 15914343565113172548,
- 3182868713022634509, 6365737426045269019, 12731474852090538039,
- 2546294970418107607, 5092589940836215215, 10185179881672430431,
- 2037035976334486086, 4074071952668972172, 8148143905337944345,
- 16296287810675888690, 3259257562135177738, 6518515124270355476,
- 13037030248540710952, 2607406049708142190, 5214812099416284380,
- 10429624198832568761, 2085924839766513752, 4171849679533027504,
- 8343699359066055009, 16687398718132110018, 3337479743626422003,
- 6674959487252844007, 13349918974505688014, 2669983794901137602,
- 5339967589802275205, 10679935179604550411, 2135987035920910082,
- 4271974071841820164, 8543948143683640329, 17087896287367280659,
- 3417579257473456131, 6835158514946912263, 13670317029893824527,
- 2734063405978764905, 5468126811957529810, 10936253623915059621,
- 2187250724783011924, 4374501449566023848, 8749002899132047697,
- 17498005798264095394, 3499601159652819078, 6999202319305638157,
- 13998404638611276315, 2799680927722255263, 5599361855444510526,
- 11198723710889021052, 2239744742177804210, 4479489484355608421,
- 8958978968711216842, 17917957937422433684, 3583591587484486736,
- 7167183174968973473, 14334366349937946947, 2866873269987589389,
- 5733746539975178779, 11467493079950357558, 2293498615990071511,
- 4586997231980143023, 9173994463960286046, 1834798892792057209,
- 3669597785584114418, 7339195571168228837, 14678391142336457674,
- 2935678228467291534, 5871356456934583069, 11742712913869166139,
- 2348542582773833227, 4697085165547666455, 9394170331095332911,
- 1878834066219066582, 3757668132438133164, 7515336264876266329,
- 15030672529752532658, 3006134505950506531, 6012269011901013063,
- 12024538023802026126, 2404907604760405225, 4809815209520810450,
- 9619630419041620901, 1923926083808324180, 3847852167616648360,
- 7695704335233296721, 15391408670466593442, 3078281734093318688,
- 6156563468186637376, 12313126936373274753, 2462625387274654950,
- 4925250774549309901, 9850501549098619803, 1970100309819723960,
- 3940200619639447921, 7880401239278895842, 15760802478557791684,
- 3152160495711558336, 6304320991423116673, 12608641982846233347,
- 2521728396569246669, 5043456793138493339, 10086913586276986678,
- 2017382717255397335, 4034765434510794671, 8069530869021589342,
- 16139061738043178685, 3227812347608635737, 6455624695217271474,
- 12911249390434542948, 2582249878086908589, 5164499756173817179,
- 10328999512347634358, 2065799902469526871, 4131599804939053743,
- 8263199609878107486, 16526399219756214973, 3305279843951242994,
- 6610559687902485989, 13221119375804971979, 2644223875160994395,
- 5288447750321988791, 10576895500643977583, 2115379100128795516,
- 4230758200257591033, 8461516400515182066, 16923032801030364133,
- 3384606560206072826, 6769213120412145653, 13538426240824291306,
- 2707685248164858261, 5415370496329716522, 10830740992659433045,
- 2166148198531886609, 4332296397063773218, 8664592794127546436,
- 17329185588255092872, 3465837117651018574, 6931674235302037148,
- 13863348470604074297, 2772669694120814859, 5545339388241629719,
- 11090678776483259438, 2218135755296651887, 4436271510593303775,
- 8872543021186607550, 17745086042373215101, 3549017208474643020,
- 7098034416949286040, 14196068833898572081, 2839213766779714416,
- 5678427533559428832, 11356855067118857664, 2271371013423771532,
- 4542742026847543065, 9085484053695086131, 1817096810739017226,
- 3634193621478034452, 7268387242956068905, 14536774485912137810,
- 2907354897182427562, 5814709794364855124, 11629419588729710248,
- 2325883917745942049, 4651767835491884099, 9303535670983768199,
- 1860707134196753639, 3721414268393507279, 7442828536787014559,
- 14885657073574029118, 2977131414714805823, 5954262829429611647,
- 11908525658859223294, 2381705131771844658, 4763410263543689317,
- 9526820527087378635, 1905364105417475727, 3810728210834951454,
- 7621456421669902908, 15242912843339805817, 3048582568667961163,
- 6097165137335922326, 12194330274671844653, 2438866054934368930,
- 4877732109868737861, 9755464219737475723, 1951092843947495144,
- 3902185687894990289, 7804371375789980578, 15608742751579961156,
- 3121748550315992231, 6243497100631984462, 12486994201263968925,
- 2497398840252793785, 4994797680505587570, 9989595361011175140,
- 1997919072202235028, 3995838144404470056, 7991676288808940112,
- 15983352577617880224, 3196670515523576044, 6393341031047152089,
- 12786682062094304179, 2557336412418860835, 5114672824837721671,
- 10229345649675443343, 2045869129935088668, 4091738259870177337,
- 8183476519740354675, 16366953039480709350, 3273390607896141870,
- 6546781215792283740, 13093562431584567480, 2618712486316913496,
- 5237424972633826992, 10474849945267653984, 2094969989053530796,
- 4189939978107061593, 8379879956214123187, 16759759912428246374,
- 3351951982485649274, 6703903964971298549, 13407807929942597099,
- 2681561585988519419, 5363123171977038839, 10726246343954077679,
- 2145249268790815535, 4290498537581631071, 8580997075163262143,
- 17161994150326524287, 3432398830065304857, 6864797660130609714,
- 13729595320261219429, 2745919064052243885, 5491838128104487771,
- 10983676256208975543, 2196735251241795108, 4393470502483590217,
- 8786941004967180435, 17573882009934360870, 3514776401986872174,
- 7029552803973744348, 14059105607947488696, 2811821121589497739,
- 5623642243178995478, 11247284486357990957, 2249456897271598191,
- 4498913794543196382, 8997827589086392765, 17995655178172785531,
- 3599131035634557106, 7198262071269114212, 14396524142538228424,
- 2879304828507645684, 5758609657015291369, 11517219314030582739,
- 2303443862806116547, 4606887725612233095, 9213775451224466191,
- 1842755090244893238, 3685510180489786476, 7371020360979572953,
- 14742040721959145907, 2948408144391829181, 5896816288783658362,
- 11793632577567316725, 2358726515513463345, 4717453031026926690,
- 9434906062053853380, 1886981212410770676, 3773962424821541352,
- 7547924849643082704, 15095849699286165408, 3019169939857233081,
- 6038339879714466163, 12076679759428932327, 2415335951885786465,
- 4830671903771572930, 9661343807543145861, 1932268761508629172,
- 3864537523017258344, 7729075046034516689, 15458150092069033378,
- 3091630018413806675, 6183260036827613351, 12366520073655226703,
- 2473304014731045340, 4946608029462090681, 9893216058924181362,
- 1978643211784836272, 3957286423569672544, 7914572847139345089,
- 15829145694278690179, 3165829138855738035, 6331658277711476071,
- 12663316555422952143, 2532663311084590428, 5065326622169180857,
- 10130653244338361715, 2026130648867672343, 4052261297735344686,
- 8104522595470689372, 16209045190941378744, 3241809038188275748,
- 6483618076376551497, 12967236152753102995, 2593447230550620599,
- 5186894461101241198, 10373788922202482396, 2074757784440496479,
- 4149515568880992958, 8299031137761985917, 16598062275523971834,
- 3319612455104794366, 6639224910209588733, 13278449820419177467,
- 2655689964083835493, 5311379928167670986, 10622759856335341973,
- 2124551971267068394, 4249103942534136789, 8498207885068273579,
- 16996415770136547158, 3399283154027309431, 6798566308054618863,
- 13597132616109237726, 2719426523221847545, 5438853046443695090,
- 10877706092887390181, 2175541218577478036, 4351082437154956072,
- 8702164874309912144, 17404329748619824289, 3480865949723964857,
- 6961731899447929715, 13923463798895859431, 2784692759779171886,
- 5569385519558343772, 11138771039116687545, 2227754207823337509,
- 4455508415646675018, 8911016831293350036, 17822033662586700072,
- 3564406732517340014, 7128813465034680029, 14257626930069360058,
- 2851525386013872011, 5703050772027744023, 11406101544055488046,
- 2281220308811097609, 4562440617622195218, 9124881235244390437,
- 1824976247048878087, 3649952494097756174, 7299904988195512349,
- 14599809976391024699, 2919961995278204939, 5839923990556409879,
- 11679847981112819759, 2335969596222563951, 4671939192445127903,
- 9343878384890255807, 1868775676978051161, 3737551353956102323,
- 7475102707912204646, 14950205415824409292, 2990041083164881858,
- 5980082166329763716, 11960164332659527433, 2392032866531905486,
- 4784065733063810973, 9568131466127621947, 1913626293225524389,
- 3827252586451048778, 7654505172902097557, 15309010345804195115,
- 3061802069160839023, 6123604138321678046, 12247208276643356092,
- 2449441655328671218, 4898883310657342436, 9797766621314684873,
- 1959553324262936974, 3919106648525873949, 7838213297051747899,
- 15676426594103495798, 3135285318820699159, 6270570637641398319,
- 12541141275282796638, 2508228255056559327, 5016456510113118655,
- 10032913020226237310, 2006582604045247462, 4013165208090494924,
- 8026330416180989848, 16052660832361979697, 3210532166472395939,
- 6421064332944791878, 12842128665889583757, 2568425733177916751,
- 5136851466355833503, 10273702932711667006, 2054740586542333401,
- 4109481173084666802, 8218962346169333605, 16437924692338667210,
- 3287584938467733442, 6575169876935466884, 13150339753870933768,
- 2630067950774186753, 5260135901548373507, 10520271803096747014,
- 2104054360619349402, 4208108721238698805, 8416217442477397611,
- 16832434884954795223, 3366486976990959044, 6732973953981918089,
- 13465947907963836178, 2693189581592767235, 5386379163185534471,
- 10772758326371068942, 2154551665274213788, 4309103330548427577,
- 8618206661096855154, 17236413322193710308, 3447282664438742061,
- 6894565328877484123, 13789130657754968246, 2757826131550993649,
- 5515652263101987298, 11031304526203974597, 2206260905240794919,
- 4412521810481589838, 8825043620963179677, 17650087241926359355,
- 3530017448385271871, 7060034896770543742, 14120069793541087484,
- 2824013958708217496, 5648027917416434993, 11296055834832869987,
- 2259211166966573997, 4518422333933147995, 9036844667866295990,
- 18073689335732591980, 3614737867146518396, 7229475734293036792,
- 14458951468586073584, 2891790293717214716, 5783580587434429433,
- 11567161174868858867, 2313432234973771773, 4626864469947543547,
- 9253728939895087094, 1850745787979017418, 3701491575958034837,
- 7402983151916069675, 14805966303832139350, 2961193260766427870,
- 5922386521532855740, 11844773043065711480, 2368954608613142296,
- 4737909217226284592, 9475818434452569184, 1895163686890513836,
- 3790327373781027673, 7580654747562055347, 15161309495124110694,
- 3032261899024822138, 6064523798049644277, 12129047596099288555,
- 2425809519219857711, 4851619038439715422, 9703238076879430844,
- 1940647615375886168, 3881295230751772337, 7762590461503544675,
- 15525180923007089351, 3105036184601417870, 6210072369202835740,
- 12420144738405671481, 2484028947681134296, 4968057895362268592,
- 9936115790724537184, 1987223158144907436, 3974446316289814873,
- 7948892632579629747, 15897785265159259495, 3179557053031851899,
- 6359114106063703798, 12718228212127407596, 2543645642425481519,
- 5087291284850963038, 10174582569701926077, 2034916513940385215,
- 4069833027880770430, 8139666055761540861, 16279332111523081723,
- 3255866422304616344, 6511732844609232689, 13023465689218465379,
- 2604693137843693075, 5209386275687386151, 10418772551374772303,
- 2083754510274954460, 4167509020549908921, 8335018041099817842,
- 16670036082199635685, 3334007216439927137, 6668014432879854274,
- 13336028865759708548, 2667205773151941709, 5334411546303883419,
- 10668823092607766838, 2133764618521553367, 4267529237043106735,
- 8535058474086213470, 17070116948172426941, 3414023389634485388,
- 6828046779268970776, 13656093558537941553, 2731218711707588310,
- 5462437423415176621, 10924874846830353242, 2184974969366070648,
- 4369949938732141297, 8739899877464282594, 17479799754928565188,
- 3495959950985713037, 6991919901971426075, 13983839803942852150,
- 2796767960788570430, 5593535921577140860, 11187071843154281720,
- 2237414368630856344, 4474828737261712688, 8949657474523425376,
- 17899314949046850752, 3579862989809370150, 7159725979618740301,
- 14319451959237480602, 2863890391847496120, 5727780783694992240,
- 11455561567389984481, 2291112313477996896, 4582224626955993792,
- 9164449253911987585, 1832889850782397517, 3665779701564795034,
- 7331559403129590068, 14663118806259180136, 2932623761251836027,
- 5865247522503672054, 11730495045007344109, 2346099009001468821,
- 4692198018002937643, 9384396036005875287, 1876879207201175057,
- 3753758414402350114, 7507516828804700229, 15015033657609400459,
- 3003006731521880091, 6006013463043760183, 12012026926087520367,
- 2402405385217504073, 4804810770435008147, 9609621540870016294,
- 1921924308174003258, 3843848616348006517, 7687697232696013035,
- 15375394465392026070, 3075078893078405214, 6150157786156810428,
- 12300315572313620856, 2460063114462724171, 4920126228925448342,
- 9840252457850896685, 1968050491570179337, 3936100983140358674,
- 7872201966280717348, 15744403932561434696, 3148880786512286939,
- 6297761573024573878, 12595523146049147757, 2519104629209829551,
- 5038209258419659102, 10076418516839318205, 2015283703367863641,
- 4030567406735727282, 8061134813471454564, 16122269626942909129,
- 3224453925388581825, 6448907850777163651, 12897815701554327303,
- 2579563140310865460, 5159126280621730921, 10318252561243461842,
- 2063650512248692368, 4127301024497384737, 8254602048994769474,
- 16509204097989538948, 3301840819597907789, 6603681639195815579,
- 13207363278391631158, 2641472655678326231, 5282945311356652463,
- 10565890622713304927, 2113178124542660985, 4226356249085321970,
- 8452712498170643941, 16905424996341287883, 3381084999268257576,
- 6762169998536515153, 13524339997073030306, 2704867999414606061,
- 5409735998829212122, 10819471997658424245, 2163894399531684849,
- 4327788799063369698, 8655577598126739396, 17311155196253478792,
- 3462231039250695758, 6924462078501391516, 13848924157002783033,
- 2769784831400556606, 5539569662801113213, 11079139325602226427,
- 2215827865120445285, 4431655730240890570, 8863311460481781141,
- 17726622920963562283, 3545324584192712456, 7090649168385424913,
- 14181298336770849826, 2836259667354169965, 5672519334708339930,
- 11345038669416679861, 2269007733883335972, 4538015467766671944,
- 9076030935533343889, 18152061871066687778, 3630412374213337555,
- 7260824748426675111, 14521649496853350222, 2904329899370670044,
- 5808659798741340089, 11617319597482680178, 2323463919496536035,
- 4646927838993072071, 9293855677986144142, 1858771135597228828,
- 3717542271194457656, 7435084542388915313, 14870169084777830627,
- 2974033816955566125, 5948067633911132251, 11896135267822264502,
- 2379227053564452900, 4758454107128905800, 9516908214257811601,
- 1903381642851562320, 3806763285703124640, 7613526571406249281,
- 15227053142812498563, 3045410628562499712, 6090821257124999425,
- 12181642514249998850, 2436328502849999770, 4872657005699999540,
- 9745314011399999080, 1949062802279999816, 3898125604559999632,
- 7796251209119999264, 15592502418239998528, 3118500483647999705,
- 6237000967295999411, 12474001934591998822, 2494800386918399764,
- 4989600773836799529, 9979201547673599058, 1995840309534719811,
- 3991680619069439623, 7983361238138879246, 15966722476277758493,
- 3193344495255551698, 6386688990511103397, 12773377981022206794,
- 2554675596204441358, 5109351192408882717, 10218702384817765435,
- 2043740476963553087, 4087480953927106174, 8174961907854212348,
- 16349923815708424697, 3269984763141684939, 6539969526283369878,
- 13079939052566739757, 2615987810513347951, 5231975621026695903,
- 10463951242053391806, 2092790248410678361, 4185580496821356722,
- 8371160993642713444, 16742321987285426889, 3348464397457085377,
- 6696928794914170755, 13393857589828341511, 2678771517965668302,
- 5357543035931336604, 10715086071862673209, 2143017214372534641,
- 4286034428745069283, 8572068857490138567, 17144137714980277135,
- 3428827542996055427, 6857655085992110854, 13715310171984221708,
- 2743062034396844341, 5486124068793688683, 10972248137587377366,
- 2194449627517475473, 4388899255034950946, 8777798510069901893,
- 17555597020139803786, 3511119404027960757, 7022238808055921514,
- 14044477616111843029, 2808895523222368605, 5617791046444737211,
- 11235582092889474423, 2247116418577894884, 4494232837155789769,
- 8988465674311579538, 17976931348623159077, 3595386269724631815,
- 7190772539449263630, 14381545078898527261, 2876309015779705452,
- 5752618031559410904, 11505236063118821809, 2301047212623764361,
- 4602094425247528723, 9204188850495057447, 1840837770099011489,
- 3681675540198022979, 7363351080396045958,
- };
-
- static readonly int[] TensExponentTable = {
- -323, -323, -322, -322, -322, -322, -321, -321, -321, -320, -320, -320,
- -319, -319, -319, -319, -318, -318, -318, -317, -317, -317, -316, -316,
- -316, -316, -315, -315, -315, -314, -314, -314, -313, -313, -313, -313,
- -312, -312, -312, -311, -311, -311, -310, -310, -310, -310, -309, -309,
- -309, -308, -308, -308, -307, -307, -307, -307, -306, -306, -306, -305,
- -305, -305, -304, -304, -304, -304, -303, -303, -303, -302, -302, -302,
- -301, -301, -301, -301, -300, -300, -300, -299, -299, -299, -298, -298,
- -298, -298, -297, -297, -297, -296, -296, -296, -295, -295, -295, -295,
- -294, -294, -294, -293, -293, -293, -292, -292, -292, -291, -291, -291,
- -291, -290, -290, -290, -289, -289, -289, -288, -288, -288, -288, -287,
- -287, -287, -286, -286, -286, -285, -285, -285, -285, -284, -284, -284,
- -283, -283, -283, -282, -282, -282, -282, -281, -281, -281, -280, -280,
- -280, -279, -279, -279, -279, -278, -278, -278, -277, -277, -277, -276,
- -276, -276, -276, -275, -275, -275, -274, -274, -274, -273, -273, -273,
- -273, -272, -272, -272, -271, -271, -271, -270, -270, -270, -270, -269,
- -269, -269, -268, -268, -268, -267, -267, -267, -267, -266, -266, -266,
- -265, -265, -265, -264, -264, -264, -263, -263, -263, -263, -262, -262,
- -262, -261, -261, -261, -260, -260, -260, -260, -259, -259, -259, -258,
- -258, -258, -257, -257, -257, -257, -256, -256, -256, -255, -255, -255,
- -254, -254, -254, -254, -253, -253, -253, -252, -252, -252, -251, -251,
- -251, -251, -250, -250, -250, -249, -249, -249, -248, -248, -248, -248,
- -247, -247, -247, -246, -246, -246, -245, -245, -245, -245, -244, -244,
- -244, -243, -243, -243, -242, -242, -242, -242, -241, -241, -241, -240,
- -240, -240, -239, -239, -239, -239, -238, -238, -238, -237, -237, -237,
- -236, -236, -236, -235, -235, -235, -235, -234, -234, -234, -233, -233,
- -233, -232, -232, -232, -232, -231, -231, -231, -230, -230, -230, -229,
- -229, -229, -229, -228, -228, -228, -227, -227, -227, -226, -226, -226,
- -226, -225, -225, -225, -224, -224, -224, -223, -223, -223, -223, -222,
- -222, -222, -221, -221, -221, -220, -220, -220, -220, -219, -219, -219,
- -218, -218, -218, -217, -217, -217, -217, -216, -216, -216, -215, -215,
- -215, -214, -214, -214, -214, -213, -213, -213, -212, -212, -212, -211,
- -211, -211, -211, -210, -210, -210, -209, -209, -209, -208, -208, -208,
- -208, -207, -207, -207, -206, -206, -206, -205, -205, -205, -204, -204,
- -204, -204, -203, -203, -203, -202, -202, -202, -201, -201, -201, -201,
- -200, -200, -200, -199, -199, -199, -198, -198, -198, -198, -197, -197,
- -197, -196, -196, -196, -195, -195, -195, -195, -194, -194, -194, -193,
- -193, -193, -192, -192, -192, -192, -191, -191, -191, -190, -190, -190,
- -189, -189, -189, -189, -188, -188, -188, -187, -187, -187, -186, -186,
- -186, -186, -185, -185, -185, -184, -184, -184, -183, -183, -183, -183,
- -182, -182, -182, -181, -181, -181, -180, -180, -180, -180, -179, -179,
- -179, -178, -178, -178, -177, -177, -177, -176, -176, -176, -176, -175,
- -175, -175, -174, -174, -174, -173, -173, -173, -173, -172, -172, -172,
- -171, -171, -171, -170, -170, -170, -170, -169, -169, -169, -168, -168,
- -168, -167, -167, -167, -167, -166, -166, -166, -165, -165, -165, -164,
- -164, -164, -164, -163, -163, -163, -162, -162, -162, -161, -161, -161,
- -161, -160, -160, -160, -159, -159, -159, -158, -158, -158, -158, -157,
- -157, -157, -156, -156, -156, -155, -155, -155, -155, -154, -154, -154,
- -153, -153, -153, -152, -152, -152, -152, -151, -151, -151, -150, -150,
- -150, -149, -149, -149, -149, -148, -148, -148, -147, -147, -147, -146,
- -146, -146, -145, -145, -145, -145, -144, -144, -144, -143, -143, -143,
- -142, -142, -142, -142, -141, -141, -141, -140, -140, -140, -139, -139,
- -139, -139, -138, -138, -138, -137, -137, -137, -136, -136, -136, -136,
- -135, -135, -135, -134, -134, -134, -133, -133, -133, -133, -132, -132,
- -132, -131, -131, -131, -130, -130, -130, -130, -129, -129, -129, -128,
- -128, -128, -127, -127, -127, -127, -126, -126, -126, -125, -125, -125,
- -124, -124, -124, -124, -123, -123, -123, -122, -122, -122, -121, -121,
- -121, -121, -120, -120, -120, -119, -119, -119, -118, -118, -118, -117,
- -117, -117, -117, -116, -116, -116, -115, -115, -115, -114, -114, -114,
- -114, -113, -113, -113, -112, -112, -112, -111, -111, -111, -111, -110,
- -110, -110, -109, -109, -109, -108, -108, -108, -108, -107, -107, -107,
- -106, -106, -106, -105, -105, -105, -105, -104, -104, -104, -103, -103,
- -103, -102, -102, -102, -102, -101, -101, -101, -100, -100, -100, -99,
- -99, -99, -99, -98, -98, -98, -97, -97, -97, -96, -96, -96,
- -96, -95, -95, -95, -94, -94, -94, -93, -93, -93, -93, -92,
- -92, -92, -91, -91, -91, -90, -90, -90, -89, -89, -89, -89,
- -88, -88, -88, -87, -87, -87, -86, -86, -86, -86, -85, -85,
- -85, -84, -84, -84, -83, -83, -83, -83, -82, -82, -82, -81,
- -81, -81, -80, -80, -80, -80, -79, -79, -79, -78, -78, -78,
- -77, -77, -77, -77, -76, -76, -76, -75, -75, -75, -74, -74,
- -74, -74, -73, -73, -73, -72, -72, -72, -71, -71, -71, -71,
- -70, -70, -70, -69, -69, -69, -68, -68, -68, -68, -67, -67,
- -67, -66, -66, -66, -65, -65, -65, -65, -64, -64, -64, -63,
- -63, -63, -62, -62, -62, -62, -61, -61, -61, -60, -60, -60,
- -59, -59, -59, -58, -58, -58, -58, -57, -57, -57, -56, -56,
- -56, -55, -55, -55, -55, -54, -54, -54, -53, -53, -53, -52,
- -52, -52, -52, -51, -51, -51, -50, -50, -50, -49, -49, -49,
- -49, -48, -48, -48, -47, -47, -47, -46, -46, -46, -46, -45,
- -45, -45, -44, -44, -44, -43, -43, -43, -43, -42, -42, -42,
- -41, -41, -41, -40, -40, -40, -40, -39, -39, -39, -38, -38,
- -38, -37, -37, -37, -37, -36, -36, -36, -35, -35, -35, -34,
- -34, -34, -34, -33, -33, -33, -32, -32, -32, -31, -31, -31,
- -30, -30, -30, -30, -29, -29, -29, -28, -28, -28, -27, -27,
- -27, -27, -26, -26, -26, -25, -25, -25, -24, -24, -24, -24,
- -23, -23, -23, -22, -22, -22, -21, -21, -21, -21, -20, -20,
- -20, -19, -19, -19, -18, -18, -18, -18, -17, -17, -17, -16,
- -16, -16, -15, -15, -15, -15, -14, -14, -14, -13, -13, -13,
- -12, -12, -12, -12, -11, -11, -11, -10, -10, -10, -9, -9,
- -9, -9, -8, -8, -8, -7, -7, -7, -6, -6, -6, -6,
- -5, -5, -5, -4, -4, -4, -3, -3, -3, -3, -2, -2,
- -2, -1, -1, -1, 0, 0, 0, 1, 1, 1, 1, 2,
- 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5,
- 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9,
- 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13,
- 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16,
- 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20,
- 20, 20, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23,
- 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 27, 27,
- 27, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 31,
- 31, 31, 32, 32, 32, 32, 33, 33, 33, 34, 34, 34,
- 35, 35, 35, 35, 36, 36, 36, 37, 37, 37, 38, 38,
- 38, 38, 39, 39, 39, 40, 40, 40, 41, 41, 41, 41,
- 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 45, 45,
- 45, 46, 46, 46, 47, 47, 47, 47, 48, 48, 48, 49,
- 49, 49, 50, 50, 50, 50, 51, 51, 51, 52, 52, 52,
- 53, 53, 53, 53, 54, 54, 54, 55, 55, 55, 56, 56,
- 56, 56, 57, 57, 57, 58, 58, 58, 59, 59, 59, 60,
- 60, 60, 60, 61, 61, 61, 62, 62, 62, 63, 63, 63,
- 63, 64, 64, 64, 65, 65, 65, 66, 66, 66, 66, 67,
- 67, 67, 68, 68, 68, 69, 69, 69, 69, 70, 70, 70,
- 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 74, 74,
- 74, 75, 75, 75, 75, 76, 76, 76, 77, 77, 77, 78,
- 78, 78, 78, 79, 79, 79, 80, 80, 80, 81, 81, 81,
- 81, 82, 82, 82, 83, 83, 83, 84, 84, 84, 84, 85,
- 85, 85, 86, 86, 86, 87, 87, 87, 88, 88, 88, 88,
- 89, 89, 89, 90, 90, 90, 91, 91, 91, 91, 92, 92,
- 92, 93, 93, 93, 94, 94, 94, 94, 95, 95, 95, 96,
- 96, 96, 97, 97, 97, 97, 98, 98, 98, 99, 99, 99,
- 100, 100, 100, 100, 101, 101, 101, 102, 102, 102, 103, 103,
- 103, 103, 104, 104, 104, 105, 105, 105, 106, 106, 106, 106,
- 107, 107, 107, 108, 108, 108, 109, 109, 109, 109, 110, 110,
- 110, 111, 111, 111, 112, 112, 112, 112, 113, 113, 113, 114,
- 114, 114, 115, 115, 115, 116, 116, 116, 116, 117, 117, 117,
- 118, 118, 118, 119, 119, 119, 119, 120, 120, 120, 121, 121,
- 121, 122, 122, 122, 122, 123, 123, 123, 124, 124, 124, 125,
- 125, 125, 125, 126, 126, 126, 127, 127, 127, 128, 128, 128,
- 128, 129, 129, 129, 130, 130, 130, 131, 131, 131, 131, 132,
- 132, 132, 133, 133, 133, 134, 134, 134, 134, 135, 135, 135,
- 136, 136, 136, 137, 137, 137, 137, 138, 138, 138, 139, 139,
- 139, 140, 140, 140, 140, 141, 141, 141, 142, 142, 142, 143,
- 143, 143, 143, 144, 144, 144, 145, 145, 145, 146, 146, 146,
- 147, 147, 147, 147, 148, 148, 148, 149, 149, 149, 150, 150,
- 150, 150, 151, 151, 151, 152, 152, 152, 153, 153, 153, 153,
- 154, 154, 154, 155, 155, 155, 156, 156, 156, 156, 157, 157,
- 157, 158, 158, 158, 159, 159, 159, 159, 160, 160, 160, 161,
- 161, 161, 162, 162, 162, 162, 163, 163, 163, 164, 164, 164,
- 165, 165, 165, 165, 166, 166, 166, 167, 167, 167, 168, 168,
- 168, 168, 169, 169, 169, 170, 170, 170, 171, 171, 171, 171,
- 172, 172, 172, 173, 173, 173, 174, 174, 174, 175, 175, 175,
- 175, 176, 176, 176, 177, 177, 177, 178, 178, 178, 178, 179,
- 179, 179, 180, 180, 180, 181, 181, 181, 181, 182, 182, 182,
- 183, 183, 183, 184, 184, 184, 184, 185, 185, 185, 186, 186,
- 186, 187, 187, 187, 187, 188, 188, 188, 189, 189, 189, 190,
- 190, 190, 190, 191, 191, 191, 192, 192, 192, 193, 193, 193,
- 193, 194, 194, 194, 195, 195, 195, 196, 196, 196, 196, 197,
- 197, 197, 198, 198, 198, 199, 199, 199, 199, 200, 200, 200,
- 201, 201, 201, 202, 202, 202, 202, 203, 203, 203, 204, 204,
- 204, 205, 205, 205, 206, 206, 206, 206, 207, 207, 207, 208,
- 208, 208, 209, 209, 209, 209, 210, 210, 210, 211, 211, 211,
- 212, 212, 212, 212, 213, 213, 213, 214, 214, 214, 215, 215,
- 215, 215, 216, 216, 216, 217, 217, 217, 218, 218, 218, 218,
- 219, 219, 219, 220, 220, 220, 221, 221, 221, 221, 222, 222,
- 222, 223, 223, 223, 224, 224, 224, 224, 225, 225, 225, 226,
- 226, 226, 227, 227, 227, 227, 228, 228, 228, 229, 229, 229,
- 230, 230, 230, 230, 231, 231, 231, 232, 232, 232, 233, 233,
- 233, 234, 234, 234, 234, 235, 235, 235, 236, 236, 236, 237,
- 237, 237, 237, 238, 238, 238, 239, 239, 239, 240, 240, 240,
- 240, 241, 241, 241, 242, 242, 242, 243, 243, 243, 243, 244,
- 244, 244, 245, 245, 245, 246, 246, 246, 246, 247, 247, 247,
- 248, 248, 248, 249, 249, 249, 249, 250, 250, 250, 251, 251,
- 251, 252, 252, 252, 252, 253, 253, 253, 254, 254, 254, 255,
- 255, 255, 255, 256, 256, 256, 257, 257, 257, 258, 258, 258,
- 258, 259, 259, 259, 260, 260, 260, 261, 261, 261, 261, 262,
- 262, 262, 263, 263, 263, 264, 264, 264, 265, 265, 265, 265,
- 266, 266, 266, 267, 267, 267, 268, 268, 268, 268, 269, 269,
- 269, 270, 270, 270, 271, 271, 271, 271, 272, 272, 272, 273,
- 273, 273, 274, 274, 274, 274, 275, 275, 275, 276, 276, 276,
- 277, 277, 277, 277, 278, 278, 278, 279, 279, 279, 280, 280,
- 280, 280, 281, 281, 281, 282, 282, 282, 283, 283, 283, 283,
- 284, 284, 284, 285, 285, 285, 286, 286, 286, 286, 287, 287,
- 287, 288, 288, 288, 289, 289, 289, 289, 290, 290, 290, 291,
- 291, 291, 292, 292, 292, 293, 293, 293,
- };
-
-#if false
- #region Double exponent table construction
-
- // This code computes the above valus of TensExponentTable &
- // MantissaBitsTable. This code is helpful when you try to optimize
- // further the double ToString performance.
- private const int ExponentMid = 1043;
- private const int ExponentMax = 2047;
-
- // Ensure that values won't cause overflow when multiplied with the double Mantissa.
- private const ulong UpperMapMark = UInt64.MaxValue / 2 - (1 << 57);
- private const ulong LowerMapMark = UInt64.MaxValue / 5 - (1 << 56);
-
- // The results of 2 ^ 64 / 5 * i for i in {0 .. 4}
- private static ulong[] Div5 = new ulong[] {
- 0,
- 0x3333333333333333,
- 0x6666666666666666,
- 0x9999999999999999,
- 0xCCCCCCCCCCCCCCCC };
-
- static NumberFormatter ()
- {
- InitUpperMap ();
- InitLowerMap ();
- }
-
- private static void InitUpperMap ()
- {
- ulong val = 1000000000UL << 32;
- int expVal = -9;
- ulong loVal = 0;
- for (int i = ExponentMid; i <= ExponentMax; i++) {
- MantissaBitsTable [i] = val;
- TensExponentTable [i] = expVal;
- if (val < UpperMapMark) {
- val = (val << 1) + (uint)(loVal >> 63);
- loVal = (loVal << 1);
- }
- else {
- ulong rem = val % 5;
- val /= 5;
- ulong rem2 = rem + (loVal % 5);
- loVal = loVal / 5 + Div5 [rem];
- if (rem2 >= 5) {
- loVal++;
- rem2 -= 5;
- }
- expVal++;
- }
- }
- }
-
- private static void InitLowerMap ()
- {
- ulong val = 1000000000UL << 32;
- int expVal = -9;
- ulong loVal = 0;
- for (int i = ExponentMid; i >= 0; i--) {
- MantissaBitsTable [i] = val;
- TensExponentTable [i] = expVal;
- if (val < LowerMapMark) {
- val *= 5;
- for (uint j = 4; j > 0; j--) {
- if (loVal > Div5 [j]) {
- val += j;
- break;
- }
- }
- loVal *= 5;
- expVal--;
- }
- else {
- loVal = (((ulong)val & 1) << 63) | (loVal >> 1);
- val = val >> 1;
- }
- }
- }
-
- #endregion Double exponent table construction
-#endif
- }
-}
-#endif // !UNSAFE_TABLES
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs
index 9050c4074fd..2a408933eac 100644
--- a/mcs/class/corlib/System/String.cs
+++ b/mcs/class/corlib/System/String.cs
@@ -2630,9 +2630,22 @@ namespace System
if (ptr < max && str[ptr] == ':') {
int start = ++ ptr;
- while (ptr < max && str[ptr] != '}')
- ++ ptr;
-
+ while (ptr < max) {
+ if (str [ptr] == '}') {
+ if (ptr + 1 < max && str [ptr + 1] == '}') {
+ ++ptr;
+ format += str.Substring (start, ptr - start);
+ ++ptr;
+ start = ptr;
+ continue;
+ }
+
+ break;
+ }
+
+ ++ptr;
+ }
+
format += str.Substring (start, ptr - start);
}
else
diff --git a/mcs/class/corlib/System/TimeZone.cs b/mcs/class/corlib/System/TimeZone.cs
index 43c7181f8b8..cea224133e4 100644
--- a/mcs/class/corlib/System/TimeZone.cs
+++ b/mcs/class/corlib/System/TimeZone.cs
@@ -73,7 +73,11 @@ namespace System
lock (tz_lock) {
if (tz == null || Math.Abs (now - timezone_check) > TimeSpan.TicksPerMinute) {
- tz = new CurrentSystemTimeZone (now);
+#if MONODROID
+ tz = AndroidPlatform.GetCurrentSystemTimeZone ();
+ if (tz == null)
+#endif
+ tz = new CurrentSystemTimeZone (now);
timezone_check = now;
currentTimeZone = tz;
diff --git a/mcs/class/corlib/Test/Mono/DataConvertTest.cs b/mcs/class/corlib/Test/Mono/DataConvertTest.cs
index 89f99e918c1..f02a6a7db40 100644
--- a/mcs/class/corlib/Test/Mono/DataConvertTest.cs
+++ b/mcs/class/corlib/Test/Mono/DataConvertTest.cs
@@ -8,7 +8,7 @@ using Mono;
using NUnit.Framework.SyntaxHelpers;
#endif
-namespace MonoTests {
+namespace MonoTests.Mono {
[TestFixture]
public class DataConverterTest
@@ -50,9 +50,9 @@ namespace MonoTests {
[Test]
public void StringAlignment ()
{
- byte[] packed = Mono.DataConverter.Pack ("bz8", 1, TEST_STRING);
+ byte[] packed = global::Mono.DataConverter.Pack ("bz8", 1, TEST_STRING);
- IList unpacked = Mono.DataConverter.Unpack ("bz8", packed, 0);
+ IList unpacked = global::Mono.DataConverter.Unpack ("bz8", packed, 0);
Assert.AreEqual(1, (byte) unpacked[0]);
Assert.AreEqual(TEST_STRING, new string((char[]) unpacked[1]));
@@ -65,4 +65,4 @@ namespace MonoTests {
Assert.That ((f - 3.14f), Is.LessThanOrEqualTo (Single.Epsilon));
}
}
-} \ No newline at end of file
+}
diff --git a/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs b/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs
index b429c6437ef..1a89b8eedb2 100644
--- a/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs
+++ b/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs
@@ -607,7 +607,6 @@ namespace MonoTests.System.Collections.Generic {
}
[Test]
- [Category ("TargetJvmNotWorking")] // BUGBUG Very very slow on TARGET_JVM.
public void SerializationTest()
{
for (int i = 0; i < 50; i++)
diff --git a/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs b/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
index c5966206cd8..0dc4231858d 100644
--- a/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
+++ b/mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
@@ -345,7 +345,6 @@ namespace MonoTests.System.Collections.Generic {
#if !NET_4_0 // FIXME: the blob contains the 2.0 mscorlib version
[Test]
- [Category ("TargetJvmNotWorking")]
public void SerializeTest ()
{
List <int> list = new List <int> ();
@@ -353,11 +352,7 @@ namespace MonoTests.System.Collections.Generic {
list.Add (0);
list.Add (7);
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
MemoryStream ms = new MemoryStream ();
bf.Serialize (ms, list);
@@ -371,18 +366,13 @@ namespace MonoTests.System.Collections.Generic {
#endif
[Test]
- [Category ("TargetJvmNotWorking")]
public void DeserializeTest ()
{
MemoryStream ms = new MemoryStream ();
ms.Write (_serializedList, 0, _serializedList.Length);
ms.Position = 0;
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
List<int> list = (List<int>) bf.Deserialize (ms);
Assert.AreEqual (3, list.Count, "#1");
Assert.AreEqual (5, list [0], "#2");
diff --git a/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs b/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs
index 99f515fab03..bc3bc99226d 100644
--- a/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs
+++ b/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs
@@ -183,11 +183,7 @@ namespace MonoTests.System.Collections
[Test]
public void Deserialize ()
{
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
MemoryStream ms = new MemoryStream (serialized_en_us);
CaseInsensitiveHashCodeProvider enus = (CaseInsensitiveHashCodeProvider) bf.Deserialize (ms);
diff --git a/mcs/class/corlib/Test/System.Collections/HashtableTest.cs b/mcs/class/corlib/Test/System.Collections/HashtableTest.cs
index 4edfd00b08c..544ade9f826 100644
--- a/mcs/class/corlib/Test/System.Collections/HashtableTest.cs
+++ b/mcs/class/corlib/Test/System.Collections/HashtableTest.cs
@@ -491,13 +491,6 @@ public class HashtableTest {
h['b'] = 2;
DictionaryEntry[] o = new DictionaryEntry[2];
h.CopyTo(o,0);
-#if TARGET_JVM // Hashtable is not an ordered collection!
- if (o[0].Key.Equals('b')) {
- DictionaryEntry v = o[0];
- o[0] = o[1];
- o[1] = v;
- }
-#endif // TARGET_JVM
Assert.AreEqual ('a', o[0].Key, "first copy fine.");
Assert.AreEqual (1, o[0].Value, "first copy fine.");
Assert.AreEqual ('b', o[1].Key, "second copy fine.");
@@ -543,7 +536,6 @@ public class HashtableTest {
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void TestSerialization2 () {
// Test from bug #70570
MemoryStream stream = new MemoryStream();
diff --git a/mcs/class/corlib/Test/System.Collections/SortedListTest.cs b/mcs/class/corlib/Test/System.Collections/SortedListTest.cs
index 08b6130106f..5289f944890 100644
--- a/mcs/class/corlib/Test/System.Collections/SortedListTest.cs
+++ b/mcs/class/corlib/Test/System.Collections/SortedListTest.cs
@@ -881,7 +881,6 @@ namespace MonoTests.System.Collections
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void SerializeTest ()
{
SortedList sl1 = new SortedList ();
@@ -889,11 +888,7 @@ namespace MonoTests.System.Collections
sl1.Add (0, "B");
sl1.Add (7, "C");
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
bf.AssemblyFormat = FormatterAssemblyStyle.Full;
MemoryStream ms = new MemoryStream ();
bf.Serialize (ms, sl1);
@@ -908,7 +903,6 @@ namespace MonoTests.System.Collections
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void Keys_Serialize ()
{
SortedList sl = new SortedList ();
@@ -917,11 +911,7 @@ namespace MonoTests.System.Collections
sl.Add (7, "C");
IList keys1 = (IList) sl.Keys;
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
bf.AssemblyFormat = FormatterAssemblyStyle.Full;
MemoryStream ms = new MemoryStream ();
bf.Serialize (ms, keys1);
@@ -936,7 +926,6 @@ namespace MonoTests.System.Collections
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void Values_Serialize ()
{
SortedList sl = new SortedList ();
@@ -945,11 +934,7 @@ namespace MonoTests.System.Collections
sl.Add (7, "C");
IList values1 = (IList) sl.Values;
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
bf.AssemblyFormat = FormatterAssemblyStyle.Full;
MemoryStream ms = new MemoryStream ();
bf.Serialize (ms, values1);
@@ -967,11 +952,7 @@ namespace MonoTests.System.Collections
[Category ("NotWorking")]
public void Values_Deserialize ()
{
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
MemoryStream ms = new MemoryStream ();
ms.Write (_serializedValues, 0, _serializedValues.Length);
diff --git a/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs b/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs
index 0987da7aed6..c1b34196e95 100644
--- a/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs
+++ b/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs
@@ -3,6 +3,7 @@
// (C) 2002 Ulrich Kunitz
//
+using System.Collections.Generic;
using NUnit.Framework;
using System;
using System.Globalization;
@@ -797,6 +798,44 @@ public class CalendarTest {
Assert.AreEqual (4363, kc.ToFourDigitYear (4363), "#4-4");
}
+ public void TestDaysInYear (Calendar calendar, int year)
+ {
+ var daysInYear = calendar.GetDaysInYear (year);
+ var daysInMonths = 0;
+ var monthInYear = calendar.GetMonthsInYear (year);
+ for (var m = 1; m <= monthInYear; m++)
+ daysInMonths += calendar.GetDaysInMonth (year, m);
+
+ Assert.AreEqual (daysInYear, daysInMonths, string.Format("Calendar:{0} Year:{1}",calendar.GetType(), year));
+ }
+
+ [Test]
+ public void DaysInYear ()
+ {
+ var calendars = new List<Calendar> (acal) {
+ new UmAlQuraCalendar ()
+ };
+
+ foreach (var calendar in calendars) {
+ var minYear = calendar.GetYear (calendar.MinSupportedDateTime);
+ var maxYear = calendar.GetYear (calendar.MaxSupportedDateTime) - 1 ;
+ var midYear = calendar.GetYear (DateTime.Now);
+ var yearsTested = Math.Min (1000, (maxYear - minYear) / 2);
+
+ midYear -= yearsTested / 2;
+
+ int y1 = minYear, y2 = maxYear, y3 = midYear;
+ for (var i = 0; i < yearsTested; i++) {
+ TestDaysInYear (calendar, y1);
+ TestDaysInYear (calendar, y2);
+ if (y3 > minYear && y3 < maxYear)
+ TestDaysInYear (calendar, y3);
+
+ y1++; y2--; y3++;
+ }
+ }
+ }
+
// TODO: more tests :-)
} // class CalendarTest
diff --git a/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.jvm.cs b/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.jvm.cs
deleted file mode 100644
index 4d7cce4d463..00000000000
--- a/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.jvm.cs
+++ /dev/null
@@ -1,690 +0,0 @@
-// CompareInfoTest.cs - NUnit Test Cases for the
-// System.Globalization.CompareInfo class
-//
-// Dick Porter <dick@ximian.com>
-// Atsushi Enomoto <atsushi@ximian.com>
-//
-// (C) 2003-2005 Novell, Inc. http://www.novell.com
-//
-
-using NUnit.Framework;
-using System;
-using System.Globalization;
-
-namespace MonoTests.System.Globalization
-{
-
-[TestFixture]
-public class CompareInfoTest
-{
- static bool doTest = Environment.GetEnvironmentVariable ("MONO_DISABLE_MANAGED_COLLATION") != "yes";
-
- public CompareInfoTest() {}
-
- [Test]
- public void Compare()
- {
- string s1 = "foo";
-
- Assert.AreEqual (0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", ""), "Compare two empty strings");
- Assert.AreEqual (1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, ""), "Compare string with empty string");
- Assert.AreEqual (-1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", s1), "Compare empty string with string");
-
- Assert.AreEqual (0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "", 0), "Compare two empty strings, with 0 offsets");
- Assert.AreEqual (1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, "", 0), "Compare string with empty string, with 0 offsets");
- Assert.AreEqual (-1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, s1, 0), "Compare empty string with string, with 0 offsets");
-
- Assert.AreEqual (0, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "".Length, "", 0, "".Length), "Compare two empty strings, with 0 offsets and specified lengths");
- Assert.AreEqual (1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1.Length, "", 0, "".Length), "Compare string with empty string, with 0 offsets and specified lengths");
- Assert.AreEqual (-1, CultureInfo.InvariantCulture.CompareInfo.Compare ("", 0, "".Length, s1, 0, s1.Length), "Compare empty string with string, with 0 offsets and specified lengths");
-
- Assert.AreEqual (0, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, s1.Length, s1, s1.Length), "Compare two strings, with offsets == string lengths");
- Assert.AreEqual (-1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, s1.Length, s1, 0), "Compare two strings, with first offset == string length");
- Assert.AreEqual (1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1, s1.Length), "Compare two strings, with second offset == string length");
-
- Assert.AreEqual (0, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, 0, s1, 0, 0), "Compare two strings, with zero lengths");
- Assert.AreEqual (-1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, 0, s1, 0, s1.Length), "Compare two strings, with first length zero");
- Assert.AreEqual (1, CultureInfo.InvariantCulture.CompareInfo.Compare (s1, 0, s1.Length, s1, 0, 0), "Compare strings, with second length zero");
-
- }
-
- // Culture-sensitive collation tests
-
- CompareInfo invariant = CultureInfo.InvariantCulture.CompareInfo;
- CompareInfo french = new CultureInfo ("fr").CompareInfo;
- CompareInfo japanese = new CultureInfo ("ja").CompareInfo;
- CompareInfo czech = new CultureInfo ("cs").CompareInfo;
- CompareInfo hungarian = new CultureInfo ("hu").CompareInfo;
-
- CompareOptions ignoreCN =
- CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase;
-
- void AssertCompare (string message, int result, string s1, string s2)
- {
- AssertCompare (message, result, s1, s2, CompareOptions.None);
- }
-
- void AssertCompare (string message, int result, string s1, string s2,
- CompareOptions opt)
- {
- AssertCompare (message, result, s1, s2, opt, invariant);
- }
-
- void AssertCompare (string message, int result, string s1, string s2,
- CompareOptions opt, CompareInfo ci)
- {
- int ret = ci.Compare (s1, s2, opt);
- if (result == 0)
- AssertEquals (message, 0, ret);
- else if (result < 0)
- Assert.IsTrue (message + String.Format ("(neg: {0})", ret), ret < 0);
- else
- Assert.IsTrue (message + String.Format ("(pos: {0})", ret), ret > 0);
- }
-
- void AssertCompare (string message, int result,
- string s1, int idx1, int len1, string s2, int idx2, int len2)
- {
- int ret = invariant.Compare (s1, idx1, len1, s2, idx2, len2);
- if (result == 0)
- AssertEquals (message, 0, ret);
- else if (result < 0)
- Assert.IsTrue (message, ret < 0);
- else
- Assert.IsTrue (message, ret > 0);
- }
-
- void AssertCompare (string message, int result,
- string s1, int idx1, int len1, string s2, int idx2, int len2,
- CompareOptions opt, CompareInfo ci)
- {
- int ret = ci.Compare (s1, idx1, len1, s2, idx2, len2, opt);
- if (result == 0)
- AssertEquals (message, 0, ret);
- else if (result < 0)
- Assert.IsTrue (message, ret < 0);
- else
- Assert.IsTrue (message, ret > 0);
- }
-
- void AssertIndexOf (string message, int expected,
- string source, char target)
- {
- AssertEquals (message, expected,
- invariant.IndexOf (source, target));
- }
-
- void AssertIndexOf (string message, int expected, string source,
- char target, CompareOptions opt)
- {
- AssertEquals (message, expected,
- invariant.IndexOf (source, target, opt));
- }
-
- void AssertIndexOf (string message, int expected, string source,
- char target, int idx, int len, CompareOptions opt, CompareInfo ci)
- {
- AssertEquals (message, expected,
- ci.IndexOf (source, target, idx, len, opt));
- }
-
- void AssertIndexOf (string message, int expected,
- string source, string target)
- {
- AssertEquals (message, expected,
- invariant.IndexOf (source, target));
- }
-
- void AssertIndexOf (string message, int expected, string source,
- string target, CompareOptions opt)
- {
- AssertEquals (message, expected,
- invariant.IndexOf (source, target, opt));
- }
-
- void AssertIndexOf (string message, int expected, string source,
- string target, int idx, int len, CompareOptions opt, CompareInfo ci)
- {
- AssertEquals (message, expected,
- ci.IndexOf (source, target, idx, len, opt));
- }
-
- void AssertLastIndexOf (string message, int expected,
- string source, char target)
- {
- AssertEquals (message, expected,
- invariant.LastIndexOf (source, target));
- }
-
- void AssertLastIndexOf (string message, int expected, string source,
- char target, CompareOptions opt)
- {
- AssertEquals (message, expected,
- invariant.LastIndexOf (source, target, opt));
- }
-
- void AssertLastIndexOf (string message, int expected, string source,
- char target, int idx, int len)
- {
- AssertEquals (message, expected,
- invariant.LastIndexOf (source, target, idx, len));
- }
-
- void AssertLastIndexOf (string message, int expected, string source,
- char target, int idx, int len, CompareOptions opt, CompareInfo ci)
- {
- AssertEquals (message, expected,
- ci.LastIndexOf (source, target, idx, len, opt));
- }
-
- void AssertLastIndexOf (string message, int expected,
- string source, string target)
- {
- AssertEquals (message, expected,
- invariant.LastIndexOf (source, target));
- }
-
- void AssertLastIndexOf (string message, int expected, string source,
- string target, CompareOptions opt)
- {
- AssertEquals (message, expected,
- invariant.LastIndexOf (source, target, opt));
- }
-
- void AssertLastIndexOf (string message, int expected, string source,
- string target, int idx, int len)
- {
- AssertEquals (message, expected,
- invariant.LastIndexOf (source, target, idx, len));
- }
-
- void AssertLastIndexOf (string message, int expected, string source,
- string target, int idx, int len, CompareOptions opt, CompareInfo ci)
- {
- AssertEquals (message, expected,
- ci.LastIndexOf (source, target, idx, len, opt));
- }
-
- void AssertIsPrefix (string message, bool expected, string source,
- string target)
- {
- Assert.IsTrue (message, expected == invariant.IsPrefix (
- source, target));
- }
-
- void AssertIsPrefix (string message, bool expected, string source,
- string target, CompareOptions opt)
- {
- Assert.IsTrue (message, expected == invariant.IsPrefix (
- source, target, opt));
- }
-
- void AssertIsSuffix (string message, bool expected, string source,
- string target)
- {
- Assert.IsTrue (message, expected == invariant.IsSuffix (
- source, target));
- }
-
- void AssertIsSuffix (string message, bool expected, string source,
- string target, CompareOptions opt)
- {
- Assert.IsTrue (message, expected == invariant.IsSuffix (
- source, target, opt));
- }
-
- [Test]
-#if NET_2_0
- [Category ("NotDotNet")]
-#endif
- public void CultureSensitiveCompare ()
- {
- if (!doTest)
- return;
-
- AssertCompare ("#1", -1, "1", "2");
- AssertCompare ("#2", 1, "A", "a");
- AssertCompare ("#3", 0, "A", "a", CompareOptions.IgnoreCase);
- AssertCompare ("#6", 1, "12", "1");
-// BUG in .NET 2.0: See GetSortKey() test that assures sortkeys for "AE" and
-// "\u00C6" are equivalent.
- AssertCompare ("#7", 0, "AE", "\u00C6");
- AssertCompare ("#8", 0, "AB\u01c0C", "A\u01c0B\u01c0C", CompareOptions.IgnoreSymbols);
-// BUG in .NET 2.0: ditto.
- AssertCompare ("#9", 0, "A\u0304", "\u0100");
- AssertCompare ("#10", 1, "ABCABC", 5, 1, "1", 0, 1, CompareOptions.IgnoreCase, invariant);
- AssertCompare ("#11", 0, "-d:NET_2_0", 0, 1, "-", 0, 1);
-
-// BUG in .NET 2.0: ditto.
- AssertCompare ("#12", 0, "ae", "\u00E6");
- AssertCompare ("#13", 0, "\u00E6", "ae");
- AssertCompare ("#14", 0, "\u00E6s", 0, 1, "ae", 0, 2);
-
- // target is "empty" (in culture-sensitive context).
-// BUG in .NET 2.0: \u3007 is totally-ignored character as a GetSortKey()
-// result, while it is not in Compare().
- AssertCompare ("#17", 0, String.Empty, "\u3007");
- AssertCompare ("#18", 1, "A", "\u3007");
- AssertCompare ("#19", 1, "ABC", "\u3007");
-
- // shift weight comparison
- AssertCompare ("#20", 1, "--start", "--");
- // expansion
-// BUG in .NET 2.0: the same 00C6/00E6 issue.
- AssertCompare ("#21", -1, "\u00E6", "aes");
-
-// bug #78748
- AssertCompare ("#22", -1, "++)", "+-+)");
- AssertCompare ("#23", -1, "+-+)", "+-+-)");
- AssertCompare ("#24", 1, "+-+-)", "++)");
- // BUG in .NET: it returns 1
- AssertCompare ("#25", -1, "+-+-)", "-+-+)");
- AssertCompare ("#26", -1, "+-+)", "-+-+)");
- AssertCompare ("#27", -1, "++)", "-+-+)");
- }
-
- [Test]
-#if NET_2_0
- [Category ("NotDotNet")]
-#endif
- public void CompareSpecialWeight ()
- {
- if (!doTest)
- return;
-
- // Japanese (in invariant)
-// BUG in .NET 2.0 : half-width kana should be bigger.
- AssertCompare ("#1", 1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
- AssertCompare ("#4", 1, "\u3042\u309D", "\u3042\u3042");
- AssertCompare ("#5", 0, "\u3042\u309D", "\u3042\u3042", CompareOptions.IgnoreNonSpace);
-
- // extender in target
-// BUG in .NET 2.0 : an extender should result in bigger sortkey
- AssertCompare ("#7", -1, "\u30D1\u30A2", "\u30D1\u30FC");
- AssertCompare ("#8", 0, "\u30D1\u30A2", "\u30D1\u30FC", CompareOptions.IgnoreNonSpace);
- // extender in source
-// BUG in .NET 2.0 : vice versa
- AssertCompare ("#9", 1, "\u30D1\u30FC", "\u30D1\u30A2");
- AssertCompare ("#10", 0, "\u30D1\u30FC", "\u30D1\u30A2", CompareOptions.IgnoreNonSpace);
- }
-
- [Test]
- public void IndexOfChar ()
- {
- if (!doTest)
- return;
-
- AssertIndexOf ("#1", -1, "ABC", '1');
- AssertIndexOf ("#2", 2, "ABCABC", 'c', CompareOptions.IgnoreCase);
- AssertIndexOf ("#4", 4, "ABCDE", '\u0117', ignoreCN);
- AssertIndexOf ("#5", 1, "ABCABC", 'B', 1, 5, CompareOptions.IgnoreCase, invariant);
- AssertIndexOf ("#6", 4, "ABCABC", 'B', 2, 4, CompareOptions.IgnoreCase, invariant);
- }
-
- [Test]
- [Category ("NotDotNet")]
- public void IndexOfCharMSBug ()
- {
- if (!doTest)
- return;
-
- AssertIndexOf ("#1", 0, "\u00E6", 'a');
- }
-
- [Test]
- public void LastIndexOfChar ()
- {
- if (!doTest)
- return;
-
- AssertLastIndexOf ("#1", -1, "ABC", '1');
- AssertLastIndexOf ("#2", 5, "ABCABC", 'c', CompareOptions.IgnoreCase);
- AssertLastIndexOf ("#4", 4, "ABCDE", '\u0117', ignoreCN);
- AssertLastIndexOf ("#5", 1, "ABCABC", 'B', 3, 3);
- AssertLastIndexOf ("#6", 4, "ABCABC", 'B', 4, 4);
- AssertLastIndexOf ("#7", -1, "ABCABC", 'B', 5, 1);
- AssertLastIndexOf ("#11", 0, "\\", '\\');
- Assert.AreEqual (0, new CultureInfo ("en").CompareInfo.LastIndexOf ("\\", '\\'), "#11en");
- Assert.AreEqual (0, new CultureInfo ("ja").CompareInfo.LastIndexOf ("\\", '\\'), "#11ja");
- AssertLastIndexOf ("#12", 8, "/system/web", 'w');
- Assert.AreEqual (8, new CultureInfo ("sv").CompareInfo.LastIndexOf ("/system/web", 'w'), "#12sv");
- }
-
- [Test]
- [Category ("NotDotNet")]
- public void LastIndexOfCharMSBug ()
- {
- if (!doTest)
- return;
-
- AssertIndexOf ("#1", 0, "\u00E6", 'a');
- }
-
- [Test]
-#if NET_2_0
- [Category ("NotDotNet")]
-#endif
- public void IsPrefix ()
- {
- if (!doTest)
- return;
-
- AssertIsPrefix ("#1", false, "ABC", "c", CompareOptions.IgnoreCase);
- AssertIsPrefix ("#2", false, "BC", "c", CompareOptions.IgnoreCase);
- AssertIsPrefix ("#3", true, "C", "c", CompareOptions.IgnoreCase);
- AssertIsPrefix ("#4", true, "EDCBA", "\u0117", ignoreCN);
- AssertIsPrefix ("#5", true, "ABC", "AB", CompareOptions.IgnoreCase);
-// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
- AssertIsPrefix ("#6", true, "ae", "\u00E6", CompareOptions.None);
- AssertIsPrefix ("#7", true, "\u00E6", "ae", CompareOptions.None);
-
-// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
- AssertIsPrefix ("#8", true, "\u00E6", "a", CompareOptions.None);
- AssertIsPrefix ("#9", true, "\u00E6s", "ae", CompareOptions.None);
- AssertIsPrefix ("#10", false, "\u00E6", "aes", CompareOptions.None);
- AssertIsPrefix ("#11", true, "--start", "--", CompareOptions.None);
- AssertIsPrefix ("#12", true, "-d:NET_1_1", "-", CompareOptions.None);
- AssertIsPrefix ("#13", false, "-d:NET_1_1", "@", CompareOptions.None);
- // U+3007 is completely ignored character.
- AssertIsPrefix ("#14", true, "\uff21\uff21", "\uff21", CompareOptions.None);
-// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
- AssertIsPrefix ("#15", true, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
- AssertIsPrefix ("#16", true, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
- AssertIsPrefix ("#17", true, "\\b\\a a", "\\b\\a a");
- Assert.IsTrue (new CultureInfo ("en").CompareInfo.IsPrefix ("\\b\\a a", "\\b\\a a"), "#17en");
- Assert.IsTrue (new CultureInfo ("ja").CompareInfo.IsPrefix ("\\b\\a a", "\\b\\a a"), "#17ja");
- }
-
- [Test]
- public void IsPrefixSpecialWeight ()
- {
- if (!doTest)
- return;
-
- // Japanese (in invariant)
- AssertIsPrefix ("#1", false, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
- AssertIsPrefix ("#2-2", false, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
- AssertIsPrefix ("#3-2", false, "\uFF80\uFF9E\uFF72\uFF8C\uFF9E",
- "\u30C0\u30A4\u30D6");
- AssertIsPrefix ("#4", false, "\u3042\u309D", "\u3042\u3042");
-
- // extender in target
- AssertIsPrefix ("#7", false, "\u30D1\u30A2", "\u30D1\u30FC");
- // extender in source
- AssertIsPrefix ("#9", false, "\u30D1\u30FC", "\u30D1\u30A2");
-
- // empty suffix always matches the source.
- AssertIsPrefix ("#11", true, "", "");
- AssertIsPrefix ("#12", true, "/test.css", "");
-
- // bug #76243
- AssertIsPrefix ("#13", false, "\u00e4_", "a");
- }
-
- [Test]
-#if NET_2_0
- [Category ("NotDotNet")]
-#endif
- public void IsSuffix ()
- {
- if (!doTest)
- return;
-
- AssertIsSuffix ("#1", true, "ABC", "c", CompareOptions.IgnoreCase);
- AssertIsSuffix ("#2", true, "BC", "c", CompareOptions.IgnoreCase);
- AssertIsSuffix ("#3", false, "CBA", "c", CompareOptions.IgnoreCase);
- AssertIsSuffix ("#4", true, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
- AssertIsSuffix ("#5", false, "\u00E6", "a", CompareOptions.None);
-// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
- AssertIsSuffix ("#6", true, "\u00E6", "ae", CompareOptions.None);
- AssertIsSuffix ("#7", true, "ae", "\u00E6", CompareOptions.None);
- AssertIsSuffix ("#8", false, "e", "\u00E6", CompareOptions.None);
- // U+3007 is completely ignored character.
- AssertIsSuffix ("#9", true, "\uff21\uff21", "\uff21", CompareOptions.None);
-// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
- AssertIsSuffix ("#10", true, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
- AssertIsSuffix ("#11", true, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
- // extender in target
- AssertIsSuffix ("#12", false, "\u30D1\u30A2", "\u30D1\u30FC");
- AssertIsSuffix ("#13", true, "\u30D1\u30A2", "\u30D1\u30FC", CompareOptions.IgnoreNonSpace);
- // extender in source
- AssertIsSuffix ("#14", false, "\u30D1\u30FC", "\u30D1\u30A2");
- AssertIsSuffix ("#15", true, "\u30D1\u30FC", "\u30D1\u30A2", CompareOptions.IgnoreNonSpace);
- // optimization sanity check
- AssertIsSuffix ("#16", true,
- "/configuration/system.runtime.remoting",
- "system.runtime.remoting");
-
- // empty suffix always matches the source.
- AssertIsSuffix ("#17", true, "", "");
- AssertIsSuffix ("#18", true, "/test.css", "");
- AssertIsSuffix ("#19", true, "/test.css", "/test.css");
- AssertIsSuffix ("#20", true, "\\b\\a a", "\\b\\a a");
- Assert.IsTrue (new CultureInfo ("en").CompareInfo.IsSuffix ("\\b\\a a", "\\b\\a a"), "#20en");
- Assert.IsTrue (new CultureInfo ("ja").CompareInfo.IsSuffix ("\\b\\a a", "\\b\\a a"), "#20ja");
- }
-
- [Test]
- [Category ("NotDotNet")]
- [Category ("NotWorking")]
- public void IsSuffixMSBug ()
- {
- if (!doTest)
- return;
-
- AssertIsSuffix ("#1", true, "\u00E6", "e", CompareOptions.None);
- }
-
- [Test]
-#if NET_2_0
- [Category ("NotDotNet")]
-#endif
- public void IndexOfString ()
- {
- if (!doTest)
- return;
-
- AssertIndexOf ("#1", -1, "ABC", "1", CompareOptions.None);
- AssertIndexOf ("#2", 2, "ABCABC", "c", CompareOptions.IgnoreCase);
- AssertIndexOf ("#4", 4, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
- AssertIndexOf ("#5", 1, "ABCABC", "BC", CompareOptions.IgnoreCase);
- AssertIndexOf ("#6", 1, "BBCBBC", "BC", CompareOptions.IgnoreCase);
- AssertIndexOf ("#7", -1, "ABCDEF", "BCD", 0, 3, CompareOptions.IgnoreCase, invariant);
- AssertIndexOf ("#8", 0, "-ABC", "-", CompareOptions.None);
- AssertIndexOf ("#9", 0, "--ABC", "--", CompareOptions.None);
- AssertIndexOf ("#10", -1, "--ABC", "--", 1, 2, CompareOptions.None, invariant);
-// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
- AssertIndexOf ("#11", 0, "AE", "\u00C6", CompareOptions.None);
- // U+3007 is completely ignored character.
- AssertIndexOf ("#12", 0, "\uff21\uff21", "\uff21", CompareOptions.None);
-// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
- AssertIndexOf ("#13", 0, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
- AssertIndexOf ("#14", 0, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
- AssertIndexOf ("#15", 0, "\uff21\uff21", "\u3007", CompareOptions.None);
- AssertIndexOf ("#15-2", 1, "\u3007\uff21", "\uff21", CompareOptions.None);
- // target is "empty" (in culture-sensitive context).
- AssertIndexOf ("#16", -1, String.Empty, "\u3007");
-// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
- AssertIndexOf ("#17", 0, "A", "\u3007");
- AssertIndexOf ("#18", 0, "ABC", "\u3007");
-
- AssertIndexOf ("#19", 0, "\\b\\a a", "\\b\\a a");
- Assert.AreEqual (0, new CultureInfo ("en").CompareInfo.IndexOf ("\\b\\a a", "\\b\\a a"), "#19en");
- Assert.AreEqual (0, new CultureInfo ("ja").CompareInfo.IndexOf ("\\b\\a a", "\\b\\a a"), "#19ja");
- }
-
- [Test]
- public void IndexOfSpecialWeight ()
- {
- if (!doTest)
- return;
-
- // Japanese (in invariant)
- AssertIndexOf ("#1", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
- // extender in target
- AssertIndexOf ("#1-2", -1, "\u30D1\u30A2", "\u30D1\u30FC");
- // extender in source
- AssertIndexOf ("#2-2", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
- AssertIndexOf ("#4", -1, "\u3042\u309D", "\u3042\u3042");
- }
-
- [Test]
-#if NET_2_0
- [Category ("NotDotNet")]
-#endif
- public void LastIndexOfString ()
- {
- if (!doTest)
- return;
-
- AssertLastIndexOf ("#1", -1, "ABC", "1", CompareOptions.None);
- AssertLastIndexOf ("#2", 5, "ABCABC", "c", CompareOptions.IgnoreCase);
- AssertLastIndexOf ("#4", 4, "ABCDE", "\u0117", CompareOptions.IgnoreNonSpace | CompareOptions.IgnoreCase);
- AssertLastIndexOf ("#5", 4, "ABCABC", "BC", CompareOptions.IgnoreCase);
- AssertLastIndexOf ("#6", 4, "BBCBBC", "BC", CompareOptions.IgnoreCase);
- AssertLastIndexOf ("#7", 1, "original", "rig", CompareOptions.None);
-// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
- AssertLastIndexOf ("#8", 0, "\u00E6", "ae", CompareOptions.None);
- AssertLastIndexOf ("#9", 0, "-ABC", "-", CompareOptions.None);
- AssertLastIndexOf ("#10", 0, "--ABC", "--", CompareOptions.None);
- AssertLastIndexOf ("#11", -1, "--ABC", "--", 2, 2, CompareOptions.None, invariant);
- AssertLastIndexOf ("#12", -1, "--ABC", "--", 4, 2, CompareOptions.None, invariant);
-// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
- AssertLastIndexOf ("#13", 0, "AE", "\u00C6", CompareOptions.None);
- // U+3007 is completely ignored character.
- AssertLastIndexOf ("#14", 1, "\uff21\uff21", "\uff21", CompareOptions.None);
-// BUG in .NET 2.0 : see \u3007 issue (mentioned above).
- AssertLastIndexOf ("#15", 1, "\uff21\uff21", "\u3007\uff21", CompareOptions.None);
- AssertLastIndexOf ("#16", 1, "\uff21\uff21", "\uff21\u3007", CompareOptions.None);
- AssertLastIndexOf ("#17", 1, "\uff21\uff21", "\u3007", CompareOptions.None);
- AssertLastIndexOf ("#18", 1, "\u3007\uff21", "\uff21", CompareOptions.None);
- AssertLastIndexOf ("#19", 0, "\\b\\a a", "\\b\\a a");
- Assert.AreEqual (0, new CultureInfo ("en").CompareInfo.LastIndexOf ("\\b\\a a", "\\b\\a a"), "#19en");
- Assert.AreEqual (0, new CultureInfo ("ja").CompareInfo.LastIndexOf ("\\b\\a a", "\\b\\a a"), "#19ja");
- // bug #80612
- AssertLastIndexOf ("#20", 8, "/system/web", "w");
- Assert.AreEqual (8, new CultureInfo ("sv").CompareInfo.LastIndexOf ("/system/web", "w"), "#20sv");
- }
-
- [Test]
- public void LastIndexOfSpecialWeight ()
- {
- if (!doTest)
- return;
-
- // Japanese (in invariant)
- AssertLastIndexOf ("#1", -1, "\u30D1\u30FC\u30B9", "\uFF8A\uFF9F\uFF70\uFF7D");
- // extender in target
- AssertLastIndexOf ("#1-2", -1, "\u30D1\u30A2", "\u30D1\u30FC");
- // extender in source
- AssertLastIndexOf ("#4", -1, "\u3042\u309D", "\u3042\u3042");
- }
-
- [Test]
- public void LastIndexOfOrdinalString ()
- {
- if (!doTest)
- return;
-
- AssertLastIndexOf ("#1", -1, "ABC", "1", CompareOptions.Ordinal);
- AssertLastIndexOf ("#2", 5, "ABCABC", "C", CompareOptions.Ordinal);
- AssertLastIndexOf ("#3", -1, "ABCABC", "\uFF22", CompareOptions.Ordinal);
- AssertLastIndexOf ("#4", 4, "ABCABC", "BC", CompareOptions.Ordinal);
- AssertLastIndexOf ("#5", 4, "BBCBBC", "BC", CompareOptions.Ordinal);
- AssertLastIndexOf ("#6", 1, "original", "rig", CompareOptions.Ordinal);
- AssertLastIndexOf ("#7", 0, "\\b\\a a", "\\b\\a a", CompareOptions.Ordinal);
- }
-
- [Test]
- [Category ("TargetJvmNotWorking")]
- // for bug #76702
- public void NullCharacter ()
- {
- Assert.AreEqual (-1, "MONO".IndexOf ("\0\0\0"), "#1");
- Assert.AreEqual (-1, "MONO".LastIndexOf ("\0\0\0"), "#2");
- Assert.AreEqual (1, "MONO".CompareTo ("\0\0\0"), "#3");
- }
-
- [Test]
- [Category ("NotDotNet")]
- // MS.NET treats it as equivalent, while in IndexOf() it does not match.
- public void NullCharacterWeird ()
- {
- Assert.AreEqual (-1, "MONO".CompareTo ("MONO\0\0\0"), "#4");
- }
-
-#if NET_2_0
- [Test]
- [Category ("NotDotNet")]
- public void OrdinalIgnoreCaseCompare ()
- {
- if (!doTest)
- return;
-
- // matches
-// BUG in .NET 2.0 : see GetSortKey() test (mentioned above).
- AssertCompare ("#1", 0, "AE", "\u00C6", CompareOptions.None);
-// BUG in .NET 2.0 : It raises inappropriate ArgumentException.
- // should not match since it is Ordinal
- AssertCompare ("#2", -133, "AE", "\u00C6", CompareOptions.OrdinalIgnoreCase);
-
- AssertCompare ("#3", 1, "AE", "\u00E6", CompareOptions.None);
- // matches
- AssertCompare ("#4", 0, "AE", "\u00E6", CompareOptions.IgnoreCase);
- // should not match since it is Ordinal
- AssertCompare ("#5", -133, "AE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
-
- AssertCompare ("#6", 0, "AE", "ae", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#7", 0, "aE", "ae", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#8", 0, "aE", "ae", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#9", 0, "ae", "ae", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#10", 0, "AE", "AE", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#11", 0, "aE", "AE", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#12", 0, "aE", "AE", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#13", 0, "ae", "AE", CompareOptions.OrdinalIgnoreCase);
- AssertCompare ("#14", 0, "ola", "OLA", CompareOptions.OrdinalIgnoreCase);
- }
-
- [Test]
- public void OrdinalIgnoreCaseIndexOf ()
- {
- AssertIndexOf ("#1-1", 0, "ABC", "abc", CompareOptions.OrdinalIgnoreCase);
- AssertIndexOf ("#1-2", -1, "AEBECE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
- AssertIndexOf ("#1-3", -1, "@_@", "`_`", CompareOptions.OrdinalIgnoreCase);
- }
-
- [Test]
- public void OrdinalIgnoreCaseIndexOfChar ()
- {
- AssertIndexOf ("#2-1", 0, "ABC", 'a', CompareOptions.OrdinalIgnoreCase);
- AssertIndexOf ("#2-2", -1, "AEBECE", '\u00C0', CompareOptions.OrdinalIgnoreCase);
- AssertIndexOf ("#2-3", -1, "@_@", '`', CompareOptions.OrdinalIgnoreCase);
- }
-
- [Test]
- public void OrdinalIgnoreCaseLastIndexOf ()
- {
- AssertLastIndexOf ("#1-1", 0, "ABC", "abc", CompareOptions.OrdinalIgnoreCase);
- AssertLastIndexOf ("#1-2", -1, "AEBECE", "\u00E6", CompareOptions.OrdinalIgnoreCase);
- AssertLastIndexOf ("#1-3", -1, "@_@", "`_`", CompareOptions.OrdinalIgnoreCase);
- AssertLastIndexOf ("#1-4", 1, "ABCDE", "bc", CompareOptions.OrdinalIgnoreCase);
- AssertLastIndexOf ("#1-5", -1, "BBBBB", "ab", CompareOptions.OrdinalIgnoreCase);
- }
-
- [Test]
- public void OrdinalIgnoreCaseLastIndexOfChar ()
- {
- AssertLastIndexOf ("#2-1", 0, "ABC", 'a', CompareOptions.OrdinalIgnoreCase);
- AssertLastIndexOf ("#2-2", -1, "AEBECE", '\u00C0', CompareOptions.OrdinalIgnoreCase);
- AssertLastIndexOf ("#2-3", -1, "@_@", '`', CompareOptions.OrdinalIgnoreCase);
- }
-
- [Test] // bug #80865
- public void IsPrefixOrdinalIgnoreCase ()
- {
- Assert ("aaaa".StartsWith ("A", StringComparison.OrdinalIgnoreCase));
- }
-#endif
-}
-
-}
diff --git a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
index e5629d2eb09..496c20fe736 100644
--- a/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Globalization/CultureInfoTest.cs
@@ -235,7 +235,6 @@ namespace MonoTests.System.Globalization
}
[Test]
- [Category ("TargetJvmNotWorking")] //OptionalCalendars not yet supported for TARGET_JVM.
// make sure that all CultureInfo holds non-null calendars.
public void OptionalCalendars ()
{
diff --git a/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs
index ab2dac11edd..7850f3f58dc 100644
--- a/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Globalization/DateTimeFormatInfoTest.cs
@@ -133,7 +133,6 @@ namespace MonoTests.System.Globalization
Assert.AreEqual ("dddd, d' ta\\' 'MMMM yyyy", culture.DateTimeFormat.LongDatePattern);
}
-#if !TARGET_JVM
[Test]
public void Bug78569 ()
{
@@ -143,7 +142,6 @@ namespace MonoTests.System.Globalization
DateTime dt2 = DateTime.Parse (s, ci);
Assert.AreEqual (dt.Month, dt2.Month);
}
-#endif
}
}
diff --git a/mcs/class/corlib/Test/System.Globalization/DaylightTimeTest.cs b/mcs/class/corlib/Test/System.Globalization/DaylightTimeTest.cs
index 76edd4cff51..664249597e2 100644
--- a/mcs/class/corlib/Test/System.Globalization/DaylightTimeTest.cs
+++ b/mcs/class/corlib/Test/System.Globalization/DaylightTimeTest.cs
@@ -78,11 +78,7 @@ namespace MonoTests.System.Globalization {
public void DeserializeKnownValue ()
{
MemoryStream ms = new MemoryStream (serialized_daylighttime);
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
DaylightTime dt = (DaylightTime) bf.Deserialize (ms);
Assert.AreEqual (DateTime.MinValue, dt.Start, "Start");
Assert.AreEqual (DateTime.MaxValue, dt.End, "End");
diff --git a/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs b/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs
index 07a8cd33acd..3e34c81352a 100644
--- a/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs
+++ b/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs
@@ -10,6 +10,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
@@ -967,7 +968,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
@@ -975,7 +975,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTimeUtc ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
@@ -983,7 +982,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTime ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
@@ -991,7 +989,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeUtc ()
{
DirectoryInfo info = new DirectoryInfo (TempFolder);
@@ -1063,6 +1060,23 @@ namespace MonoTests.System.IO
Assert.AreEqual (TempFolder + DSC + "ToString.Test", info.ToString ());
}
+#if NET_4_0
+ [Test]
+ public void EnumerateFileSystemInfosTest ()
+ {
+ var dirInfo = new DirectoryInfo (TempFolder);
+ dirInfo.CreateSubdirectory ("1").CreateSubdirectory ("a");
+ dirInfo.CreateSubdirectory ("2").CreateSubdirectory ("b");
+
+ var l = new List<string> ();
+ foreach (var info in dirInfo.EnumerateFileSystemInfos ("*", SearchOption.AllDirectories))
+ l.Add (info.Name);
+
+ l.Sort ();
+ Assert.AreEqual ("1,2,a,b", string.Join (",", l), "#1");
+ }
+#endif
+
#if !MOBILE
[Test]
public void Serialization ()
@@ -1115,7 +1129,7 @@ namespace MonoTests.System.IO
try {
Directory.CreateDirectory (path);
Directory.CreateDirectory (dir);
- Mono.Unix.UnixSymbolicLinkInfo li = new Mono.Unix.UnixSymbolicLinkInfo (link);
+ global::Mono.Unix.UnixSymbolicLinkInfo li = new global::Mono.Unix.UnixSymbolicLinkInfo (link);
li.CreateSymbolicLinkTo (dir);
DirectoryInfo info = new DirectoryInfo (path);
diff --git a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
index 77a2746f5f5..f2d7e03d3d6 100644
--- a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
+++ b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs
@@ -364,7 +364,7 @@ public class DirectoryTest
Assert.IsFalse (Directory.Exists (null as string));
}
-#if !TARGET_JVM && !MOBILE // We don't support yet the Process class.
+#if !MOBILE // We don't support yet the Process class.
[Test] // bug #78239
public void ExistsAccessDenied ()
{
@@ -374,18 +374,17 @@ public class DirectoryTest
string path = TempFolder + DSC + "ExistsAccessDenied";
Directory.CreateDirectory (path);
- Mono.Posix.Syscall.chmod (path, 0);
+ global::Mono.Posix.Syscall.chmod (path, 0);
try {
Assert.IsFalse (Directory.Exists(path + DSC + "b"));
} finally {
- Mono.Posix.Syscall.chmod (path, (Mono.Posix.FileMode) 755);
+ global::Mono.Posix.Syscall.chmod (path, (global::Mono.Posix.FileMode) 755);
Directory.Delete (path);
}
}
#endif
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
[ExpectedException(typeof(ArgumentNullException))]
public void GetCreationTimeException1 ()
{
@@ -394,7 +393,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException2 ()
{
Directory.GetCreationTime (string.Empty);
@@ -404,7 +402,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException(typeof(IOException))]
#endif
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetCreationTime.1";
@@ -428,7 +425,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException4 ()
{
Directory.GetCreationTime (" ");
@@ -436,7 +432,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeException5 ()
{
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());
@@ -444,7 +439,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException1 ()
{
Directory.GetCreationTimeUtc (null as string);
@@ -452,7 +446,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException2 ()
{
Directory.GetCreationTimeUtc (string.Empty);
@@ -462,7 +455,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetCreationTimeUtc.1";
@@ -486,7 +478,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException4 ()
{
Directory.GetCreationTimeUtc (" ");
@@ -494,7 +485,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtcException5 ()
{
Directory.GetCreationTime (Path.InvalidPathChars [0].ToString ());
@@ -502,7 +492,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Null ()
{
Directory.GetLastAccessTime (null as string);
@@ -510,7 +499,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException2 ()
{
Directory.GetLastAccessTime (string.Empty);
@@ -520,7 +508,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTime.1";
@@ -545,7 +532,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException4 ()
{
Directory.GetLastAccessTime (" ");
@@ -553,7 +539,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeException5 ()
{
Directory.GetLastAccessTime (Path.InvalidPathChars [0].ToString ());
@@ -561,7 +546,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Null ()
{
Directory.GetLastAccessTimeUtc (null as string);
@@ -569,7 +553,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException2 ()
{
Directory.GetLastAccessTimeUtc (string.Empty);
@@ -579,7 +562,6 @@ public class DirectoryTest
#if !NET_2_0
[ExpectedException (typeof (IOException))]
#endif
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTimeUtc.1";
@@ -602,7 +584,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException4 ()
{
Directory.GetLastAccessTimeUtc (" ");
@@ -610,7 +591,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtcException5 ()
{
Directory.GetLastAccessTimeUtc (Path.InvalidPathChars [0].ToString ());
@@ -1002,7 +982,6 @@ public class DirectoryTest
}
[Test]
- [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTime ()
{
if (RunningOnUnix)
@@ -1053,7 +1032,6 @@ public class DirectoryTest
}
[Test]
- [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + DSC + "DirectoryTest.AccessTime.1";
@@ -1275,7 +1253,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1284,7 +1261,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1293,7 +1269,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1308,7 +1283,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1317,7 +1291,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1343,7 +1316,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1352,7 +1324,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1361,7 +1332,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1376,7 +1346,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1385,7 +1354,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtcException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1410,7 +1378,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1419,7 +1386,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1428,7 +1394,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1444,7 +1409,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1453,7 +1417,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1480,7 +1443,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentNullException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException1 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1489,7 +1451,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException2 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1498,7 +1459,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(FileNotFoundException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException3 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1515,7 +1475,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException4 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
@@ -1524,7 +1483,6 @@ public class DirectoryTest
[Test]
[ExpectedException(typeof(ArgumentException))]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtcException5 ()
{
DateTime time = new DateTime (2003, 4, 6, 6, 4, 2);
diff --git a/mcs/class/corlib/Test/System.IO/FileInfoTest.cs b/mcs/class/corlib/Test/System.IO/FileInfoTest.cs
index eb2a0edd6e4..297a54bf74b 100644
--- a/mcs/class/corlib/Test/System.IO/FileInfoTest.cs
+++ b/mcs/class/corlib/Test/System.IO/FileInfoTest.cs
@@ -1147,7 +1147,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
public void OpenRead_FileLock ()
{
string path = TempFolder + DSC + "FIT.OpenReadIOException.Test";
diff --git a/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs b/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs
index 52038c997b1..445c646b7d4 100644
--- a/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs
+++ b/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs
@@ -63,12 +63,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4");
Assert.AreEqual ("message", fnf.Message, "#5");
Assert.IsNull (fnf.FusionLog, "#6");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"),"#7");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#7");
-#endif
}
[Test]
@@ -84,12 +80,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4");
Assert.AreEqual (string.Empty, fnf.Message, "#5");
Assert.IsNull (fnf.FusionLog, "#6");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": "), "#7");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": ",
fnf.ToString (), "#7");
-#endif
}
[Test]
@@ -108,7 +100,7 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4"); // File or assembly name (null), or ...
#endif
Assert.IsNull (fnf.FusionLog, "#5");
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
Assert.AreEqual (fnf.GetType ().FullName + ": ",
fnf.ToString (), "#6");
#else
@@ -132,13 +124,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual ("message", fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message ---> "
- + ame.GetType().FullName + ": something"), "#8");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": message ---> "
+ ame.GetType ().FullName + ": something", fnf.ToString (), "#8");
-#endif
}
[Test]
@@ -156,13 +143,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual (string.Empty, fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": ---> "
- + ame.GetType().FullName + ": something"), "#8");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": ---> "
+ ame.GetType ().FullName + ": something", fnf.ToString (), "#8");
-#endif
}
[Test]
@@ -184,13 +166,8 @@ namespace MonoTests.System.IO {
#endif
Assert.IsNull (fnf.FusionLog, "#6");
#if NET_2_0
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": ---> "
- + ame.GetType().FullName + ": something"), "#7");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": ---> "
+ ame.GetType ().FullName + ": something", fnf.ToString (), "#7");
-#endif
#else
Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName), "#7");
Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#9");
@@ -211,12 +188,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#4");
Assert.AreEqual ("message", fnf.Message, "#5");
Assert.IsNull (fnf.FusionLog, "#6");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"), "#7");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#7");
-#endif
}
[Test]
@@ -260,12 +233,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual ("message", fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"), "#8");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#8");
-#endif
}
[Test]
@@ -282,13 +251,9 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#A4");
Assert.AreEqual ("message", fnf.Message, "#A5");
Assert.IsNull (fnf.FusionLog, "#A6");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": message"), "#A7");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": message",
fnf.ToString (), "#A7");
-#endif
fnf = new FileNotFoundException (string.Empty, (string) null);
@@ -300,12 +265,8 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#B4");
Assert.AreEqual (string.Empty, fnf.Message, "#B5");
Assert.IsNull (fnf.FusionLog, "#B6");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": "), "#B7");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": ",
fnf.ToString (), "#B7");
-#endif
}
[Test]
@@ -323,11 +284,7 @@ namespace MonoTests.System.IO {
Assert.IsNotNull (fnf.Message, "#5");
Assert.AreEqual (string.Empty, fnf.Message, "#6");
Assert.IsNull (fnf.FusionLog, "#7");
-#if TARGET_JVM
- Assert.IsTrue(fnf.ToString().StartsWith(fnf.GetType().FullName + ": "), "#8");
-#else
Assert.AreEqual (fnf.GetType ().FullName + ": ", fnf.ToString (), "#8");
-#endif
}
[Test]
@@ -349,9 +306,7 @@ namespace MonoTests.System.IO {
Assert.IsNull (fnf.FusionLog, "#5");
Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName
+ ": "), "#6");
-#if !TARGET_JVM
Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#7");
-#endif
Assert.IsFalse (fnf.ToString ().IndexOf ("''") != -1, "#8");
}
@@ -422,9 +377,7 @@ namespace MonoTests.System.IO {
Assert.IsNull (fnf.FusionLog, "#B6");
Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName
+ ": "), "#B7");
-#if !TARGET_JVM
Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#B8");
-#endif
#if NET_2_0
Assert.IsTrue (fnf.ToString ().IndexOf ("''") != -1, "#B9");
#else
diff --git a/mcs/class/corlib/Test/System.IO/FileStreamTest.cs b/mcs/class/corlib/Test/System.IO/FileStreamTest.cs
index 51d352d0dd8..92a3b0147ec 100644
--- a/mcs/class/corlib/Test/System.IO/FileStreamTest.cs
+++ b/mcs/class/corlib/Test/System.IO/FileStreamTest.cs
@@ -706,7 +706,6 @@ namespace MonoTests.System.IO
}
}
-#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
[Test, ExpectedException (typeof (IOException))]
public void CtorIOException2 ()
{
@@ -718,9 +717,7 @@ namespace MonoTests.System.IO
stream.Close ();
}
}
-#endif // TARGET_JVM
- [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[Test, ExpectedException (typeof (IOException))]
public void CtorIOException ()
{
@@ -768,7 +765,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[ExpectedException (typeof (IOException))]
public void CtorAccess1Read2Write ()
{
@@ -794,7 +790,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // File sharing not supported for TARGET_JVM
[ExpectedException (typeof (IOException))]
public void CtorAccess1Write2Write ()
{
@@ -1022,7 +1017,6 @@ namespace MonoTests.System.IO
DeleteFile (path);
}
- [Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
public void TestLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "TestLock";
@@ -1311,7 +1305,6 @@ namespace MonoTests.System.IO
}
}
-#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
// Check that the stream is flushed even when it doesn't own the
// handle
[Test]
@@ -1331,7 +1324,6 @@ namespace MonoTests.System.IO
Assert.AreEqual ((int) '1', s.ReadByte ());
s.Close ();
}
-#endif // TARGET_JVM
private void DeleteFile (string path)
{
@@ -1447,14 +1439,12 @@ namespace MonoTests.System.IO
}
}
-#if !TARGET_JVM // No support IntPtr file handles under TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void Constructor_InvalidFileHandle ()
{
new FileStream ((IntPtr) (-1L), FileAccess.Read);
}
-#endif // TARGET_JVM
[Test]
public void PositionAfterSetLength ()
@@ -1493,7 +1483,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // Async IO not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginRead_Disposed ()
{
@@ -1505,7 +1494,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // Async IO not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void BeginWrite_Disposed ()
{
@@ -1546,7 +1534,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void Lock_Disposed ()
{
@@ -1558,7 +1545,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // File locking not supported for TARGET_JVM
[ExpectedException (typeof (ObjectDisposedException))]
public void Unlock_Disposed ()
{
@@ -1621,7 +1607,6 @@ namespace MonoTests.System.IO
}
}
- [Category("TargetJvmNotSupported")] // FileOptions.DeleteOnClose not supported for TARGET_JVM
[Test]
public void DeleteOnClose ()
{
diff --git a/mcs/class/corlib/Test/System.IO/FileSystemInfoTest.cs b/mcs/class/corlib/Test/System.IO/FileSystemInfoTest.cs
index 583befd172c..6fbf68be609 100644
--- a/mcs/class/corlib/Test/System.IO/FileSystemInfoTest.cs
+++ b/mcs/class/corlib/Test/System.IO/FileSystemInfoTest.cs
@@ -72,7 +72,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeFile ()
{
if (Unix)
@@ -125,7 +124,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeDirectory ()
{
if (Unix)
@@ -166,7 +164,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // CreationTime not supported for TARGET_JVM
public void CreationTimeNoFileOrDirectory ()
{
string path = TempFolder + DSC + "FSIT.CreationTimeNoFile.Test";
@@ -216,7 +213,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void DefaultLastAccessTime ()
{
string path = TempFolder + DSC + "FSIT.DefaultLastAccessTime.Test";
@@ -239,7 +235,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + DSC + "FSIT.LastAccessTime.Test";
@@ -282,7 +277,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // LastAccessTime not supported for TARGET_JVM
public void DefaultLastWriteTime ()
{
string path = TempFolder + DSC + "FSIT.DefaultLastWriteTime.Test";
diff --git a/mcs/class/corlib/Test/System.IO/FileTest.cs b/mcs/class/corlib/Test/System.IO/FileTest.cs
index 84c55b48609..05c2241144d 100644
--- a/mcs/class/corlib/Test/System.IO/FileTest.cs
+++ b/mcs/class/corlib/Test/System.IO/FileTest.cs
@@ -1107,7 +1107,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void TestGetCreationTime ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "baz";
@@ -1123,7 +1122,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void CreationTime ()
{
if (RunningOnUnix)
@@ -1166,7 +1164,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void LastAccessTime ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "lastAccessTime";
@@ -1261,7 +1258,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_Null ()
{
try {
@@ -1276,7 +1272,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_Empty ()
{
try {
@@ -1292,7 +1287,6 @@ namespace MonoTests.System.IO
}
[Test]
- //[Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeException3";
@@ -1322,7 +1316,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_Whitespace ()
{
try {
@@ -1338,7 +1331,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTime_Path_InvalidPathChars ()
{
try {
@@ -1354,7 +1346,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_Null ()
{
try {
@@ -1369,7 +1360,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_Empty ()
{
try {
@@ -1385,7 +1375,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeUtcException3";
@@ -1414,7 +1403,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_Whitespace ()
{
try {
@@ -1430,7 +1418,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetCreationTime not supported for TARGET_JVM
public void GetCreationTimeUtc_Path_InvalidPathChars ()
{
try {
@@ -1446,7 +1433,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_Null ()
{
try {
@@ -1461,7 +1447,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_Empty ()
{
try {
@@ -1477,7 +1462,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeException3";
@@ -1507,7 +1491,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_Whitespace ()
{
try {
@@ -1523,7 +1506,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTime_Path_InvalidPathChars ()
{
try {
@@ -1539,7 +1521,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_Null ()
{
try {
@@ -1554,7 +1535,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_Empty ()
{
try {
@@ -1570,7 +1550,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeUtcException3";
@@ -1599,7 +1578,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_Whitespace ()
{
try {
@@ -1615,7 +1593,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // GetLastAccessTime not supported for TARGET_JVM
public void GetLastAccessTimeUtc_Path_InvalidPathChars ()
{
try {
@@ -1824,7 +1801,6 @@ namespace MonoTests.System.IO
// SetCreationTime and SetCreationTimeUtc exceptions
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_Null ()
{
try {
@@ -1839,7 +1815,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_Empty ()
{
try {
@@ -1855,7 +1830,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_Whitespace ()
{
try {
@@ -1871,7 +1845,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@@ -1891,7 +1864,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeFileNotFoundException1";
@@ -1927,7 +1899,6 @@ namespace MonoTests.System.IO
// }
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTime_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "CreationTimeIOException1";
@@ -1954,7 +1925,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_Null ()
{
try {
@@ -1969,7 +1939,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_Empty ()
{
try {
@@ -1985,7 +1954,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_Whitespace ()
{
try {
@@ -2001,7 +1969,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@@ -2021,7 +1988,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcFileNotFoundException1";
@@ -2057,7 +2023,6 @@ namespace MonoTests.System.IO
// }
[Test]
- [Category("TargetJvmNotSupported")] // SetCreationTime not supported for TARGET_JVM
public void SetCreationTimeUtc_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetCreationTimeUtcIOException1";
@@ -2086,7 +2051,6 @@ namespace MonoTests.System.IO
// SetLastAccessTime and SetLastAccessTimeUtc exceptions
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_Null ()
{
try {
@@ -2101,7 +2065,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_Empty ()
{
try {
@@ -2117,7 +2080,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_Whitespace ()
{
try {
@@ -2133,7 +2095,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@@ -2153,7 +2114,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeFileNotFoundException1";
@@ -2189,7 +2149,6 @@ namespace MonoTests.System.IO
// }
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTime_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "LastAccessIOException1";
@@ -2216,7 +2175,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_Null ()
{
try {
@@ -2231,7 +2189,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetCLastAccessTimeUtc_Path_Empty ()
{
try {
@@ -2247,7 +2204,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_Whitespace ()
{
try {
@@ -2263,7 +2219,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_InvalidPathChars ()
{
// On Unix there are no invalid path chars.
@@ -2283,7 +2238,6 @@ namespace MonoTests.System.IO
}
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_Path_DoesNotExist ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcFileNotFoundException1";
@@ -2319,7 +2273,6 @@ namespace MonoTests.System.IO
// }
[Test]
- [Category("TargetJvmNotSupported")] // SetLastAccessTime not supported for TARGET_JVM
public void SetLastAccessTimeUtc_FileLock ()
{
string path = TempFolder + Path.DirectorySeparatorChar + "SetLastAccessTimeUtcIOException1";
diff --git a/mcs/class/corlib/Test/System.IO/PathTest.cs b/mcs/class/corlib/Test/System.IO/PathTest.cs
index d0314abe63f..24c66a5fba6 100644
--- a/mcs/class/corlib/Test/System.IO/PathTest.cs
+++ b/mcs/class/corlib/Test/System.IO/PathTest.cs
@@ -545,6 +545,16 @@ namespace MonoTests.System.IO
Assert.AreEqual (Environment.CurrentDirectory, Path.GetFullPath ("."), "#03");
Assert.AreEqual (Path.Combine (Environment.CurrentDirectory, "hey"),
Path.GetFullPath ("hey"), "#04");
+ Assert.AreEqual ("/", Path.GetFullPath ("/"), "#01");
+
+ string curdir = Directory.GetCurrentDirectory ();
+ try {
+ Directory.SetCurrentDirectory ("/");
+ Assert.AreEqual ("/test.txt", Path.GetFullPath ("test.txt"), "xambug #833");
+ }
+ finally {
+ Directory.SetCurrentDirectory (curdir);
+ }
}
[Test]
@@ -765,9 +775,7 @@ namespace MonoTests.System.IO
{
if (Windows) {
Assert.AreEqual (@"Z:\", Path.GetFullPath ("Z:"), "GetFullPath w#01");
-#if !TARGET_JVM // Java full (canonical) path always starts with caps drive letter
Assert.AreEqual (@"c:\abc\def", Path.GetFullPath (@"c:\abc\def"), "GetFullPath w#02");
-#endif
Assert.IsTrue (Path.GetFullPath (@"\").EndsWith (@"\"), "GetFullPath w#03");
// "\\\\" is not allowed
Assert.IsTrue (Path.GetFullPath ("/").EndsWith (@"\"), "GetFullPath w#05");
@@ -1037,11 +1045,7 @@ namespace MonoTests.System.IO
string curdir = Directory.GetCurrentDirectory ();
try {
-#if TARGET_JVM
- string system = "C:\\WINDOWS\\system32\\";
-#else
string system = Environment.SystemDirectory;
-#endif
Directory.SetCurrentDirectory (system);
string drive = system.Substring (0, 2);
Assert.AreEqual (system, Path.GetFullPath (drive), "current dir");
@@ -1062,11 +1066,7 @@ namespace MonoTests.System.IO
string curdir = Directory.GetCurrentDirectory ();
try {
-#if TARGET_JVM
- string system = "C:\\WINDOWS\\system32\\";
-#else
string system = Environment.SystemDirectory;
-#endif
Directory.SetCurrentDirectory (system);
// e.g. C:dir (no backslash) will return CurrentDirectory + dir
string dir = system.Substring (0, 2) + "dir";
@@ -1078,9 +1078,6 @@ namespace MonoTests.System.IO
}
#endif
[Test]
-#if TARGET_JVM
- [Ignore("Java full (canonical) path always returns windows dir in caps")]
-#endif
public void WindowsDriveC14N_77058 ()
{
// check for Unix platforms - see FAQ for more details
diff --git a/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs b/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs
index 5805df02cb5..8d1b9887528 100644
--- a/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs
+++ b/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs
@@ -10,7 +10,7 @@
// Copyright (C) 2004, 2009 Novell (http://www.novell.com)
//
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
using System;
using System.Collections;
using System.IO;
diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
index 7953d462507..382f3f25527 100644
--- a/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
@@ -51,7 +51,7 @@ namespace MonoTests.System.Reflection.Emit
[TestFixture]
public class TypeBuilderTest
{
- private interface AnInterface
+ public interface AnInterface
{
}
@@ -11122,5 +11122,17 @@ namespace MonoTests.System.Reflection.Emit
var ins4 = ins3.Bar ();
Assert.IsNotNull (ins4);
}
+
+ // #22059
+ [Test]
+ [ExpectedException (typeof (TypeLoadException))]
+ public void PrivateIface ()
+ {
+ TypeBuilder tb = module.DefineType ("Sample", TypeAttributes.Public, typeof (object), new[] { typeof (IFoo) });
+ tb.CreateType();
+ }
+
+ interface IFoo {
+ }
}
}
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
index ae086137d5a..28b2a8b36ef 100644
--- a/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/AssemblyNameTest.cs
@@ -13,7 +13,7 @@ using System;
using System.Configuration.Assemblies;
using System.IO;
using System.Reflection;
-#if !TARGET_JVM && !MOBILE
+#if !MOBILE
using System.Reflection.Emit;
#endif
using System.Runtime.Serialization;
@@ -31,9 +31,7 @@ public class AssemblyNameTest {
private string tempDir = Path.Combine (Path.GetTempPath (), "MonoTests.System.Reflection.AssemblyNameTest");
-#if !TARGET_JVM // Thread.GetDomain is not supported for TARGET_JVM.
private AppDomain domain;
-#endif // TARGET_JVM
// created with "sn -o test.snk test.txt"
static byte[] keyPair = {
@@ -154,9 +152,7 @@ public class AssemblyNameTest {
Directory.CreateDirectory (tempDir);
-#if !TARGET_JVM // Thread.GetDomain is not supported for TARGET_JVM.
domain = Thread.GetDomain ();
-#endif // TARGET_JVM
}
[TearDown]
@@ -761,7 +757,7 @@ public class AssemblyNameTest {
return assemblyName;
}
-#if !TARGET_JVM && !MOBILE // Reflection.Emit is not supported for TARGET_JVM.
+#if !MOBILE
private Assembly GenerateAssembly (AssemblyName name)
{
AssemblyBuilder ab = domain.DefineDynamicAssembly (
@@ -892,7 +888,7 @@ public class AssemblyNameTest {
ab = GenerateDynamicAssembly (name);
Assert.AreEqual ("1.2.0.0", ab.GetName ().Version.ToString (), "1.2.0.0 dynamic");
}
-#endif // TARGET_JVM
+#endif
[Test]
public void HashAlgorithm ()
@@ -983,7 +979,6 @@ public class AssemblyNameTest {
Assert.AreEqual (an.GetPublicKeyToken (), dsAssemblyName.GetPublicKeyToken (), "PublicToken");
}
-#if !TARGET_JVM // Assemblyname.GetObjectData not implemented yet for TARGET_JVM
[Test]
public void GetObjectData_Info_Null ()
{
@@ -999,7 +994,6 @@ public class AssemblyNameTest {
Assert.AreEqual ("info", ex.ParamName, "#6");
}
}
-#endif // TARGET_JVM
[Test]
public void Clone_Corlib ()
@@ -1166,7 +1160,6 @@ public class AssemblyNameTest {
}
[Test] // ctor (String)
- [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM.
public void Constructor1_Full ()
{
const string assemblyName = "TestAssembly";
@@ -1768,7 +1761,6 @@ public class AssemblyNameTest {
}
[Test] // ctor (String)
- [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM.
public void Constructor1_Version ()
{
const string assemblyName = "TestAssembly";
diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
index 088deb72c03..8ff66095363 100644
--- a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
@@ -35,7 +35,7 @@ using System.Configuration.Assemblies;
using System.Globalization;
using System.IO;
using System.Reflection;
-#if !TARGET_JVM && !MONOTOUCH
+#if !MONOTOUCH
using System.Reflection.Emit;
#endif
using System.Threading;
@@ -141,18 +141,18 @@ namespace MonoTests.System.Reflection
string fname = AppDomain.CurrentDomain.FriendlyName;
if (fname.EndsWith (".dll")) { // nunit-console
Assert.IsNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
-#if NET_2_0 && !TARGET_JVM // IsDefaultAppDomain not supported for TARGET_JVM
+#if NET_2_0
Assert.IsFalse (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain");
#endif
} else { // gnunit
Assert.IsNotNull (Assembly.GetEntryAssembly (), "GetEntryAssembly");
-#if NET_2_0 && !TARGET_JVM // IsDefaultAppDomain not supported for TARGET_JVM
+#if NET_2_0
Assert.IsTrue (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain");
#endif
}
}
-#if !TARGET_JVM && !MONOTOUCH // Reflection.Emit is not supported.
+#if !MONOTOUCH // Reflection.Emit is not supported.
[Test]
public void GetModules_MissingFile ()
{
@@ -177,7 +177,6 @@ namespace MonoTests.System.Reflection
}
#endif
-#if !TARGET_JVM // ManifestModule not supported under TARGET_JVM.
[Category ("NotWorking")]
[Test]
public void Corlib ()
@@ -224,7 +223,6 @@ namespace MonoTests.System.Reflection
Assert.IsNotNull (corlib_test.ManifestModule, "ManifestModule");
Assert.IsFalse (corlib_test.ReflectionOnly, "ReflectionOnly");
}
-#endif
[Test]
public void GetAssembly ()
@@ -234,7 +232,6 @@ namespace MonoTests.System.Reflection
}
[Test]
- [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
public void GetFile_Null ()
{
try {
@@ -249,7 +246,6 @@ namespace MonoTests.System.Reflection
}
[Test]
- [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
public void GetFile_Empty ()
{
try {
@@ -265,7 +261,6 @@ namespace MonoTests.System.Reflection
}
[Test]
- [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
public void GetFiles_False ()
{
Assembly corlib = typeof (int).Assembly;
@@ -278,7 +273,6 @@ namespace MonoTests.System.Reflection
}
[Test]
- [Category("TargetJvmNotWorking")] // Not yet supported for TARGET_JVM
public void GetFiles_True ()
{
Assembly corlib = typeof (int).Assembly;
@@ -427,7 +421,6 @@ namespace MonoTests.System.Reflection
Assert.Fail ("Was not able to load any corlib test");
}
-#if !TARGET_JVM // GetObjectData currently not implemented for Assembly.
[Test]
public void GetObjectData_Info_Null ()
{
@@ -444,7 +437,6 @@ namespace MonoTests.System.Reflection
Assert.AreEqual ("info", ex.ParamName, "#6");
}
}
-#endif // TARGET_JVM
[Test]
public void GetReferencedAssemblies ()
@@ -466,7 +458,7 @@ namespace MonoTests.System.Reflection
}
}
-#if !TARGET_JVM && !MONOTOUCH // Reflection.Emit is not supported.
+#if !MONOTOUCH // Reflection.Emit is not supported.
[Test]
public void Location_Empty() {
string assemblyFileName = Path.Combine (
@@ -1085,7 +1077,7 @@ namespace MonoTests.System.Reflection
Directory.Delete (outdir, true);
}
-#endif // TARGET_JVM
+#endif
[Test]
public void ManifestModule ()
diff --git a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
index cd49ced74fd..ccd923fa59c 100644
--- a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs
@@ -31,9 +31,9 @@
using System;
using System.Threading;
using System.Reflection;
-#if !TARGET_JVM && !MONOTOUCH
+#if !MONOTOUCH
using System.Reflection.Emit;
-#endif // TARGET_JVM
+#endif
using System.Runtime.InteropServices;
using NUnit.Framework;
@@ -397,7 +397,6 @@ namespace MonoTests.System.Reflection
typeof (Foo).GetField ("static_field").GetValue (typeof (int));
}
-#if !TARGET_JVM // ReflectionOnlyLoad not supported for TARGET_JVM
[Test]
[ExpectedException (typeof (InvalidOperationException))]
public void GetValueOnRefOnlyAssembly ()
@@ -417,7 +416,6 @@ namespace MonoTests.System.Reflection
FieldInfo f = t.GetField ("RefOnlyField", BindingFlags.Static | BindingFlags.NonPublic);
f.SetValue (null, 8);
}
-#endif // TARGET_JVM
const int literal = 42;
@@ -453,7 +451,6 @@ namespace MonoTests.System.Reflection
Assert.AreEqual (null, fi2.GetValue (t));
}
-#if !TARGET_JVM // TypeBuilder not supported for TARGET_JVM
[Test]
public void NonPublicTests ()
{
@@ -468,7 +465,6 @@ namespace MonoTests.System.Reflection
fi = t.GetField ("protectedField", BindingFlags.NonPublic | BindingFlags.Instance);
Assert.IsNotNull (fi);
}
-#endif // TARGET_JVM
[Test]
public void GetRawDefaultValue ()
diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
index ab281cb8178..65adf97aa51 100644
--- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
@@ -51,10 +51,8 @@ namespace MonoTests.System.Reflection
[TestFixture]
public class MethodInfoTest
{
-#if !TARGET_JVM
[DllImport ("libfoo", EntryPoint="foo", CharSet=CharSet.Unicode, ExactSpelling=false, PreserveSig=true, SetLastError=true, BestFitMapping=true, ThrowOnUnmappableChar=true)]
public static extern void dllImportMethod ();
-#endif
[MethodImplAttribute(MethodImplOptions.PreserveSig)]
public void preserveSigMethod ()
{
@@ -128,7 +126,6 @@ namespace MonoTests.System.Reflection
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ReturnTypePseudoCustomAttributes ()
{
MethodInfo mi = typeof (MethodInfoTest).GetMethod ("ReturnTypeMarshalAs");
@@ -317,7 +314,6 @@ namespace MonoTests.System.Reflection
}
#if NET_2_0
-#if !TARGET_JVM // MethodBody is not supported for TARGET_JVM
[Test]
public void GetMethodBody_Abstract ()
{
@@ -382,7 +378,6 @@ namespace MonoTests.System.Reflection
else
Assert.AreEqual (false, locals [1].IsPinned, "#6");
}
-#endif // TARGET_JVM
public int return_parameter_test ()
{
@@ -413,7 +408,6 @@ namespace MonoTests.System.Reflection
//Assert.IsTrue (pi.IsRetval, "#3");
}
-#if !TARGET_JVM // ReflectionOnly is not supported yet on TARGET_JVM
[Test]
public void InvokeOnRefOnlyAssembly ()
{
@@ -431,7 +425,6 @@ namespace MonoTests.System.Reflection
Assert.IsNotNull (ex.Message, "#4");
}
}
-#endif // TARGET_JVM
[Test]
[ExpectedException (typeof (TargetInvocationException))]
@@ -783,6 +776,51 @@ namespace MonoTests.System.Reflection
var m = GetType ().GetMethod ("Bug12856");
Assert.AreEqual ("System.Nullable`1[System.Int32] Bug12856()", m.ToString (), "#1");
}
+
+#if !MONOTOUCH
+ class GenericClass<T>
+ {
+ public void Method ()
+ {
+ T lv = default(T);
+ Console.WriteLine(lv);
+ }
+
+ public void Method2<K> (T a0, K a1)
+ {
+ T var0 = a0;
+ K var1 = a1;
+ Console.WriteLine (var0);
+ Console.WriteLine (var1);
+ }
+ }
+
+ [Test]
+ public void TestLocalVariableTypes ()
+ {
+ var typeofT = typeof (GenericClass<>).GetGenericArguments () [0];
+ var typeofK = typeof (GenericClass<>).GetMethod ("Method2").GetGenericArguments () [0];
+
+ var type = typeof (GenericClass<>).GetMethod("Method").GetMethodBody().LocalVariables[0].LocalType;
+ Assert.AreEqual (typeofT, type);
+ Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+
+ type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType;
+ Assert.AreEqual (typeofT, type);
+ Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+
+ type = typeof (GenericClass<>).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType;
+ Assert.AreEqual (typeofK, type);
+ Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+
+ type = typeof (GenericClass<int>).GetMethod("Method2").GetMethodBody().LocalVariables[0].LocalType;
+ Assert.AreEqual (typeof (int), type);
+
+ type = typeof (GenericClass<int>).GetMethod("Method2").GetMethodBody().LocalVariables[1].LocalType;
+ Assert.AreEqual (typeofK, type);
+ Assert.AreEqual (typeof (GenericClass<>), type.DeclaringType);
+ }
+#endif
}
#if NET_2_0
diff --git a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
index b22f46f3650..c0a6e39bcdb 100644
--- a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs
@@ -83,13 +83,11 @@ namespace MonoTests.System.Reflection
{
}
-#if !TARGET_JVM // No support for extern methods in TARGET_JVM
[DllImport ("foo")]
public extern static void marshalAsMethod (
[MarshalAs(UnmanagedType.Bool)]int p0,
[MarshalAs(UnmanagedType.LPArray, ArraySubType=UnmanagedType.LPStr)] string [] p1,
[MarshalAs( UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof (Marshal1), MarshalCookie = "5")] object p2);
-#endif
[Test]
public void DefaultValueEnum () {
ParameterInfo[] info = typeof (ParameterInfoTest).GetMethod ("paramMethod").GetParameters ();
@@ -151,7 +149,6 @@ namespace MonoTests.System.Reflection
Assert.AreEqual (1, info[3].GetCustomAttributes (typeof (OptionalAttribute), true).Length, "#A4");
Assert.AreEqual (2, info[4].GetCustomAttributes (true).Length, "#A5");
-#if !TARGET_JVM // No support for extern methods in TARGET_JVM
ParameterInfo[] pi = typeof (ParameterInfoTest).GetMethod ("marshalAsMethod").GetParameters ();
MarshalAsAttribute attr;
@@ -166,7 +163,6 @@ namespace MonoTests.System.Reflection
Assert.AreEqual (UnmanagedType.CustomMarshaler, attr.Value, "#D1");
Assert.AreEqual ("5", attr.MarshalCookie, "#D2");
Assert.AreEqual (typeof (Marshal1), Type.GetType (attr.MarshalType), "#D3");
-#endif
}
[Test] // bug #342536
diff --git a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
index 56ce9c53f50..c1fc39a59c3 100644
--- a/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
+++ b/mcs/class/corlib/Test/System.Reflection/TypeDelegatorTest.cs
@@ -28,9 +28,9 @@
using System;
using System.Threading;
using System.Reflection;
-#if !TARGET_JVM && !MONOTOUCH
+#if !MONOTOUCH
using System.Reflection.Emit;
-#endif // TARGET_JVM
+#endif
using NUnit.Framework;
diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs
index 1b3fc898891..92d19fe367e 100644
--- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/ConditionalWeakTableTest.cs
@@ -196,9 +196,13 @@ namespace MonoTests.System.Runtime.CompilerServices {
if (GC.MaxGeneration == 0) /*Boehm doesn't handle ephemerons */
Assert.Ignore ("Not working on Boehm.");
var cwt = new ConditionalWeakTable <object,object> ();
- List<object> keepAlive;
- List<WeakReference> keys;
- FillStuff (cwt, out keepAlive, out keys);
+ List<object> keepAlive = null;
+ List<WeakReference> keys = null;
+ Thread t = new Thread (delegate () {
+ FillStuff (cwt, out keepAlive, out keys);
+ });
+ t.Start ();
+ t.Join ();
GC.Collect ();
diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
index 74d5c548852..5237e377e38 100644
--- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/TaskAwaiterTest.cs
@@ -178,7 +178,7 @@ namespace MonoTests.System.Runtime.CompilerServices
Assert.IsTrue (t.Wait (3000), "#0");
Assert.AreEqual (0, t.Result, "#1");
Assert.AreEqual (0, b.InlineCalls, "#2b");
- Assert.AreEqual (2, a.QueueCalls, "#3a");
+ Assert.IsTrue (a.QueueCalls == 1 || a.QueueCalls == 2, "#3a");
Assert.AreEqual (1, b.QueueCalls, "#3b");
}
@@ -278,7 +278,9 @@ namespace MonoTests.System.Runtime.CompilerServices
SynchronizationContext.SetSynchronizationContext (syncContext);
syncContext.Post (delegate {
- Go2 (syncContext);
+ Task t = new Task (delegate() { });
+ Go2 (syncContext, t);
+ t.Start ();
}, null);
// Custom message loop
@@ -289,24 +291,29 @@ namespace MonoTests.System.Runtime.CompilerServices
Thread.Sleep (0);
}
- Assert.AreEqual ("132", progress);
+ Assert.AreEqual ("13xa2", progress);
}
- async void Go2 (SynchronizationContext ctx)
+ async void Go2 (SynchronizationContext ctx, Task t)
{
- await Wait2 (ctx);
+ await Wait2 (ctx, t);
+
+ progress += "a";
if (mre.WaitOne (5000))
progress += "2";
+ else
+ progress += "b";
}
- async Task Wait2 (SynchronizationContext ctx)
+ async Task Wait2 (SynchronizationContext ctx, Task t)
{
- await Task.Delay (10); // Force block suspend/return
+ await t; // Force block suspend/return
ctx.Post (l => {
progress += "3";
mre.Set ();
+ progress += "x";
}, null);
progress += "1";
diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs
index 259361854b9..d6f2a49bf38 100644
--- a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs
@@ -7,7 +7,6 @@
//
// Copyright (C) 2004-2007 Novell, Inc (http://www.novell.com)
//
-#if !TARGET_JVM
using NUnit.Framework;
using System;
using System.IO;
@@ -878,4 +877,3 @@ namespace MonoTests.System.Runtime.InteropServices
}
#endif
}
-#endif
diff --git a/mcs/class/corlib/Test/System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs b/mcs/class/corlib/Test/System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
index d0b31f1a8a8..ba69ed0503b 100644
--- a/mcs/class/corlib/Test/System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.Remoting.Contexts/SynchronizationAttributeTest.cs
@@ -107,11 +107,7 @@ namespace MonoTests.System.Runtime.Remoting.Contexts {
public void DeserializeKnownValue ()
{
MemoryStream ms = new MemoryStream (serialized_sync_attr);
-#if TARGET_JVM
- BinaryFormatter bf = (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
-#else
BinaryFormatter bf = new BinaryFormatter ();
-#endif // TARGET_JVM
SynchronizationAttribute sa = (SynchronizationAttribute) bf.Deserialize (ms);
Assert.IsTrue (sa.IsReEntrant, "IsReEntrant");
Assert.IsFalse (sa.Locked, "Locked");
diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs
index da8bb8ee432..90b2d3f73fc 100644
--- a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs
+++ b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationTest.cs
@@ -18,6 +18,7 @@ using System.Runtime.Remoting.Proxies;
using System.Runtime.Remoting.Messaging;
using System.Collections;
using NUnit.Framework;
+using System.Text;
namespace MonoTests.System.Runtime.Serialization
{
@@ -41,6 +42,41 @@ namespace MonoTests.System.Runtime.Serialization
RemotingServices.Disconnect (mt);
}
+#if !MONOTOUCH
+ [Test]
+ public void DelegateSerializationTest ()
+ {
+ var a = new DelegateSerialization ();
+ a.E += HandleE1;
+
+ var d2 = Delegate.CreateDelegate (typeof(Func<StringBuilder, int>), "val", typeof(SerializationTest).GetMethod ("HandleE2"));
+ a.E += (Func<StringBuilder, int>) d2;
+
+ using (var ms = new MemoryStream ()) {
+ var fmt = new BinaryFormatter ();
+ fmt.Serialize (ms, a);
+ ms.Flush ();
+
+ ms.Seek (0, SeekOrigin.Begin);
+ var a2 = (DelegateSerialization) fmt.Deserialize (ms);
+ a2.Test ();
+ }
+ }
+#endif
+
+ static int HandleE1 (StringBuilder arg)
+ {
+ arg.Append ("E1");
+ return 1;
+ }
+
+ public static int HandleE2 (object o, StringBuilder arg)
+ {
+ arg.Append ("E2|");
+ arg.Append (o);
+ return 2;
+ }
+
void WriteData ()
{
StreamingContext context = new StreamingContext (StreamingContextStates.Other);
@@ -814,5 +850,17 @@ namespace MonoTests.System.Runtime.Serialization
public int x;
}
+ [Serializable]
+ class DelegateSerialization
+ {
+ public event Func<StringBuilder, int> E;
+
+ public void Test ()
+ {
+ var sb = new StringBuilder ();
+ Assert.AreEqual (2, E (sb), "#1");
+ Assert.AreEqual ("E1E2|val", sb.ToString (), "#2");
+ }
+ }
}
diff --git a/mcs/class/corlib/Test/System.Security.Claims/ClaimsIdentityTest.cs b/mcs/class/corlib/Test/System.Security.Claims/ClaimsIdentityTest.cs
index 2b94ff8c12f..0456cbcdd17 100644
--- a/mcs/class/corlib/Test/System.Security.Claims/ClaimsIdentityTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Claims/ClaimsIdentityTest.cs
@@ -1,28 +1,564 @@
//
-// WindowsIdentityTest.cs - NUnit Test Cases for WindowsIdentity
-//
-// Author:
-// Sebastien Pouliot (sebastien@ximian.com)
-//
-// (C) 2003 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
+// ClaimsIdentityTest.cs - NUnit Test Cases for System.Security.Claims.ClaimsIdentity
//
+
#if NET_4_5
+
using NUnit.Framework;
using System;
+using System.Collections.Generic;
+using System.Linq;
using System.Security.Claims;
+using System.Security.Principal;
-namespace MonoTests.System.Security.Claims {
-
+namespace MonoTests.System.Security.Claims
+{
[TestFixture]
- public class ClaimsIdentityTest {
+ public class ClaimsIdentityTest
+ {
+ #region Ctor Empty
[Test]
- public void EmptyCtorWorks () {
+ public void EmptyCtorWorks ()
+ {
var id = new ClaimsIdentity ();
Assert.IsNull (id.AuthenticationType, "#1");
-
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ #endregion
+
+ #region Ctor AuthTypeOnly
+
+ [Test]
+ public void AuthTypeOnlyCtorEmptyWorks ()
+ {
+ var id = new ClaimsIdentity ("");
+ //NOTE: According to MSDN the id.AuthenticationType should be null, but it isn't on .Net 4.5
+ //Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.AreEqual ("", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void AuthTypeOnlyCtorNullWorks ()
+ {
+ var id = new ClaimsIdentity ((string)null);
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void AuthTypeOnlyCtorNotEmptyWorks ()
+ {
+ var id = new ClaimsIdentity ("auth_type");
+ Assert.AreEqual ("auth_type", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsTrue (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ #endregion
+
+ #region Ctor IEnumerable<Claim>
+
+ [Test]
+ public void EnumClaimsCtorNullWorks ()
+ {
+ var id = new ClaimsIdentity ((IEnumerable<Claim>)null);
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void EnumClaimsCtorEmptyWorks ()
+ {
+ var id = new ClaimsIdentity ((IEnumerable<Claim>)null);
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void EnumClaimsCtorWithClaimsWithNameWorks ()
+ {
+ var id = new ClaimsIdentity (
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ });
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (2, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.AreEqual ("claim_name_value", id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void EnumClaimsCtorWithClaimsWithoutNameWorks ()
+ {
+ var id = new ClaimsIdentity (
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType + "_x", "claim_name_value"),
+ });
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (2, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ #endregion
+
+ #region Ctor IEnumerable<Claim>, authType, nameType, roleType
+
+ [Test]
+ public void EnumClaimsAuthNameRoleTypeCtorWorks ()
+ {
+ var id = new ClaimsIdentity (new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ new Claim ("claim_role_type", "claim_role_value"),
+ },
+ "test_auth_type", "test_name_type", "claim_role_type");
+ Assert.AreEqual ("test_auth_type", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (3, id.Claims.Count (), "#5");
+ Assert.IsTrue (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual ("test_name_type", id.NameClaimType, "#9");
+ Assert.AreEqual ("claim_role_type", id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void EnumClaimsAuthNameRoleTypeCtorAllArgsNullWorks ()
+ {
+ var id = new ClaimsIdentity ((IEnumerable<Claim>)null, (string)null, (string)null, (string)null);
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void EnumClaimsAuthNameRoleTypeCtorAllArgsEmptyWorks ()
+ {
+ var id = new ClaimsIdentity (new Claim [0], "", "", "");
+ //NOTE: According to MSDN the id.AuthenticationType should be null, but it isn't on .Net 4.5
+ //Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.AreEqual ("", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void EnumClaimsAuthNameRoleTypeCtorWithTwoClaimsAndTypesEmptyWorks ()
+ {
+ var id = new ClaimsIdentity (
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ },
+ "", "", "");
+ //NOTE: According to MSDN the id.AuthenticationType should be null, but it isn't on .Net 4.5
+ //Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.AreEqual ("", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (2, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.AreEqual ("claim_name_value", id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void EnumClaimsAuthNameRoleTypeCtorWithTwoClaimsAndTypesNullWorks ()
+ {
+ var id = new ClaimsIdentity (
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ },
+ (string)null, (string)null, (string)null);
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (2, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.AreEqual ("claim_name_value", id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ #endregion
+
+ #region Ctor IIdentity, IEnumerable<Claim>, authType, nameType, roleType
+
+ [Test]
+ public void IdentityEnumClaimsAuthNameRoleTypeCtorNullsWorks ()
+ {
+ var id = new ClaimsIdentity ((IIdentity)null, (IEnumerable<Claim>)null, (string)null, (string)null, (string)null);
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void IdentityEnumClaimsAuthNameRoleTypeCtorIdentityNullRestEmptyWorks ()
+ {
+ var id = new ClaimsIdentity (null, new Claim [0], "", "", "");
+ //NOTE: According to MSDN the id.AuthenticationType should be null, but it isn't on .Net 4.5
+ //Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.AreEqual ("", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (0, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void IdentityEnumClaimsAuthNameRoleTypeCtorNullClaimsArrayEmptyTypesWorks ()
+ {
+ var id = new ClaimsIdentity (
+ null,
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ },
+ "", "", "");
+ //NOTE: According to MSDN the id.AuthenticationType should be null, but it isn't on .Net 4.5
+ //Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.AreEqual ("", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (2, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.AreEqual ("claim_name_value", id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void IdentityEnumClaimsAuthNameRoleTypeCtorNullClaimsArrayNullsWorks ()
+ {
+ var id = new ClaimsIdentity (
+ null,
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ },
+ (string)null, (string)null, (string)null);
+ Assert.IsNull (id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (2, id.Claims.Count (), "#5");
+ Assert.IsFalse (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.AreEqual ("claim_name_value", id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void IdentityEnumClaimsAuthNameRoleTypeCtorNullIdentityRestFilledWorks ()
+ {
+ var id = new ClaimsIdentity (
+ null,
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ new Claim ("claim_role_type", "claim_role_value"),
+ },
+ "test_auth_type", "test_name_type", "claim_role_type");
+ Assert.AreEqual ("test_auth_type", id.AuthenticationType, "#1");
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (3, id.Claims.Count (), "#5");
+ Assert.IsTrue (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual ("test_name_type", id.NameClaimType, "#9");
+ Assert.AreEqual ("claim_role_type", id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void IdentityEnumClaimsAuthNameRoleTypeCtorClaimsIdentityRestFilledWorks ()
+ {
+ var baseId = new ClaimsIdentity (
+ new[] { new Claim ("base_claim_type", "base_claim_value") },
+ "base_auth_type");
+
+ baseId.Actor = new ClaimsIdentity ("base_actor");
+ baseId.BootstrapContext = "bootstrap_context";
+ baseId.Label = "base_label";
+
+ Assert.IsTrue (baseId.IsAuthenticated, "#0");
+
+ var id = new ClaimsIdentity (
+ baseId,
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ new Claim ("claim_role_type", "claim_role_value"),
+ },
+ "test_auth_type", "test_name_type", "claim_role_type");
+
+ Assert.AreEqual ("test_auth_type", id.AuthenticationType, "#1");
+
+ Assert.IsNotNull (id.Actor, "#2");
+ Assert.AreEqual ("base_actor", id.Actor.AuthenticationType, "#2b");
+ Assert.AreEqual ("bootstrap_context", id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (4, id.Claims.Count (), "#5");
+ Assert.AreEqual ("base_claim_type", id.Claims.First ().Type);
+ Assert.IsTrue (id.IsAuthenticated, "#6");
+ Assert.AreEqual ("base_label", id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual ("test_name_type", id.NameClaimType, "#9");
+ Assert.AreEqual ("claim_role_type", id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void IdentityEnumClaimsAuthNameRoleTypeCtorNonClaimsIdentityRestEmptyWorks ()
+ {
+ var baseId = new TestIdentity { Name = "base_name", AuthenticationType = "TestId_AuthType" };
+
+ var id = new ClaimsIdentity (
+ baseId,
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ new Claim ("claim_role_type", "claim_role_value"),
+ },
+ "", "", "");
+
+ Assert.AreEqual ("TestId_AuthType", id.AuthenticationType, "#1");
+
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (4, id.Claims.Count (), "#5");
+ Assert.AreEqual (2, id.Claims.Count (_ => _.Type == ClaimsIdentity.DefaultNameClaimType), "#5b");
+ Assert.IsTrue (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.AreEqual ("base_name", id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ #endregion
+
+ #region Ctor IIdentity, IEnumerable<Claim>
+
+ [Test]
+ public void IdentityEnumClaimsCtorClaimsIdentityClaimsWorks ()
+ {
+ var baseId = new ClaimsIdentity (
+ new [] { new Claim ("base_claim_type", "base_claim_value") },
+ "base_auth_type", "base_name_claim_type", null);
+
+ baseId.Actor = new ClaimsIdentity ("base_actor");
+ baseId.BootstrapContext = "bootstrap_context";
+ baseId.Label = "base_label";
+
+ Assert.IsTrue (baseId.IsAuthenticated, "#0");
+
+ var id = new ClaimsIdentity (
+ baseId,
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ new Claim ("claim_role_type", "claim_role_value"),
+ });
+
+ Assert.AreEqual ("base_auth_type", id.AuthenticationType, "#1");
+
+ Assert.IsNotNull (id.Actor, "#2");
+ Assert.AreEqual ("base_actor", id.Actor.AuthenticationType, "#2b");
+ Assert.AreEqual ("bootstrap_context", id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (4, id.Claims.Count (), "#5");
+ Assert.AreEqual ("base_claim_type", id.Claims.First ().Type, "#5b");
+ Assert.IsTrue (id.IsAuthenticated, "#6");
+ Assert.AreEqual ("base_label", id.Label, "#7");
+ Assert.IsNull (id.Name, "#8");
+ Assert.AreEqual ("base_name_claim_type", id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ [Test]
+ public void IdentityEnumClaimsCtorNonClaimsIdentityClaimsWorks ()
+ {
+ var baseId = new TestIdentity {
+ Name = "base_name", AuthenticationType = "TestId_AuthType"
+ };
+
+ var id = new ClaimsIdentity (
+ baseId,
+ new [] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ new Claim ("claim_role_type", "claim_role_value"),
+ });
+
+ Assert.AreEqual ("TestId_AuthType", id.AuthenticationType, "#1");
+
+ Assert.IsNull (id.Actor, "#2");
+ Assert.IsNull (id.BootstrapContext, "#3");
+ Assert.IsNotNull (id.Claims, "#4");
+ Assert.AreEqual (4, id.Claims.Count (), "#5");
+ Assert.AreEqual (2, id.Claims.Count (_ => _.Type == ClaimsIdentity.DefaultNameClaimType), "#5b");
+ Assert.IsTrue (id.IsAuthenticated, "#6");
+ Assert.IsNull (id.Label, "#7");
+ Assert.AreEqual ("base_name", id.Name, "#8");
+ Assert.AreEqual (ClaimsIdentity.DefaultNameClaimType, id.NameClaimType, "#9");
+ Assert.AreEqual (ClaimsIdentity.DefaultRoleClaimType, id.RoleClaimType, "#10");
+ }
+
+ #endregion
+
+ [Test]
+ public void FindCaseInsensivity ()
+ {
+ var claim_type = new Claim("TYpe", "value");
+ var id = new ClaimsIdentity (
+ new[] { claim_type },
+ "base_auth_type", "base_name_claim_type", null);
+
+ var f1 = id.FindFirst ("tyPe");
+ Assert.AreEqual ("value", f1.Value, "#1");
+
+ var f2 = id.FindAll ("tyPE").First ();
+ Assert.AreEqual ("value", f2.Value, "#2");
+ }
+
+ [Test]
+ public void HasClaim_typeValue_Works()
+ {
+ var id = new ClaimsIdentity(
+ new[] {
+ new Claim ("claim_type", "claim_value"),
+ new Claim (ClaimsIdentity.DefaultNameClaimType, "claim_name_value"),
+ new Claim ("claim_role_type", "claim_role_value"),
+ }, "test_authority");
+
+ Assert.IsTrue (id.HasClaim("claim_type", "claim_value"), "#1");
+ Assert.IsTrue (id.HasClaim("cLaIm_TyPe", "claim_value"), "#2");
+ Assert.IsFalse (id.HasClaim("claim_type", "cLaIm_VaLuE"), "#3");
+ Assert.IsFalse (id.HasClaim("Xclaim_type", "claim_value"), "#4");
+ Assert.IsFalse (id.HasClaim("claim_type", "Xclaim_value"), "#5");
+ }
+ }
+
+ class TestIdentity : IIdentity
+ {
+ public string Name {
+ get;
+ set;
+ }
+
+ public string AuthenticationType {
+ get;
+ set;
+ }
+
+ public bool IsAuthenticated {
+ get { throw new NotImplementedException (); }
}
}
}
+
#endif
diff --git a/mcs/class/corlib/Test/System.Security.Claims/ClaimsPrincipalTest.cs b/mcs/class/corlib/Test/System.Security.Claims/ClaimsPrincipalTest.cs
new file mode 100644
index 00000000000..3d5660d256e
--- /dev/null
+++ b/mcs/class/corlib/Test/System.Security.Claims/ClaimsPrincipalTest.cs
@@ -0,0 +1,256 @@
+//
+//
+// ClaimsPrincipalTest.cs - NUnit Test Cases for System.Security.Claims.ClaimsPrincipal
+//
+
+#if NET_4_5
+
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Security.Claims;
+using System.Security.Principal;
+
+namespace MonoTests.System.Security.Claims
+{
+ [TestFixture]
+ public class ClaimsPrincipalTest
+ {
+ #region Ctor Empty
+
+ [Test]
+ public void EmptyCtorWorks ()
+ {
+ var p = new ClaimsPrincipal ();
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (p.Identities.ToArray ().Length, 0, "#2");
+
+ Assert.IsNotNull (p.Claims, "#3");
+ Assert.AreEqual (p.Claims.ToArray ().Length, 0, "#4");
+
+ Assert.IsNull (p.Identity, "#5");
+ }
+
+ #endregion
+
+ #region Ctor IIdentity
+
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void IIdentityCtorNullThrows ()
+ {
+ var p = new ClaimsPrincipal ((IIdentity)null);
+ }
+
+ [Test]
+ public void IIdentityCtorClaimsIdentityWorks ()
+ {
+ var id = new ClaimsIdentity (
+ new List<Claim> { new Claim ("claim_type", "claim_value") },
+ "");
+ var p = new ClaimsPrincipal (id);
+
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (1, p.Identities.Count (), "#2");
+
+ Assert.AreEqual (id, p.Identities.First (), "#3");
+
+ Assert.AreEqual (id, p.Identity, "#4");
+
+ Assert.IsNotNull (p.Claims, "#5");
+ Assert.AreEqual (1, p.Claims.Count (), "#6");
+ Assert.IsTrue (p.Claims.Any (claim => claim.Type == "claim_type" && claim.Value == "claim_value"), "#7");
+ }
+
+ [Test]
+ public void IIdentityCtorNonClaimsIdentityWorks ()
+ {
+ var id = new TestIdentity {
+ Name = "test_name",
+ AuthenticationType = "test_auth"
+ };
+ var p = new ClaimsPrincipal (id);
+
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (1, p.Identities.Count (), "#2");
+
+ Assert.AreNotEqual (id, p.Identities.First (), "#3");
+ Assert.AreNotEqual (id, p.Identity, "#4");
+ Assert.AreEqual (id.Name, p.Identity.Name, "#5");
+
+ Assert.IsNotNull (p.Claims, "#6");
+ Assert.AreEqual (1, p.Claims.Count (), "#7");
+ Assert.IsTrue (p.Claims.Any (claim => claim.Type == ClaimsIdentity.DefaultNameClaimType && claim.Value == "test_name"), "#8");
+ }
+
+ #endregion
+
+ #region Ctor IPrincipal
+
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void IPrincipalCtorNullThrows ()
+ {
+ var p = new ClaimsPrincipal ((IPrincipal)null);
+ }
+
+ [Test]
+ public void IPrincipalCtorClaimsPrincipalWorks ()
+ {
+ var baseId = new ClaimsIdentity (
+ new List<Claim> { new Claim ("claim_type", "claim_value") },
+ "");
+ var basePrincipal = new ClaimsPrincipal ();
+ basePrincipal.AddIdentity (baseId);
+
+ var p = new ClaimsPrincipal (basePrincipal);
+
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (1, p.Identities.Count (), "#2");
+
+ Assert.AreEqual (baseId, p.Identities.First (), "#3");
+
+ Assert.AreEqual (baseId, p.Identity, "#4");
+
+ Assert.IsNotNull (p.Claims, "$5");
+ Assert.AreEqual (1, p.Claims.Count (), "#6");
+ Assert.IsTrue (p.Claims.Any (claim => claim.Type == "claim_type" && claim.Value == "claim_value"), "#7");
+ }
+
+ [Test]
+ public void IPrincipalCtorNonClaimsPrincipalWithNonClaimsIdentityWorks ()
+ {
+ var id = new TestIdentity {
+ Name = "test_name",
+ AuthenticationType = "test_auth"
+ };
+ var basePrincipal = new TestPrincipal { Identity = id };
+ var p = new ClaimsPrincipal (basePrincipal);
+
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (1, p.Identities.Count (), "#2");
+
+ Assert.AreNotEqual (id, p.Identities.First (), "#3");
+ Assert.AreNotEqual (id, p.Identity, "#4");
+ Assert.AreEqual (id.Name, p.Identity.Name, "#5");
+
+ Assert.IsNotNull (p.Claims, "#6");
+ Assert.AreEqual (1, p.Claims.Count (), "#7");
+ Assert.IsTrue (p.Claims.Any (claim => claim.Type == ClaimsIdentity.DefaultNameClaimType && claim.Value == "test_name"), "#8");
+ }
+
+ [Test]
+ public void IPrincipalCtorNonClaimsPrincipalWithoutIdentityWorks ()
+ {
+ var p = new ClaimsPrincipal (new TestPrincipal ());
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (p.Identities.ToArray ().Length, 1, "#2");
+
+ Assert.IsNotNull (p.Claims, "#3");
+ Assert.AreEqual (p.Claims.ToArray ().Length, 0, "#4");
+
+ Assert.IsNotNull (p.Identity, "#5");
+ Assert.IsFalse (p.Identity.IsAuthenticated, "#6");
+ }
+
+ [Test]
+ [Category ("Ctor_IPrincipal")]
+ public void IPrincipalCtorClaimsPrincipalWithoutIdentityWorks ()
+ {
+ var p = new ClaimsPrincipal (new ClaimsPrincipal ());
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (p.Identities.ToArray ().Length, 0, "#2");
+
+ Assert.IsNotNull (p.Claims, "#3");
+ Assert.AreEqual (p.Claims.ToArray ().Length, 0, "#4");
+
+ Assert.IsNull (p.Identity, "#5");
+ }
+
+ [Test]
+ public void IPrincipalCtorClaimsPrincipalWithMultipleIdentitiesWorks ()
+ {
+ var baseId1 = new ClaimsIdentity ("baseId1");
+ var baseId2 = new GenericIdentity ("generic_name", "baseId2");
+ var baseId3 = WindowsIdentity.GetAnonymous ();
+
+ var basePrincipal = new ClaimsPrincipal (baseId1);
+ basePrincipal.AddIdentity (baseId2);
+ basePrincipal.AddIdentity (baseId3);
+
+ var p = new ClaimsPrincipal (basePrincipal);
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (3, p.Identities.Count (), "#2");
+
+ Assert.IsNotNull (p.Claims, "#3");
+ Assert.AreEqual (1, p.Claims.Count (), "#4");
+
+ // The Identity property favours WindowsIdentity
+ Assert.AreEqual (baseId3, p.Identity, "#5");
+
+ Assert.IsTrue (p.Claims.Any (claim => claim.Type == ClaimsIdentity.DefaultNameClaimType && claim.Value == "generic_name"), "#6");
+
+ Assert.AreEqual (baseId2.Claims.First (), p.Claims.First (), "#7");
+ }
+
+ #endregion
+
+ #region Ctor IEnumerable<ClaimsIdentity>
+
+ [Test]
+ [ExpectedException (typeof (ArgumentNullException))]
+ public void IEnumClaimsIdCtorNullThrows ()
+ {
+ var p = new ClaimsPrincipal ((IEnumerable<ClaimsIdentity>)null);
+ }
+
+ [Test]
+ public void IEnumClaimsIdCtorEmptyWorks ()
+ {
+ var p = new ClaimsPrincipal (new ClaimsIdentity [0]);
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (p.Identities.ToArray ().Length, 0, "#2");
+ Assert.IsNotNull (p.Claims, "#3");
+ Assert.AreEqual (p.Claims.ToArray ().Length, 0, "#4");
+ Assert.IsNull (p.Identity, "#5");
+ }
+
+ [Test]
+ public void IEnumClaimsIdCtorMultipleIdentitiesWorks ()
+ {
+ var baseId1 = new ClaimsIdentity ("baseId1");
+ var baseId2 = new GenericIdentity ("generic_name2", "baseId2");
+ var baseId3 = new GenericIdentity ("generic_name3", "baseId3");
+
+ var p = new ClaimsPrincipal (new List<ClaimsIdentity> { baseId1, baseId2, baseId3 });
+ Assert.IsNotNull (p.Identities, "#1");
+ Assert.AreEqual (3, p.Identities.Count (), "#2");
+
+ Assert.IsNotNull (p.Claims, "#3");
+ Assert.AreEqual (2, p.Claims.Count (), "#4");
+
+ Assert.AreEqual (baseId1, p.Identity, "#5");
+
+ Assert.IsTrue (p.Claims.Any (claim => claim.Type == ClaimsIdentity.DefaultNameClaimType && claim.Value == "generic_name2"), "#6");
+ Assert.IsTrue (p.Claims.Any (claim => claim.Type == ClaimsIdentity.DefaultNameClaimType && claim.Value == "generic_name3"), "#7");
+
+ Assert.AreEqual (baseId2.Claims.First (), p.Claims.First (), "#7");
+ Assert.AreEqual (baseId3.Claims.Last (), p.Claims.Last (), "#8");
+ }
+
+ #endregion
+
+ internal class TestPrincipal : IPrincipal
+ {
+ public IIdentity Identity { get; set; }
+
+ public bool IsInRole (string role)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+ }
+}
+
+#endif
diff --git a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs
index 304ddb6bcaf..59998c37221 100644
--- a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs
@@ -8,7 +8,6 @@
// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
// Copyright 2011 Xamarin Inc (http://www.xamarin.com).
//
-#if !TARGET_JVM
using NUnit.Framework;
using System;
@@ -175,4 +174,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates {
}
}
}
-#endif
diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs
index 3da3fe6276e..4890c1a2083 100644
--- a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs
@@ -148,7 +148,6 @@ public class CryptoConfigTest {
CreateFromName ("http://www.w3.org/2000/09/xmldsig#hmac-sha1", null);
// URL used in DigestMethod element
CreateFromName ("http://www.w3.org/2000/09/xmldsig#sha1", "System.Security.Cryptography.SHA1CryptoServiceProvider");
-#if !TARGET_JVM //TargetJvmNotWorking - algorithms from System.Security assembly
// URL used in Canonicalization or Transform elements
CreateFromName ("http://www.w3.org/TR/2001/REC-xml-c14n-20010315", "System.Security.Cryptography.Xml.XmlDsigC14NTransform");
CreateFromName ("http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments", "System.Security.Cryptography.Xml.XmlDsigC14NWithCommentsTransform");
@@ -179,7 +178,6 @@ public class CryptoConfigTest {
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#hmac-sha512", "System.Security.Cryptography.HMACSHA512");
CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160", "System.Security.Cryptography.HMACRIPEMD160");
#endif
-#endif
}
[Test]
diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs
index 727b13cdaa0..18e26afb297 100644
--- a/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Cryptography/DSACryptoServiceProviderTest.cs
@@ -112,7 +112,6 @@ public class DSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void ConstructorCspParameters ()
{
CspParameters csp = new CspParameters (13, null, "Mono1024");
@@ -125,7 +124,6 @@ public class DSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void ConstructorKeySizeCspParameters ()
{
CspParameters csp = new CspParameters (13, null, "Mono512");
@@ -733,7 +731,6 @@ public class DSACryptoServiceProviderTest {
// http://msdn.microsoft.com/library/en-us/cpguide/html/cpcongeneratingkeysforencryptiondecryption.asp
[Test]
- [Category ("TargetJvmNotSupported")]
public void Persistence_PersistKeyInCsp_False ()
{
CspParameters csp = new CspParameters (3, null, "Persistence_PersistKeyInCsp_False");
@@ -758,7 +755,6 @@ public class DSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void Persistence_PersistKeyInCsp_True ()
{
CspParameters csp = new CspParameters (3, null, "Persistence_PersistKeyInCsp_True");
@@ -779,7 +775,6 @@ public class DSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void Persistence_Delete ()
{
CspParameters csp = new CspParameters (3, null, "Persistence_Delete");
@@ -836,7 +831,6 @@ public class DSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void UseMachineKeyStore ()
{
// note only applicable when CspParameters isn't used - which don't
diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs
index 01a3f9987f3..6cf1637d085 100644
--- a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs
@@ -111,7 +111,6 @@ public class RSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void ConstructorCspParameters ()
{
CspParameters csp = new CspParameters (1, null, "Mono1024");
@@ -126,7 +125,6 @@ public class RSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void ConstructorKeySizeCspParameters ()
{
int keySize = 512;
@@ -1001,7 +999,6 @@ public class RSACryptoServiceProviderTest {
// http://msdn.microsoft.com/library/en-us/cpguide/html/cpcongeneratingkeysforencryptiondecryption.asp
[Test]
- [Category ("TargetJvmNotSupported")]
public void Persistence_PersistKeyInCsp_False ()
{
CspParameters csp = new CspParameters (1, null, "Persistence_PersistKeyInCsp_False");
@@ -1026,7 +1023,6 @@ public class RSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void Persistence_PersistKeyInCsp_True ()
{
CspParameters csp = new CspParameters (1, null, "Persistence_PersistKeyInCsp_True");
@@ -1047,7 +1043,6 @@ public class RSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void Persistence_Delete ()
{
CspParameters csp = new CspParameters (1, null, "Persistence_Delete");
@@ -1076,7 +1071,6 @@ public class RSACryptoServiceProviderTest {
}
[Test]
- [Category ("TargetJvmNotSupported")]
public void UseMachineKeyStore ()
{
// note only applicable when CspParameters isn't used - which don't
diff --git a/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionTest.cs
index c41aad0505a..062b0333a27 100644
--- a/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionTest.cs
@@ -20,7 +20,6 @@ using System.Text;
using NUnit.Framework;
namespace MonoTests.System.Security.Permissions {
-#if !TARGET_JVM
public class FilePathUtil {
[DllImport("kernel32.dll")]
private static extern uint GetLongPathName (string shortPath,
@@ -48,7 +47,6 @@ namespace MonoTests.System.Security.Permissions {
return null;
}
}
-#endif
[TestFixture]
public class FileIOPermissionTest {
@@ -428,7 +426,6 @@ namespace MonoTests.System.Security.Permissions {
pathsInPermission = read.Split(';');
Assert.IsTrue(pathsInPermission.Length == 2, "Path list should have 2 for Read");
}
-#if !TARGET_JVM
[Test]
[Ignore("should compatibility go that far ?")]
public void ShortToLong ()
@@ -443,7 +440,6 @@ namespace MonoTests.System.Security.Permissions {
// note: this will fail on Linux as kernel32.dll isn't available
Assert.AreEqual (FilePathUtil.GetLongPathName (filename), files [0], "GetLongPathName(GetTempFileName)==GetPathList[0]");
}
-#endif
[Test]
[ExpectedException (typeof (ArgumentException))]
public void FileUrl ()
diff --git a/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs b/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs
index eb454d7c64e..29103621206 100644
--- a/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
using NUnit.Framework;
using System;
diff --git a/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs b/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs
index d1b99d5a723..ab45c90881a 100644
--- a/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs
+++ b/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
using NUnit.Framework;
using System;
diff --git a/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs b/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs
index 0e5dbded301..501346f0712 100644
--- a/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs
+++ b/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs
@@ -27,7 +27,7 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0 && !TARGET_JVM
+#if NET_2_0
using NUnit.Framework;
using System;
diff --git a/mcs/class/corlib/Test/System.Security/SecureStringCas.cs b/mcs/class/corlib/Test/System.Security/SecureStringCas.cs
index 5752be0de83..3f35de5c6ce 100644
--- a/mcs/class/corlib/Test/System.Security/SecureStringCas.cs
+++ b/mcs/class/corlib/Test/System.Security/SecureStringCas.cs
@@ -58,9 +58,7 @@ namespace MonoCasTests.System.Security {
try {
SecureStringTest unit = new SecureStringTest ();
unit.DefaultConstructor ();
-#if !TARGET_JVM
unit.UnsafeConstructor ();
-#endif
unit.ReadOnly ();
unit.Disposed ();
}
diff --git a/mcs/class/corlib/Test/System.Security/SecureStringTest.cs b/mcs/class/corlib/Test/System.Security/SecureStringTest.cs
index 87144d3da48..976628af257 100644
--- a/mcs/class/corlib/Test/System.Security/SecureStringTest.cs
+++ b/mcs/class/corlib/Test/System.Security/SecureStringTest.cs
@@ -65,7 +65,6 @@ namespace MonoTests.System.Security {
Assert.Ignore (NotSupported);
}
}
-#if !TARGET_JVM
[Test]
public unsafe void UnsafeConstructor ()
{
@@ -143,7 +142,6 @@ namespace MonoTests.System.Security {
SecureString ss = GetMaxLength ();
ss.AppendChar ('a');
}
-#endif
[Test]
public void Copy_Empty ()
{
@@ -253,7 +251,6 @@ namespace MonoTests.System.Security {
SecureString ss = new SecureString ();
ss.RemoveAt (1);
}
-#if !TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void InsertAt_BiggerThanMax ()
@@ -261,7 +258,6 @@ namespace MonoTests.System.Security {
SecureString ss = GetMaxLength ();
ss.InsertAt (ss.Length, 'a');
}
-#endif
private SecureString GetReadOnly ()
{
SecureString ss = new SecureString ();
diff --git a/mcs/class/corlib/Test/System.Text/DecoderTest.cs b/mcs/class/corlib/Test/System.Text/DecoderTest.cs
index 6cf0306d823..e48566f5403 100644
--- a/mcs/class/corlib/Test/System.Text/DecoderTest.cs
+++ b/mcs/class/corlib/Test/System.Text/DecoderTest.cs
@@ -44,7 +44,7 @@ namespace MonoTests.System.Text
char [] chars = new char [10000];
byte [] bytes = new byte [10000];
- Decoder conv = Encoding.UTF8.GetDecoder ();
+ Decoder conv = new ExposedDecoder ();
int charsUsed, bytesUsed;
bool done;
@@ -56,6 +56,24 @@ namespace MonoTests.System.Text
Assert.AreEqual (625, bytesUsed, "#3");
}
+ [Test]
+ public void ConvertLimitedDestinationUTF8 ()
+ {
+ char [] chars = new char [10000];
+ byte [] bytes = new byte [10000];
+
+ Decoder conv = Encoding.UTF8.GetDecoder ();
+ int charsUsed, bytesUsed;
+ bool done;
+
+ conv.Convert (bytes, 0, 10000, chars, 0, 1000, true,
+ out charsUsed, out bytesUsed, out done);
+
+ Assert.IsFalse (done, "#1");
+ Assert.AreEqual (1000, charsUsed, "#2");
+ Assert.AreEqual (1000, bytesUsed, "#3");
+ }
+
[Test]
public void CustomEncodingGetDecoder ()
@@ -65,6 +83,18 @@ namespace MonoTests.System.Text
Assert.IsNotNull (decoder);
}
+ class ExposedDecoder : Decoder {
+ public override int GetCharCount (byte [] bytes, int index, int count)
+ {
+ return Encoding.UTF8.GetDecoder ().GetCharCount (bytes, index, count);
+ }
+
+ public override int GetChars (byte [] bytes, int byteIndex, int byteCount, char [] chars, int charIndex)
+ {
+ return Encoding.UTF8.GetDecoder ().GetChars (bytes, byteIndex, byteCount, chars, charIndex);
+ }
+ }
+
class CustomEncoding : Encoding {
public override int GetByteCount (char [] chars, int index, int count)
diff --git a/mcs/class/corlib/Test/System.Text/EncoderTest.cs b/mcs/class/corlib/Test/System.Text/EncoderTest.cs
index 27a8d4eeb4b..4273efc3d3a 100644
--- a/mcs/class/corlib/Test/System.Text/EncoderTest.cs
+++ b/mcs/class/corlib/Test/System.Text/EncoderTest.cs
@@ -44,7 +44,7 @@ namespace MonoTests.System.Text
byte [] bytes = new byte [10000];
char [] chars = new char [10000];
- Encoder conv = Encoding.UTF8.GetEncoder ();
+ Encoder conv = new ExposedEncoder ();
int bytesUsed, charsUsed;
bool done;
@@ -57,6 +57,25 @@ namespace MonoTests.System.Text
}
[Test]
+ public void ConvertLimitedDestinationUTF8 ()
+ {
+ byte [] bytes = new byte [10000];
+ char [] chars = new char [10000];
+
+ Encoder conv = Encoding.UTF8.GetEncoder ();
+ var type = conv.GetType ();
+ int bytesUsed, charsUsed;
+ bool done;
+
+ conv.Convert (chars, 0, 10000, bytes, 0, 1000, true,
+ out bytesUsed, out charsUsed, out done);
+
+ Assert.IsFalse (done, "#1");
+ Assert.AreEqual (1000, bytesUsed, "#2");
+ Assert.AreEqual (1000, charsUsed, "#3");
+ }
+
+ [Test]
public void CustomEncodingGetEncoder ()
{
var encoding = new CustomEncoding ();
@@ -80,6 +99,18 @@ namespace MonoTests.System.Text
Assert.AreEqual (0, bytesUsed, "#3");
}
+ class ExposedEncoder : Encoder {
+ public override int GetByteCount (char [] chars, int index, int count, bool flush)
+ {
+ return Encoding.UTF8.GetEncoder ().GetByteCount (chars, index, count, flush);
+ }
+
+ public override int GetBytes (char [] chars, int charIndex, int charCount, byte [] bytes, int byteIndex, bool flush)
+ {
+ return Encoding.UTF8.GetEncoder ().GetBytes (chars, charIndex, charCount, bytes, byteIndex, flush);
+ }
+ }
+
class CustomEncoding : Encoding {
public override int GetByteCount (char [] chars, int index, int count)
diff --git a/mcs/class/corlib/Test/System.Text/EncodingTester.cs b/mcs/class/corlib/Test/System.Text/EncodingTester.cs
new file mode 100644
index 00000000000..939d38160fb
--- /dev/null
+++ b/mcs/class/corlib/Test/System.Text/EncodingTester.cs
@@ -0,0 +1,116 @@
+//
+// EncodingTester.cs
+//
+// Author:
+// Marcos Henrich <marcos.henrich@xamarin.com>
+//
+// (C) 2014 Xamarin, Inc.
+//
+
+using NUnit.Framework;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace MonoTests.System.Text
+{
+ class EncodingTester
+ {
+ class DecoderTestFallbackBuffer : DecoderFallbackBuffer
+ {
+ DecoderFallbackBuffer buffer;
+ private FallbackDelegate fallbackAction;
+
+ public DecoderTestFallbackBuffer (DecoderReplacementFallback fallback, FallbackDelegate fallbackAction)
+ {
+ this.fallbackAction = fallbackAction;
+ buffer = new DecoderReplacementFallbackBuffer (fallback);
+ }
+
+ public override bool Fallback (byte [] bytesUnknown, int index)
+ {
+ fallbackAction (bytesUnknown, index);
+ return buffer.Fallback (bytesUnknown, index);
+ }
+
+ public override char GetNextChar ()
+ {
+ return buffer.GetNextChar ();
+ }
+
+ public override bool MovePrevious ()
+ {
+ return buffer.MovePrevious ();
+ }
+
+ public override int Remaining
+ {
+ get { return buffer.Remaining; }
+ }
+
+ public override void Reset ()
+ {
+ buffer.Reset ();
+ }
+ }
+
+ class DecoderTestFallback : DecoderFallback
+ {
+ private DecoderReplacementFallback fallback;
+ private FallbackDelegate fallbackAction;
+
+ public DecoderTestFallback (FallbackDelegate fallbackAction)
+ {
+ this.fallbackAction = fallbackAction;
+ }
+
+ public override DecoderFallbackBuffer CreateFallbackBuffer ()
+ {
+ fallback = new DecoderReplacementFallback ();
+ return new DecoderTestFallbackBuffer (fallback, fallbackAction);
+ }
+
+ public override int MaxCharCount
+ {
+ get { return fallback.MaxCharCount; }
+ }
+ }
+
+ public delegate void FallbackDelegate (byte [] bytesUnknown, int index);
+
+ Encoding encoding;
+
+ byte [][] expectedUnknownBytes;
+ int expectedUnknownBytesIndex;
+
+ public EncodingTester (string encodingName)
+ {
+ var decoderFallback = new DecoderTestFallback (this.DecoderFallback);
+ encoding = Encoding.GetEncoding (encodingName, new EncoderReplacementFallback(), decoderFallback);
+ }
+
+ private void DecoderFallback (byte [] bytesUnknown, int index)
+ {
+ if (expectedUnknownBytesIndex == expectedUnknownBytes.Length)
+ expectedUnknownBytesIndex = 0;
+
+ var expectedBytes = expectedUnknownBytes [expectedUnknownBytesIndex++];
+ Assert.AreEqual (expectedBytes, bytesUnknown);
+ }
+
+ public void TestDecoderFallback (byte [] data, string expectedString, params byte [][] expectedUnknownBytes)
+ {
+ lock (this)
+ {
+ this.expectedUnknownBytes = expectedUnknownBytes;
+ this.expectedUnknownBytesIndex = 0;
+
+ Assert.AreEqual (expectedString.Length, encoding.GetCharCount (data));
+ Assert.AreEqual (expectedUnknownBytesIndex, expectedUnknownBytes.Length);
+
+ Assert.AreEqual (expectedString, encoding.GetString (data));
+ Assert.AreEqual (expectedUnknownBytesIndex, expectedUnknownBytes.Length);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs
index 91a465c13d3..8943ab6b099 100644
--- a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs
+++ b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs
@@ -1198,5 +1198,88 @@ namespace MonoTests.System.Text
int charactersWritten = Encoding.UTF8.GetDecoder ().GetChars (bytes, 0, 0, chars, 10, false);
Assert.AreEqual (0, charactersWritten, "#3");
}
+
+ [Test]
+ public void EncodingFallback ()
+ {
+ /* Legal UTF-8 Byte Sequences
+ * 1st 2nd 3rd 4th
+ * 00..7F
+ * C2..DF 80..BF
+ * E0 A0..BF 80..BF
+ * E1..EF 80..BF 80..BF
+ * F0 90..BF 80..BF 80..BF
+ * F1..F3 80..BF 80..BF 80..BF
+ * F4 80..8F 80..BF 80..BF
+ */
+
+ var t = new EncodingTester ("utf-8");
+ byte [] data;
+
+ // Invalid 1st byte
+ for (byte b = 0x80; b <= 0xC1; b++) {
+ data = new byte [] { b };
+ t.TestDecoderFallback (data, "?", new byte [] { b });
+ }
+
+ ///Invalid 2nd byte
+ // C2..DF 80..BF
+ for (byte b = 0xC2; b <= 0xDF; b++) {
+ data = new byte [] { b, 0x61 };
+ t.TestDecoderFallback (data, "?a", new byte [] { b });
+ }
+
+ // E0 A0..BF
+ data = new byte [] { 0xE0, 0x99};
+ t.TestDecoderFallback (data, "?", new byte [] { 0xE0, 0x99});
+
+ // E1..EF 80..BF
+ for (byte b = 0xE1; b <= 0xEF; b++) {
+ data = new byte [] { b, 0x61 };
+ t.TestDecoderFallback (data, "?a", new byte [] { b });
+ }
+
+ // F0 90..BF
+ data = new byte [] { 0xF0, 0x8F};
+ t.TestDecoderFallback (data, "?", new byte [] { 0xF0, 0x8F });
+
+ // F1..F4 80..XX
+ for (byte b = 0xF1; b <= 0xF4; b++) {
+ data = new byte [] { b, 0x61 };
+ t.TestDecoderFallback (data, "?a", new byte [] { b });
+ }
+
+ // C2..F3 XX..BF
+ for (byte b = 0xC2; b <= 0xF3; b++) {
+ data = new byte [] { b, 0xC0 };
+ t.TestDecoderFallback (data, "??", new byte [] { b }, new byte [] { 0xC0 });
+ }
+
+ // Invalid 3rd byte
+ // E0..F3 90..BF 80..BF
+ for (byte b = 0xE0; b <= 0xF3; b++) {
+ data = new byte [] { b, 0xB0, 0x61 };
+ t.TestDecoderFallback (data, "?a", new byte [] { b, 0xB0 });
+ data = new byte [] { b, 0xB0, 0xC0 };
+ t.TestDecoderFallback (data, "??", new byte [] { b, 0xB0 }, new byte [] { 0xC0 });
+ }
+
+ // F4 80..8F 80..BF
+ data = new byte [] { 0xF4, 0x8F, 0xC0 };
+ t.TestDecoderFallback (data, "??", new byte [] { 0xF4, 0x8F }, new byte [] { 0xC0 });
+
+ // Invalid 4th byte
+ // F0..F3 90..BF 80..BF 80..BF
+ for (byte b = 0xF0; b <= 0xF3; b++) {
+ data = new byte [] { b, 0xB0, 0xB0, 0x61 };
+ t.TestDecoderFallback (data, "?a", new byte [] { b, 0xB0, 0xB0 });
+ data = new byte [] { b, 0xB0, 0xB0, 0xC0 };
+ t.TestDecoderFallback (data, "??", new byte [] { b, 0xB0, 0xB0 }, new byte [] { 0xC0 });
+ }
+
+ // F4 80..8F 80..BF 80..BF
+ data = new byte [] { 0xF4, 0x8F, 0xB0, 0xC0 };
+ t.TestDecoderFallback (data, "??", new byte [] { 0xF4, 0x8F, 0xB0 }, new byte [] { 0xC0 });
+ }
}
}
diff --git a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
index 3f0607bcd60..63eb8a2aff1 100644
--- a/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
+++ b/mcs/class/corlib/Test/System.Threading.Tasks/TaskTest.cs
@@ -276,7 +276,7 @@ namespace MonoTests.System.Threading.Tasks
tasks[i] = Task.Factory.StartNew (delegate { Thread.Sleep (0); });
}
- Assert.IsTrue (Task.WaitAll (tasks, 2000));
+ Assert.IsTrue (Task.WaitAll (tasks, 5000));
}
}
@@ -904,7 +904,11 @@ namespace MonoTests.System.Threading.Tasks
args.SetObserved ();
};
var inner = new ApplicationException ();
- Task.Factory.StartNew (() => { throw inner; });
+ Thread t = new Thread (delegate () {
+ Task.Factory.StartNew (() => { Console.WriteLine ("HIT!"); throw inner; });
+ });
+ t.Start ();
+ t.Join ();
Thread.Sleep (1000);
GC.Collect ();
Thread.Sleep (1000);
@@ -1102,7 +1106,8 @@ namespace MonoTests.System.Threading.Tasks
{
var task = new TaskFactory ().StartNew (() => { });
var ar = (IAsyncResult)task;
- ar.AsyncWaitHandle.WaitOne ();
+ Assert.IsFalse (ar.CompletedSynchronously, "#1");
+ Assert.IsTrue (ar.AsyncWaitHandle.WaitOne (5000), "#2");
}
[Test]
diff --git a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs
index d8c1299efe2..5bf805aae0b 100644
--- a/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs
+++ b/mcs/class/corlib/Test/System.Threading/CancellationTokenSourceTest.cs
@@ -90,9 +90,9 @@ namespace MonoTests.System.Threading
int called = 0;
var cts = new CancellationTokenSource ();
cts.Token.Register (() => called++);
- cts.CancelAfter (20);
+ cts.CancelAfter (50);
cts.Dispose ();
- Thread.Sleep (50);
+ Thread.Sleep (100);
Assert.AreEqual (0, called, "#1");
}
diff --git a/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs b/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs
index 08d14bec598..5d68a7d0e2a 100644
--- a/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs
+++ b/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs
@@ -38,11 +38,9 @@ namespace MonoTests.System.Threading
readonly object obj_1 = "obj_1";
readonly object obj_2 = "obj_2";
readonly object obj_3 = "obj_3";
-#if !TARGET_JVM // No support for exchanging two IntPtrs
readonly IntPtr iptr_1 = (IntPtr)int32_1;
readonly IntPtr iptr_2 = (IntPtr)int32_2;
readonly IntPtr iptr_3 = (IntPtr)int32_3;
-#endif // TARGET_JVM
[Test]
public void TestExchange_Int32 ()
@@ -85,7 +83,6 @@ namespace MonoTests.System.Threading
Assert.AreEqual(dbl_2, dbl);
}
-#if !TARGET_JVM // No support for exchanging two IntPtrs
[Test]
public void TestExchange_Iptr ()
{
@@ -93,7 +90,6 @@ namespace MonoTests.System.Threading
Assert.AreEqual(iptr_1, Interlocked.Exchange(ref iptr, iptr_2));
Assert.AreEqual(iptr_2, iptr);
}
-#endif // TARGET_JVM
#endif
[Test]
@@ -137,7 +133,6 @@ namespace MonoTests.System.Threading
Assert.AreEqual(dbl_2, dbl);
}
-#if !TARGET_JVM // No support for compare exchanging two IntPtrs
[Test]
public void TestCompareExchange_Iptr ()
{
@@ -145,7 +140,6 @@ namespace MonoTests.System.Threading
Assert.AreEqual(iptr_1, Interlocked.CompareExchange(ref iptr, iptr_2, iptr_1));
Assert.AreEqual(iptr_2, iptr);
}
-#endif // TARGET_JVM
#endif
[Test]
@@ -189,7 +183,6 @@ namespace MonoTests.System.Threading
Assert.AreEqual(dbl_1, dbl);
}
-#if !TARGET_JVM // No support for compare exchanging two IntPtrs
[Test]
public void TestCompareExchange_Failed_Iptr ()
{
@@ -197,7 +190,6 @@ namespace MonoTests.System.Threading
Assert.AreEqual(iptr_1, Interlocked.CompareExchange(ref iptr, iptr_2, iptr_3));
Assert.AreEqual(iptr_1, iptr);
}
-#endif // TARGET_JVM
#endif
[Test]
diff --git a/mcs/class/corlib/Test/System.Threading/MutexTest.cs b/mcs/class/corlib/Test/System.Threading/MutexTest.cs
index 64aeed5d944..a4669029b88 100644
--- a/mcs/class/corlib/Test/System.Threading/MutexTest.cs
+++ b/mcs/class/corlib/Test/System.Threading/MutexTest.cs
@@ -156,7 +156,6 @@ namespace MonoTests.System.Threading
}
[Test]
- [Category("TargetJvmNotSupported")] // IntPtr native handles are not supported for TARGET_JVM.
public void TestHandle()
{
Mutex Sem = new Mutex();
diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
index ca5489ef0d8..8c82931acc5 100644
--- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
+++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs
@@ -25,9 +25,7 @@ namespace MonoTests.System.Threading
{
public static void NoPrincipal ()
{
-#if !TARGET_JVM // AppDomain.SetPrincipalPolicy not supported for TARGET_JVM
AppDomain.CurrentDomain.SetPrincipalPolicy (PrincipalPolicy.NoPrincipal);
-#endif
IPrincipal p = Thread.CurrentPrincipal;
Assert.IsNull (p, "#1");
@@ -39,7 +37,6 @@ namespace MonoTests.System.Threading
// in this case we can return to null
}
-#if !TARGET_JVM // AppDomain.SetPrincipalPolicy not supported for TARGET_JVM
public static void UnauthenticatedPrincipal ()
{
AppDomain.CurrentDomain.SetPrincipalPolicy (PrincipalPolicy.UnauthenticatedPrincipal);
@@ -76,7 +73,6 @@ namespace MonoTests.System.Threading
Assert.IsNotNull (Thread.CurrentPrincipal, "#7");
// in this case we can't return to null
}
-#endif // TARGET_JVM
public static void CopyOnNewThread ()
{
@@ -684,7 +680,6 @@ namespace MonoTests.System.Threading
}
}
-#if !TARGET_JVM // AppDomain.SetPrincipalPolicy not supported for TARGET_JVM
[Test]
[Ignore ("see comment below.")]
public void CurrentPrincipal_PrincipalPolicy_UnauthenticatedPrincipal ()
@@ -713,7 +708,6 @@ namespace MonoTests.System.Threading
t.Abort ();
}
}
-#endif // TARGET_JVM
[Test]
public void IPrincipal_CopyOnNewThread ()
diff --git a/mcs/class/corlib/Test/System/ActivatorTest.cs b/mcs/class/corlib/Test/System/ActivatorTest.cs
index 1b810874322..f7fc07e9868 100644
--- a/mcs/class/corlib/Test/System/ActivatorTest.cs
+++ b/mcs/class/corlib/Test/System/ActivatorTest.cs
@@ -13,7 +13,7 @@ using System;
using System.Globalization;
using System.IO;
using System.Reflection;
-#if !TARGET_JVM && !MONOTOUCH // Reflection.Emit not supported for TARGET_JVM
+#if !MONOTOUCH
using System.Reflection.Emit;
#endif
using System.Runtime.InteropServices;
@@ -311,7 +311,7 @@ namespace MonoTests.System {
Assert.AreEqual (7, objCOMTest.Id, "#A05");
}
-#if !TARGET_JVM && !MONOTOUCH // Reflection.Emit not supported for TARGET_JVM
+#if !MONOTOUCH
[Test]
[ExpectedException (typeof (MissingMethodException))]
public void CreateInstance_TypeBuilder ()
@@ -334,7 +334,7 @@ namespace MonoTests.System {
{
Activator.CreateInstance (typeof (ArgIterator), null);
}
-#endif // TARGET_JVM
+#endif
[Test]
[ExpectedException (typeof (NotSupportedException))]
@@ -343,14 +343,12 @@ namespace MonoTests.System {
Activator.CreateInstance (typeof (void), null);
}
-#if !TARGET_JVM // RuntimeArgumentHandle not supported for TARGET_JVM
[Test]
[ExpectedException (typeof (NotSupportedException))]
public void CreateInstance_RuntimeArgumentHandle ()
{
Activator.CreateInstance (typeof (RuntimeArgumentHandle), null);
}
-#endif // TARGET_JVM
[Test]
[ExpectedException (typeof (NotSupportedException))]
@@ -370,7 +368,6 @@ namespace MonoTests.System {
[Test]
[ExpectedException(typeof(MissingMethodException))]
- [Category ("TargetJvmNotWorking")]
public void CreateInstanceAbstract2 ()
{
Activator.CreateInstance (typeof (Type), true);
@@ -392,14 +389,12 @@ namespace MonoTests.System {
[Test]
[ExpectedException (typeof (MissingMethodException))]
- [Category ("TargetJvmNotWorking")]
public void CreateInstanceAbstract5 ()
{
Activator.CreateInstance (typeof (Type), BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, null, CultureInfo.InvariantCulture, null);
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void CreateInstance_Nullable ()
{
Assert.AreEqual (5, Activator.CreateInstance (typeof (Nullable<int>), new object [] { 5 }));
@@ -419,7 +414,6 @@ namespace MonoTests.System {
#if !MOBILE
[Test]
[ExpectedException (typeof (ArgumentNullException))]
- [Category ("TargetJvmNotWorking")]
public void GetObject_UrlNull ()
{
Activator.GetObject (typeof (COMTest), null);
@@ -477,7 +471,6 @@ namespace MonoTests.System {
}
[Test]
- [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx10 ()
{
Unification (String.Format (CorlibPermissionPattern, fx10version));
@@ -485,7 +478,6 @@ namespace MonoTests.System {
}
[Test]
- [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx11 ()
{
Unification (String.Format (CorlibPermissionPattern, fx11version));
@@ -493,7 +485,6 @@ namespace MonoTests.System {
}
[Test]
- [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx20 ()
{
Unification (String.Format (CorlibPermissionPattern, fx20version));
@@ -501,14 +492,12 @@ namespace MonoTests.System {
}
[Test]
- [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
public void Unification_FromFx99_Corlib ()
{
Unification (String.Format (CorlibPermissionPattern, "9.99.999.9999"));
}
[Test]
- [Category ("TargetJvmNotSupported")] // No support under TARGET_JVM for assemlies versioning
[Category ("NotWorking")]
public void Unification_FromFx99_System ()
{
diff --git a/mcs/class/corlib/Test/System/AppDomainSetupTest.cs b/mcs/class/corlib/Test/System/AppDomainSetupTest.cs
index c0b5ed77eda..2e4b6e59a83 100644
--- a/mcs/class/corlib/Test/System/AppDomainSetupTest.cs
+++ b/mcs/class/corlib/Test/System/AppDomainSetupTest.cs
@@ -29,7 +29,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ConfigurationFile_Relative_ApplicationBase ()
{
string fileName = "blar.config";
@@ -51,7 +50,6 @@ namespace MonoTests.System
[Test]
[ExpectedException (typeof (MemberAccessException))] // The ApplicationBase must be set before retrieving this property
- [Category ("TargetJvmNotWorking")]
public void ConfigurationFile_Relative_NoApplicationBase ()
{
AppDomainSetup setup = new AppDomainSetup();
@@ -72,7 +70,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ApplicationBase1 ()
{
string expected_path = tmpPath.Replace(@"\", @"/");
@@ -96,7 +93,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ApplicationBase2 ()
{
AppDomainSetup setup = new AppDomainSetup ();
@@ -105,7 +101,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ApplicationBase3 ()
{
AppDomainSetup setup = new AppDomainSetup ();
@@ -115,7 +110,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ApplicationBase4 ()
{
AppDomainSetup setup = new AppDomainSetup ();
@@ -134,7 +128,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ApplicationBase5 ()
{
// This is failing because of (probably) a windows-ism, so don't worry
@@ -154,7 +147,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void ApplicationBase6 ()
{
AppDomainSetup setup = new AppDomainSetup ();
diff --git a/mcs/class/corlib/Test/System/ArrayTest.cs b/mcs/class/corlib/Test/System/ArrayTest.cs
index eab4c40e143..fbea6549dc9 100644
--- a/mcs/class/corlib/Test/System/ArrayTest.cs
+++ b/mcs/class/corlib/Test/System/ArrayTest.cs
@@ -543,11 +543,6 @@ public class ArrayTest
} catch (ArgumentException) {
errorThrown = true;
}
-#if TARGET_JVM // This is really implementation dependent behaviour.
- catch (RankException) {
- errorThrown = true;
- }
-#endif // TARGET_JVM
Assert.IsTrue (errorThrown, "#E62");
}
{
@@ -707,7 +702,6 @@ public class ArrayTest
}
Assert.IsTrue (errorThrown, "#F03b");
}
-#if !TARGET_JVM // Arrays lower bounds are not supported for TARGET_JVM
{
bool errorThrown = false;
try {
@@ -717,7 +711,6 @@ public class ArrayTest
}
Assert.IsTrue (errorThrown, "#F04");
}
-#endif // TARGET_JVM
{
bool errorThrown = false;
try {
@@ -728,7 +721,6 @@ public class ArrayTest
}
Assert.IsTrue (errorThrown, "#F05");
}
-#if !TARGET_JVM // CreateInstance with lower bounds not supported for TARGET_JVM
{
bool errorThrown = false;
try {
@@ -771,7 +763,6 @@ public class ArrayTest
Type szarrayType = new int [10].GetType ();
Assert.IsTrue (szarrayType == (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {0})).GetType ());
Assert.IsTrue (szarrayType != (Array.CreateInstance (typeof (int), new int[] {1}, new int[] {1})).GetType ());
-#endif // TARGET_JVM
}
[Test]
@@ -842,7 +833,6 @@ public class ArrayTest
}
[Test]
- [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestGetEnumeratorNonZeroLowerBounds() {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
@@ -871,7 +861,6 @@ public class ArrayTest
}
[Test]
- [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Add () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
@@ -892,7 +881,6 @@ public class ArrayTest
}
[Test]
- [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Insert () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
@@ -913,7 +901,6 @@ public class ArrayTest
}
[Test]
- [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Remove () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
@@ -934,7 +921,6 @@ public class ArrayTest
}
[Test]
- [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_RemoveAt () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
@@ -955,7 +941,6 @@ public class ArrayTest
}
[Test]
- [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_Contains () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
@@ -981,7 +966,6 @@ public class ArrayTest
}
[Test]
- [Category ("TargetJvmNotSupported")] // Arrays lower bounds are not supported for TARGET_JVM
public void TestIList_IndexOf () {
int[] myLengthsArray = new int[2] { 3, 5 };
int[] myBoundsArray = new int[2] { 2, 3 };
@@ -3178,7 +3162,6 @@ public class ArrayTest
public int i, j;
}
-#if !TARGET_JVM // BugBUG: T[] is not yet ICollection<T> under TARGET_JVM
[Test]
// From bug #80563
public void ICollectionNull ()
@@ -3234,7 +3217,6 @@ public class ArrayTest
Assert.AreEqual (-1, test.IndexOf (null), "array with test");
}
-#endif // TARGET_JVM
#region Bug 80299
diff --git a/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs b/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs
index 66eb43aebbb..0c3cadf6755 100644
--- a/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs
+++ b/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs
@@ -64,12 +64,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#4");
Assert.AreEqual ("message", bif.Message, "#5");
Assert.IsNull (bif.FusionLog, "#6");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName + ": message"), "#7");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#7");
-#endif // TARGET_JVM
}
[Test]
@@ -85,12 +81,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#4");
Assert.AreEqual (string.Empty, bif.Message, "#5");
Assert.IsNull (bif.FusionLog, "#6");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#7");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": ",
bif.ToString (), "#7");
-#endif // TARGET_JVM
}
[Test]
@@ -135,12 +127,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual ("message", bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": message ---> "
+ ame.GetType ().FullName + ": something", bif.ToString (), "#8");
-#endif // TARGET_JVM
}
[Test]
@@ -158,12 +146,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual (string.Empty, bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().IndexOf (ame.GetType ().FullName + ": something") != -1, "#8");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": ---> "
+ ame.GetType ().FullName + ": something", bif.ToString (), "#8");
-#endif // TARGET_JVM
}
[Test]
@@ -188,9 +172,7 @@ namespace MonoTests.System
Assert.IsNull (bif.FusionLog, "#7");
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName), "#8");
Assert.IsTrue (bif.ToString ().IndexOf ("---> " + ame.GetType ().FullName) != -1, "#9");
-#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#10");
-#endif // TARGET_JVM
}
[Test]
@@ -207,12 +189,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#4");
Assert.AreEqual ("message", bif.Message, "#5");
Assert.IsNull (bif.FusionLog, "#6");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#7");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#7");
-#endif // TARGET_JVM
}
[Test]
@@ -256,12 +234,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual ("message", bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#8");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#8");
-#endif // TARGET_JVM
}
[Test]
@@ -278,12 +252,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#A4");
Assert.AreEqual ("message", bif.Message, "#A5");
Assert.IsNull (bif.FusionLog, "#A6");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": message"), "#A7");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": message",
bif.ToString (), "#A7");
-#endif // TARGET_JVM
bif = new BadImageFormatException (string.Empty, (string) null);
@@ -295,12 +265,8 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#B4");
Assert.AreEqual (string.Empty, bif.Message, "#B5");
Assert.IsNull (bif.FusionLog, "#B6");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#B7");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": ",
bif.ToString (), "#B7");
-#endif // TARGET_JVM
}
[Test]
@@ -318,11 +284,7 @@ namespace MonoTests.System
Assert.IsNotNull (bif.Message, "#5");
Assert.AreEqual (string.Empty, bif.Message, "#6");
Assert.IsNull (bif.FusionLog, "#7");
-#if TARGET_JVM // ToString always has a stack trace under TARGET_JVM
- Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType().FullName + ": "), "#8");
-#else
Assert.AreEqual (bif.GetType ().FullName + ": ", bif.ToString (), "#8");
-#endif // TARGET_JVM
}
[Test]
@@ -346,9 +308,7 @@ namespace MonoTests.System
Assert.IsNull (bif.FusionLog, "#5");
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
+ ": "), "#6");
-#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#7");
-#endif // TARGET_JVM
}
[Test]
@@ -412,9 +372,7 @@ namespace MonoTests.System
Assert.IsNull (bif.FusionLog, "#B6");
Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName
+ ": "), "#B7");
-#if !TARGET_JVM // ToString always has a stack trace under TARGET_JVM
Assert.IsFalse (bif.ToString ().IndexOf (Environment.NewLine) != -1, "#B8");
-#endif // TARGET_JVM
Assert.IsTrue (bif.ToString ().IndexOf ("''") != -1, "#B9");
}
}
diff --git a/mcs/class/corlib/Test/System/ConvertTest.cs b/mcs/class/corlib/Test/System/ConvertTest.cs
index 6467fe44115..8aee8a9cc65 100644
--- a/mcs/class/corlib/Test/System/ConvertTest.cs
+++ b/mcs/class/corlib/Test/System/ConvertTest.cs
@@ -2923,7 +2923,6 @@ namespace MonoTests.System {
[Test]
[ExpectedException (typeof (FormatException))]
- [Category ("TargetJvmNotWorking")]
public void FromBase64CharArray_Empty ()
{
Convert.FromBase64CharArray (new char[0], 0, 0);
@@ -2931,7 +2930,6 @@ namespace MonoTests.System {
[Test]
[ExpectedException (typeof (FormatException))]
- [Category ("TargetJvmNotWorking")]
public void FormatBase64CharArray_OnlyWhitespace ()
{
Convert.FromBase64CharArray (new char[3] {' ',
@@ -3061,7 +3059,6 @@ namespace MonoTests.System {
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void FromBase64_Empty ()
{
Assert.AreEqual (new byte[0], Convert.FromBase64String (string.Empty));
diff --git a/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs b/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs
index 6aa6e290807..13564426aed 100644
--- a/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs
+++ b/mcs/class/corlib/Test/System/DateTimeOffsetTest.cs
@@ -668,6 +668,60 @@ namespace MonoTests.System {
Assert.AreEqual (dto.Offset, dto2.Offset);
Assert.AreEqual (dt.AddDays (-60), dto2.DateTime);
}
+
+ [Test]
+ public void TestPartialDateTimeParsing ()
+ {
+ var now = DateTime.Now;
+ const DateTimeStyles style = DateTimeStyles.AssumeUniversal;
+
+ //year
+ var date = DateTimeOffset.ParseExact ("2003", "yyyy", CultureInfo.InvariantCulture, style);
+ var expected = "01/01/2003 00:00:00 +00:00";
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+
+ //month
+ date = DateTimeOffset.ParseExact ("12", "MM", CultureInfo.InvariantCulture, style);
+ expected = string.Format ("12/01/{0} 00:00:00 +00:00", now.Year);
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+
+ //day
+ date = DateTimeOffset.ParseExact ("29", "dd", CultureInfo.InvariantCulture, style);
+ expected = string.Format ("01/29/{0} 00:00:00 +00:00", now.Year);
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+
+ //hours
+ date = DateTimeOffset.ParseExact ("06", "HH", CultureInfo.InvariantCulture, style);
+ expected = string.Format ("{0:D2}/{1:D2}/{2} 06:00:00 +00:00", now.Month, now.Day, now.Year);
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+
+ //minutes
+ date = DateTimeOffset.ParseExact ("45", "mm", CultureInfo.InvariantCulture, style);
+ expected = string.Format ("{0:D2}/{1:D2}/{2} 00:45:00 +00:00", now.Month, now.Day, now.Year);
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+
+ //seconds
+ date = DateTimeOffset.ParseExact ("45", "ss", CultureInfo.InvariantCulture, style);
+ expected = string.Format ("{0:D2}/{1:D2}/{2} 00:00:45 +00:00", now.Month, now.Day, now.Year);
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+ }
+
+ [Test]
+ public void TestDateOnlyWithTimeOffset ()
+ {
+ var fp = CultureInfo.InvariantCulture;
+ var date = DateTimeOffset.Parse("2013-11-07+11:00", fp, DateTimeStyles.AssumeUniversal);
+ var expected = string.Format ("{0:D2}/{1:D2}/{2} 00:00:00 +11:00", 11, 7, 2013);
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+ }
+
+ [Test]
+ public void GMTDateTime ()
+ {
+ var date = DateTimeOffset.Parse ("Wed, 10 Sep 2014 22:01:40 GMT", CultureInfo.InvariantCulture);
+ var expected = "09/10/2014 22:01:40 +00:00";
+ Assert.AreEqual (expected, date.ToString (CultureInfo.InvariantCulture));
+ }
}
}
diff --git a/mcs/class/corlib/Test/System/DateTimeTest.cs b/mcs/class/corlib/Test/System/DateTimeTest.cs
index 343e723be82..202c3d2117d 100644
--- a/mcs/class/corlib/Test/System/DateTimeTest.cs
+++ b/mcs/class/corlib/Test/System/DateTimeTest.cs
@@ -2584,5 +2584,40 @@ namespace MonoTests.System
Assert.AreEqual (dt, parsed, "#1");
}
+
+ [Test]
+ public void ISO8601FractionalDigits ()
+ {
+ string date = "2014-08-25T01:20:23.601911612343423423465789789365674575676746756747467Z";
+ long expectedTicks = 635445264236019116;
+
+ var dt = DateTime.Parse (date, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
+
+ Assert.AreEqual (expectedTicks, dt.Ticks);
+ }
+
+ [Test]
+ [ExpectedException (typeof (FormatException))]
+ public void ISO8601FractionalDigitsException1 ()
+ {
+ string date = "2014-08-25T01:20:23.60191161234342342346578978936567457567:6746756747467Z";
+ DateTime.Parse (date, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
+ }
+
+ [Test]
+ [ExpectedException (typeof (FormatException))]
+ public void ISO8601FractionalDigitsException2 ()
+ {
+ string date = "2014-08-25T01:20:23.6019116-12343423423465789789365674575676746756747467Z";
+ DateTime.Parse (date, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
+ }
+
+ [Test]
+ [ExpectedException (typeof (FormatException))]
+ public void ISO8601FractionalDigitsException3 ()
+ {
+ string date = "2014-08-25T01:20:23.601911612343423423465789789365674575676746756747467%Z";
+ DateTime.Parse (date, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind);
+ }
}
}
diff --git a/mcs/class/corlib/Test/System/DecimalTest.cs b/mcs/class/corlib/Test/System/DecimalTest.cs
index 8419857df40..dc02ab58663 100644
--- a/mcs/class/corlib/Test/System/DecimalTest.cs
+++ b/mcs/class/corlib/Test/System/DecimalTest.cs
@@ -198,9 +198,7 @@ namespace MonoTests.System
new ToStringTest ("E", Decimal.MinValue, "-7.922816E+028"),
new ToStringTest ("E3", Decimal.MinValue, "-7.923E+028"),
new ToStringTest ("E28", Decimal.MinValue, "-7.9228162514264337593543950335E+028"),
-#if !TARGET_JVM // TargetJvmNotWorking
new ToStringTest ("E30", Decimal.MinValue, "-7.922816251426433759354395033500E+028"),
-#endif
new ToStringTest ("E0", Decimal.MinValue, "-8E+028"),
new ToStringTest ("N3", Decimal.MinValue, "-79,228,162,514,264,337,593,543,950,335.000"),
new ToStringTest ("N0", Decimal.MinValue, "-79,228,162,514,264,337,593,543,950,335"),
@@ -288,7 +286,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void TestPercentPattern ()
{
NumberFormatInfo nfi2 = (NumberFormatInfo) NfiUser.Clone ();
@@ -342,7 +339,6 @@ namespace MonoTests.System
};
[Test]
- [Category ("TargetJvmNotWorking")]
public void TestParse ()
{
@@ -1140,7 +1136,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void TryParse ()
{
Decimal r;
@@ -1561,5 +1556,13 @@ namespace MonoTests.System
d = Decimal.Parse ("0.");
Assert.AreEqual ("0", d.ToString (), "#11");
}
+
+ [Test] // bug #21764
+ public void RoundToString ()
+ {
+ Assert.AreEqual ("3", Math.Round (3M, 5).ToString (CultureInfo.InvariantCulture), "#1");
+ Assert.AreEqual ("3.01", Math.Round (3.01M, 5).ToString (CultureInfo.InvariantCulture), "#2");
+ Assert.AreEqual ("-3.01", Math.Round (-3.01M, 5).ToString (CultureInfo.InvariantCulture), "#3");
+ }
}
}
diff --git a/mcs/class/corlib/Test/System/DecimalTest2.cs b/mcs/class/corlib/Test/System/DecimalTest2.cs
index d87cbb1173b..aa39bad8991 100644
--- a/mcs/class/corlib/Test/System/DecimalTest2.cs
+++ b/mcs/class/corlib/Test/System/DecimalTest2.cs
@@ -136,25 +136,10 @@ namespace MonoTests.System
}
}
-#if TARGET_JVM
- // Under TARGET_JVm we have a slightly better precision (becuase of
- // using Java BigDecimal).
- private bool AreNotEqual(Decimal v1, Decimal v2)
- {
- Decimal delta = v1 - v2;
- if (delta < 0m)
- delta = -delta;
- Decimal absV1 = v1 < 0m ? -v1 : v1;
- if (absV1 < 1m)
- return delta > 1E-27m;
- return delta / absV1 > 1E-27m;
- }
-#else
private bool AreNotEqual(Decimal v1, Decimal v2)
{
return v1 != v2;
}
-#endif
[Test]
diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs
index ddfc099b73d..8d9c622262e 100644
--- a/mcs/class/corlib/Test/System/DelegateTest.cs
+++ b/mcs/class/corlib/Test/System/DelegateTest.cs
@@ -851,7 +851,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void CoContraVariance ()
{
CoContraVariantDelegate d = (CoContraVariantDelegate)
@@ -1116,20 +1115,68 @@ namespace MonoTests.System
typeof (Action),
this.GetType ().GetMethod ("Banga"));
}
-#if !MONOTOUCH
+
[Test] // #664205
- public void DynamicInvokeNullTarget ()
+ public void DynamicInvokeClosedStatic ()
{
- var method = new DynamicMethod ("test", typeof (int), new [] { typeof (object) }, true);
- var il = method.GetILGenerator ();
- il.Emit (OpCodes.Ldc_I4, 42);
- il.Emit (OpCodes.Ret);
+ var d1 = Delegate.CreateDelegate (typeof(Func<int>), null, typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB"));
+ Assert.AreEqual (1, d1.DynamicInvoke (), "#1");
+
+ var d2 = Delegate.CreateDelegate (typeof(Func<int>), "arg", typeof(DelegateTest).GetMethod ("DynamicInvokeClosedStaticDelegate_CB"));
+ Assert.AreEqual (2, d2.DynamicInvoke (), "#2");
+ }
+
+ public static int DynamicInvokeClosedStaticDelegate_CB (string instance)
+ {
+ switch (instance) {
+ case null:
+ return 1;
+ case "arg":
+ return 2;
+ default:
+ Assert.Fail ();
+ return -1;
+ }
+ }
- var @delegate = method.CreateDelegate (typeof (Func<int>), null);
+ [Test]
+ public void DynamicInvokeOpenInstanceDelegate ()
+ {
+ var d1 = Delegate.CreateDelegate (typeof (Func<DelegateTest, int>), typeof(DelegateTest).GetMethod ("DynamicInvokeOpenInstanceDelegate_CB"));
+ Assert.AreEqual (5, d1.DynamicInvoke (new DelegateTest ()), "#1");
- Assert.AreEqual (42, (int) @delegate.DynamicInvoke ());
+ var d3 = (Func<DelegateTest, int>) d1;
+ Assert.AreEqual (5, d3 (null), "#2");
}
-#endif
+
+ public int DynamicInvokeOpenInstanceDelegate_CB ()
+ {
+ return 5;
+ }
+
+ [Test]
+ public void DynamicInvoke_InvalidArguments ()
+ {
+ Delegate d = new Func<int, int> (TestMethod);
+
+ try {
+ d.DynamicInvoke (null);
+ Assert.Fail ("#1");
+ } catch (TargetParameterCountException) {
+ }
+
+ try {
+ d.DynamicInvoke (new object [0]);
+ Assert.Fail ("#2");
+ } catch (TargetParameterCountException) {
+ }
+ }
+
+ public static int TestMethod (int i)
+ {
+ throw new NotSupportedException ();
+ }
+
#endif
public static void CreateDelegateOfStaticMethodBoundToNull_Helper (object[] args) {}
@@ -1329,17 +1376,56 @@ namespace MonoTests.System
} catch (ArgumentException) {}
}
- private static Func<Int32, Int32, bool> Int32D = (x, y) => (x & y) == y;
-
[Test]
public void EnumBaseTypeConversion () {
+ Func<int, int, bool> dm = Int32D2;
var d =
- Delegate.CreateDelegate(typeof (Func<StringComparison,
- StringComparison, bool>), Int32D.Method) as
+ Delegate.CreateDelegate(typeof (Func<StringComparison, StringComparison, bool>), dm.Method) as
Func<StringComparison, StringComparison, bool>;
Assert.IsTrue (d (0, 0));
}
+#if !MONOTOUCH
+ public static void DynInvokeWithClosedFirstArg (object a, object b)
+ {
+ }
+
+ [Test]
+ public void DynamicInvokeClosedOverNullDelegate () {
+ var dm = new DynamicMethod ("test", typeof (Delegate), null);
+ var il = dm.GetILGenerator ();
+ il.Emit (OpCodes.Ldnull);
+ il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg"));
+ il.Emit (OpCodes.Newobj, typeof (Action<object>).GetConstructors ()[0]);
+ il.Emit (OpCodes.Ret);
+
+ var f = (Func <object>) dm.CreateDelegate (typeof (Func <object>));
+ Action<object> ac = (Action<object>)f();
+ ac.DynamicInvoke (new object[] { "oi" });
+ ac.DynamicInvoke (new object[] { null });
+ }
+
+ [Test]
+ public void DynamicInvokeFirstArgBoundDelegate () {
+ var dm = new DynamicMethod ("test", typeof (Delegate), null);
+ var il = dm.GetILGenerator ();
+ il.Emit (OpCodes.Ldstr, "test");
+ il.Emit (OpCodes.Ldftn, GetType ().GetMethod ("DynInvokeWithClosedFirstArg"));
+ il.Emit (OpCodes.Newobj, typeof (Action<object>).GetConstructors ()[0]);
+ il.Emit (OpCodes.Ret);
+
+ var f = (Func <object>) dm.CreateDelegate (typeof (Func <object>));
+ Action<object> ac = (Action<object>)f();
+ ac.DynamicInvoke (new object[] { "oi" });
+ ac.DynamicInvoke (new object[] { null });
+ }
+#endif
+
+ static bool Int32D2 (int x, int y)
+ {
+ return (x & y) == y;
+ }
+
public class B {
public virtual string retarg3 (string s) {
diff --git a/mcs/class/corlib/Test/System/EnumTest.cs b/mcs/class/corlib/Test/System/EnumTest.cs
index 8b6823ac101..6b42976a244 100644
--- a/mcs/class/corlib/Test/System/EnumTest.cs
+++ b/mcs/class/corlib/Test/System/EnumTest.cs
@@ -201,30 +201,22 @@ namespace MonoTests.System
Assert.AreEqual ("00", TestingEnum4.This.ToString ("x"), "#B1");
Assert.AreEqual ("00", TestingEnum4.This.ToString ("X"), "#B2");
-#if !TARGET_JVM // This appears not to work under .Net
Assert.AreEqual ("ff", TestingEnum4.Test.ToString ("x"), "#B3");
-#endif // TARGET_JVM
Assert.AreEqual ("FF", TestingEnum4.Test.ToString ("X"), "#B4");
Assert.AreEqual ("0000", TestingEnum5.This.ToString ("x"), "#C1");
Assert.AreEqual ("0000", TestingEnum5.This.ToString ("X"), "#C2");
-#if !TARGET_JVM // This appears not to work under .Net
Assert.AreEqual ("7fff", TestingEnum5.Test.ToString ("x"), "#C3");
-#endif // TARGET_JVM
Assert.AreEqual ("7FFF", TestingEnum5.Test.ToString ("X"), "#C4");
Assert.AreEqual ("00000000", TestingEnum6.This.ToString ("x"), "#D1");
Assert.AreEqual ("00000000", TestingEnum6.This.ToString ("X"), "#D2");
-#if !TARGET_JVM // This appears not to work under .Net
Assert.AreEqual ("7fffffff", TestingEnum6.Test.ToString ("x"), "#D3");
-#endif // TARGET_JVM
Assert.AreEqual ("7FFFFFFF", TestingEnum6.Test.ToString ("X"), "#D4");
Assert.AreEqual ("0000000000000000", TestingEnum3.This.ToString ("x"), "#E1");
Assert.AreEqual ("0000000000000000", TestingEnum3.This.ToString ("X"), "#E2");
-#if !TARGET_JVM // This appears not to work under .Net
Assert.AreEqual ("ffffffffffffffff", TestingEnum3.Test.ToString ("x"), "#E3");
-#endif // TARGET_JVM
Assert.AreEqual ("FFFFFFFFFFFFFFFF", TestingEnum3.Test.ToString ("X"), "#E4");
}
diff --git a/mcs/class/corlib/Test/System/EnvironmentTest.cs b/mcs/class/corlib/Test/System/EnvironmentTest.cs
index 442d7c6db56..9a9f65a5e53 100644
--- a/mcs/class/corlib/Test/System/EnvironmentTest.cs
+++ b/mcs/class/corlib/Test/System/EnvironmentTest.cs
@@ -138,7 +138,7 @@ namespace MonoTests.System
Assert.IsFalse (d.IsSynchronized, "IsSynchronized");
}
-#if NET_2_0 && !TARGET_JVM && !NET_2_1
+#if NET_2_0 && !NET_2_1
[Test] // bug #333740
public void GetEnvironmentVariables_NewlySet ()
{
@@ -176,7 +176,6 @@ namespace MonoTests.System
Environment.GetEnvironmentVariables ((EnvironmentVariableTarget)Int32.MinValue);
}
-#if !TARGET_JVM // Environment.SetEnvironmentVariable not supported under TARGET_JVM
[Test]
[ExpectedException (typeof (ArgumentException))]
public void SetEnvironmentVariable_Target_Invalid ()
@@ -228,7 +227,6 @@ namespace MonoTests.System
Environment.SetEnvironmentVariable ("A3", "\0");
Assert.IsNull (Environment.GetEnvironmentVariables ()["A3"]);
}
-#endif // TARGET_JVM
#endif
}
}
diff --git a/mcs/class/corlib/Test/System/MathTest.cs b/mcs/class/corlib/Test/System/MathTest.cs
index d5e325bf882..ad6cfb839eb 100644
--- a/mcs/class/corlib/Test/System/MathTest.cs
+++ b/mcs/class/corlib/Test/System/MathTest.cs
@@ -17,11 +17,7 @@ namespace MonoTests.System
public class MathTest
{
private static double double_epsilon =
-#if TARGET_JVM
- 1E-15;
-#else
double.Epsilon;
-#endif
static double x = 0.1234;
static double y = 12.345;
@@ -521,11 +517,9 @@ namespace MonoTests.System
iTest++;
Assert.IsTrue (Double.IsNaN (Math.Pow (1, Double.NaN)),
"Math.Pow(1, NaN) should be NaN");
-#if !TARGET_JVM
iTest++;
Assert.IsTrue (Double.IsNaN (Math.Pow (Double.NaN, 0)),
"Math.Pow(NaN, 0) should be NaN");
-#endif
iTest++;
Assert.IsTrue (1.0 == Math.Pow (-1, Double.MaxValue),
"Math.Pow(-1, MaxValue) should be 1.0");
diff --git a/mcs/class/corlib/Test/System/StringComparerTest.cs b/mcs/class/corlib/Test/System/StringComparerTest.cs
index f62b6f9e61c..585082a0f93 100644
--- a/mcs/class/corlib/Test/System/StringComparerTest.cs
+++ b/mcs/class/corlib/Test/System/StringComparerTest.cs
@@ -43,17 +43,10 @@ namespace MonoTests.System
{
private CultureInfo old_culture;
-#if TARGET_JVM // BinaryFormatter is Java based under TARGET_JVM.
- private BinaryFormatter CreateBinaryFormatter()
- {
- return (BinaryFormatter)vmw.@internal.remoting.BinaryFormatterUtils.CreateBinaryFormatter (false);
- }
-#else
private BinaryFormatter CreateBinaryFormatter()
{
return new BinaryFormatter();
}
-#endif // TARGET_JVM
[SetUp]
public void SetUp ()
diff --git a/mcs/class/corlib/Test/System/StringTest.cs b/mcs/class/corlib/Test/System/StringTest.cs
index 82675d01cd6..f5026e12fd8 100644
--- a/mcs/class/corlib/Test/System/StringTest.cs
+++ b/mcs/class/corlib/Test/System/StringTest.cs
@@ -62,7 +62,6 @@ public class StringTest
}
-#if !TARGET_JVM
[Test] // ctor (Char [])
public unsafe void Constructor2 ()
{
@@ -70,7 +69,6 @@ public class StringTest
Assert.AreEqual (String.Empty, new String (new Char [0]), "#2");
Assert.AreEqual ("A", new String (new Char [1] {'A'}), "#3");
}
-#endif
[Test] // ctor (Char, Int32)
public void Constructor4 ()
@@ -169,7 +167,6 @@ public class StringTest
}
}
-#if !TARGET_JVM
[Test]
public unsafe void CharPtrConstructor ()
{
@@ -524,7 +521,6 @@ public class StringTest
Assert.AreEqual (String.Empty, new String ((sbyte*) null, 1, 0, Encoding.Default), "#F");
}
-#endif
[Test]
public void Length ()
{
@@ -1107,6 +1103,7 @@ public class StringTest
Assert.AreEqual ("typedef struct _MonoObject { ... } MonoObject;", String.Format ("typedef struct _{0} {{ ... }} MonoObject;", "MonoObject"), "Escaped bracket");
Assert.AreEqual ("Could not find file \"a/b\"", String.Format ("Could not find file \"{0}\"", "a/b"), "With Slash");
Assert.AreEqual ("Could not find file \"a\\b\"", String.Format ("Could not find file \"{0}\"", "a\\b"), "With BackSlash");
+ Assert.AreEqual ("{d} ", string.Format ("{{{0:d}} }", 100));
}
[Test] // Format (String, Object)
@@ -2642,9 +2639,7 @@ public class StringTest
Assert.AreEqual (-1, s1.LastIndexOf("original", s1.Length-11), "stepped string index #3");
Assert.AreEqual (-1, s1.LastIndexOf("translator", 2), "stepped string index #4");
Assert.AreEqual (0, string.Empty.LastIndexOf(string.Empty, 0), "stepped string index #5");
-#if !TARGET_JVM
Assert.AreEqual (-1, string.Empty.LastIndexOf("A", -1), "stepped string index #6");
-#endif
Assert.AreEqual (10, s1.LastIndexOf("rig", s1.Length-1, 10), "stepped limited string index #1");
Assert.AreEqual (-1, s1.LastIndexOf("rig", s1.Length, 3), "stepped limited string index #2");
Assert.AreEqual (10, s1.LastIndexOf("rig", s1.Length-2, 15), "stepped limited string index #3");
@@ -3204,9 +3199,7 @@ public class StringTest
Assert.AreEqual (s2.Replace("..", "."), "..aaaaaaa.bbbbbbbbb,......ccccccc.u..");
// Test replacing null characters (bug #67395)
-#if !TARGET_JVM //bug #7276
Assert.AreEqual ("is this ok ?", "is \0 ok ?".Replace ("\0", "this"), "should not strip content after nullchar");
-#endif
}
[Test]
diff --git a/mcs/class/corlib/Test/System/TimeZoneTest.cs b/mcs/class/corlib/Test/System/TimeZoneTest.cs
index 930be4fefe2..47915f722b4 100644
--- a/mcs/class/corlib/Test/System/TimeZoneTest.cs
+++ b/mcs/class/corlib/Test/System/TimeZoneTest.cs
@@ -177,7 +177,6 @@ public class TimeZoneTest {
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void CurrentTimeZone_SerializationRoundtrip ()
{
TimeZone tz = TimeZone.CurrentTimeZone;
@@ -304,11 +303,12 @@ public class TimeZoneTest {
TimeZone tz = TimeZone.CurrentTimeZone;
- DaylightTime daylightChanges = tz.GetDaylightChanges(2007);
+ int year = DateTime.Now.Year;
+ DaylightTime daylightChanges = tz.GetDaylightChanges(year);
DateTime dst_end = daylightChanges.End;
if (dst_end == DateTime.MinValue)
- Assert.Ignore (tz.StandardName + " did not observe daylight saving time during 2007.");
+ Assert.Ignore (tz.StandardName + " did not observe daylight saving time during " + year + ".");
var standardOffset = tz.GetUtcOffset(daylightChanges.Start.AddMinutes(-1));
diff --git a/mcs/class/corlib/Test/System/TypeTest.cs b/mcs/class/corlib/Test/System/TypeTest.cs
index 6d5431e082d..00131c8d47f 100644
--- a/mcs/class/corlib/Test/System/TypeTest.cs
+++ b/mcs/class/corlib/Test/System/TypeTest.cs
@@ -297,16 +297,11 @@ namespace MonoTests.System
Assert.AreEqual (typeof (ICloneable[][]).IsAssignableFrom (typeof (Duper[][])), true, "#12");
// Tests for vectors<->one dimensional arrays */
-#if TARGET_JVM // Lower bounds arrays are not supported for TARGET_JVM.
- Array arr1 = Array.CreateInstance (typeof (int), new int[] {1});
- Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr1.GetType ()), true, "#13");
-#else
Array arr1 = Array.CreateInstance (typeof (int), new int[] {1}, new int[] {0});
Array arr2 = Array.CreateInstance (typeof (int), new int[] {1}, new int[] {10});
Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr1.GetType ()), true, "#13");
Assert.AreEqual (typeof (int[]).IsAssignableFrom (arr2.GetType ()), false, "#14");
-#endif // TARGET_JVM
// Test that arrays of enums can be cast to their base types
Assert.AreEqual (typeof (int[]).IsAssignableFrom (typeof (TypeCode[])), true, "#15");
@@ -390,7 +385,6 @@ namespace MonoTests.System
}
[Test]
- [Category ("TargetJvmNotWorking")]
public void TestGetPropertyImpl ()
{
// Test getting property that is exact
@@ -1517,7 +1511,6 @@ namespace MonoTests.System
typeof (long), new Type[0], null), "#2");
}
-#if !TARGET_JVM // StructLayout not supported for TARGET_JVM
[StructLayout(LayoutKind.Explicit, Pack = 4, Size = 64)]
public class Class1
{
@@ -1543,7 +1536,6 @@ namespace MonoTests.System
Assert.AreEqual (LayoutKind.Explicit, attr3.Value);
Assert.AreEqual (CharSet.Unicode, attr3.CharSet);
}
-#endif // TARGET_JVM
[Test]
public void Namespace ()
@@ -2786,7 +2778,7 @@ PublicKeyToken=b77a5c561934e089"));
Assert.IsNull (i);
}
-#if !TARGET_JVM && !MOBILE // Reflection.Emit is not supported for TARGET_JVM
+#if !MOBILE
[Test]
public void EqualsUnderlyingType ()
{
@@ -2805,7 +2797,7 @@ PublicKeyToken=b77a5c561934e089"));
Assert.IsTrue (typeof (int).Equals (e));
}
-#endif // TARGET_JVM
+#endif
[Test]
public void Equals_Type_Null ()
diff --git a/mcs/class/corlib/corlib.csproj b/mcs/class/corlib/corlib.csproj
deleted file mode 100644
index 82c593733f5..00000000000
--- a/mcs/class/corlib/corlib.csproj
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="3.5" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <OutputType>Library</OutputType>
- <AssemblyName>mscorlib</AssemblyName>
- <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
- <NoConfig>true</NoConfig>
- <NoStdLib>true</NoStdLib>
- <CodePage>65001</CodePage>
- <UseVSHostingProcess>false</UseVSHostingProcess>
- <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
- <ProjectGuid>{72E6D902-9CE6-4F09-91E7-6D48B965DCFA}</ProjectGuid>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'basic|AnyCPU' ">
- <DefineConstants>INSIDE_CORLIB,NET_1_1,NET_2_0,LIBC,BOOTSTRAP_BASIC</DefineConstants>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'net_2_0|AnyCPU' ">
- <DefineConstants>INSIDE_CORLIB,NET_1_1,NET_2_0,LIBC</DefineConstants>
- <SignAssembly>true</SignAssembly>
- <AssemblyOriginatorKeyFile>..\mono.snk</AssemblyOriginatorKeyFile>
- </PropertyGroup>
- <ItemGroup>
- <EmbeddedResource Include="resources\collation.core.bin" />
- <EmbeddedResource Include="resources\collation.tailoring.bin" />
- <EmbeddedResource Include="resources\collation.cjkCHS.bin" />
- <EmbeddedResource Include="resources\collation.cjkCHT.bin" />
- <EmbeddedResource Include="resources\collation.cjkJA.bin" />
- <EmbeddedResource Include="resources\collation.cjkKO.bin" />
- <EmbeddedResource Include="resources\collation.cjkKOlv2.bin" />
- </ItemGroup>
- <Import Project="$(MSBuildProjectDirectory)\..\..\build\msbuild\Mono.Common.targets" />
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
- <Target Name="BeforeBuild" DependsOnTargets="SetupProject">
- </Target>
-</Project> \ No newline at end of file
diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources
index a5f1b7b0d48..2626ca0fa3e 100644
--- a/mcs/class/corlib/corlib.dll.sources
+++ b/mcs/class/corlib/corlib.dll.sources
@@ -264,6 +264,7 @@ System/TimeZone.cs
../System.Core/System/TimeZoneInfo.AdjustmentRule.cs
../System.Core/System/TimeZoneInfo.Android.cs
../System.Core/System/TimeZoneInfo.MonoTouch.cs
+../System.Core/System/TimeZoneInfo.Serialization.cs
../System.Core/System/TimeZoneInfo.TransitionTime.cs
System/TimeZoneNotFoundException.cs
System/TimeoutException.cs
@@ -1182,6 +1183,7 @@ System.Runtime.Serialization.Formatters.Binary/CodeGenerator.cs
System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs
System.Runtime.Serialization.Formatters.Binary/ObjectWriter.cs
System.Runtime.Serialization.Formatters.Binary/MessageFormatter.cs
+System.Runtime.Versioning/CompatibilitySwitch.cs
System.Runtime.Versioning/ComponentGuaranteesAttribute.cs
System.Runtime.Versioning/ComponentGuaranteesOptions.cs
System.Runtime.Versioning/ResourceConsumptionAttribute.cs
@@ -1525,6 +1527,8 @@ System.Text/EncoderFallbackException.cs
System.Text/EncoderReplacementFallback.cs
System.Text/EncoderReplacementFallbackBuffer.cs
System.Text/Encoding.cs
+System.Text/EncodingEncoder.cs
+System.Text/EncodingDecoder.cs
System.Text/EncodingInfo.cs
System.Text/Latin1Encoding.cs
System.Text/MLangCodePageEncoding.cs
diff --git a/mcs/class/corlib/corlib_test.dll.sources b/mcs/class/corlib/corlib_test.dll.sources
index 893aea30015..8cb367e813e 100644
--- a/mcs/class/corlib/corlib_test.dll.sources
+++ b/mcs/class/corlib/corlib_test.dll.sources
@@ -231,6 +231,7 @@ System.Security.AccessControl/RawSecurityDescriptorTest.cs
System.Security.AccessControl/RegistrySecurityTest.cs
System.Security.AccessControl/SystemAclTest.cs
System.Security.Claims/ClaimsIdentityTest.cs
+System.Security.Claims/ClaimsPrincipalTest.cs
System.Security.Cryptography/AllTests2.cs
System.Security.Cryptography/AesCfbTest.cs
System.Security.Cryptography/AsymmetricAlgorithmTest.cs
@@ -393,6 +394,7 @@ System.Text/EncoderReplacementFallbackTest.cs
System.Text/EncoderReplacementFallbackBufferTest.cs
System.Text/EncoderTest.cs
System.Text/EncodingTest.cs
+System.Text/EncodingTester.cs
System.Text/EncodingInfoTest.cs
System.Text/StringBuilderTest.cs
System.Text/TestEncoding.cs
diff --git a/mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs b/mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs
index c16645971de..3d1e8c92c3f 100644
--- a/mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs
+++ b/mcs/class/monodoc/Monodoc.Ecma/EcmaDesc.cs
@@ -86,6 +86,13 @@ namespace Monodoc.Ecma
set;
}
+ /* The GenericTypeArguments list may be null, in which case, this
+ * is an easier/safer way to check the count.
+ */
+ public int GenericTypeArgumentsCount {
+ get { return GenericTypeArguments != null ? GenericTypeArguments.Count : 0; }
+ }
+
/* This property tells if the above collections only correct value
* is the number of item in it to represent generic arguments
*/
@@ -100,6 +107,13 @@ namespace Monodoc.Ecma
set;
}
+ /* The GenericMemberArguments list may be null, in which case, this
+ * is an easier/safer way to check the count.
+ */
+ public int GenericMemberArgumentsCount {
+ get { return GenericMemberArguments != null ? GenericMemberArguments.Count : 0; }
+ }
+
public bool GenericMemberArgumentsIsNumeric {
get {
return GenericMemberArguments != null && GenericMemberArguments.FirstOrDefault () == null;
@@ -111,6 +125,13 @@ namespace Monodoc.Ecma
set;
}
+ /* The GenericTypeArguments list may be null, in which case, this
+ * is an easier/safer way to check the count.
+ */
+ public int MemberArgumentsCount {
+ get { return MemberArguments != null ? MemberArguments.Count : 0; }
+ }
+
/* This indicates that we actually want an inner part of the ecmadesc
* i.e. in case of T: we could want the members (*), ctor (C), methods (M), ...
*/
@@ -198,6 +219,7 @@ namespace Monodoc.Ecma
var sb = new StringBuilder ();
// Cref type
sb.Append (DescKind.ToString ()[0]);
+ sb.Append (":");
// Create the rest
ConstructCRef (sb);
@@ -214,8 +236,15 @@ namespace Monodoc.Ecma
sb.Append (TypeName);
if (GenericTypeArguments != null) {
sb.Append ('<');
- foreach (var t in GenericTypeArguments)
+ int i=0;
+ foreach (var t in GenericTypeArguments) {
+ if (i > 0) {
+ sb.Append (",");
+ }
t.ConstructCRef (sb);
+
+ i++;
+ }
sb.Append ('>');
}
if (NestedType != null) {
@@ -232,8 +261,20 @@ namespace Monodoc.Ecma
if (DescKind == Kind.Type)
return;
- if (MemberArguments != null) {
-
+ sb.Append (".");
+ sb.Append (MemberName);
+
+ if (MemberArguments != null && MemberArgumentsCount > 0) {
+ sb.Append ("(");
+ int i=0;
+ foreach (var a in MemberArguments) {
+ if (i > 0) {
+ sb.Append(",");
+ }
+ a.ConstructCRef (sb);
+ i++;
+ }
+ sb.Append (")");
}
}
diff --git a/mcs/class/monodoc/Monodoc/cache.cs b/mcs/class/monodoc/Monodoc/cache.cs
index 98291a4c031..f10320230db 100644
--- a/mcs/class/monodoc/Monodoc/cache.cs
+++ b/mcs/class/monodoc/Monodoc/cache.cs
@@ -35,7 +35,9 @@ namespace Monodoc
static DocCacheHelper ()
{
try {
- var cacheValues = Config.Get ("cache").Split (',');
+ var cacheConfig = Config.Get ("cache");
+ if (cacheConfig == null) return;
+ var cacheValues = cacheConfig.Split (',');
if (cacheValues.Length == 2 && cacheValues[0].Equals ("file", StringComparison.Ordinal))
cacheBaseDirectory = cacheValues[1].Replace ("~", Environment.GetFolderPath (Environment.SpecialFolder.Personal));
} catch {}
diff --git a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs b/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
index efdeedf63a6..bf14a24cc42 100644
--- a/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
+++ b/mcs/class/monodoc/Monodoc/providers/EcmaDoc.cs
@@ -18,6 +18,8 @@ namespace Monodoc.Providers
Meta, // A node that's here to serve as a header for other node
}
+
+
// Common functionality between ecma-provider and ecmauncompiled-provider
internal class EcmaDoc
{
@@ -28,8 +30,10 @@ namespace Monodoc.Providers
Tree tree,
IDocStorage storage,
Dictionary<string, XElement> nsSummaries,
- Func<XElement, string> indexGenerator = null)
+ Func<XElement, string> indexGenerator = null,
+ IEcmaProviderFileSource fileSource = null)
{
+ fileSource = fileSource ?? DefaultEcmaProviderFileSource.Default;
var root = tree.RootNode;
int resID = 0;
var asm = Path.GetDirectoryName (indexFilePath);
@@ -40,7 +44,7 @@ namespace Monodoc.Providers
// default index generator uses a counter
indexGenerator = indexGenerator ?? (_ => resID++.ToString ());
- using (var reader = XmlReader.Create (File.OpenRead (indexFilePath))) {
+ using (var reader = fileSource.GetIndexReader (indexFilePath)) {
reader.ReadToFollowing ("Types");
var types = XElement.Load (reader.ReadSubtree ());
@@ -55,26 +59,34 @@ namespace Monodoc.Providers
new XElement ("summary"),
new XElement ("remarks"));
//Add namespace summary and remarks data from file, if available
- var nsFileName = Path.Combine(asm, String.Format("ns-{0}.xml", nsName));
+ var nsFileName = fileSource.GetNamespaceXmlPath(asm, nsName);
+
if(File.Exists(nsFileName)){
- var nsEl = XElement.Load (nsFileName);
+ var nsEl = fileSource.GetNamespaceElement (nsFileName);
nsElements.Element ("summary").ReplaceWith (nsEl.Descendants ("summary").First ());
nsElements.Element ("remarks").ReplaceWith (nsEl.Descendants ("remarks").First ());
}else{
- Console.WriteLine ("Error reading namespace XML for " + nsName);
+ Console.WriteLine ("Error reading namespace XML for {0} at {1}", nsName, nsFileName);
}
foreach (var type in ns.Elements ("Type")) {
// Add the XML file corresponding to the type to our storage
var id = indexGenerator (type);
string typeFilePath;
- var typeDocument = EcmaDoc.LoadTypeDocument (asm, nsName, type.Attribute ("Name").Value, out typeFilePath);
+ var typeDocument = EcmaDoc.LoadTypeDocument (asm, nsName, type.Attribute ("Name").Value, out typeFilePath, fileSource);
if (typeDocument == null)
continue;
- using (var file = File.OpenRead (typeFilePath))
- storage.Store (id, file);
- nsElements.Add (ExtractClassSummary (typeFilePath));
+
+ // write the document (which may have been modified by the fileSource) to the storage
+ MemoryStream io = new MemoryStream ();
+ using (var writer = XmlWriter.Create (io)) {
+ typeDocument.WriteTo (writer);
+ }
+ io.Seek (0, SeekOrigin.Begin);
+ storage.Store (id, io);
+
+ nsElements.Add (ExtractClassSummary (typeDocument));
var typeCaption = EcmaDoc.GetTypeCaptionFromIndex (type);
var url = idPrefix + id + '#' + typeCaption + '/';
@@ -123,15 +135,17 @@ namespace Monodoc.Providers
// Utility methods
- public static XDocument LoadTypeDocument (string basePath, string nsName, string typeName)
+ public static XDocument LoadTypeDocument (string basePath, string nsName, string typeName, IEcmaProviderFileSource fileSource = null)
{
string dummy;
- return LoadTypeDocument (basePath, nsName, typeName, out dummy);
+ return LoadTypeDocument (basePath, nsName, typeName, out dummy, fileSource ?? DefaultEcmaProviderFileSource.Default);
}
- public static XDocument LoadTypeDocument (string basePath, string nsName, string typeName, out string finalPath)
+ public static XDocument LoadTypeDocument (string basePath, string nsName, string typeName, out string finalPath, IEcmaProviderFileSource fileSource = null)
{
- finalPath = Path.Combine (basePath, nsName, Path.ChangeExtension (typeName, ".xml"));
+ fileSource = fileSource ?? DefaultEcmaProviderFileSource.Default;
+
+ finalPath = fileSource.GetTypeXmlPath (basePath, nsName, typeName);
if (!File.Exists (finalPath)) {
Console.Error.WriteLine ("Warning: couldn't process type file `{0}' as it doesn't exist", finalPath);
return null;
@@ -139,7 +153,7 @@ namespace Monodoc.Providers
XDocument doc = null;
try {
- doc = XDocument.Load (finalPath);
+ doc = fileSource.GetTypeDocument(finalPath);
} catch (Exception e) {
Console.WriteLine ("Document `{0}' is unparsable, {1}", finalPath, e.ToString ());
}
@@ -562,24 +576,20 @@ namespace Monodoc.Providers
return nicename;
}
- static XElement ExtractClassSummary (string typeFilePath)
+ static XElement ExtractClassSummary (XDocument typeDoc)
{
- using (var reader = XmlReader.Create (typeFilePath)) {
- reader.ReadToFollowing ("Type");
- var name = reader.GetAttribute ("Name");
- var fullName = reader.GetAttribute ("FullName");
- reader.ReadToFollowing ("AssemblyName");
- var assemblyName = reader.ReadElementString ();
- var summary = reader.ReadToFollowing ("summary") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("summary");
- var remarks = reader.ReadToFollowing ("remarks") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("remarks");
-
- return new XElement ("class",
- new XAttribute ("name", name ?? string.Empty),
- new XAttribute ("fullname", fullName ?? string.Empty),
- new XAttribute ("assembly", assemblyName ?? string.Empty),
- summary,
- remarks);
- }
+ string name = typeDoc.Root.Attribute("Name").Value;
+ string fullName = typeDoc.Root.Attribute("FullName").Value;
+ string assemblyName = typeDoc.Root.Element("AssemblyInfo") != null ? typeDoc.Root.Element("AssemblyInfo").Element("AssemblyName").Value : string.Empty;
+ var docs = typeDoc.Root.Element("Docs");
+ var summary = docs.Element("summary") ?? new XElement("summary");
+ var remarks = docs.Element("remarks") ?? new XElement("remarks");
+ return new XElement ("class",
+ new XAttribute ("name", name ?? string.Empty),
+ new XAttribute ("fullname", fullName ?? string.Empty),
+ new XAttribute ("assembly", assemblyName ?? string.Empty),
+ summary,
+ remarks);
}
}
}
diff --git a/mcs/class/monodoc/Monodoc/providers/ecma-provider.cs b/mcs/class/monodoc/Monodoc/providers/ecma-provider.cs
index 53e54c4310b..4e82c2c7668 100644
--- a/mcs/class/monodoc/Monodoc/providers/ecma-provider.cs
+++ b/mcs/class/monodoc/Monodoc/providers/ecma-provider.cs
@@ -25,9 +25,60 @@ using Mono.Utilities;
namespace Monodoc.Providers
{
+ public interface IEcmaProviderFileSource {
+ XmlReader GetIndexReader(string path);
+ XDocument GetTypeDocument(string path);
+ XElement GetNamespaceElement(string path);
+ string GetTypeXmlPath(string basePath, string nsName, string typeName);
+ string GetNamespaceXmlPath(string basePath, string ns);
+ XElement ExtractNamespaceSummary (string path);
+ }
+
+ internal class DefaultEcmaProviderFileSource : IEcmaProviderFileSource {
+ public static readonly IEcmaProviderFileSource Default = new DefaultEcmaProviderFileSource();
+
+ public XmlReader GetIndexReader(string path) {
+ return XmlReader.Create (File.OpenRead (path));
+ }
+
+ public XElement GetNamespaceElement(string path) {
+ return XElement.Load (path);
+ }
+
+ public string GetTypeXmlPath(string basePath, string nsName, string typeName) {
+ string finalPath = Path.Combine (basePath, nsName, Path.ChangeExtension (typeName, ".xml"));
+ return finalPath;
+ }
+
+ public XDocument GetTypeDocument(string path) {
+ return XDocument.Load (path);
+ }
+
+ public string GetNamespaceXmlPath(string basePath, string ns) {
+ string finalPath = Path.Combine(basePath, String.Format("ns-{0}.xml", ns));
+ return finalPath;
+ }
+
+ public XElement ExtractNamespaceSummary (string path)
+ {
+ using (var reader = XmlReader.Create (path)) {
+ reader.ReadToFollowing ("Namespace");
+ var name = reader.GetAttribute ("Name");
+ var summary = reader.ReadToFollowing ("summary") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("summary");
+ var remarks = reader.ReadToFollowing ("remarks") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("remarks");
+
+ return new XElement ("namespace",
+ new XAttribute ("ns", name ?? string.Empty),
+ summary,
+ remarks);
+ }
+ }
+ }
+
public class EcmaProvider : Provider
{
HashSet<string> directories = new HashSet<string> ();
+ IEcmaProviderFileSource fileSource;
public EcmaProvider ()
{
@@ -38,6 +89,16 @@ namespace Monodoc.Providers
AddDirectory (baseDir);
}
+ public IEcmaProviderFileSource FileSource {
+ get {
+ if (fileSource == null) {
+ fileSource = new DefaultEcmaProviderFileSource();
+ }
+ return fileSource;
+ }
+ set { fileSource = value; }
+ }
+
public void AddDirectory (string directory)
{
if (string.IsNullOrEmpty (directory))
@@ -59,7 +120,7 @@ namespace Monodoc.Providers
continue;
}
- EcmaDoc.PopulateTreeFromIndexFile (indexFilePath, EcmaHelpSource.EcmaPrefix, tree, storage, nsSummaries, _ => resID++.ToString ());
+ EcmaDoc.PopulateTreeFromIndexFile (indexFilePath, EcmaHelpSource.EcmaPrefix, tree, storage, nsSummaries, _ => resID++.ToString (), FileSource);
}
foreach (var summary in nsSummaries)
@@ -68,24 +129,11 @@ namespace Monodoc.Providers
var masterSummary = new XElement ("elements",
directories
.SelectMany (d => Directory.EnumerateFiles (d, "ns-*.xml"))
- .Select (ExtractNamespaceSummary));
+ .Select (FileSource.ExtractNamespaceSummary));
storage.Store ("mastersummary.xml", masterSummary.ToString ());
}
- XElement ExtractNamespaceSummary (string nsFile)
- {
- using (var reader = XmlReader.Create (nsFile)) {
- reader.ReadToFollowing ("Namespace");
- var name = reader.GetAttribute ("Name");
- var summary = reader.ReadToFollowing ("summary") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("summary");
- var remarks = reader.ReadToFollowing ("remarks") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("remarks");
- return new XElement ("namespace",
- new XAttribute ("ns", name ?? string.Empty),
- summary,
- remarks);
- }
- }
public override void CloseTree (HelpSource hs, Tree tree)
{
diff --git a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs b/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs
index 23bf89778c8..7a866432d63 100644
--- a/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs
+++ b/mcs/class/monodoc/Monodoc/providers/xhtml-provider.cs
@@ -49,7 +49,7 @@ namespace Monodoc.Providers
ObjectEntryToParams (inner, out caption, out element);
// Don't add if the backing file doesn't exist
if (!File.Exists (element)) {
- Console.Error.WriteLine ("File `{0}' referenced in TOC but it doesn't exist.", element);
+ Console.Error.WriteLine ("Warning: File `{0}' referenced in TOC but it doesn't exist. It will be ignored.", element);
continue;
}
using (var file = File.OpenRead (element))
diff --git a/mcs/errors/CS0012-24-lib.il b/mcs/errors/CS0012-24-lib.il
new file mode 100644
index 00000000000..e72487aaeb0
--- /dev/null
+++ b/mcs/errors/CS0012-24-lib.il
@@ -0,0 +1,33 @@
+.assembly extern 'cs0012-24-missing'
+{
+}
+
+.assembly extern mscorlib
+{
+}
+
+.assembly 'CS0012-24-lib'
+{
+}
+
+.module 'cs0012-24-lib.dll'
+
+ .class public auto ansi beforefieldinit A
+ extends ['cs0012-24-missing']A0
+ {
+
+ .method public hidebysig specialname rtspecialname
+ instance default void '.ctor' () cil managed
+ {
+ ldarg.0
+ call instance void class ['cs0012-24-missing']A0::'.ctor'()
+ ret
+ }
+
+ .method public static hidebysig
+ default void Test () cil managed
+ {
+ ret
+ }
+
+ } \ No newline at end of file
diff --git a/mcs/errors/Makefile b/mcs/errors/Makefile
index f994abac1ea..95ce7d7c3ca 100644
--- a/mcs/errors/Makefile
+++ b/mcs/errors/Makefile
@@ -21,7 +21,7 @@ DISTFILES = \
$(wildcard dlls/second/*.cs)
TEST_SUPPORT_FILES = \
- CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
+ CS0012-lib.dll CS0012-2-lib.dll CS0012-3-lib.dll CS0012-4-lib.dll CS0012-5-lib.dll CS0012-6-lib.dll CS0012-9-lib.dll CS0012-10-lib.dll CS0012-11-lib.dll CS0012-12-lib.dll CS0012-13-lib.dll CS0012-14-lib.dll CS0012-15-lib.dll CS0012-16-lib.dll CS0012-17-lib.dll CS0012-18-lib.dll CS0012-21-lib.dll CS0012-22-lib.dll CS0012-23-lib.dll CS0012-24-lib.dll CS0019-71-lib.dll CS0029-26-lib.dll \
CS0103-2-lib.dll CS0118-2-lib.dll CS0122-8-lib.dll CS0122-10-lib.dll CS0122-14-lib.dll CS0122-15-lib.dll CS0122-19-lib.dll CS0122-35-lib.dll CS0122-36-lib.dll CS0143-lib.dll CS0144-3-lib.dll CS0165-19-lib.dll \
CS0205-3-lib.dll CS0246-29-lib.dll CS0229-3-lib.dll CS0229-4-lib.dll CS0266-25-lib.dll \
CS0315-2-lib.dll \
diff --git a/mcs/errors/cs0012-24.cs b/mcs/errors/cs0012-24.cs
new file mode 100644
index 00000000000..3e651196919
--- /dev/null
+++ b/mcs/errors/cs0012-24.cs
@@ -0,0 +1,11 @@
+// CS0012: The type `A0' is defined in an assembly that is not referenced. Consider adding a reference to assembly `cs0012-24-missing, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
+// Line: 9
+// Compiler options: -r:CS0012-24-lib.dll
+
+public class X
+{
+ public static void Main ()
+ {
+ A.Test ();
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0021-5.cs b/mcs/errors/cs0021-5.cs
new file mode 100644
index 00000000000..19c44839cf8
--- /dev/null
+++ b/mcs/errors/cs0021-5.cs
@@ -0,0 +1,12 @@
+// CS0021: Cannot apply indexing with [] to an expression of type `object'
+// Line: 9
+
+class C
+{
+ public static void Main ()
+ {
+ var d = new object {
+ ["a"] = 1
+ };
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0023-20.cs b/mcs/errors/cs0023-20.cs
new file mode 100644
index 00000000000..ffde8addb8e
--- /dev/null
+++ b/mcs/errors/cs0023-20.cs
@@ -0,0 +1,13 @@
+// CS0023: The `?' operator cannot be applied to operand of type `int'
+// Line: 11
+
+using System;
+
+class C
+{
+ static void Main()
+ {
+ int k = 0;
+ var r = k?.ToString ();
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0023-21.cs b/mcs/errors/cs0023-21.cs
new file mode 100644
index 00000000000..98f0c068f30
--- /dev/null
+++ b/mcs/errors/cs0023-21.cs
@@ -0,0 +1,12 @@
+// CS0023: The `?' operator cannot be applied to operand of type `int*'
+// Line: 10
+// Compiler options: -unsafe
+
+class C
+{
+ unsafe static void Main ()
+ {
+ int* arr = null;
+ var v2 = arr?.ToString ();
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0023-22.cs b/mcs/errors/cs0023-22.cs
new file mode 100644
index 00000000000..ce5c0b29fdd
--- /dev/null
+++ b/mcs/errors/cs0023-22.cs
@@ -0,0 +1,10 @@
+// CS0023: The `?' operator cannot be applied to operand of type `null'
+// Line: 8
+
+class C
+{
+ static void Main ()
+ {
+ var res = null?[0];
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0023-23.cs b/mcs/errors/cs0023-23.cs
new file mode 100644
index 00000000000..ae7db34845d
--- /dev/null
+++ b/mcs/errors/cs0023-23.cs
@@ -0,0 +1,12 @@
+// CS0023: The `?' operator cannot be applied to operand of type `void'
+// Line: 10
+
+using System;
+
+class C
+{
+ static void Main ()
+ {
+ var v = Console.WriteLine ()?[0];
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0023-24.cs b/mcs/errors/cs0023-24.cs
new file mode 100644
index 00000000000..ea8fa10c974
--- /dev/null
+++ b/mcs/errors/cs0023-24.cs
@@ -0,0 +1,11 @@
+// CS0023: The `?' operator cannot be applied to operand of type `int'
+// Line: 9
+
+public class C
+{
+ static void Main()
+ {
+ string s = null;
+ var x = s?.Length?.ToString ();
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0100-8.cs b/mcs/errors/cs0100-8.cs
new file mode 100644
index 00000000000..82485114483
--- /dev/null
+++ b/mcs/errors/cs0100-8.cs
@@ -0,0 +1,7 @@
+// CS100: The parameter name `obj' is a duplicate
+// Line: 6
+
+abstract class C
+{
+ public abstract int this [object obj, object obj] => 1;
+} \ No newline at end of file
diff --git a/mcs/errors/cs0102-99.cs b/mcs/errors/cs0102-99.cs
deleted file mode 100644
index b07a24633a2..00000000000
--- a/mcs/errors/cs0102-99.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// CS0102: The type `Part' already contains a definition for `arg'
-// Line: 6
-
-partial class Part
-{
- int arg;
-}
-
-partial class Part(int arg)
-{
-} \ No newline at end of file
diff --git a/mcs/errors/cs9006.cs b/mcs/errors/cs0103-13.cs
index 4420f2fe331..891a1559d34 100644
--- a/mcs/errors/cs9006.cs
+++ b/mcs/errors/cs0103-13.cs
@@ -1,4 +1,4 @@
-// CS9006: An object reference is required to access primary constructor parameter `value'
+// CS0103: The name `value' does not exist in the current context
// Line: 8
class X (double value)
diff --git a/mcs/errors/cs0103-14.cs b/mcs/errors/cs0103-14.cs
new file mode 100644
index 00000000000..80f1e629f61
--- /dev/null
+++ b/mcs/errors/cs0103-14.cs
@@ -0,0 +1,10 @@
+// C0103: The name `s' does not exist in the current context
+// Line: 7
+
+class Test(string s)
+{
+ public Test ()
+ : this (s)
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0111-10.cs b/mcs/errors/cs0111-10.cs
new file mode 100644
index 00000000000..c90769852e8
--- /dev/null
+++ b/mcs/errors/cs0111-10.cs
@@ -0,0 +1,16 @@
+// CS0111: A member `Test.EmptyClass.~EmptyClass()' is already defined. Rename this member or use different parameter types
+// Line: 12
+
+namespace Test
+{
+ public class EmptyClass
+ {
+ ~EmptyClass ()
+ {
+ }
+
+ ~EmptyClass ()
+ {
+ }
+ }
+}
diff --git a/mcs/errors/cs0121-25.cs b/mcs/errors/cs0121-25.cs
new file mode 100644
index 00000000000..4461673c74b
--- /dev/null
+++ b/mcs/errors/cs0121-25.cs
@@ -0,0 +1,33 @@
+// CS0121: The call is ambiguous between the following methods or properties: `A.B.X.Test(int)' and `A.C.X.Test(int)'
+// Line: 31
+
+using A.B.X;
+using A.C.X;
+
+namespace A.B
+{
+ static class X
+ {
+ public static void Test (int o)
+ {
+ }
+ }
+}
+
+namespace A.C
+{
+ static class X
+ {
+ public static int Test (int o)
+ {
+ }
+ }
+}
+
+class M
+{
+ public static void Main ()
+ {
+ Test (0);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0136-18.cs b/mcs/errors/cs0136-18.cs
new file mode 100644
index 00000000000..20630a4bcf3
--- /dev/null
+++ b/mcs/errors/cs0136-18.cs
@@ -0,0 +1,13 @@
+// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else
+// Line: 11
+
+using System;
+
+class A (Func<int, int> barg)
+{
+}
+
+class B (int arg)
+ : A ((arg) => 1)
+{
+} \ No newline at end of file
diff --git a/mcs/errors/cs0136-19.cs b/mcs/errors/cs0136-19.cs
new file mode 100644
index 00000000000..ae9e0f606e3
--- /dev/null
+++ b/mcs/errors/cs0136-19.cs
@@ -0,0 +1,13 @@
+// CS0136: A local variable named `arg' cannot be declared in this scope because it would give a different meaning to `arg', which is already used in a `parent or current' scope to denote something else
+// Line: 11
+
+using System;
+
+partial class PC
+{
+ Func<int, int> f = (arg) => 1;
+}
+
+partial class PC (int arg)
+{
+} \ No newline at end of file
diff --git a/mcs/errors/cs0138.cs b/mcs/errors/cs0138.cs
index ea0010ea513..8264e8dbf29 100644
--- a/mcs/errors/cs0138.cs
+++ b/mcs/errors/cs0138.cs
@@ -1,5 +1,6 @@
// CS0138: `System.Console' is a type not a namespace. A using namespace directive can only be applied to namespaces
// Line: 5
+// Compiler options: -langversion:5
using System;
using System.Console;
diff --git a/mcs/errors/cs0151-3.cs b/mcs/errors/cs0151-3.cs
new file mode 100644
index 00000000000..76443735451
--- /dev/null
+++ b/mcs/errors/cs0151-3.cs
@@ -0,0 +1,19 @@
+// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type
+// Line: 15
+
+struct X
+{
+ public static implicit operator int (X x)
+ {
+ return 1;
+ }
+
+ static void Main ()
+ {
+ X? x = null;
+ switch (x) {
+ default:
+ break;
+ }
+ }
+}
diff --git a/mcs/errors/cs0151-4.cs b/mcs/errors/cs0151-4.cs
new file mode 100644
index 00000000000..0e45b1a9049
--- /dev/null
+++ b/mcs/errors/cs0151-4.cs
@@ -0,0 +1,30 @@
+// CS0151: A switch expression of type `S1?' cannot be converted to an integral type, bool, char, string, enum or nullable type
+// Line: 24
+
+using System;
+
+struct S1
+{
+ public static implicit operator int? (S1? s)
+ {
+ throw new ApplicationException ();
+ }
+
+ public static implicit operator int (S1? s)
+ {
+ throw new ApplicationException ();
+ }
+}
+
+class C
+{
+ public static int Main ()
+ {
+ S1? s1 = new S1 ();
+ switch (s1)
+ {
+ default:
+ return 1;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0151-5.cs b/mcs/errors/cs0151-5.cs
new file mode 100644
index 00000000000..3995a286755
--- /dev/null
+++ b/mcs/errors/cs0151-5.cs
@@ -0,0 +1,19 @@
+// CS0151: A switch expression of type `X?' cannot be converted to an integral type, bool, char, string, enum or nullable type
+// Line: 19
+
+struct X
+{
+ public static implicit operator int? (X x)
+ {
+ return 1;
+ }
+
+ static void Main ()
+ {
+ X? x = null;
+ switch (x) {
+ default:
+ break;
+ }
+ }
+}
diff --git a/mcs/errors/cs0163-2.cs b/mcs/errors/cs0163-2.cs
deleted file mode 100644
index dfdd9c12250..00000000000
--- a/mcs/errors/cs0163-2.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// CS0163: Control cannot fall through from one case label `case 1:' to another
-// Line: 14
-
-using System;
-using System.Collections.Generic;
-
-static class C
-{
- public static IEnumerable<int> Test (int key)
- {
- switch (key) {
- case 1:
- yield return 0;
- case 2:
- yield return 2;
- default:
- throw new ArgumentOutOfRangeException ("symbol:" + key);
- }
- }
-} \ No newline at end of file
diff --git a/mcs/errors/cs0163.cs b/mcs/errors/cs0163.cs
index 1f65f60490e..dfdd9c12250 100644
--- a/mcs/errors/cs0163.cs
+++ b/mcs/errors/cs0163.cs
@@ -1,23 +1,20 @@
-// CS0163: Control cannot fall through from one case label `case 3:' to another
-// Line: 21
+// CS0163: Control cannot fall through from one case label `case 1:' to another
+// Line: 14
-public class Foo
+using System;
+using System.Collections.Generic;
+
+static class C
{
- public static void Main()
+ public static IEnumerable<int> Test (int key)
{
- int a=5;
- int b=10;
- int c;
-
- switch (a)
- {
- case 1: c=a+b;
- return;
-
- case 2: c=a-b;
- return;
-
- case 3: c=a*b;
+ switch (key) {
+ case 1:
+ yield return 0;
+ case 2:
+ yield return 2;
+ default:
+ throw new ArgumentOutOfRangeException ("symbol:" + key);
}
}
-}
+} \ No newline at end of file
diff --git a/mcs/errors/cs0165-45.cs b/mcs/errors/cs0165-45.cs
new file mode 100644
index 00000000000..7da12516649
--- /dev/null
+++ b/mcs/errors/cs0165-45.cs
@@ -0,0 +1,21 @@
+// CS0165: Use of unassigned local variable `v'
+// Line: 19
+
+using System;
+
+class X
+{
+ void Foo (out int value)
+ {
+ value = 1;
+ }
+
+ public static void Main ()
+ {
+ int v;
+ X x = null;
+
+ x?.Foo (out v);
+ Console.WriteLine (v);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0165-46.cs b/mcs/errors/cs0165-46.cs
new file mode 100644
index 00000000000..b9fc087b1af
--- /dev/null
+++ b/mcs/errors/cs0165-46.cs
@@ -0,0 +1,21 @@
+// CS0165: Use of unassigned local variable `a'
+// Line: 16
+
+class Test
+{
+ public static bool Foo (out int v)
+ {
+ v = 0;
+ return false;
+ }
+
+ static void Main()
+ {
+ int a;
+ bool b = false;
+ if ((b || Foo (out a)) && b)
+ return;
+ else
+ System.Console.WriteLine (a);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0165-47.cs b/mcs/errors/cs0165-47.cs
new file mode 100644
index 00000000000..160daa24238
--- /dev/null
+++ b/mcs/errors/cs0165-47.cs
@@ -0,0 +1,21 @@
+// CS0165: Use of unassigned local variable `a'
+// Line: 17
+
+class Test
+{
+ public static bool Foo (out int v)
+ {
+ v = 0;
+ return false;
+ }
+
+ static void Main()
+ {
+ int a;
+ bool b = false;
+
+ if ((b && Foo (out a)) || b) {
+ System.Console.WriteLine (a);
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0165-48.cs b/mcs/errors/cs0165-48.cs
new file mode 100644
index 00000000000..166fb547433
--- /dev/null
+++ b/mcs/errors/cs0165-48.cs
@@ -0,0 +1,24 @@
+// CS0165: Use of unassigned local variable `v'
+// Line: 19
+
+using System;
+
+class X
+{
+ int this [int v] {
+ get {
+ return 1;
+ }
+ set {
+ }
+ }
+
+ public static void Main ()
+ {
+ int v;
+ X x = null;
+
+ var r = x?[v = 2];
+ Console.WriteLine (v);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0165-49.cs b/mcs/errors/cs0165-49.cs
new file mode 100644
index 00000000000..387a2dfb235
--- /dev/null
+++ b/mcs/errors/cs0165-49.cs
@@ -0,0 +1,22 @@
+// CS0165: Use of unassigned local variable `a'
+// Line: 14
+
+class C
+{
+ static void Main ()
+ {
+ bool x = true, y = true, z = true;
+
+ int a;
+ if (x ? y : (z || Foo (out a)))
+ System.Console.WriteLine (z);
+ else
+ System.Console.WriteLine (a);
+ }
+
+ static bool Foo (out int f)
+ {
+ f = 1;
+ return true;
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0171-7.cs b/mcs/errors/cs0171-7.cs
new file mode 100644
index 00000000000..ab2c5dd1d98
--- /dev/null
+++ b/mcs/errors/cs0171-7.cs
@@ -0,0 +1,18 @@
+// CS0171: Field `S1.s2' must be fully assigned before control leaves the constructor
+// Line: 11
+
+using System;
+
+struct S1
+{
+ S2 s2;
+
+ public S1 (int arg)
+ {
+ }
+}
+
+struct S2
+{
+ int field;
+}
diff --git a/mcs/errors/cs0426-4.cs b/mcs/errors/cs0426-4.cs
new file mode 100644
index 00000000000..85024f76717
--- /dev/null
+++ b/mcs/errors/cs0426-4.cs
@@ -0,0 +1,12 @@
+// CS0426: The nested type `WriteLINE' does not exist in the type `System.Console'
+// Line: 10
+
+using System;
+
+public class Test
+{
+ public static void Main ()
+ {
+ var x = nameof (Console.WriteLINE);
+ }
+}
diff --git a/mcs/errors/cs0429-5.cs b/mcs/errors/cs0429-5.cs
new file mode 100644
index 00000000000..1cc67a22817
--- /dev/null
+++ b/mcs/errors/cs0429-5.cs
@@ -0,0 +1,26 @@
+// CS0429: Unreachable expression code detected
+// Line: 24
+// Compiler options: -warnaserror
+
+using System;
+
+struct S
+{
+}
+
+class C
+{
+ public static implicit operator S (C c)
+ {
+ return new S ();
+ }
+}
+
+class Program
+{
+ static void Main ()
+ {
+ C c = new C ();
+ Console.WriteLine (c ?? new S ());
+ }
+}
diff --git a/mcs/errors/cs0457-4.cs b/mcs/errors/cs0457-4.cs
new file mode 100644
index 00000000000..787db3ab47f
--- /dev/null
+++ b/mcs/errors/cs0457-4.cs
@@ -0,0 +1,27 @@
+// CS0457: Ambiguous user defined operators `D.implicit operator D(System.Action)' and `D.explicit operator D(Foo)' when converting from `method group' to `D'
+// Line: 25
+
+using System;
+
+public delegate void Foo ();
+
+class D
+{
+ public static implicit operator D (Action d)
+ {
+ return new D ();
+ }
+
+ public static explicit operator D (Foo d)
+ {
+ return new D ();
+ }
+}
+
+class Program
+{
+ static void Main()
+ {
+ D d = (D) Main;
+ }
+}
diff --git a/mcs/errors/cs0464-5.cs b/mcs/errors/cs0464-5.cs
new file mode 100644
index 00000000000..a06f57a7792
--- /dev/null
+++ b/mcs/errors/cs0464-5.cs
@@ -0,0 +1,16 @@
+// CS0464: The result of comparing type `E?' with null is always `false'
+// Line: 14
+// Compiler options: -warnaserror
+
+enum E
+{
+}
+
+class X
+{
+ public static void Main ()
+ {
+ E u = 0;
+ var b = u < (E?) null;
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0472-6.cs b/mcs/errors/cs0472-6.cs
new file mode 100644
index 00000000000..d7d2556ef1c
--- /dev/null
+++ b/mcs/errors/cs0472-6.cs
@@ -0,0 +1,14 @@
+// CS0472: The result of comparing value type `int' with null is always `false'
+// Line: 12
+// Compiler options: -warnaserror
+
+using System;
+
+class X
+{
+ public static void Main ()
+ {
+ int i = 0;
+ var x = i == default (byte?);
+ }
+}
diff --git a/mcs/errors/cs0472-7.cs b/mcs/errors/cs0472-7.cs
new file mode 100644
index 00000000000..80be3d9ace7
--- /dev/null
+++ b/mcs/errors/cs0472-7.cs
@@ -0,0 +1,16 @@
+// CS0472: The result of comparing value type `E' with null is always `false'
+// Line: 14
+// Compiler options: -warnaserror
+
+enum E
+{
+}
+
+class X
+{
+ public static void Main ()
+ {
+ E u = 0;
+ var b = u == (E?)null;
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs0531-3.cs b/mcs/errors/cs0531-3.cs
new file mode 100644
index 00000000000..bd31aee675f
--- /dev/null
+++ b/mcs/errors/cs0531-3.cs
@@ -0,0 +1,7 @@
+// CS0531: `I.P': interface members cannot have a definition
+// Line: 6
+
+interface I
+{
+ int P => 1;
+} \ No newline at end of file
diff --git a/mcs/errors/cs0573-2.cs b/mcs/errors/cs0573-2.cs
deleted file mode 100644
index 50836def0ee..00000000000
--- a/mcs/errors/cs0573-2.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-// CS0573: `A.a': Structs cannot have instance field initializers
-// Line: 5
-
-partial struct A {
- int a = 1;
-}
diff --git a/mcs/errors/cs0573.cs b/mcs/errors/cs0573.cs
deleted file mode 100644
index deec3ea6553..00000000000
--- a/mcs/errors/cs0573.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS0573: `A.a': Structs cannot have instance field initializers
-// Line: 5
-struct A {
- int a = 1;
-}
-
-class D {
- static void Main ()
- {
- A [] a = new A [10];
-
- }
-}
diff --git a/mcs/errors/cs0657-23.cs b/mcs/errors/cs0657-23.cs
new file mode 100644
index 00000000000..2e6f6a61381
--- /dev/null
+++ b/mcs/errors/cs0657-23.cs
@@ -0,0 +1,14 @@
+// CS0657: `field' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are `param'. All attributes in this section will be ignored
+// Line: 9
+// Compiler options: -warnaserror
+
+using System;
+
+public class FieldAttribute : System.Attribute
+{
+}
+
+class X ([field:FieldAttribute] int foo)
+{
+ int v = foo;
+}
diff --git a/mcs/errors/cs0837-2.cs b/mcs/errors/cs0837-2.cs
index 94c1f8510b9..eea4c130ea1 100644
--- a/mcs/errors/cs0837-2.cs
+++ b/mcs/errors/cs0837-2.cs
@@ -1,6 +1,5 @@
-// CS0837: The `as' operator cannot be applied to a lambda expression or anonymous method
-// Line: 15
-
+// CS0837: The `as' operator cannot be applied to a lambda expression, anonymous method, or method group
+// Line: 14
class X
{
diff --git a/mcs/errors/cs0837-3.cs b/mcs/errors/cs0837-3.cs
new file mode 100644
index 00000000000..de7ffd2c0af
--- /dev/null
+++ b/mcs/errors/cs0837-3.cs
@@ -0,0 +1,12 @@
+// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group
+// Line: 10
+
+using System;
+
+class Test
+{
+ static void Main ()
+ {
+ var res = Main is object;
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1953.cs b/mcs/errors/cs0837-4.cs
index ba5dbad0437..bc11afa0c97 100644
--- a/mcs/errors/cs1953.cs
+++ b/mcs/errors/cs0837-4.cs
@@ -1,4 +1,4 @@
-// CS1953: An expression tree cannot contain an expression with method group
+// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group
// Line: 11
using System;
diff --git a/mcs/errors/cs0837.cs b/mcs/errors/cs0837.cs
index 7c56fd1addd..c2ca9b8732a 100644
--- a/mcs/errors/cs0837.cs
+++ b/mcs/errors/cs0837.cs
@@ -1,4 +1,4 @@
-// CS0837: The `is' operator cannot be applied to a lambda expression or anonymous method
+// CS0837: The `is' operator cannot be applied to a lambda expression, anonymous method, or method group
// Line: 8
class X
diff --git a/mcs/errors/cs0840.cs b/mcs/errors/cs0840.cs
deleted file mode 100644
index bc4ee416056..00000000000
--- a/mcs/errors/cs0840.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-// CS0840: `Test.Property.get' must have a body because it is not marked abstract or extern. The property can be automatically implemented when you define both accessors
-// Line: 7
-
-
-public abstract class Test
-{
- public string Property { get; }
-}
diff --git a/mcs/errors/cs1001-9.cs b/mcs/errors/cs1001-9.cs
new file mode 100644
index 00000000000..989f314fd03
--- /dev/null
+++ b/mcs/errors/cs1001-9.cs
@@ -0,0 +1,10 @@
+// CS1001: Identifier expected
+// Line: 8
+
+class X
+{
+ public static void Main ()
+ {
+ var r = nameof (List<int2>);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1008-2.cs b/mcs/errors/cs1008-2.cs
deleted file mode 100644
index 326e4865470..00000000000
--- a/mcs/errors/cs1008-2.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// CS1008: Type byte, sbyte, short, ushort, int, uint, long or ulong expected
-// Line: 3
-enum Test : System.Int16
-{
- One
-}
-
-class X
-{
- static void Main ()
- { }
-}
-
-
diff --git a/mcs/errors/cs1031-2.cs b/mcs/errors/cs1031-2.cs
deleted file mode 100644
index 28f11a17660..00000000000
--- a/mcs/errors/cs1031-2.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// CS1031: Type expected
-// Line: 8
-
-using System;
-
-class M
-{
- public static void Main ()
- {
- Type t = typeof (this);
- }
-}
-
diff --git a/mcs/errors/cs1031.cs b/mcs/errors/cs1031.cs
index 1e37e8ed33b..28f11a17660 100644
--- a/mcs/errors/cs1031.cs
+++ b/mcs/errors/cs1031.cs
@@ -1,20 +1,13 @@
// CS1031: Type expected
-// Line: 17
+// Line: 8
using System;
-class C<T>
-{
- class G<U>
- {
- }
-}
-
class M
{
public static void Main ()
{
- Type t = typeof (C<int>.G<>);
+ Type t = typeof (this);
}
}
diff --git a/mcs/errors/cs1061-15.cs b/mcs/errors/cs1061-15.cs
new file mode 100644
index 00000000000..15b3864f822
--- /dev/null
+++ b/mcs/errors/cs1061-15.cs
@@ -0,0 +1,11 @@
+// CS1061: Type `int' does not contain a definition for `GetValueOrDefault' and no extension method `GetValueOrDefault' of type `int' could be found. Are you missing an assembly reference?
+// Line: 9
+
+class C
+{
+ static void Main ()
+ {
+ int? i = 4;
+ var m = i?.GetValueOrDefault ();
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1501-17.cs b/mcs/errors/cs1501-17.cs
new file mode 100644
index 00000000000..ac575643f4c
--- /dev/null
+++ b/mcs/errors/cs1501-17.cs
@@ -0,0 +1,14 @@
+// CS1501: No overload for method `Foo' takes `0' arguments
+// Line: 12
+
+class C
+{
+ static void Foo (string foo, params object [] moreFoo)
+ {
+ }
+
+ static void Main ()
+ {
+ Foo ();
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1525-10.cs b/mcs/errors/cs1525-10.cs
index ca5ff02ecb2..3bd7f52d6da 100755
--- a/mcs/errors/cs1525-10.cs
+++ b/mcs/errors/cs1525-10.cs
@@ -1,4 +1,4 @@
-// CS1525: Unexpected symbol `ref', expecting `.', `?', `[', `<operator>', or `identifier'
+// CS1525: Unexpected symbol `ref'
// Line: 8
public class Test
diff --git a/mcs/errors/cs1525-42.cs b/mcs/errors/cs1525-42.cs
index 87f9e86f9a6..dc8b7ce4da0 100644
--- a/mcs/errors/cs1525-42.cs
+++ b/mcs/errors/cs1525-42.cs
@@ -1,4 +1,4 @@
-// CS1525: Unexpected symbol `}', expecting `(' or `{'
+// CS1525: Unexpected symbol `}', expecting `(', `{', or `=>'
// Line: 6
class MyClass
diff --git a/mcs/errors/cs1644-19.cs b/mcs/errors/cs1644-19.cs
index ce867d1e71c..fe4e494dd37 100644
--- a/mcs/errors/cs1644-19.cs
+++ b/mcs/errors/cs1644-19.cs
@@ -1,4 +1,4 @@
-// CS1644: Feature `automatically implemented properties' cannot be used because it is not part of the C# 2.0 language specification
+// CS1644: Feature `auto-implemented properties' cannot be used because it is not part of the C# 2.0 language specification
// Line: 7
// Compiler options: -langversion:ISO-2
diff --git a/mcs/errors/cs1644-36.cs b/mcs/errors/cs1644-36.cs
new file mode 100644
index 00000000000..df2d30be8f2
--- /dev/null
+++ b/mcs/errors/cs1644-36.cs
@@ -0,0 +1,8 @@
+// CS1644: Feature `auto-implemented property initializer' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+ public static int P { get; } = 4;
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-37.cs b/mcs/errors/cs1644-37.cs
new file mode 100644
index 00000000000..37c997ff631
--- /dev/null
+++ b/mcs/errors/cs1644-37.cs
@@ -0,0 +1,7 @@
+// CS1644: Feature `primary constructor' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C (int arg)
+{
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-38.cs b/mcs/errors/cs1644-38.cs
new file mode 100644
index 00000000000..0adbe60e74f
--- /dev/null
+++ b/mcs/errors/cs1644-38.cs
@@ -0,0 +1,8 @@
+// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+ int Prop => 3;
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-39.cs b/mcs/errors/cs1644-39.cs
new file mode 100644
index 00000000000..877c248e870
--- /dev/null
+++ b/mcs/errors/cs1644-39.cs
@@ -0,0 +1,8 @@
+// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+ int M () => 0;
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-40.cs b/mcs/errors/cs1644-40.cs
new file mode 100644
index 00000000000..43ea9b022d6
--- /dev/null
+++ b/mcs/errors/cs1644-40.cs
@@ -0,0 +1,8 @@
+// CS1644: Feature `expression bodied members' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 7
+// Compiler options: -langversion:5
+
+class C
+{
+ int this [long arg] => -9;
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-41.cs b/mcs/errors/cs1644-41.cs
new file mode 100644
index 00000000000..0891786c3e8
--- /dev/null
+++ b/mcs/errors/cs1644-41.cs
@@ -0,0 +1,12 @@
+// CS1644: Feature `null propagating operator' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 10
+// Compiler options: -langversion:5
+
+class C
+{
+ static void Main ()
+ {
+ object o = null;
+ string s = o?.ToString ();
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-42.cs b/mcs/errors/cs1644-42.cs
new file mode 100644
index 00000000000..aea12a8aef0
--- /dev/null
+++ b/mcs/errors/cs1644-42.cs
@@ -0,0 +1,12 @@
+// CS1644: Feature `null propagating operator' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 10
+// Compiler options: -langversion:5
+
+class C
+{
+ static void Main ()
+ {
+ string[] a = null;
+ var s = a?[0];
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-43.cs b/mcs/errors/cs1644-43.cs
new file mode 100644
index 00000000000..c212fe90930
--- /dev/null
+++ b/mcs/errors/cs1644-43.cs
@@ -0,0 +1,11 @@
+// CS1644: Feature `nameof operator' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 10
+// Compiler options: -langversion:5
+
+class C
+{
+ static void Main ()
+ {
+ var n = nameof (Main);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1644-44.cs b/mcs/errors/cs1644-44.cs
new file mode 100644
index 00000000000..80013d335ca
--- /dev/null
+++ b/mcs/errors/cs1644-44.cs
@@ -0,0 +1,15 @@
+// CS1644: Feature `dictionary initializer' cannot be used because it is not part of the C# 5.0 language specification
+// Line: 12
+// Compiler options: -langversion:5
+
+using System.Collections.Generic;
+
+class C
+{
+ public static void Main ()
+ {
+ var d = new Dictionary<string, int> {
+ ["a"] = 1
+ };
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs1650-3.cs b/mcs/errors/cs1650-3.cs
new file mode 100644
index 00000000000..e0cfa0c6ef0
--- /dev/null
+++ b/mcs/errors/cs1650-3.cs
@@ -0,0 +1,19 @@
+// CS1650: Fields of static readonly field `C<T>.t' cannot be assigned to (except in a static constructor or a variable initializer)
+// Line: 17
+
+using System;
+
+interface I
+{
+ int X { get; set; }
+}
+
+class C<T> where T : struct, I
+{
+ static readonly T t;
+
+ public static void Foo ()
+ {
+ t.X = 42;
+ }
+}
diff --git a/mcs/errors/cs7003-2.cs b/mcs/errors/cs7003-2.cs
new file mode 100644
index 00000000000..3c45ebfcb14
--- /dev/null
+++ b/mcs/errors/cs7003-2.cs
@@ -0,0 +1,11 @@
+// CS7003: Unbound generic name is not valid in this context
+// Line: 10
+
+class G<T>
+{
+}
+
+class C
+{
+ G<> field;
+} \ No newline at end of file
diff --git a/mcs/errors/cs7003-3.cs b/mcs/errors/cs7003-3.cs
new file mode 100644
index 00000000000..a5f3c2fb382
--- /dev/null
+++ b/mcs/errors/cs7003-3.cs
@@ -0,0 +1,11 @@
+// CS7003: Unbound generic name is not valid in this context
+// Line: 10
+
+class G<T>
+{
+}
+
+class C
+{
+ const string f = nameof (G<>);
+} \ No newline at end of file
diff --git a/mcs/errors/cs7003-4.cs b/mcs/errors/cs7003-4.cs
new file mode 100644
index 00000000000..9df5effb871
--- /dev/null
+++ b/mcs/errors/cs7003-4.cs
@@ -0,0 +1,4 @@
+// CS7003: Unbound generic name is not valid in this context
+// Line: 4
+
+using SCGL = System.Collections.Generic.List<>; \ No newline at end of file
diff --git a/mcs/errors/cs7003.cs b/mcs/errors/cs7003.cs
new file mode 100644
index 00000000000..efa2ef04f8e
--- /dev/null
+++ b/mcs/errors/cs7003.cs
@@ -0,0 +1,19 @@
+// CS7003: Unbound generic name is not valid in this context
+// Line: 17
+
+using System;
+
+class C<T>
+{
+ public class G<U>
+ {
+ }
+}
+
+class M
+{
+ public static void Main ()
+ {
+ Type t = typeof (C<int>.G<>);
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs7007.cs b/mcs/errors/cs7007.cs
new file mode 100644
index 00000000000..a343757db8f
--- /dev/null
+++ b/mcs/errors/cs7007.cs
@@ -0,0 +1,9 @@
+// CS7007: `X' is not a static class. A using namespace directive can only be applied to static classes or namespace
+// Line: 5
+// Compiler options: -langversion:6
+
+using X;
+
+class X
+{
+} \ No newline at end of file
diff --git a/mcs/errors/cs9001.cs b/mcs/errors/cs8036.cs
index 59694800fd7..59694800fd7 100644
--- a/mcs/errors/cs9001.cs
+++ b/mcs/errors/cs8036.cs
diff --git a/mcs/errors/cs9002.cs b/mcs/errors/cs8037.cs
index ea40954ebd6..ea40954ebd6 100644
--- a/mcs/errors/cs9002.cs
+++ b/mcs/errors/cs8037.cs
diff --git a/mcs/errors/cs9003.cs b/mcs/errors/cs8038.cs
index 00780bc101b..76dc74646d6 100644
--- a/mcs/errors/cs9003.cs
+++ b/mcs/errors/cs8038.cs
@@ -1,4 +1,4 @@
-// CS9003: Primary constructor of type `Test<T>' has parameter of same name as type parameter `T'
+// CS8038: Primary constructor of type `Test<T>' has parameter of same name as type parameter `T'
// Line: 4
class Test<T>(T T)
diff --git a/mcs/errors/cs9004.cs b/mcs/errors/cs8039.cs
index d3679285367..7793ffdd721 100644
--- a/mcs/errors/cs9004.cs
+++ b/mcs/errors/cs8039.cs
@@ -1,4 +1,4 @@
-// CS9004: Primary constructor of type `Test' has parameter of same name as containing type
+// CS8039: Primary constructor of type `Test' has parameter of same name as containing type
// Line: 4
class Test(object Test)
diff --git a/mcs/errors/cs8041.cs b/mcs/errors/cs8041.cs
new file mode 100644
index 00000000000..fa403dd25c5
--- /dev/null
+++ b/mcs/errors/cs8041.cs
@@ -0,0 +1,13 @@
+// CS8041: Primary constructor already has a body
+// Line: 10
+
+class C (int arg)
+{
+ {
+ arg = 1;
+ }
+
+ {
+ arg = 2;
+ }
+}
diff --git a/mcs/errors/cs8043.cs b/mcs/errors/cs8043.cs
new file mode 100644
index 00000000000..b7f9da825f6
--- /dev/null
+++ b/mcs/errors/cs8043.cs
@@ -0,0 +1,10 @@
+// CS8043: `S.S(long)': Structs with primary constructor cannot specify default constructor initializer
+// Line: 6
+
+struct S (int x)
+{
+ public S (long x)
+ : this ()
+ {
+ }
+}
diff --git a/mcs/errors/cs8049.cs b/mcs/errors/cs8049.cs
new file mode 100644
index 00000000000..0689057684c
--- /dev/null
+++ b/mcs/errors/cs8049.cs
@@ -0,0 +1,11 @@
+// CS8049: Implemented interfaces cannot have arguments
+// Line: 6
+
+using System;
+
+class ID () : IDisposable ()
+{
+ public void Dispose ()
+ {
+ }
+}
diff --git a/mcs/errors/cs8050.cs b/mcs/errors/cs8050.cs
new file mode 100644
index 00000000000..2f4b88bfc2a
--- /dev/null
+++ b/mcs/errors/cs8050.cs
@@ -0,0 +1,7 @@
+// CS8050: `C.P': Only auto-implemented properties can have initializers
+// Line: 6
+
+abstract class C
+{
+ public abstract int P { get; } = 4;
+} \ No newline at end of file
diff --git a/mcs/errors/cs8051.cs b/mcs/errors/cs8051.cs
new file mode 100644
index 00000000000..7935efbe608
--- /dev/null
+++ b/mcs/errors/cs8051.cs
@@ -0,0 +1,7 @@
+// CS8051: Auto-implemented property `Test.Property' must have set accessor or initializer
+// Line: 6
+
+public abstract class Test
+{
+ public string Property { get; }
+}
diff --git a/mcs/errors/cs8052.cs b/mcs/errors/cs8052.cs
new file mode 100644
index 00000000000..bccf0157faf
--- /dev/null
+++ b/mcs/errors/cs8052.cs
@@ -0,0 +1,7 @@
+// CS8052: Auto-implemented property `V.P' must have get accessor
+// Line: 6
+
+class V
+{
+ public object P { set; } = 1;
+} \ No newline at end of file
diff --git a/mcs/errors/cs8053.cs b/mcs/errors/cs8053.cs
new file mode 100644
index 00000000000..319835ff09f
--- /dev/null
+++ b/mcs/errors/cs8053.cs
@@ -0,0 +1,7 @@
+// CS8053: `I.P': Properties inside interfaces cannot have initializers
+// Line: 6
+
+interface I
+{
+ int P { get; } = 4;
+} \ No newline at end of file
diff --git a/mcs/errors/cs8054-2.cs b/mcs/errors/cs8054-2.cs
new file mode 100644
index 00000000000..e633f176068
--- /dev/null
+++ b/mcs/errors/cs8054-2.cs
@@ -0,0 +1,6 @@
+// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers
+// Line: 5
+
+partial struct A {
+ int a = 1;
+}
diff --git a/mcs/errors/cs8054-3.cs b/mcs/errors/cs8054-3.cs
new file mode 100644
index 00000000000..b06047fb6ee
--- /dev/null
+++ b/mcs/errors/cs8054-3.cs
@@ -0,0 +1,6 @@
+// CS0573: `A.a': Structs without explicit constructors cannot contain members with initializers
+// Line: 5
+
+struct A {
+ int a = 1;
+}
diff --git a/mcs/errors/cs8054.cs b/mcs/errors/cs8054.cs
new file mode 100644
index 00000000000..4b8fc2ed446
--- /dev/null
+++ b/mcs/errors/cs8054.cs
@@ -0,0 +1,7 @@
+// CS8054: `S.P': Structs without explicit constructors cannot contain members with initializers
+// Line: 6
+
+struct S
+{
+ public decimal P { get; } = -3;
+} \ No newline at end of file
diff --git a/mcs/errors/cs8070.cs b/mcs/errors/cs8070.cs
new file mode 100644
index 00000000000..17fc12ea015
--- /dev/null
+++ b/mcs/errors/cs8070.cs
@@ -0,0 +1,23 @@
+// CS8070: Control cannot fall out of switch statement through final case label `case 3:'
+// Line: 20
+
+public class Foo
+{
+ public static void Main()
+ {
+ int a=5;
+ int b=10;
+ int c;
+
+ switch (a)
+ {
+ case 1: c=a+b;
+ return;
+
+ case 2: c=a-b;
+ return;
+
+ case 3: c=a*b;
+ }
+ }
+}
diff --git a/mcs/errors/cs8071-2.cs b/mcs/errors/cs8071-2.cs
new file mode 100644
index 00000000000..6bade9469da
--- /dev/null
+++ b/mcs/errors/cs8071-2.cs
@@ -0,0 +1,13 @@
+// CS8071: Type arguments are not allowed in the nameof operator
+// Line: 10
+
+using SCGL = System.Collections.Generic.List<int>;
+
+class X
+{
+ public static int Main ()
+ {
+ var x = nameof (SCGL.Contains);
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs8071.cs b/mcs/errors/cs8071.cs
new file mode 100644
index 00000000000..4c0ead2edc2
--- /dev/null
+++ b/mcs/errors/cs8071.cs
@@ -0,0 +1,18 @@
+// CS8071: Type arguments are not allowed in the nameof operator
+// Line: 16
+
+class G<T>
+{
+ class N
+ {
+ public int Foo;
+ }
+}
+
+class Test
+{
+ public static void Main ()
+ {
+ var n = nameof (G<int>.N.Foo);
+ }
+}
diff --git a/mcs/errors/cs8072-2.cs b/mcs/errors/cs8072-2.cs
new file mode 100644
index 00000000000..f9f2a1bf1ce
--- /dev/null
+++ b/mcs/errors/cs8072-2.cs
@@ -0,0 +1,16 @@
+// CS8072: An expression tree cannot contain a null propagating operator
+// Line: 14
+
+using System;
+using System.Linq.Expressions;
+
+public class C
+{
+ public void TestMethod () { }
+
+ static void Main ()
+ {
+ C c = null;
+ Expression<Action> e = () => c?.TestMethod ();
+ }
+}
diff --git a/mcs/errors/cs8072.cs b/mcs/errors/cs8072.cs
new file mode 100644
index 00000000000..e53e9069ac9
--- /dev/null
+++ b/mcs/errors/cs8072.cs
@@ -0,0 +1,14 @@
+// CS8072: An expression tree cannot contain a null propagating operator
+// Line: 11
+
+using System;
+using System.Linq.Expressions;
+
+class C
+{
+ static int Main ()
+ {
+ Expression<Func<string, char?>> e = l => l?[1];
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs8074.cs b/mcs/errors/cs8074.cs
new file mode 100644
index 00000000000..25d4e81f3be
--- /dev/null
+++ b/mcs/errors/cs8074.cs
@@ -0,0 +1,16 @@
+// CS8074: Expression tree cannot contain a dictionary initializer
+// Line: 13
+
+using System;
+using System.Collections.Generic;
+using System.Linq.Expressions;
+
+class C
+{
+ public static void Main ()
+ {
+ Expression<Func<Dictionary<string, int>>> l = () => new Dictionary<string, int> {
+ ["a"] = 1
+ };
+ }
+} \ No newline at end of file
diff --git a/mcs/errors/cs9005.cs b/mcs/errors/cs9005.cs
deleted file mode 100644
index 85e4c017263..00000000000
--- a/mcs/errors/cs9005.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-// CS9005: Constructor initializer cannot access primary constructor parameters
-// Line: 7
-
-class Test(string s)
-{
- public Test ()
- : this (s)
- {
- }
-} \ No newline at end of file
diff --git a/mcs/errors/cs9007.cs b/mcs/errors/cs9007.cs
deleted file mode 100644
index 05e9e3dfb1c..00000000000
--- a/mcs/errors/cs9007.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// CS9007: Primary constructor parameter `value' is not available in this context when using ref or out modifier
-// Line: 12
-
-class X (ref double value)
-{
- public double Prop {
- get {
- return value;
- }
- }
-}
-
diff --git a/mcs/jay/reader.c b/mcs/jay/reader.c
index dc1ede93d91..9d8fdcb4f24 100644
--- a/mcs/jay/reader.c
+++ b/mcs/jay/reader.c
@@ -40,6 +40,11 @@ static char sccsid[] = "@(#)reader.c 5.7 (Berkeley) 1/20/91";
#include "defs.h"
+/* this resolves "unresolved symbol _snprintf" on Windows */
+#if defined (_MSC_VER)
+#define snprintf _snprintf
+#endif
+
/* The line size must be a positive integer. One hundred was chosen */
/* because few lines in Yacc input grammars exceed 100 characters. */
/* Note that if a line exceeds LINESIZE characters, the line buffer */
@@ -1281,9 +1286,10 @@ loop:
if ((lineno - (a_lineno + comment_lines)) > 2)
{
- char mname[20];
- char line_define[256];
+ char mname[28];
+ char *line_define;
+ // the maximum size of of an unsigned int in characters is 20, with 8 for 'case_()\0'
sprintf(mname, "case_%d()", nrules - 2);
putc(' ', f); putc(' ', f);
@@ -1300,6 +1306,7 @@ loop:
methods = REALLOC (methods, maxmethods*sizeof(char *));
}
+ line_define = NEW2(snprintf(NULL, 0, line_format, a_lineno, input_file_name)+1, char);
sprintf(line_define, line_format, a_lineno, input_file_name);
mbody = NEW2(5+strlen(line_define)+1+strlen(mname)+strlen(buffer)+1, char);
@@ -1309,6 +1316,8 @@ loop:
strcat(mbody, line_define);
strcat(mbody, buffer);
methods[nmethods++] = mbody;
+
+ FREE(line_define);
}
else
{
diff --git a/mcs/mcs/anonymous.cs b/mcs/mcs/anonymous.cs
index 6ff0a4a8fb5..a0cf7d9eb9a 100644
--- a/mcs/mcs/anonymous.cs
+++ b/mcs/mcs/anonymous.cs
@@ -1321,16 +1321,28 @@ namespace Mono.CSharp {
return Parameters;
}
- protected override Expression DoResolve (ResolveContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
{
- if (ec.HasSet (ResolveContext.Options.ConstantScope)) {
- ec.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context");
+ if (rc.HasSet (ResolveContext.Options.ConstantScope)) {
+ rc.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context");
return null;
}
//
- // Set class type, set type
+ // Update top-level block generated duting parsing with actual top-level block
//
+ if (rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.BaseInitializer) && rc.CurrentMemberDefinition.Parent.PartialContainer.PrimaryConstructorParameters != null) {
+ var tb = rc.ConstructorBlock.ParametersBlock.TopBlock;
+ if (Block.TopBlock != tb) {
+ Block b = Block;
+ while (b.Parent != Block.TopBlock && b != Block.TopBlock)
+ b = b.Parent;
+
+ b.Parent = tb;
+ tb.IncludeBlock (Block, Block.TopBlock);
+ b.ParametersBlock.TopBlock = tb;
+ }
+ }
eclass = ExprClass.Value;
@@ -1341,7 +1353,7 @@ namespace Mono.CSharp {
//
type = InternalType.AnonymousMethod;
- if (!DoResolveParameters (ec))
+ if (!DoResolveParameters (rc))
return null;
return this;
@@ -1726,6 +1738,7 @@ namespace Mono.CSharp {
Modifiers modifiers;
TypeDefinition parent = null;
TypeParameters hoisted_tparams = null;
+ ParametersCompiled method_parameters = parameters;
var src_block = Block.Original.Explicit;
if (src_block.HasCapturedVariable || src_block.HasCapturedThis) {
@@ -1773,6 +1786,14 @@ namespace Mono.CSharp {
parent = storey = ec.CurrentAnonymousMethod.Storey;
modifiers = Modifiers.STATIC | Modifiers.PRIVATE;
+
+ //
+ // Convert generated method to closed delegate method where unused
+ // this argument is generated during compilation which speeds up dispatch
+ // by about 25%
+ //
+ method_parameters = ParametersCompiled.Prefix (method_parameters,
+ new Parameter (null, null, 0, null, loc), ec.Module.Compiler.BuiltinTypes.Object);
}
if (storey == null && hoisted_tparams == null)
@@ -1798,7 +1819,7 @@ namespace Mono.CSharp {
return new AnonymousMethodMethod (parent,
this, storey, new TypeExpression (ReturnType, Location), modifiers,
- member_name, parameters);
+ member_name, method_parameters);
}
protected override Expression DoResolve (ResolveContext ec)
@@ -1827,7 +1848,7 @@ namespace Mono.CSharp {
}
bool is_static = (method.ModFlags & Modifiers.STATIC) != 0;
- if (is_static && am_cache == null) {
+ if (is_static && am_cache == null && !ec.IsStaticConstructor) {
//
// Creates a field cache to store delegate instance if it's not generic
//
diff --git a/mcs/mcs/argument.cs b/mcs/mcs/argument.cs
index 13d0526cc2c..a5edeb53cf6 100644
--- a/mcs/mcs/argument.cs
+++ b/mcs/mcs/argument.cs
@@ -34,6 +34,11 @@ namespace Mono.CSharp
Default = 3, // argument created from default parameter value
DynamicTypeName = 4, // System.Type argument for dynamic binding
ExtensionType = 5, // Instance expression inserted as the first argument
+
+ // Conditional instance expression inserted as the first argument
+ ExtensionTypeConditionalAccess = 5 | ConditionalAccessFlag,
+
+ ConditionalAccessFlag = 1 << 7
}
public readonly AType ArgType;
@@ -60,6 +65,12 @@ namespace Mono.CSharp
get { return ArgType == AType.Default; }
}
+ public bool IsExtensionType {
+ get {
+ return (ArgType & AType.ExtensionType) == AType.ExtensionType;
+ }
+ }
+
public Parameter.Modifier Modifier {
get {
switch (ArgType) {
@@ -105,7 +116,13 @@ namespace Mono.CSharp
public virtual void Emit (EmitContext ec)
{
if (!IsByRef) {
- Expr.Emit (ec);
+ if (ArgType == AType.ExtensionTypeConditionalAccess) {
+ var ie = new InstanceEmitter (Expr, false);
+ ie.Emit (ec, true);
+ } else {
+ Expr.Emit (ec);
+ }
+
return;
}
@@ -276,6 +293,16 @@ namespace Mono.CSharp
ordered.Add (arg);
}
+ public override void FlowAnalysis (FlowAnalysisContext fc, List<MovableArgument> movable = null)
+ {
+ foreach (var arg in ordered) {
+ if (arg.ArgType != Argument.AType.Out)
+ arg.FlowAnalysis (fc);
+ }
+
+ base.FlowAnalysis (fc, ordered);
+ }
+
public override Arguments Emit (EmitContext ec, bool dup_args, bool prepareAwait)
{
foreach (var a in ordered) {
@@ -497,7 +524,7 @@ namespace Mono.CSharp
return null;
}
- public void FlowAnalysis (FlowAnalysisContext fc)
+ public virtual void FlowAnalysis (FlowAnalysisContext fc, List<MovableArgument> movable = null)
{
bool has_out = false;
foreach (var arg in args) {
@@ -506,7 +533,14 @@ namespace Mono.CSharp
continue;
}
- arg.FlowAnalysis (fc);
+ if (movable == null) {
+ arg.FlowAnalysis (fc);
+ continue;
+ }
+
+ var ma = arg as MovableArgument;
+ if (ma != null && !movable.Contains (ma))
+ arg.FlowAnalysis (fc);
}
if (!has_out)
diff --git a/mcs/mcs/assign.cs b/mcs/mcs/assign.cs
index 356768d8b74..472a393739f 100644
--- a/mcs/mcs/assign.cs
+++ b/mcs/mcs/assign.cs
@@ -645,6 +645,7 @@ namespace Mono.CSharp {
public override void FlowAnalysis (FlowAnalysisContext fc)
{
source.FlowAnalysis (fc);
+ ((FieldExpr) target).SetFieldAssigned (fc);
}
public bool IsDefaultInitializer {
diff --git a/mcs/mcs/async.cs b/mcs/mcs/async.cs
index c11216d9bae..6ffa92aa06a 100644
--- a/mcs/mcs/async.cs
+++ b/mcs/mcs/async.cs
@@ -474,6 +474,24 @@ namespace Mono.CSharp
throw new NotImplementedException ();
}
+ public void EmitCatchBlock (EmitContext ec)
+ {
+ var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location);
+
+ ec.BeginCatchBlock (catch_value.Type);
+ catch_value.EmitAssign (ec);
+
+ ec.EmitThis ();
+ ec.EmitInt ((int) IteratorStorey.State.After);
+ ec.Emit (OpCodes.Stfld, storey.PC.Spec);
+
+ ((AsyncTaskStorey) Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location));
+
+ ec.Emit (OpCodes.Leave, move_next_ok);
+ ec.EndExceptionBlock ();
+
+ }
+
protected override void EmitMoveNextEpilogue (EmitContext ec)
{
var storey = (AsyncTaskStorey) Storey;
@@ -801,7 +819,7 @@ namespace Mono.CSharp
args.Add (new Argument (awaiter, Argument.AType.Ref));
args.Add (new Argument (new CompilerGeneratedThis (CurrentType, Location), Argument.AType.Ref));
using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
- mg.EmitCall (ec, args);
+ mg.EmitCall (ec, args, true);
}
}
@@ -879,7 +897,7 @@ namespace Mono.CSharp
args.Add (new Argument (exceptionVariable));
using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
- mg.EmitCall (ec, args);
+ mg.EmitCall (ec, args, true);
}
}
@@ -903,7 +921,7 @@ namespace Mono.CSharp
}
using (ec.With (BuilderContext.Options.OmitDebugInfo, true)) {
- mg.EmitCall (ec, args);
+ mg.EmitCall (ec, args, true);
}
}
diff --git a/mcs/mcs/cfold.cs b/mcs/mcs/cfold.cs
index 72f3a9c3620..da85bf386b2 100644
--- a/mcs/mcs/cfold.cs
+++ b/mcs/mcs/cfold.cs
@@ -309,10 +309,10 @@ namespace Mono.CSharp {
return new StringConstant (ec.BuiltinTypes, (string)left.GetValue () + (string)right.GetValue (),
left.Location);
- if (lt == InternalType.NullLiteral)
+ if (lt == InternalType.NullLiteral || left.IsNull)
return new StringConstant (ec.BuiltinTypes, "" + right.GetValue (), left.Location);
- if (rt == InternalType.NullLiteral)
+ if (rt == InternalType.NullLiteral || right.IsNull)
return new StringConstant (ec.BuiltinTypes, left.GetValue () + "", left.Location);
return null;
@@ -861,9 +861,22 @@ namespace Mono.CSharp {
((IntConstant) right).Value);
return new IntConstant (ec.BuiltinTypes, res, left.Location);
- } else {
- throw new Exception ( "Unexepected modulus input: " + left);
}
+
+ if (left is DecimalConstant) {
+ decimal res;
+
+ if (ec.ConstantCheckState)
+ res = checked (((DecimalConstant) left).Value %
+ ((DecimalConstant) right).Value);
+ else
+ res = unchecked (((DecimalConstant) left).Value %
+ ((DecimalConstant) right).Value);
+
+ return new DecimalConstant (ec.BuiltinTypes, res, left.Location);
+ }
+
+ throw new Exception ( "Unexepected modulus input: " + left);
} catch (DivideByZeroException){
ec.Report.Error (20, loc, "Division by constant zero");
} catch (OverflowException){
diff --git a/mcs/mcs/class.cs b/mcs/mcs/class.cs
index 96f91888987..e84aef93322 100644
--- a/mcs/mcs/class.cs
+++ b/mcs/mcs/class.cs
@@ -553,7 +553,8 @@ namespace Mono.CSharp
public int AnonymousMethodsCounter;
public int MethodGroupsCounter;
- static readonly string[] attribute_targets = new string[] { "type" };
+ static readonly string[] attribute_targets = new [] { "type" };
+ static readonly string[] attribute_targets_primary = new [] { "type", "method" };
/// <remarks>
/// The pending methods that need to be implemented
@@ -732,6 +733,10 @@ namespace Mono.CSharp
public ParametersCompiled PrimaryConstructorParameters { get; set; }
+ public Arguments PrimaryConstructorBaseArguments { get; set; }
+
+ public Location PrimaryConstructorBaseArgumentsStart { get; set; }
+
public TypeParameters TypeParametersAll {
get {
return all_type_parameters;
@@ -740,7 +745,7 @@ namespace Mono.CSharp
public override string[] ValidAttributeTargets {
get {
- return attribute_targets;
+ return PrimaryConstructorParameters != null ? attribute_targets_primary : attribute_targets;
}
}
@@ -812,9 +817,6 @@ namespace Mono.CSharp
if (symbol is TypeParameter) {
Report.Error (692, symbol.Location,
"Duplicate type parameter `{0}'", symbol.GetSignatureForError ());
- } else if (symbol is PrimaryConstructorField && mc is TypeParameter) {
- Report.Error (9003, symbol.Location, "Primary constructor of type `{0}' has parameter of same name as type parameter `{1}'",
- symbol.Parent.GetSignatureForError (), symbol.GetSignatureForError ());
} else {
Report.Error (102, symbol.Location,
"The type `{0}' already contains a definition for `{1}'",
@@ -893,6 +895,21 @@ namespace Mono.CSharp
public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
{
+ if (a.Target == AttributeTargets.Method) {
+ foreach (var m in members) {
+ var c = m as Constructor;
+ if (c == null)
+ continue;
+
+ if (c.IsPrimaryConstructor) {
+ c.ApplyAttributeBuilder (a, ctor, cdata, pa);
+ return;
+ }
+ }
+
+ throw new InternalErrorException ();
+ }
+
if (has_normal_indexers && a.Type == pa.DefaultMember) {
Report.Error (646, a.Location, "Cannot specify the `DefaultMember' attribute on type containing an indexer");
return;
@@ -1356,7 +1373,7 @@ namespace Mono.CSharp
public SourceMethodBuilder CreateMethodSymbolEntry ()
{
- if (Module.DeclaringAssembly.SymbolWriter == null)
+ if (Module.DeclaringAssembly.SymbolWriter == null || (ModFlags & Modifiers.DEBUGGER_HIDDEN) != 0)
return null;
var source_file = GetCompilationSourceFile ();
@@ -1526,7 +1543,7 @@ namespace Mono.CSharp
if (PrimaryConstructorParameters != null) {
if (PartialContainer.PrimaryConstructorParameters != null) {
- Report.Error (9001, Location, "Only one part of a partial type can declare primary constructor parameters");
+ Report.Error (8036, Location, "Only one part of a partial type can declare primary constructor parameters");
} else {
PartialContainer.PrimaryConstructorParameters = PrimaryConstructorParameters;
}
@@ -1559,6 +1576,10 @@ namespace Mono.CSharp
}
if (iface_exprs != null) {
+ if (!PrimaryConstructorBaseArgumentsStart.IsNull) {
+ Report.Error (8049, PrimaryConstructorBaseArgumentsStart, "Implemented interfaces cannot have arguments");
+ }
+
foreach (var iface_type in iface_exprs) {
// Prevents a crash, the interface might not have been resolved: 442144
if (iface_type == null)
@@ -1587,8 +1608,12 @@ namespace Mono.CSharp
// defined after current container
//
if (class_partial_parts != null) {
- foreach (var pp in class_partial_parts)
+ foreach (var pp in class_partial_parts) {
+ if (pp.PrimaryConstructorBaseArguments != null)
+ PrimaryConstructorBaseArguments = pp.PrimaryConstructorBaseArguments;
+
pp.DoDefineBaseType ();
+ }
}
@@ -2553,7 +2578,7 @@ namespace Mono.CSharp
{
}
- public Arguments PrimaryConstructorBaseArguments { get; set; }
+ public ToplevelBlock PrimaryConstructorBlock { get; set; }
protected override TypeAttributes TypeAttr {
get {
@@ -2583,12 +2608,6 @@ namespace Mono.CSharp
return;
}
- if (symbol is PrimaryConstructorField) {
- Report.Error (9004, symbol.Location, "Primary constructor of type `{0}' has parameter of same name as containing type",
- symbol.Parent.GetSignatureForError ());
- return;
- }
-
InterfaceMemberBase imb = symbol as InterfaceMemberBase;
if (imb == null || !imb.IsExplicitImpl) {
Report.SymbolRelatedToPreviousError (this);
@@ -2632,23 +2651,30 @@ namespace Mono.CSharp
// The default static constructor is private
Modifiers mods;
+ ParametersCompiled parameters = null;
if (is_static) {
mods = Modifiers.STATIC | Modifiers.PRIVATE;
+ parameters = ParametersCompiled.EmptyReadOnlyParameters;
} else {
mods = ((ModFlags & Modifiers.ABSTRACT) != 0) ? Modifiers.PROTECTED : Modifiers.PUBLIC;
+ parameters = PrimaryConstructorParameters ?? ParametersCompiled.EmptyReadOnlyParameters;
}
- var c = new Constructor (this, MemberName.Name, mods, null, PrimaryConstructorParameters ?? ParametersCompiled.EmptyReadOnlyParameters, Location);
+ var c = new Constructor (this, MemberName.Name, mods, null, parameters, Location);
if (Kind == MemberKind.Class)
c.Initializer = new GeneratedBaseInitializer (Location, PrimaryConstructorBaseArguments);
- if (PrimaryConstructorParameters != null)
+ if (PrimaryConstructorParameters != null && !is_static)
c.IsPrimaryConstructor = true;
AddConstructor (c, true);
- c.Block = new ToplevelBlock (Compiler, c.ParameterInfo, Location) {
- IsCompilerGenerated = true
- };
+ if (PrimaryConstructorBlock == null) {
+ c.Block = new ToplevelBlock (Compiler, parameters, Location) {
+ IsCompilerGenerated = true
+ };
+ } else {
+ c.Block = PrimaryConstructorBlock;
+ }
return c;
}
@@ -2659,14 +2685,20 @@ namespace Mono.CSharp
if (PrimaryConstructorParameters != null) {
foreach (Parameter p in PrimaryConstructorParameters.FixedParameters) {
- if ((p.ModFlags & Parameter.Modifier.RefOutMask) != 0)
- continue;
-
- var f = new PrimaryConstructorField (this, p);
- AddField (f);
+ if (p.Name == MemberName.Name) {
+ Report.Error (8039, p.Location, "Primary constructor of type `{0}' has parameter of same name as containing type",
+ GetSignatureForError ());
+ }
- generated_primary_constructor.Block.AddStatement (
- new StatementExpression (new PrimaryConstructorAssign (f, p), p.Location));
+ if (CurrentTypeParameters != null) {
+ for (int i = 0; i < CurrentTypeParameters.Count; ++i) {
+ var tp = CurrentTypeParameters [i];
+ if (p.Name == tp.Name) {
+ Report.Error (8038, p.Location, "Primary constructor of type `{0}' has parameter of same name as type parameter `{1}'",
+ GetSignatureForError (), p.GetSignatureForError ());
+ }
+ }
+ }
}
}
@@ -3049,6 +3081,20 @@ namespace Mono.CSharp
base.Emit ();
}
+ bool HasExplicitConstructor ()
+ {
+ foreach (var m in Members) {
+ var c = m as Constructor;
+ if (c == null)
+ continue;
+
+ if (!c.ParameterInfo.IsEmpty)
+ return true;
+ }
+
+ return false;
+ }
+
public override bool IsUnmanagedType ()
{
if (has_unmanaged_check_done)
@@ -3104,14 +3150,15 @@ namespace Mono.CSharp
public override void RegisterFieldForInitialization (MemberCore field, FieldInitializer expression)
{
- if ((field.ModFlags & Modifiers.STATIC) == 0) {
- Report.Error (573, field.Location, "`{0}': Structs cannot have instance field initializers",
+ if ((field.ModFlags & Modifiers.STATIC) == 0 && !HasExplicitConstructor ()) {
+ Report.Error (8054, field.Location, "`{0}': Structs without explicit constructors cannot contain members with initializers",
field.GetSignatureForError ());
+
return;
}
+
base.RegisterFieldForInitialization (field, expression);
}
-
}
/// <summary>
diff --git a/mcs/mcs/codegen.cs b/mcs/mcs/codegen.cs
index 7f7ccb33239..7ab8f746f53 100644
--- a/mcs/mcs/codegen.cs
+++ b/mcs/mcs/codegen.cs
@@ -121,6 +121,8 @@ namespace Mono.CSharp
}
}
+ public ConditionalAccessContext ConditionalAccess { get; set; }
+
public TypeSpec CurrentType {
get { return member_context.CurrentType; }
}
@@ -155,6 +157,12 @@ namespace Mono.CSharp
get { return member_context.IsStatic; }
}
+ public bool IsStaticConstructor {
+ get {
+ return member_context.IsStatic && (flags & Options.ConstructorScope) != 0;
+ }
+ }
+
public bool IsAnonymousStoreyMutateRequired {
get {
return CurrentAnonymousMethod != null &&
@@ -214,6 +222,8 @@ namespace Mono.CSharp
public List<TryFinally> TryFinallyUnwind { get; set; }
+ public Label RecursivePatternLabel { get; set; }
+
#endregion
public void AddStatementEpilog (IExpressionCleanup cleanupExpression)
@@ -344,6 +354,15 @@ namespace Mono.CSharp
#endif
}
+ public void CloseConditionalAccess (TypeSpec type)
+ {
+ if (type != null)
+ Emit (OpCodes.Newobj, Nullable.NullableInfo.GetConstructor (type));
+
+ MarkLabel (ConditionalAccess.EndLabel);
+ ConditionalAccess = null;
+ }
+
//
// Creates a nested container in this context for all dynamic compiler generated stuff
//
@@ -534,8 +553,8 @@ namespace Mono.CSharp
// bool array can actually store any byte value
//
ig.Emit (OpCodes.Ldelem_U1);
- ig.Emit (OpCodes.Ldc_I4_1);
- ig.Emit (OpCodes.And);
+ ig.Emit (OpCodes.Ldc_I4_0);
+ ig.Emit (OpCodes.Cgt_Un);
break;
case BuiltinTypeSpec.Type.Byte:
ig.Emit (OpCodes.Ldelem_U1);
@@ -756,8 +775,8 @@ namespace Mono.CSharp
break;
case BuiltinTypeSpec.Type.Bool:
ig.Emit (OpCodes.Ldind_I1);
- ig.Emit (OpCodes.Ldc_I4_1);
- ig.Emit (OpCodes.And);
+ ig.Emit (OpCodes.Ldc_I4_0);
+ ig.Emit (OpCodes.Cgt_Un);
break;
case BuiltinTypeSpec.Type.ULong:
case BuiltinTypeSpec.Type.Long:
@@ -972,12 +991,25 @@ namespace Mono.CSharp
}
}
+ public class ConditionalAccessContext
+ {
+ public ConditionalAccessContext (TypeSpec type, Label endLabel)
+ {
+ Type = type;
+ EndLabel = endLabel;
+ }
+
+ public bool Statement { get; set; }
+ public Label EndLabel { get; private set; }
+ public TypeSpec Type { get; private set; }
+ }
+
struct CallEmitter
{
public Expression InstanceExpression;
//
- // When set leaves an extra copy of all arguments on the stack
+ // When call has to leave an extra copy of all arguments on the stack
//
public bool DuplicateArguments;
@@ -992,6 +1024,8 @@ namespace Mono.CSharp
//
public bool HasAwaitArguments;
+ public bool ConditionalAccess;
+
//
// When dealing with await arguments the original arguments are converted
// into a new set with hoisted stack results
@@ -1000,10 +1034,15 @@ namespace Mono.CSharp
public void Emit (EmitContext ec, MethodSpec method, Arguments Arguments, Location loc)
{
- EmitPredefined (ec, method, Arguments, loc);
+ EmitPredefined (ec, method, Arguments, false, loc);
+ }
+
+ public void EmitStatement (EmitContext ec, MethodSpec method, Arguments Arguments, Location loc)
+ {
+ EmitPredefined (ec, method, Arguments, true, loc);
}
- public void EmitPredefined (EmitContext ec, MethodSpec method, Arguments Arguments, Location? loc = null)
+ public void EmitPredefined (EmitContext ec, MethodSpec method, Arguments Arguments, bool statement = false, Location? loc = null)
{
Expression instance_copy = null;
@@ -1020,23 +1059,23 @@ namespace Mono.CSharp
if (method.IsStatic) {
call_op = OpCodes.Call;
} else {
- if (IsVirtualCallRequired (InstanceExpression, method)) {
- call_op = OpCodes.Callvirt;
- } else {
- call_op = OpCodes.Call;
- }
+ call_op = IsVirtualCallRequired (InstanceExpression, method) ? OpCodes.Callvirt : OpCodes.Call;
if (HasAwaitArguments) {
instance_copy = InstanceExpression.EmitToField (ec);
- if (Arguments == null)
- EmitCallInstance (ec, instance_copy, method.DeclaringType, call_op);
+ var ie = new InstanceEmitter (instance_copy, IsAddressCall (instance_copy, call_op, method.DeclaringType));
+
+ if (Arguments == null) {
+ ie.EmitLoad (ec);
+ }
} else if (!InstanceExpressionOnStack) {
- var instance_on_stack_type = EmitCallInstance (ec, InstanceExpression, method.DeclaringType, call_op);
+ var ie = new InstanceEmitter (InstanceExpression, IsAddressCall (InstanceExpression, call_op, method.DeclaringType));
+ ie.Emit (ec, ConditionalAccess);
if (DuplicateArguments) {
ec.Emit (OpCodes.Dup);
if (Arguments != null && Arguments.Count != 0) {
- lt = new LocalTemporary (instance_on_stack_type);
+ lt = new LocalTemporary (ie.GetStackType (ec));
lt.Store (ec);
instance_copy = lt;
}
@@ -1048,7 +1087,8 @@ namespace Mono.CSharp
EmittedArguments = Arguments.Emit (ec, DuplicateArguments, HasAwaitArguments);
if (EmittedArguments != null) {
if (instance_copy != null) {
- EmitCallInstance (ec, instance_copy, method.DeclaringType, call_op);
+ var ie = new InstanceEmitter (instance_copy, IsAddressCall (instance_copy, call_op, method.DeclaringType));
+ ie.Emit (ec, ConditionalAccess);
if (lt != null)
lt.Release (ec);
@@ -1079,27 +1119,177 @@ namespace Mono.CSharp
if (method.Parameters.HasArglist) {
var varargs_types = GetVarargsTypes (method, Arguments);
ec.Emit (call_op, method, varargs_types);
- return;
+ } else {
+ //
+ // If you have:
+ // this.DoFoo ();
+ // and DoFoo is not virtual, you can omit the callvirt,
+ // because you don't need the null checking behavior.
+ //
+ ec.Emit (call_op, method);
}
+ //
+ // Pop the return value if there is one and stack should be empty
//
- // If you have:
- // this.DoFoo ();
- // and DoFoo is not virtual, you can omit the callvirt,
- // because you don't need the null checking behavior.
+ if (statement && method.ReturnType.Kind != MemberKind.Void)
+ ec.Emit (OpCodes.Pop);
+ }
+
+ static MetaType[] GetVarargsTypes (MethodSpec method, Arguments arguments)
+ {
+ AParametersCollection pd = method.Parameters;
+
+ Argument a = arguments[pd.Count - 1];
+ Arglist list = (Arglist) a.Expr;
+
+ return list.ArgumentTypes;
+ }
+
+ //
+ // Used to decide whether call or callvirt is needed
+ //
+ static bool IsVirtualCallRequired (Expression instance, MethodSpec method)
+ {
+ //
+ // There are 2 scenarious where we emit callvirt
//
- ec.Emit (call_op, method);
+ // Case 1: A method is virtual and it's not used to call base
+ // Case 2: A method instance expression can be null. In this casen callvirt ensures
+ // correct NRE exception when the method is called
+ //
+ var decl_type = method.DeclaringType;
+ if (decl_type.IsStruct || decl_type.IsEnum)
+ return false;
+
+ if (instance is BaseThis)
+ return false;
+
+ //
+ // It's non-virtual and will never be null and it can be determined
+ // whether it's known value or reference type by verifier
+ //
+ if (!method.IsVirtual && Expression.IsNeverNull (instance) && !instance.Type.IsGenericParameter)
+ return false;
+
+ return true;
+ }
+
+ static bool IsAddressCall (Expression instance, OpCode callOpcode, TypeSpec declaringType)
+ {
+ var instance_type = instance.Type;
+ return (instance_type.IsStructOrEnum && (callOpcode == OpCodes.Callvirt || (callOpcode == OpCodes.Call && declaringType.IsStruct))) ||
+ instance_type.IsGenericParameter || declaringType.IsNullableType;
+ }
+ }
+
+ public struct InstanceEmitter
+ {
+ readonly Expression instance;
+ readonly bool addressRequired;
+
+ public InstanceEmitter (Expression instance, bool addressLoad)
+ {
+ this.instance = instance;
+ this.addressRequired = addressLoad;
+ }
+
+ public void Emit (EmitContext ec, bool conditionalAccess)
+ {
+ Label NullOperatorLabel;
+ Nullable.Unwrap unwrap;
+
+ if (conditionalAccess && Expression.IsNeverNull (instance))
+ conditionalAccess = false;
+
+ if (conditionalAccess) {
+ NullOperatorLabel = ec.DefineLabel ();
+ unwrap = instance as Nullable.Unwrap;
+ } else {
+ NullOperatorLabel = new Label ();
+ unwrap = null;
+ }
+
+ IMemoryLocation instance_address = null;
+ bool conditional_access_dup = false;
+
+ if (unwrap != null) {
+ unwrap.Store (ec);
+ unwrap.EmitCheck (ec);
+ ec.Emit (OpCodes.Brtrue_S, NullOperatorLabel);
+ } else {
+ if (conditionalAccess && addressRequired) {
+ //
+ // Don't allocate temp variable when instance load is cheap and load and load-address
+ // operate on same memory
+ //
+ instance_address = instance as VariableReference;
+ if (instance_address == null)
+ instance_address = instance as LocalTemporary;
+
+ if (instance_address == null) {
+ EmitLoad (ec);
+ ec.Emit (OpCodes.Dup);
+ ec.EmitLoadFromPtr (instance.Type);
+
+ conditional_access_dup = true;
+ } else {
+ instance.Emit (ec);
+ }
+
+ if (instance.Type.Kind == MemberKind.TypeParameter)
+ ec.Emit (OpCodes.Box, instance.Type);
+ } else {
+ EmitLoad (ec);
+
+ if (conditionalAccess) {
+ conditional_access_dup = !IsInexpensiveLoad ();
+ if (conditional_access_dup)
+ ec.Emit (OpCodes.Dup);
+ }
+ }
+
+ if (conditionalAccess) {
+ ec.Emit (OpCodes.Brtrue_S, NullOperatorLabel);
+
+ if (conditional_access_dup)
+ ec.Emit (OpCodes.Pop);
+ }
+ }
+
+ if (conditionalAccess) {
+ if (!ec.ConditionalAccess.Statement) {
+ if (ec.ConditionalAccess.Type.IsNullableType)
+ Nullable.LiftedNull.Create (ec.ConditionalAccess.Type, Location.Null).Emit (ec);
+ else
+ ec.EmitNull ();
+ }
+
+ ec.Emit (OpCodes.Br, ec.ConditionalAccess.EndLabel);
+ ec.MarkLabel (NullOperatorLabel);
+
+ if (instance_address != null) {
+ instance_address.AddressOf (ec, AddressOp.Load);
+ } else if (unwrap != null) {
+ unwrap.Emit (ec);
+ var tmp = ec.GetTemporaryLocal (unwrap.Type);
+ ec.Emit (OpCodes.Stloc, tmp);
+ ec.Emit (OpCodes.Ldloca, tmp);
+ ec.FreeTemporaryLocal (tmp, unwrap.Type);
+ } else if (!conditional_access_dup) {
+ instance.Emit (ec);
+ }
+ }
}
- static TypeSpec EmitCallInstance (EmitContext ec, Expression instance, TypeSpec declaringType, OpCode callOpcode)
+ public void EmitLoad (EmitContext ec)
{
var instance_type = instance.Type;
//
// Push the instance expression
//
- if ((instance_type.IsStructOrEnum && (callOpcode == OpCodes.Callvirt || (callOpcode == OpCodes.Call && declaringType.IsStruct))) ||
- instance_type.IsGenericParameter || declaringType.IsNullableType) {
+ if (addressRequired) {
//
// If the expression implements IMemoryLocation, then
// we can optimize and use AddressOf on the
@@ -1117,57 +1307,61 @@ namespace Mono.CSharp
temp.AddressOf (ec, AddressOp.Load);
}
- return ReferenceContainer.MakeType (ec.Module, instance_type);
+ return;
}
- if (instance_type.IsStructOrEnum) {
- instance.Emit (ec);
+ instance.Emit (ec);
+
+ // Only to make verifier happy
+ if (RequiresBoxing ())
ec.Emit (OpCodes.Box, instance_type);
- return ec.BuiltinTypes.Object;
- }
+ }
+
+ public TypeSpec GetStackType (EmitContext ec)
+ {
+ var instance_type = instance.Type;
+
+ if (addressRequired)
+ return ReferenceContainer.MakeType (ec.Module, instance_type);
+
+ if (instance_type.IsStructOrEnum)
+ return ec.Module.Compiler.BuiltinTypes.Object;
- instance.Emit (ec);
return instance_type;
}
- static MetaType[] GetVarargsTypes (MethodSpec method, Arguments arguments)
+ bool RequiresBoxing ()
{
- AParametersCollection pd = method.Parameters;
+ var instance_type = instance.Type;
+ if (instance_type.IsGenericParameter && !(instance is This) && TypeSpec.IsReferenceType (instance_type))
+ return true;
- Argument a = arguments[pd.Count - 1];
- Arglist list = (Arglist) a.Expr;
+ if (instance_type.IsStructOrEnum)
+ return true;
- return list.ArgumentTypes;
+ return false;
}
- //
- // Used to decide whether call or callvirt is needed
- //
- static bool IsVirtualCallRequired (Expression instance, MethodSpec method)
+ bool IsInexpensiveLoad ()
{
- //
- // There are 2 scenarious where we emit callvirt
- //
- // Case 1: A method is virtual and it's not used to call base
- // Case 2: A method instance expression can be null. In this casen callvirt ensures
- // correct NRE exception when the method is called
- //
- var decl_type = method.DeclaringType;
- if (decl_type.IsStruct || decl_type.IsEnum)
- return false;
+ if (instance is Constant)
+ return instance.IsSideEffectFree;
- if (instance is BaseThis)
+ if (RequiresBoxing ())
return false;
- //
- // It's non-virtual and will never be null and it can be determined
- // whether it's known value or reference type by verifier
- //
- if (!method.IsVirtual && (instance is This || instance is New || instance is ArrayCreation || instance is DelegateCreation) &&
- !instance.Type.IsGenericParameter)
- return false;
+ var vr = instance as VariableReference;
+ if (vr != null)
+ return !vr.IsRef;
- return true;
+ if (instance is LocalTemporary)
+ return true;
+
+ var fe = instance as FieldExpr;
+ if (fe != null)
+ return fe.IsStatic || fe.InstanceExpression is This;
+
+ return false;
}
}
}
diff --git a/mcs/mcs/constant.cs b/mcs/mcs/constant.cs
index 8faec94e4c9..ea7e7bfbf2e 100644
--- a/mcs/mcs/constant.cs
+++ b/mcs/mcs/constant.cs
@@ -2031,8 +2031,6 @@ namespace Mono.CSharp {
}
public class StringConstant : Constant {
- public readonly string Value;
-
public StringConstant (BuiltinTypes types, string s, Location loc)
: this (types.String, s, loc)
{
@@ -2047,6 +2045,13 @@ namespace Mono.CSharp {
Value = s;
}
+ protected StringConstant (Location loc)
+ : base (loc)
+ {
+ }
+
+ public string Value { get; protected set; }
+
public override object GetValue ()
{
return Value;
@@ -2129,6 +2134,113 @@ namespace Mono.CSharp {
}
}
+ class NameOf : StringConstant
+ {
+ readonly SimpleName name;
+
+ public NameOf (SimpleName name)
+ : base (name.Location)
+ {
+ this.name = name;
+ }
+
+ protected override Expression DoResolve (ResolveContext rc)
+ {
+ throw new NotSupportedException ();
+ }
+
+ bool ResolveArgumentExpression (ResolveContext rc, Expression expr)
+ {
+ var sn = expr as SimpleName;
+ if (sn != null) {
+ Value = sn.Name;
+
+ if (rc.Module.Compiler.Settings.Version < LanguageVersion.V_6)
+ rc.Report.FeatureIsNotAvailable (rc.Module.Compiler, Location, "nameof operator");
+
+ if (sn.HasTypeArguments) {
+ // TODO: csc compatible but unhelpful error message
+ rc.Report.Error (1001, loc, "Identifier expected");
+ return true;
+ }
+
+ sn.LookupNameExpression (rc, MemberLookupRestrictions.IgnoreArity | MemberLookupRestrictions.IgnoreAmbiguity);
+ return true;
+ }
+
+ var ma = expr as MemberAccess;
+ if (ma != null) {
+ FullNamedExpression fne = ma.LeftExpression as ATypeNameExpression;
+ if (fne == null) {
+ var qam = ma as QualifiedAliasMember;
+ if (qam == null)
+ return false;
+
+ fne = qam.CreateExpressionFromAlias (rc);
+ if (fne == null)
+ return true;
+ }
+
+ Value = ma.Name;
+
+ if (rc.Module.Compiler.Settings.Version < LanguageVersion.V_6)
+ rc.Report.FeatureIsNotAvailable (rc.Module.Compiler, Location, "nameof operator");
+
+ if (ma.HasTypeArguments) {
+ // TODO: csc compatible but unhelpful error message
+ rc.Report.Error (1001, loc, "Identifier expected");
+ return true;
+ }
+
+ var left = fne.ResolveAsTypeOrNamespace (rc, true);
+ if (left == null)
+ return true;
+
+ var ns = left as NamespaceExpression;
+ if (ns != null) {
+ FullNamedExpression retval = ns.LookupTypeOrNamespace (rc, ma.Name, 0, LookupMode.NameOf, loc);
+ if (retval == null)
+ ns.Error_NamespaceDoesNotExist (rc, ma.Name, 0);
+
+ return true;
+ }
+
+ if (left.Type.IsGenericOrParentIsGeneric && left.Type.GetDefinition () != left.Type) {
+ rc.Report.Error (8071, loc, "Type arguments are not allowed in the nameof operator");
+ }
+
+ var mexpr = MemberLookup (rc, false, left.Type, ma.Name, 0, MemberLookupRestrictions.IgnoreArity | MemberLookupRestrictions.IgnoreAmbiguity, loc);
+ if (mexpr == null) {
+ ma.Error_IdentifierNotFound (rc, left.Type);
+ return true;
+ }
+
+ return true;
+ }
+
+ return false;
+ }
+
+ public Expression ResolveOverload (ResolveContext rc, Arguments args)
+ {
+ if (args == null || args.Count != 1) {
+ name.Error_NameDoesNotExist (rc);
+ return null;
+ }
+
+ var arg = args [0];
+ var res = ResolveArgumentExpression (rc, arg.Expr);
+ if (!res) {
+ name.Error_NameDoesNotExist (rc);
+ return null;
+ }
+
+ type = rc.BuiltinTypes.String;
+ eclass = ExprClass.Value;
+ return this;
+ }
+ }
+
//
// Null constant can have its own type, think of `default (Foo)'
//
diff --git a/mcs/mcs/context.cs b/mcs/mcs/context.cs
index 873c92d24ef..230aa125764 100644
--- a/mcs/mcs/context.cs
+++ b/mcs/mcs/context.cs
@@ -14,6 +14,7 @@ using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
+using System.Diagnostics;
namespace Mono.CSharp
{
@@ -21,7 +22,8 @@ namespace Mono.CSharp
{
Normal = 0,
Probing = 1,
- IgnoreAccessibility = 2
+ IgnoreAccessibility = 2,
+ NameOf = 3
}
//
@@ -188,6 +190,8 @@ namespace Mono.CSharp
TryWithCatchScope = 1 << 15,
+ ConditionalAccessReceiver = 1 << 16,
+
///
/// Indicates the current context is in probing mode, no errors are reported.
///
@@ -442,6 +446,7 @@ namespace Mono.CSharp
public class FlowAnalysisContext
{
readonly CompilerContext ctx;
+ DefiniteAssignmentBitSet conditional_access;
public FlowAnalysisContext (CompilerContext ctx, ParametersBlock parametersBlock, int definiteAssignmentLength)
{
@@ -483,6 +488,19 @@ namespace Mono.CSharp
return dat;
}
+ public void BranchConditionalAccessDefiniteAssignment ()
+ {
+ if (conditional_access == null)
+ conditional_access = BranchDefiniteAssignment ();
+ }
+
+ public void ConditionalAccessEnd ()
+ {
+ Debug.Assert (conditional_access != null);
+ DefiniteAssignment = conditional_access;
+ conditional_access = null;
+ }
+
public bool IsDefinitelyAssigned (VariableInfo variable)
{
return variable.IsAssigned (DefiniteAssignment);
diff --git a/mcs/mcs/convert.cs b/mcs/mcs/convert.cs
index 00be96b40a2..065c9a7e3f8 100644
--- a/mcs/mcs/convert.cs
+++ b/mcs/mcs/convert.cs
@@ -27,6 +27,15 @@ namespace Mono.CSharp {
//
static class Convert
{
+ [Flags]
+ public enum UserConversionRestriction
+ {
+ None = 0,
+ ImplicitOnly = 1,
+ ProbingOnly = 1 << 1,
+ NullableSourceOnly = 1 << 2
+
+ }
//
// From a one-dimensional array-type S[] to System.Collections.IList<T> and base
// interfaces of this interface, provided there is an implicit reference conversion
@@ -336,7 +345,7 @@ namespace Mono.CSharp {
if (target_type.Kind == MemberKind.InternalCompilerType)
return target_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic;
- return TypeSpec.IsReferenceType (target_type);
+ return TypeSpec.IsReferenceType (target_type) || target_type.Kind == MemberKind.PointerType;
}
//
@@ -675,7 +684,7 @@ namespace Mono.CSharp {
//
public static bool ImplicitConversionExists (ResolveContext ec, Expression expr, TypeSpec target_type)
{
- if (ImplicitStandardConversionExists (expr, target_type))
+ if (ImplicitStandardConversionExists (ec, expr, target_type))
return true;
if (expr.Type == InternalType.AnonymousMethod) {
@@ -686,21 +695,27 @@ namespace Mono.CSharp {
return ame.ImplicitStandardConversionExists (ec, target_type);
}
+ // Conversion from __arglist to System.ArgIterator
+ if (expr.Type == InternalType.Arglist)
+ return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec;
+
+ return UserDefinedConversion (ec, expr, target_type,
+ UserConversionRestriction.ImplicitOnly | UserConversionRestriction.ProbingOnly, Location.Null) != null;
+ }
+
+ public static bool ImplicitStandardConversionExists (ResolveContext rc, Expression expr, TypeSpec target_type)
+ {
if (expr.eclass == ExprClass.MethodGroup) {
- if (target_type.IsDelegate && ec.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) {
+ if (target_type.IsDelegate && rc.Module.Compiler.Settings.Version != LanguageVersion.ISO_1) {
MethodGroupExpr mg = expr as MethodGroupExpr;
if (mg != null)
- return DelegateCreation.ImplicitStandardConversionExists (ec, mg, target_type);
+ return DelegateCreation.ImplicitStandardConversionExists (rc, mg, target_type);
}
return false;
}
- // Conversion from __arglist to System.ArgIterator
- if (expr.Type == InternalType.Arglist)
- return target_type == ec.Module.PredefinedTypes.ArgIterator.TypeSpec;
-
- return UserDefinedConversion (ec, expr, target_type, true, true, Location.Null) != null;
+ return ImplicitStandardConversionExists (expr, target_type);
}
//
@@ -911,7 +926,7 @@ namespace Mono.CSharp {
// by making use of FindMostEncomp* methods. Applies the correct rules separately
// for explicit and implicit conversion operators.
//
- static TypeSpec FindMostSpecificSource (List<MethodSpec> list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules)
+ static TypeSpec FindMostSpecificSource (ResolveContext rc, List<MethodSpec> list, TypeSpec sourceType, Expression source, bool apply_explicit_conv_rules)
{
TypeSpec[] src_types_set = null;
@@ -937,12 +952,16 @@ namespace Mono.CSharp {
var candidate_set = new List<TypeSpec> ();
foreach (TypeSpec param_type in src_types_set){
- if (ImplicitStandardConversionExists (source, param_type))
+ if (ImplicitStandardConversionExists (rc, source, param_type))
candidate_set.Add (param_type);
}
- if (candidate_set.Count != 0)
+ if (candidate_set.Count != 0) {
+ if (source.eclass == ExprClass.MethodGroup)
+ return InternalType.FakeInternalType;
+
return FindMostEncompassedType (candidate_set);
+ }
}
//
@@ -1010,7 +1029,7 @@ namespace Mono.CSharp {
/// </summary>
static public Expression ImplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc)
{
- return UserDefinedConversion (ec, source, target, true, false, loc);
+ return UserDefinedConversion (ec, source, target, UserConversionRestriction.ImplicitOnly, loc);
}
/// <summary>
@@ -1018,10 +1037,10 @@ namespace Mono.CSharp {
/// </summary>
static Expression ExplicitUserConversion (ResolveContext ec, Expression source, TypeSpec target, Location loc)
{
- return UserDefinedConversion (ec, source, target, false, false, loc);
+ return UserDefinedConversion (ec, source, target, 0, loc);
}
- static void FindApplicableUserDefinedConversionOperators (IList<MemberSpec> operators, Expression source, TypeSpec target, bool implicitOnly, ref List<MethodSpec> candidates)
+ static void FindApplicableUserDefinedConversionOperators (ResolveContext rc, IList<MemberSpec> operators, Expression source, TypeSpec target, UserConversionRestriction restr, ref List<MethodSpec> candidates)
{
if (source.Type.IsInterface) {
// Neither A nor B are interface-types
@@ -1043,14 +1062,17 @@ namespace Mono.CSharp {
continue;
var t = op.Parameters.Types[0];
- if (source.Type != t && !ImplicitStandardConversionExists (source, t)) {
- if (implicitOnly)
+ if (source.Type != t && !ImplicitStandardConversionExists (rc, source, t)) {
+ if ((restr & UserConversionRestriction.ImplicitOnly) != 0)
continue;
if (!ImplicitStandardConversionExists (new EmptyExpression (t), source.Type))
- continue;
+ continue;
}
+ if ((restr & UserConversionRestriction.NullableSourceOnly) != 0 && !t.IsNullableType)
+ continue;
+
t = op.ReturnType;
if (t.IsInterface)
@@ -1061,7 +1083,7 @@ namespace Mono.CSharp {
t = Nullable.NullableInfo.GetUnderlyingType (t);
if (!ImplicitStandardConversionExists (new EmptyExpression (t), target)) {
- if (implicitOnly)
+ if ((restr & UserConversionRestriction.ImplicitOnly) != 0)
continue;
if (texpr == null)
@@ -1082,7 +1104,7 @@ namespace Mono.CSharp {
//
// User-defined conversions
//
- static Expression UserDefinedConversion (ResolveContext ec, Expression source, TypeSpec target, bool implicitOnly, bool probingOnly, Location loc)
+ public static Expression UserDefinedConversion (ResolveContext rc, Expression source, TypeSpec target, UserConversionRestriction restr, Location loc)
{
List<MethodSpec> candidates = null;
@@ -1094,6 +1116,7 @@ namespace Mono.CSharp {
TypeSpec target_type = target;
Expression source_type_expr;
bool nullable_source = false;
+ var implicitOnly = (restr & UserConversionRestriction.ImplicitOnly) != 0;
if (source_type.IsNullableType) {
// No unwrapping conversion S? -> T for non-reference types
@@ -1119,13 +1142,13 @@ namespace Mono.CSharp {
var operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Implicit, declared_only);
if (operators != null) {
- FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, implicitOnly, ref candidates);
+ FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
}
if (!implicitOnly) {
operators = MemberCache.GetUserOperator (source_type, Operator.OpType.Explicit, declared_only);
if (operators != null) {
- FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, false, ref candidates);
+ FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
}
}
}
@@ -1135,13 +1158,13 @@ namespace Mono.CSharp {
var operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Implicit, declared_only);
if (operators != null) {
- FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, implicitOnly, ref candidates);
+ FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
}
if (!implicitOnly) {
operators = MemberCache.GetUserOperator (target_type, Operator.OpType.Explicit, declared_only);
if (operators != null) {
- FindApplicableUserDefinedConversionOperators (operators, source_type_expr, target_type, false, ref candidates);
+ FindApplicableUserDefinedConversionOperators (rc, operators, source_type_expr, target_type, restr, ref candidates);
}
}
}
@@ -1163,7 +1186,7 @@ namespace Mono.CSharp {
// Pass original source type to find the best match against input type and
// not the unwrapped expression
//
- s_x = FindMostSpecificSource (candidates, source.Type, source_type_expr, !implicitOnly);
+ s_x = FindMostSpecificSource (rc, candidates, source.Type, source_type_expr, !implicitOnly);
if (s_x == null)
return null;
@@ -1183,16 +1206,18 @@ namespace Mono.CSharp {
//
// Unless running in probing more
//
- if (!probingOnly) {
- MethodSpec ambig_arg = null;
+ if ((restr & UserConversionRestriction.ProbingOnly) == 0) {
+ MethodSpec ambig_arg = candidates [0];
+ most_specific_operator = candidates [1];
+ /*
foreach (var candidate in candidates) {
if (candidate.ReturnType == t_x)
most_specific_operator = candidate;
else if (candidate.Parameters.Types[0] == s_x)
ambig_arg = candidate;
}
-
- ec.Report.Error (457, loc,
+ */
+ rc.Report.Error (457, loc,
"Ambiguous user defined operators `{0}' and `{1}' when converting from `{2}' to `{3}'",
ambig_arg.GetSignatureForError (), most_specific_operator.GetSignatureForError (),
source.Type.GetSignatureForError (), target.GetSignatureForError ());
@@ -1208,21 +1233,21 @@ namespace Mono.CSharp {
if (s_x != source_type) {
var c = source as Constant;
if (c != null) {
- source = c.Reduce (ec, s_x);
+ source = c.Reduce (rc, s_x);
if (source == null)
c = null;
}
if (c == null) {
source = implicitOnly ?
- ImplicitConversionStandard (ec, source_type_expr, s_x, loc) :
- ExplicitConversionStandard (ec, source_type_expr, s_x, loc);
+ ImplicitConversionStandard (rc, source_type_expr, s_x, loc) :
+ ExplicitConversionStandard (rc, source_type_expr, s_x, loc);
}
} else {
source = source_type_expr;
}
- source = new UserCast (most_specific_operator, source, loc).Resolve (ec);
+ source = new UserCast (most_specific_operator, source, loc).Resolve (rc);
//
// Convert result type when it's different to best operator return type
@@ -1241,19 +1266,19 @@ namespace Mono.CSharp {
var unwrap = Nullable.Unwrap.CreateUnwrapped (source);
source = implicitOnly ?
- ImplicitConversionStandard (ec, unwrap, target_type, loc) :
- ExplicitConversionStandard (ec, unwrap, target_type, loc);
+ ImplicitConversionStandard (rc, unwrap, target_type, loc) :
+ ExplicitConversionStandard (rc, unwrap, target_type, loc);
if (source == null)
return null;
if (target.IsNullableType)
- source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (ec);
+ source = new Nullable.LiftedConversion (source, unwrap, target).Resolve (rc);
}
} else {
source = implicitOnly ?
- ImplicitConversionStandard (ec, source, target_type, loc) :
- ExplicitConversionStandard (ec, source, target_type, loc);
+ ImplicitConversionStandard (rc, source, target_type, loc) :
+ ExplicitConversionStandard (rc, source, target_type, loc);
if (source == null)
return null;
@@ -1266,7 +1291,7 @@ namespace Mono.CSharp {
// only non-nullable type we need to lift it manually
//
if (nullable_source && !s_x.IsNullableType)
- return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (ec);
+ return new Nullable.LiftedConversion (source, source_type_expr, target).Resolve (rc);
//
// Target is of nullable type but source type is not, wrap the result expression
@@ -2230,6 +2255,7 @@ namespace Mono.CSharp {
}
e = ExplicitUserConversion (ec, expr, target_type, loc);
+
if (e != null)
return e;
diff --git a/mcs/mcs/cs-parser.jay b/mcs/mcs/cs-parser.jay
index e81ba26d18c..a69e356668d 100644
--- a/mcs/mcs/cs-parser.jay
+++ b/mcs/mcs/cs-parser.jay
@@ -257,6 +257,7 @@ namespace Mono.CSharp
%token MAKEREF
%token ASYNC
%token AWAIT
+%token INTERR_OPERATOR
/* C# keywords which are not really keywords */
%token GET
@@ -923,6 +924,7 @@ class_member_declaration
| indexer_declaration
| operator_declaration
| constructor_declaration
+ | primary_constructor_body
| destructor_declaration
| type_declaration
| attributes_without_members
@@ -936,6 +938,33 @@ class_member_declaration
}
;
+primary_constructor_body
+ : OPEN_BRACE
+ {
+ current_local_parameters = current_type.PrimaryConstructorParameters;
+ if (current_local_parameters == null) {
+ report.Error (9010, GetLocation ($1), "Primary constructor body is not allowed");
+ current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
+ }
+
+ ++lexer.parsing_block;
+ start_block (GetLocation ($1));
+ }
+ opt_statement_list block_end
+ {
+ current_local_parameters = null;
+ var t = current_type as ClassOrStruct;
+ if (t != null) {
+ var b = (ToplevelBlock) $4;
+ if (t.PrimaryConstructorBlock != null) {
+ report.Error (8041, b.StartLocation, "Primary constructor already has a body");
+ } else {
+ t.PrimaryConstructorBlock = b;
+ }
+ }
+ }
+ ;
+
struct_declaration
: opt_attributes
opt_modifiers
@@ -1258,7 +1287,7 @@ method_declaration
// Was added earlier in the case of body being eof for full ast
}
- method_body
+ method_body_expression_block
{
Method method = (Method) $1;
method.Block = (ToplevelBlock) $3;
@@ -1413,11 +1442,36 @@ method_header
}
;
+method_body_expression_block
+ : method_body
+ | expression_block
+ ;
+
method_body
: block
| SEMICOLON { $$ = null; }
;
+expression_block
+ : ARROW
+ {
+ if (lang_version < LanguageVersion.V_6) {
+ FeatureIsNotAvailable (GetLocation ($1), "expression bodied members");
+ }
+
+ ++lexer.parsing_block;
+ start_block (GetLocation ($1));
+ }
+ expression SEMICOLON
+ {
+ lexer.parsing_block = 0;
+ current_block.AddStatement (new ContextualReturn ((Expression) $3));
+ var b = end_block (GetLocation ($4));
+ b.IsCompilerGenerated = true;
+ $$ = b;
+ }
+ ;
+
opt_formal_parameter_list
: /* empty */ { $$ = ParametersCompiled.EmptyReadOnlyParameters; }
| formal_parameter_list
@@ -1708,13 +1762,14 @@ arglist_modifier
report.Error (1669, GetLocation ($1), "__arglist is not valid in this context");
}
;
-
+
property_declaration
: opt_attributes
opt_modifiers
member_type
member_declaration_name
{
+ lexer.parsing_generic_declaration = false;
if (doc_support)
tmpComment = Lexer.consume_doc_comment ();
}
@@ -1742,10 +1797,67 @@ property_declaration
CLOSE_BRACE
{
lbag.AppendToMember (current_property, GetLocation ($10));
+ lexer.parsing_modifiers = true;
+ }
+ opt_property_initializer
+ {
current_property = null;
}
+ | opt_attributes
+ opt_modifiers
+ member_type
+ member_declaration_name
+ {
+ lexer.parsing_generic_declaration = false;
+ if (doc_support)
+ tmpComment = Lexer.consume_doc_comment ();
+ current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
+ }
+ expression_block
+ {
+ var type = (FullNamedExpression) $3;
+ var property = new Property (current_type, type, (Modifiers) $2,
+ (MemberName) $4, (Attributes) $1);
+
+ property.Get = new Property.GetMethod (property, Modifiers.COMPILER_GENERATED, null, property.Location);
+ property.Get.Block = (ToplevelBlock) $6;
+
+ if (current_container.Kind == MemberKind.Interface) {
+ report.Error (531, property.Get.Block.StartLocation,
+ "`{0}': interface members cannot have a definition", property.GetSignatureForError ());
+ }
+
+ if (type.Type != null && type.Type.Kind == MemberKind.Void)
+ report.Error (547, GetLocation ($3), "`{0}': property or indexer cannot have void type", property.GetSignatureForError ());
+
+ current_type.AddMember (property);
+
+ current_local_parameters = null;
+ }
;
+opt_property_initializer
+ : /* empty */
+ | ASSIGN
+ {
+ ++lexer.parsing_block;
+ current_local_parameters = ParametersCompiled.EmptyReadOnlyParameters;
+ start_block (GetLocation ($1));
+ }
+ property_initializer SEMICOLON
+ {
+ --lexer.parsing_block;
+ ((Property)current_property).Initializer = (Expression) $3;
+ lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($4));
+ end_block (GetLocation ($4));
+ current_local_parameters = null;
+ }
+ ;
+
+property_initializer
+ : expression
+ | array_initializer
+ ;
indexer_declaration
: opt_attributes opt_modifiers
@@ -1777,24 +1889,34 @@ indexer_declaration
}
lexer.PropertyParsing = true;
+ current_local_parameters = (ParametersCompiled) $7;
}
- OPEN_BRACE accessor_declarations
- {
- lexer.PropertyParsing = false;
- }
- CLOSE_BRACE
+ indexer_body
{
+ lexer.PropertyParsing = false;
+ current_local_parameters = null;
+
if (current_property.AccessorFirst != null && current_property.AccessorFirst.Block == null)
((Indexer) current_property).ParameterInfo.CheckParameters (current_property);
if (doc_support)
current_property.DocComment = ConsumeStoredComment ();
- lbag.AppendToMember (current_property, GetLocation ($10), GetLocation ($13));
current_property = null;
}
;
+indexer_body
+ : OPEN_BRACE accessor_declarations CLOSE_BRACE
+ {
+ lbag.AppendToMember (current_property, GetLocation ($1), GetLocation ($3));
+ }
+ | expression_block
+ {
+ current_property.Get = new Indexer.GetIndexerMethod (current_property, Modifiers.COMPILER_GENERATED, current_local_parameters, null, current_property.Location);
+ current_property.Get.Block = (ToplevelBlock) $1;
+ }
+ ;
accessor_declarations
: get_accessor_declaration
@@ -2017,7 +2139,7 @@ operator_declaration
: opt_attributes opt_modifiers operator_declarator
{
}
- operator_body
+ method_body_expression_block
{
OperatorDeclaration decl = (OperatorDeclaration) $3;
if (decl != null) {
@@ -2044,11 +2166,6 @@ operator_declaration
}
;
-operator_body
- : block
- | SEMICOLON { $$ = null; }
- ;
-
operator_type
: type_expression_or_array
| VOID
@@ -2062,6 +2179,8 @@ operator_declarator
: operator_type OPERATOR overloadable_operator OPEN_PARENS
{
valid_param_mod = ParameterModifierType.DefaultValue;
+ if ((Operator.OpType) $3 == Operator.OpType.Is)
+ valid_param_mod |= ParameterModifierType.Out;
}
opt_formal_parameter_list CLOSE_PARENS
{
@@ -2086,6 +2205,8 @@ operator_declarator
report.Error (1535, loc, "Overloaded unary operator `{0}' takes one parameter",
Operator.GetName (op));
}
+ } else if (op == Operator.OpType.Is) {
+ // TODO: Special checks for is operator
} else {
if (p_count == 1) {
report.Error (1019, loc, "Overloadable unary operator expected");
@@ -2132,6 +2253,13 @@ overloadable_operator
| OP_LT { $$ = Operator.OpType.LessThan; }
| OP_GE { $$ = Operator.OpType.GreaterThanOrEqual; }
| OP_LE { $$ = Operator.OpType.LessThanOrEqual; }
+ | IS
+ {
+ if (lang_version != LanguageVersion.Experimental)
+ FeatureIsNotAvailable (GetLocation ($1), "is user operator");
+
+ $$ = Operator.OpType.Is;
+ }
;
conversion_operator_declarator
@@ -2637,10 +2765,6 @@ opt_enum_base
: /* empty */
| COLON type
{
- var te = $2 as TypeExpression;
- if (te == null || !EnumSpec.IsValidUnderlyingType (te.Type)) {
- Enum.Error_1008 (GetLocation ($2), report);
- }
$$ = $2;
}
| COLON error
@@ -2788,6 +2912,14 @@ namespace_or_type_expr
$$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) $3, lt1.Location);
lbag.AddLocation ($$, GetLocation ($2));
}
+ | qualified_alias_member IDENTIFIER generic_dimension
+ {
+ var lt1 = (LocatedToken) $1;
+ var lt2 = (LocatedToken) $2;
+
+ $$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (int) $3, lt1.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
+ }
;
member_name
@@ -2798,6 +2930,12 @@ member_name
$$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location);
lbag.AddLocation ($$, GetLocation ($2));
}
+ | namespace_or_type_expr DOT IDENTIFIER generic_dimension
+ {
+ var lt = (LocatedToken) $3;
+ $$ = new MemberAccess ((Expression) $1, lt.Value, (int) $4, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
+ }
;
simple_name_expr
@@ -2806,8 +2944,13 @@ simple_name_expr
var lt = (LocatedToken) $1;
$$ = new SimpleName (lt.Value, (TypeArguments)$2, lt.Location);
}
+ | IDENTIFIER generic_dimension
+ {
+ var lt = (LocatedToken) $1;
+ $$ = new SimpleName (lt.Value, (int) $2, lt.Location);
+ }
;
-
+
//
// Generics arguments (any type, without attributes)
//
@@ -2982,29 +3125,21 @@ member_type
//
type
: type_expression_or_array
- | VOID
- {
- Expression.Error_VoidInvalidInTheContext (GetLocation ($1), report);
- $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1));
- }
+ | void_invalid
;
simple_type
: type_expression
- | VOID
- {
- Expression.Error_VoidInvalidInTheContext (GetLocation ($1), report);
- $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1));
- }
+ | void_invalid
;
parameter_type
: type_expression_or_array
| VOID
{
- report.Error (1536, GetLocation ($1), "Invalid parameter type `void'");
+ report.Error (1536, GetLocation ($1), "Invalid parameter type `void'");
$$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1));
- }
+ }
;
type_expression_or_array
@@ -3032,7 +3167,19 @@ type_expression
{
$$ = new ComposedCast ((ATypeNameExpression) $1, (ComposedTypeSpecifier) $2);
}
- | builtin_types opt_nullable
+ | builtin_type_expression
+ ;
+
+void_invalid
+ : VOID
+ {
+ Expression.Error_VoidInvalidInTheContext (GetLocation ($1), report);
+ $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1));
+ }
+ ;
+
+builtin_type_expression
+ : builtin_types opt_nullable
{
if ($2 != null)
$$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
@@ -3104,7 +3251,7 @@ integral_type
primary_expression
- : primary_expression_or_type
+ : type_name_expression
| literal
| array_creation_expression
| parenthesized_expression
@@ -3126,12 +3273,8 @@ primary_expression
| undocumented_expressions
;
-primary_expression_or_type
- : IDENTIFIER opt_type_argument_list
- {
- var lt = (LocatedToken) $1;
- $$ = new SimpleName (lt.Value, (TypeArguments)$2, lt.Location);
- }
+type_name_expression
+ : simple_name_expr
| IDENTIFIER GENERATE_COMPLETION {
var lt = (LocatedToken) $1;
$$ = new CompletionSimpleName (MemberName.MakeName (lt.Value, null), lt.Location);
@@ -3182,7 +3325,7 @@ parenthesized_expression
$$ = new ParenthesizedExpression ((Expression) $2, GetLocation ($1));
}
;
-
+
member_access
: primary_expression DOT identifier_inside_body opt_type_argument_list
{
@@ -3190,6 +3333,21 @@ member_access
$$ = new MemberAccess ((Expression) $1, lt.Value, (TypeArguments) $4, lt.Location);
lbag.AddLocation ($$, GetLocation ($2));
}
+ | primary_expression DOT identifier_inside_body generic_dimension
+ {
+ var lt = (LocatedToken) $3;
+ $$ = new MemberAccess ((Expression) $1, lt.Value, (int) $4, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
+ }
+ | primary_expression INTERR_OPERATOR DOT identifier_inside_body opt_type_argument_list
+ {
+ if (lang_version < LanguageVersion.V_6)
+ FeatureIsNotAvailable (GetLocation ($2), "null propagating operator");
+
+ var lt = (LocatedToken) $4;
+ $$ = new ConditionalMemberAccess ((Expression) $1, lt.Value, (TypeArguments) $5, lt.Location);
+ lbag.AddLocation ($$, GetLocation ($2), GetLocation ($3));
+ }
| builtin_types DOT identifier_inside_body opt_type_argument_list
{
var lt = (LocatedToken) $3;
@@ -3216,6 +3374,14 @@ member_access
$$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (TypeArguments) $3, lt1.Location);
lbag.AddLocation ($$, GetLocation ($2));
}
+ | qualified_alias_member identifier_inside_body generic_dimension
+ {
+ var lt1 = (LocatedToken) $1;
+ var lt2 = (LocatedToken) $2;
+
+ $$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (int) $3, lt1.Location);
+ lbag.AddLocation ($$, GetLocation ($2));
+ }
| primary_expression DOT GENERATE_COMPLETION {
$$ = new CompletionMemberAccess ((Expression) $1, null,GetLocation ($3));
}
@@ -3335,7 +3501,15 @@ member_initializer
else
$$ = new CollectionElementInitializer ((List<Expression>)$2, GetLocation ($1));
- lbag.AddLocation ($$, GetLocation ($2));
+ lbag.AddLocation ($$, GetLocation ($3));
+ }
+ | OPEN_BRACKET_EXPR expression_list CLOSE_BRACKET ASSIGN initializer_value
+ {
+ if (lang_version < LanguageVersion.V_6)
+ FeatureIsNotAvailable (GetLocation ($1), "dictionary initializer");
+
+ $$ = new DictionaryElementInitializer ((List<Expression>)$2, (Expression) $5, GetLocation ($1));
+ lbag.AddLocation ($$, GetLocation ($3), GetLocation ($4));
}
| OPEN_BRACE CLOSE_BRACE
{
@@ -3445,6 +3619,17 @@ element_access
$$ = new ElementAccess ((Expression) $1, (Arguments) $3, GetLocation ($2));
lbag.AddLocation ($$, GetLocation ($4));
}
+ | primary_expression INTERR_OPERATOR OPEN_BRACKET_EXPR expression_list_arguments CLOSE_BRACKET
+ {
+ if (lang_version < LanguageVersion.V_6)
+ FeatureIsNotAvailable (GetLocation ($2), "null propagating operator");
+
+ $$ = new ElementAccess ((Expression) $1, (Arguments) $4, GetLocation ($3)) {
+ ConditionalAccess = true
+ };
+
+ lbag.AddLocation ($$, GetLocation ($2), GetLocation ($5));
+ }
| primary_expression OPEN_BRACKET_EXPR expression_list_arguments error
{
Error_SyntaxError (yyToken);
@@ -3766,65 +3951,21 @@ variable_initializer_list
;
typeof_expression
- : TYPEOF
- {
- lexer.TypeOfParsing = true;
- }
- open_parens_any typeof_type_expression CLOSE_PARENS
+ : TYPEOF open_parens_any typeof_type_expression CLOSE_PARENS
{
- lexer.TypeOfParsing = false;
- $$ = new TypeOf ((FullNamedExpression) $4, GetLocation ($1));
- lbag.AddLocation ($$, GetLocation ($3), GetLocation ($5));
+ $$ = new TypeOf ((FullNamedExpression) $3, GetLocation ($1));
+ lbag.AddLocation ($$, GetLocation ($2), GetLocation ($4));
}
;
typeof_type_expression
: type_and_void
- | unbound_type_name
| error
{
Error_TypeExpected (lexer.Location);
$$ = null;
}
;
-
-unbound_type_name
- : identifier_inside_body generic_dimension
- {
- var lt = (LocatedToken) $1;
-
- $$ = new SimpleName (lt.Value, (int) $2, lt.Location);
- }
- | qualified_alias_member identifier_inside_body generic_dimension
- {
- var lt1 = (LocatedToken) $1;
- var lt2 = (LocatedToken) $2;
-
- $$ = new QualifiedAliasMember (lt1.Value, lt2.Value, (int) $3, lt1.Location);
- lbag.AddLocation ($$, GetLocation ($2));
- }
- | unbound_type_name DOT identifier_inside_body
- {
- var lt = (LocatedToken) $3;
-
- $$ = new MemberAccess ((Expression) $1, lt.Value, lt.Location);
- }
- | unbound_type_name DOT identifier_inside_body generic_dimension
- {
- var lt = (LocatedToken) $3;
-
- $$ = new MemberAccess ((Expression) $1, lt.Value, (int) $4, lt.Location);
- }
- | namespace_or_type_expr DOT identifier_inside_body generic_dimension
- {
- var tne = (ATypeNameExpression) $1;
- if (tne.HasTypeArguments)
- Error_TypeExpected (GetLocation ($4));
-
- var lt = (LocatedToken) $3;
- $$ = new MemberAccess (tne, lt.Value, (int) $4, lt.Location);
- }
- ;
generic_dimension
: GENERIC_DIMENSION
@@ -4132,15 +4273,7 @@ additive_expression
$$ = new Binary (Binary.Operator.Subtraction, (Expression) $1, (Expression) $3);
lbag.AddLocation ($$, GetLocation ($2));
}
- | additive_expression AS type
- {
- $$ = new As ((Expression) $1, (Expression) $3, GetLocation ($2));
- }
- | additive_expression IS type
- {
- $$ = new Is ((Expression) $1, (Expression) $3, GetLocation ($2));
- }
- | additive_expression PLUS error
+ | additive_expression PLUS error
{
Error_SyntaxError (yyToken);
@@ -4154,6 +4287,32 @@ additive_expression
$$ = new Binary (Binary.Operator.Subtraction, (Expression) $1, null);
lbag.AddLocation ($$, GetLocation ($2));
}
+ | additive_expression AS type
+ {
+ $$ = new As ((Expression) $1, (Expression) $3, GetLocation ($2));
+ }
+ | additive_expression IS pattern_type_expr opt_identifier
+ {
+ var is_expr = new Is ((Expression) $1, (Expression) $3, GetLocation ($2));
+ if ($4 != null) {
+ if (lang_version != LanguageVersion.Experimental)
+ FeatureIsNotAvailable (GetLocation ($4), "type pattern matching");
+
+ var lt = (LocatedToken) $4;
+ is_expr.Variable = new LocalVariable (current_block, lt.Value, lt.Location);
+ current_block.AddLocalName (is_expr.Variable);
+ }
+
+ $$ = is_expr;
+ }
+ | additive_expression IS pattern_expr
+ {
+ var is_expr = new Is ((Expression) $1, (Expression) $3, GetLocation ($2));
+ if (lang_version != LanguageVersion.Experimental)
+ FeatureIsNotAvailable (GetLocation ($2), "pattern matching");
+
+ $$ = is_expr;
+ }
| additive_expression AS error
{
Error_SyntaxError (yyToken);
@@ -4178,6 +4337,117 @@ additive_expression
}
;
+pattern_type_expr
+ : variable_type
+ ;
+
+pattern_expr
+ : literal
+ | PLUS prefixed_unary_expression
+ {
+ $$ = new Unary (Unary.Operator.UnaryPlus, (Expression) $2, GetLocation ($1));
+ }
+ | MINUS prefixed_unary_expression
+ {
+ $$ = new Unary (Unary.Operator.UnaryNegation, (Expression) $2, GetLocation ($1));
+ }
+ | sizeof_expression
+ | default_value_expression
+ | STAR
+ {
+ $$ = new WildcardPattern (GetLocation ($1));
+ }
+ | pattern_expr_invocation
+ | pattern_property
+ ;
+
+pattern_expr_invocation
+ : type_name_expression OPEN_PARENS opt_pattern_list CLOSE_PARENS
+ {
+ $$ = new RecursivePattern ((ATypeNameExpression) $1, (Arguments) $3, GetLocation ($2));
+ }
+ ;
+
+pattern_property
+ : type_name_expression OPEN_BRACE pattern_property_list CLOSE_BRACE
+ {
+ $$ = new PropertyPattern ((ATypeNameExpression) $1, (List<PropertyPatternMember>) $3, GetLocation ($2));
+ }
+ ;
+
+pattern_property_list
+ : pattern_property_entry
+ {
+ var list = new List<PropertyPatternMember> ();
+ list.Add ((PropertyPatternMember) $1);
+ $$ = list;
+ }
+ | pattern_property_list COMMA pattern_property_entry
+ {
+ var list = (List<PropertyPatternMember>) $1;
+ list.Add ((PropertyPatternMember) $3);
+ $$ = list;
+ }
+ ;
+
+pattern_property_entry
+ : identifier_inside_body IS pattern
+ {
+ var lt = (LocatedToken) $1;
+ $$ = new PropertyPatternMember (lt.Value, (Expression) $3, lt.Location);
+ }
+ ;
+
+pattern
+ : pattern_expr
+ | pattern_type_expr opt_identifier
+ {
+ if ($2 != null) {
+ var lt = (LocatedToken) $2;
+ var variable = new LocalVariable (current_block, lt.Value, lt.Location);
+ current_block.AddLocalName (variable);
+ }
+ }
+ ;
+
+opt_pattern_list
+ : /* empty */
+ {
+ $$ = new Arguments (0);
+ }
+ | pattern_list
+ ;
+
+pattern_list
+ : pattern_argument
+ {
+ Arguments args = new Arguments (4);
+ args.Add ((Argument) $1);
+ $$ = args;
+ }
+ | pattern_list COMMA pattern_argument
+ {
+ Arguments args = (Arguments) $1;
+ if (args [args.Count - 1] is NamedArgument && !($3 is NamedArgument))
+ Error_NamedArgumentExpected ((NamedArgument) args [args.Count - 1]);
+
+ args.Add ((Argument) $3);
+ $$ = args;
+ }
+ ;
+
+pattern_argument
+ : pattern
+ {
+ $$ = new Argument ((Expression) $1);
+ }
+ | IDENTIFIER COLON pattern
+ {
+ var lt = (LocatedToken) $1;
+ $$ = new NamedArgument (lt.Value, lt.Location, (Expression) $3);
+ }
+ ;
+
shift_expression
: additive_expression
| shift_expression OP_SHIFT_LEFT additive_expression
@@ -4676,6 +4946,9 @@ primary_parameters
// Cannot use opt_formal_parameter_list because it can be shared instance for empty parameters
lbag.AppendToMember (current_container, GetLocation ($1), GetLocation ($3));
+
+ if (lang_version < LanguageVersion.V_6)
+ FeatureIsNotAvailable (GetLocation ($1), "primary constructor");
}
;
@@ -4692,14 +4965,19 @@ opt_primary_parameters_with_class_base
{
$$ = $1;
}
+ | primary_parameters class_base
+ {
+ $$ = $1;
+ }
| primary_parameters class_base OPEN_PARENS
{
++lexer.parsing_block;
+ current_type.PrimaryConstructorBaseArgumentsStart = GetLocation ($3);
}
opt_argument_list CLOSE_PARENS
{
- lbag.AppendToMember (current_container, GetLocation ($3), GetLocation ($6));
- ((Class)current_type).PrimaryConstructorBaseArguments = (Arguments) $5;
+ lbag.AppendToMember (current_container, GetLocation ($6));
+ current_type.PrimaryConstructorBaseArguments = (Arguments) $5;
--lexer.parsing_block;
$$ = $1;
@@ -5226,7 +5504,7 @@ variable_type
* > The expressions are converted into types during semantic analysis.
*/
variable_type_simple
- : primary_expression_or_type opt_nullable
+ : type_name_expression opt_nullable
{
// Ok, the above "primary_expression" is there to get rid of
// both reduce/reduce and shift/reduces in the grammar, it should
@@ -5242,51 +5520,23 @@ variable_type_simple
// SimpleName is when you have
// Blah i;
- Expression expr = (Expression) $1;
+ var expr = (ATypeNameExpression) $1;
if ($2 == null) {
- SimpleName sn = expr as SimpleName;
- if (sn != null && sn.Name == "var")
- $$ = new VarExpr (sn.Location);
+ if (expr.Name == "var" && expr is SimpleName)
+ $$ = new VarExpr (expr.Location);
else
$$ = $1;
- } else if (expr is ATypeNameExpression) {
- $$ = new ComposedCast ((ATypeNameExpression)expr, (ComposedTypeSpecifier) $2);
} else {
- Error_ExpectingTypeName (expr);
- $$ = null;
- }
- }
- | primary_expression_or_type pointer_stars
- {
- ATypeNameExpression expr = $1 as ATypeNameExpression;
-
- if (expr != null) {
$$ = new ComposedCast (expr, (ComposedTypeSpecifier) $2);
- } else {
- Error_ExpectingTypeName ((Expression)$1);
- $$ = expr;
}
}
- | builtin_types opt_nullable
+ | type_name_expression pointer_stars
{
- if ($2 == null)
- $$ = $1;
- else
- $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
- }
- | builtin_types pointer_stars
- {
- $$ = new ComposedCast ((FullNamedExpression) $1, (ComposedTypeSpecifier) $2);
- }
- | VOID pointer_stars
- {
- $$ = new ComposedCast (new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1)), (ComposedTypeSpecifier) $2);
- }
- | VOID
- {
- Expression.Error_VoidInvalidInTheContext (GetLocation ($1), report);
- $$ = new TypeExpression (compiler.BuiltinTypes.Void, GetLocation ($1));
+ var expr = (ATypeNameExpression) $1;
+ $$ = new ComposedCast (expr, (ComposedTypeSpecifier) $2);
}
+ | builtin_type_expression
+ | void_invalid
;
pointer_stars
@@ -5603,6 +5853,16 @@ switch_label
Error_SyntaxError (yyToken);
$$ = new SwitchLabel ((Expression) $2, GetLocation ($1));
}
+ | CASE pattern_expr_invocation COLON
+ {
+ if (lang_version != LanguageVersion.Experimental)
+ FeatureIsNotAvailable (GetLocation ($2), "pattern matching");
+
+ $$ = new SwitchLabel ((Expression) $2, GetLocation ($1)) {
+ PatternMatching = true
+ };
+ lbag.AddLocation ($$, GetLocation ($3));
+ }
| DEFAULT_COLON
{
$$ = new SwitchLabel (null, GetLocation ($1));
@@ -7752,6 +8012,7 @@ static string GetTokenName (int token)
case Token.OP_AND_ASSIGN:
case Token.OP_XOR_ASSIGN:
case Token.OP_OR_ASSIGN:
+ case Token.INTERR_OPERATOR:
return "<operator>";
case Token.BOOL:
diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs
index 68ddff9873c..2147c145e6c 100644
--- a/mcs/mcs/cs-tokenizer.cs
+++ b/mcs/mcs/cs-tokenizer.cs
@@ -202,7 +202,6 @@ namespace Mono.CSharp
bool handle_get_set = false;
bool handle_remove_add = false;
bool handle_where;
- bool handle_typeof = false;
bool lambda_arguments_parsing;
List<Location> escaped_identifiers;
int parsing_generic_less_than;
@@ -320,11 +319,6 @@ namespace Mono.CSharp
get { return handle_where; }
set { handle_where = value; }
}
-
- public bool TypeOfParsing {
- get { return handle_typeof; }
- set { handle_typeof = value; }
- }
public XmlCommentState doc_state {
get { return xml_doc_state; }
@@ -729,6 +723,7 @@ namespace Mono.CSharp
case Token.BYTE:
case Token.CHAR:
case Token.DECIMAL:
+ case Token.DOUBLE:
case Token.FLOAT:
case Token.LONG:
case Token.OBJECT:
@@ -1144,7 +1139,7 @@ namespace Mono.CSharp
return true;
}
- bool parse_less_than ()
+ bool parse_less_than (ref int genericDimension)
{
start:
int the_token = token ();
@@ -1181,10 +1176,23 @@ namespace Mono.CSharp
case Token.VOID:
break;
case Token.OP_GENERICS_GT:
+ genericDimension = 1;
+ return true;
case Token.IN:
case Token.OUT:
return true;
+ case Token.COMMA:
+ do {
+ ++genericDimension;
+ the_token = token ();
+ } while (the_token == Token.COMMA);
+ if (the_token == Token.OP_GENERICS_GT) {
+ ++genericDimension;
+ return true;
+ }
+
+ return false;
default:
return false;
}
@@ -1198,7 +1206,7 @@ namespace Mono.CSharp
else if (the_token == Token.INTERR_NULLABLE || the_token == Token.STAR)
goto again;
else if (the_token == Token.OP_GENERICS_LT) {
- if (!parse_less_than ())
+ if (!parse_less_than (ref genericDimension))
return false;
goto again;
} else if (the_token == Token.OPEN_BRACKET) {
@@ -1214,22 +1222,6 @@ namespace Mono.CSharp
return false;
}
- bool parse_generic_dimension (out int dimension)
- {
- dimension = 1;
-
- again:
- int the_token = token ();
- if (the_token == Token.OP_GENERICS_GT)
- return true;
- else if (the_token == Token.COMMA) {
- dimension++;
- goto again;
- }
-
- return false;
- }
-
public int peek_token ()
{
int the_token;
@@ -1260,13 +1252,8 @@ namespace Mono.CSharp
return Token.OP_COALESCING;
}
- switch (current_token) {
- case Token.CLOSE_PARENS:
- case Token.TRUE:
- case Token.FALSE:
- case Token.NULL:
- case Token.LITERAL:
- return Token.INTERR;
+ if (d == '.') {
+ return Token.INTERR_OPERATOR;
}
if (d != ' ') {
@@ -1279,7 +1266,15 @@ namespace Mono.CSharp
PushPosition ();
current_token = Token.NONE;
int next_token;
- switch (xtoken ()) {
+ int parens = 0;
+ int generics = 0;
+
+ var nt = xtoken ();
+ switch (nt) {
+ case Token.DOT:
+ case Token.OPEN_BRACKET_EXPR:
+ next_token = Token.INTERR_OPERATOR;
+ break;
case Token.LITERAL:
case Token.TRUE:
case Token.FALSE:
@@ -1299,7 +1294,21 @@ namespace Mono.CSharp
case Token.COLON:
next_token = Token.INTERR_NULLABLE;
break;
-
+
+ case Token.OPEN_PARENS:
+ case Token.OPEN_PARENS_CAST:
+ case Token.OPEN_PARENS_LAMBDA:
+ next_token = -1;
+ ++parens;
+ break;
+
+ case Token.OP_GENERICS_LT:
+ case Token.OP_GENERICS_LT_DECL:
+ case Token.GENERIC_DIMENSION:
+ next_token = -1;
+ ++generics;
+ break;
+
default:
next_token = -1;
break;
@@ -1310,21 +1319,36 @@ namespace Mono.CSharp
case Token.COMMA:
case Token.SEMICOLON:
case Token.OPEN_BRACE:
- case Token.CLOSE_PARENS:
case Token.IN:
next_token = Token.INTERR_NULLABLE;
break;
case Token.COLON:
next_token = Token.INTERR;
- break;
-
+ break;
+
+ case Token.OPEN_PARENS:
+ case Token.OPEN_PARENS_CAST:
+ case Token.OPEN_PARENS_LAMBDA:
+ ++parens;
+ goto default;
+
+ case Token.CLOSE_PARENS:
+ --parens;
+ goto default;
+
+ case Token.OP_GENERICS_LT:
+ case Token.OP_GENERICS_LT_DECL:
+ case Token.GENERIC_DIMENSION:
+ ++generics;
+ goto default;
+
default:
int ntoken;
int interrs = 1;
int colons = 0;
int braces = 0;
- int parens = 0;
+ int brackets = 0;
//
// All shorcuts failed, do it hard way
//
@@ -1341,10 +1365,35 @@ namespace Mono.CSharp
case Token.CLOSE_BRACE:
--braces;
continue;
+ case Token.OP_GENERICS_LT:
+ case Token.OP_GENERICS_LT_DECL:
+ case Token.GENERIC_DIMENSION:
+ ++generics;
+ continue;
+ case Token.OPEN_BRACKET:
+ case Token.OPEN_BRACKET_EXPR:
+ ++brackets;
+ continue;
+ case Token.CLOSE_BRACKET:
+ --brackets;
+ continue;
case Token.CLOSE_PARENS:
- if (parens > 0)
+ if (parens > 0) {
--parens;
- continue;
+ continue;
+ }
+
+ PopPosition ();
+ return Token.INTERR_NULLABLE;
+
+ case Token.OP_GENERICS_GT:
+ if (generics > 0) {
+ --generics;
+ continue;
+ }
+
+ PopPosition ();
+ return Token.INTERR_NULLABLE;
}
if (braces != 0)
@@ -1355,6 +1404,14 @@ namespace Mono.CSharp
if (parens != 0)
continue;
+
+ if (ntoken == Token.COMMA) {
+ if (generics != 0 || brackets != 0)
+ continue;
+
+ PopPosition ();
+ return Token.INTERR_NULLABLE;
+ }
if (ntoken == Token.COLON) {
if (++colons == interrs)
@@ -3651,22 +3708,20 @@ namespace Mono.CSharp
int TokenizeLessThan ()
{
int d;
- if (handle_typeof) {
- PushPosition ();
- if (parse_generic_dimension (out d)) {
- val = d;
- DiscardPosition ();
- return Token.GENERIC_DIMENSION;
- }
- PopPosition ();
- }
// Save current position and parse next token.
PushPosition ();
- if (parse_less_than ()) {
+ int generic_dimension = 0;
+ if (parse_less_than (ref generic_dimension)) {
if (parsing_generic_declaration && (parsing_generic_declaration_doc || token () != Token.DOT)) {
d = Token.OP_GENERICS_LT_DECL;
} else {
+ if (generic_dimension > 0) {
+ val = generic_dimension;
+ DiscardPosition ();
+ return Token.GENERIC_DIMENSION;
+ }
+
d = Token.OP_GENERICS_LT;
}
PopPosition ();
diff --git a/mcs/mcs/delegate.cs b/mcs/mcs/delegate.cs
index 7632a6128fd..0dd759823f1 100644
--- a/mcs/mcs/delegate.cs
+++ b/mcs/mcs/delegate.cs
@@ -439,6 +439,7 @@ namespace Mono.CSharp {
//
public abstract class DelegateCreation : Expression, OverloadResolver.IErrorHandler
{
+ bool conditional_access_receiver;
protected MethodSpec constructor_method;
protected MethodGroupExpr method_group;
@@ -507,8 +508,19 @@ namespace Mono.CSharp {
var invoke_method = Delegate.GetInvokeMethod (type);
+ if (!ec.HasSet (ResolveContext.Options.ConditionalAccessReceiver)) {
+ if (method_group.HasConditionalAccess ()) {
+ conditional_access_receiver = true;
+ ec.Set (ResolveContext.Options.ConditionalAccessReceiver);
+ }
+ }
+
Arguments arguments = CreateDelegateMethodArguments (ec, invoke_method.Parameters, invoke_method.Parameters.Types, loc);
method_group = method_group.OverloadResolve (ec, ref arguments, this, OverloadResolver.Restrictions.CovariantDelegate);
+
+ if (conditional_access_receiver)
+ ec.With (ResolveContext.Options.ConditionalAccessReceiver, false);
+
if (method_group == null)
return null;
@@ -564,10 +576,15 @@ namespace Mono.CSharp {
public override void Emit (EmitContext ec)
{
- if (method_group.InstanceExpression == null)
+ if (conditional_access_receiver)
+ ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ());
+
+ if (method_group.InstanceExpression == null) {
ec.EmitNull ();
- else
- method_group.InstanceExpression.Emit (ec);
+ } else {
+ var ie = new InstanceEmitter (method_group.InstanceExpression, false);
+ ie.Emit (ec, method_group.ConditionalAccess);
+ }
var delegate_method = method_group.BestCandidate;
@@ -580,11 +597,18 @@ namespace Mono.CSharp {
}
ec.Emit (OpCodes.Newobj, constructor_method);
+
+ if (conditional_access_receiver)
+ ec.CloseConditionalAccess (null);
}
- public override void FlowAnalysis (FlowAnalysisContext fc) {
+ public override void FlowAnalysis (FlowAnalysisContext fc)
+ {
base.FlowAnalysis (fc);
method_group.FlowAnalysis (fc);
+
+ if (conditional_access_receiver)
+ fc.ConditionalAccessEnd ();
}
void Error_ConversionFailed (ResolveContext ec, MethodSpec method, Expression return_type)
@@ -830,13 +854,15 @@ namespace Mono.CSharp {
class DelegateInvocation : ExpressionStatement
{
readonly Expression InstanceExpr;
+ readonly bool conditionalAccessReceiver;
Arguments arguments;
MethodSpec method;
- public DelegateInvocation (Expression instance_expr, Arguments args, Location loc)
+ public DelegateInvocation (Expression instance_expr, Arguments args, bool conditionalAccessReceiver, Location loc)
{
this.InstanceExpr = instance_expr;
this.arguments = args;
+ this.conditionalAccessReceiver = conditionalAccessReceiver;
this.loc = loc;
}
@@ -877,29 +903,45 @@ namespace Mono.CSharp {
return null;
type = method.ReturnType;
+ if (conditionalAccessReceiver)
+ type = LiftMemberType (ec, type);
+
eclass = ExprClass.Value;
return this;
}
public override void Emit (EmitContext ec)
{
+ if (conditionalAccessReceiver) {
+ ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ());
+ }
+
//
// Invocation on delegates call the virtual Invoke member
// so we are always `instance' calls
//
var call = new CallEmitter ();
call.InstanceExpression = InstanceExpr;
- call.EmitPredefined (ec, method, arguments, loc);
+ call.Emit (ec, method, arguments, loc);
+
+ if (conditionalAccessReceiver)
+ ec.CloseConditionalAccess (type.IsNullableType && type != method.ReturnType ? type : null);
}
public override void EmitStatement (EmitContext ec)
{
- Emit (ec);
- //
- // Pop the return value if there is one
- //
- if (type.Kind != MemberKind.Void)
- ec.Emit (OpCodes.Pop);
+ if (conditionalAccessReceiver) {
+ ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ()) {
+ Statement = true
+ };
+ }
+
+ var call = new CallEmitter ();
+ call.InstanceExpression = InstanceExpr;
+ call.EmitStatement (ec, method, arguments, loc);
+
+ if (conditionalAccessReceiver)
+ ec.CloseConditionalAccess (null);
}
public override System.Linq.Expressions.Expression MakeExpression (BuilderContext ctx)
diff --git a/mcs/mcs/dynamic.cs b/mcs/mcs/dynamic.cs
index 939984e5c6b..5604a3fcdc9 100644
--- a/mcs/mcs/dynamic.cs
+++ b/mcs/mcs/dynamic.cs
@@ -48,7 +48,7 @@ namespace Mono.CSharp
this.loc = loc;
}
- public override TypeSpec ResolveAsType (IMemberContext ec)
+ public override TypeSpec ResolveAsType (IMemberContext ec, bool allowUnboundTypeArguments)
{
eclass = ExprClass.Type;
type = ec.Module.Compiler.BuiltinTypes.Dynamic;
@@ -534,7 +534,7 @@ namespace Mono.CSharp
}
}
- Expression target = new DelegateInvocation (new MemberAccess (site_field_expr, "Target", loc).Resolve (bc), args, loc).Resolve (bc);
+ Expression target = new DelegateInvocation (new MemberAccess (site_field_expr, "Target", loc).Resolve (bc), args, false, loc).Resolve (bc);
if (target != null)
target.Emit (ec);
}
diff --git a/mcs/mcs/ecore.cs b/mcs/mcs/ecore.cs
index 8b0034a9f9b..ee0fce56191 100644
--- a/mcs/mcs/ecore.cs
+++ b/mcs/mcs/ecore.cs
@@ -228,12 +228,12 @@ namespace Mono.CSharp {
// This is used if the expression should be resolved as a type or namespace name.
// the default implementation fails.
//
- public virtual TypeSpec ResolveAsType (IMemberContext mc)
+ public virtual TypeSpec ResolveAsType (IMemberContext mc, bool allowUnboundTypeArguments = false)
{
- ResolveContext ec = new ResolveContext (mc);
- Expression e = Resolve (ec);
+ var rc = mc as ResolveContext ?? new ResolveContext (mc);
+ Expression e = Resolve (rc);
if (e != null)
- e.Error_UnexpectedKind (ec, ResolveFlags.Type, loc);
+ e.Error_UnexpectedKind (rc, ResolveFlags.Type, loc);
return null;
}
@@ -429,6 +429,50 @@ namespace Mono.CSharp {
{
return type.GetDefinition ().GetSignatureForError ();
}
+
+ public static bool IsNeverNull (Expression expr)
+ {
+ if (expr is This || expr is New || expr is ArrayCreation || expr is DelegateCreation || expr is ConditionalMemberAccess)
+ return true;
+
+ var c = expr as Constant;
+ if (c != null)
+ return !c.IsNull;
+
+ var tc = expr as TypeCast;
+ if (tc != null)
+ return IsNeverNull (tc.Child);
+
+ return false;
+ }
+
+ protected static bool IsNullPropagatingValid (TypeSpec type)
+ {
+ switch (type.Kind) {
+ case MemberKind.Struct:
+ return type.IsNullableType;
+ case MemberKind.Enum:
+ case MemberKind.Void:
+ case MemberKind.PointerType:
+ return false;
+ case MemberKind.InternalCompilerType:
+ return type.BuiltinType == BuiltinTypeSpec.Type.Dynamic;
+ default:
+ return true;
+ }
+ }
+
+ public virtual bool HasConditionalAccess ()
+ {
+ return false;
+ }
+
+ protected static TypeSpec LiftMemberType (ResolveContext rc, TypeSpec type)
+ {
+ return TypeSpec.IsValueType (type) && !type.IsNullableType ?
+ Nullable.NullableInfo.MakeType (rc.Module, type) :
+ type;
+ }
/// <summary>
/// Resolves an expression and performs semantic analysis on it.
@@ -726,6 +770,9 @@ namespace Mono.CSharp {
break;
case MemberKind.MissingType:
case MemberKind.InternalCompilerType:
+// LAMESPEC: dynamic is not really object
+// if (type.BuiltinType == BuiltinTypeSpec.Type.Object)
+// goto default;
break;
default:
rc.Report.SymbolRelatedToPreviousError (type);
@@ -751,7 +798,10 @@ namespace Mono.CSharp {
None = 0,
InvocableOnly = 1,
ExactArity = 1 << 2,
- ReadAccess = 1 << 3
+ ReadAccess = 1 << 3,
+ EmptyArguments = 1 << 4,
+ IgnoreArity = 1 << 5,
+ IgnoreAmbiguity = 1 << 6
}
//
@@ -845,7 +895,7 @@ namespace Mono.CSharp {
}
if (non_method != null) {
- if (ambig_non_method != null && rc != null) {
+ if (ambig_non_method != null && rc != null && (restrictions & MemberLookupRestrictions.IgnoreAmbiguity) == 0) {
var report = rc.Module.Compiler.Report;
report.SymbolRelatedToPreviousError (non_method);
report.SymbolRelatedToPreviousError (ambig_non_method);
@@ -936,10 +986,25 @@ namespace Mono.CSharp {
ec.Report.Error (1944, loc, "An expression tree cannot contain an unsafe pointer operation");
}
+ protected void Error_NullShortCircuitInsideExpressionTree (ResolveContext rc)
+ {
+ rc.Report.Error (8072, loc, "An expression tree cannot contain a null propagating operator");
+ }
+
public virtual void FlowAnalysis (FlowAnalysisContext fc)
{
}
+ //
+ // Special version of flow analysis for expressions which can return different
+ // on-true and on-false result. Used by &&, ||, ?: expressions
+ //
+ public virtual void FlowAnalysisConditional (FlowAnalysisContext fc)
+ {
+ FlowAnalysis (fc);
+ fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
+ }
+
/// <summary>
/// Returns an expression that can be used to invoke operator true
/// on the expression if it exists.
@@ -2476,6 +2541,11 @@ namespace Mono.CSharp {
(targs == null || targs.Equals (atne.targs));
}
+ protected void Error_OpenGenericTypeIsNotAllowed (IMemberContext mc)
+ {
+ mc.Module.Compiler.Report.Error (7003, Location, "Unbound generic name is not valid in this context");
+ }
+
public override int GetHashCode ()
{
return Name.GetHashCode ();
@@ -2548,6 +2618,11 @@ namespace Mono.CSharp {
return SimpleNameResolve (ec, right_side);
}
+ public void Error_NameDoesNotExist (ResolveContext rc)
+ {
+ rc.Report.Error (103, loc, "The name `{0}' does not exist in the current context", Name);
+ }
+
protected virtual void Error_TypeOrNamespaceNotFound (IMemberContext ctx)
{
if (ctx.CurrentType != null) {
@@ -2592,7 +2667,7 @@ namespace Mono.CSharp {
}
}
- public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc)
+ public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc, bool allowUnboundTypeArguments)
{
FullNamedExpression fne = mc.LookupNamespaceOrType (Name, Arity, LookupMode.Normal, loc);
@@ -2606,6 +2681,9 @@ namespace Mono.CSharp {
return ct;
}
+ if (!allowUnboundTypeArguments)
+ Error_OpenGenericTypeIsNotAllowed (mc);
+
return new GenericOpenTypeExpr (fne.Type, loc);
}
@@ -2756,10 +2834,22 @@ namespace Mono.CSharp {
rc.Report.Error (135, loc, "`{0}' conflicts with a declaration in a child block", Name);
}
- return ResolveAsTypeOrNamespace (rc);
+ return ResolveAsTypeOrNamespace (rc, false);
}
}
+ var mg = NamespaceContainer.LookupStaticUsings (rc, Name, Arity, loc);
+ if (mg != null) {
+ if (Arity > 0) {
+ targs.Resolve (rc);
+ mg.SetTypeArguments (rc, targs);
+ }
+ return mg;
+ }
+
+ if (Name == "nameof")
+ return new NameOf (this);
+
if (errorMode) {
if (variable_found) {
rc.Report.Error (841, loc, "A local variable `{0}' cannot be used before it is declared", Name);
@@ -2786,17 +2876,6 @@ namespace Mono.CSharp {
ct = ct.DeclaringType;
} while (ct != null);
- } else {
- var cos = rc.CurrentMemberDefinition.Parent as ClassOrStruct;
- if (cos != null && cos.PrimaryConstructorParameters != null) {
- foreach (var p in cos.PrimaryConstructorParameters.FixedParameters) {
- if (p.Name == Name) {
- rc.Report.Error (9007, loc, "Primary constructor parameter `{0}' is not available in this context when using ref or out modifier",
- Name);
- return null;
- }
- }
- }
}
if ((restrictions & MemberLookupRestrictions.InvocableOnly) == 0) {
@@ -2816,7 +2895,7 @@ namespace Mono.CSharp {
e = rc.LookupNamespaceOrType (Name, -System.Math.Max (1, Arity), LookupMode.Probing, loc);
if (e != null) {
- if (e.Type.Arity != Arity) {
+ if (e.Type.Arity != Arity && (restrictions & MemberLookupRestrictions.IgnoreArity) == 0) {
Error_TypeArgumentsCannotBeUsed (rc, e.Type, loc);
return e;
}
@@ -2830,7 +2909,7 @@ namespace Mono.CSharp {
}
}
- rc.Report.Error (103, loc, "The name `{0}' does not exist in the current context", Name);
+ Error_NameDoesNotExist (rc);
}
return ErrorExpression.Instance;
@@ -2896,16 +2975,16 @@ namespace Mono.CSharp {
throw new NotSupportedException ("ET");
}
- public abstract FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc);
+ public abstract FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc, bool allowUnboundTypeArguments);
//
// This is used to resolve the expression as a type, a null
// value will be returned if the expression is not a type
// reference
//
- public override TypeSpec ResolveAsType (IMemberContext mc)
+ public override TypeSpec ResolveAsType (IMemberContext mc, bool allowUnboundTypeArguments = false)
{
- FullNamedExpression fne = ResolveAsTypeOrNamespace (mc);
+ FullNamedExpression fne = ResolveAsTypeOrNamespace (mc, allowUnboundTypeArguments);
if (fne == null)
return null;
@@ -2956,7 +3035,7 @@ namespace Mono.CSharp {
/// </summary>
public abstract class TypeExpr : FullNamedExpression
{
- public sealed override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc)
+ public sealed override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc, bool allowUnboundTypeArguments)
{
ResolveAsType (mc);
return this;
@@ -2995,7 +3074,7 @@ namespace Mono.CSharp {
loc = l;
}
- public sealed override TypeSpec ResolveAsType (IMemberContext ec)
+ public sealed override TypeSpec ResolveAsType (IMemberContext mc, bool allowUnboundTypeArguments = false)
{
return type;
}
@@ -3024,7 +3103,7 @@ namespace Mono.CSharp {
throw new NotImplementedException ();
}
- public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc)
+ public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc, bool allowUnboundTypeArguments)
{
return this;
}
@@ -3115,6 +3194,8 @@ namespace Mono.CSharp {
/// </summary>
public abstract class MemberExpr : Expression, OverloadResolver.IInstanceQualifier
{
+ protected bool conditional_access_receiver;
+
//
// An instance expression associated with this member, if it's a
// non-static member
@@ -3153,6 +3234,8 @@ namespace Mono.CSharp {
get;
}
+ public bool ConditionalAccess { get; set; }
+
protected abstract TypeSpec DeclaringType {
get;
}
@@ -3291,6 +3374,11 @@ namespace Mono.CSharp {
return InstanceExpression != null && InstanceExpression.ContainsEmitWithAwait ();
}
+ public override bool HasConditionalAccess ()
+ {
+ return ConditionalAccess || (InstanceExpression != null && InstanceExpression.HasConditionalAccess ());
+ }
+
static bool IsSameOrBaseQualifier (TypeSpec type, TypeSpec qtype)
{
do {
@@ -3346,8 +3434,23 @@ namespace Mono.CSharp {
public override void FlowAnalysis (FlowAnalysisContext fc)
{
- if (InstanceExpression != null)
+ if (InstanceExpression != null) {
InstanceExpression.FlowAnalysis (fc);
+
+ if (ConditionalAccess) {
+ fc.BranchConditionalAccessDefiniteAssignment ();
+ }
+ }
+ }
+
+ protected void ResolveConditionalAccessReceiver (ResolveContext rc)
+ {
+ if (!rc.HasSet (ResolveContext.Options.ConditionalAccessReceiver)) {
+ if (HasConditionalAccess ()) {
+ conditional_access_receiver = true;
+ rc.Set (ResolveContext.Options.ConditionalAccessReceiver);
+ }
+ }
}
public bool ResolveInstanceExpression (ResolveContext rc, Expression rhs)
@@ -3358,7 +3461,7 @@ namespace Mono.CSharp {
//
// Check intermediate value modification which won't have any effect
//
- if (rhs != null && InstanceExpression.Type.IsStruct) {
+ if (rhs != null && TypeSpec.IsValueType (InstanceExpression.Type)) {
var fexpr = InstanceExpression as FieldExpr;
if (fexpr != null) {
if (!fexpr.Spec.IsReadOnly || rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.ConstructorScope))
@@ -3496,7 +3599,7 @@ namespace Mono.CSharp {
public virtual MemberExpr ResolveMemberAccess (ResolveContext ec, Expression left, SimpleName original)
{
- if (left != null && left.IsNull && TypeSpec.IsReferenceType (left.Type)) {
+ if (left != null && !ConditionalAccess && left.IsNull && TypeSpec.IsReferenceType (left.Type)) {
ec.Report.Warning (1720, 1, left.Location,
"Expression will always cause a `{0}'", "System.NullReferenceException");
}
@@ -3507,25 +3610,8 @@ namespace Mono.CSharp {
protected void EmitInstance (EmitContext ec, bool prepare_for_load)
{
- TypeSpec instance_type = InstanceExpression.Type;
- if (TypeSpec.IsValueType (instance_type)) {
- if (InstanceExpression is IMemoryLocation) {
- ((IMemoryLocation) InstanceExpression).AddressOf (ec, AddressOp.Load);
- } else {
- // Cannot release the temporary variable when its address
- // is required to be on stack for any parent
- LocalTemporary t = new LocalTemporary (instance_type);
- InstanceExpression.Emit (ec);
- t.Store (ec);
- t.AddressOf (ec, AddressOp.Store);
- }
- } else {
- InstanceExpression.Emit (ec);
-
- // Only to make verifier happy
- if (instance_type.IsGenericParameter && !(InstanceExpression is This) && TypeSpec.IsReferenceType (instance_type))
- ec.Emit (OpCodes.Box, instance_type);
- }
+ var inst = new InstanceEmitter (InstanceExpression, TypeSpec.IsValueType (InstanceExpression.Type));
+ inst.Emit (ec, ConditionalAccess);
if (prepare_for_load)
ec.Emit (OpCodes.Dup);
@@ -3593,6 +3679,13 @@ namespace Mono.CSharp {
get { return true; }
}
+ public override void FlowAnalysis (FlowAnalysisContext fc)
+ {
+ if (ConditionalAccess) {
+ fc.BranchConditionalAccessDefiniteAssignment ();
+ }
+ }
+
//
// For extension methodgroup we are not looking for base members but parent
// namespace extension methods
@@ -3629,7 +3722,8 @@ namespace Mono.CSharp {
return null;
var cand = candidates;
- arguments.Insert (0, new Argument (ExtensionExpression, Argument.AType.ExtensionType));
+ var atype = ConditionalAccess ? Argument.AType.ExtensionTypeConditionalAccess : Argument.AType.ExtensionType;
+ arguments.Insert (0, new Argument (ExtensionExpression, atype));
var res = base.OverloadResolve (ec, ref arguments, ehandler ?? this, restr);
// Restore candidates in case we are running in probing mode
@@ -3825,7 +3919,10 @@ namespace Mono.CSharp {
if (IsConditionallyExcluded)
ec.Report.Error (765, loc,
"Partial methods with only a defining declaration or removed conditional methods cannot be used in an expression tree");
-
+
+ if (ConditionalAccess)
+ Error_NullShortCircuitInsideExpressionTree (ec);
+
return new TypeOfMethod (best_candidate, loc);
}
@@ -3846,12 +3943,28 @@ namespace Mono.CSharp {
{
throw new NotSupportedException ();
}
-
- public void EmitCall (EmitContext ec, Arguments arguments)
+
+ public void EmitCall (EmitContext ec, Arguments arguments, bool statement)
{
var call = new CallEmitter ();
call.InstanceExpression = InstanceExpression;
- call.Emit (ec, best_candidate, arguments, loc);
+ call.ConditionalAccess = ConditionalAccess;
+
+ if (statement)
+ call.EmitStatement (ec, best_candidate, arguments, loc);
+ else
+ call.Emit (ec, best_candidate, arguments, loc);
+ }
+
+ public void EmitCall (EmitContext ec, Arguments arguments, TypeSpec conditionalAccessReceiver, bool statement)
+ {
+ ec.ConditionalAccess = new ConditionalAccessContext (conditionalAccessReceiver, ec.DefineLabel ()) {
+ Statement = statement
+ };
+
+ EmitCall (ec, arguments, statement);
+
+ ec.CloseConditionalAccess (!statement && best_candidate_return != conditionalAccessReceiver && conditionalAccessReceiver.IsNullableType ? conditionalAccessReceiver : null);
}
public override void Error_ValueCannotBeConverted (ResolveContext ec, TypeSpec target, bool expl)
@@ -4249,7 +4362,6 @@ namespace Mono.CSharp {
if (!TypeSpecComparer.Equals (p_m.Parameters.Types, q_m.Parameters.Types))
return 0;
- var orig_p = p;
p = p_m.ReturnType;
var orig_q = q;
q = q_m.ReturnType;
@@ -4279,33 +4391,34 @@ namespace Mono.CSharp {
q = q.TypeArguments[0];
p = p.TypeArguments[0];
}
- } else if (q != p) {
+ }
+
+ if (q != p) {
//
- // LAMESPEC: Lambda expression returning dynamic type has identity (better) conversion to delegate returning object type
+ // An inferred return type X exists for E in the context of that parameter list, and
+ // the conversion from X to Y1 is better than the conversion from X to Y2
//
- if (q.BuiltinType == BuiltinTypeSpec.Type.Object) {
- var am_rt = am.InferReturnType (ec, null, orig_q);
- if (am_rt != null && am_rt.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
- return 2;
- } else if (p.BuiltinType == BuiltinTypeSpec.Type.Object) {
- var am_rt = am.InferReturnType (ec, null, orig_p);
- if (am_rt != null && am_rt.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
- return 1;
+ argument_type = am.InferReturnType (ec, null, orig_q);
+ if (argument_type == null) {
+ // TODO: Can this be hit?
+ return 1;
}
+
+ if (argument_type.BuiltinType == BuiltinTypeSpec.Type.Dynamic)
+ argument_type = ec.BuiltinTypes.Object;
}
+ }
- //
- // The parameters are identicial and return type is not void, use better type conversion
- // on return type to determine better one
- //
- } else {
- if (argument_type == p)
- return 1;
+ if (argument_type == p)
+ return 1;
- if (argument_type == q)
- return 2;
- }
+ if (argument_type == q)
+ return 2;
+ //
+ // The parameters are identicial and return type is not void, use better type conversion
+ // on return type to determine better one
+ //
return BetterTypeConversion (ec, p, q);
}
@@ -4609,7 +4722,7 @@ namespace Mono.CSharp {
// 0 = the best, int.MaxValue = the worst
// -1 = fatal error
//
- int IsApplicable (ResolveContext ec, ref Arguments arguments, int arg_count, ref MemberSpec candidate, IParametersMember pm, ref bool params_expanded_form, ref bool dynamicArgument, ref TypeSpec returnType)
+ int IsApplicable (ResolveContext ec, ref Arguments arguments, int arg_count, ref MemberSpec candidate, IParametersMember pm, ref bool params_expanded_form, ref bool dynamicArgument, ref TypeSpec returnType, bool errorMode)
{
// Parameters of most-derived type used mainly for named and optional parameters
var pd = pm.Parameters;
@@ -4802,6 +4915,13 @@ namespace Mono.CSharp {
lambda_conv_msgs.ClearSession ();
if (i_args.Length != 0) {
+ if (!errorMode) {
+ foreach (var ta in i_args) {
+ if (!ta.IsAccessible (ec))
+ return ti.InferenceScore - 10000;
+ }
+ }
+
ms = ms.MakeGenericMethod (ec, i_args);
}
}
@@ -4899,7 +5019,7 @@ namespace Mono.CSharp {
score = 1;
if (!params_expanded_form) {
- if (a.ArgType == Argument.AType.ExtensionType) {
+ if (a.IsExtensionType) {
//
// Indentity, implicit reference or boxing conversion must exist for the extension parameter
//
@@ -5155,7 +5275,7 @@ namespace Mono.CSharp {
bool params_expanded_form = false;
bool dynamic_argument = false;
TypeSpec rt = pm.MemberType;
- int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, pm, ref params_expanded_form, ref dynamic_argument, ref rt);
+ int candidate_rate = IsApplicable (rc, ref candidate_args, args_count, ref member, pm, ref params_expanded_form, ref dynamic_argument, ref rt, error_mode);
if (lambda_conv_msgs != null)
lambda_conv_msgs.EndSession ();
@@ -5287,7 +5407,7 @@ namespace Mono.CSharp {
}
if (best_candidate_dynamic) {
- if (args[0].ArgType == Argument.AType.ExtensionType) {
+ if (args[0].IsExtensionType) {
rc.Report.Error (1973, loc,
"Type `{0}' does not contain a member `{1}' and the best extension method overload `{2}' cannot be dynamically dispatched. Consider calling the method without the extension method syntax",
args [0].Type.GetSignatureForError (), best_candidate.Name, best_candidate.GetSignatureForError ());
@@ -5533,6 +5653,9 @@ namespace Mono.CSharp {
break;
}
+ if (args == null)
+ return false;
+
foreach (var arg in args) {
var na = arg as NamedArgument;
if (na == null)
@@ -5553,7 +5676,8 @@ namespace Mono.CSharp {
bool VerifyArguments (ResolveContext ec, ref Arguments args, MemberSpec member, IParametersMember pm, bool chose_params_expanded)
{
var pd = pm.Parameters;
- TypeSpec[] ptypes = ((IParametersMember) member).Parameters.Types;
+ var cpd = ((IParametersMember) member).Parameters;
+ var ptypes = cpd.Types;
Parameter.Modifier p_mod = 0;
TypeSpec pt = null;
@@ -5569,7 +5693,7 @@ namespace Mono.CSharp {
continue;
if (p_mod != Parameter.Modifier.PARAMS) {
- p_mod = pd.FixedParameters[a_idx].ModFlags;
+ p_mod = cpd.FixedParameters [a_idx].ModFlags;
pt = ptypes[a_idx];
has_unsafe_arg |= pt.IsPointer;
@@ -5630,7 +5754,7 @@ namespace Mono.CSharp {
}
Expression conv;
- if (a.ArgType == Argument.AType.ExtensionType) {
+ if (a.IsExtensionType) {
if (a.Expr.Type == pt || TypeSpecComparer.IsEqual (a.Expr.Type, pt)) {
conv = a.Expr;
} else {
@@ -5670,7 +5794,7 @@ namespace Mono.CSharp {
//
// Fill not provided arguments required by params modifier
//
- if (params_initializers == null && pd.HasParams && arg_count + 1 == pd.Count) {
+ if (params_initializers == null && arg_count + 1 == pd.Count) {
if (args == null)
args = new Arguments (1);
@@ -5884,6 +6008,10 @@ namespace Mono.CSharp {
public override Expression CreateExpressionTree (ResolveContext ec)
{
+ if (ConditionalAccess) {
+ Error_NullShortCircuitInsideExpressionTree (ec);
+ }
+
return CreateExpressionTree (ec, true);
}
@@ -5926,6 +6054,8 @@ namespace Mono.CSharp {
bool lvalue_instance = rhs != null && IsInstance && spec.DeclaringType.IsStruct;
if (rhs != this) {
+ ResolveConditionalAccessReceiver (ec);
+
if (ResolveInstanceExpression (ec, rhs)) {
// Resolve the field's instance expression while flow analysis is turned
// off: when accessing a field "a.b", we must check whether the field
@@ -5947,6 +6077,9 @@ namespace Mono.CSharp {
}
DoBestMemberChecks (ec, spec);
+
+ if (conditional_access_receiver)
+ ec.With (ResolveContext.Options.ConditionalAccessReceiver, false);
}
var fb = spec as FixedFieldSpec;
@@ -5977,6 +6110,14 @@ namespace Mono.CSharp {
variable_info = var.VariableInfo.GetStructFieldInfo (Name);
}
+ if (ConditionalAccess) {
+ if (conditional_access_receiver)
+ type = LiftMemberType (ec, type);
+
+ if (InstanceExpression.IsNull)
+ return Constant.CreateConstantFromValue (type, null, loc);
+ }
+
eclass = ExprClass.Variable;
return this;
}
@@ -6071,8 +6212,11 @@ namespace Mono.CSharp {
return null;
}
- override public Expression DoResolveLValue (ResolveContext ec, Expression right_side)
+ public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
{
+ if (ConditionalAccess)
+ throw new NotSupportedException ("null propagating operator assignment");
+
if (spec is FixedFieldSpec) {
// It could be much better error message but we want to be error compatible
Error_ValueAssignment (ec, right_side);
@@ -6137,6 +6281,9 @@ namespace Mono.CSharp {
}
base.FlowAnalysis (fc);
+
+ if (conditional_access_receiver)
+ fc.ConditionalAccessEnd ();
}
public override int GetHashCode ()
@@ -6183,8 +6330,12 @@ namespace Mono.CSharp {
ec.Emit (OpCodes.Ldsfld, spec);
} else {
- if (!prepared)
+ if (!prepared) {
+ if (conditional_access_receiver)
+ ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ());
+
EmitInstance (ec, false);
+ }
// Optimization for build-in types
if (type.IsStruct && type == ec.CurrentType && InstanceExpression.Type == type) {
@@ -6201,6 +6352,10 @@ namespace Mono.CSharp {
ec.Emit (OpCodes.Ldfld, spec);
}
}
+
+ if (conditional_access_receiver) {
+ ec.CloseConditionalAccess (type.IsNullableType && type != spec.MemberType ? type : null);
+ }
}
if (leave_copy) {
@@ -6220,6 +6375,9 @@ namespace Mono.CSharp {
}
if (IsInstance) {
+ if (ConditionalAccess)
+ throw new NotImplementedException ("null operator assignment");
+
if (has_await_source)
source = source.EmitToField (ec);
@@ -6442,6 +6600,10 @@ namespace Mono.CSharp {
public override Expression CreateExpressionTree (ResolveContext ec)
{
+ if (ConditionalAccess) {
+ Error_NullShortCircuitInsideExpressionTree (ec);
+ }
+
Arguments args;
if (IsSingleDimensionalArrayLength ()) {
args = new Arguments (1);
@@ -6509,9 +6671,19 @@ namespace Mono.CSharp {
// Special case: length of single dimension array property is turned into ldlen
//
if (IsSingleDimensionalArrayLength ()) {
+ if (conditional_access_receiver) {
+ ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ());
+ }
+
EmitInstance (ec, false);
+
ec.Emit (OpCodes.Ldlen);
ec.Emit (OpCodes.Conv_I4);
+
+ if (conditional_access_receiver) {
+ ec.CloseConditionalAccess (type);
+ }
+
return;
}
@@ -6568,7 +6740,14 @@ namespace Mono.CSharp {
if (args == null)
call.InstanceExpressionOnStack = true;
- call.Emit (ec, Setter, args, loc);
+ if (ConditionalAccess) {
+ call.ConditionalAccess = true;
+ }
+
+ if (leave_copy)
+ call.Emit (ec, Setter, args, loc);
+ else
+ call.EmitStatement (ec, Setter, args, loc);
if (temp != null) {
temp.Emit (ec);
@@ -6580,6 +6759,14 @@ namespace Mono.CSharp {
}
}
+ public override void FlowAnalysis (FlowAnalysisContext fc)
+ {
+ base.FlowAnalysis (fc);
+
+ if (conditional_access_receiver)
+ fc.ConditionalAccessEnd ();
+ }
+
protected override Expression OverloadResolve (ResolveContext rc, Expression right_side)
{
eclass = ExprClass.PropertyAccess;
@@ -6666,12 +6853,19 @@ namespace Mono.CSharp {
protected override Expression DoResolve (ResolveContext ec)
{
if (eclass == ExprClass.Unresolved) {
+ ResolveConditionalAccessReceiver (ec);
+
var expr = OverloadResolve (ec, null);
if (expr == null)
return null;
if (expr != this)
return expr.Resolve (ec);
+
+ if (conditional_access_receiver) {
+ type = LiftMemberType (ec, type);
+ ec.With (ResolveContext.Options.ConditionalAccessReceiver, false);
+ }
}
if (!ResolveGetter (ec))
@@ -6682,6 +6876,9 @@ namespace Mono.CSharp {
public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
{
+ if (ConditionalAccess)
+ throw new NotSupportedException ("null propagating operator assignment");
+
if (right_side == EmptyExpression.OutAccess) {
// TODO: best_candidate can be null at this point
INamedBlockVariable variable = null;
@@ -6711,19 +6908,32 @@ namespace Mono.CSharp {
return this;
}
+ void EmitConditionalAccess (EmitContext ec, ref CallEmitter call, MethodSpec method, Arguments arguments)
+ {
+ ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ());
+
+ call.Emit (ec, method, arguments, loc);
+
+ ec.CloseConditionalAccess (method.ReturnType != type && type.IsNullableType ? type : null);
+ }
+
//
// Implements the IAssignMethod interface for assignments
//
public virtual void Emit (EmitContext ec, bool leave_copy)
{
var call = new CallEmitter ();
+ call.ConditionalAccess = ConditionalAccess;
call.InstanceExpression = InstanceExpression;
if (has_await_arguments)
call.HasAwaitArguments = true;
else
call.DuplicateArguments = emitting_compound_assignment;
- call.Emit (ec, Getter, Arguments, loc);
+ if (conditional_access_receiver)
+ EmitConditionalAccess (ec, ref call, Getter, Arguments);
+ else
+ call.Emit (ec, Getter, Arguments, loc);
if (call.HasAwaitArguments) {
InstanceExpression = call.InstanceExpression;
@@ -6952,9 +7162,18 @@ namespace Mono.CSharp {
Arguments args = new Arguments (1);
args.Add (new Argument (source));
+ // TODO: Wrong, needs receiver
+// if (NullShortCircuit) {
+// ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ());
+// }
+
var call = new CallEmitter ();
call.InstanceExpression = InstanceExpression;
- call.Emit (ec, op, args, loc);
+ call.ConditionalAccess = ConditionalAccess;
+ call.EmitStatement (ec, op, args, loc);
+
+// if (NullShortCircuit)
+// ec.CloseConditionalAccess (null);
}
#endregion
diff --git a/mcs/mcs/enum.cs b/mcs/mcs/enum.cs
index d2a031bd019..3e1c3fc6530 100644
--- a/mcs/mcs/enum.cs
+++ b/mcs/mcs/enum.cs
@@ -28,7 +28,7 @@ namespace Mono.CSharp {
{
class EnumTypeExpr : TypeExpr
{
- public override TypeSpec ResolveAsType (IMemberContext ec)
+ public override TypeSpec ResolveAsType (IMemberContext ec, bool allowUnboundTypeArguments)
{
type = ec.CurrentType;
eclass = ExprClass.Type;
@@ -64,11 +64,12 @@ namespace Mono.CSharp {
if (expr is EnumConstant)
expr = ((EnumConstant) expr).Child;
- var underlying = ((Enum) Parent).UnderlyingType;
+ var en = (Enum)Parent;
+ var underlying = en.UnderlyingType;
if (expr != null) {
expr = expr.ImplicitConversionRequired (rc, underlying);
if (expr != null && !IsValidEnumType (expr.Type)) {
- Enum.Error_1008 (Location, Report);
+ en.Error_UnderlyingType (Location);
expr = null;
}
}
@@ -217,7 +218,7 @@ namespace Mono.CSharp {
AddMember (em);
}
- public static void Error_1008 (Location loc, Report Report)
+ public void Error_UnderlyingType (Location loc)
{
Report.Error (1008, loc,
"Type byte, sbyte, short, ushort, int, uint, long or ulong expected");
@@ -225,7 +226,21 @@ namespace Mono.CSharp {
protected override void DoDefineContainer ()
{
- ((EnumSpec) spec).UnderlyingType = underlying_type_expr == null ? Compiler.BuiltinTypes.Int : underlying_type_expr.Type;
+ TypeSpec ut;
+ if (underlying_type_expr != null) {
+ ut = underlying_type_expr.ResolveAsType (this);
+ if (!EnumSpec.IsValidUnderlyingType (ut)) {
+ Error_UnderlyingType (underlying_type_expr.Location);
+ ut = null;
+ }
+ } else {
+ ut = null;
+ }
+
+ if (ut == null)
+ ut = Compiler.BuiltinTypes.Int;
+
+ ((EnumSpec) spec).UnderlyingType = ut;
TypeBuilder.DefineField (UnderlyingValueField, UnderlyingType.GetMetaInfo (),
FieldAttributes.Public | FieldAttributes.SpecialName | FieldAttributes.RTSpecialName);
diff --git a/mcs/mcs/eval.cs b/mcs/mcs/eval.cs
index 115429e3f87..30c42c1af82 100644
--- a/mcs/mcs/eval.cs
+++ b/mcs/mcs/eval.cs
@@ -25,6 +25,11 @@ namespace Mono.CSharp
{
/// <summary>
+ /// Experimental!
+ /// </summary>
+ public delegate void ValueModificationHandler (string variableName, int row, int column, object value);
+
+ /// <summary>
/// Evaluator: provides an API to evaluate C# statements and
/// expressions dynamically.
/// </summary>
@@ -479,8 +484,10 @@ namespace Mono.CSharp
return result;
}
- // Experimental
- public Action<string, int, int, object> ModificationListener { get; set; }
+ /// <summary>
+ /// Experimental!
+ /// </summary>
+ public ValueModificationHandler ModificationListener { get; set; }
enum InputKind {
EOF,
@@ -1295,11 +1302,11 @@ namespace Mono.CSharp
static class ListenerProxy
{
- static readonly Dictionary<int, Action<string, int, int, object>> listeners = new Dictionary<int, Action<string, int, int, object>> ();
+ static readonly Dictionary<int, ValueModificationHandler> listeners = new Dictionary<int, ValueModificationHandler> ();
static int counter;
- public static int Register (Action<string, int, int, object> listener)
+ public static int Register (ValueModificationHandler listener)
{
lock (listeners) {
var id = counter++;
@@ -1317,7 +1324,7 @@ namespace Mono.CSharp
public static void ValueChanged (object value, int row, int col, string name, int listenerId)
{
- Action<string, int, int, object> action;
+ ValueModificationHandler action;
lock (listeners) {
if (!listeners.TryGetValue (listenerId, out action))
return;
diff --git a/mcs/mcs/expression.cs b/mcs/mcs/expression.cs
index dc99a228aad..6c345e0f1c8 100644
--- a/mcs/mcs/expression.cs
+++ b/mcs/mcs/expression.cs
@@ -80,7 +80,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
var call = new CallEmitter ();
- call.EmitPredefined (ec, oper, arguments, loc);
+ call.Emit (ec, oper, arguments, loc);
}
public override void FlowAnalysis (FlowAnalysisContext fc)
@@ -139,7 +139,7 @@ namespace Mono.CSharp
public readonly Operator Oper;
public Expression Expr;
- Expression enum_conversion;
+ ConvCast.Mode enum_conversion;
public Unary (Operator op, Expression expr, Location loc)
{
@@ -373,7 +373,7 @@ namespace Mono.CSharp
return null;
Expr = best_expr;
- enum_conversion = Convert.ExplicitNumericConversion (ec, new EmptyExpression (best_expr.Type), underlying_type);
+ enum_conversion = Binary.GetEnumResultCast (underlying_type);
type = expr.Type;
return EmptyCast.Create (this, type);
}
@@ -583,8 +583,11 @@ namespace Mono.CSharp
//
// Same trick as in Binary expression
//
- if (enum_conversion != null)
- enum_conversion.Emit (ec);
+ if (enum_conversion != 0) {
+ using (ec.With (BuilderContext.Options.CheckedScope, false)) {
+ ConvCast.Emit (ec, enum_conversion);
+ }
+ }
}
public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
@@ -608,6 +611,16 @@ namespace Mono.CSharp
public override void FlowAnalysis (FlowAnalysisContext fc)
{
+ FlowAnalysis (fc, false);
+ }
+
+ public override void FlowAnalysisConditional (FlowAnalysisContext fc)
+ {
+ FlowAnalysis (fc, true);
+ }
+
+ void FlowAnalysis (FlowAnalysisContext fc, bool conditional)
+ {
if (Oper == Operator.AddressOf) {
var vr = Expr as VariableReference;
if (vr != null && vr.VariableInfo != null)
@@ -616,12 +629,14 @@ namespace Mono.CSharp
return;
}
- Expr.FlowAnalysis (fc);
+ if (Oper == Operator.LogicalNot && conditional) {
+ Expr.FlowAnalysisConditional (fc);
- if (Oper == Operator.LogicalNot) {
var temp = fc.DefiniteAssignmentOnTrue;
fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse;
fc.DefiniteAssignmentOnFalse = temp;
+ } else {
+ Expr.FlowAnalysis (fc);
}
}
@@ -1143,7 +1158,7 @@ namespace Mono.CSharp
{
expr = expr.Resolve (ec);
- if (expr == null)
+ if (expr == null || expr.Type == InternalType.ErrorType)
return null;
if (expr.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
@@ -1418,30 +1433,30 @@ namespace Mono.CSharp
return expr.ContainsEmitWithAwait ();
}
- protected override Expression DoResolve (ResolveContext ec)
+ protected Expression ResolveCommon (ResolveContext rc)
{
- probe_type_expr = ProbeType.ResolveAsType (ec);
- if (probe_type_expr == null)
- return null;
-
- expr = expr.Resolve (ec);
+ expr = expr.Resolve (rc);
if (expr == null)
return null;
+ ResolveProbeType (rc);
+ if (probe_type_expr == null)
+ return this;
+
if (probe_type_expr.IsStatic) {
- ec.Report.Error (7023, loc, "The second operand of `is' or `as' operator cannot be static type `{0}'",
+ rc.Report.Error (7023, loc, "The second operand of `is' or `as' operator cannot be static type `{0}'",
probe_type_expr.GetSignatureForError ());
return null;
}
if (expr.Type.IsPointer || probe_type_expr.IsPointer) {
- ec.Report.Error (244, loc, "The `{0}' operator cannot be applied to an operand of pointer type",
+ rc.Report.Error (244, loc, "The `{0}' operator cannot be applied to an operand of pointer type",
OperatorName);
return null;
}
- if (expr.Type == InternalType.AnonymousMethod) {
- ec.Report.Error (837, loc, "The `{0}' operator cannot be applied to a lambda expression or anonymous method",
+ if (expr.Type == InternalType.AnonymousMethod || expr.Type == InternalType.MethodGroup) {
+ rc.Report.Error (837, loc, "The `{0}' operator cannot be applied to a lambda expression, anonymous method, or method group",
OperatorName);
return null;
}
@@ -1449,6 +1464,11 @@ namespace Mono.CSharp
return this;
}
+ protected virtual void ResolveProbeType (ResolveContext rc)
+ {
+ probe_type_expr = ProbeType.ResolveAsType (rc);
+ }
+
public override void EmitSideEffect (EmitContext ec)
{
expr.EmitSideEffect (ec);
@@ -1477,6 +1497,8 @@ namespace Mono.CSharp
public class Is : Probe
{
Nullable.Unwrap expr_unwrap;
+ MethodSpec number_mg;
+ Arguments number_args;
public Is (Expression expr, Expression probe_type, Location l)
: base (expr, probe_type, l)
@@ -1487,64 +1509,321 @@ namespace Mono.CSharp
get { return "is"; }
}
+ public LocalVariable Variable { get; set; }
+
public override Expression CreateExpressionTree (ResolveContext ec)
{
+ if (Variable != null)
+ throw new NotSupportedException ();
+
Arguments args = Arguments.CreateForExpressionTree (ec, null,
expr.CreateExpressionTree (ec),
new TypeOf (probe_type_expr, loc));
return CreateExpressionFactoryCall (ec, "TypeIs", args);
}
-
+
+ Expression CreateConstantResult (ResolveContext rc, bool result)
+ {
+ if (result)
+ rc.Report.Warning (183, 1, loc, "The given expression is always of the provided (`{0}') type",
+ probe_type_expr.GetSignatureForError ());
+ else
+ rc.Report.Warning (184, 1, loc, "The given expression is never of the provided (`{0}') type",
+ probe_type_expr.GetSignatureForError ());
+
+ var c = new BoolConstant (rc.BuiltinTypes, result, loc);
+ return expr.IsSideEffectFree ?
+ ReducedExpression.Create (c, this) :
+ new SideEffectConstant (c, this, loc);
+ }
+
public override void Emit (EmitContext ec)
{
+ if (probe_type_expr == null) {
+ if (ProbeType is WildcardPattern) {
+ expr.EmitSideEffect (ec);
+ ProbeType.Emit (ec);
+ } else {
+ EmitPatternMatch (ec);
+ }
+ return;
+ }
+
+ EmitLoad (ec);
+
+ if (expr_unwrap == null) {
+ ec.EmitNull ();
+ ec.Emit (OpCodes.Cgt_Un);
+ }
+ }
+
+ public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
+ {
+ if (probe_type_expr == null) {
+ EmitPatternMatch (ec);
+ } else {
+ EmitLoad (ec);
+ }
+
+ ec.Emit (on_true ? OpCodes.Brtrue : OpCodes.Brfalse, target);
+ }
+
+ void EmitPatternMatch (EmitContext ec)
+ {
+ var no_match = ec.DefineLabel ();
+ var end = ec.DefineLabel ();
+
if (expr_unwrap != null) {
expr_unwrap.EmitCheck (ec);
+
+ if (ProbeType.IsNull) {
+ ec.EmitInt (0);
+ ec.Emit (OpCodes.Ceq);
+ return;
+ }
+
+ ec.Emit (OpCodes.Brfalse_S, no_match);
+ expr_unwrap.Emit (ec);
+ ProbeType.Emit (ec);
+ ec.Emit (OpCodes.Ceq);
+ ec.Emit (OpCodes.Br_S, end);
+ ec.MarkLabel (no_match);
+ ec.EmitInt (0);
+ ec.MarkLabel (end);
return;
}
- expr.Emit (ec);
+ if (number_args != null && number_args.Count == 3) {
+ var ce = new CallEmitter ();
+ ce.Emit (ec, number_mg, number_args, loc);
+ return;
+ }
+
+ var probe_type = ProbeType.Type;
+
+ Expr.Emit (ec);
+ ec.Emit (OpCodes.Isinst, probe_type);
+ ec.Emit (OpCodes.Dup);
+ ec.Emit (OpCodes.Brfalse, no_match);
- // Only to make verifier happy
- if (probe_type_expr.IsGenericParameter && TypeSpec.IsValueType (expr.Type))
- ec.Emit (OpCodes.Box, expr.Type);
+ bool complex_pattern = ProbeType is ComplexPatternExpression;
+ Label prev = ec.RecursivePatternLabel;
+ if (complex_pattern)
+ ec.RecursivePatternLabel = ec.DefineLabel ();
- ec.Emit (OpCodes.Isinst, probe_type_expr);
- ec.EmitNull ();
- ec.Emit (OpCodes.Cgt_Un);
+ if (number_mg != null) {
+ var ce = new CallEmitter ();
+ ce.Emit (ec, number_mg, number_args, loc);
+ } else {
+ if (TypeSpec.IsValueType (probe_type))
+ ec.Emit (OpCodes.Unbox_Any, probe_type);
+
+ ProbeType.Emit (ec);
+ if (complex_pattern) {
+ ec.EmitInt (1);
+ } else {
+ ec.Emit (OpCodes.Ceq);
+ }
+ }
+ ec.Emit (OpCodes.Br_S, end);
+ ec.MarkLabel (no_match);
+
+ ec.Emit (OpCodes.Pop);
+
+ if (complex_pattern)
+ ec.MarkLabel (ec.RecursivePatternLabel);
+
+ ec.RecursivePatternLabel = prev;
+
+ ec.EmitInt (0);
+ ec.MarkLabel (end);
}
- public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
+ void EmitLoad (EmitContext ec)
{
+ Label no_value_label = new Label ();
+
if (expr_unwrap != null) {
expr_unwrap.EmitCheck (ec);
+
+ if (Variable == null)
+ return;
+
+ ec.Emit (OpCodes.Dup);
+ no_value_label = ec.DefineLabel ();
+ ec.Emit (OpCodes.Brfalse_S, no_value_label);
+ expr_unwrap.Emit (ec);
} else {
expr.Emit (ec);
+
+ // Only to make verifier happy
+ if (probe_type_expr.IsGenericParameter && TypeSpec.IsValueType (expr.Type))
+ ec.Emit (OpCodes.Box, expr.Type);
+
ec.Emit (OpCodes.Isinst, probe_type_expr);
- }
- ec.Emit (on_true ? OpCodes.Brtrue : OpCodes.Brfalse, target);
+ }
+
+ if (Variable != null) {
+ bool value_on_stack;
+ if (probe_type_expr.IsGenericParameter || probe_type_expr.IsNullableType) {
+ ec.Emit (OpCodes.Dup);
+ ec.Emit (OpCodes.Unbox_Any, probe_type_expr);
+ value_on_stack = true;
+ } else {
+ value_on_stack = false;
+ }
+
+ Variable.CreateBuilder (ec);
+ Variable.EmitAssign (ec);
+
+ if (expr_unwrap != null) {
+ ec.MarkLabel (no_value_label);
+ } else if (!value_on_stack) {
+ Variable.Emit (ec);
+ }
+ }
}
- Expression CreateConstantResult (ResolveContext rc, bool result)
+ protected override Expression DoResolve (ResolveContext rc)
{
- if (result)
- rc.Report.Warning (183, 1, loc, "The given expression is always of the provided (`{0}') type",
- probe_type_expr.GetSignatureForError ());
- else
- rc.Report.Warning (184, 1, loc, "The given expression is never of the provided (`{0}') type",
- probe_type_expr.GetSignatureForError ());
+ if (ResolveCommon (rc) == null)
+ return null;
- var c = new BoolConstant (rc.BuiltinTypes, result, loc);
- return expr.IsSideEffectFree ?
- ReducedExpression.Create (c, this) :
- new SideEffectConstant (c, this, loc);
+ type = rc.BuiltinTypes.Bool;
+ eclass = ExprClass.Value;
+
+ if (probe_type_expr == null)
+ return ResolveMatchingExpression (rc);
+
+ var res = ResolveResultExpression (rc);
+ if (Variable != null) {
+ if (res is Constant)
+ throw new NotImplementedException ("constant in type pattern matching");
+
+ Variable.Type = probe_type_expr;
+ var bc = rc as BlockContext;
+ if (bc != null)
+ Variable.PrepareAssignmentAnalysis (bc);
+ }
+
+ return res;
}
- protected override Expression DoResolve (ResolveContext ec)
+ public override void FlowAnalysis (FlowAnalysisContext fc)
{
- if (base.DoResolve (ec) == null)
- return null;
+ base.FlowAnalysis (fc);
+
+ if (Variable != null)
+ fc.SetVariableAssigned (Variable.VariableInfo, true);
+ }
+
+ protected override void ResolveProbeType (ResolveContext rc)
+ {
+ if (!(ProbeType is TypeExpr) && rc.Module.Compiler.Settings.Version == LanguageVersion.Experimental) {
+ if (ProbeType is PatternExpression) {
+ ProbeType.Resolve (rc);
+ return;
+ }
+
+ //
+ // Have to use session recording because we don't have reliable type probing
+ // mechanism (similar issue as in attributes resolving)
+ //
+ // TODO: This is still wrong because ResolveAsType can be destructive
+ //
+ var type_printer = new SessionReportPrinter ();
+ var prev_recorder = rc.Report.SetPrinter (type_printer);
+
+ probe_type_expr = ProbeType.ResolveAsType (rc);
+ type_printer.EndSession ();
+
+ if (probe_type_expr != null) {
+ type_printer.Merge (rc.Report.Printer);
+ rc.Report.SetPrinter (prev_recorder);
+ return;
+ }
+
+ var vexpr = ProbeType as VarExpr;
+ if (vexpr != null && vexpr.InferType (rc, expr)) {
+ probe_type_expr = vexpr.Type;
+ rc.Report.SetPrinter (prev_recorder);
+ return;
+ }
+
+ var expr_printer = new SessionReportPrinter ();
+ rc.Report.SetPrinter (expr_printer);
+ ProbeType = ProbeType.Resolve (rc);
+ expr_printer.EndSession ();
+
+ if (ProbeType != null) {
+ expr_printer.Merge (rc.Report.Printer);
+ } else {
+ type_printer.Merge (rc.Report.Printer);
+ }
+
+ rc.Report.SetPrinter (prev_recorder);
+ return;
+ }
+
+ base.ResolveProbeType (rc);
+ }
+
+ Expression ResolveMatchingExpression (ResolveContext rc)
+ {
+ var mc = ProbeType as Constant;
+ if (mc != null) {
+ if (!Convert.ImplicitConversionExists (rc, ProbeType, Expr.Type)) {
+ ProbeType.Error_ValueCannotBeConverted (rc, Expr.Type, false);
+ return null;
+ }
+
+ if (mc.IsNull)
+ return new Binary (Binary.Operator.Equality, Expr, mc).Resolve (rc);
+
+ var c = Expr as Constant;
+ if (c != null) {
+ c = ConstantFold.BinaryFold (rc, Binary.Operator.Equality, c, mc, loc);
+ if (c != null)
+ return c;
+ }
+
+ if (Expr.Type.IsNullableType) {
+ expr_unwrap = new Nullable.Unwrap (Expr);
+ expr_unwrap.Resolve (rc);
+ } else if (ProbeType.Type.IsEnum || (ProbeType.Type.BuiltinType >= BuiltinTypeSpec.Type.Byte && ProbeType.Type.BuiltinType <= BuiltinTypeSpec.Type.Decimal)) {
+ var helper = rc.Module.CreatePatterMatchingHelper ();
+ number_mg = helper.NumberMatcher.Spec;
+
+ //
+ // There are actually 3 arguments but the first one is already on the stack
+ //
+ number_args = new Arguments (3);
+ if (!ProbeType.Type.IsEnum)
+ number_args.Add (new Argument (Expr));
+
+ number_args.Add (new Argument (Convert.ImplicitConversion (rc, ProbeType, rc.BuiltinTypes.Object, loc)));
+ number_args.Add (new Argument (new BoolLiteral (rc.BuiltinTypes, ProbeType.Type.IsEnum, loc)));
+ }
+
+ return this;
+ }
+
+ if (ProbeType is PatternExpression) {
+ if (!(ProbeType is WildcardPattern) && !Convert.ImplicitConversionExists (rc, ProbeType, Expr.Type)) {
+ ProbeType.Error_ValueCannotBeConverted (rc, Expr.Type, false);
+ }
+
+ return this;
+ }
+
+ // TODO: Better error message
+ rc.Report.Error (150, ProbeType.Location, "A constant value is expected");
+ return this;
+ }
+ Expression ResolveResultExpression (ResolveContext ec)
+ {
TypeSpec d = expr.Type;
bool d_is_nullable = false;
@@ -1562,9 +1841,7 @@ namespace Mono.CSharp
d_is_nullable = true;
}
}
-
- type = ec.BuiltinTypes.Bool;
- eclass = ExprClass.Value;
+
TypeSpec t = probe_type_expr;
bool t_is_nullable = false;
if (t.IsNullableType) {
@@ -1581,7 +1858,7 @@ namespace Mono.CSharp
// D and T are the same value types but D can be null
//
if (d_is_nullable && !t_is_nullable) {
- expr_unwrap = Nullable.Unwrap.Create (expr, false);
+ expr_unwrap = Nullable.Unwrap.Create (expr, true);
return this;
}
@@ -1691,12 +1968,352 @@ namespace Mono.CSharp
}
}
+ class WildcardPattern : PatternExpression
+ {
+ public WildcardPattern (Location loc)
+ : base (loc)
+ {
+ }
+
+ protected override Expression DoResolve (ResolveContext rc)
+ {
+ eclass = ExprClass.Value;
+ type = rc.BuiltinTypes.Object;
+ return this;
+ }
+
+ public override void Emit (EmitContext ec)
+ {
+ ec.EmitInt (1);
+ }
+ }
+
+ class RecursivePattern : ComplexPatternExpression
+ {
+ MethodGroupExpr operator_mg;
+ Arguments operator_args;
+
+ public RecursivePattern (ATypeNameExpression typeExpresion, Arguments arguments, Location loc)
+ : base (typeExpresion, loc)
+ {
+ Arguments = arguments;
+ }
+
+ public Arguments Arguments { get; private set; }
+
+ protected override Expression DoResolve (ResolveContext rc)
+ {
+ type = TypeExpression.ResolveAsType (rc);
+ if (type == null)
+ return null;
+
+ var operators = MemberCache.GetUserOperator (type, Operator.OpType.Is, true);
+ if (operators == null) {
+ Error_TypeDoesNotContainDefinition (rc, type, Operator.GetName (Operator.OpType.Is) + " operator");
+ return null;
+ }
+
+ var ops = FindMatchingOverloads (operators);
+ if (ops == null) {
+ // TODO: better error message
+ Error_TypeDoesNotContainDefinition (rc, type, Operator.GetName (Operator.OpType.Is) + " operator");
+ return null;
+ }
+
+ bool dynamic_args;
+ Arguments.Resolve (rc, out dynamic_args);
+ if (dynamic_args)
+ throw new NotImplementedException ("dynamic argument");
+
+ var op = FindBestOverload (rc, ops);
+ if (op == null) {
+ // TODO: better error message
+ Error_TypeDoesNotContainDefinition (rc, type, Operator.GetName (Operator.OpType.Is) + " operator");
+ return null;
+ }
+
+ var op_types = op.Parameters.Types;
+ operator_args = new Arguments (op_types.Length);
+ operator_args.Add (new Argument (new EmptyExpression (type)));
+
+ for (int i = 0; i < Arguments.Count; ++i) {
+ // TODO: Needs releasing optimization
+ var lt = new LocalTemporary (op_types [i + 1]);
+ operator_args.Add (new Argument (lt, Argument.AType.Out));
+
+ if (comparisons == null)
+ comparisons = new Expression[Arguments.Count];
+
+ int arg_comp_index;
+ Expression expr;
+
+ var arg = Arguments [i];
+ var named = arg as NamedArgument;
+ if (named != null) {
+ arg_comp_index = op.Parameters.GetParameterIndexByName (named.Name) - 1;
+ expr = Arguments [arg_comp_index].Expr;
+ } else {
+ arg_comp_index = i;
+ expr = arg.Expr;
+ }
+
+ comparisons [arg_comp_index] = ResolveComparison (rc, expr, lt);
+ }
+
+ operator_mg = MethodGroupExpr.CreatePredefined (op, type, loc);
+
+ eclass = ExprClass.Value;
+ return this;
+ }
+
+ List<MethodSpec> FindMatchingOverloads (IList<MemberSpec> members)
+ {
+ int arg_count = Arguments.Count + 1;
+ List<MethodSpec> best = null;
+ foreach (MethodSpec method in members) {
+ var pm = method.Parameters;
+ if (pm.Count != arg_count)
+ continue;
+
+ // TODO: Needs more thorough operator checks elsewhere to avoid doing this every time
+ bool ok = true;
+ for (int ii = 1; ii < pm.Count; ++ii) {
+ if ((pm.FixedParameters [ii].ModFlags & Parameter.Modifier.OUT) == 0) {
+ ok = false;
+ break;
+ }
+ }
+
+ if (!ok)
+ continue;
+
+ if (best == null)
+ best = new List<MethodSpec> ();
+
+ best.Add (method);
+ }
+
+ return best;
+ }
+
+ MethodSpec FindBestOverload (ResolveContext rc, List<MethodSpec> methods)
+ {
+ for (int ii = 0; ii < Arguments.Count; ++ii) {
+ var arg = Arguments [ii];
+ var expr = arg.Expr;
+ if (expr is WildcardPattern)
+ continue;
+
+ var na = arg as NamedArgument;
+ for (int i = 0; i < methods.Count; ++i) {
+ var pd = methods [i].Parameters;
+
+ int index;
+ if (na != null) {
+ index = pd.GetParameterIndexByName (na.Name);
+ if (index < 1) {
+ methods.RemoveAt (i--);
+ continue;
+ }
+ } else {
+ index = ii + 1;
+ }
+
+ var m = pd.Types [index];
+ if (!Convert.ImplicitConversionExists (rc, expr, m))
+ methods.RemoveAt (i--);
+ }
+ }
+
+ if (methods.Count != 1)
+ return null;
+
+ return methods [0];
+ }
+
+ public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
+ {
+ operator_mg.EmitCall (ec, operator_args, false);
+ ec.Emit (OpCodes.Brfalse, target);
+
+ base.EmitBranchable (ec, target, on_true);
+ }
+
+ static Expression ResolveComparison (ResolveContext rc, Expression expr, LocalTemporary lt)
+ {
+ if (expr is WildcardPattern)
+ return new EmptyExpression (expr.Type);
+
+ var recursive = expr as RecursivePattern;
+ expr = Convert.ImplicitConversionRequired (rc, expr, lt.Type, expr.Location);
+ if (expr == null)
+ return null;
+
+ if (recursive != null) {
+ recursive.SetParentInstance (lt);
+ return expr;
+ }
+
+ // TODO: Better error handling
+ return new Binary (Binary.Operator.Equality, lt, expr, expr.Location).Resolve (rc);
+ }
+
+ public void SetParentInstance (Expression instance)
+ {
+ operator_args [0] = new Argument (instance);
+ }
+ }
+
+ class PropertyPattern : ComplexPatternExpression
+ {
+ LocalTemporary instance;
+
+ public PropertyPattern (ATypeNameExpression typeExpresion, List<PropertyPatternMember> members, Location loc)
+ : base (typeExpresion, loc)
+ {
+ Members = members;
+ }
+
+ public List<PropertyPatternMember> Members { get; private set; }
+
+ protected override Expression DoResolve (ResolveContext rc)
+ {
+ type = TypeExpression.ResolveAsType (rc);
+ if (type == null)
+ return null;
+
+ comparisons = new Expression[Members.Count];
+
+ // TODO: optimize when source is VariableReference, it'd save dup+pop
+ instance = new LocalTemporary (type);
+
+ for (int i = 0; i < Members.Count; i++) {
+ var lookup = Members [i];
+
+ var member = MemberLookup (rc, false, type, lookup.Name, 0, Expression.MemberLookupRestrictions.ExactArity, loc);
+ if (member == null) {
+ member = MemberLookup (rc, true, type, lookup.Name, 0, Expression.MemberLookupRestrictions.ExactArity, loc);
+ if (member != null) {
+ Expression.ErrorIsInaccesible (rc, member.GetSignatureForError (), loc);
+ continue;
+ }
+ }
+
+ if (member == null) {
+ Expression.Error_TypeDoesNotContainDefinition (rc, Location, Type, lookup.Name);
+ continue;
+ }
+
+ var pe = member as PropertyExpr;
+ if (pe == null || member is FieldExpr) {
+ rc.Report.Error (-2001, lookup.Location, "`{0}' is not a valid pattern member", lookup.Name);
+ continue;
+ }
+
+ // TODO: Obsolete checks
+ // TODO: check accessibility
+ if (pe != null && !pe.PropertyInfo.HasGet) {
+ rc.Report.Error (-2002, lookup.Location, "Property `{0}.get' accessor is required", pe.GetSignatureForError ());
+ continue;
+ }
+
+ var expr = lookup.Expr.Resolve (rc);
+ if (expr == null)
+ continue;
+
+ var me = (MemberExpr)member;
+ me.InstanceExpression = instance;
+
+ comparisons [i] = ResolveComparison (rc, expr, me);
+ }
+
+ eclass = ExprClass.Value;
+ return this;
+ }
+
+ static Expression ResolveComparison (ResolveContext rc, Expression expr, Expression instance)
+ {
+ if (expr is WildcardPattern)
+ return new EmptyExpression (expr.Type);
+
+ var res = Convert.ImplicitConversionRequired (rc, expr, instance.Type, expr.Location);
+ if (res == null)
+ return null;
+
+ if (expr is ComplexPatternExpression)
+ return new Is (instance, res, expr.Location).Resolve (rc);
+
+ // TODO: Better error handling
+ return new Binary (Binary.Operator.Equality, instance, res, expr.Location).Resolve (rc);
+ }
+
+ public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
+ {
+ instance.Store (ec);
+
+ base.EmitBranchable (ec, target, on_true);
+ }
+ }
+
+ class PropertyPatternMember
+ {
+ public PropertyPatternMember (string name, Expression expr, Location loc)
+ {
+ Name = name;
+ Expr = expr;
+ Location = loc;
+ }
+
+ public string Name { get; private set; }
+ public Expression Expr { get; private set; }
+ public Location Location { get; private set; }
+ }
+
+ abstract class PatternExpression : Expression
+ {
+ protected PatternExpression (Location loc)
+ {
+ this.loc = loc;
+ }
+
+ public override Expression CreateExpressionTree (ResolveContext ec)
+ {
+ throw new NotImplementedException ();
+ }
+ }
+
+ abstract class ComplexPatternExpression : PatternExpression
+ {
+ protected Expression[] comparisons;
+
+ protected ComplexPatternExpression (ATypeNameExpression typeExpresion, Location loc)
+ : base (loc)
+ {
+ TypeExpression = typeExpresion;
+ }
+
+ public ATypeNameExpression TypeExpression { get; private set; }
+
+ public override void Emit (EmitContext ec)
+ {
+ EmitBranchable (ec, ec.RecursivePatternLabel, false);
+ }
+
+ public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
+ {
+ if (comparisons != null) {
+ foreach (var comp in comparisons) {
+ comp.EmitBranchable (ec, target, false);
+ }
+ }
+ }
+ }
+
/// <summary>
/// Implementation of the `as' operator.
/// </summary>
public class As : Probe {
- Expression resolved_type;
-
+
public As (Expression expr, Expression probe_type, Location l)
: base (expr, probe_type, l)
{
@@ -1727,12 +2344,8 @@ namespace Mono.CSharp
protected override Expression DoResolve (ResolveContext ec)
{
- if (resolved_type == null) {
- resolved_type = base.DoResolve (ec);
-
- if (resolved_type == null)
- return null;
- }
+ if (ResolveCommon (ec) == null)
+ return null;
type = probe_type_expr;
eclass = ExprClass.Value;
@@ -2480,11 +3093,16 @@ namespace Mono.CSharp
}
public Binary (Operator oper, Expression left, Expression right)
+ : this (oper, left, right, left.Location)
+ {
+ }
+
+ public Binary (Operator oper, Expression left, Expression right, Location loc)
{
this.oper = oper;
this.left = left;
this.right = right;
- this.loc = left.Location;
+ this.loc = loc;
}
#region Properties
@@ -2618,46 +3236,57 @@ namespace Mono.CSharp
public override void FlowAnalysis (FlowAnalysisContext fc)
{
+ //
+ // Optimized version when on-true/on-false data are not needed
+ //
if ((oper & Operator.LogicalMask) == 0) {
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
left.FlowAnalysis (fc);
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
right.FlowAnalysis (fc);
return;
}
- //
- // Optimized version when on-true/on-false data are not needed
- //
- bool set_on_true_false;
- if (fc.DefiniteAssignmentOnTrue == null && fc.DefiniteAssignmentOnFalse == null) {
- fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignment;
- set_on_true_false = false;
- } else {
- set_on_true_false = true;
- }
-
- left.FlowAnalysis (fc);
- var left_fc = fc.DefiniteAssignment;
+ left.FlowAnalysisConditional (fc);
var left_fc_ontrue = fc.DefiniteAssignmentOnTrue;
var left_fc_onfalse = fc.DefiniteAssignmentOnFalse;
fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment = new DefiniteAssignmentBitSet (
oper == Operator.LogicalOr ? left_fc_onfalse : left_fc_ontrue);
- right.FlowAnalysis (fc);
- fc.DefiniteAssignment = left_fc;
+ right.FlowAnalysisConditional (fc);
- if (!set_on_true_false) {
- fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignmentOnTrue = null;
+ if (oper == Operator.LogicalOr)
+ fc.DefiniteAssignment = (left_fc_onfalse | (fc.DefiniteAssignmentOnFalse & fc.DefiniteAssignmentOnTrue)) & left_fc_ontrue;
+ else
+ fc.DefiniteAssignment = (left_fc_ontrue | (fc.DefiniteAssignmentOnFalse & fc.DefiniteAssignmentOnTrue)) & left_fc_onfalse;
+ }
+
+ public override void FlowAnalysisConditional (FlowAnalysisContext fc)
+ {
+ if ((oper & Operator.LogicalMask) == 0) {
+ base.FlowAnalysisConditional (fc);
return;
}
+ left.FlowAnalysisConditional (fc);
+ var left_fc_ontrue = fc.DefiniteAssignmentOnTrue;
+ var left_fc_onfalse = fc.DefiniteAssignmentOnFalse;
+
+ fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment = new DefiniteAssignmentBitSet (
+ oper == Operator.LogicalOr ? left_fc_onfalse : left_fc_ontrue);
+ right.FlowAnalysisConditional (fc);
+
+ var lc = left as Constant;
if (oper == Operator.LogicalOr) {
- fc.DefiniteAssignmentOnTrue = new DefiniteAssignmentBitSet (left_fc_ontrue);
fc.DefiniteAssignmentOnFalse = left_fc_onfalse | fc.DefiniteAssignmentOnFalse;
+ if (lc != null && lc.IsDefaultValue)
+ fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse;
+ else
+ fc.DefiniteAssignmentOnTrue = new DefiniteAssignmentBitSet (left_fc_ontrue & (left_fc_onfalse | fc.DefiniteAssignmentOnTrue));
} else {
fc.DefiniteAssignmentOnTrue = left_fc_ontrue | fc.DefiniteAssignmentOnTrue;
- fc.DefiniteAssignmentOnFalse = new DefiniteAssignmentBitSet (left_fc_onfalse);
+ if (lc != null && !lc.IsDefaultValue)
+ fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignmentOnTrue;
+ else
+ fc.DefiniteAssignmentOnFalse = new DefiniteAssignmentBitSet ((left_fc_ontrue | fc.DefiniteAssignmentOnFalse) & left_fc_onfalse);
}
}
@@ -2966,7 +3595,7 @@ namespace Mono.CSharp
if ((oper & Operator.BitwiseMask) != 0) {
expr = EmptyCast.Create (expr, type);
- AddEnumResultCast (type);
+ enum_conversion = GetEnumResultCast (type);
if (oper == Operator.BitwiseAnd && left.Type.IsEnum && right.Type.IsEnum) {
expr = OptimizeAndOperation (expr);
@@ -3168,11 +3797,21 @@ namespace Mono.CSharp
}
public static PredefinedOperator[] CreateStandardLiftedOperatorsTable (ModuleContainer module)
{
+ var types = module.Compiler.BuiltinTypes;
+
+ //
+ // Not strictly lifted but need to be in second group otherwise expressions like
+ // int + null would resolve to +(object, string) instead of +(int?, int?)
+ //
+ var string_operators = new [] {
+ new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
+ new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
+ };
+
var nullable = module.PredefinedTypes.Nullable.TypeSpec;
if (nullable == null)
- return new PredefinedOperator [0];
+ return string_operators;
- var types = module.Compiler.BuiltinTypes;
var bool_type = types.Bool;
var nullable_bool = nullable.MakeGenericType (module, new[] { bool_type });
@@ -3207,13 +3846,8 @@ namespace Mono.CSharp
new PredefinedOperator (nullable_long, nullable_int, Operator.NullableMask | Operator.ShiftMask),
new PredefinedOperator (nullable_ulong, nullable_int, Operator.NullableMask | Operator.ShiftMask),
- //
- // Not strictly lifted but need to be in second group otherwise expressions like
- // int + null would resolve to +(object, string) instead of +(int?, int?)
- //
- new PredefinedStringOperator (types.String, types.Object, Operator.AdditionMask, types.String),
- new PredefinedStringOperator (types.Object, types.String, Operator.AdditionMask, types.String),
-
+ string_operators [0],
+ string_operators [1]
};
}
@@ -3745,7 +4379,8 @@ namespace Mono.CSharp
return lifted.Resolve (rc);
}
} else if (rtype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (rtype).IsEnum) {
- if (left.IsNull) {
+ Nullable.Unwrap unwrap = null;
+ if (left.IsNull || right.IsNull) {
if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
left = Convert.ImplicitConversion (rc, left, rtype, left.Location);
@@ -3755,8 +4390,12 @@ namespace Mono.CSharp
if ((oper & Operator.BitwiseMask) != 0)
return Nullable.LiftedNull.CreateFromExpression (rc, this);
+ if (right.IsNull)
+ return CreateLiftedValueTypeResult (rc, left.Type);
+
// Equality operators are valid between E? and null
expr = left;
+ unwrap = new Nullable.Unwrap (right);
} else {
expr = Convert.ImplicitConversion (rc, left, Nullable.NullableInfo.GetUnderlyingType (rtype), loc);
if (expr == null)
@@ -3767,10 +4406,12 @@ namespace Mono.CSharp
var lifted = new Nullable.LiftedBinaryOperator (this);
lifted.Left = expr;
lifted.Right = right;
+ lifted.UnwrapRight = unwrap;
return lifted.Resolve (rc);
}
} else if (ltype.IsNullableType && Nullable.NullableInfo.GetUnderlyingType (ltype).IsEnum) {
- if (right.IsNull) {
+ Nullable.Unwrap unwrap = null;
+ if (right.IsNull || left.IsNull) {
if (rc.HasSet (ResolveContext.Options.ExpressionTreeConversion))
right = Convert.ImplicitConversion (rc, right, ltype, right.Location);
@@ -3780,8 +4421,12 @@ namespace Mono.CSharp
if ((oper & Operator.BitwiseMask) != 0)
return Nullable.LiftedNull.CreateFromExpression (rc, this);
+ if (left.IsNull)
+ return CreateLiftedValueTypeResult (rc, right.Type);
+
// Equality operators are valid between E? and null
expr = right;
+ unwrap = new Nullable.Unwrap (left);
} else {
expr = Convert.ImplicitConversion (rc, right, Nullable.NullableInfo.GetUnderlyingType (ltype), loc);
if (expr == null)
@@ -3791,6 +4436,7 @@ namespace Mono.CSharp
if (expr != null) {
var lifted = new Nullable.LiftedBinaryOperator (this);
lifted.Left = left;
+ lifted.UnwrapLeft = unwrap;
lifted.Right = expr;
return lifted.Resolve (rc);
}
@@ -3864,7 +4510,7 @@ namespace Mono.CSharp
else
expr = ConvertEnumAdditionalResult (expr, enum_type);
- AddEnumResultCast (expr.Type);
+ enum_conversion = GetEnumResultCast (expr.Type);
return expr;
}
@@ -3879,7 +4525,7 @@ namespace Mono.CSharp
else
expr = ConvertEnumAdditionalResult (expr, enum_type);
- AddEnumResultCast (expr.Type);
+ enum_conversion = GetEnumResultCast (expr.Type);
}
return expr;
@@ -3924,7 +4570,7 @@ namespace Mono.CSharp
return EmptyCast.Create (expr, result_type);
}
- void AddEnumResultCast (TypeSpec type)
+ public static ConvCast.Mode GetEnumResultCast (TypeSpec type)
{
if (type.IsNullableType)
type = Nullable.NullableInfo.GetUnderlyingType (type);
@@ -3934,18 +4580,16 @@ namespace Mono.CSharp
switch (type.BuiltinType) {
case BuiltinTypeSpec.Type.SByte:
- enum_conversion = ConvCast.Mode.I4_I1;
- break;
+ return ConvCast.Mode.I4_I1;
case BuiltinTypeSpec.Type.Byte:
- enum_conversion = ConvCast.Mode.I4_U1;
- break;
+ return ConvCast.Mode.I4_U1;
case BuiltinTypeSpec.Type.Short:
- enum_conversion = ConvCast.Mode.I4_I2;
- break;
+ return ConvCast.Mode.I4_I2;
case BuiltinTypeSpec.Type.UShort:
- enum_conversion = ConvCast.Mode.I4_U2;
- break;
+ return ConvCast.Mode.I4_U2;
}
+
+ return 0;
}
//
@@ -4339,24 +4983,27 @@ namespace Mono.CSharp
if (left.IsNull || right.IsNull) {
//
+ // The lifted operator produces a null value if one or both operands are null
+ //
+ if ((oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0) {
+ type = oper_method.ReturnType;
+ return Nullable.LiftedNull.CreateFromExpression (rc, this);
+ }
+
+ //
// The lifted operator produces the value false if one or both operands are null for
// relational operators.
//
- if ((oper & Operator.ComparisonMask) != 0) {
+ if ((oper & Operator.RelationalMask) != 0) {
//
// CSC BUG: This should be different warning, csc reports CS0458 with bool? which is wrong
// because return type is actually bool
//
- // For some reason CSC does not report this warning for equality operators
- //
return CreateLiftedValueTypeResult (rc, left.IsNull ? ptypes [1] : ptypes [0]);
}
- // The lifted operator produces a null value if one or both operands are null
- //
- if ((oper & (Operator.ArithmeticMask | Operator.ShiftMask | Operator.BitwiseMask)) != 0) {
- type = oper_method.ReturnType;
- return Nullable.LiftedNull.CreateFromExpression (rc, this);
+ if ((oper & Operator.EqualityMask) != 0 && ((left.IsNull && !right.Type.IsNullableType) || !left.Type.IsNullableType)) {
+ return CreateLiftedValueTypeResult (rc, left.IsNull ? ptypes [1] : ptypes [0]);
}
}
@@ -5036,7 +5683,7 @@ namespace Mono.CSharp
var method = res.ResolveMember<MethodSpec> (new ResolveContext (ec.MemberContext), ref arguments);
if (method != null) {
var call = new CallEmitter ();
- call.EmitPredefined (ec, method, arguments);
+ call.EmitPredefined (ec, method, arguments, false);
}
}
@@ -5526,24 +6173,38 @@ namespace Mono.CSharp
public override void FlowAnalysis (FlowAnalysisContext fc)
{
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
+ expr.FlowAnalysisConditional (fc);
+ var expr_true = fc.DefiniteAssignmentOnTrue;
+ var expr_false = fc.DefiniteAssignmentOnFalse;
- expr.FlowAnalysis (fc);
- var da_true = fc.DefiniteAssignmentOnTrue;
- var da_false = fc.DefiniteAssignmentOnFalse;
-
- fc.DefiniteAssignment = new DefiniteAssignmentBitSet (da_true);
+ fc.DefiniteAssignment = new DefiniteAssignmentBitSet (expr_true);
true_expr.FlowAnalysis (fc);
var true_fc = fc.DefiniteAssignment;
- fc.DefiniteAssignment = new DefiniteAssignmentBitSet (da_false);
+ fc.DefiniteAssignment = new DefiniteAssignmentBitSet (expr_false);
false_expr.FlowAnalysis (fc);
fc.DefiniteAssignment &= true_fc;
- if (fc.DefiniteAssignmentOnTrue != null)
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignment;
- if (fc.DefiniteAssignmentOnFalse != null)
- fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
+ }
+
+ public override void FlowAnalysisConditional (FlowAnalysisContext fc)
+ {
+ expr.FlowAnalysisConditional (fc);
+ var expr_true = fc.DefiniteAssignmentOnTrue;
+ var expr_false = fc.DefiniteAssignmentOnFalse;
+
+ fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment = new DefiniteAssignmentBitSet (expr_true);
+ true_expr.FlowAnalysisConditional (fc);
+ var true_fc = fc.DefiniteAssignment;
+ var true_da_true = fc.DefiniteAssignmentOnTrue;
+ var true_da_false = fc.DefiniteAssignmentOnFalse;
+
+ fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment = new DefiniteAssignmentBitSet (expr_false);
+ false_expr.FlowAnalysisConditional (fc);
+
+ fc.DefiniteAssignment &= true_fc;
+ fc.DefiniteAssignmentOnTrue = true_da_true & fc.DefiniteAssignmentOnTrue;
+ fc.DefiniteAssignmentOnFalse = true_da_false & fc.DefiniteAssignmentOnFalse;
}
protected override void CloneTo (CloneContext clonectx, Expression t)
@@ -6083,7 +6744,7 @@ namespace Mono.CSharp
fc.SetVariableAssigned (variable_info);
}
}
-
+
/// <summary>
/// Invocation of methods or delegates.
/// </summary>
@@ -6113,6 +6774,7 @@ namespace Mono.CSharp
protected Arguments arguments;
protected Expression expr;
protected MethodGroupExpr mg;
+ bool conditional_access_receiver;
public Invocation (Expression expr, Arguments arguments)
{
@@ -6225,14 +6887,34 @@ namespace Mono.CSharp
return CreateExpressionFactoryCall (ec, "Call", args);
}
- protected override Expression DoResolve (ResolveContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
+ {
+ if (!rc.HasSet (ResolveContext.Options.ConditionalAccessReceiver)) {
+ if (expr.HasConditionalAccess ()) {
+ conditional_access_receiver = true;
+ using (rc.Set (ResolveContext.Options.ConditionalAccessReceiver)) {
+ return DoResolveInvocation (rc);
+ }
+ }
+ }
+
+ return DoResolveInvocation (rc);
+ }
+
+ Expression DoResolveInvocation (ResolveContext ec)
{
Expression member_expr;
var atn = expr as ATypeNameExpression;
if (atn != null) {
member_expr = atn.LookupNameExpression (ec, MemberLookupRestrictions.InvocableOnly | MemberLookupRestrictions.ReadAccess);
- if (member_expr != null)
+ if (member_expr != null) {
+ var name_of = member_expr as NameOf;
+ if (name_of != null) {
+ return name_of.ResolveOverload (ec, arguments);
+ }
+
member_expr = member_expr.Resolve (ec);
+ }
} else {
member_expr = expr.Resolve (ec);
}
@@ -6256,7 +6938,7 @@ namespace Mono.CSharp
if (mg == null) {
if (expr_type != null && expr_type.IsDelegate) {
- invoke = new DelegateInvocation (member_expr, arguments, loc);
+ invoke = new DelegateInvocation (member_expr, arguments, conditional_access_receiver, loc);
invoke = invoke.Resolve (ec);
if (invoke == null || !dynamic_arg)
return invoke;
@@ -6290,7 +6972,9 @@ namespace Mono.CSharp
var method = mg.BestCandidate;
type = mg.BestCandidateReturnType;
-
+ if (conditional_access_receiver)
+ type = LiftMemberType (ec, type);
+
if (arguments == null && method.DeclaringType.BuiltinType == BuiltinTypeSpec.Type.Object && method.Name == Destructor.MetadataName) {
if (mg.IsBase)
ec.Report.Error (250, loc, "Do not directly call your base class Finalize method. It is called automatically from your destructor");
@@ -6371,10 +7055,13 @@ namespace Mono.CSharp
if (mg.IsConditionallyExcluded)
return;
- mg.FlowAnalysis (fc);
+ mg.FlowAnalysis (fc);
if (arguments != null)
arguments.FlowAnalysis (fc);
+
+ if (conditional_access_receiver)
+ fc.ConditionalAccessEnd ();
}
public override string GetSignatureForError ()
@@ -6382,6 +7069,11 @@ namespace Mono.CSharp
return mg.GetSignatureForError ();
}
+ public override bool HasConditionalAccess ()
+ {
+ return expr.HasConditionalAccess ();
+ }
+
//
// If a member is a method or event, or if it is a constant, field or property of either a delegate type
// or the type dynamic, then the member is invocable
@@ -6420,18 +7112,21 @@ namespace Mono.CSharp
if (mg.IsConditionallyExcluded)
return;
- mg.EmitCall (ec, arguments);
+ if (conditional_access_receiver)
+ mg.EmitCall (ec, arguments, type, false);
+ else
+ mg.EmitCall (ec, arguments, false);
}
public override void EmitStatement (EmitContext ec)
{
- Emit (ec);
+ if (mg.IsConditionallyExcluded)
+ return;
- //
- // Pop the return value if there is one
- //
- if (type.Kind != MemberKind.Void)
- ec.Emit (OpCodes.Pop);
+ if (conditional_access_receiver)
+ mg.EmitCall (ec, arguments, type, true);
+ else
+ mg.EmitCall (ec, arguments, true);
}
public override SLE.Expression MakeExpression (BuilderContext ctx)
@@ -6673,46 +7368,14 @@ namespace Mono.CSharp
return this;
}
- bool DoEmitTypeParameter (EmitContext ec)
+ void DoEmitTypeParameter (EmitContext ec)
{
var m = ec.Module.PredefinedMembers.ActivatorCreateInstance.Resolve (loc);
if (m == null)
- return true;
+ return;
var ctor_factory = m.MakeGenericMethod (ec.MemberContext, type);
- var tparam = (TypeParameterSpec) type;
-
- if (tparam.IsReferenceType) {
- ec.Emit (OpCodes.Call, ctor_factory);
- return true;
- }
-
- // Allow DoEmit() to be called multiple times.
- // We need to create a new LocalTemporary each time since
- // you can't share LocalBuilders among ILGeneators.
- LocalTemporary temp = new LocalTemporary (type);
-
- Label label_activator = ec.DefineLabel ();
- Label label_end = ec.DefineLabel ();
-
- temp.AddressOf (ec, AddressOp.Store);
- ec.Emit (OpCodes.Initobj, type);
-
- temp.Emit (ec);
- ec.Emit (OpCodes.Box, type);
- ec.Emit (OpCodes.Brfalse, label_activator);
-
- temp.AddressOf (ec, AddressOp.Store);
- ec.Emit (OpCodes.Initobj, type);
- temp.Emit (ec);
- temp.Release (ec);
- ec.Emit (OpCodes.Br_S, label_end);
-
- ec.MarkLabel (label_activator);
-
ec.Emit (OpCodes.Call, ctor_factory);
- ec.MarkLabel (label_end);
- return true;
}
//
@@ -6744,7 +7407,7 @@ namespace Mono.CSharp
//
public virtual bool Emit (EmitContext ec, IMemoryLocation target)
{
- bool is_value_type = TypeSpec.IsValueType (type);
+ bool is_value_type = type.IsStructOrEnum;
VariableReference vr = target as VariableReference;
if (target != null && is_value_type && (vr != null || method == null)) {
@@ -6773,8 +7436,10 @@ namespace Mono.CSharp
}
}
- if (type is TypeParameterSpec)
- return DoEmitTypeParameter (ec);
+ if (type is TypeParameterSpec) {
+ DoEmitTypeParameter (ec);
+ return true;
+ }
ec.MarkCallEntry (loc);
ec.Emit (OpCodes.Newobj, method);
@@ -6784,7 +7449,7 @@ namespace Mono.CSharp
public override void Emit (EmitContext ec)
{
LocalTemporary v = null;
- if (method == null && TypeSpec.IsValueType (type)) {
+ if (method == null && type.IsStructOrEnum) {
// TODO: Use temporary variable from pool
v = new LocalTemporary (type);
}
@@ -7794,14 +8459,28 @@ namespace Mono.CSharp
: base (loc)
{
this.type = type;
- eclass = ExprClass.Variable;
}
- protected override Expression DoResolve (ResolveContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
{
+ eclass = ExprClass.Variable;
+
+ var block = rc.CurrentBlock;
+ if (block != null) {
+ var top = block.ParametersBlock.TopBlock;
+ if (top.ThisVariable != null)
+ variable_info = top.ThisVariable.VariableInfo;
+
+ }
+
return this;
}
+ public override Expression DoResolveLValue (ResolveContext rc, Expression right_side)
+ {
+ return DoResolve (rc);
+ }
+
public override HoistedVariable GetHoistedVariable (AnonymousExpression ae)
{
return null;
@@ -7834,7 +8513,7 @@ namespace Mono.CSharp
}
}
- VariableInfo variable_info;
+ protected VariableInfo variable_info;
public This (Location loc)
{
@@ -8372,7 +9051,7 @@ namespace Mono.CSharp
// Pointer types are allowed without explicit unsafe, they are just tokens
//
using (ec.Set (ResolveContext.Options.UnsafeScope)) {
- typearg = QueriedType.ResolveAsType (ec);
+ typearg = QueriedType.ResolveAsType (ec, true);
}
if (typearg == null)
@@ -8692,27 +9371,35 @@ namespace Mono.CSharp
}
}
- public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext ec)
+ public FullNamedExpression CreateExpressionFromAlias (IMemberContext mc)
{
- if (alias == GlobalAlias) {
- expr = new NamespaceExpression (ec.Module.GlobalRootNamespace, loc);
- return base.ResolveAsTypeOrNamespace (ec);
- }
+ if (alias == GlobalAlias)
+ return new NamespaceExpression (mc.Module.GlobalRootNamespace, loc);
- int errors = ec.Module.Compiler.Report.Errors;
- expr = ec.LookupNamespaceAlias (alias);
+ int errors = mc.Module.Compiler.Report.Errors;
+ var expr = mc.LookupNamespaceAlias (alias);
if (expr == null) {
- if (errors == ec.Module.Compiler.Report.Errors)
- ec.Module.Compiler.Report.Error (432, loc, "Alias `{0}' not found", alias);
+ if (errors == mc.Module.Compiler.Report.Errors)
+ mc.Module.Compiler.Report.Error (432, loc, "Alias `{0}' not found", alias);
+
return null;
}
-
- return base.ResolveAsTypeOrNamespace (ec);
+
+ return expr;
}
- protected override Expression DoResolve (ResolveContext ec)
+ public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc, bool allowUnboundTypeArguments)
{
- return ResolveAsTypeOrNamespace (ec);
+ expr = CreateExpressionFromAlias (mc);
+ if (expr == null)
+ return null;
+
+ return base.ResolveAsTypeOrNamespace (mc, allowUnboundTypeArguments);
+ }
+
+ protected override Expression DoResolve (ResolveContext rc)
+ {
+ return ResolveAsTypeOrNamespace (rc, false);
}
public override string GetSignatureForError ()
@@ -8725,6 +9412,11 @@ namespace Mono.CSharp
return alias + "::" + name;
}
+ public override bool HasConditionalAccess ()
+ {
+ return false;
+ }
+
public override Expression LookupNameExpression (ResolveContext rc, MemberLookupRestrictions restrictions)
{
if ((restrictions & MemberLookupRestrictions.InvocableOnly) != 0) {
@@ -8824,6 +9516,11 @@ namespace Mono.CSharp
expr.Error_OperatorCannotBeApplied (rc, loc, ".", type);
}
+ public override bool HasConditionalAccess ()
+ {
+ return LeftExpression.HasConditionalAccess ();
+ }
+
public static bool IsValidDotExpression (TypeSpec type)
{
const MemberKind dot_kinds = MemberKind.Class | MemberKind.Struct | MemberKind.Delegate | MemberKind.Enum |
@@ -8852,7 +9549,9 @@ namespace Mono.CSharp
expr = null;
}
} else {
- expr = expr.Resolve (rc, flags);
+ using (rc.Set (ResolveContext.Options.ConditionalAccessReceiver)) {
+ expr = expr.Resolve (rc, flags);
+ }
}
if (expr == null)
@@ -8885,6 +9584,19 @@ namespace Mono.CSharp
return new DynamicMemberBinder (Name, args, loc);
}
+ var cma = this as ConditionalMemberAccess;
+ if (cma != null) {
+ if (!IsNullPropagatingValid (expr.Type)) {
+ expr.Error_OperatorCannotBeApplied (rc, loc, "?", expr.Type);
+ return null;
+ }
+
+ if (expr_type.IsNullableType) {
+ expr = Nullable.Unwrap.Create (expr, true).Resolve (rc);
+ expr_type = expr.Type;
+ }
+ }
+
if (!IsValidDotExpression (expr_type)) {
Error_OperatorCannotBeApplied (rc, expr_type);
return null;
@@ -8910,6 +9622,9 @@ namespace Mono.CSharp
emg.SetTypeArguments (rc, targs);
}
+ if (cma != null)
+ emg.ConditionalAccess = true;
+
// TODO: it should really skip the checks bellow
return emg.Resolve (rc);
}
@@ -8973,6 +9688,10 @@ namespace Mono.CSharp
sn = null;
}
+ if (cma != null) {
+ me.ConditionalAccess = true;
+ }
+
me = me.ResolveMemberAccess (rc, expr, sn);
if (Arity > 0) {
@@ -8985,7 +9704,7 @@ namespace Mono.CSharp
return me;
}
- public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext rc)
+ public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext rc, bool allowUnboundTypeArguments)
{
FullNamedExpression fexpr = expr as FullNamedExpression;
if (fexpr == null) {
@@ -8993,7 +9712,7 @@ namespace Mono.CSharp
return null;
}
- FullNamedExpression expr_resolved = fexpr.ResolveAsTypeOrNamespace (rc);
+ FullNamedExpression expr_resolved = fexpr.ResolveAsTypeOrNamespace (rc, allowUnboundTypeArguments);
if (expr_resolved == null)
return null;
@@ -9004,10 +9723,17 @@ namespace Mono.CSharp
if (retval == null) {
ns.Error_NamespaceDoesNotExist (rc, Name, Arity);
- } else if (HasTypeArguments) {
- retval = new GenericTypeExpr (retval.Type, targs, loc);
- if (retval.ResolveAsType (rc) == null)
- return null;
+ } else if (Arity > 0) {
+ if (HasTypeArguments) {
+ retval = new GenericTypeExpr (retval.Type, targs, loc);
+ if (retval.ResolveAsType (rc) == null)
+ return null;
+ } else {
+ if (!allowUnboundTypeArguments)
+ Error_OpenGenericTypeIsNotAllowed (rc);
+
+ retval = new GenericOpenTypeExpr (retval.Type, loc);
+ }
}
return retval;
@@ -9037,7 +9763,7 @@ namespace Mono.CSharp
nested = MemberCache.FindNestedType (expr_type, Name, Arity);
if (nested == null) {
if (expr_type == tnew_expr) {
- Error_IdentifierNotFound (rc, expr_type, Name);
+ Error_IdentifierNotFound (rc, expr_type);
return null;
}
@@ -9065,8 +9791,13 @@ namespace Mono.CSharp
if (HasTypeArguments) {
texpr = new GenericTypeExpr (nested, targs, loc);
} else {
+ if (!allowUnboundTypeArguments || expr_resolved is GenericTypeExpr) // && HasTypeArguments
+ Error_OpenGenericTypeIsNotAllowed (rc);
+
texpr = new GenericOpenTypeExpr (nested, loc);
}
+ } else if (expr_resolved is GenericOpenTypeExpr) {
+ texpr = new GenericOpenTypeExpr (nested, loc);
} else {
texpr = new TypeExpression (nested, loc);
}
@@ -9077,7 +9808,7 @@ namespace Mono.CSharp
return texpr;
}
- protected virtual void Error_IdentifierNotFound (IMemberContext rc, TypeSpec expr_type, string identifier)
+ public void Error_IdentifierNotFound (IMemberContext rc, TypeSpec expr_type)
{
var nested = MemberCache.FindNestedType (expr_type, Name, -System.Math.Max (1, Arity));
@@ -9142,6 +9873,19 @@ namespace Mono.CSharp
}
}
+ public class ConditionalMemberAccess : MemberAccess
+ {
+ public ConditionalMemberAccess (Expression expr, string identifier, TypeArguments args, Location loc)
+ : base (expr, identifier, args, loc)
+ {
+ }
+
+ public override bool HasConditionalAccess ()
+ {
+ return true;
+ }
+ }
+
/// <summary>
/// Implements checked expressions
/// </summary>
@@ -9307,6 +10051,8 @@ namespace Mono.CSharp
this.Arguments = args;
}
+ public bool ConditionalAccess { get; set; }
+
public override Location StartLocation {
get {
return Expr.StartLocation;
@@ -9322,10 +10068,24 @@ namespace Mono.CSharp
// We perform some simple tests, and then to "split" the emit and store
// code we create an instance of a different class, and return that.
//
- Expression CreateAccessExpression (ResolveContext ec)
+ Expression CreateAccessExpression (ResolveContext ec, bool conditionalAccessReceiver)
{
+ Expr = Expr.Resolve (ec);
+ if (Expr == null)
+ return null;
+
+ type = Expr.Type;
+
+ if (ConditionalAccess && !IsNullPropagatingValid (type)) {
+ Error_OperatorCannotBeApplied (ec, loc, "?", type);
+ return null;
+ }
+
if (type.IsArray)
- return (new ArrayAccess (this, loc));
+ return new ArrayAccess (this, loc) {
+ ConditionalAccess = ConditionalAccess,
+ ConditionalAccessReceiver = conditionalAccessReceiver
+ };
if (type.IsPointer)
return MakePointerAccess (ec, type);
@@ -9340,14 +10100,18 @@ namespace Mono.CSharp
var indexers = MemberCache.FindMembers (type, MemberCache.IndexerNameAlias, false);
if (indexers != null || type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
- return new IndexerExpr (indexers, type, this);
- }
+ var indexer = new IndexerExpr (indexers, type, this) {
+ ConditionalAccess = ConditionalAccess
+ };
- if (type != InternalType.ErrorType) {
- ec.Report.Error (21, loc, "Cannot apply indexing with [] to an expression of type `{0}'",
- type.GetSignatureForError ());
+ if (conditionalAccessReceiver)
+ indexer.SetConditionalAccessReceiver ();
+
+ return indexer;
}
+ Error_CannotApplyIndexing (ec, type, loc);
+
return null;
}
@@ -9359,6 +10123,19 @@ namespace Mono.CSharp
return CreateExpressionFactoryCall (ec, "ArrayIndex", args);
}
+ public static void Error_CannotApplyIndexing (ResolveContext rc, TypeSpec type, Location loc)
+ {
+ if (type != InternalType.ErrorType) {
+ rc.Report.Error (21, loc, "Cannot apply indexing with [] to an expression of type `{0}'",
+ type.GetSignatureForError ());
+ }
+ }
+
+ public override bool HasConditionalAccess ()
+ {
+ return ConditionalAccess || Expr.HasConditionalAccess ();
+ }
+
Expression MakePointerAccess (ResolveContext rc, TypeSpec type)
{
if (Arguments.Count != 1){
@@ -9380,31 +10157,31 @@ namespace Mono.CSharp
return new Indirection (p, loc);
}
- protected override Expression DoResolve (ResolveContext ec)
+ protected override Expression DoResolve (ResolveContext rc)
{
- Expr = Expr.Resolve (ec);
- if (Expr == null)
- return null;
+ Expression expr;
+ if (!rc.HasSet (ResolveContext.Options.ConditionalAccessReceiver)) {
+ if (HasConditionalAccess ()) {
+ using (rc.Set (ResolveContext.Options.ConditionalAccessReceiver)) {
+ expr = CreateAccessExpression (rc, true);
+ if (expr == null)
+ return null;
- type = Expr.Type;
+ return expr.Resolve (rc);
+ }
+ }
+ }
- // TODO: Create 1 result for Resolve and ResolveLValue ?
- var res = CreateAccessExpression (ec);
- if (res == null)
+ expr = CreateAccessExpression (rc, false);
+ if (expr == null)
return null;
- return res.Resolve (ec);
+ return expr.Resolve (rc);
}
public override Expression DoResolveLValue (ResolveContext ec, Expression rhs)
{
- Expr = Expr.Resolve (ec);
- if (Expr == null)
- return null;
-
- type = Expr.Type;
-
- var res = CreateAccessExpression (ec);
+ var res = CreateAccessExpression (ec, false);
if (res == null)
return null;
@@ -9424,6 +10201,10 @@ namespace Mono.CSharp
public override void FlowAnalysis (FlowAnalysisContext fc)
{
Expr.FlowAnalysis (fc);
+
+ if (ConditionalAccess)
+ fc.BranchConditionalAccessDefiniteAssignment ();
+
Arguments.FlowAnalysis (fc);
}
@@ -9466,6 +10247,10 @@ namespace Mono.CSharp
loc = l;
}
+ public bool ConditionalAccess { get; set; }
+
+ public bool ConditionalAccessReceiver { get; set; }
+
public void AddressOf (EmitContext ec, AddressOp mode)
{
var ac = (ArrayContainer) ea.Expr.Type;
@@ -9484,6 +10269,9 @@ namespace Mono.CSharp
public override Expression CreateExpressionTree (ResolveContext ec)
{
+ if (ConditionalAccess)
+ Error_NullShortCircuitInsideExpressionTree (ec);
+
return ea.CreateExpressionTree (ec);
}
@@ -9494,6 +10282,9 @@ namespace Mono.CSharp
public override Expression DoResolveLValue (ResolveContext ec, Expression right_side)
{
+ if (ConditionalAccess)
+ throw new NotSupportedException ("null propagating operator assignment");
+
return DoResolve (ec);
}
@@ -9516,9 +10307,13 @@ namespace Mono.CSharp
UnsafeError (ec, ea.Location);
}
+ if (ConditionalAccessReceiver)
+ type = LiftMemberType (ec, type);
+
foreach (Argument a in ea.Arguments) {
- if (a is NamedArgument)
- ElementAccess.Error_NamedArgument ((NamedArgument) a, ec.Report);
+ var na = a as NamedArgument;
+ if (na != null)
+ ElementAccess.Error_NamedArgument (na, ec.Report);
a.Expr = ConvertExpressionToArrayIndex (ec, a.Expr);
}
@@ -9545,15 +10340,17 @@ namespace Mono.CSharp
{
if (prepareAwait) {
ea.Expr = ea.Expr.EmitToField (ec);
- } else if (duplicateArguments) {
- ea.Expr.Emit (ec);
- ec.Emit (OpCodes.Dup);
-
- var copy = new LocalTemporary (ea.Expr.Type);
- copy.Store (ec);
- ea.Expr = copy;
} else {
- ea.Expr.Emit (ec);
+ var ie = new InstanceEmitter (ea.Expr, false);
+ ie.Emit (ec, ConditionalAccess);
+
+ if (duplicateArguments) {
+ ec.Emit (OpCodes.Dup);
+
+ var copy = new LocalTemporary (ea.Expr.Type);
+ copy.Store (ec);
+ ea.Expr = copy;
+ }
}
var dup_args = ea.Arguments.Emit (ec, duplicateArguments, prepareAwait);
@@ -9563,8 +10360,6 @@ namespace Mono.CSharp
public void Emit (EmitContext ec, bool leave_copy)
{
- var ac = ea.Expr.Type as ArrayContainer;
-
if (prepared) {
ec.EmitLoadFromPtr (type);
} else {
@@ -9572,8 +10367,15 @@ namespace Mono.CSharp
LoadInstanceAndArguments (ec, false, true);
}
+ if (ConditionalAccessReceiver)
+ ec.ConditionalAccess = new ConditionalAccessContext (type, ec.DefineLabel ());
+
+ var ac = (ArrayContainer) ea.Expr.Type;
LoadInstanceAndArguments (ec, false, false);
ec.EmitArrayLoad (ac);
+
+ if (ConditionalAccessReceiver)
+ ec.CloseConditionalAccess (type.IsNullableType && type != ac.Element ? type : null);
}
if (leave_copy) {
@@ -9699,19 +10501,24 @@ namespace Mono.CSharp
//
// Indexer access expression
//
- sealed class IndexerExpr : PropertyOrIndexerExpr<IndexerSpec>, OverloadResolver.IBaseMembersProvider
+ class IndexerExpr : PropertyOrIndexerExpr<IndexerSpec>, OverloadResolver.IBaseMembersProvider
{
IList<MemberSpec> indexers;
Arguments arguments;
TypeSpec queried_type;
public IndexerExpr (IList<MemberSpec> indexers, TypeSpec queriedType, ElementAccess ea)
- : base (ea.Location)
+ : this (indexers, queriedType, ea.Expr, ea.Arguments, ea.Location)
+ {
+ }
+
+ public IndexerExpr (IList<MemberSpec> indexers, TypeSpec queriedType, Expression instance, Arguments args, Location loc)
+ : base (loc)
{
this.indexers = indexers;
this.queried_type = queriedType;
- this.InstanceExpression = ea.Expr;
- this.arguments = ea.Arguments;
+ this.InstanceExpression = instance;
+ this.arguments = args;
}
#region Properties
@@ -9762,6 +10569,10 @@ namespace Mono.CSharp
public override Expression CreateExpressionTree (ResolveContext ec)
{
+ if (ConditionalAccess) {
+ Error_NullShortCircuitInsideExpressionTree (ec);
+ }
+
Arguments args = Arguments.CreateForExpressionTree (ec, arguments,
InstanceExpression.CreateExpressionTree (ec),
new TypeOfMethod (Getter, loc));
@@ -9838,9 +10649,11 @@ namespace Mono.CSharp
public override void FlowAnalysis (FlowAnalysisContext fc)
{
- // TODO: Check the order
base.FlowAnalysis (fc);
arguments.FlowAnalysis (fc);
+
+ if (conditional_access_receiver)
+ fc.ConditionalAccessEnd ();
}
public override string GetSignatureForError ()
@@ -9934,6 +10747,11 @@ namespace Mono.CSharp
target.arguments = arguments.Clone (clonectx);
}
+ public void SetConditionalAccessReceiver ()
+ {
+ conditional_access_receiver = true;
+ }
+
public override void SetTypeArguments (ResolveContext ec, TypeArguments ta)
{
Error_TypeArgumentsCannotBeUsed (ec, "indexer", GetSignatureForError (), loc);
@@ -10096,6 +10914,10 @@ namespace Mono.CSharp
// nothing, as we only exist to not do anything.
}
+ public override void EmitBranchable (EmitContext ec, Label target, bool on_true)
+ {
+ }
+
public override void EmitSideEffect (EmitContext ec)
{
}
@@ -10356,7 +11178,7 @@ namespace Mono.CSharp
this.loc = left.Location;
}
- public override TypeSpec ResolveAsType (IMemberContext ec)
+ public override TypeSpec ResolveAsType (IMemberContext ec, bool allowUnboundTypeArguments)
{
type = left.ResolveAsType (ec);
if (type == null)
@@ -10627,6 +11449,12 @@ namespace Mono.CSharp
{
this.Name = name;
}
+
+ public bool IsDictionaryInitializer {
+ get {
+ return Name == null;
+ }
+ }
protected override void CloneTo (CloneContext clonectx, Expression t)
{
@@ -10663,70 +11491,80 @@ namespace Mono.CSharp
if (source == null)
return EmptyExpressionStatement.Instance;
- var t = ec.CurrentInitializerVariable.Type;
+ if (!ResolveElement (ec))
+ return null;
+
+ if (source is CollectionOrObjectInitializers) {
+ Expression previous = ec.CurrentInitializerVariable;
+ ec.CurrentInitializerVariable = target;
+ source = source.Resolve (ec);
+ ec.CurrentInitializerVariable = previous;
+ if (source == null)
+ return null;
+
+ eclass = source.eclass;
+ type = source.Type;
+ return this;
+ }
+
+ return base.DoResolve (ec);
+ }
+
+ public override void EmitStatement (EmitContext ec)
+ {
+ if (source is CollectionOrObjectInitializers)
+ source.Emit (ec);
+ else
+ base.EmitStatement (ec);
+ }
+
+ protected virtual bool ResolveElement (ResolveContext rc)
+ {
+ var t = rc.CurrentInitializerVariable.Type;
if (t.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
Arguments args = new Arguments (1);
- args.Add (new Argument (ec.CurrentInitializerVariable));
+ args.Add (new Argument (rc.CurrentInitializerVariable));
target = new DynamicMemberBinder (Name, args, loc);
} else {
- var member = MemberLookup (ec, false, t, Name, 0, MemberLookupRestrictions.ExactArity, loc);
+ var member = MemberLookup (rc, false, t, Name, 0, MemberLookupRestrictions.ExactArity, loc);
if (member == null) {
- member = Expression.MemberLookup (ec, true, t, Name, 0, MemberLookupRestrictions.ExactArity, loc);
+ member = Expression.MemberLookup (rc, true, t, Name, 0, MemberLookupRestrictions.ExactArity, loc);
if (member != null) {
// TODO: ec.Report.SymbolRelatedToPreviousError (member);
- ErrorIsInaccesible (ec, member.GetSignatureForError (), loc);
- return null;
+ ErrorIsInaccesible (rc, member.GetSignatureForError (), loc);
+ return false;
}
}
if (member == null) {
- Error_TypeDoesNotContainDefinition (ec, loc, t, Name);
- return null;
+ Error_TypeDoesNotContainDefinition (rc, loc, t, Name);
+ return false;
}
- if (!(member is PropertyExpr || member is FieldExpr)) {
- ec.Report.Error (1913, loc,
+ var me = member as MemberExpr;
+ if (me is EventExpr) {
+ me = me.ResolveMemberAccess (rc, null, null);
+ } else if (!(member is PropertyExpr || member is FieldExpr)) {
+ rc.Report.Error (1913, loc,
"Member `{0}' cannot be initialized. An object initializer may only be used for fields, or properties",
member.GetSignatureForError ());
- return null;
+ return false;
}
- var me = member as MemberExpr;
if (me.IsStatic) {
- ec.Report.Error (1914, loc,
+ rc.Report.Error (1914, loc,
"Static field or property `{0}' cannot be assigned in an object initializer",
me.GetSignatureForError ());
}
target = me;
- me.InstanceExpression = ec.CurrentInitializerVariable;
+ me.InstanceExpression = rc.CurrentInitializerVariable;
}
- if (source is CollectionOrObjectInitializers) {
- Expression previous = ec.CurrentInitializerVariable;
- ec.CurrentInitializerVariable = target;
- source = source.Resolve (ec);
- ec.CurrentInitializerVariable = previous;
- if (source == null)
- return null;
-
- eclass = source.eclass;
- type = source.Type;
- return this;
- }
-
- return base.DoResolve (ec);
- }
-
- public override void EmitStatement (EmitContext ec)
- {
- if (source is CollectionOrObjectInitializers)
- source.Emit (ec);
- else
- base.EmitStatement (ec);
+ return true;
}
}
@@ -10809,6 +11647,40 @@ namespace Mono.CSharp
return base.DoResolve (ec);
}
}
+
+ class DictionaryElementInitializer : ElementInitializer
+ {
+ readonly Arguments args;
+
+ public DictionaryElementInitializer (List<Expression> arguments, Expression initializer, Location loc)
+ : base (null, initializer, loc)
+ {
+ this.args = new Arguments (arguments.Count);
+ foreach (var arg in arguments)
+ this.args.Add (new Argument (arg));
+ }
+
+ public override Expression CreateExpressionTree (ResolveContext ec)
+ {
+ ec.Report.Error (8074, loc, "Expression tree cannot contain a dictionary initializer");
+ return null;
+ }
+
+ protected override bool ResolveElement (ResolveContext rc)
+ {
+ var init = rc.CurrentInitializerVariable;
+ var type = init.Type;
+
+ var indexers = MemberCache.FindMembers (type, MemberCache.IndexerNameAlias, false);
+ if (indexers == null && type.BuiltinType != BuiltinTypeSpec.Type.Dynamic) {
+ ElementAccess.Error_CannotApplyIndexing (rc, type, loc);
+ return false;
+ }
+
+ target = new IndexerExpr (indexers, type, init, args, loc).Resolve (rc);
+ return true;
+ }
+ }
//
// A block of object or collection initializers
@@ -10896,8 +11768,9 @@ namespace Mono.CSharp
if (i == 0) {
if (element_initializer != null) {
element_names = new List<string> (initializers.Count);
- element_names.Add (element_initializer.Name);
- } else if (initializer is CompletingExpression){
+ if (!element_initializer.IsDictionaryInitializer)
+ element_names.Add (element_initializer.Name);
+ } else if (initializer is CompletingExpression) {
initializer.Resolve (ec);
throw new InternalErrorException ("This line should never be reached");
} else {
@@ -10920,7 +11793,7 @@ namespace Mono.CSharp
continue;
}
- if (!is_collection_initialization) {
+ if (!is_collection_initialization && !element_initializer.IsDictionaryInitializer) {
if (element_names.Contains (element_initializer.Name)) {
ec.Report.Error (1912, element_initializer.Location,
"An object initializer includes more than one member `{0}' initialization",
@@ -10966,8 +11839,10 @@ namespace Mono.CSharp
public override void FlowAnalysis (FlowAnalysisContext fc)
{
- foreach (var initializer in initializers)
- initializer.FlowAnalysis (fc);
+ foreach (var initializer in initializers) {
+ if (initializer != null)
+ initializer.FlowAnalysis (fc);
+ }
}
}
diff --git a/mcs/mcs/field.cs b/mcs/mcs/field.cs
index 278f71e0f18..e3555b9383e 100644
--- a/mcs/mcs/field.cs
+++ b/mcs/mcs/field.cs
@@ -709,7 +709,7 @@ namespace Mono.CSharp
loc = parameter.Location;
}
- public override TypeSpec ResolveAsType (IMemberContext mc)
+ public override TypeSpec ResolveAsType (IMemberContext mc, bool allowUnboundTypeArguments)
{
return parameter.Type;
}
diff --git a/mcs/mcs/flowanalysis.cs b/mcs/mcs/flowanalysis.cs
index 4f54f268d29..dbb74a7515a 100644
--- a/mcs/mcs/flowanalysis.cs
+++ b/mcs/mcs/flowanalysis.cs
@@ -139,15 +139,22 @@ namespace Mono.CSharp
var field = struct_info.Fields[i];
if (!fc.IsStructFieldDefinitelyAssigned (vi, field.Name)) {
- if (field.MemberDefinition is Property.BackingField) {
+ var bf = field.MemberDefinition as Property.BackingField;
+ if (bf != null) {
+ if (bf.Initializer != null)
+ continue;
+
fc.Report.Error (843, loc,
"An automatically implemented property `{0}' must be fully assigned before control leaves the constructor. Consider calling the default struct contructor from a constructor initializer",
field.GetSignatureForError ());
- } else {
- fc.Report.Error (171, loc,
- "Field `{0}' must be fully assigned before control leaves the constructor",
- field.GetSignatureForError ());
+
+ ok = false;
+ continue;
}
+
+ fc.Report.Error (171, loc,
+ "Field `{0}' must be fully assigned before control leaves the constructor",
+ field.GetSignatureForError ());
ok = false;
}
}
diff --git a/mcs/mcs/generic.cs b/mcs/mcs/generic.cs
index 57afe77b004..d369ccf816d 100644
--- a/mcs/mcs/generic.cs
+++ b/mcs/mcs/generic.cs
@@ -106,7 +106,7 @@ namespace Mono.CSharp {
throw new NotImplementedException ();
}
- public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext ec)
+ public override FullNamedExpression ResolveAsTypeOrNamespace (IMemberContext mc, bool allowUnboundTypeArguments)
{
throw new NotImplementedException ();
}
@@ -1052,7 +1052,8 @@ namespace Mono.CSharp {
continue;
}
- types [i] = ((TypeParameterSpec)t).GetEffectiveBase ();
+ var tps = t as TypeParameterSpec;
+ types [i] = tps != null ? tps.GetEffectiveBase () : t;
}
if (HasTypeConstraint)
@@ -1146,7 +1147,7 @@ namespace Mono.CSharp {
if (other.targs != null) {
foreach (var otarg in other.targs) {
- if (TypeSpecComparer.Override.IsEqual (BaseType, otarg)) {
+ if (TypeSpecComparer.Override.IsEqual (iface, otarg)) {
found = true;
break;
}
@@ -1478,6 +1479,9 @@ namespace Mono.CSharp {
if (ac != null)
return ArrayContainer.MakeType (context.Module, et, ac.Rank);
+ if (ec is PointerContainer)
+ return PointerContainer.MakeType (context.Module, et);
+
throw new NotImplementedException ();
}
@@ -2422,7 +2426,7 @@ namespace Mono.CSharp {
return type.GetSignatureForError ();
}
- public override TypeSpec ResolveAsType (IMemberContext mc)
+ public override TypeSpec ResolveAsType (IMemberContext mc, bool allowUnboundTypeArguments = false)
{
if (eclass != ExprClass.Unresolved)
return type;
diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs
index 0d7e9e5ad5f..6dea50a33ae 100644
--- a/mcs/mcs/import.cs
+++ b/mcs/mcs/import.cs
@@ -434,6 +434,8 @@ namespace Mono.CSharp
else
mod |= Modifiers.VIRTUAL;
}
+ } else if (parameters.HasExtensionMethodType) {
+ mod |= Modifiers.METHOD_EXTENSION;
}
}
@@ -1285,6 +1287,23 @@ namespace Mono.CSharp
public string DefaultIndexerName;
public bool? CLSAttributeValue;
public TypeSpec CoClass;
+
+ static bool HasMissingType (ConstructorInfo ctor)
+ {
+#if STATIC
+ //
+ // Mimic odd csc behaviour where missing type on predefined
+ // attributes means the attribute is silently ignored. This can
+ // happen with PCL facades
+ //
+ foreach (var p in ctor.GetParameters ()) {
+ if (p.ParameterType.__ContainsMissingType)
+ return true;
+ }
+#endif
+
+ return false;
+ }
public static AttributesBag Read (MemberInfo mi, MetadataImporter importer)
{
@@ -1359,6 +1378,9 @@ namespace Mono.CSharp
if (dt.Namespace != "System")
continue;
+ if (HasMissingType (a.Constructor))
+ continue;
+
if (bag == null)
bag = new AttributesBag ();
@@ -1377,6 +1399,9 @@ namespace Mono.CSharp
if (dt.Namespace != "System.Runtime.InteropServices")
continue;
+ if (HasMissingType (a.Constructor))
+ continue;
+
if (bag == null)
bag = new AttributesBag ();
diff --git a/mcs/mcs/iterators.cs b/mcs/mcs/iterators.cs
index 8b45f88a911..5dce0ed1593 100644
--- a/mcs/mcs/iterators.cs
+++ b/mcs/mcs/iterators.cs
@@ -74,6 +74,9 @@ namespace Mono.CSharp
public void RegisterResumePoint ()
{
+ if (resume_pc != 0)
+ return;
+
if (inside_try_block == null) {
resume_pc = machine_initializer.AddResumePoint (this);
} else {
@@ -723,7 +726,7 @@ namespace Mono.CSharp
//
// The state as we generate the machine
//
- Label move_next_ok;
+ protected Label move_next_ok;
protected Label move_next_error;
LocalBuilder skip_finally;
protected LocalBuilder current_pc;
@@ -827,8 +830,15 @@ namespace Mono.CSharp
BodyEnd = ec.DefineLabel ();
+ var async_init = this as AsyncInitializer;
+ if (async_init != null)
+ ec.BeginExceptionBlock ();
+
block.EmitEmbedded (ec);
+ if (async_init != null)
+ async_init.EmitCatchBlock (ec);
+
ec.MarkLabel (BodyEnd);
EmitMoveNextEpilogue (ec);
@@ -839,6 +849,8 @@ namespace Mono.CSharp
ec.EmitInt (0);
ec.Emit (OpCodes.Ret);
}
+
+ ec.MarkLabel (move_next_ok);
}
void EmitMoveNext (EmitContext ec)
@@ -895,19 +907,7 @@ namespace Mono.CSharp
ec.MarkLabel (BodyEnd);
if (async_init != null) {
- var catch_value = LocalVariable.CreateCompilerGenerated (ec.Module.Compiler.BuiltinTypes.Exception, block, Location);
-
- ec.BeginCatchBlock (catch_value.Type);
- catch_value.EmitAssign (ec);
-
- ec.EmitThis ();
- ec.EmitInt ((int) IteratorStorey.State.After);
- ec.Emit (OpCodes.Stfld, storey.PC.Spec);
-
- ((AsyncTaskStorey) async_init.Storey).EmitSetException (ec, new LocalVariableReference (catch_value, Location));
-
- ec.Emit (OpCodes.Leave, move_next_ok);
- ec.EndExceptionBlock ();
+ async_init.EmitCatchBlock (ec);
}
ec.Mark (Block.Original.EndLocation);
diff --git a/mcs/mcs/membercache.cs b/mcs/mcs/membercache.cs
index 82acb67b164..3837af2c2d8 100644
--- a/mcs/mcs/membercache.cs
+++ b/mcs/mcs/membercache.cs
@@ -698,14 +698,6 @@ namespace Mono.CSharp {
continue;
//
- // Ignore user private fields for definite assignment. This is sort of unexpected but
- // rationale is to have consistent results when using reference assemblies which don't
- // include any private fields and full assemblies
- //
- if ((name_entry.Modifiers & (Modifiers.PRIVATE | Modifiers.BACKING_FIELD)) == Modifiers.PRIVATE)
- continue;
-
- //
// Fixed size buffers are not subject to definite assignment checking
//
if (name_entry is FixedFieldSpec || name_entry is ConstSpec)
@@ -721,6 +713,9 @@ namespace Mono.CSharp {
if (!fs.IsPublic && container.MemberDefinition.IsImported && (!fs.MemberType.IsArray && TypeSpec.IsReferenceType (fs.MemberType)))
continue;
+ //if ((fs.Modifiers & (Modifiers.BACKING_FIELD) != 0)
+ // continue;
+
if (fields == null)
fields = new List<FieldSpec> ();
diff --git a/mcs/mcs/method.cs b/mcs/mcs/method.cs
index 2399133a9f1..a78b99c6419 100644
--- a/mcs/mcs/method.cs
+++ b/mcs/mcs/method.cs
@@ -1187,7 +1187,8 @@ namespace Mono.CSharp {
// Using container location because the interface can be implemented
// by base class
- container.Compiler.Report.Error (425, container.Location,
+ var tp = (tparams [i].MemberDefinition as MemberCore) ?? container;
+ container.Compiler.Report.Error (425, tp.Location,
"The constraints for type parameter `{0}' of method `{1}' must match the constraints for type parameter `{2}' of interface method `{3}'. Consider using an explicit interface implementation instead",
tparams[i].GetSignatureForError (), method.GetSignatureForError (),
base_tparams[i].GetSignatureForError (), baseMethod.GetSignatureForError ());
@@ -1284,7 +1285,7 @@ namespace Mono.CSharp {
// This is used to track the Entry Point,
//
var settings = Compiler.Settings;
- if (settings.NeedsEntryPoint && MemberName.Name == "Main" && (settings.MainClass == null || settings.MainClass == Parent.TypeBuilder.FullName)) {
+ if (settings.NeedsEntryPoint && MemberName.Name == "Main" && !IsPartialDefinition && (settings.MainClass == null || settings.MainClass == Parent.TypeBuilder.FullName)) {
if (IsEntryPoint ()) {
if (Parent.DeclaringAssembly.EntryPoint == null) {
if (Parent.IsGenericOrParentIsGeneric || MemberName.IsGeneric) {
@@ -1535,7 +1536,7 @@ namespace Mono.CSharp {
var call = new CallEmitter ();
call.InstanceExpression = new CompilerGeneratedThis (type, loc);
- call.EmitPredefined (ec, base_ctor, argument_list);
+ call.EmitPredefined (ec, base_ctor, argument_list, false);
}
public override void EmitStatement (EmitContext ec)
@@ -1620,7 +1621,6 @@ namespace Mono.CSharp {
}
public bool IsPrimaryConstructor { get; set; }
-
MethodBase IMethodDefinition.Metadata {
get {
@@ -1709,12 +1709,12 @@ namespace Mono.CSharp {
if (!CheckBase ())
return false;
- if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor) {
- if (Parent.Kind == MemberKind.Struct) {
- Report.Error (9009, Location, "`{0}': Structs with primary constructor cannot have explicit constructor",
+ if (Parent.PrimaryConstructorParameters != null && !IsPrimaryConstructor && !IsStatic) {
+ if (Parent.Kind == MemberKind.Struct && Initializer is ConstructorThisInitializer && Initializer.Arguments == null) {
+ Report.Error (8043, Location, "`{0}': Structs with primary constructor cannot specify default constructor initializer",
GetSignatureForError ());
} else if (Initializer == null || Initializer is ConstructorBaseInitializer) {
- Report.Error (9002, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer",
+ Report.Error (8037, Location, "`{0}': Instance constructor of type with primary constructor must specify `this' constructor initializer",
GetSignatureForError ());
}
}
@@ -1774,6 +1774,14 @@ namespace Mono.CSharp {
bc.Set (ResolveContext.Options.ConstructorScope);
if (block != null) {
+ if (!IsStatic && Initializer == null && Parent.PartialContainer.Kind == MemberKind.Struct) {
+ //
+ // If this is a non-static `struct' constructor and doesn't have any
+ // initializer, it must initialize all of the struct's fields.
+ //
+ block.AddThisVariable (bc);
+ }
+
//
// If we use a "this (...)" constructor initializer, then
// do not emit field initializers, they are initialized in the other constructor
@@ -1782,16 +1790,8 @@ namespace Mono.CSharp {
Parent.PartialContainer.ResolveFieldInitializers (bc);
if (!IsStatic) {
- if (Initializer == null) {
- if (Parent.PartialContainer.Kind == MemberKind.Struct) {
- //
- // If this is a non-static `struct' constructor and doesn't have any
- // initializer, it must initialize all of the struct's fields.
- //
- block.AddThisVariable (bc);
- } else if (Parent.PartialContainer.Kind == MemberKind.Class) {
- Initializer = new GeneratedBaseInitializer (Location, null);
- }
+ if (Initializer == null && Parent.PartialContainer.Kind == MemberKind.Class) {
+ Initializer = new GeneratedBaseInitializer (Location, null);
}
if (Initializer != null) {
@@ -2252,6 +2252,9 @@ namespace Mono.CSharp {
protected override bool CheckBase ()
{
+ if ((caching_flags & Flags.MethodOverloadsExist) != 0)
+ CheckForDuplications ();
+
// Don't check base, destructors have special syntax
return true;
}
@@ -2568,6 +2571,9 @@ namespace Mono.CSharp {
Implicit,
Explicit,
+ // Pattern matching
+ Is,
+
// Just because of enum
TOP
};
@@ -2605,6 +2611,7 @@ namespace Mono.CSharp {
names [(int) OpType.LessThanOrEqual] = new string [] { "<=", "op_LessThanOrEqual" };
names [(int) OpType.Implicit] = new string [] { "implicit", "op_Implicit" };
names [(int) OpType.Explicit] = new string [] { "explicit", "op_Explicit" };
+ names [(int) OpType.Is] = new string[] { "is", "op_Is" };
}
public Operator (TypeDefinition parent, OpType type, FullNamedExpression ret_type, Modifiers mod_flags, ParametersCompiled parameters,
diff --git a/mcs/mcs/module.cs b/mcs/mcs/module.cs
index e7e02a0bf14..138ec61638f 100644
--- a/mcs/mcs/module.cs
+++ b/mcs/mcs/module.cs
@@ -105,6 +105,141 @@ namespace Mono.CSharp
}
#endif
+ public sealed class PatternMatchingHelper : CompilerGeneratedContainer
+ {
+ public PatternMatchingHelper (ModuleContainer module)
+ : base (module, new MemberName ("<PatternMatchingHelper>", Location.Null),
+ Modifiers.STATIC | Modifiers.INTERNAL | Modifiers.DEBUGGER_HIDDEN)
+ {
+ }
+
+ public Method NumberMatcher { get; private set; }
+
+ protected override bool DoDefineMembers ()
+ {
+ if (!base.DoDefineMembers ())
+ return false;
+
+ NumberMatcher = GenerateNumberMatcher ();
+ return true;
+ }
+
+ Method GenerateNumberMatcher ()
+ {
+ var loc = Location;
+ var parameters = ParametersCompiled.CreateFullyResolved (
+ new [] {
+ new Parameter (new TypeExpression (Compiler.BuiltinTypes.Object, loc), "obj", 0, null, loc),
+ new Parameter (new TypeExpression (Compiler.BuiltinTypes.Object, loc), "value", 0, null, loc),
+ new Parameter (new TypeExpression (Compiler.BuiltinTypes.Bool, loc), "enumType", 0, null, loc),
+ },
+ new [] {
+ Compiler.BuiltinTypes.Object,
+ Compiler.BuiltinTypes.Object,
+ Compiler.BuiltinTypes.Bool
+ });
+
+ var m = new Method (this, new TypeExpression (Compiler.BuiltinTypes.Bool, loc),
+ Modifiers.PUBLIC | Modifiers.STATIC | Modifiers.DEBUGGER_HIDDEN, new MemberName ("NumberMatcher", loc),
+ parameters, null);
+
+ parameters [0].Resolve (m, 0);
+ parameters [1].Resolve (m, 1);
+ parameters [2].Resolve (m, 2);
+
+ ToplevelBlock top_block = new ToplevelBlock (Compiler, parameters, loc);
+ m.Block = top_block;
+
+ //
+ // if (enumType)
+ // return Equals (obj, value);
+ //
+ var equals_args = new Arguments (2);
+ equals_args.Add (new Argument (top_block.GetParameterReference (0, loc)));
+ equals_args.Add (new Argument (top_block.GetParameterReference (1, loc)));
+
+ var if_type = new If (
+ top_block.GetParameterReference (2, loc),
+ new Return (new Invocation (new SimpleName ("Equals", loc), equals_args), loc),
+ loc);
+
+ top_block.AddStatement (if_type);
+
+ //
+ // if (obj is Enum || obj == null)
+ // return false;
+ //
+
+ var if_enum = new If (
+ new Binary (Binary.Operator.LogicalOr,
+ new Is (top_block.GetParameterReference (0, loc), new TypeExpression (Compiler.BuiltinTypes.Enum, loc), loc),
+ new Binary (Binary.Operator.Equality, top_block.GetParameterReference (0, loc), new NullLiteral (loc))),
+ new Return (new BoolLiteral (Compiler.BuiltinTypes, false, loc), loc),
+ loc);
+
+ top_block.AddStatement (if_enum);
+
+
+ var system_convert = new MemberAccess (new QualifiedAliasMember ("global", "System", loc), "Convert", loc);
+ var expl_block = new ExplicitBlock (top_block, loc, loc);
+
+ //
+ // var converted = System.Convert.ChangeType (obj, System.Convert.GetTypeCode (value));
+ //
+ var lv_converted = LocalVariable.CreateCompilerGenerated (Compiler.BuiltinTypes.Object, top_block, loc);
+
+ var arguments_gettypecode = new Arguments (1);
+ arguments_gettypecode.Add (new Argument (top_block.GetParameterReference (1, loc)));
+
+ var gettypecode = new Invocation (new MemberAccess (system_convert, "GetTypeCode", loc), arguments_gettypecode);
+
+ var arguments_changetype = new Arguments (1);
+ arguments_changetype.Add (new Argument (top_block.GetParameterReference (0, loc)));
+ arguments_changetype.Add (new Argument (gettypecode));
+
+ var changetype = new Invocation (new MemberAccess (system_convert, "ChangeType", loc), arguments_changetype);
+
+ expl_block.AddStatement (new StatementExpression (new SimpleAssign (new LocalVariableReference (lv_converted, loc), changetype, loc)));
+
+
+ //
+ // return converted.Equals (value)
+ //
+ var equals_arguments = new Arguments (1);
+ equals_arguments.Add (new Argument (top_block.GetParameterReference (1, loc)));
+ var equals_invocation = new Invocation (new MemberAccess (new LocalVariableReference (lv_converted, loc), "Equals"), equals_arguments);
+ expl_block.AddStatement (new Return (equals_invocation, loc));
+
+ var catch_block = new ExplicitBlock (top_block, loc, loc);
+ catch_block.AddStatement (new Return (new BoolLiteral (Compiler.BuiltinTypes, false, loc), loc));
+ top_block.AddStatement (new TryCatch (expl_block, new List<Catch> () {
+ new Catch (catch_block, loc)
+ }, loc, false));
+
+ m.Define ();
+ m.PrepareEmit ();
+ AddMember (m);
+
+ return m;
+ }
+ }
+
+ PatternMatchingHelper pmh;
+
+ public PatternMatchingHelper CreatePatterMatchingHelper ()
+ {
+ if (pmh == null) {
+ pmh = new PatternMatchingHelper (this);
+
+ pmh.CreateContainer ();
+ pmh.DefineContainer ();
+ pmh.Define ();
+ AddCompilerGeneratedClass (pmh);
+ }
+
+ return pmh;
+ }
+
public CharSet? DefaultCharSet;
public TypeAttributes DefaultCharSetType = TypeAttributes.AnsiClass;
diff --git a/mcs/mcs/namespace.cs b/mcs/mcs/namespace.cs
index f6031a534d3..970e2ca024e 100644
--- a/mcs/mcs/namespace.cs
+++ b/mcs/mcs/namespace.cs
@@ -249,7 +249,7 @@ namespace Mono.CSharp {
return null;
foreach (var ts in found) {
- if (ts.Arity == arity) {
+ if (ts.Arity == arity || mode == LookupMode.NameOf) {
if (best == null) {
if ((ts.Modifiers & Modifiers.INTERNAL) != 0 && !ts.MemberDefinition.IsInternalAsPublic (ctx.Module.DeclaringAssembly) && mode != LookupMode.IgnoreAccessibility)
continue;
@@ -311,6 +311,12 @@ namespace Mono.CSharp {
if (arity == 0 && mode == LookupMode.Normal)
cached_types.Add (name, best);
+ if (best != null) {
+ var dep = best.GetMissingDependencies ();
+ if (dep != null)
+ ImportedTypeDefinition.Error_MissingDependency (ctx, dep, loc);
+ }
+
return best;
}
@@ -482,7 +488,21 @@ namespace Mono.CSharp {
public void RemoveContainer (TypeContainer tc)
{
- types.Remove (tc.Basename);
+ IList<TypeSpec> found;
+ if (types.TryGetValue (tc.MemberName.Name, out found)) {
+ for (int i = 0; i < found.Count; ++i) {
+ if (tc.MemberName.Arity != found [i].Arity)
+ continue;
+
+ if (found.Count == 1)
+ types.Remove (tc.MemberName.Name);
+ else
+ found.RemoveAt (i);
+
+ break;
+ }
+ }
+
cached_types.Remove (tc.Basename);
}
@@ -683,6 +703,7 @@ namespace Mono.CSharp {
public bool DeclarationFound;
Namespace[] namespace_using_table;
+ TypeSpec[] types_using_table;
Dictionary<string, UsingAliasNamespace> aliases;
public NamespaceContainer (MemberName name, NamespaceContainer parent)
@@ -935,6 +956,24 @@ namespace Mono.CSharp {
return new ExtensionMethodCandidates (invocationContext, candidates, this, position);
}
+ // LAMESPEC: TODO no spec about priority over normal extension methods yet
+ if (types_using_table != null) {
+ foreach (var t in types_using_table) {
+
+ var res = t.MemberCache.FindExtensionMethods (invocationContext, name, arity);
+ if (res == null)
+ continue;
+
+ if (candidates == null)
+ candidates = res;
+ else
+ candidates.AddRange (res);
+ }
+
+ if (candidates != null)
+ return new ExtensionMethodCandidates (invocationContext, candidates, this, position);
+ }
+
return null;
}
@@ -1116,6 +1155,42 @@ namespace Mono.CSharp {
return match;
}
+ public static MethodGroupExpr LookupStaticUsings (IMemberContext mc, string name, int arity, Location loc)
+ {
+ for (var m = mc.CurrentMemberDefinition; m != null; m = m.Parent) {
+
+ var nc = m as NamespaceContainer;
+ if (nc == null)
+ continue;
+
+ List<MemberSpec> candidates = null;
+ if (nc.types_using_table != null) {
+ foreach (var using_type in nc.types_using_table) {
+ var members = MemberCache.FindMembers (using_type, name, true);
+ if (members != null) {
+ foreach (var member in members) {
+ if ((member.Modifiers & Modifiers.METHOD_EXTENSION) != 0)
+ continue;
+
+ if (arity > 0 && member.Arity != arity)
+ continue;
+
+ if (candidates == null)
+ candidates = new List<MemberSpec> ();
+
+ candidates.Add (member);
+ }
+ }
+ }
+ }
+
+ if (candidates != null)
+ return new MethodGroupExpr (candidates, null, loc);
+ }
+
+ return null;
+ }
+
protected override void DefineNamespace ()
{
if (namespace_using_table == null)
@@ -1129,7 +1204,9 @@ namespace Mono.CSharp {
namespace_using_table = empty_namespaces;
if (clauses != null) {
- var list = new List<Namespace> (clauses.Count);
+ List<Namespace> namespaces = null;
+ List<TypeSpec> types = null;
+
bool post_process_using_aliases = false;
for (int i = 0; i < clauses.Count; ++i) {
@@ -1168,21 +1245,36 @@ namespace Mono.CSharp {
}
var using_ns = entry.ResolvedExpression as NamespaceExpression;
- if (using_ns == null)
- continue;
+ if (using_ns == null) {
- if (list.Contains (using_ns.Namespace)) {
- // Ensure we don't report the warning multiple times in repl
- clauses.RemoveAt (i--);
+ var type = ((TypeExpr)entry.ResolvedExpression).Type;
- Compiler.Report.Warning (105, 3, entry.Location,
- "The using directive for `{0}' appeared previously in this namespace", using_ns.GetSignatureForError ());
+ if (types == null)
+ types = new List<TypeSpec> ();
+
+ if (types.Contains (type)) {
+ Warning_DuplicateEntry (entry);
+ } else {
+ types.Add (type);
+ }
} else {
- list.Add (using_ns.Namespace);
+ if (namespaces == null)
+ namespaces = new List<Namespace> ();
+
+ if (namespaces.Contains (using_ns.Namespace)) {
+ // Ensure we don't report the warning multiple times in repl
+ clauses.RemoveAt (i--);
+
+ Warning_DuplicateEntry (entry);
+ } else {
+ namespaces.Add (using_ns.Namespace);
+ }
}
}
- namespace_using_table = list.ToArray ();
+ namespace_using_table = namespaces == null ? new Namespace [0] : namespaces.ToArray ();
+ if (types != null)
+ types_using_table = types.ToArray ();
if (post_process_using_aliases) {
for (int i = 0; i < clauses.Count; ++i) {
@@ -1239,6 +1331,13 @@ namespace Mono.CSharp {
return false;
}
+ void Warning_DuplicateEntry (UsingNamespace entry)
+ {
+ Compiler.Report.Warning (105, 3, entry.Location,
+ "The using directive for `{0}' appeared previously in this namespace",
+ entry.ResolvedExpression.GetSignatureForError ());
+ }
+
public override void Accept (StructuralVisitor visitor)
{
visitor.Visit (this);
@@ -1292,15 +1391,29 @@ namespace Mono.CSharp {
public virtual void Define (NamespaceContainer ctx)
{
- resolved = expr.ResolveAsTypeOrNamespace (ctx);
+ resolved = expr.ResolveAsTypeOrNamespace (ctx, false);
var ns = resolved as NamespaceExpression;
- if (ns == null) {
- if (resolved != null) {
- ctx.Module.Compiler.Report.SymbolRelatedToPreviousError (resolved.Type);
- ctx.Module.Compiler.Report.Error (138, Location,
- "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces",
- GetSignatureForError ());
+ if (ns != null)
+ return;
+
+ if (resolved != null) {
+ var compiler = ctx.Module.Compiler;
+ var type = resolved.Type;
+ if (compiler.Settings.Version >= LanguageVersion.V_6) {
+ if (!type.IsClass || !type.IsStatic) {
+ compiler.Report.SymbolRelatedToPreviousError (type);
+ compiler.Report.Error (7007, Location,
+ "`{0}' is not a static class. A using namespace directive can only be applied to static classes or namespace",
+ GetSignatureForError ());
+ }
+
+ return;
}
+
+ compiler.Report.SymbolRelatedToPreviousError (type);
+ compiler.Report.Error (138, Location,
+ "`{0}' is a type not a namespace. A using namespace directive can only be applied to namespaces",
+ GetSignatureForError ());
}
}
@@ -1456,7 +1569,7 @@ namespace Mono.CSharp {
// We achieve that by introducing alias-context which redirect any local
// namespace or type resolve calls to parent namespace
//
- resolved = NamespaceExpression.ResolveAsTypeOrNamespace (new AliasContext (ctx));
+ resolved = NamespaceExpression.ResolveAsTypeOrNamespace (new AliasContext (ctx), false);
}
}
}
diff --git a/mcs/mcs/nullable.cs b/mcs/mcs/nullable.cs
index 566c62af3aa..e857e365410 100644
--- a/mcs/mcs/nullable.cs
+++ b/mcs/mcs/nullable.cs
@@ -33,7 +33,7 @@ namespace Mono.CSharp.Nullable
this.loc = loc;
}
- public override TypeSpec ResolveAsType (IMemberContext ec)
+ public override TypeSpec ResolveAsType (IMemberContext ec, bool allowUnboundTypeArguments = false)
{
eclass = ExprClass.Type;
@@ -85,8 +85,14 @@ namespace Mono.CSharp.Nullable
public static TypeSpec GetEnumUnderlyingType (ModuleContainer module, TypeSpec nullableEnum)
{
+ return MakeType (module, EnumSpec.GetUnderlyingType (GetUnderlyingType (nullableEnum)));
+ }
+
+ public static TypeSpec MakeType (ModuleContainer module, TypeSpec underlyingType)
+ {
return module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (module,
- new[] { EnumSpec.GetUnderlyingType (GetUnderlyingType (nullableEnum)) });
+ new[] { underlyingType });
+
}
}
@@ -187,6 +193,11 @@ namespace Mono.CSharp.Nullable
call.EmitPredefined (ec, NullableInfo.GetHasValue (expr.Type), null);
}
+ public override void EmitSideEffect (EmitContext ec)
+ {
+ expr.EmitSideEffect (ec);
+ }
+
public override Expression EmitToField (EmitContext ec)
{
if (temp_field == null)
@@ -424,6 +435,12 @@ namespace Mono.CSharp.Nullable
{
}
+ public override bool IsNull {
+ get {
+ return expr.IsNull;
+ }
+ }
+
public override bool ContainsEmitWithAwait ()
{
return unwrap.ContainsEmitWithAwait ();
@@ -696,7 +713,7 @@ namespace Mono.CSharp.Nullable
}
if (!type.IsNullableType)
- type = rc.Module.PredefinedTypes.Nullable.TypeSpec.MakeGenericType (rc.Module, new[] { type });
+ type = NullableInfo.MakeType (rc.Module, type);
return Wrap.Create (expr, type);
}
@@ -1124,24 +1141,35 @@ namespace Mono.CSharp.Nullable
if (right.IsNull)
return ReducedExpression.Create (left, this);
- if (Convert.ImplicitConversionExists (ec, right, unwrap.Type)) {
- left = unwrap;
- ltype = left.Type;
+ Expression conv;
+ if (right.Type.IsNullableType) {
+ conv = right.Type == ltype ? right : Convert.ImplicitNulableConversion (ec, right, ltype);
+ if (conv != null) {
+ right = conv;
+ type = ltype;
+ return this;
+ }
+ } else {
+ conv = Convert.ImplicitConversion (ec, right, unwrap.Type, loc);
+ if (conv != null) {
+ left = unwrap;
+ ltype = left.Type;
- //
- // If right is a dynamic expression, the result type is dynamic
- //
- if (right.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
- type = right.Type;
+ //
+ // If right is a dynamic expression, the result type is dynamic
+ //
+ if (right.Type.BuiltinType == BuiltinTypeSpec.Type.Dynamic) {
+ type = right.Type;
+
+ // Need to box underlying value type
+ left = Convert.ImplicitBoxingConversion (left, ltype, type);
+ return this;
+ }
- // Need to box underlying value type
- left = Convert.ImplicitBoxingConversion (left, ltype, type);
+ right = conv;
+ type = ltype;
return this;
}
-
- right = Convert.ImplicitConversion (ec, right, ltype, loc);
- type = ltype;
- return this;
}
} else if (TypeSpec.IsReferenceType (ltype)) {
if (Convert.ImplicitConversionExists (ec, right, ltype)) {
@@ -1192,6 +1220,12 @@ namespace Mono.CSharp.Nullable
return ReducedExpression.Create (right, this, false).Resolve (ec);
left = Convert.ImplicitConversion (ec, unwrap ?? left, rtype, loc);
+
+ if (TypeSpec.IsValueType (left.Type) && !left.Type.IsNullableType) {
+ Warning_UnreachableExpression (ec, right.Location);
+ return ReducedExpression.Create (left, this, false).Resolve (ec);
+ }
+
type = rtype;
return this;
}
diff --git a/mcs/mcs/parameter.cs b/mcs/mcs/parameter.cs
index f1215173cb2..1a30ae384c0 100644
--- a/mcs/mcs/parameter.cs
+++ b/mcs/mcs/parameter.cs
@@ -222,8 +222,7 @@ namespace Mono.CSharp {
CallerMask = CallerMemberName | CallerLineNumber | CallerFilePath
}
- static readonly string[] attribute_targets = new string[] { "param" };
- static readonly string[] attribute_targets_primary = new string[] { "param", "field" };
+ static readonly string[] attribute_targets = new [] { "param" };
FullNamedExpression texpr;
Modifier modFlags;
@@ -234,7 +233,6 @@ namespace Mono.CSharp {
protected int idx;
public bool HasAddressTaken;
- Constructor primary_constructor;
TemporaryVariableReference expr_tree_variable;
HoistedParameter hoisted_variant;
@@ -309,7 +307,7 @@ namespace Mono.CSharp {
public override string[] ValidAttributeTargets {
get {
- return primary_constructor != null ? attribute_targets_primary : attribute_targets;
+ return attribute_targets;
}
}
@@ -317,12 +315,6 @@ namespace Mono.CSharp {
public override void ApplyAttributeBuilder (Attribute a, MethodSpec ctor, byte[] cdata, PredefinedAttributes pa)
{
- if (a.Target == AttributeTargets.Field) {
- var field = MemberCache.FindMember (primary_constructor.Spec.DeclaringType, MemberFilter.Field (name, parameter_type), BindingRestriction.DeclaredOnly);
- ((Field)field.MemberDefinition).ApplyAttributeBuilder (a, ctor, cdata, pa);
- return;
- }
-
if (a.Type == pa.In && ModFlags == Modifier.OUT) {
a.Report.Error (36, a.Location, "An out parameter cannot have the `In' attribute");
return;
@@ -399,10 +391,6 @@ namespace Mono.CSharp {
if (attributes != null)
attributes.AttachTo (this, rc);
- var ctor = rc.CurrentMemberDefinition as Constructor;
- if (ctor != null && ctor.IsPrimaryConstructor)
- primary_constructor = ctor;
-
parameter_type = texpr.ResolveAsType (rc);
if (parameter_type == null)
return null;
@@ -465,7 +453,7 @@ namespace Mono.CSharp {
if (atype == pa.CallerLineNumberAttribute) {
caller_type = rc.BuiltinTypes.Int;
- if (caller_type != parameter_type && !Convert.ImplicitNumericConversionExists (caller_type, parameter_type)) {
+ if (caller_type != parameter_type && !Convert.ImplicitStandardConversionExists (new IntConstant (caller_type, int.MaxValue, Location.Null), parameter_type)) {
rc.Report.Error (4017, attr.Location,
"The CallerLineNumberAttribute attribute cannot be applied because there is no standard conversion from `{0}' to `{1}'",
caller_type.GetSignatureForError (), parameter_type.GetSignatureForError ());
@@ -789,6 +777,11 @@ namespace Mono.CSharp {
return new TypeExpression (p_type, location);
}
+ public void SetIndex (int index)
+ {
+ idx = index;
+ }
+
public void Warning_UselessOptionalParameter (Report Report)
{
Report.Warning (1066, 1, Location,
@@ -1151,6 +1144,23 @@ namespace Mono.CSharp {
return new ParametersCompiled (parameters, types);
}
+ public static ParametersCompiled Prefix (ParametersCompiled parameters, Parameter p, TypeSpec type)
+ {
+ var ptypes = new TypeSpec [parameters.Count + 1];
+ ptypes [0] = type;
+ Array.Copy (parameters.Types, 0, ptypes, 1, parameters.Count);
+
+ var param = new Parameter [ptypes.Length];
+ param [0] = p;
+ for (int i = 0; i < parameters.Count; ++i) {
+ var pi = parameters [i];
+ param [i + 1] = pi;
+ pi.SetIndex (i + 1);
+ }
+
+ return ParametersCompiled.CreateFullyResolved (param, ptypes);
+ }
+
//
// TODO: This does not fit here, it should go to different version of AParametersCollection
// as the underlying type is not Parameter and some methods will fail to cast
@@ -1409,9 +1419,11 @@ namespace Mono.CSharp {
expr = Child;
if (!(expr is Constant || expr is DefaultValueExpression || (expr is New && ((New) expr).IsDefaultStruct))) {
- rc.Report.Error (1736, Location,
- "The expression being assigned to optional parameter `{0}' must be a constant or default value",
- p.Name);
+ if (!(expr is ErrorExpression)) {
+ rc.Report.Error (1736, Location,
+ "The expression being assigned to optional parameter `{0}' must be a constant or default value",
+ p.Name);
+ }
return;
}
diff --git a/mcs/mcs/property.cs b/mcs/mcs/property.cs
index e8b3879f05a..ebe8aca2ea9 100644
--- a/mcs/mcs/property.cs
+++ b/mcs/mcs/property.cs
@@ -731,13 +731,15 @@ namespace Mono.CSharp
public sealed class BackingField : Field
{
readonly Property property;
+ const Modifiers DefaultModifiers = Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.PRIVATE | Modifiers.DEBUGGER_HIDDEN;
- public BackingField (Property p)
- : base (p.Parent, p.type_expr,
- Modifiers.BACKING_FIELD | Modifiers.COMPILER_GENERATED | Modifiers.PRIVATE | (p.ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)),
+ public BackingField (Property p, bool readOnly)
+ : base (p.Parent, p.type_expr, DefaultModifiers | (p.ModFlags & (Modifiers.STATIC | Modifiers.UNSAFE)),
new MemberName ("<" + p.GetFullName (p.MemberName) + ">k__BackingField", p.Location), null)
{
this.property = p;
+ if (readOnly)
+ ModFlags |= Modifiers.READONLY;
}
public Property OriginalProperty {
@@ -766,6 +768,8 @@ namespace Mono.CSharp
{
}
+ public Expression Initializer { get; set; }
+
public override void Accept (StructuralVisitor visitor)
{
visitor.Visit (this);
@@ -784,10 +788,16 @@ namespace Mono.CSharp
void CreateAutomaticProperty ()
{
// Create backing field
- backing_field = new BackingField (this);
+ backing_field = new BackingField (this, Initializer != null && Set == null);
if (!backing_field.Define ())
return;
+ if (Initializer != null) {
+ backing_field.Initializer = Initializer;
+ Parent.RegisterFieldForInitialization (backing_field, new FieldInitializer (backing_field, Initializer, Location));
+ backing_field.ModFlags |= Modifiers.READONLY;
+ }
+
Parent.PartialContainer.Members.Add (backing_field);
FieldExpr fe = new FieldExpr (backing_field, Location);
@@ -802,11 +812,15 @@ namespace Mono.CSharp
Get.Block = new ToplevelBlock (Compiler, ParametersCompiled.EmptyReadOnlyParameters, Location.Null);
Return r = new Return (fe, Get.Location);
Get.Block.AddStatement (r);
+ Get.ModFlags |= Modifiers.COMPILER_GENERATED;
// Create set block
- Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null);
- Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null);
- Set.Block.AddStatement (new StatementExpression (a, Set.Location));
+ if (Set != null) {
+ Set.Block = new ToplevelBlock (Compiler, Set.ParameterInfo, Location.Null);
+ Assign a = new SimpleAssign (fe, new SimpleName ("value", Location.Null), Location.Null);
+ Set.Block.AddStatement (new StatementExpression (a, Set.Location));
+ Set.ModFlags |= Modifiers.COMPILER_GENERATED;
+ }
}
public override bool Define ()
@@ -816,13 +830,37 @@ namespace Mono.CSharp
flags |= MethodAttributes.HideBySig | MethodAttributes.SpecialName;
- if (!IsInterface && (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0 &&
- AccessorSecond != null && Get.Block == null && Set.Block == null) {
- if (Compiler.Settings.Version <= LanguageVersion.ISO_2)
- Report.FeatureIsNotAvailable (Compiler, Location, "automatically implemented properties");
+ bool auto = AccessorFirst.Block == null && (AccessorSecond == null || AccessorSecond.Block == null) &&
+ (ModFlags & (Modifiers.ABSTRACT | Modifiers.EXTERN)) == 0;
+
+ if (Initializer != null) {
+ if (!auto)
+ Report.Error (8050, Location, "`{0}': Only auto-implemented properties can have initializers",
+ GetSignatureForError ());
+
+ if (IsInterface)
+ Report.Error (8053, Location, "`{0}': Properties inside interfaces cannot have initializers",
+ GetSignatureForError ());
+
+ if (Compiler.Settings.Version < LanguageVersion.V_6)
+ Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented property initializer");
+ }
+
+ if (auto) {
+ if (Get == null) {
+ Report.Error (8052, Location, "Auto-implemented property `{0}' must have get accessor",
+ GetSignatureForError ());
+ return false;
+ }
+
+ if (Initializer == null && AccessorSecond == null) {
+ Report.Error (8051, Location, "Auto-implemented property `{0}' must have set accessor or initializer",
+ GetSignatureForError ());
+ }
+
+ if (Compiler.Settings.Version < LanguageVersion.V_3 && Initializer == null)
+ Report.FeatureIsNotAvailable (Compiler, Location, "auto-implemented properties");
- Get.ModFlags |= Modifiers.COMPILER_GENERATED;
- Set.ModFlags |= Modifiers.COMPILER_GENERATED;
CreateAutomaticProperty ();
}
@@ -1002,13 +1040,22 @@ namespace Mono.CSharp
Location)));
args.Add (new Argument (new LocalVariableReference (obj1, Location)));
- var cas = Module.PredefinedMembers.InterlockedCompareExchange_T.Resolve (Location);
- if (cas == null)
- return;
-
- body.AddStatement (new StatementExpression (new SimpleAssign (
- new LocalVariableReference (obj1, Location),
- new Invocation (MethodGroupExpr.CreatePredefined (cas, cas.DeclaringType, Location), args))));
+ var cas = Module.PredefinedMembers.InterlockedCompareExchange_T.Get ();
+ if (cas == null) {
+ if (Module.PredefinedMembers.MonitorEnter_v4.Get () != null || Module.PredefinedMembers.MonitorEnter.Get () != null) {
+ // Workaround for cripled (e.g. microframework) mscorlib without CompareExchange
+ body.AddStatement (new Lock (
+ block.GetParameterReference (0, Location),
+ new StatementExpression (new SimpleAssign (
+ f_expr, args [1].Expr, Location), Location), Location));
+ } else {
+ Module.PredefinedMembers.InterlockedCompareExchange_T.Resolve (Location);
+ }
+ } else {
+ body.AddStatement (new StatementExpression (new SimpleAssign (
+ new LocalVariableReference (obj1, Location),
+ new Invocation (MethodGroupExpr.CreatePredefined (cas, cas.DeclaringType, Location), args))));
+ }
}
}
diff --git a/mcs/mcs/report.cs b/mcs/mcs/report.cs
index 5ae47d8a0d0..e9b16d1c0ee 100644
--- a/mcs/mcs/report.cs
+++ b/mcs/mcs/report.cs
@@ -103,6 +103,9 @@ namespace Mono.CSharp {
case LanguageVersion.V_5:
version = "5.0";
break;
+ case LanguageVersion.V_6:
+ version = "6.0";
+ break;
default:
throw new InternalErrorException ("Invalid feature version", compiler.Settings.Version);
}
diff --git a/mcs/mcs/settings.cs b/mcs/mcs/settings.cs
index 3c7f13bdb13..9ba66c1613e 100644
--- a/mcs/mcs/settings.cs
+++ b/mcs/mcs/settings.cs
@@ -29,9 +29,9 @@ namespace Mono.CSharp {
V_4 = 4,
V_5 = 5,
V_6 = 6,
- Future = 100,
+ Experimental = 100,
- Default = LanguageVersion.Future,
+ Default = LanguageVersion.V_6,
}
public enum RuntimeVersion
@@ -1159,9 +1159,12 @@ namespace Mono.CSharp {
case "6":
settings.Version = LanguageVersion.V_6;
return ParseResult.Success;
- case "future":
- settings.Version = LanguageVersion.Future;
+ case "experimental":
+ settings.Version = LanguageVersion.Experimental;
return ParseResult.Success;
+ case "future":
+ report.Warning (8000, 1, "Language version `future' is no longer supported");
+ goto case "6";
}
report.Error (1617, "Invalid -langversion option `{0}'. It must be `ISO-1', `ISO-2', Default or value in range 1 to 6", value);
diff --git a/mcs/mcs/statement.cs b/mcs/mcs/statement.cs
index e015b143da8..e46dca447eb 100644
--- a/mcs/mcs/statement.cs
+++ b/mcs/mcs/statement.cs
@@ -90,7 +90,6 @@ namespace Mono.CSharp {
if (reachable) {
fc.UnreachableReported = false;
var res = DoFlowAnalysis (fc);
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = null;
return res;
}
@@ -266,18 +265,19 @@ namespace Mono.CSharp {
protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
{
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
-
- expr.FlowAnalysis (fc);
+ expr.FlowAnalysisConditional (fc);
var da_false = new DefiniteAssignmentBitSet (fc.DefiniteAssignmentOnFalse);
fc.DefiniteAssignment = fc.DefiniteAssignmentOnTrue;
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = null;
var res = TrueStatement.FlowAnalysis (fc);
if (FalseStatement == null) {
+ var c = expr as Constant;
+ if (c != null && !c.IsDefaultValue)
+ return true_returns;
+
if (true_returns)
fc.DefiniteAssignment = da_false;
else
@@ -419,8 +419,7 @@ namespace Mono.CSharp {
{
var res = Statement.FlowAnalysis (fc);
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
- expr.FlowAnalysis (fc);
+ expr.FlowAnalysisConditional (fc);
fc.DefiniteAssignment = fc.DefiniteAssignmentOnFalse;
@@ -565,13 +564,10 @@ namespace Mono.CSharp {
protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
{
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
-
- expr.FlowAnalysis (fc);
+ expr.FlowAnalysisConditional (fc);
fc.DefiniteAssignment = fc.DefiniteAssignmentOnTrue;
var da_false = new DefiniteAssignmentBitSet (fc.DefiniteAssignmentOnFalse);
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = null;
Statement.FlowAnalysis (fc);
@@ -697,12 +693,9 @@ namespace Mono.CSharp {
DefiniteAssignmentBitSet da_false;
if (Condition != null) {
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = fc.DefiniteAssignment;
-
- Condition.FlowAnalysis (fc);
+ Condition.FlowAnalysisConditional (fc);
fc.DefiniteAssignment = fc.DefiniteAssignmentOnTrue;
da_false = new DefiniteAssignmentBitSet (fc.DefiniteAssignmentOnFalse);
- fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = null;
} else {
da_false = fc.BranchDefiniteAssignment ();
}
@@ -3669,6 +3662,9 @@ namespace Mono.CSharp {
get {
return top_block;
}
+ set {
+ top_block = value;
+ }
}
public bool Resolved {
@@ -4308,6 +4304,24 @@ namespace Mono.CSharp {
return false;
}
+ public void IncludeBlock (ParametersBlock pb, ToplevelBlock block)
+ {
+ if (block.names != null) {
+ foreach (var n in block.names) {
+ var variable = n.Value as INamedBlockVariable;
+ if (variable != null) {
+ if (variable.Block.ParametersBlock == pb)
+ AddLocalName (n.Key, variable, false);
+ continue;
+ }
+
+ foreach (var v in (List<INamedBlockVariable>) n.Value)
+ if (v.Block.ParametersBlock == pb)
+ AddLocalName (n.Key, v, false);
+ }
+ }
+ }
+
// <summary>
// This is used by non-static `struct' constructors which do not have an
// initializer - in this case, the constructor must initialize all of the
@@ -4457,6 +4471,8 @@ namespace Mono.CSharp {
}
}
+ public bool PatternMatching { get; set; }
+
public bool SectionStart { get; set; }
public Label GetILLabel (EmitContext ec)
@@ -4494,21 +4510,33 @@ namespace Mono.CSharp {
// Resolves the expression, reduces it to a literal if possible
// and then converts it to the requested type.
//
- bool ResolveAndReduce (BlockContext rc)
+ bool ResolveAndReduce (BlockContext bc)
{
if (IsDefault)
return true;
- var c = label.ResolveLabelConstant (rc);
+ var switch_statement = bc.Switch;
+
+ if (PatternMatching) {
+ label = new Is (switch_statement.ExpressionValue, label, loc).Resolve (bc);
+ return label != null;
+ }
+
+ var c = label.ResolveLabelConstant (bc);
if (c == null)
return false;
- if (rc.Switch.IsNullable && c is NullLiteral) {
+ if (switch_statement.IsNullable && c is NullLiteral) {
converted = c;
return true;
}
- converted = c.ImplicitConversionRequired (rc, rc.Switch.SwitchType);
+ if (switch_statement.IsPatternMatching) {
+ label = new Is (switch_statement.ExpressionValue, label, loc).Resolve (bc);
+ return true;
+ }
+
+ converted = c.ImplicitConversionRequired (bc, switch_statement.SwitchType);
return converted != null;
}
@@ -4621,7 +4649,7 @@ namespace Mono.CSharp {
class MissingBreak : Statement
{
- SwitchLabel label;
+ readonly SwitchLabel label;
public MissingBreak (SwitchLabel sl)
{
@@ -4629,6 +4657,8 @@ namespace Mono.CSharp {
this.loc = sl.loc;
}
+ public bool FallOut { get; set; }
+
protected override void DoEmit (EmitContext ec)
{
}
@@ -4639,9 +4669,13 @@ namespace Mono.CSharp {
protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
{
- fc.Report.Error (163, loc, "Control cannot fall through from one case label `{0}' to another",
- label.GetSignatureForError ());
-
+ if (FallOut) {
+ fc.Report.Error (8070, loc, "Control cannot fall out of switch statement through final case label `{0}'",
+ label.GetSignatureForError ());
+ } else {
+ fc.Report.Error (163, loc, "Control cannot fall through from one case label `{0}' to another",
+ label.GetSignatureForError ());
+ }
return true;
}
}
@@ -4708,18 +4742,30 @@ namespace Mono.CSharp {
}
}
+ public bool IsPatternMatching {
+ get {
+ return new_expr == null && SwitchType != null;
+ }
+ }
+
public List<SwitchLabel> RegisteredLabels {
get {
return case_labels;
}
}
+ public VariableReference ExpressionValue {
+ get {
+ return value;
+ }
+ }
+
//
// Determines the governing type for a switch. The returned
// expression might be the expression from the switch, or an
// expression that includes any potential conversions to
//
- Expression SwitchGoverningType (ResolveContext ec, Expression expr)
+ static Expression SwitchGoverningType (ResolveContext rc, Expression expr, bool unwrapExpr)
{
switch (expr.Type.BuiltinType) {
case BuiltinTypeSpec.Type.Byte:
@@ -4746,10 +4792,18 @@ namespace Mono.CSharp {
// conversions, we have to report an error
//
Expression converted = null;
- foreach (TypeSpec tt in ec.BuiltinTypes.SwitchUserTypes) {
- Expression e;
-
- e = Convert.ImplicitUserConversion (ec, expr, tt, loc);
+ foreach (TypeSpec tt in rc.Module.PredefinedTypes.SwitchUserTypes) {
+
+ if (!unwrapExpr && tt.IsNullableType && expr.Type.IsNullableType)
+ break;
+
+ var restr = Convert.UserConversionRestriction.ImplicitOnly |
+ Convert.UserConversionRestriction.ProbingOnly;
+
+ if (unwrapExpr)
+ restr |= Convert.UserConversionRestriction.NullableSourceOnly;
+
+ var e = Convert.UserDefinedConversion (rc, expr, tt, restr, Location.Null);
if (e == null)
continue;
@@ -4757,11 +4811,12 @@ namespace Mono.CSharp {
// Ignore over-worked ImplicitUserConversions that do
// an implicit conversion in addition to the user conversion.
//
- if (!(e is UserCast))
+ var uc = e as UserCast;
+ if (uc == null)
continue;
if (converted != null){
- ec.Report.ExtraInformation (loc, "(Ambiguous implicit user defined conversion in previous ");
+// rc.Report.ExtraInformation (loc, "(Ambiguous implicit user defined conversion in previous ");
return null;
}
@@ -4770,10 +4825,12 @@ namespace Mono.CSharp {
return converted;
}
- public static TypeSpec[] CreateSwitchUserTypes (BuiltinTypes types)
+ public static TypeSpec[] CreateSwitchUserTypes (ModuleContainer module, TypeSpec nullable)
{
+ var types = module.Compiler.BuiltinTypes;
+
// LAMESPEC: For some reason it does not contain bool which looks like csc bug
- return new[] {
+ TypeSpec[] stypes = new[] {
types.SByte,
types.Byte,
types.Short,
@@ -4785,6 +4842,17 @@ namespace Mono.CSharp {
types.Char,
types.String
};
+
+ if (nullable != null) {
+
+ Array.Resize (ref stypes, stypes.Length + 9);
+
+ for (int i = 0; i < 9; ++i) {
+ stypes [10 + i] = nullable.MakeGenericType (module, new [] { stypes [i] });
+ }
+ }
+
+ return stypes;
}
public void RegisterLabel (BlockContext rc, SwitchLabel sl)
@@ -4801,6 +4869,9 @@ namespace Mono.CSharp {
return;
}
+ if (sl.Converted == null)
+ return;
+
try {
if (string_labels != null) {
string string_value = sl.Converted.GetValue () as string;
@@ -4809,7 +4880,7 @@ namespace Mono.CSharp {
else
string_labels.Add (string_value, sl);
} else {
- if (sl.Converted is NullLiteral) {
+ if (sl.Converted.IsNull) {
case_null = sl;
} else {
labels.Add (sl.Converted.GetValueAsLong (), sl);
@@ -5005,46 +5076,63 @@ namespace Mono.CSharp {
if (Expr == null)
return false;
- new_expr = SwitchGoverningType (ec, Expr);
+ //
+ // LAMESPEC: User conversion from non-nullable governing type has a priority
+ //
+ new_expr = SwitchGoverningType (ec, Expr, false);
- if (new_expr == null && Expr.Type.IsNullableType) {
- unwrap = Nullable.Unwrap.Create (Expr, false);
- if (unwrap == null)
- return false;
+ if (new_expr == null) {
+ if (Expr.Type.IsNullableType) {
+ unwrap = Nullable.Unwrap.Create (Expr, false);
+ if (unwrap == null)
+ return false;
- new_expr = SwitchGoverningType (ec, unwrap);
+ //
+ // Unwrap + user conversion using non-nullable type is not allowed but user operator
+ // involving nullable Expr and nullable governing type is
+ //
+ new_expr = SwitchGoverningType (ec, unwrap, true);
+ }
}
+ Expression switch_expr;
if (new_expr == null) {
- if (Expr.Type != InternalType.ErrorType) {
- ec.Report.Error (151, loc,
- "A switch expression of type `{0}' cannot be converted to an integral type, bool, char, string, enum or nullable type",
- Expr.Type.GetSignatureForError ());
- }
+ if (ec.Module.Compiler.Settings.Version != LanguageVersion.Experimental) {
+ if (Expr.Type != InternalType.ErrorType) {
+ ec.Report.Error (151, loc,
+ "A switch expression of type `{0}' cannot be converted to an integral type, bool, char, string, enum or nullable type",
+ Expr.Type.GetSignatureForError ());
+ }
- return false;
- }
+ return false;
+ }
- // Validate switch.
- SwitchType = new_expr.Type;
+ switch_expr = Expr;
+ SwitchType = Expr.Type;
+ } else {
+ switch_expr = new_expr;
+ SwitchType = new_expr.Type;
+ if (SwitchType.IsNullableType) {
+ new_expr = unwrap = Nullable.Unwrap.Create (new_expr, true);
+ SwitchType = Nullable.NullableInfo.GetUnderlyingType (SwitchType);
+ }
- if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.Bool && ec.Module.Compiler.Settings.Version == LanguageVersion.ISO_1) {
- ec.Report.FeatureIsNotAvailable (ec.Module.Compiler, loc, "switch expression of boolean type");
- return false;
- }
+ if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.Bool && ec.Module.Compiler.Settings.Version == LanguageVersion.ISO_1) {
+ ec.Report.FeatureIsNotAvailable (ec.Module.Compiler, loc, "switch expression of boolean type");
+ return false;
+ }
- if (block.Statements.Count == 0)
- return true;
+ if (block.Statements.Count == 0)
+ return true;
- if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
- string_labels = new Dictionary<string, SwitchLabel> ();
- } else {
- labels = new Dictionary<long, SwitchLabel> ();
+ if (SwitchType.BuiltinType == BuiltinTypeSpec.Type.String) {
+ string_labels = new Dictionary<string, SwitchLabel> ();
+ } else {
+ labels = new Dictionary<long, SwitchLabel> ();
+ }
}
- case_labels = new List<SwitchLabel> ();
-
- var constant = new_expr as Constant;
+ var constant = switch_expr as Constant;
//
// Don't need extra variable for constant switch or switch with
@@ -5054,7 +5142,7 @@ namespace Mono.CSharp {
//
// Store switch expression for comparison purposes
//
- value = new_expr as VariableReference;
+ value = switch_expr as VariableReference;
if (value == null && !HasOnlyDefaultSection ()) {
var current_block = ec.CurrentBlock;
ec.CurrentBlock = Block;
@@ -5065,6 +5153,8 @@ namespace Mono.CSharp {
}
}
+ case_labels = new List<SwitchLabel> ();
+
Switch old_switch = ec.Switch;
ec.Switch = this;
var parent_los = ec.EnclosingLoopOrSwitch;
@@ -5160,14 +5250,16 @@ namespace Mono.CSharp {
if (sl != null && sl.SectionStart) {
//
- // Section is marked already via constant switch or goto case
+ // Section is marked already via goto case
//
if (!sl.IsUnreachable) {
section_rc = new Reachability ();
continue;
}
- if (section_rc.IsUnreachable) {
+ if (constant_label != null && constant_label != sl)
+ section_rc = Reachability.CreateUnreachable ();
+ else if (section_rc.IsUnreachable) {
section_rc = new Reachability ();
} else {
if (prev_label != null) {
@@ -5180,9 +5272,6 @@ namespace Mono.CSharp {
}
prev_label = sl;
-
- if (constant_label != null && constant_label != sl)
- section_rc = Reachability.CreateUnreachable ();
}
section_rc = s.MarkReachable (section_rc);
@@ -5190,7 +5279,10 @@ namespace Mono.CSharp {
if (!section_rc.IsUnreachable && prev_label != null) {
prev_label.SectionStart = false;
- var s = new MissingBreak (prev_label);
+ var s = new MissingBreak (prev_label) {
+ FallOut = true
+ };
+
s.MarkReachable (rc);
block.Statements.Add (s);
}
@@ -5355,6 +5447,11 @@ namespace Mono.CSharp {
var constant = label.Converted;
+ if (constant == null) {
+ label.Label.EmitBranchable (ec, label.GetILLabel (ec), true);
+ continue;
+ }
+
if (equal_method != null) {
value.Emit (ec);
constant.Emit (ec);
@@ -5380,6 +5477,11 @@ namespace Mono.CSharp {
void EmitDispatch (EmitContext ec)
{
+ if (IsPatternMatching) {
+ EmitShortSwitch (ec);
+ return;
+ }
+
if (value == null) {
//
// Constant switch, we've already done the work if there is only 1 label
@@ -5427,12 +5529,14 @@ namespace Mono.CSharp {
if (value != null) {
ec.Mark (loc);
+
+ var switch_expr = new_expr ?? Expr;
if (IsNullable) {
unwrap.EmitCheck (ec);
ec.Emit (OpCodes.Brfalse, nullLabel);
- value.EmitAssign (ec, new_expr, false, false);
- } else if (new_expr != value) {
- value.EmitAssign (ec, new_expr, false, false);
+ value.EmitAssign (ec, switch_expr, false, false);
+ } else if (switch_expr != value) {
+ value.EmitAssign (ec, switch_expr, false, false);
}
@@ -5442,6 +5546,8 @@ namespace Mono.CSharp {
//
ec.Mark (block.StartLocation);
block.IsCompilerGenerated = true;
+ } else {
+ new_expr.EmitSideEffect (ec);
}
block.Emit (ec);
@@ -5471,7 +5577,7 @@ namespace Mono.CSharp {
public override void AddEndDefiniteAssignment (FlowAnalysisContext fc)
{
- if (case_default == null)
+ if (case_default == null && !(new_expr is Constant))
return;
if (end_reachable_das == null)
@@ -5574,7 +5680,7 @@ namespace Mono.CSharp {
var ce = new CallEmitter ();
ce.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
- ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0));
+ ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0), true);
} else {
EmitFinallyBody (ec);
}
@@ -5639,7 +5745,7 @@ namespace Mono.CSharp {
if (finally_host != null) {
var ce = new CallEmitter ();
ce.InstanceExpression = new CompilerGeneratedThis (ec.CurrentType, loc);
- ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0));
+ ce.EmitPredefined (ec, finally_host.Spec, new Arguments (0), true);
} else {
EmitFinallyBody (ec);
}
@@ -5781,6 +5887,12 @@ namespace Mono.CSharp {
}
}
+ protected override bool DoFlowAnalysis (FlowAnalysisContext fc)
+ {
+ expr.FlowAnalysis (fc);
+ return base.DoFlowAnalysis (fc);
+ }
+
public override bool Resolve (BlockContext ec)
{
expr = expr.Resolve (ec);
@@ -6384,6 +6496,9 @@ namespace Mono.CSharp {
ctch.hoisted_temp.Emit (ec);
else
ctch.li.Emit (ec);
+
+ if (!ctch.IsGeneral && ctch.type.Kind == MemberKind.TypeParameter)
+ ec.Emit (OpCodes.Box, ctch.type);
}
var expr_start = ec.DefineLabel ();
diff --git a/mcs/mcs/typemanager.cs b/mcs/mcs/typemanager.cs
index 870b7be2a75..6e785dfc097 100644
--- a/mcs/mcs/typemanager.cs
+++ b/mcs/mcs/typemanager.cs
@@ -73,7 +73,6 @@ namespace Mono.CSharp
public readonly TypeSpec[] OperatorsUnaryMutator;
public readonly TypeSpec[] BinaryPromotionsTypes;
- public readonly TypeSpec[] SwitchUserTypes;
readonly BuiltinTypeSpec[] types;
@@ -125,7 +124,6 @@ namespace Mono.CSharp
OperatorsUnaryMutator = UnaryMutator.CreatePredefinedOperatorsTable (this);
BinaryPromotionsTypes = ConstantFold.CreateBinaryPromotionsTypes (this);
- SwitchUserTypes = Switch.CreateSwitchUserTypes (this);
types = new BuiltinTypeSpec[] {
Object, ValueType, Attribute,
@@ -200,6 +198,7 @@ namespace Mono.CSharp
public readonly PredefinedType SecurityAction;
public readonly PredefinedType Dictionary;
public readonly PredefinedType Hashtable;
+ public readonly TypeSpec[] SwitchUserTypes;
//
// C# 3.0
@@ -321,6 +320,8 @@ namespace Mono.CSharp
Task.Define ();
if (TaskGeneric.Define ())
TaskGeneric.TypeSpec.IsGenericTask = true;
+
+ SwitchUserTypes = Switch.CreateSwitchUserTypes (module, Nullable.TypeSpec);
}
}
diff --git a/mcs/mcs/typespec.cs b/mcs/mcs/typespec.cs
index 0da8133fbd2..a33159d8478 100644
--- a/mcs/mcs/typespec.cs
+++ b/mcs/mcs/typespec.cs
@@ -651,6 +651,7 @@ namespace Mono.CSharp
case MemberKind.Struct:
case MemberKind.Enum:
case MemberKind.Void:
+ case MemberKind.PointerType:
return false;
case MemberKind.InternalCompilerType:
//
diff --git a/mcs/tests/gtest-409.cs b/mcs/tests/gtest-409.cs
index 96aff7aa339..2071b625c3a 100644
--- a/mcs/tests/gtest-409.cs
+++ b/mcs/tests/gtest-409.cs
@@ -1,7 +1,7 @@
using System;
//
-// Parser conditional and cast expression tests
+// parser conditional and cast expression tests
//
class A<T>
@@ -31,6 +31,18 @@ public class ConditionalParsing
struct S
{
}
+
+ struct MyTestStruct : IDisposable
+ {
+ public void Dispose ()
+ {
+ }
+
+ public static implicit operator MyTestStruct (int i)
+ {
+ return new MyTestStruct ();
+ }
+ }
void Test_1 (bool a)
{
@@ -129,6 +141,20 @@ public class ConditionalParsing
bool? b = Test (1, arg:2);
}
+ void Test_17 ()
+ {
+ {
+ using (MyTestStruct? mts = (int?) 1)
+ {
+ }
+ }
+ }
+
+ void Test_18 (bool b, Action a)
+ {
+ var e = b ? () => { } : a;
+ }
+
static void Helper<T> (T arg)
{
}
diff --git a/mcs/tests/gtest-435.cs b/mcs/tests/gtest-435.cs
index c9c9e1c65b9..9add1097628 100644
--- a/mcs/tests/gtest-435.cs
+++ b/mcs/tests/gtest-435.cs
@@ -6,6 +6,11 @@ namespace testcase
{
public static int Main ()
{
+ DateTime? dt = null;
+ var res1 = default (DateTime?) == dt;
+ if (!res1)
+ return 5;
+
DateTime? a = default (DateTime?);
DateTime? b = default (DateTime?);
bool res = a == b;
diff --git a/mcs/tests/gtest-502.cs b/mcs/tests/gtest-502.cs
index dce8e68b55a..6789ff87568 100644
--- a/mcs/tests/gtest-502.cs
+++ b/mcs/tests/gtest-502.cs
@@ -15,6 +15,10 @@ class C<T>
static Type simple = typeof (Simple);
}
+class D<U> : C<U>
+{
+}
+
class A
{
public class N<T>
@@ -30,6 +34,9 @@ class M
if (typeof (TestAlias).ToString () != "A+N`1[System.Double]")
return 1;
+
+ if (typeof (D<>.Simple).ToString () != "C`1+Simple[T]")
+ return 2;
return 0;
}
diff --git a/mcs/tests/gtest-584.cs b/mcs/tests/gtest-584.cs
index 3a5b7869195..eeb4992cc93 100644
--- a/mcs/tests/gtest-584.cs
+++ b/mcs/tests/gtest-584.cs
@@ -66,6 +66,14 @@ class C
if ((s & e) != null)
return 15;
+ var res1 = (E?) 1 == null;
+ if (res1)
+ return 16;
+
+ var res2 = null == (E?) 1;
+ if (res2)
+ return 17;
+
Console.WriteLine ("ok");
return 0;
diff --git a/mcs/tests/gtest-618.cs b/mcs/tests/gtest-618.cs
new file mode 100644
index 00000000000..d92fa12d18a
--- /dev/null
+++ b/mcs/tests/gtest-618.cs
@@ -0,0 +1,73 @@
+using System;
+
+struct S1
+{
+ public static implicit operator int (S1? s)
+ {
+ return 1;
+ }
+}
+
+struct S2
+{
+ public static implicit operator int? (S2? s)
+ {
+ return null;
+ }
+}
+
+struct S3
+{
+ public static implicit operator int? (S3? s)
+ {
+ return 2;
+ }
+}
+
+struct S4
+{
+ public static implicit operator int? (S4 s)
+ {
+ return 3;
+ }
+}
+
+class C
+{
+ public static int Main ()
+ {
+ S1? s1 = new S1 ();
+ switch (s1) {
+ case 1:
+ break;
+ default:
+ return 1;
+ }
+
+ S2? s2 = new S2 ();
+ switch (s2) {
+ case null:
+ break;
+ default:
+ return 2;
+ }
+
+ S3? s3 = new S3 ();
+ switch (s3) {
+ case 2:
+ break;
+ default:
+ return 3;
+ }
+
+ S4 s4 = new S4 ();
+ switch (s4) {
+ case 3:
+ break;
+ default:
+ return 4;
+ }
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-619.cs b/mcs/tests/gtest-619.cs
new file mode 100644
index 00000000000..63bc79c5958
--- /dev/null
+++ b/mcs/tests/gtest-619.cs
@@ -0,0 +1,35 @@
+interface I<T>
+{
+}
+
+interface IB<T> : I<string>
+{
+
+}
+
+struct S
+{
+ class P
+ {
+ }
+
+ public class C : IB<P>
+ {
+ }
+}
+
+class M
+{
+ static void Test<T> (I<T> iface)
+ {
+ }
+
+ static void Test<T> (IB<T> iface)
+ {
+ }
+
+ static void Main ()
+ {
+ Test (new S.C ());
+ }
+}
diff --git a/mcs/tests/gtest-620.cs b/mcs/tests/gtest-620.cs
new file mode 100644
index 00000000000..45e6059a2c2
--- /dev/null
+++ b/mcs/tests/gtest-620.cs
@@ -0,0 +1,28 @@
+interface I<T>
+{
+}
+
+class A<T>
+{
+ public virtual T M<U> (U u) where U : T
+ {
+ return u;
+ }
+}
+
+class B<W> : A<I<W>>, I<string>
+{
+ public override I<W> M<U> (U u)
+ {
+ return u;
+ }
+}
+
+class Bug
+{
+ public static void Main ()
+ {
+ var b = new B<string> ();
+ b.M (b);
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-621.cs b/mcs/tests/gtest-621.cs
new file mode 100644
index 00000000000..cfff301328e
--- /dev/null
+++ b/mcs/tests/gtest-621.cs
@@ -0,0 +1,29 @@
+using System;
+
+class X
+{
+ static int Main ()
+ {
+ int? intArg = 1;
+ long? longArg = 2;
+
+ var g = intArg ?? longArg;
+ Console.WriteLine (g);
+ if (g != 1)
+ return 1;
+
+ intArg = null;
+ g = intArg ?? longArg;
+ Console.WriteLine (g);
+ if (g != 2)
+ return 2;
+
+ longArg = null;
+ g = intArg ?? longArg;
+ Console.WriteLine (g);
+ if (g != null)
+ return 3;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-622.cs b/mcs/tests/gtest-622.cs
new file mode 100644
index 00000000000..ab7a5798417
--- /dev/null
+++ b/mcs/tests/gtest-622.cs
@@ -0,0 +1,25 @@
+interface IX<TI>
+{
+ void M<TO> () where TO : TI;
+}
+
+interface IY
+{
+}
+
+class CY : IY
+{
+}
+
+class A : IX<IY>
+{
+ public void M<TO> () where TO : IY
+ {
+ }
+
+ public static void Main ()
+ {
+ var a = new A ();
+ a.M<CY> ();
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-623-lib.il b/mcs/tests/gtest-623-lib.il
new file mode 100644
index 00000000000..25c5b72ca4f
--- /dev/null
+++ b/mcs/tests/gtest-623-lib.il
@@ -0,0 +1,42 @@
+.assembly extern mscorlib
+{
+}
+
+.assembly 'gtest-623-lib'
+{
+}
+
+.module 'gtest-623-lib.dll'
+
+ .class public sequential ansi sealed beforefieldinit S
+ extends [mscorlib]System.ValueType
+ implements I {
+
+ .field public int32 Field
+
+ .method public hidebysig specialname rtspecialname
+ instance default void '.ctor' () cil managed
+ {
+ ldarg.0
+ ldc.i4.3
+ stfld int32 S::Field
+ ret
+ }
+
+ .method public final virtual hidebysig newslot
+ instance default int32 GetValue () cil managed
+ {
+ ldarg.0
+ ldfld int32 S::Field
+ ret
+ }
+ }
+
+ .class interface public auto ansi abstract I
+ {
+
+ .method public virtual hidebysig newslot abstract
+ instance default int32 GetValue () cil managed
+ {
+ }
+ }
diff --git a/mcs/tests/gtest-623.cs b/mcs/tests/gtest-623.cs
new file mode 100644
index 00000000000..ce9b79d1bd1
--- /dev/null
+++ b/mcs/tests/gtest-623.cs
@@ -0,0 +1,24 @@
+// Compiler options: -r:gtest-623-lib.dll
+
+using System;
+
+public class C
+{
+ static bool Test<T> () where T : struct, I
+ {
+ var t = new T ();
+ if (t.GetValue () != 3)
+ return false;
+
+ return true;
+ }
+
+ public static int Main ()
+ {
+ if (!Test<S> ())
+ return 1;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-autoproperty-03.cs b/mcs/tests/gtest-autoproperty-03.cs
index a18c4ea86f2..6484043543a 100644
--- a/mcs/tests/gtest-autoproperty-03.cs
+++ b/mcs/tests/gtest-autoproperty-03.cs
@@ -3,6 +3,7 @@
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
+using System.Diagnostics;
public class Test
{
@@ -14,10 +15,12 @@ public class Test
if (!(fields.Length > 0))
return 1;
object [] field_atts = fields[0].GetCustomAttributes (false);
- if (!(field_atts.Length > 0))
+ if (field_atts.Length != 2)
return 2;
- if (field_atts[0].GetType() != typeof (CompilerGeneratedAttribute))
+ if (field_atts[0].GetType() != typeof (DebuggerBrowsableAttribute))
return 3;
+ if (field_atts[1].GetType() != typeof (CompilerGeneratedAttribute))
+ return 4;
if (fields [0].Name != "<Foo>k__BackingField")
return 10;
diff --git a/mcs/tests/gtest-autoproperty-09.cs b/mcs/tests/gtest-autoproperty-09.cs
new file mode 100644
index 00000000000..b6109d943c3
--- /dev/null
+++ b/mcs/tests/gtest-autoproperty-09.cs
@@ -0,0 +1,57 @@
+using System;
+
+struct S
+{
+ public static int P { get; } = 4;
+
+ public static int[] PA { get; } = { 0, 2 };
+
+ public static int Main ()
+ {
+ if (P != 4)
+ return 1;
+
+ if (PA [1] != 2)
+ return 10;
+
+ var c = new C ();
+ if (c.P != -3)
+ return 2;
+
+ if (c.P2 != 1)
+ return 3;
+
+ c.P2 = 9;
+ if (c.P2 != 9)
+ return 4;
+
+ var s = new S2 (null);
+ if (s.P != 4)
+ return 12;
+
+ if (s.P2 != 1)
+ return 13;
+
+ s.P2 = 9;
+ if (s.P2 != 9)
+ return 14;
+
+ return 0;
+ }
+}
+
+class C
+{
+ public decimal P { get; } = -3;
+ public int P2 { get; set; } = 1;
+}
+
+struct S2
+{
+ public int P { get; } = 4;
+ public int P2 { get; set; } = 1;
+
+ public S2 (object o)
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-collectioninit-04.cs b/mcs/tests/gtest-collectioninit-04.cs
new file mode 100644
index 00000000000..8fc41c7555a
--- /dev/null
+++ b/mcs/tests/gtest-collectioninit-04.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+
+class X
+{
+ internal static Dictionary<Type, Func<string, string>> Test = new Dictionary<Type, Func<string, string>> { {
+ typeof (int),
+ metadata => "1"
+ }, {
+ typeof (uint),
+ metadata => "2"
+ },
+ };
+
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-initialize-13.cs b/mcs/tests/gtest-initialize-13.cs
new file mode 100644
index 00000000000..7c213e461eb
--- /dev/null
+++ b/mcs/tests/gtest-initialize-13.cs
@@ -0,0 +1,18 @@
+using System;
+
+public struct EventInitializerTest
+{
+ public event Action a;
+ public event Action b;
+ public event Action c;
+
+ public static void Main()
+ {
+ Action d = null;
+ var eit = new EventInitializerTest() {
+ a = null,
+ b = delegate {},
+ c = d
+ };
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-lambda-35.cs b/mcs/tests/gtest-lambda-35.cs
new file mode 100644
index 00000000000..4cfd316d42c
--- /dev/null
+++ b/mcs/tests/gtest-lambda-35.cs
@@ -0,0 +1,30 @@
+using System;
+
+class C
+{
+ static int Foo (Func<short> b)
+ {
+ return 1;
+ }
+
+ static int Foo (Func<int> a)
+ {
+ return 2;
+ }
+
+ static int Main()
+ {
+ if (Foo (() => 1) != 2)
+ return 1;
+
+ if (Foo (() => (short) 1) != 1)
+ return 2;
+
+ if (Foo (() => (byte) 1) != 1)
+ return 3;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-named-05.cs b/mcs/tests/gtest-named-05.cs
new file mode 100644
index 00000000000..125e60d4b13
--- /dev/null
+++ b/mcs/tests/gtest-named-05.cs
@@ -0,0 +1,26 @@
+class Test
+{
+ public static void Main ()
+ {
+ string p;
+ M (y: p = F (), x: p);
+
+ int i;
+ string p2;
+ M2 (out i, c: p2 = F (), b : p2);
+ }
+
+ public static void M (string x, string y)
+ {
+ }
+
+ static void M2 (out int a, string b, string c)
+ {
+ a = 2;
+ }
+
+ public static string F ()
+ {
+ return null;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-optional-32.cs b/mcs/tests/gtest-optional-32.cs
new file mode 100644
index 00000000000..4ca3a6097d5
--- /dev/null
+++ b/mcs/tests/gtest-optional-32.cs
@@ -0,0 +1,23 @@
+using System;
+
+abstract class A
+{
+ public abstract int[] Foo (params int[] args);
+}
+
+class B : A
+{
+ public override int[] Foo (int[] args = null)
+ {
+ return args;
+ }
+
+ static int Main ()
+ {
+ var b = new B();
+ if (b.Foo().Length != 0)
+ return 1;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/gtest-optional-33.cs b/mcs/tests/gtest-optional-33.cs
new file mode 100644
index 00000000000..0a0d311bb08
--- /dev/null
+++ b/mcs/tests/gtest-optional-33.cs
@@ -0,0 +1,72 @@
+using System.Runtime.CompilerServices;
+using System;
+
+class TestCallerLineNumber
+{
+ static void Test ([CallerLineNumber] object line = null)
+ {
+ }
+
+ static void Test ([CallerLineNumber] decimal line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] double line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] float line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] int line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] uint line = uint.MaxValue)
+ {
+ }
+
+ static void Test ([CallerLineNumber] long line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] ulong line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] decimal? line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] double? line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] float? line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] int? line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] uint? line = uint.MaxValue)
+ {
+ }
+
+ static void Test ([CallerLineNumber] long? line = 1)
+ {
+ }
+
+ static void Test ([CallerLineNumber] ulong? line = 1)
+ {
+ }
+}
+
+class D
+{
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-504.cs b/mcs/tests/test-504.cs
index c1d1f3210e1..d99207e30c1 100644
--- a/mcs/tests/test-504.cs
+++ b/mcs/tests/test-504.cs
@@ -3,6 +3,12 @@
using System;
+public enum FooEnum
+{
+ One,
+ Two
+};
+
class Foo
{
public static int y = 1;
@@ -41,4 +47,22 @@ class Foo
return s;
}
+
+ const FooEnum foo = FooEnum.Two;
+
+ static void Test_3 ()
+ {
+ object obj;
+
+ switch (foo) {
+ case FooEnum.One:
+ obj = new object ();
+ break;
+ case FooEnum.Two:
+ obj = new object ();
+ break;
+ }
+
+ Console.WriteLine (obj);
+ }
}
diff --git a/mcs/tests/test-640.cs b/mcs/tests/test-640.cs
index 705149a365c..c85253596cb 100644
--- a/mcs/tests/test-640.cs
+++ b/mcs/tests/test-640.cs
@@ -3,6 +3,11 @@ enum MyEnum : byte
Value_1 = 1
}
+enum E : ushort
+{
+ V = 1
+}
+
public class C
{
public static int Main ()
@@ -28,6 +33,11 @@ public class C
if (b != (MyEnum)254)
return 4;
+ var e = E.V;
+ checked {
+ var res = ~e;
+ }
+
System.Console.WriteLine ("OK");
return 0;
}
diff --git a/mcs/tests/test-671.cs b/mcs/tests/test-671.cs
index f6b992f384e..87395cdeb3e 100644
--- a/mcs/tests/test-671.cs
+++ b/mcs/tests/test-671.cs
@@ -9,7 +9,7 @@ class C
static bool Bar (object t)
{
- return Bar is object;
+ return t is object;
}
}
diff --git a/mcs/tests/test-77.cs b/mcs/tests/test-77.cs
index c4525d7b34d..7da6a379d43 100644
--- a/mcs/tests/test-77.cs
+++ b/mcs/tests/test-77.cs
@@ -57,7 +57,15 @@ class XX {
s = (object)1 + null;
if (s != "1")
return 12;
-
+
+ s = (string)null + (object)null;
+ if (s.Length != 0)
+ return 13;
+
+ s = (object)null + (string)null;
+ if (s.Length != 0)
+ return 14;
+
System.Console.WriteLine ("test ok");
return 0;
}
diff --git a/mcs/tests/test-792-lib.il b/mcs/tests/test-792-lib.il
index 175c506ad68..629fd98107f 100644
--- a/mcs/tests/test-792-lib.il
+++ b/mcs/tests/test-792-lib.il
@@ -26,6 +26,21 @@
}
}
+.class public auto ansi beforefieldinit A2
+ extends [mscorlib]System.Attribute
+{
+
+ .custom instance void class [mscorlib]System.AttributeUsageAttribute::'.ctor'(valuetype ['missing-lib']System.AttributeTargets) = (01 00 80 00 00 00 00 00 ) // ........
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ ldarg.0
+ call instance void [mscorlib]System.Attribute::.ctor()
+ ret
+ }
+}
+
.class public auto ansi beforefieldinit X extends [mscorlib]System.Object
{
.custom instance void A::.ctor(class [mscorlib]System.Type) = ( 01 00 44 58 58 2C 20 62 75 67 2D 31 2D 6C 69 62 // ..DXX, missing-lib
diff --git a/mcs/tests/test-792.cs b/mcs/tests/test-792.cs
index 71102051cdc..daa305048a4 100644
--- a/mcs/tests/test-792.cs
+++ b/mcs/tests/test-792.cs
@@ -2,6 +2,7 @@
// Compilation test only for missing 2nd level dependecies
+[A2]
class Program
{
void Test ()
diff --git a/mcs/tests/test-880.cs b/mcs/tests/test-880.cs
index 6449d564061..acb4a4d5a86 100644
--- a/mcs/tests/test-880.cs
+++ b/mcs/tests/test-880.cs
@@ -57,7 +57,18 @@ public class A
{
int f = 1;
int g;
- return f > 1 && OutCall (out g) && g > 1;
+ return f > 1 && OutCall (out g) && g > 1;
+ }
+
+ static void Test8 ()
+ {
+ bool x = true;
+
+ int a;
+ if (x ? OutCall (out a) : OutCall (out a))
+ System.Console.WriteLine (a);
+ else
+ System.Console.WriteLine (a);
}
static bool OutCall (out int arg)
diff --git a/mcs/tests/test-888.cs b/mcs/tests/test-888.cs
deleted file mode 100644
index 6cf0d50753c..00000000000
--- a/mcs/tests/test-888.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using System;
-
-// C#6 change
-
-struct S1
-{
- S2 s2;
-
- public S1 (int arg)
- {
- }
-}
-
-struct S2
-{
- int field;
-}
-
-class X
-{
- public static void Main ()
- {
- }
-} \ No newline at end of file
diff --git a/mcs/tests/test-898.cs b/mcs/tests/test-898.cs
index 5a67111f0b1..5b6940372fb 100644
--- a/mcs/tests/test-898.cs
+++ b/mcs/tests/test-898.cs
@@ -1,3 +1,5 @@
+// Compiler options: -unsafe
+
using System;
class BoolArrayWithByteValues
@@ -18,6 +20,26 @@ class BoolArrayWithByteValues
return 0;
}
+ static unsafe bool Ptr ()
+ {
+ bool rv;
+
+ var arr = new byte [256];
+ for (int i = 0; i < arr.Length; i++)
+ arr [i] = (byte) i;
+ fixed (byte* bptr = arr) {
+ rv = true;
+ for (int i = 0; i < arr.Length; i++) {
+ bool* boptr = (bool*)(bptr + i);
+ if (arr[i] > 0 && !*boptr)
+ rv = false;
+ System.Console.WriteLine ("#{0} = {1}", i, *boptr);
+ }
+ }
+
+ return rv;
+ }
+
static int Main()
{
var a = new bool[1];
@@ -49,6 +71,9 @@ class BoolArrayWithByteValues
if (res != 0)
return res;
+ if (!Ptr ())
+ return 6;
+
return 0;
}
} \ No newline at end of file
diff --git a/mcs/tests/test-899.cs b/mcs/tests/test-899.cs
new file mode 100644
index 00000000000..2f8c9e57d37
--- /dev/null
+++ b/mcs/tests/test-899.cs
@@ -0,0 +1,15 @@
+using System;
+
+class Test
+{
+ public static void Main()
+ {
+ object o;
+ lock (o = new object())
+ {
+ Console.WriteLine (o);
+ }
+
+ Console.WriteLine (o);
+ }
+}
diff --git a/mcs/tests/test-900.cs b/mcs/tests/test-900.cs
new file mode 100644
index 00000000000..b0e4b0a3da6
--- /dev/null
+++ b/mcs/tests/test-900.cs
@@ -0,0 +1,17 @@
+using System;
+
+class D
+{
+ public static implicit operator D (Action d)
+ {
+ return new D ();
+ }
+}
+
+class Program
+{
+ static void Main()
+ {
+ D d = (D) Main;
+ }
+}
diff --git a/mcs/tests/test-901.cs b/mcs/tests/test-901.cs
new file mode 100644
index 00000000000..bdd7d076ce7
--- /dev/null
+++ b/mcs/tests/test-901.cs
@@ -0,0 +1,23 @@
+using System;
+
+class X
+{
+ public static void Main ()
+ {
+ int i;
+ if (true) {
+ i = 3;
+ }
+
+ Console.WriteLine (i);
+
+ int i2;
+ if (false) {
+ throw new ApplicationException ();
+ } else {
+ i2 = 4;
+ }
+
+ Console.WriteLine (i2);
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-902.cs b/mcs/tests/test-902.cs
new file mode 100644
index 00000000000..271035fddbe
--- /dev/null
+++ b/mcs/tests/test-902.cs
@@ -0,0 +1,24 @@
+abstract class A
+{
+ public virtual void M (params B[] b)
+ {
+ }
+}
+
+class B : A
+{
+ public override void M (B[] b2)
+ {
+ }
+}
+
+class Test2
+{
+ public static void Main()
+ {
+ B b = new B();
+ A a = b;
+ a.M (b, b);
+ b.M (b, b, b);
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-903.cs b/mcs/tests/test-903.cs
new file mode 100644
index 00000000000..44513478a80
--- /dev/null
+++ b/mcs/tests/test-903.cs
@@ -0,0 +1,22 @@
+using System;
+
+struct S
+{
+}
+
+class C
+{
+ public static implicit operator S (C c)
+ {
+ return new S ();
+ }
+}
+
+class Program
+{
+ static void Main ()
+ {
+ C c = new C ();
+ var x = c ?? new S ();
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-904.cs b/mcs/tests/test-904.cs
new file mode 100644
index 00000000000..1f9516d3266
--- /dev/null
+++ b/mcs/tests/test-904.cs
@@ -0,0 +1,35 @@
+using System;
+
+class Test
+{
+ public static bool Foo (out int v)
+ {
+ v = 0;
+ return false;
+ }
+
+ static void Main()
+ {
+ bool b = false;
+
+ int a1;
+ var r1 = (false || Foo (out a1)) ? a1 : 1;
+
+ int a2;
+ var r2 = (true && Foo (out a2)) ? 2 : a2;
+
+ int a3;
+ var r3 = (b || Foo (out a3)) && Foo (out a3);
+ int b3 = a3;
+
+ int a4;
+ var r4 = ((b || Foo (out a4)) && Foo (out a4));
+ int b4 = a4;
+
+ int a5;
+ if ((b || Foo (out a5)) && (b || Foo (out a5)))
+ Console.WriteLine ();
+ else
+ Console.WriteLine (a5);
+ }
+}
diff --git a/mcs/tests/test-905.cs b/mcs/tests/test-905.cs
new file mode 100644
index 00000000000..ceff84a6847
--- /dev/null
+++ b/mcs/tests/test-905.cs
@@ -0,0 +1,13 @@
+using System;
+using i = System.Int16;
+
+enum E : i
+{
+}
+
+class X
+{
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-async-01.cs b/mcs/tests/test-async-01.cs
index b1926400c05..cc9271c9353 100644
--- a/mcs/tests/test-async-01.cs
+++ b/mcs/tests/test-async-01.cs
@@ -1,4 +1,3 @@
-// Compiler options: -langversion:future
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-02.cs b/mcs/tests/test-async-02.cs
index 7c9c34c2d6d..047f814923d 100644
--- a/mcs/tests/test-async-02.cs
+++ b/mcs/tests/test-async-02.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-04.cs b/mcs/tests/test-async-04.cs
index acdd9327ea0..8417e7c70d2 100644
--- a/mcs/tests/test-async-04.cs
+++ b/mcs/tests/test-async-04.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-06.cs b/mcs/tests/test-async-06.cs
index 2792df88dfb..a6c3ac9175a 100644
--- a/mcs/tests/test-async-06.cs
+++ b/mcs/tests/test-async-06.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-07.cs b/mcs/tests/test-async-07.cs
index c5a53c5c3d6..60c4ca000ef 100644
--- a/mcs/tests/test-async-07.cs
+++ b/mcs/tests/test-async-07.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-08.cs b/mcs/tests/test-async-08.cs
index ff8c1528ef8..9678b67b876 100644
--- a/mcs/tests/test-async-08.cs
+++ b/mcs/tests/test-async-08.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-09.cs b/mcs/tests/test-async-09.cs
index 0c401f2fed4..4171bd7e5be 100644
--- a/mcs/tests/test-async-09.cs
+++ b/mcs/tests/test-async-09.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-10.cs b/mcs/tests/test-async-10.cs
index ae346177a91..427bef64aab 100644
--- a/mcs/tests/test-async-10.cs
+++ b/mcs/tests/test-async-10.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-11.cs b/mcs/tests/test-async-11.cs
index e7bc5990f3a..11a02cb83dd 100644
--- a/mcs/tests/test-async-11.cs
+++ b/mcs/tests/test-async-11.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-12.cs b/mcs/tests/test-async-12.cs
index eff8bda80f2..3876c8a1e7d 100644
--- a/mcs/tests/test-async-12.cs
+++ b/mcs/tests/test-async-12.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-14.cs b/mcs/tests/test-async-14.cs
index 789020a7a17..ff15d7fef75 100644
--- a/mcs/tests/test-async-14.cs
+++ b/mcs/tests/test-async-14.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-16.cs b/mcs/tests/test-async-16.cs
index 7bbfcacf94e..d20aeb4efd4 100644
--- a/mcs/tests/test-async-16.cs
+++ b/mcs/tests/test-async-16.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-18.cs b/mcs/tests/test-async-18.cs
index bfcd35be560..1dcfa4c546b 100644
--- a/mcs/tests/test-async-18.cs
+++ b/mcs/tests/test-async-18.cs
@@ -1,4 +1,3 @@
-// Compiler options: -langversion:future
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-19.cs b/mcs/tests/test-async-19.cs
index 1b3db32b9b0..45201aba113 100644
--- a/mcs/tests/test-async-19.cs
+++ b/mcs/tests/test-async-19.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-20.cs b/mcs/tests/test-async-20.cs
index 76bc245e1d3..e0f53ea68f8 100644
--- a/mcs/tests/test-async-20.cs
+++ b/mcs/tests/test-async-20.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-24.cs b/mcs/tests/test-async-24.cs
index 8d4fe91de04..85f6b2c904f 100644
--- a/mcs/tests/test-async-24.cs
+++ b/mcs/tests/test-async-24.cs
@@ -1,4 +1,3 @@
-// Compiler options: -langversion:future
using System;
using System.Threading.Tasks;
using System.Threading;
diff --git a/mcs/tests/test-async-25.cs b/mcs/tests/test-async-25.cs
index 49489478650..55a0197f955 100644
--- a/mcs/tests/test-async-25.cs
+++ b/mcs/tests/test-async-25.cs
@@ -1,4 +1,3 @@
-// Compiler options: -langversion:future
using System;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-26.cs b/mcs/tests/test-async-26.cs
index 93f0139c28d..a1b859299c0 100644
--- a/mcs/tests/test-async-26.cs
+++ b/mcs/tests/test-async-26.cs
@@ -1,5 +1,3 @@
-// Compiler options: -langversion:future
-
using System;
using System.Threading;
using System.Threading.Tasks;
diff --git a/mcs/tests/test-async-73.cs b/mcs/tests/test-async-73.cs
new file mode 100644
index 00000000000..dc1935ff743
--- /dev/null
+++ b/mcs/tests/test-async-73.cs
@@ -0,0 +1,31 @@
+using System.Threading.Tasks;
+using System;
+
+class X
+{
+ static async Task<int> Foo ()
+ {
+ var v = Throws ();
+
+ try {
+ await v;
+ } catch (Exception e) {
+ return 0;
+ }
+
+ return 1;
+ }
+
+ static async Task<int> Throws ()
+ {
+ throw new Exception ();
+ }
+
+ static int Main ()
+ {
+ if (Foo ().Result != 0)
+ return 1;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-async-74.cs b/mcs/tests/test-async-74.cs
new file mode 100644
index 00000000000..97bb7fd946c
--- /dev/null
+++ b/mcs/tests/test-async-74.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Threading.Tasks;
+
+class AwaitGotoBug
+{
+ public async Task Test()
+ {
+ using ((IDisposable)null)
+ {
+ retry:
+
+ if (Equals(1, 2))
+ {
+ await Task.Yield();
+ goto retry;
+ }
+ else
+ {
+ await Task.Yield();
+ }
+ }
+ }
+
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-dictinit-01.cs b/mcs/tests/test-dictinit-01.cs
new file mode 100644
index 00000000000..1944ae8c4a9
--- /dev/null
+++ b/mcs/tests/test-dictinit-01.cs
@@ -0,0 +1,49 @@
+using System;
+using System.Collections.Generic;
+
+class Program
+{
+ static int Main ()
+ {
+ var c1 = new C {
+ ["aaa"] = 12,
+ };
+
+ if (c1.Dict ["aaa"] != 12)
+ return 1;
+
+ var c2 = new C {
+ ["a1"] = 5,
+ ["a2"] = 10,
+ Value = 20,
+ };
+
+ if (c2.Dict ["a1"] != 5)
+ return 2;
+
+ if (c2.Dict ["a2"] != 10)
+ return 3;
+
+ if (c2.Value != 20)
+ return 4;
+
+ return 0;
+ }
+}
+
+
+class C
+{
+ public Dictionary<string, int> Dict = new Dictionary<string, int> ();
+
+ public int Value;
+
+ public int this [string arg] {
+ get {
+ return Dict [arg];
+ }
+ set {
+ Dict [arg] = value;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-dictinit-02.cs b/mcs/tests/test-dictinit-02.cs
new file mode 100644
index 00000000000..ecd59dac1e0
--- /dev/null
+++ b/mcs/tests/test-dictinit-02.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+
+class Program
+{
+ static int Main ()
+ {
+ var c = new C {
+ ["l1"] = new C {
+ ["l2"] = new C () {
+ Value = 10
+ }
+ },
+ ["l5"] = {
+ ["51"] = new C () {
+ Value = 100
+ }
+ }
+ };
+
+ if (c ["l1"]["l2"].Value != 10)
+ return 1;
+
+ if (c ["l5"]["51"].Value != 100)
+ return 2;
+
+ return 0;
+ }
+}
+
+
+class C
+{
+ public Dictionary<string, C> Dict = new Dictionary<string, C> ();
+
+ public int Value;
+
+ public C this [string arg] {
+ get {
+ C c;
+ if (!Dict.TryGetValue (arg, out c)) {
+ c = new C ();
+ Dict [arg] = c;
+ }
+
+ return c;
+ }
+ set {
+ Dict [arg] = value;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-ex-filter-06.cs b/mcs/tests/test-ex-filter-06.cs
new file mode 100644
index 00000000000..86bbf0e2ead
--- /dev/null
+++ b/mcs/tests/test-ex-filter-06.cs
@@ -0,0 +1,29 @@
+using System;
+using System.IO;
+using System.Collections.Generic;
+
+class C
+{
+ static int Test<T> () where T : Exception
+ {
+ try {
+ throw null;
+ } catch (T t) if (t.Message != null) {
+ return 0;
+ }
+ }
+
+ static int Main()
+ {
+ try {
+ Test<ApplicationException> ();
+ return 1;
+ } catch {
+ }
+
+ if (Test<NullReferenceException> () != 0)
+ return 2;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-expression-bodied-01.cs b/mcs/tests/test-expression-bodied-01.cs
new file mode 100644
index 00000000000..6d827f21ed6
--- /dev/null
+++ b/mcs/tests/test-expression-bodied-01.cs
@@ -0,0 +1,54 @@
+using System;
+
+class C
+{
+ int value;
+ string f1 = "f-1";
+ string f2 = "f=2";
+
+ public static string Test1 (string a, string b) => a + "|" + b;
+ void Test2 (int x) => value = x;
+ Func<int> Test3 (int a) => () => a;
+
+ public static implicit operator string (C c) => "op";
+
+ protected string Prop => f1 + " " + f2;
+ static Func<string> Prop2 => () => "n1";
+
+ public int this[int arg1, int arg2] => arg2 - arg1;
+
+
+ int Check ()
+ {
+ if (Test1 ("1", "5") != "1|5")
+ return 1;
+
+ Test2 (6);
+ if (value != 6)
+ return 2;
+
+ if (Test3 (9) () != 9)
+ return 3;
+
+ string s = this;
+ if (s != "op")
+ return 4;
+
+ if (Prop != "f-1 f=2")
+ return 5;
+
+ if (Prop2 () != "n1")
+ return 6;
+
+ if (this [13, 20] != 7)
+ return 7;
+
+ return 0;
+ }
+
+ static int Main()
+ {
+ var c = new C ();
+ return c.Check ();
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-nameof-01.cs b/mcs/tests/test-nameof-01.cs
new file mode 100644
index 00000000000..019d0770181
--- /dev/null
+++ b/mcs/tests/test-nameof-01.cs
@@ -0,0 +1,12 @@
+class X
+{
+ public static int Main ()
+ {
+ const string s = nameof (X);
+ System.Console.WriteLine (s);
+ if (s != "X")
+ return 1;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-nameof-02.cs b/mcs/tests/test-nameof-02.cs
new file mode 100644
index 00000000000..a8bb677416f
--- /dev/null
+++ b/mcs/tests/test-nameof-02.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections.Generic;
+using SCG = System.Collections.Generic;
+//using SCGL = System.Collections.Generic.List<>;
+
+class A<T>
+{
+ public class B
+ {
+ public int Foo;
+ }
+}
+
+class X
+{
+ bool field;
+ long Prop { get; set; }
+ event Action ev;
+
+ public static int Main ()
+ {
+ int res;
+ var x = new X ();
+ res = x.SimpleName (1);
+ if (res != 0)
+ return res;
+
+ res = x.MemberAccess ();
+ if (res != 0)
+ return 20 + res;
+
+ res = x.QualifiedName ();
+ if (res != 0)
+ return 40 + res;
+
+ return 0;
+ }
+
+ static void GenMethod<T, U, V> ()
+ {
+ }
+
+ int SimpleName<T> (T arg)
+ {
+ const object c = null;
+ decimal d = 0;
+
+ if (nameof (T) != "T")
+ return 1;
+
+ if (nameof (arg) != "arg")
+ return 2;
+
+ if (nameof (c) != "c")
+ return 3;
+
+ if (nameof (d) != "d")
+ return 4;
+
+ if (nameof (field) != "field")
+ return 5;
+
+ if (nameof (Prop) != "Prop")
+ return 6;
+
+ if (nameof (@Main) != "Main")
+ return 7;
+
+ if (nameof (ev) != "ev")
+ return 8;
+
+ if (nameof (Int32) != "Int32")
+ return 9;
+
+ if (nameof (Action) != "Action")
+ return 10;
+
+ if (nameof (List) != "List")
+ return 11;
+
+ if (nameof (GenMethod) != "GenMethod")
+ return 12;
+
+ return 0;
+ }
+
+ int MemberAccess ()
+ {
+ if (nameof (X.field) != "field")
+ return 1;
+
+ if (nameof (X.Prop) != "Prop")
+ return 2;
+
+ if (nameof (Console.WriteLine) != "WriteLine")
+ return 3;
+
+ if (nameof (System.Collections.Generic.List) != "List")
+ return 4;
+
+ if (nameof (System.Collections) != "Collections")
+ return 5;
+
+ if (nameof (X.GenMethod) != "GenMethod")
+ return 6;
+
+ if (nameof (A<>.B) != "B")
+ return 7;
+
+ if (nameof (A<>.B.Foo) != "Foo")
+ return 7;
+
+ return 0;
+ }
+
+ int QualifiedName ()
+ {
+ if (nameof (global::System.Int32) != "Int32")
+ return 1;
+
+ if (nameof (SCG.List) != "List")
+ return 2;
+
+// if (nameof (SCGL.Contains) != "Contains")
+// return 3;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-nameof-03.cs b/mcs/tests/test-nameof-03.cs
new file mode 100644
index 00000000000..c31084c9837
--- /dev/null
+++ b/mcs/tests/test-nameof-03.cs
@@ -0,0 +1,22 @@
+using T2;
+
+static class T2
+{
+ public static int nameof (string s)
+ {
+ return 2;
+ }
+}
+
+class X
+{
+ public static int Main ()
+ {
+ string s = "";
+ var v = nameof (s);
+ if (v != 2)
+ return 1;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-nameof-04.cs b/mcs/tests/test-nameof-04.cs
new file mode 100644
index 00000000000..929aa1159f2
--- /dev/null
+++ b/mcs/tests/test-nameof-04.cs
@@ -0,0 +1,34 @@
+interface IA
+{
+ void M (int arg);
+ int Prop { get; set; }
+}
+
+interface IB
+{
+ void M (string arg);
+ void M<T> (T arg);
+ int Prop { get; set; }
+}
+
+interface I : IA, IB
+{
+ void Extra (string method = nameof (M), string prop = nameof (Prop));
+}
+
+class Ambiguous
+{
+ public static int Main ()
+ {
+ string res;
+ res = nameof (I.M);
+ if (res != "M")
+ return 1;
+
+ res = nameof (I.Prop);
+ if (res != "Prop")
+ return 2;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-01.cs b/mcs/tests/test-null-operator-01.cs
new file mode 100644
index 00000000000..63cae1282ee
--- /dev/null
+++ b/mcs/tests/test-null-operator-01.cs
@@ -0,0 +1,162 @@
+using System;
+
+struct S
+{
+ public int Prop { get; set; }
+}
+
+interface I
+{
+ int Method ();
+}
+
+class CI : I
+{
+ public int Method ()
+ {
+ return 33;
+ }
+
+ public int Prop { get; set; }
+}
+
+class C
+{
+ static int prop_calls;
+ static string Prop {
+ get {
+ ++prop_calls;
+ return null;
+ }
+ }
+
+ static int TestArray ()
+ {
+ int[] k = null;
+ var t1 = k?.ToString ();
+ if (t1 != null)
+ return 1;
+
+ var t2 = k?.GetLength (0);
+ if (t2 != null)
+ return 2;
+
+ var t3 = k?.Length;
+ if (t3 != null)
+ return 3;
+
+ var t4 = k?.GetLength (0).ToString () ?? "N";
+ if (t4 != "N")
+ return 4;
+
+ var t5 = k?.Length.ToString () ?? "N";
+ if (t5 != "N")
+ return 5;
+
+ k = new int[] { 3 };
+ var t11 = k?.ToString ();
+ if (t11.GetType () != typeof (string))
+ return 10;
+
+ var t12 = k?.GetLength (0);
+ if (t12.GetType () != typeof (int))
+ return 11;
+
+ var t13 = k?.Length;
+ if (t13.GetType () != typeof (int))
+ return 12;
+
+ return 0;
+ }
+
+ static int TestReferenceType ()
+ {
+ string s = null;
+ var t1 = s?.Split ();
+ if (t1 != null)
+ return 1;
+
+ var t2 = s?.Length;
+ if (t2 != null)
+ return 2;
+
+ var t3 = Prop?.Length;
+ if (t3 != null)
+ return 3;
+ if (prop_calls != 1)
+ return 4;
+
+ var t4 = Prop?.Split ();
+ if (t4 != null)
+ return 5;
+ if (prop_calls != 2)
+ return 6;
+
+ return 0;
+ }
+
+ static int TestGeneric<T> (T t) where T : class, I
+ {
+ var t1 = t?.Method ();
+ if (t1 != null)
+ return 1;
+
+ T[] at = null;
+ var t2 = at?.Length;
+ if (t2 != null)
+ return 2;
+
+ return 0;
+ }
+
+ static int TestNullable ()
+ {
+ int? i = 4;
+ var m = i?.CompareTo (3);
+ if (m.GetType () != typeof (int))
+ return 1;
+
+ if (m != 1)
+ return 2;
+
+ DateTime? dt = null;
+ dt?.ToString ();
+ if (dt?.ToString () != null)
+ return 3;
+
+ byte? b = 0;
+ if (b?.ToString () != "0")
+ return 4;
+
+ S? s = null;
+ var p1 = s?.Prop;
+ if (p1 != null)
+ return 5;
+
+ return 0;
+ }
+
+ static int Main ()
+ {
+ int res;
+ res = TestNullable ();
+ if (res != 0)
+ return 100 + res;
+
+ res = TestArray ();
+ if (res != 0)
+ return 200 + res;
+
+ res = TestReferenceType ();
+ if (res != 0)
+ return 300 + res;
+
+ CI ci = null;
+ res = TestGeneric<CI> (ci);
+ if (res != 0)
+ return 400 + res;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-02.cs b/mcs/tests/test-null-operator-02.cs
new file mode 100644
index 00000000000..c6dfa614d03
--- /dev/null
+++ b/mcs/tests/test-null-operator-02.cs
@@ -0,0 +1,124 @@
+using System;
+
+class CI
+{
+ public long Field;
+ public sbyte? FieldNullable;
+ public object FieldReference;
+
+ public int Prop { get; set; }
+ public byte? PropNullable { get; set; }
+ public object PropReference { get; set; }
+
+ public event Action ev1;
+}
+
+class C
+{
+ static int TestProperty ()
+ {
+ CI ci = null;
+
+ var m1 = ci?.Prop;
+ var m2 = ci?.PropNullable;
+ var m3 = ci?.PropReference;
+
+ var m4 = ci?.Prop.ToString () ?? "N";
+ if (m4 != "N")
+ return 1;
+
+ var m5 = ci?.PropNullable.ToString () ?? "N";
+ if (m5 != "N")
+ return 2;
+
+ var m6 = ci?.PropReference.ToString () ?? "N";
+ if (m6 != "N")
+ return 3;
+
+// ci?.Prop = 6;
+
+ ci = new CI ();
+ m1 = ci?.Prop;
+ m2 = ci?.PropNullable;
+ m3 = ci?.PropReference;
+
+// ci?.Prop = 5;
+// if (ci.Prop != 5)
+// return 1;
+
+// TODO: It's not allowed for now
+// ci?.Prop += 4;
+// var pp1 = ci?.Prop = 4;
+// var pp2 = ci?.Prop += 4;
+
+ return 0;
+ }
+
+ static int TestField ()
+ {
+ CI ci = null;
+ var m1 = ci?.Field;
+ var m2 = ci?.FieldNullable;
+ var m3 = ci?.FieldReference;
+ var m4 = ci?.Field.ToString () ?? "N";
+ if (m4 != "N")
+ return 1;
+
+ var m5 = ci?.FieldNullable.ToString () ?? "N";
+ if (m5 != "N")
+ return 2;
+
+ var m6 = ci?.FieldReference.ToString () ?? "N";
+ if (m6 != "N")
+ return 3;
+
+// ci?.Field = 6;
+
+ ci = new CI ();
+ m1 = ci?.Field;
+ m2 = ci?.FieldNullable;
+ m3 = ci?.FieldReference;
+
+// ci?.Field = 5;
+// if (ci.Field != 5)
+// return 1;
+
+// TODO: It's not allowed for now
+// ci?.Field += 4;
+// var pp1 = ci?.Field = 4;
+// var pp2 = ci?.Field += 4;
+
+ return 0;
+ }
+/*
+ static int TestEvent ()
+ {
+ CI ci = null;
+ ci?.ev1 += null;
+
+ ci = new CI ();
+ ci?.ev1 += null;
+
+ return 0;
+ }
+*/
+ static int Main ()
+ {
+ int res;
+
+ res = TestProperty ();
+ if (res != 0)
+ return 10 + res;
+
+ res = TestField ();
+ if (res != 0)
+ return 20 + res;
+
+// res = TestEvent ();
+// if (res != 0)
+// return 30 + res;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-03.cs b/mcs/tests/test-null-operator-03.cs
new file mode 100644
index 00000000000..2dec27a104c
--- /dev/null
+++ b/mcs/tests/test-null-operator-03.cs
@@ -0,0 +1,33 @@
+using System;
+
+class C
+{
+ int field;
+
+ int Test1 ()
+ {
+ var x = this?.field;
+ if (x == null)
+ return 1;
+
+ var x2 = "abc"?.GetHashCode();
+ if (x2 == null)
+ return 2;
+
+ return 0;
+ }
+
+ static int Main ()
+ {
+ var c = new C ();
+ c.Test1 ();
+
+ const C c2 = null;
+ var res = c2?.field;
+ if (res != null)
+ return 1;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-04.cs b/mcs/tests/test-null-operator-04.cs
new file mode 100644
index 00000000000..6796920d3fa
--- /dev/null
+++ b/mcs/tests/test-null-operator-04.cs
@@ -0,0 +1,14 @@
+using System;
+
+public class D
+{
+ void Foo ()
+ {
+ }
+
+ public static void Main()
+ {
+ D d = null;
+ Action a = d?.Foo;
+ }
+}
diff --git a/mcs/tests/test-null-operator-05.cs b/mcs/tests/test-null-operator-05.cs
new file mode 100644
index 00000000000..e8d9cfffbf1
--- /dev/null
+++ b/mcs/tests/test-null-operator-05.cs
@@ -0,0 +1,66 @@
+using System;
+
+class CI
+{
+ public string this [string i] { set { } get { return ""; } }
+ public int? this [int i] { set { } get { return 1; } }
+}
+
+class C
+{
+ static int TestArrayAccess ()
+ {
+ byte[] arr = null;
+ var v = arr? [0];
+ if (v != null)
+ return 1;
+
+ long?[] ar2 = null;
+ var v2 = ar2? [-1];
+ if (v2 != null)
+ return 2;
+
+ var v3 = arr? [0].GetHashCode () ?? 724;
+ if (v3 != 724)
+ return 3;
+
+// TODO: Disabled for now?
+// arr? [0] += 2;
+ return 0;
+ }
+
+ static int TestIndexerAccess ()
+ {
+ CI ci = null;
+ var v = ci? ["x"];
+ if (v != null)
+ return 1;
+
+ var v2 = ci? [0];
+ if (v2 != null)
+ return 2;
+
+ var v3 = ci? [0].GetHashCode () ?? 724;
+ if (v3 != 724)
+ return 3;
+
+// TODO: Disabled for now?
+// ci? [0] += 3;
+ return 0;
+ }
+
+ static int Main ()
+ {
+ int res;
+ res = TestArrayAccess ();
+ if (res != 0)
+ return 10 + res;
+
+ res = TestIndexerAccess ();
+ if (res != 0)
+ return 20 + res;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-06.cs b/mcs/tests/test-null-operator-06.cs
new file mode 100644
index 00000000000..b73489217b8
--- /dev/null
+++ b/mcs/tests/test-null-operator-06.cs
@@ -0,0 +1,32 @@
+public class C
+{
+ static int Main ()
+ {
+ string x = null;
+ var t1 = x?.ToString ().ToString ().ToString () ?? "t1";
+ if (t1 != "t1")
+ return 1;
+
+ var t2 = x?.ToString ().ToString ()?.ToString () ?? "t2";
+ if (t2 != "t2")
+ return 2;
+
+ var t3 = x?.ToString ()?.ToString ()?.ToString () ?? "t3";
+ if (t3 != "t3")
+ return 3;
+
+ var t4 = x?.ToString ().GetHashCode () ?? 9;
+ if (t4 != 9)
+ return 4;
+
+ var t5 = x?.ToString ()?.GetHashCode () ?? 8;
+ if (t5 != 8)
+ return 5;
+
+ var t6 = x?.ToString().Length;
+ if (t6 != null)
+ return 6;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-07.cs b/mcs/tests/test-null-operator-07.cs
new file mode 100644
index 00000000000..ec9ced5ea04
--- /dev/null
+++ b/mcs/tests/test-null-operator-07.cs
@@ -0,0 +1,24 @@
+using System;
+
+public static class C
+{
+ static int Main()
+ {
+ int[] a = null;
+ var r = a?.EM ().EM ().EM () ?? "N";
+ if (r != "N")
+ return 1;
+
+ a?.EM ().EM ();
+
+ return 0;
+ }
+
+ static string EM (this object arg)
+ {
+ if (arg == null)
+ throw new ApplicationException ();
+
+ return "";
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-08.cs b/mcs/tests/test-null-operator-08.cs
new file mode 100644
index 00000000000..b988e49078d
--- /dev/null
+++ b/mcs/tests/test-null-operator-08.cs
@@ -0,0 +1,93 @@
+using System;
+
+interface I
+{
+ void Foo (bool expected);
+}
+
+struct S : I
+{
+ bool flag;
+
+ public void Foo (bool expected)
+ {
+ Console.WriteLine (flag);
+ if (expected != flag)
+ throw new ApplicationException ();
+
+ flag = true;
+ }
+}
+
+class Program
+{
+ static void M<T> (T x)
+ {
+ object s = x?.ToString ();
+ System.Console.WriteLine (s);
+
+ var h = x?.GetHashCode ();
+ System.Console.WriteLine (h);
+ }
+
+ static void M2<T> (T[] x)
+ {
+ object s = x?.ToString ();
+ System.Console.WriteLine (s);
+
+ var h = x?.GetHashCode ();
+ System.Console.WriteLine (h);
+ }
+
+ static void M2_2<T> (T[] x)
+ {
+ object s = x[0]?.ToString ();
+ System.Console.WriteLine (s);
+
+ var h = x[0]?.GetHashCode ();
+ System.Console.WriteLine (h);
+ }
+
+ static void M3<T> (T? x) where T : struct
+ {
+ object s = x?.ToString ();
+ System.Console.WriteLine (s);
+
+ var h = x?.GetHashCode ();
+ System.Console.WriteLine (h);
+ }
+
+ static void TestAddress_1<T> (T t) where T : I
+ {
+ t?.Foo (false);
+ t?.Foo (true);
+ }
+
+ static void TestAddress_2<T> (T[] t) where T : I
+ {
+ t[0]?.Foo (false);
+ t[0]?.Foo (true);
+ }
+
+ static void Main()
+ {
+ M<string> (null);
+ M (1);
+ M("X");
+
+ M2<int> (null);
+ M2<string> (null);
+ M2 (new [] { 1 });
+ M2 (new [] { "x" });
+
+ M2_2 (new string [1]);
+ M2_2 (new int [1]);
+
+ M3<int> (1);
+ M3<byte> (null);
+
+ TestAddress_1 (new S ());
+ var ar = new [] { new S () };
+ TestAddress_2 (ar);
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-null-operator-09.cs b/mcs/tests/test-null-operator-09.cs
new file mode 100644
index 00000000000..9be052c44f1
--- /dev/null
+++ b/mcs/tests/test-null-operator-09.cs
@@ -0,0 +1,19 @@
+delegate int D (int t);
+
+class X
+{
+ D d = delegate { return 4; };
+
+ public static int Main ()
+ {
+ X x = null;
+
+ var res = x?.d (55);
+ if (res != null)
+ return 1;
+
+ x?.d (1);
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-partial-33.cs b/mcs/tests/test-partial-33.cs
new file mode 100644
index 00000000000..02ad61b8bd3
--- /dev/null
+++ b/mcs/tests/test-partial-33.cs
@@ -0,0 +1,8 @@
+partial class X
+{
+ static partial void Main ();
+
+ static partial void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-pattern-01.cs b/mcs/tests/test-pattern-01.cs
new file mode 100644
index 00000000000..6db67fb1672
--- /dev/null
+++ b/mcs/tests/test-pattern-01.cs
@@ -0,0 +1,43 @@
+// Compiler options: -langversion:experimental
+
+using System;
+
+class TypePattern
+{
+ public static int Main ()
+ {
+ object o = 3;
+ bool r = o is System.String t1;
+ if (t1 != null)
+ return 1;
+
+ if (r)
+ return 2;
+
+ if (o is string t2)
+ return 3;
+
+ if (t2 != null)
+ return 4;
+
+ object o2 = (int?) 4;
+ bool r2 = o2 is byte? t3;
+
+ if (t3 != null)
+ return 5;
+
+ if (r2)
+ return 6;
+
+ long? l = 5;
+ bool r3 = l is long t4;
+ if (t4 != 5)
+ return 7;
+
+ if (!r3)
+ return 8;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-pattern-02.cs b/mcs/tests/test-pattern-02.cs
new file mode 100644
index 00000000000..695775ec179
--- /dev/null
+++ b/mcs/tests/test-pattern-02.cs
@@ -0,0 +1,93 @@
+// Compiler options: -langversion:experimental
+
+using System;
+
+enum MyEnum : short
+{
+ V_4 = 4
+}
+
+class ConstantPattern
+{
+ static bool Generic<T> (T t) where T : class
+ {
+ return t is default (T);
+ }
+
+ public static int Main ()
+ {
+ bool b4 = false;
+ b4 = !b4;
+ object o = "x";
+ bool r1 = o is "y";
+ if (r1)
+ return 1;
+
+ r1 = o is "x";
+ if (!r1)
+ return 2;
+
+ string s = "o";
+ if (s is null)
+ return 3;
+
+ if (s is "oo")
+ return 4;
+
+ if (!(s is "o"))
+ return 5;
+
+ int? o3 = 4;
+ bool r3 = o3 is null;
+ if (r3)
+ return 6;
+
+ r3 = o3 is 4;
+ if (!r3)
+ return 7;
+
+ object o4 = (byte?)255;
+ var ggg = o4 is 255;
+ if (!ggg)
+ return 8;
+
+ if (o4 is null)
+ return 9;
+
+ object o5 = (double)-255;
+ if (!(o5 is -byte.MaxValue))
+ return 10;
+
+ object o6 = MyEnum.V_4;
+ bool r4 = o6 is 4;
+ if (r4)
+ return 11;
+
+ r4 = o6 is MyEnum.V_4;
+ if (!r4)
+ return 12;
+
+ ConstantPattern o7 = new ConstantPattern ();
+ if (!(o7 is ConstantPattern))
+ return 13;
+
+ if (!(o7 is object))
+ return 14;
+
+ object o8 = true;
+ if (o8 is false)
+ return 15;
+
+ if (!(o8 is true))
+ return 16;
+
+ if (Generic (""))
+ return 17;
+
+ if (!Generic<Delegate> (null))
+ return 18;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-pattern-03.cs b/mcs/tests/test-pattern-03.cs
new file mode 100644
index 00000000000..c4793bdb9d3
--- /dev/null
+++ b/mcs/tests/test-pattern-03.cs
@@ -0,0 +1,14 @@
+// Compiler options: -langversion:experimental
+
+class WildcardPattern
+{
+ static int Main ()
+ {
+ long? o = 1;
+ bool b = o is *;
+ if (!b)
+ return 1;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-pattern-04.cs b/mcs/tests/test-pattern-04.cs
new file mode 100644
index 00000000000..dff391cde5a
--- /dev/null
+++ b/mcs/tests/test-pattern-04.cs
@@ -0,0 +1,77 @@
+// Compiler options: -langversion:experimental
+
+using System;
+
+class RecursivePattern
+{
+ static int Main ()
+ {
+ object o = null;
+ bool b = o is C1 (8);
+ if (b)
+ return 1;
+
+ o = new C1 ();
+ b = o is C1 (-4);
+ if (b)
+ return 2;
+
+ b = o is C1 (8);
+ if (!b)
+ return 3;
+
+ b = o is C1 (C1 (9), C1 (8));
+ if (b)
+ return 4;
+
+ b = o is C1 (C1 (*), C1 (8));
+ if (!b)
+ return 41;
+
+ b = o is C1 (0);
+ if (b)
+ return 5;
+
+ ValueType vt = new S ();
+ b = vt is S (null, 0);
+ if (b)
+ return 6;
+
+ b = vt is S (8, 0);
+ if (b)
+ return 7;
+
+ b = vt is S (8, 2);
+ if (!b)
+ return 8;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+}
+
+class C1
+{
+ public static bool operator is (C1 c, out int x)
+ {
+ x = 8;
+ return true;
+ }
+
+ public static bool operator is (C1 c, out C1 c2, out C1 c3)
+ {
+ c2 = null;
+ c3 = null;
+ return true;
+ }
+}
+
+struct S
+{
+ public static bool operator is (S s, out int? x, out decimal d)
+ {
+ x = 8;
+ d = 2;
+ return true;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-pattern-05.cs b/mcs/tests/test-pattern-05.cs
new file mode 100644
index 00000000000..7553acd6df0
--- /dev/null
+++ b/mcs/tests/test-pattern-05.cs
@@ -0,0 +1,39 @@
+// Compiler options: -langversion:experimental
+
+using System;
+
+class RecursiveNamedPattern
+{
+ public static int Main ()
+ {
+ object o = new C ();
+ bool b = o is C (name2: "", name1: -2);
+ if (b)
+ return 1;
+
+ b = o is C (name2: "n2", name1: -2);
+ if (!b)
+ return 2;
+
+ b = o is C ();
+ if (b)
+ return 3;
+
+ return 0;
+ }
+}
+
+class C
+{
+ public static bool operator is (C c, out long name1, out string name2)
+ {
+ name1 = -2;
+ name2 = "n2";
+ return true;
+ }
+
+ public static bool operator is (C c)
+ {
+ return false;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-pattern-06.cs b/mcs/tests/test-pattern-06.cs
new file mode 100644
index 00000000000..3b54b840acf
--- /dev/null
+++ b/mcs/tests/test-pattern-06.cs
@@ -0,0 +1,68 @@
+// Compiler options: -langversion:experimental
+
+using System;
+
+class RecursiveNamedPattern
+{
+ public static int Main ()
+ {
+ if (Switch_1 (null) != 4)
+ return 1;
+
+ if (Switch_1 ("x") != 5)
+ return 2;
+
+ if (Switch_1 (1) != 1)
+ return 3;
+
+ if (Switch_1 (new C1 ()) != 3)
+ return 4;
+
+ if (Switch_1 ((byte?) 1) != 1)
+ return 5;
+
+ if (Switch_2 (new C1 ()) != 3)
+ return 10;
+
+ if (Switch_2 (null) != 2)
+ return 11;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+
+ static int Switch_1 (object o)
+ {
+ switch (o) {
+ case 1:
+ return 1;
+ case C1 (3):
+ return 2;
+ case C1 (2):
+ return 3;
+ case null:
+ return 4;
+ default:
+ return 5;
+ }
+ }
+
+ static int Switch_2 (C1 o)
+ {
+ switch (o) {
+ case null:
+ return 2;
+ }
+
+ return 3;
+ }
+}
+
+public class C1
+{
+ public static bool operator is (C1 c1, out int i)
+ {
+ i = 2;
+ return true;
+ }
+}
diff --git a/mcs/tests/test-pattern-07.cs b/mcs/tests/test-pattern-07.cs
new file mode 100644
index 00000000000..8743b35c5e7
--- /dev/null
+++ b/mcs/tests/test-pattern-07.cs
@@ -0,0 +1,53 @@
+// Compiler options: -langversion:experimental
+
+using System;
+
+class PropertyPattern
+{
+ static int Main ()
+ {
+ object o = new DateTime (2014, 8, 30);
+
+ if (!(o is DateTime { Day is 30 }))
+ return 1;
+
+ if (!(o is DateTime { Month is 8, Day is 30, Year is * }))
+ return 2;
+
+ if (o is X { Field is 30 })
+ return 3;
+
+ object o2 = new X () {
+ Field = new Y () {
+ Prop = 'f'
+ }
+ };
+
+ bool res2 = o2 is X { Field is Y { Prop is 'f' }, Field is Y (4) };
+ if (!res2)
+ return 4;
+
+ res2 = o2 is X { Field is Y { Prop is 'g' } };
+ if (res2)
+ return 5;
+
+ Console.WriteLine("ok");
+ return 0;
+ }
+}
+
+class X
+{
+ public object Field { get; set; }
+}
+
+class Y
+{
+ public char Prop { get; set; }
+
+ public static bool operator is (Y y, out int x)
+ {
+ x = 4;
+ return true;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-01.cs b/mcs/tests/test-primary-ctor-01.cs
index dac84c863c0..f2b2239fd4d 100644
--- a/mcs/tests/test-primary-ctor-01.cs
+++ b/mcs/tests/test-primary-ctor-01.cs
@@ -1,10 +1,6 @@
class Simple(int arg)
{
- int Property {
- get {
- return arg;
- }
- }
+ int Property { get; } = arg;
public static int Main ()
{
@@ -22,9 +18,5 @@ class Simple(int arg)
struct S(decimal arg)
{
- internal decimal Property {
- get {
- return arg;
- }
- }
+ internal decimal Property { get; } = arg;
} \ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-02.cs b/mcs/tests/test-primary-ctor-02.cs
index 5369a49c9b1..bc02c026c7d 100644
--- a/mcs/tests/test-primary-ctor-02.cs
+++ b/mcs/tests/test-primary-ctor-02.cs
@@ -5,22 +5,21 @@ partial class Part
public Part (string s)
: this (5)
{
- if (arg != 5)
- throw new ApplicationException ("1");
-
- if (Property != 12)
- throw new ApplicationException ("2");
}
}
partial class Part(int arg)
{
- int field = 7;
+ static int field = 7;
+
+ int Property { get; } = arg + field;
- int Property {
- get {
- return arg + field;
- }
+ {
+ if (arg != 5)
+ throw new ApplicationException ("1");
+
+ if (Property != 12)
+ throw new ApplicationException ("2");
}
public static int Main ()
diff --git a/mcs/tests/test-primary-ctor-03.cs b/mcs/tests/test-primary-ctor-03.cs
index d6e472e4d4e..269dfe8dd15 100644
--- a/mcs/tests/test-primary-ctor-03.cs
+++ b/mcs/tests/test-primary-ctor-03.cs
@@ -4,7 +4,7 @@ class D(string arg) : Base (arg)
abstract class Base (object obj)
{
- public string Prop { get { return obj.ToString (); } }
+ public string Prop { get; } = obj.ToString ();
}
class X
diff --git a/mcs/tests/test-primary-ctor-05.cs b/mcs/tests/test-primary-ctor-05.cs
index 503e944c558..f127ceccc3b 100644
--- a/mcs/tests/test-primary-ctor-05.cs
+++ b/mcs/tests/test-primary-ctor-05.cs
@@ -7,21 +7,19 @@ class A : Attribute
{
}
-class X ([field:A] int value)
+[method:A]
+class X (int value)
{
public int f = value;
- public int P {
- get {
- return value;
- }
- }
+ public int P { get; } = value;
public static int Main ()
{
- var attr = (A)typeof (X).GetField("value", BindingFlags.NonPublic | BindingFlags.Instance).GetCustomAttribute (typeof (A));
+ var x = typeof (X);
+ var attr = x.GetConstructors ()[0].GetCustomAttribute (typeof (A)) as A;
if (attr == null)
- return 1;
+ return 2;
return 0;
}
diff --git a/mcs/tests/test-primary-ctor-06.cs b/mcs/tests/test-primary-ctor-06.cs
new file mode 100644
index 00000000000..7d9ef1e9c5f
--- /dev/null
+++ b/mcs/tests/test-primary-ctor-06.cs
@@ -0,0 +1,15 @@
+using System;
+
+class ID () : IDisposable
+{
+ void IDisposable.Dispose ()
+ {
+ }
+}
+
+class X
+{
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-07.cs b/mcs/tests/test-primary-ctor-07.cs
new file mode 100644
index 00000000000..233cfd0d03c
--- /dev/null
+++ b/mcs/tests/test-primary-ctor-07.cs
@@ -0,0 +1,29 @@
+using System;
+
+struct S (int x)
+{
+ public int y = x;
+
+ public S (char x)
+ : this (1)
+ {
+ }
+
+ static S ()
+ {
+ }
+}
+
+class X
+{
+ public static int Main ()
+ {
+ if (new S (-5).y != -5)
+ return 1;
+
+ if (new S ('x').y != 1)
+ return 2;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-08.cs b/mcs/tests/test-primary-ctor-08.cs
new file mode 100644
index 00000000000..9f248858563
--- /dev/null
+++ b/mcs/tests/test-primary-ctor-08.cs
@@ -0,0 +1,31 @@
+struct S (int arg)
+{
+ {
+ v = arg;
+ }
+
+ public readonly int v;
+}
+
+class C (int arg)
+{
+ {
+ v = arg;
+ }
+
+ public readonly int v;
+}
+
+class Test
+{
+ public static int Main ()
+ {
+ if (new C (4).v != 4)
+ return 1;
+
+ if (new S (3).v != 3)
+ return 2;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-primary-ctor-09.cs b/mcs/tests/test-primary-ctor-09.cs
new file mode 100644
index 00000000000..64e5ac63327
--- /dev/null
+++ b/mcs/tests/test-primary-ctor-09.cs
@@ -0,0 +1,30 @@
+using System;
+
+class A (Func<int, int> barg)
+{
+ public Func<int, int> BaseArg = barg;
+}
+
+partial class PC
+{
+ public Func<int, int> f1 = (a) => arg;
+}
+
+partial class PC (int arg)
+ : A ((a) => arg)
+{
+}
+
+class X
+{
+ public static int Main ()
+ {
+ if (new PC (3).f1 (4) != 3)
+ return 1;
+
+ if (new PC (3).BaseArg (4) != 3)
+ return 2;
+
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-static-using-01.cs b/mcs/tests/test-static-using-01.cs
new file mode 100644
index 00000000000..88358aaa28b
--- /dev/null
+++ b/mcs/tests/test-static-using-01.cs
@@ -0,0 +1,28 @@
+// Compiler options: -langversion:6
+
+using A.B.X;
+
+namespace A.B
+{
+ static class X
+ {
+ public static int Test ()
+ {
+ return 5;
+ }
+ }
+}
+
+namespace C
+{
+ class M
+ {
+ public static int Main ()
+ {
+ if (Test () != 5)
+ return 1;
+
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-static-using-02.cs b/mcs/tests/test-static-using-02.cs
new file mode 100644
index 00000000000..db111213947
--- /dev/null
+++ b/mcs/tests/test-static-using-02.cs
@@ -0,0 +1,42 @@
+// Compiler options: -langversion:6
+
+using System;
+
+namespace A.B
+{
+ static class X
+ {
+ public static int Test (object o)
+ {
+ return 1;
+ }
+ }
+}
+
+namespace A.C
+{
+ static class X
+ {
+ public static int Test (int o)
+ {
+ return 2;
+ }
+ }
+}
+
+namespace C
+{
+ using A.B.X;
+ using A.C.X;
+
+ class M
+ {
+ public static int Main ()
+ {
+ if (Test (3) != 2)
+ return 1;
+
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-static-using-03.cs b/mcs/tests/test-static-using-03.cs
new file mode 100644
index 00000000000..870643f465a
--- /dev/null
+++ b/mcs/tests/test-static-using-03.cs
@@ -0,0 +1,42 @@
+// Compiler options: -langversion:6
+
+using System;
+using A.B.X;
+
+namespace A.B
+{
+ static class X
+ {
+ public static int Test (int o)
+ {
+ return 1;
+ }
+ }
+}
+
+namespace A.C
+{
+ static class X
+ {
+ public static int Test (int o)
+ {
+ return 2;
+ }
+ }
+}
+
+namespace C
+{
+ using A.C.X;
+
+ class M
+ {
+ public static int Main ()
+ {
+ if (Test (3) != 2)
+ return 1;
+
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-static-using-04.cs b/mcs/tests/test-static-using-04.cs
new file mode 100644
index 00000000000..fe18b97deb2
--- /dev/null
+++ b/mcs/tests/test-static-using-04.cs
@@ -0,0 +1,42 @@
+// Compiler options: -langversion:6
+
+using System;
+
+namespace A.B
+{
+ static class X
+ {
+ public static int Test (object o)
+ {
+ return 1;
+ }
+ }
+}
+
+namespace A.C
+{
+ static class X
+ {
+ private static int Test (int o)
+ {
+ return 2;
+ }
+ }
+}
+
+namespace C
+{
+ using A.B.X;
+ using A.C.X;
+
+ class M
+ {
+ public static int Main ()
+ {
+ if (Test (3) != 1)
+ return 1;
+
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-static-using-05.cs b/mcs/tests/test-static-using-05.cs
new file mode 100644
index 00000000000..0ddabc0c75f
--- /dev/null
+++ b/mcs/tests/test-static-using-05.cs
@@ -0,0 +1,11 @@
+using System.Console;
+using System.Linq.Enumerable;
+
+class Test
+{
+ static void Main()
+ {
+ var range = Range (5, 17);
+ WriteLine (range.Where (i => i % 2 == 0).Count ());
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/test-static-using-06.cs b/mcs/tests/test-static-using-06.cs
new file mode 100644
index 00000000000..fe259c8216d
--- /dev/null
+++ b/mcs/tests/test-static-using-06.cs
@@ -0,0 +1,44 @@
+// Compiler options: -langversion:6
+
+using System;
+using A.B.X;
+using A.C.X;
+
+namespace A.B
+{
+ static class X
+ {
+ public static int Test (object o)
+ {
+ return 1;
+ }
+ }
+}
+
+namespace A.C
+{
+ static class X
+ {
+ public static int Test<T> (T o)
+ {
+ if (typeof (T) != typeof (object))
+ return -1;
+
+ return 2;
+ }
+ }
+}
+
+namespace C
+{
+ class M
+ {
+ public static int Main ()
+ {
+ if (Test<object> ("") != 2)
+ return 1;
+
+ return 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/mcs/tests/ver-il-net_4_5.xml b/mcs/tests/ver-il-net_4_5.xml
index 9eec8ff192b..755aa7e0604 100644
--- a/mcs/tests/ver-il-net_4_5.xml
+++ b/mcs/tests/ver-il-net_4_5.xml
@@ -114,18 +114,6 @@
<method name="System.Dynamic.DynamicMetaObject BindUnaryOperation(System.Dynamic.UnaryOperationBinder)" attrs="198">
<size>61</size>
</method>
- <method name="System.Object &lt;BindGetIndex&gt;m__0(System.Dynamic.DynamicMetaObject)" attrs="145">
- <size>14</size>
- </method>
- <method name="System.Object &lt;BindInvoke&gt;m__1(System.Dynamic.DynamicMetaObject)" attrs="145">
- <size>14</size>
- </method>
- <method name="System.Object &lt;BindInvokeMember&gt;m__2(System.Dynamic.DynamicMetaObject)" attrs="145">
- <size>14</size>
- </method>
- <method name="System.Object &lt;BindSetIndex&gt;m__3(System.Dynamic.DynamicMetaObject)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor(DynamicObjectMock, Expression)" attrs="6278">
<size>22</size>
</method>
@@ -437,292 +425,308 @@
<method name="Void Assert[T](System.Collections.Generic.IList`1[T], System.Collections.Generic.IList`1[T], System.String)" attrs="145">
<size>257</size>
</method>
- <method name="Void &lt;BinaryAdd_1&gt;m__0(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ </type>
+ <type name="Tester+&lt;BinaryAddChecked_2&gt;c__AnonStorey0">
+ <method name="System.Object &lt;&gt;m__0()" attrs="131">
+ <size>98</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;GetIndex_3&gt;c__AnonStorey1">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.GetIndexBinder, System.Object[])" attrs="131">
+ <size>93</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;InvokeMember_2&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
+ <size>110</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;InvokeMember_6&gt;c__AnonStorey3">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
+ <size>120</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;SetIndex_3&gt;c__AnonStorey4">
+ <method name="Void &lt;&gt;m__0(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="131">
+ <size>120</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;SetMember_2&gt;c__AnonStorey5">
+ <method name="System.Object &lt;&gt;m__0(System.Dynamic.GetMemberBinder)" attrs="131">
+ <size>80</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="AssertDynamicObject">
+ <method name="System.Object &lt;BindGetIndex&gt;m__0(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.Object &lt;BindInvoke&gt;m__1(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.Object &lt;BindInvokeMember&gt;m__2(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.Object &lt;BindSetIndex&gt;m__3(System.Object, System.Dynamic.DynamicMetaObject)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
+ <type name="Tester">
+ <method name="Void &lt;BinaryAdd_1&gt;m__0(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAdd_2&gt;m__1(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAdd_2&gt;m__1(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>68</size>
</method>
- <method name="Void &lt;BinaryAdd_3&gt;m__2(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAdd_3&gt;m__2(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAdd_4&gt;m__3(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAdd_4&gt;m__3(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAddChecked_1&gt;m__4(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddChecked_1&gt;m__4(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAddChecked_2&gt;m__5(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddChecked_2&gt;m__5(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAddAssign_1&gt;m__6(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddAssign_1&gt;m__6(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryAddAssignChecked_1&gt;m__7(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAddAssignChecked_1&gt;m__7(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryAnd_1&gt;m__8(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAnd_1&gt;m__8(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>73</size>
</method>
- <method name="Void &lt;BinaryAndAssign_1&gt;m__9(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryAndAssign_1&gt;m__9(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryDivide_1&gt;m__A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryDivide_1&gt;m__A(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryDivideAssign_1&gt;m__B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryDivideAssign_1&gt;m__B(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryEqual_1&gt;m__C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryEqual_1&gt;m__C(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryExclusiveOr_1&gt;m__D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryExclusiveOr_1&gt;m__D(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryExclusiveOrAssign_1&gt;m__E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryExclusiveOrAssign_1&gt;m__E(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryGreaterThan_1&gt;m__F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryGreaterThan_1&gt;m__F(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryGreaterThanOrEqual_1&gt;m__10(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryGreaterThanOrEqual_1&gt;m__10(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLeftShift_1&gt;m__11(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLeftShift_1&gt;m__11(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLeftShiftAssign_1&gt;m__12(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLeftShiftAssign_1&gt;m__12(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLessThan_1&gt;m__13(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLessThan_1&gt;m__13(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryLessThanOrEqual_1&gt;m__14(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryLessThanOrEqual_1&gt;m__14(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryModulo_1&gt;m__15(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryModulo_1&gt;m__15(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryModuloAssign_1&gt;m__16(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryModuloAssign_1&gt;m__16(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryMultiply_1&gt;m__17(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryMultiply_1&gt;m__17(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryMultiplyAssign_1&gt;m__18(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryMultiplyAssign_1&gt;m__18(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryNotEqual_1&gt;m__19(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryNotEqual_1&gt;m__19(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryOr_1&gt;m__1A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryOr_1&gt;m__1A(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryOrAssign_1&gt;m__1B(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryOrAssign_1&gt;m__1B(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryRightShift_1&gt;m__1C(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryRightShift_1&gt;m__1C(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinaryRightShiftAssign_1&gt;m__1D(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinaryRightShiftAssign_1&gt;m__1D(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinarySubtract_1&gt;m__1E(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinarySubtract_1&gt;m__1E(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;BinarySubtractAssign_1&gt;m__1F(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;BinarySubtractAssign_1&gt;m__1F(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="System.Object &lt;Convert_1&gt;m__20(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_1&gt;m__20(System.Object, System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_2&gt;m__21(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_2&gt;m__21(System.Object, System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_3&gt;m__22(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_3&gt;m__22(System.Object, System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_4&gt;m__23(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_4&gt;m__23(System.Object, System.Dynamic.ConvertBinder)" attrs="145">
<size>58</size>
</method>
- <method name="System.Object &lt;Convert_5&gt;m__24(System.Dynamic.ConvertBinder)" attrs="145">
+ <method name="System.Object &lt;Convert_5&gt;m__24(System.Object, System.Dynamic.ConvertBinder)" attrs="145">
<size>67</size>
</method>
- <method name="Void &lt;GetIndex_1&gt;m__25(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;GetIndex_1&gt;m__25(System.Object, System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
<size>93</size>
</method>
- <method name="Void &lt;GetIndex_2&gt;m__26(System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;GetIndex_2&gt;m__26(System.Object, System.Dynamic.GetIndexBinder, System.Object[])" attrs="145">
<size>112</size>
</method>
- <method name="System.Object &lt;GetMember_1&gt;m__27(System.Dynamic.GetMemberBinder)" attrs="145">
+ <method name="System.Object &lt;GetMember_1&gt;m__27(System.Object, System.Dynamic.GetMemberBinder)" attrs="145">
<size>75</size>
</method>
- <method name="Void &lt;Invoke_1&gt;m__28(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_1&gt;m__28(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>102</size>
</method>
- <method name="Void &lt;Invoke_2&gt;m__29(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_2&gt;m__29(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>74</size>
</method>
- <method name="Void &lt;Invoke_4&gt;m__2A(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_4&gt;m__2A(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>128</size>
</method>
- <method name="Void &lt;Invoke_5&gt;m__2B(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_5&gt;m__2B(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>92</size>
</method>
- <method name="Void &lt;Invoke_5&gt;m__2C(System.Object)" attrs="145">
+ <method name="Void &lt;Invoke_5&gt;m__2C(System.Object, System.Object)" attrs="145">
<size>94</size>
</method>
- <method name="Void &lt;Invoke_6&gt;m__2D(System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;Invoke_6&gt;m__2D(System.Object, System.Dynamic.InvokeBinder, System.Object[])" attrs="145">
<size>93</size>
</method>
- <method name="Void &lt;InvokeMember_1&gt;m__2E(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_1&gt;m__2E(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>111</size>
</method>
- <method name="Void &lt;InvokeMember_3&gt;m__2F(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_3&gt;m__2F(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>112</size>
</method>
- <method name="Void &lt;InvokeMember_4&gt;m__30(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_4&gt;m__30(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>111</size>
</method>
- <method name="Void &lt;InvokeMember_7&gt;m__31(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_7&gt;m__31(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>91</size>
</method>
- <method name="Void &lt;InvokeMember_8&gt;m__32(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
+ <method name="Void &lt;InvokeMember_8&gt;m__32(System.Object, System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="145">
<size>112</size>
</method>
- <method name="Void &lt;SetIndex_1&gt;m__33(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
+ <method name="Void &lt;SetIndex_1&gt;m__33(System.Object, System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
<size>125</size>
</method>
- <method name="Void &lt;SetIndex_2&gt;m__34(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
+ <method name="Void &lt;SetIndex_2&gt;m__34(System.Object, System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="145">
<size>140</size>
</method>
- <method name="Void &lt;SetMember_1&gt;m__35(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
+ <method name="Void &lt;SetMember_1&gt;m__35(System.Object, System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
<size>102</size>
</method>
- <method name="Void &lt;SetMember_2&gt;m__36(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;SetMember_2&gt;m__36(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="Void &lt;SetMember_2&gt;m__37(System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
+ <method name="Void &lt;SetMember_2&gt;m__37(System.Object, System.Dynamic.SetMemberBinder, System.Object)" attrs="145">
<size>77</size>
</method>
- <method name="System.Object &lt;UnaryPlus_1&gt;m__38(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryPlus_1&gt;m__38(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryMinus_1&gt;m__39(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryMinus_1&gt;m__39(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryNot_1&gt;m__3A(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryNot_1&gt;m__3A(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryOnesComplement_1&gt;m__3B(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryOnesComplement_1&gt;m__3B(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryDecrement_1&gt;m__3C(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryDecrement_1&gt;m__3C(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryDecrement_2&gt;m__3D(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryDecrement_2&gt;m__3D(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>59</size>
</method>
- <method name="System.Object &lt;UnaryIncrement_1&gt;m__3E(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIncrement_1&gt;m__3E(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>55</size>
</method>
- <method name="System.Object &lt;UnaryIncrement_2&gt;m__3F(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIncrement_2&gt;m__3F(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>59</size>
</method>
- <method name="System.Object &lt;UnaryIsFalse_1&gt;m__40(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsFalse_1&gt;m__40(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsFalse_1&gt;m__41(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsFalse_1&gt;m__41(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="System.Object &lt;UnaryIsFalse_2&gt;m__42(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsFalse_2&gt;m__42(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsFalse_2&gt;m__43(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsFalse_2&gt;m__43(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="System.Object &lt;UnaryIsFalse_3&gt;m__44(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsFalse_3&gt;m__44(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsFalse_3&gt;m__45(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsFalse_3&gt;m__45(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>68</size>
</method>
- <method name="System.Object &lt;UnaryIsTrue_1&gt;m__46(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsTrue_1&gt;m__46(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="System.Object &lt;UnaryIsTrue_2&gt;m__47(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsTrue_2&gt;m__47(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsTrue_2&gt;m__48(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsTrue_2&gt;m__48(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>69</size>
</method>
- <method name="System.Object &lt;UnaryIsTrue_3&gt;m__49(System.Dynamic.UnaryOperationBinder)" attrs="145">
+ <method name="System.Object &lt;UnaryIsTrue_3&gt;m__49(System.Object, System.Dynamic.UnaryOperationBinder)" attrs="145">
<size>60</size>
</method>
- <method name="Void &lt;UnaryIsTrue_3&gt;m__4A(System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
+ <method name="Void &lt;UnaryIsTrue_3&gt;m__4A(System.Object, System.Dynamic.BinaryOperationBinder, System.Object)" attrs="145">
<size>74</size>
</method>
- <method name="Boolean &lt;Main&gt;m__4B(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__4B(System.Object, System.Reflection.MethodInfo)" attrs="145">
<size>20</size>
</method>
- <method name="System.String &lt;Main&gt;m__4C(System.Reflection.MethodInfo)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__4C(System.Object, System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__4D(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__4D(System.Object, System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__4E(Boolean)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__4E(System.Object, Boolean)" attrs="145">
<size>12</size>
</method>
</type>
- <type name="Tester+&lt;BinaryAddChecked_2&gt;c__AnonStorey0">
- <method name="System.Object &lt;&gt;m__0()" attrs="131">
- <size>98</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Tester+&lt;GetIndex_3&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__0(System.Dynamic.GetIndexBinder, System.Object[])" attrs="131">
- <size>93</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Tester+&lt;InvokeMember_2&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
- <size>110</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Tester+&lt;InvokeMember_6&gt;c__AnonStorey3">
- <method name="Void &lt;&gt;m__0(System.Dynamic.InvokeMemberBinder, System.Object[])" attrs="131">
- <size>120</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Tester+&lt;SetIndex_3&gt;c__AnonStorey4">
- <method name="Void &lt;&gt;m__0(System.Dynamic.SetIndexBinder, System.Object[], System.Object)" attrs="131">
- <size>120</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- <type name="Tester+&lt;SetMember_2&gt;c__AnonStorey5">
- <method name="System.Object &lt;&gt;m__0(System.Dynamic.GetMemberBinder)" attrs="131">
- <size>80</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
</test>
<test name="dtest-004.cs">
<type name="G`1[T]">
@@ -1294,23 +1298,6 @@
<size>26</size>
</method>
</type>
- <type name="Tester">
- <method name="Void &lt;SubtractAssignEvent&gt;m__0()" attrs="145">
- <size>12</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__4(Boolean)" attrs="145">
- <size>12</size>
- </method>
- </type>
<type name="Tester+&lt;AddAssignCheckedTest&gt;c__AnonStorey2">
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>234</size>
@@ -1382,6 +1369,21 @@
<method name="Void IsTest()" attrs="129">
<size>69</size>
</method>
+ <method name="Void &lt;SubtractAssignEvent&gt;m__0(System.Object)" attrs="145">
+ <size>12</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__4(System.Object, Boolean)" attrs="145">
+ <size>12</size>
+ </method>
</type>
</test>
<test name="dtest-007.cs">
@@ -1514,9 +1516,6 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Int32 &lt;IsEvent&gt;m__4()" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -1552,29 +1551,6 @@
<size>7</size>
</method>
</type>
- <type name="Tester">
- <method name="Int32 &lt;InvokeTest&gt;m__0(System.String)" attrs="145">
- <size>9</size>
- </method>
- <method name="Void &lt;InvokeMember_Error&gt;m__1()" attrs="145">
- <size>112</size>
- </method>
- <method name="Int32 &lt;IsEvent&gt;m__3()" attrs="145">
- <size>9</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__5(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__6(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__7(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__8(Boolean)" attrs="145">
- <size>12</size>
- </method>
- </type>
<type name="Tester+&lt;MemberGetError_Null&gt;c__AnonStorey1">
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>86</size>
@@ -1615,9 +1591,33 @@
</method>
</type>
<type name="Tester">
- <method name="Void &lt;InvokeConstructor&gt;m__2(System.Decimal)" attrs="145">
+ <method name="Int32 &lt;InvokeTest&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Void &lt;InvokeMember_Error&gt;m__1(System.Object)" attrs="145">
+ <size>112</size>
+ </method>
+ <method name="Void &lt;InvokeConstructor&gt;m__2(System.Object, System.Decimal)" attrs="145">
<size>2</size>
</method>
+ <method name="Int32 &lt;IsEvent&gt;m__3(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;IsEvent&gt;m__4(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__5(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__6(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__7(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__8(System.Object, Boolean)" attrs="145">
+ <size>12</size>
+ </method>
</type>
</test>
<test name="dtest-008.cs">
@@ -1885,9 +1885,6 @@
<method name="Int32 Main()" attrs="150">
<size>192</size>
</method>
- <method name="System.Object &lt;Main&gt;m__0(System.Object)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -1903,6 +1900,11 @@
<size>0</size>
</method>
</type>
+ <type name="DynamicAssignments">
+ <method name="System.Object &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="dtest-018.cs">
<type name="XValue">
@@ -2064,9 +2066,6 @@
<method name="Int32 Main()" attrs="150">
<size>542</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>15</size>
</method>
@@ -2085,6 +2084,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="dtest-025.cs">
<type name="S">
@@ -2623,15 +2627,6 @@
<method name="Int32 Main()" attrs="150">
<size>1101</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>11</size>
- </method>
- <method name="Void &lt;Main&gt;m__1()" attrs="145">
- <size>11</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__2(Int32 ByRef)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -2660,6 +2655,17 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>11</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>11</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32 ByRef)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="dtest-047.cs">
<type name="C`1[T]">
@@ -2672,9 +2678,6 @@
<method name="Int32 Test(Int32)" attrs="150">
<size>171</size>
</method>
- <method name="Int32 &lt;E&gt;m__0(Int32)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>42</size>
</method>
@@ -2687,6 +2690,11 @@
<size>7</size>
</method>
</type>
+ <type name="C`1[T]">
+ <method name="Int32 &lt;E&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="dtest-048.cs">
<type name="A">
@@ -2831,9 +2839,6 @@
<method name="Int32 Main()" attrs="150">
<size>72</size>
</method>
- <method name="Void &lt;Test`1&gt;m__0[T](T)" attrs="145">
- <size>103</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -2853,11 +2858,6 @@
<size>7</size>
</method>
</type>
- <type name="C">
- <method name="Void &lt;Test3`1&gt;m__1[T](T)" attrs="145">
- <size>105</size>
- </method>
- </type>
<type name="C+&lt;Test2&gt;c__AnonStorey0`1[T]">
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>46</size>
@@ -2889,6 +2889,14 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Test`1&gt;m__0[T](System.Object, T)" attrs="145">
+ <size>103</size>
+ </method>
+ <method name="Void &lt;Test3`1&gt;m__1[T](System.Object, T)" attrs="145">
+ <size>105</size>
+ </method>
+ </type>
</test>
<test name="dtest-055.cs">
<type name="B`2[T1,T2]">
@@ -2971,12 +2979,12 @@
<method name="Int32 Main()" attrs="150">
<size>57</size>
</method>
- <method name="System.Object &lt;Main&gt;m__0()" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.Object &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="dtest-058.cs">
@@ -3124,12 +3132,6 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Void &lt;NonInvocable&gt;m__0()" attrs="145">
- <size>86</size>
- </method>
- <method name="Void &lt;Using_1&gt;m__1()" attrs="145">
- <size>92</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -3138,29 +3140,33 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0()" attrs="131">
+ <size>110</size>
+ </method>
</type>
<type name="Tester">
- <method name="Void &lt;NullableConversion&gt;m__2()" attrs="145">
+ <method name="Void &lt;NonInvocable&gt;m__0(System.Object)" attrs="145">
+ <size>86</size>
+ </method>
+ <method name="Void &lt;Using_1&gt;m__1(System.Object)" attrs="145">
+ <size>92</size>
+ </method>
+ <method name="Void &lt;NullableConversion&gt;m__2(System.Object)" attrs="145">
<size>106</size>
</method>
- <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, System.Reflection.MethodInfo)" attrs="145">
<size>20</size>
</method>
- <method name="System.String &lt;Main&gt;m__4(System.Reflection.MethodInfo)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__4(System.Object, System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__5(System.Reflection.MethodInfo)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__5(System.Object, System.Reflection.MethodInfo)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__6(Boolean)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__6(System.Object, Boolean)" attrs="145">
<size>12</size>
</method>
</type>
- <type name="Tester+&lt;Unsafe_1&gt;c__AnonStorey0">
- <method name="Void &lt;&gt;m__0()" attrs="131">
- <size>110</size>
- </method>
- </type>
</test>
<test name="dtest-error-02.cs">
<type name="A">
@@ -4721,7 +4727,7 @@
<test name="gtest-052.cs">
<type name="Foo`1[T]">
<method name="T Create()" attrs="134">
- <size>44</size>
+ <size>14</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -5048,9 +5054,6 @@
<method name="Void Main()" attrs="150">
<size>84</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(Double)" attrs="145">
- <size>25</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -5063,6 +5066,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, Double)" attrs="145">
+ <size>25</size>
+ </method>
+ </type>
</test>
<test name="gtest-062.cs">
<type name="X">
@@ -6517,9 +6525,6 @@
<method name="Void Main()" attrs="150">
<size>43</size>
</method>
- <method name="Double &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>21</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -6532,6 +6537,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Double &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>21</size>
+ </method>
+ </type>
</test>
<test name="gtest-114.cs">
<type name="NaturalComparer`1[T]">
@@ -6671,9 +6681,6 @@
<method name="Void Main(System.String[])" attrs="150">
<size>472</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(Double)" attrs="145">
- <size>25</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -6702,6 +6709,11 @@
<size>15</size>
</method>
</type>
+ <type name="MyTest">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, Double)" attrs="145">
+ <size>25</size>
+ </method>
+ </type>
</test>
<test name="gtest-116.cs">
<type name="Slow.Test">
@@ -6780,10 +6792,10 @@
<size>86</size>
</method>
<method name="Polynomial`1[E] Mul(Polynomial`1[E])" attrs="486">
- <size>235</size>
+ <size>203</size>
</method>
<method name="E Eval(E)" attrs="134">
- <size>114</size>
+ <size>84</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>20</size>
@@ -7515,7 +7527,7 @@
<test name="gtest-151.cs">
<type name="Test`1[T]">
<method name="Void .ctor()" attrs="6278">
- <size>16</size>
+ <size>14</size>
</method>
</type>
<type name="X">
@@ -7568,7 +7580,7 @@
<test name="gtest-153.cs">
<type name="MyClass`1[T]">
<method name="Void .ctor()" attrs="6278">
- <size>57</size>
+ <size>27</size>
</method>
</type>
<type name="X">
@@ -7596,12 +7608,6 @@
<method name="T`1[System.Int64] N()" attrs="150">
<size>38</size>
</method>
- <method name="Int32 &lt;M`1&gt;m__0[X](X)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;N&gt;m__1(Int64)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -7622,11 +7628,19 @@
<size>0</size>
</method>
</type>
+ <type name="B">
+ <method name="Int32 &lt;M`1&gt;m__0[X](System.Object, X)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;N&gt;m__1(System.Object, Int64)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="gtest-155.cs">
<type name="MyClass`1[T]">
<method name="Void .ctor()" attrs="6278">
- <size>57</size>
+ <size>27</size>
</method>
</type>
<type name="X">
@@ -7737,15 +7751,15 @@
<method name="Void Main()" attrs="150">
<size>74</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
<method name="U apply[T,U](T, Mapping`2)" attrs="145">
<size>16</size>
</method>
+ <method name="System.String &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>22</size>
+ </method>
</type>
</test>
<test name="gtest-162.cs">
@@ -8392,12 +8406,12 @@
<method name="Void Main()" attrs="150">
<size>69</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>20</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>20</size>
+ </method>
</type>
</test>
<test name="gtest-185.cs">
@@ -11190,9 +11204,6 @@
<method name="Void Main(System.String[])" attrs="150">
<size>70</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -11211,6 +11222,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="gtest-281.cs">
<type name="List">
@@ -11647,14 +11663,11 @@
<method name="Int32 Main()" attrs="150">
<size>14</size>
</method>
- <method name="Void &lt;a&gt;m__0(Int32)" attrs="145">
- <size>8</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
<method name="Void .cctor()" attrs="6289">
- <size>46</size>
+ <size>29</size>
</method>
</type>
<type name="TestFunc`1[T]">
@@ -11665,6 +11678,11 @@
<size>0</size>
</method>
</type>
+ <type name="TestClass">
+ <method name="Void &lt;a&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>8</size>
+ </method>
+ </type>
</test>
<test name="gtest-299.cs">
<type name="N.A">
@@ -12360,7 +12378,7 @@
<test name="gtest-325.cs">
<type name="SomeClass`1[T]">
<method name="Void Foo()" attrs="134">
- <size>38</size>
+ <size>8</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -12393,7 +12411,7 @@
<test name="gtest-327.cs">
<type name="Tester`1[T]">
<method name="Void Do()" attrs="134">
- <size>51</size>
+ <size>21</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -13352,12 +13370,6 @@
<method name="Int32 Main()" attrs="150">
<size>189</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__1()" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -13383,6 +13395,14 @@
<size>0</size>
</method>
</type>
+ <type name="Thing">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="gtest-362.cs">
<type name="C">
@@ -14016,9 +14036,6 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Boolean &lt;GetMethodGroup&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -14047,6 +14064,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Boolean &lt;GetMethodGroup&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="gtest-395.cs">
<type name="RuleBuilder`1[T]">
@@ -14293,9 +14315,6 @@
</method>
</type>
<type name="C`2[A,B]">
- <method name="B &lt;C&gt;m__0(B)" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor(IEnumerable`1)" attrs="6278">
<size>47</size>
</method>
@@ -14308,6 +14327,11 @@
<size>7</size>
</method>
</type>
+ <type name="C`2[A,B]">
+ <method name="B &lt;C&gt;m__0(System.Object, B)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="gtest-407.cs">
<type name="MyColor">
@@ -14398,9 +14422,6 @@
<method name="Int32 Foo(System.Func`1[System.Int32])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Test_12&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void Test_13(System.Object)" attrs="129">
<size>53</size>
</method>
@@ -14428,6 +14449,28 @@
<method name="Boolean Test(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
+ <method name="Void Test_17()" attrs="129">
+ <size>52</size>
+ </method>
+ </type>
+ <type name="ConditionalParsing+MyTestStruct">
+ <method name="Void Dispose()" attrs="486">
+ <size>2</size>
+ </method>
+ <method name="MyTestStruct op_Implicit(Int32)" attrs="2198">
+ <size>18</size>
+ </method>
+ </type>
+ <type name="ConditionalParsing">
+ <method name="Int32 &lt;Test_12&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Void Test_18(Boolean, System.Action)" attrs="129">
+ <size>44</size>
+ </method>
+ <method name="Void &lt;Test_18&gt;m__1(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="gtest-410.cs">
@@ -14460,18 +14503,18 @@
<method name="Void Main()" attrs="150">
<size>132</size>
</method>
- <method name="Maybe`1[System.String] &lt;Main&gt;m__0(System.String)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Maybe`1[System.String] &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
<size>14</size>
</method>
- <method name="Maybe`1[System.String] &lt;Main&gt;m__1(System.String)" attrs="145">
+ <method name="Maybe`1[System.String] &lt;Main&gt;m__1(System.Object, System.String)" attrs="145">
<size>14</size>
</method>
- <method name="Maybe`1[System.String] &lt;Main&gt;m__2(System.String)" attrs="145">
+ <method name="Maybe`1[System.String] &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">
<size>18</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-412.cs">
@@ -14994,7 +15037,7 @@
<test name="gtest-435.cs">
<type name="testcase.Program">
<method name="Int32 Main()" attrs="150">
- <size>371</size>
+ <size>405</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -15169,7 +15212,7 @@
<test name="gtest-446.cs">
<type name="BugTest.Bug`1[T]">
<method name="Void CreateObject(T ByRef)" attrs="134">
- <size>43</size>
+ <size>13</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -15629,7 +15672,7 @@
<test name="gtest-471.cs">
<type name="Q">
<method name="Void bar[T](T ByRef)" attrs="145">
- <size>17</size>
+ <size>13</size>
</method>
<method name="Int32 Main()" attrs="150">
<size>19</size>
@@ -16382,8 +16425,13 @@
</type>
<type name="M">
<method name="Int32 Main()" attrs="150">
- <size>53</size>
+ <size>90</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
+ </type>
+ <type name="D`1[U]">
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -16607,7 +16655,7 @@
<test name="gtest-514.cs">
<type name="test2.Test`3[T,U,V]">
<method name="Void Method()" attrs="134">
- <size>128</size>
+ <size>35</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -17429,7 +17477,7 @@
</type>
<type name="B">
<method name="G Foo[G]()" attrs="198">
- <size>18</size>
+ <size>14</size>
</method>
<method name="G Foo2[G]()" attrs="198">
<size>15</size>
@@ -17602,7 +17650,7 @@
<test name="gtest-551.cs">
<type name="Base`1[T]">
<method name="Void .ctor()" attrs="6278">
- <size>48</size>
+ <size>18</size>
</method>
</type>
<type name="Derived`1[T]">
@@ -18033,7 +18081,7 @@
</type>
<type name="G`1[T]">
<method name="Void Foo()" attrs="150">
- <size>61</size>
+ <size>31</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -18417,7 +18465,7 @@
</type>
<type name="C">
<method name="Int32 Main()" attrs="150">
- <size>531</size>
+ <size>603</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -18628,11 +18676,6 @@
<size>7</size>
</method>
</type>
- <type name="Combinator">
- <method name="System.Tuple`2[System.Int32,System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>15</size>
- </method>
- </type>
<type name="Parser`2[D1,DR1]">
<method name="System.IAsyncResult BeginInvoke(D1, System.AsyncCallback, System.Object)" attrs="454">
<size>0</size>
@@ -18641,6 +18684,11 @@
<size>0</size>
</method>
</type>
+ <type name="Combinator">
+ <method name="System.Tuple`2[System.Int32,System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
</test>
<test name="gtest-594.cs">
<type name="C">
@@ -18881,7 +18929,7 @@
<size>26</size>
</method>
<method name="TBase Constructor[T]()" attrs="145">
- <size>54</size>
+ <size>24</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>18</size>
@@ -19246,6 +19294,129 @@
</method>
</type>
</test>
+ <test name="gtest-618.cs">
+ <type name="S1">
+ <method name="Int32 op_Implicit(System.Nullable`1[S1])" attrs="2198">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="S2">
+ <method name="System.Nullable`1[System.Int32] op_Implicit(System.Nullable`1[S2])" attrs="2198">
+ <size>18</size>
+ </method>
+ </type>
+ <type name="S3">
+ <method name="System.Nullable`1[System.Int32] op_Implicit(System.Nullable`1[S3])" attrs="2198">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="S4">
+ <method name="System.Nullable`1[System.Int32] op_Implicit(S4)" attrs="2198">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 Main()" attrs="150">
+ <size>267</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-619.cs">
+ <type name="S+P">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="S+C">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="M">
+ <method name="Void Test[T](I`1[T])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test[T](IB`1[T])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Main()" attrs="145">
+ <size>12</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-620.cs">
+ <type name="A`1[T]">
+ <method name="T M[U](U)" attrs="454">
+ <size>20</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B`1[W]">
+ <method name="I`1[W] M[U](U)" attrs="198">
+ <size>15</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Bug">
+ <method name="Void Main()" attrs="150">
+ <size>16</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-621.cs">
+ <type name="X">
+ <method name="Int32 Main()" attrs="145">
+ <size>267</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-622.cs">
+ <type name="CY">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A">
+ <method name="Void M[TO]()" attrs="486">
+ <size>2</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-623.cs">
+ <type name="C">
+ <method name="Boolean Test[T]()" attrs="145">
+ <size>42</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>37</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-anontype-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
@@ -19785,20 +19956,18 @@
<method name="System.Collections.Generic.IEnumerator`1[T] System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator()" attrs="481">
<size>52</size>
</method>
+ <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
</type>
<type name="Test">
- <method name="Boolean &lt;Main&gt;m__0(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
<size>21</size>
</method>
- <method name="System.String &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
+ <method name="System.String &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Reflection.PropertyInfo])" attrs="145">
<size>15</size>
</method>
</type>
- <type name="Test+&lt;Select&gt;c__Iterator0`1[T]">
- <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
- </type>
</test>
<test name="gtest-autoproperty-01.cs">
<type name="Test">
@@ -19884,7 +20053,7 @@
<size>8</size>
</method>
<method name="Int32 Main()" attrs="150">
- <size>301</size>
+ <size>336</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -20030,6 +20199,56 @@
</method>
</type>
</test>
+ <test name="gtest-autoproperty-09.cs">
+ <type name="S">
+ <method name="Int32 get_P()" attrs="2198">
+ <size>13</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>213</size>
+ </method>
+ <method name="Void .cctor()" attrs="6289">
+ <size>22</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="System.Decimal get_P()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>27</size>
+ </method>
+ </type>
+ <type name="S2">
+ <method name="Int32 get_P()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor(Object)" attrs="6278">
+ <size>16</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 get_P2()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_P2(Int32)" attrs="2182">
+ <size>8</size>
+ </method>
+ </type>
+ <type name="S2">
+ <method name="Int32 get_P2()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_P2(Int32)" attrs="2182">
+ <size>8</size>
+ </method>
+ </type>
+ <type name="S">
+ <method name="Int32[] get_PA()" attrs="2198">
+ <size>13</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-collectioninit-01.cs">
<type name="Test">
<method name="Void TestList(System.Collections.Generic.List`1[System.Int32], Int32)" attrs="145">
@@ -20077,6 +20296,25 @@
</method>
</type>
</test>
+ <test name="gtest-collectioninit-04.cs">
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Void .cctor()" attrs="6289">
+ <size>69</size>
+ </method>
+ <method name="System.String &lt;Test&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;Test&gt;m__1(System.Object, System.String)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-etree-01.cs">
<type name="InverseLogicalOperator">
<method name="Boolean op_True(InverseLogicalOperator)" attrs="2198">
@@ -21183,36 +21421,6 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Void &lt;EqualTestDelegate_2&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;EqualTestDelegate_2&gt;m__1()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;EqualTestDelegate_2&gt;m__2()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;EqualTestDelegate_2&gt;m__3()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;EqualTestDelegate_2&gt;m__4()" attrs="145">
- <size>2</size>
- </method>
- <method name="System.String &lt;InvokeTest_2&gt;m__5(Int32)" attrs="145">
- <size>25</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__6(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__7(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__8(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__9(Boolean)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -21311,6 +21519,36 @@
<method name="Void EqualTest_16()" attrs="129">
<size>185</size>
</method>
+ <method name="Void &lt;EqualTestDelegate_2&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;EqualTestDelegate_2&gt;m__1(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;EqualTestDelegate_2&gt;m__2(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;EqualTestDelegate_2&gt;m__3(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;EqualTestDelegate_2&gt;m__4(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="System.String &lt;InvokeTest_2&gt;m__5(System.Object, Int32)" attrs="145">
+ <size>25</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__6(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__7(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__8(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__9(System.Object, Boolean)" attrs="145">
+ <size>12</size>
+ </method>
</type>
</test>
<test name="gtest-etree-02.cs">
@@ -21836,9 +22074,6 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="System.Object &lt;CreateDependent_DependentsNull&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -21853,6 +22088,11 @@
<size>7</size>
</method>
</type>
+ <type name="NotifyingPropertyTest">
+ <method name="System.Object &lt;CreateDependent_DependentsNull&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="gtest-etree-25.cs">
<type name="Foo">
@@ -22795,9 +23035,6 @@
<method name="Void Test[U](U)" attrs="150">
<size>25</size>
</method>
- <method name="Boolean &lt;Test`1&gt;m__0[U](System.String)" attrs="145">
- <size>15</size>
- </method>
</type>
<type name="A">
<method name="Void Main()" attrs="150">
@@ -22811,6 +23048,9 @@
<method name="Void Method[T](System.Collections.Generic.IEnumerable`1[T], System.Func`2[T,System.Boolean])" attrs="145">
<size>2</size>
</method>
+ <method name="Boolean &lt;Test`1&gt;m__0[U](System.Object, System.String)" attrs="145">
+ <size>15</size>
+ </method>
</type>
</test>
<test name="gtest-exmethod-42.cs">
@@ -23545,6 +23785,34 @@
</method>
</type>
</test>
+ <test name="gtest-initialize-13.cs">
+ <type name="EventInitializerTest">
+ <method name="Void add_a(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void remove_a(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void add_b(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void remove_b(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void add_c(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void remove_c(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>68</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-iter-01.cs">
<type name="C">
<method name="Void Main()" attrs="150">
@@ -23850,11 +24118,6 @@
<size>44</size>
</method>
</type>
- <type name="Mono.Rocks.Test">
- <method name="System.Nullable`1[System.Collections.Generic.KeyValuePair`2[System.Int32,System.Int32]] &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>37</size>
- </method>
- </type>
<type name="Mono.Rocks.Sequence+&lt;CreateUnfoldrIterator&gt;c__Iterator0`2[TSource,TResult]">
<method name="System.Collections.Generic.IEnumerator`1[TResult] System.Collections.Generic.IEnumerable&lt;TResult&gt;.GetEnumerator()" attrs="481">
<size>52</size>
@@ -23863,6 +24126,11 @@
<size>14</size>
</method>
</type>
+ <type name="Mono.Rocks.Test">
+ <method name="System.Nullable`1[System.Collections.Generic.KeyValuePair`2[System.Int32,System.Int32]] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>37</size>
+ </method>
+ </type>
</test>
<test name="gtest-iter-07.cs">
<type name="Test">
@@ -25080,9 +25348,6 @@
<method name="Void Reset()" attrs="486">
<size>6</size>
</method>
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25099,6 +25364,9 @@
<method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
<size>14</size>
</method>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="gtest-iter-28.cs">
@@ -25414,9 +25682,6 @@
<method name="System.Collections.Generic.IEnumerable`1[System.Int32] FromTo(Int32, Int32)" attrs="150">
<size>37</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>22</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25485,6 +25750,11 @@
<size>14</size>
</method>
</type>
+ <type name="MyTest">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>22</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-01.cs">
<type name="IntFunc">
@@ -25507,12 +25777,6 @@
<method name="Int32 Main()" attrs="150">
<size>328</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>12</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>11</size>
- </method>
<method name="Void .ctor(Int32)" attrs="6273">
<size>14</size>
</method>
@@ -25521,13 +25785,6 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
- </type>
- <type name="X">
- <method name="Void &lt;Main&gt;m__2(Int32)" attrs="145">
- <size>9</size>
- </method>
- </type>
- <type name="X+&lt;Main&gt;c__AnonStorey0">
<method name="Void &lt;&gt;m__0(Int32)" attrs="131">
<size>9</size>
</method>
@@ -25548,6 +25805,17 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>12</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>11</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-02.cs">
<type name="funcs">
@@ -25576,9 +25844,6 @@
<method name="Void Main()" attrs="150">
<size>36</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>19</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25599,6 +25864,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>19</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-03.cs">
<type name="Func`2[TArg0,TResult]">
@@ -25629,7 +25899,7 @@
</method>
</type>
<type name="Demo">
- <method name="System.TimeSpan &lt;Main&gt;m__0(System.String)" attrs="145">
+ <method name="System.TimeSpan &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
<size>14</size>
</method>
</type>
@@ -25663,10 +25933,10 @@
</method>
</type>
<type name="Demo">
- <method name="System.TimeSpan &lt;Main&gt;m__0(System.String)" attrs="145">
+ <method name="System.TimeSpan &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
<size>14</size>
</method>
- <method name="Double &lt;Main&gt;m__1(System.TimeSpan)" attrs="145">
+ <method name="Double &lt;Main&gt;m__1(System.Object, System.TimeSpan)" attrs="145">
<size>15</size>
</method>
</type>
@@ -25676,12 +25946,6 @@
<method name="Int32 Main()" attrs="150">
<size>147</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>38</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>38</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25765,6 +26029,14 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>38</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>38</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-06.cs">
<type name="TestClass">
@@ -25804,9 +26076,6 @@
<method name="Int32 Main()" attrs="150">
<size>44</size>
</method>
- <method name="Void &lt;Main&gt;m__0(F)" attrs="145">
- <size>31</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25871,6 +26140,11 @@
<size>0</size>
</method>
</type>
+ <type name="TestClass">
+ <method name="Void &lt;Main&gt;m__0(System.Object, F)" attrs="145">
+ <size>31</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-07.cs">
<type name="D">
@@ -25905,24 +26179,6 @@
<method name="Void Main()" attrs="150">
<size>208</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__1()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__2()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__3()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__4()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__5(Boolean)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -25943,6 +26199,26 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__2(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__3(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__4(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__5(System.Object, Boolean)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-08.cs">
<type name="C">
@@ -25952,30 +26228,30 @@
<method name="Int32 Main()" attrs="150">
<size>344</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
<size>11</size>
</method>
- <method name="Boolean &lt;Main&gt;m__3(Int32)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Int32 &lt;Main&gt;m__4(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__4(System.Object, Int32)" attrs="145">
<size>11</size>
</method>
- <method name="Boolean &lt;Main&gt;m__5(Int32)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__5(System.Object, Int32)" attrs="145">
<size>13</size>
</method>
- <method name="Int32 &lt;Main&gt;m__6(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__6(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-lambda-09.cs">
@@ -25999,15 +26275,6 @@
<method name="Void Main()" attrs="150">
<size>114</size>
</method>
- <method name="System.String &lt;Main&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
- <method name="System.String &lt;Main&gt;m__1()" attrs="145">
- <size>14</size>
- </method>
- <method name="System.String &lt;Main&gt;m__2(System.String)" attrs="145">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26037,6 +26304,17 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="System.String &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-10.cs">
<type name="C">
@@ -26175,9 +26453,6 @@
<method name="Void Bar()" attrs="145">
<size>36</size>
</method>
- <method name="Void &lt;Bar&gt;m__0(Int32)" attrs="145">
- <size>6</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26198,13 +26473,20 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
- <method name="System.String &lt;Bar&gt;m__0(System.String)" attrs="145">
+ </type>
+ <type name="TestUnary">
+ <method name="Void &lt;Bar&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>6</size>
+ </method>
+ </type>
+ <type name="Program">
+ <method name="System.String &lt;Bar&gt;m__0(System.Object, System.String)" attrs="145">
<size>14</size>
</method>
- <method name="System.String &lt;Main&gt;m__1(System.String)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__1(System.Object, System.String)" attrs="145">
<size>9</size>
</method>
- <method name="Void &lt;Main&gt;m__2(System.String)" attrs="145">
+ <method name="Void &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">
<size>7</size>
</method>
</type>
@@ -26217,12 +26499,12 @@
<method name="Void Foo[T]()" attrs="145">
<size>15</size>
</method>
- <method name="T &lt;Foo`1&gt;m__0[T](T)" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="T &lt;Foo`1&gt;m__0[T](System.Object, T)" attrs="145">
+ <size>9</size>
+ </method>
</type>
</test>
<test name="gtest-lambda-15.cs">
@@ -26251,7 +26533,7 @@
</method>
</type>
<type name="Repro">
- <method name="Int32 &lt;Main&gt;m__0(System.String)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
<size>14</size>
</method>
</type>
@@ -26347,9 +26629,6 @@
</test>
<test name="gtest-lambda-20.cs">
<type name="Z">
- <method name="Void &lt;Z&gt;m__0()" attrs="145">
- <size>7</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>38</size>
</method>
@@ -26379,6 +26658,11 @@
<size>0</size>
</method>
</type>
+ <type name="Z">
+ <method name="Void &lt;Z&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-21.cs">
<type name="Program">
@@ -26394,16 +26678,16 @@
<method name="Int32 Main()" attrs="150">
<size>108</size>
</method>
- <method name="System.String &lt;Bar&gt;m__0(System.String)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="System.String &lt;Bar&gt;m__0(System.Object, System.String)" attrs="145">
<size>14</size>
</method>
- <method name="System.String &lt;Main&gt;m__1(System.String)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__1(System.Object, System.String)" attrs="145">
<size>9</size>
</method>
- <method name="Void &lt;Main&gt;m__2(System.String)" attrs="145">
- <size>7</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
+ <method name="Void &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">
<size>7</size>
</method>
</type>
@@ -26418,12 +26702,6 @@
<method name="Void Main()" attrs="150">
<size>137</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Product)" attrs="145">
- <size>15</size>
- </method>
- <method name="Product &lt;Main&gt;m__1(Product)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26452,17 +26730,23 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Boolean &lt;&gt;m__0(Product)" attrs="131">
+ <size>60</size>
+ </method>
</type>
<type name="MainClass">
- <method name="&lt;&gt;__AnonType0`2[System.Linq.IGrouping`2[System.Int32,Product],System.Collections.Generic.IEnumerable`1[Product]] &lt;Main&gt;m__2(System.Linq.IGrouping`2[System.Int32,Product])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Product)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Product &lt;Main&gt;m__1(System.Object, Product)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[System.Linq.IGrouping`2[System.Int32,Product],System.Collections.Generic.IEnumerable`1[Product]] &lt;Main&gt;m__2(System.Object, System.Linq.IGrouping`2[System.Int32,Product])" attrs="145">
<size>56</size>
</method>
</type>
<type name="MainClass+&lt;Main&gt;c__AnonStorey0">
- <method name="Boolean &lt;&gt;m__0(Product)" attrs="131">
- <size>60</size>
- </method>
- <method name="System.Decimal &lt;&gt;m__1(Product)" attrs="145">
+ <method name="System.Decimal &lt;&gt;m__1(System.Object, Product)" attrs="145">
<size>14</size>
</method>
</type>
@@ -26475,12 +26759,12 @@
<method name="Int32 Main()" attrs="150">
<size>90</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>20</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>20</size>
+ </method>
</type>
</test>
<test name="gtest-lambda-24.cs">
@@ -26510,12 +26794,12 @@
<method name="Void &lt;&gt;m__1(System.String)" attrs="131">
<size>47</size>
</method>
- <method name="System.String &lt;&gt;m__2()" attrs="145">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.String &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
</type>
</test>
<test name="gtest-lambda-25.cs">
@@ -26535,7 +26819,7 @@
</method>
</type>
<type name="MonoBugs.Program">
- <method name="Void &lt;Main&gt;m__0(MonoBugs.Foo`1[System.Int32])" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object, MonoBugs.Foo`1[System.Int32])" attrs="145">
<size>13</size>
</method>
</type>
@@ -26548,12 +26832,12 @@
<method name="Void Execute(System.Action)" attrs="150">
<size>2</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="gtest-lambda-27.cs">
@@ -26567,14 +26851,14 @@
<method name="IA`1[T][] Test2[T](System.Func`2[IB,IA`1[T][]])" attrs="145">
<size>10</size>
</method>
- <method name="System.String[] &lt;Main&gt;m__0(IB)" attrs="145">
- <size>14</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
- <method name="IA`1[System.String][] &lt;Main&gt;m__1(IB)" attrs="145">
+ <method name="System.String[] &lt;Main&gt;m__0(System.Object, IB)" attrs="145">
<size>14</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="IA`1[System.String][] &lt;Main&gt;m__1(System.Object, IB)" attrs="145">
+ <size>14</size>
</method>
</type>
</test>
@@ -26591,12 +26875,12 @@
<method name="Int32 Main()" attrs="150">
<size>53</size>
</method>
- <method name="G`1[System.Int32][] &lt;Main&gt;m__0(G`1[System.Int32][])" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="G`1[System.Int32][] &lt;Main&gt;m__0(System.Object, G`1[System.Int32][])" attrs="145">
+ <size>9</size>
+ </method>
</type>
</test>
<test name="gtest-lambda-29.cs">
@@ -26618,16 +26902,16 @@
<method name="Void M3[T](System.Action`1[C`1[T[]][]])" attrs="145">
<size>2</size>
</method>
- <method name="Void &lt;Main&gt;m__1(C`1[System.Int16][])" attrs="145">
- <size>2</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
- <method name="Void &lt;Main&gt;m__2(C`1[System.Int16[]][])" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Int32[][])" attrs="145">
<size>2</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="Void &lt;Main&gt;m__1(System.Object, C`1[System.Int16][])" attrs="145">
+ <size>2</size>
</method>
- <method name="Void &lt;Main&gt;m__0(Int32[][])" attrs="145">
+ <method name="Void &lt;Main&gt;m__2(System.Object, C`1[System.Int16[]][])" attrs="145">
<size>2</size>
</method>
</type>
@@ -26640,9 +26924,6 @@
<method name="Void Main()" attrs="150">
<size>38</size>
</method>
- <method name="System.Func`2[T,System.Object] &lt;Method`1&gt;m__0[T](System.Object)" attrs="145">
- <size>33</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -26655,6 +26936,11 @@
<size>14</size>
</method>
</type>
+ <type name="C">
+ <method name="System.Func`2[T,System.Object] &lt;Method`1&gt;m__0[T](System.Object, System.Object)" attrs="145">
+ <size>33</size>
+ </method>
+ </type>
</test>
<test name="gtest-lambda-31.cs">
<type name="Test">
@@ -26674,12 +26960,12 @@
<method name="Void Main()" attrs="145">
<size>34</size>
</method>
- <method name="Byte &lt;Main&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Byte &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
</type>
</test>
<test name="gtest-lambda-33.cs">
@@ -26728,73 +27014,41 @@
</method>
</type>
</test>
- <test name="gtest-linq-01.cs">
- <type name="from.C">
- <method name="Void Main()" attrs="150">
- <size>2181</size>
- </method>
- <method name="Void Foo(Int32, Boolean)" attrs="129">
- <size>16</size>
- </method>
- <method name="Void Do(System.String[])" attrs="129">
- <size>17</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__7(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__8(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__9(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__A(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__B(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__C(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__D(Int32)" attrs="145">
+ <test name="gtest-lambda-35.cs">
+ <type name="C">
+ <method name="Int32 Foo(System.Func`1[System.Int16])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1A(Int32)" attrs="145">
+ <method name="Int32 Foo(System.Func`1[System.Int32])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1D(Int32)" attrs="145">
- <size>10</size>
+ <method name="Int32 Main()" attrs="145">
+ <size>161</size>
</method>
- <method name="Int32 &lt;Main&gt;m__20(Int32)" attrs="145">
- <size>10</size>
+ <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
- <method name="Int32 &lt;Main&gt;m__21(Int32)" attrs="145">
- <size>10</size>
+ <method name="Int16 &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
</method>
- <method name="Int32 &lt;Main&gt;m__22(Int32)" attrs="145">
- <size>10</size>
+ <method name="Int16 &lt;Main&gt;m__2(System.Object)" attrs="145">
+ <size>9</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2A(Int32)" attrs="145">
- <size>10</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2F(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>10</size>
+ </type>
+ </test>
+ <test name="gtest-linq-01.cs">
+ <type name="from.C">
+ <method name="Void Main()" attrs="150">
+ <size>2181</size>
</method>
- <method name="Int32 &lt;Main&gt;m__32(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>10</size>
+ <method name="Void Foo(Int32, Boolean)" attrs="129">
+ <size>16</size>
</method>
- <method name="Int32 &lt;Main&gt;m__33(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>15</size>
+ <method name="Void Do(System.String[])" attrs="129">
+ <size>17</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -26929,146 +27183,203 @@
<size>7</size>
</method>
</type>
- <type name="from.C">
- <method name="System.Nullable`1[System.Boolean] &lt;Main&gt;m__2(System.Nullable`1[System.Boolean])" attrs="145">
- <size>10</size>
+ <type name="from.C+&lt;Main&gt;c__AnonStorey0">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0(Int32)" attrs="131">
+ <size>15</size>
</method>
- <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__31(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
- <size>16</size>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__1(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
+ <size>15</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
+ <size>15</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__3(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;&gt;m__4(Int32)" attrs="131">
+ <size>55</size>
</method>
- <method name="Int32 &lt;Main&gt;m__4(Int32, Int32)" attrs="145">
+ </type>
+ <type name="from.C">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Boolean &lt;Main&gt;m__5(Int32)" attrs="145">
- <size>18</size>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__6(Int32)" attrs="145">
+ <method name="System.Nullable`1[System.Boolean] &lt;Main&gt;m__2(System.Object, System.Nullable`1[System.Boolean])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__10(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__13(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__4(System.Object, Int32, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__16(&lt;&gt;__AnonType0`2[System.Int32,from.ITest])" attrs="145">
- <size>15</size>
+ <method name="Boolean &lt;Main&gt;m__5(System.Object, Int32)" attrs="145">
+ <size>18</size>
</method>
- <method name="Int32 &lt;Main&gt;m__19(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__6(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1B(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__7(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1C(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__8(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1E(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__9(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1F(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__A(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__23(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__B(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__24(Int32)" attrs="145">
- <size>18</size>
+ <method name="Int32 &lt;Main&gt;m__C(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__D(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__25(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__E(System.Object, from.ITest)" attrs="145">
<size>15</size>
</method>
- <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__26(Int32)" attrs="145">
- <size>18</size>
+ <method name="Int32 &lt;Main&gt;m__F(System.Object, Int32, from.ITest)" attrs="145">
+ <size>10</size>
</method>
- <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__27(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
- <size>23</size>
+ <method name="Int32 &lt;Main&gt;m__10(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__28(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>20</size>
+ <method name="Int32 &lt;Main&gt;m__11(System.Object, from.ITest)" attrs="145">
+ <size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__29(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__12(System.Object, Int32, from.ITest)" attrs="145">
<size>10</size>
</method>
- <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2B(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
- <size>16</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__2C(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__13(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2D(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__14(System.Object, from.ITest)" attrs="145">
<size>15</size>
</method>
- <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2E(System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,from.ITest] &lt;Main&gt;m__15(System.Object, Int32, from.ITest)" attrs="145">
<size>16</size>
</method>
- <method name="Int32 &lt;Main&gt;m__30(&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__16(System.Object, &lt;&gt;__AnonType0`2[System.Int32,from.ITest])" attrs="145">
<size>15</size>
</method>
- <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__34(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__17(System.Object, from.ITest)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__18(System.Object, &lt;&gt;__AnonType0`2[System.Int32,from.ITest], from.ITest)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__19(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__35(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1A(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__36(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1B(System.Object, Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__37(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1C(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32] &lt;Main&gt;m__38(&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]])" attrs="145">
- <size>17</size>
+ <method name="Int32 &lt;Main&gt;m__1D(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__39(&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1E(System.Object, Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
<size>10</size>
</method>
- </type>
- <type name="from.C+&lt;Main&gt;c__AnonStorey0">
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0(Int32)" attrs="131">
- <size>15</size>
+ <method name="Int32 &lt;Main&gt;m__1F(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__1(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
- <size>15</size>
+ <method name="Int32 &lt;Main&gt;m__20(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
- <size>15</size>
+ <method name="Int32 &lt;Main&gt;m__21(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__3(System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="131">
+ <method name="Int32 &lt;Main&gt;m__22(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__23(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__24(System.Object, Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__25(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
<size>15</size>
</method>
- <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;&gt;m__4(Int32)" attrs="131">
- <size>55</size>
+ <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__26(System.Object, Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__27(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__28(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>20</size>
</method>
- <method name="Int32 &lt;&gt;m__5(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__29(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- </type>
- <type name="from.C">
- <method name="Int32 &lt;Main&gt;m__E(from.ITest)" attrs="145">
- <size>15</size>
+ <method name="Int32 &lt;Main&gt;m__2A(System.Object, Int32)" attrs="145">
+ <size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__F(Int32, from.ITest)" attrs="145">
+ <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2B(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__2C(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__11(from.ITest)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2D(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__12(Int32, from.ITest)" attrs="145">
+ <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__2E(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__2F(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__14(from.ITest)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__30(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
<size>15</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,from.ITest] &lt;Main&gt;m__15(Int32, from.ITest)" attrs="145">
+ <method name="&lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__31(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32], Int32)" attrs="145">
<size>16</size>
</method>
- <method name="Int32 &lt;Main&gt;m__17(from.ITest)" attrs="145">
- <size>15</size>
+ <method name="Int32 &lt;Main&gt;m__32(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__18(&lt;&gt;__AnonType0`2[System.Int32,from.ITest], from.ITest)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__33(System.Object, &lt;&gt;__AnonType3`2[System.Linq.IGrouping`2[System.Int32,System.Int32],System.Int32])" attrs="145">
<size>15</size>
</method>
+ <method name="System.Linq.IGrouping`2[System.Int32,System.Int32] &lt;Main&gt;m__34(System.Object, System.Linq.IGrouping`2[System.Int32,System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__35(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__36(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__37(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="&lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32] &lt;Main&gt;m__38(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]])" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__39(System.Object, &lt;&gt;__AnonType4`2[&lt;&gt;__AnonType1`2[System.Int32,System.Collections.Generic.IEnumerable`1[System.Int32]],System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="from.C+&lt;Main&gt;c__AnonStorey0">
+ <method name="Int32 &lt;&gt;m__5(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="gtest-linq-02.cs">
@@ -27076,21 +27387,21 @@
<method name="Int32 Main()" attrs="150">
<size>528</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
<size>11</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
<size>11</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-linq-03.cs">
@@ -27098,18 +27409,18 @@
<method name="Int32 Main()" attrs="150">
<size>197</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(Int32)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
<size>13</size>
</method>
- <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
<size>13</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-linq-04.cs">
@@ -27117,21 +27428,21 @@
<method name="Int32 Main()" attrs="150">
<size>589</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
<size>10</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-linq-05.cs">
@@ -27139,24 +27450,6 @@
<method name="Int32 Main()" attrs="150">
<size>1354</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__3(Int32)" attrs="145">
- <size>12</size>
- </method>
- <method name="System.String &lt;Main&gt;m__4(System.String)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__5(System.String)" attrs="145">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -27182,37 +27475,55 @@
</method>
</type>
<type name="OrderByTests">
- <method name="Int32 &lt;Main&gt;m__6(Data)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
+ <size>12</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__4(System.Object, System.String)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__5(System.Object, System.String)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__6(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="System.String &lt;Main&gt;m__7(Data)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__7(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__8(Data)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__8(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="System.String &lt;Main&gt;m__9(Data)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__9(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__A(Data)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__A(System.Object, Data)" attrs="145">
<size>19</size>
</method>
- <method name="Int32 &lt;Main&gt;m__B(Data)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__B(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="System.String &lt;Main&gt;m__C(Data)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__C(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="Boolean &lt;Main&gt;m__D(Data)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__D(System.Object, Data)" attrs="145">
<size>19</size>
</method>
- <method name="System.String &lt;Main&gt;m__E(Data)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__E(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="System.String &lt;Main&gt;m__F(Data)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__F(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="Data &lt;Main&gt;m__10(Data)" attrs="145">
+ <method name="Data &lt;Main&gt;m__10(System.Object, Data)" attrs="145">
<size>10</size>
</method>
</type>
@@ -27222,24 +27533,6 @@
<method name="Int32 Main()" attrs="150">
<size>423</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>18</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__2(Int32)" attrs="145">
- <size>18</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">
- <size>23</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__4(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>26</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__5(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -27284,6 +27577,26 @@
<size>21</size>
</method>
</type>
+ <type name="Let">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>26</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__5(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-07.cs">
<type name="SelectMany">
@@ -27367,38 +27680,36 @@
<method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__3(Int32)" attrs="131">
<size>15</size>
</method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__1(Int32)" attrs="131">
+ <size>20</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">
+ <size>20</size>
+ </method>
</type>
<type name="SelectMany">
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__0(Int32, System.String)" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__0(System.Object, Int32, System.String)" attrs="145">
<size>16</size>
</method>
- <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
<size>13</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__2(Int32, System.String)" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__2(System.Object, Int32, System.String)" attrs="145">
<size>16</size>
</method>
- <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32] &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.String], Int32)" attrs="145">
+ <method name="&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32] &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.String], Int32)" attrs="145">
<size>16</size>
</method>
- <method name="Int32 &lt;Main&gt;m__4(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
<size>15</size>
</method>
- <method name="&lt;&gt;__AnonType2`3[System.Int32,System.Int32,System.Int32] &lt;Main&gt;m__5(&lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
+ <method name="&lt;&gt;__AnonType2`3[System.Int32,System.Int32,System.Int32] &lt;Main&gt;m__5(System.Object, &lt;&gt;__AnonType1`2[&lt;&gt;__AnonType0`2[System.Int32,System.String],System.Int32])" attrs="145">
<size>33</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__6(Int32, System.String)" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.String] &lt;Main&gt;m__6(System.Object, Int32, System.String)" attrs="145">
<size>16</size>
</method>
</type>
- <type name="SelectMany+&lt;Main&gt;c__AnonStorey0">
- <method name="System.Collections.Generic.IEnumerable`1[System.String] &lt;&gt;m__1(Int32)" attrs="131">
- <size>20</size>
- </method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.String])" attrs="131">
- <size>20</size>
- </method>
- </type>
</test>
<test name="gtest-linq-08.cs">
<type name="TestA">
@@ -27418,15 +27729,15 @@
<method name="Int32 Main()" attrs="150">
<size>171</size>
</method>
- <method name="TestA &lt;Main&gt;m__0(TestA)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="TestA &lt;Main&gt;m__0(System.Object, TestA)" attrs="145">
<size>10</size>
</method>
- <method name="Boolean &lt;Main&gt;m__1(TestA)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, TestA)" attrs="145">
<size>25</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-linq-09.cs">
@@ -27439,54 +27750,6 @@
<method name="Int32 Main()" attrs="150">
<size>981</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__2(Data, Data)" attrs="145">
- <size>31</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__3(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__4(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__5(Data, Data)" attrs="145">
- <size>16</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__6(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
- <size>30</size>
- </method>
- <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__7(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
- <size>41</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__8(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__9(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__A(Data, Data)" attrs="145">
- <size>31</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__B(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__C(Data)" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__D(Data, Data)" attrs="145">
- <size>16</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__E(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
- <size>20</size>
- </method>
- <method name="Data &lt;Main&gt;m__F(&lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -27528,46 +27791,72 @@
<size>21</size>
</method>
</type>
- </test>
- <test name="gtest-linq-10.cs">
- <type name="DataA">
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <type name="Join">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Data)" attrs="145">
+ <size>15</size>
</method>
- </type>
- <type name="DataB">
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Data)" attrs="145">
+ <size>15</size>
</method>
- </type>
- <type name="GroupJoin">
- <method name="Int32 Main()" attrs="150">
- <size>781</size>
+ <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__2(System.Object, Data, Data)" attrs="145">
+ <size>31</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(DataA)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__3(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1(DataB)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__4(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__4(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">
- <size>47</size>
+ <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__5(System.Object, Data, Data)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__6(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
+ <size>30</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__7(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
+ <size>41</size>
</method>
- <method name="Int32 &lt;Main&gt;m__5(DataA)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__8(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__6(DataB)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__9(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__9(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">
- <size>47</size>
+ <method name="&lt;&gt;__AnonType0`1[System.String] &lt;Main&gt;m__A(System.Object, Data, Data)" attrs="145">
+ <size>31</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__B(System.Object, Data)" attrs="145">
+ <size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__A(DataA)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__C(System.Object, Data)" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__B(DataB)" attrs="145">
+ <method name="&lt;&gt;__AnonType1`2[Data,Data] &lt;Main&gt;m__D(System.Object, Data, Data)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__E(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="Data &lt;Main&gt;m__F(System.Object, &lt;&gt;__AnonType1`2[Data,Data])" attrs="145">
<size>15</size>
</method>
+ </type>
+ </test>
+ <test name="gtest-linq-10.cs">
+ <type name="DataA">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="DataB">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="GroupJoin">
+ <method name="Int32 Main()" attrs="150">
+ <size>781</size>
+ </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -27613,19 +27902,43 @@
</method>
</type>
<type name="GroupJoin">
- <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__2(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, DataA)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, DataB)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__2(System.Object, DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">
<size>16</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">
+ <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">
<size>20</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__7(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">
+ <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">
+ <size>47</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__5(System.Object, DataA)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__6(System.Object, DataB)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]] &lt;Main&gt;m__7(System.Object, DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">
<size>16</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__8(&lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">
+ <method name="System.Collections.Generic.IEnumerable`1[DataB] &lt;Main&gt;m__8(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]])" attrs="145">
<size>20</size>
</method>
- <method name="DataA &lt;Main&gt;m__C(DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">
+ <method name="&lt;&gt;__AnonType1`2[System.String,System.String] &lt;Main&gt;m__9(System.Object, &lt;&gt;__AnonType0`2[DataA,System.Collections.Generic.IEnumerable`1[DataB]], DataB)" attrs="145">
+ <size>47</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__A(System.Object, DataA)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__B(System.Object, DataB)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="DataA &lt;Main&gt;m__C(System.Object, DataA, System.Collections.Generic.IEnumerable`1[DataB])" attrs="145">
<size>10</size>
</method>
</type>
@@ -27635,24 +27948,24 @@
<method name="Int32 Main()" attrs="150">
<size>303</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(Int32)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
<size>13</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
<size>13</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Boolean &lt;Main&gt;m__3(Int32)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
<size>13</size>
</method>
- <method name="Int32 &lt;Main&gt;m__4(Int32)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__4(System.Object, Int32)" attrs="145">
<size>12</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-linq-12.cs">
@@ -27663,18 +27976,6 @@
<method name="Int32 Main()" attrs="150">
<size>502</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;XX&gt;m__0(System.String)" attrs="145">
- <size>20</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__2(System.String)" attrs="145">
- <size>18</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;Main&gt;m__4(System.String)" attrs="145">
- <size>21</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;XX&gt;m__6(Char)" attrs="145">
- <size>16</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -27729,39 +28030,51 @@
<size>7</size>
</method>
</type>
+ <type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">
+ <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
+ <size>22</size>
+ </method>
+ </type>
+ <type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">
+ <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
+ <size>23</size>
+ </method>
+ </type>
<type name="NestedQuery">
- <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;XX&gt;m__1(&lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;XX&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;XX&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">
<size>117</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__3(System.String)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__2(System.Object, System.String)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__3(System.Object, System.String)" attrs="145">
<size>44</size>
</method>
- <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__5(&lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.String,System.Int32] &lt;Main&gt;m__4(System.Object, System.String)" attrs="145">
+ <size>21</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__5(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Int32])" attrs="145">
<size>118</size>
</method>
- <method name="Char &lt;XX&gt;m__7(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
+ <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;XX&gt;m__6(System.Object, Char)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Char &lt;XX&gt;m__7(System.Object, &lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
<size>14</size>
</method>
- <method name="Boolean &lt;Main&gt;m__8(Char)" attrs="145">
+ <method name="Boolean &lt;Main&gt;m__8(System.Object, Char)" attrs="145">
<size>14</size>
</method>
- <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;Main&gt;m__9(Char)" attrs="145">
+ <method name="&lt;&gt;__AnonType1`2[System.Char,System.Int32] &lt;Main&gt;m__9(System.Object, Char)" attrs="145">
<size>17</size>
</method>
- <method name="Char &lt;Main&gt;m__A(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
+ <method name="Char &lt;Main&gt;m__A(System.Object, &lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="145">
<size>15</size>
</method>
</type>
- <type name="NestedQuery+&lt;XX&gt;c__AnonStorey0">
- <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
- <size>22</size>
- </method>
- </type>
- <type name="NestedQuery+&lt;Main&gt;c__AnonStorey1">
- <method name="Boolean &lt;&gt;m__0(&lt;&gt;__AnonType1`2[System.Char,System.Int32])" attrs="131">
- <size>23</size>
- </method>
- </type>
</test>
<test name="gtest-linq-13.cs">
<type name="Program">
@@ -27771,9 +28084,6 @@
<method name="Void Foo(TypeDefinition)" attrs="145">
<size>48</size>
</method>
- <method name="MethodDefinition &lt;Foo&gt;m__0(MethodDefinition)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -27804,6 +28114,11 @@
<size>10</size>
</method>
</type>
+ <type name="Program">
+ <method name="MethodDefinition &lt;Foo&gt;m__0(System.Object, MethodDefinition)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-14.cs">
<type name="Person">
@@ -27858,12 +28173,6 @@
<method name="Void Main()" attrs="150">
<size>79</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(NameCollisionTest.Data)" attrs="145">
- <size>14</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -27901,6 +28210,14 @@
<size>14</size>
</method>
</type>
+ <type name="NameCollisionTest.C">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, NameCollisionTest.Data)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-16.cs">
<type name="C">
@@ -27951,30 +28268,32 @@
<method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">
<size>74</size>
</method>
+ <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
+ <size>22</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test_2&gt;c__AnonStorey1">
+ <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">
+ <size>74</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
+ <size>22</size>
+ </method>
</type>
<type name="C">
- <method name="System.Func`1[System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;Test_2&gt;m__0(Int32)" attrs="145">
+ <method name="System.Func`1[System.Collections.Generic.IEnumerable`1[System.Int32]] &lt;Test_2&gt;m__0(System.Object, Int32)" attrs="145">
<size>33</size>
</method>
</type>
<type name="C+&lt;Test_1&gt;c__AnonStorey0">
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(Int32)" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(System.Object, Int32)" attrs="145">
<size>16</size>
</method>
- <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
- <size>22</size>
- </method>
</type>
<type name="C+&lt;Test_2&gt;c__AnonStorey1">
- <method name="System.Collections.Generic.IEnumerable`1[System.Int32] &lt;&gt;m__0()" attrs="131">
- <size>74</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(Int32)" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;&gt;m__1(System.Object, Int32)" attrs="145">
<size>16</size>
</method>
- <method name="Int32 &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="131">
- <size>22</size>
- </method>
</type>
</test>
<test name="gtest-linq-17.cs">
@@ -27982,12 +28301,12 @@
<method name="Int32 Main()" attrs="150">
<size>169</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="gtest-linq-18.cs">
@@ -28001,57 +28320,6 @@
<method name="Int32 Main()" attrs="150">
<size>658</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Boolean] &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>50</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">
- <size>19</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">
- <size>39</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(Int32)" attrs="145">
- <size>39</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__4(Int32)" attrs="145">
- <size>39</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__5(Int32)" attrs="145">
- <size>39</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__6(Int32)" attrs="145">
- <size>39</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__7(Int32)" attrs="145">
- <size>18</size>
- </method>
- <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__8(&lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
- <size>23</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__9(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>39</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__A(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>23</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__B(&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
- <size>20</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__C(Int32)" attrs="145">
- <size>39</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__D(Int32)" attrs="145">
- <size>39</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__E(Int32, Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__F(Int32)" attrs="145">
- <size>39</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__10(Int32)" attrs="145">
- <size>39</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -28171,11 +28439,6 @@
<size>7</size>
</method>
</type>
- <type name="C">
- <method name="Int32 &lt;Main&gt;m__11(Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
- <size>10</size>
- </method>
- </type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
<method name="Boolean &lt;&gt;m__0(Int32)" attrs="131">
<size>17</size>
@@ -28231,20 +28494,76 @@
<size>17</size>
</method>
</type>
+ <type name="C">
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Boolean] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>50</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">
+ <size>19</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__2(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Boolean])" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__4(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__5(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__6(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[System.Int32,System.Int32] &lt;Main&gt;m__7(System.Object, Int32)" attrs="145">
+ <size>18</size>
+ </method>
+ <method name="&lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32] &lt;Main&gt;m__8(System.Object, &lt;&gt;__AnonType1`2[System.Int32,System.Int32])" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__9(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__A(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>23</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__B(System.Object, &lt;&gt;__AnonType2`2[&lt;&gt;__AnonType1`2[System.Int32,System.Int32],System.Int32])" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__C(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__D(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__E(System.Object, Int32, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__F(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__10(System.Object, Int32)" attrs="145">
+ <size>39</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__11(System.Object, Int32, System.Collections.Generic.IEnumerable`1[System.Int32])" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-19.cs">
<type name="Test">
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Char &lt;E&gt;m__0(Char)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
<method name="Void .cctor()" attrs="6289">
- <size>45</size>
+ <size>28</size>
+ </method>
+ <method name="Char &lt;E&gt;m__0(System.Object, Char)" attrs="145">
+ <size>10</size>
</method>
</type>
</test>
@@ -28290,18 +28609,6 @@
<method name="Void Main()" attrs="150">
<size>139</size>
</method>
- <method name="Maybe`1[System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>15</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__1(Int32, Int32)" attrs="145">
- <size>16</size>
- </method>
- <method name="Maybe`1[System.Int32] &lt;Main&gt;m__2(&lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">
- <size>15</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[System.Int32,System.Int32], Int32)" attrs="145">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -28326,6 +28633,20 @@
<size>21</size>
</method>
</type>
+ <type name="Test">
+ <method name="Maybe`1[System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="&lt;&gt;__AnonType0`2[System.Int32,System.Int32] &lt;Main&gt;m__1(System.Object, Int32, Int32)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Maybe`1[System.Int32] &lt;Main&gt;m__2(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32])" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[System.Int32,System.Int32], Int32)" attrs="145">
+ <size>24</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-21.cs">
<type name="Program">
@@ -28426,13 +28747,13 @@
<method name="Int32 Main()" attrs="150">
<size>362</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(OrderByBugExample.Foo)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, OrderByBugExample.Foo)" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__1(OrderByBugExample.Foo)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, OrderByBugExample.Foo)" attrs="145">
<size>15</size>
</method>
- <method name="Int32 &lt;Main&gt;m__2(OrderByBugExample.Foo)" attrs="145">
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, OrderByBugExample.Foo)" attrs="145">
<size>15</size>
</method>
</type>
@@ -28453,12 +28774,12 @@
<method name="Int32 Main()" attrs="150">
<size>20</size>
</method>
- <method name="Int32 &lt;Test&gt;m__0(A)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Int32 &lt;Test&gt;m__0(System.Object, A)" attrs="145">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="gtest-linq-25.cs">
@@ -28485,18 +28806,6 @@
<method name="Void Test(System.Action)" attrs="145">
<size>8</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>162</size>
- </method>
- <method name="&lt;&gt;__AnonType0`2[A,B] &lt;Main&gt;m__2(A, B)" attrs="145">
- <size>16</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(&lt;&gt;__AnonType0`2[A,B])" attrs="145">
- <size>75</size>
- </method>
- <method name="&lt;&gt;__AnonType1`2[A,B] &lt;Main&gt;m__4(&lt;&gt;__AnonType0`2[A,B])" attrs="145">
- <size>26</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -28542,9 +28851,21 @@
</method>
</type>
<type name="C">
- <method name="System.Collections.Generic.IEnumerable`1[B] &lt;Main&gt;m__1(A)" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>162</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[B] &lt;Main&gt;m__1(System.Object, A)" attrs="145">
<size>15</size>
</method>
+ <method name="&lt;&gt;__AnonType0`2[A,B] &lt;Main&gt;m__2(System.Object, A, B)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, &lt;&gt;__AnonType0`2[A,B])" attrs="145">
+ <size>75</size>
+ </method>
+ <method name="&lt;&gt;__AnonType1`2[A,B] &lt;Main&gt;m__4(System.Object, &lt;&gt;__AnonType0`2[A,B])" attrs="145">
+ <size>26</size>
+ </method>
</type>
</test>
<test name="gtest-linq-26.cs">
@@ -28570,15 +28891,15 @@
<method name="Void Main()" attrs="150">
<size>80</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(Test.C)" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__0(System.Object, Test.C)" attrs="145">
<size>15</size>
</method>
- <method name="System.String &lt;Main&gt;m__1(Test.C)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__1(System.Object, Test.C)" attrs="145">
<size>14</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
</type>
</test>
<test name="gtest-linq-27.cs">
@@ -28586,9 +28907,6 @@
<method name="Void Main()" attrs="150">
<size>152</size>
</method>
- <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -28627,30 +28945,31 @@
<method name="System.Collections.Generic.IEnumerable`1[System.Boolean] &lt;&gt;m__0(System.String)" attrs="131">
<size>82</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.String,System.Boolean] &lt;&gt;m__1(System.String)" attrs="145">
- <size>55</size>
- </method>
- <method name="Boolean &lt;&gt;m__2(&lt;&gt;__AnonType0`2[System.String,System.Boolean])" attrs="145">
- <size>15</size>
- </method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0+&lt;Main&gt;c__AnonStorey1">
<method name="Boolean &lt;&gt;m__0(Char)" attrs="131">
<size>24</size>
</method>
</type>
+ <type name="C">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;Main&gt;c__AnonStorey0">
+ <method name="&lt;&gt;__AnonType0`2[System.String,System.Boolean] &lt;&gt;m__1(System.Object, System.String)" attrs="145">
+ <size>55</size>
+ </method>
+ <method name="Boolean &lt;&gt;m__2(System.Object, &lt;&gt;__AnonType0`2[System.String,System.Boolean])" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
</test>
<test name="gtest-linq-28.cs">
<type name="C">
<method name="Int32 Main()" attrs="150">
<size>222</size>
</method>
- <method name="&lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]] &lt;Main&gt;m__0(Char)" attrs="145">
- <size>54</size>
- </method>
- <method name="Char &lt;Main&gt;m__2(Char)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -28676,9 +28995,15 @@
</method>
</type>
<type name="C">
- <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__1(&lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]])" attrs="145">
+ <method name="&lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]] &lt;Main&gt;m__0(System.Object, Char)" attrs="145">
+ <size>54</size>
+ </method>
+ <method name="System.Collections.Generic.IEnumerable`1[System.Char] &lt;Main&gt;m__1(System.Object, &lt;&gt;__AnonType0`2[System.Char,System.Collections.Generic.IEnumerable`1[System.Char]])" attrs="145">
<size>15</size>
</method>
+ <method name="Char &lt;Main&gt;m__2(System.Object, Char)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="gtest-named-01.cs">
@@ -28695,9 +29020,6 @@
<method name="Int32 Main()" attrs="150">
<size>201</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
<method name="Void .ctor()" attrs="6278">
@@ -28707,6 +29029,11 @@
<size>14</size>
</method>
</type>
+ <type name="C">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="gtest-named-02.cs">
<type name="D">
@@ -28759,6 +29086,25 @@
</method>
</type>
</test>
+ <test name="gtest-named-05.cs">
+ <type name="Test">
+ <method name="Void Main()" attrs="150">
+ <size>38</size>
+ </method>
+ <method name="Void M(System.String, System.String)" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void M2(Int32 ByRef, System.String, System.String)" attrs="145">
+ <size>5</size>
+ </method>
+ <method name="System.String F()" attrs="150">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-optional-01.cs">
<type name="C">
<method name="Void TestA(Int32)" attrs="150">
@@ -29097,12 +29443,12 @@
<method name="Void Main()" attrs="145">
<size>45</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>14</size>
+ </method>
</type>
</test>
<test name="gtest-optional-15.cs">
@@ -29173,14 +29519,14 @@
<method name="Void Wrap[T](System.Func`2[IPackageRepository,T], T)" attrs="145">
<size>2</size>
</method>
- <method name="IPackage &lt;Main&gt;m__0(IPackageRepository)" attrs="145">
- <size>14</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
- <method name="IPackage &lt;Main&gt;m__1(IPackageRepository)" attrs="145">
+ <method name="IPackage &lt;Main&gt;m__0(System.Object, IPackageRepository)" attrs="145">
<size>14</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="IPackage &lt;Main&gt;m__1(System.Object, IPackageRepository)" attrs="145">
+ <size>14</size>
</method>
</type>
</test>
@@ -29300,20 +29646,18 @@
<method name="System.Collections.Generic.IEnumerator`1[System.Int32] System.Collections.Generic.IEnumerable&lt;int&gt;.GetEnumerator()" attrs="481">
<size>26</size>
</method>
+ <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
+ <size>14</size>
+ </method>
</type>
<type name="CallerMemberTest">
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
<size>17</size>
</method>
- <method name="System.Object &lt;Main&gt;m__1(Char)" attrs="145">
+ <method name="System.Object &lt;Main&gt;m__1(System.Object, Char)" attrs="145">
<size>24</size>
</method>
</type>
- <type name="CallerMemberTest+&lt;Enumerator&gt;c__Iterator0">
- <method name="System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()" attrs="481">
- <size>14</size>
- </method>
- </type>
</test>
<test name="gtest-optional-23.cs">
<type name="CallerLineNumberTest">
@@ -29323,9 +29667,6 @@
<method name="Void Main()" attrs="150">
<size>75</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>11</size>
- </method>
<method name="Void .ctor()" attrs="6273">
<size>17</size>
</method>
@@ -29335,6 +29676,9 @@
<method name="Void TraceStatic2(Double, System.Decimal)" attrs="145">
<size>2</size>
</method>
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>11</size>
+ </method>
</type>
</test>
<test name="gtest-optional-24.cs">
@@ -29418,12 +29762,12 @@
<method name="Int32 Main()" attrs="150">
<size>148</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>9</size>
+ </method>
</type>
</test>
<test name="gtest-optional-29.cs">
@@ -29462,6 +29806,87 @@
</method>
</type>
</test>
+ <test name="gtest-optional-32.cs">
+ <type name="A">
+ <method name="Int32[] Foo(Int32[])" attrs="1478">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B">
+ <method name="Int32[] Foo(Int32[])" attrs="198">
+ <size>10</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>42</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="gtest-optional-33.cs">
+ <type name="TestCallerLineNumber">
+ <method name="Void Test(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Decimal)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(Double)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(Single)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(UInt32)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(Int64)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(UInt64)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Nullable`1[System.Decimal])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Nullable`1[System.Double])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Nullable`1[System.Single])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Nullable`1[System.Int32])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Nullable`1[System.UInt32])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Nullable`1[System.Int64])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void Test(System.Nullable`1[System.UInt64])" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="D">
+ <method name="Void Main()" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="gtest-partial-01.cs">
<type name="B`1[U]">
<method name="Void .ctor()" attrs="6278">
@@ -29799,9 +30224,6 @@
<method name="Int32 Main()" attrs="150">
<size>64</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -29814,6 +30236,11 @@
<size>0</size>
</method>
</type>
+ <type name="D">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="gtest-variance-13.cs">
<type name="A">
@@ -29911,9 +30338,6 @@
<method name="Int32 Main()" attrs="150">
<size>61</size>
</method>
- <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
- <size>7</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -29942,6 +30366,11 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
</test>
<test name="gtest-variance-16.cs">
<type name="S">
@@ -30121,9 +30550,6 @@
<method name="Int32 Bar(Foo`1[System.String], System.String)" attrs="145">
<size>16</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -30136,6 +30562,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="gtest-variance-5.cs">
<type name="BothVariants`2[T1,T2]">
@@ -30154,7 +30585,7 @@
</type>
<type name="Invariant`1[T]">
<method name="T get_Foo()" attrs="2534">
- <size>44</size>
+ <size>14</size>
</method>
<method name="Int32 Bar(T)" attrs="486">
<size>22</size>
@@ -31676,7 +32107,7 @@
<test name="test-146.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
- <size>354</size>
+ <size>355</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -35817,12 +36248,6 @@
<method name="Int32 Main()" attrs="150">
<size>129</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0()" attrs="145">
- <size>11</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1()" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -35835,6 +36260,14 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>11</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-276.cs">
<type name="EventTestClass">
@@ -37138,9 +37571,6 @@
<method name="Int32 Main()" attrs="150">
<size>68</size>
</method>
- <method name="Double &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -37153,6 +37583,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Double &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="test-327.cs">
<type name="X2">
@@ -40715,9 +41150,6 @@
<method name="Int32 Main()" attrs="150">
<size>21</size>
</method>
- <method name="Void &lt;Test&gt;m__0(Int32)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -40736,6 +41168,11 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Test&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="test-481.cs">
<type name="TestDelegate">
@@ -40750,9 +41187,6 @@
<method name="Int32 Main()" attrs="150">
<size>50</size>
</method>
- <method name="Void &lt;Main&gt;m__0(Int32 ByRef)" attrs="145">
- <size>5</size>
- </method>
</type>
<type name="TestDelegate">
<method name="System.IAsyncResult BeginInvoke(Int32 ByRef, System.AsyncCallback, System.Object)" attrs="454">
@@ -40762,6 +41196,11 @@
<size>0</size>
</method>
</type>
+ <type name="TestClass">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Int32 ByRef)" attrs="145">
+ <size>5</size>
+ </method>
+ </type>
</test>
<test name="test-482.cs">
<type name="X">
@@ -41194,9 +41633,6 @@
<method name="Void Main(System.String[])" attrs="150">
<size>9</size>
</method>
- <method name="Boolean &lt;foo&gt;m__0(System.Object)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -41222,6 +41658,11 @@
<size>0</size>
</method>
</type>
+ <type name="Tests">
+ <method name="Boolean &lt;foo&gt;m__0(System.Object, System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-502.cs">
<type name="Base">
@@ -41301,6 +41742,9 @@
<method name="System.String Test_2()" attrs="150">
<size>7</size>
</method>
+ <method name="Void Test_3()" attrs="145">
+ <size>20</size>
+ </method>
</type>
</test>
<test name="test-505.cs">
@@ -41878,9 +42322,6 @@
<method name="Void Main()" attrs="150">
<size>32</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>36</size>
- </method>
</type>
<type name="FooHandler">
<method name="System.IAsyncResult BeginInvoke(System.AsyncCallback, System.Object)" attrs="454">
@@ -41890,6 +42331,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>36</size>
+ </method>
+ </type>
</test>
<test name="test-537.cs">
<type name="Base">
@@ -42038,9 +42484,6 @@
<method name="Void set_test(Boolean)" attrs="2193">
<size>2</size>
</method>
- <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -42059,6 +42502,11 @@
<size>0</size>
</method>
</type>
+ <type name="ClassMain">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="test-542.cs">
<type name="ARec">
@@ -42901,9 +43349,6 @@
<method name="Int32 Main()" attrs="150">
<size>70</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -42916,6 +43361,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test1.CC">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-579.cs">
<type name="TestCase">
@@ -44467,7 +44917,7 @@
<test name="test-640.cs">
<type name="C">
<method name="Int32 Main()" attrs="150">
- <size>128</size>
+ <size>139</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -44941,7 +45391,7 @@
</type>
<type name="C">
<method name="Void Main()" attrs="150">
- <size>8</size>
+ <size>19</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -45043,7 +45493,7 @@
<size>27</size>
</method>
<method name="Boolean Bar(System.Object)" attrs="145">
- <size>10</size>
+ <size>16</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -45084,9 +45534,6 @@
<method name="Int32 Main()" attrs="150">
<size>64</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -45105,6 +45552,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-675.cs">
<type name="B">
@@ -46331,7 +46783,7 @@
<test name="test-729.cs">
<type name="Primes.MainClass">
<method name="Int32 Main()" attrs="150">
- <size>148</size>
+ <size>149</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -47268,7 +47720,7 @@
<test name="test-77.cs">
<type name="XX">
<method name="Int32 Main()" attrs="150">
- <size>393</size>
+ <size>443</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -47686,9 +48138,6 @@
<method name="Void Main()" attrs="150">
<size>14</size>
</method>
- <method name="Void &lt;Test&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -47701,6 +48150,11 @@
<size>0</size>
</method>
</type>
+ <type name="A">
+ <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="test-782.cs">
<type name="Test">
@@ -47941,10 +48395,10 @@
<method name="Void Main()" attrs="150">
<size>77</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
+ <method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
- <method name="Void .ctor()" attrs="6278">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
<size>7</size>
</method>
</type>
@@ -49088,12 +49542,12 @@
<method name="Void Main()" attrs="150">
<size>39</size>
</method>
- <method name="Void &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;Main&gt;m__0(System.Object, System.Object, System.String)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="test-849.cs">
@@ -49778,6 +50232,9 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void Test8()" attrs="145">
+ <size>51</size>
+ </method>
</type>
</test>
<test name="test-881.cs">
@@ -49920,21 +50377,6 @@
</method>
</type>
</test>
- <test name="test-888.cs">
- <type name="S1">
- <method name="Void .ctor(Int32)" attrs="6278">
- <size>2</size>
- </method>
- </type>
- <type name="X">
- <method name="Void Main()" attrs="150">
- <size>2</size>
- </method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
- </method>
- </type>
- </test>
<test name="test-889.cs">
<type name="Test">
<method name="Void Main()" attrs="145">
@@ -50074,10 +50516,23 @@
<test name="test-898.cs">
<type name="BoolArrayWithByteValues">
<method name="Int32 Foo(Boolean ByRef)" attrs="145">
- <size>56</size>
+ <size>58</size>
</method>
<method name="Int32 Main()" attrs="145">
- <size>169</size>
+ <size>191</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Boolean Ptr()" attrs="145">
+ <size>167</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-899.cs">
+ <type name="Test">
+ <method name="Void Main()" attrs="150">
+ <size>49</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
@@ -50104,6 +50559,101 @@
</method>
</type>
</test>
+ <test name="test-900.cs">
+ <type name="D">
+ <method name="D op_Implicit(System.Action)" attrs="2198">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Program">
+ <method name="Void Main()" attrs="145">
+ <size>37</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-901.cs">
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>22</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-902.cs">
+ <type name="A">
+ <method name="Void M(B[])" attrs="454">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6276">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="B">
+ <method name="Void M(B[])" attrs="198">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Test2">
+ <method name="Void Main()" attrs="150">
+ <size>54</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-903.cs">
+ <type name="C">
+ <method name="S op_Implicit(C)" attrs="2198">
+ <size>18</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Program">
+ <method name="Void Main()" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-904.cs">
+ <type name="Test">
+ <method name="Boolean Foo(Int32 ByRef)" attrs="150">
+ <size>13</size>
+ </method>
+ <method name="Void Main()" attrs="145">
+ <size>172</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-905.cs">
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-91.cs">
<type name="Abstract">
<method name="Void .ctor()" attrs="6276">
@@ -50669,14 +51219,14 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Void &lt;f&gt;m__0()" attrs="145">
- <size>27</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
<method name="Void .cctor()" attrs="6289">
- <size>35</size>
+ <size>18</size>
+ </method>
+ <method name="Void &lt;f&gt;m__0(System.Object)" attrs="145">
+ <size>27</size>
</method>
</type>
</test>
@@ -51095,9 +51645,6 @@
<method name="Void Main()" attrs="150">
<size>82</size>
</method>
- <method name="Void &lt;op_Implicit&gt;m__0()" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51181,6 +51728,11 @@
<size>14</size>
</method>
</type>
+ <type name="Test">
+ <method name="Void &lt;op_Implicit&gt;m__0(System.Object)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="test-anon-11.cs">
<type name="D">
@@ -51208,12 +51760,6 @@
<method name="Int32 Main()" attrs="150">
<size>132</size>
</method>
- <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51246,10 +51792,16 @@
</method>
</type>
<type name="X">
- <method name="Void &lt;Main&gt;m__2(Int32[])" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__2(System.Object, Int32[])" attrs="145">
<size>2</size>
</method>
- <method name="Void &lt;Main&gt;m__3(Int32[])" attrs="145">
+ <method name="Void &lt;Main&gt;m__3(System.Object, Int32[])" attrs="145">
<size>2</size>
</method>
</type>
@@ -51392,9 +51944,6 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="TDelegate &lt;CreateMethodUnscoped`1&gt;m__0[TDelegate](System.Object)" attrs="145">
- <size>15</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51420,6 +51969,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="TDelegate &lt;CreateMethodUnscoped`1&gt;m__0[TDelegate](System.Object, System.Object)" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
</test>
<test name="test-anon-114.cs">
<type name="T">
@@ -51432,12 +51986,12 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Int32 &lt;SomeCaller&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Int32 &lt;SomeCaller&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="test-anon-115.cs">
@@ -51527,9 +52081,6 @@
<method name="Void Func[T](TestFunc`1[T])" attrs="145">
<size>2</size>
</method>
- <method name="Void &lt;a&gt;m__0(Int32)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>47</size>
</method>
@@ -51542,18 +52093,17 @@
<size>0</size>
</method>
</type>
+ <type name="TestClass">
+ <method name="Void &lt;a&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="test-anon-117.cs">
<type name="C">
<method name="Void Main()" attrs="150">
<size>76</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51579,6 +52129,14 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-anon-118.cs">
<type name="C">
@@ -51588,18 +52146,6 @@
<method name="Void Main()" attrs="150">
<size>101</size>
</method>
- <method name="T &lt;Test2`1&gt;m__0[T](T)" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>24</size>
- </method>
- <method name="System.String &lt;Main&gt;m__2(Int32)" attrs="145">
- <size>14</size>
- </method>
- <method name="System.String &lt;Main&gt;m__3(Int32)" attrs="145">
- <size>14</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51628,6 +52174,20 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="T &lt;Test2`1&gt;m__0[T](System.Object, T)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>24</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
</test>
<test name="test-anon-119.cs">
<type name="Test">
@@ -51637,9 +52197,6 @@
<method name="Void Main()" attrs="150">
<size>7</size>
</method>
- <method name="Int32 &lt;TestNaturalSort&gt;m__0(System.String, System.String)" attrs="145">
- <size>114</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51655,6 +52212,11 @@
<size>120</size>
</method>
</type>
+ <type name="Test">
+ <method name="Int32 &lt;TestNaturalSort&gt;m__0(System.Object, System.String, System.String)" attrs="145">
+ <size>114</size>
+ </method>
+ </type>
</test>
<test name="test-anon-12.cs">
<type name="predicate">
@@ -51672,9 +52234,6 @@
<method name="System.Collections.ArrayList Find(predicate, System.Collections.ArrayList)" attrs="145">
<size>96</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(System.Object)" attrs="145">
- <size>20</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51687,6 +52246,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">
+ <size>20</size>
+ </method>
+ </type>
</test>
<test name="test-anon-120.cs">
<type name="C`1[T]">
@@ -51696,9 +52260,6 @@
<method name="Void Run()" attrs="145">
<size>2</size>
</method>
- <method name="Void &lt;Foo`1&gt;m__0[U]()" attrs="145">
- <size>6</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51711,6 +52272,11 @@
<size>7</size>
</method>
</type>
+ <type name="C`1[T]">
+ <method name="Void &lt;Foo`1&gt;m__0[U](System.Object)" attrs="145">
+ <size>6</size>
+ </method>
+ </type>
</test>
<test name="test-anon-121.cs">
<type name="EmptyDelegate">
@@ -51790,9 +52356,6 @@
<method name="Int32 Main()" attrs="150">
<size>95</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51813,6 +52376,11 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-anon-123.cs">
<type name="MemberAccessData">
@@ -51844,12 +52412,6 @@
<method name="Void &lt;InstanceTests&gt;m__0()" attrs="129">
<size>7</size>
</method>
- <method name="Void &lt;Main&gt;m__3()" attrs="145">
- <size>62</size>
- </method>
- <method name="Void &lt;Main&gt;m__4()" attrs="145">
- <size>54</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -51878,17 +52440,6 @@
<size>15</size>
</method>
</type>
- <type name="C">
- <method name="Void &lt;Main&gt;m__1()" attrs="145">
- <size>17</size>
- </method>
- <method name="Void &lt;Main&gt;m__2()" attrs="145">
- <size>17</size>
- </method>
- <method name="Void &lt;Main&gt;m__5(E)" attrs="145">
- <size>35</size>
- </method>
- </type>
<type name="C+&lt;Main&gt;c__AnonStorey0">
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>49</size>
@@ -51907,6 +52458,23 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__2(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__3(System.Object)" attrs="145">
+ <size>62</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__4(System.Object)" attrs="145">
+ <size>54</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__5(System.Object, E)" attrs="145">
+ <size>35</size>
+ </method>
+ </type>
</test>
<test name="test-anon-124.cs">
<type name="Disposable`1[T]">
@@ -52165,14 +52733,14 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="TDest &lt;GetUpcaster`2&gt;m__0[TSource,TDest](TSource)" attrs="145">
- <size>20</size>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
</method>
- <method name="TDest &lt;GetDowncaster`2&gt;m__1[TSource,TDest](TSource)" attrs="145">
+ <method name="TDest &lt;GetUpcaster`2&gt;m__0[TSource,TDest](System.Object, TSource)" attrs="145">
<size>20</size>
</method>
- <method name="Void .ctor()" attrs="6278">
- <size>7</size>
+ <method name="TDest &lt;GetDowncaster`2&gt;m__1[TSource,TDest](System.Object, TSource)" attrs="145">
+ <size>20</size>
</method>
</type>
</test>
@@ -52437,12 +53005,12 @@
<method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">
<size>37</size>
</method>
- <method name="Void &lt;&gt;m__1(System.Object, System.EventArgs)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__1(System.Object, System.Object, System.EventArgs)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="test-anon-132.cs">
@@ -52497,7 +53065,7 @@
</method>
</type>
<type name="Test">
- <method name="System.String &lt;Main&gt;m__0(System.String)" attrs="145">
+ <method name="System.String &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
<size>24</size>
</method>
</type>
@@ -52552,9 +53120,6 @@
<method name="System.Func`1[T] XX()" attrs="145">
<size>40</size>
</method>
- <method name="T &lt;XX&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -52583,13 +53148,18 @@
<size>7</size>
</method>
</type>
+ <type name="C`1[T]">
+ <method name="T &lt;XX&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
<type name="C2`1[T]">
- <method name="C`1[T] &lt;XX&gt;m__0()" attrs="145">
+ <method name="C`1[T] &lt;XX&gt;m__0(System.Object)" attrs="145">
<size>9</size>
</method>
</type>
<type name="N1">
- <method name="T &lt;XX`1&gt;m__0[T]()" attrs="145">
+ <method name="T &lt;XX`1&gt;m__0[T](System.Object)" attrs="145">
<size>17</size>
</method>
</type>
@@ -52867,10 +53437,10 @@
<method name="System.Decimal Average[TSource](System.Collections.Generic.IEnumerable`1[TSource], System.Func`2[TSource,System.Decimal])" attrs="150">
<size>45</size>
</method>
- <method name="System.Decimal &lt;Average`1&gt;m__0[TSource](System.Decimal, System.Decimal)" attrs="145">
+ <method name="System.Decimal &lt;Average`1&gt;m__0[TSource](System.Object, System.Decimal, System.Decimal)" attrs="145">
<size>15</size>
</method>
- <method name="System.Decimal &lt;Average`1&gt;m__1[TSource](System.Decimal, System.Decimal)" attrs="145">
+ <method name="System.Decimal &lt;Average`1&gt;m__1[TSource](System.Object, System.Decimal, System.Decimal)" attrs="145">
<size>15</size>
</method>
</type>
@@ -52883,9 +53453,6 @@
<method name="Void Test_3[T]()" attrs="134">
<size>21</size>
</method>
- <method name="Void &lt;Test_3`1&gt;m__0[T]()" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -52904,6 +53471,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Void &lt;Test_3`1&gt;m__0[T](System.Object)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="test-anon-143.cs">
<type name="TestC">
@@ -52913,12 +53485,12 @@
<method name="System.Func`1[System.Type] Test[T]()" attrs="150">
<size>21</size>
</method>
- <method name="System.Type &lt;Test`1&gt;m__0[T]()" attrs="145">
- <size>18</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.Type &lt;Test`1&gt;m__0[T](System.Object)" attrs="145">
+ <size>18</size>
+ </method>
</type>
</test>
<test name="test-anon-144.cs">
@@ -52937,12 +53509,12 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Void &lt;ThisCausesACrash`1&gt;m__0[I](System.Object, System.EventArgs)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;ThisCausesACrash`1&gt;m__0[I](System.Object, System.Object, System.EventArgs)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="test-anon-145.cs">
@@ -52953,9 +53525,6 @@
<method name="Void AnyMethod[T]()" attrs="134">
<size>21</size>
</method>
- <method name="Void &lt;AnyMethod`1&gt;m__0[T]()" attrs="145">
- <size>32</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -52968,6 +53537,11 @@
<size>14</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;AnyMethod`1&gt;m__0[T](System.Object)" attrs="145">
+ <size>32</size>
+ </method>
+ </type>
</test>
<test name="test-anon-146.cs">
<type name="TheClass">
@@ -53025,11 +53599,6 @@
<size>7</size>
</method>
</type>
- <type name="Test">
- <method name="Void &lt;Main&gt;m__0(Int32, Int32, Int32)" attrs="145">
- <size>24</size>
- </method>
- </type>
<type name="C+&lt;Curry&gt;c__AnonStorey0`3+&lt;Curry&gt;c__AnonStorey1`3[T1,T2,T3]">
<method name="System.Action`1[T3] &lt;&gt;m__0(T2)" attrs="131">
<size>52</size>
@@ -53040,6 +53609,11 @@
<size>35</size>
</method>
</type>
+ <type name="Test">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Int32, Int32, Int32)" attrs="145">
+ <size>24</size>
+ </method>
+ </type>
</test>
<test name="test-anon-148.cs">
<type name="Func`1[TResult]">
@@ -53157,11 +53731,6 @@
<size>8</size>
</method>
</type>
- <type name="Foo">
- <method name="Inner &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>21</size>
- </method>
- </type>
<type name="Foo+foo_fn">
<method name="Inner Invoke(System.String)" attrs="454">
<size>0</size>
@@ -53173,6 +53742,11 @@
<size>0</size>
</method>
</type>
+ <type name="Foo">
+ <method name="Inner &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>21</size>
+ </method>
+ </type>
</test>
<test name="test-anon-150.cs">
<type name="M">
@@ -53308,9 +53882,6 @@
<method name="Void UseATemplate()" attrs="134">
<size>37</size>
</method>
- <method name="Void &lt;UseATemplate&gt;m__0(System.Collections.Generic.List`1[System.Int32] ByRef)" attrs="145">
- <size>17</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -53336,6 +53907,11 @@
<size>0</size>
</method>
</type>
+ <type name="TestComp.Program+MyClass">
+ <method name="Void &lt;UseATemplate&gt;m__0(System.Object, System.Collections.Generic.List`1[System.Int32] ByRef)" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
</test>
<test name="test-anon-154.cs">
<type name="Class">
@@ -53407,7 +53983,7 @@
</method>
</type>
<type name="Program">
- <method name="System.Object &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <method name="System.Object &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">
<size>9</size>
</method>
</type>
@@ -53473,9 +54049,6 @@
<method name="Void IFoo&lt;T&gt;.Test()" attrs="481">
<size>38</size>
</method>
- <method name="Void &lt;Test&gt;m__0()" attrs="145">
- <size>8</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -53496,6 +54069,11 @@
<size>0</size>
</method>
</type>
+ <type name="X`1[T]">
+ <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">
+ <size>8</size>
+ </method>
+ </type>
</test>
<test name="test-anon-158.cs">
<type name="Test">
@@ -53569,7 +54147,7 @@
</method>
</type>
<type name="TestGenericsSubtypeMatching.C">
- <method name="Void &lt;Main&gt;m__0(System.String)" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
<size>7</size>
</method>
</type>
@@ -53646,7 +54224,7 @@
</method>
</type>
<type name="TestGenericsSubtypeMatching.C">
- <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
<size>7</size>
</method>
</type>
@@ -53674,7 +54252,7 @@
</method>
</type>
<type name="TestCase+&lt;Test&gt;c__AnonStorey0`1[T]">
- <method name="Int32 &lt;&gt;m__1(System.Collections.Generic.IList`1[System.Collections.Generic.IList`1[T]])" attrs="145">
+ <method name="Int32 &lt;&gt;m__1(System.Object, System.Collections.Generic.IList`1[System.Collections.Generic.IList`1[T]])" attrs="145">
<size>9</size>
</method>
</type>
@@ -53878,9 +54456,6 @@
<method name="Int32 Main()" attrs="150">
<size>22</size>
</method>
- <method name="T &lt;Foo`1&gt;m__0[T](T)" attrs="145">
- <size>77</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -53893,6 +54468,11 @@
<size>14</size>
</method>
</type>
+ <type name="C">
+ <method name="T &lt;Foo`1&gt;m__0[T](System.Object, T)" attrs="145">
+ <size>77</size>
+ </method>
+ </type>
</test>
<test name="test-anon-166.cs">
<type name="A">
@@ -53902,9 +54482,6 @@
<method name="Int32 Main()" attrs="150">
<size>22</size>
</method>
- <method name="Void &lt;Test`2&gt;m__0[T,U]()" attrs="145">
- <size>39</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -53917,6 +54494,11 @@
<size>14</size>
</method>
</type>
+ <type name="A">
+ <method name="Void &lt;Test`2&gt;m__0[T,U](System.Object)" attrs="145">
+ <size>39</size>
+ </method>
+ </type>
</test>
<test name="test-anon-167.cs">
<type name="Foo">
@@ -53929,12 +54511,12 @@
<method name="Void Main()" attrs="150">
<size>36</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>89</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>89</size>
+ </method>
</type>
</test>
<test name="test-anon-168.cs">
@@ -53942,15 +54524,6 @@
<method name="Void Main()" attrs="150">
<size>113</size>
</method>
- <method name="Int32 &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>51</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>46</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__2(Int32)" attrs="145">
- <size>42</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -53981,6 +54554,17 @@
<size>0</size>
</method>
</type>
+ <type name="Program">
+ <method name="Int32 &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>51</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>46</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
+ <size>42</size>
+ </method>
+ </type>
</test>
<test name="test-anon-169.cs">
<type name="Test">
@@ -54032,9 +54616,6 @@
<method name="Int32 Main()" attrs="150">
<size>74</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>18</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -54050,6 +54631,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>18</size>
+ </method>
+ </type>
</test>
<test name="test-anon-170.cs">
<type name="MyClass">
@@ -54509,9 +55095,6 @@
<method name="Int32 Main()" attrs="150">
<size>44</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -54537,6 +55120,11 @@
<size>0</size>
</method>
</type>
+ <type name="TestGotoLabels.GotoLabelsTest">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="test-anon-27.cs">
<type name="D">
@@ -54623,12 +55211,6 @@
<method name="System.String &lt;Hello&gt;m__0()" attrs="129">
<size>217</size>
</method>
- <method name="Void &lt;Hello&gt;m__1(System.String)" attrs="145">
- <size>8</size>
- </method>
- <method name="Void &lt;Hello&gt;m__2(System.String)" attrs="145">
- <size>8</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>108</size>
</method>
@@ -54665,6 +55247,14 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Void &lt;Hello&gt;m__1(System.Object, System.String)" attrs="145">
+ <size>8</size>
+ </method>
+ <method name="Void &lt;Hello&gt;m__2(System.Object, System.String)" attrs="145">
+ <size>8</size>
+ </method>
+ </type>
</test>
<test name="test-anon-30.cs">
<type name="X">
@@ -54715,9 +55305,6 @@
<method name="Void Main()" attrs="150">
<size>36</size>
</method>
- <method name="System.Object &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">
- <size>26</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -54743,6 +55330,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="System.Object &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>26</size>
+ </method>
+ </type>
</test>
<test name="test-anon-32.cs">
<type name="StringSender">
@@ -54944,9 +55536,6 @@
<method name="Void Main()" attrs="150">
<size>37</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor(TestMethod)" attrs="6278">
<size>8</size>
</method>
@@ -54986,20 +55575,22 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="test-anon-37.cs">
<type name="DelegateInit">
<method name="Void Main(System.String[])" attrs="150">
<size>12</size>
</method>
- <method name="Void &lt;_print&gt;m__0()" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
<method name="Void .cctor()" attrs="6289">
- <size>35</size>
+ <size>18</size>
</method>
</type>
<type name="DelegateInit+FooDelegate">
@@ -55016,6 +55607,11 @@
<size>0</size>
</method>
</type>
+ <type name="DelegateInit">
+ <method name="Void &lt;_print&gt;m__0(System.Object)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="test-anon-38.cs">
<type name="Simple">
@@ -55290,12 +55886,6 @@
<method name="Void Main()" attrs="150">
<size>14</size>
</method>
- <method name="Simple &lt;Test&gt;m__0()" attrs="145">
- <size>45</size>
- </method>
- <method name="Void &lt;Test&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -55316,6 +55906,14 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Simple &lt;Test&gt;m__0(System.Object)" attrs="145">
+ <size>45</size>
+ </method>
+ <method name="Void &lt;Test&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-anon-43.cs">
<type name="Simple">
@@ -55473,14 +56071,11 @@
<method name="Int32 Main()" attrs="150">
<size>14</size>
</method>
- <method name="Void &lt;a&gt;m__0(Int32)" attrs="145">
- <size>8</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
<method name="Void .cctor()" attrs="6289">
- <size>46</size>
+ <size>29</size>
</method>
</type>
<type name="TestFunc">
@@ -55491,6 +56086,11 @@
<size>0</size>
</method>
</type>
+ <type name="TestClass">
+ <method name="Void &lt;a&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>8</size>
+ </method>
+ </type>
</test>
<test name="test-anon-46.cs">
<type name="Foo">
@@ -55743,14 +56343,11 @@
<method name="Void Main()" attrs="150">
<size>12</size>
</method>
- <method name="Void &lt;Print&gt;m__0()" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
<method name="Void .cctor()" attrs="6289">
- <size>35</size>
+ <size>18</size>
</method>
</type>
<type name="FooDelegate">
@@ -55761,6 +56358,11 @@
<size>0</size>
</method>
</type>
+ <type name="X">
+ <method name="Void &lt;Print&gt;m__0(System.Object)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="test-anon-52.cs">
<type name="X">
@@ -55977,9 +56579,6 @@
<method name="Void Main(System.String[])" attrs="150">
<size>51</size>
</method>
- <method name="Void &lt;Main&gt;m__0(Observable)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -55992,6 +56591,11 @@
<size>0</size>
</method>
</type>
+ <type name="Observable">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Observable)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="test-anon-57.cs">
<type name="X">
@@ -56383,7 +56987,7 @@
</method>
</type>
<type name="Source">
- <method name="Void &lt;AddSource&gt;m__0(System.Object, System.EventArgs)" attrs="145">
+ <method name="Void &lt;AddSource&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">
<size>2</size>
</method>
</type>
@@ -56539,12 +57143,6 @@
<method name="Void Main()" attrs="150">
<size>70</size>
</method>
- <method name="Void &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Main&gt;m__1(System.String ByRef)" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -56565,6 +57163,14 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Main&gt;m__1(System.Object, System.String ByRef)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-anon-69.cs">
<type name="TargetAccessDelegate">
@@ -56649,13 +57255,6 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
- </type>
- <type name="C">
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
- </type>
- <type name="C+&lt;Main&gt;c__AnonStorey1">
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>49</size>
</method>
@@ -56673,6 +57272,11 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
</test>
<test name="test-anon-71.cs">
<type name="Program">
@@ -56772,12 +57376,6 @@
<method name="Void Test_1()" attrs="145">
<size>37</size>
</method>
- <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
- <size>16</size>
- </method>
- <method name="Void &lt;Test_1&gt;m__1(System.Object)" attrs="145">
- <size>32</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -56790,15 +57388,20 @@
<size>0</size>
</method>
</type>
+ <type name="T">
+ <method name="Void &lt;Main&gt;m__0(System.Object, System.Object)" attrs="145">
+ <size>16</size>
+ </method>
+ <method name="Void &lt;Test_1&gt;m__1(System.Object, System.Object)" attrs="145">
+ <size>32</size>
+ </method>
+ </type>
</test>
<test name="test-anon-74.cs">
<type name="Foo">
<method name="Void Main(System.String[])" attrs="150">
<size>36</size>
</method>
- <method name="System.String[,] &lt;Main&gt;m__0()" attrs="145">
- <size>42</size>
- </method>
</type>
<type name="Foo+SimpleDelegate">
<method name="System.String[,] Invoke()" attrs="454">
@@ -56821,6 +57424,11 @@
<size>0</size>
</method>
</type>
+ <type name="Foo">
+ <method name="System.String[,] &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>42</size>
+ </method>
+ </type>
</test>
<test name="test-anon-75.cs">
<type name="D">
@@ -56846,9 +57454,6 @@
<method name="Void TestMe()" attrs="129">
<size>152</size>
</method>
- <method name="Boolean &lt;TestMe&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -56877,6 +57482,11 @@
<size>0</size>
</method>
</type>
+ <type name="Test">
+ <method name="Boolean &lt;TestMe&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-anon-76.cs">
<type name="FactoryDelegate">
@@ -56983,9 +57593,6 @@
<method name="Int32 Main()" attrs="150">
<size>63</size>
</method>
- <method name="Void &lt;Main&gt;m__0()" attrs="145">
- <size>19</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -57009,6 +57616,11 @@
<size>0</size>
</method>
</type>
+ <type name="DelegateTest">
+ <method name="Void &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>19</size>
+ </method>
+ </type>
</test>
<test name="test-anon-79.cs">
<type name="Test">
@@ -57078,15 +57690,15 @@
<method name="Void set_Handler(System.EventHandler)" attrs="2182">
<size>9</size>
</method>
- <method name="Void &lt;get_DoNothingEventHandler&gt;m__0(System.Object, System.EventArgs)" attrs="145">
- <size>2</size>
- </method>
<method name="Void &lt;get_DoSomethingEventHandler&gt;m__1(System.Object, System.EventArgs)" attrs="129">
<size>16</size>
</method>
<method name="Void .ctor()" attrs="6278">
<size>18</size>
</method>
+ <method name="Void &lt;get_DoNothingEventHandler&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="test-anon-81.cs">
@@ -57241,20 +57853,6 @@
<size>7</size>
</method>
</type>
- <type name="MainClass">
- <method name="Void &lt;Test2&gt;m__0(System.String)" attrs="145">
- <size>28</size>
- </method>
- <method name="Void &lt;Test3&gt;m__1()" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;Test4&gt;m__2()" attrs="145">
- <size>32</size>
- </method>
- <method name="Void &lt;Test4&gt;m__3()" attrs="145">
- <size>29</size>
- </method>
- </type>
<type name="MainClass+&lt;Main&gt;c__AnonStorey0">
<method name="Void &lt;&gt;m__1(System.String)" attrs="131">
<size>14</size>
@@ -57269,9 +57867,6 @@
<method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">
<size>54</size>
</method>
- <method name="Int32 &lt;&gt;m__1(Int32)" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="MainClass+&lt;Test2&gt;c__AnonStorey1">
<method name="Void &lt;&gt;m__0()" attrs="131">
@@ -57310,6 +57905,25 @@
<size>0</size>
</method>
</type>
+ <type name="MainClass">
+ <method name="Void &lt;Test2&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>28</size>
+ </method>
+ <method name="Void &lt;Test3&gt;m__1(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;Test4&gt;m__2(System.Object)" attrs="145">
+ <size>32</size>
+ </method>
+ <method name="Void &lt;Test4&gt;m__3(System.Object)" attrs="145">
+ <size>29</size>
+ </method>
+ </type>
+ <type name="MainClass+&lt;Test5&gt;c__AnonStorey4">
+ <method name="Int32 &lt;&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-anon-83.cs">
<type name="C">
@@ -57325,12 +57939,12 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Void &lt;MyDelegate&gt;m__0(System.Object, System.EventArgs)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>42</size>
</method>
+ <method name="Void &lt;MyDelegate&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="test-anon-84.cs">
@@ -57346,9 +57960,6 @@
<method name="Int32 Main()" attrs="150">
<size>27</size>
</method>
- <method name="C &lt;field&gt;m__0(Int32)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>43</size>
</method>
@@ -57364,6 +57975,11 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="C &lt;field&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
</test>
<test name="test-anon-85.cs">
<type name="X">
@@ -57535,11 +58151,6 @@
<size>9</size>
</method>
</type>
- <type name="C+&lt;Test&gt;c__AnonStorey2">
- <method name="Void &lt;&gt;m__2()" attrs="145">
- <size>4</size>
- </method>
- </type>
<type name="C+&lt;Test&gt;c__AnonStorey2+&lt;Test&gt;c__AnonStorey1">
<method name="Void &lt;&gt;m__0()" attrs="131">
<size>21</size>
@@ -57553,6 +58164,11 @@
<size>0</size>
</method>
</type>
+ <type name="C+&lt;Test&gt;c__AnonStorey2">
+ <method name="Void &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>4</size>
+ </method>
+ </type>
</test>
<test name="test-anon-89.cs">
<type name="C">
@@ -57792,17 +58408,15 @@
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">
+ <size>24</size>
+ </method>
</type>
<type name="BaseTest.MainClass">
- <method name="Void &lt;Main&gt;m__0(System.Object, System.EventArgs)" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object, System.Object, System.EventArgs)" attrs="145">
<size>13</size>
</method>
</type>
- <type name="BaseTest.MainClass+&lt;&gt;c__AnonStorey1">
- <method name="Void &lt;&gt;m__0(System.Object, System.EventArgs)" attrs="131">
- <size>24</size>
- </method>
- </type>
</test>
<test name="test-anon-94.cs">
<type name="Program">
@@ -58080,9 +58694,6 @@
<method name="Int32 Main()" attrs="150">
<size>20</size>
</method>
- <method name="Void &lt;Test&gt;m__0()" attrs="145">
- <size>63</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -58112,6 +58723,11 @@
<size>25</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">
+ <size>63</size>
+ </method>
+ </type>
</test>
<test name="test-async-01.cs">
<type name="Program">
@@ -58124,9 +58740,6 @@
<method name="System.Threading.Tasks.Task RunAsync()" attrs="145">
<size>48</size>
</method>
- <method name="Void &lt;RunAsync&gt;m__0()" attrs="145">
- <size>62</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -58142,6 +58755,11 @@
<size>13</size>
</method>
</type>
+ <type name="Program">
+ <method name="Void &lt;RunAsync&gt;m__0(System.Object)" attrs="145">
+ <size>62</size>
+ </method>
+ </type>
</test>
<test name="test-async-02.cs">
<type name="C">
@@ -58314,7 +58932,7 @@
</type>
<type name="C+&lt;SynchronousCall&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>49</size>
+ <size>79</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -58381,7 +58999,7 @@
</type>
<type name="Program+&lt;Main&gt;c__async7">
<method name="Void MoveNext()" attrs="486">
- <size>44</size>
+ <size>69</size>
</method>
</type>
<type name="Program+&lt;Main&gt;c__AnonStorey1">
@@ -58394,11 +59012,6 @@
<size>52</size>
</method>
</type>
- <type name="Program">
- <method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;Main&gt;m__0(System.Decimal)" attrs="145">
- <size>41</size>
- </method>
- </type>
<type name="Program+&lt;Main&gt;c__AnonStorey1">
<method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;&gt;m__3(System.Decimal)" attrs="131">
<size>49</size>
@@ -58434,6 +59047,11 @@
<size>13</size>
</method>
</type>
+ <type name="Program">
+ <method name="System.Threading.Tasks.Task`1[System.Decimal] &lt;Main&gt;m__0(System.Object, System.Decimal)" attrs="145">
+ <size>41</size>
+ </method>
+ </type>
</test>
<test name="test-async-07.cs">
<type name="Program">
@@ -58480,12 +59098,7 @@
</type>
<type name="Program+&lt;Main&gt;c__async4">
<method name="Void MoveNext()" attrs="486">
- <size>43</size>
- </method>
- </type>
- <type name="Program">
- <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(Int16)" attrs="145">
- <size>41</size>
+ <size>68</size>
</method>
</type>
<type name="Program+&lt;Main&gt;c__AnonStorey1">
@@ -58521,6 +59134,11 @@
<size>13</size>
</method>
</type>
+ <type name="Program">
+ <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(System.Object, Int16)" attrs="145">
+ <size>41</size>
+ </method>
+ </type>
</test>
<test name="test-async-08.cs">
<type name="AsyncTypeInference">
@@ -58536,21 +59154,6 @@
<method name="Void Test2[T](System.Func`2[System.Int32,T])" attrs="145">
<size>10</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(Int32)" attrs="145">
- <size>33</size>
- </method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__1(Int32)" attrs="145">
- <size>33</size>
- </method>
- <method name="System.Threading.Tasks.Task &lt;Main&gt;m__2(Int32)" attrs="145">
- <size>33</size>
- </method>
- <method name="System.Threading.Tasks.Task &lt;Main&gt;m__3(Int32)" attrs="145">
- <size>33</size>
- </method>
- <method name="Int32 &lt;TT&gt;m__4()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -58572,17 +59175,7 @@
</type>
<type name="AsyncTypeInference+&lt;Main&gt;c__asyncB">
<method name="Void MoveNext()" attrs="486">
- <size>37</size>
- </method>
- </type>
- <type name="AsyncTypeInference+&lt;Main&gt;c__async2">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- </type>
- <type name="AsyncTypeInference+&lt;Main&gt;c__async5">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <size>67</size>
</method>
</type>
<type name="AsyncTypeInference+&lt;Main&gt;c__async2">
@@ -58605,6 +59198,33 @@
<size>13</size>
</method>
</type>
+ <type name="AsyncTypeInference">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="System.Threading.Tasks.Task &lt;Main&gt;m__2(System.Object, Int32)" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="System.Threading.Tasks.Task &lt;Main&gt;m__3(System.Object, Int32)" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="Int32 &lt;TT&gt;m__4(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="AsyncTypeInference+&lt;Main&gt;c__async2">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="AsyncTypeInference+&lt;Main&gt;c__async5">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-09.cs">
<type name="Test">
@@ -58617,16 +59237,16 @@
<method name="Int32 Main()" attrs="150">
<size>57</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(System.String)" attrs="145">
- <size>33</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="System.Threading.Tasks.Task`1[System.Int16] &lt;Main&gt;m__0(System.Object, System.String)" attrs="145">
+ <size>33</size>
+ </method>
</type>
- <type name="Test+&lt;Main&gt;c__async2">
+ <type name="Test+&lt;Main&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
- <size>38</size>
+ <size>63</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -58670,9 +59290,6 @@
<method name="Void MoveNext()" attrs="486">
<size>338</size>
</method>
- <method name="System.String &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="C+&lt;TestCompositionCall_2&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
@@ -58713,82 +59330,85 @@
</method>
</type>
<type name="C+&lt;TestCompositionCall_1&gt;c__async0">
- <method name="System.String &lt;&gt;m__0()" attrs="145">
- <size>21</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionCall_2&gt;c__async1">
- <method name="System.String &lt;&gt;m__0()" attrs="145">
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionCall_3&gt;c__async2">
- <method name="Byte &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_1&gt;c__async3">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_2&gt;c__async4">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_3&gt;c__async5">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_4&gt;c__async6">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionCall_1&gt;c__async0">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>21</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">
<size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionCall_2&gt;c__async1">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">
<size>13</size>
</method>
</type>
<type name="C+&lt;TestCompositionCall_3&gt;c__async2">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Byte &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_1&gt;c__async3">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_2&gt;c__async4">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_3&gt;c__async5">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="C+&lt;TestCompositionPair_4&gt;c__async6">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
</test>
@@ -58849,41 +59469,26 @@
<method name="Void MoveNext()" attrs="486">
<size>266</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestStack_1&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
<size>327</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestStack_2&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
<size>302</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestStack_3&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
<size>467</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestStack_4&gt;c__async3">
<method name="Void MoveNext()" attrs="486">
<size>323</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;TestStack_5&gt;c__async4">
<method name="Void MoveNext()" attrs="486">
@@ -58928,6 +59533,31 @@
<size>13</size>
</method>
</type>
+ <type name="G`1+&lt;TestStack_1&gt;c__async0[T]">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestStack_1&gt;c__async0">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestStack_2&gt;c__async1">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestStack_3&gt;c__async2">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;TestStack_4&gt;c__async3">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-12.cs">
<type name="C">
@@ -58948,18 +59578,18 @@
<method name="Void MoveNext()" attrs="486">
<size>455</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
<size>17</size>
</method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
<size>10</size>
</method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
<size>9</size>
</method>
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
- </method>
</type>
</test>
<test name="test-async-13.cs">
@@ -59235,25 +59865,13 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">
- <size>45</size>
- </method>
- <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
</type>
<type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>337</size>
+ <size>338</size>
</method>
</type>
<type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">
@@ -59306,95 +59924,6 @@
<method name="Tester &lt;CastTest_2&gt;m__4()" attrs="129">
<size>9</size>
</method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">
- <method name="Boolean &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>9</size>
- </method>
- <method name="Double &lt;&gt;m__3()" attrs="145">
- <size>17</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_3&gt;c__async2">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__3()" attrs="145">
- <size>9</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="System.String &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">
- <method name="Int64 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Byte &lt;&gt;m__1()" attrs="145">
- <size>10</size>
- </method>
- </type>
- <type name="Tester+&lt;ArrayAccessTest_9&gt;c__async8">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__3()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__4()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__5()" attrs="145">
- <size>9</size>
- </method>
- <method name="S &lt;&gt;m__6()" attrs="145">
- <size>25</size>
- </method>
- </type>
- <type name="Tester">
<method name="System.Threading.Tasks.Task`1[System.Boolean] NewArrayInitTest_7()" attrs="129">
<size>33</size>
</method>
@@ -59418,12 +59947,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Decimal &lt;&gt;m__2()" attrs="145">
- <size>19</size>
- </method>
- <method name="System.Decimal &lt;&gt;m__4()" attrs="145">
- <size>19</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
@@ -59468,14 +59991,11 @@
</type>
<type name="Tester+&lt;ArrayAccessTest_10&gt;c__async9">
<method name="Void MoveNext()" attrs="486">
- <size>234</size>
+ <size>235</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester">
<method name="System.Threading.Tasks.Task`1[System.Boolean] ArrayAccessTest_11()" attrs="129">
@@ -59489,12 +60009,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;AssignTest_1&gt;c__asyncB">
<method name="Void MoveNext()" attrs="486">
@@ -59503,9 +60017,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;AssignTest_2&gt;c__asyncC">
<method name="Void MoveNext()" attrs="486">
@@ -59514,9 +60025,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Nullable`1[System.SByte] &lt;&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
</type>
<type name="Tester+&lt;AssignTest_3&gt;c__asyncD">
<method name="Void MoveNext()" attrs="486">
@@ -59525,12 +60033,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;BinaryTest_1&gt;c__asyncE">
<method name="Void MoveNext()" attrs="486">
@@ -59539,15 +60041,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;BinaryTest_2&gt;c__asyncF">
<method name="Void MoveNext()" attrs="486">
@@ -59564,24 +60057,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__0()" attrs="145">
- <size>14</size>
- </method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__1()" attrs="145">
- <size>17</size>
- </method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2()" attrs="145">
- <size>17</size>
- </method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__3()" attrs="145">
- <size>14</size>
- </method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__4()" attrs="145">
- <size>17</size>
- </method>
- <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__5()" attrs="145">
- <size>14</size>
- </method>
</type>
<type name="Tester+&lt;BinaryTest_4&gt;c__async11">
<method name="Void MoveNext()" attrs="486">
@@ -59590,18 +60065,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="145">
- <size>14</size>
- </method>
- <method name="System.Nullable`1[System.Byte] &lt;&gt;m__1()" attrs="145">
- <size>17</size>
- </method>
- <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__2()" attrs="145">
- <size>20</size>
- </method>
- <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__3()" attrs="145">
- <size>17</size>
- </method>
</type>
<type name="Tester+&lt;BinaryTest_5&gt;c__async12">
<method name="Void MoveNext()" attrs="486">
@@ -59626,15 +60089,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;CallTest_2&gt;c__async15">
<method name="Void MoveNext()" attrs="486">
@@ -59643,9 +60097,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
</type>
<type name="Tester+&lt;CallTest_3&gt;c__async16">
<method name="Void MoveNext()" attrs="486">
@@ -59654,9 +60105,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;CallTest_4&gt;c__async17">
<method name="Void MoveNext()" attrs="486">
@@ -59665,9 +60113,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="E &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;CallTest_5&gt;c__async18">
<method name="Void MoveNext()" attrs="486">
@@ -59684,9 +60129,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Decimal &lt;&gt;m__0()" attrs="145">
- <size>15</size>
- </method>
</type>
<type name="Tester+&lt;CastTest_2&gt;c__async1A">
<method name="Void MoveNext()" attrs="486">
@@ -59703,12 +60145,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.String &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="System.String &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;CoalescingTest_2&gt;c__async1C">
<method name="Void MoveNext()" attrs="486">
@@ -59717,12 +60153,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0()" attrs="145">
- <size>17</size>
- </method>
- <method name="Byte &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ConditionalTest_1&gt;c__async1D">
<method name="Void MoveNext()" attrs="486">
@@ -59731,9 +60161,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ConditionalTest_2&gt;c__async1E">
<method name="Void MoveNext()" attrs="486">
@@ -59742,12 +60169,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ConditionalTest_3&gt;c__async1F">
<method name="Void MoveNext()" attrs="486">
@@ -59756,12 +60177,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Boolean &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ConditionalTest_4&gt;c__async20">
<method name="Void MoveNext()" attrs="486">
@@ -59770,9 +60185,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;DelegateInvoke_4&gt;c__async21">
<method name="Void MoveNext()" attrs="486">
@@ -59781,12 +60193,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0(Int32)" attrs="145">
- <size>11</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;EventInvoke_1&gt;c__async22">
<method name="Void MoveNext()" attrs="486">
@@ -59803,12 +60209,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;IndexerTest_1&gt;c__async24">
<method name="Void MoveNext()" attrs="486">
@@ -59817,9 +60217,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;IndexerTest_2&gt;c__async25">
<method name="Void MoveNext()" attrs="486">
@@ -59828,12 +60225,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;IndexerTest_3&gt;c__async26">
<method name="Void MoveNext()" attrs="486">
@@ -59842,9 +60233,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;IndexerTest_4&gt;c__async27">
<method name="Void MoveNext()" attrs="486">
@@ -59853,9 +60241,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;IndexerTest_5&gt;c__async28">
<method name="Void MoveNext()" attrs="486">
@@ -59864,9 +60249,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;IndexerTest_6&gt;c__async29">
<method name="Void MoveNext()" attrs="486">
@@ -59875,15 +60257,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;IndexerTest_7&gt;c__async2A">
<method name="Void MoveNext()" attrs="486">
@@ -59900,9 +60273,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Tester &lt;&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;IsTest_2&gt;c__async2C">
<method name="Void MoveNext()" attrs="486">
@@ -59911,9 +60281,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__0()" attrs="145">
- <size>14</size>
- </method>
</type>
<type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2D">
<method name="Void MoveNext()" attrs="486">
@@ -59922,12 +60289,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
- <method name="Base &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2E">
<method name="Void MoveNext()" attrs="486">
@@ -59936,9 +60297,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2F">
<method name="Void MoveNext()" attrs="486">
@@ -59947,12 +60305,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
- <method name="Base &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;NewTest_1&gt;c__async30">
<method name="Void MoveNext()" attrs="486">
@@ -59961,9 +60313,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;NewTest_2&gt;c__async31">
<method name="Void MoveNext()" attrs="486">
@@ -59972,12 +60321,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
- <method name="System.String &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
</type>
<type name="Tester+&lt;NewDelegate_1&gt;c__async32">
<method name="Void MoveNext()" attrs="486">
@@ -59994,12 +60337,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;NewInitTest_1&gt;c__async34">
<method name="Void MoveNext()" attrs="486">
@@ -60008,24 +60345,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__3()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__4()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__5()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;NewInitTest_2&gt;c__async35">
<method name="Void MoveNext()" attrs="486">
@@ -60034,18 +60353,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.String &lt;&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
- <method name="System.String &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__3()" attrs="145">
- <size>10</size>
- </method>
</type>
<type name="Tester+&lt;NewArrayInitTest_1&gt;c__async36">
<method name="Void MoveNext()" attrs="486">
@@ -60054,9 +60361,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;NewArrayInitTest_2&gt;c__async37">
<method name="Void MoveNext()" attrs="486">
@@ -60065,12 +60369,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;NewArrayInitTest_3&gt;c__async38">
<method name="Void MoveNext()" attrs="486">
@@ -60079,9 +60377,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Byte &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;NewArrayInitTest_4&gt;c__async39">
<method name="Void MoveNext()" attrs="486">
@@ -60090,12 +60385,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="UInt16 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="UInt16 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;NewArrayInitTest_5&gt;c__async3A">
<method name="Void MoveNext()" attrs="486">
@@ -60104,9 +60393,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="S &lt;&gt;m__0()" attrs="145">
- <size>25</size>
- </method>
</type>
<type name="Tester+&lt;NewArrayInitTest_6&gt;c__async3B">
<method name="Void MoveNext()" attrs="486">
@@ -60115,9 +60401,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;NewArrayInitTest_7&gt;c__async3C">
<method name="Void MoveNext()" attrs="486">
@@ -60134,9 +60417,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;PropertyTest_2&gt;c__async3E">
<method name="Void MoveNext()" attrs="486">
@@ -60145,9 +60425,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;PropertyTest_3&gt;c__async3F">
<method name="Void MoveNext()" attrs="486">
@@ -60156,15 +60433,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__2()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;StringConcatTest_1&gt;c__async40">
<method name="Void MoveNext()" attrs="486">
@@ -60173,15 +60441,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="System.String &lt;&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
- <method name="System.String &lt;&gt;m__1()" attrs="145">
- <size>13</size>
- </method>
- <method name="System.String &lt;&gt;m__2()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;UnaryTest_1&gt;c__async41">
<method name="Void MoveNext()" attrs="486">
@@ -60190,9 +60449,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;UnaryTest_2&gt;c__async42">
<method name="Void MoveNext()" attrs="486">
@@ -60209,9 +60465,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;VariableInitializer_1&gt;c__async44">
<method name="Void MoveNext()" attrs="486">
@@ -60220,12 +60473,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
- <method name="Int32 &lt;&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4+&lt;ArrayAccessTest_5&gt;c__AnonStorey45">
<method name="Int32 &lt;&gt;m__0()" attrs="131">
@@ -60308,6 +60555,489 @@
<size>7</size>
</method>
</type>
+ <type name="Tester">
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>45</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_1&gt;c__async0">
+ <method name="Boolean &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_2&gt;c__async1">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Double &lt;&gt;m__3(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_3&gt;c__async2">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="System.Decimal &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>19</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="System.Decimal &lt;&gt;m__4(System.Object)" attrs="145">
+ <size>19</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_4&gt;c__async3">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_5&gt;c__async4">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_6&gt;c__async5">
+ <method name="Int64 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_7&gt;c__async6">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_8&gt;c__async7">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Byte &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_9&gt;c__async8">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__4(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__5(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="S &lt;&gt;m__6(System.Object)" attrs="145">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_10&gt;c__async9">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ArrayAccessTest_11&gt;c__asyncA">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;AssignTest_1&gt;c__asyncB">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;AssignTest_2&gt;c__asyncC">
+ <method name="System.Nullable`1[System.SByte] &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;AssignTest_3&gt;c__asyncD">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;BinaryTest_1&gt;c__asyncE">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;BinaryTest_3&gt;c__async10">
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__3(System.Object)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__4(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="System.Nullable`1[System.Boolean] &lt;&gt;m__5(System.Object)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;BinaryTest_4&gt;c__async11">
+ <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>14</size>
+ </method>
+ <method name="System.Nullable`1[System.Byte] &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.Nullable`1[System.Decimal] &lt;&gt;m__3(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CallTest_1&gt;c__async14">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CallTest_2&gt;c__async15">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CallTest_3&gt;c__async16">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CallTest_4&gt;c__async17">
+ <method name="E &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CastTest_1&gt;c__async19">
+ <method name="System.Decimal &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CoalescingTest_1&gt;c__async1B">
+ <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;CoalescingTest_2&gt;c__async1C">
+ <method name="System.Nullable`1[System.Int16] &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>17</size>
+ </method>
+ <method name="Byte &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_1&gt;c__async1D">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_2&gt;c__async1E">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_3&gt;c__async1F">
+ <method name="Boolean &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;ConditionalTest_4&gt;c__async20">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;DelegateInvoke_4&gt;c__async21">
+ <method name="Int32 &lt;&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>11</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;FieldTest_1&gt;c__async23">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_1&gt;c__async24">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_2&gt;c__async25">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_3&gt;c__async26">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_4&gt;c__async27">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_5&gt;c__async28">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IndexerTest_6&gt;c__async29">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IsTest_1&gt;c__async2B">
+ <method name="Tester &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;IsTest_2&gt;c__async2C">
+ <method name="System.Nullable`1[System.UInt32] &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;LogicalUserOperator_1&gt;c__async2D">
+ <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Base &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;LogicalUserOperator_2&gt;c__async2E">
+ <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;LogicalUserOperator_3&gt;c__async2F">
+ <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Base &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewTest_1&gt;c__async30">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewTest_2&gt;c__async31">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewDelegate_1_0&gt;c__async33">
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewInitTest_1&gt;c__async34">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__4(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__5(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewInitTest_2&gt;c__async35">
+ <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__3(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_1&gt;c__async36">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_2&gt;c__async37">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_3&gt;c__async38">
+ <method name="Byte &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_4&gt;c__async39">
+ <method name="UInt16 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="UInt16 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_5&gt;c__async3A">
+ <method name="S &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>25</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewArrayInitTest_6&gt;c__async3B">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;PropertyTest_1&gt;c__async3D">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;PropertyTest_2&gt;c__async3E">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;PropertyTest_3&gt;c__async3F">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;StringConcatTest_1&gt;c__async40">
+ <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="System.String &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;UnaryTest_1&gt;c__async41">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;UnaryTest_3&gt;c__async43">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;VariableInitializer_1&gt;c__async44">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-14.cs">
<type name="C">
@@ -60317,9 +61047,6 @@
<method name="Int32 Main()" attrs="150">
<size>214</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0()" attrs="145">
- <size>33</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -60335,23 +61062,28 @@
</method>
</type>
<type name="C+&lt;TestResult&gt;c__async0">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__async1">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>33</size>
</method>
</type>
<type name="C+&lt;TestResult&gt;c__async0">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="C+&lt;Main&gt;c__async1">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
</test>
@@ -60383,10 +61115,7 @@
</type>
<type name="Tester+&lt;NewInitTestGen&gt;c__async0`1[T]">
<method name="Void MoveNext()" attrs="486">
- <size>295</size>
- </method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
+ <size>305</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -60412,7 +61141,14 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ </type>
+ <type name="Tester+&lt;NewInitTestGen&gt;c__async0`1[T]">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="Tester+&lt;NewInitCol&gt;c__async1">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
<size>9</size>
</method>
</type>
@@ -60442,18 +61178,6 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -60474,42 +61198,56 @@
</method>
</type>
<type name="Tester+&lt;SwitchTest_1&gt;c__async0">
- <method name="System.String &lt;&gt;m__0()" attrs="145">
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
</type>
<type name="Tester+&lt;Using_1&gt;c__async1">
- <method name="Base &lt;&gt;m__0()" attrs="145">
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Tester &lt;&gt;m__1()" attrs="145">
+ </type>
+ <type name="Tester+&lt;Foreach_1&gt;c__async2">
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Base &lt;&gt;m__2()" attrs="145">
- <size>13</size>
+ </type>
+ <type name="Tester">
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
</method>
- <method name="Base &lt;&gt;m__3()" attrs="145">
- <size>13</size>
+ <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
</method>
- </type>
- <type name="Tester+&lt;Foreach_1&gt;c__async2">
- <method name="System.Collections.Generic.List`1[System.Int32] &lt;&gt;m__0()" attrs="145">
- <size>36</size>
+ <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">
+ <size>12</size>
</method>
</type>
<type name="Tester+&lt;SwitchTest_1&gt;c__async0">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <method name="System.String &lt;&gt;m__0(System.Object)" attrs="145">
<size>13</size>
</method>
</type>
<type name="Tester+&lt;Using_1&gt;c__async1">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <method name="Base &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Tester &lt;&gt;m__1(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Base &lt;&gt;m__2(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Base &lt;&gt;m__3(System.Object)" attrs="145">
<size>13</size>
</method>
</type>
<type name="Tester+&lt;Foreach_1&gt;c__async2">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="System.Collections.Generic.List`1[System.Int32] &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>36</size>
</method>
</type>
</test>
@@ -60539,18 +61277,6 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -60601,83 +61327,97 @@
</method>
</type>
<type name="Tester+&lt;TestException_1&gt;c__async0">
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>7</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;TestException_2&gt;c__async1">
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>7</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;TestException_3&gt;c__async2">
- <method name="System.Threading.Tasks.Task &lt;&gt;m__0()" attrs="145">
- <size>33</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;TestException_4&gt;c__async3">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;TestException_5&gt;c__async4">
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>7</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;TestException_6&gt;c__async5">
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>7</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;TestException_7&gt;c__async6">
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>7</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;TestException_3&gt;c__async2+&lt;TestException_3&gt;c__async7">
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>7</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="Tester">
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">
+ <size>12</size>
</method>
</type>
<type name="Tester+&lt;TestException_1&gt;c__async0">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
</method>
</type>
<type name="Tester+&lt;TestException_2&gt;c__async1">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
</method>
</type>
<type name="Tester+&lt;TestException_3&gt;c__async2">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="System.Threading.Tasks.Task &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>33</size>
</method>
</type>
<type name="Tester+&lt;TestException_4&gt;c__async3">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="Tester+&lt;TestException_5&gt;c__async4">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
</method>
</type>
<type name="Tester+&lt;TestException_6&gt;c__async5">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
</method>
</type>
<type name="Tester+&lt;TestException_7&gt;c__async6">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
</method>
</type>
<type name="Tester+&lt;TestException_3&gt;c__async2+&lt;TestException_3&gt;c__async7">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
</method>
</type>
</test>
@@ -60825,18 +61565,6 @@
<method name="Int32 Main()" attrs="150">
<size>187</size>
</method>
- <method name="Boolean &lt;Main&gt;m__0(System.Reflection.MethodInfo)" attrs="145">
- <size>20</size>
- </method>
- <method name="System.String &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__2(System.Reflection.MethodInfo)" attrs="145">
- <size>15</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(Boolean)" attrs="145">
- <size>12</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -60862,42 +61590,56 @@
</method>
</type>
<type name="Tester+&lt;Add_1&gt;c__async0">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;AssignCompound_1&gt;c__async1">
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Tester+&lt;Convert_1&gt;c__async2">
- <method name="System.Object &lt;&gt;m__0()" attrs="145">
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
</type>
<type name="Tester+&lt;Invocation_1&gt;c__async3">
- <method name="System.Object &lt;&gt;m__0()" attrs="145">
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
</type>
+ <type name="Tester">
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>20</size>
+ </method>
+ <method name="System.String &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>15</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, Boolean)" attrs="145">
+ <size>12</size>
+ </method>
+ </type>
<type name="Tester+&lt;Add_1&gt;c__async0">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="Tester+&lt;AssignCompound_1&gt;c__async1">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="Tester+&lt;Convert_1&gt;c__async2">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <method name="System.Object &lt;&gt;m__0(System.Object)" attrs="145">
<size>13</size>
</method>
</type>
<type name="Tester+&lt;Invocation_1&gt;c__async3">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <method name="System.Object &lt;&gt;m__0(System.Object)" attrs="145">
<size>13</size>
</method>
</type>
@@ -60987,7 +61729,7 @@
</type>
<type name="A+&lt;async&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
- <size>38</size>
+ <size>63</size>
</method>
</type>
<type name="A">
@@ -61023,15 +61765,6 @@
<method name="Void M1()" attrs="145">
<size>92</size>
</method>
- <method name="Void &lt;M1&gt;m__0(Int32)" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;M1&gt;m__1(Int32)" attrs="145">
- <size>2</size>
- </method>
- <method name="Void &lt;M1&gt;m__2(Int32)" attrs="145">
- <size>2</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -61108,7 +61841,7 @@
</type>
<type name="A+&lt;async&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
- <size>37</size>
+ <size>62</size>
</method>
</type>
<type name="A+&lt;CastTest&gt;c__async3">
@@ -61118,7 +61851,7 @@
</type>
<type name="A+async&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>31</size>
+ <size>61</size>
</method>
</type>
<type name="D">
@@ -61131,7 +61864,7 @@
</type>
<type name="D+&lt;M&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>31</size>
+ <size>61</size>
</method>
</type>
<type name="asyncAttribute+async">
@@ -61194,6 +61927,17 @@
<size>7</size>
</method>
</type>
+ <type name="AwaitNS.Formals">
+ <method name="Void &lt;M1&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;M1&gt;m__1(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void &lt;M1&gt;m__2(System.Object, Int32)" attrs="145">
+ <size>2</size>
+ </method>
+ </type>
</test>
<test name="test-async-23.cs">
<type name="MyContext">
@@ -61225,9 +61969,6 @@
<method name="Void MoveNext()" attrs="486">
<size>197</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>21</size>
- </method>
</type>
<type name="MyContext">
<method name="Void .ctor(ManualResetEvent)" attrs="6278">
@@ -61238,6 +61979,9 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>21</size>
+ </method>
</type>
</test>
<test name="test-async-24.cs">
@@ -61261,12 +62005,12 @@
<method name="Void MoveNext()" attrs="486">
<size>275</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="test-async-25.cs">
@@ -61277,9 +62021,6 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Int32 &lt;CompilationTestOnly&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -61292,6 +62033,11 @@
<size>15</size>
</method>
</type>
+ <type name="Program">
+ <method name="Int32 &lt;CompilationTestOnly&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-26.cs">
<type name="ConsoleApplication1.Program">
@@ -61304,12 +62050,6 @@
<method name="Int32 Main()" attrs="150">
<size>95</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0()" attrs="145">
- <size>47</size>
- </method>
- <method name="Int32 &lt;Main&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -61322,6 +62062,14 @@
<size>13</size>
</method>
</type>
+ <type name="ConsoleApplication1.Program">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>47</size>
+ </method>
+ <method name="Int32 &lt;Main&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-27.cs">
<type name="MainClass">
@@ -61339,12 +62087,12 @@
<method name="Void MoveNext()" attrs="486">
<size>196</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="test-async-28.cs">
@@ -61363,12 +62111,12 @@
<method name="Void MoveNext()" attrs="486">
<size>282</size>
</method>
- <method name="Int32 &lt;&gt;m__0(Int32)" attrs="145">
- <size>10</size>
- </method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
+ <method name="Int32 &lt;&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
</type>
</test>
<test name="test-async-29.cs">
@@ -61723,7 +62471,7 @@
</type>
<type name="C+&lt;Test2&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
- <size>59</size>
+ <size>89</size>
</method>
</type>
<type name="C+&lt;Test&gt;c__async0">
@@ -61745,12 +62493,6 @@
<method name="Int32 Main()" attrs="150">
<size>409</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0()" attrs="145">
- <size>33</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__1(System.Reflection.MethodInfo)" attrs="145">
- <size>24</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -61767,12 +62509,6 @@
<method name="System.Threading.Tasks.Task NestedAsyncAnonymousMethod()" attrs="150">
<size>33</size>
</method>
- <method name="Boolean &lt;Main&gt;m__2(System.Type)" attrs="145">
- <size>24</size>
- </method>
- <method name="Boolean &lt;Main&gt;m__3(System.Reflection.MethodInfo)" attrs="145">
- <size>24</size>
- </method>
</type>
<type name="N.M.C+&lt;NestedAsyncAnonymousMethod&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
@@ -61781,9 +62517,6 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>27</size>
- </method>
</type>
<type name="N.M.C+&lt;NestedAsyncAnonymousMethod&gt;c__async1+&lt;NestedAsyncAnonymousMethod&gt;c__async2">
<method name="Void MoveNext()" attrs="486">
@@ -61801,6 +62534,25 @@
<size>13</size>
</method>
</type>
+ <type name="N.M.C">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__1(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>24</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__2(System.Object, System.Type)" attrs="145">
+ <size>24</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__3(System.Object, System.Reflection.MethodInfo)" attrs="145">
+ <size>24</size>
+ </method>
+ </type>
+ <type name="N.M.C+&lt;NestedAsyncAnonymousMethod&gt;c__async1">
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>27</size>
+ </method>
+ </type>
</test>
<test name="test-async-36.cs">
<type name="X">
@@ -61842,12 +62594,12 @@
<method name="Void MoveNext()" attrs="486">
<size>272</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>7</size>
- </method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
+ </method>
</type>
</test>
<test name="test-async-38.cs">
@@ -61893,12 +62645,12 @@
<method name="Void MoveNext()" attrs="486">
<size>220</size>
</method>
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
</type>
</test>
<test name="test-async-40.cs">
@@ -61925,18 +62677,18 @@
<method name="Void MoveNext()" attrs="486">
<size>196</size>
</method>
- <method name="Void &lt;&gt;m__0()" attrs="145">
- <size>2</size>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
</method>
</type>
<type name="Program">
- <method name="Void &lt;Main&gt;m__0(C)" attrs="145">
+ <method name="Void &lt;Main&gt;m__0(System.Object, C)" attrs="145">
<size>35</size>
</method>
</type>
<type name="Program+&lt;Main&gt;c__async1">
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
+ <method name="Void &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
</method>
</type>
</test>
@@ -61957,9 +62709,6 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Int32 &lt;ReturnOne&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -61968,21 +62717,24 @@
<method name="Void MoveNext()" attrs="486">
<size>191</size>
</method>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
</type>
- <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0+&lt;NestedVoidTestSuccess&gt;c__async4">
- <method name="Void MoveNext()" attrs="486">
- <size>162</size>
+ <type name="AmbiguousGeneric">
+ <method name="Int32 &lt;ReturnOne&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
</method>
</type>
<type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0">
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__0()" attrs="145">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;&gt;m__0(System.Object)" attrs="145">
<size>33</size>
</method>
- <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
- <size>13</size>
- </method>
</type>
- <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0+&lt;NestedVoidTestSuccess&gt;c__async4">
+ <type name="AmbiguousGeneric+&lt;NestedVoidTestSuccess&gt;c__async0+&lt;NestedVoidTestSuccess&gt;c__async5">
+ <method name="Void MoveNext()" attrs="486">
+ <size>162</size>
+ </method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
@@ -62235,7 +62987,7 @@
</type>
<type name="C+&lt;Test&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>60</size>
+ <size>90</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -62269,7 +63021,7 @@
</type>
<type name="App+&lt;Test&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
- <size>51</size>
+ <size>76</size>
</method>
</type>
<type name="App+&lt;Test&gt;c__async0">
@@ -62393,7 +63145,7 @@
</type>
<type name="Program+&lt;LoadPlayers&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>87</size>
+ <size>117</size>
</method>
</type>
<type name="Program">
@@ -62416,7 +63168,7 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Void &lt;&gt;m__0(Player)" attrs="145">
+ <method name="Void &lt;&gt;m__0(System.Object, Player)" attrs="145">
<size>2</size>
</method>
</type>
@@ -62440,9 +63192,6 @@
<method name="System.Threading.Tasks.Task Throw()" attrs="145">
<size>33</size>
</method>
- <method name="System.Threading.Tasks.Task &lt;Main&gt;m__0()" attrs="145">
- <size>33</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -62475,6 +63224,11 @@
<size>13</size>
</method>
</type>
+ <type name="X">
+ <method name="System.Threading.Tasks.Task &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>33</size>
+ </method>
+ </type>
</test>
<test name="test-async-53.cs">
<type name="Y">
@@ -62509,7 +63263,7 @@
</type>
<type name="X+&lt;Foo&gt;c__AnonStorey1+&lt;Foo&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>43</size>
+ <size>73</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -62648,7 +63402,7 @@
</type>
<type name="B+&lt;GetAsync&gt;c__async0">
<method name="Void MoveNext()" attrs="486">
- <size>49</size>
+ <size>74</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -62732,7 +63486,7 @@
</type>
<type name="X+&lt;AddItemAt&gt;c__async1">
<method name="Void MoveNext()" attrs="486">
- <size>43</size>
+ <size>68</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -62767,7 +63521,7 @@
</type>
<type name="X+&lt;Foo&gt;c__async6">
<method name="Void MoveNext()" attrs="486">
- <size>100</size>
+ <size>130</size>
</method>
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
@@ -62836,9 +63590,6 @@
<method name="Int32 Main()" attrs="150">
<size>152</size>
</method>
- <method name="Boolean &lt;Call&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -62859,6 +63610,11 @@
<size>13</size>
</method>
</type>
+ <type name="C">
+ <method name="Boolean &lt;Call&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-async-64.cs">
<type name="X">
@@ -62868,9 +63624,6 @@
<method name="T Invoke[T](System.Func`1[System.Threading.Tasks.Task`1[T]])" attrs="145">
<size>18</size>
</method>
- <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0()" attrs="145">
- <size>33</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -62883,6 +63636,11 @@
<size>13</size>
</method>
</type>
+ <type name="X">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] &lt;Main&gt;m__0(System.Object)" attrs="145">
+ <size>33</size>
+ </method>
+ </type>
</test>
<test name="test-async-65.cs">
<type name="C">
@@ -62947,7 +63705,7 @@
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
<size>13</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
<size>9</size>
</method>
</type>
@@ -63124,6 +63882,59 @@
</method>
</type>
</test>
+ <test name="test-async-73.cs">
+ <type name="X">
+ <method name="System.Threading.Tasks.Task`1[System.Int32] Foo()" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="System.Threading.Tasks.Task`1[System.Int32] Throws()" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>32</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X+&lt;Foo&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>214</size>
+ </method>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ <type name="X+&lt;Throws&gt;c__async1">
+ <method name="Void MoveNext()" attrs="486">
+ <size>63</size>
+ </method>
+ <method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
+ <size>13</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-async-74.cs">
+ <type name="AwaitGotoBug">
+ <method name="System.Threading.Tasks.Task Test()" attrs="134">
+ <size>33</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="AwaitGotoBug+&lt;Test&gt;c__async0">
+ <method name="Void MoveNext()" attrs="486">
+ <size>337</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">
@@ -64153,15 +64964,6 @@
<method name="Void Test_Capturing_1(Int32)" attrs="129">
<size>28</size>
</method>
- <method name="Void &lt;Test_1&gt;m__0()" attrs="145">
- <size>6</size>
- </method>
- <method name="Void &lt;Test_2&gt;m__1()" attrs="145">
- <size>7</size>
- </method>
- <method name="Void &lt;Test_3&gt;m__2()" attrs="145">
- <size>7</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -64174,6 +64976,17 @@
<size>14</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;Test_1&gt;m__0(System.Object)" attrs="145">
+ <size>6</size>
+ </method>
+ <method name="Void &lt;Test_2&gt;m__1(System.Object)" attrs="145">
+ <size>7</size>
+ </method>
+ <method name="Void &lt;Test_3&gt;m__2(System.Object)" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
</test>
<test name="test-debug-15.cs">
<type name="Foo">
@@ -64246,9 +65059,6 @@
<method name="Void Test_4()" attrs="129">
<size>485</size>
</method>
- <method name="Int32 &lt;Test_4&gt;m__0()" attrs="145">
- <size>10</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -64261,6 +65071,11 @@
<size>0</size>
</method>
</type>
+ <type name="C">
+ <method name="Int32 &lt;Test_4&gt;m__0(System.Object)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
</test>
<test name="test-debug-19.cs">
<type name="C">
@@ -64282,12 +65097,6 @@
<method name="System.Threading.Tasks.Task`1[System.Boolean] Test_3()" attrs="129">
<size>33</size>
</method>
- <method name="Void &lt;RunAsync&gt;m__0()" attrs="145">
- <size>2</size>
- </method>
- <method name="Int32 &lt;RunAsync_2&gt;m__1()" attrs="145">
- <size>9</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -64306,9 +65115,6 @@
<method name="Void MoveNext()" attrs="486">
<size>1229</size>
</method>
- <method name="Int32 &lt;&gt;m__0()" attrs="145">
- <size>9</size>
- </method>
</type>
<type name="C+&lt;Test_1&gt;c__async0">
<method name="Void SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)" attrs="486">
@@ -64325,6 +65131,19 @@
<size>13</size>
</method>
</type>
+ <type name="C">
+ <method name="Void &lt;RunAsync&gt;m__0(System.Object)" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Int32 &lt;RunAsync_2&gt;m__1(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test_3&gt;c__async2">
+ <method name="Int32 &lt;&gt;m__0(System.Object)" attrs="145">
+ <size>9</size>
+ </method>
+ </type>
</test>
<test name="test-debug-20.cs">
<type name="S`1[T]">
@@ -64470,12 +65289,12 @@
<method name="Void Main()" attrs="150">
<size>2</size>
</method>
- <method name="Program &lt;Test_4&gt;m__0()" attrs="145">
- <size>13</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
+ <method name="Program &lt;Test_4&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
</type>
</test>
<test name="test-debug-24.cs">
@@ -64572,6 +65391,48 @@
</method>
</type>
</test>
+ <test name="test-dictinit-01.cs">
+ <type name="Program">
+ <method name="Int32 Main()" attrs="145">
+ <size>181</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 get_Item(System.String)" attrs="2182">
+ <size>21</size>
+ </method>
+ <method name="Void set_Item(System.String, Int32)" attrs="2182">
+ <size>15</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>18</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-dictinit-02.cs">
+ <type name="Program">
+ <method name="Int32 Main()" attrs="145">
+ <size>182</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="C get_Item(System.String)" attrs="2182">
+ <size>50</size>
+ </method>
+ <method name="Void set_Item(System.String, C)" attrs="2182">
+ <size>15</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>18</size>
+ </method>
+ </type>
+ </test>
<test name="test-ex-filter-01.cs">
<type name="X">
<method name="Int32 Main()" attrs="150">
@@ -64697,6 +65558,64 @@
</method>
</type>
</test>
+ <test name="test-ex-filter-06.cs">
+ <type name="C">
+ <method name="Int32 Test[T]()" attrs="145">
+ <size>61</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>49</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-expression-bodied-01.cs">
+ <type name="C">
+ <method name="System.String Test1(System.String, System.String)" attrs="150">
+ <size>20</size>
+ </method>
+ <method name="Void Test2(Int32)" attrs="129">
+ <size>8</size>
+ </method>
+ <method name="System.Func`1[System.Int32] Test3(Int32)" attrs="129">
+ <size>33</size>
+ </method>
+ <method name="System.String op_Implicit(C)" attrs="2198">
+ <size>13</size>
+ </method>
+ <method name="System.String get_Prop()" attrs="2180">
+ <size>30</size>
+ </method>
+ <method name="System.Func`1[System.String] get_Prop2()" attrs="2193">
+ <size>37</size>
+ </method>
+ <method name="Int32 get_Item(Int32, Int32)" attrs="2182">
+ <size>11</size>
+ </method>
+ <method name="Int32 Check()" attrs="129">
+ <size>213</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>21</size>
+ </method>
+ <method name="System.String &lt;get_Prop2&gt;m__0(System.Object)" attrs="145">
+ <size>13</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>29</size>
+ </method>
+ </type>
+ <type name="C+&lt;Test3&gt;c__AnonStorey0">
+ <method name="Int32 &lt;&gt;m__0()" attrs="131">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-externalias-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
@@ -66383,6 +67302,320 @@
</method>
</type>
</test>
+ <test name="test-nameof-01.cs">
+ <type name="X">
+ <method name="Int32 Main()" attrs="150">
+ <size>20</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-nameof-02.cs">
+ <type name="A`1[T]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="A`1+B[T]">
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Int64 get_Prop()" attrs="2177">
+ <size>14</size>
+ </method>
+ <method name="Void set_Prop(Int64)" attrs="2177">
+ <size>8</size>
+ </method>
+ <method name="Void add_ev(System.Action)" attrs="2177">
+ <size>42</size>
+ </method>
+ <method name="Void remove_ev(System.Action)" attrs="2177">
+ <size>42</size>
+ </method>
+ <method name="Int32 Main()" attrs="150">
+ <size>83</size>
+ </method>
+ <method name="Void GenMethod[T,U,V]()" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Int32 SimpleName[T](T)" attrs="129">
+ <size>17</size>
+ </method>
+ <method name="Int32 MemberAccess()" attrs="129">
+ <size>10</size>
+ </method>
+ <method name="Int32 QualifiedName()" attrs="129">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-nameof-03.cs">
+ <type name="T2">
+ <method name="Int32 nameof(System.String)" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Int32 Main()" attrs="150">
+ <size>37</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-nameof-04.cs">
+ <type name="Ambiguous">
+ <method name="Int32 Main()" attrs="150">
+ <size>68</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-01.cs">
+ <type name="S">
+ <method name="Int32 get_Prop()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Prop(Int32)" attrs="2182">
+ <size>8</size>
+ </method>
+ </type>
+ <type name="CI">
+ <method name="Int32 Method()" attrs="486">
+ <size>11</size>
+ </method>
+ <method name="Int32 get_Prop()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Prop(Int32)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="System.String get_Prop()" attrs="2193">
+ <size>22</size>
+ </method>
+ <method name="Int32 TestArray()" attrs="145">
+ <size>477</size>
+ </method>
+ <method name="Int32 TestReferenceType()" attrs="145">
+ <size>229</size>
+ </method>
+ <method name="Int32 TestGeneric[T](T)" attrs="145">
+ <size>118</size>
+ </method>
+ <method name="Int32 TestNullable()" attrs="145">
+ <size>386</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>120</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-02.cs">
+ <type name="CI">
+ <method name="Int32 get_Prop()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Prop(Int32)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="System.Nullable`1[System.Byte] get_PropNullable()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_PropNullable(System.Nullable`1[System.Byte])" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Void add_ev1(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void remove_ev1(System.Action)" attrs="2182">
+ <size>42</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 Main()" attrs="145">
+ <size>64</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Int32 TestProperty()" attrs="145">
+ <size>359</size>
+ </method>
+ <method name="Int32 TestField()" attrs="145">
+ <size>351</size>
+ </method>
+ </type>
+ <type name="CI">
+ <method name="System.Object get_PropReference()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_PropReference(System.Object)" attrs="2182">
+ <size>8</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-03.cs">
+ <type name="C">
+ <method name="Int32 Test1()" attrs="129">
+ <size>82</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>62</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-04.cs">
+ <type name="D">
+ <method name="Void Foo()" attrs="129">
+ <size>2</size>
+ </method>
+ <method name="Void Main()" attrs="150">
+ <size>26</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-05.cs">
+ <type name="CI">
+ <method name="Void set_Item(System.String, System.String)" attrs="2182">
+ <size>2</size>
+ </method>
+ <method name="System.String get_Item(System.String)" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Item(Int32, System.Nullable`1[System.Int32])" attrs="2182">
+ <size>2</size>
+ </method>
+ <method name="System.Nullable`1[System.Int32] get_Item(Int32)" attrs="2182">
+ <size>15</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Int32 TestArrayAccess()" attrs="145">
+ <size>206</size>
+ </method>
+ <method name="Int32 TestIndexerAccess()" attrs="145">
+ <size>188</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>64</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-06.cs">
+ <type name="C">
+ <method name="Int32 Main()" attrs="145">
+ <size>459</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-07.cs">
+ <type name="C">
+ <method name="Int32 Main()" attrs="145">
+ <size>93</size>
+ </method>
+ <method name="System.String EM(System.Object)" attrs="145">
+ <size>26</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-08.cs">
+ <type name="Program">
+ <method name="Void M[T](T)" attrs="145">
+ <size>88</size>
+ </method>
+ <method name="Void M2[T](T[])" attrs="145">
+ <size>64</size>
+ </method>
+ <method name="Void M2_2[T](T[])" attrs="145">
+ <size>114</size>
+ </method>
+ <method name="Void M3[T](System.Nullable`1[T])" attrs="145">
+ <size>106</size>
+ </method>
+ <method name="Void Main()" attrs="145">
+ <size>165</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="S">
+ <method name="Void Foo(Boolean)" attrs="486">
+ <size>38</size>
+ </method>
+ </type>
+ <type name="Program">
+ <method name="Void TestAddress_1[T](T)" attrs="145">
+ <size>56</size>
+ </method>
+ <method name="Void TestAddress_2[T](T[])" attrs="145">
+ <size>82</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-null-operator-09.cs">
+ <type name="D">
+ <method name="Int32 Invoke(Int32)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="System.IAsyncResult BeginInvoke(Int32, System.AsyncCallback, System.Object)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Int32 EndInvoke(System.IAsyncResult)" attrs="454">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)" attrs="6278">
+ <size>0</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Int32 Main()" attrs="150">
+ <size>88</size>
+ </method>
+ <method name="Int32 &lt;d&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>42</size>
+ </method>
+ </type>
+ </test>
<test name="test-partial-01.cs">
<type name="Foo.Hello">
<method name="Void .ctor()" attrs="6278">
@@ -66950,9 +68183,6 @@
<method name="Void Test()" attrs="134">
<size>43</size>
</method>
- <method name="Void &lt;Test&gt;m__0()" attrs="145">
- <size>7</size>
- </method>
<method name="Void .ctor()" attrs="6278">
<size>7</size>
</method>
@@ -67000,6 +68230,11 @@
<size>0</size>
</method>
</type>
+ <type name="Mono.Sms.Main">
+ <method name="Void &lt;Test&gt;m__0(System.Object)" attrs="145">
+ <size>7</size>
+ </method>
+ </type>
</test>
<test name="test-partial-22.cs">
<type name="C">
@@ -67201,10 +68436,171 @@
</method>
</type>
</test>
+ <test name="test-partial-33.cs">
+ <type name="X">
+ <method name="Void Main()" attrs="145">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-pattern-01.cs">
+ <type name="TypePattern">
+ <method name="Int32 Main()" attrs="150">
+ <size>227</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-pattern-02.cs">
+ <type name="ConstantPattern">
+ <method name="Int32 Main()" attrs="150">
+ <size>633</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="&lt;PatternMatchingHelper&gt;">
+ <method name="Boolean NumberMatcher(System.Object, System.Object, Boolean)" attrs="150">
+ <size>69</size>
+ </method>
+ </type>
+ <type name="ConstantPattern">
+ <method name="Boolean Generic[T](T)" attrs="145">
+ <size>28</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-pattern-03.cs">
+ <type name="WildcardPattern">
+ <method name="Int32 Main()" attrs="145">
+ <size>33</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-pattern-04.cs">
+ <type name="RecursivePattern">
+ <method name="Int32 Main()" attrs="145">
+ <size>750</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C1">
+ <method name="Boolean op_Is(C1, Int32 ByRef)" attrs="2198">
+ <size>13</size>
+ </method>
+ <method name="Boolean op_Is(C1, C1 ByRef, C1 ByRef)" attrs="2198">
+ <size>16</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="S">
+ <method name="Boolean op_Is(S, System.Nullable`1[System.Int32] ByRef, System.Decimal ByRef)" attrs="2198">
+ <size>34</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-pattern-05.cs">
+ <type name="RecursiveNamedPattern">
+ <method name="Int32 Main()" attrs="150">
+ <size>204</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Boolean op_Is(C, Int64 ByRef, System.String ByRef)" attrs="2198">
+ <size>22</size>
+ </method>
+ <method name="Boolean op_Is(C)" attrs="2198">
+ <size>10</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-pattern-06.cs">
+ <type name="RecursiveNamedPattern">
+ <method name="Int32 Main()" attrs="150">
+ <size>182</size>
+ </method>
+ <method name="Int32 Switch_1(System.Object)" attrs="145">
+ <size>149</size>
+ </method>
+ <method name="Int32 Switch_2(C1)" attrs="145">
+ <size>28</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="C1">
+ <method name="Boolean op_Is(C1, Int32 ByRef)" attrs="2198">
+ <size>13</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="&lt;PatternMatchingHelper&gt;">
+ <method name="Boolean NumberMatcher(System.Object, System.Object, Boolean)" attrs="150">
+ <size>69</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-pattern-07.cs">
+ <type name="PropertyPattern">
+ <method name="Int32 Main()" attrs="145">
+ <size>444</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="System.Object get_Field()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Field(System.Object)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Y">
+ <method name="Char get_Prop()" attrs="2182">
+ <size>14</size>
+ </method>
+ <method name="Void set_Prop(Char)" attrs="2182">
+ <size>8</size>
+ </method>
+ <method name="Boolean op_Is(Y, Int32 ByRef)" attrs="2198">
+ <size>13</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-primary-ctor-01.cs">
<type name="Simple">
<method name="Int32 get_Property()" attrs="2177">
- <size>15</size>
+ <size>14</size>
</method>
<method name="Int32 Main()" attrs="150">
<size>89</size>
@@ -67218,38 +68614,41 @@
<size>8</size>
</method>
<method name="System.Decimal get_Property()" attrs="2179">
- <size>15</size>
+ <size>14</size>
</method>
</type>
</test>
<test name="test-primary-ctor-02.cs">
<type name="Part">
<method name="Int32 get_Property()" attrs="2177">
- <size>22</size>
+ <size>14</size>
</method>
<method name="Int32 Main()" attrs="150">
<size>41</size>
</method>
<method name="Void .ctor(String)" attrs="6278">
- <size>56</size>
+ <size>9</size>
</method>
<method name="Void .ctor(Int32)" attrs="6278">
- <size>21</size>
+ <size>20</size>
+ </method>
+ <method name="Void .cctor()" attrs="6289">
+ <size>7</size>
</method>
</type>
</test>
<test name="test-primary-ctor-03.cs">
<type name="D">
<method name="Void .ctor(String)" attrs="6278">
- <size>15</size>
+ <size>8</size>
</method>
</type>
<type name="Base">
<method name="System.String get_Prop()" attrs="2182">
- <size>20</size>
+ <size>14</size>
</method>
<method name="Void .ctor(Object)" attrs="6276">
- <size>14</size>
+ <size>19</size>
</method>
</type>
<type name="X">
@@ -67264,7 +68663,7 @@
<test name="test-primary-ctor-04.cs">
<type name="Derived">
<method name="Void .ctor(Int32, Byte&amp;, Int32&amp;)" attrs="6278">
- <size>31</size>
+ <size>24</size>
</method>
</type>
<type name="Base">
@@ -67289,16 +68688,214 @@
</type>
<type name="X">
<method name="Int32 get_P()" attrs="2182">
- <size>15</size>
+ <size>14</size>
</method>
<method name="Int32 Main()" attrs="150">
- <size>66</size>
+ <size>63</size>
</method>
<method name="Void .ctor(Int32)" attrs="6278">
<size>21</size>
</method>
</type>
</test>
+ <test name="test-primary-ctor-06.cs">
+ <type name="ID">
+ <method name="Void System.IDisposable.Dispose()" attrs="481">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Void Main()" attrs="150">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-primary-ctor-07.cs">
+ <type name="S">
+ <method name="Void .ctor(Char)" attrs="6278">
+ <size>9</size>
+ </method>
+ <method name="Void .cctor()" attrs="6289">
+ <size>2</size>
+ </method>
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>8</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Int32 Main()" attrs="150">
+ <size>69</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-primary-ctor-08.cs">
+ <type name="S">
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>9</size>
+ </method>
+ </type>
+ <type name="C">
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>15</size>
+ </method>
+ </type>
+ <type name="Test">
+ <method name="Int32 Main()" attrs="150">
+ <size>62</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-primary-ctor-09.cs">
+ <type name="A">
+ <method name="Void .ctor(Func`2)" attrs="6278">
+ <size>14</size>
+ </method>
+ </type>
+ <type name="PC">
+ <method name="Void .ctor(Int32)" attrs="6278">
+ <size>50</size>
+ </method>
+ </type>
+ <type name="X">
+ <method name="Int32 Main()" attrs="150">
+ <size>70</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="PC+&lt;f1&gt;c__AnonStorey0">
+ <method name="Int32 &lt;&gt;m__0(Int32)" attrs="131">
+ <size>14</size>
+ </method>
+ <method name="Int32 &lt;&gt;m__1(Int32)" attrs="131">
+ <size>14</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-static-using-01.cs">
+ <type name="A.B.X">
+ <method name="Int32 Test()" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="C.M">
+ <method name="Int32 Main()" attrs="150">
+ <size>28</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-static-using-02.cs">
+ <type name="A.B.X">
+ <method name="Int32 Test(System.Object)" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="A.C.X">
+ <method name="Int32 Test(Int32)" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="C.M">
+ <method name="Int32 Main()" attrs="150">
+ <size>29</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-static-using-03.cs">
+ <type name="A.B.X">
+ <method name="Int32 Test(Int32)" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="A.C.X">
+ <method name="Int32 Test(Int32)" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="C.M">
+ <method name="Int32 Main()" attrs="150">
+ <size>29</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-static-using-04.cs">
+ <type name="A.B.X">
+ <method name="Int32 Test(System.Object)" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="A.C.X">
+ <method name="Int32 Test(Int32)" attrs="145">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="C.M">
+ <method name="Int32 Main()" attrs="150">
+ <size>34</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-static-using-05.cs">
+ <type name="Test">
+ <method name="Void Main()" attrs="145">
+ <size>56</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ <method name="Boolean &lt;Main&gt;m__0(System.Object, Int32)" attrs="145">
+ <size>14</size>
+ </method>
+ </type>
+ </test>
+ <test name="test-static-using-06.cs">
+ <type name="A.B.X">
+ <method name="Int32 Test(System.Object)" attrs="150">
+ <size>10</size>
+ </method>
+ </type>
+ <type name="A.C.X">
+ <method name="Int32 Test[T](T)" attrs="150">
+ <size>47</size>
+ </method>
+ </type>
+ <type name="C.M">
+ <method name="Int32 Main()" attrs="150">
+ <size>33</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-var-01.cs">
<type name="Test">
<method name="Int32 Main()" attrs="150">
diff --git a/mcs/tools/csharp/csharp.csproj b/mcs/tools/csharp/csharp.csproj
index c046e20c0f0..607b1e09a19 100755..100644
--- a/mcs/tools/csharp/csharp.csproj
+++ b/mcs/tools/csharp/csharp.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{0831DD4E-B428-4D6C-90B1-2206DBD4F92E}</ProjectGuid>
<OutputType>Exe</OutputType>
@@ -43,6 +43,7 @@
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ <Externalconsole>true</Externalconsole>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
diff --git a/mcs/tools/mdoc/.gitignore b/mcs/tools/mdoc/.gitignore
new file mode 100644
index 00000000000..a1077aa9dae
--- /dev/null
+++ b/mcs/tools/mdoc/.gitignore
@@ -0,0 +1,5 @@
+/Test/en.*/
+/Test/html.*/
+/Test/DocTest.*
+/.v2.txt
+/.v0.txt
diff --git a/mcs/tools/mdoc/Mono.Documentation/assembler.cs b/mcs/tools/mdoc/Mono.Documentation/assembler.cs
index 28701dd566c..c8c89158c43 100644
--- a/mcs/tools/mdoc/Mono.Documentation/assembler.cs
+++ b/mcs/tools/mdoc/Mono.Documentation/assembler.cs
@@ -13,9 +13,13 @@ using System.Xml;
using Monodoc;
using Monodoc.Providers;
using Mono.Options;
+using System.IO;
+using System.Xml.Linq;
+using System.Xml.XPath;
+using Monodoc.Ecma;
namespace Mono.Documentation {
-
+
public class MDocAssembler : MDocCommand {
static readonly string[] ValidFormats = {
"ecma",
@@ -27,6 +31,8 @@ public class MDocAssembler : MDocCommand {
"xhtml"
};
+ string droppedNamespace = null;
+
public static Option[] CreateFormatOptions (MDocCommand self, Dictionary<string, List<string>> formats)
{
string cur_format = "ecma";
@@ -48,6 +54,7 @@ public class MDocAssembler : MDocCommand {
public override void Run (IEnumerable<string> args)
{
+ bool replaceNTypes = false;
var formats = new Dictionary<string, List<string>> ();
string prefix = "tree";
var formatOptions = CreateFormatOptions (this, formats);
@@ -59,6 +66,8 @@ public class MDocAssembler : MDocCommand {
"If not specified, `tree' is the default PREFIX.",
v => prefix = v },
formatOptions [1],
+ {"dropns=","The namespace that has been dropped from this version of the assembly.", v => droppedNamespace = v },
+ {"ntypes","Replace references to native types with their original types.", v => replaceNTypes=true },
};
List<string> extra = Parse (options, args, "assemble",
"[OPTIONS]+ DIRECTORIES",
@@ -78,6 +87,9 @@ public class MDocAssembler : MDocCommand {
list.Add (ecma);
sort = true;
}
+ ecma.FileSource = new MDocFileSource(droppedNamespace, string.IsNullOrWhiteSpace(droppedNamespace) ? ApiStyle.Unified : ApiStyle.Classic) {
+ ReplaceNativeTypes = replaceNTypes
+ };
foreach (string dir in formats [format])
ecma.AddDirectory (dir);
break;
@@ -137,4 +149,267 @@ public class MDocAssembler : MDocCommand {
}
}
+ /// <summary>
+ /// A custom provider file source that lets us modify the source files before they are processed by monodoc.
+ /// </summary>
+ internal class MDocFileSource : IEcmaProviderFileSource {
+ private string droppedNamespace;
+ private bool shouldDropNamespace = false;
+ private ApiStyle styleToDrop;
+
+ public bool ReplaceNativeTypes { get; set; }
+
+ /// <param name="ns">The namespace that is being dropped.</param>
+ /// <param name="style">The style that is being dropped.</param>
+ public MDocFileSource(string ns, ApiStyle style)
+ {
+ droppedNamespace = ns;
+ shouldDropNamespace = !string.IsNullOrWhiteSpace (ns);
+ styleToDrop = style;
+ }
+
+ public XmlReader GetIndexReader(string path)
+ {
+ XDocument doc = XDocument.Load (path);
+
+ DropApiStyle (doc, path);
+ DropNSFromDocument (doc);
+
+ // now put the modified contents into a stream for the XmlReader that monodoc will use.
+ MemoryStream io = new MemoryStream ();
+ using (var writer = XmlWriter.Create (io)) {
+ doc.WriteTo (writer);
+ }
+ io.Seek (0, SeekOrigin.Begin);
+
+ return XmlReader.Create (io);
+ }
+
+ public XElement GetNamespaceElement(string path)
+ {
+ var element = XElement.Load (path);
+
+ var attributes = element.Descendants ().Concat(new XElement[] { element }).SelectMany (n => n.Attributes ());
+ var textNodes = element.Nodes ().OfType<XText> ();
+
+ DropNS (attributes, textNodes);
+
+ return element;
+ }
+
+ void DropApiStyle(XDocument doc, string path)
+ {
+ string styleString = styleToDrop.ToString ().ToLower ();
+ var items = doc
+ .Descendants ()
+ .Where (n => n.Attributes ()
+ .Any (a => a.Name.LocalName == "apistyle" && a.Value == styleString))
+ .ToArray ();
+
+ foreach (var element in items) {
+ element.Remove ();
+ }
+
+ if (styleToDrop == ApiStyle.Classic && ReplaceNativeTypes) {
+ RewriteCrefsIfNecessary (doc, path);
+ }
+ }
+
+ void RewriteCrefsIfNecessary (XDocument doc, string path)
+ {
+ // we also have to rewrite crefs
+ var sees = doc.Descendants ().Where (d => d.Name.LocalName == "see").ToArray ();
+ foreach (var see in sees) {
+ var cref = see.Attribute ("cref");
+ if (cref == null) {
+ continue;
+ }
+ EcmaUrlParser parser = new EcmaUrlParser ();
+ EcmaDesc reference;
+ if (!parser.TryParse (cref.Value, out reference)) {
+ continue;
+ }
+ if ((new EcmaDesc.Kind[] {
+ EcmaDesc.Kind.Constructor,
+ EcmaDesc.Kind.Method
+ }).Any (k => k == reference.DescKind)) {
+ string ns = reference.Namespace;
+ string type = reference.TypeName;
+ string memberName = reference.MemberName;
+ if (reference.MemberArguments != null) {
+ XDocument refDoc = FindReferenceDoc (path, doc, ns, type);
+ if (refDoc == null) {
+ continue;
+ }
+ // look in the refDoc for the memberName, and match on parameters and # of type parameters
+ var overloads = refDoc.XPathSelectElements ("//Member[@MemberName='" + memberName + "']").ToArray ();
+ // Do some initial filtering to find members that could potentially match (based on parameter and typeparam counts)
+ var members = overloads.Where (e => reference.MemberArgumentsCount == e.XPathSelectElements ("Parameters/Parameter[not(@apistyle) or @apistyle='classic']").Count () && reference.GenericMemberArgumentsCount == e.XPathSelectElements ("TypeParameters/TypeParameter[not(@apistyle) or @apistyle='classic']").Count ()).Select (m => new {
+ Node = m,
+ AllParameters = m.XPathSelectElements ("Parameters/Parameter").ToArray (),
+ Parameters = m.XPathSelectElements ("Parameters/Parameter[not(@apistyle) or @apistyle='classic']").ToArray (),
+ NewParameters = m.XPathSelectElements ("Parameters/Parameter[@apistyle='unified']").ToArray ()
+ }).ToArray ();
+ // now find the member that matches on types
+ var member = members.FirstOrDefault (m => reference.MemberArguments.All (r => m.Parameters.Any (mp => mp.Attribute ("Type").Value.Contains (r.TypeName))));
+ if (member == null || member.NewParameters.Length == 0)
+ continue;
+ foreach (var arg in reference.MemberArguments) {
+ // find the "classic" parameter
+ var oldParam = member.Parameters.First (p => p.Attribute ("Type").Value.Contains (arg.TypeName));
+ var newParam = member.NewParameters.FirstOrDefault (p => oldParam.Attribute ("Name").Value == p.Attribute ("Name").Value);
+ if (newParam != null) {
+ // this means there was a change made, and we should try to convert this cref
+ arg.TypeName = NativeTypeManager.ConvertToNativeType (arg.TypeName);
+ }
+ }
+ var rewrittenReference = reference.ToEcmaCref ();
+ Console.WriteLine ("From {0} to {1}", cref.Value, rewrittenReference);
+ cref.Value = rewrittenReference;
+ }
+ }
+ }
+ }
+
+ XDocument FindReferenceDoc (string currentPath, XDocument currentDoc, string ns, string type)
+ {
+ if (currentPath.Length <= 1) {
+ return null;
+ }
+ // build up the supposed path to the doc
+ string dir = Path.GetDirectoryName (currentPath);
+ if (dir.Equals (currentPath)) {
+ return null;
+ }
+
+ string supposedPath = Path.Combine (dir, ns, type + ".xml");
+
+ // if it's the current path, return currentDoc
+ if (supposedPath == currentPath) {
+ return currentDoc;
+ }
+
+ if (!File.Exists (supposedPath)) {
+ // hmm, file not there, look one directory up
+ return FindReferenceDoc (dir, currentDoc, ns, type);
+ }
+
+ // otherwise, load the XDoc and return
+ return XDocument.Load (supposedPath);
+ }
+
+ void DropNSFromDocument (XDocument doc)
+ {
+ var attributes = doc.Descendants ().SelectMany (n => n.Attributes ());
+ var textNodes = doc.DescendantNodes().OfType<XText> ().ToArray();
+
+ DropNS (attributes, textNodes);
+ }
+
+ void DropNS(IEnumerable<XAttribute> attributes, IEnumerable<XText> textNodes)
+ {
+ if (!shouldDropNamespace) {
+ return;
+ }
+
+ string nsString = string.Format ("{0}.", droppedNamespace);
+ foreach (var attr in attributes) {
+ if (attr.Value.Contains (nsString)) {
+ attr.Value = attr.Value.Replace (nsString, string.Empty);
+ }
+ }
+
+ foreach (var textNode in textNodes) {
+ if (textNode.Value.Contains (nsString)) {
+ textNode.Value = textNode.Value.Replace (nsString, string.Empty);
+ }
+ }
+ }
+
+
+ /// <param name="nsName">This is the type's name in the processed XML content.
+ /// If dropping the namespace, we'll need to append it so that it's found in the source.</param>
+ /// <param name="typeName">Type name.</param>
+ public string GetTypeXmlPath(string basePath, string nsName, string typeName)
+ {
+ string nsNameToUse = nsName;
+ if (shouldDropNamespace) {
+ nsNameToUse = string.Format ("{0}.{1}", droppedNamespace, nsName);
+
+ var droppedPath = BuildTypeXmlPath (basePath, typeName, nsNameToUse);
+ var origPath = BuildTypeXmlPath (basePath, typeName, nsName);
+
+ if (!File.Exists (droppedPath)) {
+ if (File.Exists (origPath)) {
+ return origPath;
+ }
+ }
+
+ return droppedPath;
+ } else {
+
+ var finalPath = BuildTypeXmlPath (basePath, typeName, nsNameToUse);
+
+ return finalPath;
+ }
+ }
+
+ static string BuildTypeXmlPath (string basePath, string typeName, string nsNameToUse)
+ {
+ string finalPath = Path.Combine (basePath, nsNameToUse, Path.ChangeExtension (typeName, ".xml"));
+ return finalPath;
+ }
+
+ static string BuildNamespaceXmlPath (string basePath, string ns)
+ {
+ var nsFileName = Path.Combine (basePath, String.Format ("ns-{0}.xml", ns));
+ return nsFileName;
+ }
+
+ /// <returns>The namespace for path, with the dropped namespace so it can be used to pick the right file if we're dropping it.</returns>
+ /// <param name="ns">This namespace will already have "dropped" the namespace.</param>
+ public string GetNamespaceXmlPath(string basePath, string ns)
+ {
+ string nsNameToUse = ns;
+ if (shouldDropNamespace) {
+ nsNameToUse = string.Format ("{0}.{1}", droppedNamespace, ns);
+
+ var droppedPath = BuildNamespaceXmlPath (basePath, nsNameToUse);
+ var origPath = BuildNamespaceXmlPath (basePath, ns);
+
+ if (!File.Exists (droppedPath) && File.Exists(origPath)) {
+ return origPath;
+ }
+
+ return droppedPath;
+ } else {
+ var path = BuildNamespaceXmlPath (basePath, ns);
+ return path;
+ }
+ }
+
+ public XDocument GetTypeDocument(string path)
+ {
+ var doc = XDocument.Load (path);
+ DropApiStyle (doc, path);
+ DropNSFromDocument (doc);
+
+ return doc;
+ }
+
+ public XElement ExtractNamespaceSummary (string path)
+ {
+ using (var reader = GetIndexReader (path)) {
+ reader.ReadToFollowing ("Namespace");
+ var name = reader.GetAttribute ("Name");
+ var summary = reader.ReadToFollowing ("summary") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("summary");
+ var remarks = reader.ReadToFollowing ("remarks") ? XElement.Load (reader.ReadSubtree ()) : new XElement ("remarks");
+
+ return new XElement ("namespace",
+ new XAttribute ("ns", name ?? string.Empty),
+ summary,
+ remarks);
+ }
+ }
+ }
}
diff --git a/mcs/tools/mdoc/Mono.Documentation/mdoc.cs b/mcs/tools/mdoc/Mono.Documentation/mdoc.cs
index 7ce10c85251..30cad403132 100644
--- a/mcs/tools/mdoc/Mono.Documentation/mdoc.cs
+++ b/mcs/tools/mdoc/Mono.Documentation/mdoc.cs
@@ -48,6 +48,7 @@ namespace Mono.Documentation {
{ "update-ecma-xml", new MDocUpdateEcmaXml () },
{ "validate", new MDocValidator () },
{ "index", new MDocIndex () },
+ { "preserve", new MDocPreserve () }
};
bool showVersion = false;
diff --git a/mcs/tools/mdoc/Mono.Documentation/monodocer.cs b/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
index 853f7a709b2..75a6d5ca63e 100644
--- a/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
+++ b/mcs/tools/mdoc/Mono.Documentation/monodocer.cs
@@ -23,7 +23,110 @@ using StringToStringMap = System.Collections.Generic.Dictionary<string, strin
using StringToXmlNodeMap = System.Collections.Generic.Dictionary<string, System.Xml.XmlNode>;
namespace Mono.Documentation {
+ static class NativeTypeManager {
+
+ static Dictionary<string, string> toNativeType = new Dictionary<string,string>(){
+
+ {"int", "nint"},
+ {"Int32", "nint"},
+ {"System.Int32", "System.nint"},
+ {"uint", "nuint"},
+ {"UInt32", "nuint"},
+ {"System.UInt32", "System.nuint"},
+ {"float", "nfloat"},
+ {"Single", "nfloat"},
+ {"System.Single", "System.nfloat"},
+ {"SizeF", "CoreGraphics.CGSize"},
+ {"System.Drawing.SizeF", "CoreGraphics.CGSize"},
+ {"PointF", "CoreGraphics.CGPoint"},
+ {"System.Drawing.PointF", "CoreGraphics.CGPoint"},
+ {"RectangleF", "CoreGraphics.CGRect" },
+ {"System.Drawing.RectangleF", "CoreGraphics.CGRect"}
+ };
+
+ static Dictionary<string, string> fromNativeType = new Dictionary<string,string>(){
+
+ {"nint", "int"},
+ {"System.nint", "System.Int32"},
+ {"nuint", "uint"},
+ {"System.nuint", "System.UInt32"},
+ {"nfloat", "float"},
+ {"System.nfloat", "System.Single"},
+ {"CoreGraphics.CGSize", "System.Drawing.SizeF"},
+ {"CoreGraphics.CGPoint", "System.Drawing.PointF"},
+ {"CoreGraphics.CGRect", "System.Drawing.RectangleF"},
+ {"MonoTouch.CoreGraphics.CGSize", "System.Drawing.SizeF"},
+ {"MonoTouch.CoreGraphics.CGPoint", "System.Drawing.PointF"},
+ {"MonoTouch.CoreGraphics.CGRect", "System.Drawing.RectangleF"}
+ };
+
+ public static string ConvertToNativeType(string typename) {
+ string nvalue;
+
+ bool isOut=false;
+ bool isArray=false;
+ string valueToCompare = StripToComparableType (typename, ref isOut, ref isArray);
+
+ if (toNativeType.TryGetValue (valueToCompare, out nvalue)) {
+
+ if (isArray) {
+ nvalue += "[]";
+ }
+ if (isOut) {
+ nvalue += "&";
+ }
+ return nvalue;
+ }
+ return typename;
+ }
+ public static string ConvertFromNativeType(string typename) {
+ string nvalue;
+
+ bool isOut=false;
+ bool isArray=false;
+ string valueToCompare = StripToComparableType (typename, ref isOut, ref isArray);
+
+ if (fromNativeType.TryGetValue (valueToCompare, out nvalue)) {
+ if (isArray) {
+ nvalue += "[]";
+ }
+ if (isOut) {
+ nvalue += "&";
+ }
+ return nvalue;
+ }
+ // it wasn't one of the native types ... just return it
+ return typename;
+ }
+ static string StripToComparableType (string typename, ref bool isOut, ref bool isArray)
+ {
+ string valueToCompare = typename;
+ if (typename.EndsWith ("[]")) {
+ valueToCompare = typename.Substring (0, typename.Length - 2);
+ isArray = true;
+ }
+ if (typename.EndsWith ("&")) {
+ valueToCompare = typename.Substring (0, typename.Length - 1);
+ isOut = true;
+ }
+ if (typename.Contains ("<")) {
+ // TODO: Need to recursively process generic parameters
+ }
+ return valueToCompare;
+ }
+
+ public static string GetTranslatedName(TypeReference t) {
+ string typename = t.FullName;
+
+ bool isInAssembly = MDocUpdater.IsInAssemblies (t.Module.Name);
+ if (isInAssembly && MDocUpdater.HasDroppedNamespace () && !typename.StartsWith ("System")) {
+ string nameWithDropped = string.Format ("{0}.{1}", MDocUpdater.droppedNamespace, typename);
+ return nameWithDropped;
+ }
+ return typename;
+ }
+ }
class MDocUpdater : MDocCommand
{
string srcPath;
@@ -62,8 +165,17 @@ class MDocUpdater : MDocCommand
HashSet<string> forwardedTypes = new HashSet<string> ();
+ public static string droppedNamespace = string.Empty;
+ public static bool HasDroppedNamespace() {
+ return !string.IsNullOrWhiteSpace (droppedNamespace);
+ }
+ public string PreserveTag { get; set; }
+ public static MDocUpdater Instance { get; private set; }
+ public static bool SwitchingToMagicTypes { get; private set; }
+
public override void Run (IEnumerable<string> args)
{
+ Instance = this;
show_exceptions = DebugOutput;
var types = new List<string> ();
var p = new OptionSet () {
@@ -123,6 +235,15 @@ class MDocUpdater : MDocCommand
{ "type=",
"Only update documentation for {TYPE}.",
v => types.Add (v) },
+ { "dropns=",
+ "Instructs the update process that {NAMESPACE} has been dropped, so that types and members will match existing documentation nodes.",
+ v => droppedNamespace = v },
+ { "ntypes",
+ "If the new assembly is switching to 'magic types', then this switch should be defined.",
+ v => SwitchingToMagicTypes = true },
+ { "preserve",
+ "Do not delete members that don't exist in the assembly, but rather mark them as preserved.",
+ v => PreserveTag = "true" },
};
var assemblies = Parse (p, args, "update",
"[OPTIONS]+ ASSEMBLIES",
@@ -165,7 +286,10 @@ class MDocUpdater : MDocCommand
Console.WriteLine("Members Added: {0}, Members Deleted: {1}", additions, deletions);
}
-
+ public static bool IsInAssemblies(string name) {
+ var query = Instance.assemblies.Where (a => a.MainModule.Name == name).ToArray ();
+ return query.Length > 0;
+ }
void AddImporter (string path)
{
try {
@@ -426,6 +550,19 @@ class MDocUpdater : MDocCommand
return new IndexForTypes (this, indexFile, CreateIndexStub ());
}
+ /// <summary>Constructs the presumed path to the type's documentation file</summary>
+ /// <returns><c>true</c>, if the type file was found, <c>false</c> otherwise.</returns>
+ /// <param name="result">A typle that contains 1) the 'reltypefile', 2) the 'typefile', and 3) the file info</param>
+ bool TryFindTypeFile(string nsname, string typename, string basepath, out Tuple<string, string, FileInfo> result) {
+ string reltypefile = DocUtils.PathCombine (nsname, typename + ".xml");
+ string typefile = Path.Combine (basepath, reltypefile);
+ System.IO.FileInfo file = new System.IO.FileInfo(typefile);
+
+ result = new Tuple<string, string, FileInfo> (reltypefile, typefile, file);
+
+ return file.Exists;
+ }
+
public string DoUpdateType (TypeDefinition type, string basepath, string dest)
{
if (type.Namespace == null)
@@ -436,11 +573,51 @@ class MDocUpdater : MDocCommand
// Must get the A+B form of the type name.
string typename = GetTypeFileName(type);
-
- string reltypefile = DocUtils.PathCombine (DocUtils.GetNamespace (type), typename + ".xml");
- string typefile = Path.Combine (basepath, reltypefile);
- System.IO.FileInfo file = new System.IO.FileInfo(typefile);
+ string nsname = DocUtils.GetNamespace (type);
+
+ // Find the file, if it exists
+ string[] searchLocations = new string[] {
+ nsname
+ };
+
+ if (MDocUpdater.HasDroppedNamespace ()) {
+ // If dropping namespace, types may have moved into a couple of different places.
+ var newSearchLocations = searchLocations.Union (new string[] {
+ string.Format ("{0}.{1}", droppedNamespace, nsname),
+ nsname.Replace (droppedNamespace + ".", string.Empty),
+ MDocUpdater.droppedNamespace
+ });
+
+ searchLocations = newSearchLocations.ToArray ();
+ }
+
+ string reltypefile="", typefile="";
+ System.IO.FileInfo file = null;
+
+ foreach (var f in searchLocations) {
+ Tuple<string, string, FileInfo> result;
+ bool fileExists = TryFindTypeFile (f, typename, basepath, out result);
+
+ if (fileExists) {
+ reltypefile = result.Item1;
+ typefile = result.Item2;
+ file = result.Item3;
+
+ break;
+ }
+ }
+
+ if (file == null || !file.Exists) {
+ // we were not able to find a file, let's use the original type informatio.
+ // so that we create the stub in the right place.
+ Tuple<string, string, FileInfo> result;
+ TryFindTypeFile (nsname, typename, basepath, out result);
+ reltypefile = result.Item1;
+ typefile = result.Item2;
+ file = result.Item3;
+ }
+
string output = null;
if (dest == null) {
output = typefile;
@@ -450,7 +627,7 @@ class MDocUpdater : MDocCommand
output = Path.Combine (dest, reltypefile);
}
- if (file.Exists) {
+ if (file != null && file.Exists) {
// Update
XmlDocument basefile = new XmlDocument();
try {
@@ -493,8 +670,16 @@ class MDocUpdater : MDocCommand
GetTypeFileName (basefile.SelectSingleNode("Type/@FullName").InnerText);
TypeDefinition type = assembly.GetType(typename);
if (type == null) {
- Warning ("Type no longer in assembly: " + typename);
- continue;
+ // --
+ if (!string.IsNullOrWhiteSpace (droppedNamespace)) {
+ string nameWithNs = string.Format ("{0}.{1}", droppedNamespace, typename);
+ type = assembly.GetType (nameWithNs);
+ if (type == null) {
+ Warning ("Type no longer in assembly: " + typename);
+ continue;
+ }
+ }
+ //--
}
seenTypes[type] = seenTypes;
@@ -664,15 +849,19 @@ class MDocUpdater : MDocCommand
AddIndexType (type, index_types);
// Ensure the namespace index file exists
- string onsdoc = DocUtils.PathCombine (dest, type.Namespace + ".xml");
- string nsdoc = DocUtils.PathCombine (dest, "ns-" + type.Namespace + ".xml");
+ string namespaceToUse = type.Namespace;
+ if (HasDroppedNamespace()) {
+ namespaceToUse = string.Format ("{0}.{1}", droppedNamespace, namespaceToUse);
+ }
+ string onsdoc = DocUtils.PathCombine (dest, namespaceToUse + ".xml");
+ string nsdoc = DocUtils.PathCombine (dest, "ns-" + namespaceToUse + ".xml");
if (File.Exists (onsdoc)) {
File.Move (onsdoc, nsdoc);
}
if (!File.Exists (nsdoc)) {
Console.WriteLine("New Namespace File: " + type.Namespace);
- WriteNamespaceStub(type.Namespace, dest);
+ WriteNamespaceStub(namespaceToUse, dest);
}
goodfiles.Add (reltypepath);
@@ -791,10 +980,13 @@ class MDocUpdater : MDocCommand
goodfiles.Add (relTypeFile);
continue;
}
- string newname = typefile.FullName + ".remove";
- try { System.IO.File.Delete(newname); } catch (Exception) { }
- try { typefile.MoveTo(newname); } catch (Exception) { }
- Console.WriteLine("Class no longer present; file renamed: " + Path.Combine(nsdir.Name, typefile.Name));
+
+ if (string.IsNullOrWhiteSpace (PreserveTag)) { // only do this if there was no -preserve
+ string newname = typefile.FullName + ".remove";
+ try { System.IO.File.Delete(newname); } catch (Exception) { }
+ try { typefile.MoveTo(newname); } catch (Exception) { }
+ Console.WriteLine("Class no longer present; file renamed: " + Path.Combine(nsdir.Name, typefile.Name));
+ }
}
}
}
@@ -881,58 +1073,77 @@ class MDocUpdater : MDocCommand
// Update existing members. Delete member nodes that no longer should be there,
// and remember what members are already documented so we don't add them again.
- if (true) {
- MyXmlNodeList todelete = new MyXmlNodeList ();
- foreach (DocsNodeInfo info in docEnum.GetDocumentationMembers (basefile, type)) {
- XmlElement oldmember = info.Node;
- MemberReference oldmember2 = info.Member;
- string sig = oldmember2 != null ? memberFormatters [0].GetDeclaration (oldmember2) : null;
-
- // Interface implementations and overrides are deleted from the docs
- // unless the overrides option is given.
- if (oldmember2 != null && sig == null)
- oldmember2 = null;
-
- // Deleted (or signature changed)
- if (oldmember2 == null) {
- if (!no_assembly_versions && UpdateAssemblyVersions (oldmember, new string[]{ GetAssemblyVersion (type.Module.Assembly) }, false))
- continue;
- DeleteMember ("Member Removed", output, oldmember, todelete);
- continue;
- }
-
- // Duplicated
- if (seenmembers.ContainsKey (sig)) {
- if (object.ReferenceEquals (oldmember, seenmembers [sig])) {
- // ignore, already seen
- }
- else if (DefaultMemberComparer.Compare (oldmember, seenmembers [sig]) == 0)
- DeleteMember ("Duplicate Member Found", output, oldmember, todelete);
- else
- Warning ("TODO: found a duplicate member '{0}', but it's not identical to the prior member found!", sig);
+
+ MyXmlNodeList todelete = new MyXmlNodeList ();
+
+ foreach (DocsNodeInfo info in docEnum.GetDocumentationMembers (basefile, type)) {
+ XmlElement oldmember = info.Node;
+ MemberReference oldmember2 = info.Member;
+ string sig = oldmember2 != null ? memberFormatters [0].GetDeclaration (oldmember2) : null;
+
+ // Interface implementations and overrides are deleted from the docs
+ // unless the overrides option is given.
+ if (oldmember2 != null && sig == null)
+ oldmember2 = null;
+
+ // Deleted (or signature changed)
+ if (oldmember2 == null) {
+ if (!no_assembly_versions && UpdateAssemblyVersions (oldmember, new string[]{ GetAssemblyVersion (type.Module.Assembly) }, false))
continue;
+
+ DeleteMember ("Member Removed", output, oldmember, todelete);
+ continue;
+ }
+
+ // Duplicated
+ if (seenmembers.ContainsKey (sig)) {
+ if (object.ReferenceEquals (oldmember, seenmembers [sig])) {
+ // ignore, already seen
}
-
- // Update signature information
- UpdateMember(info);
-
- seenmembers.Add (sig, oldmember);
+ else if (DefaultMemberComparer.Compare (oldmember, seenmembers [sig]) == 0)
+ DeleteMember ("Duplicate Member Found", output, oldmember, todelete);
+ else
+ Warning ("TODO: found a duplicate member '{0}', but it's not identical to the prior member found!", sig);
+ continue;
+ }
+
+ // Update signature information
+ UpdateMember(info);
+
+ // get all apistyles of sig from info.Node
+ var styles = oldmember.GetElementsByTagName ("MemberSignature").Cast<XmlElement> ()
+ .Where (x => x.GetAttribute ("Language") == "C#" && !seenmembers.ContainsKey(x.GetAttribute("Value")))
+ .Select (x => x.GetAttribute ("Value"));
+
+ foreach (var stylesig in styles) {
+ seenmembers.Add (stylesig, oldmember);
}
- foreach (XmlElement oldmember in todelete)
- oldmember.ParentNode.RemoveChild (oldmember);
}
+ foreach (XmlElement oldmember in todelete)
+ oldmember.ParentNode.RemoveChild (oldmember);
+
if (!DocUtils.IsDelegate (type)) {
XmlNode members = WriteElement (basefile.DocumentElement, "Members");
- foreach (MemberReference m in type.GetMembers()) {
- if (m is TypeDefinition) continue;
-
- string sig = memberFormatters [0].GetDeclaration (m);
- if (sig == null) continue;
- if (seenmembers.ContainsKey(sig)) continue;
-
+ var typemembers = type.GetMembers()
+ .Where(m => {
+ if (m is TypeDefinition) return false;
+ string sig = memberFormatters [0].GetDeclaration (m);
+ if (sig == null) return false;
+ if (seenmembers.ContainsKey(sig)) return false;
+ return true;
+ })
+ .ToArray();
+ foreach (MemberReference m in typemembers) {
XmlElement mm = MakeMember(basefile, new DocsNodeInfo (null, m));
if (mm == null) continue;
+
+ if (MDocUpdater.SwitchingToMagicTypes) {
+ // this is a unified style API that obviously doesn't exist in the classic API. Let's mark
+ // it with apistyle="unified", so that it's not displayed for classic style APIs
+ mm.SetAttribute ("apistyle", "unified");
+ }
+
members.AppendChild( mm );
Console.WriteLine("Member Added: " + mm.SelectSingleNode("MemberSignature/@Value").InnerText);
@@ -1032,9 +1243,26 @@ class MDocUpdater : MDocCommand
member.OwnerDocument.DocumentElement.GetAttribute ("FullName"),
member.Attributes ["MemberName"].Value,
member.SelectSingleNode ("MemberSignature[@Language='C#']/@Value").Value);
- if (!delete && MemberDocsHaveUserContent (member)) {
- Warning ("Member deletions must be enabled with the --delete option.");
- } else {
+ if (!delete && MemberDocsHaveUserContent (member)) {
+ Warning ("Member deletions must be enabled with the --delete option.");
+ } else if (HasDroppedNamespace ()) {
+ // if we're dropping the namespace, add the "classic style"
+ var existingAttribute = member.Attributes ["apistyle"];
+ if (existingAttribute != null) {
+ existingAttribute.Value = "classic";
+ } else {
+ // add the attribute and do not remove
+ XmlAttribute apistyleAttr = member.OwnerDocument.CreateAttribute ("apistyle");
+
+ apistyleAttr.Value = "classic";
+
+ member.Attributes.Append (apistyleAttr);
+ }
+ } else if (!HasDroppedNamespace () && member.Attributes ["apistyle"] != null && member.Attributes ["apistyle"].Value == "unified") {
+ // do nothing if there's an apistyle=new attribute and we haven't dropped the namespace
+ } else if (!string.IsNullOrWhiteSpace (PreserveTag)) {
+ // do nothing
+ } else {
todelete.Add (member);
deletions++;
}
@@ -1162,37 +1390,65 @@ class MDocUpdater : MDocCommand
foreach (MemberFormatter f in typeFormatters) {
string element = "TypeSignature[@Language='" + f.Language + "']";
- WriteElementAttribute (root, element, "Language", f.Language);
- WriteElementAttribute (root, element, "Value", f.GetDeclaration (type));
+ string valueToUse = f.GetDeclaration (type);
+
+ AddXmlNode (
+ root.SelectNodes (element).Cast<XmlElement> ().ToArray (),
+ x => x.GetAttribute ("Value") == valueToUse,
+ x => x.SetAttribute ("Value", valueToUse),
+ () => {
+ var node = WriteElementAttribute (root, element, "Language", f.Language, forceNewElement: true);
+ var newnode = WriteElementAttribute (root, node, "Value", valueToUse);
+ return newnode;
+ });
}
- XmlElement ass = WriteElement(root, "AssemblyInfo");
- WriteElementText(ass, "AssemblyName", type.Module.Assembly.Name.Name);
- if (!no_assembly_versions) {
- UpdateAssemblyVersions (root, type, true);
- }
- else {
- var versions = ass.SelectNodes ("AssemblyVersion").Cast<XmlNode> ().ToList ();
- foreach (var version in versions)
- ass.RemoveChild (version);
+ string assemblyInfoNodeFilter = MDocUpdater.HasDroppedNamespace () ? "[@apistyle='unified']" : "[not(@apistyle) or @apistyle='classic']";
+
+ AddXmlNode(
+ root.SelectNodes ("AssemblyInfo" + assemblyInfoNodeFilter).Cast<XmlElement> ().ToArray (),
+ x => x.SelectSingleNode("AssemblyName").InnerText == type.Module.Assembly.Name.Name,
+ x => WriteElementText(x, "AssemblyName", type.Module.Assembly.Name.Name),
+ () => {
+ XmlElement ass = WriteElement(root, "AssemblyInfo", forceNewElement:true);
+
+ if (MDocUpdater.HasDroppedNamespace ()) ass.SetAttribute ("apistyle", "unified");
+
+
+
+ return ass;
+ });
+
+ foreach(var ass in root.SelectNodes ("AssemblyInfo" + assemblyInfoNodeFilter).Cast<XmlElement> ())
+ {
+ WriteElementText(ass, "AssemblyName", type.Module.Assembly.Name.Name);
+ if (!no_assembly_versions) {
+ UpdateAssemblyVersions (root, type, true);
+ }
+ else {
+ var versions = ass.SelectNodes ("AssemblyVersion").Cast<XmlNode> ().ToList ();
+ foreach (var version in versions)
+ ass.RemoveChild (version);
+ }
+ if (!string.IsNullOrEmpty (type.Module.Assembly.Name.Culture))
+ WriteElementText(ass, "AssemblyCulture", type.Module.Assembly.Name.Culture);
+ else
+ ClearElement(ass, "AssemblyCulture");
+
+
+ // Why-oh-why do we put assembly attributes in each type file?
+ // Neither monodoc nor monodocs2html use them, so I'm deleting them
+ // since they're outdated in current docs, and a waste of space.
+ //MakeAttributes(ass, type.Assembly, true);
+ XmlNode assattrs = ass.SelectSingleNode("Attributes");
+ if (assattrs != null)
+ ass.RemoveChild(assattrs);
+
+ NormalizeWhitespace(ass);
}
- if (!string.IsNullOrEmpty (type.Module.Assembly.Name.Culture))
- WriteElementText(ass, "AssemblyCulture", type.Module.Assembly.Name.Culture);
- else
- ClearElement(ass, "AssemblyCulture");
-
- // Why-oh-why do we put assembly attributes in each type file?
- // Neither monodoc nor monodocs2html use them, so I'm deleting them
- // since they're outdated in current docs, and a waste of space.
- //MakeAttributes(ass, type.Assembly, true);
- XmlNode assattrs = ass.SelectSingleNode("Attributes");
- if (assattrs != null)
- ass.RemoveChild(assattrs);
-
- NormalizeWhitespace(ass);
if (type.IsGenericType ()) {
- MakeTypeParameters (root, type.GenericParameters);
+ MakeTypeParameters (root, type.GenericParameters, MDocUpdater.HasDroppedNamespace());
} else {
ClearElement(root, "TypeParameters");
}
@@ -1246,10 +1502,10 @@ class MDocUpdater : MDocCommand
ClearElement(root, "Interfaces");
}
- MakeAttributes (root, GetCustomAttributes (type));
+ MakeAttributes (root, GetCustomAttributes (type), type);
if (DocUtils.IsDelegate (type)) {
- MakeTypeParameters (root, type.GenericParameters);
+ MakeTypeParameters (root, type.GenericParameters, MDocUpdater.HasDroppedNamespace());
MakeParameters(root, type.GetMethod("Invoke").Parameters);
MakeReturnValue(root, type.GetMethod("Invoke"));
}
@@ -1300,12 +1556,23 @@ class MDocUpdater : MDocCommand
foreach (MemberFormatter f in memberFormatters) {
string element = "MemberSignature[@Language='" + f.Language + "']";
- WriteElementAttribute (me, element, "Language", f.Language);
- WriteElementAttribute (me, element, "Value", f.GetDeclaration (mi));
+
+ var valueToUse = f.GetDeclaration (mi);
+
+ AddXmlNode (
+ me.SelectNodes (element).Cast<XmlElement> ().ToArray(),
+ x => x.GetAttribute("Value") == valueToUse,
+ x => x.SetAttribute ("Value", valueToUse),
+ () => {
+ var node = WriteElementAttribute (me, element, "Language", f.Language, forceNewElement:true);
+ var newNode = WriteElementAttribute (me, node, "Value", valueToUse);
+ return newNode;
+ });
+
}
WriteElementText(me, "MemberType", GetMemberType(mi));
-
+
if (!no_assembly_versions) {
UpdateAssemblyVersions (me, mi, true);
}
@@ -1313,15 +1580,15 @@ class MDocUpdater : MDocCommand
ClearElement (me, "AssemblyInfo");
}
- MakeAttributes (me, GetCustomAttributes (mi));
+ MakeAttributes (me, GetCustomAttributes (mi), mi.DeclaringType);
- MakeReturnValue(me, mi);
+ MakeReturnValue(me, mi, MDocUpdater.HasDroppedNamespace());
if (mi is MethodReference) {
MethodReference mb = (MethodReference) mi;
if (mb.IsGenericMethod ())
- MakeTypeParameters (me, mb.GenericParameters);
+ MakeTypeParameters (me, mb.GenericParameters, MDocUpdater.HasDroppedNamespace());
}
- MakeParameters(me, mi);
+ MakeParameters(me, mi, MDocUpdater.HasDroppedNamespace());
string fieldValue;
if (mi is FieldDefinition && GetFieldConstValue ((FieldDefinition)mi, out fieldValue))
@@ -1333,6 +1600,49 @@ class MDocUpdater : MDocCommand
UpdateExtensionMethods (me, info);
}
+ /// <summary>Adds an xml node, reusing the node if it's available</summary>
+ /// <param name="relevant">The existing set of nodes</param>
+ /// <param name="valueMatches">Checks to see if the node's value matches what you're trying to write.</param>
+ /// <param name="setValue">Sets the node's value</param>
+ /// <param name="makeNewNode">Creates a new node, if valueMatches returns false.</param>
+ static void AddXmlNode (XmlElement[] relevant, Func<XmlElement, bool> valueMatches, Action<XmlElement> setValue, Func<XmlElement> makeNewNode)
+ {
+ bool shouldDuplicate = MDocUpdater.HasDroppedNamespace ();
+ var styleToUse = shouldDuplicate ? ApiStyle.Unified : ApiStyle.Classic;
+ var existing = relevant;
+ bool done = false;
+ bool addedOldApiStyle = false;
+
+ if (shouldDuplicate) {
+ existing = existing.Where (n => n.HasApiStyle (styleToUse)).ToArray ();
+ foreach (var n in relevant.Where (n => n.DoesNotHaveApiStyle (styleToUse))) {
+ if (valueMatches (n)) {
+ done = true;
+ }
+ else {
+ n.AddApiStyle (ApiStyle.Classic);
+ addedOldApiStyle = true;
+ }
+ }
+ }
+ if (!done) {
+ if (!existing.Any ()) {
+ var newNode = makeNewNode ();
+ if (shouldDuplicate && addedOldApiStyle) {
+ newNode.AddApiStyle (ApiStyle.Unified);
+ }
+ }
+ else {
+ var itemToReuse = existing.First ();
+ setValue (itemToReuse);
+
+ if (shouldDuplicate && addedOldApiStyle) {
+ itemToReuse.AddApiStyle (styleToUse);
+ }
+ }
+ }
+ }
+
static readonly string[] MemberNodeOrder = {
"MemberSignature",
"MemberType",
@@ -1545,13 +1855,13 @@ class MDocUpdater : MDocCommand
// XML HELPER FUNCTIONS
- internal static XmlElement WriteElement(XmlNode parent, string element) {
+ internal static XmlElement WriteElement(XmlNode parent, string element, bool forceNewElement = false) {
XmlElement ret = (XmlElement)parent.SelectSingleNode(element);
- if (ret == null) {
+ if (ret == null || forceNewElement) {
string[] path = element.Split('/');
foreach (string p in path) {
ret = (XmlElement)parent.SelectSingleNode(p);
- if (ret == null) {
+ if (ret == null || forceNewElement) {
string ename = p;
if (ename.IndexOf('[') >= 0) // strip off XPath predicate
ename = ename.Substring(0, ename.IndexOf('['));
@@ -1565,9 +1875,10 @@ class MDocUpdater : MDocCommand
}
return ret;
}
- private static void WriteElementText(XmlNode parent, string element, string value) {
- XmlElement node = WriteElement(parent, element);
+ private static XmlElement WriteElementText(XmlNode parent, string element, string value, bool forceNewElement = false) {
+ XmlElement node = WriteElement(parent, element, forceNewElement: forceNewElement);
node.InnerText = value;
+ return node;
}
static XmlElement AppendElementText (XmlNode parent, string element, string value)
@@ -1600,10 +1911,15 @@ class MDocUpdater : MDocCommand
node = WriteElement(parent, element);
node.InnerText = value;
}
- private static void WriteElementAttribute(XmlElement parent, string element, string attribute, string value) {
- XmlElement node = WriteElement(parent, element);
- if (node.GetAttribute(attribute) == value) return;
- node.SetAttribute(attribute, value);
+ private static XmlElement WriteElementAttribute(XmlElement parent, string element, string attribute, string value, bool forceNewElement = false) {
+ XmlElement node = WriteElement(parent, element, forceNewElement:forceNewElement);
+ return WriteElementAttribute (parent, node, attribute, value);
+ }
+ private static XmlElement WriteElementAttribute(XmlElement parent, XmlElement node, string attribute, string value) {
+ if (node.GetAttribute (attribute) != value) {
+ node.SetAttribute (attribute, value);
+ }
+ return node;
}
internal static void ClearElement(XmlElement parent, string name) {
XmlElement node = (XmlElement)parent.SelectSingleNode(name);
@@ -1864,11 +2180,29 @@ class MDocUpdater : MDocCommand
root.RemoveChild (av);
}
- XmlElement e = (XmlElement) root.SelectSingleNode ("AssemblyInfo");
+ string oldNodeFilter = "AssemblyInfo[not(@apistyle) or @apistyle='classic']";
+ string newNodeFilter = "AssemblyInfo[@apistyle='unified']";
+ string thisNodeFilter = MDocUpdater.HasDroppedNamespace () ? newNodeFilter : oldNodeFilter;
+ string thatNodeFilter = MDocUpdater.HasDroppedNamespace () ? oldNodeFilter : newNodeFilter;
+
+ XmlElement e = (XmlElement) root.SelectSingleNode (thisNodeFilter);
if (e == null) {
e = root.OwnerDocument.CreateElement("AssemblyInfo");
+
+ if (MDocUpdater.HasDroppedNamespace ()) {
+ e.SetAttribute ("apistyle", "unified");
+ }
+
root.AppendChild(e);
}
+
+ var thatNode = (XmlElement) root.SelectSingleNode (thatNodeFilter);
+ if (MDocUpdater.HasDroppedNamespace () && thatNode != null) {
+ // there's a classic node, we should add apistyles
+ e.SetAttribute ("apistyle", "unified");
+ thatNode.SetAttribute ("apistyle", "classic");
+ }
+
List<XmlNode> matches = e.SelectNodes ("AssemblyVersion").Cast<XmlNode>()
.Where(v => Array.IndexOf (assemblyVersions, v.InnerText) >= 0)
.ToList ();
@@ -1884,12 +2218,16 @@ class MDocUpdater : MDocCommand
e.AppendChild(c);
}
}
- // matches.Count == 0 && !add: ignore -- already not present
+ // matches.Count == 0 && !add: ignore -- already not present
XmlNodeList avs = e.SelectNodes ("AssemblyVersion");
SortXmlNodes (e, avs, new VersionComparer ());
- return avs.Count != 0;
+ bool anyNodesLeft = avs.Count != 0;
+ if (!anyNodesLeft) {
+ e.ParentNode.RemoveChild (e);
+ }
+ return anyNodesLeft;
}
// FIXME: get TypeReferences instead of string comparison?
@@ -1915,7 +2253,7 @@ class MDocUpdater : MDocCommand
"System.Runtime.CompilerServices.DynamicAttribute",
};
- private void MakeAttributes (XmlElement root, IEnumerable<string> attributes)
+ private void MakeAttributes (XmlElement root, IEnumerable<string> attributes, TypeReference t=null)
{
if (!attributes.Any ()) {
ClearElement (root, "Attributes");
@@ -1945,8 +2283,13 @@ class MDocUpdater : MDocCommand
{
if (v == null)
return "null";
- if (valueType.FullName == "System.Type")
- return "typeof(" + v.ToString () + ")";
+ if (valueType.FullName == "System.Type") {
+ var vTypeRef = v as TypeReference;
+ if (vTypeRef != null)
+ return "typeof(" + NativeTypeManager.GetTranslatedName (vTypeRef) + ")"; // TODO: drop NS handling
+ else
+ return "typeof(" + v.ToString () + ")";
+ }
if (valueType.FullName == "System.String")
return "\"" + v.ToString () + "\"";
if (valueType.FullName == "System.Char")
@@ -1990,24 +2333,62 @@ class MDocUpdater : MDocCommand
return Convert.ToInt64 (value);
}
- private void MakeParameters (XmlElement root, IList<ParameterDefinition> parameters)
+ private void MakeParameters (XmlElement root, IList<ParameterDefinition> parameters, bool shouldDuplicateWithNew=false)
{
XmlElement e = WriteElement(root, "Parameters");
- e.RemoveAll();
+
+ int i = 0;
foreach (ParameterDefinition p in parameters) {
- XmlElement pe = root.OwnerDocument.CreateElement("Parameter");
- e.AppendChild(pe);
- pe.SetAttribute("Name", p.Name);
- pe.SetAttribute("Type", GetDocParameterType (p.ParameterType));
- if (p.ParameterType is ByReferenceType) {
- if (p.IsOut) pe.SetAttribute("RefType", "out");
- else pe.SetAttribute("RefType", "ref");
+ XmlElement pe;
+
+ // param info
+ var ptype = GetDocParameterType (p.ParameterType);
+ var newPType = ptype;
+
+ if (MDocUpdater.SwitchingToMagicTypes) {
+ newPType = NativeTypeManager.ConvertFromNativeType (ptype);
+ }
+
+ // now find the existing node, if it's there so we can reuse it.
+ var nodes = root.SelectSingleNode ("Parameters").SelectNodes ("Parameter")
+ .Cast<XmlElement> ().Where (x => x.GetAttribute ("Name") == p.Name)
+ .ToArray();
+
+ if (nodes.Count () == 0) {
+ // wasn't found, let's make sure it wasn't just cause the param name was changed
+ nodes = root.SelectSingleNode ("Parameters").SelectNodes ("Parameter")
+ .Cast<XmlElement> ()
+ .Skip (i) // this makes sure we don't inadvertently "reuse" nodes when adding new ones
+ .Where (x => x.GetAttribute ("Name") != p.Name && (x.GetAttribute ("Type") == ptype || x.GetAttribute ("Type") == newPType))
+ .Take(1) // there might be more than one that meets this parameter ... only take the first.
+ .ToArray();
}
- MakeAttributes (pe, GetCustomAttributes (p.CustomAttributes, ""));
+
+ AddXmlNode (nodes,
+ x => x.GetAttribute ("Type") == ptype,
+ x => x.SetAttribute ("Type", ptype),
+ () => {
+ pe = root.OwnerDocument.CreateElement ("Parameter");
+ e.AppendChild (pe);
+
+ pe.SetAttribute ("Name", p.Name);
+ pe.SetAttribute ("Type", ptype);
+ if (p.ParameterType is ByReferenceType) {
+ if (p.IsOut)
+ pe.SetAttribute ("RefType", "out");
+ else
+ pe.SetAttribute ("RefType", "ref");
+ }
+
+ MakeAttributes (pe, GetCustomAttributes (p.CustomAttributes, ""));
+ return pe;
+ });
+
+ i++;
}
}
- private void MakeTypeParameters (XmlElement root, IList<GenericParameter> typeParams)
+ private void MakeTypeParameters (XmlElement root, IList<GenericParameter> typeParams, bool shouldDuplicateWithNew)
{
if (typeParams == null || typeParams.Count == 0) {
XmlElement f = (XmlElement) root.SelectSingleNode ("TypeParameters");
@@ -2016,53 +2397,71 @@ class MDocUpdater : MDocCommand
return;
}
XmlElement e = WriteElement(root, "TypeParameters");
- e.RemoveAll();
+
+ var nodes = e.SelectNodes ("TypeParameter").Cast<XmlElement> ().ToArray ();
+
foreach (GenericParameter t in typeParams) {
- XmlElement pe = root.OwnerDocument.CreateElement("TypeParameter");
- e.AppendChild(pe);
- pe.SetAttribute("Name", t.Name);
- MakeAttributes (pe, GetCustomAttributes (t.CustomAttributes, ""));
- XmlElement ce = (XmlElement) e.SelectSingleNode ("Constraints");
- IList<TypeReference> constraints = t.Constraints;
- GenericParameterAttributes attrs = t.Attributes;
- if (attrs == GenericParameterAttributes.NonVariant && constraints.Count == 0) {
- if (ce != null)
- e.RemoveChild (ce);
- continue;
- }
- if (ce != null)
- ce.RemoveAll();
- else {
- ce = root.OwnerDocument.CreateElement ("Constraints");
- }
- pe.AppendChild (ce);
- if ((attrs & GenericParameterAttributes.Contravariant) != 0)
- AppendElementText (ce, "ParameterAttribute", "Contravariant");
- if ((attrs & GenericParameterAttributes.Covariant) != 0)
- AppendElementText (ce, "ParameterAttribute", "Covariant");
- if ((attrs & GenericParameterAttributes.DefaultConstructorConstraint) != 0)
- AppendElementText (ce, "ParameterAttribute", "DefaultConstructorConstraint");
- if ((attrs & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0)
- AppendElementText (ce, "ParameterAttribute", "NotNullableValueTypeConstraint");
- if ((attrs & GenericParameterAttributes.ReferenceTypeConstraint) != 0)
- AppendElementText (ce, "ParameterAttribute", "ReferenceTypeConstraint");
- foreach (TypeReference c in constraints) {
- TypeDefinition cd = c.Resolve ();
- AppendElementText (ce,
- (cd != null && cd.IsInterface) ? "InterfaceName" : "BaseTypeName",
- GetDocTypeFullName (c));
- }
+
+ IList<TypeReference> constraints = t.Constraints;
+ GenericParameterAttributes attrs = t.Attributes;
+
+
+ AddXmlNode (
+ nodes,
+ x => {
+ var baseType = e.SelectSingleNode("BaseTypeName");
+ // TODO: should this comparison take into account BaseTypeName?
+ return x.GetAttribute("Name") == t.Name;
+ },
+ x => {}, // no additional action required
+ () => {
+
+ XmlElement pe = root.OwnerDocument.CreateElement("TypeParameter");
+ e.AppendChild(pe);
+ pe.SetAttribute("Name", t.Name);
+ MakeAttributes (pe, GetCustomAttributes (t.CustomAttributes, ""), t.DeclaringType);
+ XmlElement ce = (XmlElement) e.SelectSingleNode ("Constraints");
+ if (attrs == GenericParameterAttributes.NonVariant && constraints.Count == 0) {
+ if (ce != null)
+ e.RemoveChild (ce);
+ return pe;
+ }
+ if (ce != null)
+ ce.RemoveAll();
+ else {
+ ce = root.OwnerDocument.CreateElement ("Constraints");
+ }
+ pe.AppendChild (ce);
+ if ((attrs & GenericParameterAttributes.Contravariant) != 0)
+ AppendElementText (ce, "ParameterAttribute", "Contravariant");
+ if ((attrs & GenericParameterAttributes.Covariant) != 0)
+ AppendElementText (ce, "ParameterAttribute", "Covariant");
+ if ((attrs & GenericParameterAttributes.DefaultConstructorConstraint) != 0)
+ AppendElementText (ce, "ParameterAttribute", "DefaultConstructorConstraint");
+ if ((attrs & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0)
+ AppendElementText (ce, "ParameterAttribute", "NotNullableValueTypeConstraint");
+ if ((attrs & GenericParameterAttributes.ReferenceTypeConstraint) != 0)
+ AppendElementText (ce, "ParameterAttribute", "ReferenceTypeConstraint");
+ foreach (TypeReference c in constraints) {
+ TypeDefinition cd = c.Resolve ();
+ AppendElementText (ce,
+ (cd != null && cd.IsInterface) ? "InterfaceName" : "BaseTypeName",
+ GetDocTypeFullName (c));
+ }
+
+ return pe;
+ });
}
}
- private void MakeParameters (XmlElement root, MemberReference mi)
+ private void MakeParameters (XmlElement root, MemberReference mi, bool shouldDuplicateWithNew)
{
if (mi is MethodDefinition && ((MethodDefinition) mi).IsConstructor)
- MakeParameters (root, ((MethodDefinition)mi).Parameters);
+ MakeParameters (root, ((MethodDefinition)mi).Parameters, shouldDuplicateWithNew);
else if (mi is MethodDefinition) {
MethodDefinition mb = (MethodDefinition) mi;
IList<ParameterDefinition> parameters = mb.Parameters;
- MakeParameters(root, parameters);
+ MakeParameters(root, parameters, shouldDuplicateWithNew);
if (parameters.Count > 0 && DocUtils.IsExtensionMethod (mb)) {
XmlElement p = (XmlElement) root.SelectSingleNode ("Parameters/Parameter[position()=1]");
p.SetAttribute ("RefType", "this");
@@ -2071,7 +2470,7 @@ class MDocUpdater : MDocCommand
else if (mi is PropertyDefinition) {
IList<ParameterDefinition> parameters = ((PropertyDefinition)mi).Parameters;
if (parameters.Count > 0)
- MakeParameters(root, parameters);
+ MakeParameters(root, parameters, shouldDuplicateWithNew);
else
return;
}
@@ -2085,27 +2484,35 @@ class MDocUpdater : MDocCommand
return GetDocTypeFullName (type).Replace ("@", "&");
}
- private void MakeReturnValue (XmlElement root, TypeReference type, IList<CustomAttribute> attributes)
- {
- XmlElement e = WriteElement(root, "ReturnValue");
- e.RemoveAll();
- WriteElementText(e, "ReturnType", GetDocTypeFullName (type));
- if (attributes != null)
- MakeAttributes(e, GetCustomAttributes (attributes, ""));
+ private void MakeReturnValue (XmlElement root, TypeReference type, IList<CustomAttribute> attributes, bool shouldDuplicateWithNew=false)
+ {
+ XmlElement e = WriteElement(root, "ReturnValue");
+ var valueToUse = GetDocTypeFullName (type);
+
+ AddXmlNode (e.SelectNodes("ReturnType").Cast<XmlElement> ().ToArray (),
+ x => x.InnerText == valueToUse,
+ x => x.InnerText = valueToUse,
+ () => {
+ var newNode = WriteElementText(e, "ReturnType", valueToUse, forceNewElement: true);
+ if (attributes != null)
+ MakeAttributes(e, GetCustomAttributes (attributes, ""), type);
+
+ return newNode;
+ });
}
- private void MakeReturnValue (XmlElement root, MemberReference mi)
+ private void MakeReturnValue (XmlElement root, MemberReference mi, bool shouldDuplicateWithNew=false)
{
if (mi is MethodDefinition && ((MethodDefinition) mi).IsConstructor)
return;
else if (mi is MethodDefinition)
- MakeReturnValue (root, ((MethodDefinition)mi).ReturnType, ((MethodDefinition)mi).MethodReturnType.CustomAttributes);
+ MakeReturnValue (root, ((MethodDefinition)mi).ReturnType, ((MethodDefinition)mi).MethodReturnType.CustomAttributes, shouldDuplicateWithNew);
else if (mi is PropertyDefinition)
- MakeReturnValue (root, ((PropertyDefinition)mi).PropertyType, null);
+ MakeReturnValue (root, ((PropertyDefinition)mi).PropertyType, null, shouldDuplicateWithNew);
else if (mi is FieldDefinition)
- MakeReturnValue (root, ((FieldDefinition)mi).FieldType, null);
+ MakeReturnValue (root, ((FieldDefinition)mi).FieldType, null, shouldDuplicateWithNew);
else if (mi is EventDefinition)
- MakeReturnValue (root, ((EventDefinition)mi).EventType, null);
+ MakeReturnValue (root, ((EventDefinition)mi).EventType, null, shouldDuplicateWithNew);
else
throw new ArgumentException(mi + " is a " + mi.GetType().FullName);
}
@@ -2127,7 +2534,7 @@ class MDocUpdater : MDocCommand
XmlElement me = doc.CreateElement("Member");
me.SetAttribute("MemberName", GetMemberName (mi));
-
+
info.Node = me;
UpdateMember(info);
if (exceptions.HasValue &&
@@ -2283,7 +2690,11 @@ class MDocUpdater : MDocCommand
static class CecilExtensions {
public static string GetDeclaringType(this CustomAttribute attribute)
{
- return attribute.Constructor.DeclaringType.FullName;
+ var type = attribute.Constructor.DeclaringType;
+ var typeName = type.FullName;
+
+ string translatedType = NativeTypeManager.GetTranslatedName (type);
+ return translatedType;
}
public static IEnumerable<MemberReference> GetMembers (this TypeDefinition type)
@@ -2407,7 +2818,30 @@ static class CecilExtensions {
}
}
+enum ApiStyle {
+ Classic,
+ Unified
+}
+
static class DocUtils {
+
+ public static bool DoesNotHaveApiStyle(this XmlElement element, ApiStyle style) {
+ string styleString = style.ToString ().ToLower ();
+ string apistylevalue = element.GetAttribute ("apistyle");
+ return apistylevalue != styleString || string.IsNullOrWhiteSpace(apistylevalue);
+ }
+ public static bool HasApiStyle(this XmlElement element, ApiStyle style) {
+ string styleString = style.ToString ().ToLower ();
+ return element.GetAttribute ("apistyle") == styleString;
+ }
+ public static void AddApiStyle(this XmlElement element, ApiStyle style) {
+ string styleString = style.ToString ().ToLower ();
+ var existingValue = element.GetAttribute ("apistyle");
+ if (string.IsNullOrWhiteSpace (existingValue) || existingValue != styleString) {
+ element.SetAttribute ("apistyle", styleString);
+ }
+ }
+
public static bool IsExplicitlyImplemented (MethodDefinition method)
{
return method.IsPrivate && method.IsFinal && method.IsVirtual;
@@ -2473,7 +2907,16 @@ static class DocUtils {
type = type.DeclaringType;
if (type == null)
return string.Empty;
- return type.Namespace;
+
+ string typeNS = type.Namespace;
+
+ // first, make sure this isn't a type reference to another assembly/module
+
+ bool isInAssembly = MDocUpdater.IsInAssemblies(type.Module.Name);
+ if (isInAssembly && MDocUpdater.HasDroppedNamespace () && !typeNS.StartsWith ("System")) {
+ typeNS = string.Format ("{0}.{1}", MDocUpdater.droppedNamespace, typeNS);
+ }
+ return typeNS;
}
public static string PathCombine (string dir, string path)
@@ -2646,10 +3089,15 @@ class DocsNodeInfo {
public bool AddRemarks = true;
public MemberReference Member;
public TypeDefinition Type;
+
+ public override string ToString ()
+ {
+ return string.Format ("{0} - {1} - {2}", Type, Member, Node == null ? "no xml" : "with xml");
+ }
}
class DocumentationEnumerator {
-
+
public virtual IEnumerable<TypeDefinition> GetDocumentationTypes (AssemblyDefinition assembly, List<string> forTypes)
{
return GetDocumentationTypes (assembly, forTypes, null);
@@ -2692,10 +3140,16 @@ class DocumentationEnumerator {
string returntype = member.ReturnType;
string docName = member.MemberName;
+
string[] docTypeParams = GetTypeParameters (docName);
+ // If we're using 'magic types', then we might get false positives ... in those cases, we keep searching
+ MemberReference likelyCandidate = null;
+
// Loop through all members in this type with the same name
- foreach (MemberReference mi in GetReflectionMembers (type, docName)) {
+ var reflectedMembers = GetReflectionMembers (type, docName).ToArray ();
+ foreach (MemberReference mi in reflectedMembers) {
+ bool matchedMagicType = false;
if (mi is TypeDefinition) continue;
if (MDocUpdater.GetMemberType(mi) != membertype) continue;
@@ -2725,11 +3179,21 @@ class DocumentationEnumerator {
MethodDefinition mDef = mi as MethodDefinition;
if (mDef != null && !mDef.IsConstructor) {
// Casting operators can overload based on return type.
- if (returntype != GetReplacedString (
- MDocUpdater.GetDocTypeFullName (((MethodDefinition)mi).ReturnType),
- typeParams, docTypeParams)) {
+ string rtype = GetReplacedString (
+ MDocUpdater.GetDocTypeFullName (((MethodDefinition)mi).ReturnType),
+ typeParams, docTypeParams);
+ string originalRType = rtype;
+ if (MDocUpdater.SwitchingToMagicTypes) {
+ rtype = NativeTypeManager.ConvertFromNativeType (rtype);
+
+ }
+ if ((returntype != rtype && originalRType == rtype) ||
+ (MDocUpdater.SwitchingToMagicTypes && returntype != originalRType && returntype != rtype && originalRType != rtype)) {
continue;
}
+
+ if (originalRType != rtype)
+ matchedMagicType = true;
}
if (pcount == 0)
@@ -2739,17 +3203,47 @@ class DocumentationEnumerator {
string paramType = GetReplacedString (
MDocUpdater.GetDocParameterType (pis [i].ParameterType),
typeParams, docTypeParams);
- if (paramType != (string) member.Parameters [i]) {
- good = false;
- break;
+
+ // if magictypes, replace paramType to "classic value" ... so the comparison works
+ string originalParamType = paramType;
+ if (MDocUpdater.SwitchingToMagicTypes) {
+ paramType = NativeTypeManager.ConvertFromNativeType (paramType);
+ }
+
+ string xmlMemberType = member.Parameters [i];
+ if ((!paramType.Equals(xmlMemberType) && paramType.Equals(originalParamType)) ||
+ (MDocUpdater.SwitchingToMagicTypes && !originalParamType.Equals(xmlMemberType) && !paramType.Equals(xmlMemberType) && !paramType.Equals(originalParamType))) {
+
+ // did not match ... if we're dropping the namespace, and the paramType has the dropped
+ // namespace, we should see if it matches when added
+ bool stillDoesntMatch = true;
+ if (MDocUpdater.HasDroppedNamespace() && paramType.StartsWith (MDocUpdater.droppedNamespace)) {
+ string withDroppedNs = string.Format ("{0}.{1}", MDocUpdater.droppedNamespace, xmlMemberType);
+
+ stillDoesntMatch = withDroppedNs != paramType;
+ }
+
+ if (stillDoesntMatch) {
+ good = false;
+ break;
+ }
}
+
+ if (originalParamType != paramType)
+ matchedMagicType = true;
}
if (!good) continue;
+ if (MDocUpdater.SwitchingToMagicTypes && likelyCandidate == null && matchedMagicType) {
+ // we matched this on a magic type conversion ... let's keep going to see if there's another one we should look at that matches more closely
+ likelyCandidate = mi;
+ continue;
+ }
+
return mi;
}
- return null;
+ return likelyCandidate;
}
static string[] GetTypeParameters (string docName)
@@ -2774,6 +3268,13 @@ class DocumentationEnumerator {
protected static IEnumerable<MemberReference> GetReflectionMembers (TypeDefinition type, string docName)
{
+ // In case of dropping the namespace, we have to remove the dropped NS
+ // so that docName will match what's in the assembly/type
+ if (MDocUpdater.HasDroppedNamespace () && docName.StartsWith(MDocUpdater.droppedNamespace + ".")) {
+ int droppedNsLength = MDocUpdater.droppedNamespace.Length;
+ docName = docName.Substring (droppedNsLength + 1, docName.Length - droppedNsLength - 1);
+ }
+
// need to worry about 4 forms of //@MemberName values:
// 1. "Normal" (non-generic) member names: GetEnumerator
// - Lookup as-is.
@@ -2959,6 +3460,7 @@ class EcmaDocumentationEnumerator : DocumentationEnumerator {
if (membersDepth != ecmadocs.Depth - 1 || ecmadocs.NodeType != XmlNodeType.Element)
continue;
DocumentationMember dm = new DocumentationMember (ecmadocs);
+
string xp = MDocUpdater.GetXPathForMember (dm);
XmlElement oldmember = (XmlElement) basefile.SelectSingleNode (xp);
MemberReference m;
@@ -3234,19 +3736,28 @@ class DocumentationMember {
do {
if (reader.NodeType != XmlNodeType.Element)
continue;
+
+ bool shouldUse = true;
+ try {
+ string apistyle = reader.GetAttribute ("apistyle");
+ shouldUse = string.IsNullOrWhiteSpace(apistyle) || apistyle == "classic"; // only use this tag if it's an 'classic' style node
+ }
+ catch (Exception ex) {}
switch (reader.Name) {
case "MemberSignature":
- MemberSignatures [reader.GetAttribute ("Language")] = reader.GetAttribute ("Value");
+ if (shouldUse) {
+ MemberSignatures [reader.GetAttribute ("Language")] = reader.GetAttribute ("Value");
+ }
break;
case "MemberType":
MemberType = reader.ReadElementString ();
break;
case "ReturnType":
- if (reader.Depth == depth + 2)
+ if (reader.Depth == depth + 2 && shouldUse)
ReturnType = reader.ReadElementString ();
break;
case "Parameter":
- if (reader.Depth == depth + 2)
+ if (reader.Depth == depth + 2 && shouldUse)
p.Add (reader.GetAttribute ("Type"));
break;
case "Docs":
@@ -3266,14 +3777,16 @@ class DocumentationMember {
foreach (XmlNode n in node.SelectNodes ("MemberSignature")) {
XmlAttribute l = n.Attributes ["Language"];
XmlAttribute v = n.Attributes ["Value"];
- if (l != null && v != null)
+ XmlAttribute apistyle = n.Attributes ["apistyle"];
+ bool shouldUse = apistyle == null || apistyle.Value == "classic";
+ if (l != null && v != null && shouldUse)
MemberSignatures [l.Value] = v.Value;
}
MemberType = node.SelectSingleNode ("MemberType").InnerText;
- XmlNode rt = node.SelectSingleNode ("ReturnValue/ReturnType");
+ XmlNode rt = node.SelectSingleNode ("ReturnValue/ReturnType[not(@apistyle) or @apistyle='classic']");
if (rt != null)
ReturnType = rt.InnerText;
- XmlNodeList p = node.SelectNodes ("Parameters/Parameter");
+ XmlNodeList p = node.SelectNodes ("Parameters/Parameter[not(@apistyle) or @apistyle='classic']");
if (p.Count > 0) {
Parameters = new StringList (p.Count);
for (int i = 0; i < p.Count; ++i)
@@ -3673,7 +4186,7 @@ class ILFullMemberFormatter : MemberFormatter {
return buf;
}
- private static string GetBuiltinType (string t)
+ protected static string GetBuiltinType (string t)
{
switch (t) {
case "System.Byte": return "unsigned int8";
@@ -4170,6 +4683,36 @@ class ILMemberFormatter : ILFullMemberFormatter {
}
}
+ class ILNativeTypeMemberFormatter : ILFullMemberFormatter {
+ protected static string _GetBuiltinType (string t)
+ {
+ //string moddedType = base.GetBuiltinType (t);
+ return null;
+ //return moddedType;
+ }
+ }
+
+ class CSharpNativeTypeMemberFormatter : CSharpFullMemberFormatter {
+ protected override string GetCSharpType (string t) {
+ string moddedType = base.GetCSharpType (t);
+
+ switch (moddedType) {
+ case "int": return "nint";
+ case "uint":
+ return "nuint";
+ case "float":
+ return "nfloat";
+ case "System.Drawing.SizeF":
+ return "CoreGraphics.CGSize";
+ case "System.Drawing.PointF":
+ return "CoreGraphics.CGPoint";
+ case "System.Drawing.RectangleF":
+ return "CoreGraphics.CGPoint";
+ }
+ return null;
+ }
+ }
+
class CSharpFullMemberFormatter : MemberFormatter {
public override string Language {
@@ -4178,13 +4721,14 @@ class CSharpFullMemberFormatter : MemberFormatter {
protected override StringBuilder AppendNamespace (StringBuilder buf, TypeReference type)
{
+
string ns = DocUtils.GetNamespace (type);
if (GetCSharpType (type.FullName) == null && ns != null && ns.Length > 0 && ns != "System")
buf.Append (ns).Append ('.');
return buf;
}
- private string GetCSharpType (string t)
+ protected virtual string GetCSharpType (string t)
{
switch (t) {
case "System.Byte": return "byte";
diff --git a/mcs/tools/mdoc/Mono.Documentation/preserver.cs b/mcs/tools/mdoc/Mono.Documentation/preserver.cs
new file mode 100644
index 00000000000..54bb7ffdb51
--- /dev/null
+++ b/mcs/tools/mdoc/Mono.Documentation/preserver.cs
@@ -0,0 +1,34 @@
+// Command to preserve member documentation for types that are changing in a subsequent version
+// By Joel Martinez <joel.martinez@xamarin.com
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Mono.Options;
+
+namespace Mono.Documentation
+{
+ public class MDocPreserve : MDocCommand
+ {
+ MDocUpdater updater;
+
+ public MDocPreserve ()
+ {
+ updater = new MDocUpdater ();
+ }
+
+ public override void Run (IEnumerable<string> args)
+ {
+ string preserveName = string.Empty;
+ var p = new OptionSet () { { "name=",
+ "Root {DIRECTORY} to generate/update documentation.",
+ v => preserveName = v
+ }
+ };
+
+ updater.PreserveTag = preserveName;
+
+ updater.Run (args);
+ }
+ }
+}
+
diff --git a/mcs/tools/mdoc/mdoc.csproj b/mcs/tools/mdoc/mdoc.csproj
index 54a01885381..3394c9b2429 100644
--- a/mcs/tools/mdoc/mdoc.csproj
+++ b/mcs/tools/mdoc/mdoc.csproj
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
- <ProductVersion>9.0.21022</ProductVersion>
+ <ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{7DA7CD97-614F-4BCD-A2FA-B379590CEA48}</ProjectGuid>
<OutputType>Exe</OutputType>
@@ -35,12 +35,11 @@
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="ICSharpCode.SharpZipLib" />
- <Reference Include="monodoc, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\class\lib\net_2_0\monodoc.dll</HintPath>
- </Reference>
<Reference Include="System.Xml" />
<Reference Include="Mono.Cecil, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
+ <Reference Include="monodoc">
+ <HintPath>..\..\class\lib\net_4_0\monodoc.dll</HintPath>
+ </Reference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>
@@ -67,6 +66,7 @@
<Compile Include="Mono.Documentation\XhtmlWriter.cs" />
<Compile Include="Mono.Documentation\exceptions.cs" />
<Compile Include="Mono.Documentation\index.cs" />
+ <Compile Include="Mono.Documentation\preserver.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\defaulttemplate.xsl">
diff --git a/mcs/tools/mdoc/mdoc.exe.sources b/mcs/tools/mdoc/mdoc.exe.sources
index 1a9bfb0ed5e..571991475a1 100644
--- a/mcs/tools/mdoc/mdoc.exe.sources
+++ b/mcs/tools/mdoc/mdoc.exe.sources
@@ -15,5 +15,6 @@ Mono.Documentation/normalize.cs
Mono.Documentation/validate.cs
Mono.Documentation/webdoc.cs
Mono.Documentation/XhtmlWriter.cs
+Mono.Documentation/preserver.cs
Mono.Rocks/ObjectRocks.cs
Mono.Rocks/StreamRocks.cs
diff --git a/mcs/tools/mono-service/AssemblyInfo.cs b/mcs/tools/mono-service/AssemblyInfo.cs
index 8e8a267a32c..b859b556623 100644
--- a/mcs/tools/mono-service/AssemblyInfo.cs
+++ b/mcs/tools/mono-service/AssemblyInfo.cs
@@ -47,18 +47,12 @@ using System.Runtime.InteropServices;
[assembly: AssemblyProduct("MONO CLI")]
[assembly: AssemblyCopyright("(c) 2003 Various Authors")]
[assembly: AssemblyTrademark("")]
-#if TARGET_JVM
-[assembly: CLSCompliant(false)]
-#else
[assembly: CLSCompliant(true)]
-#endif
[assembly: ComVisible(false)]
[assembly: AssemblyDefaultAlias("mono-service.exe")]
[assembly: AssemblyInformationalVersion("0.0.0.1")]
[assembly: NeutralResourcesLanguage("en-US")]
[assembly: AllowPartiallyTrustedCallers()]
-#if !TARGET_JVM
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("../../class/mono.snk")]
-#endif
diff --git a/mcs/tools/mono-shlib-cop/Makefile b/mcs/tools/mono-shlib-cop/Makefile
index ec9d5a2a87d..f63dafc218f 100644
--- a/mcs/tools/mono-shlib-cop/Makefile
+++ b/mcs/tools/mono-shlib-cop/Makefile
@@ -20,7 +20,7 @@ cleanup:
run-test-local: run-mono-shlib-cop-test
run-mono-shlib-cop-test: $(the_lib) $(TEST_INPUT)
- $(RUNTIME) $(the_lib) $(TEST_INPUT) | diff - test.dll.out
+ MONO_PATH="$(topdir)/class/lib/$(PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(the_lib) $(TEST_INPUT) | diff - test.dll.out
$(TEST_INPUT) : test.cs
$(CSCOMPILE) -target:library $< -out:$@
diff --git a/mcs/tools/mono-shlib-cop/test.cs b/mcs/tools/mono-shlib-cop/test.cs
index d67d7b778c2..bfd106b7504 100644
--- a/mcs/tools/mono-shlib-cop/test.cs
+++ b/mcs/tools/mono-shlib-cop/test.cs
@@ -42,8 +42,8 @@ namespace Mono.Unmanaged.Check {
private static extern int g_module_close (IntPtr handle);
// Warning
- [DllImport ("libglib-2.0.so")]
- private static extern void g_free (IntPtr mem);
+ [DllImport ("libMonoPosixHelper.so")]
+ private static extern int Mono_Posix_Stdlib_TMP_MAX ();
// Error: no such library
[DllImport ("does-not-exist")]
@@ -60,7 +60,7 @@ namespace Mono.Unmanaged.Check {
Test ()
{
g_module_close (IntPtr.Zero);
- g_free (IntPtr.Zero);
+ Mono_Posix_Stdlib_TMP_MAX ();
Foo ();
RenameMe ();
DoesNotExist ();
diff --git a/mcs/tools/mono-shlib-cop/test.dll.config b/mcs/tools/mono-shlib-cop/test.dll.config
index 61206632ce7..26300cfe18e 100644
--- a/mcs/tools/mono-shlib-cop/test.dll.config
+++ b/mcs/tools/mono-shlib-cop/test.dll.config
@@ -1,4 +1,5 @@
<configuration>
+ <dllmap dll="libMonoPosixHelper.so" target="../../../support/.libs/libMonoPosixHelper.so" />
<dllmap dll="libgmodule-2.0.so" target="libgmodule-2.0.so.0"/>
<dllmap dll="renamed-lib" target="libc.so.6"/>
</configuration>
diff --git a/mcs/tools/mono-shlib-cop/test.dll.out b/mcs/tools/mono-shlib-cop/test.dll.out
index d5698c3ef1b..0700423d4db 100644
--- a/mcs/tools/mono-shlib-cop/test.dll.out
+++ b/mcs/tools/mono-shlib-cop/test.dll.out
@@ -1,4 +1,4 @@
error: in Mono.Unmanaged.Check.Test.Foo: Could not load library `does-not-exist': ./libdoes-not-exist.so: cannot open shared object file: No such file or directory
error: in Mono.Unmanaged.Check.Test.RenameMe: library `libc.so.6' is missing symbol `RenameMe'
error: in Mono.Unmanaged.Check.Test.DoesNotExist: library `libc.so.6' is missing symbol `DoesNotExist'
-warning: in Mono.Unmanaged.Check.Test.g_free: Library `libglib-2.0.so' might be a development library
+warning: in Mono.Unmanaged.Check.Test.Mono_Posix_Stdlib_TMP_MAX: Library `../../../support/.libs/libMonoPosixHelper.so' might be a development library
diff --git a/mcs/tools/mono-xmltool/xmltool.cs b/mcs/tools/mono-xmltool/xmltool.cs
index 706d2cfc762..174176f6788 100644
--- a/mcs/tools/mono-xmltool/xmltool.cs
+++ b/mcs/tools/mono-xmltool/xmltool.cs
@@ -5,7 +5,7 @@ using System.Xml;
using System.Xml.Schema;
using System.Xml.Xsl;
using System.Xml.XPath;
-#if !TARGET_JVM && !MSNET
+#if !MSNET
using Commons.Xml.Nvdl;
using Commons.Xml.Relaxng;
using Commons.Xml.Relaxng.Rnc;
@@ -63,7 +63,7 @@ environment variable that affects behavior:
case "--help":
Usage ();
return;
-#if !TARGET_JVM && !MSNET
+#if !MSNET
case "--validate":
ValidateAuto (args);
return;
@@ -95,7 +95,7 @@ environment variable that affects behavior:
}
}
-#if !TARGET_JVM && !MSNET
+#if !MSNET
static void ValidateAuto (string [] args)
{
if (args.Length < 1) {
diff --git a/mono/Makefile.am b/mono/Makefile.am
index 495f16922ed..df1a9c1c22e 100644
--- a/mono/Makefile.am
+++ b/mono/Makefile.am
@@ -1,5 +1,5 @@
if CROSS_COMPILING
-SUBDIRS = arch utils io-layer cil metadata $(interpreter_dir) mini dis profiler
+SUBDIRS = arch utils io-layer cil metadata mini dis profiler
else
if INSTALL_MONOTOUCH
SUBDIRS = utils io-layer metadata arch mini profiler
@@ -26,7 +26,7 @@ monotouch-do-clean:
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \
done;
else
-SUBDIRS = arch utils io-layer cil metadata $(interpreter_dir) mini dis monograph tests unit-tests benchmark profiler
+SUBDIRS = arch utils io-layer cil metadata mini dis monograph tests unit-tests benchmark profiler
endif
endif
-DIST_SUBDIRS = arch utils io-layer cil metadata interpreter mini dis monograph tests unit-tests benchmark profiler
+DIST_SUBDIRS = arch utils io-layer cil metadata mini dis monograph tests unit-tests benchmark profiler
diff --git a/mono/arch/Makefile.am b/mono/arch/Makefile.am
index 3d687949f92..87416872f6e 100644
--- a/mono/arch/Makefile.am
+++ b/mono/arch/Makefile.am
@@ -2,24 +2,10 @@ DIST_SUBDIRS = x86 ppc sparc arm arm64 s390x amd64 ia64 mips
AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
-if INTERP_SUPPORTED
-SUBDIRS = $(arch_target)
-else
if ARM
# arm needs to build some stuff even in JIT mode
SUBDIRS = $(arch_target)
endif
-endif
-
-if INTERP_SUPPORTED
-
-noinst_LTLIBRARIES = libmonoarch.la
-
-libmonoarch_la_SOURCES = unknown.c
-
-libmonoarch_la_LIBADD = $(arch_target)/libmonoarch-$(arch_target).la
-
-endif
EXTRA_DIST = ChangeLog
diff --git a/mono/arch/amd64/Makefile.am b/mono/arch/amd64/Makefile.am
index 3c728263190..47daaaff699 100644
--- a/mono/arch/amd64/Makefile.am
+++ b/mono/arch/amd64/Makefile.am
@@ -1,7 +1,2 @@
-
-AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
-
-noinst_LTLIBRARIES = libmonoarch-amd64.la
-
-libmonoarch_amd64_la_SOURCES = tramp.c amd64-codegen.h
+EXTRA_DIST = amd64-codegen.h
diff --git a/mono/arch/amd64/tramp.c b/mono/arch/amd64/tramp.c
deleted file mode 100644
index 6dbec93e859..00000000000
--- a/mono/arch/amd64/tramp.c
+++ /dev/null
@@ -1,1054 +0,0 @@
-/*
- * Create trampolines to invoke arbitrary functions.
- *
- * Copyright (C) Ximian Inc.
- *
- * Author:
- * Zalman Stern
- * Based on code by:
- * Paolo Molaro (lupus@ximian.com)
- * Dietmar Maurer (dietmar@ximian.com)
- *
- * To understand this code, one will want to the calling convention section of the ABI sepc at:
- * http://x86-64.org/abi.pdf
- * and the AMD64 architecture docs found at amd.com .
- */
-
-#include "config.h"
-#include <stdlib.h>
-#include <string.h>
-#include "amd64-codegen.h"
-#include "mono/metadata/class.h"
-#include "mono/metadata/tabledefs.h"
-#include "mono/interpreter/interp.h"
-#include "mono/metadata/appdomain.h"
-#include "mono/metadata/marshal.h"
-
-/*
- * The resulting function takes the form:
- * void func (void (*callme)(), void *retval, void *this_obj, stackval *arguments);
- */
-#define FUNC_ADDR_POS 8
-#define RETVAL_POS 12
-#define THIS_POS 16
-#define ARGP_POS 20
-#define LOC_POS -4
-
-#define ARG_SIZE sizeof (stackval)
-
-#define MAX_INT_ARG_REGS 6
-#define MAX_FLOAT_ARG_REGS 8
-
-// TODO get these right. They are upper bounds anyway, so it doesn't much matter.
-#define PUSH_INT_STACK_ARG_SIZE 16
-#define MOVE_INT_REG_ARG_SIZE 16
-#define PUSH_FLOAT_STACK_ARG_SIZE 16
-#define MOVE_FLOAT_REG_ARG_SIZE 16
-#define COPY_STRUCT_STACK_ARG_SIZE 16
-
-/* Maps an argument number (starting at 0) to the register it is passed in (if it fits).
- * E.g. int foo(int bar, int quux) has the foo arg in RDI and the quux arg in RSI
- * There is no such map for floating point args as they go in XMM0-XMM7 in order and thus the
- * index is the register number.
- */
-static int int_arg_regs[] = { AMD64_RDI, AMD64_RSI, AMD64_RDX, AMD64_RCX, AMD64_R8, AMD64_R9 };
-
-/* This next block of code resolves the ABI rules for passing structures in the argument registers.
- * These basically amount to "Use up to two registers if they are all integer or all floating point.
- * If the structure is bigger than two registers or would be in one integer register and one floating point,
- * it is passed in memory instead.
- *
- * It is possible this code needs to be recursive to be correct in the case when one of the structure members
- * is itself a structure.
- *
- * The 80-bit floating point stuff is ignored.
- */
-typedef enum {
- ARG_IN_MEMORY,
- ARG_IN_INT_REGS,
- ARG_IN_FLOAT_REGS
-} struct_arg_type;
-
-static struct_arg_type compute_arg_type(MonoType *type)
-{
- guint32 simpletype = type->type;
-
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_I8:
- return ARG_IN_INT_REGS;
- break;
- case MONO_TYPE_VALUETYPE: {
- if (type->data.klass->enumtype)
- return ARG_IN_INT_REGS;
- return ARG_IN_MEMORY;
- break;
- }
- case MONO_TYPE_R4:
- case MONO_TYPE_R8:
- return ARG_IN_FLOAT_REGS;
- break;
- default:
- g_error ("Can't trampoline 0x%x", type->type);
- }
-
- return ARG_IN_MEMORY;
-}
-
-static struct_arg_type value_type_info(MonoClass *klass, int *native_size, int *regs_used, int *offset1, int *size1, int *offset2, int *size2)
-{
- MonoMarshalType *info = mono_marshal_load_type_info (klass);
-
- *native_size = info->native_size;
-
- if (info->native_size > 8 || info->num_fields > 2)
- {
- *regs_used = 0;
- *offset1 = -1;
- *offset2 = -1;
- return ARG_IN_MEMORY;
- }
-
- if (info->num_fields == 1)
- {
- struct_arg_type result = compute_arg_type(info->fields[0].field->type);
- if (result != ARG_IN_MEMORY)
- {
- *regs_used = 1;
- *offset1 = info->fields[0].offset;
- *size1 = mono_marshal_type_size (info->fields[0].field->type, info->fields[0].mspec, NULL, 1, 1);
- }
- else
- {
- *regs_used = 0;
- *offset1 = -1;
- }
-
- *offset2 = -1;
- return result;
- }
-
- struct_arg_type result1 = compute_arg_type(info->fields[0].field->type);
- struct_arg_type result2 = compute_arg_type(info->fields[0].field->type);
-
- if (result1 == result2 && result1 != ARG_IN_MEMORY)
- {
- *regs_used = 2;
- *offset1 = info->fields[0].offset;
- *size1 = mono_marshal_type_size (info->fields[0].field->type, info->fields[0].mspec, NULL, 1, 1);
- *offset2 = info->fields[1].offset;
- *size2 = mono_marshal_type_size (info->fields[1].field->type, info->fields[1].mspec, NULL, 1, 1);
- return result1;
- }
-
- return ARG_IN_MEMORY;
-}
-
-MonoPIFunc
-mono_arch_create_trampoline (MonoMethodSignature *sig, gboolean string_ctor)
-{
- unsigned char *p, *code_buffer;
- guint32 stack_size = 0, code_size = 50;
- guint32 arg_pos, simpletype;
- int i;
- static GHashTable *cache = NULL;
- MonoPIFunc res;
-
- guint32 int_arg_regs_used = 0;
- guint32 float_arg_regs_used = 0;
- guint32 next_int_arg_reg = 0;
- guint32 next_float_arg_reg = 0;
- /* Indicates that the return value is filled in inside the called function. */
- int retval_implicit = 0;
- char *arg_in_reg_bitvector; /* A set index by argument number saying if it is in a register
- (integer or floating point according to type) */
-
- if (!cache)
- cache = g_hash_table_new ((GHashFunc)mono_signature_hash,
- (GCompareFunc)mono_metadata_signature_equal);
-
- if ((res = (MonoPIFunc)g_hash_table_lookup (cache, sig)))
- return res;
-
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref && !sig->ret->data.klass->enumtype) {
- int_arg_regs_used++;
- code_size += MOVE_INT_REG_ARG_SIZE;
- }
-
- if (sig->hasthis) {
- int_arg_regs_used++;
- code_size += MOVE_INT_REG_ARG_SIZE;
- }
-
- /* Run through stuff to calculate code size and argument bytes that will be pushed on stack (stack_size). */
- for (i = 0; i < sig->param_count; ++i) {
- if (sig->params [i]->byref)
- simpletype = MONO_TYPE_PTR;
- else
- simpletype = sig->params [i]->type;
-enum_calc_size:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_I8:
- if (int_arg_regs_used++ > MAX_INT_ARG_REGS) {
- stack_size += 8;
- code_size += PUSH_INT_STACK_ARG_SIZE;
- }
- else
- code_size += MOVE_INT_REG_ARG_SIZE;
- break;
- case MONO_TYPE_VALUETYPE: {
- int size;
- int arg_type;
- int regs_used;
- int offset1;
- int size1;
- int offset2;
- int size2;
-
- if (sig->params [i]->data.klass->enumtype) {
- simpletype = sig->params [i]->data.klass->enum_basetype->type;
- goto enum_calc_size;
- }
-
- arg_type = value_type_info(sig->params [i]->data.klass, &size, &regs_used, &offset1, &size1, &offset2, &size2);
- if (arg_type == ARG_IN_INT_REGS &&
- (int_arg_regs_used + regs_used) <= MAX_INT_ARG_REGS)
- {
- code_size += MOVE_INT_REG_ARG_SIZE;
- int_arg_regs_used += regs_used;
- break;
- }
-
- if (arg_type == ARG_IN_FLOAT_REGS &&
- (float_arg_regs_used + regs_used) <= MAX_FLOAT_ARG_REGS)
- {
- code_size += MOVE_FLOAT_REG_ARG_SIZE;
- float_arg_regs_used += regs_used;
- break;
- }
-
- /* Else item is in memory. */
-
- stack_size += size + 7;
- stack_size &= ~7;
- code_size += COPY_STRUCT_STACK_ARG_SIZE;
-
- break;
- }
- case MONO_TYPE_R4:
- case MONO_TYPE_R8:
- if (float_arg_regs_used++ > MAX_FLOAT_ARG_REGS) {
- stack_size += 8;
- code_size += PUSH_FLOAT_STACK_ARG_SIZE;
- }
- else
- code_size += MOVE_FLOAT_REG_ARG_SIZE;
- break;
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i]->type);
- }
- }
- /*
- * FIXME: take into account large return values.
- * (Comment carried over from IA32 code. Not sure what it means :-)
- */
-
- code_buffer = p = alloca (code_size);
-
- /*
- * Standard function prolog.
- */
- amd64_push_reg (p, AMD64_RBP);
- amd64_mov_reg_reg (p, AMD64_RBP, AMD64_RSP, 8);
- /*
- * and align to 16 byte boundary...
- */
-
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref) {
- MonoClass *klass = sig->ret->data.klass;
- if (!klass->enumtype) {
- retval_implicit = 1;
- }
- }
-
- if (sig->ret->byref || string_ctor || !(retval_implicit || sig->ret->type == MONO_TYPE_VOID)) {
- /* Push the retval register so it is saved across the call. It will be addressed via RBP later. */
- amd64_push_reg (p, AMD64_RSI);
- stack_size += 8;
- }
-
- /* Ensure stack is 16 byte aligned when entering called function as required by calling convention.
- * Getting this wrong results in a general protection fault on an SSE load or store somewhere in the
- * code called under the trampoline.
- */
- if ((stack_size & 15) != 0)
- amd64_alu_reg_imm (p, X86_SUB, AMD64_RSP, 16 - (stack_size & 15));
-
- /*
- * On entry to generated function:
- * RDI has target function address
- * RSI has return value location address
- * RDX has this pointer address
- * RCX has the pointer to the args array.
- *
- * Inside the stub function:
- * R10 holds the pointer to the args
- * R11 holds the target function address.
- * The return value address is pushed on the stack.
- * The this pointer is moved into the first arg register at the start.
- *
- * Optimization note: we could keep the args pointer in RCX and then
- * load over itself at the end. Ditto the callee addres could be left in RDI in some cases.
- */
-
- /* Move args pointer to temp register. */
- amd64_mov_reg_reg (p, AMD64_R10, AMD64_RCX, 8);
- amd64_mov_reg_reg (p, AMD64_R11, AMD64_RDI, 8);
-
- /* First args register gets return value pointer, if need be.
- * Note that "byref" equal true means the called function returns a pointer.
- */
- if (retval_implicit) {
- amd64_mov_reg_reg (p, int_arg_regs[next_int_arg_reg], AMD64_RSI, 8);
- next_int_arg_reg++;
- }
-
- /* this pointer goes in next args register. */
- if (sig->hasthis) {
- amd64_mov_reg_reg (p, int_arg_regs[next_int_arg_reg], AMD64_RDX, 8);
- next_int_arg_reg++;
- }
-
- /*
- * Generate code to handle arguments in registers. Stack arguments will happen in a loop after this.
- */
- arg_in_reg_bitvector = (char *)alloca((sig->param_count + 7) / 8);
- memset(arg_in_reg_bitvector, 0, (sig->param_count + 7) / 8);
-
- /* First, load all the arguments that are passed in registers into the appropriate registers.
- * Below there is another loop to handle arguments passed on the stack.
- */
- for (i = 0; i < sig->param_count; i++) {
- arg_pos = ARG_SIZE * i;
-
- if (sig->params [i]->byref)
- simpletype = MONO_TYPE_PTR;
- else
- simpletype = sig->params [i]->type;
-enum_marshal:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_I8:
- case MONO_TYPE_U8:
- case MONO_TYPE_CLASS:
- if (next_int_arg_reg < MAX_INT_ARG_REGS) {
- amd64_mov_reg_membase (p, int_arg_regs[next_int_arg_reg], AMD64_R10, arg_pos, 8);
- next_int_arg_reg++;
- arg_in_reg_bitvector[i >> 3] |= (1 << (i & 7));
- }
- break;
- case MONO_TYPE_R4:
- if (next_float_arg_reg < MAX_FLOAT_ARG_REGS) {
- amd64_movss_reg_membase (p, next_float_arg_reg, AMD64_R10, arg_pos);
- next_float_arg_reg++;
- arg_in_reg_bitvector[i >> 3] |= (1 << (i & 7));
- }
- break;
- case MONO_TYPE_R8:
- if (next_float_arg_reg < MAX_FLOAT_ARG_REGS) {
- amd64_movsd_reg_membase (p, next_float_arg_reg, AMD64_R10, arg_pos);
- next_float_arg_reg++;
- arg_in_reg_bitvector[i >> 3] |= (1 << (i & 7));
- }
- break;
- case MONO_TYPE_VALUETYPE: {
- if (!sig->params [i]->data.klass->enumtype) {
- int size;
- int arg_type;
- int regs_used;
- int offset1;
- int size1;
- int offset2;
- int size2;
-
- arg_type = value_type_info(sig->params [i]->data.klass, &size, &regs_used, &offset1, &size1, &offset2, &size2);
-
- if (arg_type == ARG_IN_INT_REGS &&
- (next_int_arg_reg + regs_used) <= MAX_INT_ARG_REGS)
- {
- amd64_mov_reg_membase (p, int_arg_regs[next_int_arg_reg], AMD64_R10, arg_pos + offset1, size1);
- next_int_arg_reg++;
- if (regs_used > 1)
- {
- amd64_mov_reg_membase (p, int_arg_regs[next_int_arg_reg], AMD64_R10, arg_pos + offset2, size2);
- next_int_arg_reg++;
- }
- arg_in_reg_bitvector[i >> 3] |= (1 << (i & 7));
- break;
- }
-
- if (arg_type == ARG_IN_FLOAT_REGS &&
- (next_float_arg_reg + regs_used) <= MAX_FLOAT_ARG_REGS)
- {
- if (size1 == 4)
- amd64_movss_reg_membase (p, next_float_arg_reg, AMD64_R10, arg_pos + offset1);
- else
- amd64_movsd_reg_membase (p, next_float_arg_reg, AMD64_R10, arg_pos + offset1);
- next_float_arg_reg++;
-
- if (regs_used > 1)
- {
- if (size2 == 4)
- amd64_movss_reg_membase (p, next_float_arg_reg, AMD64_R10, arg_pos + offset2);
- else
- amd64_movsd_reg_membase (p, next_float_arg_reg, AMD64_R10, arg_pos + offset2);
- next_float_arg_reg++;
- }
- arg_in_reg_bitvector[i >> 3] |= (1 << (i & 7));
- break;
- }
-
- /* Structs in memory are handled in the next loop. */
- } else {
- /* it's an enum value */
- simpletype = sig->params [i]->data.klass->enum_basetype->type;
- goto enum_marshal;
- }
- break;
- }
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i]->type);
- }
- }
-
- /* Handle stack arguments, pushing the rightmost argument first. */
- for (i = sig->param_count; i > 0; --i) {
- arg_pos = ARG_SIZE * (i - 1);
- if (sig->params [i - 1]->byref)
- simpletype = MONO_TYPE_PTR;
- else
- simpletype = sig->params [i - 1]->type;
-enum_marshal2:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_I8:
- case MONO_TYPE_U8:
- case MONO_TYPE_CLASS:
- if ((arg_in_reg_bitvector[(i - 1) >> 3] & (1 << ((i - 1) & 7))) == 0) {
- amd64_push_membase (p, AMD64_R10, arg_pos);
- }
- break;
- case MONO_TYPE_R4:
- if ((arg_in_reg_bitvector[(i - 1) >> 3] & (1 << ((i - 1) & 7))) == 0) {
- amd64_push_membase (p, AMD64_R10, arg_pos);
- }
- break;
- case MONO_TYPE_R8:
- if ((arg_in_reg_bitvector[(i - 1) >> 3] & (1 << ((i - 1) & 7))) == 0) {
- amd64_push_membase (p, AMD64_R10, arg_pos);
- }
- break;
- case MONO_TYPE_VALUETYPE:
- if (!sig->params [i - 1]->data.klass->enumtype) {
- if ((arg_in_reg_bitvector[(i - 1) >> 3] & (1 << ((i - 1) & 7))) == 0)
- {
- int ss = mono_class_native_size (sig->params [i - 1]->data.klass, NULL);
- ss += 7;
- ss &= ~7;
-
- amd64_alu_reg_imm(p, X86_SUB, AMD64_RSP, ss);
- /* Count register */
- amd64_mov_reg_imm(p, AMD64_RCX, ss);
- /* Source register */
- amd64_lea_membase(p, AMD64_RSI, AMD64_R10, arg_pos);
- /* Dest register */
- amd64_mov_reg_reg(p, AMD64_RDI, AMD64_RSP, 8);
-
- /* AMD64 calling convention guarantees direction flag is clear at call boundary. */
- x86_prefix(p, AMD64_REX(AMD64_REX_W));
- x86_prefix(p, X86_REP_PREFIX);
- x86_movsb(p);
- }
- } else {
- /* it's an enum value */
- simpletype = sig->params [i - 1]->data.klass->enum_basetype->type;
- goto enum_marshal2;
- }
- break;
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i - 1]->type);
- }
- }
-
- /* TODO: Set RAL to number of XMM registers used in case this is a varags function? */
-
- /*
- * Insert call to function
- */
- amd64_call_reg (p, AMD64_R11);
-
- if (sig->ret->byref || string_ctor || !(retval_implicit || sig->ret->type == MONO_TYPE_VOID)) {
- amd64_mov_reg_membase(p, AMD64_RSI, AMD64_RBP, -8, SIZEOF_VOID_P);
- }
- /*
- * Handle retval.
- * Small integer and pointer values are in EAX.
- * Long integers are in EAX:EDX.
- * FP values are on the FP stack.
- */
-
- if (sig->ret->byref || string_ctor) {
- simpletype = MONO_TYPE_PTR;
- } else {
- simpletype = sig->ret->type;
- }
- enum_retvalue:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- amd64_mov_regp_reg (p, AMD64_RSI, X86_EAX, 1);
- break;
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- amd64_mov_regp_reg (p, AMD64_RSI, X86_EAX, 2);
- break;
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_STRING:
- case MONO_TYPE_PTR:
- amd64_mov_regp_reg (p, AMD64_RSI, X86_EAX, 8);
- break;
- case MONO_TYPE_R4:
- amd64_movss_regp_reg (p, AMD64_RSI, AMD64_XMM0);
- break;
- case MONO_TYPE_R8:
- amd64_movsd_regp_reg (p, AMD64_RSI, AMD64_XMM0);
- break;
- case MONO_TYPE_I8:
- amd64_mov_regp_reg (p, AMD64_RSI, X86_EAX, 8);
- break;
- case MONO_TYPE_VALUETYPE: {
- int size;
- int arg_type;
- int regs_used;
- int offset1;
- int size1;
- int offset2;
- int size2;
-
- if (sig->ret->data.klass->enumtype) {
- simpletype = sig->ret->data.klass->enum_basetype->type;
- goto enum_retvalue;
- }
-
- arg_type = value_type_info(sig->params [i]->data.klass, &size, &regs_used, &offset1, &size1, &offset2, &size2);
-
- if (arg_type == ARG_IN_INT_REGS)
- {
- amd64_mov_membase_reg (p, AMD64_RSI, offset1, AMD64_RAX, size1);
- if (regs_used > 1)
- amd64_mov_membase_reg (p, AMD64_RSI, offset2, AMD64_RDX, size2);
- break;
- }
-
- if (arg_type == ARG_IN_FLOAT_REGS)
- {
- if (size1 == 4)
- amd64_movss_membase_reg (p, AMD64_RSI, offset1, AMD64_XMM0);
- else
- amd64_movsd_membase_reg (p, AMD64_RSI, offset1, AMD64_XMM0);
-
- if (regs_used > 1)
- {
- if (size2 == 4)
- amd64_movss_membase_reg (p, AMD64_RSI, offset2, AMD64_XMM1);
- else
- amd64_movsd_membase_reg (p, AMD64_RSI, offset2, AMD64_XMM1);
- }
- break;
- }
-
- /* Else result should have been stored in place already. */
- break;
- }
- case MONO_TYPE_VOID:
- break;
- default:
- g_error ("Can't handle as return value 0x%x", sig->ret->type);
- }
-
- /*
- * Standard epilog.
- */
- amd64_leave (p);
- amd64_ret (p);
-
- g_assert (p - code_buffer < code_size);
- res = (MonoPIFunc)g_memdup (code_buffer, p - code_buffer);
-
- g_hash_table_insert (cache, sig, res);
-
- return res;
-}
-
-/*
- * Returns a pointer to a native function that can be used to
- * call the specified method.
- * The function created will receive the arguments according
- * to the call convention specified in the method.
- * This function works by creating a MonoInvocation structure,
- * filling the fields in and calling ves_exec_method on it.
- * Still need to figure out how to handle the exception stuff
- * across the managed/unmanaged boundary.
- */
-void *
-mono_arch_create_method_pointer (MonoMethod *method)
-{
- MonoMethodSignature *sig;
- MonoJitInfo *ji;
- unsigned char *p, *code_buffer;
- guint32 simpletype;
- gint32 local_size;
- gint32 stackval_pos;
- gint32 mono_invocation_pos;
- int i, cpos;
- int *vtbuf;
- int *rbpoffsets;
- int int_arg_regs_used = 0;
- int float_arg_regs_used = 0;
- int stacked_args_size = 0; /* bytes of register passed arguments pushed on stack for safe keeping. Used to get alignment right. */
- int next_stack_arg_rbp_offset = 16;
- int retval_ptr_rbp_offset = 0;
- int this_reg = -1; /* Remember register this ptr is in. */
-
- /*
- * If it is a static P/Invoke method, we can just return the pointer
- * to the method implementation.
- */
- if (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL && ((MonoMethodPInvoke*) method)->addr) {
- ji = g_new0 (MonoJitInfo, 1);
- ji->method = method;
- ji->code_size = 1;
- ji->code_start = ((MonoMethodPInvoke*) method)->addr;
-
- mono_jit_info_table_add (mono_get_root_domain (), ji);
- return ((MonoMethodPInvoke*) method)->addr;
- }
-
- sig = method->signature;
-
- code_buffer = p = alloca (512); /* FIXME: check for overflows... */
- vtbuf = alloca (sizeof(int)*sig->param_count);
- rbpoffsets = alloca (sizeof(int)*sig->param_count);
-
-
- /*
- * Standard function prolog.
- */
- amd64_push_reg (p, AMD64_RBP);
- amd64_mov_reg_reg (p, AMD64_RBP, AMD64_RSP, 8);
-
- /* If there is an implicit return value pointer in the first args reg, save it now so
- * the result can be stored through the pointer at the end.
- */
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref && !sig->ret->data.klass->enumtype)
- {
- amd64_push_reg (p, int_arg_regs[int_arg_regs_used]);
- int_arg_regs_used++;
- stacked_args_size += 8;
- retval_ptr_rbp_offset = -stacked_args_size;
- }
-
- /*
- * If there is a this pointer, remember the number of the register it is in.
- */
- if (sig->hasthis) {
- this_reg = int_arg_regs[int_arg_regs_used++];
- }
-
- /* Put all arguments passed in registers on the stack.
- * Record offsets from RBP to each argument.
- */
- cpos = 0;
-
- for (i = 0; i < sig->param_count; i++) {
- if (sig->params [i]->byref)
- simpletype = MONO_TYPE_PTR;
- else
- simpletype = sig->params [i]->type;
-enum_calc_size:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_I8:
- if (int_arg_regs_used < MAX_INT_ARG_REGS) {
- amd64_push_reg (p, int_arg_regs[int_arg_regs_used]);
- int_arg_regs_used++;
- stacked_args_size += 8;
- rbpoffsets[i] = -stacked_args_size;
- }
- else
- {
- rbpoffsets[i] = next_stack_arg_rbp_offset;
- next_stack_arg_rbp_offset += 8;
- }
- break;
- case MONO_TYPE_VALUETYPE: {
- if (sig->params [i]->data.klass->enumtype) {
- simpletype = sig->params [i]->data.klass->enum_basetype->type;
- goto enum_calc_size;
- }
- else
- {
- int size;
- int arg_type;
- int regs_used;
- int offset1;
- int size1;
- int offset2;
- int size2;
-
- arg_type = value_type_info(sig->params [i]->data.klass, &size, &regs_used, &offset1, &size1, &offset2, &size2);
-
- if (arg_type == ARG_IN_INT_REGS &&
- (int_arg_regs_used + regs_used) <= MAX_INT_ARG_REGS)
- {
- amd64_alu_reg_imm (p, X86_SUB, AMD64_RSP, size);
- stacked_args_size += size;
- rbpoffsets[i] = stacked_args_size;
-
- amd64_mov_reg_membase (p, int_arg_regs[int_arg_regs_used], AMD64_RSP, offset1, size1);
- int_arg_regs_used++;
- if (regs_used > 1)
- {
- amd64_mov_reg_membase (p, int_arg_regs[int_arg_regs_used], AMD64_RSP, offset2, size2);
- int_arg_regs_used++;
- }
- break;
- }
-
- if (arg_type == ARG_IN_FLOAT_REGS &&
- (float_arg_regs_used + regs_used) <= MAX_FLOAT_ARG_REGS)
- {
- amd64_alu_reg_imm (p, X86_SUB, AMD64_RSP, size);
- stacked_args_size += size;
- rbpoffsets[i] = stacked_args_size;
-
- if (size1 == 4)
- amd64_movss_reg_membase (p, float_arg_regs_used, AMD64_RSP, offset1);
- else
- amd64_movsd_reg_membase (p, float_arg_regs_used, AMD64_RSP, offset1);
- float_arg_regs_used++;
-
- if (regs_used > 1)
- {
- if (size2 == 4)
- amd64_movss_reg_membase (p, float_arg_regs_used, AMD64_RSP, offset2);
- else
- amd64_movsd_reg_membase (p, float_arg_regs_used, AMD64_RSP, offset2);
- float_arg_regs_used++;
- }
- break;
- }
-
- rbpoffsets[i] = next_stack_arg_rbp_offset;
- next_stack_arg_rbp_offset += size;
- }
- break;
- }
- case MONO_TYPE_R4:
- if (float_arg_regs_used < MAX_FLOAT_ARG_REGS) {
- amd64_alu_reg_imm (p, X86_SUB, AMD64_RSP, 8);
- amd64_movss_regp_reg (p, AMD64_RSP, float_arg_regs_used);
- float_arg_regs_used++;
- stacked_args_size += 8;
- rbpoffsets[i] = -stacked_args_size;
- }
- else
- {
- rbpoffsets[i] = next_stack_arg_rbp_offset;
- next_stack_arg_rbp_offset += 8;
- }
- break;
- case MONO_TYPE_R8:
- stacked_args_size += 8;
- if (float_arg_regs_used < MAX_FLOAT_ARG_REGS) {
- amd64_alu_reg_imm (p, X86_SUB, AMD64_RSP, 8);
- amd64_movsd_regp_reg (p, AMD64_RSP, float_arg_regs_used);
- float_arg_regs_used++;
- stacked_args_size += 8;
- rbpoffsets[i] = -stacked_args_size;
- }
- else
- {
- rbpoffsets[i] = next_stack_arg_rbp_offset;
- next_stack_arg_rbp_offset += 8;
- }
- break;
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i]->type);
- }
- }
-
- local_size = sizeof (MonoInvocation) + sizeof (stackval) * (sig->param_count + 1) + stacked_args_size;
-
- local_size += 15;
- local_size &= ~15;
-
- stackval_pos = -local_size;
- mono_invocation_pos = stackval_pos + sizeof (stackval) * (sig->param_count + 1);
-
- /* stacked_args_size has already been pushed onto the stack. Make room for the rest of it. */
- amd64_alu_reg_imm (p, X86_SUB, AMD64_RSP, local_size - stacked_args_size);
-
- /* Be careful not to trash any arg regs before saving this_reg to MonoInvocation structure below. */
-
- /*
- * Initialize MonoInvocation fields, first the ones known now.
- */
- amd64_alu_reg_reg (p, X86_XOR, AMD64_RAX, AMD64_RAX);
- amd64_mov_membase_reg (p, AMD64_RBP, (mono_invocation_pos + G_STRUCT_OFFSET (MonoInvocation, ex)), AMD64_RAX, SIZEOF_VOID_P);
- amd64_mov_membase_reg (p, AMD64_RBP, (mono_invocation_pos + G_STRUCT_OFFSET (MonoInvocation, ex_handler)), AMD64_RAX, SIZEOF_VOID_P);
- amd64_mov_membase_reg (p, AMD64_RBP, (mono_invocation_pos + G_STRUCT_OFFSET (MonoInvocation, parent)), AMD64_RAX, SIZEOF_VOID_P);
- /*
- * Set the method pointer.
- */
- amd64_mov_membase_imm (p, AMD64_RBP, (mono_invocation_pos + G_STRUCT_OFFSET (MonoInvocation, method)), (long)method, SIZEOF_VOID_P);
-
- /*
- * Handle this.
- */
- if (sig->hasthis)
- amd64_mov_membase_reg(p, AMD64_RBP, (mono_invocation_pos + G_STRUCT_OFFSET (MonoInvocation, obj)), this_reg, SIZEOF_VOID_P);
-
- /*
- * Handle the arguments. stackval_pos is the offset from RBP of the stackval in the MonoInvocation args array .
- * arg_pos is the offset from RBP to the incoming arg on the stack.
- * We just call stackval_from_data to handle all the (nasty) issues....
- */
- amd64_lea_membase (p, AMD64_RAX, AMD64_RBP, stackval_pos);
- amd64_mov_membase_reg (p, AMD64_RBP, (mono_invocation_pos + G_STRUCT_OFFSET (MonoInvocation, stack_args)), AMD64_RAX, SIZEOF_VOID_P);
- for (i = 0; i < sig->param_count; ++i) {
-/* Need to call stackval_from_data (MonoType *type, stackval *result, char *data, gboolean pinvoke); */
- amd64_mov_reg_imm (p, AMD64_R11, stackval_from_data);
- amd64_mov_reg_imm (p, int_arg_regs[0], sig->params[i]);
- amd64_lea_membase (p, int_arg_regs[1], AMD64_RBP, stackval_pos);
- amd64_lea_membase (p, int_arg_regs[2], AMD64_RBP, rbpoffsets[i]);
- amd64_mov_reg_imm (p, int_arg_regs[3], sig->pinvoke);
- amd64_call_reg (p, AMD64_R11);
- stackval_pos += sizeof (stackval);
-#if 0
- /* fixme: alignment */
- if (sig->pinvoke)
- arg_pos += mono_type_native_stack_size (sig->params [i], &align);
- else
- arg_pos += mono_type_stack_size (sig->params [i], &align);
-#endif
- }
-
- /*
- * Handle the return value storage area.
- */
- amd64_lea_membase (p, AMD64_RAX, AMD64_RBP, stackval_pos);
- amd64_mov_membase_reg (p, AMD64_RBP, (mono_invocation_pos + G_STRUCT_OFFSET (MonoInvocation, retval)), AMD64_RAX, SIZEOF_VOID_P);
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref) {
- MonoClass *klass = sig->ret->data.klass;
- if (!klass->enumtype) {
- amd64_mov_reg_membase (p, AMD64_RCX, AMD64_RBP, retval_ptr_rbp_offset, SIZEOF_VOID_P);
- amd64_mov_membase_reg (p, AMD64_RBP, stackval_pos, AMD64_RCX, SIZEOF_VOID_P);
- }
- }
-
- /*
- * Call the method.
- */
- amd64_lea_membase (p, int_arg_regs[0], AMD64_RBP, mono_invocation_pos);
- amd64_mov_reg_imm (p, AMD64_R11, ves_exec_method);
- amd64_call_reg (p, AMD64_R11);
-
- /*
- * Move the return value to the proper place.
- */
- amd64_lea_membase (p, AMD64_RAX, AMD64_RBP, stackval_pos);
- if (sig->ret->byref) {
- amd64_mov_reg_membase (p, AMD64_RAX, AMD64_RAX, 0, SIZEOF_VOID_P);
- } else {
- int simpletype = sig->ret->type;
- enum_retvalue:
- switch (sig->ret->type) {
- case MONO_TYPE_VOID:
- break;
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- amd64_movzx_reg_membase (p, AMD64_RAX, AMD64_RAX, 0, 1);
- break;
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- amd64_movzx_reg_membase (p, AMD64_RAX, AMD64_RAX, 0, 2);
- break;
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_CLASS:
- amd64_movzx_reg_membase (p, AMD64_RAX, AMD64_RAX, 0, 4);
- break;
- case MONO_TYPE_I8:
- amd64_movzx_reg_membase (p, AMD64_RAX, AMD64_RAX, 0, 8);
- break;
- case MONO_TYPE_R4:
- amd64_movss_regp_reg (p, AMD64_RAX, AMD64_XMM0);
- break;
- case MONO_TYPE_R8:
- amd64_movsd_regp_reg (p, AMD64_RAX, AMD64_XMM0);
- break;
- case MONO_TYPE_VALUETYPE: {
- int size;
- int arg_type;
- int regs_used;
- int offset1;
- int size1;
- int offset2;
- int size2;
-
- if (sig->ret->data.klass->enumtype) {
- simpletype = sig->ret->data.klass->enum_basetype->type;
- goto enum_retvalue;
- }
-
- arg_type = value_type_info(sig->params [i]->data.klass, &size, &regs_used, &offset1, &size1, &offset2, &size2);
-
- if (arg_type == ARG_IN_INT_REGS)
- {
- if (regs_used > 1)
- amd64_mov_membase_reg (p, AMD64_RAX, offset2, AMD64_RDX, size2);
- amd64_mov_membase_reg (p, AMD64_RAX, offset1, AMD64_RAX, size1);
- break;
- }
-
- if (arg_type == ARG_IN_FLOAT_REGS)
- {
- if (size1 == 4)
- amd64_movss_membase_reg (p, AMD64_RAX, offset1, AMD64_XMM0);
- else
- amd64_movsd_membase_reg (p, AMD64_RAX, offset1, AMD64_XMM0);
-
- if (regs_used > 1)
- {
- if (size2 == 4)
- amd64_movss_membase_reg (p, AMD64_RAX, offset2, AMD64_XMM1);
- else
- amd64_movsd_membase_reg (p, AMD64_RAX, offset2, AMD64_XMM1);
- }
- break;
- }
-
- /* Else result should have been stored in place already. IA32 code has a stackval_to_data call here, which
- * looks wrong to me as the pointer in the stack val being converted is setup to point to the output area anyway.
- * It all looks a bit suspect anyway.
- */
- break;
- }
- default:
- g_error ("Type 0x%x not handled yet in thunk creation", sig->ret->type);
- break;
- }
- }
-
- /*
- * Standard epilog.
- */
- amd64_leave (p);
- amd64_ret (p);
-
- g_assert (p - code_buffer < 512);
-
- ji = g_new0 (MonoJitInfo, 1);
- ji->method = method;
- ji->code_size = p - code_buffer;
- ji->code_start = g_memdup (code_buffer, p - code_buffer);
-
- mono_jit_info_table_add (mono_get_root_domain (), ji);
-
- return ji->code_start;
-}
diff --git a/mono/arch/ppc/Makefile.am b/mono/arch/ppc/Makefile.am
index a4e2d5d2e7c..9b209ef9400 100644
--- a/mono/arch/ppc/Makefile.am
+++ b/mono/arch/ppc/Makefile.am
@@ -1,11 +1 @@
-if INTERP_SUPPORTED
-
-AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
-
-noinst_LTLIBRARIES = libmonoarch-ppc.la
-
-libmonoarch_ppc_la_SOURCES = tramp.c ppc-codegen.h
-
-noinst_PROGRAMS = test
-
-endif
+EXTRA_DIST = ppc-codegen.h \ No newline at end of file
diff --git a/mono/arch/ppc/test.c b/mono/arch/ppc/test.c
deleted file mode 100644
index c19358dcab0..00000000000
--- a/mono/arch/ppc/test.c
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "ppc-codegen.h"
-#include <stdio.h>
-
-/* don't run the resulting program, it will destroy your computer,
- * just objdump -d it to inspect we generated the correct assembler.
- * On Mac OS X use otool[64] -v -t
- */
-
-int main() {
- guint8 code [16000];
- guint8 *p = code;
- guint8 *cp;
-
- printf (".text\n.align 4\n.globl main\n");
-#ifndef __APPLE__
- printf (".type main,@function\n");
-#endif
- printf ("main:\n");
-
- ppc_stwu (p, ppc_r1, -32, ppc_r1);
- ppc_mflr (p, ppc_r0);
- ppc_stw (p, ppc_r31, 28, ppc_r1);
- ppc_or (p, ppc_r1, ppc_r2, ppc_r3);
- ppc_mr (p, ppc_r31, ppc_r1);
- ppc_lwz (p, ppc_r11, 0, ppc_r1);
- ppc_mtlr (p, ppc_r0);
- ppc_blr (p);
- ppc_addi (p, ppc_r6, ppc_r6, 16);
-
- for (cp = code; cp < p; cp++) {
- printf (".byte 0x%x\n", *cp);
- }
-
- return 0;
-}
diff --git a/mono/arch/ppc/tramp.c b/mono/arch/ppc/tramp.c
deleted file mode 100644
index 6bb1896255f..00000000000
--- a/mono/arch/ppc/tramp.c
+++ /dev/null
@@ -1,895 +0,0 @@
-/*
- * Create trampolines to invoke arbitrary functions.
- *
- * Copyright (C) Radek Doulik
- *
- */
-
-#include "config.h"
-#include <stdlib.h>
-#include <string.h>
-#include "ppc-codegen.h"
-#include "mono/metadata/class.h"
-#include "mono/metadata/tabledefs.h"
-#include "mono/interpreter/interp.h"
-#include "mono/metadata/appdomain.h"
-
-#ifdef NEED_MPROTECT
-#include <sys/mman.h>
-#include <limits.h> /* for PAGESIZE */
-#ifndef PAGESIZE
-#define PAGESIZE 4096
-#endif
-#endif
-
-#define DEBUG(x)
-
-/* gpointer
-fake_func (gpointer (*callme)(gpointer), stackval *retval, void *this_obj, stackval *arguments)
-{
- guint32 i = 0xc002becd;
-
- callme = (gpointer) 0x100fabcd;
-
- *(gpointer*)retval = (gpointer)(*callme) (arguments [0].data.p, arguments [1].data.p, arguments [2].data.p);
- *(gdouble*) retval = (gdouble)(*callme) (arguments [0].data.f);
-
- return (gpointer) (*callme) (((MonoType *)arguments [0]. data.p)->data.klass);
-} */
-
-#define MIN_CACHE_LINE 8
-
-static void inline
-flush_icache (guint8 *code, guint size)
-{
- guint i;
- guint8 *p;
-
- p = code;
- for (i = 0; i < size; i += MIN_CACHE_LINE, p += MIN_CACHE_LINE) {
- asm ("dcbst 0,%0;" : : "r"(p) : "memory");
- }
- asm ("sync");
- p = code;
- for (i = 0; i < size; i += MIN_CACHE_LINE, p += MIN_CACHE_LINE) {
- asm ("icbi 0,%0; sync;" : : "r"(p) : "memory");
- }
- asm ("sync");
- asm ("isync");
-}
-
-static void
-disassemble (guint8 *code, int size)
-{
- int i;
- FILE *ofd;
- const char *tmp = g_getenv("TMP");
- char *as_file;
- char *o_file;
- char *cmd;
-
- if (tmp == NULL)
- tmp = "/tmp";
- as_file = g_strdup_printf ("%s/test.s", tmp);
-
- if (!(ofd = fopen (as_file, "w")))
- g_assert_not_reached ();
-
- fprintf (ofd, "tmp:\n");
-
- for (i = 0; i < size; ++i)
- fprintf (ofd, ".byte %d\n", (unsigned int) code [i]);
-
- fclose (ofd);
-#ifdef __APPLE__
-#define DIS_CMD "otool -V -v -t"
-#else
-#define DIS_CMD "objdump -d"
-#endif
- o_file = g_strdup_printf ("%s/test.o", tmp);
- cmd = g_strdup_printf ("as %s -o %s", as_file, o_file);
- system (cmd);
- g_free (cmd);
- cmd = g_strdup_printf (DIS_CMD " %s", o_file);
- system (cmd);
- g_free (cmd);
- g_free (o_file);
- g_free (as_file);
-}
-
-
-#define NOT_IMPLEMENTED(x) \
- g_error ("FIXME: %s is not yet implemented. (trampoline)", x);
-
-#define PROLOG_INS 8
-#define CALL_INS 2
-#define EPILOG_INS 6
-#define FLOAT_REGS 8
-#define GENERAL_REGS 8
-#ifdef __APPLE__
-#define MINIMAL_STACK_SIZE 10
-#define ALWAYS_ON_STACK(s) s
-#define FP_ALSO_IN_REG(s) s
-#define RET_ADDR_OFFSET 8
-#define STACK_PARAM_OFFSET 24
-#else
-#define MINIMAL_STACK_SIZE 5
-#define ALWAYS_ON_STACK(s)
-#define FP_ALSO_IN_REG(s) s
-#define ALIGN_DOUBLES
-#define RET_ADDR_OFFSET 4
-#define STACK_PARAM_OFFSET 8
-#endif
-
-static void inline
-add_general (guint *gr, guint *stack_size, guint *code_size, gboolean simple)
-{
- if (simple) {
- if (*gr >= GENERAL_REGS) {
- *stack_size += 4;
- *code_size += 8; /* load from stack, save on stack */
- } else {
- ALWAYS_ON_STACK (*stack_size += 4);
- *code_size += 4; /* load from stack */
- }
- } else {
- if (*gr >= GENERAL_REGS - 1) {
- *stack_size += 8;
-#ifdef ALIGN_DOUBLES
- *stack_size += (*stack_size % 8);
-#endif
- *code_size += 16; /* 2x load from stack, 2x save to stack */
- } else {
- ALWAYS_ON_STACK (*stack_size += 8);
- *code_size += 8; /* 2x load from stack */
- }
-#ifdef ALIGN_DOUBLES
- if ((*gr) & 1)
- (*gr) ++;
-#endif
- (*gr) ++;
- }
- (*gr) ++;
-}
-
-static void inline
-calculate_sizes (MonoMethodSignature *sig, guint *stack_size, guint *code_size, gboolean string_ctor, gboolean *use_memcpy)
-{
- guint i, fr, gr;
- guint32 simpletype;
-
- fr = gr = 0;
- *stack_size = MINIMAL_STACK_SIZE*4;
- *code_size = (PROLOG_INS + CALL_INS + EPILOG_INS)*4;
-
- if (sig->hasthis) {
- add_general (&gr, stack_size, code_size, TRUE);
- }
- DEBUG(printf("params: %d\n", sig->param_count));
- for (i = 0; i < sig->param_count; ++i) {
- DEBUG(printf("param %d: ", i));
- if (sig->params [i]->byref) {
- DEBUG(printf("byref\n"));
- add_general (&gr, stack_size, code_size, TRUE);
- continue;
- }
- simpletype = sig->params [i]->type;
- enum_calc_size:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- add_general (&gr, stack_size, code_size, TRUE);
- break;
- case MONO_TYPE_SZARRAY:
- add_general (&gr, stack_size, code_size, TRUE);
- *code_size += 4;
- break;
- case MONO_TYPE_VALUETYPE: {
- gint size;
- if (sig->params [i]->data.klass->enumtype) {
- simpletype = sig->params [i]->data.klass->enum_basetype->type;
- goto enum_calc_size;
- }
- size = mono_class_value_size (sig->params [i]->data.klass, NULL);
- if (size != 4) {
- DEBUG(printf ("copy %d bytes struct on stack\n",
- mono_class_value_size (sig->params [i]->data.klass, NULL)));
- *use_memcpy = TRUE;
- *code_size += 8*4;
- *stack_size += (size + 3) & (~3);
- if (gr > GENERAL_REGS) {
- *code_size += 4;
- *stack_size += 4;
- }
- } else {
- DEBUG(printf ("load %d bytes struct\n",
- mono_class_value_size (sig->params [i]->data.klass, NULL)));
- add_general (&gr, stack_size, code_size, TRUE);
- *code_size += 4;
- }
- break;
- }
- case MONO_TYPE_I8:
- add_general (&gr, stack_size, code_size, FALSE);
- break;
- case MONO_TYPE_R4:
- if (fr < 7) {
- *code_size += 4;
- fr ++;
- FP_ALSO_IN_REG (gr ++);
- ALWAYS_ON_STACK (*stack_size += 4);
- } else {
- NOT_IMPLEMENTED ("R4 arg");
- }
- break;
- case MONO_TYPE_R8:
- if (fr < 7) {
- *code_size += 4;
- fr ++;
- FP_ALSO_IN_REG (gr += 2);
- ALWAYS_ON_STACK (*stack_size += 8);
- } else {
- NOT_IMPLEMENTED ("R8 arg");
- }
- break;
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i]->type);
- }
- }
-
- if (sig->ret->byref || string_ctor) {
- *code_size += 8;
- } else {
- simpletype = sig->ret->type;
-enum_retvalue:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_R4:
- case MONO_TYPE_R8:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_STRING:
- *code_size += 8;
- break;
- case MONO_TYPE_I8:
- *code_size += 12;
- break;
- case MONO_TYPE_VALUETYPE:
- if (sig->ret->data.klass->enumtype) {
- simpletype = sig->ret->data.klass->enum_basetype->type;
- goto enum_retvalue;
- }
- *code_size += 2*4;
- break;
- case MONO_TYPE_VOID:
- break;
- default:
- g_error ("Can't handle as return value 0x%x", sig->ret->type);
- }
- }
-
- if (*use_memcpy) {
- *stack_size += 2*4; /* for r14, r15 */
- *code_size += 6*4;
- if (sig->hasthis) {
- *stack_size += 4; /* for r16 */
- *code_size += 4;
- }
- }
-
- /* align stack size to 16 */
- DEBUG (printf (" stack size: %d (%d)\n code size: %d\n", (*stack_size + 15) & ~15, *stack_size, *code_size));
- *stack_size = (*stack_size + 15) & ~15;
-}
-
-static inline guint8 *
-emit_prolog (guint8 *p, MonoMethodSignature *sig, guint stack_size)
-{
- /* function prolog */
- ppc_stwu (p, ppc_r1, -stack_size, ppc_r1); /* sp <--- sp - stack_size, sp[0] <---- sp save sp, alloc stack */
- ppc_mflr (p, ppc_r0); /* r0 <--- LR */
- ppc_stw (p, ppc_r31, stack_size - 4, ppc_r1); /* sp[+4] <--- r31 save r31 */
- ppc_stw (p, ppc_r0, stack_size + RET_ADDR_OFFSET, ppc_r1); /* sp[-4] <--- LR save return address for "callme" */
- ppc_mr (p, ppc_r31, ppc_r1); /* r31 <--- sp */
-
- return p;
-}
-
-#define ARG_BASE ppc_r12
-#define ARG_SIZE sizeof (stackval)
-#define SAVE_4_IN_GENERIC_REGISTER \
- if (gr < GENERAL_REGS) { \
- ppc_lwz (p, ppc_r3 + gr, i*ARG_SIZE, ARG_BASE); \
- gr ++; \
- ALWAYS_ON_STACK (stack_par_pos += 4); \
- } else { \
- ppc_lwz (p, ppc_r11, i*ARG_SIZE, ARG_BASE); \
- ppc_stw (p, ppc_r11, stack_par_pos, ppc_r1); \
- stack_par_pos += 4; \
- }
-#define SAVE_4_VAL_IN_GENERIC_REGISTER \
- if (gr < GENERAL_REGS) { \
- ppc_lwz (p, ppc_r3 + gr, i*ARG_SIZE, ARG_BASE); \
- ppc_lwz (p, ppc_r3 + gr, 0, ppc_r3 + gr); \
- gr ++; \
- ALWAYS_ON_STACK (stack_par_pos += 4); \
- } else { \
- ppc_lwz (p, ppc_r11, i*ARG_SIZE, ARG_BASE); \
- ppc_lwz (p, ppc_r11, 0, ppc_r11); \
- ppc_stw (p, ppc_r11, stack_par_pos, ppc_r1); \
- stack_par_pos += 4; \
- }
-
-inline static guint8*
-emit_save_parameters (guint8 *p, MonoMethodSignature *sig, guint stack_size, gboolean use_memcpy)
-{
- guint i, fr, gr, stack_par_pos, struct_pos, cur_struct_pos;
- guint32 simpletype;
-
- fr = gr = 0;
- stack_par_pos = STACK_PARAM_OFFSET;
-
- ppc_stw (p, ppc_r4, stack_size - 12, ppc_r31); /* preserve "retval", sp[+8] */
-
- if (use_memcpy) {
- ppc_stw (p, ppc_r14, stack_size - 16, ppc_r31); /* save r14 */
- ppc_stw (p, ppc_r15, stack_size - 20, ppc_r31); /* save r15 */
- ppc_mr (p, ppc_r14, ppc_r3); /* keep "callme" in register */
- ppc_mr (p, ppc_r15, ppc_r6); /* keep "arguments" in register */
- } else {
- ppc_mr (p, ppc_r12, ppc_r6); /* keep "arguments" in register */
- ppc_mr (p, ppc_r0, ppc_r3); /* keep "callme" in register */
- }
-
- if (sig->hasthis) {
- if (use_memcpy) {
- ppc_stw (p, ppc_r16, stack_size - 24, ppc_r31); /* save r16 */
- ppc_mr (p, ppc_r16, ppc_r5);
- } else
- ppc_mr (p, ppc_r3, ppc_r5);
- gr ++;
- ALWAYS_ON_STACK (stack_par_pos += 4);
- }
-
- if (use_memcpy) {
- cur_struct_pos = struct_pos = stack_par_pos;
- for (i = 0; i < sig->param_count; ++i) {
- if (sig->params [i]->byref)
- continue;
- if (sig->params [i]->type == MONO_TYPE_VALUETYPE && !sig->params [i]->data.klass->enumtype) {
- gint size;
-
- size = mono_class_value_size (sig->params [i]->data.klass, NULL);
- if (size != 4) {
- /* call memcpy */
- ppc_addi (p, ppc_r3, ppc_r1, stack_par_pos);
- ppc_lwz (p, ppc_r4, i*16, ppc_r15);
- /* FIXME check if size > 0xffff */
- ppc_li (p, ppc_r5, size & 0xffff);
- ppc_lis (p, ppc_r0, (guint32) memcpy >> 16);
- ppc_ori (p, ppc_r0, ppc_r0, (guint32) memcpy & 0xffff);
- ppc_mtlr (p, ppc_r0);
- ppc_blrl (p);
- stack_par_pos += (size + 3) & (~3);
- }
- }
- }
-
- if (sig->hasthis) {
- ppc_mr (p, ppc_r3, ppc_r16);
- ppc_lwz (p, ppc_r16, stack_size - 24, ppc_r31); /* restore r16 */
- }
- ppc_mr (p, ppc_r0, ppc_r14);
- ppc_mr (p, ppc_r12, ppc_r15);
- ppc_lwz (p, ppc_r14, stack_size - 16, ppc_r31); /* restore r14 */
- ppc_lwz (p, ppc_r15, stack_size - 20, ppc_r31); /* restore r15 */
- }
-
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref) {
- MonoClass *klass = sig->ret->data.klass;
- if (!klass->enumtype) {
- gint size = mono_class_native_size (klass, NULL);
-
- DEBUG(printf ("retval value type size: %d\n", size));
- if (size > 8) {
- ppc_lwz (p, ppc_r3, stack_size - 12, ppc_r31);
- ppc_lwz (p, ppc_r3, 0, ppc_r3);
- gr ++;
- ALWAYS_ON_STACK (stack_par_pos += 4);
- } else {
- NOT_IMPLEMENTED ("retval valuetype <= 8 bytes");
- }
- }
- }
-
- for (i = 0; i < sig->param_count; ++i) {
- if (sig->params [i]->byref) {
- SAVE_4_IN_GENERIC_REGISTER;
- continue;
- }
- simpletype = sig->params [i]->type;
- enum_calc_size:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_SZARRAY:
- SAVE_4_IN_GENERIC_REGISTER;
- break;
- case MONO_TYPE_VALUETYPE: {
- gint size;
- if (sig->params [i]->data.klass->enumtype) {
- simpletype = sig->params [i]->data.klass->enum_basetype->type;
- goto enum_calc_size;
- }
- size = mono_class_value_size (sig->params [i]->data.klass, NULL);
- if (size == 4) {
- SAVE_4_VAL_IN_GENERIC_REGISTER;
- } else {
- if (gr < GENERAL_REGS) {
- ppc_addi (p, ppc_r3 + gr, ppc_r1, cur_struct_pos);
- gr ++;
- } else {
- ppc_lwz (p, ppc_r11, cur_struct_pos, ppc_r1);
- ppc_stw (p, ppc_r11, stack_par_pos, ppc_r1);
- stack_par_pos += 4;
- }
- cur_struct_pos += (size + 3) & (~3);
- }
- break;
- }
- case MONO_TYPE_I8:
-DEBUG(printf("Mono_Type_i8. gr = %d, arg_base = %d\n", gr, ARG_BASE));
-#ifdef ALIGN_DOUBLES
- if (gr & 1)
- gr++;
-#endif
- if (gr < 7) {
- ppc_lwz (p, ppc_r3 + gr, i*ARG_SIZE, ARG_BASE);
- ppc_lwz (p, ppc_r3 + gr + 1, i*ARG_SIZE + 4, ARG_BASE);
- ALWAYS_ON_STACK (stack_par_pos += 8);
- } else if (gr == 7) {
- ppc_lwz (p, ppc_r3 + gr, i*ARG_SIZE, ARG_BASE);
- ppc_lwz (p, ppc_r11, i*ARG_SIZE + 4, ARG_BASE);
- ppc_stw (p, ppc_r11, stack_par_pos + 4, ppc_r1);
- stack_par_pos += 8;
- } else {
- ppc_lwz (p, ppc_r11, i*ARG_SIZE, ARG_BASE);
- ppc_stw (p, ppc_r11, stack_par_pos, ppc_r1);
- ppc_lwz (p, ppc_r11, i*ARG_SIZE + 4, ARG_BASE);
- ppc_stw (p, ppc_r11, stack_par_pos + 4, ppc_r1);
- stack_par_pos += 8;
- }
- gr += 2;
- break;
- case MONO_TYPE_R4:
- if (fr < 7) {
- ppc_lfs (p, ppc_f1 + fr, i*ARG_SIZE, ARG_BASE);
- fr ++;
- FP_ALSO_IN_REG (gr ++);
- ALWAYS_ON_STACK (stack_par_pos += 4);
- } else {
- NOT_IMPLEMENTED ("r4 on stack");
- }
- break;
- case MONO_TYPE_R8:
- if (fr < 7) {
- ppc_lfd (p, ppc_f1 + fr, i*ARG_SIZE, ARG_BASE);
- fr ++;
- FP_ALSO_IN_REG (gr += 2);
- ALWAYS_ON_STACK (stack_par_pos += 8);
- } else {
- NOT_IMPLEMENTED ("r8 on stack");
- }
- break;
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i]->type);
- }
- }
-
- return p;
-}
-
-static inline guint8 *
-alloc_code_memory (guint code_size)
-{
- guint8 *p;
-
-#ifdef NEED_MPROTECT
- p = g_malloc (code_size + PAGESIZE - 1);
-
- /* Align to a multiple of PAGESIZE, assumed to be a power of two */
- p = (char *)(((int) p + PAGESIZE-1) & ~(PAGESIZE-1));
-#else
- p = g_malloc (code_size);
-#endif
- DEBUG (printf (" align: %p (%d)\n", p, (guint)p % 4));
-
- return p;
-}
-
-/* static MonoString*
-mono_string_new_wrapper (const char *text)
-{
- return text ? mono_string_new (mono_domain_get (), text) : NULL;
-} */
-
-static inline guint8 *
-emit_call_and_store_retval (guint8 *p, MonoMethodSignature *sig, guint stack_size, gboolean string_ctor)
-{
- guint32 simpletype;
-
- /* call "callme" */
- ppc_mtlr (p, ppc_r0);
- ppc_blrl (p);
-
- /* get return value */
- if (sig->ret->byref || string_ctor) {
- ppc_lwz (p, ppc_r9, stack_size - 12, ppc_r31); /* load "retval" address */
- ppc_stw (p, ppc_r3, 0, ppc_r9); /* save return value (r3) to "retval" */
- } else {
- simpletype = sig->ret->type;
-enum_retvalue:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- ppc_lwz (p, ppc_r9, stack_size - 12, ppc_r31); /* load "retval" address */
- ppc_stb (p, ppc_r3, 0, ppc_r9); /* save return value (r3) to "retval" */
- break;
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- ppc_lwz (p, ppc_r9, stack_size - 12, ppc_r31); /* load "retval" address */
- ppc_sth (p, ppc_r3, 0, ppc_r9); /* save return value (r3) to "retval" */
- break;
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_STRING:
- ppc_lwz (p, ppc_r9, stack_size - 12, ppc_r31); /* load "retval" address */
- ppc_stw (p, ppc_r3, 0, ppc_r9); /* save return value (r3) to "retval" */
- break;
- case MONO_TYPE_R4:
- ppc_lwz (p, ppc_r9, stack_size - 12, ppc_r31); /* load "retval" address */
- ppc_stfs (p, ppc_f1, 0, ppc_r9); /* save return value (f1) to "retval" */
- break;
- case MONO_TYPE_R8:
- ppc_lwz (p, ppc_r9, stack_size - 12, ppc_r31); /* load "retval" address */
- ppc_stfd (p, ppc_f1, 0, ppc_r9); /* save return value (f1) to "retval" */
- break;
- case MONO_TYPE_I8:
- ppc_lwz (p, ppc_r9, stack_size - 12, ppc_r31); /* load "retval" address */
- ppc_stw (p, ppc_r3, 0, ppc_r9); /* save return value (r3) to "retval" */
- ppc_stw (p, ppc_r4, 4, ppc_r9); /* save return value (r3) to "retval" */
- break;
- case MONO_TYPE_VALUETYPE:
- if (sig->ret->data.klass->enumtype) {
- simpletype = sig->ret->data.klass->enum_basetype->type;
- goto enum_retvalue;
- }
- break;
- case MONO_TYPE_VOID:
- break;
- default:
- g_error ("Can't handle as return value 0x%x", sig->ret->type);
- }
- }
-
- return p;
-}
-
-static inline guint8 *
-emit_epilog (guint8 *p, MonoMethodSignature *sig, guint stack_size)
-{
- /* function epilog */
- ppc_lwz (p, ppc_r11, 0, ppc_r1); /* r11 <--- sp[0] load backchain from caller's function */
- ppc_lwz (p, ppc_r0, RET_ADDR_OFFSET, ppc_r11); /* r0 <--- r11[4] load return address */
- ppc_mtlr (p, ppc_r0); /* LR <--- r0 set return address */
- ppc_lwz (p, ppc_r31, -4, ppc_r11); /* r31 <--- r11[-4] restore r31 */
- ppc_mr (p, ppc_r1, ppc_r11); /* sp <--- r11 restore stack */
- ppc_blr (p); /* return */
-
- return p;
-}
-
-MonoPIFunc
-mono_arch_create_trampoline (MonoMethodSignature *sig, gboolean string_ctor)
-{
- guint8 *p, *code_buffer;
- guint stack_size, code_size;
- gboolean use_memcpy = FALSE;
-
- DEBUG (printf ("\nPInvoke [start emiting]\n"));
- calculate_sizes (sig, &stack_size, &code_size, string_ctor, &use_memcpy);
-
- p = code_buffer = alloc_code_memory (code_size);
- p = emit_prolog (p, sig, stack_size);
- p = emit_save_parameters (p, sig, stack_size, use_memcpy);
- p = emit_call_and_store_retval (p, sig, stack_size, string_ctor);
- p = emit_epilog (p, sig, stack_size);
-
- /* {
- guchar *cp;
- printf (".text\n.align 4\n.globl main\n.type main,@function\nmain:\n");
- for (cp = code_buffer; cp < p; cp++) {
- printf (".byte 0x%x\n", *cp);
- }
- } */
-
-#ifdef NEED_MPROTECT
- if (mprotect (code_buffer, 1024, PROT_READ | PROT_WRITE | PROT_EXEC)) {
- g_error ("Cannot mprotect trampoline\n");
- }
-#endif
-
- DEBUG (printf ("emited code size: %d\n", p - code_buffer));
- flush_icache (code_buffer, p - code_buffer);
-
- DEBUG (printf ("PInvoke [end emiting]\n"));
-
- return (MonoPIFunc) code_buffer;
- /* return fake_func; */
-}
-
-
-#ifdef __APPLE__
-#define MINV_POS 40 /* MonoInvocation structure offset on stack - STACK_PARAM_OFFSET + 4 pointer args for stackval_from_data */
-#else
-#define MINV_POS 8 /* MonoInvocation structure offset on stack */
-#endif
-#define STACK_POS (MINV_POS - sizeof (stackval) * sig->param_count)
-#define OBJ_POS 8
-#define TYPE_OFFSET (G_STRUCT_OFFSET (stackval, type))
-
-/*
- * Returns a pointer to a native function that can be used to
- * call the specified method.
- * The function created will receive the arguments according
- * to the call convention specified in the method.
- * This function works by creating a MonoInvocation structure,
- * filling the fields in and calling ves_exec_method on it.
- * Still need to figure out how to handle the exception stuff
- * across the managed/unmanaged boundary.
- */
-void *
-mono_arch_create_method_pointer (MonoMethod *method)
-{
- MonoMethodSignature *sig;
- MonoJitInfo *ji;
- guint8 *p, *code_buffer;
- guint i, align = 0, code_size, stack_size, stackval_arg_pos, local_pos, local_start, reg_param = 0, stack_param,
- cpos, vt_cur;
- gint *vtbuf;
- guint32 simpletype;
-
- code_size = 1024;
- stack_size = 1024;
- stack_param = 0;
-
- sig = mono_method_signature (method);
-
- p = code_buffer = g_malloc (code_size);
-
- DEBUG (printf ("\nDelegate [start emiting] %s\n", mono_method_get_name (method)));
-
- /* prolog */
- ppc_stwu (p, ppc_r1, -stack_size, ppc_r1); /* sp <--- sp - stack_size, sp[0] <---- sp save sp, alloc stack */
- ppc_mflr (p, ppc_r0); /* r0 <--- LR */
- ppc_stw (p, ppc_r31, stack_size - 4, ppc_r1); /* sp[+4] <--- r31 save r31 */
- ppc_stw (p, ppc_r0, stack_size + RET_ADDR_OFFSET, ppc_r1); /* sp[-4] <--- LR save return address for "callme" */
- ppc_mr (p, ppc_r31, ppc_r1); /* r31 <--- sp */
-
- /* let's fill MonoInvocation */
- /* first zero some fields */
- ppc_li (p, ppc_r0, 0);
- ppc_stw (p, ppc_r0, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, ex)), ppc_r31);
- ppc_stw (p, ppc_r0, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, ex_handler)), ppc_r31);
- ppc_stw (p, ppc_r0, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, parent)), ppc_r31);
-
- /* set method pointer */
- ppc_lis (p, ppc_r0, (guint32) method >> 16);
- ppc_ori (p, ppc_r0, ppc_r0, (guint32) method & 0xffff);
- ppc_stw (p, ppc_r0, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, method)), ppc_r31);
-
- local_start = local_pos = MINV_POS + sizeof (MonoInvocation) + (sig->param_count + 1) * sizeof (stackval);
-
- if (sig->hasthis) {
- ppc_stw (p, ppc_r3, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, obj)), ppc_r31);
- reg_param = 1;
- }
-
- if (sig->param_count) {
- gint save_count = MIN (8, sig->param_count + sig->hasthis);
- for (i = reg_param; i < save_count; i ++) {
- ppc_stw (p, ppc_r3 + i, local_pos, ppc_r31);
- local_pos += 4;
- DEBUG (printf ("save r%d\n", 4 + i));
- }
- }
-
- /* prepare space for valuetypes */
- vt_cur = local_pos;
- vtbuf = alloca (sizeof(int)*sig->param_count);
- cpos = 0;
- for (i = 0; i < sig->param_count; i++) {
- MonoType *type = sig->params [i];
- vtbuf [i] = -1;
- if (type->type == MONO_TYPE_VALUETYPE) {
- MonoClass *klass = type->data.klass;
- gint size;
-
- if (klass->enumtype)
- continue;
- size = mono_class_native_size (klass, &align);
- cpos += align - 1;
- cpos &= ~(align - 1);
- vtbuf [i] = cpos;
- cpos += size;
- }
- }
- cpos += 3;
- cpos &= ~3;
-
- local_pos += cpos;
-
- /* set MonoInvocation::stack_args */
- stackval_arg_pos = MINV_POS + sizeof (MonoInvocation);
- ppc_addi (p, ppc_r0, ppc_r31, stackval_arg_pos);
- ppc_stw (p, ppc_r0, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, stack_args)), ppc_r31);
-
- /* add stackval arguments */
- for (i = 0; i < sig->param_count; ++i) {
- if (reg_param < 8) {
- ppc_addi (p, ppc_r5, ppc_r31, local_start + i*4);
- reg_param ++;
- } else {
- ppc_addi (p, ppc_r5, stack_size + 8 + stack_param, ppc_r31);
- stack_param ++;
- }
- ppc_lis (p, ppc_r3, (guint32) sig->params [i] >> 16);
-
- if (vtbuf [i] >= 0) {
- ppc_addi (p, ppc_r4, ppc_r31, vt_cur);
- ppc_stw (p, ppc_r4, stackval_arg_pos, ppc_r31);
- ppc_addi (p, ppc_r4, ppc_r31, stackval_arg_pos);
- ppc_lwz (p, ppc_r5, 0, ppc_r5);
- vt_cur += vtbuf [i];
- } else {
- ppc_addi (p, ppc_r4, ppc_r31, stackval_arg_pos);
- }
- ppc_ori (p, ppc_r3, ppc_r3, (guint32) sig->params [i] & 0xffff);
- ppc_lis (p, ppc_r0, (guint32) stackval_from_data >> 16);
- ppc_li (p, ppc_r6, sig->pinvoke);
- ppc_ori (p, ppc_r0, ppc_r0, (guint32) stackval_from_data & 0xffff);
- ppc_mtlr (p, ppc_r0);
- ppc_blrl (p);
-
- stackval_arg_pos += sizeof (stackval);
- }
-
- /* return value storage */
- if (sig->param_count) {
- ppc_addi (p, ppc_r0, ppc_r31, stackval_arg_pos);
- }
- ppc_stw (p, ppc_r0, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, retval)), ppc_r31);
-
- /* call ves_exec_method */
- ppc_lis (p, ppc_r0, (guint32) ves_exec_method >> 16);
- ppc_addi (p, ppc_r3, ppc_r31, MINV_POS);
- ppc_ori (p, ppc_r0, ppc_r0, (guint32) ves_exec_method & 0xffff);
- ppc_mtlr (p, ppc_r0);
- ppc_blrl (p);
-
- /* move retval from stackval to proper place (r3/r4/...) */
- if (sig->ret->byref) {
- DEBUG (printf ("ret by ref\n"));
- ppc_lwz (p, ppc_r3, stackval_arg_pos, ppc_r31);
- } else {
- enum_retvalue:
- switch (sig->ret->type) {
- case MONO_TYPE_VOID:
- break;
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- ppc_lbz (p, ppc_r3, stackval_arg_pos, ppc_r31);
- break;
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- ppc_lhz (p, ppc_r3, stackval_arg_pos, ppc_r31);
- break;
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_CLASS:
- ppc_lwz (p, ppc_r3, stackval_arg_pos, ppc_r31);
- break;
- case MONO_TYPE_I8:
- ppc_lwz (p, ppc_r3, stackval_arg_pos, ppc_r31);
- ppc_lwz (p, ppc_r4, stackval_arg_pos + 4, ppc_r31);
- break;
- case MONO_TYPE_R4:
- ppc_lfs (p, ppc_f1, stackval_arg_pos, ppc_r31);
- break;
- case MONO_TYPE_R8:
- ppc_lfd (p, ppc_f1, stackval_arg_pos, ppc_r31);
- break;
- case MONO_TYPE_VALUETYPE:
- if (sig->ret->data.klass->enumtype) {
- simpletype = sig->ret->data.klass->enum_basetype->type;
- goto enum_retvalue;
- }
- NOT_IMPLEMENTED ("value type as ret val from delegate");
- break;
- default:
- g_error ("Type 0x%x not handled yet in thunk creation", sig->ret->type);
- break;
- }
- }
-
- /* epilog */
- ppc_lwz (p, ppc_r11, 0, ppc_r1); /* r11 <--- sp[0] load backchain from caller's function */
- ppc_lwz (p, ppc_r0, RET_ADDR_OFFSET, ppc_r11); /* r0 <--- r11[4] load return address */
- ppc_mtlr (p, ppc_r0); /* LR <--- r0 set return address */
- ppc_lwz (p, ppc_r31, -4, ppc_r11); /* r31 <--- r11[-4] restore r31 */
- ppc_mr (p, ppc_r1, ppc_r11); /* sp <--- r11 restore stack */
- ppc_blr (p); /* return */
-
- DEBUG (printf ("emited code size: %d\n", p - code_buffer));
- DEBUG (disassemble (code_buffer, p - code_buffer));
- flush_icache (code_buffer, p - code_buffer);
-
- DEBUG (printf ("Delegate [end emiting]\n"));
-
- ji = g_new0 (MonoJitInfo, 1);
- ji->method = method;
- ji->code_size = p - code_buffer;
- ji->code_start = code_buffer;
-
- mono_jit_info_table_add (mono_get_root_domain (), ji);
-
- return ji->code_start;
-}
diff --git a/mono/arch/x86/Makefile.am b/mono/arch/x86/Makefile.am
index 977823705ad..bab0f9e54d6 100644
--- a/mono/arch/x86/Makefile.am
+++ b/mono/arch/x86/Makefile.am
@@ -1,9 +1 @@
-if INTERP_SUPPORTED
-
-AM_CPPFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
-
-noinst_LTLIBRARIES = libmonoarch-x86.la
-
-libmonoarch_x86_la_SOURCES = tramp.c x86-codegen.h
-
-endif
+EXTRA_DIST = x86-codegen.h \ No newline at end of file
diff --git a/mono/arch/x86/test.c b/mono/arch/x86/test.c
deleted file mode 100644
index 3511e8fdaf0..00000000000
--- a/mono/arch/x86/test.c
+++ /dev/null
@@ -1,225 +0,0 @@
-#include "x86-codegen.h"
-#include <stdio.h>
-
-/* don't run the resulting program, it will destroy your computer,
- * just objdump -d it to inspect we generated the correct assembler.
- */
-
-int main() {
- unsigned char code [16000];
- unsigned char *p = code;
- unsigned char *target, *start, *end;
- unsigned long mem_addr = 0xdeadbeef;
- int size, i;
-
- printf (".text\n.align 4\n.globl main\n.type main,@function\nmain:\n");
-
- x86_prolog (p, 16, X86_CALLER_REGS);
-
- x86_cmpxchg_reg_reg (p, X86_EAX, X86_EBP);
- x86_cmpxchg_membase_reg (p, X86_EAX, 12, X86_EBP);
-
- x86_xchg_reg_reg (p, X86_EAX, X86_EBP, 4);
- x86_xchg_reg_reg (p, X86_EAX, X86_EBP, 1); // FIXME?
- x86_xchg_membase_reg (p, X86_EAX, 12, X86_EBP, 4);
- x86_xchg_membase_reg (p, X86_EAX, 12, X86_EBP, 2);
- x86_xchg_membase_reg (p, X86_EAX, 12, X86_EBX, 1); // FIXME?
-
- x86_inc_reg (p, X86_EAX);
- x86_inc_mem (p, mem_addr);
- x86_inc_membase (p, X86_ESP, 4);
-
- x86_nop (p);
- x86_nop (p);
-
- x86_dec_reg (p, X86_EAX);
- x86_dec_reg (p, X86_ECX);
- x86_dec_mem (p, mem_addr);
- x86_dec_membase (p, X86_ESP, 4);
-
- x86_not_reg (p, X86_EDX);
- x86_not_reg (p, X86_ECX);
- x86_not_mem (p, mem_addr);
- x86_not_membase (p, X86_ESP, 4);
- x86_not_membase (p, X86_ESP, 0x4444444);
- x86_not_membase (p, X86_EBP, 0x4444444);
- x86_not_membase (p, X86_ECX, 0x4444444);
- x86_not_membase (p, X86_EDX, 0);
- x86_not_membase (p, X86_EBP, 0);
-
- x86_neg_reg (p, X86_EAX);
- x86_neg_reg (p, X86_ECX);
- x86_neg_mem (p, mem_addr);
- x86_neg_membase (p, X86_ESP, 8);
-
- x86_alu_reg_imm (p, X86_ADD, X86_EAX, 5);
- x86_alu_reg_imm (p, X86_ADD, X86_EBX, -10);
- x86_alu_reg_imm (p, X86_SUB, X86_EDX, 7);
- x86_alu_reg_imm (p, X86_OR, X86_ESP, 0xffffedaf);
- x86_alu_reg_imm (p, X86_CMP, X86_ECX, 1);
- x86_alu_mem_imm (p, X86_ADC, mem_addr, 2);
- x86_alu_membase_imm (p, X86_ADC, X86_ESP, -4, 4);
- x86_alu_membase_imm (p, X86_ADC, X86_ESP, -12, 0xffffedaf);
-
- x86_alu_mem_reg (p, X86_SUB, mem_addr, X86_EDX);
- x86_alu_reg_reg (p, X86_ADD, X86_EAX, X86_EBX);
- x86_alu_reg_mem (p, X86_ADD, X86_EAX, mem_addr);
- x86_alu_reg_imm (p, X86_ADD, X86_EAX, 0xdeadbeef);
- x86_alu_reg_membase (p, X86_XOR, X86_EDX, X86_ESP, 4);
- x86_alu_membase_reg (p, X86_XOR, X86_EBP, 8, X86_ESI);
-
- x86_test_reg_imm (p, X86_EAX, 16);
- x86_test_reg_imm (p, X86_EDX, -16);
- x86_test_mem_imm (p, mem_addr, 1);
- x86_test_membase_imm (p, X86_EBP, 8, 1);
-
- x86_test_reg_reg (p, X86_EAX, X86_EDX);
- x86_test_mem_reg (p, mem_addr, X86_EDX);
- x86_test_membase_reg (p, X86_ESI, 4, X86_EDX);
-
- x86_shift_reg_imm (p, X86_SHL, X86_EAX, 1);
- x86_shift_reg_imm (p, X86_SHL, X86_EDX, 2);
-
- x86_shift_mem_imm (p, X86_SHL, mem_addr, 2);
- x86_shift_membase_imm (p, X86_SHLR, X86_EBP, 8, 4);
-
- /*
- * Shift by CL
- */
- x86_shift_reg (p, X86_SHL, X86_EAX);
- x86_shift_mem (p, X86_SHL, mem_addr);
-
- x86_mul_reg (p, X86_EAX, 0);
- x86_mul_reg (p, X86_EAX, 1);
- x86_mul_membase (p, X86_EBP, 8, 1);
-
- x86_imul_reg_reg (p, X86_EBX, X86_EDX);
- x86_imul_reg_membase (p, X86_EBX, X86_EBP, 12);
-
- x86_imul_reg_reg_imm (p, X86_EBX, X86_EDX, 10);
- x86_imul_reg_mem_imm (p, X86_EBX, mem_addr, 20);
- x86_imul_reg_membase_imm (p, X86_EBX, X86_EBP, 16, 300);
-
- x86_div_reg (p, X86_EDX, 0);
- x86_div_reg (p, X86_EDX, 1);
- x86_div_mem (p, mem_addr, 1);
- x86_div_membase (p, X86_ESI, 4, 1);
-
- x86_mov_mem_reg (p, mem_addr, X86_EAX, 4);
- x86_mov_mem_reg (p, mem_addr, X86_EAX, 2);
- x86_mov_mem_reg (p, mem_addr, X86_EAX, 1);
- x86_mov_membase_reg (p, X86_EBP, 4, X86_EAX, 1);
-
- x86_mov_regp_reg (p, X86_EAX, X86_EAX, 4);
- x86_mov_membase_reg (p, X86_EAX, 0, X86_EAX, 4);
- x86_mov_reg_membase (p, X86_EAX, X86_EAX, 0, 4);
- x86_mov_reg_memindex (p, X86_ECX, X86_EAX, 34, X86_EDX, 2, 4);
- x86_mov_reg_memindex (p, X86_ECX, X86_NOBASEREG, 34, X86_EDX, 2, 4);
- x86_mov_memindex_reg (p, X86_EAX, X86_EAX, 0, X86_EDX, 2, 4);
- x86_mov_reg_reg (p, X86_EAX, X86_EAX, 1);
- x86_mov_reg_reg (p, X86_EAX, X86_EAX, 4);
- x86_mov_reg_mem (p, X86_EAX, mem_addr, 4);
-
- x86_mov_reg_imm (p, X86_EAX, 10);
- x86_mov_mem_imm (p, mem_addr, 54, 4);
- x86_mov_mem_imm (p, mem_addr, 54, 1);
-
- x86_lea_mem (p, X86_EDX, mem_addr);
- /* test widen */
- x86_widen_memindex (p, X86_EDX, X86_ECX, 0, X86_EBX, 2, 1, 0);
-
- x86_cdq (p);
- x86_wait (p);
-
- x86_fp_op_mem (p, X86_FADD, mem_addr, 1);
- x86_fp_op_mem (p, X86_FSUB, mem_addr, 0);
- x86_fp_op (p, X86_FSUB, 2);
- x86_fp_op_reg (p, X86_FMUL, 1, 0);
- x86_fstp (p, 2);
- x86_fcompp (p);
- x86_fnstsw (p);
- x86_fnstcw (p, mem_addr);
- x86_fnstcw_membase (p, X86_ESP, -8);
-
- x86_fldcw_membase (p, X86_ESP, -8);
- x86_fchs (p);
- x86_frem (p);
- x86_fxch (p, 3);
- x86_fcomip (p, 3);
- x86_fld_membase (p, X86_ESP, -8, 1);
- x86_fld_membase (p, X86_ESP, -8, 0);
- x86_fld80_membase (p, X86_ESP, -8);
- x86_fild_membase (p, X86_ESP, -8, 1);
- x86_fild_membase (p, X86_ESP, -8, 0);
- x86_fld_reg (p, 4);
- x86_fldz (p);
- x86_fld1 (p);
-
- x86_fst (p, mem_addr, 1, 0);
- x86_fst (p, mem_addr, 1, 1);
- x86_fst (p, mem_addr, 0, 1);
-
- x86_fist_pop_membase (p, X86_EDX, 4, 1);
- x86_fist_pop_membase (p, X86_EDX, 4, 0);
-
- x86_push_reg (p, X86_EBX);
- x86_push_membase (p, X86_EBP, 8);
- x86_push_imm (p, -1);
- x86_pop_reg (p, X86_EBX);
-
- x86_pushad (p);
- x86_pushfd (p);
- x86_popfd (p);
- x86_popad (p);
-
- target = p;
-
- start = p;
- x86_jump32 (p, mem_addr);
- x86_patch (start, target);
- start = p;
- x86_jump8 (p, 12);
- x86_patch (start, target);
- x86_jump_reg (p, X86_EAX);
- x86_jump_membase (p, X86_EDX, 16);
-
- x86_jump_code (p, target);
-
- x86_branch8 (p, X86_CC_EQ, 54, 1);
- x86_branch32 (p, X86_CC_LT, 54, 0);
- x86_branch (p, X86_CC_GT, target, 0);
- x86_branch_disp (p, X86_CC_NE, -4, 0);
-
- x86_set_reg (p, X86_CC_EQ, X86_EAX, 0);
- x86_set_membase (p, X86_CC_LE, X86_EBP, -8, 0);
-
- x86_call_code (p, printf);
- x86_call_reg (p, X86_ECX);
-
- x86_sahf (p);
-
- x86_fsin (p);
- x86_fcos (p);
- x86_fabs (p);
- x86_fpatan (p);
- x86_fprem (p);
- x86_fprem1 (p);
- x86_frndint (p);
- x86_fsqrt (p);
- x86_fptan (p);
-
- x86_leave (p);
- x86_ret (p);
- x86_ret_imm (p, 24);
-
- x86_cmov_reg (p, X86_CC_GT, 1, X86_EAX, X86_EDX);
- x86_cmov_membase (p, X86_CC_GT, 0, X86_EAX, X86_EDX, -4);
-
- x86_nop (p);
- x86_epilog (p, X86_CALLER_REGS);
-
- size = p-code;
- for (i = 0; i < size; ++i)
- printf (".byte %d\n", (unsigned int) code [i]);
- return 0;
-}
diff --git a/mono/arch/x86/tramp.c b/mono/arch/x86/tramp.c
deleted file mode 100644
index fab5a55325f..00000000000
--- a/mono/arch/x86/tramp.c
+++ /dev/null
@@ -1,545 +0,0 @@
-/*
- * Create trampolines to invoke arbitrary functions.
- *
- * Copyright (C) Ximian Inc.
- *
- * Authors:
- * Paolo Molaro (lupus@ximian.com)
- * Dietmar Maurer (dietmar@ximian.com)
- *
- */
-
-#include "config.h"
-#include <stdlib.h>
-#include <string.h>
-#include "x86-codegen.h"
-#include "mono/metadata/class.h"
-#include "mono/metadata/tabledefs.h"
-#include "mono/interpreter/interp.h"
-#include "mono/metadata/appdomain.h"
-#include "mono/metadata/marshal.h"
-
-/*
- * The resulting function takes the form:
- * void func (void (*callme)(), void *retval, void *this_obj, stackval *arguments);
- */
-#define FUNC_ADDR_POS 8
-#define RETVAL_POS 12
-#define THIS_POS 16
-#define ARGP_POS 20
-#define LOC_POS -4
-
-#define ARG_SIZE sizeof (stackval)
-
-MonoPIFunc
-mono_arch_create_trampoline (MonoMethodSignature *sig, gboolean string_ctor)
-{
- unsigned char *p, *code_buffer;
- guint32 stack_size = 0, code_size = 50;
- guint32 arg_pos, simpletype;
- int i, stringp;
- static GHashTable *cache = NULL;
- MonoPIFunc res;
-
- if (!cache)
- cache = g_hash_table_new ((GHashFunc)mono_signature_hash,
- (GCompareFunc)mono_metadata_signature_equal);
-
- if ((res = (MonoPIFunc)g_hash_table_lookup (cache, sig)))
- return res;
-
- if (sig->hasthis) {
- stack_size += sizeof (gpointer);
- code_size += 10;
- }
-
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref && !sig->ret->data.klass->enumtype) {
- stack_size += sizeof (gpointer);
- code_size += 5;
- }
-
- for (i = 0; i < sig->param_count; ++i) {
- if (sig->params [i]->byref) {
- stack_size += sizeof (gpointer);
- code_size += 20;
- continue;
- }
- simpletype = sig->params [i]->type;
-enum_calc_size:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- stack_size += 4;
- code_size += i < 10 ? 5 : 8;
- break;
- case MONO_TYPE_VALUETYPE: {
- int size;
- if (sig->params [i]->data.klass->enumtype) {
- simpletype = sig->params [i]->data.klass->enum_basetype->type;
- goto enum_calc_size;
- }
- if ((size = mono_class_native_size (sig->params [i]->data.klass, NULL)) != 4) {
- stack_size += size + 3;
- stack_size &= ~3;
- code_size += 32;
- } else {
- stack_size += 4;
- code_size += i < 10 ? 5 : 8;
- }
- break;
- }
- case MONO_TYPE_I8:
- stack_size += 8;
- code_size += i < 10 ? 5 : 8;
- break;
- case MONO_TYPE_R4:
- stack_size += 4;
- code_size += i < 10 ? 10 : 13;
- break;
- case MONO_TYPE_R8:
- stack_size += 8;
- code_size += i < 10 ? 7 : 10;
- break;
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i]->type);
- }
- }
- /*
- * FIXME: take into account large return values.
- */
-
- code_buffer = p = alloca (code_size);
-
- /*
- * Standard function prolog.
- */
- x86_push_reg (p, X86_EBP);
- x86_mov_reg_reg (p, X86_EBP, X86_ESP, 4);
- /*
- * and align to 16 byte boundary...
- */
- stack_size += 15;
- stack_size &= ~15;
-
- if (stack_size)
- x86_alu_reg_imm (p, X86_SUB, X86_ESP, stack_size);
-
- /*
- * EDX has the pointer to the args.
- */
- x86_mov_reg_membase (p, X86_EDX, X86_EBP, ARGP_POS, 4);
-
- /*
- * Push arguments in reverse order.
- */
- stringp = 0;
- for (i = sig->param_count; i; --i) {
- arg_pos = ARG_SIZE * (i - 1);
- if (sig->params [i - 1]->byref) {
- x86_push_membase (p, X86_EDX, arg_pos);
- continue;
- }
- simpletype = sig->params [i - 1]->type;
-enum_marshal:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_PTR:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- x86_push_membase (p, X86_EDX, arg_pos);
- break;
- case MONO_TYPE_R4:
- x86_alu_reg_imm (p, X86_SUB, X86_ESP, 4);
- x86_fld_membase (p, X86_EDX, arg_pos, TRUE);
- x86_fst_membase (p, X86_ESP, 0, FALSE, TRUE);
- break;
- case MONO_TYPE_CLASS:
- x86_push_membase (p, X86_EDX, arg_pos);
- break;
- case MONO_TYPE_SZARRAY:
- x86_push_membase (p, X86_EDX, arg_pos);
- break;
- case MONO_TYPE_VALUETYPE:
- if (!sig->params [i - 1]->data.klass->enumtype) {
- int size = mono_class_native_size (sig->params [i - 1]->data.klass, NULL);
- if (size == 4) {
- /* it's a structure that fits in 4 bytes, need to push the value pointed to */
- x86_mov_reg_membase (p, X86_EAX, X86_EDX, arg_pos, 4);
- x86_push_regp (p, X86_EAX);
- } else {
- int ss = size;
- ss += 3;
- ss &= ~3;
-
- x86_alu_reg_imm (p, X86_SUB, X86_ESP, ss);
- x86_push_imm (p, size);
- x86_push_membase (p, X86_EDX, arg_pos);
- x86_lea_membase (p, X86_EAX, X86_ESP, 2*4);
- x86_push_reg (p, X86_EAX);
- x86_mov_reg_imm (p, X86_EAX, memcpy);
- x86_call_reg (p, X86_EAX);
- x86_alu_reg_imm (p, X86_ADD, X86_ESP, 12);
- /* memcpy might clobber EDX so restore it */
- x86_mov_reg_membase (p, X86_EDX, X86_EBP, ARGP_POS, 4);
- }
- } else {
- /* it's an enum value */
- simpletype = sig->params [i - 1]->data.klass->enum_basetype->type;
- goto enum_marshal;
- }
- break;
- case MONO_TYPE_I8:
- case MONO_TYPE_U8:
- case MONO_TYPE_R8:
- x86_push_membase (p, X86_EDX, arg_pos + 4);
- x86_push_membase (p, X86_EDX, arg_pos);
- break;
- default:
- g_error ("Can't trampoline 0x%x", sig->params [i - 1]->type);
- }
- }
-
- if (sig->hasthis) {
- if (sig->call_convention != MONO_CALL_THISCALL) {
- x86_mov_reg_membase (p, X86_EDX, X86_EBP, THIS_POS, 4);
- x86_push_reg (p, X86_EDX);
- } else {
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, THIS_POS, 4);
- }
- }
-
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref) {
- MonoClass *klass = sig->ret->data.klass;
- if (!klass->enumtype) {
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_push_membase (p, X86_ECX, 0);
- }
- }
-
- /*
- * Insert call to function
- */
- x86_mov_reg_membase (p, X86_EDX, X86_EBP, FUNC_ADDR_POS, 4);
- x86_call_reg (p, X86_EDX);
-
- /*
- * Handle retval.
- * Small integer and pointer values are in EAX.
- * Long integers are in EAX:EDX.
- * FP values are on the FP stack.
- */
-
- if (sig->ret->byref || string_ctor) {
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_mov_regp_reg (p, X86_ECX, X86_EAX, 4);
- } else {
- simpletype = sig->ret->type;
- enum_retvalue:
- switch (simpletype) {
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_mov_regp_reg (p, X86_ECX, X86_EAX, 1);
- break;
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_mov_regp_reg (p, X86_ECX, X86_EAX, 2);
- break;
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_ARRAY:
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_mov_regp_reg (p, X86_ECX, X86_EAX, 4);
- break;
- case MONO_TYPE_STRING:
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_mov_regp_reg (p, X86_ECX, X86_EAX, 4);
- break;
- case MONO_TYPE_R4:
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_fst_membase (p, X86_ECX, 0, FALSE, TRUE);
- break;
- case MONO_TYPE_R8:
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_fst_membase (p, X86_ECX, 0, TRUE, TRUE);
- break;
- case MONO_TYPE_I8:
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, RETVAL_POS, 4);
- x86_mov_regp_reg (p, X86_ECX, X86_EAX, 4);
- x86_mov_membase_reg (p, X86_ECX, 4, X86_EDX, 4);
- break;
- case MONO_TYPE_VALUETYPE:
- if (sig->ret->data.klass->enumtype) {
- simpletype = sig->ret->data.klass->enum_basetype->type;
- goto enum_retvalue;
- }
- case MONO_TYPE_VOID:
- break;
- default:
- g_error ("Can't handle as return value 0x%x", sig->ret->type);
- }
- }
-
- /*
- * Standard epilog.
- */
- x86_leave (p);
- x86_ret (p);
-
- g_assert (p - code_buffer < code_size);
- res = (MonoPIFunc)g_memdup (code_buffer, p - code_buffer);
-
- g_hash_table_insert (cache, sig, res);
-
- return res;
-}
-
-#define MINV_POS (- sizeof (MonoInvocation))
-#define STACK_POS (MINV_POS - sizeof (stackval) * sig->param_count)
-#define TYPE_OFFSET (G_STRUCT_OFFSET (stackval, type))
-
-/*
- * Returns a pointer to a native function that can be used to
- * call the specified method.
- * The function created will receive the arguments according
- * to the call convention specified in the method.
- * This function works by creating a MonoInvocation structure,
- * filling the fields in and calling ves_exec_method on it.
- * Still need to figure out how to handle the exception stuff
- * across the managed/unmanaged boundary.
- */
-void *
-mono_arch_create_method_pointer (MonoMethod *method)
-{
- MonoMethodSignature *sig;
- MonoJitInfo *ji;
- unsigned char *p, *code_buffer;
- gint32 local_size;
- gint32 stackval_pos, arg_pos = 8;
- int i, size, align, cpos;
- int *vtbuf;
-
- sig = method->signature;
-
- code_buffer = p = alloca (512); /* FIXME: check for overflows... */
- vtbuf = alloca (sizeof(int)*sig->param_count);
-
- local_size = sizeof (MonoInvocation) + sizeof (stackval) * (sig->param_count + 1);
-
- local_size += 7;
- local_size &= ~7;
-
- stackval_pos = -local_size;
-
- cpos = 0;
- for (i = 0; i < sig->param_count; i++) {
- MonoType *type = sig->params [i];
- vtbuf [i] = -1;
- if (type->type == MONO_TYPE_VALUETYPE) {
- MonoClass *klass = type->data.klass;
- if (klass->enumtype)
- continue;
- size = mono_class_native_size (klass, &align);
- cpos += align - 1;
- cpos &= ~(align - 1);
- vtbuf [i] = cpos;
- cpos += size;
- }
- }
-
- cpos += 7;
- cpos &= ~7;
-
- local_size += cpos;
-
- /*
- * Standard function prolog.
- */
- x86_push_reg (p, X86_EBP);
- x86_mov_reg_reg (p, X86_EBP, X86_ESP, 4);
- x86_alu_reg_imm (p, X86_SUB, X86_ESP, local_size);
-
- /*
- * Initialize MonoInvocation fields, first the ones known now.
- */
- x86_mov_reg_imm (p, X86_EAX, 0);
- x86_mov_membase_reg (p, X86_EBP, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, ex)), X86_EAX, 4);
- x86_mov_membase_reg (p, X86_EBP, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, ex_handler)), X86_EAX, 4);
- x86_mov_membase_reg (p, X86_EBP, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, parent)), X86_EAX, 4);
- /*
- * Set the method pointer.
- */
- x86_mov_membase_imm (p, X86_EBP, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, method)), (int)method, 4);
-
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref && !sig->ret->data.klass->enumtype)
- arg_pos += 4;
-
- /*
- * Handle this.
- */
- if (sig->hasthis) {
- if (sig->call_convention != MONO_CALL_THISCALL) {
- /*
- * Grab it from the stack, otherwise it's already in ECX.
- */
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, arg_pos, 4);
- arg_pos += 4;
- }
- x86_mov_membase_reg (p, X86_EBP, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, obj)), X86_ECX, 4);
- }
- /*
- * Handle the arguments. stackval_pos is the posset of the stackval array from EBP.
- * arg_pos is the offset from EBP to the incoming arg on the stack.
- * We just call stackval_from_data to handle all the (nasty) issues....
- */
- x86_lea_membase (p, X86_EAX, X86_EBP, stackval_pos);
- x86_mov_membase_reg (p, X86_EBP, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, stack_args)), X86_EAX, 4);
- for (i = 0; i < sig->param_count; ++i) {
- if (vtbuf [i] >= 0) {
- x86_lea_membase (p, X86_EAX, X86_EBP, - local_size + vtbuf [i]);
- x86_mov_membase_reg (p, X86_EBP, stackval_pos, X86_EAX, 4);
- }
- x86_mov_reg_imm (p, X86_ECX, stackval_from_data);
- x86_lea_membase (p, X86_EDX, X86_EBP, arg_pos);
- x86_lea_membase (p, X86_EAX, X86_EBP, stackval_pos);
- x86_push_imm (p, sig->pinvoke);
- x86_push_reg (p, X86_EDX);
- x86_push_reg (p, X86_EAX);
- x86_push_imm (p, sig->params [i]);
- x86_call_reg (p, X86_ECX);
- x86_alu_reg_imm (p, X86_SUB, X86_ESP, 16);
- stackval_pos += sizeof (stackval);
- /* fixme: alignment */
- if (sig->pinvoke)
- arg_pos += mono_type_native_stack_size (sig->params [i], &align);
- else
- arg_pos += mono_type_stack_size (sig->params [i], &align);
- }
-
- /*
- * Handle the return value storage area.
- */
- x86_lea_membase (p, X86_EAX, X86_EBP, stackval_pos);
- x86_mov_membase_reg (p, X86_EBP, (MINV_POS + G_STRUCT_OFFSET (MonoInvocation, retval)), X86_EAX, 4);
- if (sig->ret->type == MONO_TYPE_VALUETYPE && !sig->ret->byref) {
- MonoClass *klass = sig->ret->data.klass;
- if (!klass->enumtype) {
- x86_mov_reg_membase (p, X86_ECX, X86_EBP, 8, 4);
- x86_mov_membase_reg (p, X86_EBP, stackval_pos, X86_ECX, 4);
- }
- }
-
- /*
- * Call the method.
- */
- x86_lea_membase (p, X86_EAX, X86_EBP, MINV_POS);
- x86_push_reg (p, X86_EAX);
- x86_mov_reg_imm (p, X86_EDX, ves_exec_method);
- x86_call_reg (p, X86_EDX);
-
- /*
- * Move the return value to the proper place.
- */
- x86_lea_membase (p, X86_EAX, X86_EBP, stackval_pos);
- if (sig->ret->byref) {
- x86_mov_reg_membase (p, X86_EAX, X86_EAX, 0, 4);
- } else {
- int simpletype = sig->ret->type;
- enum_retvalue:
- switch (sig->ret->type) {
- case MONO_TYPE_VOID:
- break;
- case MONO_TYPE_BOOLEAN:
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- x86_mov_reg_membase (p, X86_EAX, X86_EAX, 0, 1);
- break;
- case MONO_TYPE_CHAR:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- x86_mov_reg_membase (p, X86_EAX, X86_EAX, 0, 2);
- break;
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_STRING:
- case MONO_TYPE_CLASS:
- x86_mov_reg_membase (p, X86_EAX, X86_EAX, 0, 4);
- break;
- case MONO_TYPE_I8:
- x86_mov_reg_membase (p, X86_EDX, X86_EAX, 4, 4);
- x86_mov_reg_membase (p, X86_EAX, X86_EAX, 0, 4);
- break;
- case MONO_TYPE_R8:
- x86_fld_membase (p, X86_EAX, 0, TRUE);
- break;
- case MONO_TYPE_VALUETYPE:
- if (sig->ret->data.klass->enumtype) {
- simpletype = sig->ret->data.klass->enum_basetype->type;
- goto enum_retvalue;
- }
-
- x86_push_imm (p, sig->pinvoke);
- x86_push_membase (p, X86_EBP, stackval_pos);
- x86_push_reg (p, X86_EAX);
- x86_push_imm (p, sig->ret);
- x86_mov_reg_imm (p, X86_ECX, stackval_to_data);
- x86_call_reg (p, X86_ECX);
- x86_alu_reg_imm (p, X86_SUB, X86_ESP, 16);
-
- break;
- default:
- g_error ("Type 0x%x not handled yet in thunk creation", sig->ret->type);
- break;
- }
- }
-
- /*
- * Standard epilog.
- */
- x86_leave (p);
- x86_ret (p);
-
- g_assert (p - code_buffer < 512);
-
- ji = g_new0 (MonoJitInfo, 1);
- ji->method = method;
- ji->code_size = p - code_buffer;
- ji->code_start = g_memdup (code_buffer, p - code_buffer);
-
- mono_jit_info_table_add (mono_get_root_domain (), ji);
-
- return ji->code_start;
-}
diff --git a/mono/dis/dump.c b/mono/dis/dump.c
index 2b3a4851de0..391ec7fbc77 100755
--- a/mono/dis/dump.c
+++ b/mono/dis/dump.c
@@ -566,6 +566,7 @@ dump_table_method (MonoImage *m)
current_type = 1;
last_m = first_m = 1;
for (i = 1; i <= t->rows; i++){
+ MonoError error;
guint32 cols [MONO_METHOD_SIZE];
char *sig, *impl_flags;
const char *sigblob;
@@ -583,13 +584,17 @@ dump_table_method (MonoImage *m)
mono_metadata_string_heap (m, mono_metadata_decode_row_col (td, current_type - 2, MONO_TYPEDEF_NAME)));
first_m = last_m;
type_container = mono_metadata_load_generic_params (m, MONO_TOKEN_TYPE_DEF | (current_type - 1), NULL);
- if (type_container)
- mono_metadata_load_generic_param_constraints (m, MONO_TOKEN_TYPE_DEF | (current_type - 1), type_container);
+ if (type_container) {
+ mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_TYPE_DEF | (current_type - 1), type_container, &error);
+ g_assert (mono_error_ok (&error)); /*FIXME don't swallow the error message*/
+ }
}
method_container = mono_metadata_load_generic_params (m, MONO_TOKEN_METHOD_DEF | i, type_container);
- if (method_container)
- mono_metadata_load_generic_param_constraints (m, MONO_TOKEN_METHOD_DEF | i, method_container);
+ if (method_container) {
+ mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_METHOD_DEF | i, method_container, &error);
+ g_assert (mono_error_ok (&error)); /*FIXME don't swallow the error message*/
+ }
mono_metadata_decode_table_row (m, MONO_TABLE_METHOD, i - 1, cols, MONO_METHOD_SIZE);
sigblob = mono_metadata_blob_heap (m, cols [MONO_METHOD_SIGNATURE]);
mono_metadata_decode_blob_size (sigblob, &sigblob);
diff --git a/mono/dis/get.c b/mono/dis/get.c
index 34f87b0c8ad..a3f2e7b9cac 100755
--- a/mono/dis/get.c
+++ b/mono/dis/get.c
@@ -889,11 +889,14 @@ dis_stringify_method_signature_full (MonoImage *m, MonoMethodSignature *method,
method_name = mono_metadata_string_heap (m, cols [MONO_METHOD_NAME]);
param_index = cols [MONO_METHOD_PARAMLIST];
if (!method) {
+ MonoError error;
const char *sig = mono_metadata_blob_heap (m, cols [MONO_METHOD_SIGNATURE]);
container = mono_metadata_load_generic_params (m, MONO_TOKEN_METHOD_DEF | methoddef_row, container);
- if (container)
- mono_metadata_load_generic_param_constraints (m, MONO_TOKEN_METHOD_DEF | methoddef_row, container);
+ if (container) {
+ mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_METHOD_DEF | methoddef_row, container, &error);
+ g_assert (mono_error_ok (&error)); /*FIXME don't swallow the error message*/
+ }
mono_metadata_decode_blob_size (sig, &sig);
method = mono_metadata_parse_method_signature_full (m, container, methoddef_row, sig, &sig);
diff --git a/mono/dis/main.c b/mono/dis/main.c
index 42d735b0f75..b56da24c35a 100644
--- a/mono/dis/main.c
+++ b/mono/dis/main.c
@@ -854,10 +854,13 @@ dis_method_list (const char *klass_name, MonoImage *m, guint32 start, guint32 en
mono_metadata_decode_blob_size (sig, &sig);
container = mono_metadata_load_generic_params (m, MONO_TOKEN_METHOD_DEF | (i + 1), type_container);
- if (container)
- mono_metadata_load_generic_param_constraints (m, MONO_TOKEN_METHOD_DEF | (i + 1), container);
- else
+ if (container) {
+ MonoError error;
+ mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_METHOD_DEF | (i + 1), container, &error);
+ g_assert (mono_error_ok (&error)); /*FIXME don't swallow the error message*/
+ } else {
container = type_container;
+ }
ms = mono_metadata_parse_method_signature_full (m, container, i + 1, sig, &sig);
if (ms != NULL){
@@ -1181,8 +1184,11 @@ dis_type (MonoImage *m, int n, int is_nested, int forward)
}
container = mono_metadata_load_generic_params (m, MONO_TOKEN_TYPE_DEF | (n + 1), NULL);
- if (container)
- mono_metadata_load_generic_param_constraints (m, MONO_TOKEN_TYPE_DEF | (n + 1), container);
+ if (container) {
+ MonoError error;
+ mono_metadata_load_generic_param_constraints_checked (m, MONO_TOKEN_TYPE_DEF | (n + 1), container, &error);
+ g_assert (mono_error_ok (&error)); /*FIXME don't swallow the error message*/
+ }
esname = get_escaped_name (name);
if ((cols [MONO_TYPEDEF_FLAGS] & TYPE_ATTRIBUTE_CLASS_SEMANTIC_MASK) == TYPE_ATTRIBUTE_CLASS){
diff --git a/mono/interpreter/.gitignore b/mono/interpreter/.gitignore
deleted file mode 100644
index 58fbb5d6ab6..00000000000
--- a/mono/interpreter/.gitignore
+++ /dev/null
@@ -1,11 +0,0 @@
-/Makefile
-/Makefile.in
-/mint
-/*.o
-/.libs
-/.deps
-/interp.lo
-/libmint.la
-/*.lo
-/semantic.cache
-/TAGS
diff --git a/mono/interpreter/ChangeLog b/mono/interpreter/ChangeLog
deleted file mode 100644
index 80baebfc261..00000000000
--- a/mono/interpreter/ChangeLog
+++ /dev/null
@@ -1,1376 +0,0 @@
-2009-11-10 Andrew Jorgensen <ajorgensen@novell.com>
-
- * Makefile.am: mint man page should be conditional also
-
-2009-03-20 Zoltan Varga <vargaz@gmail.com>
-
- * interp.c: Change location of gc_wrapper.h.
-
-2007-06-04 Mark Probst <mark.probst@gmail.com>
-
- * interp.c, interp.h (RuntimeMethod): Due to the jit_code_hash
- change in MonoDomain this had to be changed slightly, too.
-
-2006-05-09 Miguel de Icaza <miguel@novell.com>
-
- * interp.c (ves_exec_method_with_context): Pass a temporary to the
- mono_load_remote_field routine, instead of passing a NULL.
-
-Thu Aug 4 20:09:40 BST 2005 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: a real zombie is supposed to at least walk.
- Compilation fix.
-
-2005-03-07 Zoltan Varga <vargaz@freemail.hu>
-
- * transform.c (generate): Add CEE_MONO_NOT_TAKEN.
-
-2005-01-31 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c: fix typo
-
-2005-01-29 Ben Maurer <bmaurer@ximian.com>
-
- * *: MonoMethod->signature might be NULL now. You *MUST* use
- mono_method_signature.
-
-2005-01-20 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c: mono_init_icall got renamed
-
-2005-01-03 Zoltan Varga <vargaz@freemail.hu>
-
- * transform.c (generate): Handle MONO_CLASSCONST.
-
-2004-12-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * interp.c: fix the build. Dunno if it's correct.
-
-2004-12-02 Bernie Solomon <bernard@ugsolutions.com>
-
- * mintops.def:
- * transform.c:
- * interp.c: cope with new thread interruption icall
-
-2004-11-12 Ben Maurer <bmaurer@ximian.com>
-
- * transform.c: Fix bug with delegates in interp.
-
-2004-11-10 Lluis Sanchez Gual <lluis@novell.com>
-
- * interp.c: Added MonoRemotingTarget parameter to signature
- interp_create_remoting_trampoline.
-
-Tue Nov 9 17:28:48 CET 2004 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: update to exception clause structure changes.
-
-2004-11-08 Ben Maurer <bmaurer@ximian.com>
-
- * interp.c: warning free
-
-2004-10-29 Zoltan Varga <vargaz@freemail.hu>
-
- * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
- depends on libmonogc.
-
-Wed Sep 22 19:06:02 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: updates for stack walk interface.
-
-2004-09-09 Lluis Sanchez Gual <lluis@novell.com>
-
- * interp.c: In interp_walk_stack, don't crash if the context is not set
- (this may happen if the method is called by unmanaged code).
-
-2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
-
- * interp.c: thread local alloc
-
-2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c: (mono_interp_init) use g_thread_supported
- to stop multiple g_thread_init calls.
- Also attach domain to thread like mono_jit_init
-
-2004-07-31 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.h: add mono_interp_ftnptr_to_delegate
-
- * transform.c (generate): use mono_interp_ftnptr_to_delegate
- as ical function.
-
- * interp.c: add mono_interp_ftnptr_to_delegate to create
- interpreter style delegate. fixes pinvoke3
-
-2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
-
- * interp.c: Use mono_init_from_assembly instead of mono_init.
-
-2004-07-27 Bernie Solomon <bernard@ugsolutions.com>
-
- * transform.c (mono_interp_transform_method):
- quick fix to cope with the fake ptr classes
-
-2004-07-26 Bernie Solomon <bernard@ugsolutions.com>
-
- * mintops.def: more options on ICALL op code
-
- * interp.c: cope with exception in ICALL ops, more of them
-
- * transforms.c: more ICALL opcodes
-
-2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
-
- * mintops.def: rename the ICALL op codes to give a better
- clue about their signature.
-
- * transform.c (generate): use new ICALL types and add
- a case for two args + a result
-
- * interp.c (ves_exec_method_with_context): new ICALL
- op codes.
-
-2004-07-21 Bernie Solomon <bernard@ugsolutions.com>
-
- * mintops.def: add MINT_DUP_VT
-
- * transform.c (generate): cope with CEE_DUP on value type
-
- * interp.c (ves_exec_method_with_context): implement MINT_DUP_VT
- (interp_mono_runtime_invoke): don't unbox this for valuetypes
- here as it is now done in the callers.
-
-2004-07-09 Ben Maurer <bmaurer@ximian.com>
-
- * interp.c: register gc roots
-
-2004-07-08 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c mintops.def transform.c: Replace CEE_MONO_PROC<x> with
- CEE_MONO_ICALL.
-
-2004-07-05 Zoltan Varga <vargaz@freemail.hu>
-
- * mintops.h: Applied patch from Marcin Krzyzanowski (krzak@pld-linux.org). Add support for unaligned access on little endian machines.
-
- * interp.c:Applied patch from Marcin Krzyzanowski (krzak@pld-linux.org). Fix crash seen on amd64.
-
-2004-06-24 David Waite <mass@akuma.org>
-
- * interp.c: change to C90-style comments from C99/C++-style
-
-Mon Jun 21 14:06:03 CEST 2004 Paolo Molaro <lupus@ximian.com>
-
- * interp.h: API updates.
-
-2004-05-21 Bernie Solomon <bernard@ugsolutions.com>
-
- * transform.c: ignore new LMF opcodes
-
-2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
-
- * interp.c, interp.h: Use the new methods for handling thread.abort.
-
-2004-05-04 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (ves_exec_method_with_context): Disable explicit assignment
- of 'esi' to the ip variable, since it causes register allocation errors
- on some versions of gcc. Fixes #58010.
-
-2004-04-29 Bernie Solomon <bernard@ugsolutions.com>
-
- * transform.c (generate): missed a couple
- of places that should use ADD_CODE so buffer
- gets grown properly.
-
- * interp.c (interp_mono_runtime_invoke):
- restore state better on catching exception
- via longjmp here
-
-2004-04-29 Bernie Solomon <bernard@ugsolutions.com>
-
- * transform.c:
- * interp.c:
- Implement STARG for valuetypes as mcs needs it.
-
-2004-04-28 Bernie Solomon <bernard@ugsolutions.com>
-
- * transform.c: Make sure ENSURE_I4 is called on
- 32 bit machines too.
- (mono_interp_transform_method): allow some stack
- space for tracing to work.
-
-2004-04-26 David Waite <mass@akuma.org>
-
- * interp.h: remove comma from end of enumeration constants
- declarations
-
-2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.h: put in space for old type field
- for PPC as tramp.c assumes it. Quick fix until that's fixed.
-
- * interp.c: reenable instruction tracing for DEBUG_INTERP
-
-2004-04-19 Bernie Solomon <bernard@ugsolutions.com>
-
- * Makefile.am:
- * interp.h:
- * interp.c: now interprets different VM code
- * mintops.h:
- * mintops.def:
- * mintops.c: definition of new VM code
- * transform.c: convert CIL to new VM code
-
-2004-04-14 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (ves_exec_method_with_context): Add support for STRWLPARRAY
- marshalling convention.
-
-2004-03-29 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c interp.h: remove child from MonoInvocation
- as it isn't used.
-
-2004-03-25 Martin Baulig <martin@ximian.com>
-
- * interp.c (stackval_from_data): Added MONO_TYPE_GENERICINST.
- (stackval_to_data): Added MONO_TYPE_GENERICINST.
- (calc_offsets): Use mono_class_get_full() and mono_get_method_full().
- (ves_exec_method_with_context): Likewise.
-
-2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
-
- * interp.c: Get the type of transparent proxies from its remote_class.
-
-2004-02-02 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (ves_exec_method_with_context): Add new marshalling
- conventions.
-
-2004-01-22 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (mono_main): Remove call to mono_verify_corlib (), since
- the verification code is not up-to-date.
-
-2004-01-19 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c (ves_exec_method_with_context):
- get_native_wrapper removed and call
- mono_marshal_get_native_wrapper directly
- with new DllNotFoundException handling
-
-Mon Jan 19 17:52:33 CET 2004 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: eliminate CSIZE macro.
-
-2004-01-15 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (ves_array_set): Check for ArrayTypeMismatchException.
-
-2004-01-12 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * interp.c: call setlocale (). Fixes bug #52100.
-
-2003-12-19 Bernie Solomon <bernard@ugsolutions.com>
-
- * embed.h, main.c: new files to enable embedding
- the interpreter
-
- * interp.c: make main callable from main.c
- rearrange main for embedding
-
- * Makefile.am: changes now most code is in a library
-
-2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
-
- * interp.c: Added support for context static fields.
-
-2003-10-31 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (mono_create_method_pointer): New function which contains
- the arch independent part of method wrapper creation. Add a cache
- for the wrapper code, since Delegate::Equals depends on the wrapper
- address being constant for a method. Fixes #50366.
-
-2003-10-30 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c: (ves_exec_method_with_context)
- we need to lookup internal calls now.
- don't free type in CEE_SIZEOF.
- fix CEE_NEWOBJ inside wrapper methods
-
-2003-10-24 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c: Update after appdomain changes.
-
-2003-10-13 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c - set large stack size on HP 64bit
-
-2003-10-02 Bernie Solomon <bernard@ugsolutions.com>
-
- * hacks.h - work round HP 64 bit problem with isunordered
-
-2003-10-03 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (dump_frame): Avoid crash on frames without a method. Patch
- sam@superduper.net (sam clegg). Fixes #46197.
- (ves_exec_method_with_context): Fix unbox casting.
-
-2003-09-25 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c - reinstate use of mono_marshal_get_delegate_invoke
- for ordering and fix CALLI to handle wrapper. More wrapper handling
- in CALL and LDSTR. Add another string conversion case.
-
-2003-09-25 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (ves_exec_method): Fix warning.
- (ves_exec_method_with_context): Fix CGT_UN and CLT_UN. Patch by
- David Waite (mass@akuma.org).
-
-2003-9-24 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c: I broke calling native delegates reinstate
- old code for the moment.
-
-2003-9-22 Bernie Solomon <bernard@ugsolutions.com>
-
- * interp.c: use mono_marshal_get_delegate_invoke to get delegate
- invocation order consistent. Fix THROW_EX, fix ip in overflow
- exceptions.
-
-Fri Sep 12 10:42:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, interp.h: patch from Bernie Solomon <bernard@ugsolutions.com>:
- 64 bit/opcodes/exception handling fixes.
-
-2003-08-30 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c: Use mono_field_from_token () in the appropriate places.
- This simplifies the code and also fixes #48051.
-
-2003-08-27 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (main): Fix the order of initialization calls so it maches
- the order in the JIT.Patch by Bernie Solomon (bernard@ugsolutions.com).
- Also remove the unused ms mutex.
-
- * interp.c: Get rid of metadata_section.
-
-2003-08-22 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (main): Call g_thread_init () to make glib thread-safe.
- Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
- reporting this.
-
-2003-08-18 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c: Get rid of duplicate definition of CHECK_MUL_OVERFLOW.
- * interp.h interp.c: Get rid of VAL_VALUETA, use VAL_MP instead. Fix
- the INITOBJ opcode which was the only user of VALUETA.
-
-2003-08-16 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (ves_exec_method): Implemented mul.ovf correctly for int32
- and int64. Implement the conv.ovf opcodes for all argument types.
-
-2003-08-15 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c (ves_exec_method): Handle non-valuetypes in CEE_STOBJ.
- Fixes #46781.
- (ves_exec_method): Added support for the synchronized flag to the
- interpreter. Also fixed the CALLI opcode, and made exception handling
- work though the managed-unmanaged barrier.
-
-Fri Jul 25 19:06:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: updates for new instructions.
-
-2003-07-22 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c: Use the new metadata_section lock instead of metadata_lock.
- Patch by Bernie Solomon (bernard@ugsolutions.com).
-
-Fri Jul 18 15:11:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: 64 bit fixes from Laurent Morichetti <l_m@pacbell.net>.
- Install cleanup function.
-
-2003-07-13 Zoltan Varga <vargaz@freemail.hu>
-
- * interp.c: Keep alloca()-d data on a free list to prevent stack
- overflow errors when valuetypes are allocated in a loop. Fixes
- #27420. Is the new code still faster than using malloc/free ?
-
- * interp.c (ves_array_get): Add index checking to ves_array_get/set.
- Fixes decimal-array.exe.
-
- * interp.c (interp_mono_runtime_invoke): Unbox value type instances
- before calling the method. Fixes appdomain2.exe.
-
- * interp.c: Fix warnings.
-
- * interp.c: Report unhandled exceptions correctly.
-
- * interp.c: Implement CEE_ISINST and CEE_CASTCLASS using
- mono_object_isinst. Fixes bug #45539 and reflection-enum.exe.
-
-Tue May 27 16:36:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: don't use relative numbering stuff.
-
-Tue May 27 12:18:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: update for mono_class_vtable() changes.
-
-Tue May 13 16:43:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: handle thread static fields.
-
-Sun Apr 27 13:27:59 CEST 2003 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: check for arraytypemismatch.
-
-2003-04-23 Martin Baulig <martin@ximian.com>
-
- * interp.c: When running with --dieonex, use the debugging code to
- print source lines in the backtrace.
-
-2003-02-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
-
- * interp.c: added a dummy mono_runtime_install_handlers function to
- avoid crashing when ves_pinvoke_method tries to call it.
-
-2003-02-06 Piers Haken <piersh@friskit.com>
-
- * interp.c: warning cleanups
-
-2002-11-15 Dick Porter <dick@ximian.com>
-
- * interp.c: mono_runtime_init() now has an extra parameter for
- thread attaching.
-
-2002-10-31 Dick Porter <dick@ximian.com>
-
- * Makefile.am: The previous automake-1.6 fix broke automake-1.4 on
- cygwin. Try again.
-
-2002-09-27 Dick Porter <dick@ximian.com>
-
- * interp.c: Tell glib what the program name is, by passing it the
- name of the managed file we're executing
-
-2002-08-28 Dick Porter <dick@ximian.com>
-
- * interp.c: mono_set_rootdir() doesnt take any args now
-
- * Makefile.am: Export HOST_CC and turn on optimisation for w32 builds
-
-2002-08-28 Nick Drochak <ndrochak@gol.com>
-
- * interp.c: check and throw exception if needed for overflow on
- multiplication of integer types.
-
-2002-08-07 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (interp_walk_stack): removed the createdelegate icall
-
-2002-08-02 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (get_virtual_method): support proxies
- (ves_exec_method): impl. LDFLD/STFLD for proxies.
-
-Fri Aug 2 13:00:41 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, interp.h: implemented exception trap for runtime_invoke
- and handle exceptions across managed/unmanaged boundaries.
-
-2002-08-01 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (stackval_from_data): add pinvoke argument
- (stackval_to_data): add pinvoke argument. We need consider the
- fact that unmanages structures may have different sizes.
- (ves_pinvoke_method): do not call stackval_from_data if the result
- is a value type.
-
-Wed Jul 31 17:47:11 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: simplified some more branch code.
-
-Wed Jul 31 16:50:42 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fixed indentation, simplified some code.
-
-Wed Jul 31 14:29:43 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix so that mint can at least get to executing Main().
-
-2002-07-31 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c: use the new marshaling code. better delegate/remoting
- support.
- (ves_exec_method): bug fix - directly jump to handle_exception.
-
-2002-07-29 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (main): install compile_method handler
-
-Wed Jul 24 13:02:12 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: implemented stack walking function.
-
-Fri Jul 19 14:21:18 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix float boxing on LE systems.
-
-Sat Jul 13 19:54:56 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: advance ip in conv.r.un.
-
-2002-07-01 Dick Porter <dick@ximian.com>
-
- * interp.c (ves_exec): Removed unneeded argument to
- mono_runtime_run_main()
-
-2002-06-25 Dick Porter <dick@ximian.com>
-
- * interp.c (ves_exec): Pass the assembly to mono_runtime_run_main
-
-Wed Jun 19 17:01:37 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: un-broke after stack trace changes.
-
-Fri May 31 16:17:20 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, hacks.h: compiler compatibility fixes.
-
-Fri May 31 13:25:57 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, mint.1: added --config command line option.
-
-Thu May 30 14:14:16 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: lookup P/Invoke method addr only when needed.
-
-2002-05-29 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): free type in CEE_SIZEOF
-
-Tue May 28 16:10:49 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fixed SIZEOF to work with typedef/typeref.
-
-Fri May 24 15:33:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: added partial async delegate and remoting support.
-
-Thu May 23 18:45:38 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: special case string ctors in invoke.
- Handle null object in throw. Misc integer type mismatch fixes.
-
-2002-05-23 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_runtime_method): share more code with the jit.
-
-Wed May 22 12:31:40 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fixed finally handling. In trace mode show
- exception handling operations and the contents of the stack in the same
- line as the executing instruction.
-
-2002-05-20 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c: Updated help display.
-
-2002-05-20 Radek Doulik <rodo@ximian.com>
-
- * interp.c (dump_stack): print boxed values for --noptr
- (ves_exec_method): use stackval_to_data as pointed out by lupus
-
-2002-05-17 Radek Doulik <rodo@ximian.com>
-
- * interp.c (dump_stack): if --noptr then print content of strings
- in form [str:<printed string>]
-
-2002-05-16 Radek Doulik <rodo@ximian.com>
-
- * interp.c (ves_exec_method): use data.i instead of data.l in i32
- case
- (ves_exec_method): set type in I64 <--> I32 conversions
-
-2002-05-15 Radek Doulik <rodo@ximian.com>
-
- * interp.c (ves_runtime_method): moved stackval_from_data call
- inside #else branch, consulted on irc with lupus
-
-2002-05-15 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): use new mono_unhandled_exception()
-
-2002-05-14 Radek Doulik <rodo@ximian.com>
-
- * interp.c: introduced new --noptr option to suppres pointer
- address printing. I find this useful for comparing trace outputs
- while porting to ppc
-
-Tue May 14 16:37:55 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: some finally handling fixes and compilation fixes for
- changes in the runtime lib.
-
-2002-04-30 Dick Porter <dick@ximian.com>
-
- * interp.c: Tell glib to not abort when g_log() etc print
- recursively
-
-Mon Apr 22 16:52:03 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: handle muslticast delegates. Implement a couple more
- convert opcodes. Pretend we spend some time jitting...
-
-2002-04-20 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): support internalcall String constructors
-
-2002-04-19 Dan Lewis <dihlewis@yahoo.co.uk>
-
- * interp.c: support for new szarray format.
-
-Tue Apr 16 20:12:58 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: removed profiling code (moved to common library).
- Implemented inlining for some special methods.
-
-2002-04-15 Patrik Torstensson <patrik.torstensson@labs2.com>
-
- * interp.c: Using fullnames when adding icall's (array)
-
-Wed Apr 10 16:07:23 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: quick implementation for opcodes needed by the new parse
- routines in corlib.
-
-Tue Apr 9 13:08:26 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: make the interp thread-safe wrt the metadata lib.
-
-Mon Apr 8 17:15:48 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: display return value with --trace.
- Call mono_runtime_init ().
-
-2002-04-06 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (interp_mono_runtime_invoke): handle more types,
- removed runtime_exec_main
-
-Thu Apr 4 11:36:52 CEST 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: don't try to get an IL opcode for runtime and internal
- call methods.
-
-Thu Mar 28 16:54:51 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: spring warning cleanup.
-
-Thu Mar 28 12:03:28 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: check obj address in stfld.
-
-2002-03-27 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): CASTCLASS: fix for transparent proxy
-
-Tue Mar 26 20:09:10 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: set frame->ip before dumping the stack trace.
-
-Tue Mar 26 19:54:45 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: remove glib mem vtable code.
-
-2002-03-26 Dick Porter <dick@ximian.com>
-
- * interp.c: Show thread ID's in trace output.
-
- New option "--traceclassinit" to put debug output around
- runtime_class_init().
-
- Make sure all options are displayed in usage().
-
-Tue Mar 26 17:03:14 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: support fieldrefs when accessing instance fields.
-
-Mon Mar 25 12:59:52 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: allow tracing to be done on a per-method basis.
- Fix interp_mono_runtime_invoke() to deal correcttly with the return
- value. Disable glib mem vtable setting.
-
-Thu Mar 21 18:08:37 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: set stack trace info when throwing an exception.
-
-Thu Mar 21 17:32:46 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: intern strings before executing a method (and don't
- intern command line arguments anymore). Add sanity checks in alloca
- use.
-
-Sat Mar 16 19:15:18 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: restore frame on return from unmanaged calls.
- Add support for continuing execution up to x IL insn.
- Fix exception handling when an exception is raised in the catch
- handler of the same method that issued the first one.
-
-2002-03-11 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_runtime_method): set method_info field
-
-Mon Mar 11 14:48:07 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: corlib consistency checls moved to libmetadata.
-
-Mon Mar 11 11:27:27 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: use the new facilities in debug-helpers to
- disassemble CIL code and match method names to MonoMethods.
-
-Thu Mar 7 17:20:59 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: Boehm-GC enable. Fix some overflow opcodes.
-
-Tue Mar 5 18:12:40 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix non-debug build and some more opcode work.
-
-Mon Mar 4 11:21:44 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: print the address of 'this' in tracing mode.
-
-Thu Feb 28 19:18:59 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: add checks for more binary consistency.
-
-2002-02-27 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (interp_mono_runtime_invoke): use alloca instead of g_new0
-
-Tue Feb 26 11:43:34 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: added profiling for object creation.
-
-Mon Feb 25 17:37:07 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: use correct value for guint64 max.
-
-2002-02-22 Radek Doulik <rodo@ximian.com>
-
- * interp.c: s/gulong/guint64 as it differs on ppc
-
-Wed Feb 20 22:18:40 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: more complete runtime_invoke () implementation.
- Fixed castclass/isinst to work correctly with arrays.
-
-Tue Feb 19 20:21:14 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: implement the runtime_invoke function.
-
-Mon Feb 18 15:49:20 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix alignment code. Make sure to init classes
- in more cases. Command-line arguments are interned.
-
-2002-02-16 Radek Doulik <rodo@ximian.com>
-
- * interp.c (ves_exec_method): test type of sp [-1] instead of sp
- [0], because sp [-1] is the value going to be shifted, fixed in
- CEE_SHL, CEE_SHR, CEE_UN opcodes)
-
-Sat Feb 16 12:00:24 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fixed cut&paste error for ldind.r4 and ldind.r8.
-
-Fri Feb 15 15:07:27 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: use strrchr instead of rindex. use _isnan and _finite on
- win32 systems.
-
-2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
-
- * interp.c (ves_exec_method): replace
- 'g_assert (sp->type = VAL_VALUETA)' with
- 'g_assert (sp->type == VAL_VALUETA)' otherwise
- the assert always passes. FIXME: should the test have been !=?
-
-2002-02-14 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (stackval_from_data): fix for MONO_TYPE_PTR
-
-Wed Feb 13 16:17:38 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fixed newobj implementation for valuetypes bug found by
- dietmar. sub.ovf dummy code.
-
-Tue Feb 12 14:08:47 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * hacks.h: check against redefining preprocessor symbol.
- * interp.c: fix profile info to return more sensible results.
-
-Mon Feb 11 13:05:29 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: added "die on exception" command line argument.
- When we segfault, set the message in the exception to "Segmentation
- fault" so people can recognise what's going on.
-
-2002-02-10 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c (ves_exec_method): Compare the element_class type token
- in the class we got as well, instead of the element class vs the
- toplevel class.
-
- This fixes the invalid cast exceptions during unboxing
-
-Fri Feb 8 13:01:03 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: use opcode information from libmetadata.
-
-2002-02-05 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): CEE_UNBOX: use element_class for
- type check.
-
-2002-02-04 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (main): impl. __array_Address icall
-
-Fri Feb 1 16:03:53 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: exception fixes. Use mono_method_pointer_get ()
- to easy porting to other archs. Some support for overflow detection.
-
-2002-01-25 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c, jit.c (main): install runtime_exec_main handler
- (main): bug fix - call TlsAlloc () before we execute code
-
-2002-01-23 Dick Porter <dick@ximian.com>
-
- * interp.c: Added some kludges to cope with CONV_OVF_I2,
- CONV_OVF_I4 and ADD_OVF so that number formatting works. Also
- initialise and cleanup the network support.
-
-Thu Jan 10 20:59:59 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, interp.h: add a flag to mono_create_trampoline ()
- to handle runtime methods.
-
-Sat Jan 5 15:45:14 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: allow classname:method name in --debug argument.
- Fix box opcode for valuetypes. Fix a few opcode to take a 16 bit
- index instead of 32 (stloc, ldloc, starg, etc.).
-
-Thu Jan 3 23:19:27 CET 2002 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: temporary mul.ovf, mul.ovf.un, add.ovf.un implementations
- to get the compiler going.
-
-Mon Dec 24 17:23:45 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix ldc.i8.
-
-Thu Dec 20 20:09:48 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix delegate method invocation to handle both
- static and instance methods.
-
-Tue Dec 18 18:48:50 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: make segv_handler static, handle runtime methods in stack
- trace.
-
-Thu Dec 13 20:24:28 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: correctly handle exceptions generated in C code.
- Install an handler for SIGSEGV. Bare-bones profiler and hook for the
- verifier.
-
-Mon Dec 3 17:15:44 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: call mono_init() after registering internal calls.
-
-2001-11-30 Dick Porter <dick@ximian.com>
-
- * interp.c: Replace get_named_exception() with
- mono_exception_from_name()
-
-Fri Nov 30 12:05:21 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: calculate locals and args offsets only once
- per method call. Cache trampoline code as well.
-
-2001-11-23 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): bug fix for exception5.cs
-
-Mon Nov 19 11:33:00 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: start adding support for handling exceptions across
- managed/unmanaged boundaries. Cleanup Delegate method invocation.
- Pass the correct target object in Delegate::Invoke and use the correct
- 'this' pointer in ldvirtftn (bugs pointed out by Dietmar).
-
-Thu Nov 15 17:40:24 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: handle enums with underlying type different from int32.
- More checks for C structs <-> C# objects consistency.
-
-Wed Nov 14 19:23:00 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: move the stack frame dumping code to a function so it can
- be called from the debugger. Fix virtual method lookup for interfaces.
- Throw exceptions instead of aborting in more places.
- Print also the message in an exception. Updates for field renames in
- corlib.
-
-2001-11-09 Dick Porter <dick@ximian.com>
-
- * Makefile.am (mint_LDADD): Don't need THREAD_LIBS any more
-
-2001-11-07 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c: Include stdlib to kill warning.
- (check_corlib): Adjust format encodings to remove warnings.
-
-Wed Nov 7 15:47:36 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: updates for changes in array code.
-
-Fri Nov 2 19:06:54 CET 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: hanlde field refs. Throw an exception on NULL references.
- Check consistency of corlib types with the C struct representation.
-
-2001-10-25 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): use relative numbering for runtime
- type checks (and make it work with interfaces)
-
-2001-10-15 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c: removed newobj()
-
-2001-10-10 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (get_virtual_method): use the vtable
- (arch_compile_method): added to compute vtable entry
-
-Mon Oct 8 16:14:40 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: use the accessors provided in object.h to deal with
- MonoArrays. Updates for API renames in metadata. Throw exception
- in ldelema if index is out of bounds.
-
-Mon Oct 8 10:44:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fixes for changes in metadata.
-
-2001-10-04 Dick Porter <dick@ximian.com>
-
- * interp.c (ves_runtime_method): init_class() the
- mono_defaults.delegate_class
- Include mono-endian.h not endian.h
-
-Tue Oct 2 18:51:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: set frame->ip in the leave opcode. Make db_methods static.
-
-Sun Sep 30 11:57:15 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: compiler and ANSI C portability fixes.
-
-Fri Sep 28 19:37:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: Implemented ldtoken, conv.ovf.i. Use MonoClass->byval_arg
- (and remove related kludges). Don't choke on access to arrays of
- references. Throw an exception when an internalcall or P/Invoke
- function don't have an implementation. Throw and EngineException
- for unimplemented opcodes.
-
-Tue Sep 25 11:12:35 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fixed get_virtual_method () to deal with interface
- methods better.
-
-Mon Sep 24 18:50:25 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: catch a few more error conditions with exceptions instead of
- erroring out.
- Don't use g_print() in stack traces because it doesn't work with
- some float values.
- When we call an instance method of a valuetype class, unbox the 'this'
- argument if it is an object.
- Use mono_ldstr () to implement the ldstr opcode: it takes care of
- interning the string if necessary.
- Implemented new opcodes: ckfinite, cgt.un, clt.un, ldvirtftn, ldarga.
- Fixes to handle NaNs when comparing doubles.
- Make sure the loaded assembly has an entry point defined.
- Fixed portability bugs in neg and not opcodes.
-
-2001-09-24 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): LDC_I4: 8bit constants are signed
- (ves_exec_method): bug fix for NOT/NEG
- (main): fix bug in parameter parsing
-
-2001-09-23 Dick Porter <dick@ximian.com>
-
- * Makefile.am (mint_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
-
-2001-09-23 Dick Porter <dick@ximian.com>
-
- * interp.c (main): Do some thread setup and cleanup around the
- call to ves_exec()
-
-2001-09-21 Dick Porter <dick@ximian.com>
-
- * Makefile.am (mint_LDADD): Added PTHREAD_LIBS to the link line
-
-Thu Sep 20 16:32:42 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: implemented some more opcodes: calli, rem.un,
- shr.un, conv.u, cpobj, stobj, conv.r.un, conv.ovf.i1.un,
- conv.ovf.i2.un, conv.ovf.i4.un, conv.ovf.i8.un, conv.ovf.i.un,
- conv.ovf.u1.un, conv.ovf.u2.un, conv.ovf.u4.un, conv.ovf.u8.un,
- conv.ovf.u.un.
- Fix some 64 bit issues in the array element access code and a small bug.
- Throw an exception on index out of range instead of asserting.
- Throw an exception on a NULL array instead of dying.
- Stomped a memory corruption bug (.cctor methods were freed after
- executing them, but they are stores in MonoClass now...).
- Added a simple facility to invoke the debugger when a named
- function is entered (use the cmdline option --debug method_name).
- * interp.h: fix 64 bit issue.
-
-Tue Sep 18 13:21:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix some 64 bit issues. Safer support for delegates.
-
-2001-09-12 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c (ves_exec_method): implement conv.u8 opcode.
-
-Mon Sep 10 20:20:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: endian fixes, comments.
-
-Fri Sep 7 18:45:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, interp.h: make ves_exec_method () and stackval_from_data ()
- non static. Implement a couple of runtime methods needed to
- use delegates (ves_runtime_method ()).
- Implemented ldftn opcode.
-
-Thu Sep 6 15:41:24 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * Makefile.am: link to libmonoarch.
- * interp.h, interp.c: use mono_create_trampoline ().
- Pass the command line arguments to Main (String[]) methods.
-
-2001-08-30 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_pinvoke_method): removed the libffi dependency
-
-2001-08-29 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_array_set): moved from icall.c
- (ves_array_get): moved from icall.c
-
- * icall.c: moved to metadata/icall.c
-
-Wed Aug 29 12:46:06 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: some small optimizations. Fixes to do signed
- compares when needed. Change C++ comments into C.
- Implemented cgt, clt. Added --opcode-count cmdline switch.
-
-2001-08-28 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): better check for value types (get
- the class to detect if we have a value type), implemented CEE_CONV_U1,
- CEE_CONV_U2, CEE_CEQ
-
-
-Mon Aug 27 21:30:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: warn and exit when Main () expects the cmdline arguments
- instead of creashing.
-
-Mon Aug 27 20:16:37 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: merge isinst/castclass handling. Hopefully implement
- the right semantics for handling callvirt correctly (changes
- here and there to support it). Integrate bugfix from Dietmar quickly
- so he needs to handle the cvs conflict:-)
-
-Mon Aug 27 12:20:32 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix compilation and updates for changes in metadata/.
-
-2001-08-26 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c (main): Add option handling for the interpreter,
- support the `--trace' option.
-
-Sun Aug 26 23:04:46 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: get in a dummy virtual method dispatch.
- Added support for int64, native int and native uint as arguments.
- Added debug enter/leave for icall and pinvoke methods, too.
- Implement opcodes conv.i, conv.i8, ldelema.
-
-Sun Aug 26 11:37:30 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.h, interp.c: load also a MonoClass pointer when we load
- an address on the stack. Implemented conv.i1, conv.i2, con.i4,
- conv.u4, conv.r4, conv.r8. Print the arguments in the stack trace
- and the name of the exception.
-
-Sat Aug 25 15:56:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: Implemented some opcodes: starg.s, ldobj, isinst,
- ldarg, starg, ldloc, ldloca, stloc, initobj, cpblk, sizeof.
-
-Sat Aug 25 12:57:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: handle enumerations specially (not as valuetypes).
-
-Fri Aug 24 19:34:04 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.h, interp.c: add support for valuetypes.
-
-Fri Aug 24 16:09:20 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: updates for merge of MonoParam in MonoType.
-
-Thu Aug 23 12:04:34 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: removed beforefieldinit check, it's a useless flag.
- Added a couple more test cases to tests/ dir.
-
-2001-08-22 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c (usage): Add version information
- (ves_pinvoke_method): Typo fix.
-
-Wed Aug 22 20:37:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: simplified init_class (). Make sure a class
- is fully initialized before executing a method in the class.
- Search for the class constructor only on beforefieldinit classes.
- Implement a bunch of opcodes: br, brfalse, brtrue, beq, bge,
- bgt, blt, ble, bne.un, bge.un, bgt.un, ble.un, blt.un, stind.i,
- ldflda, ldsflda, ldelem.i8, stelem.i8, leave.
-
-Wed Aug 22 16:34:03 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: Updates for changes in metadata/. Better output in debug mode
- and in the stack trace. Completed rethrow handling
-
-Tue Aug 21 18:56:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: new macro INIT_FRAME() to properly
- initialize a MonoInvocation. Fixed a couple of buglets in exception code:
- increase stack pointer when pushing the exception for catch blocks,
- initialize frame->ex_handler to NULL, correctly try all the
- catch blocks (don't incorrectly fallback on filter handling).
- Added a couple more checks where we may need to throw an
- exception. Added more exception creation functions.
- Changed stackval_from_data() to take the target stackval as
- argument. Implemented a couple more opcodes.
- * interp.h: prepare stackval for value type code.
-
-2001-08-21 Miguel de Icaza <miguel@ximian.com>
-
- * Makefile.am (mint_LDADD): Renamed interpreter to mint.
-
-2001-08-21 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (get_named_exception): use the right constructor.
-
-Mon Aug 20 18:58:36 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix buglet with the leave.s opcode.
-
-2001-08-20 Dietmar Maurer <dietmar@ximian.com>
-
- * icall.c: changed everything to support the new calling convention
-
- * hacks.h: added some macros for FreeBSD
-
- * interp.c (get_named_exception): use mono_object_new instead of
- newobj, initialize the stack before we call the constructor.
-
-Sat Aug 18 12:43:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, interp.h: added support code to create exceptions.
- Changed interncal calling convnetion over to MonoInvocation, to support
- exceptions, walking the stack back and forward and passing the 'this'
- pointer separately (remove the cludges required before to pass this on the
- stack). Use alloca heavily for both local vars and a copy of the incoming
- arguments. Init local vars to zero.
- Simplify stackval_from_data() and stackval_to_data() to only take a pointer
- instead of pointer + offset.
- Implement a few exceptions-related opcodes and the code to run finally, fault and
- catch blocks as well as a stack trace if no handler is found.
-
-2001-08-16 Alex Graveley <alex@ximian.com>
-
- * Makefile.am (mono_int_LDADD): Link with ../../libffi/libffi.a
- instead of ../../libffi/.libs/libffi.a.
-
-2001-08-10 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): impl CASTCLASS
-
- * icall.c: moved the internal call stuff to this file
-
- * interp.c (ves_exec_method): impl. BOX/UNBOX
- (ves_icall_System_Array_GetValue): impl.
- (ves_icall_System_Array_SetValue): impl.
- added myself to Authors
-
-2001-08-09 Dietmar Maurer <dietmar@ximian.com>
-
- * implemented arrays, but you will need a modified version of
- Array.cs to get arrays working (will commit soon)
-
- * interp.c (ves_icall_array_Set): impl.
- (ves_icall_array_Get): impl.
- (ves_icall_array_ctor): impl.
- (ves_icall_System_Array_GetRank): impl.
- (ves_icall_System_Array_GetLength): impl.
- (ves_icall_System_Array_GetLowerBound): impl.
- (mono_lookup_internal_call): impl.
-
-2001-08-06 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): impl. NEWARR
- (ves_exec_method): impl. most LDELEM/STELEM opcodes, LDLEN
- (newarr): impl.
- (mono_get_ansi_string): impl.
- (mono_lookup_internal_call): impl.
- (ves_exec_method): implemented internal calls
-
-2001-08-05 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_pinvoke_method): removed all static vars.
-
-2001-08-02 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): found a way to do unordered
- compares, implemented CEE_BNE_UN_S, CEE_BGE_UN_S, CEE_BGT_UN_S,
- CEE_BLE_UN_S, CEE_BLT_UN_S
-
-Wed Aug 1 22:51:38 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: handle also MONO_TYPE_CLASS to/from the stack.
- Change locals to be a memory blob, instead of the structured
- (but wrong) stackval. Implement bne.un.s opcode. Make the program
- exit with the error code from Main().
-
-2001-08-01 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_exec_method): implemented LDSTR
-
-2001-07-31 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c (GET_NATI): Switched from using nati_t to cli/types.h
- m_i type. Maybe we should rename the types to be m_i_t instead of
- m_i alone.
-
- Make the code compile after I broke it.
-
-Tue Jul 31 23:46:33 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: fix cleanup.
- * Makefile.am: don't link with disassembler library.
-
-2001-07-31 Miguel de Icaza <miguel@ximian.com>
-
- (ves_exec_method): Cleanup of the source code.
-
-Tue Jul 31 20:13:59 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: implement stind.*, ldind.*, ldloca.s opcodes.
- Provide better tracing with DEBUG_INTERP.
-
-Tue Jul 31 17:52:53 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: massive namespace cleanup.
-
-Mon Jul 30 20:09:58 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: update to use mono_method->name.
-
-Fri Jul 27 20:54:00 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: start implementing callvirt. Classes with
- class constructors are properly initialized when needed.
- Fix error introduced in version 1.17.
-
-Fri Jul 27 14:03:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: implement static field loading and storing.
-
-2001-07-27 Dietmar Maurer <dietmar@ximian.com>
-
- * interp.c (ves_pinvoke_method): impl.
-
-Fri Jul 27 11:49:19 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: Removed some debugging printouts. Made stackval_to_data
- static. Handle also instance methods in CALL opcode. Fix ret to properly
- deal with void functions. Fixed constructor to leave the object on
- the stack.
-
-Thu Jul 26 13:24:51 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c: ves_exec_method () doesn't take a MonoImage arg
- anymore. Use the method cache in MonoImage. Updates to
- mache recent changes in metadata.
- Fix newobj code to use new metadata features. Call the class
- constructor after allocationg the object. Implemented load field
- and store field opcodes (the support functions need to be finished).
-
-Tue Jul 24 16:51:09 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * interp.c, hacks.h: moved a few ugly macros out of the code.
- Implemented switch opcode.
-
-2001-07-23 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c (newobj): Added function to handle newobj opcode.
-
-2001-07-18 Miguel de Icaza <miguel@ximian.com>
-
- * interp.c (ves_exec_method): Make the interpreter abort with more
- information than it currently does.
-
- Enable the slow processor, as it is easier to debug.
-
-Sun Jul 15 17:50:23 CEST 2001 Paolo Molaro <lupus@ximian.com>
-
- * Started changelog.
- * interp.c: use new mono_get_method () function to get the complete
- info on a method invocation: we support now method invocation with
- multiple (or zero) simple arguments and with or without a return value.
- Implement also a couple more opcodes.
diff --git a/mono/interpreter/Makefile.am b/mono/interpreter/Makefile.am
deleted file mode 100644
index 4cea04452be..00000000000
--- a/mono/interpreter/Makefile.am
+++ /dev/null
@@ -1,59 +0,0 @@
-AM_CPPFLAGS = \
- -I$(top_srcdir) \
- $(LIBGC_CPPFLAGS) \
- $(GLIB_CFLAGS)
-
-if HOST_WIN32
-export HOST_CC
-# The mingw math.h has "extern inline" functions that dont appear in libs, so
-# optimisation is required to actually inline them
-AM_CFLAGS = -O
-endif
-
-if INTERP_SUPPORTED
-bin_PROGRAMS = mint
-
-lib_LTLIBRARIES = libmint.la
-
-man_MANS = mint.1
-endif
-
-mint_SOURCES = \
- main.c
-
-mint_LDADD = \
- libmint.la
-
-libmint_la_SOURCES = \
- hacks.h \
- interp.h \
- interp.c \
- mintops.h \
- mintops.def \
- mintops.c \
- transform.c
-
-libmintincludedir = $(includedir)/mono-$(API_VER)/mono/interpreter
-
-libmintinclude_HEADERS = \
- embed.h
-
-# This is needed for automake dependency generation
-if INCLUDED_LIBGC
-libgc_libs=../../libgc/libmonogc.la
-else
-libgc_libs=$(LIBGC_LIBS)
-endif
-
-libmint_la_LIBADD = \
- ../arch/libmonoarch.la \
- ../metadata/libmonoruntime.la \
- ../io-layer/libwapi.la \
- ../utils/libmonoutils.la \
- $(libgc_libs) \
- $(GLIB_LIBS) \
- $(LIBICONV) \
- $(ICU_LIBS) \
- -lm
-
-EXTRA_DIST = $(man_MANS)
diff --git a/mono/interpreter/embed.h b/mono/interpreter/embed.h
deleted file mode 100644
index b3a54490eed..00000000000
--- a/mono/interpreter/embed.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <mono/metadata/object.h>
-#include <mono/metadata/appdomain.h>
-
-int
-mono_main (int argc, char* argv[]);
-
-MonoDomain *
-mono_interp_init(const char *file);
-
-int
-mono_interp_exec(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[]);
-
-void
-mono_interp_cleanup(MonoDomain *domain);
-
diff --git a/mono/interpreter/hacks.h b/mono/interpreter/hacks.h
deleted file mode 100644
index 9697ccbad6f..00000000000
--- a/mono/interpreter/hacks.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* we need some special math function */
-#ifndef _ISOC99_SOURCE
-#define _ISOC99_SOURCE
-#endif
-#include <math.h>
-
-/* which are not defined on FreeBSD */
-#ifdef __GNUC__
-
-#ifndef isunordered
-# define isunordered(u, v) \
- (__extension__ \
- ({ __typeof__(u) __u = (u); __typeof__(v) __v = (v); \
- isnan(__u) || isnan(__v); }))
-#endif
-
-#ifndef islessgreater
-# define islessgreater(x, u) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered (__x, __y) && (__x < __y) || (__y < __x); }))
-#endif
-
-#ifndef islessequal
-# define islessequal(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x <= __y; }))
-#endif
-
-#ifndef isless
-# define isless(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x < __y; }))
-#endif
-
-#ifndef isgreater
-# define isgreater(x, y) \
- (__extension__ \
- ({ __typeof__(x) __x = (x); __typeof__(y) __y = (y); \
- !isunordered(__x, __y) && __x > __y; }))
-#endif
-
-#else
-
-/* isunordered seems to crash on HPUX when built 64 bits
- so use generic implementation.
-*/
-#if defined(__hpux) && SIZEOF_VOID_P == 8
-#undef isunordered
-#undef islessgreater
-#undef islessequal
-#undef isless
-#undef isgreater
-#endif
-
-#ifndef isunordered
-# define isunordered(u, v) (isnan(u) || isnan(v))
-#endif
-
-#ifndef islessgreater
-# define islessgreater(x, u) (!isunordered (x, y) && (x < y) || (y < x))
-#endif
-
-#ifndef islessequal
-# define islessequal(x, y) (!isunordered(x, y) && x <= y)
-#endif
-
-#ifndef isless
-# define isless(x, y) (!isunordered(x, y) && x < y)
-#endif
-
-#ifndef isgreater
-# define isgreater(x, y) (!isunordered(x, y) && x > y)
-#endif
-
-#endif
-
-/*
- * Attempt at using the goto label construct of GNU GCC:
- * it turns out this does give some benefit: 5-15% speedup.
- * Don't look at these macros, it hurts...
- */
-#define GOTO_LABEL
-#undef GOTO_LABEL
-#ifdef GOTO_LABEL
-
-#define SWITCH(a) goto *goto_map [(a)];
-#define BREAK SWITCH(*ip)
-#define CASE(l) l ## _LABEL:
-#define DEFAULT \
- CEE_ILLEGAL_LABEL: \
- CEE_ENDMAC_LABEL:
-#define SUB_SWITCH \
- CEE_PREFIX1_LABEL: \
- CEE_ARGLIST_LABEL: \
- CEE_CEQ_LABEL: \
- CEE_CGT_LABEL: \
- CEE_CGT_UN_LABEL: \
- CEE_CLT_LABEL: \
- CEE_CLT_UN_LABEL: \
- CEE_LDFTN_LABEL: \
- CEE_LDVIRTFTN_LABEL: \
- CEE_UNUSED56_LABEL: \
- CEE_LDARG_LABEL: \
- CEE_LDARGA_LABEL: \
- CEE_STARG_LABEL: \
- CEE_LDLOC_LABEL: \
- CEE_LDLOCA_LABEL: \
- CEE_STLOC_LABEL: \
- CEE_LOCALLOC_LABEL: \
- CEE_UNUSED57_LABEL: \
- CEE_ENDFILTER_LABEL: \
- CEE_UNALIGNED__LABEL: \
- CEE_VOLATILE__LABEL: \
- CEE_TAIL__LABEL: \
- CEE_INITOBJ_LABEL: \
- CEE_UNUSED68_LABEL: \
- CEE_CPBLK_LABEL: \
- CEE_INITBLK_LABEL: \
- CEE_UNUSED69_LABEL: \
- CEE_RETHROW_LABEL: \
- CEE_UNUSED_LABEL: \
- CEE_SIZEOF_LABEL: \
- CEE_REFANYTYPE_LABEL: \
- CEE_UNUSED52_LABEL: \
- CEE_UNUSED53_LABEL: \
- CEE_UNUSED54_LABEL: \
- CEE_UNUSED55_LABEL: \
- CEE_UNUSED70_LABEL:
-#define GOTO_LABEL_VARS \
- const static void * const goto_map [] = {\
-#define OPDEF(a,b,c,d,e,f,g,h,i,j) \ \
- && a ## _LABEL, \
-#include "mono/cil/opcode.def" \
-#undef OPDEF \
- &&DUMMY_LABEL \
- }; \
- DUMMY_LABEL:
-
-#else
-
-#define SWITCH(a) switch(a)
-#define BREAK break
-#define CASE(l) case l:
-#define DEFAULT \
- default: \
- g_error ("Unimplemented opcode: %x at 0x%x\n", *ip, ip-header->code);
-#define SUB_SWITCH case 0xFE:
-#define GOTO_LABEL_VARS
-
-#endif
diff --git a/mono/interpreter/interp.c b/mono/interpreter/interp.c
deleted file mode 100644
index bab4d6fb48c..00000000000
--- a/mono/interpreter/interp.c
+++ /dev/null
@@ -1,4515 +0,0 @@
-/*
- * PLEASE NOTE: This is a research prototype.
- *
- *
- * interp.c: Interpreter for CIL byte codes
- *
- * Authors:
- * Paolo Molaro (lupus@ximian.com)
- * Miguel de Icaza (miguel@ximian.com)
- * Dietmar Maurer (dietmar@ximian.com)
- *
- * (C) 2001, 2002 Ximian, Inc.
- */
-#ifndef __USE_ISOC99
-#define __USE_ISOC99
-#endif
-#include "config.h"
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <glib.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <math.h>
-#include <locale.h>
-
-#include <mono/utils/gc_wrapper.h>
-
-#ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-#else
-# ifdef __CYGWIN__
-# define alloca __builtin_alloca
-# endif
-#endif
-
-/* trim excessive headers */
-#include <mono/metadata/image.h>
-#include <mono/metadata/assembly.h>
-#include <mono/metadata/cil-coff.h>
-#include <mono/metadata/mono-endian.h>
-#include <mono/metadata/tabledefs.h>
-#include <mono/metadata/tokentype.h>
-#include <mono/metadata/loader.h>
-#include <mono/metadata/threads.h>
-#include <mono/metadata/threadpool.h>
-#include <mono/metadata/profiler-private.h>
-#include <mono/metadata/appdomain.h>
-#include <mono/metadata/reflection.h>
-#include <mono/metadata/exception.h>
-#include <mono/metadata/verify.h>
-#include <mono/metadata/opcodes.h>
-#include <mono/metadata/debug-helpers.h>
-#include <mono/metadata/mono-config.h>
-#include <mono/metadata/marshal.h>
-#include <mono/metadata/environment.h>
-#include <mono/metadata/mono-debug.h>
-#include <mono/os/util.h>
-
-#include "interp.h"
-#include "mintops.h"
-#include "embed.h"
-#include "hacks.h"
-
-#define OPDEF(a,b,c,d,e,f,g,h,i,j) \
- a = i,
-
-enum {
-#include "mono/cil/opcode.def"
- CEE_LASTOP
-};
-#undef OPDEF
-
-/* Mingw 2.1 doesnt need this any more, but leave it in for now for older versions */
-#ifdef _WIN32
-#define isnan _isnan
-#define finite _finite
-#endif
-#ifndef HAVE_FINITE
-#ifdef HAVE_ISFINITE
-#define finite isfinite
-#endif
-#endif
-
-static gint *abort_requested;
-
-/* If true, then we output the opcodes as we interpret them */
-static int global_tracing = 0;
-static int global_no_pointers = 0;
-
-int mono_interp_traceopt = 0;
-
-static int debug_indent_level = 0;
-
-#define INIT_FRAME(frame,parent_frame,obj_this,method_args,method_retval,mono_method) \
- do { \
- (frame)->parent = (parent_frame); \
- (frame)->obj = (obj_this); \
- (frame)->stack_args = (method_args); \
- (frame)->retval = (method_retval); \
- (frame)->runtime_method = mono_interp_get_runtime_method (mono_method); \
- (frame)->ex = NULL; \
- (frame)->ip = NULL; \
- (frame)->invoke_trap = 0; \
- } while (0)
-
-void ves_exec_method (MonoInvocation *frame);
-
-static char* dump_stack (stackval *stack, stackval *sp);
-static char* dump_frame (MonoInvocation *inv);
-static MonoArray *get_trace_ips (MonoDomain *domain, MonoInvocation *top);
-static void ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context);
-
-typedef void (*ICallMethod) (MonoInvocation *frame);
-
-static guint32 die_on_exception = 0;
-static guint32 thread_context_id = 0;
-
-#define DEBUG_INTERP 1
-#define COUNT_OPS 0
-#if DEBUG_INTERP
-
-static int break_on_method = 0;
-static int nested_trace = 0;
-static GList *db_methods = NULL;
-
-static void
-output_indent (void)
-{
- int h;
-
- for (h = 0; h < debug_indent_level; h++)
- g_print (" ");
-}
-
-static void
-db_match_method (gpointer data, gpointer user_data)
-{
- MonoMethod *m = (MonoMethod*)user_data;
- MonoMethodDesc *desc = data;
-
- if (mono_method_desc_full_match (desc, m))
- break_on_method = 1;
-}
-
-#define DEBUG_ENTER() \
- if (db_methods) { \
- g_list_foreach (db_methods, db_match_method, (gpointer)frame->runtime_method->method); \
- if (break_on_method) tracing=nested_trace ? (global_tracing = 2, 3) : 2; \
- break_on_method = 0; \
- } \
- if (tracing) { \
- MonoMethod *method = frame->runtime_method->method ;\
- char *mn, *args = dump_args (frame); \
- debug_indent_level++; \
- output_indent (); \
- mn = mono_method_full_name (method, FALSE); \
- g_print ("(%u) Entering %s (", GetCurrentThreadId(), mn); \
- g_free (mn); \
- g_print ("%s)\n", args); \
- g_free (args); \
- } \
- if (mono_profiler_events & MONO_PROFILE_ENTER_LEAVE) \
- mono_profiler_method_enter (frame->runtime_method->method);
-
-#define DEBUG_LEAVE() \
- if (tracing) { \
- char *mn, *args; \
- args = dump_retval (frame); \
- output_indent (); \
- mn = mono_method_full_name (frame->runtime_method->method, FALSE); \
- g_print ("(%u) Leaving %s", GetCurrentThreadId(), mn); \
- g_free (mn); \
- g_print (" => %s\n", args); \
- g_free (args); \
- debug_indent_level--; \
- if (tracing == 3) global_tracing = 0; \
- } \
- if (mono_profiler_events & MONO_PROFILE_ENTER_LEAVE) \
- mono_profiler_method_leave (frame->runtime_method->method);
-
-#else
-
-#define DEBUG_ENTER()
-#define DEBUG_LEAVE()
-
-#endif
-
-static void
-interp_ex_handler (MonoException *ex) {
- ThreadContext *context = TlsGetValue (thread_context_id);
- char *stack_trace;
- if (context == NULL)
- return;
- stack_trace = dump_frame (context->current_frame);
- ex->stack_trace = mono_string_new (mono_domain_get(), stack_trace);
- g_free (stack_trace);
- if (context->current_env == NULL || strcmp(ex->object.vtable->klass->name, "ExecutionEngineException") == 0) {
- char *strace = mono_string_to_utf8 (ex->stack_trace);
- fprintf(stderr, "Nothing can catch this exception: ");
- fprintf(stderr, "%s", ex->object.vtable->klass->name);
- if (ex->message != NULL) {
- char *m = mono_string_to_utf8 (ex->message);
- fprintf(stderr, ": %s", m);
- g_free(m);
- }
- fprintf(stderr, "\n");
- fprintf(stderr, "%s\n", strace);
- g_free (strace);
- if (ex->inner_ex != NULL) {
- ex = (MonoException *)ex->inner_ex;
- fprintf(stderr, "Inner exception: %s", ex->object.vtable->klass->name);
- if (ex->message != NULL) {
- char *m = mono_string_to_utf8 (ex->message);
- fprintf(stderr, ": %s", m);
- g_free(m);
- }
- strace = mono_string_to_utf8 (ex->stack_trace);
- fprintf(stderr, "\n");
- fprintf(stderr, "%s\n", strace);
- g_free (strace);
- }
- /* wait for other threads to also collapse */
- Sleep(1000);
- exit(1);
- }
- context->env_frame->ex = ex;
- context->search_for_handler = 1;
- longjmp (*context->current_env, 1);
-}
-
-static void
-ves_real_abort (int line, MonoMethod *mh,
- const unsigned short *ip, stackval *stack, stackval *sp)
-{
- fprintf (stderr, "Execution aborted in method: %s::%s\n", mh->klass->name, mh->name);
- fprintf (stderr, "Line=%d IP=0x%04x, Aborted execution\n", line,
- ip-(const unsigned short *)mono_method_get_header (mh)->code);
- g_print ("0x%04x %02x\n",
- ip-(const unsigned short *)mono_method_get_header (mh)->code, *ip);
- if (sp > stack)
- printf ("\t[%d] 0x%08x %0.5f\n", sp-stack, sp[-1].data.i, sp[-1].data.f);
-}
-
-#define ves_abort() \
- do {\
- ves_real_abort(__LINE__, frame->runtime_method->method, ip, frame->stack, sp); \
- THROW_EX (mono_get_exception_execution_engine (NULL), ip); \
- } while (0);
-
-static gpointer
-interp_create_remoting_trampoline (MonoMethod *method, MonoRemotingTarget target)
-{
- return mono_interp_get_runtime_method (mono_marshal_get_remoting_invoke_for_target (method, target));
-}
-
-static CRITICAL_SECTION runtime_method_lookup_section;
-
-RuntimeMethod*
-mono_interp_get_runtime_method (MonoMethod *method)
-{
- MonoDomain *domain = mono_domain_get ();
- RuntimeMethod *rtm;
-
- EnterCriticalSection (&runtime_method_lookup_section);
- if ((rtm = mono_internal_hash_table_lookup (&domain->jit_code_hash, method))) {
- LeaveCriticalSection (&runtime_method_lookup_section);
- return rtm;
- }
- rtm = mono_mempool_alloc (domain->mp, sizeof (RuntimeMethod));
- memset (rtm, 0, sizeof (*rtm));
- rtm->method = method;
- rtm->param_count = mono_method_signature (method)->param_count;
- rtm->hasthis = mono_method_signature (method)->hasthis;
- rtm->valuetype = method->klass->valuetype;
- mono_internal_hash_table_insert (&domain->jit_code_hash, method, rtm);
- LeaveCriticalSection (&runtime_method_lookup_section);
-
- return rtm;
-}
-
-static gpointer
-interp_create_trampoline (MonoMethod *method)
-{
- if (method->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
- method = mono_marshal_get_synchronized_wrapper (method);
- return mono_interp_get_runtime_method (method);
-}
-
-static inline RuntimeMethod*
-get_virtual_method (RuntimeMethod *runtime_method, MonoObject *obj)
-{
- MonoMethod *m = runtime_method->method;
-
- if ((m->flags & METHOD_ATTRIBUTE_FINAL) || !(m->flags & METHOD_ATTRIBUTE_VIRTUAL)) {
- if (obj->vtable->klass == mono_defaults.transparent_proxy_class)
- return mono_interp_get_runtime_method (mono_marshal_get_remoting_invoke (m));
- else if (m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
- return mono_interp_get_runtime_method (mono_marshal_get_synchronized_wrapper (m));
- else
- return runtime_method;
- }
-
- if (m->klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
- return ((RuntimeMethod **)obj->vtable->interface_offsets [m->klass->interface_id]) [m->slot];
- } else {
- return ((RuntimeMethod **)obj->vtable->vtable) [m->slot];
- }
-}
-
-void inline
-stackval_from_data (MonoType *type, stackval *result, char *data, gboolean pinvoke)
-{
- if (type->byref) {
- switch (type->type) {
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_STRING:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_SZARRAY:
- break;
- default:
- break;
- }
- result->data.p = *(gpointer*)data;
- return;
- }
- switch (type->type) {
- case MONO_TYPE_VOID:
- return;
- case MONO_TYPE_I1:
- result->data.i = *(gint8*)data;
- return;
- case MONO_TYPE_U1:
- case MONO_TYPE_BOOLEAN:
- result->data.i = *(guint8*)data;
- return;
- case MONO_TYPE_I2:
- result->data.i = *(gint16*)data;
- return;
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- result->data.i = *(guint16*)data;
- return;
- case MONO_TYPE_I4:
- result->data.i = *(gint32*)data;
- return;
- case MONO_TYPE_U:
- case MONO_TYPE_I:
- result->data.nati = *(mono_i*)data;
- return;
- case MONO_TYPE_PTR:
- result->data.p = *(gpointer*)data;
- return;
- case MONO_TYPE_U4:
- result->data.i = *(guint32*)data;
- return;
- case MONO_TYPE_R4:
- result->data.f = *(float*)data;
- return;
- case MONO_TYPE_I8:
- case MONO_TYPE_U8:
- result->data.l = *(gint64*)data;
- return;
- case MONO_TYPE_R8:
- result->data.f = *(double*)data;
- return;
- case MONO_TYPE_STRING:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_ARRAY:
- result->data.p = *(gpointer*)data;
- return;
- case MONO_TYPE_VALUETYPE:
- if (type->data.klass->enumtype) {
- stackval_from_data (type->data.klass->enum_basetype, result, data, pinvoke);
- return;
- } else {
- int size;
-
- if (pinvoke)
- size = mono_class_native_size (type->data.klass, NULL);
- else
- size = mono_class_value_size (type->data.klass, NULL);
- memcpy (result->data.vt, data, size);
- }
- return;
- default:
- g_warning ("got type 0x%02x", type->type);
- g_assert_not_reached ();
- }
-}
-
-void inline
-stackval_to_data (MonoType *type, stackval *val, char *data, gboolean pinvoke)
-{
- if (type->byref) {
- gpointer *p = (gpointer*)data;
- *p = val->data.p;
- return;
- }
- /* printf ("TODAT0 %p\n", data); */
- switch (type->type) {
- case MONO_TYPE_I1:
- case MONO_TYPE_U1: {
- guint8 *p = (guint8*)data;
- *p = val->data.i;
- return;
- }
- case MONO_TYPE_BOOLEAN: {
- guint8 *p = (guint8*)data;
- *p = (val->data.i != 0);
- return;
- }
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR: {
- guint16 *p = (guint16*)data;
- *p = val->data.i;
- return;
- }
- case MONO_TYPE_I: {
- mono_i *p = (mono_i*)data;
- /* In theory the value used by stloc should match the local var type
- but in practice it sometimes doesn't (a int32 gets dup'd and stloc'd into
- a native int - both by csc and mcs). Not sure what to do about sign extension
- as it is outside the spec... doing the obvious */
- *p = (mono_i)val->data.nati;
- return;
- }
- case MONO_TYPE_U: {
- mono_u *p = (mono_u*)data;
- /* see above. */
- *p = (mono_u)val->data.nati;
- return;
- }
- case MONO_TYPE_I4:
- case MONO_TYPE_U4: {
- gint32 *p = (gint32*)data;
- *p = val->data.i;
- return;
- }
- case MONO_TYPE_I8:
- case MONO_TYPE_U8: {
- gint64 *p = (gint64*)data;
- *p = val->data.l;
- return;
- }
- case MONO_TYPE_R4: {
- float *p = (float*)data;
- *p = val->data.f;
- return;
- }
- case MONO_TYPE_R8: {
- double *p = (double*)data;
- *p = val->data.f;
- return;
- }
- case MONO_TYPE_STRING:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_PTR: {
- gpointer *p = (gpointer*)data;
- *p = val->data.p;
- return;
- }
- case MONO_TYPE_VALUETYPE:
- if (type->data.klass->enumtype) {
- stackval_to_data (type->data.klass->enum_basetype, val, data, pinvoke);
- return;
- } else {
- int size;
-
- if (pinvoke)
- size = mono_class_native_size (type->data.klass, NULL);
- else
- size = mono_class_value_size (type->data.klass, NULL);
-
- memcpy (data, val->data.p, size);
- }
- return;
- default:
- g_warning ("got type %x", type->type);
- g_assert_not_reached ();
- }
-}
-
-static void
-fill_in_trace (MonoException *exception, MonoInvocation *frame)
-{
- char *stack_trace = dump_frame (frame);
- MonoDomain *domain = mono_domain_get();
- (exception)->stack_trace = mono_string_new (domain, stack_trace);
- (exception)->trace_ips = get_trace_ips (domain, frame);
- g_free (stack_trace);
-}
-
-#define FILL_IN_TRACE(exception, frame) fill_in_trace(exception, frame)
-
-#define THROW_EX(exception,ex_ip) \
- do {\
- frame->ip = (ex_ip); \
- frame->ex = (MonoException*)(exception); \
- FILL_IN_TRACE(frame->ex, frame); \
- goto handle_exception; \
- } while (0)
-
-static MonoObject*
-ves_array_create (MonoDomain *domain, MonoClass *klass, MonoMethodSignature *sig, stackval *values)
-{
- guint32 *lengths;
- guint32 *lower_bounds;
- int i;
-
- lengths = alloca (sizeof (guint32) * klass->rank * 2);
- for (i = 0; i < sig->param_count; ++i) {
- lengths [i] = values->data.i;
- values ++;
- }
- if (klass->rank == sig->param_count) {
- /* Only lengths provided. */
- lower_bounds = NULL;
- } else {
- /* lower bounds are first. */
- lower_bounds = lengths;
- lengths += klass->rank;
- }
- return (MonoObject*)mono_array_new_full (domain, klass, lengths, lower_bounds);
-}
-
-static void
-ves_array_set (MonoInvocation *frame)
-{
- stackval *sp = frame->stack_args;
- MonoObject *o;
- MonoArray *ao;
- MonoClass *ac;
- gint32 i, t, pos, esize;
- gpointer ea;
- MonoType *mt;
-
- o = frame->obj;
- ao = (MonoArray *)o;
- ac = o->vtable->klass;
-
- g_assert (ac->rank >= 1);
-
- pos = sp [0].data.i;
- if (ao->bounds != NULL) {
- pos -= ao->bounds [0].lower_bound;
- for (i = 1; i < ac->rank; i++) {
- if ((t = sp [i].data.i - ao->bounds [i].lower_bound) >=
- ao->bounds [i].length) {
- frame->ex = mono_get_exception_index_out_of_range ();
- FILL_IN_TRACE(frame->ex, frame);
- return;
- }
- pos = pos*ao->bounds [i].length + sp [i].data.i -
- ao->bounds [i].lower_bound;
- }
- } else if (pos >= ao->max_length) {
- frame->ex = mono_get_exception_index_out_of_range ();
- FILL_IN_TRACE(frame->ex, frame);
- return;
- }
-
-#if 0 /* FIX */
- if (sp [ac->rank].data.p && !mono_object_isinst (sp [ac->rank].data.p, mono_object_class (o)->element_class)) {
- frame->ex = mono_get_exception_array_type_mismatch ();
- FILL_IN_TRACE (frame->ex, frame);
- return;
- }
-#endif
-
- esize = mono_array_element_size (ac);
- ea = mono_array_addr_with_size (ao, esize, pos);
-
- mt = mono_method_signature (frame->runtime_method->method)->params [ac->rank];
- stackval_to_data (mt, &sp [ac->rank], ea, FALSE);
-}
-
-static void
-ves_array_get (MonoInvocation *frame)
-{
- stackval *sp = frame->stack_args;
- MonoObject *o;
- MonoArray *ao;
- MonoClass *ac;
- gint32 i, t, pos, esize;
- gpointer ea;
- MonoType *mt;
-
- o = frame->obj;
- ao = (MonoArray *)o;
- ac = o->vtable->klass;
-
- g_assert (ac->rank >= 1);
-
- pos = sp [0].data.i;
- if (ao->bounds != NULL) {
- pos -= ao->bounds [0].lower_bound;
- for (i = 1; i < ac->rank; i++) {
- if ((t = sp [i].data.i - ao->bounds [i].lower_bound) >=
- ao->bounds [i].length) {
- frame->ex = mono_get_exception_index_out_of_range ();
- FILL_IN_TRACE(frame->ex, frame);
- return;
- }
-
- pos = pos*ao->bounds [i].length + sp [i].data.i -
- ao->bounds [i].lower_bound;
- }
- } else if (pos >= ao->max_length) {
- frame->ex = mono_get_exception_index_out_of_range ();
- FILL_IN_TRACE(frame->ex, frame);
- return;
- }
-
- esize = mono_array_element_size (ac);
- ea = mono_array_addr_with_size (ao, esize, pos);
-
- mt = mono_method_signature (frame->runtime_method->method)->ret;
- stackval_from_data (mt, frame->retval, ea, FALSE);
-}
-
-static void
-ves_array_element_address (MonoInvocation *frame)
-{
- stackval *sp = frame->stack_args;
- MonoObject *o;
- MonoArray *ao;
- MonoClass *ac;
- gint32 i, t, pos, esize;
- gpointer ea;
-
- o = frame->obj;
- ao = (MonoArray *)o;
- ac = o->vtable->klass;
-
- g_assert (ac->rank >= 1);
-
- pos = sp [0].data.i;
- if (ao->bounds != NULL) {
- pos -= ao->bounds [0].lower_bound;
- for (i = 1; i < ac->rank; i++) {
- if ((t = sp [i].data.i - ao->bounds [i].lower_bound) >=
- ao->bounds [i].length) {
- frame->ex = mono_get_exception_index_out_of_range ();
- FILL_IN_TRACE(frame->ex, frame);
- return;
- }
- pos = pos*ao->bounds [i].length + sp [i].data.i -
- ao->bounds [i].lower_bound;
- }
- } else if (pos >= ao->max_length) {
- frame->ex = mono_get_exception_index_out_of_range ();
- FILL_IN_TRACE(frame->ex, frame);
- return;
- }
-
- esize = mono_array_element_size (ac);
- ea = mono_array_addr_with_size (ao, esize, pos);
-
- frame->retval->data.p = ea;
-}
-
-static void
-interp_walk_stack (MonoStackWalk func, gboolean do_il_offset, gpointer user_data)
-{
- ThreadContext *context = TlsGetValue (thread_context_id);
- MonoInvocation *frame;
- int il_offset;
- MonoMethodHeader *hd;
-
- if (!context) return;
-
- frame = context->current_frame;
-
- while (frame) {
- gboolean managed = FALSE;
- MonoMethod *method = frame->runtime_method->method;
- if (!method || (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
- (method->iflags & (METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL | METHOD_IMPL_ATTRIBUTE_RUNTIME)))
- il_offset = -1;
- else {
- hd = mono_method_get_header (method);
- il_offset = frame->ip - (const unsigned short *)hd->code;
- if (!method->wrapper_type)
- managed = TRUE;
- }
- if (func (method, -1, il_offset, managed, user_data))
- return;
- frame = frame->parent;
- }
-}
-
-static void
-ves_pinvoke_method (MonoInvocation *frame, MonoMethodSignature *sig, MonoFunc addr, gboolean string_ctor, ThreadContext *context)
-{
- jmp_buf env;
- MonoPIFunc func;
- MonoInvocation *old_frame = context->current_frame;
- MonoInvocation *old_env_frame = context->env_frame;
- jmp_buf *old_env = context->current_env;
-
- if (setjmp (env)) {
- context->current_frame = old_frame;
- context->env_frame = old_env_frame;
- context->current_env = old_env;
- context->managed_code = 1;
- return;
- }
-
- frame->ex = NULL;
- context->env_frame = frame;
- context->current_env = &env;
-
- if (frame->runtime_method) {
- func = frame->runtime_method->func;
- } else {
- func = mono_arch_create_trampoline (sig, string_ctor);
- }
-
- context->current_frame = frame;
- context->managed_code = 0;
-
- func (addr, &frame->retval->data.p, frame->obj, frame->stack_args);
-
- context->managed_code = 1;
- /* domain can only be changed by native code */
- context->domain = mono_domain_get ();
-
- if (*abort_requested)
- mono_thread_interruption_checkpoint ();
-
- if (string_ctor) {
- stackval_from_data (&mono_defaults.string_class->byval_arg,
- frame->retval, (char*)&frame->retval->data.p, sig->pinvoke);
- } else if (!MONO_TYPE_ISSTRUCT (sig->ret))
- stackval_from_data (sig->ret, frame->retval, (char*)&frame->retval->data.p, sig->pinvoke);
-
- context->current_frame = old_frame;
- context->env_frame = old_env_frame;
- context->current_env = old_env;
-}
-
-static void
-interp_delegate_ctor (MonoDomain *domain, MonoObject *this, MonoObject *target, RuntimeMethod *runtime_method)
-{
- MonoDelegate *delegate = (MonoDelegate *)this;
-
- delegate->method_info = mono_method_get_object (domain, runtime_method->method, NULL);
- delegate->target = target;
-
- if (target && target->vtable->klass == mono_defaults.transparent_proxy_class) {
- MonoMethod *method = mono_marshal_get_remoting_invoke (runtime_method->method);
- delegate->method_ptr = mono_interp_get_runtime_method (method);
- } else {
- delegate->method_ptr = runtime_method;
- }
-}
-
-MonoDelegate*
-mono_interp_ftnptr_to_delegate (MonoClass *klass, gpointer ftn)
-{
- MonoDelegate *d;
- MonoJitInfo *ji;
- MonoDomain *domain = mono_domain_get ();
-
- d = (MonoDelegate*)mono_object_new (domain, klass);
-
- ji = mono_jit_info_table_find (domain, ftn);
- if (ji == NULL)
- mono_raise_exception (mono_get_exception_argument ("", "Function pointer was not created by a Delegate."));
-
- /* FIXME: discard the wrapper and call the original method */
- interp_delegate_ctor (domain, (MonoObject*)d, NULL, mono_interp_get_runtime_method (ji->method));
-
- return d;
-}
-
-/*
- * From the spec:
- * runtime specifies that the implementation of the method is automatically
- * provided by the runtime and is primarily used for the methods of delegates.
- */
-static void
-ves_runtime_method (MonoInvocation *frame, ThreadContext *context)
-{
- MonoMethod *method = frame->runtime_method->method;
- const char *name = method->name;
- MonoObject *obj = (MonoObject*)frame->obj;
-
- mono_class_init (method->klass);
-
- if (obj && mono_object_isinst (obj, mono_defaults.multicastdelegate_class)) {
- if (*name == '.' && (strcmp (name, ".ctor") == 0)) {
- interp_delegate_ctor (context->domain, obj, frame->stack_args[0].data.p, frame->stack_args[1].data.p);
- return;
- }
- }
-
- if (obj && mono_object_isinst (obj, mono_defaults.array_class)) {
- if (*name == 'S' && (strcmp (name, "Set") == 0)) {
- ves_array_set (frame);
- return;
- }
- if (*name == 'G' && (strcmp (name, "Get") == 0)) {
- ves_array_get (frame);
- return;
- }
- if (*name == 'A' && (strcmp (name, "Address") == 0)) {
- ves_array_element_address (frame);
- return;
- }
- }
-
- g_error ("Don't know how to exec runtime method %s.%s::%s",
- method->klass->name_space, method->klass->name,
- method->name);
-}
-
-static char*
-dump_stack (stackval *stack, stackval *sp)
-{
- stackval *s = stack;
- GString *str = g_string_new ("");
-
- if (sp == stack)
- return g_string_free (str, FALSE);
-
- while (s < sp) {
- g_string_append_printf (str, "[%lld/0x%0llx] ", s->data.l, s->data.l);
- ++s;
- }
- return g_string_free (str, FALSE);
-}
-
-static void
-dump_stackval (GString *str, stackval *s, MonoType *type)
-{
- switch (type->type) {
- case MONO_TYPE_I1:
- case MONO_TYPE_U1:
- case MONO_TYPE_I2:
- case MONO_TYPE_U2:
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- case MONO_TYPE_CHAR:
- case MONO_TYPE_BOOLEAN:
- g_string_append_printf (str, "[%d] ", s->data.i);
- break;
- case MONO_TYPE_STRING:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_PTR:
- case MONO_TYPE_I:
- case MONO_TYPE_U:
- g_string_append_printf (str, "[%p] ", s->data.p);
- break;
- case MONO_TYPE_VALUETYPE:
- if (type->data.klass->enumtype)
- g_string_append_printf (str, "[%d] ", s->data.i);
- else
- g_string_append_printf (str, "[vt:%p] ", s->data.p);
- break;
- case MONO_TYPE_R4:
- case MONO_TYPE_R8:
- g_string_append_printf (str, "[%g] ", s->data.f);
- break;
- case MONO_TYPE_I8:
- case MONO_TYPE_U8:
- default:
- g_string_append_printf (str, "[%lld/0x%0llx] ", s->data.l, s->data.l);
- break;
- }
-}
-
-static char*
-dump_args (MonoInvocation *inv)
-{
- GString *str = g_string_new ("");
- int i;
- MonoMethodSignature *signature = mono_method_signature (inv->runtime_method->method);
-
- if (signature->param_count == 0)
- return g_string_free (str, FALSE);
-
- if (signature->hasthis)
- g_string_append_printf (str, "%p ", inv->obj);
-
- for (i = 0; i < signature->param_count; ++i)
- dump_stackval (str, inv->stack_args + i, signature->params [i]);
-
- return g_string_free (str, FALSE);
-}
-
-static char*
-dump_retval (MonoInvocation *inv)
-{
- GString *str = g_string_new ("");
- MonoType *ret = mono_method_signature (inv->runtime_method->method)->ret;
-
- if (ret->type != MONO_TYPE_VOID)
- dump_stackval (str, inv->retval, ret);
-
- return g_string_free (str, FALSE);
-}
-
-static char*
-dump_frame (MonoInvocation *inv)
-{
- GString *str = g_string_new ("");
- int i;
- char *args;
- for (i = 0; inv; inv = inv->parent) {
- if (inv->runtime_method != NULL) {
- MonoMethod *method = inv->runtime_method->method;
- MonoClass *k;
-
- int codep = 0;
- const char * opname = "";
- char *name;
- gchar *source = NULL;
-
- k = method->klass;
-
- if ((method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) == 0 &&
- (method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) == 0) {
- MonoMethodHeader *hd = mono_method_get_header (method);
-
- if (hd != NULL) {
- if (inv->ip) {
- opname = mono_interp_opname [*inv->ip];
- codep = inv->ip - inv->runtime_method->code;
- } else
- opname = "";
-
- source = mono_debug_source_location_from_il_offset (method, codep, NULL);
- }
- }
- args = dump_args (inv);
- name = mono_method_full_name (method, TRUE);
- if (source)
- g_string_append_printf (str, "#%d: 0x%05x %-10s in %s (%s) at %s\n", i, codep, opname,
- name, args, source);
- else
- g_string_append_printf (str, "#%d: 0x%05x %-10s in %s (%s)\n", i, codep, opname,
- name, args);
- g_free (name);
- g_free (args);
- g_free (source);
- ++i;
- }
- }
- return g_string_free (str, FALSE);
-}
-
-static MonoArray *
-get_trace_ips (MonoDomain *domain, MonoInvocation *top)
-{
- int i;
- MonoArray *res;
- MonoInvocation *inv;
-
- for (i = 0, inv = top; inv; inv = inv->parent)
- if (inv->runtime_method != NULL)
- ++i;
-
- res = mono_array_new (domain, mono_defaults.int_class, 2 * i);
-
- for (i = 0, inv = top; inv; inv = inv->parent)
- if (inv->runtime_method != NULL) {
- mono_array_set (res, gpointer, i, inv->runtime_method);
- ++i;
- mono_array_set (res, gpointer, i, (gpointer)inv->ip);
- ++i;
- }
-
- return res;
-}
-
-
-#define MYGUINT64_MAX 18446744073709551615ULL
-#define MYGINT64_MAX 9223372036854775807LL
-#define MYGINT64_MIN (-MYGINT64_MAX -1LL)
-
-#define MYGUINT32_MAX 4294967295U
-#define MYGINT32_MAX 2147483647
-#define MYGINT32_MIN (-MYGINT32_MAX -1)
-
-#define CHECK_ADD_OVERFLOW(a,b) \
- (gint32)(b) >= 0 ? (gint32)(MYGINT32_MAX) - (gint32)(b) < (gint32)(a) ? -1 : 0 \
- : (gint32)(MYGINT32_MIN) - (gint32)(b) > (gint32)(a) ? +1 : 0
-
-#define CHECK_SUB_OVERFLOW(a,b) \
- (gint32)(b) < 0 ? (gint32)(MYGINT32_MAX) + (gint32)(b) < (gint32)(a) ? -1 : 0 \
- : (gint32)(MYGINT32_MIN) + (gint32)(b) > (gint32)(a) ? +1 : 0
-
-#define CHECK_ADD_OVERFLOW_UN(a,b) \
- (guint32)(MYGUINT32_MAX) - (guint32)(b) < (guint32)(a) ? -1 : 0
-
-#define CHECK_SUB_OVERFLOW_UN(a,b) \
- (guint32)(a) < (guint32)(b) ? -1 : 0
-
-#define CHECK_ADD_OVERFLOW64(a,b) \
- (gint64)(b) >= 0 ? (gint64)(MYGINT64_MAX) - (gint64)(b) < (gint64)(a) ? -1 : 0 \
- : (gint64)(MYGINT64_MIN) - (gint64)(b) > (gint64)(a) ? +1 : 0
-
-#define CHECK_SUB_OVERFLOW64(a,b) \
- (gint64)(b) < 0 ? (gint64)(MYGINT64_MAX) + (gint64)(b) < (gint64)(a) ? -1 : 0 \
- : (gint64)(MYGINT64_MIN) + (gint64)(b) > (gint64)(a) ? +1 : 0
-
-#define CHECK_ADD_OVERFLOW64_UN(a,b) \
- (guint64)(MYGUINT64_MAX) - (guint64)(b) < (guint64)(a) ? -1 : 0
-
-#define CHECK_SUB_OVERFLOW64_UN(a,b) \
- (guint64)(a) < (guint64)(b) ? -1 : 0
-
-#if SIZEOF_VOID_P == 4
-#define CHECK_ADD_OVERFLOW_NAT(a,b) CHECK_ADD_OVERFLOW(a,b)
-#define CHECK_ADD_OVERFLOW_NAT_UN(a,b) CHECK_ADD_OVERFLOW_UN(a,b)
-#else
-#define CHECK_ADD_OVERFLOW_NAT(a,b) CHECK_ADD_OVERFLOW64(a,b)
-#define CHECK_ADD_OVERFLOW_NAT_UN(a,b) CHECK_ADD_OVERFLOW64_UN(a,b)
-#endif
-
-/* Resolves to TRUE if the operands would overflow */
-#define CHECK_MUL_OVERFLOW(a,b) \
- ((gint32)(a) == 0) || ((gint32)(b) == 0) ? 0 : \
- (((gint32)(a) > 0) && ((gint32)(b) == -1)) ? FALSE : \
- (((gint32)(a) < 0) && ((gint32)(b) == -1)) ? (a == - MYGINT32_MAX) : \
- (((gint32)(a) > 0) && ((gint32)(b) > 0)) ? (gint32)(a) > ((MYGINT32_MAX) / (gint32)(b)) : \
- (((gint32)(a) > 0) && ((gint32)(b) < 0)) ? (gint32)(a) > ((MYGINT32_MIN) / (gint32)(b)) : \
- (((gint32)(a) < 0) && ((gint32)(b) > 0)) ? (gint32)(a) < ((MYGINT32_MIN) / (gint32)(b)) : \
- (gint32)(a) < ((MYGINT32_MAX) / (gint32)(b))
-
-#define CHECK_MUL_OVERFLOW_UN(a,b) \
- ((guint32)(a) == 0) || ((guint32)(b) == 0) ? 0 : \
- (guint32)(b) > ((MYGUINT32_MAX) / (guint32)(a))
-
-#define CHECK_MUL_OVERFLOW64(a,b) \
- ((gint64)(a) == 0) || ((gint64)(b) == 0) ? 0 : \
- (((gint64)(a) > 0) && ((gint64)(b) == -1)) ? FALSE : \
- (((gint64)(a) < 0) && ((gint64)(b) == -1)) ? (a == - MYGINT64_MAX) : \
- (((gint64)(a) > 0) && ((gint64)(b) > 0)) ? (gint64)(a) > ((MYGINT64_MAX) / (gint64)(b)) : \
- (((gint64)(a) > 0) && ((gint64)(b) < 0)) ? (gint64)(a) > ((MYGINT64_MIN) / (gint64)(b)) : \
- (((gint64)(a) < 0) && ((gint64)(b) > 0)) ? (gint64)(a) < ((MYGINT64_MIN) / (gint64)(b)) : \
- (gint64)(a) < ((MYGINT64_MAX) / (gint64)(b))
-
-#define CHECK_MUL_OVERFLOW64_UN(a,b) \
- ((guint64)(a) == 0) || ((guint64)(b) == 0) ? 0 : \
- (guint64)(b) > ((MYGUINT64_MAX) / (guint64)(a))
-
-#if SIZEOF_VOID_P == 4
-#define CHECK_MUL_OVERFLOW_NAT(a,b) CHECK_MUL_OVERFLOW(a,b)
-#define CHECK_MUL_OVERFLOW_NAT_UN(a,b) CHECK_MUL_OVERFLOW_UN(a,b)
-#else
-#define CHECK_MUL_OVERFLOW_NAT(a,b) CHECK_MUL_OVERFLOW64(a,b)
-#define CHECK_MUL_OVERFLOW_NAT_UN(a,b) CHECK_MUL_OVERFLOW64_UN(a,b)
-#endif
-
-static MonoObject*
-interp_mono_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc)
-{
- MonoInvocation frame;
- ThreadContext * volatile context = TlsGetValue (thread_context_id);
- MonoObject *retval = NULL;
- MonoMethodSignature *sig = mono_method_signature (method);
- MonoClass *klass = mono_class_from_mono_type (sig->ret);
- int i, type, isobject = 0;
- void *ret = NULL;
- stackval result;
- stackval *args = alloca (sizeof (stackval) * sig->param_count);
- ThreadContext context_struct;
- MonoInvocation *old_frame = NULL;
- jmp_buf env;
-
- frame.ex = NULL;
-
- if (setjmp(env)) {
- if (context != &context_struct) {
- context->domain = mono_domain_get ();
- context->current_frame = old_frame;
- context->managed_code = 0;
- } else
- TlsSetValue (thread_context_id, NULL);
- if (exc != NULL)
- *exc = (MonoObject *)frame.ex;
- return retval;
- }
-
- if (context == NULL) {
- context = &context_struct;
- context_struct.base_frame = &frame;
- context_struct.current_frame = NULL;
- context_struct.env_frame = &frame;
- context_struct.current_env = &env;
- context_struct.search_for_handler = 0;
- context_struct.managed_code = 0;
- TlsSetValue (thread_context_id, context);
- }
- else
- old_frame = context->current_frame;
-
- context->domain = mono_domain_get ();
-
- switch (sig->ret->type) {
- case MONO_TYPE_VOID:
- break;
- case MONO_TYPE_STRING:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_SZARRAY:
- isobject = 1;
- break;
- case MONO_TYPE_VALUETYPE:
- retval = mono_object_new (context->domain, klass);
- ret = ((char*)retval) + sizeof (MonoObject);
- if (!sig->ret->data.klass->enumtype)
- result.data.vt = ret;
- break;
- default:
- retval = mono_object_new (context->domain, klass);
- ret = ((char*)retval) + sizeof (MonoObject);
- break;
- }
-
- for (i = 0; i < sig->param_count; ++i) {
- if (sig->params [i]->byref) {
- args [i].data.p = params [i];
- continue;
- }
- type = sig->params [i]->type;
-handle_enum:
- switch (type) {
- case MONO_TYPE_U1:
- case MONO_TYPE_I1:
- case MONO_TYPE_BOOLEAN:
- args [i].data.i = *(MonoBoolean*)params [i];
- break;
- case MONO_TYPE_U2:
- case MONO_TYPE_I2:
- case MONO_TYPE_CHAR:
- args [i].data.i = *(gint16*)params [i];
- break;
-#if SIZEOF_VOID_P == 4
- case MONO_TYPE_U: /* use VAL_POINTER? */
- case MONO_TYPE_I:
-#endif
- case MONO_TYPE_U4:
- case MONO_TYPE_I4:
- args [i].data.i = *(gint32*)params [i];
- break;
-#if SIZEOF_VOID_P == 8
- case MONO_TYPE_U:
- case MONO_TYPE_I:
-#endif
- case MONO_TYPE_U8:
- case MONO_TYPE_I8:
- args [i].data.l = *(gint64*)params [i];
- break;
- case MONO_TYPE_VALUETYPE:
- if (sig->params [i]->data.klass->enumtype) {
- type = sig->params [i]->data.klass->enum_basetype->type;
- goto handle_enum;
- } else {
- args [i].data.p = params [i];
- }
- break;
- case MONO_TYPE_STRING:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_ARRAY:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_OBJECT:
- args [i].data.p = params [i];
- break;
- default:
- g_error ("type 0x%x not handled in runtime invoke", sig->params [i]->type);
- }
- }
-
- if (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)
- method = mono_marshal_get_native_wrapper (method);
- INIT_FRAME(&frame,context->current_frame,obj,args,&result,method);
- if (exc)
- frame.invoke_trap = 1;
- context->managed_code = 1;
- ves_exec_method_with_context (&frame, context);
- context->managed_code = 0;
- if (context == &context_struct)
- TlsSetValue (thread_context_id, NULL);
- else
- context->current_frame = old_frame;
- if (frame.ex != NULL) {
- if (exc != NULL) {
- *exc = (MonoObject*) frame.ex;
- return NULL;
- }
- if (context->current_env != NULL) {
- context->env_frame->ex = frame.ex;
- longjmp(*context->current_env, 1);
- }
- else
- printf("dropped exception...\n");
- }
- if (sig->ret->type == MONO_TYPE_VOID && !method->string_ctor)
- return NULL;
- if (isobject || method->string_ctor)
- return result.data.p;
- stackval_to_data (sig->ret, &result, ret, sig->pinvoke);
- return retval;
-}
-
-static stackval *
-do_icall (ThreadContext *context, int op, stackval *sp, gpointer ptr)
-{
- MonoInvocation *old_frame = context->current_frame;
- MonoInvocation *old_env_frame = context->env_frame;
- jmp_buf *old_env = context->current_env;
- jmp_buf env;
-
- if (setjmp (env)) {
- context->current_frame = old_frame;
- context->env_frame = old_env_frame;
- context->current_env = old_env;
- context->managed_code = 1;
- return sp;
- }
-
- context->env_frame = context->current_frame;
- context->current_env = &env;
- context->managed_code = 0;
-
- switch (op) {
- case MINT_ICALL_V_V: {
- void (*func)() = ptr;
- func ();
- break;
- }
- case MINT_ICALL_P_V: {
- void (*func)(gpointer) = ptr;
- func (sp [-1].data.p);
- sp --;
- break;
- }
- case MINT_ICALL_P_P: {
- gpointer (*func)(gpointer) = ptr;
- sp [-1].data.p = func (sp [-1].data.p);
- break;
- }
- case MINT_ICALL_PP_V: {
- void (*func)(gpointer,gpointer) = ptr;
- sp -= 2;
- func (sp [0].data.p, sp [1].data.p);
- break;
- }
- case MINT_ICALL_PI_V: {
- void (*func)(gpointer,int) = ptr;
- sp -= 2;
- func (sp [0].data.p, sp [1].data.i);
- break;
- }
- case MINT_ICALL_PP_P: {
- gpointer (*func)(gpointer,gpointer) = ptr;
- --sp;
- sp [-1].data.p = func (sp [-1].data.p, sp [0].data.p);
- break;
- }
- case MINT_ICALL_PI_P: {
- gpointer (*func)(gpointer,int) = ptr;
- --sp;
- sp [-1].data.p = func (sp [-1].data.p, sp [0].data.i);
- break;
- }
- case MINT_ICALL_PPP_V: {
- void (*func)(gpointer,gpointer,gpointer) = ptr;
- sp -= 3;
- func (sp [0].data.p, sp [1].data.p, sp [2].data.p);
- break;
- }
- case MINT_ICALL_PPI_V: {
- void (*func)(gpointer,gpointer,int) = ptr;
- sp -= 3;
- func (sp [0].data.p, sp [1].data.p, sp [2].data.i);
- break;
- }
- default:
- g_assert_not_reached ();
- }
-
- context->env_frame = old_env_frame;
- context->current_env = old_env;
-
- return sp;
-}
-
-static CRITICAL_SECTION create_method_pointer_mutex;
-
-static MonoGHashTable *method_pointer_hash = NULL;
-
-static void *
-mono_create_method_pointer (MonoMethod *method)
-{
- gpointer addr;
- MonoJitInfo *ji;
-
- EnterCriticalSection (&create_method_pointer_mutex);
- if (!method_pointer_hash) {
- MONO_GC_REGISTER_ROOT (method_pointer_hash);
- method_pointer_hash = mono_g_hash_table_new (NULL, NULL);
- }
- addr = mono_g_hash_table_lookup (method_pointer_hash, method);
- if (addr) {
- LeaveCriticalSection (&create_method_pointer_mutex);
- return addr;
- }
-
- /*
- * If it is a static P/Invoke method, we can just return the pointer
- * to the method implementation.
- */
- if (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL && ((MonoMethodPInvoke*) method)->addr) {
- ji = g_new0 (MonoJitInfo, 1);
- ji->method = method;
- ji->code_size = 1;
- ji->code_start = addr = ((MonoMethodPInvoke*) method)->addr;
-
- mono_jit_info_table_add (mono_get_root_domain (), ji);
- }
- else
- addr = mono_arch_create_method_pointer (method);
-
- mono_g_hash_table_insert (method_pointer_hash, method, addr);
- LeaveCriticalSection (&create_method_pointer_mutex);
-
- return addr;
-}
-
-#if COUNT_OPS
-static int opcode_counts[512];
-
-#define COUNT_OP(op) opcode_counts[op]++
-#else
-#define COUNT_OP(op)
-#endif
-
-#if DEBUG_INTERP
-#define DUMP_INSTR() \
- if (tracing > 1) { \
- char *ins; \
- if (sp > frame->stack) { \
- ins = dump_stack (frame->stack, sp); \
- } else { \
- ins = g_strdup (""); \
- } \
- sp->data.l = 0; \
- output_indent (); \
- g_print ("(%u) ", GetCurrentThreadId()); \
- mono_interp_dis_mintop(rtm->code, ip); \
- g_print ("\t%d:%s\n", vt_sp - vtalloc, ins); \
- g_free (ins); \
- }
-#else
-#define DUMP_INSTR()
-#endif
-
-#ifdef __GNUC__
-#define USE_COMPUTED_GOTO 1
-#endif
-#if USE_COMPUTED_GOTO
-#define MINT_IN_SWITCH(op) COUNT_OP(op); goto *in_labels[op];
-#define MINT_IN_CASE(x) LAB_ ## x:
-#if DEBUG_INTERP
-#define MINT_IN_BREAK if (tracing > 1) goto main_loop; else { COUNT_OP(*ip); goto *in_labels[*ip]; }
-#else
-#define MINT_IN_BREAK { COUNT_OP(*ip); goto *in_labels[*ip]; }
-#endif
-#define MINT_IN_DEFAULT mint_default: if (0) goto mint_default; /* make gcc shut up */
-#else
-#define MINT_IN_SWITCH(op) switch (op)
-#define MINT_IN_CASE(x) case x:
-#define MINT_IN_BREAK break
-#define MINT_IN_DEFAULT default:
-#endif
-
-/*
- * Defining this causes register allocation errors in some versions of gcc:
- * error: unable to find a register to spill in class `SIREG'
- */
-/* #define MINT_USE_DEDICATED_IP_REG */
-
-static void
-ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
-{
- MonoInvocation child_frame;
- GSList *finally_ips = NULL;
- const unsigned short *endfinally_ip = NULL;
-#if defined(__GNUC__) && defined (i386) && defined (MINT_USE_DEDICATED_IP_REG)
- register const unsigned short *ip asm ("%esi");
-#else
- register const unsigned short *ip;
-#endif
- register stackval *sp;
- RuntimeMethod *rtm;
-#if DEBUG_INTERP
- gint tracing = global_tracing;
- unsigned char *vtalloc;
-#endif
- int i32;
- unsigned char *vt_sp;
- char *locals;
- MonoObject *o = NULL;
- MonoClass *c;
-#if USE_COMPUTED_GOTO
- static void *in_labels[] = {
-#define OPDEF(a,b,c,d) \
- &&LAB_ ## a,
-#include "mintops.def"
- 0 };
-#endif
-
- frame->ex = NULL;
- frame->ex_handler = NULL;
- frame->ip = NULL;
- context->current_frame = frame;
-
- DEBUG_ENTER ();
-
- if (!frame->runtime_method->transformed) {
- context->managed_code = 0;
- frame->ex = mono_interp_transform_method (frame->runtime_method, context);
- context->managed_code = 1;
- if (frame->ex) {
- rtm = NULL;
- ip = NULL;
- goto exit_frame;
- }
- }
-
- rtm = frame->runtime_method;
- frame->args = alloca (rtm->alloca_size);
- sp = frame->stack = (stackval *)((char *)frame->args + rtm->args_size);
-#if DEBUG_INTERP
- if (tracing > 1)
- memset(sp, 0, rtm->stack_size);
-#endif
- vt_sp = (char *)sp + rtm->stack_size;
-#if DEBUG_INTERP
- vtalloc = vt_sp;
-#endif
- locals = vt_sp + rtm->vt_stack_size;
-
- child_frame.parent = frame;
-
- /* ready to go */
- ip = rtm->code;
-
- /*
- * using while (ip < end) may result in a 15% performance drop,
- * but it may be useful for debug
- */
- while (1) {
- main_loop:
- /* g_assert (sp >= frame->stack); */
- /* g_assert(vt_sp - vtalloc <= rtm->vt_stack_size); */
- DUMP_INSTR();
- MINT_IN_SWITCH (*ip) {
- MINT_IN_CASE(MINT_INITLOCALS)
- memset (locals, 0, rtm->locals_size);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NOP)
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BREAK)
- ++ip;
- G_BREAKPOINT (); /* this is not portable... */
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDNULL)
- sp->data.p = NULL;
- ++ip;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_VTRESULT) {
- int ret_size = * (guint16 *)(ip + 1);
- char *ret_vt_sp = vt_sp;
- vt_sp -= READ32(ip + 2);
- if (ret_size > 0) {
- memmove (vt_sp, ret_vt_sp, ret_size);
- vt_sp += (ret_size + 7) & ~7;
- }
- ip += 4;
- MINT_IN_BREAK;
- }
-#define LDC(n) do { sp->data.i = (n); ++ip; ++sp; } while (0)
- MINT_IN_CASE(MINT_LDC_I4_M1)
- LDC(-1);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_0)
- LDC(0);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_1)
- LDC(1);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_2)
- LDC(2);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_3)
- LDC(3);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_4)
- LDC(4);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_5)
- LDC(5);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_6)
- LDC(6);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_7)
- LDC(7);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_8)
- LDC(8);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4_S)
- sp->data.i = *(const short *)(ip + 1);
- ip += 2;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I4)
- ++ip;
- sp->data.i = READ32 (ip);
- ip += 2;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_I8)
- ++ip;
- sp->data.l = READ64 (ip);
- ip += 4;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDC_R4) {
- guint32 val;
- ++ip;
- val = READ32(ip);
- sp->data.f = * (float *)&val;
- ip += 2;
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDC_R8)
- sp->data.l = READ64 (ip + 1); /* note union usage */
- ip += 5;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_DUP)
- sp [0] = sp[-1];
- ++sp;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_DUP_VT)
- i32 = READ32 (ip + 1);
- sp->data.p = vt_sp;
- memcpy(sp->data.p, sp [-1].data.p, i32);
- vt_sp += (i32 + 7) & ~7;
- ++sp;
- ip += 3;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_POP)
- ++ip;
- --sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_JMP) {
- RuntimeMethod *new_method = rtm->data_items [* (guint16 *)(ip + 1)];
- if (!new_method->transformed) {
- frame->ip = ip;
- frame->ex = mono_interp_transform_method (new_method, context);
- if (frame->ex)
- goto exit_frame;
- }
- ip += 2;
- if (new_method->alloca_size > rtm->alloca_size)
- g_error ("MINT_JMP to method which needs more stack space (%d > %d)", new_method->alloca_size, rtm->alloca_size);
- rtm = frame->runtime_method = new_method;
- vt_sp = (char *)sp + rtm->stack_size;
-#if DEBUG_INTERP
- vtalloc = vt_sp;
-#endif
- locals = vt_sp + rtm->vt_stack_size;
- ip = rtm->new_body_start; /* bypass storing input args from callers frame */
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CALLI) {
- MonoMethodSignature *csignature;
- stackval *endsp = sp;
-
- frame->ip = ip;
-
- csignature = rtm->data_items [* (guint16 *)(ip + 1)];
- ip += 2;
- --sp;
- --endsp;
- child_frame.runtime_method = sp->data.p;
-
- sp->data.p = vt_sp;
- child_frame.retval = sp;
- /* decrement by the actual number of args */
- sp -= csignature->param_count;
- child_frame.stack_args = sp;
- if (csignature->hasthis) {
- --sp;
- child_frame.obj = sp->data.p;
- } else {
- child_frame.obj = NULL;
- }
- if (csignature->hasthis &&
- ((MonoObject *)child_frame.obj)->vtable->klass == mono_defaults.transparent_proxy_class) {
- child_frame.runtime_method = mono_interp_get_runtime_method (
- mono_marshal_get_remoting_invoke (child_frame.runtime_method->method));
- } else if (child_frame.runtime_method->method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)
- child_frame.runtime_method = mono_interp_get_runtime_method (
- mono_marshal_get_native_wrapper (child_frame.runtime_method->method));
-
- ves_exec_method_with_context (&child_frame, context);
-
- context->current_frame = frame;
-
- if (child_frame.ex) {
- /*
- * An exception occurred, need to run finally, fault and catch handlers..
- */
- frame->ex = child_frame.ex;
- goto handle_finally;
- }
-
- /* need to handle typedbyref ... */
- if (csignature->ret->type != MONO_TYPE_VOID) {
- *sp = *endsp;
- sp++;
- }
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CALLI_NAT) {
- MonoMethodSignature *csignature;
- stackval *endsp = sp;
- unsigned char *code = NULL;
-
- frame->ip = ip;
-
- csignature = rtm->data_items [* (guint16 *)(ip + 1)];
- ip += 2;
- --sp;
- --endsp;
- code = sp->data.p;
- child_frame.runtime_method = NULL;
-
- sp->data.p = vt_sp;
- child_frame.retval = sp;
- /* decrement by the actual number of args */
- sp -= csignature->param_count;
- child_frame.stack_args = sp;
- if (csignature->hasthis) {
- --sp;
- child_frame.obj = sp->data.p;
- } else {
- child_frame.obj = NULL;
- }
- ves_pinvoke_method (&child_frame, csignature, (MonoFunc) code, FALSE, context);
-
- context->current_frame = frame;
-
- if (child_frame.ex) {
- /*
- * An exception occurred, need to run finally, fault and catch handlers..
- */
- frame->ex = child_frame.ex;
- if (context->search_for_handler) {
- context->search_for_handler = 0;
- goto handle_exception;
- }
- goto handle_finally;
- }
-
- /* need to handle typedbyref ... */
- if (csignature->ret->type != MONO_TYPE_VOID) {
- *sp = *endsp;
- sp++;
- }
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CALL) {
- stackval *endsp = sp;
-
- frame->ip = ip;
-
- child_frame.runtime_method = rtm->data_items [* (guint16 *)(ip + 1)];
- ip += 2;
- sp->data.p = vt_sp;
- child_frame.retval = sp;
- /* decrement by the actual number of args */
- sp -= child_frame.runtime_method->param_count;
- child_frame.stack_args = sp;
- if (child_frame.runtime_method->hasthis) {
- --sp;
- child_frame.obj = sp->data.p;
- } else {
- child_frame.obj = NULL;
- }
- if (child_frame.runtime_method->hasthis && !child_frame.runtime_method->valuetype &&
- ((MonoObject *)child_frame.obj)->vtable->klass == mono_defaults.transparent_proxy_class) {
- child_frame.runtime_method = mono_interp_get_runtime_method (
- mono_marshal_get_remoting_invoke (child_frame.runtime_method->method));
- }
- ves_exec_method_with_context (&child_frame, context);
-
- context->current_frame = frame;
-
- if (child_frame.ex) {
- /*
- * An exception occurred, need to run finally, fault and catch handlers..
- */
- frame->ex = child_frame.ex;
- goto handle_finally;
- }
-
- /* need to handle typedbyref ... */
- *sp = *endsp;
- sp++;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_VCALL) {
- frame->ip = ip;
-
- child_frame.runtime_method = rtm->data_items [* (guint16 *)(ip + 1)];
- ip += 2;
-
- sp->data.p = vt_sp;
- child_frame.retval = sp;
- /* decrement by the actual number of args */
- sp -= child_frame.runtime_method->param_count;
- child_frame.stack_args = sp;
- if (child_frame.runtime_method->hasthis) {
- --sp;
- child_frame.obj = sp->data.p;
- } else {
- child_frame.obj = NULL;
- }
-
- if (child_frame.runtime_method->hasthis && !child_frame.runtime_method->valuetype &&
- ((MonoObject *)child_frame.obj)->vtable->klass == mono_defaults.transparent_proxy_class) {
- child_frame.runtime_method = mono_interp_get_runtime_method (
- mono_marshal_get_remoting_invoke (child_frame.runtime_method->method));
- }
-
- ves_exec_method_with_context (&child_frame, context);
-
- context->current_frame = frame;
-
- if (child_frame.ex) {
- /*
- * An exception occurred, need to run finally, fault and catch handlers..
- */
- frame->ex = child_frame.ex;
- goto handle_finally;
- }
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CALLVIRT) {
- stackval *endsp = sp;
- MonoObject *this_arg;
- guint32 token;
-
- frame->ip = ip;
-
- token = * (unsigned short *)(ip + 1);
- ip += 2;
- child_frame.runtime_method = rtm->data_items [token];
- sp->data.p = vt_sp;
- child_frame.retval = sp;
-
- /* decrement by the actual number of args */
- sp -= child_frame.runtime_method->param_count;
- child_frame.stack_args = sp;
- --sp;
- child_frame.obj = this_arg = sp->data.p;
- if (!this_arg)
- THROW_EX (mono_get_exception_null_reference(), ip - 2);
- child_frame.runtime_method = get_virtual_method (child_frame.runtime_method, this_arg);
-
- if (this_arg->vtable->klass->valuetype && child_frame.runtime_method->valuetype) {
- child_frame.obj = (char *)this_arg + sizeof(MonoObject);
- }
-
- ves_exec_method_with_context (&child_frame, context);
-
- context->current_frame = frame;
-
- if (child_frame.ex) {
- /*
- * An exception occurred, need to run finally, fault and catch handlers..
- */
- frame->ex = child_frame.ex;
- if (context->search_for_handler) {
- context->search_for_handler = 0;
- goto handle_exception;
- }
- goto handle_finally;
- }
-
- /* need to handle typedbyref ... */
- *sp = *endsp;
- sp++;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_VCALLVIRT) {
- MonoObject *this_arg;
- guint32 token;
-
- frame->ip = ip;
-
- token = * (unsigned short *)(ip + 1);
- ip += 2;
- child_frame.runtime_method = rtm->data_items [token];
- sp->data.p = vt_sp;
- child_frame.retval = sp;
-
- /* decrement by the actual number of args */
- sp -= child_frame.runtime_method->param_count;
- child_frame.stack_args = sp;
- --sp;
- child_frame.obj = this_arg = sp->data.p;
- if (!this_arg)
- THROW_EX (mono_get_exception_null_reference(), ip - 2);
- child_frame.runtime_method = get_virtual_method (child_frame.runtime_method, this_arg);
-
- if (this_arg->vtable->klass->valuetype && child_frame.runtime_method->valuetype) {
- child_frame.obj = (char *)this_arg + sizeof(MonoObject);
- }
-
- ves_exec_method_with_context (&child_frame, context);
-
- context->current_frame = frame;
-
- if (child_frame.ex) {
- /*
- * An exception occurred, need to run finally, fault and catch handlers..
- */
- frame->ex = child_frame.ex;
- if (context->search_for_handler) {
- context->search_for_handler = 0;
- goto handle_exception;
- }
- goto handle_finally;
- }
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CALLINT)
- ves_pinvoke_method (frame, mono_method_signature (frame->runtime_method->method), ((MonoMethodPInvoke*) frame->runtime_method->method)->addr,
- frame->runtime_method->method->string_ctor, context);
- if (frame->ex) {
- rtm = NULL;
- goto handle_exception;
- }
- goto exit_frame;
- MINT_IN_CASE(MINT_CALLRUN)
- ves_runtime_method (frame, context);
- if (frame->ex) {
- rtm = NULL;
- goto handle_exception;
- }
- goto exit_frame;
- MINT_IN_CASE(MINT_RET)
- --sp;
- *frame->retval = *sp;
- if (sp > frame->stack)
- g_warning ("ret: more values on stack: %d", sp-frame->stack);
- goto exit_frame;
- MINT_IN_CASE(MINT_RET_VOID)
- if (sp > frame->stack)
- g_warning ("ret.void: more values on stack: %d", sp-frame->stack);
- goto exit_frame;
- MINT_IN_CASE(MINT_RET_VT)
- i32 = READ32(ip + 1);
- --sp;
- memcpy(frame->retval->data.p, sp->data.p, i32);
- if (sp > frame->stack)
- g_warning ("ret.vt: more values on stack: %d", sp-frame->stack);
- goto exit_frame;
- MINT_IN_CASE(MINT_BR_S)
- ip += (short) *(ip + 1);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BR)
- ip += (gint32) READ32(ip + 1);
- MINT_IN_BREAK;
-#define ZEROP_S(datamem, op) \
- --sp; \
- if (sp->data.datamem op 0) \
- ip += * (gint16 *)(ip + 1); \
- else \
- ip += 2;
-
-#define ZEROP(datamem, op) \
- --sp; \
- if (sp->data.datamem op 0) \
- ip += READ32(ip + 1); \
- else \
- ip += 3;
-
- MINT_IN_CASE(MINT_BRFALSE_I4_S)
- ZEROP_S(i, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRFALSE_I8_S)
- ZEROP_S(l, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRFALSE_R8_S)
- ZEROP_S(f, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRFALSE_I4)
- ZEROP(i, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRFALSE_I8)
- ZEROP(l, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRFALSE_R8)
- ZEROP_S(f, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRTRUE_I4_S)
- ZEROP_S(i, !=);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRTRUE_I8_S)
- ZEROP_S(l, !=);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRTRUE_R8_S)
- ZEROP_S(f, !=);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRTRUE_I4)
- ZEROP(i, !=);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRTRUE_I8)
- ZEROP(l, !=);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BRTRUE_R8)
- ZEROP(f, !=);
- MINT_IN_BREAK;
-#define CONDBR_S(cond) \
- sp -= 2; \
- if (cond) \
- ip += * (gint16 *)(ip + 1); \
- else \
- ip += 2;
-#define BRELOP_S(datamem, op) \
- CONDBR_S(sp[0].data.datamem op sp[1].data.datamem)
-
-#define CONDBR(cond) \
- sp -= 2; \
- if (cond) \
- ip += READ32(ip + 1); \
- else \
- ip += 3;
-
-#define BRELOP(datamem, op) \
- CONDBR(sp[0].data.datamem op sp[1].data.datamem)
-
- MINT_IN_CASE(MINT_BEQ_I4_S)
- BRELOP_S(i, ==)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BEQ_I8_S)
- BRELOP_S(l, ==)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BEQ_R8_S)
- CONDBR_S(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f == sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BEQ_I4)
- BRELOP(i, ==)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BEQ_I8)
- BRELOP(l, ==)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BEQ_R8)
- CONDBR(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f == sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_I4_S)
- BRELOP_S(i, >=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_I8_S)
- BRELOP_S(l, >=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_R8_S)
- CONDBR_S(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f >= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_I4)
- BRELOP(i, >=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_I8)
- BRELOP(l, >=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_R8)
- CONDBR(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f >= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_I4_S)
- BRELOP_S(i, >)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_I8_S)
- BRELOP_S(l, >)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_R8_S)
- CONDBR_S(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f > sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_I4)
- BRELOP(i, >)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_I8)
- BRELOP(l, >)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_R8)
- CONDBR(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f > sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_I4_S)
- BRELOP_S(i, <)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_I8_S)
- BRELOP_S(l, <)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_R8_S)
- CONDBR_S(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f < sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_I4)
- BRELOP(i, <)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_I8)
- BRELOP(l, <)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_R8)
- CONDBR(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f < sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_I4_S)
- BRELOP_S(i, <=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_I8_S)
- BRELOP_S(l, <=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_R8_S)
- CONDBR_S(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f <= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_I4)
- BRELOP(i, <=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_I8)
- BRELOP(l, <=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_R8)
- CONDBR(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f <= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BNE_UN_I4_S)
- BRELOP_S(i, !=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BNE_UN_I8_S)
- BRELOP_S(l, !=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BNE_UN_R8_S)
- CONDBR_S(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f != sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BNE_UN_I4)
- BRELOP(i, !=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BNE_UN_I8)
- BRELOP(l, !=)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BNE_UN_R8)
- CONDBR(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f != sp[1].data.f)
- MINT_IN_BREAK;
-
-#define BRELOP_S_CAST(datamem, op, type) \
- sp -= 2; \
- if ((type) sp[0].data.datamem op (type) sp[1].data.datamem) \
- ip += * (gint16 *)(ip + 1); \
- else \
- ip += 2;
-
-#define BRELOP_CAST(datamem, op, type) \
- sp -= 2; \
- if ((type) sp[0].data.datamem op (type) sp[1].data.datamem) \
- ip += READ32(ip + 1); \
- else \
- ip += 3;
-
- MINT_IN_CASE(MINT_BGE_UN_I4_S)
- BRELOP_S_CAST(i, >=, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_UN_I8_S)
- BRELOP_S_CAST(l, >=, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_UN_R8_S)
- CONDBR_S(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f >= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_UN_I4)
- BRELOP_CAST(i, >=, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_UN_I8)
- BRELOP_CAST(l, >=, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGE_UN_R8)
- CONDBR(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f >= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_UN_I4_S)
- BRELOP_S_CAST(i, >, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_UN_I8_S)
- BRELOP_S_CAST(l, >, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_UN_R8_S)
- CONDBR_S(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f > sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_UN_I4)
- BRELOP_CAST(i, >, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_UN_I8)
- BRELOP_CAST(l, >, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BGT_UN_R8)
- CONDBR(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f > sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_UN_I4_S)
- BRELOP_S_CAST(i, <=, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_UN_I8_S)
- BRELOP_S_CAST(l, <=, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_UN_R8_S)
- CONDBR_S(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f <= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_UN_I4)
- BRELOP_CAST(i, <=, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_UN_I8)
- BRELOP_CAST(l, <=, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLE_UN_R8)
- CONDBR(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f <= sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_UN_I4_S)
- BRELOP_S_CAST(i, <, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_UN_I8_S)
- BRELOP_S_CAST(l, <, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_UN_R8_S)
- CONDBR_S(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f < sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_UN_I4)
- BRELOP_CAST(i, <, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_UN_I8)
- BRELOP_CAST(l, <, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BLT_UN_R8)
- CONDBR(isunordered (sp [0].data.f, sp [1].data.f) || sp[0].data.f < sp[1].data.f)
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SWITCH) {
- guint32 n;
- const unsigned short *st;
- ++ip;
- n = READ32 (ip);
- ip += 2;
- st = ip + 2 * n;
- --sp;
- if ((guint32)sp->data.i < n) {
- gint offset;
- ip += 2 * (guint32)sp->data.i;
- offset = READ32 (ip);
- ip = st + offset;
- } else {
- ip = st;
- }
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDIND_I1)
- ++ip;
- sp[-1].data.i = *(gint8*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_U1)
- ++ip;
- sp[-1].data.i = *(guint8*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_I2)
- ++ip;
- sp[-1].data.i = *(gint16*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_U2)
- ++ip;
- sp[-1].data.i = *(guint16*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_I4) /* Fall through */
- MINT_IN_CASE(MINT_LDIND_U4)
- ++ip;
- sp[-1].data.i = *(gint32*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_I8)
- ++ip;
- sp[-1].data.l = *(gint64*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_I)
- ++ip;
- sp[-1].data.p = *(gpointer*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_R4)
- ++ip;
- sp[-1].data.f = *(gfloat*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_R8)
- ++ip;
- sp[-1].data.f = *(gdouble*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDIND_REF)
- ++ip;
- sp[-1].data.p = *(gpointer*)sp[-1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_REF)
- ++ip;
- sp -= 2;
- * (gpointer *) sp->data.p = sp[1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_I1)
- ++ip;
- sp -= 2;
- * (gint8 *) sp->data.p = (gint8)sp[1].data.i;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_I2)
- ++ip;
- sp -= 2;
- * (gint16 *) sp->data.p = (gint16)sp[1].data.i;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_I4)
- ++ip;
- sp -= 2;
- * (gint32 *) sp->data.p = sp[1].data.i;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_I)
- ++ip;
- sp -= 2;
- * (mono_i *) sp->data.p = (mono_i)sp[1].data.p;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_I8)
- ++ip;
- sp -= 2;
- * (gint64 *) sp->data.p = sp[1].data.l;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_R4)
- ++ip;
- sp -= 2;
- * (float *) sp->data.p = (gfloat)sp[1].data.f;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STIND_R8)
- ++ip;
- sp -= 2;
- * (double *) sp->data.p = sp[1].data.f;
- MINT_IN_BREAK;
-#define BINOP(datamem, op) \
- --sp; \
- sp [-1].data.datamem = sp [-1].data.datamem op sp [0].data.datamem; \
- ++ip;
- MINT_IN_CASE(MINT_ADD_I4)
- BINOP(i, +);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ADD_I8)
- BINOP(l, +);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ADD_R8)
- BINOP(f, +);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ADD1_I4)
- ++sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB_I4)
- BINOP(i, -);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB_I8)
- BINOP(l, -);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB_R8)
- BINOP(f, -);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB1_I4)
- --sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MUL_I4)
- BINOP(i, *);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MUL_I8)
- BINOP(l, *);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MUL_R8)
- BINOP(f, *);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_DIV_I4)
- if (sp [-1].data.i == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP(i, /);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_DIV_I8)
- if (sp [-1].data.l == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP(l, /);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_DIV_R8)
- BINOP(f, /);
- MINT_IN_BREAK;
-
-#define BINOP_CAST(datamem, op, type) \
- --sp; \
- sp [-1].data.datamem = (type)sp [-1].data.datamem op (type)sp [0].data.datamem; \
- ++ip;
- MINT_IN_CASE(MINT_DIV_UN_I4)
- if (sp [-1].data.i == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP_CAST(i, /, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_DIV_UN_I8)
- if (sp [-1].data.l == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP_CAST(l, /, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_REM_I4)
- if (sp [-1].data.i == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP(i, %);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_REM_I8)
- if (sp [-1].data.l == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP(l, %);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_REM_R8)
- /* FIXME: what do we actually do here? */
- --sp;
- sp [-1].data.f = fmod (sp [-1].data.f, sp [0].data.f);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_REM_UN_I4)
- if (sp [-1].data.i == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP_CAST(i, %, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_REM_UN_I8)
- if (sp [-1].data.l == 0)
- THROW_EX (mono_get_exception_divide_by_zero (), ip);
- BINOP_CAST(l, %, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_AND_I4)
- BINOP(i, &);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_AND_I8)
- BINOP(l, &);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_OR_I4)
- BINOP(i, |);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_OR_I8)
- BINOP(l, |);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_XOR_I4)
- BINOP(i, ^);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_XOR_I8)
- BINOP(l, ^);
- MINT_IN_BREAK;
-
-#define SHIFTOP(datamem, op) \
- --sp; \
- sp [-1].data.datamem = sp [-1].data.datamem op sp [0].data.i; \
- ++ip;
-
- MINT_IN_CASE(MINT_SHL_I4)
- SHIFTOP(i, <<);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SHL_I8)
- SHIFTOP(l, <<);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SHR_I4)
- SHIFTOP(i, >>);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SHR_I8)
- SHIFTOP(l, >>);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SHR_UN_I4)
- --sp;
- sp [-1].data.i = (guint32)sp [-1].data.i >> sp [0].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SHR_UN_I8)
- --sp;
- sp [-1].data.l = (guint64)sp [-1].data.l >> sp [0].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NEG_I4)
- sp [-1].data.i = - sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NEG_I8)
- sp [-1].data.l = - sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NEG_R8)
- sp [-1].data.f = - sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NOT_I4)
- sp [-1].data.i = ~ sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NOT_I8)
- sp [-1].data.l = ~ sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I1_I4)
- sp [-1].data.i = (gint8)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I1_I8)
- sp [-1].data.i = (gint8)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I1_R8)
- sp [-1].data.i = (gint8)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U1_I4)
- sp [-1].data.i = (guint8)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U1_I8)
- sp [-1].data.i = (guint8)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U1_R8)
- sp [-1].data.i = (guint8)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I2_I4)
- sp [-1].data.i = (gint16)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I2_I8)
- sp [-1].data.i = (gint16)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I2_R8)
- sp [-1].data.i = (gint16)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U2_I4)
- sp [-1].data.i = (guint16)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U2_I8)
- sp [-1].data.i = (guint16)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U2_R8)
- sp [-1].data.i = (guint16)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I4_R8)
- sp [-1].data.i = (gint32)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U4_I8)
- MINT_IN_CASE(MINT_CONV_I4_I8)
- sp [-1].data.i = (gint32)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I4_I8_SP)
- sp [-2].data.i = (gint32)sp [-2].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U4_R8)
- sp [-1].data.i = (guint32)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I8_I4)
- sp [-1].data.l = sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I8_I4_SP)
- sp [-2].data.l = sp [-2].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I8_U4)
- sp [-1].data.l = (guint32)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_I8_R8)
- sp [-1].data.l = (gint64)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_R4_I4)
- sp [-1].data.f = (float)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_R4_I8)
- sp [-1].data.f = (float)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_R4_R8)
- sp [-1].data.f = (float)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_R8_I4)
- sp [-1].data.f = (double)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_R8_I8)
- sp [-1].data.f = (double)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U8_I4)
- sp [-1].data.l = sp [-1].data.i & 0xffffffff;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_U8_R8)
- sp [-1].data.l = (guint64)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
-#if 0
- MINT_IN_CASE(MINT_CPOBJ) {
- MonoClass *vtklass;
- ++ip;
- vtklass = rtm->data_items[READ32 (ip)];
- ip += 2;
- sp -= 2;
- memcpy (sp [0].data.p, sp [1].data.p, mono_class_value_size (vtklass, NULL));
- MINT_IN_BREAK;
- }
-#endif
- MINT_IN_CASE(MINT_LDOBJ) {
- int size;
- void *p;
- c = rtm->data_items[* (guint16 *)(ip + 1)];
- ip += 2;
- if (c->byval_arg.type != MONO_TYPE_VALUETYPE || c->byval_arg.data.klass->enumtype) {
- p = sp [-1].data.p;
- stackval_from_data (&c->byval_arg, &sp [-1], p, FALSE);
- } else {
- size = mono_class_value_size (c, NULL);
- p = sp [-1].data.p;
- sp [-1].data.p = vt_sp;
- memcpy(vt_sp, p, size);
- vt_sp += (size + 7) & ~7;
- }
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDSTR)
- sp->data.p = rtm->data_items [* (guint16 *)(ip + 1)];
- ++sp;
- ip += 2;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NEWOBJ) {
- MonoClass *newobj_class;
- MonoMethodSignature *csig;
- stackval valuetype_this;
- guint32 token;
- stackval retval;
-
- frame->ip = ip;
-
- token = * (guint16 *)(ip + 1);
- ip += 2;
-
- child_frame.runtime_method = rtm->data_items [token];
- csig = mono_method_signature (child_frame.runtime_method->method);
- newobj_class = child_frame.runtime_method->method->klass;
- /*if (profiling_classes) {
- guint count = GPOINTER_TO_UINT (g_hash_table_lookup (profiling_classes, newobj_class));
- count++;
- g_hash_table_insert (profiling_classes, newobj_class, GUINT_TO_POINTER (count));
- }*/
-
-
- if (newobj_class->parent == mono_defaults.array_class) {
- sp -= csig->param_count;
- o = ves_array_create (context->domain, newobj_class, csig, sp);
- goto array_constructed;
- }
-
- /*
- * First arg is the object.
- */
- if (newobj_class->valuetype) {
- if (!newobj_class->enumtype && (newobj_class->byval_arg.type == MONO_TYPE_VALUETYPE)) {
- child_frame.obj = vt_sp;
- valuetype_this.data.p = vt_sp;
- } else {
- memset (&valuetype_this, 0, sizeof (stackval));
- child_frame.obj = &valuetype_this;
- }
- } else {
- if (newobj_class != mono_defaults.string_class) {
- context->managed_code = 0;
- o = mono_object_new (context->domain, newobj_class);
- context->managed_code = 1;
- if (*abort_requested)
- mono_thread_interruption_checkpoint ();
- child_frame.obj = o;
- } else {
- child_frame.retval = &retval;
- }
- }
-
- if (csig->param_count) {
- sp -= csig->param_count;
- child_frame.stack_args = sp;
- } else {
- child_frame.stack_args = NULL;
- }
-
- g_assert (csig->call_convention == MONO_CALL_DEFAULT);
-
- child_frame.ip = NULL;
- child_frame.ex = NULL;
-
- ves_exec_method_with_context (&child_frame, context);
-
- context->current_frame = frame;
-
- if (child_frame.ex) {
- /*
- * An exception occurred, need to run finally, fault and catch handlers..
- */
- frame->ex = child_frame.ex;
- goto handle_finally;
- }
- /*
- * a constructor returns void, but we need to return the object we created
- */
-array_constructed:
- if (newobj_class->valuetype && !newobj_class->enumtype) {
- *sp = valuetype_this;
- } else if (newobj_class == mono_defaults.string_class) {
- *sp = retval;
- } else {
- sp->data.p = o;
- }
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CASTCLASS)
- c = rtm->data_items [*(guint16 *)(ip + 1)];
- if ((o = sp [-1].data.p)) {
- if (c->marshalbyref) {
- if (!mono_object_isinst_mbyref (o, c))
- THROW_EX (mono_get_exception_invalid_cast (), ip);
- } else {
- MonoVTable *vt = o->vtable;
- MonoClass *oklass = vt->klass;
- if (c->flags & TYPE_ATTRIBUTE_INTERFACE) {
- if (c->interface_id > vt->max_interface_id ||
- vt->interface_offsets [c->interface_id] == 0) {
- THROW_EX (mono_get_exception_invalid_cast (), ip);
- }
- } else if (c->rank) {
- if (!mono_object_isinst (o, c))
- THROW_EX (mono_get_exception_invalid_cast (), ip);
- } else if (!mono_class_has_parent (oklass, c)) {
- THROW_EX (mono_get_exception_invalid_cast (), ip);
- }
- }
- }
- ip += 2;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ISINST)
- c = rtm->data_items [*(guint16 *)(ip + 1)];
- if ((o = sp [-1].data.p)) {
- if (c->marshalbyref) {
- if (!mono_object_isinst_mbyref (o, c))
- sp [-1].data.p = NULL;
- } else {
- MonoVTable *vt = o->vtable;
- MonoClass *oklass = vt->klass;
- if (c->flags & TYPE_ATTRIBUTE_INTERFACE) {
- if (c->interface_id > vt->max_interface_id ||
- vt->interface_offsets [c->interface_id] == 0) {
- sp [-1].data.p = NULL;
- }
- } else if (c->rank) {
- if (!mono_object_isinst (o, c))
- sp [-1].data.p = NULL;
- } else if (!mono_class_has_parent (oklass, c)) {
- sp [-1].data.p = NULL;
- }
- }
- }
- ip += 2;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_R_UN_I4)
- sp [-1].data.f = (double)(guint32)sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_R_UN_I8)
- sp [-1].data.f = (double)(guint64)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_UNBOX)
- c = rtm->data_items[*(guint16 *)(ip + 1)];
-
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference(), ip);
-
- if (!(mono_object_isinst (o, c) ||
- ((o->vtable->klass->rank == 0) &&
- (o->vtable->klass->element_class == c->element_class))))
- THROW_EX (mono_get_exception_invalid_cast (), ip);
-
- sp [-1].data.p = (char *)o + sizeof (MonoObject);
- ip += 2;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_THROW)
- --sp;
- frame->ex_handler = NULL;
- if (!sp->data.p)
- sp->data.p = mono_get_exception_null_reference ();
- THROW_EX ((MonoException *)sp->data.p, ip);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLDA)
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- sp[-1].data.p = (char *)o + * (guint16 *)(ip + 1);
- ip += 2;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CKNULL)
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- ++ip;
- MINT_IN_BREAK;
-
-#define LDFLD(datamem, fieldtype) \
- o = sp [-1].data.p; \
- if (!o) \
- THROW_EX (mono_get_exception_null_reference (), ip); \
- sp[-1].data.datamem = * (fieldtype *)((char *)o + * (guint16 *)(ip + 1)) ; \
- ip += 2;
-
- MINT_IN_CASE(MINT_LDFLD_I1) LDFLD(i, gint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_U1) LDFLD(i, guint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_I2) LDFLD(i, gint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_U2) LDFLD(i, guint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_I4) LDFLD(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_I8) LDFLD(l, gint64); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_R4) LDFLD(f, float); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_R8) LDFLD(f, double); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_O) LDFLD(p, gpointer); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFLD_P) LDFLD(p, gpointer); MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_LDFLD_VT)
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- i32 = READ32(ip + 2);
- sp [-1].data.p = vt_sp;
- memcpy(sp [-1].data.p, (char *)o + * (guint16 *)(ip + 1), i32);
- vt_sp += (i32 + 7) & ~7;
- ip += 4;
- MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_LDRMFLD) {
- gpointer tmp;
- MonoClassField *field;
- char *addr;
-
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- field = rtm->data_items[* (guint16 *)(ip + 1)];
- ip += 2;
- if (o->vtable->klass == mono_defaults.transparent_proxy_class) {
- MonoClass *klass = ((MonoTransparentProxy*)o)->remote_class->proxy_class;
-
- addr = mono_load_remote_field (o, klass, field, &tmp);
- } else {
- addr = (char*)o + field->offset;
- }
-
- stackval_from_data (field->type, &sp [-1], addr, FALSE);
- MINT_IN_BREAK;
- }
-
- MINT_IN_CASE(MINT_LDRMFLD_VT) {
- MonoClassField *field;
- char *addr;
- gpointer tmp;
-
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- field = rtm->data_items[* (guint16 *)(ip + 1)];
- i32 = READ32(ip + 2);
- ip += 4;
- if (o->vtable->klass == mono_defaults.transparent_proxy_class) {
- MonoClass *klass = ((MonoTransparentProxy*)o)->remote_class->proxy_class;
- addr = mono_load_remote_field (o, klass, field, &tmp);
- } else {
- addr = (char*)o + field->offset;
- }
-
- sp [-1].data.p = vt_sp;
- memcpy(sp [-1].data.p, (char *)o + * (guint16 *)(ip + 1), i32);
- vt_sp += (i32 + 7) & ~7;
- memcpy(sp [-1].data.p, addr, i32);
- MINT_IN_BREAK;
- }
-
-#define STFLD(datamem, fieldtype) \
- o = sp [-2].data.p; \
- if (!o) \
- THROW_EX (mono_get_exception_null_reference (), ip); \
- sp -= 2; \
- * (fieldtype *)((char *)o + * (guint16 *)(ip + 1)) = sp[1].data.datamem; \
- ip += 2;
-
- MINT_IN_CASE(MINT_STFLD_I1) STFLD(i, gint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_U1) STFLD(i, guint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_I2) STFLD(i, gint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_U2) STFLD(i, guint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_I4) STFLD(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_I8) STFLD(l, gint64); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_R4) STFLD(f, float); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_R8) STFLD(f, double); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_O) STFLD(p, gpointer); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STFLD_P) STFLD(p, gpointer); MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_STFLD_VT)
- o = sp [-2].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- i32 = READ32(ip + 2);
- sp -= 2;
- memcpy((char *)o + * (guint16 *)(ip + 1), sp [1].data.p, i32);
- vt_sp -= (i32 + 7) & ~7;
- ip += 4;
- MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_STRMFLD) {
- MonoClassField *field;
-
- o = sp [-2].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
-
- field = rtm->data_items[* (guint16 *)(ip + 1)];
- ip += 2;
-
- if (o->vtable->klass == mono_defaults.transparent_proxy_class) {
- MonoClass *klass = ((MonoTransparentProxy*)o)->remote_class->proxy_class;
- mono_store_remote_field (o, klass, field, &sp [-1].data);
- } else
- stackval_to_data (field->type, &sp [-1], (char*)o + field->offset, FALSE);
-
- sp -= 2;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_STRMFLD_VT) {
- MonoClassField *field;
-
- o = sp [-2].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- field = rtm->data_items[* (guint16 *)(ip + 1)];
- i32 = READ32(ip + 2);
- ip += 4;
-
- if (o->vtable->klass == mono_defaults.transparent_proxy_class) {
- MonoClass *klass = ((MonoTransparentProxy*)o)->remote_class->proxy_class;
- mono_store_remote_field (o, klass, field, &sp [-1].data);
- } else
- memcpy((char*)o + field->offset, sp [-1].data.p, i32);
-
- sp -= 2;
- vt_sp -= (i32 + 7) & ~7;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDSFLDA) {
- MonoClassField *field = rtm->data_items[*(guint16 *)(ip + 1)];
- MonoVTable *vt = mono_class_vtable (context->domain, field->parent);
- gpointer addr;
-
- if (!vt->initialized) {
- frame->ip = ip;
- mono_runtime_class_init (vt);
- }
- ip += 2;
-
- if (context->domain->special_static_fields && (addr = g_hash_table_lookup (context->domain->special_static_fields, field)))
- sp->data.p = mono_get_special_static_data (GPOINTER_TO_UINT (addr));
- else
- sp->data.p = (char*)(vt->data) + field->offset;
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDSFLD) {
- MonoVTable *vt;
- MonoClassField *field;
- gpointer addr;
-
- field = rtm->data_items[*(guint16 *)(ip + 1)];
- vt = rtm->data_items [*(guint16 *)(ip + 2)];
- if (!vt->initialized) {
- frame->ip = ip;
- mono_runtime_class_init (vt);
- }
- ip += 3;
- if (context->domain->special_static_fields && (addr = g_hash_table_lookup (context->domain->special_static_fields, field)))
- addr = mono_get_special_static_data (GPOINTER_TO_UINT (addr));
- else
- addr = (char*)(vt->data) + field->offset;
-
- stackval_from_data (field->type, sp, addr, FALSE);
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDSFLD_I4) {
- MonoClassField *field = rtm->data_items[*(guint16 *)(ip + 1)];
- MonoVTable *vt = rtm->data_items [*(guint16 *)(ip + 2)];
- if (!vt->initialized) {
- frame->ip = ip;
- mono_runtime_class_init (vt);
- }
- ip += 3;
- sp->data.i = * (gint32 *)((char*)(vt->data) + field->offset);
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDSFLD_O) {
- MonoClassField *field = rtm->data_items[*(guint16 *)(ip + 1)];
- MonoVTable *vt = rtm->data_items [*(guint16 *)(ip + 2)];
- if (!vt->initialized) {
- frame->ip = ip;
- mono_runtime_class_init (vt);
- }
- ip += 3;
- sp->data.p = * (gpointer *)((char*)(vt->data) + field->offset);
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDSFLD_VT) {
- MonoVTable *vt;
- MonoClassField *field;
- guint32 token;
- gpointer addr;
- int size;
-
- token = * (guint16 *)(ip + 1);
- size = READ32(ip + 2);
- field = rtm->data_items[token];
- ip += 4;
-
- vt = mono_class_vtable (context->domain, field->parent);
- if (!vt->initialized) {
- frame->ip = ip - 2;
- mono_runtime_class_init (vt);
- }
-
- if (context->domain->special_static_fields && (addr = g_hash_table_lookup (context->domain->special_static_fields, field)))
- addr = mono_get_special_static_data (GPOINTER_TO_UINT (addr));
- else
- addr = (char*)(vt->data) + field->offset;
-
- sp->data.p = vt_sp;
- vt_sp += (size + 7) & ~7;
- stackval_from_data (field->type, sp, addr, FALSE);
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_STSFLD) {
- MonoVTable *vt;
- MonoClassField *field;
- guint32 token;
- gpointer addr;
-
- token = * (guint16 *)(ip + 1);
- field = rtm->data_items[token];
- ip += 2;
- --sp;
-
- vt = mono_class_vtable (context->domain, field->parent);
- if (!vt->initialized) {
- frame->ip = ip - 2;
- mono_runtime_class_init (vt);
- }
-
- if (context->domain->special_static_fields && (addr = g_hash_table_lookup (context->domain->special_static_fields, field)))
- addr = mono_get_special_static_data (GPOINTER_TO_UINT (addr));
- else
- addr = (char*)(vt->data) + field->offset;
-
- stackval_to_data (field->type, sp, addr, FALSE);
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_STSFLD_VT) {
- MonoVTable *vt;
- MonoClassField *field;
- guint32 token;
- gpointer addr;
- int size;
-
- token = * (guint16 *)(ip + 1);
- size = READ32(ip + 2);
- field = rtm->data_items[token];
- ip += 4;
-
- vt = mono_class_vtable (context->domain, field->parent);
- if (!vt->initialized) {
- frame->ip = ip - 2;
- mono_runtime_class_init (vt);
- }
-
- if (context->domain->special_static_fields && (addr = g_hash_table_lookup (context->domain->special_static_fields, field)))
- addr = mono_get_special_static_data (GPOINTER_TO_UINT (addr));
- else
- addr = (char*)(vt->data) + field->offset;
- --sp;
- stackval_to_data (field->type, sp, addr, FALSE);
- vt_sp -= (size + 7) & ~7;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_STOBJ_VT) {
- int size;
- c = rtm->data_items[* (guint16 *)(ip + 1)];
- ip += 2;
- size = mono_class_value_size (c, NULL);
- memcpy(sp [-2].data.p, sp [-1].data.p, size);
- vt_sp -= (size + 7) & ~7;
- sp -= 2;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_STOBJ) {
- int size;
- c = rtm->data_items[* (guint16 *)(ip + 1)];
- ip += 2;
- size = mono_class_value_size (c, NULL);
- memcpy(sp [-2].data.p, &sp [-1].data, size);
- sp -= 2;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CONV_OVF_I4_UN_R8)
- if (sp [-1].data.f < 0 || sp [-1].data.f > MYGUINT32_MAX)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (guint32)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U8_I4)
- if (sp [-1].data.i < 0)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.l = sp [-1].data.i;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U8_R8)
- MINT_IN_CASE(MINT_CONV_OVF_I8_UN_R8)
- if (sp [-1].data.f < 0 || sp [-1].data.f > 9223372036854775807LL)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.l = (guint64)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I8_R8)
- if (sp [-1].data.f < MYGINT64_MIN || sp [-1].data.f > MYGINT64_MAX)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.l = (gint64)sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I4_UN_I8)
- if ((mono_u)sp [-1].data.l > MYGUINT32_MAX)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (mono_u)sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_BOX)
- c = rtm->data_items [* (guint16 *)(ip + 1)];
-
- if (c->byval_arg.type == MONO_TYPE_VALUETYPE && !c->enumtype) {
- int size = mono_class_value_size (c, NULL);
- sp [-1].data.p = mono_value_box (context->domain, c, sp [-1].data.p);
- size = (size + 7) & ~7;
- vt_sp -= size;
- }
- else {
- stackval_to_data (&c->byval_arg, &sp [-1], (char*)&sp [-1], FALSE);
- sp [-1].data.p = mono_value_box (context->domain, c, &sp [-1]);
- }
- ip += 2;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_NEWARR)
- sp [-1].data.p = (MonoObject*) mono_array_new (context->domain, rtm->data_items[*(guint16 *)(ip + 1)], sp [-1].data.i);
- ip += 2;
- /*if (profiling_classes) {
- guint count = GPOINTER_TO_UINT (g_hash_table_lookup (profiling_classes, o->vtable->klass));
- count++;
- g_hash_table_insert (profiling_classes, o->vtable->klass, GUINT_TO_POINTER (count));
- }*/
-
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLEN)
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- sp [-1].data.nati = mono_array_length ((MonoArray *)o);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_GETCHR) {
- MonoString *s;
- s = sp [-2].data.p;
- if (!s)
- THROW_EX (mono_get_exception_null_reference (), ip);
- i32 = sp [-1].data.i;
- if (i32 < 0 || i32 >= mono_string_length (s))
- THROW_EX (mono_get_exception_index_out_of_range (), ip);
- --sp;
- sp [-1].data.i = mono_string_chars(s)[i32];
- ++ip;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_STRLEN)
- ++ip;
- sp [-1].data.i = mono_string_length ((MonoString*)sp [-1].data.p);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ARRAY_RANK)
- o = sp [-1].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
- sp [-1].data.i = mono_object_class (sp [-1].data.p)->rank;
- ip++;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDELEMA) {
- guint32 esize;
- mono_u aindex;
-
- /*token = READ32 (ip)*/;
- ip += 2;
- sp -= 2;
-
- o = sp [0].data.p;
-
- aindex = sp [1].data.i;
- if (aindex >= mono_array_length ((MonoArray *) o))
- THROW_EX (mono_get_exception_index_out_of_range (), ip - 2);
-
- /* check the array element corresponds to token */
- esize = mono_array_element_size (((MonoArray *) o)->obj.vtable->klass);
-
- sp->data.p = mono_array_addr_with_size ((MonoArray *) o, esize, aindex);
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDELEM_I1) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_U1) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_I2) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_U2) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_I4) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_U4) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_I8) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_I) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_R4) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_R8) /* fall through */
- MINT_IN_CASE(MINT_LDELEM_REF) {
- MonoArray *o;
- mono_u aindex;
-
- sp -= 2;
-
- o = sp [0].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
-
- aindex = sp [1].data.i;
- if (aindex >= mono_array_length (o))
- THROW_EX (mono_get_exception_index_out_of_range (), ip);
-
- /*
- * FIXME: throw mono_get_exception_array_type_mismatch () if needed
- */
- switch (*ip) {
- case MINT_LDELEM_I1:
- sp [0].data.i = mono_array_get (o, gint8, aindex);
- break;
- case MINT_LDELEM_U1:
- sp [0].data.i = mono_array_get (o, guint8, aindex);
- break;
- case MINT_LDELEM_I2:
- sp [0].data.i = mono_array_get (o, gint16, aindex);
- break;
- case MINT_LDELEM_U2:
- sp [0].data.i = mono_array_get (o, guint16, aindex);
- break;
- case MINT_LDELEM_I:
- sp [0].data.nati = mono_array_get (o, mono_i, aindex);
- break;
- case MINT_LDELEM_I4:
- sp [0].data.i = mono_array_get (o, gint32, aindex);
- break;
- case MINT_LDELEM_U4:
- sp [0].data.i = mono_array_get (o, guint32, aindex);
- break;
- case MINT_LDELEM_I8:
- sp [0].data.l = mono_array_get (o, guint64, aindex);
- break;
- case MINT_LDELEM_R4:
- sp [0].data.f = mono_array_get (o, float, aindex);
- break;
- case MINT_LDELEM_R8:
- sp [0].data.f = mono_array_get (o, double, aindex);
- break;
- case MINT_LDELEM_REF:
- sp [0].data.p = mono_array_get (o, gpointer, aindex);
- break;
- default:
- ves_abort();
- }
-
- ++ip;
- ++sp;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_STELEM_I) /* fall through */
- MINT_IN_CASE(MINT_STELEM_I1) /* fall through */
- MINT_IN_CASE(MINT_STELEM_I2) /* fall through */
- MINT_IN_CASE(MINT_STELEM_I4) /* fall through */
- MINT_IN_CASE(MINT_STELEM_I8) /* fall through */
- MINT_IN_CASE(MINT_STELEM_R4) /* fall through */
- MINT_IN_CASE(MINT_STELEM_R8) /* fall through */
- MINT_IN_CASE(MINT_STELEM_REF) {
- mono_u aindex;
-
- sp -= 3;
-
- o = sp [0].data.p;
- if (!o)
- THROW_EX (mono_get_exception_null_reference (), ip);
-
- aindex = sp [1].data.i;
- if (aindex >= mono_array_length ((MonoArray *)o))
- THROW_EX (mono_get_exception_index_out_of_range (), ip);
-
- switch (*ip) {
- case MINT_STELEM_I:
- mono_array_set ((MonoArray *)o, mono_i, aindex, sp [2].data.nati);
- break;
- case MINT_STELEM_I1:
- mono_array_set ((MonoArray *)o, gint8, aindex, sp [2].data.i);
- break;
- case MINT_STELEM_I2:
- mono_array_set ((MonoArray *)o, gint16, aindex, sp [2].data.i);
- break;
- case MINT_STELEM_I4:
- mono_array_set ((MonoArray *)o, gint32, aindex, sp [2].data.i);
- break;
- case MINT_STELEM_I8:
- mono_array_set ((MonoArray *)o, gint64, aindex, sp [2].data.l);
- break;
- case MINT_STELEM_R4:
- mono_array_set ((MonoArray *)o, float, aindex, sp [2].data.f);
- break;
- case MINT_STELEM_R8:
- mono_array_set ((MonoArray *)o, double, aindex, sp [2].data.f);
- break;
- case MINT_STELEM_REF:
- if (sp [2].data.p && !mono_object_isinst (sp [2].data.p, mono_object_class (o)->element_class))
- THROW_EX (mono_get_exception_array_type_mismatch (), ip);
- mono_array_set ((MonoArray *)o, gpointer, aindex, sp [2].data.p);
- break;
- default:
- ves_abort();
- }
-
- ++ip;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_CONV_OVF_I4_U4)
- if (sp [-1].data.i < 0)
- THROW_EX (mono_get_exception_overflow (), ip);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I4_I8)
- if (sp [-1].data.l < MYGINT32_MIN || sp [-1].data.l > MYGINT32_MAX)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (gint32) sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I4_R8)
- if (sp [-1].data.f < MYGINT32_MIN || sp [-1].data.f > MYGINT32_MAX)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (gint32) sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U4_I4)
- if (sp [-1].data.i < 0)
- THROW_EX (mono_get_exception_overflow (), ip);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U4_I8)
- if (sp [-1].data.l < 0 || sp [-1].data.l > MYGUINT32_MAX)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (guint32) sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U4_R8)
- if (sp [-1].data.f < 0 || sp [-1].data.f > MYGUINT32_MAX)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (guint32) sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I2_I4)
- if (sp [-1].data.i < -32768 || sp [-1].data.i > 32767)
- THROW_EX (mono_get_exception_overflow (), ip);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I2_I8)
- if (sp [-1].data.l < -32768 || sp [-1].data.l > 32767)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (gint16) sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I2_R8)
- if (sp [-1].data.f < -32768 || sp [-1].data.f > 32767)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (gint16) sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U2_I4)
- if (sp [-1].data.i < 0 || sp [-1].data.i > 65535)
- THROW_EX (mono_get_exception_overflow (), ip);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U2_I8)
- if (sp [-1].data.l < 0 || sp [-1].data.l > 65535)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (guint16) sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U2_R8)
- if (sp [-1].data.f < 0 || sp [-1].data.f > 65535)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (guint16) sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I1_I4)
- if (sp [-1].data.i < -128 || sp [-1].data.i > 127)
- THROW_EX (mono_get_exception_overflow (), ip);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I1_I8)
- if (sp [-1].data.l < -128 || sp [-1].data.l > 127)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (gint8) sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_I1_R8)
- if (sp [-1].data.f < -128 || sp [-1].data.f > 127)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (gint8) sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U1_I4)
- if (sp [-1].data.i < 0 || sp [-1].data.i > 255)
- THROW_EX (mono_get_exception_overflow (), ip);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U1_I8)
- if (sp [-1].data.l < 0 || sp [-1].data.l > 255)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (guint8) sp [-1].data.l;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CONV_OVF_U1_R8)
- if (sp [-1].data.f < 0 || sp [-1].data.f > 255)
- THROW_EX (mono_get_exception_overflow (), ip);
- sp [-1].data.i = (guint8) sp [-1].data.f;
- ++ip;
- MINT_IN_BREAK;
-#if 0
- MINT_IN_CASE(MINT_LDELEM)
- MINT_IN_CASE(MINT_STELEM)
- MINT_IN_CASE(MINT_UNBOX_ANY)
-
- MINT_IN_CASE(MINT_REFANYVAL) ves_abort(); MINT_IN_BREAK;
-#endif
- MINT_IN_CASE(MINT_CKFINITE)
- if (!finite(sp [-1].data.f))
- THROW_EX (mono_get_exception_arithmetic (), ip);
- ++ip;
- MINT_IN_BREAK;
-#if 0
- MINT_IN_CASE(MINT_MKREFANY) ves_abort(); MINT_IN_BREAK;
-#endif
- MINT_IN_CASE(MINT_LDTOKEN)
- sp->data.p = vt_sp;
- vt_sp += 8;
- * (gpointer *)sp->data.p = rtm->data_items[*(guint16 *)(ip + 1)];
- ip += 2;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ADD_OVF_I4)
- if (CHECK_ADD_OVERFLOW (sp [-2].data.i, sp [-1].data.i))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP(i, +);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ADD_OVF_I8)
- if (CHECK_ADD_OVERFLOW64 (sp [-2].data.l, sp [-1].data.l))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP(l, +);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ADD_OVF_UN_I4)
- if (CHECK_ADD_OVERFLOW_UN (sp [-2].data.i, sp [-1].data.i))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP_CAST(i, +, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ADD_OVF_UN_I8)
- if (CHECK_ADD_OVERFLOW64_UN (sp [-2].data.l, sp [-1].data.l))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP_CAST(l, +, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MUL_OVF_I4)
- if (CHECK_MUL_OVERFLOW (sp [-2].data.i, sp [-1].data.i))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP(i, *);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MUL_OVF_I8)
- if (CHECK_MUL_OVERFLOW64 (sp [-2].data.l, sp [-1].data.l))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP(l, *);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MUL_OVF_UN_I4)
- if (CHECK_MUL_OVERFLOW_UN (sp [-2].data.i, sp [-1].data.i))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP_CAST(i, *, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MUL_OVF_UN_I8)
- if (CHECK_MUL_OVERFLOW64_UN (sp [-2].data.l, sp [-1].data.l))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP_CAST(l, *, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB_OVF_I4)
- if (CHECK_SUB_OVERFLOW (sp [-2].data.i, sp [-1].data.i))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP(i, -);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB_OVF_I8)
- if (CHECK_SUB_OVERFLOW64 (sp [-2].data.l, sp [-1].data.l))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP(l, -);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB_OVF_UN_I4)
- if (CHECK_SUB_OVERFLOW_UN (sp [-2].data.i, sp [-1].data.i))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP_CAST(i, -, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_SUB_OVF_UN_I8)
- if (CHECK_SUB_OVERFLOW64_UN (sp [-2].data.l, sp [-1].data.l))
- THROW_EX (mono_get_exception_overflow (), ip);
- BINOP_CAST(l, -, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ENDFINALLY)
- if (finally_ips) {
- ip = finally_ips->data;
- finally_ips = g_slist_remove (finally_ips, ip);
- goto main_loop;
- }
- if (frame->ex)
- goto handle_fault;
- ves_abort();
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LEAVE) /* Fall through */
- MINT_IN_CASE(MINT_LEAVE_S)
- while (sp > frame->stack) {
- --sp;
- }
- frame->ip = ip;
- if (*ip == MINT_LEAVE_S) {
- ip += (short) *(ip + 1);
- } else {
- ip += (gint32) READ32 (ip + 1);
- }
- endfinally_ip = ip;
- if (frame->ex_handler != NULL && MONO_OFFSET_IN_HANDLER(frame->ex_handler, frame->ip - rtm->code)) {
- frame->ex_handler = NULL;
- frame->ex = NULL;
- }
- goto handle_finally;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_ICALL_V_V)
- MINT_IN_CASE(MINT_ICALL_P_V)
- MINT_IN_CASE(MINT_ICALL_P_P)
- MINT_IN_CASE(MINT_ICALL_PP_V)
- MINT_IN_CASE(MINT_ICALL_PI_V)
- MINT_IN_CASE(MINT_ICALL_PP_P)
- MINT_IN_CASE(MINT_ICALL_PI_P)
- MINT_IN_CASE(MINT_ICALL_PPP_V)
- MINT_IN_CASE(MINT_ICALL_PPI_V)
- sp = do_icall (context, *ip, sp, rtm->data_items [*(guint16 *)(ip + 1)]);
- if (frame->ex != NULL)
- goto handle_exception;
- ip += 2;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MONO_LDPTR)
- sp->data.p = rtm->data_items [*(guint16 *)(ip + 1)];
- ip += 2;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MONO_NEWOBJ)
- sp->data.p = mono_object_new (context->domain, rtm->data_items [*(guint16 *)(ip + 1)]);
- ip += 2;
- sp++;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MONO_FREE)
- ++ip;
- --sp;
- g_free (sp->data.p);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_MONO_RETOBJ)
- ++ip;
- sp--;
- stackval_from_data (mono_method_signature (frame->runtime_method->method)->ret, frame->retval, sp->data.p,
- mono_method_signature (frame->runtime_method->method)->pinvoke);
- if (sp > frame->stack)
- g_warning ("retobj: more values on stack: %d", sp-frame->stack);
- goto exit_frame;
-
-#define RELOP(datamem, op) \
- --sp; \
- sp [-1].data.i = sp [-1].data.datamem op sp [0].data.datamem; \
- ++ip;
- MINT_IN_CASE(MINT_CEQ_I4)
- RELOP(i, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CEQ0_I4)
- sp [-1].data.i = (sp [-1].data.i == 0);
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CEQ_I8)
- RELOP(l, ==);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CEQ_R8)
- --sp;
- if (isunordered (sp [-1].data.f, sp [0].data.f))
- sp [-1].data.i = 0;
- else
- sp [-1].data.i = sp [-1].data.f == sp [0].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CGT_I4)
- RELOP(i, >);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CGT_I8)
- RELOP(l, >);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CGT_R8)
- --sp;
- if (isunordered (sp [-1].data.f, sp [0].data.f))
- sp [-1].data.i = 0;
- else
- sp [-1].data.i = sp [-1].data.f > sp [0].data.f;
- ++ip;
- MINT_IN_BREAK;
-
-#define RELOP_CAST(datamem, op, type) \
- --sp; \
- sp [-1].data.i = (type)sp [-1].data.datamem op (type)sp [0].data.datamem; \
- ++ip;
-
- MINT_IN_CASE(MINT_CGT_UN_I4)
- RELOP_CAST(i, >, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CGT_UN_I8)
- RELOP_CAST(l, >, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CGT_UN_R8)
- --sp;
- if (isunordered (sp [-1].data.f, sp [0].data.f))
- sp [-1].data.i = 1;
- else
- sp [-1].data.i = sp [-1].data.f > sp [0].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CLT_I4)
- RELOP(i, <);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CLT_I8)
- RELOP(l, <);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CLT_R8)
- --sp;
- if (isunordered (sp [-1].data.f, sp [0].data.f))
- sp [-1].data.i = 0;
- else
- sp [-1].data.i = sp [-1].data.f < sp [0].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CLT_UN_I4)
- RELOP_CAST(i, <, guint32);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CLT_UN_I8)
- RELOP_CAST(l, <, guint64);
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CLT_UN_R8)
- --sp;
- if (isunordered (sp [-1].data.f, sp [0].data.f))
- sp [-1].data.i = 1;
- else
- sp [-1].data.i = sp [-1].data.f < sp [0].data.f;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDFTN) {
- sp->data.p = rtm->data_items [* (guint16 *)(ip + 1)];
- ++sp;
- ip += 2;
- MINT_IN_BREAK;
- }
- MINT_IN_CASE(MINT_LDVIRTFTN) {
- RuntimeMethod *m = rtm->data_items [* (guint16 *)(ip + 1)];
- ip += 2;
- --sp;
- if (!sp->data.p)
- THROW_EX (mono_get_exception_null_reference (), ip - 2);
-
- sp->data.p = get_virtual_method (m, sp->data.p);
- ++sp;
- MINT_IN_BREAK;
- }
-
- MINT_IN_CASE(MINT_LDTHIS)
- sp->data.p = frame->obj;
- ++ip;
- ++sp;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STTHIS)
- --sp;
- frame->obj = sp->data.p;
- ++ip;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDTHISA)
- sp->data.p = &frame->obj;
- ++ip;
- ++sp;
- MINT_IN_BREAK;
-
-#define LDARG(datamem, argtype) \
- sp->data.datamem = * (argtype *)(frame->args + * (guint16 *)(ip + 1)); \
- ip += 2; \
- ++sp;
-
- MINT_IN_CASE(MINT_LDARG_I1) LDARG(i, gint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_U1) LDARG(i, guint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_I2) LDARG(i, gint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_U2) LDARG(i, guint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_I4) LDARG(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_I8) LDARG(l, gint64); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_R4) LDARG(f, float); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_R8) LDARG(f, double); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_O) LDARG(p, gpointer); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDARG_P) LDARG(p, gpointer); MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_LDARG_VT)
- sp->data.p = vt_sp;
- i32 = READ32(ip + 2);
- memcpy(sp->data.p, frame->args + * (guint16 *)(ip + 1), i32);
- vt_sp += (i32 + 7) & ~7;
- ip += 4;
- ++sp;
- MINT_IN_BREAK;
-
-#define STARG(datamem, argtype) \
- --sp; \
- * (argtype *)(frame->args + * (guint16 *)(ip + 1)) = sp->data.datamem; \
- ip += 2; \
-
- MINT_IN_CASE(MINT_STARG_I1) STARG(i, gint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_U1) STARG(i, guint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_I2) STARG(i, gint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_U2) STARG(i, guint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_I4) STARG(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_I8) STARG(l, gint64); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_R4) STARG(f, float); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_R8) STARG(f, double); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_O) STARG(p, gpointer); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STARG_P) STARG(p, gpointer); MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_STARG_VT)
- i32 = READ32(ip + 2);
- --sp;
- memcpy(frame->args + * (guint16 *)(ip + 1), sp->data.p, i32);
- vt_sp -= (i32 + 7) & ~7;
- ip += 4;
- MINT_IN_BREAK;
-
-#define STINARG(datamem, argtype) \
- do { \
- int n = * (guint16 *)(ip + 1); \
- * (argtype *)(frame->args + rtm->arg_offsets [n]) = frame->stack_args [n].data.datamem; \
- ip += 2; \
- } while (0)
-
- MINT_IN_CASE(MINT_STINARG_I1) STINARG(i, gint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_U1) STINARG(i, guint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_I2) STINARG(i, gint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_U2) STINARG(i, guint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_I4) STINARG(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_I8) STINARG(l, gint64); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_R4) STINARG(f, float); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_R8) STINARG(f, double); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_O) STINARG(p, gpointer); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STINARG_P) STINARG(p, gpointer); MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_STINARG_VT) {
- int n = * (guint16 *)(ip + 1);
- i32 = READ32(ip + 2);
- memcpy (frame->args + rtm->arg_offsets [n], frame->stack_args [n].data.p, i32);
- ip += 4;
- MINT_IN_BREAK;
- }
-
- MINT_IN_CASE(MINT_LDARGA)
- sp->data.p = frame->args + * (guint16 *)(ip + 1);
- ip += 2;
- ++sp;
- MINT_IN_BREAK;
-
-#define LDLOC(datamem, argtype) \
- sp->data.datamem = * (argtype *)(locals + * (guint16 *)(ip + 1)); \
- ip += 2; \
- ++sp;
-
- MINT_IN_CASE(MINT_LDLOC_I1) LDLOC(i, gint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_U1) LDLOC(i, guint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_I2) LDLOC(i, gint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_U2) LDLOC(i, guint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_I4) LDLOC(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_I8) LDLOC(l, gint64); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_R4) LDLOC(f, float); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_R8) LDLOC(f, double); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_O) LDLOC(p, gpointer); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_LDLOC_P) LDLOC(p, gpointer); MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_LDLOC_VT)
- sp->data.p = vt_sp;
- i32 = READ32(ip + 2);
- memcpy(sp->data.p, locals + * (guint16 *)(ip + 1), i32);
- vt_sp += (i32 + 7) & ~7;
- ip += 4;
- ++sp;
- MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_LDLOCA_S)
- sp->data.p = locals + * (guint16 *)(ip + 1);
- ip += 2;
- ++sp;
- MINT_IN_BREAK;
-
-#define STLOC(datamem, argtype) \
- --sp; \
- * (argtype *)(locals + * (guint16 *)(ip + 1)) = sp->data.datamem; \
- ip += 2;
-
- MINT_IN_CASE(MINT_STLOC_I1) STLOC(i, gint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_U1) STLOC(i, guint8); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_I2) STLOC(i, gint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_U2) STLOC(i, guint16); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_I4) STLOC(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_I8) STLOC(l, gint64); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_R4) STLOC(f, float); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_R8) STLOC(f, double); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_O) STLOC(p, gpointer); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_P) STLOC(p, gpointer); MINT_IN_BREAK;
-
-#define STLOC_NP(datamem, argtype) \
- * (argtype *)(locals + * (guint16 *)(ip + 1)) = sp [-1].data.datamem; \
- ip += 2;
-
- MINT_IN_CASE(MINT_STLOC_NP_I4) STLOC_NP(i, gint32); MINT_IN_BREAK;
- MINT_IN_CASE(MINT_STLOC_NP_O) STLOC_NP(p, gpointer); MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_STLOC_VT)
- i32 = READ32(ip + 2);
- --sp;
- memcpy(locals + * (guint16 *)(ip + 1), sp->data.p, i32);
- vt_sp -= (i32 + 7) & ~7;
- ip += 4;
- MINT_IN_BREAK;
-
- MINT_IN_CASE(MINT_LOCALLOC)
- if (sp != frame->stack + 1) /*FIX?*/
- THROW_EX (mono_get_exception_execution_engine (NULL), ip);
- sp [-1].data.p = alloca (sp [-1].data.i);
- ++ip;
- MINT_IN_BREAK;
-#if 0
- MINT_IN_CASE(MINT_ENDFILTER) ves_abort(); MINT_IN_BREAK;
-#endif
- MINT_IN_CASE(MINT_INITOBJ)
- --sp;
- memset (sp->data.vt, 0, READ32(ip + 1));
- ip += 3;
- MINT_IN_BREAK;
- MINT_IN_CASE(MINT_CPBLK)
- sp -= 3;
- if (!sp [0].data.p || !sp [1].data.p)
- THROW_EX (mono_get_exception_null_reference(), ip - 1);
- ++ip;
- /* FIXME: value and size may be int64... */
- memcpy (sp [0].data.p, sp [1].data.p, sp [2].data.i);
- MINT_IN_BREAK;
-#if 0
- MINT_IN_CASE(MINT_CONSTRAINED_) {
- guint32 token;
- /* FIXME: implement */
- ++ip;
- token = READ32 (ip);
- ip += 2;
- MINT_IN_BREAK;
- }
-#endif
- MINT_IN_CASE(MINT_INITBLK)
- sp -= 3;
- if (!sp [0].data.p)
- THROW_EX (mono_get_exception_null_reference(), ip - 1);
- ++ip;
- /* FIXME: value and size may be int64... */
- memset (sp [0].data.p, sp [1].data.i, sp [2].data.i);
- MINT_IN_BREAK;
-#if 0
- MINT_IN_CASE(MINT_NO_)
- /* FIXME: implement */
- ip += 2;
- MINT_IN_BREAK;
-#endif
- MINT_IN_CASE(MINT_RETHROW)
- /*
- * need to clarify what this should actually do:
- * start the search from the last found handler in
- * this method or continue in the caller or what.
- * Also, do we need to run finally/fault handlers after a retrow?
- * Well, this implementation will follow the usual search
- * for an handler, considering the current ip as throw spot.
- * We need to NULL frame->ex_handler for the later code to
- * actually run the new found handler.
- */
- frame->ex_handler = NULL;
- THROW_EX (frame->ex, ip - 1);
- MINT_IN_BREAK;
- MINT_IN_DEFAULT
- g_print ("Unimplemented opcode: %04x %s at 0x%x\n", *ip, mono_interp_opname[*ip], ip-rtm->code);
- THROW_EX (mono_get_exception_execution_engine ("Unimplemented opcode"), ip);
- }
- }
-
- g_assert_not_reached ();
- /*
- * Exception handling code.
- * The exception object is stored in frame->ex.
- */
-
- handle_exception:
- {
- int i;
- guint32 ip_offset;
- MonoInvocation *inv;
- MonoExceptionClause *clause;
- /*char *message;*/
- MonoObject *ex_obj;
-
-#if DEBUG_INTERP
- if (tracing)
- g_print ("* Handling exception '%s' at IL_%04x\n",
- frame->ex == NULL ? "** Unknown **" : mono_object_class (frame->ex)->name,
- rtm == NULL ? 0 : frame->ip - rtm->code);
-#endif
- if (die_on_exception)
- goto die_on_ex;
-
- for (inv = frame; inv; inv = inv->parent) {
- MonoMethod *method;
- if (inv->runtime_method == NULL)
- continue;
- method = inv->runtime_method->method;
- if (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)
- continue;
- if (method->iflags & (METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL | METHOD_IMPL_ATTRIBUTE_RUNTIME))
- continue;
- if (inv->ip == NULL)
- continue;
- ip_offset = inv->ip - inv->runtime_method->code;
- inv->ex_handler = NULL; /* clear this in case we are trhowing an exception while handling one - this one wins */
- for (i = 0; i < inv->runtime_method->num_clauses; ++i) {
- clause = &inv->runtime_method->clauses [i];
- if (clause->flags <= 1 && MONO_OFFSET_IN_CLAUSE (clause, ip_offset)) {
- if (!clause->flags) {
- if (mono_object_isinst ((MonoObject*)frame->ex, clause->data.catch_class)) {
- /*
- * OK, we found an handler, now we need to execute the finally
- * and fault blocks before branching to the handler code.
- */
- inv->ex_handler = clause;
-#if DEBUG_INTERP
- if (tracing)
- g_print ("* Found handler at '%s'\n", method->name);
-#endif
- goto handle_finally;
- }
- } else {
- /* FIXME: handle filter clauses */
- g_assert (0);
- }
- }
- }
- }
- /*
- * If we get here, no handler was found: print a stack trace.
- */
- for (inv = frame; inv; inv = inv->parent) {
- if (inv->invoke_trap)
- goto handle_finally;
- }
-die_on_ex:
- ex_obj = (MonoObject*)frame->ex;
- mono_unhandled_exception (ex_obj);
- exit (1);
- }
- handle_finally:
- {
- int i;
- guint32 ip_offset;
- MonoExceptionClause *clause;
- GSList *old_list = finally_ips;
- MonoMethod *method = frame->runtime_method->method;
- MonoMethodHeader *header = mono_method_get_header (method);
-
-#if DEBUG_INTERP
- if (tracing)
- g_print ("* Handle finally IL_%04x\n", endfinally_ip == NULL ? 0 : endfinally_ip - rtm->code);
-#endif
- if (rtm == NULL || (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)
- || (method->iflags & (METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL | METHOD_IMPL_ATTRIBUTE_RUNTIME))) {
- goto exit_frame;
- }
- ip_offset = frame->ip - rtm->code;
-
- if (endfinally_ip != NULL)
- finally_ips = g_slist_prepend(finally_ips, (void *)endfinally_ip);
- for (i = 0; i < header->num_clauses; ++i)
- if (frame->ex_handler == &rtm->clauses [i])
- break;
- while (i > 0) {
- --i;
- clause = &rtm->clauses [i];
- if (MONO_OFFSET_IN_CLAUSE (clause, ip_offset) && (endfinally_ip == NULL || !(MONO_OFFSET_IN_CLAUSE (clause, endfinally_ip - rtm->code)))) {
- if (clause->flags == MONO_EXCEPTION_CLAUSE_FINALLY) {
- ip = rtm->code + clause->handler_offset;
- finally_ips = g_slist_prepend (finally_ips, (gpointer) ip);
-#if DEBUG_INTERP
- if (tracing)
- g_print ("* Found finally at IL_%04x with exception: %s\n", clause->handler_offset, frame->ex? "yes": "no");
-#endif
- }
- }
- }
-
- endfinally_ip = NULL;
-
- if (old_list != finally_ips && finally_ips) {
- ip = finally_ips->data;
- finally_ips = g_slist_remove (finally_ips, ip);
- sp = frame->stack; /* spec says stack should be empty at endfinally so it should be at the start too */
- goto main_loop;
- }
-
- /*
- * If an exception is set, we need to execute the fault handler, too,
- * otherwise, we continue normally.
- */
- if (frame->ex)
- goto handle_fault;
- ves_abort();
- }
- handle_fault:
- {
- int i;
- guint32 ip_offset;
- MonoExceptionClause *clause;
- MonoMethodHeader *header = mono_method_get_header (frame->runtime_method->method);
-
-#if DEBUG_INTERP
- if (tracing)
- g_print ("* Handle fault\n");
-#endif
- ip_offset = frame->ip - rtm->code;
- for (i = 0; i < header->num_clauses; ++i) {
- clause = &rtm->clauses [i];
- if (clause->flags == MONO_EXCEPTION_CLAUSE_FAULT && MONO_OFFSET_IN_CLAUSE (clause, ip_offset)) {
- ip = rtm->code + clause->handler_offset;
-#if DEBUG_INTERP
- if (tracing)
- g_print ("* Executing handler at IL_%04x\n", clause->handler_offset);
-#endif
- goto main_loop;
- }
- }
- /*
- * If the handler for the exception was found in this method, we jump
- * to it right away, otherwise we return and let the caller run
- * the finally, fault and catch blocks.
- * This same code should be present in the endfault opcode, but it
- * is corrently not assigned in the ECMA specs: LAMESPEC.
- */
- if (frame->ex_handler) {
-#if DEBUG_INTERP
- if (tracing)
- g_print ("* Executing handler at IL_%04x\n", frame->ex_handler->handler_offset);
-#endif
- ip = rtm->code + frame->ex_handler->handler_offset;
- sp = frame->stack;
- vt_sp = (char *)sp + rtm->stack_size;
- sp->data.p = frame->ex;
- ++sp;
- goto main_loop;
- }
- goto exit_frame;
- }
-exit_frame:
- DEBUG_LEAVE ();
-}
-
-void
-ves_exec_method (MonoInvocation *frame)
-{
- ThreadContext *context = TlsGetValue (thread_context_id);
- ThreadContext context_struct;
- jmp_buf env;
-
- frame->ex = NULL;
-
- if (setjmp(env)) {
- mono_unhandled_exception ((MonoObject*)frame->ex);
- return;
- }
- if (context == NULL) {
- context = &context_struct;
- context_struct.domain = mono_domain_get ();
- context_struct.base_frame = frame;
- context_struct.current_frame = NULL;
- context_struct.env_frame = frame;
- context_struct.current_env = &env;
- context_struct.search_for_handler = 0;
- context_struct.managed_code = 0;
- TlsSetValue (thread_context_id, context);
- }
- frame->ip = NULL;
- frame->parent = context->current_frame;
- frame->runtime_method = mono_interp_get_runtime_method (frame->method);
- context->managed_code = 1;
- ves_exec_method_with_context(frame, context);
- context->managed_code = 0;
- if (frame->ex) {
- if (context != &context_struct && context->current_env) {
- context->env_frame->ex = frame->ex;
- longjmp (*context->current_env, 1);
- }
- else
- mono_unhandled_exception ((MonoObject*)frame->ex);
- }
- if (context->base_frame == frame)
- TlsSetValue (thread_context_id, NULL);
- else
- context->current_frame = frame->parent;
-}
-
-static int
-ves_exec (MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
-{
- MonoImage *image = mono_assembly_get_image (assembly);
- MonoMethod *method;
- MonoObject *exc = NULL;
- int rval;
-
- method = mono_get_method (image, mono_image_get_entry_point (image), NULL);
- if (!method)
- g_error ("No entry point method found in %s", mono_image_get_filename (image));
-
- rval = mono_runtime_run_main (method, argc, argv, &exc);
- if (exc != NULL)
- mono_unhandled_exception (exc);
-
- return rval;
-}
-
-static void
-usage (void)
-{
- fprintf (stderr,
- "mint %s, the Mono ECMA CLI interpreter, (C) 2001, 2002 Ximian, Inc.\n\n"
- "Usage is: mint [options] executable args...\n\n", VERSION);
- fprintf (stderr,
- "Runtime Debugging:\n"
-#ifdef DEBUG_INTERP
- " --debug\n"
-#endif
- " --dieonex\n"
- " --noptr\t\t\tdon't print pointer addresses in trace output\n"
- " --opcode-count\n"
- " --print-vtable\n"
- " --traceclassinit\n"
- "\n"
- "Development:\n"
- " --debug method_name\n"
- " --profile\n"
- " --trace\n"
- " --traceops\n"
- "\n"
- "Runtime:\n"
- " --config filename load the specified config file instead of the default\n"
- " --workers n maximum number of worker threads\n"
- );
- exit (1);
-}
-
-#ifdef RUN_TEST
-static void
-test_load_class (MonoImage* image)
-{
- MonoTableInfo *t = &image->tables [MONO_TABLE_TYPEDEF];
- MonoClass *klass;
- int i;
-
- for (i = 1; i <= t->rows; ++i) {
- klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | i);
- mono_class_init (klass);
- }
-}
-#endif
-
-static void
-add_signal_handler (int signo, void (*handler)(int))
-{
-#ifdef HOST_WIN32
- signal (signo, handler);
-#else
- struct sigaction sa;
-
- sa.sa_handler = handler;
- sigemptyset (&sa.sa_mask);
- sa.sa_flags = 0;
-
- g_assert (sigaction (signo, &sa, NULL) != -1);
-#endif
-}
-
-static void
-segv_handler (int signum)
-{
- ThreadContext *context = TlsGetValue (thread_context_id);
- MonoException *segv_exception;
-
- if (context == NULL)
- return;
- segv_exception = mono_get_exception_null_reference ();
- segv_exception->message = mono_string_new (mono_domain_get (), "Null Reference (SIGSEGV)");
- mono_raise_exception (segv_exception);
-}
-
-
-static void
-quit_handler (int signum)
-{
- ThreadContext *context = TlsGetValue (thread_context_id);
- MonoException *quit_exception;
-
- if (context == NULL)
- return;
- quit_exception = mono_get_exception_execution_engine ("Interrupted (SIGQUIT).");
- mono_raise_exception (quit_exception);
-}
-
-static void
-abrt_handler (int signum)
-{
- ThreadContext *context = TlsGetValue (thread_context_id);
- MonoException *abrt_exception;
-
- if (context == NULL)
- return;
- abrt_exception = mono_get_exception_execution_engine ("Abort (SIGABRT).");
- mono_raise_exception (abrt_exception);
-}
-
-static void
-thread_abort_handler (int signum)
-{
- ThreadContext *context = TlsGetValue (thread_context_id);
- MonoException *exc;
-
- if (context == NULL)
- return;
-
- exc = mono_thread_request_interruption (context->managed_code);
- if (exc) mono_raise_exception (exc);
-}
-
-static MonoBoolean
-ves_icall_get_frame_info (gint32 skip, MonoBoolean need_file_info,
- MonoReflectionMethod **method,
- gint32 *iloffset, gint32 *native_offset,
- MonoString **file, gint32 *line, gint32 *column)
-{
- ThreadContext *context = TlsGetValue (thread_context_id);
- MonoInvocation *inv = context->current_frame;
- int i;
-
- for (i = 0; inv && i < skip; inv = inv->parent)
- if (inv->runtime_method != NULL)
- ++i;
-
- if (iloffset)
- *iloffset = 0;
- if (native_offset)
- *native_offset = 0;
- if (method)
- *method = inv == NULL ? NULL : mono_method_get_object (context->domain, inv->runtime_method->method, NULL);
- if (line)
- *line = 0;
- if (need_file_info) {
- if (column)
- *column = 0;
- if (file)
- *file = mono_string_new (mono_domain_get (), "unknown");
- }
-
- return TRUE;
-}
-
-static MonoArray *
-ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_file_info)
-{
- MonoDomain *domain = mono_domain_get ();
- MonoArray *res;
- MonoArray *ta = exc->trace_ips;
- int i, len;
-
- if (ta == NULL) {
- /* Exception is not thrown yet */
- return mono_array_new (domain, mono_defaults.stack_frame_class, 0);
- }
-
- len = mono_array_length (ta);
-
- res = mono_array_new (domain, mono_defaults.stack_frame_class, len > skip ? len - skip : 0);
-
- for (i = skip; i < len / 2; i++) {
- MonoStackFrame *sf = (MonoStackFrame *)mono_object_new (domain, mono_defaults.stack_frame_class);
- gushort *ip = mono_array_get (ta, gpointer, 2 * i + 1);
- RuntimeMethod *rtm = mono_array_get (ta, gpointer, 2 * i);
-
- if (rtm != NULL) {
- sf->method = mono_method_get_object (domain, rtm->method, NULL);
- sf->native_offset = ip - rtm->code;
- }
-
-#if 0
- sf->il_offset = mono_debug_il_offset_from_address (ji->method, sf->native_offset, domain);
-
- if (need_file_info) {
- gchar *filename;
-
- filename = mono_debug_source_location_from_address (ji->method, sf->native_offset, &sf->line, domain);
-
- sf->filename = filename? mono_string_new (domain, filename): NULL;
- sf->column = 0;
-
- g_free (filename);
- }
-#endif
-
- mono_array_set (res, gpointer, i, sf);
- }
-
- return res;
-}
-
-static MonoObject *
-ves_icall_System_Delegate_CreateDelegate_internal (MonoReflectionType *type, MonoObject *target,
- MonoReflectionMethod *info)
-{
- MonoClass *delegate_class = mono_class_from_mono_type (type->type);
- MonoObject *delegate;
-
- mono_assert (delegate_class->parent == mono_defaults.multicastdelegate_class);
-
- delegate = mono_object_new (mono_object_domain (type), delegate_class);
-
- interp_delegate_ctor (mono_object_domain (type), delegate, target, mono_interp_get_runtime_method (info->method));
-
- return delegate;
-}
-
-
-typedef struct
-{
- MonoDomain *domain;
- int enable_debugging;
- char *file;
- int argc;
- char **argv;
-} MainThreadArgs;
-
-static void main_thread_handler (gpointer user_data)
-{
- MainThreadArgs *main_args=(MainThreadArgs *)user_data;
- MonoAssembly *assembly;
-
- if (main_args->enable_debugging) {
- mono_debug_init (MONO_DEBUG_FORMAT_MONO);
- mono_debug_init_1 (main_args->domain);
- }
-
- assembly = mono_domain_assembly_open (main_args->domain,
- main_args->file);
-
- if (!assembly){
- fprintf (stderr, "Can not open image %s\n", main_args->file);
- exit (1);
- }
-
- if (main_args->enable_debugging)
- mono_debug_init_2 (assembly);
-
-#ifdef RUN_TEST
- test_load_class (assembly->image);
-#else
-
- ves_exec (main_args->domain, assembly, main_args->argc, main_args->argv);
-#endif
-}
-
-static void
-mono_runtime_install_handlers (void)
-{
- add_signal_handler (SIGSEGV, segv_handler);
- add_signal_handler (SIGINT, quit_handler);
- add_signal_handler (SIGABRT, abrt_handler);
- add_signal_handler (mono_thread_get_abort_signal (), thread_abort_handler);
-}
-
-static void
-quit_function (MonoDomain *domain, gpointer user_data)
-{
- mono_profiler_shutdown ();
-
- mono_runtime_cleanup (domain);
- mono_domain_free (domain, TRUE);
-
-}
-
-void
-mono_interp_cleanup(MonoDomain *domain)
-{
- quit_function (domain, NULL);
-}
-
-int
-mono_interp_exec(MonoDomain *domain, MonoAssembly *assembly, int argc, char *argv[])
-{
- return ves_exec (domain, assembly, argc, argv);
-}
-
-MonoDomain *
-mono_interp_init(const char *file)
-{
- MonoDomain *domain;
-
- g_set_prgname (file);
- mono_set_rootdir ();
-
- g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
- g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
-
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- thread_context_id = TlsAlloc ();
- TlsSetValue (thread_context_id, NULL);
- InitializeCriticalSection (&runtime_method_lookup_section);
- InitializeCriticalSection (&create_method_pointer_mutex);
-
- mono_runtime_install_handlers ();
- mono_interp_transform_init ();
- mono_install_compile_method (mono_create_method_pointer);
- mono_install_runtime_invoke (interp_mono_runtime_invoke);
- mono_install_remoting_trampoline (interp_create_remoting_trampoline);
- mono_install_trampoline (interp_create_trampoline);
-
- mono_install_handler (interp_ex_handler);
- mono_install_stack_walk (interp_walk_stack);
- mono_install_runtime_cleanup (quit_function);
- abort_requested = mono_thread_interruption_request_flag ();
-
- domain = mono_init_from_assembly (file, file);
-#ifdef __hpux /* generates very big stack frames */
- mono_threads_set_default_stacksize(32*1024*1024);
-#endif
- mono_icall_init ();
- mono_add_internal_call ("System.Diagnostics.StackFrame::get_frame_info", ves_icall_get_frame_info);
- mono_add_internal_call ("System.Diagnostics.StackTrace::get_trace", ves_icall_get_trace);
- mono_add_internal_call ("Mono.Runtime::mono_runtime_install_handlers", mono_runtime_install_handlers);
- mono_add_internal_call ("System.Delegate::CreateDelegate_internal", ves_icall_System_Delegate_CreateDelegate_internal);
-
- mono_register_jit_icall (mono_thread_interruption_checkpoint, "mono_thread_interruption_checkpoint", mono_create_icall_signature ("void"), FALSE);
-
- mono_runtime_init (domain, NULL, NULL);
-
-
- mono_thread_attach (domain);
- return domain;
-}
-
-int
-mono_main (int argc, char *argv [])
-{
- MonoDomain *domain;
- int retval = 0, i;
- char *file, *config_file = NULL;
- int enable_debugging = FALSE;
- MainThreadArgs main_args;
- const char *error;
-
- setlocale (LC_ALL, "");
- if (argc < 2)
- usage ();
-
- MONO_GC_PRE_INIT ();
-
- for (i = 1; i < argc && argv [i][0] == '-'; i++){
- if (strcmp (argv [i], "--trace") == 0)
- global_tracing = 1;
- if (strcmp (argv [i], "--noptr") == 0)
- global_no_pointers = 1;
- if (strcmp (argv [i], "--traceops") == 0)
- global_tracing = 2;
- if (strcmp (argv [i], "--traceopt") == 0)
- ++mono_interp_traceopt;
- if (strcmp (argv [i], "--dieonex") == 0) {
- die_on_exception = 1;
- enable_debugging = 1;
- }
- if (strcmp (argv [i], "--print-vtable") == 0)
- mono_print_vtable = TRUE;
- if (strcmp (argv [i], "--profile") == 0)
- mono_profiler_load (NULL);
- if (strcmp (argv [i], "--config") == 0)
- config_file = argv [++i];
- if (strcmp (argv [i], "--help") == 0)
- usage ();
-#if DEBUG_INTERP
- if (strcmp (argv [i], "--debug") == 0) {
- MonoMethodDesc *desc = mono_method_desc_new (argv [++i], FALSE);
- if (!desc)
- g_error ("Invalid method name '%s'", argv [i]);
- db_methods = g_list_append (db_methods, desc);
- }
- if (strcmp (argv [i], "--nested") == 0)
- nested_trace = 1;
-#endif
- }
-
- file = argv [i];
-
- if (!file)
- usage ();
-
- domain = mono_interp_init(file);
- mono_config_parse (config_file);
-
- error = mono_check_corlib_version ();
- if (error) {
- fprintf (stderr, "Corlib not in sync with this runtime: %s\n", error);
- fprintf (stderr, "Download a newer corlib at http://www.go-mono.com/daily.\n");
- exit (1);
- }
-
- main_args.domain=domain;
- main_args.file=file;
- main_args.argc=argc-i;
- main_args.argv=argv+i;
- main_args.enable_debugging=enable_debugging;
-
- mono_runtime_exec_managed_code (domain, main_thread_handler,
- &main_args);
-
- quit_function (domain, NULL);
-
- /* Get the return value from System.Environment.ExitCode */
- retval=mono_environment_exitcode_get ();
-
-#if COUNT_OPS
- for (i = 0; i < 512; i++)
- if (opcode_counts[i] != 0)
- printf("%s %d\n", mono_interp_opname[i], opcode_counts[i]);
-#endif
- return retval;
-}
diff --git a/mono/interpreter/interp.h b/mono/interpreter/interp.h
deleted file mode 100644
index 0953e5a54cf..00000000000
--- a/mono/interpreter/interp.h
+++ /dev/null
@@ -1,138 +0,0 @@
-#include <setjmp.h>
-#include <glib.h>
-#include <mono/metadata/loader.h>
-#include <mono/metadata/object.h>
-#include <mono/metadata/domain-internals.h>
-#include <mono/metadata/class-internals.h>
-#include "config.h"
-
-enum {
- VAL_I32 = 0,
- VAL_DOUBLE = 1,
- VAL_I64 = 2,
- VAL_VALUET = 3,
- VAL_POINTER = 4,
- VAL_NATI = 0 + VAL_POINTER,
- VAL_MP = 1 + VAL_POINTER,
- VAL_TP = 2 + VAL_POINTER,
- VAL_OBJ = 3 + VAL_POINTER
-};
-
-#if SIZEOF_VOID_P == 4
-typedef guint32 mono_u;
-typedef gint32 mono_i;
-#elif SIZEOF_VOID_P == 8
-typedef guint64 mono_u;
-typedef gint64 mono_i;
-#endif
-
-/*
- * Value types are represented on the eval stack as pointers to the
- * actual storage. The size field tells how much storage is allocated.
- * A value type can't be larger than 16 MB.
- */
-typedef struct {
- union {
- gint32 i;
- gint64 l;
- double f;
- /* native size integer and pointer types */
- gpointer p;
- mono_u nati;
- gpointer vt;
- } data;
-#if defined(__ppc__) || defined(__powerpc__)
- int pad;
-#endif
-} stackval;
-
-typedef struct _MonoInvocation MonoInvocation;
-
-typedef void (*MonoFunc) (void);
-typedef void (*MonoPIFunc) (MonoFunc callme, void *retval, void *obj_this, stackval *arguments);
-
-/*
- * Structure representing a method transformed for the interpreter
- * This is domain specific
- */
-typedef struct _RuntimeMethod
-{
- /* NOTE: These first two elements (method and
- next_jit_code_hash) must be in the same order and at the
- same offset as in MonoJitInfo, because of the jit_code_hash
- internal hash table in MonoDomain. */
- MonoMethod *method;
- struct _RuntimeMethod *next_jit_code_hash;
- guint32 locals_size;
- guint32 args_size;
- guint32 stack_size;
- guint32 vt_stack_size;
- guint32 alloca_size;
- unsigned short *code;
- unsigned short *new_body_start; /* after all STINARG instrs */
- MonoPIFunc func;
- int num_clauses;
- MonoExceptionClause *clauses;
- void **data_items;
- int transformed;
- guint32 *arg_offsets;
- guint32 *local_offsets;
- unsigned int param_count;
- unsigned int hasthis;
- unsigned int valuetype;
-} RuntimeMethod;
-
-struct _MonoInvocation {
- MonoInvocation *parent; /* parent */
- RuntimeMethod *runtime_method; /* parent */
- MonoMethod *method; /* parent */
- stackval *retval; /* parent */
- void *obj; /* this - parent */
- char *args;
- stackval *stack_args; /* parent */
- stackval *stack;
- stackval *sp; /* For GC stack marking */
- /* exception info */
- unsigned char invoke_trap;
- const unsigned short *ip;
- MonoException *ex;
- MonoExceptionClause *ex_handler;
-};
-
-typedef struct {
- MonoDomain *domain;
- MonoInvocation *base_frame;
- MonoInvocation *current_frame;
- MonoInvocation *env_frame;
- jmp_buf *current_env;
- unsigned char search_for_handler;
- unsigned char managed_code;
-} ThreadContext;
-
-void mono_init_icall (void);
-
-MonoException *
-mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *context);
-
-MonoDelegate*
-mono_interp_ftnptr_to_delegate (MonoClass *klass, gpointer ftn);
-
-void
-mono_interp_transform_init (void);
-
-void inline stackval_from_data (MonoType *type, stackval *result, char *data, gboolean pinvoke);
-void inline stackval_to_data (MonoType *type, stackval *val, char *data, gboolean pinvoke);
-void ves_exec_method (MonoInvocation *frame);
-
-/*
- * defined in an arch specific file.
- */
-MonoPIFunc
-mono_arch_create_trampoline (MonoMethodSignature *sig, gboolean string_ctor);
-
-RuntimeMethod *
-mono_interp_get_runtime_method (MonoMethod *method);
-
-void *mono_arch_create_method_pointer (MonoMethod *method);
-
-extern int mono_interp_traceopt;
diff --git a/mono/interpreter/main.c b/mono/interpreter/main.c
deleted file mode 100644
index 70b5d96d1b7..00000000000
--- a/mono/interpreter/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include "interp.h"
-#include "embed.h"
-
-int
-main (int argc, char* argv[])
-{
- return mono_main (argc, argv);
-}
-
diff --git a/mono/interpreter/mint.1 b/mono/interpreter/mint.1
deleted file mode 100644
index 77e00c376f6..00000000000
--- a/mono/interpreter/mint.1
+++ /dev/null
@@ -1,82 +0,0 @@
-.\"
-.\" mint manual page.
-.\" (C) Ximian, Inc.
-.\" Author:
-.\" Miguel de Icaza (miguel@gnu.org)
-.\"
-.TH Mono "Mono 1.0"
-.SH NAME
-mint \- Mono ECMA-CLI interpreter.
-.SH SYNOPSIS
-.PP
-.B mint
-[\-\-help] [\-\-opcode\-count] [\-\-trace] [\-\-traceops] [\-\-profile]
-[\-\-config filename] [\-\-debug method]
-program.exe [arguments...]
-.SH DESCRIPTION
-The \fImint\fP program is an interpreter for ECMA CLI byte codes. It
-executes the bytecodes contains in
-.I program.exe
-and optionally passes
-the
-.I arguments
-to it.
-.SH OPTIONS
-The following Generic options are supported:
-.TP
-.I "--help", "-h"
-Displays usage instructions.
-.TP
-.I "--config filename"
-Load the specified configuration file instead of the default one(s).
-The default files are /etc/mono/config and ~/.mono/config or the file
-specified in the MONO_CONFIG environment variable, if set.
-.TP
-.I "--trace"
-Traces execution showing when methods are entered and left.
-.I "--traceops"
-Traces execution at the instruction level and displays the stack contents.
-.I "--traceclassinit"
-Shows when classes are initialized
-.TP
-.I "--noptr"
-Suppresses printing of pointer addresses in trace output.
-.TP
-.I "--profile"
-Performs runtime profiling of the code and displays statistics at the
-end of execution.
-.TP
-.I "--opcode-count"
-Displays the number of opcodes executed.
-.TP
-.I "--dieonex"
-Aborts execution upon hitting an exception.
-.TP
-.I "--debug method"
-Debugs the method whose name is `method'. You can specify the method
-like this: `class:method' or `class::method'
-.TP
-.I "--opcode-count"
-Displays the number of opcodes executed
-.PP
-.SH ENVIRONMENT VARIABLES
-.TP
-.I "MONO_PATH"
-Provides a search path to mono and mint where to look for library files.
-Directories are separated by the platform path separator (colons on unix). Example:
-.B /home/username/lib:/usr/local/mono/lib
-.PP
-.SH FILES
-Assemblies are lodaed from the installation lib directory. If you set
-`prefix' to /usr, the assemblies will be located in /usr/lib.
-.PP
-/etc/mono/config, ~/.mono/config
-.IP
-Mono runtime configuration file. See the mono-config(5) manual page
-for more information.
-.SH MAILING LISTS
-Visit http://mail.ximian.com/mailman/mono-list for details.
-.SH WEB SITE
-Visit: http://www.go-mono.com for details
-.SH SEE ALSO
-.BR mono(1), monodis(1)
diff --git a/mono/interpreter/mintops.c b/mono/interpreter/mintops.c
deleted file mode 100644
index 5b4d69269e8..00000000000
--- a/mono/interpreter/mintops.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Utilities for handling interpreter VM instructions
- *
- * Authors:
- * Bernie Solomon (bernard@ugsolutions.com)
- *
- */
-#include <glib.h>
-#include <stdio.h>
-#include "mintops.h"
-
-#define OPDEF(a,b,c,d) \
- b,
-const char *mono_interp_opname[] = {
-#include "mintops.def"
- ""
-};
-#undef OPDEF
-
-#define OPDEF(a,b,c,d) \
- c,
-unsigned char mono_interp_oplen[] = {
-#include "mintops.def"
- 0
-};
-#undef OPDEF
-
-
-#define OPDEF(a,b,c,d) \
- d,
-MintOpArgType mono_interp_opargtype[] = {
-#include "mintops.def"
- 0
-};
-#undef OPDEF
-
-const guint16 *
-mono_interp_dis_mintop(const guint16 *base, const guint16 *ip)
-{
- int len = mono_interp_oplen [*ip];
- guint32 token;
- int target;
- if (len < 0 || len > 10) {
- g_print ("op %d len %d\n", *ip, len);
- g_assert_not_reached ();
- } else if (len == 0) { /* SWITCH */
- int n = READ32 (ip + 1);
- len = 3 + n * 2;
- }
-
- g_print ("IL_%04x: %-10s", ip - base, mono_interp_opname [*ip]);
- switch (mono_interp_opargtype [*ip]) {
- case MintOpNoArgs:
- break;
- case MintOpUShortInt:
- g_print (" %u", * (guint16 *)(ip + 1));
- break;
- case MintOpTwoShorts:
- g_print (" %u,%u", * (guint16 *)(ip + 1), * (guint16 *)(ip + 2));
- break;
- case MintOpShortAndInt:
- g_print (" %u,%u", * (guint16 *)(ip + 1), (guint32)READ32(ip + 2));
- break;
- case MintOpShortInt:
- g_print (" %d", * (short *)(ip + 1));
- break;
- case MintOpClassToken:
- case MintOpMethodToken:
- case MintOpFieldToken:
- token = * (guint16 *)(ip + 1);
- g_print (" %u", token);
- break;
- case MintOpInt:
- g_print (" %d", (gint32)READ32 (ip + 1));
- break;
- case MintOpLongInt:
- g_print (" %lld", (gint64)READ64 (ip + 1));
- break;
- case MintOpFloat: {
- gint32 tmp = READ32 (ip + 1);
- g_print (" %g", * (float *)&tmp);
- break;
- }
- case MintOpDouble: {
- gint64 tmp = READ64 (ip + 1);
- g_print (" %g", * (double *)&tmp);
- break;
- }
- case MintOpShortBranch:
- target = ip + * (short *)(ip + 1) - base;
- g_print (" IL_%04x", target);
- break;
- case MintOpBranch:
- target = ip + (gint32)READ32 (ip + 1) - base;
- g_print (" IL_%04x", target);
- break;
- case MintOpSwitch: {
- const guint16 *p = ip + 1;
- int sval = (gint32)READ32 (p);
- int i;
- p += 2;
- g_print ("(");
- for (i = 0; i < sval; ++i) {
- int offset;
- if (i > 0)
- g_print (", ");
- offset = (gint32)READ32 (p);
- g_print ("IL_%04x", ip - base + 3 + 2 * sval + offset);
- p += 2;
- }
- g_print (")");
- break;
- }
- default:
- g_print("unknown arg type\n");
- }
-
- return ip + len;
-}
-
diff --git a/mono/interpreter/mintops.def b/mono/interpreter/mintops.def
deleted file mode 100644
index 550ba655629..00000000000
--- a/mono/interpreter/mintops.def
+++ /dev/null
@@ -1,510 +0,0 @@
-/*
- * Definitions of VM instructions executed by interp.c
- *
- * Authors:
- * Bernie Solomon (bernard@ugsolutions.com)
- *
- */
-
-/* OPDEF (opsymbol, opstring, oplength, optype) */
-
-OPDEF(MINT_NOP, "nop", 1, MintOpNoArgs)
-OPDEF(MINT_BREAK, "break", 1, MintOpNoArgs)
-OPDEF(MINT_LDNULL, "ldnull", 1, MintOpNoArgs)
-OPDEF(MINT_DUP, "dup", 1, MintOpNoArgs)
-OPDEF(MINT_DUP_VT, "dup.vt", 3, MintOpInt)
-OPDEF(MINT_POP, "pop", 1, MintOpNoArgs)
-
-OPDEF(MINT_RET, "ret", 1, MintOpNoArgs)
-OPDEF(MINT_RET_VOID, "ret.void", 1, MintOpNoArgs)
-OPDEF(MINT_RET_VT, "ret.vt", 3, MintOpInt)
-
-OPDEF(MINT_VTRESULT, "vtresult", 4, MintOpShortAndInt) /*FIX should be unsigned*/
-
-OPDEF(MINT_LDC_I4_M1, "ldc.i4.m1", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_0, "ldc.i4.0", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_1, "ldc.i4.1", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_2, "ldc.i4.2", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_3, "ldc.i4.3", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_4, "ldc.i4.4", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_5, "ldc.i4.5", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_6, "ldc.i4.6", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_7, "ldc.i4.7", 1, MintOpNoArgs)
-OPDEF(MINT_LDC_I4_8, "ldc.i4.8", 1, MintOpNoArgs)
-
-OPDEF(MINT_LDC_I4_S, "ldc.i4.s", 2, MintOpShortInt)
-OPDEF(MINT_LDC_I4, "ldc.i4", 3, MintOpInt)
-OPDEF(MINT_LDC_I8, "ldc.i8", 5, MintOpLongInt)
-
-OPDEF(MINT_LDC_R4, "ldc.r4", 3, MintOpFloat)
-OPDEF(MINT_LDC_R8, "ldc.r8", 5, MintOpDouble)
-
-OPDEF(MINT_LDARG_I1, "ldarg.i1", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_U1, "ldarg.u1", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_I2, "ldarg.i2", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_U2, "ldarg.u2", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_I4, "ldarg.i4", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_I8, "ldarg.i8", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_R4, "ldarg.r4", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_R8, "ldarg.r8", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_O, "ldarg.o", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_P, "ldarg.p", 2, MintOpUShortInt)
-OPDEF(MINT_LDARG_VT, "ldarg.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_LDTHIS, "ldthis", 1, MintOpNoArgs)
-
-OPDEF(MINT_STARG_I1, "starg.i1", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_U1, "starg.u1", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_I2, "starg.i2", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_U2, "starg.u2", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_I4, "starg.i4", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_I8, "starg.i8", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_R4, "starg.r4", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_R8, "starg.r8", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_O, "starg.o", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_P, "starg.p", 2, MintOpUShortInt)
-OPDEF(MINT_STARG_VT, "starg.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_STTHIS, "stthis", 1, MintOpNoArgs)
-
-OPDEF(MINT_STINARG_I1, "stinarg.i1", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_U1, "stinarg.u1", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_I2, "stinarg.i2", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_U2, "stinarg.u2", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_I4, "stinarg.i4", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_I8, "stinarg.i8", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_R4, "stinarg.r4", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_R8, "stinarg.r8", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_O, "stinarg.o", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_P, "stinarg.p", 2, MintOpUShortInt)
-OPDEF(MINT_STINARG_VT, "stinarg.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_LDARGA, "ldarga", 2, MintOpUShortInt)
-OPDEF(MINT_LDTHISA, "ldthisa", 1, MintOpNoArgs)
-
-OPDEF(MINT_LDFLD_I1, "ldfld.i1", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_U1, "ldfld.u1", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_I2, "ldfld.i2", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_U2, "ldfld.u2", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_I4, "ldfld.i4", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_I8, "ldfld.i8", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_R4, "ldfld.r4", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_R8, "ldfld.r8", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_O, "ldfld.o", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_P, "ldfld.p", 2, MintOpUShortInt)
-OPDEF(MINT_LDFLD_VT, "ldfld.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_LDRMFLD, "ldrmfld", 2, MintOpFieldToken)
-OPDEF(MINT_LDRMFLD_VT, "ldrmfld.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_LDFLDA, "ldflda", 2, MintOpUShortInt)
-
-OPDEF(MINT_STFLD_I1, "stfld.i1", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_U1, "stfld.u1", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_I2, "stfld.i2", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_U2, "stfld.u2", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_I4, "stfld.i4", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_I8, "stfld.i8", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_R4, "stfld.r4", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_R8, "stfld.r8", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_O, "stfld.o", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_P, "stfld.p", 2, MintOpUShortInt)
-OPDEF(MINT_STFLD_VT, "stfld.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_STRMFLD, "strmfld", 2, MintOpFieldToken)
-OPDEF(MINT_STRMFLD_VT, "strmfld.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_LDSFLD, "ldsfld", 3, MintOpTwoShorts)
-OPDEF(MINT_LDSFLD_I4, "ldsfld.i4", 3, MintOpTwoShorts)
-OPDEF(MINT_LDSFLD_O, "ldsfld.o", 3, MintOpTwoShorts)
-OPDEF(MINT_LDSFLD_VT, "ldsfld.vt", 4, MintOpShortAndInt)
-OPDEF(MINT_STSFLD, "stsfld", 2, MintOpUShortInt)
-OPDEF(MINT_STSFLD_VT, "stsfld.vt", 4, MintOpShortAndInt)
-OPDEF(MINT_LDSFLDA, "ldsflda", 2, MintOpUShortInt)
-
-OPDEF(MINT_LDLOC_I1, "ldloc.i1", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_U1, "ldloc.u1", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_I2, "ldloc.i2", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_U2, "ldloc.u2", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_I4, "ldloc.i4", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_I8, "ldloc.i8", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_R4, "ldloc.r4", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_R8, "ldloc.r8", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_O, "ldloc.o", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_P, "ldloc.p", 2, MintOpUShortInt)
-OPDEF(MINT_LDLOC_VT, "ldloc.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_STLOC_I1, "stloc.i1", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_U1, "stloc.u1", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_I2, "stloc.i2", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_U2, "stloc.u2", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_I4, "stloc.i4", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_I8, "stloc.i8", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_R4, "stloc.r4", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_R8, "stloc.r8", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_O, "stloc.o", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_P, "stloc.p", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_VT, "stloc.vt", 4, MintOpShortAndInt)
-
-OPDEF(MINT_STLOC_NP_I4, "stloc.np.i4", 2, MintOpUShortInt)
-OPDEF(MINT_STLOC_NP_O, "stloc.np.o", 2, MintOpUShortInt)
-
-OPDEF(MINT_LDLOCA_S, "ldloca.s", 2, MintOpUShortInt)
-
-OPDEF(MINT_LDIND_I1, "ldind.i1", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_U1, "ldind.u1", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_I2, "ldind.i2", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_U2, "ldind.u2", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_I4, "ldind.i4", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_U4, "ldind.u4", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_I8, "ldind.i8", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_I, "ldind.i", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_R4, "ldind.r4", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_R8, "ldind.r8", 1, MintOpNoArgs)
-OPDEF(MINT_LDIND_REF, "ldind.ref", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_I1, "stind.i1", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_I2, "stind.i2", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_I4, "stind.i4", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_I8, "stind.i8", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_I, "stind.i", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_R4, "stind.r4", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_R8, "stind.r8", 1, MintOpNoArgs)
-OPDEF(MINT_STIND_REF, "stind.ref", 1, MintOpNoArgs)
-
-OPDEF(MINT_BR, "br", 3, MintOpBranch)
-OPDEF(MINT_LEAVE, "leave", 3, MintOpBranch)
-OPDEF(MINT_BR_S, "br.s", 2, MintOpShortBranch)
-OPDEF(MINT_LEAVE_S, "leave.s", 2, MintOpShortBranch)
-
-OPDEF(MINT_THROW, "throw", 1, MintOpNoArgs)
-OPDEF(MINT_RETHROW, "rethrow", 1, MintOpNoArgs)
-OPDEF(MINT_ENDFINALLY, "endfinally", 1, MintOpNoArgs)
-
-OPDEF(MINT_BRFALSE_I4, "brfalse.i4", 3, MintOpBranch)
-OPDEF(MINT_BRFALSE_I8, "brfalse.i8", 3, MintOpBranch)
-OPDEF(MINT_BRFALSE_R8, "brfalse.r8", 3, MintOpBranch)
-OPDEF(MINT_BRTRUE_I4, "brtrue.i4", 3, MintOpBranch)
-OPDEF(MINT_BRTRUE_I8, "brtrue.i8", 3, MintOpBranch)
-OPDEF(MINT_BRTRUE_R8, "brtrue.r8", 3, MintOpBranch)
-
-OPDEF(MINT_BRFALSE_I4_S, "brfalse.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BRFALSE_I8_S, "brfalse.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BRFALSE_R8_S, "brfalse.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BRTRUE_I4_S, "brtrue.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BRTRUE_I8_S, "brtrue.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BRTRUE_R8_S, "brtrue.r8.s", 2, MintOpShortBranch)
-
-OPDEF(MINT_BEQ_I4, "beq.i4", 3, MintOpBranch)
-OPDEF(MINT_BEQ_I8, "beq.i8", 3, MintOpBranch)
-OPDEF(MINT_BEQ_R8, "beq.r8", 3, MintOpBranch)
-OPDEF(MINT_BGE_I4, "bge.i4", 3, MintOpBranch)
-OPDEF(MINT_BGE_I8, "bge.i8", 3, MintOpBranch)
-OPDEF(MINT_BGE_R8, "bge.r8", 3, MintOpBranch)
-OPDEF(MINT_BGT_I4, "bgt.i4", 3, MintOpBranch)
-OPDEF(MINT_BGT_I8, "bgt.i8", 3, MintOpBranch)
-OPDEF(MINT_BGT_R8, "bgt.r8", 3, MintOpBranch)
-OPDEF(MINT_BLT_I4, "blt.i4", 3, MintOpBranch)
-OPDEF(MINT_BLT_I8, "blt.i8", 3, MintOpBranch)
-OPDEF(MINT_BLT_R8, "blt.r8", 3, MintOpBranch)
-OPDEF(MINT_BLE_I4, "ble.i4", 3, MintOpBranch)
-OPDEF(MINT_BLE_I8, "ble.i8", 3, MintOpBranch)
-OPDEF(MINT_BLE_R8, "ble.r8", 3, MintOpBranch)
-
-OPDEF(MINT_BNE_UN_I4, "bne.un.i4", 3, MintOpBranch)
-OPDEF(MINT_BNE_UN_I8, "bne.un.i8", 3, MintOpBranch)
-OPDEF(MINT_BNE_UN_R8, "bne.un.r8", 3, MintOpBranch)
-OPDEF(MINT_BGE_UN_I4, "bge.un.i4", 3, MintOpBranch)
-OPDEF(MINT_BGE_UN_I8, "bge.un.i8", 3, MintOpBranch)
-OPDEF(MINT_BGE_UN_R8, "bge.un.r8", 3, MintOpBranch)
-OPDEF(MINT_BGT_UN_I4, "bgt.un.i4", 3, MintOpBranch)
-OPDEF(MINT_BGT_UN_I8, "bgt.un.i8", 3, MintOpBranch)
-OPDEF(MINT_BGT_UN_R8, "bgt.un.r8", 3, MintOpBranch)
-OPDEF(MINT_BLE_UN_I4, "ble.un.i4", 3, MintOpBranch)
-OPDEF(MINT_BLE_UN_I8, "ble.un.i8", 3, MintOpBranch)
-OPDEF(MINT_BLE_UN_R8, "ble.un.r8", 3, MintOpBranch)
-OPDEF(MINT_BLT_UN_I4, "blt.un.i4", 3, MintOpBranch)
-OPDEF(MINT_BLT_UN_I8, "blt.un.i8", 3, MintOpBranch)
-OPDEF(MINT_BLT_UN_R8, "blt.un.r8", 3, MintOpBranch)
-
-OPDEF(MINT_BEQ_I4_S, "beq.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BEQ_I8_S, "beq.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BEQ_R8_S, "beq.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGE_I4_S, "bge.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGE_I8_S, "bge.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGE_R8_S, "bge.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGT_I4_S, "bgt.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGT_I8_S, "bgt.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGT_R8_S, "bgt.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLT_I4_S, "blt.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLT_I8_S, "blt.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLT_R8_S, "blt.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLE_I4_S, "ble.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLE_I8_S, "ble.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLE_R8_S, "ble.r8.s", 2, MintOpShortBranch)
-
-OPDEF(MINT_BNE_UN_I4_S, "bne.un.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BNE_UN_I8_S, "bne.un.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BNE_UN_R8_S, "bne.un.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGE_UN_I4_S, "bge.un.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGE_UN_I8_S, "bge.un.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGE_UN_R8_S, "bge.un.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGT_UN_I4_S, "bgt.un.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGT_UN_I8_S, "bgt.un.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BGT_UN_R8_S, "bgt.un.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLE_UN_I4_S, "ble.un.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLE_UN_I8_S, "ble.un.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLE_UN_R8_S, "ble.un.r8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLT_UN_I4_S, "blt.un.i4.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLT_UN_I8_S, "blt.un.i8.s", 2, MintOpShortBranch)
-OPDEF(MINT_BLT_UN_R8_S, "blt.un.r8.s", 2, MintOpShortBranch)
-
-OPDEF(MINT_SWITCH, "switch", 0, MintOpSwitch)
-
-OPDEF(MINT_LDSTR, "ldstr", 2, MintOpMethodToken) /* not really */
-
-OPDEF(MINT_CALL, "call", 2, MintOpMethodToken)
-OPDEF(MINT_VCALL, "vcall", 2, MintOpMethodToken)
-OPDEF(MINT_CALLVIRT, "callvirt", 2, MintOpMethodToken)
-OPDEF(MINT_VCALLVIRT, "vcallvirt", 2, MintOpMethodToken)
-OPDEF(MINT_CALLI, "calli", 2, MintOpMethodToken)
-OPDEF(MINT_CALLI_NAT, "calli.nat", 2, MintOpMethodToken)
-OPDEF(MINT_JMP, "jmp", 2, MintOpMethodToken)
-
-OPDEF(MINT_CALLINT, "callint", 1, MintOpNoArgs)
-OPDEF(MINT_CALLRUN, "callrun", 1, MintOpNoArgs)
-
-OPDEF(MINT_NEWOBJ, "newobj", 2, MintOpMethodToken)
-OPDEF(MINT_INITOBJ, "initobj", 3, MintOpInt)
-OPDEF(MINT_CASTCLASS, "castclass", 2, MintOpClassToken)
-OPDEF(MINT_ISINST, "isinst", 2, MintOpClassToken)
-OPDEF(MINT_NEWARR, "newarr", 2, MintOpClassToken)
-OPDEF(MINT_BOX, "box", 2, MintOpClassToken)
-OPDEF(MINT_UNBOX, "unbox", 2, MintOpClassToken)
-OPDEF(MINT_LDTOKEN, "ldtoken", 2, MintOpClassToken) /* not really */
-OPDEF(MINT_LDFTN, "ldftn", 2, MintOpMethodToken)
-OPDEF(MINT_LDVIRTFTN, "ldvirtftn", 2, MintOpMethodToken)
-OPDEF(MINT_LDOBJ, "ldobj", 2, MintOpClassToken)
-OPDEF(MINT_STOBJ, "stobj", 2, MintOpClassToken)
-OPDEF(MINT_STOBJ_VT, "stobj.vt", 2, MintOpClassToken)
-OPDEF(MINT_CPBLK, "cpblk", 1, MintOpNoArgs)
-OPDEF(MINT_INITBLK, "initblk", 1, MintOpNoArgs)
-OPDEF(MINT_LOCALLOC, "localloc", 1, MintOpNoArgs)
-OPDEF(MINT_INITLOCALS, "initlocals", 1, MintOpNoArgs)
-
-OPDEF(MINT_LDELEM_I, "ldelem.i", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_I1, "ldelem.i1", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_U1, "ldelem.u1", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_I2, "ldelem.i2", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_U2, "ldelem.u2", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_I4, "ldelem.i4", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_U4, "ldelem.u4", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_I8, "ldelem.i8", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_R4, "ldelem.r4", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_R8, "ldelem.r8", 1, MintOpNoArgs)
-OPDEF(MINT_LDELEM_REF, "ldelem.ref", 1, MintOpNoArgs)
-
-OPDEF(MINT_LDELEMA, "ldelema", 2, MintOpClassToken)
-
-OPDEF(MINT_STELEM_I, "stelem.i", 1, MintOpNoArgs)
-OPDEF(MINT_STELEM_I1, "stelem.i1", 1, MintOpNoArgs)
-OPDEF(MINT_STELEM_I2, "stelem.i2", 1, MintOpNoArgs)
-OPDEF(MINT_STELEM_I4, "stelem.i4", 1, MintOpNoArgs)
-OPDEF(MINT_STELEM_I8, "stelem.i8", 1, MintOpNoArgs)
-OPDEF(MINT_STELEM_R4, "stelem.r4", 1, MintOpNoArgs)
-OPDEF(MINT_STELEM_R8, "stelem.r8", 1, MintOpNoArgs)
-OPDEF(MINT_STELEM_REF, "stelem.ref", 1, MintOpNoArgs)
-
-OPDEF(MINT_LDLEN, "ldlen", 1, MintOpNoArgs)
-
-OPDEF(MINT_ADD_I4, "add.i4", 1, MintOpNoArgs)
-OPDEF(MINT_ADD_I8, "add.i8", 1, MintOpNoArgs)
-OPDEF(MINT_ADD_R8, "add.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_ADD1_I4, "add1.i4", 1, MintOpNoArgs)
-
-OPDEF(MINT_SUB_I4, "sub.i4", 1, MintOpNoArgs)
-OPDEF(MINT_SUB_I8, "sub.i8", 1, MintOpNoArgs)
-OPDEF(MINT_SUB_R8, "sub.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_SUB1_I4, "sub1.i4", 1, MintOpNoArgs)
-
-OPDEF(MINT_MUL_I4, "mul.i4", 1, MintOpNoArgs)
-OPDEF(MINT_MUL_I8, "mul.i8", 1, MintOpNoArgs)
-OPDEF(MINT_MUL_R8, "mul.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_DIV_I4, "div.i4", 1, MintOpNoArgs)
-OPDEF(MINT_DIV_I8, "div.i8", 1, MintOpNoArgs)
-OPDEF(MINT_DIV_R8, "div.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_DIV_UN_I4, "div.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_DIV_UN_I8, "div.un.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_ADD_OVF_I4, "add.ovf.i4", 1, MintOpNoArgs)
-OPDEF(MINT_ADD_OVF_I8, "add.ovf.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_ADD_OVF_UN_I4, "add.ovf.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_ADD_OVF_UN_I8, "add.ovf.un.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_MUL_OVF_I4, "mul.ovf.i4", 1, MintOpNoArgs)
-OPDEF(MINT_MUL_OVF_I8, "mul.ovf.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_MUL_OVF_UN_I4, "mul.ovf.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_MUL_OVF_UN_I8, "mul.ovf.un.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_SUB_OVF_I4, "sub.ovf.i4", 1, MintOpNoArgs)
-OPDEF(MINT_SUB_OVF_I8, "sub.ovf.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_SUB_OVF_UN_I4, "sub.ovf.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_SUB_OVF_UN_I8, "sub.ovf.un.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_NEG_I4, "neg.i4", 1, MintOpNoArgs)
-OPDEF(MINT_NEG_I8, "neg.i8", 1, MintOpNoArgs)
-OPDEF(MINT_NEG_R8, "neg.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_NOT_I4, "not.i4", 1, MintOpNoArgs)
-OPDEF(MINT_NOT_I8, "not.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_AND_I4, "and.i4", 1, MintOpNoArgs)
-OPDEF(MINT_AND_I8, "and.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_OR_I4, "or.i4", 1, MintOpNoArgs)
-OPDEF(MINT_OR_I8, "or.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_XOR_I4, "xor.i4", 1, MintOpNoArgs)
-OPDEF(MINT_XOR_I8, "xor.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_REM_I4, "rem.i4", 1, MintOpNoArgs)
-OPDEF(MINT_REM_I8, "rem.i8", 1, MintOpNoArgs)
-OPDEF(MINT_REM_R8, "rem.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_REM_UN_I4, "rem.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_REM_UN_I8, "rem.un.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_SHR_UN_I4, "shr.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_SHR_UN_I8, "shr.un.i8", 1, MintOpNoArgs)
-OPDEF(MINT_SHL_I4, "shl.i4", 1, MintOpNoArgs)
-OPDEF(MINT_SHL_I8, "shl.i8", 1, MintOpNoArgs)
-OPDEF(MINT_SHR_I4, "shr.i4", 1, MintOpNoArgs)
-OPDEF(MINT_SHR_I8, "shr.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_R_UN_I4, "conv.r.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_R_UN_I8, "conv.r.un.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_I1_I4, "conv.i1.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_I1_I8, "conv.i1.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_I1_R8, "conv.i1.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_U1_I4, "conv.u1.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_U1_I8, "conv.u1.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_U1_R8, "conv.u1.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_I2_I4, "conv.i2.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_I2_I8, "conv.i2.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_I2_R8, "conv.i2.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_U2_I4, "conv.u2.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_U2_I8, "conv.u2.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_U2_R8, "conv.u2.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_I4_I8, "conv.i4.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_I4_R8, "conv.i4.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_U4_I8, "conv.u4.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_U4_R8, "conv.u4.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_I8_I4, "conv.i8.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_I8_U4, "conv.i8.u4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_I8_R8, "conv.i8.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_R4_I4, "conv.r4.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_R4_I8, "conv.r4.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_R4_R8, "conv.r4.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_R8_I4, "conv.r8.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_R8_I8, "conv.r8.i8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_I4_I8_SP, "conv.i4.i8.sp", 1, MintOpNoArgs) /* special for narrowing sp[-2] on 64 bits */
-OPDEF(MINT_CONV_I8_I4_SP, "conv.i8.i4.sp", 1, MintOpNoArgs) /* special for widening sp[-2] on 64 bits */
-
-OPDEF(MINT_CONV_U8_I4, "conv.u8.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_U8_R8, "conv.u8.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_I1_I4, "conv.ovf.i1.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_I1_I8, "conv.ovf.i1.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_I1_R8, "conv.ovf.i1.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_U1_I4, "conv.ovf.u1.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_U1_I8, "conv.ovf.u1.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_U1_R8, "conv.ovf.u1.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_I2_I4, "conv.ovf.i2.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_I2_I8, "conv.ovf.i2.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_I2_R8, "conv.ovf.i2.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_U2_I4, "conv.ovf.u2.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_U2_I8, "conv.ovf.u2.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_U2_R8, "conv.ovf.u2.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_I4_U4, "conv.ovf.i4.u4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_I4_I8, "conv.ovf.i4.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_I4_R8, "conv.ovf.i4.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_I4_UN_I8, "conv.ovf.i4.un.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_I4_UN_R8, "conv.ovf.i4.un.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_U4_I4, "conv.ovf.u4.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_U4_I8, "conv.ovf.u4.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_U4_R8, "conv.ovf.u4.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_I8_R8, "conv.ovf.i8.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_I8_UN_R8, "conv.ovf.i8.un.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CONV_OVF_U8_I4, "conv.ovf.u8.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CONV_OVF_U8_R8, "conv.ovf.u8.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CEQ_I4, "ceq.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CEQ_I8, "ceq.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CEQ_R8, "ceq.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CEQ0_I4, "ceq0.i4", 1, MintOpNoArgs)
-
-OPDEF(MINT_CGT_I4, "cgt.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CGT_I8, "cgt.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CGT_R8, "cgt.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CGT_UN_I4, "cgt.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CGT_UN_I8, "cgt.un.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CGT_UN_R8, "cgt.un.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CLT_I4, "clt.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CLT_I8, "clt.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CLT_R8, "clt.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CLT_UN_I4, "clt.un.i4", 1, MintOpNoArgs)
-OPDEF(MINT_CLT_UN_I8, "clt.un.i8", 1, MintOpNoArgs)
-OPDEF(MINT_CLT_UN_R8, "clt.un.r8", 1, MintOpNoArgs)
-
-OPDEF(MINT_CKFINITE, "ckfinite", 1, MintOpNoArgs)
-
-OPDEF(MINT_CKNULL, "cknull", 1, MintOpNoArgs)
-
-OPDEF(MINT_GETCHR, "getchr", 1, MintOpNoArgs)
-OPDEF(MINT_STRLEN, "strlen", 1, MintOpNoArgs)
-OPDEF(MINT_ARRAY_RANK, "array_rank", 1, MintOpNoArgs)
-
-OPDEF(MINT_ICALL_V_V, "mono_icall_v_v", 2, MintOpClassToken) /* not really */
-OPDEF(MINT_ICALL_P_V, "mono_icall_p_v", 2, MintOpClassToken)
-OPDEF(MINT_ICALL_P_P, "mono_icall_p_p", 2, MintOpClassToken)
-OPDEF(MINT_ICALL_PP_V, "mono_icall_pp_v", 2, MintOpClassToken)
-OPDEF(MINT_ICALL_PI_V, "mono_icall_pi_v", 2, MintOpClassToken)
-OPDEF(MINT_ICALL_PP_P, "mono_icall_pp_p", 2, MintOpClassToken)
-OPDEF(MINT_ICALL_PI_P, "mono_icall_pi_p", 2, MintOpClassToken)
-OPDEF(MINT_ICALL_PPP_V, "mono_icall_ppp_v", 2, MintOpClassToken)
-OPDEF(MINT_ICALL_PPI_V, "mono_icall_ppi_v", 2, MintOpClassToken)
-OPDEF(MINT_MONO_LDPTR, "mono_ldptr", 2, MintOpClassToken)
-OPDEF(MINT_MONO_NEWOBJ, "mono_newobj", 2, MintOpClassToken)
-OPDEF(MINT_MONO_RETOBJ, "mono_retobj", 1, MintOpNoArgs)
-OPDEF(MINT_MONO_FREE, "mono_free", 1, MintOpNoArgs)
-
-
diff --git a/mono/interpreter/mintops.h b/mono/interpreter/mintops.h
deleted file mode 100644
index e787526e2fe..00000000000
--- a/mono/interpreter/mintops.h
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifndef __INTERPRETER_MINTOPS_H
-#define __INTERPRETER_MINTOPS_H
-
-#include <glib.h>
-
-typedef enum
-{
- MintOpNoArgs,
- MintOpShortInt,
- MintOpUShortInt,
- MintOpInt,
- MintOpLongInt,
- MintOpFloat,
- MintOpDouble,
- MintOpBranch,
- MintOpShortBranch,
- MintOpSwitch,
- MintOpMethodToken,
- MintOpFieldToken,
- MintOpClassToken,
- MintOpTwoShorts,
- MintOpShortAndInt
-} MintOpArgType;
-
-#define OPDEF(a,b,c,d) \
- a,
-enum {
-#include "mintops.def"
- MINT_LASTOP
-};
-#undef OPDEF
-
-#if NO_UNALIGNED_ACCESS
-# if G_BYTE_ORDER == G_LITTLE_ENDIAN
-#define READ32(x) (((guint16 *)(x)) [0] | ((guint16 *)(x)) [1] << 16)
-#define READ64(x) ((guint64)((guint16 *)(x)) [0] | \
- (guint64)((guint16 *)(x)) [1] << 16 | \
- (guint64)((guint16 *)(x)) [2] << 32 | \
- (guint64)((guint16 *)(x)) [3] << 48)
-# else
-#define READ32(x) (((guint16 *)(x)) [0] << 16 | ((guint16 *)(x)) [1])
-#define READ64(x) ((guint64)((guint16 *)(x)) [0] << 48 | \
- (guint64)((guint16 *)(x)) [1] << 32 | \
- (guint64)((guint16 *)(x)) [2] << 16 | \
- (guint64)((guint16 *)(x)) [3])
-# endif
-#else /* unaligned access OK */
-#define READ32(x) (*(guint32 *)(x))
-#define READ64(x) (*(guint64 *)(x))
-#endif
-
-extern const char *mono_interp_opname[];
-extern unsigned char mono_interp_oplen[];
-extern MintOpArgType mono_interp_opargtype[];
-extern const guint16 *mono_interp_dis_mintop(const unsigned short *base, const guint16 *ip);
-
-#endif
-
diff --git a/mono/interpreter/transform.c b/mono/interpreter/transform.c
deleted file mode 100644
index b47e594ef49..00000000000
--- a/mono/interpreter/transform.c
+++ /dev/null
@@ -1,3049 +0,0 @@
-/*
- * transform CIL into different opcodes for more
- * efficient interpretation
- *
- * Written by Bernie Solomon (bernard@ugsolutions.com)
- * Copyright (c) 2004.
- */
-
-#include <string.h>
-#include <mono/metadata/appdomain.h>
-#include <mono/metadata/debug-helpers.h>
-#include <mono/metadata/exception.h>
-#include <mono/metadata/mono-endian.h>
-#include <mono/metadata/marshal.h>
-#include <mono/metadata/profiler-private.h>
-#include <mono/metadata/tabledefs.h>
-
-#define OPDEF(a,b,c,d,e,f,g,h,i,j) \
- a = i,
-
-enum {
-#include "mono/cil/opcode.def"
- CEE_LASTOP
-};
-#undef OPDEF
-
-#include "mintops.h"
-#include "interp.h"
-
-#define DEBUG 0
-
-typedef struct
-{
- MonoClass *klass;
- unsigned char type;
- unsigned char flags;
-} StackInfo;
-
-typedef struct
-{
- MonoMethod *method;
- MonoMethodHeader *header;
- RuntimeMethod *rtm;
- const unsigned char *il_code;
- const unsigned char *ip;
- const unsigned char *last_ip;
- const unsigned char *in_start;
- int code_size;
- int *in_offsets;
- int *forward_refs;
- StackInfo **stack_state;
- int *stack_height;
- int *vt_stack_size;
- unsigned char *is_bb_start;
- unsigned short *new_code;
- unsigned short *new_code_end;
- unsigned short *new_ip;
- unsigned short *last_new_ip;
- unsigned int max_code_size;
- StackInfo *stack;
- StackInfo *sp;
- unsigned int max_stack_height;
- unsigned int vt_sp;
- unsigned int max_vt_sp;
- int n_data_items;
- int max_data_items;
- void **data_items;
- GHashTable *data_hash;
-} TransformData;
-
-#define MINT_TYPE_I1 0
-#define MINT_TYPE_U1 1
-#define MINT_TYPE_I2 2
-#define MINT_TYPE_U2 3
-#define MINT_TYPE_I4 4
-#define MINT_TYPE_I8 5
-#define MINT_TYPE_R4 6
-#define MINT_TYPE_R8 7
-#define MINT_TYPE_O 8
-#define MINT_TYPE_P 9
-#define MINT_TYPE_VT 10
-
-#define STACK_TYPE_I4 0
-#define STACK_TYPE_I8 1
-#define STACK_TYPE_R8 2
-#define STACK_TYPE_O 3
-#define STACK_TYPE_VT 4
-#define STACK_TYPE_MP 5
-#define STACK_TYPE_F 6
-
-static const char *stack_type_string [] = { "I4", "I8", "R8", "O ", "VT", "MP", "F " };
-
-#if SIZEOF_VOID_P == 8
-#define STACK_TYPE_I STACK_TYPE_I8
-#else
-#define STACK_TYPE_I STACK_TYPE_I4
-#endif
-
-static int stack_type [] = {
- STACK_TYPE_I4, /*I1*/
- STACK_TYPE_I4, /*U1*/
- STACK_TYPE_I4, /*I2*/
- STACK_TYPE_I4, /*U2*/
- STACK_TYPE_I4, /*I4*/
- STACK_TYPE_I8, /*I8*/
- STACK_TYPE_R8, /*R4*/
- STACK_TYPE_R8, /*R8*/
- STACK_TYPE_O, /*O*/
- STACK_TYPE_MP, /*P*/
- STACK_TYPE_VT
-};
-
-static void
-grow_code (TransformData *td)
-{
- unsigned int old_ip_offset = td->new_ip - td->new_code;
- unsigned int old_last_ip_offset = td->last_new_ip - td->new_code;
- g_assert (old_ip_offset <= td->max_code_size);
- td->new_code = g_realloc (td->new_code, (td->max_code_size *= 2) * sizeof (td->new_code [0]));
- td->new_code_end = td->new_code + td->max_code_size;
- td->new_ip = td->new_code + old_ip_offset;
- td->last_new_ip = td->new_code + old_last_ip_offset;
-}
-
-#define ENSURE_CODE(td, n) \
- do { \
- if ((td)->new_ip + (n) > (td)->new_code_end) \
- grow_code (td); \
- } while (0)
-
-#define ADD_CODE(td, n) \
- do { \
- if ((td)->new_ip == (td)->new_code_end) \
- grow_code (td); \
- *(td)->new_ip++ = (n); \
- } while (0)
-
-#define CHECK_STACK(td, n) \
- do { \
- int stack_size = (td)->sp - (td)->stack; \
- if (stack_size < (n)) \
- g_warning ("%s.%s: not enough values (%d < %d) on stack at %04x", \
- (td)->method->klass->name, (td)->method->name, \
- stack_size, n, (td)->ip - (td)->il_code); \
- } while (0)
-
-#define ENSURE_I4(td, sp_off) \
- do { \
- if ((td)->sp [-sp_off].type == STACK_TYPE_I8) \
- ADD_CODE(td, sp_off == 1 ? MINT_CONV_I4_I8 : MINT_CONV_I4_I8_SP); \
- } while (0)
-
-static void
-handle_branch(TransformData *td, int short_op, int long_op, int offset)
-{
- int shorten_branch = 0;
- int target = td->ip + offset - td->il_code;
- if (target < 0 || target >= td->code_size)
- g_assert_not_reached ();
- if (offset > 0 && td->stack_height [target] < 0) {
- td->stack_height [target] = td->sp - td->stack;
- if (td->stack_height [target] > 0)
- td->stack_state [target] = g_memdup (td->stack, td->stack_height [target] * sizeof (td->stack [0]));
- td->vt_stack_size [target] = td->vt_sp;
- }
- if (offset < 0) {
- offset = td->in_offsets [target] - (td->new_ip - td->new_code);
- if (offset >= -32768) {
- shorten_branch = 1;
- }
- } else {
- int prev = td->forward_refs [target];
- td->forward_refs [td->ip - td->il_code] = prev;
- td->forward_refs [target] = td->ip - td->il_code;
- offset = 0;
- if (td->header->code_size <= 25000) /* FIX to be precise somehow? */
- shorten_branch = 1;
- }
- if (shorten_branch) {
- ADD_CODE(td, short_op);
- ADD_CODE(td, offset);
- } else {
- ADD_CODE(td, long_op);
- ADD_CODE(td, * (unsigned short *)(&offset));
- ADD_CODE(td, * ((unsigned short *)&offset + 1));
- }
-}
-
-static void
-one_arg_branch(TransformData *td, int mint_op, int offset)
-{
- int type = td->sp [-1].type == STACK_TYPE_O || td->sp [-1].type == STACK_TYPE_MP ? STACK_TYPE_I : td->sp [-1].type;
- int long_op = mint_op + type - STACK_TYPE_I4;
- int short_op = long_op + MINT_BRFALSE_I4_S - MINT_BRFALSE_I4;
- CHECK_STACK(td, 1);
- --td->sp;
- handle_branch (td, short_op, long_op, offset);
-}
-
-static void
-two_arg_branch(TransformData *td, int mint_op, int offset)
-{
- int type1 = td->sp [-1].type == STACK_TYPE_O || td->sp [-1].type == STACK_TYPE_MP ? STACK_TYPE_I : td->sp [-1].type;
- int type2 = td->sp [-2].type == STACK_TYPE_O || td->sp [-2].type == STACK_TYPE_MP ? STACK_TYPE_I : td->sp [-2].type;
- int long_op = mint_op + type1 - STACK_TYPE_I4;
- int short_op = long_op + MINT_BEQ_I4_S - MINT_BEQ_I4;
- CHECK_STACK(td, 2);
- if (type1 == STACK_TYPE_I4 && type2 == STACK_TYPE_I8) {
- ADD_CODE(td, MINT_CONV_I8_I4);
- td->in_offsets [td->ip - td->il_code]++;
- } else if (type1 == STACK_TYPE_I8 && type2 == STACK_TYPE_I4) {
- ADD_CODE(td, MINT_CONV_I8_I4_SP);
- td->in_offsets [td->ip - td->il_code]++;
- } else if (type1 != type2) {
- g_warning("%s.%s: branch type mismatch %d %d",
- td->method->klass->name, td->method->name,
- td->sp [-1].type, td->sp [-2].type);
- }
- td->sp -= 2;
- handle_branch (td, short_op, long_op, offset);
-}
-
-static void
-unary_arith_op(TransformData *td, int mint_op)
-{
- int op = mint_op + td->sp [-1].type - STACK_TYPE_I4;
- CHECK_STACK(td, 1);
- ADD_CODE(td, op);
-}
-
-static void
-binary_arith_op(TransformData *td, int mint_op)
-{
- int type1 = td->sp [-2].type;
- int type2 = td->sp [-1].type;
- int op;
-#if SIZEOF_VOID_P == 8
- if ((type1 == STACK_TYPE_MP || type1 == STACK_TYPE_I8) && type2 == STACK_TYPE_I4) {
- ADD_CODE(td, MINT_CONV_I8_I4);
- type2 = STACK_TYPE_I8;
- }
- if (type1 == STACK_TYPE_I4 && (type2 == STACK_TYPE_MP || type2 == STACK_TYPE_I8)) {
- ADD_CODE(td, MINT_CONV_I8_I4_SP);
- type1 = STACK_TYPE_I8;
- td->sp [-2].type = STACK_TYPE_I8;
- }
-#endif
- if (type1 == STACK_TYPE_MP)
- type1 = STACK_TYPE_I;
- if (type2 == STACK_TYPE_MP)
- type2 = STACK_TYPE_I;
- if (type1 != type2) {
- g_warning("%s.%s: %04x arith type mismatch %s %d %d",
- td->method->klass->name, td->method->name,
- td->ip - td->il_code, mono_interp_opname[mint_op], type1, type2);
- }
- op = mint_op + type1 - STACK_TYPE_I4;
- CHECK_STACK(td, 2);
- ADD_CODE(td, op);
- --td->sp;
-}
-
-static void
-binary_int_op(TransformData *td, int mint_op)
-{
- int op = mint_op + td->sp [-1].type - STACK_TYPE_I4;
- CHECK_STACK(td, 2);
- if (td->sp [-1].type != td->sp [-2].type)
- g_warning("%s.%s: int type mismatch", td->method->klass->name, td->method->name);
- ADD_CODE(td, op);
- --td->sp;
-}
-
-static void
-shift_op(TransformData *td, int mint_op)
-{
- int op = mint_op + td->sp [-2].type - STACK_TYPE_I4;
- CHECK_STACK(td, 2);
- if (td->sp [-1].type != STACK_TYPE_I4) {
- g_warning("%s.%s: shift type mismatch %d",
- td->method->klass->name, td->method->name,
- td->sp [-2].type);
- }
- ADD_CODE(td, op);
- --td->sp;
-}
-
-static int
-mint_type(MonoType *type)
-{
- if (type->byref)
- return MINT_TYPE_P;
-enum_type:
- switch (type->type) {
- case MONO_TYPE_I1:
- return MINT_TYPE_I1;
- case MONO_TYPE_U1:
- case MONO_TYPE_BOOLEAN:
- return MINT_TYPE_U1;
- case MONO_TYPE_I2:
- return MINT_TYPE_I2;
- case MONO_TYPE_U2:
- case MONO_TYPE_CHAR:
- return MINT_TYPE_U2;
- case MONO_TYPE_I4:
- case MONO_TYPE_U4:
- return MINT_TYPE_I4;
- case MONO_TYPE_I:
- case MONO_TYPE_U:
-#if SIZEOF_VOID_P == 4
- return MINT_TYPE_I4;
-#else
- return MINT_TYPE_I8;
-#endif
- case MONO_TYPE_PTR:
- return MINT_TYPE_P;
- case MONO_TYPE_R4:
- return MINT_TYPE_R4;
- case MONO_TYPE_I8:
- case MONO_TYPE_U8:
- return MINT_TYPE_I8;
- case MONO_TYPE_R8:
- return MINT_TYPE_R8;
- case MONO_TYPE_STRING:
- case MONO_TYPE_SZARRAY:
- case MONO_TYPE_CLASS:
- case MONO_TYPE_OBJECT:
- case MONO_TYPE_ARRAY:
- return MINT_TYPE_O;
- case MONO_TYPE_VALUETYPE:
- if (type->data.klass->enumtype) {
- type = type->data.klass->enum_basetype;
- goto enum_type;
- } else
- return MINT_TYPE_VT;
- default:
- g_warning ("got type 0x%02x", type->type);
- g_assert_not_reached ();
- }
- return -1;
-}
-
-static int
-can_store (int stack_type, int var_type)
-{
- if (stack_type == STACK_TYPE_O || stack_type == STACK_TYPE_MP)
- stack_type = STACK_TYPE_I;
- if (var_type == STACK_TYPE_O || var_type == STACK_TYPE_MP)
- var_type = STACK_TYPE_I;
- return stack_type == var_type;
-}
-
-#define SET_SIMPLE_TYPE(s, ty) \
- do { \
- (s)->type = (ty); \
- (s)->flags = 0; \
- (s)->klass = NULL; \
- } while (0)
-
-#define SET_TYPE(s, ty, k) \
- do { \
- (s)->type = (ty); \
- (s)->flags = 0; \
- (s)->klass = k; \
- } while (0)
-
-#define PUSH_SIMPLE_TYPE(td, ty) \
- do { \
- int sp_height; \
- (td)->sp++; \
- sp_height = (td)->sp - (td)->stack; \
- if (sp_height > (td)->max_stack_height) \
- (td)->max_stack_height = sp_height; \
- SET_SIMPLE_TYPE((td)->sp - 1, ty); \
- } while (0)
-
-#define PUSH_TYPE(td, ty, k) \
- do { \
- int sp_height; \
- (td)->sp++; \
- sp_height = (td)->sp - (td)->stack; \
- if (sp_height > (td)->max_stack_height) \
- (td)->max_stack_height = sp_height; \
- SET_TYPE((td)->sp - 1, ty, k); \
- } while (0)
-
-#define PUSH_VT(td, size) \
- do { \
- (td)->vt_sp += ((size) + 7) & ~7; \
- if ((td)->vt_sp > (td)->max_vt_sp) \
- (td)->max_vt_sp = (td)->vt_sp; \
- } while (0)
-
-#define POP_VT(td, size) \
- do { \
- (td)->vt_sp -= ((size) + 7) & ~7; \
- } while (0)
-
-#if NO_UNALIGNED_ACCESS
-#define WRITE32(td, v) \
- do { \
- ENSURE_CODE(td, 2); \
- * (guint16 *)((td)->new_ip) = * (guint16 *)(v); \
- * ((guint16 *)((td)->new_ip) + 1) = * ((guint16 *)(v) + 1); \
- (td)->new_ip += 2; \
- } while (0)
-
-#define WRITE64(td, v) \
- do { \
- ENSURE_CODE(td, 4); \
- * (guint16 *)((td)->new_ip) = * (guint16 *)(v); \
- * ((guint16 *)((td)->new_ip) + 1) = * ((guint16 *)(v) + 1); \
- * ((guint16 *)((td)->new_ip) + 2) = * ((guint16 *)(v) + 2); \
- * ((guint16 *)((td)->new_ip) + 3) = * ((guint16 *)(v) + 3); \
- (td)->new_ip += 4; \
- } while (0)
-#else
-#define WRITE32(td, v) \
- do { \
- ENSURE_CODE(td, 2); \
- * (guint32 *)((td)->new_ip) = * (guint32 *)(v); \
- (td)->new_ip += 2; \
- } while (0)
-
-#define WRITE64(td, v) \
- do { \
- ENSURE_CODE(td, 4); \
- * (guint64 *)((td)->new_ip) = * (guint64 *)(v); \
- (td)->new_ip += 4; \
- } while (0)
-
-#endif
-
-static void
-load_arg(TransformData *td, int n)
-{
- int mt;
- MonoClass *klass = NULL;
- if (n == 0 && mono_method_signature (td->method)->hasthis) {
- if (td->method->klass->valuetype)
- mt = MINT_TYPE_P;
- else {
- mt = MINT_TYPE_O;
- klass = td->method->klass;
- }
- ADD_CODE(td, MINT_LDTHIS);
- } else {
- MonoType *type;
- n -= mono_method_signature (td->method)->hasthis;
- type = mono_method_signature (td->method)->params [n];
- mt = mint_type (type);
- if (mt == MINT_TYPE_VT) {
- gint32 size;
- if (mono_method_signature (td->method)->pinvoke)
- size = mono_class_native_size (type->data.klass, NULL);
- else
- size = mono_class_value_size (type->data.klass, NULL);
- PUSH_VT(td, size);
- ADD_CODE(td, MINT_LDARG_VT);
- ADD_CODE(td, td->rtm->arg_offsets [n]); /* FIX for large offset */
- WRITE32(td, &size);
- klass = type->data.klass;
- } else {
- ADD_CODE(td, MINT_LDARG_I1 + (mt - MINT_TYPE_I1));
- ADD_CODE(td, td->rtm->arg_offsets [n]); /* FIX for large offset */
- if (mt == MINT_TYPE_O)
- klass = mono_class_from_mono_type (type);
- }
- }
- PUSH_TYPE(td, stack_type[mt], klass);
-}
-
-static void
-store_arg(TransformData *td, int n)
-{
- int mt;
- CHECK_STACK (td, 1);
- if (n == 0 && mono_method_signature (td->method)->hasthis)
- ADD_CODE(td, MINT_STTHIS);
- else {
- MonoType *type;
- n -= mono_method_signature (td->method)->hasthis;
- type = mono_method_signature (td->method)->params [n];
- mt = mint_type (type);
- if (mt == MINT_TYPE_VT) {
- gint32 size;
- if (mono_method_signature (td->method)->pinvoke)
- size = mono_class_native_size (type->data.klass, NULL);
- else
- size = mono_class_value_size (type->data.klass, NULL);
- ADD_CODE(td, MINT_STARG_VT);
- ADD_CODE(td, n);
- WRITE32(td, &size);
- if (td->sp [-1].type == STACK_TYPE_VT)
- POP_VT(td, size);
- } else {
- ADD_CODE(td, MINT_STARG_I1 + (mt - MINT_TYPE_I1));
- ADD_CODE(td, td->rtm->arg_offsets [n]);
- }
- }
- --td->sp;
-}
-
-static void
-store_inarg(TransformData *td, int n)
-{
- MonoType *type = mono_method_signature (td->method)->params [n];
- int mt = mint_type (type);
- if (mt == MINT_TYPE_VT) {
- gint32 size;
- if (mono_method_signature (td->method)->pinvoke)
- size = mono_class_native_size (type->data.klass, NULL);
- else
- size = mono_class_value_size (type->data.klass, NULL);
- ADD_CODE(td, MINT_STINARG_VT);
- ADD_CODE(td, n);
- WRITE32(td, &size);
- } else {
- ADD_CODE(td, MINT_STINARG_I1 + (mt - MINT_TYPE_I1));
- ADD_CODE(td, n);
- }
-}
-
-static void
-load_local(TransformData *td, int n)
-{
- MonoType *type = td->header->locals [n];
- int mt = mint_type (type);
- int offset = td->rtm->local_offsets [n];
- MonoClass *klass = NULL;
- if (mt == MINT_TYPE_VT) {
- gint32 size = mono_class_value_size (type->data.klass, NULL);
- PUSH_VT(td, size);
- ADD_CODE(td, MINT_LDLOC_VT);
- ADD_CODE(td, offset); /*FIX for large offset */
- WRITE32(td, &size);
- klass = type->data.klass;
- } else {
- if (mt == MINT_TYPE_I4 && !td->is_bb_start [td->in_start - td->il_code] && td->last_new_ip != NULL &&
- td->last_new_ip [0] == MINT_STLOC_I4 && td->last_new_ip [1] == offset) {
- td->last_new_ip [0] = MINT_STLOC_NP_I4;
- } else if (mt == MINT_TYPE_O && !td->is_bb_start [td->in_start - td->il_code] && td->last_new_ip != NULL &&
- td->last_new_ip [0] == MINT_STLOC_O && td->last_new_ip [1] == offset) {
- td->last_new_ip [0] = MINT_STLOC_NP_O;
- } else {
- ADD_CODE(td, MINT_LDLOC_I1 + (mt - MINT_TYPE_I1));
- ADD_CODE(td, offset); /*FIX for large offset */
- }
- if (mt == MINT_TYPE_O)
- klass = mono_class_from_mono_type (type);
- }
- PUSH_TYPE(td, stack_type[mt], klass);
-}
-
-static void
-store_local(TransformData *td, int n)
-{
- MonoType *type = td->header->locals [n];
- int mt = mint_type (type);
- int offset = td->rtm->local_offsets [n];
- CHECK_STACK (td, 1);
-#if SIZEOF_VOID_P == 8
- if (td->sp [-1].type == STACK_TYPE_I4 && stack_type [mt] == STACK_TYPE_I8) {
- ADD_CODE(td, MINT_CONV_I8_I4);
- td->sp [-1].type = STACK_TYPE_I8;
- }
-#endif
- if (!can_store(td->sp [-1].type, stack_type [mt])) {
- g_warning("%s.%s: Store local stack type mismatch %d %d",
- td->method->klass->name, td->method->name,
- stack_type [mt], td->sp [-1].type);
- }
- if (mt == MINT_TYPE_VT) {
- gint32 size = mono_class_value_size (type->data.klass, NULL);
- ADD_CODE(td, MINT_STLOC_VT);
- ADD_CODE(td, offset); /*FIX for large offset */
- WRITE32(td, &size);
- if (td->sp [-1].type == STACK_TYPE_VT)
- POP_VT(td, size);
- } else {
- ADD_CODE(td, MINT_STLOC_I1 + (mt - MINT_TYPE_I1));
- ADD_CODE(td, offset); /*FIX for large offset */
- }
- --td->sp;
-}
-
-#define SIMPLE_OP(td, op) \
- do { \
- ADD_CODE(&td, op); \
- ++td.ip; \
- } while (0)
-
-static guint16
-get_data_item_index (TransformData *td, void *ptr)
-{
- gpointer p = g_hash_table_lookup (td->data_hash, ptr);
- guint index;
- if (p != NULL)
- return GPOINTER_TO_UINT (p) - 1;
- if (td->max_data_items == td->n_data_items) {
- td->max_data_items = td->n_data_items == 0 ? 16 : 2 * td->max_data_items;
- td->data_items = g_realloc (td->data_items, td->max_data_items * sizeof(td->data_items [0]));
- }
- index = td->n_data_items;
- td->data_items [index] = ptr;
- ++td->n_data_items;
- g_hash_table_insert (td->data_hash, ptr, GUINT_TO_POINTER (index + 1));
- return index;
-}
-
-static void
-generate(MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start)
-{
- MonoMethodHeader *header = mono_method_get_header (method);
- MonoMethodSignature *signature = mono_method_signature (method);
- MonoImage *image = method->klass->image;
- MonoDomain *domain = mono_domain_get ();
- MonoGenericContext *generic_context = NULL;
- int offset, mt;
- int i;
- int i32;
- MonoClass *klass;
- MonoClassField *field;
- const unsigned char *end;
- int new_in_start_offset;
- int body_start_offset;
- int target;
- guint32 token;
- TransformData td;
- int generating_code = 1;
-
- if (mono_method_signature (method)->is_inflated)
- generic_context = ((MonoMethodInflated *) method)->context;
-
- memset(&td, 0, sizeof(td));
- td.method = method;
- td.rtm = rtm;
- td.is_bb_start = is_bb_start;
- td.il_code = header->code;
- td.code_size = header->code_size;
- td.header = header;
- td.max_code_size = td.code_size;
- td.new_code = (unsigned short *)g_malloc(td.max_code_size * sizeof(gushort));
- td.new_code_end = td.new_code + td.max_code_size;
- td.in_offsets = g_malloc0(header->code_size * sizeof(int));
- td.forward_refs = g_malloc(header->code_size * sizeof(int));
- td.stack_state = g_malloc0(header->code_size * sizeof(StackInfo *));
- td.stack_height = g_malloc(header->code_size * sizeof(int));
- td.vt_stack_size = g_malloc(header->code_size * sizeof(int));
- td.n_data_items = 0;
- td.max_data_items = 0;
- td.data_items = NULL;
- td.data_hash = g_hash_table_new (NULL, NULL);
- rtm->data_items = td.data_items;
- for (i = 0; i < header->code_size; i++) {
- td.forward_refs [i] = -1;
- td.stack_height [i] = -1;
- }
- td.new_ip = td.new_code;
- td.last_new_ip = NULL;
-
- td.stack = g_malloc0(header->max_stack * sizeof(td.stack[0]));
- td.sp = td.stack;
- td.max_stack_height = 0;
-
- for (i = 0; i < header->num_clauses; i++) {
- MonoExceptionClause *c = header->clauses + i;
- td.stack_height [c->handler_offset] = 0;
- td.vt_stack_size [c->handler_offset] = 0;
- td.is_bb_start [c->handler_offset] = 1;
- if (c->flags == MONO_EXCEPTION_CLAUSE_NONE) {
- td.stack_height [c->handler_offset] = 1;
- td.stack_state [c->handler_offset] = g_malloc0(sizeof(StackInfo));
- td.stack_state [c->handler_offset][0].type = STACK_TYPE_O;
- td.stack_state [c->handler_offset][0].klass = NULL; /*FIX*/
- }
- }
-
- td.ip = header->code;
- end = td.ip + header->code_size;
-
- if (mono_interp_traceopt) {
- char *tmp = mono_disasm_code (NULL, method, td.ip, end);
- char *name = mono_method_full_name (method, TRUE);
- g_print ("Method %s, original code:\n", name);
- g_print ("%s\n", tmp);
- g_free (tmp);
- g_free (name);
- }
-
- for (i = 0; i < signature->param_count; i++)
- store_inarg(&td, i);
-
- body_start_offset = td.new_ip - td.new_code;
-
- for (i = 0; i < header->num_locals; i++) {
- int mt = mint_type(header->locals [i]);
- if (mt == MINT_TYPE_VT || mt == MINT_TYPE_O) {
- ADD_CODE(&td, MINT_INITLOCALS);
- break;
- }
- }
-
- while (td.ip < end) {
- int in_offset;
-
- g_assert (td.sp >= td.stack);
- g_assert (td.vt_sp < 0x10000000);
- in_offset = td.ip - header->code;
- td.in_offsets [in_offset] = td.new_ip - td.new_code;
- new_in_start_offset = td.new_ip - td.new_code;
- td.in_start = td.ip;
- while (td.forward_refs [in_offset] >= 0) {
- int j = td.forward_refs [in_offset];
- int slot;
- td.forward_refs [in_offset] = td.forward_refs [j];
- if (td.in_offsets [j] < 0) {
- int old_switch_offset = -td.in_offsets [j];
- int new_switch_offset = td.in_offsets [old_switch_offset];
- int switch_case = (j - old_switch_offset - 5) / 4;
- int n_cases = read32 (header->code + old_switch_offset + 1);
- offset = (td.new_ip - td.new_code) - (new_switch_offset + 2 * n_cases + 3);
- slot = new_switch_offset + 3 + 2 * switch_case;
- td.new_code [slot] = * (unsigned short *)(&offset);
- td.new_code [slot + 1] = * ((unsigned short *)&offset + 1);
- } else {
- int op = td.new_code [td.in_offsets [j]];
- if (mono_interp_opargtype [op] == MintOpShortBranch) {
- offset = (td.new_ip - td.new_code) - td.in_offsets [j];
- g_assert (offset <= 32767);
- slot = td.in_offsets [j] + 1;
- td.new_code [slot] = offset;
- } else {
- offset = (td.new_ip - td.new_code) - td.in_offsets [j];
- slot = td.in_offsets [j] + 1;
- td.new_code [slot] = * (unsigned short *)(&offset);
- td.new_code [slot + 1] = * ((unsigned short *)&offset + 1);
- }
- }
- }
- if (td.stack_height [in_offset] >= 0) {
- g_assert (is_bb_start [in_offset]);
- if (td.stack_height [in_offset] > 0)
- memcpy (td.stack, td.stack_state [in_offset], td.stack_height [in_offset] * sizeof(td.stack [0]));
- td.sp = td.stack + td.stack_height [in_offset];
- td.vt_sp = td.vt_stack_size [in_offset];
- }
- if (is_bb_start [in_offset]) {
- generating_code = 1;
- }
- if (!generating_code) {
- while (td.ip < end && !is_bb_start [td.ip - td.il_code])
- ++td.ip;
- continue;
- }
- if (mono_interp_traceopt > 1) {
- printf("IL_%04x %s %-10s -> IL_%04x, sp %d, %s %-12s vt_sp %u (max %u)\n",
- td.ip - td.il_code,
- td.is_bb_start [td.ip - td.il_code] == 3 ? "<>" :
- td.is_bb_start [td.ip - td.il_code] == 2 ? "< " :
- td.is_bb_start [td.ip - td.il_code] == 1 ? " >" : " ",
- mono_opcode_name (*td.ip), td.new_ip - td.new_code, td.sp - td.stack,
- td.sp > td.stack ? stack_type_string [td.sp [-1].type] : " ",
- (td.sp > td.stack && (td.sp [-1].type == STACK_TYPE_O || td.sp [-1].type == STACK_TYPE_VT)) ? (td.sp [-1].klass == NULL ? "?" : td.sp [-1].klass->name) : "",
- td.vt_sp, td.max_vt_sp);
- }
- switch (*td.ip) {
- case CEE_NOP:
- /* lose it */
- ++td.ip;
- break;
- case CEE_BREAK:
- SIMPLE_OP(td, MINT_BREAK);
- break;
- case CEE_LDARG_0:
- case CEE_LDARG_1:
- case CEE_LDARG_2:
- case CEE_LDARG_3:
- load_arg (&td, *td.ip - CEE_LDARG_0);
- ++td.ip;
- break;
- case CEE_LDLOC_0:
- case CEE_LDLOC_1:
- case CEE_LDLOC_2:
- case CEE_LDLOC_3:
- load_local (&td, *td.ip - CEE_LDLOC_0);
- ++td.ip;
- break;
- case CEE_STLOC_0:
- case CEE_STLOC_1:
- case CEE_STLOC_2:
- case CEE_STLOC_3:
- store_local (&td, *td.ip - CEE_STLOC_0);
- ++td.ip;
- break;
- case CEE_LDARG_S:
- load_arg (&td, ((guint8 *)td.ip)[1]);
- td.ip += 2;
- break;
- case CEE_LDARGA_S: {
- int n = ((guint8 *)td.ip)[1];
- if (n == 0 && signature->hasthis)
- ADD_CODE(&td, MINT_LDTHISA);
- else {
- ADD_CODE(&td, MINT_LDARGA);
- ADD_CODE(&td, td.rtm->arg_offsets [n - signature->hasthis]);
- }
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_MP);
- td.ip += 2;
- break;
- }
- case CEE_STARG_S:
- store_arg (&td, ((guint8 *)td.ip)[1]);
- td.ip += 2;
- break;
- case CEE_LDLOC_S:
- load_local (&td, ((guint8 *)td.ip)[1]);
- td.ip += 2;
- break;
- case CEE_LDLOCA_S:
- ADD_CODE(&td, MINT_LDLOCA_S);
- ADD_CODE(&td, td.rtm->local_offsets [((guint8 *)td.ip)[1]]);
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_MP);
- td.ip += 2;
- break;
- case CEE_STLOC_S:
- store_local (&td, ((guint8 *)td.ip)[1]);
- td.ip += 2;
- break;
- case CEE_LDNULL:
- SIMPLE_OP(td, MINT_LDNULL);
- PUSH_TYPE(&td, STACK_TYPE_O, NULL);
- break;
- case CEE_LDC_I4_M1:
- SIMPLE_OP(td, MINT_LDC_I4_M1);
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I4);
- break;
- case CEE_LDC_I4_0:
- if (!td.is_bb_start[td.ip + 1 - td.il_code] && td.ip [1] == 0xfe && td.ip [2] == CEE_CEQ &&
- td.sp > td.stack && td.sp [-1].type == STACK_TYPE_I4) {
- SIMPLE_OP(td, MINT_CEQ0_I4);
- td.ip += 2;
- } else {
- SIMPLE_OP(td, MINT_LDC_I4_0);
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I4);
- }
- break;
- case CEE_LDC_I4_1:
- if (!td.is_bb_start[td.ip + 1 - td.il_code] &&
- (td.ip [1] == CEE_ADD || td.ip [1] == CEE_SUB) && td.sp [-1].type == STACK_TYPE_I4) {
- ADD_CODE(&td, td.ip [1] == CEE_ADD ? MINT_ADD1_I4 : MINT_SUB1_I4);
- td.ip += 2;
- } else {
- SIMPLE_OP(td, MINT_LDC_I4_1);
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I4);
- }
- break;
- case CEE_LDC_I4_2:
- case CEE_LDC_I4_3:
- case CEE_LDC_I4_4:
- case CEE_LDC_I4_5:
- case CEE_LDC_I4_6:
- case CEE_LDC_I4_7:
- case CEE_LDC_I4_8:
- SIMPLE_OP(td, (*td.ip - CEE_LDC_I4_0) + MINT_LDC_I4_0);
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I4);
- break;
- case CEE_LDC_I4_S:
- ADD_CODE(&td, MINT_LDC_I4_S);
- ADD_CODE(&td, ((gint8 *) td.ip) [1]);
- td.ip += 2;
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I4);
- break;
- case CEE_LDC_I4:
- i32 = read32 (td.ip + 1);
- ADD_CODE(&td, MINT_LDC_I4);
- WRITE32(&td, &i32);
- td.ip += 5;
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I4);
- break;
- case CEE_LDC_I8: {
- gint64 val = read64 (td.ip + 1);
- ADD_CODE(&td, MINT_LDC_I8);
- WRITE64(&td, &val);
- td.ip += 9;
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I8);
- break;
- }
- case CEE_LDC_R4: {
- float val;
- readr4 (td.ip + 1, &val);
- ADD_CODE(&td, MINT_LDC_R4);
- WRITE32(&td, &val);
- td.ip += 5;
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_R8);
- break;
- }
- case CEE_LDC_R8: {
- double val;
- readr8 (td.ip + 1, &val);
- ADD_CODE(&td, MINT_LDC_R8);
- WRITE64(&td, &val);
- td.ip += 9;
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_R8);
- break;
- }
- case CEE_DUP: {
- int type = td.sp [-1].type;
- MonoClass *klass = td.sp [-1].klass;
- if (td.sp [-1].type == STACK_TYPE_VT) {
- gint32 size = mono_class_value_size (klass, NULL);
- PUSH_VT(&td, size);
- ADD_CODE(&td, MINT_DUP_VT);
- WRITE32(&td, &size);
- td.ip ++;
- } else
- SIMPLE_OP(td, MINT_DUP);
- PUSH_TYPE(&td, type, klass);
- break;
- }
- case CEE_POP:
- CHECK_STACK(&td, 1);
- SIMPLE_OP(td, MINT_POP);
- if (td.sp [-1].type == STACK_TYPE_VT) {
- int size = mono_class_value_size (td.sp [-1].klass, NULL);
- size = (size + 7) & ~7;
- ADD_CODE(&td, MINT_VTRESULT);
- ADD_CODE(&td, 0);
- WRITE32(&td, &size);
- td.vt_sp -= size;
- }
- --td.sp;
- break;
- case CEE_JMP: {
- MonoMethod *m;
- if (td.sp > td.stack)
- g_warning ("CEE_JMP: stack must be empty");
- token = read32 (td.ip + 1);
- m = mono_get_method_full (image, token, NULL, generic_context);
- ADD_CODE(&td, MINT_JMP);
- ADD_CODE(&td, get_data_item_index (&td, mono_interp_get_runtime_method (m)));
- td.ip += 5;
- break;
- }
- case CEE_CALLVIRT: /* Fall through */
- case CEE_CALLI: /* Fall through */
- case CEE_CALL: {
- MonoMethod *m;
- MonoMethodSignature *csignature;
- int virtual = *td.ip == CEE_CALLVIRT;
- int calli = *td.ip == CEE_CALLI;
- int i;
- guint32 vt_stack_used = 0;
- guint32 vt_res_size = 0;
- int op = -1;
- int native = 0;
- int is_void = 0;
-
- token = read32 (td.ip + 1);
- if (calli) {
- CHECK_STACK(&td, 1);
- native = (method->wrapper_type != MONO_WRAPPER_DELEGATE_INVOKE && td.sp [-1].type == STACK_TYPE_I);
- --td.sp;
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- csignature = (MonoMethodSignature *)mono_method_get_wrapper_data (method, token);
- else
- csignature = mono_metadata_parse_signature (image, token);
- m = NULL;
- } else {
- if (method->wrapper_type == MONO_WRAPPER_NONE)
- m = mono_get_method_full (image, token, NULL, generic_context);
- else
- m = (MonoMethod *)mono_method_get_wrapper_data (method, token);
- csignature = mono_method_signature (m);
- if (m->klass == mono_defaults.string_class) {
- if (m->name [0] == 'g') {
- if (strcmp (m->name, "get_Chars") == 0)
- op = MINT_GETCHR;
- else if (strcmp (m->name, "get_Length") == 0)
- op = MINT_STRLEN;
- }
- } else if (m->klass == mono_defaults.array_class) {
- if (strcmp (m->name, "get_Rank") == 0)
- op = MINT_ARRAY_RANK;
- else if (strcmp (m->name, "get_Length") == 0)
- op = MINT_LDLEN;
- }
- }
- CHECK_STACK(&td, csignature->param_count + csignature->hasthis);
- if (!calli && (!virtual || (m->flags & METHOD_ATTRIBUTE_VIRTUAL) == 0) &&
- (m->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL) == 0 &&
- (m->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) == 0) {
- int called_inited = mono_class_vtable (domain, m->klass)->initialized;
- MonoMethodHeader *mheader = mono_method_get_header (m);
-
- if (/*mono_metadata_signature_equal (method->signature, m->signature) */ method == m && *(td.ip + 5) == CEE_RET) {
- int offset;
- if (mono_interp_traceopt)
- g_print ("Optimize tail call of %s.%s\n", m->klass->name, m->name);
- for (i = csignature->param_count - 1; i >= 0; --i)
- store_arg (&td, i + csignature->hasthis);
-
- if (csignature->hasthis) {
- ADD_CODE(&td, MINT_STTHIS);
- --td.sp;
- }
- ADD_CODE(&td, MINT_BR_S);
- offset = body_start_offset - ((td.new_ip - 1) - td.new_code);
- ADD_CODE(&td, offset);
- if (!is_bb_start [td.ip + 5 - td.il_code])
- ++td.ip; /* gobble the CEE_RET if it isn't branched to */
- td.ip += 5;
- break;
- } else {
- /* mheader might not exist if this is a delegate invoc, etc */
- if (mheader && *mheader->code == CEE_RET && called_inited) {
- if (mono_interp_traceopt)
- g_print ("Inline (empty) call of %s.%s\n", m->klass->name, m->name);
- for (i = 0; i < csignature->param_count; i++)
- ADD_CODE(&td, MINT_POP); /*FIX: vt */
- if (csignature->hasthis) {
- if (virtual)
- ADD_CODE(&td, MINT_CKNULL);
- ADD_CODE(&td, MINT_POP);
- }
- td.sp -= csignature->param_count + csignature->hasthis;
- td.ip += 5;
- break;
- }
- }
- }
- if (method->wrapper_type == MONO_WRAPPER_NONE && m != NULL) {
- if (m->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)
- m = mono_marshal_get_native_wrapper (m);
- if (!virtual && m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
- m = mono_marshal_get_synchronized_wrapper (m);
- }
- g_assert (csignature->call_convention == MONO_CALL_DEFAULT || csignature->call_convention == MONO_CALL_C);
- td.sp -= csignature->param_count + csignature->hasthis;
- for (i = 0; i < csignature->param_count; ++i) {
- if (td.sp [i + csignature->hasthis].type == STACK_TYPE_VT) {
- gint32 size;
- if (csignature->pinvoke && method->wrapper_type != MONO_WRAPPER_NONE)
- size = mono_class_native_size (csignature->params [i]->data.klass, NULL);
- else
- size = mono_class_value_size (csignature->params [i]->data.klass, NULL);
- size = (size + 7) & ~7;
- vt_stack_used += size;
- }
- }
-
- /* need to handle typedbyref ... */
- if (csignature->ret->type != MONO_TYPE_VOID) {
- int mt = mint_type(csignature->ret);
- MonoClass *klass = NULL;
- if (mt == MINT_TYPE_VT) {
- if (csignature->pinvoke && method->wrapper_type != MONO_WRAPPER_NONE)
- vt_res_size = mono_class_native_size (csignature->ret->data.klass, NULL);
- else
- vt_res_size = mono_class_value_size (csignature->ret->data.klass, NULL);
- PUSH_VT(&td, vt_res_size);
- klass = csignature->ret->data.klass;
- } else if (mt == MINT_TYPE_O)
- klass = mono_class_from_mono_type (csignature->ret);
- PUSH_TYPE(&td, stack_type[mt], klass);
- } else
- is_void = TRUE;
-
- if (op >= 0) {
- ADD_CODE(&td, op);
-#if SIZEOF_VOID_P == 8
- if (op == MINT_LDLEN)
- ADD_CODE(&td, MINT_CONV_I4_I8);
-#endif
- } else {
- if (calli)
- ADD_CODE(&td, native ? MINT_CALLI_NAT : MINT_CALLI);
- else if (virtual)
- ADD_CODE(&td, is_void ? MINT_VCALLVIRT : MINT_CALLVIRT);
- else
- ADD_CODE(&td, is_void ? MINT_VCALL : MINT_CALL);
- ADD_CODE(&td, get_data_item_index (&td, calli? (void *)csignature : (void *)mono_interp_get_runtime_method (m)));
- }
- td.ip += 5;
- if (vt_stack_used != 0 || vt_res_size != 0) {
- ADD_CODE(&td, MINT_VTRESULT);
- ADD_CODE(&td, vt_res_size);
- WRITE32(&td, &vt_stack_used);
- td.vt_sp -= vt_stack_used;
- }
- break;
- }
- case CEE_RET: {
- int vt_size = 0;
- if (signature->ret->type != MONO_TYPE_VOID) {
- --td.sp;
- if (mint_type(signature->ret) == MINT_TYPE_VT) {
- vt_size = mono_class_value_size (signature->ret->data.klass, NULL);
- vt_size = (vt_size + 7) & ~7;
- }
- }
- if (td.sp > td.stack)
- g_warning ("%s.%s: CEE_RET: more values on stack: %d", td.method->klass->name, td.method->name, td.sp - td.stack);
- if (td.vt_sp != vt_size)
- g_warning ("%s.%s: CEE_RET: value type stack: %d", td.method->klass->name, td.method->name, td.vt_sp);
- if (vt_size == 0)
- SIMPLE_OP(td, signature->ret->type == MONO_TYPE_VOID ? MINT_RET_VOID : MINT_RET);
- else {
- ADD_CODE(&td, MINT_RET_VT);
- WRITE32(&td, &vt_size);
- ++td.ip;
- }
- generating_code = 0;
- break;
- }
- case CEE_BR:
- handle_branch (&td, MINT_BR_S, MINT_BR, 5 + read32 (td.ip + 1));
- td.ip += 5;
- generating_code = 0;
- break;
- case CEE_BR_S:
- handle_branch (&td, MINT_BR_S, MINT_BR, 2 + (gint8)td.ip [1]);
- td.ip += 2;
- generating_code = 0;
- break;
- case CEE_BRFALSE:
- one_arg_branch (&td, MINT_BRFALSE_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BRFALSE_S:
- one_arg_branch (&td, MINT_BRFALSE_I4, 2 + (gint8)td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BRTRUE:
- one_arg_branch (&td, MINT_BRTRUE_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BRTRUE_S:
- one_arg_branch (&td, MINT_BRTRUE_I4, 2 + (gint8)td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BEQ:
- two_arg_branch (&td, MINT_BEQ_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BEQ_S:
- two_arg_branch (&td, MINT_BEQ_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BGE:
- two_arg_branch (&td, MINT_BGE_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BGE_S:
- two_arg_branch (&td, MINT_BGE_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BGT:
- two_arg_branch (&td, MINT_BGT_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BGT_S:
- two_arg_branch (&td, MINT_BGT_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BLT:
- two_arg_branch (&td, MINT_BLT_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BLT_S:
- two_arg_branch (&td, MINT_BLT_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BLE:
- two_arg_branch (&td, MINT_BLE_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BLE_S:
- two_arg_branch (&td, MINT_BLE_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BNE_UN:
- two_arg_branch (&td, MINT_BNE_UN_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BNE_UN_S:
- two_arg_branch (&td, MINT_BNE_UN_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BGE_UN:
- two_arg_branch (&td, MINT_BGE_UN_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BGE_UN_S:
- two_arg_branch (&td, MINT_BGE_UN_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BGT_UN:
- two_arg_branch (&td, MINT_BGT_UN_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BGT_UN_S:
- two_arg_branch (&td, MINT_BGT_UN_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BLE_UN:
- two_arg_branch (&td, MINT_BLE_UN_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BLE_UN_S:
- two_arg_branch (&td, MINT_BLE_UN_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_BLT_UN:
- two_arg_branch (&td, MINT_BLT_UN_I4, 5 + read32 (td.ip + 1));
- td.ip += 5;
- break;
- case CEE_BLT_UN_S:
- two_arg_branch (&td, MINT_BLT_UN_I4, 2 + (gint8) td.ip [1]);
- td.ip += 2;
- break;
- case CEE_SWITCH: {
- guint32 n;
- const unsigned char *next_ip;
- const unsigned char *base_ip = td.ip;
- unsigned short *next_new_ip;
- ++td.ip;
- n = read32 (td.ip);
- ADD_CODE(&td, MINT_SWITCH);
- ADD_CODE(&td, * (unsigned short *)(&n));
- ADD_CODE(&td, * ((unsigned short *)&n + 1));
- td.ip += 4;
- next_ip = td.ip + n * 4;
- next_new_ip = td.new_ip + n * 2;
- for (i = 0; i < n; i++) {
- offset = read32 (td.ip);
- target = next_ip - td.il_code + offset;
- if (offset < 0)
- target = td.in_offsets [target] - (next_new_ip - td.new_code);
- else {
- int prev = td.forward_refs [target];
- td.forward_refs [td.ip - td.il_code] = prev;
- td.forward_refs [target] = td.ip - td.il_code;
- td.in_offsets [td.ip - td.il_code] = - (base_ip - td.il_code);
- }
- ADD_CODE(&td, * (unsigned short *)(&target));
- ADD_CODE(&td, * ((unsigned short *)&target + 1));
- td.ip += 4;
- }
- --td.sp;
- break;
- }
- case CEE_LDIND_I1:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_I1);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDIND_U1:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_U1);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDIND_I2:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_I2);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDIND_U2:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_U2);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDIND_I4:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_I4);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDIND_U4:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_U4);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDIND_I8:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_I8);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- break;
- case CEE_LDIND_I:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_I);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I);
- break;
- case CEE_LDIND_R4:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_R4);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_R8);
- break;
- case CEE_LDIND_R8:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_R8);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_R8);
- break;
- case CEE_LDIND_REF:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDIND_REF);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_O);
- break;
- case CEE_STIND_REF:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_REF);
- td.sp -= 2;
- break;
- case CEE_STIND_I1:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_I1);
- td.sp -= 2;
- break;
- case CEE_STIND_I2:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_I2);
- td.sp -= 2;
- break;
- case CEE_STIND_I4:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_I4);
- td.sp -= 2;
- break;
- case CEE_STIND_I:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_I);
- td.sp -= 2;
- break;
- case CEE_STIND_I8:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_I8);
- td.sp -= 2;
- break;
- case CEE_STIND_R4:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_R4);
- td.sp -= 2;
- break;
- case CEE_STIND_R8:
- CHECK_STACK (&td, 2);
- SIMPLE_OP (td, MINT_STIND_R8);
- td.sp -= 2;
- break;
- case CEE_ADD:
- binary_arith_op(&td, MINT_ADD_I4);
- ++td.ip;
- break;
- case CEE_SUB:
- binary_arith_op(&td, MINT_SUB_I4);
- ++td.ip;
- break;
- case CEE_MUL:
- binary_arith_op(&td, MINT_MUL_I4);
- ++td.ip;
- break;
- case CEE_DIV:
- binary_arith_op(&td, MINT_DIV_I4);
- ++td.ip;
- break;
- case CEE_DIV_UN:
- binary_arith_op(&td, MINT_DIV_UN_I4);
- ++td.ip;
- break;
- case CEE_REM:
- binary_int_op (&td, MINT_REM_I4);
- ++td.ip;
- break;
- case CEE_REM_UN:
- binary_int_op (&td, MINT_REM_UN_I4);
- ++td.ip;
- break;
- case CEE_AND:
- binary_int_op (&td, MINT_AND_I4);
- ++td.ip;
- break;
- case CEE_OR:
- binary_int_op (&td, MINT_OR_I4);
- ++td.ip;
- break;
- case CEE_XOR:
- binary_int_op (&td, MINT_XOR_I4);
- ++td.ip;
- break;
- case CEE_SHL:
- shift_op (&td, MINT_SHL_I4);
- ++td.ip;
- break;
- case CEE_SHR:
- shift_op (&td, MINT_SHR_I4);
- ++td.ip;
- break;
- case CEE_SHR_UN:
- shift_op (&td, MINT_SHR_UN_I4);
- ++td.ip;
- break;
- case CEE_NEG:
- unary_arith_op (&td, MINT_NEG_I4);
- ++td.ip;
- break;
- case CEE_NOT:
- unary_arith_op (&td, MINT_NOT_I4);
- ++td.ip;
- break;
- case CEE_CONV_U1:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_U1_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_U1_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_U1_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_I1:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_I1_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_I1_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_I1_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_U2:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_U2_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_U2_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_U2_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_I2:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_I2_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_I2_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_I2_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_U:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
-#if SIZEOF_VOID_P == 4
- ADD_CODE(&td, MINT_CONV_U4_R8);
-#else
- ADD_CODE(&td, MINT_CONV_U8_R8);
-#endif
- break;
- case STACK_TYPE_I4:
-#if SIZEOF_VOID_P == 8
- ADD_CODE(&td, MINT_CONV_U8_I4);
-#endif
- break;
- case STACK_TYPE_I8:
-#if SIZEOF_VOID_P == 4
- ADD_CODE(&td, MINT_CONV_U4_I8);
-#endif
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I);
- break;
- case CEE_CONV_I:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
-#if SIZEOF_VOID_P == 8
- ADD_CODE(&td, MINT_CONV_I8_R8);
-#else
- ADD_CODE(&td, MINT_CONV_I4_R8);
-#endif
- break;
- case STACK_TYPE_I4:
-#if SIZEOF_VOID_P == 8
- ADD_CODE(&td, MINT_CONV_I8_I4);
-#endif
- break;
- case STACK_TYPE_O:
- break;
- case STACK_TYPE_MP:
- break;
- case STACK_TYPE_I8:
-#if SIZEOF_VOID_P == 4
- ADD_CODE(&td, MINT_CONV_I4_I8);
-#endif
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I);
- break;
- case CEE_CONV_U4:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_U4_R8);
- break;
- case STACK_TYPE_I4:
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_U4_I8);
- break;
- case STACK_TYPE_MP:
-#if SIZEOF_VOID_P == 8
- ADD_CODE(&td, MINT_CONV_U4_I8);
-#endif
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_I4:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_I4_R8);
- break;
- case STACK_TYPE_I4:
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_I4_I8);
- break;
- case STACK_TYPE_MP:
-#if SIZEOF_VOID_P == 8
- ADD_CODE(&td, MINT_CONV_I4_I8);
-#endif
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_I8:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_I8_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_I8_I4);
- break;
- case STACK_TYPE_I8:
- break;
- case STACK_TYPE_MP:
-#if SIZEOF_VOID_P == 4
- ADD_CODE(&td, MINT_CONV_I8_I4);
-#endif
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- break;
- case CEE_CONV_R4:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_R4_R8);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_R4_I8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_R4_I4);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_R8);
- break;
- case CEE_CONV_R8:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_R8_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_R8_I8);
- break;
- case STACK_TYPE_R8:
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_R8);
- break;
- case CEE_CONV_U8:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_U8_I4);
- break;
- case STACK_TYPE_I8:
- break;
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_U8_R8);
- break;
- case STACK_TYPE_MP:
-#if SIZEOF_VOID_P == 4
- ADD_CODE(&td, MINT_CONV_U8_I4);
-#endif
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- break;
-#if 0
- case CEE_CPOBJ: {
- MonoClass *vtklass;
- ++ip;
- vtklass = mono_class_get_full (image, read32 (ip), generic_context);
- ip += 4;
- sp -= 2;
- memcpy (sp [0].data.p, sp [1].data.p, mono_class_value_size (vtklass, NULL));
- break;
- }
-#endif
- case CEE_LDOBJ: {
- int size;
- CHECK_STACK (&td, 1);
-
- token = read32 (td.ip + 1);
-
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
- else
- klass = mono_class_get_full (image, token, generic_context);
-
- ADD_CODE(&td, MINT_LDOBJ);
- ADD_CODE(&td, get_data_item_index(&td, klass));
- if (klass->byval_arg.type == MONO_TYPE_VALUETYPE && !klass->byval_arg.data.klass->enumtype) {
- size = mono_class_value_size (klass, NULL);
- PUSH_VT(&td, size);
- }
- td.ip += 5;
- SET_TYPE(td.sp - 1, stack_type[mint_type(&klass->byval_arg)], klass);
- break;
- }
- case CEE_LDSTR: {
- MonoString *s;
- token = mono_metadata_token_index (read32 (td.ip + 1));
- td.ip += 5;
- if (method->wrapper_type != MONO_WRAPPER_NONE) {
- s = mono_string_new_wrapper(
- mono_method_get_wrapper_data (method, token));
- }
- else
- s = mono_ldstr (domain, image, token);
- ADD_CODE(&td, MINT_LDSTR);
- ADD_CODE(&td, get_data_item_index (&td, s));
- PUSH_TYPE(&td, STACK_TYPE_O, mono_defaults.string_class);
- break;
- }
- case CEE_NEWOBJ: {
- MonoMethod *m;
- MonoMethodSignature *csignature;
- guint32 vt_stack_used = 0;
- guint32 vt_res_size = 0;
-
- td.ip++;
- token = read32 (td.ip);
- td.ip += 4;
-
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- m = (MonoMethod *)mono_method_get_wrapper_data (method, token);
- else
- m = mono_get_method_full (image, token, NULL, generic_context);
-
- csignature = mono_method_signature (m);
- klass = m->klass;
- td.sp -= csignature->param_count;
- ADD_CODE(&td, MINT_NEWOBJ);
- ADD_CODE(&td, get_data_item_index (&td, mono_interp_get_runtime_method (m)));
- if (klass->byval_arg.type == MONO_TYPE_VALUETYPE) {
- vt_res_size = mono_class_value_size (klass, NULL);
- PUSH_VT(&td, vt_res_size);
- }
- for (i = 0; i < csignature->param_count; ++i) {
- int mt = mint_type(csignature->params [i]);
- if (mt == MINT_TYPE_VT) {
- gint32 size = mono_class_value_size (csignature->params [i]->data.klass, NULL);
- size = (size + 7) & ~7;
- vt_stack_used += size;
- }
- }
- if (vt_stack_used != 0 || vt_res_size != 0) {
- ADD_CODE(&td, MINT_VTRESULT);
- ADD_CODE(&td, vt_res_size);
- WRITE32(&td, &vt_stack_used);
- td.vt_sp -= vt_stack_used;
- }
- PUSH_TYPE(&td, stack_type [mint_type (&klass->byval_arg)], klass);
- break;
- }
- case CEE_CASTCLASS:
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
- ADD_CODE(&td, MINT_CASTCLASS);
- ADD_CODE(&td, get_data_item_index (&td, klass));
- td.sp [-1].klass = klass;
- td.ip += 5;
- break;
- case CEE_ISINST:
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
- ADD_CODE(&td, MINT_ISINST);
- ADD_CODE(&td, get_data_item_index (&td, klass));
- td.ip += 5;
- break;
- case CEE_CONV_R_UN:
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_R_UN_I8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_R_UN_I4);
- break;
- default:
- g_assert_not_reached ();
- }
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_R8);
- ++td.ip;
- break;
- case CEE_UNBOX:
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
-
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
- else
- klass = mono_class_get_full (image, token, generic_context);
-
- ADD_CODE(&td, MINT_UNBOX);
- ADD_CODE(&td, get_data_item_index (&td, klass));
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_MP);
- td.ip += 5;
- break;
- case CEE_THROW:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_THROW);
- --td.sp;
- generating_code = 0;
- break;
- case CEE_LDFLDA:
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
- mono_class_init (klass);
- mt = mint_type(field->type);
- ADD_CODE(&td, MINT_LDFLDA);
- ADD_CODE(&td, klass->valuetype ? field->offset - sizeof(MonoObject) : field->offset);
- td.ip += 5;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_MP);
- break;
- case CEE_LDFLD: {
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
- mono_class_init (klass);
- mt = mint_type(field->type);
- if (klass->marshalbyref) {
- ADD_CODE(&td, mt == MINT_TYPE_VT ? MINT_LDRMFLD_VT : MINT_LDRMFLD);
- ADD_CODE(&td, get_data_item_index (&td, field));
- } else {
- ADD_CODE(&td, MINT_LDFLD_I1 + mt - MINT_TYPE_I1);
- ADD_CODE(&td, klass->valuetype ? field->offset - sizeof(MonoObject) : field->offset);
- }
- klass = NULL;
- if (mt == MINT_TYPE_VT) {
- int size = mono_class_value_size (field->type->data.klass, NULL);
- PUSH_VT(&td, size);
- WRITE32(&td, &size);
- klass = field->type->data.klass;
- } else if (mt == MINT_TYPE_O)
- klass = mono_class_from_mono_type (field->type);
- td.ip += 5;
- SET_TYPE(td.sp - 1, stack_type [mt], klass);
- break;
- }
- case CEE_STFLD:
- CHECK_STACK (&td, 2);
- token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
- mono_class_init (klass);
- mt = mint_type(field->type);
- if (klass->marshalbyref) {
- ADD_CODE(&td, mt == MINT_TYPE_VT ? MINT_STRMFLD_VT : MINT_STRMFLD);
- ADD_CODE(&td, get_data_item_index (&td, field));
- } else {
- ADD_CODE(&td, MINT_STFLD_I1 + mt - MINT_TYPE_I1);
- ADD_CODE(&td, klass->valuetype ? field->offset - sizeof(MonoObject) : field->offset);
- }
- if (mt == MINT_TYPE_VT) {
- int size = mono_class_value_size (field->type->data.klass, NULL);
- POP_VT(&td, size);
- WRITE32(&td, &size);
- }
- td.ip += 5;
- td.sp -= 2;
- break;
- case CEE_LDSFLDA:
- token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
- ADD_CODE(&td, MINT_LDSFLDA);
- ADD_CODE(&td, get_data_item_index (&td, field));
- td.ip += 5;
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_MP);
- break;
- case CEE_LDSFLD:
- token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
- mt = mint_type(field->type);
- ADD_CODE(&td, mt == MINT_TYPE_VT ? MINT_LDSFLD_VT : MINT_LDSFLD);
- ADD_CODE(&td, get_data_item_index (&td, field));
- klass = NULL;
- if (mt == MINT_TYPE_VT) {
- int size = mono_class_value_size (field->type->data.klass, NULL);
- PUSH_VT(&td, size);
- WRITE32(&td, &size);
- klass = field->type->data.klass;
- } else {
- if (mt == MINT_TYPE_O)
- klass = mono_class_from_mono_type (field->type);
- if (!domain->special_static_fields || !g_hash_table_lookup (domain->special_static_fields, field)) {
- if (mt == MINT_TYPE_O)
- td.new_ip [-2] = MINT_LDSFLD_O;
- else if (mt == MINT_TYPE_I4)
- td.new_ip [-2] = MINT_LDSFLD_I4;
- }
- ADD_CODE(&td, get_data_item_index (&td, mono_class_vtable (domain, field->parent)));
- }
- td.ip += 5;
- PUSH_TYPE(&td, stack_type [mt], klass);
- break;
- case CEE_STSFLD:
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
- field = mono_field_from_token (image, token, &klass, generic_context);
- mt = mint_type(field->type);
- ADD_CODE(&td, mt == MINT_TYPE_VT ? MINT_STSFLD_VT : MINT_STSFLD);
- ADD_CODE(&td, get_data_item_index (&td, field));
- if (mt == MINT_TYPE_VT) {
- int size = mono_class_value_size (field->type->data.klass, NULL);
- POP_VT(&td, size);
- WRITE32(&td, &size);
- }
- td.ip += 5;
- --td.sp;
- break;
- case CEE_STOBJ: {
- int size;
- token = read32 (td.ip + 1);
-
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
- else
- klass = mono_class_get_full (image, token, generic_context);
-
- ADD_CODE(&td, td.sp [-1].type == STACK_TYPE_VT ? MINT_STOBJ_VT : MINT_STOBJ);
- ADD_CODE(&td, get_data_item_index (&td, klass));
- if (td.sp [-1].type == STACK_TYPE_VT) {
- size = mono_class_value_size (klass, NULL);
- size = (size + 7) & ~7;
- td.vt_sp -= size;
- }
- td.ip += 5;
- td.sp -= 2;
- break;
- }
- case CEE_CONV_OVF_I_UN:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
-#if SIZEOF_VOID_P == 8
- ADD_CODE(&td, MINT_CONV_OVF_I8_UN_R8);
-#else
- ADD_CODE(&td, MINT_CONV_OVF_I4_UN_R8);
-#endif
- break;
- case STACK_TYPE_I8:
- /*FIX*/
- break;
- case STACK_TYPE_I4:
-#if SIZEOF_VOID_P == 8
- ADD_CODE(&td, MINT_CONV_I8_U4);
-#endif
- break;
- default:
- g_assert_not_reached ();
- break;
- }
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- ++td.ip;
- break;
- case CEE_CONV_OVF_I8_UN:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_I8_UN_R8);
- break;
- case STACK_TYPE_I8:
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_I8_U4);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- ++td.ip;
- break;
- case CEE_BOX: {
- int size;
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
- else
- klass = mono_class_get_full (image, token, generic_context);
- g_assert (klass->valuetype);
- if (klass->byval_arg.type == MONO_TYPE_VALUETYPE && !klass->enumtype) {
- size = mono_class_value_size (klass, NULL);
- size = (size + 7) & ~7;
- td.vt_sp -= size;
- }
- ADD_CODE(&td, MINT_BOX);
- ADD_CODE(&td, get_data_item_index (&td, klass));
- SET_TYPE(td.sp - 1, STACK_TYPE_O, klass);
- td.ip += 5;
- break;
- }
- case CEE_NEWARR:
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
-
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
- else
- klass = mono_class_get_full (image, token, generic_context);
-
- ADD_CODE(&td, MINT_NEWARR);
- ADD_CODE(&td, get_data_item_index (&td, klass));
- SET_TYPE(td.sp - 1, STACK_TYPE_O, klass);
- td.ip += 5;
- break;
- case CEE_LDLEN:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_LDLEN);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I);
- break;
- case CEE_LDELEMA:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- token = read32 (td.ip + 1);
-
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
- else
- klass = mono_class_get_full (image, token, generic_context);
-
- ADD_CODE(&td, MINT_LDELEMA);
- ADD_CODE(&td, get_data_item_index (&td, klass));
- td.ip += 5;
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_MP);
- break;
- case CEE_LDELEM_I1:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_I1);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDELEM_U1:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_U1);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDELEM_I2:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_I2);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDELEM_U2:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_U2);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDELEM_I4:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_I4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDELEM_U4:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_U4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_LDELEM_I8:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_I8);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- break;
- case CEE_LDELEM_I:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_I);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I);
- break;
- case CEE_LDELEM_R4:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_R4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_R8);
- break;
- case CEE_LDELEM_R8:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_R8);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_R8);
- break;
- case CEE_LDELEM_REF:
- CHECK_STACK (&td, 2);
- ENSURE_I4 (&td, 1);
- SIMPLE_OP (td, MINT_LDELEM_REF);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_O);
- break;
- case CEE_STELEM_I:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_I);
- td.sp -= 3;
- break;
- case CEE_STELEM_I1:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_I1);
- td.sp -= 3;
- break;
- case CEE_STELEM_I2:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_I2);
- td.sp -= 3;
- break;
- case CEE_STELEM_I4:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_I4);
- td.sp -= 3;
- break;
- case CEE_STELEM_I8:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_I8);
- td.sp -= 3;
- break;
- case CEE_STELEM_R4:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_R4);
- td.sp -= 3;
- break;
- case CEE_STELEM_R8:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_R8);
- td.sp -= 3;
- break;
- case CEE_STELEM_REF:
- CHECK_STACK (&td, 3);
- ENSURE_I4 (&td, 2);
- SIMPLE_OP (td, MINT_STELEM_REF);
- td.sp -= 3;
- break;
-#if 0
- case CEE_LDELEM:
- case CEE_STELEM:
- case CEE_UNBOX_ANY:
-
- case CEE_CONV_OVF_U1:
-
- case CEE_CONV_OVF_I8:
-
-#if SIZEOF_VOID_P == 8
- case CEE_CONV_OVF_U:
-#endif
- case CEE_REFANYVAL: ves_abort(); break;
-#endif
- case CEE_CKFINITE:
- CHECK_STACK (&td, 1);
- SIMPLE_OP (td, MINT_CKFINITE);
- break;
- case CEE_CONV_OVF_I1:
- case CEE_CONV_OVF_I1_UN:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_I1_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_OVF_I1_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_OVF_I1_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_OVF_U1:
- case CEE_CONV_OVF_U1_UN:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_U1_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_OVF_U1_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_OVF_U1_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_OVF_I2:
- case CEE_CONV_OVF_I2_UN:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_I2_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_OVF_I2_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_OVF_I2_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
- case CEE_CONV_OVF_U2_UN:
- case CEE_CONV_OVF_U2:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_U2_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_OVF_U2_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_OVF_U2_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
-#if SIZEOF_VOID_P == 4
- case CEE_CONV_OVF_I:
-#endif
- case CEE_CONV_OVF_I4:
- case CEE_CONV_OVF_I4_UN:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_I4_R8);
- break;
- case STACK_TYPE_I4:
- if (*td.ip == CEE_CONV_OVF_I4_UN)
- ADD_CODE(&td, MINT_CONV_OVF_I4_U4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_OVF_I4_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
-#if SIZEOF_VOID_P == 4
- case CEE_CONV_OVF_U:
-#endif
- case CEE_CONV_OVF_U4:
- case CEE_CONV_OVF_U4_UN:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_U4_R8);
- break;
- case STACK_TYPE_I4:
- if (*td.ip != CEE_CONV_OVF_U4_UN)
- ADD_CODE(&td, MINT_CONV_OVF_U4_I4);
- break;
- case STACK_TYPE_I8:
- ADD_CODE(&td, MINT_CONV_OVF_U4_I8);
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- break;
-#if SIZEOF_VOID_P == 8
- case CEE_CONV_OVF_I:
-#endif
- case CEE_CONV_OVF_I8:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_I8_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_I8_I4);
- break;
- case STACK_TYPE_I8:
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- break;
-#if SIZEOF_VOID_P == 8
- case CEE_CONV_OVF_U:
-#endif
- case CEE_CONV_OVF_U8:
- CHECK_STACK (&td, 1);
- switch (td.sp [-1].type) {
- case STACK_TYPE_R8:
- ADD_CODE(&td, MINT_CONV_OVF_U8_R8);
- break;
- case STACK_TYPE_I4:
- ADD_CODE(&td, MINT_CONV_OVF_U8_I4);
- break;
- case STACK_TYPE_I8:
- break;
- default:
- g_assert_not_reached ();
- }
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I8);
- break;
- case CEE_LDTOKEN: {
- int size;
- gpointer handle;
- token = read32 (td.ip + 1);
- handle = mono_ldtoken (image, token, &klass, generic_context);
- mt = mint_type(&klass->byval_arg);
- g_assert (mt == MINT_TYPE_VT);
- size = mono_class_value_size (klass, NULL);
- g_assert (size == sizeof(gpointer));
- PUSH_VT(&td, sizeof(gpointer));
- ADD_CODE(&td, MINT_LDTOKEN);
- ADD_CODE(&td, get_data_item_index (&td, handle));
- PUSH_SIMPLE_TYPE(&td, stack_type [mt]);
- td.ip += 5;
- break;
- }
- case CEE_ADD_OVF:
- binary_arith_op(&td, MINT_ADD_OVF_I4);
- ++td.ip;
- break;
- case CEE_ADD_OVF_UN:
- binary_arith_op(&td, MINT_ADD_OVF_UN_I4);
- ++td.ip;
- break;
- case CEE_MUL_OVF:
- binary_arith_op(&td, MINT_MUL_OVF_I4);
- ++td.ip;
- break;
- case CEE_MUL_OVF_UN:
- binary_arith_op(&td, MINT_MUL_OVF_UN_I4);
- ++td.ip;
- break;
- case CEE_SUB_OVF:
- binary_arith_op(&td, MINT_SUB_OVF_I4);
- ++td.ip;
- break;
- case CEE_SUB_OVF_UN:
- binary_arith_op(&td, MINT_SUB_OVF_UN_I4);
- ++td.ip;
- break;
- case CEE_ENDFINALLY:
- SIMPLE_OP (td, MINT_ENDFINALLY);
- generating_code = 0;
- break;
- case CEE_LEAVE:
- td.sp = td.stack;
- handle_branch (&td, MINT_LEAVE_S, MINT_LEAVE, 5 + read32 (td.ip + 1));
- td.ip += 5;
- generating_code = 0;
- break;
- case CEE_LEAVE_S:
- td.sp = td.stack;
- handle_branch (&td, MINT_LEAVE_S, MINT_LEAVE, 2 + (gint8)td.ip [1]);
- td.ip += 2;
- generating_code = 0;
- break;
- case CEE_UNUSED41:
- ++td.ip;
- switch (*td.ip) {
- case CEE_MONO_ICALL: {
- guint32 token;
- gpointer func;
- MonoJitICallInfo *info;
-
- token = read32 (td.ip + 1);
- td.ip += 5;
- func = mono_method_get_wrapper_data (method, token);
- info = mono_find_jit_icall_by_addr (func);
- g_assert (info);
-
- CHECK_STACK (&td, info->sig->param_count);
- switch (info->sig->param_count) {
- case 0:
- if (MONO_TYPE_IS_VOID (info->sig->ret))
- ADD_CODE (&td,MINT_ICALL_V_V);
- else
- g_assert_not_reached();
- break;
- case 1:
- if (MONO_TYPE_IS_VOID (info->sig->ret))
- ADD_CODE (&td,MINT_ICALL_P_V);
- else
- ADD_CODE (&td,MINT_ICALL_P_P);
- break;
- case 2:
- if (MONO_TYPE_IS_VOID (info->sig->ret)) {
- if (info->sig->params [1]->type == MONO_TYPE_I4)
- ADD_CODE (&td,MINT_ICALL_PI_V);
- else
- ADD_CODE (&td,MINT_ICALL_PP_V);
- } else {
- if (info->sig->params [1]->type == MONO_TYPE_I4)
- ADD_CODE (&td,MINT_ICALL_PI_P);
- else
- ADD_CODE (&td,MINT_ICALL_PP_P);
- }
- break;
- case 3:
- g_assert (MONO_TYPE_IS_VOID (info->sig->ret));
- if (info->sig->params [2]->type == MONO_TYPE_I4)
- ADD_CODE (&td,MINT_ICALL_PPI_V);
- else
- ADD_CODE (&td,MINT_ICALL_PPP_V);
- break;
- default:
- g_assert_not_reached ();
- }
- if (func == mono_ftnptr_to_delegate)
- func = mono_interp_ftnptr_to_delegate;
- ADD_CODE(&td, get_data_item_index (&td, func));
- td.sp -= info->sig->param_count;
-
- if (!MONO_TYPE_IS_VOID (info->sig->ret)) {
- td.sp ++;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I);
- }
- break;
- }
- case CEE_MONO_VTADDR: {
- int size;
- CHECK_STACK (&td, 1);
- if (method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE)
- size = mono_class_native_size(td.sp [-1].klass, NULL);
- else
- size = mono_class_value_size(td.sp [-1].klass, NULL);
- size = (size + 7) & ~7;
- ADD_CODE(&td, MINT_VTRESULT);
- ADD_CODE(&td, 0);
- WRITE32(&td, &size);
- td.vt_sp -= size;
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_MP);
- break;
- }
- case CEE_MONO_LDPTR:
- case CEE_MONO_CLASSCONST:
- token = read32 (td.ip + 1);
- td.ip += 5;
- ADD_CODE(&td, MINT_MONO_LDPTR);
- ADD_CODE(&td, get_data_item_index (&td, mono_method_get_wrapper_data (method, token)));
- td.sp [0].type = STACK_TYPE_I;
- ++td.sp;
- break;
- case CEE_MONO_OBJADDR:
- CHECK_STACK (&td, 1);
- ++td.ip;
- td.sp[-1].type = STACK_TYPE_MP;
- /* do nothing? */
- break;
- case CEE_MONO_NEWOBJ:
- token = read32 (td.ip + 1);
- td.ip += 5;
- ADD_CODE(&td, MINT_MONO_NEWOBJ);
- ADD_CODE(&td, get_data_item_index (&td, mono_method_get_wrapper_data (method, token)));
- td.sp [0].type = STACK_TYPE_O;
- ++td.sp;
- break;
- case CEE_MONO_RETOBJ:
- CHECK_STACK (&td, 1);
- token = read32 (td.ip + 1);
- td.ip += 5;
- ADD_CODE(&td, MINT_MONO_RETOBJ);
- td.sp--;
-
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
-
- /*stackval_from_data (signature->ret, frame->retval, sp->data.vt, signature->pinvoke);*/
-
- if (td.sp > td.stack)
- g_warning ("CEE_MONO_RETOBJ: more values on stack: %d", td.sp-td.stack);
- break;
- case CEE_MONO_LDNATIVEOBJ:
- token = read32 (td.ip + 1);
- td.ip += 5;
- klass = (MonoClass *)mono_method_get_wrapper_data (method, token);
- g_assert(klass->valuetype);
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_MP);
- break;
- case CEE_MONO_SAVE_LMF:
- case CEE_MONO_RESTORE_LMF:
- case CEE_MONO_NOT_TAKEN:
- ++td.ip;
- break;
- default:
- g_error ("transform.c: Unimplemented opcode: 0xF0 %02x at 0x%x\n", *td.ip, td.ip-header->code);
- }
- break;
-#if 0
- case CEE_PREFIX7:
- case CEE_PREFIX6:
- case CEE_PREFIX5:
- case CEE_PREFIX4:
- case CEE_PREFIX3:
- case CEE_PREFIX2:
- case CEE_PREFIXREF: ves_abort(); break;
-#endif
- /*
- * Note: Exceptions thrown when executing a prefixed opcode need
- * to take into account the number of prefix bytes (usually the
- * throw point is just (ip - n_prefix_bytes).
- */
- case CEE_PREFIX1:
- ++td.ip;
- switch (*td.ip) {
-#if 0
- case CEE_ARGLIST: ves_abort(); break;
-#endif
- case CEE_CEQ:
- CHECK_STACK(&td, 2);
- if (td.sp [-1].type == STACK_TYPE_O || td.sp [-1].type == STACK_TYPE_MP)
- ADD_CODE(&td, MINT_CEQ_I4 + STACK_TYPE_I - STACK_TYPE_I4);
- else
- ADD_CODE(&td, MINT_CEQ_I4 + td.sp [-1].type - STACK_TYPE_I4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- ++td.ip;
- break;
- case CEE_CGT:
- CHECK_STACK(&td, 2);
- if (td.sp [-1].type == STACK_TYPE_O || td.sp [-1].type == STACK_TYPE_MP)
- ADD_CODE(&td, MINT_CGT_I4 + STACK_TYPE_I - STACK_TYPE_I4);
- else
- ADD_CODE(&td, MINT_CGT_I4 + td.sp [-1].type - STACK_TYPE_I4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- ++td.ip;
- break;
- case CEE_CGT_UN:
- CHECK_STACK(&td, 2);
- if (td.sp [-1].type == STACK_TYPE_O || td.sp [-1].type == STACK_TYPE_MP)
- ADD_CODE(&td, MINT_CGT_UN_I4 + STACK_TYPE_I - STACK_TYPE_I4);
- else
- ADD_CODE(&td, MINT_CGT_UN_I4 + td.sp [-1].type - STACK_TYPE_I4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- ++td.ip;
- break;
- case CEE_CLT:
- CHECK_STACK(&td, 2);
- if (td.sp [-1].type == STACK_TYPE_O || td.sp [-1].type == STACK_TYPE_MP)
- ADD_CODE(&td, MINT_CLT_I4 + STACK_TYPE_I - STACK_TYPE_I4);
- else
- ADD_CODE(&td, MINT_CLT_I4 + td.sp [-1].type - STACK_TYPE_I4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- ++td.ip;
- break;
- case CEE_CLT_UN:
- CHECK_STACK(&td, 2);
- if (td.sp [-1].type == STACK_TYPE_O || td.sp [-1].type == STACK_TYPE_MP)
- ADD_CODE(&td, MINT_CLT_UN_I4 + STACK_TYPE_I - STACK_TYPE_I4);
- else
- ADD_CODE(&td, MINT_CLT_UN_I4 + td.sp [-1].type - STACK_TYPE_I4);
- --td.sp;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_I4);
- ++td.ip;
- break;
- case CEE_LDVIRTFTN: /* fallthrough */
- case CEE_LDFTN: {
- MonoMethod *m;
- if (*td.ip == CEE_LDVIRTFTN) {
- CHECK_STACK (&td, 1);
- --td.sp;
- }
- token = read32 (td.ip + 1);
- if (method->wrapper_type != MONO_WRAPPER_NONE)
- m = (MonoMethod *)mono_method_get_wrapper_data (method, token);
- else
- m = mono_get_method_full (image, token, NULL, generic_context);
-
- if (method->wrapper_type == MONO_WRAPPER_NONE && m->iflags & METHOD_IMPL_ATTRIBUTE_SYNCHRONIZED)
- m = mono_marshal_get_synchronized_wrapper (m);
-
- ADD_CODE(&td, *td.ip == CEE_LDFTN ? MINT_LDFTN : MINT_LDVIRTFTN);
- ADD_CODE(&td, get_data_item_index (&td, mono_interp_get_runtime_method (m)));
- td.ip += 5;
- PUSH_SIMPLE_TYPE (&td, STACK_TYPE_F);
- break;
- }
- case CEE_LDARG:
- load_arg (&td, read16 (td.ip + 1));
- td.ip += 3;
- break;
- case CEE_LDARGA: {
- int n = read16 (td.ip + 1);
- if (n == 0 && signature->hasthis)
- ADD_CODE(&td, MINT_LDTHISA);
- else {
- ADD_CODE(&td, MINT_LDARGA);
- ADD_CODE(&td, td.rtm->arg_offsets [n - signature->hasthis]); /* FIX for large offsets */
- }
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_MP);
- td.ip += 3;
- break;
- }
- case CEE_STARG:
- store_arg (&td, read16 (td.ip + 1));
- td.ip += 3;
- break;
- case CEE_LDLOC:
- load_local (&td, read16 (td.ip + 1));
- td.ip += 3;
- break;
- case CEE_LDLOCA:
- ADD_CODE(&td, MINT_LDLOCA_S);
- ADD_CODE(&td, td.rtm->local_offsets [read16 (td.ip + 1)]);
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_MP);
- td.ip += 3;
- break;
- case CEE_STLOC:
- store_local (&td, read16 (td.ip + 1));
- td.ip += 3;
- break;
- case CEE_LOCALLOC:
- CHECK_STACK (&td, 1);
-#if SIZEOF_VOID_P == 8
- if (td.sp [-1].type == STACK_TYPE_I8)
- ADD_CODE(&td, MINT_CONV_I4_I8);
-#endif
- ADD_CODE(&td, MINT_LOCALLOC);
- if (td.sp != td.stack + 1)
- g_warning("CEE_LOCALLOC: stack not empty");
- ++td.ip;
- SET_SIMPLE_TYPE(td.sp - 1, STACK_TYPE_MP);
- break;
-#if 0
- case CEE_UNUSED57: ves_abort(); break;
- case CEE_ENDFILTER: ves_abort(); break;
-#endif
- case CEE_UNALIGNED_:
- ++td.ip;
- /* FIX: should do something? */;
- break;
- case CEE_VOLATILE_:
- ++td.ip;
- /* FIX: should do something? */;
- break;
- case CEE_TAIL_:
- ++td.ip;
- /* FIX: should do something? */;
- break;
- case CEE_INITOBJ:
- CHECK_STACK(&td, 1);
- token = read32 (td.ip + 1);
- klass = mono_class_get_full (image, token, generic_context);
- ADD_CODE(&td, MINT_INITOBJ);
- i32 = mono_class_value_size (klass, NULL);
- WRITE32(&td, &i32);
- td.ip += 5;
- --td.sp;
- break;
- case CEE_CPBLK:
- CHECK_STACK(&td, 3);
- /* FIX? convert length to I8? */
- ADD_CODE(&td, MINT_CPBLK);
- td.sp -= 3;
- ++td.ip;
- break;
-#if 0
- case CEE_CONSTRAINED_: {
- guint32 token;
- /* FIXME: implement */
- ++ip;
- token = read32 (ip);
- ip += 4;
- break;
- }
-#endif
- case CEE_INITBLK:
- CHECK_STACK(&td, 3);
- ADD_CODE(&td, MINT_INITBLK);
- td.sp -= 3;
- break;
-#if 0
- case CEE_NO_:
- /* FIXME: implement */
- ip += 2;
- break;
-#endif
- case CEE_RETHROW:
- SIMPLE_OP (td, MINT_RETHROW);
- generating_code = 0;
- break;
- case CEE_SIZEOF: {
- guint32 align;
- gint32 size;
- token = read32 (td.ip + 1);
- td.ip += 5;
- if (mono_metadata_token_table (token) == MONO_TABLE_TYPESPEC) {
- MonoType *type = mono_type_create_from_typespec (image, token);
- size = mono_type_size (type, &align);
- } else {
- MonoClass *szclass = mono_class_get_full (image, token, generic_context);
- mono_class_init (szclass);
-#if 0
- if (!szclass->valuetype)
- THROW_EX (mono_exception_from_name (mono_defaults.corlib, "System", "InvalidProgramException"), ip - 5);
-#endif
- size = mono_class_value_size (szclass, &align);
- }
- ADD_CODE(&td, MINT_LDC_I4);
- WRITE32(&td, &size);
- PUSH_SIMPLE_TYPE(&td, STACK_TYPE_I4);
- break;
- }
-#if 0
- case CEE_REFANYTYPE: ves_abort(); break;
-#endif
- default:
- g_error ("transform.c: Unimplemented opcode: 0xFE %02x at 0x%x\n", *td.ip, td.ip-header->code);
- }
- break;
- default:
- g_error ("transform.c: Unimplemented opcode: %02x at 0x%x\n", *td.ip, td.ip-header->code);
- }
-
- if (td.new_ip - td.new_code != new_in_start_offset)
- td.last_new_ip = td.new_code + new_in_start_offset;
- else if (td.is_bb_start [td.in_start - td.il_code])
- td.is_bb_start [td.ip - td.il_code] = 1;
-
- td.last_ip = td.in_start;
- }
-
- if (mono_interp_traceopt) {
- const guint16 *p = td.new_code;
- printf("Runtime method: %p, VT stack size: %d\n", rtm, td.max_vt_sp);
- printf("Calculated stack size: %d, stated size: %d\n", td.max_stack_height, header->max_stack);
- while (p < td.new_ip) {
- p = mono_interp_dis_mintop(td.new_code, p);
- printf("\n");
- }
- }
-
- rtm->clauses = mono_mempool_alloc (domain->mp, header->num_clauses * sizeof(MonoExceptionClause));
- memcpy (rtm->clauses, header->clauses, header->num_clauses * sizeof(MonoExceptionClause));
- rtm->code = mono_mempool_alloc (domain->mp, (td.new_ip - td.new_code) * sizeof(gushort));
- memcpy (rtm->code, td.new_code, (td.new_ip - td.new_code) * sizeof(gushort));
- g_free (td.new_code);
- rtm->new_body_start = rtm->code + body_start_offset;
- rtm->num_clauses = header->num_clauses;
- for (i = 0; i < header->num_clauses; i++) {
- MonoExceptionClause *c = rtm->clauses + i;
- int end_off = c->try_offset + c->try_len;
- c->try_offset = td.in_offsets [c->try_offset];
- c->try_len = td.in_offsets [end_off] - c->try_offset;
- end_off = c->handler_offset + c->handler_len;
- c->handler_offset = td.in_offsets [c->handler_offset];
- c->handler_len = td.in_offsets [end_off] - c->handler_offset;
- }
- rtm->vt_stack_size = td.max_vt_sp;
- rtm->alloca_size = rtm->locals_size + rtm->args_size + rtm->vt_stack_size + rtm->stack_size;
- rtm->data_items = mono_mempool_alloc (domain->mp, td.n_data_items * sizeof (td.data_items [0]));
- memcpy (rtm->data_items, td.data_items, td.n_data_items * sizeof (td.data_items [0]));
- g_free (td.in_offsets);
- g_free (td.forward_refs);
- for (i = 0; i < header->code_size; ++i)
- g_free (td.stack_state [i]);
- g_free (td.stack_state);
- g_free (td.stack_height);
- g_free (td.vt_stack_size);
- g_free (td.data_items);
- g_hash_table_destroy (td.data_hash);
-}
-
-static CRITICAL_SECTION calc_section;
-
-void
-mono_interp_transform_init (void)
-{
- InitializeCriticalSection(&calc_section);
-}
-
-MonoException *
-mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *context)
-{
- int i, align, size, offset;
- MonoMethod *method = runtime_method->method;
- MonoImage *image = method->klass->image;
- MonoMethodHeader *header = mono_method_get_header (method);
- MonoMethodSignature *signature = mono_method_signature (method);
- register const unsigned char *ip, *end;
- const MonoOpcode *opcode;
- MonoMethod *m;
- MonoClass *class;
- MonoDomain *domain = mono_domain_get ();
- unsigned char *is_bb_start;
- int in;
- MonoVTable *method_class_vt;
- int backwards;
- MonoGenericContext *generic_context = NULL;
-
- method_class_vt = mono_class_vtable (domain, runtime_method->method->klass);
- if (!method_class_vt->initialized) {
- jmp_buf env;
- MonoInvocation *last_env_frame = context->env_frame;
- jmp_buf *old_env = context->current_env;
-
- if (setjmp(env)) {
- MonoException *failed = context->env_frame->ex;
- context->env_frame->ex = NULL;
- context->env_frame = last_env_frame;
- context->current_env = old_env;
- return failed;
- }
- context->env_frame = context->current_frame;
- context->current_env = &env;
- mono_runtime_class_init (method_class_vt);
- context->env_frame = last_env_frame;
- context->current_env = old_env;
- }
-
- mono_profiler_method_jit (method); /* sort of... */
-
- if (mono_method_signature (method)->is_inflated)
- generic_context = ((MonoMethodInflated *) method)->context;
-
- if (method->iflags & (METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL | METHOD_IMPL_ATTRIBUTE_RUNTIME)) {
- MonoMethod *nm = NULL;
- EnterCriticalSection(&calc_section);
- if (runtime_method->transformed) {
- LeaveCriticalSection(&calc_section);
- mono_profiler_method_end_jit (method, MONO_PROFILE_OK);
- return NULL;
- }
-
- /* assumes all internal calls with an array this are built in... */
- if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL &&
- (! mono_method_signature (method)->hasthis || method->klass->rank == 0)) {
- runtime_method->code = g_malloc(sizeof(short));
- runtime_method->code[0] = MINT_CALLINT;
- if (((MonoMethodPInvoke*) method)->addr == NULL)
- ((MonoMethodPInvoke*) method)->addr = mono_lookup_internal_call (method);
- runtime_method->func = mono_arch_create_trampoline (mono_method_signature (method), method->string_ctor);
- } else {
- const char *name = method->name;
- if (method->klass->parent == mono_defaults.multicastdelegate_class) {
- if (*name == 'I' && (strcmp (name, "Invoke") == 0)) {
- nm = mono_marshal_get_delegate_invoke (method);
- } else if (*name == 'B' && (strcmp (name, "BeginInvoke") == 0)) {
- nm = mono_marshal_get_delegate_begin_invoke (method);
- } else if (*name == 'E' && (strcmp (name, "EndInvoke") == 0)) {
- nm = mono_marshal_get_delegate_end_invoke (method);
- }
- }
- if (nm == NULL) {
- runtime_method->code = g_malloc(sizeof(short));
- runtime_method->code[0] = MINT_CALLRUN;
- }
- }
- if (nm == NULL) {
- runtime_method->stack_size = sizeof (stackval); /* for tracing */
- runtime_method->alloca_size = runtime_method->stack_size;
- runtime_method->transformed = TRUE;
- LeaveCriticalSection(&calc_section);
- mono_profiler_method_end_jit (method, MONO_PROFILE_OK);
- return NULL;
- }
- method = nm;
- header = mono_method_get_header (nm);
- LeaveCriticalSection(&calc_section);
- }
- g_assert ((signature->param_count + signature->hasthis) < 1000);
- g_assert (header->max_stack < 10000);
- /* intern the strings in the method. */
- ip = header->code;
- end = ip + header->code_size;
-
- is_bb_start = g_malloc0(header->code_size);
- is_bb_start [0] = 1;
- while (ip < end) {
- in = *ip;
- if (in == 0xfe) {
- ip++;
- in = *ip + 256;
- }
- else if (in == 0xf0) {
- ip++;
- in = *ip + MONO_CEE_MONO_ICALL;
- }
- opcode = &mono_opcodes [in];
- switch (opcode->argument) {
- case MonoInlineNone:
- ++ip;
- break;
- case MonoInlineString:
- if (method->wrapper_type == MONO_WRAPPER_NONE)
- mono_ldstr (domain, image, mono_metadata_token_index (read32 (ip + 1)));
- ip += 5;
- break;
- case MonoInlineType:
- if (method->wrapper_type == MONO_WRAPPER_NONE) {
- class = mono_class_get_full (image, read32 (ip + 1), generic_context);
- mono_class_init (class);
- /* quick fix to not do this for the fake ptr classes - probably should not be getting the vtable at all here */
- if (!(class->flags & TYPE_ATTRIBUTE_INTERFACE) && class->interface_offsets != NULL)
- mono_class_vtable (domain, class);
- }
- ip += 5;
- break;
- case MonoInlineMethod:
- if (method->wrapper_type == MONO_WRAPPER_NONE && *ip != CEE_CALLI) {
- m = mono_get_method_full (image, read32 (ip + 1), NULL, generic_context);
- if (m == NULL) {
- g_free (is_bb_start);
- return mono_get_exception_missing_method ();
- }
- mono_class_init (m->klass);
- if (!(m->klass->flags & TYPE_ATTRIBUTE_INTERFACE))
- mono_class_vtable (domain, m->klass);
- }
- ip += 5;
- break;
- case MonoInlineField:
- case MonoInlineSig:
- case MonoInlineI:
- case MonoInlineTok:
- case MonoShortInlineR:
- ip += 5;
- break;
- case MonoInlineBrTarget:
- offset = read32 (ip + 1);
- ip += 5;
- backwards = offset < 0;
- offset += ip - header->code;
- g_assert (offset >= 0 && offset < header->code_size);
- is_bb_start [offset] |= backwards ? 2 : 1;
- break;
- case MonoShortInlineBrTarget:
- offset = ((gint8 *)ip) [1];
- ip += 2;
- backwards = offset < 0;
- offset += ip - header->code;
- g_assert (offset >= 0 && offset < header->code_size);
- is_bb_start [offset] |= backwards ? 2 : 1;
- break;
- case MonoInlineVar:
- ip += 3;
- break;
- case MonoShortInlineVar:
- case MonoShortInlineI:
- ip += 2;
- break;
- case MonoInlineSwitch: {
- guint32 n;
- const unsigned char *next_ip;
- ++ip;
- n = read32 (ip);
- ip += 4;
- next_ip = ip + 4 * n;
- for (i = 0; i < n; i++) {
- offset = read32 (ip);
- backwards = offset < 0;
- offset += next_ip - header->code;
- g_assert (offset >= 0 && offset < header->code_size);
- is_bb_start [offset] |= backwards ? 2 : 1;
- ip += 4;
- }
- break;
- }
- case MonoInlineR:
- case MonoInlineI8:
- ip += 9;
- break;
- default:
- g_assert_not_reached ();
- }
- }
-
- /* the rest needs to be locked so it is only done once */
- EnterCriticalSection(&calc_section);
- if (runtime_method->transformed) {
- LeaveCriticalSection(&calc_section);
- g_free (is_bb_start);
- mono_profiler_method_end_jit (method, MONO_PROFILE_OK);
- return NULL;
- }
-
- runtime_method->local_offsets = g_malloc (header->num_locals * sizeof(guint32));
- runtime_method->stack_size = (sizeof (stackval) + 2) * header->max_stack; /* + 1 for returns of called functions + 1 for 0-ing in trace*/
- runtime_method->stack_size = (runtime_method->stack_size + 7) & ~7;
- offset = 0;
- for (i = 0; i < header->num_locals; ++i) {
- size = mono_type_size (header->locals [i], &align);
- offset += align - 1;
- offset &= ~(align - 1);
- runtime_method->local_offsets [i] = offset;
- offset += size;
- }
- offset = (offset + 7) & ~7;
- runtime_method->locals_size = offset;
- g_assert (runtime_method->locals_size < 65536);
- offset = 0;
- runtime_method->arg_offsets = g_malloc(signature->param_count * sizeof(guint32));
- for (i = 0; i < signature->param_count; ++i) {
- if (signature->pinvoke) {
- size = mono_type_native_stack_size (signature->params [i], &align);
- align = 8;
- }
- else
- size = mono_type_stack_size (signature->params [i], &align);
- offset += align - 1;
- offset &= ~(align - 1);
- runtime_method->arg_offsets [i] = offset;
- offset += size;
- }
- offset = (offset + 7) & ~7;
- runtime_method->args_size = offset;
- g_assert (runtime_method->args_size < 10000);
-
- generate(method, runtime_method, is_bb_start);
-
- g_free (is_bb_start);
-
- mono_profiler_method_end_jit (method, MONO_PROFILE_OK);
- runtime_method->transformed = TRUE;
- LeaveCriticalSection(&calc_section);
-
- return NULL;
-}
-
diff --git a/mono/io-layer/Makefile.am b/mono/io-layer/Makefile.am
index 07cc6d663bc..64001220142 100644
--- a/mono/io-layer/Makefile.am
+++ b/mono/io-layer/Makefile.am
@@ -13,7 +13,6 @@ OTHER_H = \
access.h \
collection.h \
context.h \
- critical-sections.h \
error.h \
events.h \
handles.h \
@@ -43,9 +42,6 @@ OTHER_SRC = \
collection.h \
context.c \
context.h \
- critical-sections.c \
- critical-sections.h \
- critical-section-private.h \
error.c \
error.h \
events.c \
diff --git a/mono/io-layer/critical-section-private.h b/mono/io-layer/critical-section-private.h
deleted file mode 100644
index b1740152bed..00000000000
--- a/mono/io-layer/critical-section-private.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * critical-section-private.h: Private definitions for critical sections
- *
- * Author:
- * Dick Porter (dick@ximian.com)
- *
- * Copyright (C) 2007 Novell, Inc.
- */
-
-#ifndef _WAPI_CRITICAL_SECTION_PRIVATE_H_
-#define _WAPI_CRITICAL_SECTION_PRIVATE_H_
-
-#include <config.h>
-#include <glib.h>
-
-extern void _wapi_critical_section_cleanup (void);
-
-#endif /* _WAPI_CRITICAL_SECTION_PRIVATE_H_ */
diff --git a/mono/io-layer/critical-sections.c b/mono/io-layer/critical-sections.c
deleted file mode 100644
index d9ba58bd859..00000000000
--- a/mono/io-layer/critical-sections.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * critical-sections.c: Critical sections
- *
- * Author:
- * Dick Porter (dick@ximian.com)
- *
- * (C) 2002 Ximian, Inc.
- */
-
-#include <config.h>
-#include <glib.h>
-#include <pthread.h>
-#include <errno.h>
-
-#include <mono/io-layer/wapi.h>
-#include <mono/io-layer/critical-section-private.h>
-
-#include <mono/utils/mono-mutex.h>
-
-/* A critical section is really just like a lightweight mutex. It
- * can't be waited for, and doesn't have a handle.
- */
-
-/**
- * InitializeCriticalSection:
- * @section: The critical section to initialise
- *
- * Initialises a critical section.
- */
-void InitializeCriticalSection(WapiCriticalSection *section)
-{
- int ret;
-
- ret = mono_mutex_init_recursive (&section->mutex);
- g_assert (ret == 0);
-}
-
-/**
- * InitializeCriticalSectionAndSpinCount:
- * @section: The critical section to initialise.
- * @spincount: The spin count for this critical section. Not
- * currently used.
- *
- * Initialises a critical section and sets the spin count. This
- * implementation just calls InitializeCriticalSection().
- *
- * Return value: %TRUE on success, %FALSE otherwise. (%FALSE never
- * happens).
- */
-gboolean InitializeCriticalSectionAndSpinCount(WapiCriticalSection *section,
- guint32 spincount G_GNUC_UNUSED)
-{
- InitializeCriticalSection(section);
-
- return(TRUE);
-}
-
-/**
- * DeleteCriticalSection:
- * @section: The critical section to delete.
- *
- * Releases all resources owned by critical section @section.
- */
-void DeleteCriticalSection(WapiCriticalSection *section)
-{
- int ret;
-
- ret = mono_mutex_destroy(&section->mutex);
- if (ret)
- g_error ("Failed to destroy mutex %p error code %d errno %d", &section->mutex, ret, errno);
-}
-
-/**
- * SetCriticalSectionSpinCount:
- * @section: The critical section to set
- * @spincount: The new spin count for this critical section. Not
- * currently used.
- *
- * Sets the spin count for the critical section @section. The spin
- * count is currently ignored, and set to zero.
- *
- * Return value: The previous spin count. (Currently always zero).
- */
-guint32 SetCriticalSectionSpinCount(WapiCriticalSection *section G_GNUC_UNUSED, guint32 spincount G_GNUC_UNUSED)
-{
- return(0);
-}
-
-/**
- * TryEnterCriticalSection:
- * @section: The critical section to try and enter
- *
- * Attempts to enter a critical section without blocking. If
- * successful the calling thread takes ownership of the critical
- * section.
- *
- * A thread can recursively call EnterCriticalSection() and
- * TryEnterCriticalSection(), but must call LeaveCriticalSection() an
- * equal number of times.
- *
- * Return value: %TRUE if the thread successfully locked the critical
- * section, %FALSE otherwise.
- */
-gboolean TryEnterCriticalSection(WapiCriticalSection *section)
-{
- int ret;
-
- ret=mono_mutex_trylock(&section->mutex);
- if(ret==0) {
- return(TRUE);
- } else {
- return(FALSE);
- }
-}
-
diff --git a/mono/io-layer/critical-sections.h b/mono/io-layer/critical-sections.h
deleted file mode 100644
index aa7bad248be..00000000000
--- a/mono/io-layer/critical-sections.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * critical-sections.h: Critical sections
- *
- * Author:
- * Dick Porter (dick@ximian.com)
- *
- * (C) 2002 Ximian, Inc.
- */
-
-#ifndef _WAPI_CRITICAL_SECTIONS_H_
-#define _WAPI_CRITICAL_SECTIONS_H_
-
-#include <glib.h>
-#include <pthread.h>
-
-#include <mono/utils/mono-mutex.h>
-
-G_BEGIN_DECLS
-
-typedef struct _WapiCriticalSection WapiCriticalSection;
-
-struct _WapiCriticalSection
-{
- guint32 depth;
- mono_mutex_t mutex;
-};
-
-extern void InitializeCriticalSection(WapiCriticalSection *section);
-extern gboolean InitializeCriticalSectionAndSpinCount(WapiCriticalSection *section, guint32 spincount);
-extern void DeleteCriticalSection(WapiCriticalSection *section);
-extern guint32 SetCriticalSectionSpinCount(WapiCriticalSection *section, guint32 spincount);
-extern gboolean TryEnterCriticalSection(WapiCriticalSection *section);
-
-/* These two are perf critical so avoid the wrapper function */
-
-#define EnterCriticalSection(section) do { \
- int ret = mono_mutex_lock(&(section)->mutex); \
- if (ret != 0) \
- g_warning ("Bad call to mono_mutex_lock result %d", ret); \
- g_assert (ret == 0); \
-} while (0)
-
-#define LeaveCriticalSection(section) do { \
- int ret = mono_mutex_unlock(&(section)->mutex); \
- if (ret != 0) \
- g_warning ("Bad call to mono_mutex_unlock result %d", ret); \
- g_assert (ret == 0); \
-} while (0)
-
-G_END_DECLS
-
-#endif /* _WAPI_CRITICAL_SECTIONS_H_ */
diff --git a/mono/io-layer/handles.c b/mono/io-layer/handles.c
index 146c275cb5d..8cd74e9ff36 100644
--- a/mono/io-layer/handles.c
+++ b/mono/io-layer/handles.c
@@ -37,7 +37,6 @@
#include <mono/io-layer/shared.h>
#include <mono/io-layer/collection.h>
#include <mono/io-layer/process-private.h>
-#include <mono/io-layer/critical-section-private.h>
#include <mono/utils/mono-mutex.h>
#undef DEBUG_REFS
@@ -131,10 +130,10 @@ struct _WapiFileShareLayout *_wapi_fileshare_layout = NULL;
* 4MB array.
*/
static GHashTable *file_share_hash;
-static CRITICAL_SECTION file_share_hash_mutex;
+static mono_mutex_t file_share_hash_mutex;
-#define file_share_hash_lock() EnterCriticalSection (&file_share_hash_mutex)
-#define file_share_hash_unlock() LeaveCriticalSection (&file_share_hash_mutex)
+#define file_share_hash_lock() mono_mutex_lock (&file_share_hash_mutex)
+#define file_share_hash_unlock() mono_mutex_unlock (&file_share_hash_mutex)
guint32 _wapi_fd_reserve;
@@ -207,7 +206,7 @@ static void handle_cleanup (void)
if (file_share_hash) {
g_hash_table_destroy (file_share_hash);
- DeleteCriticalSection (&file_share_hash_mutex);
+ mono_mutex_destroy (&file_share_hash_mutex);
}
for (i = 0; i < _WAPI_PRIVATE_MAX_SLOTS; ++i)
@@ -1664,7 +1663,7 @@ gboolean _wapi_handle_get_or_set_share (dev_t device, ino_t inode,
*/
if (!file_share_hash) {
file_share_hash = g_hash_table_new_full (wapi_share_info_hash, wapi_share_info_equal, NULL, g_free);
- InitializeCriticalSection (&file_share_hash_mutex);
+ mono_mutex_init_recursive (&file_share_hash_mutex);
}
tmp.device = device;
diff --git a/mono/io-layer/io-layer.h b/mono/io-layer/io-layer.h
index 394799bc86c..6b21f056ca2 100755
--- a/mono/io-layer/io-layer.h
+++ b/mono/io-layer/io-layer.h
@@ -21,9 +21,9 @@
* Declare as __GetProcessId for unsupported targets. */
#define GetProcessId __GetProcessId
#endif
-#include <winsock2.h>
#include <windows.h>
#include <winbase.h>
+#include <winsock2.h>
/*
* The mingw version says:
* /usr/i686-pc-mingw32/sys-root/mingw/include/ws2tcpip.h:38:2: error: #error "ws2tcpip.h is not compatible with winsock.h. Include winsock2.h instead."
diff --git a/mono/io-layer/io.c b/mono/io-layer/io.c
index d87bee7ec41..169cb07617a 100755..100644
--- a/mono/io-layer/io.c
+++ b/mono/io-layer/io.c
@@ -4260,7 +4260,7 @@ guint32 GetDriveType(const gunichar2 *root_path_name)
return (drive_type);
}
-#if defined (PLATFORM_MACOSX) || defined (__linux__) || defined(PLATFORM_BSD) || defined(__native_client__)
+#if defined (PLATFORM_MACOSX) || defined (__linux__) || defined(PLATFORM_BSD) || defined(__native_client__) || defined(__FreeBSD_kernel__)
static gchar*
get_fstypename (gchar *utfpath)
{
diff --git a/mono/io-layer/uglify.h b/mono/io-layer/uglify.h
index cf2984829ec..120ce317747 100644
--- a/mono/io-layer/uglify.h
+++ b/mono/io-layer/uglify.h
@@ -51,8 +51,6 @@ typedef WapiSecurityAttributes *LPSECURITY_ATTRIBUTES;
typedef WapiOverlapped *LPOVERLAPPED;
typedef WapiOverlappedCB LPOVERLAPPED_COMPLETION_ROUTINE;
typedef WapiThreadStart LPTHREAD_START_ROUTINE;
-typedef WapiCriticalSection CRITICAL_SECTION;
-typedef WapiCriticalSection *LPCRITICAL_SECTION;
typedef WapiFileTime FILETIME;
typedef WapiFileTime *LPFILETIME;
typedef WapiSystemTime SYSTEMTIME;
diff --git a/mono/io-layer/wapi.h b/mono/io-layer/wapi.h
index db051decf84..86054fd6612 100644
--- a/mono/io-layer/wapi.h
+++ b/mono/io-layer/wapi.h
@@ -16,7 +16,6 @@
#include <mono/io-layer/io.h>
#include <mono/io-layer/access.h>
#include <mono/io-layer/context.h>
-#include <mono/io-layer/critical-sections.h>
#include <mono/io-layer/error.h>
#include <mono/io-layer/events.h>
#include <mono/io-layer/messages.h>
@@ -32,4 +31,6 @@
#include <mono/io-layer/versioninfo.h>
#include <mono/io-layer/wait.h>
+#include <mono/utils/mono-mutex.h>
+
#endif /* _WAPI_WAPI_H_ */
diff --git a/mono/metadata/Makefile.am.in b/mono/metadata/Makefile.am
index 70591c7ba41..bfa08c4d39c 100644
--- a/mono/metadata/Makefile.am.in
+++ b/mono/metadata/Makefile.am
@@ -196,7 +196,10 @@ common_sources = \
reflection-internals.h \
file-mmap-posix.c \
file-mmap-windows.c \
- file-mmap.h
+ file-mmap.h \
+ object-offsets.h \
+ abi-details.h \
+ metadata-cross-helpers.c
# These source files have compile time dependencies on GC code
@@ -236,6 +239,8 @@ sgen_sources = \
sgen-archdep.h \
sgen-cardtable.c \
sgen-cardtable.h \
+ sgen-pointer-queue.c \
+ sgen-pointer-queue.h \
sgen-pinning.c \
sgen-pinning.h \
sgen-pinning-stats.c \
@@ -337,10 +342,4 @@ endif
endif
EXTRA_DIST = make-bundle.pl sample-bundle $(win32_sources) $(unix_sources) $(null_sources) runtime.h \
- tpool-poll.c tpool-epoll.c tpool-kqueue.c Makefile.am.in
-
-if HAS_EXTENSION_MODULE
-else
-Makefile.am: Makefile.am.in
- cp $< $@
-endif
+ tpool-poll.c tpool-epoll.c tpool-kqueue.c
diff --git a/mono/metadata/abi-details.h b/mono/metadata/abi-details.h
new file mode 100644
index 00000000000..01c741b35d7
--- /dev/null
+++ b/mono/metadata/abi-details.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2014 Xamarin Inc
+ */
+#ifndef __MONO_METADATA_ABI_DETAILS_H__
+#define __MONO_METADATA_ABI_DETAILS_H__
+
+#include <config.h>
+#include <glib.h>
+
+#define MONO_ABI_ALIGNOF(type) MONO_ALIGN_ ## type
+#define MONO_CURRENT_ABI_ALIGNOF(type) ((int)G_STRUCT_OFFSET(struct { char c; type x; }, x))
+
+
+#undef DECL_OFFSET
+#undef DECL_OFFSET2
+#define DECL_OFFSET(struct,field) MONO_OFFSET_ ## struct ## _ ## field = -1,
+#define DECL_OFFSET2(struct,field,offset) MONO_OFFSET_ ## struct ## _ ## field = offset,
+#define DECL_ALIGN(type) MONO_ALIGN_ ##type = MONO_CURRENT_ABI_ALIGNOF (type),
+#define DECL_ALIGN2(type,size) MONO_ALIGN_ ##type = size,
+
+enum {
+#include "object-offsets.h"
+};
+
+#ifdef USED_CROSS_COMPILER_OFFSETS
+#define MONO_STRUCT_OFFSET(struct,field) MONO_OFFSET_ ## struct ## _ ## field
+#else
+#define MONO_STRUCT_OFFSET(struct,field) (MONO_OFFSET_ ## struct ## _ ## field == -1, G_STRUCT_OFFSET (struct,field))
+#endif
+
+#endif
diff --git a/mono/metadata/appdomain.c b/mono/metadata/appdomain.c
index 5b3294aa6b6..45b9a606ab6 100644
--- a/mono/metadata/appdomain.c
+++ b/mono/metadata/appdomain.c
@@ -88,9 +88,9 @@ typedef struct
gchar *filename;
} RuntimeConfig;
-CRITICAL_SECTION mono_delegate_section;
+mono_mutex_t mono_delegate_section;
-CRITICAL_SECTION mono_strtod_mutex;
+mono_mutex_t mono_strtod_mutex;
static gunichar2 process_guid [36];
static gboolean process_guid_set = FALSE;
@@ -242,17 +242,17 @@ mono_runtime_init (MonoDomain *domain, MonoThreadStartCB start_cb,
mono_thread_init (start_cb, attach_cb);
class = mono_class_from_name (mono_defaults.corlib, "System", "AppDomainSetup");
- setup = (MonoAppDomainSetup *) mono_object_new (domain, class);
+ setup = (MonoAppDomainSetup *) mono_object_new_pinned (domain, class);
class = mono_class_from_name (mono_defaults.corlib, "System", "AppDomain");
- ad = (MonoAppDomain *) mono_object_new (domain, class);
+ ad = (MonoAppDomain *) mono_object_new_pinned (domain, class);
ad->data = domain;
domain->domain = ad;
domain->setup = setup;
- InitializeCriticalSection (&mono_delegate_section);
+ mono_mutex_init_recursive (&mono_delegate_section);
- InitializeCriticalSection (&mono_strtod_mutex);
+ mono_mutex_init_recursive (&mono_strtod_mutex);
mono_thread_attach (domain);
mono_context_init (domain);
@@ -330,7 +330,7 @@ mono_context_init (MonoDomain *domain)
MonoAppContext *context;
class = mono_class_from_name (mono_defaults.corlib, "System.Runtime.Remoting.Contexts", "Context");
- context = (MonoAppContext *) mono_object_new (domain, class);
+ context = (MonoAppContext *) mono_object_new_pinned (domain, class);
context->domain_id = domain->domain_id;
context->context_id = 0;
domain->default_context = context;
@@ -403,6 +403,25 @@ mono_domain_create_appdomain (char *friendly_name, char *configuration_file)
return mono_domain_from_appdomain (ad);
}
+/**
+ * mono_domain_set_config:
+ * @domain: MonoDomain initialized with the appdomain we want to change
+ * @base_dir: new base directory for the appdomain
+ * @config_file_name: path to the new configuration for the app domain
+ *
+ * Used to set the system configuration for an appdomain
+ *
+ * Without using this, embedded builds will get 'System.Configuration.ConfigurationErrorsException:
+ * Error Initializing the configuration system. ---> System.ArgumentException:
+ * The 'ExeConfigFilename' argument cannot be null.' for some managed calls.
+ */
+void
+mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name)
+{
+ MONO_OBJECT_SETREF (domain->setup, application_base, mono_string_new (domain, base_dir));
+ MONO_OBJECT_SETREF (domain->setup, configuration_file, mono_string_new (domain, config_file_name));
+}
+
static MonoAppDomainSetup*
copy_app_domain_setup (MonoDomain *domain, MonoAppDomainSetup *setup)
{
@@ -1861,7 +1880,7 @@ mono_domain_assembly_search (MonoAssemblyName *aname,
for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
ass = tmp->data;
/* Dynamic assemblies can't match here in MS.NET */
- if (ass->dynamic || refonly != ass->ref_only || !mono_assembly_names_equal (aname, &ass->aname))
+ if (assembly_is_dynamic (ass) || refonly != ass->ref_only || !mono_assembly_names_equal (aname, &ass->aname))
continue;
mono_domain_assemblies_unlock (domain);
@@ -2253,12 +2272,12 @@ deregister_reflection_info_roots (MonoDomain *domain)
* promoting it from a simple lock to a complex lock, which we better avoid if
* possible.
*/
- if (image->dynamic)
+ if (image_is_dynamic (image))
deregister_reflection_info_roots_from_list (image);
for (i = 0; i < image->module_count; ++i) {
MonoImage *module = image->modules [i];
- if (module && module->dynamic)
+ if (module && image_is_dynamic (module))
deregister_reflection_info_roots_from_list (module);
}
}
diff --git a/mono/metadata/appdomain.h b/mono/metadata/appdomain.h
index 3b3884330f9..e0c2f671c2e 100644
--- a/mono/metadata/appdomain.h
+++ b/mono/metadata/appdomain.h
@@ -66,6 +66,9 @@ mono_domain_create (void);
MONO_API MonoDomain *
mono_domain_create_appdomain (char *friendly_name, char *configuration_file);
+MONO_API void
+mono_domain_set_config (MonoDomain *domain, const char *base_dir, const char *config_file_name);
+
MONO_API MonoDomain *
mono_domain_get (void);
diff --git a/mono/metadata/assembly.c b/mono/metadata/assembly.c
index 15d60411420..afda4dd45fa 100644
--- a/mono/metadata/assembly.c
+++ b/mono/metadata/assembly.c
@@ -170,9 +170,9 @@ mono_set_corlib_data (void *data, size_t size)
#endif
/* This protects loaded_assemblies and image->references */
-#define mono_assemblies_lock() EnterCriticalSection (&assemblies_mutex)
-#define mono_assemblies_unlock() LeaveCriticalSection (&assemblies_mutex)
-static CRITICAL_SECTION assemblies_mutex;
+#define mono_assemblies_lock() mono_mutex_lock (&assemblies_mutex)
+#define mono_assemblies_unlock() mono_mutex_unlock (&assemblies_mutex)
+static mono_mutex_t assemblies_mutex;
/* If defined, points to the bundled assembly information */
const MonoBundledAssembly **bundles;
@@ -582,7 +582,7 @@ compute_base (char *path)
return NULL;
/* Not a well known Mono executable, we are embedded, cant guess the base */
- if (strcmp (p, "/mono") && strcmp (p, "/mono-sgen") && strcmp (p, "/pedump") && strcmp (p, "/monodis") && strcmp (p, "/mint") && strcmp (p, "/monodiet"))
+ if (strcmp (p, "/mono") && strcmp (p, "/mono-boehm") && strcmp (p, "/mono-sgen") && strcmp (p, "/pedump") && strcmp (p, "/monodis"))
return NULL;
*p = 0;
@@ -739,7 +739,7 @@ mono_assemblies_init (void)
check_path_env ();
check_extra_gac_path_env ();
- InitializeCriticalSection (&assemblies_mutex);
+ mono_mutex_init_recursive (&assemblies_mutex);
mono_mutex_init (&assembly_binding_mutex);
}
@@ -3024,7 +3024,7 @@ mono_assembly_release_gc_roots (MonoAssembly *assembly)
if (assembly == NULL || assembly == REFERENCE_MISSING)
return;
- if (assembly->dynamic) {
+ if (assembly_is_dynamic (assembly)) {
int i;
MonoDynamicImage *dynimg = (MonoDynamicImage *)assembly->image;
for (i = 0; i < dynimg->image.module_count; ++i)
@@ -3087,7 +3087,7 @@ mono_assembly_close_finish (MonoAssembly *assembly)
if (assembly->image)
mono_image_close_finish (assembly->image);
- if (assembly->dynamic) {
+ if (assembly_is_dynamic (assembly)) {
g_free ((char*)assembly->aname.culture);
} else {
g_free (assembly);
@@ -3142,7 +3142,7 @@ mono_assemblies_cleanup (void)
{
GSList *l;
- DeleteCriticalSection (&assemblies_mutex);
+ mono_mutex_destroy (&assemblies_mutex);
mono_mutex_destroy (&assembly_binding_mutex);
for (l = loaded_assembly_bindings; l; l = l->next) {
diff --git a/mono/metadata/attach.c b/mono/metadata/attach.c
index 83b06dc6ff9..0a053661b8e 100644
--- a/mono/metadata/attach.c
+++ b/mono/metadata/attach.c
@@ -99,9 +99,9 @@ static gboolean stop_receiver_thread;
static gboolean needs_to_start, started;
-#define agent_lock() EnterCriticalSection (&agent_mutex)
-#define agent_unlock() LeaveCriticalSection (&agent_mutex)
-static CRITICAL_SECTION agent_mutex;
+#define agent_lock() mono_mutex_lock (&agent_mutex)
+#define agent_unlock() mono_mutex_unlock (&agent_mutex)
+static mono_mutex_t agent_mutex;
static void transport_connect (void);
@@ -193,7 +193,7 @@ mono_attach_parse_options (char *options)
void
mono_attach_init (void)
{
- InitializeCriticalSection (&agent_mutex);
+ mono_mutex_init_recursive (&agent_mutex);
config.enabled = TRUE;
}
diff --git a/mono/metadata/boehm-gc.c b/mono/metadata/boehm-gc.c
index ef498c60760..3320820f877 100644
--- a/mono/metadata/boehm-gc.c
+++ b/mono/metadata/boehm-gc.c
@@ -455,7 +455,7 @@ on_gc_notification (GCEventType event)
mono_perfcounters->gc_gen0size = heap_size;
}
#endif
- gc_stats.major_gc_time_usecs += (mono_100ns_ticks () - gc_start_time) / 10;
+ gc_stats.major_gc_time += mono_100ns_ticks () - gc_start_time;
mono_trace_message (MONO_TRACE_GC, "gc took %d usecs", (mono_100ns_ticks () - gc_start_time) / 10);
break;
}
@@ -1177,7 +1177,7 @@ mono_gc_conservatively_scan_area (void *start, void *end)
}
void *
-mono_gc_scan_object (void *obj)
+mono_gc_scan_object (void *obj, void *gc_data)
{
g_assert_not_reached ();
return NULL;
diff --git a/mono/metadata/class-internals.h b/mono/metadata/class-internals.h
index 4c2ae237574..32b5ef4561e 100644
--- a/mono/metadata/class-internals.h
+++ b/mono/metadata/class-internals.h
@@ -881,6 +881,16 @@ typedef gboolean (*MonoGetCachedClassInfo) (MonoClass *klass, MonoCachedClassInf
typedef gboolean (*MonoGetClassFromName) (MonoImage *image, const char *name_space, const char *name, MonoClass **res);
+static inline gboolean
+method_is_dynamic (MonoMethod *method)
+{
+#ifdef DISABLE_REFLECTION_EMIT
+ return FALSE;
+#else
+ return method->dynamic;
+#endif
+}
+
void
mono_classes_init (void) MONO_INTERNAL;
@@ -1218,13 +1228,9 @@ MONO_API MonoGenericContainer *
mono_metadata_load_generic_params (MonoImage *image, guint32 token,
MonoGenericContainer *parent_container);
-MONO_API void
-mono_metadata_load_generic_param_constraints (MonoImage *image, guint32 token,
- MonoGenericContainer *container);
-
-gboolean
-mono_metadata_load_generic_param_constraints_full (MonoImage *image, guint32 token,
- MonoGenericContainer *container) MONO_INTERNAL;
+MONO_API gboolean
+mono_metadata_load_generic_param_constraints_checked (MonoImage *image, guint32 token,
+ MonoGenericContainer *container, MonoError *error);
MonoMethodSignature*
mono_create_icall_signature (const char *sigstr) MONO_INTERNAL;
@@ -1288,7 +1294,7 @@ MONO_API gboolean
mono_class_is_valid_enum (MonoClass *klass);
MonoType *
-mono_type_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *context) MONO_INTERNAL;
+mono_type_get_checked (MonoImage *image, guint32 type_token, MonoGenericContext *context, MonoError *error) MONO_INTERNAL;
gboolean
mono_generic_class_is_generic_type_definition (MonoGenericClass *gklass) MONO_INTERNAL;
@@ -1376,4 +1382,16 @@ mono_class_get_methods_by_name (MonoClass *klass, const char *name, guint32 bfla
char*
mono_class_full_name (MonoClass *klass) MONO_INTERNAL;
+MonoClass*
+mono_class_inflate_generic_class_checked (MonoClass *gklass, MonoGenericContext *context, MonoError *error) MONO_INTERNAL;
+
+MonoClass *
+mono_class_get_checked (MonoImage *image, guint32 type_token, MonoError *error) MONO_INTERNAL;
+
+MonoClass *
+mono_class_get_and_inflate_typespec_checked (MonoImage *image, guint32 type_token, MonoGenericContext *context, MonoError *error) MONO_INTERNAL;
+
+MonoClass *
+mono_class_from_name_case_checked (MonoImage *image, const char* name_space, const char *name, MonoError *error) MONO_INTERNAL;
+
#endif /* __MONO_METADATA_CLASS_INTERBALS_H__ */
diff --git a/mono/metadata/class.c b/mono/metadata/class.c
index 2a0b76e97dd..240792536d3 100644
--- a/mono/metadata/class.c
+++ b/mono/metadata/class.c
@@ -52,6 +52,9 @@ gboolean mono_print_vtable = FALSE;
guint32 inflated_classes, inflated_classes_size, inflated_methods_size;
guint32 classes_size, class_ext_size;
+/* Low level lock which protects data structures in this module */
+static mono_mutex_t classes_mutex;
+
/* Function supplied by the runtime to find classes by name using information from the AOT file */
static MonoGetClassFromName get_class_from_name = NULL;
@@ -100,6 +103,18 @@ static int record_gclass_instantiation;
static GSList *gclass_recorded_list;
typedef gboolean (*gclass_record_func) (MonoClass*, void*);
+static inline void
+classes_lock (void)
+{
+ mono_locks_acquire (&classes_mutex, ClassesLock);
+}
+
+static inline void
+classes_unlock (void)
+{
+ mono_locks_release (&classes_mutex, ClassesLock);
+}
+
/*
* LOCKING: loader lock must be held until pairing disable_gclass_recording is called.
*/
@@ -151,59 +166,60 @@ MonoClass *
mono_class_from_typeref (MonoImage *image, guint32 type_token)
{
MonoError error;
+ MonoClass *class = mono_class_from_typeref_checked (image, type_token, &error);
+ g_assert (mono_error_ok (&error)); /*FIXME proper error handling*/
+ return class;
+}
+
+MonoClass *
+mono_class_from_typeref_checked (MonoImage *image, guint32 type_token, MonoError *error)
+{
guint32 cols [MONO_TYPEREF_SIZE];
MonoTableInfo *t = &image->tables [MONO_TABLE_TYPEREF];
guint32 idx;
const char *name, *nspace;
- MonoClass *res;
+ MonoClass *res = NULL;
MonoImage *module;
- if (!mono_verifier_verify_typeref_row (image, (type_token & 0xffffff) - 1, &error)) {
- mono_trace_warning (MONO_TRACE_TYPE, "Failed to resolve typeref from %s due to '%s'", image->name, mono_error_get_message (&error));
+ mono_error_init (error);
+
+ if (!mono_verifier_verify_typeref_row (image, (type_token & 0xffffff) - 1, error))
return NULL;
- }
mono_metadata_decode_row (t, (type_token&0xffffff)-1, cols, MONO_TYPEREF_SIZE);
name = mono_metadata_string_heap (image, cols [MONO_TYPEREF_NAME]);
nspace = mono_metadata_string_heap (image, cols [MONO_TYPEREF_NAMESPACE]);
- idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLTION_SCOPE_BITS;
- switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLTION_SCOPE_MASK) {
- case MONO_RESOLTION_SCOPE_MODULE:
+ idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLUTION_SCOPE_BITS;
+ switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLUTION_SCOPE_MASK) {
+ case MONO_RESOLUTION_SCOPE_MODULE:
/*
LAMESPEC The spec says that a null module resolution scope should go through the exported type table.
This is not the observed behavior of existing implementations.
The defacto behavior is that it's just a typedef in disguise.
*/
/* a typedef in disguise */
- return mono_class_from_name (image, nspace, name);
- case MONO_RESOLTION_SCOPE_MODULEREF:
+ res = mono_class_from_name (image, nspace, name); /*FIXME proper error handling*/
+ goto done;
+
+ case MONO_RESOLUTION_SCOPE_MODULEREF:
module = mono_image_load_module (image, idx);
if (module)
- return mono_class_from_name (module, nspace, name);
- else {
- char *msg = g_strdup_printf ("%s%s%s", nspace, nspace [0] ? "." : "", name);
- char *human_name;
-
- human_name = mono_stringify_assembly_name (&image->assembly->aname);
- mono_loader_set_error_type_load (msg, human_name);
- g_free (msg);
- g_free (human_name);
-
- return NULL;
- }
- case MONO_RESOLTION_SCOPE_TYPEREF: {
+ res = mono_class_from_name (module, nspace, name); /*FIXME proper error handling*/
+ goto done;
+
+ case MONO_RESOLUTION_SCOPE_TYPEREF: {
MonoClass *enclosing;
GList *tmp;
if (idx == mono_metadata_token_index (type_token)) {
- mono_loader_set_error_bad_image (g_strdup_printf ("Image %s with self-referencing typeref token %08x.", image->name, type_token));
+ mono_error_set_bad_image (error, image, "Image with self-referencing typeref token %08x.", type_token);
return NULL;
}
- enclosing = mono_class_from_typeref (image, MONO_TOKEN_TYPE_REF | idx);
- if (!enclosing)
+ enclosing = mono_class_from_typeref_checked (image, MONO_TOKEN_TYPE_REF | idx, error);
+ if (!mono_error_ok (error))
return NULL;
if (enclosing->nested_classes_inited && enclosing->ext) {
@@ -221,28 +237,21 @@ mono_class_from_typeref (MonoImage *image, guint32 type_token)
guint32 string_offset = mono_metadata_decode_row_col (&enclosing->image->tables [MONO_TABLE_TYPEDEF], class_nested - 1, MONO_TYPEDEF_NAME);
const char *nname = mono_metadata_string_heap (enclosing->image, string_offset);
- if (strcmp (nname, name) == 0) {
- MonoClass *res = mono_class_create_from_typedef (enclosing->image, MONO_TOKEN_TYPE_DEF | class_nested, &error);
- if (!mono_error_ok (&error)) {
- mono_loader_set_error_from_mono_error (&error);
- mono_error_cleanup (&error); /*FIXME don't swallow error message.*/
- return NULL;
- }
- return res;
- }
+ if (strcmp (nname, name) == 0)
+ return mono_class_create_from_typedef (enclosing->image, MONO_TOKEN_TYPE_DEF | class_nested, error);
i = mono_metadata_nesting_typedef (enclosing->image, enclosing->type_token, i + 1);
}
}
g_warning ("TypeRef ResolutionScope not yet handled (%d) for %s.%s in image %s", idx, nspace, name, image->name);
- return NULL;
+ goto done;
}
- case MONO_RESOLTION_SCOPE_ASSEMBLYREF:
+ case MONO_RESOLUTION_SCOPE_ASSEMBLYREF:
break;
}
if (idx > image->tables [MONO_TABLE_ASSEMBLYREF].rows) {
- mono_loader_set_error_bad_image (g_strdup_printf ("Image %s with invalid assemblyref token %08x.", image->name, idx));
+ mono_error_set_bad_image (error, image, "Image with invalid assemblyref token %08x.", idx);
return NULL;
}
@@ -257,13 +266,20 @@ mono_class_from_typeref (MonoImage *image, guint32 type_token)
mono_assembly_get_assemblyref (image, idx - 1, &aname);
human_name = mono_stringify_assembly_name (&aname);
- mono_loader_set_error_assembly_load (human_name, image->assembly ? image->assembly->ref_only : FALSE);
- g_free (human_name);
-
+ mono_error_set_assembly_load_simple (error, human_name, image->assembly ? image->assembly->ref_only : FALSE);
return NULL;
}
- return mono_class_from_name (image->references [idx - 1]->image, nspace, name);
+ res = mono_class_from_name (image->references [idx - 1]->image, nspace, name);
+
+done:
+ /* Generic case, should be avoided for when a better error is possible. */
+ if (!res && mono_error_ok (error)) {
+ char *name = mono_class_name_from_token (image, type_token);
+ char *assembly = mono_assembly_name_from_token (image, type_token);
+ mono_error_set_type_load_name (error, name, assembly, "Could not resolve type with token %08x", type_token);
+ }
+ return res;
}
@@ -719,7 +735,7 @@ inflate_generic_type (MonoImage *image, MonoType *type, MonoGenericContext *cont
if (inst == container->context.class_inst)
return NULL;
- gclass = mono_metadata_lookup_generic_class (klass, inst, klass->image->dynamic);
+ gclass = mono_metadata_lookup_generic_class (klass, inst, image_is_dynamic (klass->image));
nt = mono_metadata_type_dup (image, type);
nt->type = MONO_TYPE_GENERICINST;
@@ -878,7 +894,7 @@ mono_class_inflate_generic_type_no_copy (MonoImage *image, MonoType *type, MonoG
return inflated;
}
-static MonoClass*
+MonoClass*
mono_class_inflate_generic_class_checked (MonoClass *gklass, MonoGenericContext *context, MonoError *error)
{
MonoClass *res;
@@ -1047,7 +1063,7 @@ mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *k
*
*/
is_mb_open = method->is_generic &&
- method->klass->image->dynamic && !method->klass->wastypebuilder && /* that is a MethodBuilder from an unfinished TypeBuilder */
+ image_is_dynamic (method->klass->image) && !method->klass->wastypebuilder && /* that is a MethodBuilder from an unfinished TypeBuilder */
context->method_inst == mono_method_get_generic_container (method)->context.method_inst; /* and it's been instantiated with its own arguments. */
iresult = g_new0 (MonoMethodInflated, 1);
@@ -1243,7 +1259,7 @@ mono_method_set_generic_container (MonoMethod *method, MonoGenericContainer* con
* in a separate function since it is cheaper than calling mono_class_setup_fields.
*/
static MonoType*
-mono_class_find_enum_basetype (MonoClass *class)
+mono_class_find_enum_basetype (MonoClass *class, MonoError *error)
{
MonoGenericContainer *container = NULL;
MonoImage *m = class->image;
@@ -1252,6 +1268,8 @@ mono_class_find_enum_basetype (MonoClass *class)
g_assert (class->enumtype);
+ mono_error_init (error);
+
if (class->generic_container)
container = class->generic_container;
else if (class->generic_class) {
@@ -1276,27 +1294,41 @@ mono_class_find_enum_basetype (MonoClass *class)
if (cols [MONO_FIELD_FLAGS] & FIELD_ATTRIBUTE_STATIC) //no need to decode static fields
continue;
- if (!mono_verifier_verify_field_signature (class->image, cols [MONO_FIELD_SIGNATURE], NULL))
- return NULL;
+ if (!mono_verifier_verify_field_signature (class->image, cols [MONO_FIELD_SIGNATURE], NULL)) {
+ mono_error_set_bad_image (error, class->image, "Invalid field signature %x", cols [MONO_FIELD_SIGNATURE]);
+ goto fail;
+ }
sig = mono_metadata_blob_heap (m, cols [MONO_FIELD_SIGNATURE]);
mono_metadata_decode_value (sig, &sig);
/* FIELD signature == 0x06 */
- if (*sig != 0x06)
- return NULL;
+ if (*sig != 0x06) {
+ mono_error_set_bad_image (error, class->image, "Invalid field signature %x, expected 0x6 but got %x", cols [MONO_FIELD_SIGNATURE], *sig);
+ goto fail;
+ }
ftype = mono_metadata_parse_type_full (m, container, MONO_PARSE_FIELD, cols [MONO_FIELD_FLAGS], sig + 1, &sig);
- if (!ftype)
- return NULL;
+ if (!ftype) {
+ if (mono_loader_get_last_error ()) /*FIXME plug the above to not leak errors*/
+ mono_error_set_from_loader_error (error);
+ else
+ mono_error_set_bad_image (error, class->image, "Could not parse type for field signature %x", cols [MONO_FIELD_SIGNATURE]);
+ goto fail;
+ }
if (class->generic_class) {
//FIXME do we leak here?
- ftype = mono_class_inflate_generic_type (ftype, mono_class_get_context (class));
+ ftype = mono_class_inflate_generic_type_checked (ftype, mono_class_get_context (class), error);
+ if (!mono_error_ok (error))
+ goto fail;
ftype->attrs = cols [MONO_FIELD_FLAGS];
}
return ftype;
}
+ mono_error_set_type_load_class (error, class, "Could not find base type");
+fail:
+ g_assert (!mono_loader_get_last_error ());
return NULL;
}
@@ -1369,7 +1401,7 @@ mono_class_setup_basic_field_info (MonoClass *class)
image = class->image;
top = class->field.count;
- if (class->generic_class && class->generic_class->container_class->image->dynamic && !class->generic_class->container_class->wastypebuilder) {
+ if (class->generic_class && image_is_dynamic (class->generic_class->container_class->image) && !class->generic_class->container_class->wastypebuilder) {
/*
* This happens when a generic instance of an unfinished generic typebuilder
* is used as an element type for creating an array type. We can't initialize
@@ -1479,7 +1511,7 @@ mono_class_setup_fields (MonoClass *class)
if (class->setup_fields_called)
return;
- if (class->generic_class && class->generic_class->container_class->image->dynamic && !class->generic_class->container_class->wastypebuilder) {
+ if (class->generic_class && image_is_dynamic (class->generic_class->container_class->image) && !class->generic_class->container_class->wastypebuilder) {
/*
* This happens when a generic instance of an unfinished generic typebuilder
* is used as an element type for creating an array type. We can't initialize
@@ -1895,7 +1927,7 @@ mono_class_layout_fields (MonoClass *class)
field->offset &= ~(align - 1);
}
/*TypeBuilders produce all sort of weird things*/
- g_assert (class->image->dynamic || field->offset > 0);
+ g_assert (image_is_dynamic (class->image) || field->offset > 0);
real_size = field->offset + size;
}
@@ -2030,7 +2062,7 @@ create_array_method (MonoClass *class, const char *name, MonoMethodSignature *si
* mono_class_setup_methods:
* @class: a class
*
- * Initializes the 'methods' array in the klass.
+ * Initializes the 'methods' array in CLASS.
* Calling this method should be avoided if possible since it allocates a lot
* of long-living MonoMethod structures.
* Methods belonging to an interface are assigned a sequential slot starting
@@ -2041,19 +2073,12 @@ create_array_method (MonoClass *class, const char *name, MonoMethodSignature *si
void
mono_class_setup_methods (MonoClass *class)
{
- int i;
+ int i, count;
MonoMethod **methods;
if (class->methods)
return;
- mono_loader_lock ();
-
- if (class->methods) {
- mono_loader_unlock ();
- return;
- }
-
if (class->generic_class) {
MonoError error;
MonoClass *gklass = class->generic_class->container_class;
@@ -2062,17 +2087,16 @@ mono_class_setup_methods (MonoClass *class)
if (!gklass->exception_type)
mono_class_setup_methods (gklass);
if (gklass->exception_type) {
- /*FIXME make exception_data less opaque so it's possible to dup it here*/
+ /* FIXME make exception_data less opaque so it's possible to dup it here */
mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Generic type definition failed to load"));
- mono_loader_unlock ();
return;
}
/* The + 1 makes this always non-NULL to pass the check in mono_class_setup_methods () */
- class->method.count = gklass->method.count;
- methods = mono_class_alloc0 (class, sizeof (MonoMethod*) * (class->method.count + 1));
+ count = gklass->method.count;
+ methods = mono_class_alloc0 (class, sizeof (MonoMethod*) * (count + 1));
- for (i = 0; i < class->method.count; i++) {
+ for (i = 0; i < count; i++) {
methods [i] = mono_class_inflate_generic_method_full_checked (
gklass->methods [i], class, mono_class_get_context (class), &error);
if (!mono_error_ok (&error)) {
@@ -2081,7 +2105,6 @@ mono_class_setup_methods (MonoClass *class)
g_free (method);
mono_error_cleanup (&error);
- mono_loader_unlock ();
return;
}
}
@@ -2092,18 +2115,18 @@ mono_class_setup_methods (MonoClass *class)
int count_generic = 0, first_generic = 0;
int method_num = 0;
- class->method.count = 3 + (class->rank > 1? 2: 1);
+ count = 3 + (class->rank > 1? 2: 1);
mono_class_setup_interfaces (class, &error);
g_assert (mono_error_ok (&error)); /*FIXME can this fail for array types?*/
if (class->interface_count) {
count_generic = generic_array_methods (class);
- first_generic = class->method.count;
- class->method.count += class->interface_count * count_generic;
+ first_generic = count;
+ count += class->interface_count * count_generic;
}
- methods = mono_class_alloc0 (class, sizeof (MonoMethod*) * class->method.count);
+ methods = mono_class_alloc0 (class, sizeof (MonoMethod*) * count);
sig = mono_metadata_signature_alloc (class->image, class->rank);
sig->ret = &mono_defaults.void_class->byval_arg;
@@ -2157,8 +2180,9 @@ mono_class_setup_methods (MonoClass *class)
for (i = 0; i < class->interface_count; i++)
setup_generic_array_ifaces (class, class->interfaces [i], methods, first_generic + i * count_generic);
} else {
- methods = mono_class_alloc (class, sizeof (MonoMethod*) * class->method.count);
- for (i = 0; i < class->method.count; ++i) {
+ count = class->method.count;
+ methods = mono_class_alloc (class, sizeof (MonoMethod*) * count);
+ for (i = 0; i < count; ++i) {
int idx = mono_metadata_translate_token_index (class->image, MONO_TABLE_METHOD, class->method.first + i + 1);
methods [i] = mono_get_method (class->image, MONO_TOKEN_METHOD_DEF | idx, class);
}
@@ -2167,18 +2191,24 @@ mono_class_setup_methods (MonoClass *class)
if (MONO_CLASS_IS_INTERFACE (class)) {
int slot = 0;
/*Only assign slots to virtual methods as interfaces are allowed to have static methods.*/
- for (i = 0; i < class->method.count; ++i) {
+ for (i = 0; i < count; ++i) {
if (methods [i]->flags & METHOD_ATTRIBUTE_VIRTUAL)
methods [i]->slot = slot++;
}
}
- /* Needed because of the double-checking locking pattern */
- mono_memory_barrier ();
+ mono_image_lock (class->image);
- class->methods = methods;
+ if (!class->methods) {
+ class->method.count = count;
- mono_loader_unlock ();
+ /* Needed because of the double-checking locking pattern */
+ mono_memory_barrier ();
+
+ class->methods = methods;
+ }
+
+ mono_image_unlock (class->image);
}
/*
@@ -2296,7 +2326,13 @@ mono_class_get_vtable_size (MonoClass *klass)
return klass->vtable_size;
}
-/*This method can fail the class.*/
+/*
+ * mono_class_setup_properties:
+ *
+ * Initialize class->ext.property and class->ext.properties.
+ *
+ * This method can fail the class.
+ */
static void
mono_class_setup_properties (MonoClass *class)
{
@@ -2305,19 +2341,11 @@ mono_class_setup_properties (MonoClass *class)
MonoTableInfo *msemt = &class->image->tables [MONO_TABLE_METHODSEMANTICS];
MonoProperty *properties;
guint32 last;
+ int first, count;
if (class->ext && class->ext->properties)
return;
- mono_loader_lock ();
-
- if (class->ext && class->ext->properties) {
- mono_loader_unlock ();
- return;
- }
-
- mono_class_alloc_ext (class);
-
if (class->generic_class) {
MonoClass *gklass = class->generic_class->container_class;
@@ -2325,15 +2353,12 @@ mono_class_setup_properties (MonoClass *class)
mono_class_setup_properties (gklass);
if (gklass->exception_type) {
mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Generic type definition failed to load"));
- mono_loader_unlock ();
return;
}
- class->ext->property = gklass->ext->property;
+ properties = mono_class_new0 (class, MonoProperty, gklass->ext->property.count + 1);
- properties = mono_class_new0 (class, MonoProperty, class->ext->property.count + 1);
-
- for (i = 0; i < class->ext->property.count; i++) {
+ for (i = 0; i < gklass->ext->property.count; i++) {
MonoProperty *prop = &properties [i];
*prop = gklass->ext->properties [i];
@@ -2347,20 +2372,19 @@ mono_class_setup_properties (MonoClass *class)
prop->parent = class;
}
+
+ first = gklass->ext->property.first;
+ count = gklass->ext->property.count;
} else {
- int first = mono_metadata_properties_from_typedef (class->image, mono_metadata_token_index (class->type_token) - 1, &last);
- int count = last - first;
+ first = mono_metadata_properties_from_typedef (class->image, mono_metadata_token_index (class->type_token) - 1, &last);
+ count = last - first;
if (count) {
mono_class_setup_methods (class);
- if (class->exception_type) {
- mono_loader_unlock ();
+ if (class->exception_type)
return;
- }
}
- class->ext->property.first = first;
- class->ext->property.count = count;
properties = mono_class_alloc0 (class, sizeof (MonoProperty) * count);
for (i = first; i < last; ++i) {
mono_metadata_decode_table_row (class->image, MONO_TABLE_PROPERTY, i, cols, MONO_PROPERTY_SIZE);
@@ -2393,13 +2417,27 @@ mono_class_setup_properties (MonoClass *class)
}
}
}
- /*Flush any pending writes as we do double checked locking on class->properties */
+
+ mono_class_alloc_ext (class);
+
+ mono_image_lock (class->image);
+
+ if (class->ext->properties) {
+ /* We leak 'properties' which was allocated from the image mempool */
+ mono_image_unlock (class->image);
+ return;
+ }
+
+ class->ext->property.first = first;
+ class->ext->property.count = count;
+
+ /* Flush any pending writes as we do double checked locking on class->ext->properties */
mono_memory_barrier ();
/* Leave this assignment as the last op in the function */
class->ext->properties = properties;
- mono_loader_unlock ();
+ mono_image_unlock (class->image);
}
static MonoMethod**
@@ -2433,15 +2471,6 @@ mono_class_setup_events (MonoClass *class)
if (class->ext && class->ext->events)
return;
- mono_loader_lock ();
-
- if (class->ext && class->ext->events) {
- mono_loader_unlock ();
- return;
- }
-
- mono_class_alloc_ext (class);
-
if (class->generic_class) {
MonoClass *gklass = class->generic_class->container_class;
MonoGenericContext *context;
@@ -2449,18 +2478,19 @@ mono_class_setup_events (MonoClass *class)
mono_class_setup_events (gklass);
if (gklass->exception_type) {
mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Generic type definition failed to load"));
- mono_loader_unlock ();
return;
}
- class->ext->event = gklass->ext->event;
- class->ext->events = mono_class_new0 (class, MonoEvent, class->ext->event.count);
+ first = gklass->ext->event.first;
+ count = gklass->ext->event.count;
+
+ events = mono_class_new0 (class, MonoEvent, count);
- if (class->ext->event.count)
+ if (count)
context = mono_class_get_context (class);
- for (i = 0; i < class->ext->event.count; i++) {
- MonoEvent *event = &class->ext->events [i];
+ for (i = 0; i < count; i++) {
+ MonoEvent *event = &events [i];
MonoEvent *gevent = &gklass->ext->events [i];
event->parent = class;
@@ -2473,89 +2503,97 @@ mono_class_setup_events (MonoClass *class)
#endif
event->attrs = gevent->attrs;
}
+ } else {
+ first = mono_metadata_events_from_typedef (class->image, mono_metadata_token_index (class->type_token) - 1, &last);
+ count = last - first;
- mono_loader_unlock ();
- return;
- }
-
- first = mono_metadata_events_from_typedef (class->image, mono_metadata_token_index (class->type_token) - 1, &last);
- count = last - first;
-
- if (count) {
- mono_class_setup_methods (class);
- if (class->exception_type) {
- mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Generic type definition failed to load"));
- mono_loader_unlock ();
- return;
+ if (count) {
+ mono_class_setup_methods (class);
+ if (class->exception_type) {
+ mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Generic type definition failed to load"));
+ return;
+ }
}
- }
- class->ext->event.first = first;
- class->ext->event.count = count;
- events = mono_class_alloc0 (class, sizeof (MonoEvent) * class->ext->event.count);
- for (i = first; i < last; ++i) {
- MonoEvent *event = &events [i - first];
- mono_metadata_decode_table_row (class->image, MONO_TABLE_EVENT, i, cols, MONO_EVENT_SIZE);
- event->parent = class;
- event->attrs = cols [MONO_EVENT_FLAGS];
- event->name = mono_metadata_string_heap (class->image, cols [MONO_EVENT_NAME]);
+ events = mono_class_alloc0 (class, sizeof (MonoEvent) * count);
+ for (i = first; i < last; ++i) {
+ MonoEvent *event = &events [i - first];
- startm = mono_metadata_methods_from_event (class->image, i, &endm);
- for (j = startm; j < endm; ++j) {
- MonoMethod *method;
+ mono_metadata_decode_table_row (class->image, MONO_TABLE_EVENT, i, cols, MONO_EVENT_SIZE);
+ event->parent = class;
+ event->attrs = cols [MONO_EVENT_FLAGS];
+ event->name = mono_metadata_string_heap (class->image, cols [MONO_EVENT_NAME]);
- mono_metadata_decode_row (msemt, j, cols, MONO_METHOD_SEMA_SIZE);
+ startm = mono_metadata_methods_from_event (class->image, i, &endm);
+ for (j = startm; j < endm; ++j) {
+ MonoMethod *method;
- if (class->image->uncompressed_metadata)
- /* It seems like the MONO_METHOD_SEMA_METHOD column needs no remapping */
- method = mono_get_method (class->image, MONO_TOKEN_METHOD_DEF | cols [MONO_METHOD_SEMA_METHOD], class);
- else
- method = class->methods [cols [MONO_METHOD_SEMA_METHOD] - 1 - class->method.first];
+ mono_metadata_decode_row (msemt, j, cols, MONO_METHOD_SEMA_SIZE);
- switch (cols [MONO_METHOD_SEMA_SEMANTICS]) {
- case METHOD_SEMANTIC_ADD_ON:
- event->add = method;
- break;
- case METHOD_SEMANTIC_REMOVE_ON:
- event->remove = method;
- break;
- case METHOD_SEMANTIC_FIRE:
- event->raise = method;
- break;
- case METHOD_SEMANTIC_OTHER: {
+ if (class->image->uncompressed_metadata)
+ /* It seems like the MONO_METHOD_SEMA_METHOD column needs no remapping */
+ method = mono_get_method (class->image, MONO_TOKEN_METHOD_DEF | cols [MONO_METHOD_SEMA_METHOD], class);
+ else
+ method = class->methods [cols [MONO_METHOD_SEMA_METHOD] - 1 - class->method.first];
+
+ switch (cols [MONO_METHOD_SEMA_SEMANTICS]) {
+ case METHOD_SEMANTIC_ADD_ON:
+ event->add = method;
+ break;
+ case METHOD_SEMANTIC_REMOVE_ON:
+ event->remove = method;
+ break;
+ case METHOD_SEMANTIC_FIRE:
+ event->raise = method;
+ break;
+ case METHOD_SEMANTIC_OTHER: {
#ifndef MONO_SMALL_CONFIG
- int n = 0;
-
- if (event->other == NULL) {
- event->other = g_new0 (MonoMethod*, 2);
- } else {
- while (event->other [n])
- n++;
- event->other = g_realloc (event->other, (n + 2) * sizeof (MonoMethod*));
- }
- event->other [n] = method;
- /* NULL terminated */
- event->other [n + 1] = NULL;
+ int n = 0;
+
+ if (event->other == NULL) {
+ event->other = g_new0 (MonoMethod*, 2);
+ } else {
+ while (event->other [n])
+ n++;
+ event->other = g_realloc (event->other, (n + 2) * sizeof (MonoMethod*));
+ }
+ event->other [n] = method;
+ /* NULL terminated */
+ event->other [n + 1] = NULL;
#endif
- break;
- }
- default:
- break;
+ break;
+ }
+ default:
+ break;
+ }
}
}
}
- /*Flush any pending writes as we do double checked locking on class->properties */
+
+ mono_class_alloc_ext (class);
+
+ mono_image_lock (class->image);
+
+ if (class->ext->events) {
+ mono_image_unlock (class->image);
+ return;
+ }
+
+ class->ext->event.first = first;
+ class->ext->event.count = count;
+
+ /* Flush any pending writes as we do double checked locking on class->ext.events */
mono_memory_barrier ();
/* Leave this assignment as the last op in the function */
class->ext->events = events;
- mono_loader_unlock ();
+ mono_image_unlock (class->image);
}
/*
* Global pool of interface IDs, represented as a bitset.
- * LOCKING: this is supposed to be accessed with the loader lock held.
+ * LOCKING: Protected by the classes lock.
*/
static MonoBitSet *global_interface_bitset = NULL;
@@ -2570,18 +2608,18 @@ static MonoBitSet *global_interface_bitset = NULL;
void
mono_unload_interface_ids (MonoBitSet *bitset)
{
- mono_loader_lock ();
+ classes_lock ();
mono_bitset_sub (global_interface_bitset, bitset);
- mono_loader_unlock ();
+ classes_unlock ();
}
void
mono_unload_interface_id (MonoClass *class)
{
if (global_interface_bitset && class->interface_id) {
- mono_loader_lock ();
+ classes_lock ();
mono_bitset_clear (global_interface_bitset, class->interface_id);
- mono_loader_unlock ();
+ classes_unlock ();
}
}
@@ -2591,7 +2629,7 @@ mono_unload_interface_id (MonoClass *class)
*
* Assign a unique integer ID to the interface represented by @class.
* The ID will positive and as small as possible.
- * LOCKING: this is supposed to be called with the loader lock held.
+ * LOCKING: Acquires the classes lock.
* Returns: the new ID.
*/
static guint
@@ -2601,6 +2639,8 @@ mono_get_unique_iid (MonoClass *class)
g_assert (MONO_CLASS_IS_INTERFACE (class));
+ classes_lock ();
+
if (!global_interface_bitset) {
global_interface_bitset = mono_bitset_new (128, 0);
}
@@ -2628,6 +2668,8 @@ mono_get_unique_iid (MonoClass *class)
mono_bitset_set (class->image->interface_bitset, iid);
}
+ classes_unlock ();
+
#ifndef MONO_SMALL_CONFIG
if (mono_print_vtable) {
int generic_id;
@@ -2959,7 +3001,7 @@ get_implicit_generic_array_interfaces (MonoClass *class, int *num, int *is_enume
nifaces = generic_ireadonlylist_class ? 2 : 3;
// FIXME: This doesn't seem to work/required for generic params
- if (!(eclass->this_arg.type == MONO_TYPE_VAR || eclass->this_arg.type == MONO_TYPE_MVAR || (eclass->image->dynamic && !eclass->wastypebuilder)))
+ if (!(eclass->this_arg.type == MONO_TYPE_VAR || eclass->this_arg.type == MONO_TYPE_MVAR || (image_is_dynamic (eclass->image) && !eclass->wastypebuilder)))
mono_class_setup_interface_offsets (eclass);
interface_count = all_interfaces? eclass->interface_offsets_count: eclass->interface_count;
@@ -3659,7 +3701,7 @@ mono_class_setup_vtable_full (MonoClass *class, GList *in_setup)
type_token = class->type_token;
}
- if (class->image->dynamic) {
+ if (image_is_dynamic (class->image)) {
/* Generic instances can have zero method overrides without causing any harm.
* This is true since we don't do layout all over again for them, we simply inflate
* the layout of the parent.
@@ -4995,7 +5037,7 @@ mono_class_init (MonoClass *class)
has_cached_info = mono_class_get_cached_class_info (class, &cached_info);
- if (class->generic_class || class->image->dynamic || !class->type_token || (has_cached_info && !cached_info.has_nested_classes))
+ if (class->generic_class || image_is_dynamic (class->image) || !class->type_token || (has_cached_info && !cached_info.has_nested_classes))
class->nested_classes_inited = TRUE;
/*
@@ -5060,14 +5102,11 @@ mono_class_init (MonoClass *class)
} else {
class->vtable_size = szarray_vtable_size[slot];
}
- class->has_finalize_inited = TRUE;
} else if (class->generic_class && !MONO_CLASS_IS_INTERFACE (class)) {
MonoClass *gklass = class->generic_class->container_class;
/* Generic instance case */
class->ghcimpl = gklass->ghcimpl;
- class->has_finalize = mono_class_has_finalizer (gklass);
- class->has_finalize_inited = TRUE;
class->has_cctor = gklass->has_cctor;
mono_class_setup_vtable (gklass);
@@ -5184,62 +5223,68 @@ mono_class_init (MonoClass *class)
gboolean
mono_class_has_finalizer (MonoClass *klass)
{
- if (!klass->has_finalize_inited) {
- MonoClass *class = klass;
+ MonoClass *class = klass;
+ gboolean has_finalize = FALSE;
- mono_loader_lock ();
+ if (klass->has_finalize_inited)
+ return klass->has_finalize;
- /* Interfaces and valuetypes are not supposed to have finalizers */
- if (!(MONO_CLASS_IS_INTERFACE (class) || class->valuetype)) {
- MonoMethod *cmethod = NULL;
+ /* Interfaces and valuetypes are not supposed to have finalizers */
+ if (!(MONO_CLASS_IS_INTERFACE (class) || class->valuetype)) {
+ MonoMethod *cmethod = NULL;
- if (class->parent && class->parent->has_finalize) {
- class->has_finalize = 1;
- } else {
- if (class->parent) {
- /*
- * Can't search in metadata for a method named Finalize, because that
- * ignores overrides.
- */
- mono_class_setup_vtable (class);
- if (class->exception_type || mono_loader_get_last_error ())
- goto leave;
+ if (class->rank == 1 && class->byval_arg.type == MONO_TYPE_SZARRAY) {
+ } else if (class->generic_class) {
+ MonoClass *gklass = class->generic_class->container_class;
+
+ has_finalize = mono_class_has_finalizer (gklass);
+ } else if (class->parent && class->parent->has_finalize) {
+ has_finalize = TRUE;
+ } else {
+ if (class->parent) {
+ /*
+ * Can't search in metadata for a method named Finalize, because that
+ * ignores overrides.
+ */
+ mono_class_setup_vtable (class);
+ if (class->exception_type || mono_loader_get_last_error ())
+ cmethod = NULL;
+ else
cmethod = class->vtable [finalize_slot];
- }
+ }
- if (cmethod) {
- g_assert (class->vtable_size > finalize_slot);
+ if (cmethod) {
+ g_assert (class->vtable_size > finalize_slot);
- class->has_finalize = 0;
- if (class->parent) {
- if (cmethod->is_inflated)
- cmethod = ((MonoMethodInflated*)cmethod)->declaring;
- if (cmethod != default_finalize) {
- class->has_finalize = 1;
- }
- }
+ if (class->parent) {
+ if (cmethod->is_inflated)
+ cmethod = ((MonoMethodInflated*)cmethod)->declaring;
+ if (cmethod != default_finalize)
+ has_finalize = TRUE;
}
}
}
+ }
+
+ mono_image_lock (klass->image);
+
+ if (!klass->has_finalize_inited) {
+ klass->has_finalize = has_finalize ? 1 : 0;
mono_memory_barrier ();
klass->has_finalize_inited = TRUE;
-
- mono_loader_unlock ();
}
- return klass->has_finalize;
+ mono_image_unlock (klass->image);
- leave:
- mono_loader_unlock ();
- return FALSE;
+ return klass->has_finalize;
}
gboolean
mono_is_corlib_image (MonoImage *image)
{
/* FIXME: allow the dynamic case for our compilers and with full trust */
- if (image->dynamic)
+ if (image_is_dynamic (image))
return image->assembly && !strcmp (image->assembly->aname.name, "mscorlib");
else
return image == mono_defaults.corlib;
@@ -5653,10 +5698,12 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
class->byval_arg.data.klass = class;
class->byval_arg.type = MONO_TYPE_CLASS;
}
- parent = mono_class_get_full (image, parent_token, context);
+ parent = mono_class_get_checked (image, parent_token, error);
+ if (parent && context) /* Always inflate */
+ parent = mono_class_inflate_generic_class_checked (parent, context, error);
if (parent == NULL) {
- mono_class_set_failure_from_loader_error (class, error, g_strdup_printf ("Could not load parent, token is %x", parent_token));
+ mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup (mono_error_get_message (error)));
goto parent_failure;
}
@@ -5755,11 +5802,11 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
}
if (class->enumtype) {
- MonoType *enum_basetype = mono_class_find_enum_basetype (class);
+ MonoType *enum_basetype = mono_class_find_enum_basetype (class, error);
if (!enum_basetype) {
/*set it to a default value as the whole runtime can't handle this to be null*/
class->cast_class = class->element_class = mono_defaults.int32_class;
- mono_class_set_failure_and_error (class, error, "Could not enum basetype");
+ mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup (mono_error_get_message (error)));
mono_loader_unlock ();
mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
g_assert (!mono_loader_get_last_error ());
@@ -5773,8 +5820,8 @@ mono_class_create_from_typedef (MonoImage *image, guint32 type_token, MonoError
* We must do this after the class has been constructed to make certain recursive scenarios
* work.
*/
- if (class->generic_container && !mono_metadata_load_generic_param_constraints_full (image, type_token, class->generic_container)){
- mono_class_set_failure_from_loader_error (class, error, g_strdup ("Could not load generic parameter constraints"));
+ if (class->generic_container && !mono_metadata_load_generic_param_constraints_checked (image, type_token, class->generic_container, error)) {
+ mono_class_set_failure (class, MONO_EXCEPTION_TYPE_LOAD, g_strdup_printf ("Could not load generic parameter constrains due to %s", mono_error_get_message (error)));
mono_loader_unlock ();
mono_profiler_class_loaded (class, MONO_PROFILE_FAILED);
g_assert (!mono_loader_get_last_error ());
@@ -6075,7 +6122,7 @@ set_anon_gparam_class (MonoGenericParam *param, gboolean is_mvar, MonoClass *kla
}
ht = is_mvar ? image->mvar_cache_slow : image->var_cache_slow;
if (!ht) {
- mono_loader_lock ();
+ mono_image_lock (image);
ht = is_mvar ? image->mvar_cache_slow : image->var_cache_slow;
if (!ht) {
ht = g_hash_table_new (NULL, NULL);
@@ -6085,7 +6132,7 @@ set_anon_gparam_class (MonoGenericParam *param, gboolean is_mvar, MonoClass *kla
else
image->var_cache_slow = ht;
}
- mono_loader_unlock ();
+ mono_image_unlock (image);
}
g_hash_table_insert (ht, GINT_TO_POINTER (n), klass);
@@ -6327,23 +6374,20 @@ mono_class_from_mono_type (MonoType *type)
static MonoType *
mono_type_retrieve_from_typespec (MonoImage *image, guint32 type_spec, MonoGenericContext *context, gboolean *did_inflate, MonoError *error)
{
- MonoType *t = mono_type_create_from_typespec (image, type_spec);
+ MonoType *t = mono_type_create_from_typespec_checked (image, type_spec, error);
- mono_error_init (error);
*did_inflate = FALSE;
- if (!t) {
- char *name = mono_class_name_from_token (image, type_spec);
- char *assembly = mono_assembly_name_from_token (image, type_spec);
- mono_error_set_type_load_name (error, name, assembly, "Could not resolve typespec token %08x", type_spec);
+ if (!t)
return NULL;
- }
if (context && (context->class_inst || context->method_inst)) {
MonoType *inflated = inflate_generic_type (NULL, t, context, error);
- if (!mono_error_ok (error))
+ if (!mono_error_ok (error)) {
+ g_assert (!mono_loader_get_last_error ());
return NULL;
+ }
if (inflated) {
t = inflated;
@@ -6407,11 +6451,11 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
* from mono_class_from_mono_type (), mono_array_new (),
* Array:CreateInstance (), etc, so use a separate cache + a separate lock.
*/
- EnterCriticalSection (&image->szarray_cache_lock);
+ mono_mutex_lock (&image->szarray_cache_lock);
if (!image->szarray_cache)
image->szarray_cache = g_hash_table_new (mono_aligned_addr_hash, NULL);
class = g_hash_table_lookup (image->szarray_cache, eclass);
- LeaveCriticalSection (&image->szarray_cache_lock);
+ mono_mutex_unlock (&image->szarray_cache_lock);
if (class)
return class;
@@ -6434,7 +6478,7 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
}
/* for the building corlib use System.Array from it */
- if (image->assembly && image->assembly->dynamic && image->assembly_name && strcmp (image->assembly_name, "mscorlib") == 0) {
+ if (image->assembly && assembly_is_dynamic (image->assembly) && image->assembly_name && strcmp (image->assembly_name, "mscorlib") == 0) {
parent = mono_class_from_name (image, "System", "Array");
corlib_type = TRUE;
} else {
@@ -6548,14 +6592,14 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
if (rank == 1 && !bounded) {
MonoClass *prev_class;
- EnterCriticalSection (&image->szarray_cache_lock);
+ mono_mutex_lock (&image->szarray_cache_lock);
prev_class = g_hash_table_lookup (image->szarray_cache, eclass);
if (prev_class)
/* Someone got in before us */
class = prev_class;
else
g_hash_table_insert (image->szarray_cache, eclass, class);
- LeaveCriticalSection (&image->szarray_cache_lock);
+ mono_mutex_unlock (&image->szarray_cache_lock);
} else {
list = g_slist_append (rootlist, class);
g_hash_table_insert (image->array_cache, eclass, list);
@@ -6837,11 +6881,17 @@ mono_class_get_field_default_value (MonoClassField *field, MonoTypeEnum *def_typ
g_assert (field->type->attrs & FIELD_ATTRIBUTE_HAS_DEFAULT);
if (!klass->ext || !klass->ext->field_def_values) {
- mono_loader_lock ();
+ MonoFieldDefaultValue *def_values;
+
mono_class_alloc_ext (klass);
+
+ def_values = mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * klass->field.count);
+
+ mono_image_lock (klass->image);
+ mono_memory_barrier ();
if (!klass->ext->field_def_values)
- klass->ext->field_def_values = mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * klass->field.count);
- mono_loader_unlock ();
+ klass->ext->field_def_values = def_values;
+ mono_image_unlock (klass->image);
}
field_index = mono_field_get_index (field);
@@ -6891,7 +6941,7 @@ mono_class_get_property_default_value (MonoProperty *property, MonoTypeEnum *def
* is stored for dynamic assemblies.
*/
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
int prop_index = mono_property_get_index (property);
if (klass->ext->prop_def_values && klass->ext->prop_def_values [prop_index].data) {
*def_type = klass->ext->prop_def_values [prop_index].def_type;
@@ -6968,7 +7018,7 @@ char *
mono_class_name_from_token (MonoImage *image, guint32 type_token)
{
const char *name, *nspace;
- if (image->dynamic)
+ if (image_is_dynamic (image))
return g_strdup_printf ("DynamicType 0x%08x", type_token);
switch (type_token & 0xff000000){
@@ -7023,7 +7073,7 @@ mono_class_name_from_token (MonoImage *image, guint32 type_token)
static char *
mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
{
- if (image->dynamic)
+ if (image_is_dynamic (image))
return g_strdup_printf ("DynamicAssembly %s", image->name);
switch (type_token & 0xff000000){
@@ -7050,18 +7100,18 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
}
mono_metadata_decode_row (t, idx-1, cols, MONO_TYPEREF_SIZE);
- idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLTION_SCOPE_BITS;
- switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLTION_SCOPE_MASK) {
- case MONO_RESOLTION_SCOPE_MODULE:
+ idx = cols [MONO_TYPEREF_SCOPE] >> MONO_RESOLUTION_SCOPE_BITS;
+ switch (cols [MONO_TYPEREF_SCOPE] & MONO_RESOLUTION_SCOPE_MASK) {
+ case MONO_RESOLUTION_SCOPE_MODULE:
/* FIXME: */
return g_strdup ("");
- case MONO_RESOLTION_SCOPE_MODULEREF:
+ case MONO_RESOLUTION_SCOPE_MODULEREF:
/* FIXME: */
return g_strdup ("");
- case MONO_RESOLTION_SCOPE_TYPEREF:
+ case MONO_RESOLUTION_SCOPE_TYPEREF:
/* FIXME: */
return g_strdup ("");
- case MONO_RESOLTION_SCOPE_ASSEMBLYREF:
+ case MONO_RESOLUTION_SCOPE_ASSEMBLYREF:
mono_assembly_get_assemblyref (image, idx - 1, &aname);
return mono_stringify_assembly_name (&aname);
default:
@@ -7084,6 +7134,7 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
* @image: the image where the class resides
* @type_token: the token for the class
* @context: the generic context used to evaluate generic instantiations in
+ * @deprecated: Functions that expose MonoGenericContext are going away in mono 4.0
*
* Returns: the MonoClass that represents @type_token in @image
*/
@@ -7091,49 +7142,79 @@ MonoClass *
mono_class_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *context)
{
MonoError error;
+ MonoClass *class;
+ class = mono_class_get_checked (image, type_token, &error);
+
+ if (class && context && mono_metadata_token_table (type_token) == MONO_TABLE_TYPESPEC)
+ class = mono_class_inflate_generic_class_checked (class, context, &error);
+
+ if (!class) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow this error */
+ }
+ return class;
+}
+
+
+MonoClass *
+mono_class_get_and_inflate_typespec_checked (MonoImage *image, guint32 type_token, MonoGenericContext *context, MonoError *error)
+{
+ MonoClass *class;
+
+ mono_error_init (error);
+ class = mono_class_get_checked (image, type_token, error);
+
+ if (class && context && mono_metadata_token_table (type_token) == MONO_TABLE_TYPESPEC)
+ class = mono_class_inflate_generic_class_checked (class, context, error);
+
+ return class;
+}
+/**
+ * mono_class_get_checked:
+ * @image: the image where the class resides
+ * @type_token: the token for the class
+ * @error: error object to return any error
+ *
+ * Returns: the MonoClass that represents @type_token in @image
+ */
+MonoClass *
+mono_class_get_checked (MonoImage *image, guint32 type_token, MonoError *error)
+{
MonoClass *class = NULL;
- if (image->dynamic) {
+ mono_error_init (error);
+
+ if (image_is_dynamic (image)) {
int table = mono_metadata_token_table (type_token);
if (table != MONO_TABLE_TYPEDEF && table != MONO_TABLE_TYPEREF && table != MONO_TABLE_TYPESPEC) {
- mono_loader_set_error_bad_image (g_strdup ("Bad type token."));
+ mono_error_set_bad_image (error, image,"Bad token table for dynamic image: %x", table);
return NULL;
}
- return mono_lookup_dynamic_token (image, type_token, context);
+ class = mono_lookup_dynamic_token (image, type_token, NULL); /*FIXME proper error handling*/
+ goto done;
}
switch (type_token & 0xff000000){
case MONO_TOKEN_TYPE_DEF:
- class = mono_class_create_from_typedef (image, type_token, &error);
- if (!mono_error_ok (&error)) {
- mono_loader_set_error_from_mono_error (&error);
- /*FIXME don't swallow the error message*/
- mono_error_cleanup (&error);
- return NULL;
- }
+ class = mono_class_create_from_typedef (image, type_token, error);
break;
case MONO_TOKEN_TYPE_REF:
- class = mono_class_from_typeref (image, type_token);
+ class = mono_class_from_typeref_checked (image, type_token, error);
break;
case MONO_TOKEN_TYPE_SPEC:
- class = mono_class_create_from_typespec (image, type_token, context, &error);
- if (!mono_error_ok (&error)) {
- /*FIXME don't swallow the error message*/
- mono_error_cleanup (&error);
- }
+ class = mono_class_create_from_typespec (image, type_token, NULL, error);
break;
default:
- g_warning ("unknown token type %x", type_token & 0xff000000);
- g_assert_not_reached ();
+ mono_error_set_bad_image (error, image, "Unknown type token %x", type_token & 0xff000000);
}
- if (!class){
+done:
+ /* Generic case, should be avoided for when a better error is possible. */
+ if (!class && mono_error_ok (error)) {
char *name = mono_class_name_from_token (image, type_token);
char *assembly = mono_assembly_name_from_token (image, type_token);
- mono_loader_set_error_type_load (name, assembly);
- g_free (name);
- g_free (assembly);
+ mono_error_set_type_load_name (error, name, assembly, "Could not resolve type with token %08x", type_token);
}
return class;
@@ -7141,42 +7222,44 @@ mono_class_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *c
/**
- * mono_type_get_full:
+ * mono_type_get_checked:
* @image: the image where the type resides
* @type_token: the token for the type
* @context: the generic context used to evaluate generic instantiations in
+ * @error: Error handling context
*
* This functions exists to fullfill the fact that sometimes it's desirable to have access to the
*
* Returns: the MonoType that represents @type_token in @image
*/
MonoType *
-mono_type_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *context)
+mono_type_get_checked (MonoImage *image, guint32 type_token, MonoGenericContext *context, MonoError *error)
{
- MonoError error;
MonoType *type = NULL;
gboolean inflated = FALSE;
+ mono_error_init (error);
+
//FIXME: this will not fix the very issue for which mono_type_get_full exists -but how to do it then?
- if (image->dynamic)
+ if (image_is_dynamic (image))
return mono_class_get_type (mono_lookup_dynamic_token (image, type_token, context));
if ((type_token & 0xff000000) != MONO_TOKEN_TYPE_SPEC) {
- MonoClass *class = mono_class_get_full (image, type_token, context);
- return class ? mono_class_get_type (class) : NULL;
- }
+ MonoClass *class = mono_class_get_checked (image, type_token, error);
- type = mono_type_retrieve_from_typespec (image, type_token, context, &inflated, &error);
+ if (!class) {
+ g_assert (!mono_loader_get_last_error ());
+ return NULL;
+ }
- if (!mono_error_ok (&error)) {
- /*FIXME don't swalloc the error message.*/
- char *name = mono_class_name_from_token (image, type_token);
- char *assembly = mono_assembly_name_from_token (image, type_token);
+ g_assert (class);
+ return mono_class_get_type (class);
+ }
- g_warning ("Error loading type %s from %s due to %s", name, assembly, mono_error_get_message (&error));
+ type = mono_type_retrieve_from_typespec (image, type_token, context, &inflated, error);
- mono_error_cleanup (&error);
- mono_loader_set_error_type_load (name, assembly);
+ if (!type) {
+ g_assert (!mono_loader_get_last_error ());
return NULL;
}
@@ -7230,7 +7313,7 @@ mono_image_init_name_cache (MonoImage *image)
image->name_cache = g_hash_table_new (g_str_hash, g_str_equal);
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
mono_image_unlock (image);
return;
}
@@ -7336,6 +7419,7 @@ find_nocase (gpointer key, gpointer value, gpointer user_data)
* @image: The MonoImage where the type is looked up in
* @name_space: the type namespace
* @name: the type short name.
+ * @deprecated: use the _checked variant
*
* Obtains a MonoClass with a given namespace and a given name which
* is located in the given MonoImage. The namespace and name
@@ -7344,13 +7428,24 @@ find_nocase (gpointer key, gpointer value, gpointer user_data)
MonoClass *
mono_class_from_name_case (MonoImage *image, const char* name_space, const char *name)
{
+ MonoError error;
+ MonoClass *res = mono_class_from_name_case_checked (image, name_space, name, &error);
+ g_assert (!mono_error_ok (&error));
+ return res;
+}
+
+MonoClass *
+mono_class_from_name_case_checked (MonoImage *image, const char* name_space, const char *name, MonoError *error)
+{
MonoTableInfo *t = &image->tables [MONO_TABLE_TYPEDEF];
guint32 cols [MONO_TYPEDEF_SIZE];
const char *n;
const char *nspace;
guint32 i, visib;
- if (image->dynamic) {
+ mono_error_init (error);
+
+ if (image_is_dynamic (image)) {
guint32 token = 0;
FindUserData user_data;
@@ -7378,7 +7473,7 @@ mono_class_from_name_case (MonoImage *image, const char* name_space, const char
mono_image_unlock (image);
if (token)
- return mono_class_get (image, MONO_TOKEN_TYPE_DEF | token);
+ return mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | token, error);
else
return NULL;
@@ -7397,7 +7492,7 @@ mono_class_from_name_case (MonoImage *image, const char* name_space, const char
n = mono_metadata_string_heap (image, cols [MONO_TYPEDEF_NAME]);
nspace = mono_metadata_string_heap (image, cols [MONO_TYPEDEF_NAMESPACE]);
if (mono_utf8_strcasecmp (n, name) == 0 && mono_utf8_strcasecmp (nspace, name_space) == 0)
- return mono_class_get (image, MONO_TOKEN_TYPE_DEF | i);
+ return mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | i, error);
}
return NULL;
}
@@ -7515,7 +7610,7 @@ mono_class_from_name (MonoImage *image, const char* name_space, const char *name
mono_image_unlock (image);
- if (!token && image->dynamic && image->modules) {
+ if (!token && image_is_dynamic (image) && image->modules) {
/* Search modules as well */
for (i = 0; i < image->module_count; ++i) {
MonoImage *module = image->modules [i];
@@ -7997,7 +8092,7 @@ mono_class_implement_interface_slow (MonoClass *target, MonoClass *candidate)
return TRUE;
/*A TypeBuilder can have more interfaces on tb->interfaces than on candidate->interfaces*/
- if (candidate->image->dynamic && !candidate->wastypebuilder) {
+ if (image_is_dynamic (candidate->image) && !candidate->wastypebuilder) {
MonoReflectionTypeBuilder *tb = mono_class_get_ref_info (candidate);
int j;
if (tb && tb->interfaces) {
@@ -8111,7 +8206,7 @@ mono_class_get_cctor (MonoClass *klass)
{
MonoCachedClassInfo cached_info;
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
/*
* has_cctor is not set for these classes because mono_class_init () is
* not run for them.
@@ -8253,7 +8348,7 @@ gpointer
mono_ldtoken (MonoImage *image, guint32 token, MonoClass **handle_class,
MonoGenericContext *context)
{
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
MonoClass *tmp_handle_class;
gpointer obj = mono_lookup_dynamic_token_class (image, token, TRUE, &tmp_handle_class, context);
@@ -8271,26 +8366,34 @@ mono_ldtoken (MonoImage *image, guint32 token, MonoClass **handle_class,
case MONO_TOKEN_TYPE_DEF:
case MONO_TOKEN_TYPE_REF:
case MONO_TOKEN_TYPE_SPEC: {
+ MonoError error;
MonoType *type;
if (handle_class)
*handle_class = mono_defaults.typehandle_class;
- type = mono_type_get_full (image, token, context);
- if (!type)
+ type = mono_type_get_checked (image, token, context, &error);
+ if (!type) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /* FIXME Don't swallow the error */
return NULL;
+ }
mono_class_init (mono_class_from_mono_type (type));
/* We return a MonoType* as handle */
return type;
}
case MONO_TOKEN_FIELD_DEF: {
MonoClass *class;
+ MonoError error;
guint32 type = mono_metadata_typedef_from_field (image, mono_metadata_token_index (token));
if (!type)
return NULL;
if (handle_class)
*handle_class = mono_defaults.fieldhandle_class;
- class = mono_class_get_full (image, MONO_TOKEN_TYPE_DEF | type, context);
- if (!class)
+ class = mono_class_get_and_inflate_typespec_checked (image, MONO_TOKEN_TYPE_DEF | type, context, &error);
+ if (!class) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /* FIXME Don't swallow the error */
return NULL;
+ }
mono_class_init (class);
return mono_class_get_field (class, token);
}
@@ -8878,6 +8981,58 @@ mono_class_get_interfaces (MonoClass* klass, gpointer *iter)
return NULL;
}
+static void
+setup_nested_types (MonoClass *klass)
+{
+ MonoError error;
+ GList *classes, *nested_classes, *l;
+ int i;
+
+ if (klass->nested_classes_inited)
+ return;
+
+ if (!klass->type_token)
+ klass->nested_classes_inited = TRUE;
+
+ i = mono_metadata_nesting_typedef (klass->image, klass->type_token, 1);
+ classes = NULL;
+ while (i) {
+ MonoClass* nclass;
+ guint32 cols [MONO_NESTED_CLASS_SIZE];
+ mono_metadata_decode_row (&klass->image->tables [MONO_TABLE_NESTEDCLASS], i - 1, cols, MONO_NESTED_CLASS_SIZE);
+ nclass = mono_class_create_from_typedef (klass->image, MONO_TOKEN_TYPE_DEF | cols [MONO_NESTED_CLASS_NESTED], &error);
+ if (!mono_error_ok (&error)) {
+ /*FIXME don't swallow the error message*/
+ mono_error_cleanup (&error);
+
+ i = mono_metadata_nesting_typedef (klass->image, klass->type_token, i + 1);
+ continue;
+ }
+
+ classes = g_list_prepend (classes, nclass);
+
+ i = mono_metadata_nesting_typedef (klass->image, klass->type_token, i + 1);
+ }
+
+ mono_class_alloc_ext (klass);
+
+ nested_classes = NULL;
+ for (l = classes; l; l = l->next)
+ nested_classes = g_list_prepend_image (klass->image, nested_classes, l->data);
+ g_list_free (classes);
+
+ mono_image_lock (klass->image);
+
+ mono_memory_barrier ();
+ if (!klass->nested_classes_inited) {
+ klass->ext->nested_classes = nested_classes;
+ mono_memory_barrier ();
+ klass->nested_classes_inited = TRUE;
+ }
+
+ mono_image_unlock (klass->image);
+}
+
/**
* mono_class_get_nested_types
* @klass: the MonoClass to act on
@@ -8894,40 +9049,12 @@ mono_class_get_interfaces (MonoClass* klass, gpointer *iter)
MonoClass*
mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
{
- MonoError error;
GList *item;
- int i;
if (!iter)
return NULL;
- if (!klass->nested_classes_inited) {
- if (!klass->type_token)
- klass->nested_classes_inited = TRUE;
- mono_loader_lock ();
- if (!klass->nested_classes_inited) {
- i = mono_metadata_nesting_typedef (klass->image, klass->type_token, 1);
- while (i) {
- MonoClass* nclass;
- guint32 cols [MONO_NESTED_CLASS_SIZE];
- mono_metadata_decode_row (&klass->image->tables [MONO_TABLE_NESTEDCLASS], i - 1, cols, MONO_NESTED_CLASS_SIZE);
- nclass = mono_class_create_from_typedef (klass->image, MONO_TOKEN_TYPE_DEF | cols [MONO_NESTED_CLASS_NESTED], &error);
- if (!mono_error_ok (&error)) {
- /*FIXME don't swallow the error message*/
- mono_error_cleanup (&error);
-
- i = mono_metadata_nesting_typedef (klass->image, klass->type_token, i + 1);
- continue;
- }
- mono_class_alloc_ext (klass);
- klass->ext->nested_classes = g_list_prepend_image (klass->image, klass->ext->nested_classes, nclass);
-
- i = mono_metadata_nesting_typedef (klass->image, klass->type_token, i + 1);
- }
- }
- mono_memory_barrier ();
- klass->nested_classes_inited = TRUE;
- mono_loader_unlock ();
- }
+ if (!klass->nested_classes_inited)
+ setup_nested_types (klass);
if (!*iter) {
/* start from the first */
@@ -9068,20 +9195,24 @@ mono_field_get_rva (MonoClassField *field)
guint32 rva;
int field_index;
MonoClass *klass = field->parent;
+ MonoFieldDefaultValue *field_def_values;
g_assert (field->type->attrs & FIELD_ATTRIBUTE_HAS_FIELD_RVA);
if (!klass->ext || !klass->ext->field_def_values) {
- mono_loader_lock ();
mono_class_alloc_ext (klass);
+
+ field_def_values = mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * klass->field.count);
+
+ mono_image_lock (klass->image);
if (!klass->ext->field_def_values)
- klass->ext->field_def_values = mono_class_alloc0 (klass, sizeof (MonoFieldDefaultValue) * klass->field.count);
- mono_loader_unlock ();
+ klass->ext->field_def_values = field_def_values;
+ mono_image_unlock (klass->image);
}
field_index = mono_field_get_index (field);
- if (!klass->ext->field_def_values [field_index].data && !klass->image->dynamic) {
+ if (!klass->ext->field_def_values [field_index].data && !image_is_dynamic (klass->image)) {
mono_metadata_field_info (field->parent->image, klass->field.first + field_index, NULL, &rva, NULL);
if (!rva)
g_warning ("field %s in %s should have RVA data, but hasn't", mono_field_get_name (field), field->parent->name);
@@ -9253,7 +9384,7 @@ mono_event_get_flags (MonoEvent *event)
/**
* mono_class_get_method_from_name:
* @klass: where to look for the method
- * @name_space: name of the method
+ * @name: name of the method
* @param_count: number of parameters. -1 for any number.
*
* Obtains a MonoMethod with a given name and number of parameters.
@@ -9397,6 +9528,8 @@ mono_class_get_exception_data (MonoClass *klass)
void
mono_classes_init (void)
{
+ mono_mutex_init (&classes_mutex);
+
mono_counters_register ("Inflated methods size",
MONO_COUNTER_GENERICS | MONO_COUNTER_INT, &inflated_methods_size);
mono_counters_register ("Inflated classes",
@@ -9420,6 +9553,7 @@ mono_classes_cleanup (void)
if (global_interface_bitset)
mono_bitset_free (global_interface_bitset);
global_interface_bitset = NULL;
+ mono_mutex_destroy (&classes_mutex);
}
/**
@@ -10024,15 +10158,22 @@ mono_class_setup_interface_id (MonoClass *class)
* mono_class_alloc_ext:
*
* Allocate klass->ext if not already done.
- * LOCKING: Assumes the loader lock is held.
*/
void
mono_class_alloc_ext (MonoClass *klass)
{
- if (!klass->ext) {
- klass->ext = mono_class_alloc0 (klass, sizeof (MonoClassExt));
- class_ext_size += sizeof (MonoClassExt);
- }
+ MonoClassExt *ext;
+
+ if (klass->ext)
+ return;
+
+ ext = mono_class_alloc0 (klass, sizeof (MonoClassExt));
+ mono_image_lock (klass->image);
+ mono_memory_barrier ();
+ if (!klass->ext)
+ klass->ext = ext;
+ class_ext_size += sizeof (MonoClassExt);
+ mono_image_unlock (klass->image);
}
/*
@@ -10045,53 +10186,62 @@ mono_class_alloc_ext (MonoClass *klass)
void
mono_class_setup_interfaces (MonoClass *klass, MonoError *error)
{
- int i;
+ int i, interface_count;
+ MonoClass **interfaces;
mono_error_init (error);
if (klass->interfaces_inited)
return;
- mono_loader_lock ();
-
- if (klass->interfaces_inited) {
- mono_loader_unlock ();
- return;
- }
-
if (klass->rank == 1 && klass->byval_arg.type != MONO_TYPE_ARRAY) {
MonoType *args [1];
/* generic IList, ICollection, IEnumerable */
- klass->interface_count = mono_defaults.generic_ireadonlylist_class ? 2 : 1;
- klass->interfaces = mono_image_alloc0 (klass->image, sizeof (MonoClass*) * klass->interface_count);
+ interface_count = mono_defaults.generic_ireadonlylist_class ? 2 : 1;
+ interfaces = mono_image_alloc0 (klass->image, sizeof (MonoClass*) * interface_count);
args [0] = &klass->element_class->byval_arg;
- klass->interfaces [0] = mono_class_bind_generic_parameters (
+ interfaces [0] = mono_class_bind_generic_parameters (
mono_defaults.generic_ilist_class, 1, args, FALSE);
- if (klass->interface_count > 1)
- klass->interfaces [1] = mono_class_bind_generic_parameters (
+ if (interface_count > 1)
+ interfaces [1] = mono_class_bind_generic_parameters (
mono_defaults.generic_ireadonlylist_class, 1, args, FALSE);
} else if (klass->generic_class) {
MonoClass *gklass = klass->generic_class->container_class;
- klass->interface_count = gklass->interface_count;
- klass->interfaces = mono_class_new0 (klass, MonoClass *, klass->interface_count);
- for (i = 0; i < klass->interface_count; i++) {
- klass->interfaces [i] = mono_class_inflate_generic_class_checked (gklass->interfaces [i], mono_generic_class_get_context (klass->generic_class), error);
+ mono_class_setup_interfaces (gklass, error);
+ if (!mono_error_ok (error)) {
+ mono_class_set_failure (klass, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Could not setup the interfaces"));
+ return;
+ }
+
+ interface_count = gklass->interface_count;
+ interfaces = mono_class_new0 (klass, MonoClass *, interface_count);
+ for (i = 0; i < interface_count; i++) {
+ interfaces [i] = mono_class_inflate_generic_class_checked (gklass->interfaces [i], mono_generic_class_get_context (klass->generic_class), error);
if (!mono_error_ok (error)) {
mono_class_set_failure (klass, MONO_EXCEPTION_TYPE_LOAD, g_strdup ("Could not setup the interfaces"));
- klass->interfaces = NULL;
return;
}
}
+ } else {
+ interface_count = 0;
+ interfaces = NULL;
}
- mono_memory_barrier ();
+ mono_image_lock (klass->image);
- klass->interfaces_inited = TRUE;
+ if (!klass->interfaces_inited) {
+ klass->interface_count = interface_count;
+ klass->interfaces = interfaces;
- mono_loader_unlock ();
+ mono_memory_barrier ();
+
+ klass->interfaces_inited = TRUE;
+ }
+
+ mono_image_unlock (klass->image);
}
static void
@@ -10126,7 +10276,7 @@ mono_field_resolve_type (MonoClassField *field, MonoError *error)
int idx = class->field.first + field_idx;
/*FIXME, in theory we do not lazy load SRE fields*/
- g_assert (!image->dynamic);
+ g_assert (!image_is_dynamic (image));
if (class->generic_container) {
container = class->generic_container;
@@ -10171,7 +10321,7 @@ mono_field_resolve_flags (MonoClassField *field)
int idx = class->field.first + field_idx;
/*FIXME, in theory we do not lazy load SRE fields*/
- g_assert (!image->dynamic);
+ g_assert (!image_is_dynamic (image));
return mono_metadata_decode_table_row_col (image, MONO_TABLE_FIELD, idx, MONO_FIELD_FLAGS);
}
diff --git a/mono/metadata/class.h b/mono/metadata/class.h
index a65bd4565e9..d9f315139b1 100644
--- a/mono/metadata/class.h
+++ b/mono/metadata/class.h
@@ -4,6 +4,7 @@
#include <mono/metadata/metadata.h>
#include <mono/metadata/image.h>
#include <mono/metadata/loader.h>
+#include <mono/utils/mono-error.h>
MONO_BEGIN_DECLS
@@ -38,6 +39,9 @@ MONO_API MonoClass *
mono_class_from_typeref (MonoImage *image, uint32_t type_token);
MONO_API MonoClass *
+mono_class_from_typeref_checked (MonoImage *image, uint32_t type_token, MonoError *error);
+
+MONO_API MonoClass *
mono_class_from_generic_parameter (MonoGenericParam *param, MonoImage *image, mono_bool is_mvar);
MONO_API MonoType*
diff --git a/mono/metadata/cominterop.c b/mono/metadata/cominterop.c
index 19b624c3fb5..6b98212f4ca 100644
--- a/mono/metadata/cominterop.c
+++ b/mono/metadata/cominterop.c
@@ -14,6 +14,7 @@
#include "object.h"
#include "loader.h"
#include "cil-coff.h"
+#include "metadata/abi-details.h"
#include "metadata/cominterop.h"
#include "metadata/marshal.h"
#include "metadata/method-builder.h"
@@ -75,9 +76,9 @@ enum {
#undef OPDEF
/* This mutex protects the various cominterop related caches in MonoImage */
-#define mono_cominterop_lock() EnterCriticalSection (&cominterop_mutex)
-#define mono_cominterop_unlock() LeaveCriticalSection (&cominterop_mutex)
-static CRITICAL_SECTION cominterop_mutex;
+#define mono_cominterop_lock() mono_mutex_lock (&cominterop_mutex)
+#define mono_cominterop_unlock() mono_mutex_unlock (&cominterop_mutex)
+static mono_mutex_t cominterop_mutex;
/* STDCALL on windows, CDECL everywhere else to work with XPCOM and MainWin COM */
#ifdef HOST_WIN32
@@ -534,7 +535,7 @@ mono_cominterop_init (void)
{
const char* com_provider_env;
- InitializeCriticalSection (&cominterop_mutex);
+ mono_mutex_init_recursive (&cominterop_mutex);
com_provider_env = g_getenv ("MONO_COM");
if (com_provider_env && !strcmp(com_provider_env, "MS"))
@@ -566,7 +567,7 @@ mono_cominterop_init (void)
void
mono_cominterop_cleanup (void)
{
- DeleteCriticalSection (&cominterop_mutex);
+ mono_mutex_destroy (&cominterop_mutex);
}
void
@@ -695,11 +696,11 @@ mono_cominterop_emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type,
// load src
mono_mb_emit_ldloc (mb, 0);
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
/* load the RCW from the ComInteropProxy*/
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoComInteropProxy, com_object));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoComInteropProxy, com_object));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
if (conv == MONO_MARSHAL_CONV_OBJECT_INTERFACE) {
@@ -1002,11 +1003,11 @@ mono_cominterop_get_invoke (MonoMethod *method)
/* get real proxy object, which is a ComInteropProxy in this case*/
temp_obj = mono_mb_add_local (mb, &mono_defaults.object_class->byval_arg);
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
/* load the RCW from the ComInteropProxy*/
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoComInteropProxy, com_object));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoComInteropProxy, com_object));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
/* load args and make the call on the RCW */
@@ -1034,7 +1035,7 @@ mono_cominterop_get_invoke (MonoMethod *method)
cache_proxy = mono_class_get_method_from_name (com_interop_proxy_class, "CacheProxy", 0);
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_managed_call (mb, cache_proxy, NULL);
}
@@ -2067,8 +2068,17 @@ mono_marshal_free_ccw (MonoObject* object)
MonoObject* handle_target = mono_gchandle_get_target (ccw_iter->gc_handle);
/* Looks like the GC NULLs the weakref handle target before running the
- * finalizer. So if we get a NULL target, destroy the CCW as well. */
- if (!handle_target || handle_target == object) {
+ * finalizer. So if we get a NULL target, destroy the CCW as well.
+ * Unless looking up the object from the CCW shows it not the right object.
+ */
+ gboolean destroy_ccw = !handle_target || handle_target == object;
+ if (!handle_target) {
+ MonoCCWInterface* ccw_entry = g_hash_table_lookup (ccw_iter->vtable_hash, mono_class_get_iunknown_class ());
+ if (!(ccw_entry && object == cominterop_get_ccw_object (ccw_entry, FALSE)))
+ destroy_ccw = FALSE;
+ }
+
+ if (destroy_ccw) {
/* remove all interfaces */
g_hash_table_foreach_remove (ccw_iter->vtable_hash, mono_marshal_free_ccw_entry, NULL);
g_hash_table_destroy (ccw_iter->vtable_hash);
diff --git a/mono/metadata/debug-helpers.c b/mono/metadata/debug-helpers.c
index a24e415d18c..aa62ad230e5 100644
--- a/mono/metadata/debug-helpers.c
+++ b/mono/metadata/debug-helpers.c
@@ -575,7 +575,7 @@ dis_one (GString *str, MonoDisHelper *dh, MonoMethod *method, const unsigned cha
size_t len2;
char *blob2 = NULL;
- if (!method->klass->image->dynamic && !method->dynamic) {
+ if (!image_is_dynamic (method->klass->image) && !method_is_dynamic (method)) {
token = read32 (ip);
blob = mono_metadata_user_string (method->klass->image, mono_metadata_token_index (token));
diff --git a/mono/metadata/domain-internals.h b/mono/metadata/domain-internals.h
index 09c6479c03d..24989f49afd 100644
--- a/mono/metadata/domain-internals.h
+++ b/mono/metadata/domain-internals.h
@@ -9,14 +9,16 @@
#include <mono/metadata/mempool.h>
#include <mono/metadata/lock-tracer.h>
#include <mono/utils/mono-codeman.h>
+#include <mono/utils/mono-mutex.h>
#include <mono/metadata/mono-hash.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-internal-hash.h>
#include <mono/io-layer/io-layer.h>
#include <mono/metadata/mempool-internals.h>
-extern CRITICAL_SECTION mono_delegate_section;
-extern CRITICAL_SECTION mono_strtod_mutex;
+
+extern mono_mutex_t mono_delegate_section;
+extern mono_mutex_t mono_strtod_mutex;
/*
* If this is set, the memory belonging to appdomains is not freed when a domain is
@@ -173,6 +175,7 @@ typedef struct
typedef struct
{
guint32 stack_size;
+ guint32 epilog_size;
} MonoArchEHJitInfo;
typedef struct {
@@ -197,8 +200,7 @@ struct _MonoJitInfo {
} d;
struct _MonoJitInfo *next_jit_code_hash;
gpointer code_start;
- /* This might contain an id for the unwind info instead of a register mask */
- guint32 used_regs;
+ guint32 unwind_info;
int code_size;
guint32 num_clauses:15;
/* Whenever the code is domain neutral or 'shared' */
@@ -282,7 +284,7 @@ struct _MonoDomain {
* i.e. if both are taken by the same thread, the loader lock
* must taken first.
*/
- CRITICAL_SECTION lock;
+ mono_mutex_t lock;
MonoMemPool *mp;
MonoCodeManager *code_mp;
/*
@@ -332,7 +334,7 @@ struct _MonoDomain {
GHashTable *proxy_vtable_hash;
/* Protected by 'jit_code_hash_lock' */
MonoInternalHashTable jit_code_hash;
- CRITICAL_SECTION jit_code_hash_lock;
+ mono_mutex_t jit_code_hash_lock;
int num_jit_info_tables;
MonoJitInfoTable *
volatile jit_info_table;
@@ -361,9 +363,9 @@ struct _MonoDomain {
GHashTable *finalizable_objects_hash;
/* Protects the three hashes above */
- CRITICAL_SECTION finalizable_objects_hash_lock;
+ mono_mutex_t finalizable_objects_hash_lock;
/* Used when accessing 'domain_assemblies' */
- CRITICAL_SECTION assemblies_lock;
+ mono_mutex_t assemblies_lock;
GHashTable *method_rgctx_hash;
diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c
index a9bf81b5cd8..b1b912f4e9b 100644
--- a/mono/metadata/domain.c
+++ b/mono/metadata/domain.c
@@ -93,9 +93,9 @@ static gboolean debug_domain_unload;
gboolean mono_dont_free_domains;
-#define mono_appdomains_lock() EnterCriticalSection (&appdomains_mutex)
-#define mono_appdomains_unlock() LeaveCriticalSection (&appdomains_mutex)
-static CRITICAL_SECTION appdomains_mutex;
+#define mono_appdomains_lock() mono_mutex_lock (&appdomains_mutex)
+#define mono_appdomains_unlock() mono_mutex_unlock (&appdomains_mutex)
+static mono_mutex_t appdomains_mutex;
static MonoDomain *mono_root_domain = NULL;
@@ -138,6 +138,9 @@ static const MonoRuntimeInfo supported_runtimes[] = {
static MonoCreateDomainFunc create_domain_hook;
static MonoFreeDomainFunc free_domain_hook;
+/* AOT cache configuration */
+static MonoAotCacheConfig aot_cache_config;
+
/* This is intentionally not in the header file, so people don't misuse it. */
extern void _mono_debug_init_corlib (MonoDomain *domain);
@@ -856,13 +859,13 @@ mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end)
{
MonoJitInfo *ji;
- mono_appdomains_lock ();
+ g_assert (mono_root_domain);
+ mono_domain_lock (mono_root_domain);
/*
* We reuse MonoJitInfoTable to store AOT module info,
* this gives us async-safe lookup.
*/
- g_assert (mono_root_domain);
if (!mono_root_domain->aot_modules) {
mono_root_domain->num_jit_info_tables ++;
mono_root_domain->aot_modules = jit_info_table_new (mono_root_domain);
@@ -874,7 +877,7 @@ mono_jit_info_add_aot_module (MonoImage *image, gpointer start, gpointer end)
ji->code_size = (guint8*)end - (guint8*)start;
jit_info_table_add (mono_root_domain, &mono_root_domain->aot_modules, ji);
- mono_appdomains_unlock ();
+ mono_domain_unlock (mono_root_domain);
}
void
@@ -1304,10 +1307,10 @@ mono_domain_create (void)
domain->finalizable_objects_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
domain->ftnptrs_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
- InitializeCriticalSection (&domain->lock);
- InitializeCriticalSection (&domain->assemblies_lock);
- InitializeCriticalSection (&domain->jit_code_hash_lock);
- InitializeCriticalSection (&domain->finalizable_objects_hash_lock);
+ mono_mutex_init_recursive (&domain->lock);
+ mono_mutex_init_recursive (&domain->assemblies_lock);
+ mono_mutex_init_recursive (&domain->jit_code_hash_lock);
+ mono_mutex_init_recursive (&domain->finalizable_objects_hash_lock);
domain->method_rgctx_hash = NULL;
@@ -1381,7 +1384,7 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
MONO_FAST_TLS_INIT (tls_appdomain);
mono_native_tls_alloc (&appdomain_thread_id, NULL);
- InitializeCriticalSection (&appdomains_mutex);
+ mono_mutex_init_recursive (&appdomains_mutex);
mono_metadata_init ();
mono_images_init ();
@@ -1789,7 +1792,7 @@ mono_cleanup (void)
mono_metadata_cleanup ();
mono_native_tls_free (appdomain_thread_id);
- DeleteCriticalSection (&appdomains_mutex);
+ mono_mutex_destroy (&appdomains_mutex);
#ifndef HOST_WIN32
wapi_cleanup ();
@@ -2023,7 +2026,7 @@ mono_domain_free (MonoDomain *domain, gboolean force)
/* Close dynamic assemblies first, since they have no ref count */
for (tmp = domain->domain_assemblies; tmp; tmp = tmp->next) {
MonoAssembly *ass = tmp->data;
- if (!ass->image || !ass->image->dynamic)
+ if (!ass->image || !image_is_dynamic (ass->image))
continue;
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count);
if (!mono_assembly_close_except_image_pools (ass))
@@ -2034,7 +2037,7 @@ mono_domain_free (MonoDomain *domain, gboolean force)
MonoAssembly *ass = tmp->data;
if (!ass)
continue;
- if (!ass->image || ass->image->dynamic)
+ if (!ass->image || image_is_dynamic (ass->image))
continue;
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Unloading domain %s[%p], assembly %s[%p], ref_count=%d", domain->friendly_name, domain, ass->aname.name, ass, ass->ref_count);
if (!mono_assembly_close_except_image_pools (ass))
@@ -2137,10 +2140,10 @@ mono_domain_free (MonoDomain *domain, gboolean force)
domain->ftnptrs_hash = NULL;
}
- DeleteCriticalSection (&domain->finalizable_objects_hash_lock);
- DeleteCriticalSection (&domain->assemblies_lock);
- DeleteCriticalSection (&domain->jit_code_hash_lock);
- DeleteCriticalSection (&domain->lock);
+ mono_mutex_destroy (&domain->finalizable_objects_hash_lock);
+ mono_mutex_destroy (&domain->assemblies_lock);
+ mono_mutex_destroy (&domain->jit_code_hash_lock);
+ mono_mutex_destroy (&domain->lock);
domain->setup = NULL;
mono_gc_deregister_root ((char*)&(domain->MONO_DOMAIN_FIRST_GC_TRACKED));
@@ -2776,3 +2779,9 @@ mono_enable_debug_domain_unload (gboolean enable)
{
debug_domain_unload = enable;
}
+
+MonoAotCacheConfig *
+mono_get_aot_cache_config (void)
+{
+ return &aot_cache_config;
+}
diff --git a/mono/metadata/exception.c b/mono/metadata/exception.c
index 24bfd6ed5ba..cf42445fa78 100644
--- a/mono/metadata/exception.c
+++ b/mono/metadata/exception.c
@@ -87,10 +87,12 @@ mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image,
MonoException *
mono_exception_from_token (MonoImage *image, guint32 token)
{
+ MonoError error;
MonoClass *klass;
MonoObject *o;
- klass = mono_class_get (image, token);
+ klass = mono_class_get_checked (image, token, &error);
+ g_assert (mono_error_ok (&error)); /* FIXME handle the error. */
o = mono_object_new (mono_domain_get (), klass);
g_assert (o != NULL);
@@ -197,7 +199,9 @@ MonoException *
mono_exception_from_token_two_strings (MonoImage *image, guint32 token,
MonoString *a1, MonoString *a2)
{
- MonoClass *klass = mono_class_get (image, token);
+ MonoError error;
+ MonoClass *klass = mono_class_get_checked (image, token, &error);
+ g_assert (mono_error_ok (&error)); /* FIXME handle the error. */
return create_exception_two_strings (klass, a1, a2);
}
diff --git a/mono/metadata/file-mmap-posix.c b/mono/metadata/file-mmap-posix.c
index a1a30a0737c..32f555ae7b5 100644
--- a/mono/metadata/file-mmap-posix.c
+++ b/mono/metadata/file-mmap-posix.c
@@ -81,8 +81,10 @@ enum {
MMAP_FILE_ACCESS_READ_WRITE_EXECUTE = 5,
};
-#ifndef DEFFILEMODE
-#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
+#ifdef PLATFORM_ANDROID
+#define DEFAULT_FILEMODE 0666
+#else
+#define DEFAULT_FILEMODE DEFFILEMODE
#endif
static int mmap_init_state;
@@ -269,7 +271,7 @@ open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int a
}
if (path) //FIXME use io portability?
- fd = open (c_path, file_mode_to_unix (mode) | access_mode_to_unix (access), DEFFILEMODE);
+ fd = open (c_path, file_mode_to_unix (mode) | access_mode_to_unix (access), DEFAULT_FILEMODE);
else
fd = dup (input_fd);
@@ -294,7 +296,7 @@ done:
return (void*)handle;
}
-#define MONO_ANON_FILE_TEMPLATE "/tmp/mono.anonmap.XXXXXXXXX"
+#define MONO_ANON_FILE_TEMPLATE "/mono.anonmap.XXXXXXXXX"
static void*
open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, int options, int *error)
{
@@ -324,8 +326,9 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in
//XXX should we ftruncate if the file is smaller than capacity?
} else {
int fd;
- char file_name [sizeof (MONO_ANON_FILE_TEMPLATE) + 1];
- int unused G_GNUC_UNUSED;
+ char *file_name;
+ const char *tmp_dir;
+ int unused G_GNUC_UNUSED, alloc_size;
if (mode == FILE_MODE_OPEN) {
*error = FILE_NOT_FOUND;
@@ -333,7 +336,16 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in
}
*capacity = align_up_to_page_size (*capacity);
- strcpy (file_name, MONO_ANON_FILE_TEMPLATE);
+ tmp_dir = g_get_tmp_dir ();
+ alloc_size = strlen (tmp_dir) + strlen (MONO_ANON_FILE_TEMPLATE) + 1;
+ if (alloc_size > 1024) {//rather fail that stack overflow
+ *error = COULD_NOT_MAP_MEMORY;
+ goto done;
+ }
+ file_name = alloca (alloc_size);
+ strcpy (file_name, tmp_dir);
+ strcat (file_name, MONO_ANON_FILE_TEMPLATE);
+
fd = mkstemp (file_name);
if (fd == -1) {
*error = COULD_NOT_MAP_MEMORY;
diff --git a/mono/metadata/gc-internal.h b/mono/metadata/gc-internal.h
index 4731dc1b6b8..f2e59acb844 100644
--- a/mono/metadata/gc-internal.h
+++ b/mono/metadata/gc-internal.h
@@ -19,8 +19,8 @@
typedef struct {
int minor_gc_count;
int major_gc_count;
- long long minor_gc_time_usecs;
- long long major_gc_time_usecs;
+ long long minor_gc_time;
+ long long major_gc_time;
#ifdef HEAVY_STATISTICS
unsigned long long gray_queue_section_alloc;
unsigned long long gray_queue_section_free;
@@ -31,8 +31,8 @@ typedef struct {
#endif
} GCStats;
-#define mono_domain_finalizers_lock(domain) EnterCriticalSection (&(domain)->finalizable_objects_hash_lock);
-#define mono_domain_finalizers_unlock(domain) LeaveCriticalSection (&(domain)->finalizable_objects_hash_lock);
+#define mono_domain_finalizers_lock(domain) mono_mutex_lock (&(domain)->finalizable_objects_hash_lock);
+#define mono_domain_finalizers_unlock(domain) mono_mutex_unlock (&(domain)->finalizable_objects_hash_lock);
/* Register a memory area as a conservatively scanned GC root */
#define MONO_GC_REGISTER_ROOT_PINNING(x) mono_gc_register_root ((char*)&(x), sizeof(x), NULL)
@@ -151,8 +151,8 @@ void* mono_gc_make_root_descr_all_refs (int numbits) MONO_INTERNAL;
* foreach (ref in GC references in the are structure pointed to by ADDR)
* mark_func (ref)
*/
-typedef void (*MonoGCMarkFunc) (void **addr);
-typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func);
+typedef void (*MonoGCMarkFunc) (void **addr, void *gc_data);
+typedef void (*MonoGCRootMarkFunc) (void *addr, MonoGCMarkFunc mark_func, void *gc_data);
/* Create a descriptor with a user defined marking function */
MONO_API void *mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker);
@@ -276,7 +276,7 @@ typedef struct {
* - in the second pass, it should mark the remaining areas of the stack
* using precise marking by calling mono_gc_scan_object ().
*/
- void (*thread_mark_func) (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise);
+ void (*thread_mark_func) (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise, void *gc_data);
} MonoGCCallbacks;
/* Set the callback functions callable by the GC */
@@ -289,7 +289,7 @@ MonoGCCallbacks *mono_gc_get_gc_callbacks (void) MONO_INTERNAL;
void mono_gc_conservatively_scan_area (void *start, void *end) MONO_INTERNAL;
/* Scan OBJ, returning its new address */
-void *mono_gc_scan_object (void *obj) MONO_INTERNAL;
+void *mono_gc_scan_object (void *obj, void *gc_data) MONO_INTERNAL;
/* Return the bitmap encoded by a descriptor */
gsize* mono_gc_get_bitmap_for_descr (void *descr, int *numbits) MONO_INTERNAL;
diff --git a/mono/metadata/gc.c b/mono/metadata/gc.c
index 2e244b81596..03b182b99f4 100644
--- a/mono/metadata/gc.c
+++ b/mono/metadata/gc.c
@@ -59,10 +59,10 @@ static gboolean gc_disabled = FALSE;
static gboolean finalizing_root_domain = FALSE;
-#define mono_finalizer_lock() EnterCriticalSection (&finalizer_mutex)
-#define mono_finalizer_unlock() LeaveCriticalSection (&finalizer_mutex)
-static CRITICAL_SECTION finalizer_mutex;
-static CRITICAL_SECTION reference_queue_mutex;
+#define mono_finalizer_lock() mono_mutex_lock (&finalizer_mutex)
+#define mono_finalizer_unlock() mono_mutex_unlock (&finalizer_mutex)
+static mono_mutex_t finalizer_mutex;
+static mono_mutex_t reference_queue_mutex;
static GSList *domains_to_finalize= NULL;
static MonoMList *threads_to_finalize = NULL;
@@ -502,10 +502,10 @@ ves_icall_System_GC_get_ephemeron_tombstone (void)
return mono_domain_get ()->ephemeron_tombstone;
}
-#define mono_allocator_lock() EnterCriticalSection (&allocator_section)
-#define mono_allocator_unlock() LeaveCriticalSection (&allocator_section)
-static CRITICAL_SECTION allocator_section;
-static CRITICAL_SECTION handle_section;
+#define mono_allocator_lock() mono_mutex_lock (&allocator_section)
+#define mono_allocator_unlock() mono_mutex_unlock (&allocator_section)
+static mono_mutex_t allocator_section;
+static mono_mutex_t handle_section;
typedef enum {
HANDLE_WEAK,
@@ -605,8 +605,8 @@ static HandleData gc_handles [] = {
{NULL, NULL, 0, HANDLE_PINNED, 0}
};
-#define lock_handles(handles) EnterCriticalSection (&handle_section)
-#define unlock_handles(handles) LeaveCriticalSection (&handle_section)
+#define lock_handles(handles) mono_mutex_lock (&handle_section)
+#define unlock_handles(handles) mono_mutex_unlock (&handle_section)
static int
find_first_unset (guint32 bitmap)
@@ -1062,6 +1062,8 @@ finalize_domain_objects (DomainFinalizationReq *req)
static guint32
finalizer_thread (gpointer unused)
{
+ gboolean wait = TRUE;
+
while (!finished) {
/* Wait to be notified that there's at least one
* finaliser to run
@@ -1069,12 +1071,15 @@ finalizer_thread (gpointer unused)
g_assert (mono_domain_get () == mono_get_root_domain ());
+ if (wait) {
/* An alertable wait is required so this thread can be suspended on windows */
#ifdef MONO_HAS_SEMAPHORES
- MONO_SEM_WAIT_ALERTABLE (&finalizer_sem, TRUE);
+ MONO_SEM_WAIT_ALERTABLE (&finalizer_sem, TRUE);
#else
- WaitForSingleObjectEx (finalizer_event, INFINITE, TRUE);
+ WaitForSingleObjectEx (finalizer_event, INFINITE, TRUE);
#endif
+ }
+ wait = TRUE;
mono_threads_perform_thread_dump ();
@@ -1106,7 +1111,16 @@ finalizer_thread (gpointer unused)
reference_queue_proccess_all ();
- SetEvent (pending_done_event);
+#ifdef MONO_HAS_SEMAPHORES
+ /* Avoid posting the pending done event until there are pending finalizers */
+ if (MONO_SEM_TIMEDWAIT (&finalizer_sem, 0) == 0)
+ /* Don't wait again at the start of the loop */
+ wait = FALSE;
+ else
+ SetEvent (pending_done_event);
+#else
+ SetEvent (pending_done_event);
+#endif
}
SetEvent (shutdown_event);
@@ -1126,11 +1140,11 @@ mono_gc_init_finalizer_thread (void)
void
mono_gc_init (void)
{
- InitializeCriticalSection (&handle_section);
- InitializeCriticalSection (&allocator_section);
+ mono_mutex_init_recursive (&handle_section);
+ mono_mutex_init_recursive (&allocator_section);
- InitializeCriticalSection (&finalizer_mutex);
- InitializeCriticalSection (&reference_queue_mutex);
+ mono_mutex_init_recursive (&finalizer_mutex);
+ mono_mutex_init_recursive (&reference_queue_mutex);
MONO_GC_REGISTER_ROOT_FIXED (gc_handles [HANDLE_NORMAL].entries);
MONO_GC_REGISTER_ROOT_FIXED (gc_handles [HANDLE_PINNED].entries);
@@ -1138,8 +1152,8 @@ mono_gc_init (void)
mono_counters_register ("Created object count", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &mono_stats.new_object_count);
mono_counters_register ("Minor GC collections", MONO_COUNTER_GC | MONO_COUNTER_INT, &gc_stats.minor_gc_count);
mono_counters_register ("Major GC collections", MONO_COUNTER_GC | MONO_COUNTER_INT, &gc_stats.major_gc_count);
- mono_counters_register ("Minor GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.minor_gc_time_usecs);
- mono_counters_register ("Major GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.major_gc_time_usecs);
+ mono_counters_register ("Minor GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.minor_gc_time);
+ mono_counters_register ("Major GC time", MONO_COUNTER_GC | MONO_COUNTER_LONG | MONO_COUNTER_TIME, &gc_stats.major_gc_time);
#ifdef HEAVY_STATISTICS
mono_counters_register ("Gray Queue alloc section", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_section_alloc);
mono_counters_register ("Gray Queue free section", MONO_COUNTER_GC | MONO_COUNTER_ULONG, &gc_stats.gray_queue_section_free);
@@ -1228,10 +1242,10 @@ mono_gc_cleanup (void)
mono_reference_queue_cleanup ();
- DeleteCriticalSection (&handle_section);
- DeleteCriticalSection (&allocator_section);
- DeleteCriticalSection (&finalizer_mutex);
- DeleteCriticalSection (&reference_queue_mutex);
+ mono_mutex_destroy (&handle_section);
+ mono_mutex_destroy (&allocator_section);
+ mono_mutex_destroy (&finalizer_mutex);
+ mono_mutex_destroy (&reference_queue_mutex);
}
#else
@@ -1244,7 +1258,7 @@ mono_gc_finalize_notify (void)
void mono_gc_init (void)
{
- InitializeCriticalSection (&handle_section);
+ mono_mutex_init_recursive (&handle_section);
}
void mono_gc_cleanup (void)
@@ -1424,7 +1438,7 @@ reference_queue_proccess_all (void)
reference_queue_proccess (queue);
restart:
- EnterCriticalSection (&reference_queue_mutex);
+ mono_mutex_lock (&reference_queue_mutex);
for (iter = &ref_queues; *iter;) {
queue = *iter;
if (!queue->should_be_deleted) {
@@ -1432,14 +1446,14 @@ restart:
continue;
}
if (queue->queue) {
- LeaveCriticalSection (&reference_queue_mutex);
+ mono_mutex_unlock (&reference_queue_mutex);
reference_queue_proccess (queue);
goto restart;
}
*iter = queue->next;
g_free (queue);
}
- LeaveCriticalSection (&reference_queue_mutex);
+ mono_mutex_unlock (&reference_queue_mutex);
}
static void
@@ -1497,10 +1511,10 @@ mono_gc_reference_queue_new (mono_reference_queue_callback callback)
MonoReferenceQueue *res = g_new0 (MonoReferenceQueue, 1);
res->callback = callback;
- EnterCriticalSection (&reference_queue_mutex);
+ mono_mutex_lock (&reference_queue_mutex);
res->next = ref_queues;
ref_queues = res;
- LeaveCriticalSection (&reference_queue_mutex);
+ mono_mutex_unlock (&reference_queue_mutex);
return res;
}
diff --git a/mono/metadata/icall-def.h b/mono/metadata/icall-def.h
index 028319dcfe0..103eb3c4230 100644
--- a/mono/metadata/icall-def.h
+++ b/mono/metadata/icall-def.h
@@ -503,10 +503,6 @@ ICALL(ASSEM_15, "InternalGetType", ves_icall_System_Reflection_Assembly_Internal
ICALL(ASSEM_16, "InternalImageRuntimeVersion", ves_icall_System_Reflection_Assembly_InternalImageRuntimeVersion)
ICALL(ASSEM_17, "LoadFrom", ves_icall_System_Reflection_Assembly_LoadFrom)
ICALL(ASSEM_18, "LoadPermissions", ves_icall_System_Reflection_Assembly_LoadPermissions)
- /*
- * Private icalls for the Mono Debugger
- */
-ICALL(ASSEM_19, "MonoDebugger_GetMethodToken", ves_icall_MonoDebugger_GetMethodToken)
/* normal icalls again */
ICALL(ASSEM_20, "get_EntryPoint", ves_icall_System_Reflection_Assembly_get_EntryPoint)
diff --git a/mono/metadata/icall.c b/mono/metadata/icall.c
index ca2781451e0..763b2f638bf 100644
--- a/mono/metadata/icall.c
+++ b/mono/metadata/icall.c
@@ -129,9 +129,9 @@ mono_double_ParseImpl (char *ptr, double *result)
if (*ptr){
/* mono_strtod () is not thread-safe */
- EnterCriticalSection (&mono_strtod_mutex);
+ mono_mutex_lock (&mono_strtod_mutex);
*result = mono_strtod (ptr, &endptr);
- LeaveCriticalSection (&mono_strtod_mutex);
+ mono_mutex_unlock (&mono_strtod_mutex);
}
if (!*ptr || (endptr && *endptr))
@@ -907,11 +907,12 @@ ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunClassConstructor (Mo
ICALL_EXPORT void
ves_icall_System_Runtime_CompilerServices_RuntimeHelpers_RunModuleConstructor (MonoImage *image)
{
- MONO_ARCH_SAVE_REGS;
+ MonoError error;
mono_image_check_for_module_cctor (image);
if (image->has_module_cctor) {
- MonoClass *module_klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | 1);
+ MonoClass *module_klass = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | 1, &error);
+ mono_error_raise_exception (&error);
/*It's fine to raise the exception here*/
mono_runtime_class_init (mono_class_vtable_full (mono_domain_get (), module_klass, TRUE));
}
@@ -1613,12 +1614,17 @@ ves_icall_System_Reflection_FieldInfo_get_marshal_info (MonoReflectionField *fie
{
MonoClass *klass = field->field->parent;
MonoMarshalType *info;
+ MonoType *ftype;
int i;
if (klass->generic_container ||
(klass->generic_class && klass->generic_class->context.class_inst->is_open))
return NULL;
+ ftype = mono_field_get_type (field->field);
+ if (ftype && !(ftype->attrs & FIELD_ATTRIBUTE_HAS_FIELD_MARSHAL))
+ return NULL;
+
info = mono_marshal_load_type_info (klass);
for (i = 0; i < info->num_fields; ++i) {
@@ -1668,8 +1674,7 @@ ves_icall_System_Reflection_FieldInfo_GetTypeModifiers (MonoReflectionField *fie
{
MonoError error;
MonoType *type = mono_field_get_type_checked (field->field, &error);
- if (!mono_error_ok (&error))
- mono_error_raise_exception (&error);
+ mono_error_raise_exception (&error);
return type_array_from_modifiers (field->field->parent->image, type, optional);
}
@@ -1744,6 +1749,7 @@ ves_icall_MonoField_GetFieldOffset (MonoReflectionField *field)
MonoClass *parent = field->field->parent;
if (!parent->size_inited)
mono_class_init (parent);
+ mono_class_setup_fields_locking (parent);
return field->field->offset - sizeof (MonoObject);
}
@@ -1891,7 +1897,7 @@ ves_icall_MonoField_GetRawConstantValue (MonoReflectionField *this)
if (!(t->attrs & FIELD_ATTRIBUTE_HAS_DEFAULT))
mono_raise_exception (mono_get_exception_invalid_operation (NULL));
- if (field->parent->image->dynamic) {
+ if (image_is_dynamic (field->parent->image)) {
/* FIXME: */
g_assert_not_reached ();
}
@@ -2171,7 +2177,7 @@ ves_icall_Type_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *
MonoClass *klass = mono_class_from_mono_type (type->type);
mono_class_init_or_throw (klass);
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder*)type;
*packing = tb->packing_size;
*size = tb->class_size;
@@ -2270,12 +2276,15 @@ ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
if (type->type->byref)
return NULL;
- if (type->type->type == MONO_TYPE_VAR)
- class = mono_type_get_generic_param_owner (type->type)->owner.klass;
- else if (type->type->type == MONO_TYPE_MVAR)
- class = mono_type_get_generic_param_owner (type->type)->owner.method->klass;
- else
+ if (type->type->type == MONO_TYPE_VAR) {
+ MonoGenericContainer *param = mono_type_get_generic_param_owner (type->type);
+ class = param ? param->owner.klass : NULL;
+ } else if (type->type->type == MONO_TYPE_MVAR) {
+ MonoGenericContainer *param = mono_type_get_generic_param_owner (type->type);
+ class = param ? param->owner.method->klass : NULL;
+ } else {
class = mono_class_from_mono_type (type->type)->nested_in;
+ }
return class ? mono_type_get_object (domain, &class->byval_arg) : NULL;
}
@@ -2604,7 +2613,7 @@ ves_icall_MonoMethod_GetDllImportAttribute (MonoMethod *method)
g_assert (DllImportAttributeClass);
}
- if (method->klass->image->dynamic) {
+ if (image_is_dynamic (method->klass->image)) {
MonoReflectionMethodAux *method_aux =
g_hash_table_lookup (
((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2668,7 +2677,7 @@ ves_icall_MonoMethod_GetGenericMethodDefinition (MonoReflectionMethod *method)
if (!result->is_generic)
return NULL;
- if (method->method->klass->image->dynamic) {
+ if (image_is_dynamic (method->method->klass->image)) {
MonoDynamicImage *image = (MonoDynamicImage*)method->method->klass->image;
MonoReflectionMethod *res;
@@ -2819,7 +2828,7 @@ ves_icall_InternalInvoke (MonoReflectionMethod *method, MonoObject *this, MonoAr
return NULL;
}
- if (image->dynamic && !((MonoDynamicImage*)image)->run) {
+ if (image_is_dynamic (image) && !((MonoDynamicImage*)image)->run) {
mono_gc_wbarrier_generic_store (exc, (MonoObject*) mono_get_exception_not_supported ("Cannot invoke a method in a dynamic assembly without run access."));
return NULL;
}
@@ -4165,7 +4174,7 @@ ves_icall_System_Reflection_Assembly_InternalGetType (MonoReflectionAssembly *as
type = NULL;
}
else
- if (assembly->assembly->dynamic) {
+ if (assembly_is_dynamic (assembly->assembly)) {
/* Enumerate all modules */
MonoReflectionAssemblyBuilder *abuilder = (MonoReflectionAssemblyBuilder*)assembly;
int i;
@@ -4715,7 +4724,7 @@ ves_icall_System_Reflection_Assembly_GetModulesInternal (MonoReflectionAssembly
MonoImage *image = assembly->assembly->image;
g_assert (image != NULL);
- g_assert (!assembly->assembly->dynamic);
+ g_assert (!assembly_is_dynamic (assembly->assembly));
table = &image->tables [MONO_TABLE_FILE];
file_count = table->rows;
@@ -5152,21 +5161,16 @@ mono_module_get_types (MonoDomain *domain, MonoImage *image, MonoArray **excepti
attrs = mono_metadata_decode_row_col (tdef, i, MONO_TYPEDEF_FLAGS);
visibility = attrs & TYPE_ATTRIBUTE_VISIBILITY_MASK;
if (!exportedOnly || (visibility == TYPE_ATTRIBUTE_PUBLIC || visibility == TYPE_ATTRIBUTE_NESTED_PUBLIC)) {
- klass = mono_class_get (image, (i + 1) | MONO_TOKEN_TYPE_DEF);
+ MonoError error;
+ klass = mono_class_get_checked (image, (i + 1) | MONO_TOKEN_TYPE_DEF, &error);
+ g_assert (!mono_loader_get_last_error ()); /* Plug any leaks */
+
if (klass) {
mono_array_setref (res, count, mono_type_get_object (domain, &klass->byval_arg));
} else {
- MonoLoaderError *error;
- MonoException *ex;
-
- error = mono_loader_get_last_error ();
- g_assert (error != NULL);
-
- ex = mono_loader_error_prepare_exception (error);
+ MonoException *ex = mono_error_convert_to_exception (&error);
mono_array_setref (*exceptions, count, ex);
}
- if (mono_loader_get_last_error ())
- mono_loader_clear_error ();
count++;
}
}
@@ -5189,7 +5193,7 @@ ves_icall_System_Reflection_Assembly_GetTypes (MonoReflectionAssembly *assembly,
domain = mono_object_domain (assembly);
- g_assert (!assembly->assembly->dynamic);
+ g_assert (!assembly_is_dynamic (assembly->assembly));
image = assembly->assembly->image;
table = &image->tables [MONO_TABLE_FILE];
res = mono_module_get_types (domain, image, &exceptions, exportedOnly);
@@ -5257,7 +5261,7 @@ ves_icall_System_Reflection_Assembly_GetTypes (MonoReflectionAssembly *assembly,
mono_loader_clear_error ();
exl = mono_array_new (domain, mono_defaults.exception_class, length);
- /* Types for which mono_class_get () succeeded */
+ /* Types for which mono_class_get_checked () succeeded */
for (i = 0, tmp = list; tmp; i++, tmp = tmp->next) {
MonoException *exc = mono_class_get_exception_for_failure (tmp->data);
mono_array_setref (exl, i, exc);
@@ -5312,6 +5316,7 @@ ves_icall_System_Reflection_AssemblyName_ParseName (MonoReflectionAssemblyName *
ICALL_EXPORT MonoReflectionType*
ves_icall_System_Reflection_Module_GetGlobalType (MonoReflectionModule *module)
{
+ MonoError error;
MonoDomain *domain = mono_object_domain (module);
MonoClass *klass;
@@ -5319,11 +5324,12 @@ ves_icall_System_Reflection_Module_GetGlobalType (MonoReflectionModule *module)
g_assert (module->image);
- if (module->image->dynamic && ((MonoDynamicImage*)(module->image))->initial_image)
+ if (image_is_dynamic (module->image) && ((MonoDynamicImage*)(module->image))->initial_image)
/* These images do not have a global type */
return NULL;
- klass = mono_class_get (module->image, 1 | MONO_TOKEN_TYPE_DEF);
+ klass = mono_class_get_checked (module->image, 1 | MONO_TOKEN_TYPE_DEF, &error);
+ mono_error_raise_exception (&error);
return mono_type_get_object (domain, &klass->byval_arg);
}
@@ -5359,7 +5365,7 @@ ves_icall_System_Reflection_Module_GetHINSTANCE (MonoReflectionModule *module)
ICALL_EXPORT void
ves_icall_System_Reflection_Module_GetPEKind (MonoImage *image, gint32 *pe_kind, gint32 *machine)
{
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
MonoDynamicImage *dyn = (MonoDynamicImage*)image;
*pe_kind = dyn->pe_kind;
*machine = dyn->machine;
@@ -5400,7 +5406,7 @@ ves_icall_System_Reflection_Module_InternalGetTypes (MonoReflectionModule *modul
static gboolean
mono_memberref_is_method (MonoImage *image, guint32 token)
{
- if (!image->dynamic) {
+ if (!image_is_dynamic (image)) {
guint32 cols [MONO_MEMBERREF_SIZE];
const char *sig;
mono_metadata_decode_row (&image->tables [MONO_TABLE_MEMBERREF], mono_metadata_token_index (token) - 1, cols, MONO_MEMBERREF_SIZE);
@@ -5433,23 +5439,24 @@ init_generic_context_from_args (MonoGenericContext *context, MonoArray *type_arg
}
ICALL_EXPORT MonoType*
-ves_icall_System_Reflection_Module_ResolveTypeToken (MonoImage *image, guint32 token, MonoArray *type_args, MonoArray *method_args, MonoResolveTokenError *error)
+ves_icall_System_Reflection_Module_ResolveTypeToken (MonoImage *image, guint32 token, MonoArray *type_args, MonoArray *method_args, MonoResolveTokenError *resolve_error)
{
MonoClass *klass;
int table = mono_metadata_token_table (token);
int index = mono_metadata_token_index (token);
MonoGenericContext context;
+ MonoError error;
- *error = ResolveTokenError_Other;
+ *resolve_error = ResolveTokenError_Other;
/* Validate token */
if ((table != MONO_TABLE_TYPEDEF) && (table != MONO_TABLE_TYPEREF) &&
(table != MONO_TABLE_TYPESPEC)) {
- *error = ResolveTokenError_BadTable;
+ *resolve_error = ResolveTokenError_BadTable;
return NULL;
}
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
if ((table == MONO_TABLE_TYPEDEF) || (table == MONO_TABLE_TYPEREF)) {
klass = mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
return klass ? &klass->byval_arg : NULL;
@@ -5461,15 +5468,15 @@ ves_icall_System_Reflection_Module_ResolveTypeToken (MonoImage *image, guint32 t
}
if ((index <= 0) || (index > image->tables [table].rows)) {
- *error = ResolveTokenError_OutOfRange;
+ *resolve_error = ResolveTokenError_OutOfRange;
return NULL;
}
init_generic_context_from_args (&context, type_args, method_args);
- klass = mono_class_get_full (image, token, &context);
-
- if (mono_loader_get_last_error ())
- mono_raise_exception (mono_loader_error_prepare_exception (mono_loader_get_last_error ()));
+ klass = mono_class_get_checked (image, token, &error);
+ if (klass)
+ klass = mono_class_inflate_generic_class_checked (klass, &context, &error);
+ mono_error_raise_exception (&error);
if (klass)
return &klass->byval_arg;
@@ -5494,7 +5501,7 @@ ves_icall_System_Reflection_Module_ResolveMethodToken (MonoImage *image, guint32
return NULL;
}
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
if (table == MONO_TABLE_METHOD)
return mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
@@ -5538,7 +5545,7 @@ ves_icall_System_Reflection_Module_ResolveStringToken (MonoImage *image, guint32
return NULL;
}
- if (image->dynamic)
+ if (image_is_dynamic (image))
return mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
if ((index <= 0) || (index >= image->heap_us.size)) {
@@ -5568,7 +5575,7 @@ ves_icall_System_Reflection_Module_ResolveFieldToken (MonoImage *image, guint32
return NULL;
}
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
if (table == MONO_TABLE_FIELD)
return mono_lookup_dynamic_token_class (image, token, FALSE, NULL, NULL);
@@ -5672,7 +5679,7 @@ ves_icall_System_Reflection_Module_ResolveSignature (MonoImage *image, guint32 t
if (table != MONO_TABLE_STANDALONESIG)
return NULL;
- if (image->dynamic)
+ if (image_is_dynamic (image))
return NULL;
if ((idx == 0) || (idx > tables [MONO_TABLE_STANDALONESIG].rows))
@@ -5844,7 +5851,7 @@ ves_icall_System_Delegate_CreateDelegate_internal (MonoReflectionType *type, Mon
delegate = mono_object_new (mono_object_domain (type), delegate_class);
- if (method->dynamic) {
+ if (method_is_dynamic (method)) {
/* Creating a trampoline would leak memory */
func = mono_compile_method (method);
} else {
@@ -7403,15 +7410,11 @@ ves_icall_System_Char_GetDataTablePointers (int category_data_version,
*to_upper_data_high = ToUpperDataHigh;
}
-ICALL_EXPORT gint32
-ves_icall_MonoDebugger_GetMethodToken (MonoReflectionMethod *method)
-{
- return method->method->token;
-}
-
/*
* We return NULL for no modifiers so the corlib code can return Type.EmptyTypes
* and avoid useless allocations.
+ *
+ * MAY THROW
*/
static MonoArray*
type_array_from_modifiers (MonoImage *image, MonoType *type, int optional)
@@ -7428,7 +7431,9 @@ type_array_from_modifiers (MonoImage *image, MonoType *type, int optional)
count = 0;
for (i = 0; i < type->num_mods; ++i) {
if ((optional && !type->modifiers [i].required) || (!optional && type->modifiers [i].required)) {
- MonoClass *klass = mono_class_get (image, type->modifiers [i].token);
+ MonoError error;
+ MonoClass *klass = mono_class_get_checked (image, type->modifiers [i].token, &error);
+ mono_error_raise_exception (&error); /* this is safe, no cleanup needed on callers */
mono_array_setref (res, count, mono_type_get_object (mono_domain_get (), &klass->byval_arg));
count++;
}
diff --git a/mono/metadata/image.c b/mono/metadata/image.c
index f89f0c9ecc3..d5c05bef527 100644
--- a/mono/metadata/image.c
+++ b/mono/metadata/image.c
@@ -54,10 +54,10 @@ static GHashTable *loaded_images_refonly_hash;
static gboolean debug_assembly_unload = FALSE;
-#define mono_images_lock() if (mutex_inited) EnterCriticalSection (&images_mutex)
-#define mono_images_unlock() if (mutex_inited) LeaveCriticalSection (&images_mutex)
+#define mono_images_lock() if (mutex_inited) mono_mutex_lock (&images_mutex)
+#define mono_images_unlock() if (mutex_inited) mono_mutex_unlock (&images_mutex)
static gboolean mutex_inited;
-static CRITICAL_SECTION images_mutex;
+static mono_mutex_t images_mutex;
typedef struct ImageUnloadHook ImageUnloadHook;
struct ImageUnloadHook {
@@ -184,7 +184,7 @@ mono_image_rva_map (MonoImage *image, guint32 addr)
void
mono_images_init (void)
{
- InitializeCriticalSection (&images_mutex);
+ mono_mutex_init_recursive (&images_mutex);
loaded_images_hash = g_hash_table_new (g_str_hash, g_str_equal);
loaded_images_refonly_hash = g_hash_table_new (g_str_hash, g_str_equal);
@@ -205,7 +205,7 @@ mono_images_cleanup (void)
GHashTableIter iter;
MonoImage *image;
- DeleteCriticalSection (&images_mutex);
+ mono_mutex_destroy (&images_mutex);
g_hash_table_iter_init (&iter, loaded_images_hash);
while (g_hash_table_iter_next (&iter, NULL, (void**)&image))
@@ -534,7 +534,7 @@ mono_image_check_for_module_cctor (MonoImage *image)
MonoTableInfo *t, *mt;
t = &image->tables [MONO_TABLE_TYPEDEF];
mt = &image->tables [MONO_TABLE_METHOD];
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
/* FIXME: */
image->checked_module_cctor = TRUE;
return;
@@ -671,12 +671,15 @@ class_next_value (gpointer value)
void
mono_image_init (MonoImage *image)
{
+ mono_mutex_init_recursive (&image->lock);
+ mono_mutex_init_recursive (&image->szarray_cache_lock);
+
image->mempool = mono_mempool_new_size (512);
mono_internal_hash_table_init (&image->class_cache,
g_direct_hash,
class_key_extract,
class_next_value);
- image->field_cache = g_hash_table_new (NULL, NULL);
+ image->field_cache = mono_conc_hashtable_new (&image->lock, NULL, NULL);
image->typespec_cache = g_hash_table_new (NULL, NULL);
image->memberref_signatures = g_hash_table_new (NULL, NULL);
@@ -684,8 +687,6 @@ mono_image_init (MonoImage *image)
image->method_signatures = g_hash_table_new (NULL, NULL);
image->property_hash = mono_property_hash_new ();
- InitializeCriticalSection (&image->lock);
- InitializeCriticalSection (&image->szarray_cache_lock);
}
#if G_BYTE_ORDER != G_LITTLE_ENDIAN
@@ -1539,7 +1540,7 @@ mono_image_close_except_pools (MonoImage *image)
* assemblies, so we can't release these references in mono_assembly_close () since the
* MonoImage might outlive its associated MonoAssembly.
*/
- if (image->references && !image->dynamic) {
+ if (image->references && !image_is_dynamic (image)) {
for (i = 0; i < image->nreferences; i++) {
if (image->references [i] && image->references [i] != REFERENCE_MISSING) {
if (!mono_assembly_close_except_image_pools (image->references [i]))
@@ -1602,7 +1603,7 @@ mono_image_close_except_pools (MonoImage *image)
if (image->methodref_cache)
g_hash_table_destroy (image->methodref_cache);
mono_internal_hash_table_destroy (&image->class_cache);
- g_hash_table_destroy (image->field_cache);
+ mono_conc_hashtable_destroy (image->field_cache);
if (image->array_cache) {
g_hash_table_foreach (image->array_cache, free_array_cache_entry, NULL);
g_hash_table_destroy (image->array_cache);
@@ -1693,11 +1694,11 @@ mono_image_close_except_pools (MonoImage *image)
if (image->modules_loaded)
g_free (image->modules_loaded);
- DeleteCriticalSection (&image->szarray_cache_lock);
- DeleteCriticalSection (&image->lock);
+ mono_mutex_destroy (&image->szarray_cache_lock);
+ mono_mutex_destroy (&image->lock);
/*g_print ("destroy image %p (dynamic: %d)\n", image, image->dynamic);*/
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
/* Dynamic images are GC_MALLOCed */
g_free ((char*)image->module_name);
mono_dynamic_image_free ((MonoDynamicImage*)image);
@@ -1713,7 +1714,7 @@ mono_image_close_finish (MonoImage *image)
{
int i;
- if (image->references && !image->dynamic) {
+ if (image->references && !image_is_dynamic (image)) {
for (i = 0; i < image->nreferences; i++) {
if (image->references [i] && image->references [i] != REFERENCE_MISSING)
mono_assembly_close_finish (image->references [i]);
@@ -1734,7 +1735,7 @@ mono_image_close_finish (MonoImage *image)
mono_perfcounters->loader_bytes -= mono_mempool_get_allocated (image->mempool);
#endif
- if (!image->dynamic) {
+ if (!image_is_dynamic (image)) {
if (debug_assembly_unload)
mono_mempool_invalidate (image->mempool);
else {
@@ -2105,7 +2106,7 @@ mono_image_get_public_key (MonoImage *image, guint32 *size)
const char *pubkey;
guint32 len, tok;
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
if (size)
*size = ((MonoDynamicImage*)image)->public_key_len;
return (char*)((MonoDynamicImage*)image)->public_key;
@@ -2202,7 +2203,7 @@ mono_image_get_assembly (MonoImage *image)
gboolean
mono_image_is_dynamic (MonoImage *image)
{
- return image->dynamic;
+ return image_is_dynamic (image);
}
/**
@@ -2366,7 +2367,7 @@ void
mono_image_append_class_to_reflection_info_set (MonoClass *class)
{
MonoImage *image = class->image;
- g_assert (image->dynamic);
+ g_assert (image_is_dynamic (image));
mono_image_lock (image);
image->reflection_info_unregister_classes = g_slist_prepend_mempool (image->mempool, image->reflection_info_unregister_classes, class);
mono_image_unlock (image);
diff --git a/mono/metadata/loader.c b/mono/metadata/loader.c
index f950055953e..09ea19b3d79 100644
--- a/mono/metadata/loader.c
+++ b/mono/metadata/loader.c
@@ -55,7 +55,7 @@ MonoDefaults mono_defaults;
* See domain-internals.h for locking policy in combination with the
* domain lock.
*/
-static CRITICAL_SECTION loader_mutex;
+static mono_mutex_t loader_mutex;
static gboolean loader_lock_inited;
/* Statistics */
@@ -83,7 +83,7 @@ mono_loader_init ()
static gboolean inited;
if (!inited) {
- InitializeCriticalSection (&loader_mutex);
+ mono_mutex_init_recursive (&loader_mutex);
loader_lock_inited = TRUE;
mono_native_tls_alloc (&loader_error_thread_id, NULL);
@@ -110,7 +110,7 @@ mono_loader_cleanup (void)
mono_native_tls_free (loader_error_thread_id);
mono_native_tls_free (loader_lock_nest_id);
- DeleteCriticalSection (&loader_mutex);
+ mono_mutex_destroy (&loader_mutex);
loader_lock_inited = FALSE;
}
@@ -395,9 +395,9 @@ find_cached_memberref_sig (MonoImage *image, guint32 sig_idx)
{
gpointer res;
- mono_loader_lock ();
+ mono_image_lock (image);
res = g_hash_table_lookup (image->memberref_signatures, GUINT_TO_POINTER (sig_idx));
- mono_loader_unlock ();
+ mono_image_unlock (image);
return res;
}
@@ -407,7 +407,7 @@ cache_memberref_sig (MonoImage *image, guint32 sig_idx, gpointer sig)
{
gpointer prev_sig;
- mono_loader_lock ();
+ mono_image_lock (image);
prev_sig = g_hash_table_lookup (image->memberref_signatures, GUINT_TO_POINTER (sig_idx));
if (prev_sig) {
/* Somebody got in before us */
@@ -418,8 +418,7 @@ cache_memberref_sig (MonoImage *image, guint32 sig_idx, gpointer sig)
/* An approximation based on glib 2.18 */
memberref_sig_cache_size += sizeof (gpointer) * 4;
}
-
- mono_loader_unlock ();
+ mono_image_unlock (image);
return sig;
}
@@ -437,6 +436,7 @@ field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass,
const char *fname;
const char *ptr;
guint32 idx = mono_metadata_token_index (token);
+ MonoError error;
mono_metadata_decode_row (&tables [MONO_TABLE_MEMBERREF], idx-1, cols, MONO_MEMBERREF_SIZE);
nindex = cols [MONO_MEMBERREF_CLASS] >> MONO_MEMBERREF_PARENT_BITS;
@@ -452,15 +452,29 @@ field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass,
switch (class) {
case MONO_MEMBERREF_PARENT_TYPEDEF:
class_table = MONO_TOKEN_TYPE_DEF;
- klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | nindex);
+ klass = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | nindex, &error);
+ if (!mono_error_ok (&error)) {
+ /*FIXME don't swallow the error message*/
+ mono_error_cleanup (&error);
+ }
+
break;
case MONO_MEMBERREF_PARENT_TYPEREF:
class_table = MONO_TOKEN_TYPE_REF;
- klass = mono_class_from_typeref (image, MONO_TOKEN_TYPE_REF | nindex);
+ klass = mono_class_from_typeref_checked (image, MONO_TOKEN_TYPE_REF | nindex, &error);
+ if (!mono_error_ok (&error)) {
+ /*FIXME don't swallow the error message*/
+ mono_error_cleanup (&error);
+ }
+
break;
case MONO_MEMBERREF_PARENT_TYPESPEC:
class_table = MONO_TOKEN_TYPE_SPEC;
- klass = mono_class_get_full (image, MONO_TOKEN_TYPE_SPEC | nindex, context);
+ klass = mono_class_get_and_inflate_typespec_checked (image, MONO_TOKEN_TYPE_SPEC | nindex, context, &error);
+ if (!mono_error_ok (&error)) {
+ /*FIXME don't swallow the error message*/
+ mono_error_cleanup (&error);
+ }
break;
default:
/*FIXME this must set a loader error!*/
@@ -513,11 +527,12 @@ MonoClassField*
mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass,
MonoGenericContext *context)
{
+ MonoError error;
MonoClass *k;
guint32 type;
MonoClassField *field;
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
MonoClassField *result;
MonoClass *handle_class;
@@ -532,13 +547,10 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass,
return result;
}
- mono_image_lock (image);
- if ((field = g_hash_table_lookup (image->field_cache, GUINT_TO_POINTER (token)))) {
+ if ((field = mono_conc_hashtable_lookup (image->field_cache, GUINT_TO_POINTER (token)))) {
*retklass = field->parent;
- mono_image_unlock (image);
return field;
}
- mono_image_unlock (image);
if (mono_metadata_token_table (token) == MONO_TABLE_MEMBERREF)
field = field_from_memberref (image, token, retklass, context);
@@ -546,19 +558,21 @@ mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass,
type = mono_metadata_typedef_from_field (image, mono_metadata_token_index (token));
if (!type)
return NULL;
- k = mono_class_get (image, MONO_TOKEN_TYPE_DEF | type);
- if (!k)
+ k = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | type, &error);
+ if (!k) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow the error message*/
return NULL;
+ }
mono_class_init (k);
if (retklass)
*retklass = k;
field = mono_class_get_field (k, token);
}
- mono_image_lock (image);
if (field && field->parent && !field->parent->generic_class && !field->parent->generic_container)
- g_hash_table_insert (image->field_cache, GUINT_TO_POINTER (token), field);
- mono_image_unlock (image);
+ mono_conc_hashtable_insert (image->field_cache, GUINT_TO_POINTER (token), field);
+
return field;
}
@@ -596,7 +610,7 @@ find_method_in_class (MonoClass *klass, const char *name, const char *qname, con
/* Search directly in the metadata to avoid calling setup_methods () */
/* FIXME: !from_class->generic_class condition causes test failures. */
- if (klass->type_token && !klass->image->dynamic && !klass->methods && !klass->rank && klass == from_class && !from_class->generic_class) {
+ if (klass->type_token && !image_is_dynamic (klass->image) && !klass->methods && !klass->rank && klass == from_class && !from_class->generic_class) {
for (i = 0; i < klass->method.count; ++i) {
guint32 cols [MONO_METHOD_SIZE];
MonoMethod *method;
@@ -855,11 +869,9 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 to
if (method->klass->generic_class)
return mono_method_signature (method);
-#ifndef DISABLE_REFLECTION_EMIT
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
sig = mono_reflection_lookup_signature (image, method, token);
} else {
-#endif
mono_metadata_decode_row (&image->tables [MONO_TABLE_MEMBERREF], idx-1, cols, MONO_MEMBERREF_SIZE);
sig_idx = cols [MONO_MEMBERREF_SIGNATURE];
@@ -888,10 +900,7 @@ mono_method_get_signature_full (MonoMethod *method, MonoImage *image, guint32 to
mono_loader_set_error_bad_image (g_strdup_printf ("Incompatible method signature class token 0x%08x field name %s token 0x%08x on image %s", class, fname, token, image->name));
return NULL;
}
-#ifndef DISABLE_REFLECTION_EMIT
}
-#endif
-
if (context) {
MonoError error;
@@ -950,6 +959,7 @@ method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typesp
const char *mname;
MonoMethodSignature *sig;
const char *ptr;
+ MonoError error;
mono_metadata_decode_row (&tables [MONO_TABLE_MEMBERREF], idx-1, cols, 3);
nindex = cols [MONO_MEMBERREF_CLASS] >> MONO_MEMBERREF_PARENT_BITS;
@@ -969,12 +979,10 @@ method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typesp
switch (class) {
case MONO_MEMBERREF_PARENT_TYPEREF:
- klass = mono_class_from_typeref (image, MONO_TOKEN_TYPE_REF | nindex);
+ klass = mono_class_from_typeref_checked (image, MONO_TOKEN_TYPE_REF | nindex, &error);
if (!klass) {
- char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_REF | nindex);
- g_warning ("Missing method %s in assembly %s, type %s", mname, image->name, name);
- mono_loader_set_error_type_load (name, image->assembly_name);
- g_free (name);
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /* FIXME Don't swallow the error */
return NULL;
}
break;
@@ -982,22 +990,18 @@ method_from_memberref (MonoImage *image, guint32 idx, MonoGenericContext *typesp
/*
* Parse the TYPESPEC in the parent's context.
*/
- klass = mono_class_get_full (image, MONO_TOKEN_TYPE_SPEC | nindex, typespec_context);
+ klass = mono_class_get_and_inflate_typespec_checked (image, MONO_TOKEN_TYPE_SPEC | nindex, typespec_context, &error);
if (!klass) {
- char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_SPEC | nindex);
- g_warning ("Missing method %s in assembly %s, type %s", mname, image->name, name);
- mono_loader_set_error_type_load (name, image->assembly_name);
- g_free (name);
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow the error message*/
return NULL;
}
break;
case MONO_MEMBERREF_PARENT_TYPEDEF:
- klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | nindex);
+ klass = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | nindex, &error);
if (!klass) {
- char *name = mono_class_name_from_token (image, MONO_TOKEN_TYPE_DEF | nindex);
- g_warning ("Missing method %s in assembly %s, type %s", mname, image->name, name);
- mono_loader_set_error_type_load (name, image->assembly_name);
- g_free (name);
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow the error message*/
return NULL;
}
break;
@@ -1107,7 +1111,6 @@ method_from_methodspec (MonoImage *image, MonoGenericContext *context, guint32 i
mono_metadata_decode_value (ptr, &ptr);
ptr++;
param_count = mono_metadata_decode_value (ptr, &ptr);
- g_assert (param_count);
inst = mono_metadata_parse_generic_inst (image, NULL, param_count, ptr, &ptr);
if (!inst)
@@ -1240,27 +1243,29 @@ mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, cons
mono_loader_init ();
- mono_loader_lock ();
-
if (!assembly) {
entry = g_malloc0 (sizeof (MonoDllMap));
entry->dll = dll? g_strdup (dll): NULL;
entry->target = tdll? g_strdup (tdll): NULL;
entry->func = func? g_strdup (func): NULL;
entry->target_func = tfunc? g_strdup (tfunc): NULL;
+
+ mono_loader_lock ();
entry->next = global_dll_map;
global_dll_map = entry;
+ mono_loader_unlock ();
} else {
entry = mono_image_alloc0 (assembly, sizeof (MonoDllMap));
entry->dll = dll? mono_image_strdup (assembly, dll): NULL;
entry->target = tdll? mono_image_strdup (assembly, tdll): NULL;
entry->func = func? mono_image_strdup (assembly, func): NULL;
entry->target_func = tfunc? mono_image_strdup (assembly, tfunc): NULL;
+
+ mono_image_lock (assembly);
entry->next = assembly->dll_map;
assembly->dll_map = entry;
+ mono_image_unlock (assembly);
}
-
- mono_loader_unlock ();
}
static void
@@ -1351,7 +1356,7 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
if (piinfo->addr)
return piinfo->addr;
- if (method->klass->image->dynamic) {
+ if (image_is_dynamic (method->klass->image)) {
MonoReflectionMethodAux *method_aux =
g_hash_table_lookup (
((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -1379,14 +1384,14 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
mono_dllmap_lookup (image, orig_scope, import, &new_scope, &import);
if (!module) {
- mono_loader_lock ();
+ mono_image_lock (image);
if (!image->pinvoke_scopes) {
image->pinvoke_scopes = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
image->pinvoke_scope_filenames = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
}
module = g_hash_table_lookup (image->pinvoke_scopes, new_scope);
found_name = g_hash_table_lookup (image->pinvoke_scope_filenames, new_scope);
- mono_loader_unlock ();
+ mono_image_unlock (image);
if (module)
cached = TRUE;
if (found_name)
@@ -1552,12 +1557,12 @@ mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char
if (!cached) {
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
"DllImport loaded library '%s'.", found_name);
- mono_loader_lock ();
+ mono_image_lock (image);
if (!g_hash_table_lookup (image->pinvoke_scopes, new_scope)) {
g_hash_table_insert (image->pinvoke_scopes, g_strdup (new_scope), module);
g_hash_table_insert (image->pinvoke_scope_filenames, g_strdup (new_scope), g_strdup (found_name));
}
- mono_loader_unlock ();
+ mono_image_unlock (image);
}
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_DLLIMPORT,
@@ -1686,6 +1691,7 @@ static MonoMethod *
mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
MonoGenericContext *context, gboolean *used_context)
{
+ MonoError error;
MonoMethod *result;
int table = mono_metadata_token_table (token);
int idx = mono_metadata_token_index (token);
@@ -1695,7 +1701,7 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
int size;
guint32 cols [MONO_TYPEDEF_SIZE];
- if (image->dynamic) {
+ if (image_is_dynamic (image)) {
MonoClass *handle_class;
result = mono_lookup_dynamic_token_class (image, token, TRUE, &handle_class, context);
@@ -1727,6 +1733,18 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
return NULL;
}
+ if (!klass) {
+ guint32 type = mono_metadata_typedef_from_method (image, token);
+ if (!type)
+ return NULL;
+ klass = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF | type, &error);
+ if (klass == NULL) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow the error message*/
+ return NULL;
+ }
+ }
+
mono_metadata_decode_row (&image->tables [MONO_TABLE_METHOD], idx - 1, cols, 6);
if ((cols [2] & METHOD_ATTRIBUTE_PINVOKE_IMPL) ||
@@ -1739,15 +1757,6 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
mono_stats.method_count ++;
- if (!klass) { /*FIXME put this before the image alloc*/
- guint32 type = mono_metadata_typedef_from_method (image, token);
- if (!type)
- return NULL;
- klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF | type);
- if (klass == NULL)
- return NULL;
- }
-
result->slot = -1;
result->klass = klass;
result->flags = cols [2];
@@ -1768,11 +1777,15 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
if (*sig & 0x10)
generic_container = mono_metadata_load_generic_params (image, token, container);
if (generic_container) {
+ MonoError error;
result->is_generic = TRUE;
generic_container->owner.method = result;
/*FIXME put this before the image alloc*/
- if (!mono_metadata_load_generic_param_constraints_full (image, token, generic_container))
+ if (!mono_metadata_load_generic_param_constraints_checked (image, token, generic_container, &error)) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow the error message*/
return NULL;
+ }
container = generic_container;
}
@@ -1823,7 +1836,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
if (!image->method_cache)
image->method_cache = g_hash_table_new (NULL, NULL);
result = g_hash_table_lookup (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token)));
- } else if (!image->dynamic) {
+ } else if (!image_is_dynamic (image)) {
if (!image->methodref_cache)
image->methodref_cache = g_hash_table_new (NULL, NULL);
result = g_hash_table_lookup (image->methodref_cache, GINT_TO_POINTER (token));
@@ -1844,7 +1857,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
if (mono_metadata_token_table (token) == MONO_TABLE_METHOD)
result2 = g_hash_table_lookup (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token)));
- else if (!image->dynamic)
+ else if (!image_is_dynamic (image))
result2 = g_hash_table_lookup (image->methodref_cache, GINT_TO_POINTER (token));
if (result2) {
@@ -1854,7 +1867,7 @@ mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
if (mono_metadata_token_table (token) == MONO_TABLE_METHOD)
g_hash_table_insert (image->method_cache, GINT_TO_POINTER (mono_metadata_token_index (token)), result);
- else if (!image->dynamic)
+ else if (!image_is_dynamic (image))
g_hash_table_insert (image->methodref_cache, GINT_TO_POINTER (token), result);
}
@@ -1927,17 +1940,11 @@ MonoMethod *
mono_get_method_constrained_with_method (MonoImage *image, MonoMethod *method, MonoClass *constrained_class,
MonoGenericContext *context)
{
- MonoMethod *result;
-
g_assert (method);
- mono_loader_lock ();
-
- result = get_method_constrained (image, method, constrained_class, context);
-
- mono_loader_unlock ();
- return result;
+ return get_method_constrained (image, method, constrained_class, context);
}
+
/**
* mono_get_method_constrained:
*
@@ -1953,17 +1960,12 @@ mono_get_method_constrained (MonoImage *image, guint32 token, MonoClass *constra
{
MonoMethod *result;
- mono_loader_lock ();
-
*cil_method = mono_get_method_from_token (image, token, NULL, context, NULL);
- if (!*cil_method) {
- mono_loader_unlock ();
+ if (!*cil_method)
return NULL;
- }
result = get_method_constrained (image, *cil_method, constrained_class, context);
- mono_loader_unlock ();
return result;
}
@@ -1986,7 +1988,7 @@ mono_free_method (MonoMethod *method)
/* g_free (method->signature); */
}
- if (method->dynamic) {
+ if (method_is_dynamic (method)) {
MonoMethodWrapper *mw = (MonoMethodWrapper*)method;
int i;
@@ -2039,7 +2041,7 @@ mono_method_get_param_names (MonoMethod *method, const char **names)
mono_class_init (klass);
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
MonoReflectionMethodAux *method_aux =
g_hash_table_lookup (
((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2096,9 +2098,8 @@ mono_method_get_param_token (MonoMethod *method, int index)
mono_class_init (klass);
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image))
g_assert_not_reached ();
- }
methodt = &klass->image->tables [MONO_TABLE_METHOD];
idx = mono_method_get_index (method);
@@ -2131,7 +2132,7 @@ mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs)
for (i = 0; i < signature->param_count + 1; ++i)
mspecs [i] = NULL;
- if (method->klass->image->dynamic) {
+ if (image_is_dynamic (method->klass->image)) {
MonoReflectionMethodAux *method_aux =
g_hash_table_lookup (
((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2186,7 +2187,7 @@ mono_method_has_marshal_info (MonoMethod *method)
MonoTableInfo *paramt;
guint32 idx;
- if (method->klass->image->dynamic) {
+ if (image_is_dynamic (method->klass->image)) {
MonoReflectionMethodAux *method_aux =
g_hash_table_lookup (
((MonoDynamicImage*)method->klass->image)->method_aux_hash, method);
@@ -2381,7 +2382,7 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
const char *sig;
gboolean can_cache_signature;
MonoGenericContainer *container;
- MonoMethodSignature *signature = NULL;
+ MonoMethodSignature *signature = NULL, *sig2;
guint32 sig_offset;
/* We need memory barriers below because of the double-checked locking pattern */
@@ -2391,34 +2392,31 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
if (m->signature)
return m->signature;
- mono_loader_lock ();
-
- if (m->signature) {
- mono_loader_unlock ();
- return m->signature;
- }
+ img = m->klass->image;
if (m->is_inflated) {
MonoMethodInflated *imethod = (MonoMethodInflated *) m;
/* the lock is recursive */
signature = mono_method_signature (imethod->declaring);
signature = inflate_generic_signature_checked (imethod->declaring->klass->image, signature, mono_method_get_context (m), error);
- if (!mono_error_ok (error)) {
- mono_loader_unlock ();
+ if (!mono_error_ok (error))
return NULL;
- }
inflated_signatures_size += mono_metadata_signature_size (signature);
+ mono_image_lock (img);
+
mono_memory_barrier ();
- m->signature = signature;
- mono_loader_unlock ();
+ if (!m->signature)
+ m->signature = signature;
+
+ mono_image_unlock (img);
+
return m->signature;
}
g_assert (mono_metadata_token_table (m->token) == MONO_TABLE_METHOD);
idx = mono_metadata_token_index (m->token);
- img = m->klass->image;
sig = mono_metadata_blob_heap (img, sig_offset = mono_metadata_decode_row_col (&img->tables [MONO_TABLE_METHOD], idx - 1, MONO_METHOD_SIGNATURE));
@@ -2435,28 +2433,33 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
if (mono_metadata_method_has_param_attrs (img, idx))
can_cache_signature = FALSE;
- if (can_cache_signature)
+ if (can_cache_signature) {
+ mono_image_lock (img);
signature = g_hash_table_lookup (img->method_signatures, sig);
+ mono_image_unlock (img);
+ }
if (!signature) {
const char *sig_body;
/*TODO we should cache the failure result somewhere*/
- if (!mono_verifier_verify_method_signature (img, sig_offset, error)) {
- mono_loader_unlock ();
+ if (!mono_verifier_verify_method_signature (img, sig_offset, error))
return NULL;
- }
size = mono_metadata_decode_blob_size (sig, &sig_body);
signature = mono_metadata_parse_method_signature_full (img, container, idx, sig_body, NULL);
if (!signature) {
mono_error_set_from_loader_error (error);
- mono_loader_unlock ();
return NULL;
}
- if (can_cache_signature)
- g_hash_table_insert (img->method_signatures, (gpointer)sig, signature);
+ if (can_cache_signature) {
+ mono_image_lock (img);
+ sig2 = g_hash_table_lookup (img->method_signatures, sig);
+ if (!sig2)
+ g_hash_table_insert (img->method_signatures, (gpointer)sig, signature);
+ mono_image_unlock (img);
+ }
signatures_size += mono_metadata_signature_size (signature);
}
@@ -2464,17 +2467,14 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
/* Verify metadata consistency */
if (signature->generic_param_count) {
if (!container || !container->is_method) {
- mono_loader_unlock ();
mono_error_set_method_load (error, m->klass, m->name, "Signature claims method has generic parameters, but generic_params table says it doesn't for method 0x%08x from image %s", idx, img->name);
return NULL;
}
if (container->type_argc != signature->generic_param_count) {
- mono_loader_unlock ();
mono_error_set_method_load (error, m->klass, m->name, "Inconsistent generic parameter count. Signature says %d, generic_params table says %d for method 0x%08x from image %s", signature->generic_param_count, container->type_argc, idx, img->name);
return NULL;
}
} else if (container && container->is_method && container->type_argc) {
- mono_loader_unlock ();
mono_error_set_method_load (error, m->klass, m->name, "generic_params table claims method has generic parameters, but signature says it doesn't for method 0x%08x from image %s", idx, img->name);
return NULL;
}
@@ -2505,17 +2505,20 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
case PINVOKE_ATTRIBUTE_CALL_CONV_GENERIC:
case PINVOKE_ATTRIBUTE_CALL_CONV_GENERICINST:
default:
- mono_loader_unlock ();
mono_error_set_method_load (error, m->klass, m->name, "unsupported calling convention : 0x%04x for method 0x%08x from image %s", piinfo->piflags, idx, img->name);
return NULL;
}
signature->call_convention = conv;
}
+ mono_image_lock (img);
+
mono_memory_barrier ();
- m->signature = signature;
+ if (!m->signature)
+ m->signature = signature;
+
+ mono_image_unlock (img);
- mono_loader_unlock ();
return m->signature;
}
@@ -2567,30 +2570,37 @@ mono_method_get_header (MonoMethod *method)
MonoImage* img;
gpointer loc;
MonoMethodHeader *header;
+ MonoGenericContainer *container;
if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) || (method->iflags & METHOD_IMPL_ATTRIBUTE_RUNTIME) || (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL) || (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL))
return NULL;
+ img = method->klass->image;
+
if (method->is_inflated) {
MonoMethodInflated *imethod = (MonoMethodInflated *) method;
- MonoMethodHeader *header;
+ MonoMethodHeader *header, *iheader;
- mono_loader_lock ();
+ header = mono_method_get_header (imethod->declaring);
+ if (!header)
+ return NULL;
+
+ iheader = inflate_generic_header (header, mono_method_get_context (method));
+ mono_metadata_free_mh (header);
+
+ mono_image_lock (img);
if (imethod->header) {
- mono_loader_unlock ();
+ mono_metadata_free_mh (iheader);
+ mono_image_unlock (img);
return imethod->header;
}
- header = mono_method_get_header (imethod->declaring);
- if (!header) {
- mono_loader_unlock ();
- return NULL;
- }
+ mono_memory_barrier ();
+ imethod->header = iheader;
+
+ mono_image_unlock (img);
- imethod->header = inflate_generic_header (header, mono_method_get_context (method));
- mono_loader_unlock ();
- mono_metadata_free_mh (header);
return imethod->header;
}
@@ -2606,7 +2616,6 @@ mono_method_get_header (MonoMethod *method)
*/
g_assert (mono_metadata_token_table (method->token) == MONO_TABLE_METHOD);
idx = mono_metadata_token_index (method->token);
- img = method->klass->image;
rva = mono_metadata_decode_row_col (&img->tables [MONO_TABLE_METHOD], idx - 1, MONO_METHOD_RVA);
if (!mono_verifier_verify_method_header (img, rva, NULL))
@@ -2616,7 +2625,14 @@ mono_method_get_header (MonoMethod *method)
if (!loc)
return NULL;
- header = mono_metadata_parse_mh_full (img, mono_method_get_generic_container (method), loc);
+ /*
+ * When parsing the types of local variables, we must pass any container available
+ * to ensure that both VAR and MVAR will get the right owner.
+ */
+ container = mono_method_get_generic_container (method);
+ if (!container)
+ container = method->klass->generic_container;
+ header = mono_metadata_parse_mh_full (img, container, loc);
return header;
}
@@ -2633,7 +2649,8 @@ mono_method_get_flags (MonoMethod *method, guint32 *iflags)
* Find the method index in the metadata methodDef table.
*/
guint32
-mono_method_get_index (MonoMethod *method) {
+mono_method_get_index (MonoMethod *method)
+{
MonoClass *klass = method->klass;
int i;
@@ -2657,4 +2674,3 @@ mono_method_get_index (MonoMethod *method) {
}
return 0;
}
-
diff --git a/mono/metadata/lock-tracer.c b/mono/metadata/lock-tracer.c
index 0f04817ced9..959dd36aa3c 100644
--- a/mono/metadata/lock-tracer.c
+++ b/mono/metadata/lock-tracer.c
@@ -31,8 +31,8 @@
*
* To log more kind of locks just do the following:
* - add an entry into the RuntimeLocks enum
- * - change EnterCriticalSection(mutex) to mono_locks_acquire (mutex, LockName)
- * - change LeaveCriticalSection to mono_locks_release (mutex, LockName)
+ * - change mono_mutex_lock(mutex) to mono_locks_acquire (mutex, LockName)
+ * - change mono_mutex_unlock to mono_locks_release (mutex, LockName)
* - change the decoder to understand the new lock kind.
*
* TODO:
@@ -54,7 +54,7 @@
#endif
static FILE *trace_file;
-static CRITICAL_SECTION tracer_lock;
+static mono_mutex_t tracer_lock;
static size_t base_address;
typedef enum {
@@ -71,7 +71,7 @@ mono_locks_tracer_init (void)
Dl_info info;
int res;
char *name;
- InitializeCriticalSection (&tracer_lock);
+ mono_mutex_init_recursive (&tracer_lock);
if (!g_getenv ("MONO_ENABLE_LOCK_TRACER"))
return;
name = g_strdup_printf ("locks.%d", getpid ());
diff --git a/mono/metadata/lock-tracer.h b/mono/metadata/lock-tracer.h
index 215b683ba4b..4069e97173f 100644
--- a/mono/metadata/lock-tracer.h
+++ b/mono/metadata/lock-tracer.h
@@ -37,13 +37,13 @@ void mono_locks_lock_released (RuntimeLocks kind, gpointer lock) MONO_INTERNAL;
#endif
#define mono_locks_acquire(LOCK, NAME) do { \
- EnterCriticalSection (LOCK); \
+ mono_mutex_lock (LOCK); \
mono_locks_lock_acquired (NAME, LOCK); \
} while (0)
#define mono_locks_release(LOCK, NAME) do { \
mono_locks_lock_released (NAME, LOCK); \
- LeaveCriticalSection (LOCK); \
+ mono_mutex_unlock (LOCK); \
} while (0)
#define mono_locks_mutex_acquire(LOCK, NAME) do { \
diff --git a/mono/metadata/marshal.c b/mono/metadata/marshal.c
index 0271adff53a..0c8fe33f219 100644
--- a/mono/metadata/marshal.c
+++ b/mono/metadata/marshal.c
@@ -23,6 +23,7 @@
#include "metadata/tabledefs.h"
#include "metadata/exception.h"
#include "metadata/appdomain.h"
+#include "mono/metadata/abi-details.h"
#include "mono/metadata/debug-helpers.h"
#include "mono/metadata/threadpool.h"
#include "mono/metadata/threads.h"
@@ -79,7 +80,7 @@ typedef struct _MonoRemotingMethods MonoRemotingMethods;
*/
#define mono_marshal_lock() mono_locks_acquire (&marshal_mutex, MarshalLock)
#define mono_marshal_unlock() mono_locks_release (&marshal_mutex, MarshalLock)
-static CRITICAL_SECTION marshal_mutex;
+static mono_mutex_t marshal_mutex;
static gboolean marshal_mutex_initialized;
static MonoNativeTlsKey last_error_tls_id;
@@ -229,7 +230,7 @@ mono_marshal_init (void)
if (!module_initialized) {
module_initialized = TRUE;
- InitializeCriticalSection (&marshal_mutex);
+ mono_mutex_init_recursive (&marshal_mutex);
marshal_mutex_initialized = TRUE;
register_icall (ves_icall_System_Threading_Thread_ResetAbort, "ves_icall_System_Threading_Thread_ResetAbort", "void", TRUE);
@@ -299,7 +300,7 @@ mono_marshal_cleanup (void)
mono_native_tls_free (load_type_info_tls_id);
mono_native_tls_free (last_error_tls_id);
- DeleteCriticalSection (&marshal_mutex);
+ mono_mutex_destroy (&marshal_mutex);
marshal_mutex_initialized = FALSE;
}
@@ -1086,9 +1087,9 @@ static int
mono_mb_emit_proxy_check (MonoMethodBuilder *mb, int branch_code)
{
int pos;
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
@@ -1102,9 +1103,9 @@ static int
mono_mb_emit_xdomain_check (MonoMethodBuilder *mb, int branch_code)
{
int pos;
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_icon (mb, -1);
pos = mono_mb_emit_branch (mb, branch_code);
@@ -1120,9 +1121,9 @@ mono_mb_emit_contextbound_check (MonoMethodBuilder *mb, int branch_code)
if (offset < 0)
mono_marshal_find_bitfield_offset (MonoClass, contextbound, &offset, &mask);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_ldflda (mb, offset);
mono_mb_emit_byte (mb, CEE_LDIND_U1);
@@ -1317,7 +1318,7 @@ emit_ptr_to_object_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
/* copy the elements */
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArray, vector));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_ldloc (mb, 0);
mono_mb_emit_icon (mb, mspec->data.array_data.num_elem * esize);
@@ -1703,7 +1704,7 @@ emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_ldloc (mb, 0);
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, vector));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
mono_mb_emit_icon (mb, mspec->data.array_data.num_elem * esize);
mono_mb_emit_byte (mb, CEE_PREFIX1);
mono_mb_emit_byte (mb, CEE_CPBLK);
@@ -1858,7 +1859,7 @@ emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_ldloc (mb, 0);
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_byte (mb, CEE_STIND_I);
break;
@@ -1867,7 +1868,7 @@ emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
case MONO_MARSHAL_CONV_HANDLEREF: {
mono_mb_emit_ldloc (mb, 1);
mono_mb_emit_ldloc (mb, 0);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoHandleRef, handle));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_byte (mb, CEE_STIND_I);
@@ -2507,11 +2508,28 @@ mono_marshal_find_in_cache (GHashTable *cache, gpointer key)
return res;
}
+/*
+ * mono_mb_create:
+ *
+ * Create a MonoMethod from MB, set INFO as wrapper info.
+ */
+static MonoMethod*
+mono_mb_create (MonoMethodBuilder *mb, MonoMethodSignature *sig,
+ int max_stack, WrapperInfo *info)
+{
+ MonoMethod *res;
+
+ res = mono_mb_create_method (mb, sig, max_stack);
+ if (info)
+ mono_marshal_set_wrapper_info (res, info);
+ return res;
+}
+
/* Create the method from the builder and place it in the cache */
static MonoMethod*
mono_mb_create_and_cache_full (GHashTable *cache, gpointer key,
MonoMethodBuilder *mb, MonoMethodSignature *sig,
- int max_stack, gboolean *out_found)
+ int max_stack, WrapperInfo *info, gboolean *out_found)
{
MonoMethod *res;
@@ -2529,7 +2547,10 @@ mono_mb_create_and_cache_full (GHashTable *cache, gpointer key,
if (!res) {
res = newm;
g_hash_table_insert (cache, key, res);
- mono_marshal_set_wrapper_info (res, key);
+ if (info)
+ mono_marshal_set_wrapper_info (res, info);
+ else
+ mono_marshal_set_wrapper_info (res, key);
mono_marshal_unlock ();
} else {
if (out_found)
@@ -2547,7 +2568,7 @@ mono_mb_create_and_cache (GHashTable *cache, gpointer key,
MonoMethodBuilder *mb, MonoMethodSignature *sig,
int max_stack)
{
- return mono_mb_create_and_cache_full (cache, key, mb, sig, max_stack, NULL);
+ return mono_mb_create_and_cache_full (cache, key, mb, sig, max_stack, NULL, NULL);
}
static inline MonoMethod*
@@ -2701,11 +2722,11 @@ mono_marshal_set_wrapper_info (MonoMethod *method, gpointer data)
}
static WrapperInfo*
-mono_wrapper_info_create (MonoMethod *wrapper, WrapperSubtype subtype)
+mono_wrapper_info_create (MonoMethodBuilder *mb, WrapperSubtype subtype)
{
WrapperInfo *info;
- info = mono_image_alloc0 (wrapper->klass->image, sizeof (WrapperInfo));
+ info = mono_image_alloc0 (mb->method->klass->image, sizeof (WrapperInfo));
info->subtype = subtype;
return info;
}
@@ -2718,6 +2739,7 @@ mono_wrapper_info_create (MonoMethod *wrapper, WrapperSubtype subtype)
static MonoClass*
get_wrapper_target_class (MonoImage *image)
{
+ MonoError error;
MonoClass *klass;
/*
@@ -2733,10 +2755,12 @@ get_wrapper_target_class (MonoImage *image)
* To avoid these problems, we put the wrappers into the <Module> class of
* the image.
*/
- if (image->dynamic)
+ if (image_is_dynamic (image)) {
klass = ((MonoDynamicImage*)image)->wrappers_type;
- else
- klass = mono_class_get (image, mono_metadata_make_token (MONO_TABLE_TYPEDEF, 1));
+ } else {
+ klass = mono_class_get_checked (image, mono_metadata_make_token (MONO_TABLE_TYPEDEF, 1), &error);
+ g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
+ }
g_assert (klass);
return klass;
@@ -3867,12 +3891,12 @@ mono_marshal_get_xappdomain_invoke (MonoMethod *method)
/* Get the target domain id */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_byte (mb, CEE_DUP);
mono_mb_emit_stloc (mb, loc_real_proxy);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, target_domain_id));
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_stloc (mb, loc_domainid);
@@ -4370,7 +4394,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
/* get this->prev */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoMulticastDelegate, prev));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoMulticastDelegate, prev));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_stloc (mb, local_prev);
mono_mb_emit_ldloc (mb, local_prev);
@@ -4398,7 +4422,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
/* get this->target */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoDelegate, target));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoDelegate, target));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_stloc (mb, local_target);
@@ -4417,7 +4441,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
for (i = 0; i < sig->param_count; ++i)
mono_mb_emit_ldarg (mb, i + 1);
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
mono_mb_emit_byte (mb, CEE_LDIND_I );
mono_mb_emit_op (mb, CEE_CALLI, sig);
@@ -4450,7 +4474,7 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
for (i = 0; i < sig->param_count; ++i)
mono_mb_emit_ldarg (mb, i + 1);
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
mono_mb_emit_byte (mb, CEE_LDIND_I );
mono_mb_emit_op (mb, CEE_CALLI, invoke_sig);
}
@@ -4469,16 +4493,15 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
new_key = g_new0 (SignatureMethodPair, 1);
*new_key = key;
- res = mono_mb_create_and_cache_full (cache, new_key, mb, sig, sig->param_count + 16, &found);
+ info = mono_wrapper_info_create (mb, subtype);
+
+ res = mono_mb_create_and_cache_full (cache, new_key, mb, sig, sig->param_count + 16, info, &found);
if (found)
g_free (new_key);
- info = mono_wrapper_info_create (res, subtype);
- mono_marshal_set_wrapper_info (res, info);
} else {
- res = mono_mb_create_and_cache (cache, cache_key, mb, sig, sig->param_count + 16);
+ info = mono_wrapper_info_create (mb, subtype);
- info = mono_wrapper_info_create (res, subtype);
- mono_marshal_set_wrapper_info (res, info);
+ res = mono_mb_create_and_cache_full (cache, cache_key, mb, sig, sig->param_count + 16, info, NULL);
}
mono_mb_free (mb);
@@ -4657,6 +4680,7 @@ mono_marshal_get_runtime_invoke_sig (MonoMethodSignature *sig)
MonoMethodSignature *res = mono_metadata_signature_dup (sig);
int i;
+ res->generic_param_count = 0;
res->ret = get_runtime_invoke_type (sig->ret, TRUE);
for (i = 0; i < res->param_count; ++i)
res->params [i] = get_runtime_invoke_type (sig->params [i], FALSE);
@@ -5025,7 +5049,7 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
/* Can't share this as we push a string as this */
need_direct_wrapper = TRUE;
} else {
- if (method->dynamic)
+ if (method_is_dynamic (method))
callsig = signature_dup (method->klass->image, mono_method_signature (method));
else
callsig = mono_method_signature (method);
@@ -5111,20 +5135,22 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
#ifndef DISABLE_JIT
mb->skip_visibility = 1;
#endif
- res = mono_mb_create_and_cache (cache, method, mb, csig, sig->param_count + 16);
- info = mono_wrapper_info_create (res, virtual ? WRAPPER_SUBTYPE_RUNTIME_INVOKE_VIRTUAL : WRAPPER_SUBTYPE_RUNTIME_INVOKE_DIRECT);
+ info = mono_wrapper_info_create (mb, virtual ? WRAPPER_SUBTYPE_RUNTIME_INVOKE_VIRTUAL : WRAPPER_SUBTYPE_RUNTIME_INVOKE_DIRECT);
info->d.runtime_invoke.method = method;
- mono_marshal_set_wrapper_info (res, info);
+ res = mono_mb_create_and_cache_full (cache, method, mb, csig, sig->param_count + 16, info, NULL);
} else {
/* taken from mono_mb_create_and_cache */
mono_marshal_lock ();
res = g_hash_table_lookup (cache, callsig);
mono_marshal_unlock ();
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_RUNTIME_INVOKE_NORMAL);
+ info->d.runtime_invoke.sig = callsig;
+
/* Somebody may have created it before us */
if (!res) {
MonoMethod *newm;
- newm = mono_mb_create_method (mb, csig, sig->param_count + 16);
+ newm = mono_mb_create (mb, csig, sig->param_count + 16, info);
mono_marshal_lock ();
res = g_hash_table_lookup (cache, callsig);
@@ -5133,9 +5159,6 @@ mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual)
g_hash_table_insert (cache, callsig, res);
/* Can't insert it into wrapper_hash since the key is a signature */
g_hash_table_insert (method->klass->image->runtime_invoke_direct_cache, method, res);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_RUNTIME_INVOKE_NORMAL);
- info->d.runtime_invoke.sig = callsig;
- mono_marshal_set_wrapper_info (res, info);
} else {
mono_free_method (newm);
}
@@ -5263,13 +5286,13 @@ mono_marshal_get_runtime_invoke_dynamic (void)
mono_mb_emit_byte (mb, CEE_RET);
#endif /* DISABLE_JIT */
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_RUNTIME_INVOKE_DYNAMIC);
+
mono_marshal_lock ();
/* double-checked locking */
- if (!method) {
- method = mono_mb_create_method (mb, csig, 16);
- info = mono_wrapper_info_create (method, WRAPPER_SUBTYPE_RUNTIME_INVOKE_DYNAMIC);
- mono_marshal_set_wrapper_info (method, info);
- }
+ if (!method)
+ method = mono_mb_create (mb, csig, 16, info);
+
mono_marshal_unlock ();
mono_mb_free (mb);
@@ -5346,7 +5369,7 @@ mono_marshal_get_ldfld_remote_wrapper (MonoClass *klass)
mono_marshal_unlock ();
if (!res) {
MonoMethod *newm;
- newm = mono_mb_create_method (mb, sig, 4);
+ newm = mono_mb_create (mb, sig, 4, NULL);
mono_marshal_lock ();
res = cached;
if (!res) {
@@ -5379,6 +5402,7 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
MonoMethod *res;
MonoClass *klass;
GHashTable *cache;
+ WrapperInfo *info;
char *name;
int t, pos0, pos1 = 0;
@@ -5511,8 +5535,10 @@ mono_marshal_get_ldfld_wrapper (MonoType *type)
mono_mb_emit_byte (mb, CEE_RET);
#endif /* DISABLE_JIT */
- res = mono_mb_create_and_cache (cache, klass,
- mb, sig, sig->param_count + 16);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ info->d.proxy.klass = klass;
+ res = mono_mb_create_and_cache_full (cache, klass,
+ mb, sig, sig->param_count + 16, info, NULL);
mono_mb_free (mb);
return res;
@@ -5534,6 +5560,7 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
MonoMethod *res;
MonoClass *klass;
GHashTable *cache;
+ WrapperInfo *info;
char *name;
int t, pos0, pos1, pos2, pos3;
@@ -5598,9 +5625,9 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
/* if this->rp->context == mono_context_get goto pos3 */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, context));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, context));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_icall (mb, mono_context_get);
pos3 = mono_mb_emit_branch (mb, CEE_BEQ);
@@ -5612,9 +5639,9 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
/* return the address of the field from this->rp->unwrapped_server */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoRealProxy, unwrapped_server));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoRealProxy, unwrapped_server));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_OBJADDR);
@@ -5634,8 +5661,11 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
mono_mb_emit_byte (mb, CEE_RET);
#endif
- res = mono_mb_create_and_cache (cache, klass,
- mb, sig, sig->param_count + 16);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ info->d.proxy.klass = klass;
+ res = mono_mb_create_and_cache_full (cache, klass,
+ mb, sig, sig->param_count + 16,
+ info, NULL);
mono_mb_free (mb);
return res;
@@ -5701,7 +5731,7 @@ mono_marshal_get_stfld_remote_wrapper (MonoClass *klass)
mono_marshal_unlock ();
if (!res) {
MonoMethod *newm;
- newm = mono_mb_create_method (mb, sig, 6);
+ newm = mono_mb_create (mb, sig, 6, NULL);
mono_marshal_lock ();
res = cached;
if (!res) {
@@ -5734,6 +5764,7 @@ mono_marshal_get_stfld_wrapper (MonoType *type)
MonoMethod *res;
MonoClass *klass;
GHashTable *cache;
+ WrapperInfo *info;
char *name;
int t, pos;
@@ -5843,8 +5874,11 @@ mono_marshal_get_stfld_wrapper (MonoType *type)
mono_mb_emit_byte (mb, CEE_RET);
#endif
- res = mono_mb_create_and_cache (cache, klass,
- mb, sig, sig->param_count + 16);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ info->d.proxy.klass = klass;
+ res = mono_mb_create_and_cache_full (cache, klass,
+ mb, sig, sig->param_count + 16,
+ info, NULL);
mono_mb_free (mb);
return res;
@@ -5897,13 +5931,11 @@ mono_marshal_get_icall_wrapper (MonoMethodSignature *sig, const char *name, gcon
if (csig->call_convention == MONO_CALL_VARARG)
csig->call_convention = 0;
- res = mono_mb_create_method (mb, csig, csig->param_count + 16);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_ICALL_WRAPPER);
+ info->d.icall.func = (gpointer)func;
+ res = mono_mb_create (mb, csig, csig->param_count + 16, info);
mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_ICALL_WRAPPER);
- info->d.icall.func = (gpointer)func;
- mono_marshal_set_wrapper_info (res, info);
-
return res;
}
@@ -6784,7 +6816,7 @@ emit_marshal_safehandle (EmitMarshalContext *m, int argnum, MonoType *t,
/* Pull the handle field from SafeHandle */
mono_mb_emit_ldarg (mb, argnum);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, conv_arg);
@@ -6831,7 +6863,7 @@ emit_marshal_safehandle (EmitMarshalContext *m, int argnum, MonoType *t,
/* refval.handle = returned_handle */
mono_mb_emit_ldarg (mb, argnum);
mono_mb_emit_byte (mb, CEE_LDIND_REF);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
mono_mb_emit_ldloc (mb, conv_arg);
mono_mb_emit_byte (mb, CEE_STIND_I);
} else {
@@ -6870,7 +6902,7 @@ emit_marshal_safehandle (EmitMarshalContext *m, int argnum, MonoType *t,
/* Set the return.handle to the value, am using ldflda, not sure if thats a good idea */
mono_mb_emit_ldloc (mb, 3);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoSafeHandle, handle));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoSafeHandle, handle));
mono_mb_emit_ldloc (mb, intptr_handle_slot);
mono_mb_emit_byte (mb, CEE_STIND_I);
break;
@@ -6920,7 +6952,7 @@ emit_marshal_handleref (EmitMarshalContext *m, int argnum, MonoType *t,
break;
}
mono_mb_emit_ldarg_addr (mb, argnum);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoHandleRef, handle));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoHandleRef, handle));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, conv_arg);
@@ -8005,7 +8037,7 @@ emit_marshal_array (EmitMarshalContext *m, int argnum, MonoType *t,
if (eklass->blittable) {
mono_mb_emit_ldloc (mb, conv_arg);
mono_mb_emit_byte (mb, CEE_CONV_I);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArray, vector));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_ldarg (mb, argnum);
mono_mb_emit_ldloc (mb, conv_arg);
@@ -8122,7 +8154,7 @@ emit_marshal_array (EmitMarshalContext *m, int argnum, MonoType *t,
/* src */
mono_mb_emit_ldloc (mb, conv_arg);
mono_mb_emit_byte (mb, CEE_CONV_I);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArray, vector));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
mono_mb_emit_byte (mb, CEE_ADD);
/* length */
mono_mb_emit_ldloc (mb, conv_arg);
@@ -8978,16 +9010,13 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
mono_mb_emit_byte (mb, CEE_RET);
#endif
- /* use native_wrapper_cache because internal calls are looked up there */
- res = mono_mb_create_and_cache (cache, method,
- mb, csig, csig->param_count + 1);
-
- mono_mb_free (mb);
-
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_STRING_CTOR);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_STRING_CTOR);
info->d.string_ctor.method = method;
- mono_marshal_set_wrapper_info (res, info);
+ /* use native_wrapper_cache because internal calls are looked up there */
+ res = mono_mb_create_and_cache_full (cache, method, mb, csig,
+ csig->param_count + 1, info, NULL);
+ mono_mb_free (mb);
return res;
}
@@ -9010,16 +9039,15 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
#ifndef DISABLE_JIT
mono_mb_emit_exception (mb, exc_class, exc_arg);
#endif
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ info->d.managed_to_native.method = method;
+
csig = signature_dup (method->klass->image, sig);
csig->pinvoke = 0;
- res = mono_mb_create_and_cache (cache, method,
- mb, csig, csig->param_count + 16);
+ res = mono_mb_create_and_cache_full (cache, method, mb, csig,
+ csig->param_count + 16, info, NULL);
mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_NONE);
- info->d.managed_to_native.method = method;
- mono_marshal_set_wrapper_info (res, info);
-
return res;
}
@@ -9065,15 +9093,13 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
emit_thread_interrupt_checkpoint (mb);
mono_mb_emit_byte (mb, CEE_RET);
#endif
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ info->d.managed_to_native.method = method;
csig = signature_dup (method->klass->image, csig);
csig->pinvoke = 0;
- res = mono_mb_create_and_cache (cache, method,
- mb, csig, csig->param_count + 16);
-
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_NONE);
- info->d.managed_to_native.method = method;
- mono_marshal_set_wrapper_info (res, info);
+ res = mono_mb_create_and_cache_full (cache, method, mb, csig, csig->param_count + 16,
+ info, NULL);
mono_mb_free (mb);
return res;
@@ -9089,17 +9115,15 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
mono_marshal_emit_native_wrapper (mb->method->klass->image, mb, sig, piinfo, mspecs, piinfo->addr, aot, check_exceptions, FALSE);
#endif
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_PINVOKE);
+ info->d.managed_to_native.method = method;
csig = signature_dup (method->klass->image, sig);
csig->pinvoke = 0;
- res = mono_mb_create_and_cache (cache, method,
- mb, csig, csig->param_count + 16);
+ res = mono_mb_create_and_cache_full (cache, method, mb, csig, csig->param_count + 16,
+ info, NULL);
mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_PINVOKE);
- info->d.managed_to_native.method = method;
- mono_marshal_set_wrapper_info (res, info);
-
#ifndef DISABLE_JIT
for (i = sig->param_count; i >= 0; i--)
if (mspecs [i])
@@ -9201,18 +9225,17 @@ mono_marshal_get_native_func_wrapper_aot (MonoClass *klass)
mono_marshal_emit_native_wrapper (image, mb, sig, piinfo, mspecs, NULL, FALSE, TRUE, TRUE);
#endif
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NATIVE_FUNC_AOT);
+ info->d.managed_to_native.method = invoke;
+
g_assert (!sig->hasthis);
csig = signature_dup_add_this (image, sig, mono_defaults.int_class);
csig->pinvoke = 0;
- res = mono_mb_create_and_cache (cache, invoke,
- mb, csig, csig->param_count + 16);
+ res = mono_mb_create_and_cache_full (cache, invoke,
+ mb, csig, csig->param_count + 16,
+ info, NULL);
mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_NATIVE_FUNC_AOT);
- info->d.managed_to_native.method = invoke;
-
- mono_marshal_set_wrapper_info (res, info);
-
for (i = mono_method_signature (invoke)->param_count; i >= 0; i--)
if (mspecs [i])
mono_metadata_free_marshal_spec (mspecs [i]);
@@ -9470,8 +9493,9 @@ mono_marshal_set_callconv_from_modopt (MonoMethod *method, MonoMethodSignature *
/* Why is this a modopt ? */
if (sig->ret && sig->ret->num_mods) {
for (i = 0; i < sig->ret->num_mods; ++i) {
- MonoClass *cmod_class = mono_class_get (method->klass->image, sig->ret->modifiers [i].token);
- g_assert (cmod_class);
+ MonoError error;
+ MonoClass *cmod_class = mono_class_get_checked (method->klass->image, sig->ret->modifiers [i].token, &error);
+ g_assert (mono_error_ok (&error));
if ((cmod_class->image == mono_defaults.corlib) && !strcmp (cmod_class->name_space, "System.Runtime.CompilerServices")) {
if (!strcmp (cmod_class->name, "CallConvCdecl"))
csig->call_convention = MONO_CALL_C;
@@ -9628,18 +9652,19 @@ mono_marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass,
if (!target_handle) {
WrapperInfo *info;
- res = mono_mb_create_and_cache (cache, method,
- mb, csig, sig->param_count + 16);
// FIXME: Associate it with the method+delegate_klass pair
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_NONE);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
info->d.native_to_managed.method = method;
info->d.native_to_managed.klass = delegate_klass;
- mono_marshal_set_wrapper_info (res, info);
+
+ res = mono_mb_create_and_cache_full (cache, method,
+ mb, csig, sig->param_count + 16,
+ info, NULL);
} else {
#ifndef DISABLE_JIT
mb->dynamic = 1;
#endif
- res = mono_mb_create_method (mb, csig, sig->param_count + 16);
+ res = mono_mb_create (mb, csig, sig->param_count + 16, NULL);
}
mono_mb_free (mb);
@@ -9698,7 +9723,7 @@ mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type)
#ifndef DISABLE_JIT
mb->dynamic = 1;
#endif
- method = mono_mb_create_method (mb, csig, sig->param_count + 16);
+ method = mono_mb_create (mb, csig, sig->param_count + 16, NULL);
mono_mb_free (mb);
for (i = sig->param_count; i >= 0; i--)
@@ -9726,7 +9751,7 @@ mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type)
mb->dynamic = 1;
#endif
- method = mono_mb_create_method (mb, sig, param_count);
+ method = mono_mb_create (mb, sig, param_count, NULL);
mono_mb_free (mb);
return mono_compile_method (method);
@@ -9779,7 +9804,7 @@ mono_marshal_get_castclass_with_cache (void)
/*obj_vtable = obj->vtable;*/
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, 0);
@@ -9821,9 +9846,8 @@ mono_marshal_get_castclass_with_cache (void)
mono_mb_emit_byte (mb, CEE_RET);
#endif /* DISABLE_JIT */
- res = mono_mb_create_method (mb, sig, 8);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_CASTCLASS_WITH_CACHE);
- mono_marshal_set_wrapper_info (res, info);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_CASTCLASS_WITH_CACHE);
+ res = mono_mb_create (mb, sig, 8, info);
STORE_STORE_FENCE;
if (InterlockedCompareExchangePointer ((volatile gpointer *)&cached, res, NULL)) {
@@ -9872,7 +9896,7 @@ mono_marshal_get_isinst_with_cache (void)
/*obj_vtable = obj->vtable;*/
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, 0);
@@ -9943,9 +9967,8 @@ mono_marshal_get_isinst_with_cache (void)
mono_mb_emit_byte (mb, CEE_RET);
#endif
- res = mono_mb_create_method (mb, sig, 8);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_ISINST_WITH_CACHE);
- mono_marshal_set_wrapper_info (res, info);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_ISINST_WITH_CACHE);
+ res = mono_mb_create (mb, sig, 8, info);
STORE_STORE_FENCE;
if (InterlockedCompareExchangePointer ((volatile gpointer *)&cached, res, NULL)) {
@@ -9972,6 +9995,7 @@ mono_marshal_get_isinst (MonoClass *klass)
static MonoMethodSignature *isint_sig = NULL;
GHashTable *cache;
MonoMethod *res;
+ WrapperInfo *info;
int pos_was_ok, pos_end;
#ifndef DISABLE_REMOTING
int pos_end2, pos_failed;
@@ -10056,7 +10080,9 @@ mono_marshal_get_isinst (MonoClass *klass)
#endif /* DISABLE_REMOTING */
#endif /* DISABLE_JIT */
- res = mono_mb_create_and_cache (cache, klass, mb, isint_sig, isint_sig->param_count + 16);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ info->d.proxy.klass = klass;
+ res = mono_mb_create_and_cache_full (cache, klass, mb, isint_sig, isint_sig->param_count + 16, info, NULL);
mono_mb_free (mb);
return res;
@@ -10139,11 +10165,11 @@ mono_marshal_get_castclass (MonoClass *klass)
mono_mb_emit_byte (mb, CEE_RET);
#endif /* DISABLE_JIT */
- res = mono_mb_create_and_cache (cache, klass, mb, castclass_sig, castclass_sig->param_count + 16);
- mono_mb_free (mb);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_NONE);
- mono_marshal_set_wrapper_info (res, info);
+ res = mono_mb_create_and_cache_full (cache, klass, mb, castclass_sig, castclass_sig->param_count + 16,
+ info, NULL);
+ mono_mb_free (mb);
return res;
}
@@ -10155,6 +10181,7 @@ mono_marshal_get_proxy_cancast (MonoClass *klass)
static MonoMethodSignature *isint_sig = NULL;
GHashTable *cache;
MonoMethod *res;
+ WrapperInfo *info;
int pos_failed, pos_end;
char *name, *klass_name;
MonoMethod *can_cast_to;
@@ -10183,7 +10210,7 @@ mono_marshal_get_proxy_cancast (MonoClass *klass)
#ifndef DISABLE_JIT
/* get the real proxy from the transparent proxy*/
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoTransparentProxy, rp));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoTransparentProxy, rp));
mono_mb_emit_byte (mb, CEE_LDIND_REF);
/* get the reflection type from the type handle */
@@ -10223,7 +10250,9 @@ mono_marshal_get_proxy_cancast (MonoClass *klass)
mono_mb_emit_byte (mb, CEE_RET);
#endif
- res = mono_mb_create_and_cache (cache, klass, mb, isint_sig, isint_sig->param_count + 16);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ info->d.proxy.klass = klass;
+ res = mono_mb_create_and_cache_full (cache, klass, mb, isint_sig, isint_sig->param_count + 16, info, NULL);
mono_mb_free (mb);
return res;
@@ -10300,13 +10329,10 @@ mono_marshal_get_struct_to_ptr (MonoClass *klass)
mono_mb_emit_byte (mb, CEE_RET);
#endif
-
- res = mono_mb_create_method (mb, mono_signature_no_pinvoke (stoptr), 0);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_STRUCTURE_TO_PTR);
+ res = mono_mb_create (mb, mono_signature_no_pinvoke (stoptr), 0, info);
mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_STRUCTURE_TO_PTR);
- mono_marshal_set_wrapper_info (res, info);
-
klass->marshal_info->str_to_ptr = res;
return res;
}
@@ -10377,13 +10403,10 @@ mono_marshal_get_ptr_to_struct (MonoClass *klass)
mono_mb_emit_byte (mb, CEE_RET);
#endif
-
- res = mono_mb_create_method (mb, ptostr, 0);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_PTR_TO_STRUCTURE);
+ res = mono_mb_create (mb, ptostr, 0, info);
mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_PTR_TO_STRUCTURE);
- mono_marshal_set_wrapper_info (res, info);
-
klass->marshal_info->ptr_to_str = res;
return res;
}
@@ -10422,11 +10445,11 @@ mono_marshal_get_synchronized_inner_wrapper (MonoMethod *method)
mono_mb_emit_byte (mb, CEE_RET);
#endif
sig = signature_dup (method->klass->image, mono_method_signature (method));
- res = mono_mb_create_method (mb, sig, 0);
- mono_mb_free (mb);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_SYNCHRONIZED_INNER);
+
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_SYNCHRONIZED_INNER);
info->d.synchronized_inner.method = method;
- mono_marshal_set_wrapper_info (res, info);
+ res = mono_mb_create (mb, sig, 0, info);
+ mono_mb_free (mb);
if (ctx)
res = mono_class_inflate_generic_method (res, ctx);
return res;
@@ -10710,11 +10733,11 @@ static void
load_array_class (MonoMethodBuilder *mb, int aklass)
{
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, element_class));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, element_class));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, aklass);
}
@@ -10723,9 +10746,9 @@ static void
load_value_class (MonoMethodBuilder *mb, int vklass)
{
mono_mb_emit_ldarg (mb, 2);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, vklass);
}
@@ -10965,22 +10988,22 @@ get_virtual_stelemref_wrapper (int kind)
/* if (vklass->idepth < aklass->idepth) goto failue */
mono_mb_emit_ldloc (mb, vklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
mono_mb_emit_ldloc (mb, aklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
b2 = mono_mb_emit_branch (mb, CEE_BLT_UN);
/* if (vklass->supertypes [aklass->idepth - 1] != aklass) goto failure */
mono_mb_emit_ldloc (mb, vklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, supertypes));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, supertypes));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_ldloc (mb, aklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
mono_mb_emit_icon (mb, 1);
mono_mb_emit_byte (mb, CEE_SUB);
@@ -11044,20 +11067,20 @@ get_virtual_stelemref_wrapper (int kind)
/* vt = value->vtable */
mono_mb_emit_ldarg (mb, 2);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, vtable);
/* uiid = klass->interface_id; */
mono_mb_emit_ldloc (mb, aklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, interface_id));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, interface_id));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
mono_mb_emit_stloc (mb, uiid);
/*if (uiid > vt->max_interface_id)*/
mono_mb_emit_ldloc (mb, uiid);
mono_mb_emit_ldloc (mb, vtable);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, max_interface_id));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, max_interface_id));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
b2 = mono_mb_emit_branch (mb, CEE_BGT_UN);
@@ -11065,7 +11088,7 @@ get_virtual_stelemref_wrapper (int kind)
/*vt->interface_bitmap*/
mono_mb_emit_ldloc (mb, vtable);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, interface_bitmap));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, interface_bitmap));
mono_mb_emit_byte (mb, CEE_LDIND_I);
/*uiid >> 3*/
@@ -11110,13 +11133,10 @@ get_virtual_stelemref_wrapper (int kind)
g_assert (0);
}
#endif /* DISABLE_JIT */
-
- res = mono_mb_create_method (mb, signature, 4);
- res->flags |= METHOD_ATTRIBUTE_VIRTUAL;
-
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_VIRTUAL_STELEMREF);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_VIRTUAL_STELEMREF);
info->d.virtual_stelemref.kind = kind;
- mono_marshal_set_wrapper_info (res, info);
+ res = mono_mb_create (mb, signature, 4, info);
+ res->flags |= METHOD_ATTRIBUTE_VIRTUAL;
mono_marshal_lock ();
if (!cached_methods [kind]) {
@@ -11159,7 +11179,7 @@ mono_marshal_get_virtual_stelemref_wrappers (int *nwrappers)
* The wrapper info for the wrapper is a WrapperInfo structure.
*/
MonoMethod*
-mono_marshal_get_stelemref ()
+mono_marshal_get_stelemref (void)
{
static MonoMethod* ret = NULL;
MonoMethodSignature *sig;
@@ -11228,40 +11248,40 @@ mono_marshal_get_stelemref ()
/* aklass = array->vtable->klass->element_class */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, element_class));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, element_class));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, aklass);
/* vklass = value->vtable->klass */
mono_mb_emit_ldarg (mb, 2);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoObject, vtable));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoObject, vtable));
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, vklass);
/* if (vklass->idepth < aklass->idepth) goto failue */
mono_mb_emit_ldloc (mb, vklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
mono_mb_emit_ldloc (mb, aklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
b2 = mono_mb_emit_branch (mb, CEE_BLT_UN);
/* if (vklass->supertypes [aklass->idepth - 1] != aklass) goto failure */
mono_mb_emit_ldloc (mb, vklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, supertypes));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, supertypes));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_ldloc (mb, aklass);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoClass, idepth));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoClass, idepth));
mono_mb_emit_byte (mb, CEE_LDIND_U2);
mono_mb_emit_icon (mb, 1);
mono_mb_emit_byte (mb, CEE_SUB);
@@ -11297,13 +11317,10 @@ mono_marshal_get_stelemref ()
mono_mb_emit_byte (mb, CEE_RET);
#endif
-
- ret = mono_mb_create_method (mb, sig, 4);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_NONE);
+ ret = mono_mb_create (mb, sig, 4, info);
mono_mb_free (mb);
- info = mono_wrapper_info_create (ret, WRAPPER_SUBTYPE_NONE);
- mono_marshal_set_wrapper_info (ret, info);
-
return ret;
}
@@ -11336,13 +11353,10 @@ mono_marshal_get_gsharedvt_in_wrapper (void)
*/
mono_mb_emit_byte (mb, CEE_RET);
#endif
-
- ret = mono_mb_create_method (mb, sig, 4);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_GSHAREDVT_IN);
+ ret = mono_mb_create (mb, sig, 4, info);
mono_mb_free (mb);
- info = mono_wrapper_info_create (ret, WRAPPER_SUBTYPE_GSHAREDVT_IN);
- mono_marshal_set_wrapper_info (ret, info);
-
return ret;
}
@@ -11375,13 +11389,10 @@ mono_marshal_get_gsharedvt_out_wrapper (void)
*/
mono_mb_emit_byte (mb, CEE_RET);
#endif
-
- ret = mono_mb_create_method (mb, sig, 4);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_GSHAREDVT_OUT);
+ ret = mono_mb_create (mb, sig, 4, info);
mono_mb_free (mb);
- info = mono_wrapper_info_create (ret, WRAPPER_SUBTYPE_GSHAREDVT_OUT);
- mono_marshal_set_wrapper_info (ret, info);
-
return ret;
}
@@ -11412,6 +11423,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
MonoMethod *ret;
MonoMethodBuilder *mb;
MonoMethodSignature *sig;
+ WrapperInfo *info;
int i, bounds, ind, realidx;
int branch_pos, *branch_positions;
int cached;
@@ -11448,7 +11460,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
/* bounds = array->bounds; */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, bounds));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, bounds));
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, bounds);
@@ -11456,7 +11468,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
/* ind = idx0 - bounds [0].lower_bound */
mono_mb_emit_ldarg (mb, 1);
mono_mb_emit_ldloc (mb, bounds);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_byte (mb, CEE_SUB);
@@ -11464,7 +11476,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
/* if (ind >= bounds [0].length) goto exeception; */
mono_mb_emit_ldloc (mb, ind);
mono_mb_emit_ldloc (mb, bounds);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoArrayBounds, length));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoArrayBounds, length));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
/* note that we use unsigned comparison */
@@ -11479,7 +11491,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
/* realidx = idxi - bounds [i].lower_bound */
mono_mb_emit_ldarg (mb, 1 + i);
mono_mb_emit_ldloc (mb, bounds);
- mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+ mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_byte (mb, CEE_SUB);
@@ -11487,14 +11499,14 @@ mono_marshal_get_array_address (int rank, int elem_size)
/* if (realidx >= bounds [i].length) goto exeception; */
mono_mb_emit_ldloc (mb, realidx);
mono_mb_emit_ldloc (mb, bounds);
- mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + G_STRUCT_OFFSET (MonoArrayBounds, length));
+ mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + MONO_STRUCT_OFFSET (MonoArrayBounds, length));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
branch_positions [i] = mono_mb_emit_branch (mb, CEE_BGE_UN);
/* ind = ind * bounds [i].length + realidx */
mono_mb_emit_ldloc (mb, ind);
mono_mb_emit_ldloc (mb, bounds);
- mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + G_STRUCT_OFFSET (MonoArrayBounds, length));
+ mono_mb_emit_icon (mb, (i * sizeof (MonoArrayBounds)) + MONO_STRUCT_OFFSET (MonoArrayBounds, length));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
mono_mb_emit_byte (mb, CEE_MUL);
@@ -11505,7 +11517,7 @@ mono_marshal_get_array_address (int rank, int elem_size)
/* return array->vector + ind * element_size */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, vector));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, vector));
mono_mb_emit_ldloc (mb, ind);
mono_mb_emit_icon (mb, elem_size);
mono_mb_emit_byte (mb, CEE_MUL);
@@ -11523,7 +11535,10 @@ mono_marshal_get_array_address (int rank, int elem_size)
g_free (branch_positions);
#endif /* DISABLE_JIT */
- ret = mono_mb_create_method (mb, sig, 4);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_ELEMENT_ADDR);
+ info->d.element_addr.rank = rank;
+ info->d.element_addr.elem_size = elem_size;
+ ret = mono_mb_create (mb, sig, 4, info);
mono_mb_free (mb);
/* cache the result */
@@ -11538,8 +11553,6 @@ mono_marshal_get_array_address (int rank, int elem_size)
}
}
if (!cached) {
- WrapperInfo *info;
-
if (elem_addr_cache_next >= elem_addr_cache_size) {
int new_size = elem_addr_cache_size + 4;
ArrayElemAddr *new_array = g_new0 (ArrayElemAddr, new_size);
@@ -11552,11 +11565,6 @@ mono_marshal_get_array_address (int rank, int elem_size)
elem_addr_cache [elem_addr_cache_next].elem_size = elem_size;
elem_addr_cache [elem_addr_cache_next].method = ret;
elem_addr_cache_next ++;
-
- info = mono_wrapper_info_create (ret, WRAPPER_SUBTYPE_ELEMENT_ADDR);
- info->d.element_addr.rank = rank;
- info->d.element_addr.elem_size = elem_size;
- mono_marshal_set_wrapper_info (ret, info);
}
mono_marshal_unlock ();
return ret;
@@ -11621,11 +11629,12 @@ mono_marshal_get_array_accessor_wrapper (MonoMethod *method)
def = mono_mb_create_and_cache (cache, method, mb, sig, sig->param_count + 16);
res = cache_generic_wrapper (cache, orig_method, def, ctx, orig_method);
} else {
- res = mono_mb_create_and_cache (cache, method,
- mb, sig, sig->param_count + 16);
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_ARRAY_ACCESSOR);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_ARRAY_ACCESSOR);
info->d.array_accessor.method = method;
- mono_marshal_set_wrapper_info (res, info);
+
+ res = mono_mb_create_and_cache_full (cache, method,
+ mb, sig, sig->param_count + 16,
+ info, NULL);
}
mono_mb_free (mb);
@@ -12427,11 +12436,6 @@ mono_class_native_size (MonoClass *klass, guint32 *align)
return klass->marshal_info->native_size;
}
-/* __alignof__ returns the preferred alignment of values not the actual alignment used by
- the compiler so is wrong e.g. for Linux where doubles are aligned on a 4 byte boundary
- but __alignof__ returns 8 - using G_STRUCT_OFFSET works better */
-#define ALIGNMENT(type) G_STRUCT_OFFSET(struct { char c; type x; }, x)
-
/*
* mono_type_native_stack_size:
* @t: the type to return the size it uses on the stack
@@ -12480,11 +12484,11 @@ mono_type_native_stack_size (MonoType *t, guint32 *align)
*align = 4;
return 4;
case MONO_TYPE_R8:
- *align = ALIGNMENT (gdouble);
+ *align = MONO_ABI_ALIGNOF (double);
return 8;
case MONO_TYPE_I8:
case MONO_TYPE_U8:
- *align = ALIGNMENT (glong);
+ *align = MONO_ABI_ALIGNOF (gint64);
return 8;
case MONO_TYPE_GENERICINST:
if (!mono_type_generic_inst_is_valuetype (t)) {
@@ -12543,13 +12547,13 @@ mono_marshal_type_size (MonoType *type, MonoMarshalSpec *mspec, guint32 *align,
return 4;
case MONO_NATIVE_I8:
case MONO_NATIVE_U8:
- *align = ALIGNMENT(guint64);
+ *align = MONO_ABI_ALIGNOF (gint64);
return 8;
case MONO_NATIVE_R4:
*align = 4;
return 4;
case MONO_NATIVE_R8:
- *align = ALIGNMENT(double);
+ *align = MONO_ABI_ALIGNOF (double);
return 8;
case MONO_NATIVE_INT:
case MONO_NATIVE_UINT:
@@ -12567,7 +12571,7 @@ mono_marshal_type_size (MonoType *type, MonoMarshalSpec *mspec, guint32 *align,
case MONO_NATIVE_ASANY:
case MONO_NATIVE_FUNC:
case MONO_NATIVE_LPSTRUCT:
- *align = ALIGNMENT(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
case MONO_NATIVE_STRUCT:
klass = mono_class_from_mono_type (type);
@@ -12767,12 +12771,9 @@ mono_marshal_get_generic_array_helper (MonoClass *class, MonoClass *iface, gchar
/* We can corlib internal methods */
mb->skip_visibility = TRUE;
#endif
-
- res = mono_mb_create_method (mb, csig, csig->param_count + 16);
-
- info = mono_wrapper_info_create (res, WRAPPER_SUBTYPE_GENERIC_ARRAY_HELPER);
+ info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_GENERIC_ARRAY_HELPER);
info->d.generic_array_helper.method = method;
- mono_marshal_set_wrapper_info (res, info);
+ res = mono_mb_create (mb, csig, csig->param_count + 16, info);
mono_mb_free (mb);
@@ -12994,7 +12995,7 @@ mono_marshal_free_dynamic_wrappers (MonoMethod *method)
{
MonoImage *image = method->klass->image;
- g_assert (method->dynamic);
+ g_assert (method_is_dynamic (method));
/* This could be called during shutdown */
if (marshal_mutex_initialized)
diff --git a/mono/metadata/marshal.h b/mono/metadata/marshal.h
index 0c311c88933..3ba8addbda7 100644
--- a/mono/metadata/marshal.h
+++ b/mono/metadata/marshal.h
@@ -160,6 +160,10 @@ typedef struct {
MonoMethod *method;
} ArrayAccessorWrapperInfo;
+typedef struct {
+ MonoClass *klass;
+} ProxyWrapperInfo;
+
/*
* This structure contains additional information to uniquely identify a given wrapper
* method. It can be retrieved by mono_marshal_get_wrapper_info () for certain types
@@ -188,6 +192,8 @@ typedef struct {
ICallWrapperInfo icall;
/* ARRAY_ACCESSOR */
ArrayAccessorWrapperInfo array_accessor;
+ /* PROXY_ISINST etc. */
+ ProxyWrapperInfo proxy;
} d;
} WrapperInfo;
diff --git a/mono/metadata/mempool-internals.h b/mono/metadata/mempool-internals.h
index a317a669b9c..a317a669b9c 100755..100644
--- a/mono/metadata/mempool-internals.h
+++ b/mono/metadata/mempool-internals.h
diff --git a/mono/metadata/mempool.c b/mono/metadata/mempool.c
index 32084479b50..dbf38777a71 100644
--- a/mono/metadata/mempool.c
+++ b/mono/metadata/mempool.c
@@ -207,7 +207,7 @@ mono_mempool_stats (MonoMemPool *pool)
#include "metadata/appdomain.h"
#include "metadata/metadata-internals.h"
-static CRITICAL_SECTION mempool_tracing_lock;
+static mono_mutex_t mempool_tracing_lock;
#define BACKTRACE_DEPTH 7
static void
mono_backtrace (int size)
@@ -218,11 +218,11 @@ mono_backtrace (int size)
static gboolean inited;
if (!inited) {
- InitializeCriticalSection (&mempool_tracing_lock);
+ mono_mutex_init_recursive (&mempool_tracing_lock);
inited = TRUE;
}
- EnterCriticalSection (&mempool_tracing_lock);
+ mono_mutex_lock (&mempool_tracing_lock);
g_print ("Allocating %d bytes\n", size);
symbols = backtrace (array, BACKTRACE_DEPTH);
names = backtrace_symbols (array, symbols);
@@ -230,7 +230,7 @@ mono_backtrace (int size)
g_print ("\t%s\n", names [i]);
}
free (names);
- LeaveCriticalSection (&mempool_tracing_lock);
+ mono_mutex_unlock (&mempool_tracing_lock);
}
#endif
@@ -269,7 +269,7 @@ mono_mempool_alloc (MonoMemPool *pool, guint size)
#ifdef MALLOC_ALLOCATION
{
- Chunk *c = g_malloc (size);
+ Chunk *c = g_malloc (size + sizeof (Chunk));
c->next = pool->chunks;
pool->chunks = c;
diff --git a/mono/metadata/metadata-cross-helpers.c b/mono/metadata/metadata-cross-helpers.c
new file mode 100644
index 00000000000..59536914010
--- /dev/null
+++ b/mono/metadata/metadata-cross-helpers.c
@@ -0,0 +1,6 @@
+#include "config.h"
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/metadata/metadata-cross-helpers.c"
+#endif
+
diff --git a/mono/metadata/metadata-internals.h b/mono/metadata/metadata-internals.h
index ff7fd630c1e..c283b7aae36 100644
--- a/mono/metadata/metadata-internals.h
+++ b/mono/metadata/metadata-internals.h
@@ -13,6 +13,7 @@
#include "mono/utils/mono-property-hash.h"
#include "mono/utils/mono-value-hash.h"
#include <mono/utils/mono-error.h>
+#include "mono/utils/mono-conc-hashtable.h"
struct _MonoType {
union {
@@ -224,10 +225,10 @@ struct _MonoImage {
/*
* Indexed by fielddef and memberref tokens
*/
- GHashTable *field_cache; /*protected by the image lock*/
+ MonoConcurrentHashTable *field_cache; /*protected by the image lock*/
/* indexed by typespec tokens. */
- GHashTable *typespec_cache;
+ GHashTable *typespec_cache; /* protected by the image lock */
/* indexed by token */
GHashTable *memberref_signatures;
GHashTable *helper_signatures;
@@ -248,7 +249,7 @@ struct _MonoImage {
GHashTable *szarray_cache;
/* This has a separate lock to improve scalability */
- CRITICAL_SECTION szarray_cache_lock;
+ mono_mutex_t szarray_cache_lock;
/*
* indexed by MonoMethodSignature
@@ -316,6 +317,7 @@ struct _MonoImage {
MonoDllMap *dll_map;
/* interfaces IDs from this image */
+ /* protected by the classes lock */
MonoBitSet *interface_bitset;
/* when the image is being closed, this is abused as a list of
@@ -345,7 +347,7 @@ struct _MonoImage {
* No other runtime locks must be taken while holding this lock.
* It's meant to be used only to mutate and query structures part of this image.
*/
- CRITICAL_SECTION lock;
+ mono_mutex_t lock;
};
/*
@@ -361,7 +363,7 @@ typedef struct {
GHashTable *gclass_cache, *ginst_cache, *gmethod_cache, *gsignature_cache;
- CRITICAL_SECTION lock;
+ mono_mutex_t lock;
/*
* Memory for generic instances owned by this image set should be allocated from
@@ -522,8 +524,41 @@ struct _MonoMethodSignature {
MonoType *params [MONO_ZERO_LEN_ARRAY];
};
+/*
+ * AOT cache configuration loaded from config files.
+ * Doesn't really belong here.
+ */
+typedef struct {
+ /*
+ * Enable aot caching for applications whose main assemblies are in
+ * this list.
+ */
+ GSList *apps;
+ GSList *assemblies;
+} MonoAotCacheConfig;
+
#define MONO_SIZEOF_METHOD_SIGNATURE (sizeof (struct _MonoMethodSignature) - MONO_ZERO_LEN_ARRAY * SIZEOF_VOID_P)
+static inline gboolean
+image_is_dynamic (MonoImage *image)
+{
+#ifdef DISABLE_REFLECTION_EMIT
+ return FALSE;
+#else
+ return image->dynamic;
+#endif
+}
+
+static inline gboolean
+assembly_is_dynamic (MonoAssembly *assembly)
+{
+#ifdef DISABLE_REFLECTION_EMIT
+ return FALSE;
+#else
+ return assembly->dynamic;
+#endif
+}
+
/* for use with allocated memory blocks (assumes alignment is to 8 bytes) */
guint mono_aligned_addr_hash (gconstpointer ptr) MONO_INTERNAL;
@@ -764,5 +799,9 @@ MonoMethod *mono_get_method_constrained_with_method (MonoImage *image, MonoMetho
void mono_type_set_alignment (MonoTypeEnum type, int align) MONO_INTERNAL;
+MonoAotCacheConfig *mono_get_aot_cache_config (void) MONO_INTERNAL;
+MonoType *
+mono_type_create_from_typespec_checked (MonoImage *image, guint32 type_spec, MonoError *error) MONO_INTERNAL;
+
#endif /* __MONO_METADATA_INTERNALS_H__ */
diff --git a/mono/metadata/metadata.c b/mono/metadata/metadata.c
index 5a3a09bc7a8..6b598020f03 100644
--- a/mono/metadata/metadata.c
+++ b/mono/metadata/metadata.c
@@ -25,6 +25,7 @@
#include "class.h"
#include "marshal.h"
#include "debug-helpers.h"
+#include "abi-details.h"
#include <mono/utils/mono-error-internals.h>
#include <mono/utils/bsearch.h>
@@ -1375,7 +1376,7 @@ static int next_generic_inst_id = 0;
static MonoImageSet *mscorlib_image_set;
/* Protected by image_sets_mutex */
static GPtrArray *image_sets;
-static CRITICAL_SECTION image_sets_mutex;
+static mono_mutex_t image_sets_mutex;
static guint mono_generic_class_hash (gconstpointer data);
@@ -1489,7 +1490,7 @@ mono_metadata_init (void)
for (i = 0; i < NBUILTIN_TYPES (); ++i)
g_hash_table_insert (type_cache, (gpointer) &builtin_types [i], (gpointer) &builtin_types [i]);
- InitializeCriticalSection (&image_sets_mutex);
+ mono_mutex_init_recursive (&image_sets_mutex);
}
/**
@@ -1505,7 +1506,7 @@ mono_metadata_cleanup (void)
type_cache = NULL;
g_ptr_array_free (image_sets, TRUE);
image_sets = NULL;
- DeleteCriticalSection (&image_sets_mutex);
+ mono_mutex_destroy (&image_sets_mutex);
}
/**
@@ -1765,7 +1766,7 @@ mono_metadata_parse_signature_full (MonoImage *image, MonoGenericContainer *gene
guint32 sig;
const char *ptr;
- if (image->dynamic)
+ if (image_is_dynamic (image))
return mono_lookup_dynamic_token (image, token, NULL);
g_assert (mono_metadata_token_table(token) == MONO_TABLE_STANDALONESIG);
@@ -2191,13 +2192,13 @@ retry:
static inline void
image_sets_lock (void)
{
- EnterCriticalSection (&image_sets_mutex);
+ mono_mutex_lock (&image_sets_mutex);
}
static inline void
image_sets_unlock (void)
{
- LeaveCriticalSection (&image_sets_mutex);
+ mono_mutex_unlock (&image_sets_mutex);
}
/*
@@ -2254,7 +2255,7 @@ get_image_set (MonoImage **images, int nimages)
set = g_new0 (MonoImageSet, 1);
set->nimages = nimages;
set->images = g_new0 (MonoImage*, nimages);
- InitializeCriticalSection (&set->lock);
+ mono_mutex_init_recursive (&set->lock);
for (i = 0; i < nimages; ++i)
set->images [i] = images [i];
set->gclass_cache = g_hash_table_new_full (mono_generic_class_hash, mono_generic_class_equal, NULL, (GDestroyNotify)free_generic_class);
@@ -2300,20 +2301,20 @@ delete_image_set (MonoImageSet *set)
if (set->mempool)
mono_mempool_destroy (set->mempool);
g_free (set->images);
- DeleteCriticalSection (&set->lock);
+ mono_mutex_destroy (&set->lock);
g_free (set);
}
static void
mono_image_set_lock (MonoImageSet *set)
{
- EnterCriticalSection (&set->lock);
+ mono_mutex_lock (&set->lock);
}
static void
mono_image_set_unlock (MonoImageSet *set)
{
- LeaveCriticalSection (&set->lock);
+ mono_mutex_unlock (&set->lock);
}
gpointer
@@ -2468,7 +2469,7 @@ collect_method_images (MonoMethodInflated *method, CollectData *data)
/*
* Dynamic assemblies have no references, so the images they depend on can be unloaded before them.
*/
- if (m->klass->image->dynamic)
+ if (image_is_dynamic (m->klass->image))
collect_signature_images (mono_method_signature (m), data);
}
@@ -2650,7 +2651,6 @@ mono_metadata_clean_for_image (MonoImage *image)
*/
ginst_data.image = gclass_data.image = image;
ginst_data.list = gclass_data.list = NULL;
- mono_loader_lock ();
/* Collect the items to delete */
/* delete_image_set () modifies the lists so make a copy */
@@ -2680,8 +2680,6 @@ mono_metadata_clean_for_image (MonoImage *image)
delete_image_set (set);
}
g_slist_free (set_list);
-
- mono_loader_unlock ();
}
static void
@@ -3202,11 +3200,15 @@ do_mono_metadata_parse_type (MonoType *type, MonoImage *m, MonoGenericContainer
case MONO_TYPE_CLASS: {
guint32 token;
MonoClass *class;
+ MonoError error;
token = mono_metadata_parse_typedef_or_ref (m, ptr, &ptr);
- class = mono_class_get (m, token);
+ class = mono_class_get_checked (m, token, &error);
type->data.klass = class;
- if (!class)
+ if (!class) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /*FIXME don't swallow the error message*/
return FALSE;
+ }
if (!compare_type_literals (class->byval_arg.type, type->type))
return FALSE;
break;
@@ -3379,7 +3381,16 @@ parse_section_data (MonoImage *m, int *num_clauses, const unsigned char *ptr)
if (ec->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
ec->data.filter_offset = tof_value;
} else if (ec->flags == MONO_EXCEPTION_CLAUSE_NONE) {
- ec->data.catch_class = tof_value? mono_class_get (m, tof_value): 0;
+ ec->data.catch_class = NULL;
+ if (tof_value) {
+ MonoError error;
+ ec->data.catch_class = mono_class_get_checked (m, tof_value, &error);
+ if (!mono_error_ok (&error)) {
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
+ g_free (clauses);
+ return NULL;
+ }
+ }
} else {
ec->data.catch_class = NULL;
}
@@ -3482,7 +3493,7 @@ mono_method_get_header_summary (MonoMethod *method, MonoMethodHeaderSummary *sum
MonoMethodHeader *
mono_metadata_parse_mh_full (MonoImage *m, MonoGenericContainer *container, const char *ptr)
{
- MonoMethodHeader *mh;
+ MonoMethodHeader *mh = NULL;
unsigned char flags = *(const unsigned char *) ptr;
unsigned char format = flags & METHOD_HEADER_FORMAT_MASK;
guint16 fat_flags;
@@ -3538,11 +3549,11 @@ mono_metadata_parse_mh_full (MonoImage *m, MonoGenericContainer *container, cons
if (local_var_sig_tok) {
int idx = (local_var_sig_tok & 0xffffff)-1;
if (idx >= t->rows || idx < 0)
- return NULL;
+ goto fail;
mono_metadata_decode_row (t, idx, cols, 1);
if (!mono_verifier_verify_standalone_signature (m, cols [MONO_STAND_ALONE_SIGNATURE], NULL))
- return NULL;
+ goto fail;
}
if (fat_flags & METHOD_HEADER_MORE_SECTS)
clauses = parse_section_data (m, &num_clauses, (const unsigned char*)ptr);
@@ -3561,11 +3572,8 @@ mono_metadata_parse_mh_full (MonoImage *m, MonoGenericContainer *container, cons
for (i = 0; i < len; ++i) {
mh->locals [i] = mono_metadata_parse_type_internal (m, container,
MONO_PARSE_LOCAL, 0, TRUE, locals_ptr, &locals_ptr);
- if (!mh->locals [i]) {
- g_free (clauses);
- g_free (mh);
- return NULL;
- }
+ if (!mh->locals [i])
+ goto fail;
}
} else {
mh = g_malloc0 (MONO_SIZEOF_METHOD_HEADER + num_clauses * sizeof (MonoExceptionClause));
@@ -3583,6 +3591,11 @@ mono_metadata_parse_mh_full (MonoImage *m, MonoGenericContainer *container, cons
mh->num_clauses = num_clauses;
}
return mh;
+fail:
+ g_free (clauses);
+ g_free (mh);
+ return NULL;
+
}
/*
@@ -3592,22 +3605,13 @@ mono_metadata_parse_mh_full (MonoImage *m, MonoGenericContainer *container, cons
*
* Decode the method header at @ptr, including pointer to the IL code,
* info about local variables and optional exception tables.
- * This is a Mono runtime internal function.
*
- * Returns: a MonoMethodHeader.
+ * Returns: a transient MonoMethodHeader allocated from the heap.
*/
MonoMethodHeader *
mono_metadata_parse_mh (MonoImage *m, const char *ptr)
{
- MonoMethodHeader *res;
-
- mono_loader_lock ();
-
- res = mono_metadata_parse_mh_full (m, NULL, ptr);
-
- mono_loader_unlock ();
-
- return res;
+ return mono_metadata_parse_mh_full (m, NULL, ptr);
}
/*
@@ -4003,8 +4007,7 @@ mono_metadata_typedef_from_method (MonoImage *meta, guint32 index)
* The array of interfaces that the @index typedef token implements is returned in
* @interfaces. The number of elements in the array is returned in @count.
*
- * LOCKING: Assumes the loader lock is held.
- *
+
* Returns: TRUE on success, FALSE on failure.
*/
gboolean
@@ -4054,15 +4057,19 @@ mono_metadata_interfaces_from_typedef_full (MonoImage *meta, guint32 index, Mono
pos = start;
while (pos < tdef->rows) {
+ MonoError error;
MonoClass *iface;
mono_metadata_decode_row (tdef, pos, cols, MONO_INTERFACEIMPL_SIZE);
if (cols [MONO_INTERFACEIMPL_CLASS] != loc.idx)
break;
- iface = mono_class_get_full (
- meta, mono_metadata_token_from_dor (cols [MONO_INTERFACEIMPL_INTERFACE]), context);
- if (iface == NULL)
+ iface = mono_class_get_and_inflate_typespec_checked (
+ meta, mono_metadata_token_from_dor (cols [MONO_INTERFACEIMPL_INTERFACE]), context, &error);
+ if (iface == NULL) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /* FIXME Don't swallow the error */
return FALSE;
+ }
result [pos - start] = iface;
++pos;
}
@@ -4091,9 +4098,7 @@ mono_metadata_interfaces_from_typedef (MonoImage *meta, guint32 index, guint *co
MonoClass **interfaces;
gboolean rv;
- mono_loader_lock ();
rv = mono_metadata_interfaces_from_typedef_full (meta, index, &interfaces, count, TRUE, NULL);
- mono_loader_unlock ();
if (rv)
return interfaces;
else
@@ -4282,8 +4287,6 @@ mono_backtrace (int limit)
}
#endif
-#define abi__alignof__(type) G_STRUCT_OFFSET(struct { char c; type x; }, x)
-
static int i8_align;
/*
@@ -4322,7 +4325,7 @@ mono_type_size (MonoType *t, int *align)
return 0;
}
if (t->byref) {
- *align = abi__alignof__(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
}
@@ -4331,43 +4334,40 @@ mono_type_size (MonoType *t, int *align)
*align = 1;
return 0;
case MONO_TYPE_BOOLEAN:
- *align = abi__alignof__(gint8);
+ *align = MONO_ABI_ALIGNOF (gint8);
return 1;
case MONO_TYPE_I1:
case MONO_TYPE_U1:
- *align = abi__alignof__(gint8);
+ *align = MONO_ABI_ALIGNOF (gint8);
return 1;
case MONO_TYPE_CHAR:
case MONO_TYPE_I2:
case MONO_TYPE_U2:
- *align = abi__alignof__(gint16);
+ *align = MONO_ABI_ALIGNOF (gint16);
return 2;
case MONO_TYPE_I4:
case MONO_TYPE_U4:
- *align = abi__alignof__(gint32);
+ *align = MONO_ABI_ALIGNOF (gint32);
return 4;
case MONO_TYPE_R4:
- *align = abi__alignof__(float);
+ *align = MONO_ABI_ALIGNOF (float);
return 4;
case MONO_TYPE_I8:
case MONO_TYPE_U8:
- if (i8_align)
- *align = i8_align;
- else
- *align = abi__alignof__(gint64);
+ *align = MONO_ABI_ALIGNOF (gint64);
return 8;
case MONO_TYPE_R8:
- *align = abi__alignof__(double);
+ *align = MONO_ABI_ALIGNOF (double);
return 8;
case MONO_TYPE_I:
case MONO_TYPE_U:
- *align = abi__alignof__(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
case MONO_TYPE_STRING:
- *align = abi__alignof__(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
case MONO_TYPE_OBJECT:
- *align = abi__alignof__(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
case MONO_TYPE_VALUETYPE: {
if (t->data.klass->enumtype)
@@ -4380,7 +4380,7 @@ mono_type_size (MonoType *t, int *align)
case MONO_TYPE_PTR:
case MONO_TYPE_FNPTR:
case MONO_TYPE_ARRAY:
- *align = abi__alignof__(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
case MONO_TYPE_TYPEDBYREF:
return mono_class_value_size (mono_defaults.typed_reference_class, (guint32*)align);
@@ -4396,14 +4396,14 @@ mono_type_size (MonoType *t, int *align)
else
return mono_class_value_size (mono_class_from_mono_type (t), (guint32*)align);
} else {
- *align = abi__alignof__(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
}
}
case MONO_TYPE_VAR:
case MONO_TYPE_MVAR:
/* FIXME: Martin, this is wrong. */
- *align = abi__alignof__(gpointer);
+ *align = MONO_ABI_ALIGNOF (gpointer);
return sizeof (gpointer);
default:
g_error ("mono_type_size: type 0x%02x unknown", t->type);
@@ -4430,7 +4430,7 @@ mono_type_stack_size_internal (MonoType *t, int *align, gboolean allow_open)
int tmp;
#if SIZEOF_VOID_P == SIZEOF_REGISTER
int stack_slot_size = sizeof (gpointer);
- int stack_slot_align = abi__alignof__ (gpointer);
+ int stack_slot_align = MONO_ABI_ALIGNOF (gpointer);
#elif SIZEOF_VOID_P < SIZEOF_REGISTER
int stack_slot_size = SIZEOF_REGISTER;
int stack_slot_align = SIZEOF_REGISTER;
@@ -4475,17 +4475,14 @@ mono_type_stack_size_internal (MonoType *t, int *align, gboolean allow_open)
*align = stack_slot_align;
return stack_slot_size * 3;
case MONO_TYPE_R4:
- *align = abi__alignof__(float);
+ *align = MONO_ABI_ALIGNOF (float);
return sizeof (float);
case MONO_TYPE_I8:
case MONO_TYPE_U8:
- if (i8_align)
- *align = i8_align;
- else
- *align = abi__alignof__(gint64);
+ *align = MONO_ABI_ALIGNOF (gint64);
return sizeof (gint64);
case MONO_TYPE_R8:
- *align = abi__alignof__(double);
+ *align = MONO_ABI_ALIGNOF (double);
return sizeof (double);
case MONO_TYPE_VALUETYPE: {
guint32 size;
@@ -4643,7 +4640,7 @@ mono_metadata_type_hash (MonoType *t1)
* This is specially problematic with generic instances since they are
* inserted in a bunch of hash tables before been finished.
*/
- if (class->image->dynamic)
+ if (image_is_dynamic (class->image))
return (t1->byref << 6) | mono_metadata_str_hash (class->name);
return ((hash << 5) - hash) ^ mono_metadata_str_hash (class->name);
}
@@ -5301,6 +5298,7 @@ mono_metadata_implmap_from_method (MonoImage *meta, guint32 method_idx)
/**
* @image: context where the image is created
* @type_spec: typespec token
+ * @deprecated use mono_type_create_from_typespec_checked that has proper error handling
*
* Creates a MonoType representing the TypeSpec indexed by the @type_spec
* token.
@@ -5308,6 +5306,19 @@ mono_metadata_implmap_from_method (MonoImage *meta, guint32 method_idx)
MonoType *
mono_type_create_from_typespec (MonoImage *image, guint32 type_spec)
{
+ MonoError error;
+ MonoType *type = mono_type_create_from_typespec_checked (image, type_spec, &error);
+ if (!type) {
+ mono_loader_set_error_from_mono_error (&error);
+ mono_error_cleanup (&error); /* FIXME don't swallow error*/
+ }
+ return type;
+}
+
+MonoType *
+mono_type_create_from_typespec_checked (MonoImage *image, guint32 type_spec, MonoError *error)
+
+{
guint32 idx = mono_metadata_token_index (type_spec);
MonoTableInfo *t;
guint32 cols [MONO_TYPESPEC_SIZE];
@@ -5315,13 +5326,13 @@ mono_type_create_from_typespec (MonoImage *image, guint32 type_spec)
guint32 len;
MonoType *type, *type2;
- mono_loader_lock ();
+ mono_error_init (error);
+ mono_image_lock (image);
type = g_hash_table_lookup (image->typespec_cache, GUINT_TO_POINTER (type_spec));
- if (type) {
- mono_loader_unlock ();
+ mono_image_unlock (image);
+ if (type)
return type;
- }
t = &image->tables [MONO_TABLE_TYPESPEC];
@@ -5329,7 +5340,7 @@ mono_type_create_from_typespec (MonoImage *image, guint32 type_spec)
ptr = mono_metadata_blob_heap (image, cols [MONO_TYPESPEC_SIGNATURE]);
if (!mono_verifier_verify_typespec_signature (image, cols [MONO_TYPESPEC_SIGNATURE], type_spec, NULL)) {
- mono_loader_unlock ();
+ mono_error_set_bad_image (error, image, "Could not verify type spec %08x.", type_spec);
return NULL;
}
@@ -5337,24 +5348,26 @@ mono_type_create_from_typespec (MonoImage *image, guint32 type_spec)
type = mono_metadata_parse_type_internal (image, NULL, MONO_PARSE_TYPE, 0, TRUE, ptr, &ptr);
if (!type) {
- mono_loader_unlock ();
+ if (mono_loader_get_last_error ())
+ mono_error_set_from_loader_error (error);
+ else
+ mono_error_set_bad_image (error, image, "Could not parse type spec %08x.", type_spec);
return NULL;
}
- type2 = g_hash_table_lookup (image->typespec_cache, GUINT_TO_POINTER (type_spec));
-
- if (type2) {
- mono_loader_unlock ();
- return type2;
- }
-
type2 = mono_metadata_type_dup (image, type);
- g_hash_table_insert (image->typespec_cache, GUINT_TO_POINTER (type_spec), type2);
mono_metadata_free_type (type);
- mono_loader_unlock ();
+ mono_image_lock (image);
+ type = g_hash_table_lookup (image->typespec_cache, GUINT_TO_POINTER (type_spec));
+ /* We might leak some data in the image mempool if found */
+ if (!type) {
+ g_hash_table_insert (image->typespec_cache, GUINT_TO_POINTER (type_spec), type2);
+ type = type2;
+ }
+ mono_image_unlock (image);
- return type2;
+ return type;
}
@@ -5801,7 +5814,7 @@ mono_guid_to_string (const guint8 *guid)
}
static gboolean
-get_constraints (MonoImage *image, int owner, MonoClass ***constraints, MonoGenericContainer *container)
+get_constraints (MonoImage *image, int owner, MonoClass ***constraints, MonoGenericContainer *container, MonoError *error)
{
MonoTableInfo *tdef = &image->tables [MONO_TABLE_GENERICPARAMCONSTRAINT];
guint32 cols [MONO_GENPARCONSTRAINT_SIZE];
@@ -5810,13 +5823,15 @@ get_constraints (MonoImage *image, int owner, MonoClass ***constraints, MonoGene
GSList *cons = NULL, *tmp;
MonoGenericContext *context = &container->context;
+ mono_error_init (error);
+
*constraints = NULL;
found = 0;
for (i = 0; i < tdef->rows; ++i) {
mono_metadata_decode_row (tdef, i, cols, MONO_GENPARCONSTRAINT_SIZE);
if (cols [MONO_GENPARCONSTRAINT_GENERICPAR] == owner) {
token = mono_metadata_token_from_dor (cols [MONO_GENPARCONSTRAINT_CONSTRAINT]);
- klass = mono_class_get_full (image, token, context);
+ klass = mono_class_get_and_inflate_typespec_checked (image, token, context, error);
if (!klass) {
g_slist_free (cons);
return FALSE;
@@ -5895,41 +5910,25 @@ mono_metadata_has_generic_params (MonoImage *image, guint32 token)
* Memory is allocated from IMAGE's mempool.
*/
gboolean
-mono_metadata_load_generic_param_constraints_full (MonoImage *image, guint32 token,
- MonoGenericContainer *container)
+mono_metadata_load_generic_param_constraints_checked (MonoImage *image, guint32 token,
+ MonoGenericContainer *container, MonoError *error)
{
guint32 start_row, i, owner;
+ mono_error_init (error);
+
if (! (start_row = mono_metadata_get_generic_param_row (image, token, &owner)))
return TRUE;
for (i = 0; i < container->type_argc; i++) {
- if (!get_constraints (image, start_row + i, &mono_generic_container_get_param_info (container, i)->constraints, container))
+ if (!get_constraints (image, start_row + i, &mono_generic_container_get_param_info (container, i)->constraints, container, error)) {
+ g_assert (!mono_loader_get_last_error ());
return FALSE;
+ }
}
return TRUE;
}
/*
- * mono_metadata_load_generic_param_constraints:
- *
- * @image: metadata context
- * @token: metadata token to load the contraints, can be methodef or typedef.
- * @container: generic container to load into.
- *
- * Load the generic parameter constraints for the newly created generic type or method
- * represented by @token and @container. The @container is the new container which has
- * been returned by a call to mono_metadata_load_generic_params() with this @token.
- * Memory is allocated from IMAGE's mempool.
- */
-void
-mono_metadata_load_generic_param_constraints (MonoImage *image, guint32 token,
- MonoGenericContainer *container)
-{
- mono_metadata_load_generic_param_constraints_full (image, token, container);
- /*FIXME this function can potentially exit with a pending loader error and cause all sort of havok */
-}
-
-/*
* mono_metadata_load_generic_params:
*
* Load the type parameters from the type or method definition @token.
diff --git a/mono/metadata/method-builder.c b/mono/metadata/method-builder.c
index 0ed15e721aa..cb249148882 100644
--- a/mono/metadata/method-builder.c
+++ b/mono/metadata/method-builder.c
@@ -10,6 +10,7 @@
#include "config.h"
#include "loader.h"
+#include "mono/metadata/abi-details.h"
#include "mono/metadata/method-builder.h"
#include "mono/metadata/tabledefs.h"
#include "mono/metadata/exception.h"
@@ -201,7 +202,7 @@ mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, in
GList *tmp;
void **data;
l = g_list_reverse (mw->method_data);
- if (method->dynamic)
+ if (method_is_dynamic (method))
data = g_malloc (sizeof (gpointer) * (i + 1));
else
data = mono_image_alloc (image, sizeof (gpointer) * (i + 1));
@@ -536,7 +537,7 @@ mono_mb_emit_exception_full (MonoMethodBuilder *mb, const char *exc_nspace, cons
mono_mb_emit_op (mb, CEE_NEWOBJ, ctor);
if (msg != NULL) {
mono_mb_emit_byte (mb, CEE_DUP);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoException, message));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoException, message));
mono_mb_emit_ldstr (mb, (char*)msg);
mono_mb_emit_byte (mb, CEE_STIND_REF);
}
diff --git a/mono/metadata/monitor.c b/mono/metadata/monitor.c
index 9784437db46..d7137099912 100644
--- a/mono/metadata/monitor.c
+++ b/mono/metadata/monitor.c
@@ -12,6 +12,7 @@
#include <glib.h>
#include <string.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/monitor.h>
#include <mono/metadata/threads-types.h>
#include <mono/metadata/exception.h>
@@ -73,18 +74,6 @@ enum {
* an object.
*/
-struct _MonoThreadsSync
-{
- gsize owner; /* thread ID */
- guint32 nest;
-#ifdef HAVE_MOVING_COLLECTOR
- gint32 hash_code;
-#endif
- volatile gint32 entry_count;
- HANDLE entry_sem;
- GSList *wait_list;
- void *data;
-};
typedef struct _MonitorArray MonitorArray;
@@ -94,9 +83,9 @@ struct _MonitorArray {
MonoThreadsSync monitors [MONO_ZERO_LEN_ARRAY];
};
-#define mono_monitor_allocator_lock() EnterCriticalSection (&monitor_mutex)
-#define mono_monitor_allocator_unlock() LeaveCriticalSection (&monitor_mutex)
-static CRITICAL_SECTION monitor_mutex;
+#define mono_monitor_allocator_lock() mono_mutex_lock (&monitor_mutex)
+#define mono_monitor_allocator_unlock() mono_mutex_unlock (&monitor_mutex)
+static mono_mutex_t monitor_mutex;
static MonoThreadsSync *monitor_freelist;
static MonitorArray *monitor_allocated;
static int array_size = 16;
@@ -120,7 +109,7 @@ static __thread gsize tls_pthread_self MONO_TLS_FAST;
void
mono_monitor_init (void)
{
- InitializeCriticalSection (&monitor_mutex);
+ mono_mutex_init_recursive (&monitor_mutex);
}
void
@@ -129,7 +118,7 @@ mono_monitor_cleanup (void)
MonoThreadsSync *mon;
/* MonitorArray *marray, *next = NULL; */
- /*DeleteCriticalSection (&monitor_mutex);*/
+ /*mono_mutex_destroy (&monitor_mutex);*/
/* The monitors on the freelist don't have weak links - mark them */
for (mon = monitor_freelist; mon; mon = mon->data)
@@ -813,7 +802,7 @@ emit_obj_syncp_check (MonoMethodBuilder *mb, int syncp_loc, int *obj_null_branch
/*
ldarg 0 obj
conv.i objp
- ldc.i4 G_STRUCT_OFFSET(MonoObject, synchronisation) objp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoObject, synchronisation) objp off
add &syncp
ldind.i syncp
stloc syncp
@@ -823,7 +812,7 @@ emit_obj_syncp_check (MonoMethodBuilder *mb, int syncp_loc, int *obj_null_branch
mono_mb_emit_byte (mb, CEE_LDARG_0);
mono_mb_emit_byte (mb, CEE_CONV_I);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoObject, synchronisation));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoObject, synchronisation));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, syncp_loc);
@@ -889,7 +878,6 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
static MonoMethod *compare_exchange_method;
int obj_null_branch, true_locktaken_branch = 0, syncp_null_branch, has_owner_branch, other_owner_branch, tid_branch, thin_hash_branch;
int tid_loc, syncp_loc, owner_loc;
- int thread_tls_offset;
gboolean is_v4 = mono_method_signature (monitor_enter_method)->param_count == 2;
int fast_path_idx = is_v4 ? FASTPATH_ENTERV4 : FASTPATH_ENTER;
WrapperInfo *info;
@@ -897,13 +885,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
/* The !is_v4 version is not used/tested */
g_assert (is_v4);
- thread_tls_offset = mono_thread_get_tls_offset ();
- if (thread_tls_offset == -1)
- return NULL;
-
if (monitor_il_fastpaths [fast_path_idx])
return monitor_il_fastpaths [fast_path_idx];
+ if (!mono_get_runtime_callbacks ()->tls_key_supported (TLS_KEY_THREAD))
+ return NULL;
+
if (!compare_exchange_method) {
MonoMethodDesc *desc;
MonoClass *class;
@@ -932,12 +919,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
/*
mono. tls thread_tls_offset threadp
- ldc.i4 G_STRUCT_OFFSET(MonoThread, tid) threadp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThread, tid) threadp off
add &tid
ldind.i tid
stloc tid
ldloc syncp syncp
- ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
add &owner
ldind.i owner
stloc owner
@@ -948,12 +935,12 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_TLS);
mono_mb_emit_i4 (mb, TLS_KEY_THREAD);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoInternalThread, tid));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, tid_loc);
mono_mb_emit_ldloc (mb, syncp_loc);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_stloc (mb, owner_loc);
@@ -962,7 +949,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
/*
ldloc syncp syncp
- ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
add &owner
ldloc tid &owner tid
ldc.i4 0 &owner tid 0
@@ -972,7 +959,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
*/
mono_mb_emit_ldloc (mb, syncp_loc);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_ldloc (mb, tid_loc);
mono_mb_emit_byte (mb, CEE_LDC_I4_0);
@@ -992,7 +979,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
ldloc tid owner tid
brne.s other_owner
ldloc syncp syncp
- ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off
add &nest
dup &nest &nest
ldind.i4 &nest nest
@@ -1007,7 +994,7 @@ mono_monitor_get_fast_enter_method (MonoMethod *monitor_enter_method)
mono_mb_emit_ldloc (mb, tid_loc);
other_owner_branch = mono_mb_emit_short_branch (mb, CEE_BNE_UN_S);
mono_mb_emit_ldloc (mb, syncp_loc);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, nest));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, nest));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_DUP);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
@@ -1061,17 +1048,15 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
MonoMethodBuilder *mb;
MonoMethod *res;
int obj_null_branch, has_waiting_branch, has_syncp_branch, owned_branch, nested_branch, thin_hash_branch;
- int thread_tls_offset;
int syncp_loc;
WrapperInfo *info;
- thread_tls_offset = mono_thread_get_tls_offset ();
- if (thread_tls_offset == -1)
- return NULL;
-
if (monitor_il_fastpaths [FASTPATH_EXIT])
return monitor_il_fastpaths [FASTPATH_EXIT];
+ if (!mono_get_runtime_callbacks ()->tls_key_supported (TLS_KEY_THREAD))
+ return NULL;
+
mb = mono_mb_new (mono_defaults.monitor_class, "FastMonitorExit", MONO_WRAPPER_UNKNOWN);
mb->method->slot = -1;
@@ -1092,11 +1077,11 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
/*
has_syncp:
ldloc syncp syncp
- ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
add &owner
ldind.i owner
mono. tls thread_tls_offset owner threadp
- ldc.i4 G_STRUCT_OFFSET(MonoThread, tid) owner threadp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThread, tid) owner threadp off
add owner &tid
ldind.i owner tid
beq.s owned
@@ -1104,13 +1089,13 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
mono_mb_patch_short_branch (mb, has_syncp_branch);
mono_mb_emit_ldloc (mb, syncp_loc);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
mono_mb_emit_byte (mb, CEE_MONO_TLS);
mono_mb_emit_i4 (mb, TLS_KEY_THREAD);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoInternalThread, tid));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoInternalThread, tid));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
owned_branch = mono_mb_emit_short_branch (mb, CEE_BEQ_S);
@@ -1124,7 +1109,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
/*
owned:
ldloc syncp syncp
- ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, nest) syncp off
add &nest
dup &nest &nest
ldind.i4 &nest nest
@@ -1135,7 +1120,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
mono_mb_patch_short_branch (mb, owned_branch);
mono_mb_emit_ldloc (mb, syncp_loc);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, nest));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, nest));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_DUP);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
@@ -1147,7 +1132,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
pop &nest
pop
ldloc syncp syncp
- ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, entry_count) syncp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, entry_count) syncp off
add &count
ldind.i4 count
brtrue.s has_waiting
@@ -1156,14 +1141,14 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
mono_mb_emit_byte (mb, CEE_POP);
mono_mb_emit_byte (mb, CEE_POP);
mono_mb_emit_ldloc (mb, syncp_loc);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, entry_count));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, entry_count));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I4);
has_waiting_branch = mono_mb_emit_short_branch (mb, CEE_BRTRUE_S);
/*
ldloc syncp syncp
- ldc.i4 G_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
+ ldc.i4 MONO_STRUCT_OFFSET(MonoThreadsSync, owner) syncp off
add &owner
ldnull &owner 0
stind.i
@@ -1171,7 +1156,7 @@ mono_monitor_get_fast_exit_method (MonoMethod *monitor_exit_method)
*/
mono_mb_emit_ldloc (mb, syncp_loc);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoThreadsSync, owner));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoThreadsSync, owner));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDNULL);
mono_mb_emit_byte (mb, CEE_STIND_I);
@@ -1244,9 +1229,9 @@ mono_monitor_threads_sync_members_offset (int *owner_offset, int *nest_offset, i
#define ENCODE_OFF_SIZE(o,s) (((o) << 8) | ((s) & 0xff))
- *owner_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, owner), sizeof (ts.owner));
- *nest_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest));
- *entry_count_offset = ENCODE_OFF_SIZE (G_STRUCT_OFFSET (MonoThreadsSync, entry_count), sizeof (ts.entry_count));
+ *owner_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, owner), sizeof (ts.owner));
+ *nest_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, nest), sizeof (ts.nest));
+ *entry_count_offset = ENCODE_OFF_SIZE (MONO_STRUCT_OFFSET (MonoThreadsSync, entry_count), sizeof (ts.entry_count));
}
gboolean
diff --git a/mono/metadata/monitor.h b/mono/metadata/monitor.h
index 183c2ec0b52..a32780dcdfe 100644
--- a/mono/metadata/monitor.h
+++ b/mono/metadata/monitor.h
@@ -12,10 +12,25 @@
#include <glib.h>
#include <mono/metadata/object.h>
+#include <mono/io-layer/io-layer.h>
#include "mono/utils/mono-compiler.h"
G_BEGIN_DECLS
+struct _MonoThreadsSync
+{
+ gsize owner; /* thread ID */
+ guint32 nest;
+#ifdef HAVE_MOVING_COLLECTOR
+ gint32 hash_code;
+#endif
+ volatile gint32 entry_count;
+ HANDLE entry_sem;
+ GSList *wait_list;
+ void *data;
+};
+
+
MONO_API void mono_locks_dump (gboolean include_untaken);
void mono_monitor_init (void) MONO_INTERNAL;
diff --git a/mono/metadata/mono-config.c b/mono/metadata/mono-config.c
index 5d7d9429b1d..1e85012dd0f 100644
--- a/mono/metadata/mono-config.c
+++ b/mono/metadata/mono-config.c
@@ -357,6 +357,54 @@ legacyUEP_handler = {
NULL, /* finish */
};
+static void
+aot_cache_start (gpointer user_data,
+ const gchar *element_name,
+ const gchar **attribute_names,
+ const gchar **attribute_values)
+{
+ int i;
+ MonoAotCacheConfig *config;
+
+ if (strcmp (element_name, "aotcache") != 0)
+ return;
+
+ config = mono_get_aot_cache_config ();
+
+ /* Per-app configuration */
+ for (i = 0; attribute_names [i]; ++i) {
+ if (!strcmp (attribute_names [i], "app")) {
+ config->apps = g_slist_prepend (config->apps, g_strdup (attribute_values [i]));
+ return;
+ }
+ }
+
+ /* Global configuration */
+ for (i = 0; attribute_names [i]; ++i) {
+ if (!strcmp (attribute_names [i], "assemblies")) {
+ char **parts, **ptr;
+ char *part;
+
+ parts = g_strsplit (attribute_values [i], " ", -1);
+ for (ptr = parts; ptr && *ptr; ptr ++) {
+ part = *ptr;
+ config->assemblies = g_slist_prepend (config->assemblies, g_strdup (part));
+ }
+ g_strfreev (parts);
+ }
+ }
+}
+
+static const MonoParseHandler
+aot_cache_handler = {
+ "aotcache",
+ NULL, /* init */
+ aot_cache_start,
+ NULL, /* text */
+ NULL, /* end */
+ NULL, /* finish */
+};
+
static int inited = 0;
static void
@@ -366,6 +414,7 @@ mono_config_init (void)
config_handlers = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (config_handlers, (gpointer) dllmap_handler.element_name, (gpointer) &dllmap_handler);
g_hash_table_insert (config_handlers, (gpointer) legacyUEP_handler.element_name, (gpointer) &legacyUEP_handler);
+ g_hash_table_insert (config_handlers, (gpointer) aot_cache_handler.element_name, (gpointer) &aot_cache_handler);
}
void
@@ -407,7 +456,6 @@ mono_config_parse_file_with_context (ParseState *state, const char *filename)
if (!g_file_get_contents (filename, &text, &len, NULL))
return 0;
-
offset = 0;
if (len > 3 && text [0] == '\xef' && text [1] == (gchar) '\xbb' && text [2] == '\xbf')
offset = 3; /* Skip UTF-8 BOM */
diff --git a/mono/metadata/mono-debug-debugger.c b/mono/metadata/mono-debug-debugger.c
index 2891c2eb46b..8168b2cf15a 100644
--- a/mono/metadata/mono-debug-debugger.c
+++ b/mono/metadata/mono-debug-debugger.c
@@ -28,7 +28,7 @@
#include <mono/metadata/mono-endian.h>
static guint32 debugger_lock_level = 0;
-static CRITICAL_SECTION debugger_lock_mutex;
+static mono_mutex_t debugger_lock_mutex;
typedef struct
{
@@ -43,7 +43,7 @@ void
mono_debugger_lock (void)
{
g_assert (initialized);
- EnterCriticalSection (&debugger_lock_mutex);
+ mono_mutex_lock (&debugger_lock_mutex);
debugger_lock_level++;
}
@@ -52,13 +52,13 @@ mono_debugger_unlock (void)
{
g_assert (initialized);
debugger_lock_level--;
- LeaveCriticalSection (&debugger_lock_mutex);
+ mono_mutex_unlock (&debugger_lock_mutex);
}
void
mono_debugger_initialize ()
{
- InitializeCriticalSection (&debugger_lock_mutex);
+ mono_mutex_init_recursive (&debugger_lock_mutex);
initialized = 1;
}
diff --git a/mono/metadata/mono-debug.c b/mono/metadata/mono-debug.c
index df012ee8272..5e5173f9323 100644
--- a/mono/metadata/mono-debug.c
+++ b/mono/metadata/mono-debug.c
@@ -639,7 +639,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
g_assert (size < max_size);
total_size = size + sizeof (MonoDebugMethodAddress);
- if (method->dynamic) {
+ if (method_is_dynamic (method)) {
address = g_malloc0 (total_size);
} else {
address = (MonoDebugMethodAddress *) allocate_data_item (
@@ -682,7 +682,7 @@ mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDoma
g_hash_table_insert (table->method_address_hash, method, address);
- if (!method->dynamic)
+ if (!method_is_dynamic (method))
write_data_item (table, (guint8 *) address);
mono_debugger_unlock ();
@@ -700,7 +700,7 @@ mono_debug_remove_method (MonoMethod *method, MonoDomain *domain)
if (!mono_debug_initialized)
return;
- g_assert (method->dynamic);
+ g_assert (method_is_dynamic (method));
mono_debugger_lock ();
diff --git a/mono/metadata/mono-hash.c b/mono/metadata/mono-hash.c
index a5f3ff809ad..49fac50c681 100644
--- a/mono/metadata/mono-hash.c
+++ b/mono/metadata/mono-hash.c
@@ -68,7 +68,7 @@ struct _MonoGHashTable {
#ifdef HAVE_SGEN_GC
static void *table_hash_descr = NULL;
-static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func);
+static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data);
static Slot*
new_slot (MonoGHashTable *hash)
@@ -481,7 +481,7 @@ mono_g_hash_table_print_stats (MonoGHashTable *table)
/* GC marker function */
static void
-mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func)
+mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data)
{
MonoGHashTable *table = (MonoGHashTable*)addr;
Slot *node;
@@ -491,23 +491,23 @@ mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func)
for (i = 0; i < table->table_size; i++) {
for (node = table->table [i]; node; node = node->next) {
if (node->key)
- mark_func (&node->key);
+ mark_func (&node->key, gc_data);
}
}
} else if (table->gc_type == MONO_HASH_VALUE_GC) {
for (i = 0; i < table->table_size; i++) {
for (node = table->table [i]; node; node = node->next) {
if (node->value)
- mark_func (&node->value);
+ mark_func (&node->value, gc_data);
}
}
} else if (table->gc_type == MONO_HASH_KEY_VALUE_GC) {
for (i = 0; i < table->table_size; i++) {
for (node = table->table [i]; node; node = node->next) {
if (node->key)
- mark_func (&node->key);
+ mark_func (&node->key, gc_data);
if (node->value)
- mark_func (&node->value);
+ mark_func (&node->value, gc_data);
}
}
}
diff --git a/mono/metadata/mono-perfcounters.c b/mono/metadata/mono-perfcounters.c
index ec72516a2b3..f28839fa1d2 100644
--- a/mono/metadata/mono-perfcounters.c
+++ b/mono/metadata/mono-perfcounters.c
@@ -147,9 +147,9 @@ enum {
NUM_COUNTERS
};
-static CRITICAL_SECTION perfctr_mutex;
-#define perfctr_lock() EnterCriticalSection (&perfctr_mutex)
-#define perfctr_unlock() LeaveCriticalSection (&perfctr_mutex)
+static mono_mutex_t perfctr_mutex;
+#define perfctr_lock() mono_mutex_lock (&perfctr_mutex)
+#define perfctr_unlock() mono_mutex_unlock (&perfctr_mutex)
typedef struct {
char reserved [16];
@@ -456,7 +456,7 @@ mono_perfcounters_init (void)
d_offset += 7;
d_offset &= ~7;
- InitializeCriticalSection (&perfctr_mutex);
+ mono_mutex_init_recursive (&perfctr_mutex);
shared_area = mono_shared_area ();
shared_area->counters_start = G_STRUCT_OFFSET (MonoSharedArea, counters);
diff --git a/mono/metadata/null-gc.c b/mono/metadata/null-gc.c
index 0715ac9a783..397f3849f3d 100644
--- a/mono/metadata/null-gc.c
+++ b/mono/metadata/null-gc.c
@@ -385,7 +385,7 @@ mono_gc_conservatively_scan_area (void *start, void *end)
}
void *
-mono_gc_scan_object (void *obj)
+mono_gc_scan_object (void *obj, void *gc_data)
{
g_assert_not_reached ();
return NULL;
diff --git a/mono/metadata/object-internals.h b/mono/metadata/object-internals.h
index eea738a1e7c..b690e783e22 100644
--- a/mono/metadata/object-internals.h
+++ b/mono/metadata/object-internals.h
@@ -419,7 +419,7 @@ struct _MonoInternalThread {
gpointer suspend_event;
gpointer suspended_event;
gpointer resume_event;
- CRITICAL_SECTION *synch_cs;
+ mono_mutex_t *synch_cs;
MonoBoolean threadpool_thread;
MonoBoolean thread_dump_requested;
MonoBoolean thread_interrupt_requested;
@@ -596,6 +596,7 @@ typedef struct {
void (*set_cast_details) (MonoClass *from, MonoClass *to);
void (*debug_log) (int level, MonoString *category, MonoString *message);
gboolean (*debug_log_is_enabled) (void);
+ gboolean (*tls_key_supported) (MonoTlsKey key);
} MonoRuntimeCallbacks;
typedef gboolean (*MonoInternalStackWalk) (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer data);
diff --git a/mono/metadata/object-offsets.h b/mono/metadata/object-offsets.h
new file mode 100644
index 00000000000..f50cba1a64b
--- /dev/null
+++ b/mono/metadata/object-offsets.h
@@ -0,0 +1,231 @@
+/*
+This is a parameterized header. It's supposed/ok to be included multiple times.
+
+Input defines: (those to be defined by the includer file)
+
+Required:
+DECL_OFFSET(struct,field)
+DECL_OFFSET2(struct,field,offset)
+DECL_ALIGN(name,type)
+DECL_ALIGN2(name,alignment)
+
+Optional:
+USE_CROSS_COMPILE_OFFSETS - if defined, force the cross compiler offsets to be used, otherwise
+ they will only be used if MONO_CROSS_COMPILE is defined
+
+Output defines:
+
+HAS_CROSS_COMPILER_OFFSETS - if set, it means we found some cross offsets, it doesnt mean we'll use it.
+USED_CROSS_COMPILER_OFFSETS - if set, it means we used the cross offsets
+*/
+
+
+#undef HAS_CROSS_COMPILER_OFFSETS
+#undef USED_CROSS_COMPILER_OFFSETS
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/metadata/object-offsets.h"
+#endif
+
+
+#ifndef USED_CROSS_COMPILER_OFFSETS
+
+DECL_ALIGN(gint8)
+DECL_ALIGN(gint16)
+DECL_ALIGN(gint32)
+DECL_ALIGN(gint64)
+DECL_ALIGN(float)
+DECL_ALIGN(double)
+DECL_ALIGN(gpointer)
+
+#ifndef DISABLE_METADATA_OFFSETS
+//object offsets
+DECL_OFFSET(MonoObject, vtable)
+DECL_OFFSET(MonoObject, synchronisation)
+
+DECL_OFFSET(MonoClass, interface_bitmap)
+DECL_OFFSET(MonoClass, byval_arg)
+DECL_OFFSET(MonoClass, cast_class)
+DECL_OFFSET(MonoClass, element_class)
+DECL_OFFSET(MonoClass, idepth)
+DECL_OFFSET(MonoClass, instance_size)
+DECL_OFFSET(MonoClass, interface_id)
+DECL_OFFSET(MonoClass, max_interface_id)
+DECL_OFFSET(MonoClass, parent)
+DECL_OFFSET(MonoClass, rank)
+DECL_OFFSET(MonoClass, sizes)
+DECL_OFFSET(MonoClass, supertypes)
+
+DECL_OFFSET(MonoVTable, klass)
+DECL_OFFSET(MonoVTable, max_interface_id)
+DECL_OFFSET(MonoVTable, interface_bitmap)
+DECL_OFFSET(MonoVTable, vtable)
+DECL_OFFSET(MonoVTable, rank)
+DECL_OFFSET(MonoVTable, type)
+DECL_OFFSET(MonoVTable, runtime_generic_context)
+
+DECL_OFFSET(MonoDomain, stack_overflow_ex)
+
+DECL_OFFSET(MonoDelegate, target)
+DECL_OFFSET(MonoDelegate, method_ptr)
+DECL_OFFSET(MonoDelegate, invoke_impl)
+DECL_OFFSET(MonoDelegate, method)
+DECL_OFFSET(MonoDelegate, method_code)
+
+DECL_OFFSET(MonoInternalThread, tid)
+DECL_OFFSET(MonoInternalThread, static_data)
+
+DECL_OFFSET(MonoMulticastDelegate, prev)
+
+DECL_OFFSET(MonoTransparentProxy, rp)
+DECL_OFFSET(MonoTransparentProxy, remote_class)
+DECL_OFFSET(MonoTransparentProxy, custom_type_info)
+
+DECL_OFFSET(MonoRealProxy, target_domain_id)
+DECL_OFFSET(MonoRealProxy, context)
+DECL_OFFSET(MonoRealProxy, unwrapped_server)
+
+DECL_OFFSET(MonoRemoteClass, proxy_class)
+
+DECL_OFFSET(MonoArray, vector)
+DECL_OFFSET(MonoArray, max_length)
+DECL_OFFSET(MonoArray, bounds)
+
+DECL_OFFSET(MonoArrayBounds, lower_bound)
+DECL_OFFSET(MonoArrayBounds, length)
+
+DECL_OFFSET(MonoSafeHandle, handle)
+
+DECL_OFFSET(MonoHandleRef, handle)
+
+DECL_OFFSET(MonoComInteropProxy, com_object)
+
+DECL_OFFSET(MonoString, length)
+DECL_OFFSET(MonoString, chars)
+
+DECL_OFFSET(MonoException, message)
+
+DECL_OFFSET(MonoTypedRef, type)
+DECL_OFFSET(MonoTypedRef, klass)
+DECL_OFFSET(MonoTypedRef, value)
+
+//Internal structs
+DECL_OFFSET(MonoThreadsSync, owner)
+DECL_OFFSET(MonoThreadsSync, nest)
+DECL_OFFSET(MonoThreadsSync, entry_count)
+
+#if defined (HAVE_SGEN_GC) && !defined (HAVE_KW_THREAD)
+DECL_OFFSET(SgenThreadInfo, tlab_next_addr)
+DECL_OFFSET(SgenThreadInfo, tlab_temp_end)
+#endif
+
+#endif //DISABLE METADATA OFFSETS
+
+#ifndef DISABLE_JIT_OFFSETS
+DECL_OFFSET(MonoLMF, previous_lmf)
+
+DECL_OFFSET(MonoMethodRuntimeGenericContext, class_vtable)
+
+DECL_OFFSET(MonoJitTlsData, lmf)
+DECL_OFFSET(MonoJitTlsData, class_cast_from)
+DECL_OFFSET(MonoJitTlsData, class_cast_to)
+DECL_OFFSET(MonoJitTlsData, handler_block_return_address)
+DECL_OFFSET(MonoJitTlsData, restore_stack_prot)
+
+DECL_OFFSET(MonoGSharedVtMethodRuntimeInfo, locals_size)
+DECL_OFFSET(MonoGSharedVtMethodRuntimeInfo, entries) //XXX more to fix here
+
+DECL_OFFSET(MonoContinuation, stack_used_size)
+DECL_OFFSET(MonoContinuation, saved_stack)
+DECL_OFFSET(MonoContinuation, return_sp)
+DECL_OFFSET(MonoContinuation, lmf)
+DECL_OFFSET(MonoContinuation, return_ip)
+
+#ifdef TARGET_X86
+DECL_OFFSET(MonoContext, eax)
+DECL_OFFSET(MonoContext, ebx)
+DECL_OFFSET(MonoContext, ecx)
+DECL_OFFSET(MonoContext, edx)
+DECL_OFFSET(MonoContext, edi)
+DECL_OFFSET(MonoContext, esi)
+DECL_OFFSET(MonoContext, esp)
+DECL_OFFSET(MonoContext, ebp)
+DECL_OFFSET(MonoContext, eip)
+
+DECL_OFFSET(MonoLMF, method)
+DECL_OFFSET(MonoLMF, lmf_addr)
+DECL_OFFSET(MonoLMF, esp)
+DECL_OFFSET(MonoLMF, ebx)
+DECL_OFFSET(MonoLMF, edi)
+DECL_OFFSET(MonoLMF, esi)
+DECL_OFFSET(MonoLMF, ebp)
+DECL_OFFSET(MonoLMF, eip)
+#endif
+
+#ifdef TARGET_ARM
+DECL_OFFSET (MonoContext, pc)
+DECL_OFFSET (MonoContext, regs)
+DECL_OFFSET (MonoContext, fregs)
+
+DECL_OFFSET(MonoLMF, method)
+DECL_OFFSET(MonoLMF, lmf_addr)
+DECL_OFFSET(MonoLMF, sp)
+DECL_OFFSET(MonoLMF, fp)
+DECL_OFFSET(MonoLMF, ip)
+DECL_OFFSET(MonoLMF, iregs)
+DECL_OFFSET(MonoLMF, fregs)
+
+DECL_OFFSET(SeqPointInfo, bp_addrs)
+DECL_OFFSET(SeqPointInfo, ss_trigger_page)
+
+DECL_OFFSET(DynCallArgs, res)
+DECL_OFFSET(DynCallArgs, res2)
+#endif
+
+#ifdef TARGET_AMD64
+DECL_OFFSET(MonoContext, rax)
+DECL_OFFSET(MonoContext, rcx)
+DECL_OFFSET(MonoContext, rdx)
+DECL_OFFSET(MonoContext, rbx)
+DECL_OFFSET(MonoContext, rbp)
+DECL_OFFSET(MonoContext, rsi)
+DECL_OFFSET(MonoContext, rdi)
+DECL_OFFSET(MonoContext, rsp)
+DECL_OFFSET(MonoContext, r8)
+DECL_OFFSET(MonoContext, r9)
+DECL_OFFSET(MonoContext, r10)
+DECL_OFFSET(MonoContext, r12)
+DECL_OFFSET(MonoContext, r13)
+DECL_OFFSET(MonoContext, r14)
+DECL_OFFSET(MonoContext, r15)
+DECL_OFFSET(MonoContext, rip)
+
+#ifdef TARGET_WIN32
+DECL_OFFSET(MonoLMF, lmf_addr)
+#endif
+
+DECL_OFFSET(MonoLMF, rsp)
+DECL_OFFSET(MonoLMF, rbp)
+DECL_OFFSET(MonoLMF, rip)
+
+DECL_OFFSET(SeqPointInfo, bp_addrs)
+DECL_OFFSET(DynCallArgs, res)
+DECL_OFFSET(SeqPointInfo, ss_trigger_page)
+
+DECL_OFFSET(MonoLMFTramp, regs)
+DECL_OFFSET(MonoLMFTramp, lmf_addr)
+
+#endif
+
+DECL_OFFSET(MonoDelegateTrampInfo, invoke_impl)
+DECL_OFFSET(MonoDelegateTrampInfo, method_ptr)
+
+#endif
+
+#endif
+
+#undef DECL_OFFSET
+#undef DECL_OFFSET2
+#undef DECL_ALIGN
+#undef DECL_ALIGN2
+#undef USE_CROSS_COMPILE_OFFSETS
diff --git a/mono/metadata/object.c b/mono/metadata/object.c
index 7434a69448b..a2aa759293b 100644
--- a/mono/metadata/object.c
+++ b/mono/metadata/object.c
@@ -88,9 +88,9 @@ static char *
mono_string_to_utf8_internal (MonoMemPool *mp, MonoImage *image, MonoString *s, gboolean ignore_error, MonoError *error);
-#define ldstr_lock() EnterCriticalSection (&ldstr_section)
-#define ldstr_unlock() LeaveCriticalSection (&ldstr_section)
-static CRITICAL_SECTION ldstr_section;
+#define ldstr_lock() mono_mutex_lock (&ldstr_section)
+#define ldstr_unlock() mono_mutex_unlock (&ldstr_section)
+static mono_mutex_t ldstr_section;
static gboolean profile_allocs = TRUE;
@@ -137,13 +137,13 @@ typedef struct
guint32 initializing_tid;
guint32 waiting_count;
gboolean done;
- CRITICAL_SECTION initialization_section;
+ mono_mutex_t initialization_section;
} TypeInitializationLock;
/* for locking access to type_initialization_hash and blocked_thread_hash */
-#define mono_type_initialization_lock() EnterCriticalSection (&type_initialization_section)
-#define mono_type_initialization_unlock() LeaveCriticalSection (&type_initialization_section)
-static CRITICAL_SECTION type_initialization_section;
+#define mono_type_initialization_lock() mono_mutex_lock (&type_initialization_section)
+#define mono_type_initialization_unlock() mono_mutex_unlock (&type_initialization_section)
+static mono_mutex_t type_initialization_section;
/* from vtable to lock */
static GHashTable *type_initialization_hash;
@@ -188,10 +188,10 @@ mono_thread_get_main (void)
void
mono_type_initialization_init (void)
{
- InitializeCriticalSection (&type_initialization_section);
+ mono_mutex_init_recursive (&type_initialization_section);
type_initialization_hash = g_hash_table_new (NULL, NULL);
blocked_thread_hash = g_hash_table_new (NULL, NULL);
- InitializeCriticalSection (&ldstr_section);
+ mono_mutex_init_recursive (&ldstr_section);
}
void
@@ -201,11 +201,11 @@ mono_type_initialization_cleanup (void)
/* This is causing race conditions with
* mono_release_type_locks
*/
- DeleteCriticalSection (&type_initialization_section);
+ mono_mutex_destroy (&type_initialization_section);
g_hash_table_destroy (type_initialization_hash);
type_initialization_hash = NULL;
#endif
- DeleteCriticalSection (&ldstr_section);
+ mono_mutex_destroy (&ldstr_section);
g_hash_table_destroy (blocked_thread_hash);
blocked_thread_hash = NULL;
@@ -287,8 +287,19 @@ mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception)
if (!klass->image->checked_module_cctor) {
mono_image_check_for_module_cctor (klass->image);
if (klass->image->has_module_cctor) {
- MonoClass *module_klass = mono_class_get (klass->image, MONO_TOKEN_TYPE_DEF | 1);
- MonoVTable *module_vtable = mono_class_vtable_full (vtable->domain, module_klass, raise_exception);
+ MonoError error;
+ MonoClass *module_klass;
+ MonoVTable *module_vtable;
+
+ module_klass = mono_class_get_checked (klass->image, MONO_TOKEN_TYPE_DEF | 1, &error);
+ if (!module_klass) {
+ exc = mono_error_convert_to_exception (&error);
+ if (raise_exception)
+ mono_raise_exception (exc);
+ return exc;
+ }
+
+ module_vtable = mono_class_vtable_full (vtable->domain, module_klass, raise_exception);
if (!module_vtable)
return NULL;
exc = mono_runtime_class_init_full (module_vtable, raise_exception);
@@ -334,12 +345,12 @@ mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception)
}
}
lock = g_malloc (sizeof(TypeInitializationLock));
- InitializeCriticalSection (&lock->initialization_section);
+ mono_mutex_init_recursive (&lock->initialization_section);
lock->initializing_tid = tid;
lock->waiting_count = 1;
lock->done = FALSE;
/* grab the vtable lock while this thread still owns type_initialization_section */
- EnterCriticalSection (&lock->initialization_section);
+ mono_mutex_lock (&lock->initialization_section);
g_hash_table_insert (type_initialization_hash, vtable, lock);
do_initialization = 1;
} else {
@@ -404,11 +415,11 @@ mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception)
if (last_domain)
mono_domain_set (last_domain, TRUE);
lock->done = TRUE;
- LeaveCriticalSection (&lock->initialization_section);
+ mono_mutex_unlock (&lock->initialization_section);
} else {
/* this just blocks until the initializing thread is done */
- EnterCriticalSection (&lock->initialization_section);
- LeaveCriticalSection (&lock->initialization_section);
+ mono_mutex_lock (&lock->initialization_section);
+ mono_mutex_unlock (&lock->initialization_section);
}
mono_type_initialization_lock ();
@@ -416,7 +427,7 @@ mono_runtime_class_init_full (MonoVTable *vtable, gboolean raise_exception)
g_hash_table_remove (blocked_thread_hash, GUINT_TO_POINTER (tid));
--lock->waiting_count;
if (lock->waiting_count == 0) {
- DeleteCriticalSection (&lock->initialization_section);
+ mono_mutex_destroy (&lock->initialization_section);
g_hash_table_remove (type_initialization_hash, vtable);
g_free (lock);
}
@@ -452,10 +463,10 @@ gboolean release_type_locks (gpointer key, gpointer value, gpointer user)
* and get_type_init_exception_for_class () needs to be aware of this.
*/
vtable->init_failed = 1;
- LeaveCriticalSection (&lock->initialization_section);
+ mono_mutex_unlock (&lock->initialization_section);
--lock->waiting_count;
if (lock->waiting_count == 0) {
- DeleteCriticalSection (&lock->initialization_section);
+ mono_mutex_destroy (&lock->initialization_section);
g_free (lock);
return TRUE;
}
@@ -1350,6 +1361,9 @@ build_imt_slots (MonoClass *klass, MonoVTable *vt, MonoDomain *domain, gpointer*
int method_slot_in_interface;
for (method_slot_in_interface = 0; method_slot_in_interface < iface->method.count; method_slot_in_interface++) {
MonoMethod *method = mono_class_get_method_by_index (iface, method_slot_in_interface);
+
+ if (method->is_generic)
+ has_generic_virtual = TRUE;
add_imt_builder_entry (imt_builder, method, &imt_collisions_bitmap, interface_offset + method_slot_in_interface, slot_num);
}
interface_offset += iface->method.count;
@@ -4593,9 +4607,11 @@ mono_class_get_allocation_ftn (MonoVTable *vtable, gboolean for_box, gboolean *p
MonoObject *
mono_object_new_from_token (MonoDomain *domain, MonoImage *image, guint32 token)
{
+ MonoError error;
MonoClass *class;
- class = mono_class_get (image, token);
+ class = mono_class_get_checked (image, token, &error);
+ g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
return mono_object_new (domain, class);
}
@@ -4978,6 +4994,39 @@ mono_string_new_utf16 (MonoDomain *domain, const guint16 *text, gint32 len)
}
/**
+ * mono_string_new_utf32:
+ * @text: a pointer to an utf32 string
+ * @len: the length of the string
+ *
+ * Returns: A newly created string object which contains @text.
+ */
+MonoString *
+mono_string_new_utf32 (MonoDomain *domain, const mono_unichar4 *text, gint32 len)
+{
+ MonoString *s;
+ mono_unichar2 *utf16_output = NULL;
+ gint32 utf16_len = 0;
+ GError *error = NULL;
+ glong items_written;
+
+ utf16_output = g_ucs4_to_utf16 (text, len, NULL, &items_written, &error);
+
+ if (error)
+ g_error_free (error);
+
+ while (utf16_output [utf16_len]) utf16_len++;
+
+ s = mono_string_new_size (domain, utf16_len);
+ g_assert (s != NULL);
+
+ memcpy (mono_string_chars (s), utf16_output, utf16_len * 2);
+
+ g_free (utf16_output);
+
+ return s;
+}
+
+/**
* mono_string_new_size:
* @text: a pointer to an utf16 string
* @len: the length of the string
@@ -5686,6 +5735,31 @@ mono_string_to_utf16 (MonoString *s)
}
/**
+ * mono_string_to_utf32:
+ * @s: a MonoString
+ *
+ * Return an null-terminated array of the UTF-32 (UCS-4) chars
+ * contained in @s. The result must be freed with g_free().
+ */
+mono_unichar4*
+mono_string_to_utf32 (MonoString *s)
+{
+ mono_unichar4 *utf32_output = NULL;
+ GError *error = NULL;
+ glong items_written;
+
+ if (s == NULL)
+ return NULL;
+
+ utf32_output = g_utf16_to_ucs4 (s->chars, s->length, NULL, &items_written, &error);
+
+ if (error)
+ g_error_free (error);
+
+ return utf32_output;
+}
+
+/**
* mono_string_from_utf16:
* @data: the UTF16 string (LPWSTR) to convert
*
@@ -5707,6 +5781,37 @@ mono_string_from_utf16 (gunichar2 *data)
return mono_string_new_utf16 (domain, data, len);
}
+/**
+ * mono_string_from_utf32:
+ * @data: the UTF32 string (LPWSTR) to convert
+ *
+ * Converts a UTF32 (UCS-4)to a MonoString.
+ *
+ * Returns: a MonoString.
+ */
+MonoString *
+mono_string_from_utf32 (mono_unichar4 *data)
+{
+ MonoString* result = NULL;
+ mono_unichar2 *utf16_output = NULL;
+ GError *error = NULL;
+ glong items_written;
+ int len = 0;
+
+ if (!data)
+ return NULL;
+
+ while (data [len]) len++;
+
+ utf16_output = g_ucs4_to_utf16 (data, len, NULL, &items_written, &error);
+
+ if (error)
+ g_error_free (error);
+
+ result = mono_string_from_utf16 (utf16_output);
+ g_free (utf16_output);
+ return result;
+}
static char *
mono_string_to_utf8_internal (MonoMemPool *mp, MonoImage *image, MonoString *s, gboolean ignore_error, MonoError *error)
diff --git a/mono/metadata/object.h b/mono/metadata/object.h
index 8a62a1e10e7..82e84ec8fd4 100644
--- a/mono/metadata/object.h
+++ b/mono/metadata/object.h
@@ -127,6 +127,9 @@ mono_string_new_wrapper (const char *text);
MONO_API MonoString*
mono_string_new_len (MonoDomain *domain, const char *text, unsigned int length);
+MONO_API MonoString*
+mono_string_new_utf32 (MonoDomain *domain, const mono_unichar4 *text, int32_t len);
+
MONO_API char *
mono_string_to_utf8 (MonoString *string_obj);
@@ -136,9 +139,15 @@ mono_string_to_utf8_checked (MonoString *string_obj, MonoError *error);
MONO_API mono_unichar2 *
mono_string_to_utf16 (MonoString *string_obj);
+MONO_API mono_unichar4 *
+mono_string_to_utf32 (MonoString *string_obj);
+
MONO_API MonoString *
mono_string_from_utf16 (mono_unichar2 *data);
+MONO_API MonoString *
+mono_string_from_utf32 (mono_unichar4 *data);
+
MONO_API mono_bool
mono_string_equal (MonoString *s1, MonoString *s2);
diff --git a/mono/metadata/process.c b/mono/metadata/process.c
index 658c43375e1..c9e0f8bf63b 100755..100644
--- a/mono/metadata/process.c
+++ b/mono/metadata/process.c
@@ -23,9 +23,6 @@
#include <mono/utils/strenc.h>
#include <mono/utils/mono-proclib.h>
#include <mono/io-layer/io-layer.h>
-#if defined (MINGW_CROSS_COMPILE) && defined (HAVE_GETPROCESSID)
-#undef HAVE_GETPROCESSID
-#endif
#ifndef HAVE_GETPROCESSID
#if defined(_MSC_VER) || defined(HAVE_WINTERNL_H)
#include <winternl.h>
diff --git a/mono/metadata/profiler.c b/mono/metadata/profiler.c
index ea779238aa0..53f8ff0c907 100644
--- a/mono/metadata/profiler.c
+++ b/mono/metadata/profiler.c
@@ -103,9 +103,9 @@ struct _ProfilerDesc {
static ProfilerDesc *prof_list = NULL;
-#define mono_profiler_coverage_lock() EnterCriticalSection (&profiler_coverage_mutex)
-#define mono_profiler_coverage_unlock() LeaveCriticalSection (&profiler_coverage_mutex)
-static CRITICAL_SECTION profiler_coverage_mutex;
+#define mono_profiler_coverage_lock() mono_mutex_lock (&profiler_coverage_mutex)
+#define mono_profiler_coverage_unlock() mono_mutex_unlock (&profiler_coverage_mutex)
+static mono_mutex_t profiler_coverage_mutex;
/* this is directly accessible to other mono libs.
* It is the ORed value of all the profiler's events.
@@ -128,7 +128,7 @@ mono_profiler_install (MonoProfiler *prof, MonoProfileFunc callback)
{
ProfilerDesc *desc = g_new0 (ProfilerDesc, 1);
if (!prof_list)
- InitializeCriticalSection (&profiler_coverage_mutex);
+ mono_mutex_init_recursive (&profiler_coverage_mutex);
desc->profiler = prof;
desc->shutdown_callback = callback;
desc->next = prof_list;
diff --git a/mono/metadata/reflection-internals.h b/mono/metadata/reflection-internals.h
index 4b32053f951..be3b1fd0d51 100644
--- a/mono/metadata/reflection-internals.h
+++ b/mono/metadata/reflection-internals.h
@@ -11,4 +11,4 @@
MonoObject*
mono_custom_attrs_get_attr_checked (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass, MonoError *error) MONO_INTERNAL;
-#endif \ No newline at end of file
+#endif
diff --git a/mono/metadata/reflection.c b/mono/metadata/reflection.c
index 089867768b9..3ea728173df 100644
--- a/mono/metadata/reflection.c
+++ b/mono/metadata/reflection.c
@@ -1673,7 +1673,7 @@ type_get_qualified_name (MonoType *type, MonoAssembly *ass) {
if (!klass)
return mono_type_get_name_full (type, MONO_TYPE_NAME_FORMAT_REFLECTION);
ta = klass->image->assembly;
- if (ta->dynamic || (ta == ass)) {
+ if (assembly_is_dynamic (ta) || (ta == ass)) {
if (klass->generic_class || klass->generic_container)
/* For generic type definitions, we want T, while REFLECTION returns T<K> */
return mono_type_get_name_full (type, MONO_TYPE_NAME_FORMAT_FULL_NAME);
@@ -1702,8 +1702,10 @@ fieldref_encode_signature (MonoDynamicImage *assembly, MonoImage *field_image, M
if (type->num_mods) {
for (i = 0; i < type->num_mods; ++i) {
if (field_image) {
- MonoClass *class = mono_class_get (field_image, type->modifiers [i].token);
- g_assert (class);
+ MonoError error;
+ MonoClass *class = mono_class_get_checked (field_image, type->modifiers [i].token, &error);
+ g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
+
token = mono_image_typedef_or_ref (assembly, &class->byval_arg);
} else {
token = type->modifiers [i].token;
@@ -2246,7 +2248,7 @@ resolution_scope_from_image (MonoDynamicImage *assembly, MonoImage *image)
if ((token = GPOINTER_TO_UINT (g_hash_table_lookup (assembly->handleref, image))))
return token;
- if (image->assembly->dynamic && (image->assembly == assembly->image.assembly)) {
+ if (assembly_is_dynamic (image->assembly) && (image->assembly == assembly->image.assembly)) {
table = &assembly->tables [MONO_TABLE_MODULEREF];
token = table->next_idx ++;
table->rows ++;
@@ -2254,14 +2256,14 @@ resolution_scope_from_image (MonoDynamicImage *assembly, MonoImage *image)
values = table->values + token * MONO_MODULEREF_SIZE;
values [MONO_MODULEREF_NAME] = string_heap_insert (&assembly->sheap, image->module_name);
- token <<= MONO_RESOLTION_SCOPE_BITS;
- token |= MONO_RESOLTION_SCOPE_MODULEREF;
+ token <<= MONO_RESOLUTION_SCOPE_BITS;
+ token |= MONO_RESOLUTION_SCOPE_MODULEREF;
g_hash_table_insert (assembly->handleref, image, GUINT_TO_POINTER (token));
return token;
}
- if (image->assembly->dynamic)
+ if (assembly_is_dynamic (image->assembly))
/* FIXME: */
memset (cols, 0, sizeof (cols));
else {
@@ -2297,8 +2299,8 @@ resolution_scope_from_image (MonoDynamicImage *assembly, MonoImage *image)
} else {
values [MONO_ASSEMBLYREF_PUBLIC_KEY] = 0;
}
- token <<= MONO_RESOLTION_SCOPE_BITS;
- token |= MONO_RESOLTION_SCOPE_ASSEMBLYREF;
+ token <<= MONO_RESOLUTION_SCOPE_BITS;
+ token |= MONO_RESOLUTION_SCOPE_ASSEMBLYREF;
g_hash_table_insert (assembly->handleref, image, GUINT_TO_POINTER (token));
return token;
}
@@ -2388,7 +2390,7 @@ mono_image_typedef_or_ref_full (MonoDynamicImage *assembly, MonoType *type, gboo
enclosing = mono_image_typedef_or_ref_full (assembly, &klass->nested_in->byval_arg, FALSE);
/* get the typeref idx of the enclosing type */
enclosing >>= MONO_TYPEDEFORREF_BITS;
- scope = (enclosing << MONO_RESOLTION_SCOPE_BITS) | MONO_RESOLTION_SCOPE_TYPEREF;
+ scope = (enclosing << MONO_RESOLUTION_SCOPE_BITS) | MONO_RESOLUTION_SCOPE_TYPEREF;
} else {
scope = resolution_scope_from_image (assembly, klass->image);
}
@@ -3687,7 +3689,7 @@ mono_image_fill_file_table (MonoDomain *domain, MonoReflectionModule *module, Mo
values = table->values + table->next_idx * MONO_FILE_SIZE;
values [MONO_FILE_FLAGS] = FILE_CONTAINS_METADATA;
values [MONO_FILE_NAME] = string_heap_insert (&assembly->sheap, module->image->module_name);
- if (module->image->dynamic) {
+ if (image_is_dynamic (module->image)) {
/* This depends on the fact that the main module is emitted last */
dir = mono_string_to_utf8 (((MonoReflectionModuleBuilder*)module)->assemblyb->dir);
path = g_strdup_printf ("%s%c%s", dir, G_DIR_SEPARATOR, module->image->module_name);
@@ -3798,7 +3800,9 @@ mono_image_fill_export_table_from_module (MonoDomain *domain, MonoReflectionModu
t = &image->tables [MONO_TABLE_TYPEDEF];
for (i = 0; i < t->rows; ++i) {
- MonoClass *klass = mono_class_get (image, mono_metadata_make_token (MONO_TABLE_TYPEDEF, i + 1));
+ MonoError error;
+ MonoClass *klass = mono_class_get_checked (image, mono_metadata_make_token (MONO_TABLE_TYPEDEF, i + 1), &error);
+ g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
if (klass->flags & TYPE_ATTRIBUTE_PUBLIC)
mono_image_fill_export_table_from_class (domain, klass, module_index, 0, assembly);
@@ -3820,8 +3824,8 @@ add_exported_type (MonoReflectionAssemblyBuilder *assemblyb, MonoDynamicImage *a
forwarder = FALSE;
} else {
scope = resolution_scope_from_image (assembly, klass->image);
- g_assert ((scope & MONO_RESOLTION_SCOPE_MASK) == MONO_RESOLTION_SCOPE_ASSEMBLYREF);
- scope_idx = scope >> MONO_RESOLTION_SCOPE_BITS;
+ g_assert ((scope & MONO_RESOLUTION_SCOPE_MASK) == MONO_RESOLUTION_SCOPE_ASSEMBLYREF);
+ scope_idx = scope >> MONO_RESOLUTION_SCOPE_BITS;
impl = (scope_idx << MONO_IMPLEMENTATION_BITS) + MONO_IMPLEMENTATION_ASSEMBLYREF;
}
@@ -6463,7 +6467,7 @@ mono_type_get_object (MonoDomain *domain, MonoType *type)
* We cannot do this for TypeBuilders as mono_reflection_create_runtime_class expects
* that the resulting object is different.
*/
- if (type == &klass->byval_arg && !klass->image->dynamic) {
+ if (type == &klass->byval_arg && !image_is_dynamic (klass->image)) {
MonoVTable *vtable = mono_class_try_get_vtable (domain, klass);
if (vtable && vtable->type)
return vtable->type;
@@ -6619,7 +6623,7 @@ void
mono_method_clear_object (MonoDomain *domain, MonoMethod *method)
{
MonoClass *klass;
- g_assert (method->dynamic);
+ g_assert (method_is_dynamic (method));
klass = method->klass;
while (klass) {
@@ -6921,7 +6925,7 @@ mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
int i;
/* for compatibility with .net */
- if (method->dynamic)
+ if (method_is_dynamic (method))
mono_raise_exception (mono_get_exception_invalid_operation (NULL));
if (!System_Reflection_MethodBody)
@@ -6942,7 +6946,7 @@ mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
image = method->klass->image;
header = mono_method_get_header (method);
- if (!image->dynamic) {
+ if (!image_is_dynamic (image)) {
/* Obtain local vars signature token */
method_rva = mono_metadata_decode_row_col (&image->tables [MONO_TABLE_METHOD], mono_metadata_token_index (method->token) - 1, MONO_METHOD_RVA);
ptr = mono_image_rva_map (image, method_rva);
@@ -7052,7 +7056,7 @@ get_default_param_value_blobs (MonoMethod *method, char **blobs, guint32 *types)
mono_class_init (klass);
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
MonoReflectionMethodAux *aux;
if (method->is_inflated)
method = ((MonoMethodInflated*)method)->declaring;
@@ -7487,10 +7491,13 @@ mono_reflection_get_type_internal (MonoImage *rootimage, MonoImage* image, MonoT
if (!image)
image = mono_defaults.corlib;
- if (ignorecase)
- klass = mono_class_from_name_case (image, info->name_space, info->name);
- else
+ if (ignorecase) {
+ MonoError error;
+ klass = mono_class_from_name_case_checked (image, info->name_space, info->name, &error);
+ g_assert (mono_error_ok (&error)); /* FIXME Don't swallow the error */
+ } else {
klass = mono_class_from_name (image, info->name_space, info->name);
+ }
if (!klass)
return NULL;
for (mod = info->nested; mod; mod = mod->next) {
@@ -7582,7 +7589,7 @@ mono_reflection_get_type_internal_dynamic (MonoImage *rootimage, MonoAssembly *a
MonoType *type;
int i;
- g_assert (assembly->dynamic);
+ g_assert (assembly_is_dynamic (assembly));
abuilder = (MonoReflectionAssemblyBuilder*)mono_assembly_get_object (((MonoDynamicAssembly*)assembly)->domain, assembly);
/* Enumerate all modules */
@@ -7617,7 +7624,7 @@ mono_reflection_get_type_with_rootimage (MonoImage *rootimage, MonoImage* image,
GString *fullName;
GList *mod;
- if (image && image->dynamic)
+ if (image && image_is_dynamic (image))
type = mono_reflection_get_type_internal_dynamic (rootimage, image->assembly, info, ignorecase);
else
type = mono_reflection_get_type_internal (rootimage, image, info, ignorecase);
@@ -7644,7 +7651,7 @@ mono_reflection_get_type_with_rootimage (MonoImage *rootimage, MonoImage* image,
assembly = mono_domain_try_type_resolve ( mono_domain_get (), fullName->str, NULL);
if (assembly) {
- if (assembly->assembly->dynamic)
+ if (assembly_is_dynamic (assembly->assembly))
type = mono_reflection_get_type_internal_dynamic (rootimage, assembly->assembly, info, ignorecase);
else
type = mono_reflection_get_type_internal (rootimage, assembly->assembly->image,
@@ -8735,7 +8742,7 @@ mono_custom_attrs_from_method (MonoMethod *method)
if (method->is_inflated)
method = ((MonoMethodInflated *) method)->declaring;
- if (method->dynamic || method->klass->image->dynamic)
+ if (method_is_dynamic (method) || image_is_dynamic (method->klass->image))
return lookup_custom_attr (method->klass->image, method);
if (!method->token)
@@ -8756,7 +8763,7 @@ mono_custom_attrs_from_class (MonoClass *klass)
if (klass->generic_class)
klass = klass->generic_class->container_class;
- if (klass->image->dynamic)
+ if (image_is_dynamic (klass->image))
return lookup_custom_attr (klass->image, klass);
if (klass->byval_arg.type == MONO_TYPE_VAR || klass->byval_arg.type == MONO_TYPE_MVAR) {
@@ -8776,7 +8783,7 @@ mono_custom_attrs_from_assembly (MonoAssembly *assembly)
{
guint32 idx;
- if (assembly->image->dynamic)
+ if (image_is_dynamic (assembly->image))
return lookup_custom_attr (assembly->image, assembly);
idx = 1; /* there is only one assembly */
idx <<= MONO_CUSTOM_ATTR_BITS;
@@ -8789,7 +8796,7 @@ mono_custom_attrs_from_module (MonoImage *image)
{
guint32 idx;
- if (image->dynamic)
+ if (image_is_dynamic (image))
return lookup_custom_attr (image, image);
idx = 1; /* there is only one module */
idx <<= MONO_CUSTOM_ATTR_BITS;
@@ -8802,7 +8809,7 @@ mono_custom_attrs_from_property (MonoClass *klass, MonoProperty *property)
{
guint32 idx;
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
property = mono_metadata_get_corresponding_property_from_generic_type_definition (property);
return lookup_custom_attr (klass->image, property);
}
@@ -8817,7 +8824,7 @@ mono_custom_attrs_from_event (MonoClass *klass, MonoEvent *event)
{
guint32 idx;
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
event = mono_metadata_get_corresponding_event_from_generic_type_definition (event);
return lookup_custom_attr (klass->image, event);
}
@@ -8831,7 +8838,7 @@ MonoCustomAttrInfo*
mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field)
{
guint32 idx;
- if (klass->image->dynamic) {
+ if (image_is_dynamic (klass->image)) {
field = mono_metadata_get_corresponding_field_from_generic_type_definition (field);
return lookup_custom_attr (klass->image, field);
}
@@ -8868,7 +8875,7 @@ mono_custom_attrs_from_param (MonoMethod *method, guint32 param)
if (method->is_inflated)
method = ((MonoMethodInflated *) method)->declaring;
- if (method->klass->image->dynamic) {
+ if (image_is_dynamic (method->klass->image)) {
MonoCustomAttrInfo *res, *ainfo;
int size;
@@ -9335,7 +9342,7 @@ mono_reflection_register_with_runtime (MonoReflectionType *type)
mono_loader_lock (); /*same locking as mono_type_get_object*/
mono_domain_lock (domain);
- if (!class->image->dynamic) {
+ if (!image_is_dynamic (class->image)) {
mono_class_setup_supertypes (class);
} else {
if (!domain->type_hash)
@@ -9970,7 +9977,7 @@ mono_reflection_setup_internal_class (MonoReflectionTypeBuilder *tb)
mono_class_set_ref_info (klass, tb);
- /* Put into cache so mono_class_get () will find it.
+ /* Put into cache so mono_class_get_checked () will find it.
Skip nested types as those should not be available on the global scope. */
if (!tb->nesting_type)
mono_image_add_to_name_cache (klass->image, klass->name_space, klass->name, tb->table_idx);
@@ -10303,7 +10310,7 @@ reflection_methodbuilder_to_mono_method (MonoClass *klass,
((MonoMethodPInvoke*)m)->piflags = (rmb->native_cc << 8) | (rmb->charset ? (rmb->charset - 1) * 2 : 0) | rmb->extra_flags;
- if (klass->image->dynamic)
+ if (image_is_dynamic (klass->image))
g_hash_table_insert (((MonoDynamicImage*)klass->image)->method_aux_hash, m, method_aux);
mono_loader_unlock ();
@@ -10491,7 +10498,7 @@ reflection_methodbuilder_to_mono_method (MonoClass *klass,
method_aux->param_marshall = specs;
}
- if (klass->image->dynamic && method_aux)
+ if (image_is_dynamic (klass->image) && method_aux)
g_hash_table_insert (((MonoDynamicImage*)klass->image)->method_aux_hash, m, method_aux);
mono_loader_unlock ();
@@ -10561,7 +10568,7 @@ fieldbuilder_to_mono_class_field (MonoClass *klass, MonoReflectionFieldBuilder*
field->type = mono_metadata_type_dup (NULL, mono_reflection_type_get_handle ((MonoReflectionType*)fb->type));
field->type->attrs = fb->attrs;
- g_assert (klass->image->dynamic);
+ g_assert (image_is_dynamic (klass->image));
custom = add_custom_modifiers ((MonoDynamicImage*)klass->image, field->type, fb->modreq, fb->modopt);
g_free (field->type);
field->type = mono_metadata_type_dup (klass->image, custom);
@@ -10701,7 +10708,7 @@ mono_reflection_bind_generic_method_parameters (MonoReflectionMethod *rmethod, M
imethod = (MonoMethodInflated *) inflated;
/*FIXME but I think this is no longer necessary*/
- if (method->klass->image->dynamic) {
+ if (image_is_dynamic (method->klass->image)) {
MonoDynamicImage *image = (MonoDynamicImage*)method->klass->image;
/*
* This table maps metadata structures representing inflated methods/fields
@@ -10750,7 +10757,7 @@ inflate_mono_method (MonoClass *klass, MonoMethod *method, MonoObject *obj)
imethod = (MonoMethodInflated *) mono_class_inflate_generic_method_full (method, klass, context);
}
- if (method->is_generic && method->klass->image->dynamic) {
+ if (method->is_generic && image_is_dynamic (method->klass->image)) {
MonoDynamicImage *image = (MonoDynamicImage*)method->klass->image;
mono_image_lock ((MonoImage*)image);
@@ -10971,7 +10978,7 @@ ensure_runtime_vtable (MonoClass *klass)
MonoReflectionTypeBuilder *tb = mono_class_get_ref_info (klass);
int i, num, j;
- if (!klass->image->dynamic || (!tb && !klass->generic_class) || klass->wastypebuilder)
+ if (!image_is_dynamic (klass->image) || (!tb && !klass->generic_class) || klass->wastypebuilder)
return;
if (klass->parent)
ensure_runtime_vtable (klass->parent);
@@ -11077,7 +11084,7 @@ mono_reflection_get_dynamic_overrides (MonoClass *klass, MonoMethod ***overrides
*overrides = NULL;
*num_overrides = 0;
- g_assert (klass->image->dynamic);
+ g_assert (image_is_dynamic (klass->image));
if (!mono_class_get_ref_info (klass))
return;
@@ -11456,9 +11463,10 @@ mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
klass->has_finalize = 1;
klass->has_finalize_inited = 1;
- /* fool mono_class_setup_parent */
- klass->supertypes = NULL;
mono_class_setup_parent (klass, klass->parent);
+ /* fool mono_class_setup_supertypes */
+ klass->supertypes = NULL;
+ mono_class_setup_supertypes (klass);
mono_class_setup_mono_type (klass);
#if 0
@@ -11801,7 +11809,7 @@ MonoMethodSignature *
mono_reflection_lookup_signature (MonoImage *image, MonoMethod *method, guint32 token)
{
MonoMethodSignature *sig;
- g_assert (image->dynamic);
+ g_assert (image_is_dynamic (image));
sig = g_hash_table_lookup (((MonoDynamicImage*)image)->vararg_aux_hash, GUINT_TO_POINTER (token));
if (sig)
@@ -11853,7 +11861,7 @@ mono_reflection_lookup_dynamic_token (MonoImage *image, guint32 token, gboolean
static void
ensure_complete_type (MonoClass *klass)
{
- if (klass->image->dynamic && !klass->wastypebuilder && mono_class_get_ref_info (klass)) {
+ if (image_is_dynamic (klass->image) && !klass->wastypebuilder && mono_class_get_ref_info (klass)) {
MonoReflectionTypeBuilder *tb = mono_class_get_ref_info (klass);
mono_domain_try_type_resolve (mono_domain_get (), NULL, (MonoObject*)tb);
@@ -12787,3 +12795,17 @@ mono_reflection_type_get_type (MonoReflectionType *reftype)
return mono_reflection_type_get_handle (reftype);
}
+/**
+ * mono_reflection_assembly_get_assembly:
+ * @refassembly: the System.Reflection.Assembly object
+ *
+ * Returns the MonoAssembly* associated with the C# System.Reflection.Assembly object @refassembly.
+ */
+MonoAssembly*
+mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly)
+{
+ g_assert (refassembly);
+
+ return refassembly->assembly;
+}
+
diff --git a/mono/metadata/reflection.h b/mono/metadata/reflection.h
index 0301342806f..a0808099593 100644
--- a/mono/metadata/reflection.h
+++ b/mono/metadata/reflection.h
@@ -134,6 +134,8 @@ MONO_API MonoBoolean mono_declsec_get_assembly_action (MonoAssembly *assembly, u
MONO_API MonoType* mono_reflection_type_get_type (MonoReflectionType *reftype);
+MONO_API MonoAssembly* mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly);
+
MONO_END_DECLS
#endif /* __METADATA_REFLECTION_H__ */
diff --git a/mono/metadata/row-indexes.h b/mono/metadata/row-indexes.h
index 4b4ca6dbc96..74fbf6b35c5 100644
--- a/mono/metadata/row-indexes.h
+++ b/mono/metadata/row-indexes.h
@@ -420,6 +420,16 @@ enum {
};
enum {
+ MONO_RESOLUTION_SCOPE_MODULE,
+ MONO_RESOLUTION_SCOPE_MODULEREF,
+ MONO_RESOLUTION_SCOPE_ASSEMBLYREF,
+ MONO_RESOLUTION_SCOPE_TYPEREF,
+ MONO_RESOLUTION_SCOPE_BITS = 2,
+ MONO_RESOLUTION_SCOPE_MASK = 3
+};
+
+/* Kept for compatibility since this is a public header file */
+enum {
MONO_RESOLTION_SCOPE_MODULE,
MONO_RESOLTION_SCOPE_MODULEREF,
MONO_RESOLTION_SCOPE_ASSEMBLYREF,
diff --git a/mono/metadata/sgen-alloc.c b/mono/metadata/sgen-alloc.c
index 7ac72db6df0..d9a52e9b195 100644
--- a/mono/metadata/sgen-alloc.c
+++ b/mono/metadata/sgen-alloc.c
@@ -45,6 +45,7 @@
#include "metadata/profiler-private.h"
#include "metadata/marshal.h"
#include "metadata/method-builder.h"
+#include "metadata/abi-details.h"
#include "utils/mono-memory-model.h"
#include "utils/mono-counters.h"
@@ -117,13 +118,13 @@ alloc_degraded (MonoVTable *vtable, size_t size, gboolean for_mature)
void *p;
if (!for_mature) {
- if (last_major_gc_warned < stat_major_gcs) {
+ if (last_major_gc_warned < gc_stats.major_gc_count) {
++num_degraded;
if (num_degraded == 1 || num_degraded == 3)
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "Warning: Degraded allocation. Consider increasing nursery-size if the warning persists.");
else if (num_degraded == 10)
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_GC, "Warning: Repeated degraded allocation. Consider increasing nursery-size.");
- last_major_gc_warned = stat_major_gcs;
+ last_major_gc_warned = gc_stats.major_gc_count;
}
SGEN_ATOMIC_ADD_P (degraded_mode, size);
sgen_ensure_free_space (size);
@@ -148,7 +149,7 @@ alloc_degraded (MonoVTable *vtable, size_t size, gboolean for_mature)
static void
zero_tlab_if_necessary (void *p, size_t size)
{
- if (nursery_clear_policy == CLEAR_AT_TLAB_CREATION) {
+ if (nursery_clear_policy == CLEAR_AT_TLAB_CREATION || nursery_clear_policy == CLEAR_AT_TLAB_CREATION_DEBUG) {
memset (p, 0, size);
} else {
/*
@@ -797,10 +798,10 @@ create_allocator (int atype)
if (atype == ATYPE_NORMAL || atype == ATYPE_SMALL) {
/* size = vtable->klass->instance_size; */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoClass, instance_size));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoClass, instance_size));
mono_mb_emit_byte (mb, CEE_ADD);
/* FIXME: assert instance_size stays a 4 byte integer */
mono_mb_emit_byte (mb, CEE_LDIND_U4);
@@ -840,10 +841,10 @@ create_allocator (int atype)
/* vtable->klass->sizes.element_size */
mono_mb_emit_ldarg (mb, 0);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoVTable, klass));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoVTable, klass));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_I);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoClass, sizes.element_size));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoClass, sizes));
mono_mb_emit_byte (mb, CEE_ADD);
mono_mb_emit_byte (mb, CEE_LDIND_U4);
mono_mb_emit_byte (mb, CEE_CONV_I);
@@ -940,7 +941,7 @@ create_allocator (int atype)
/* tlab_next_addr (local) = tlab_next_addr (TLS var) */
tlab_next_addr_var = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
- EMIT_TLS_ACCESS (mb, tlab_next_addr, TLS_KEY_SGEN_TLAB_NEXT_ADDR);
+ EMIT_TLS_ACCESS_NEXT_ADDR (mb);
mono_mb_emit_stloc (mb, tlab_next_addr_var);
/* p = (void**)tlab_next; */
@@ -959,7 +960,7 @@ create_allocator (int atype)
/* if (G_LIKELY (new_next < tlab_temp_end)) */
mono_mb_emit_ldloc (mb, new_next_var);
- EMIT_TLS_ACCESS (mb, tlab_temp_end, TLS_KEY_SGEN_TLAB_TEMP_END);
+ EMIT_TLS_ACCESS_TEMP_END (mb);
slowpath_branch = mono_mb_emit_short_branch (mb, MONO_CEE_BLT_UN_S);
/* Slowpath */
@@ -1007,7 +1008,7 @@ create_allocator (int atype)
if (atype == ATYPE_VECTOR) {
/* arr->max_length = max_length; */
mono_mb_emit_ldloc (mb, p_var);
- mono_mb_emit_ldflda (mb, G_STRUCT_OFFSET (MonoArray, max_length));
+ mono_mb_emit_ldflda (mb, MONO_STRUCT_OFFSET (MonoArray, max_length));
mono_mb_emit_ldarg (mb, 1);
#ifdef MONO_BIG_ARRAYS
mono_mb_emit_byte (mb, CEE_STIND_I);
@@ -1018,7 +1019,7 @@ create_allocator (int atype)
/* need to set length and clear the last char */
/* s->length = len; */
mono_mb_emit_ldloc (mb, p_var);
- mono_mb_emit_icon (mb, G_STRUCT_OFFSET (MonoString, length));
+ mono_mb_emit_icon (mb, MONO_STRUCT_OFFSET (MonoString, length));
mono_mb_emit_byte (mb, MONO_CEE_ADD);
mono_mb_emit_ldarg (mb, 1);
mono_mb_emit_byte (mb, MONO_CEE_STIND_I4);
diff --git a/mono/metadata/sgen-archdep.h b/mono/metadata/sgen-archdep.h
index b86ec318c7c..b86ec318c7c 100755..100644
--- a/mono/metadata/sgen-archdep.h
+++ b/mono/metadata/sgen-archdep.h
diff --git a/mono/metadata/sgen-cardtable.c b/mono/metadata/sgen-cardtable.c
index 131bdbee32a..aab3bcb6153 100644
--- a/mono/metadata/sgen-cardtable.c
+++ b/mono/metadata/sgen-cardtable.c
@@ -45,6 +45,8 @@
#endif
#include <sys/types.h>
+#define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size))
+
guint8 *sgen_cardtable;
static gboolean need_mod_union;
diff --git a/mono/metadata/sgen-conf.h b/mono/metadata/sgen-conf.h
index f44a4d4ace6..009d0f66ee2 100644
--- a/mono/metadata/sgen-conf.h
+++ b/mono/metadata/sgen-conf.h
@@ -194,16 +194,17 @@ typedef guint64 mword;
/*
* Configurable cementing parameters.
*
- * The hash table size should be a prime. If there are too many
- * pinned nursery objects with many references from the major heap,
- * this number must be increased.
+ * If there are too many pinned nursery objects with many references
+ * from the major heap, the hash table size must be increased.
*
* The threshold is the number of references from the major heap to a
* pinned nursery object which triggers cementing: if there are more
* than that number of references, the pinned object is cemented until
* the next major collection.
*/
-#define SGEN_CEMENT_HASH_SIZE 61
+#define SGEN_CEMENT_HASH_SHIFT 6
+#define SGEN_CEMENT_HASH_SIZE (1 << SGEN_CEMENT_HASH_SHIFT)
+#define SGEN_CEMENT_HASH(hv) (((hv) ^ ((hv) >> SGEN_CEMENT_HASH_SHIFT)) & (SGEN_CEMENT_HASH_SIZE - 1))
#define SGEN_CEMENT_THRESHOLD 1000
#endif
diff --git a/mono/metadata/sgen-debug.c b/mono/metadata/sgen-debug.c
index 616ca6befc3..1387676c758 100644
--- a/mono/metadata/sgen-debug.c
+++ b/mono/metadata/sgen-debug.c
@@ -640,7 +640,7 @@ static MonoObject *check_key = NULL;
static RootRecord *check_root = NULL;
static void
-check_root_obj_specific_ref_from_marker (void **obj)
+check_root_obj_specific_ref_from_marker (void **obj, void *gc_data)
{
check_root_obj_specific_ref (check_root, check_key, *obj);
}
@@ -687,7 +687,7 @@ scan_roots_for_specific_ref (MonoObject *key, int root_type)
}
case ROOT_DESC_USER: {
MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
- marker (start_root, check_root_obj_specific_ref_from_marker);
+ marker (start_root, check_root_obj_specific_ref_from_marker, NULL);
break;
}
case ROOT_DESC_RUN_LEN:
@@ -735,6 +735,13 @@ check_obj_not_in_domain (void **o)
g_assert (((MonoObject*)(*o))->vtable->domain != check_domain);
}
+
+static void
+check_obj_not_in_domain_callback (void **o, void *gc_data)
+{
+ g_assert (((MonoObject*)(*o))->vtable->domain != check_domain);
+}
+
void
sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type)
{
@@ -779,7 +786,7 @@ sgen_scan_for_registered_roots_in_domain (MonoDomain *domain, int root_type)
}
case ROOT_DESC_USER: {
MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
- marker (start_root, check_obj_not_in_domain);
+ marker (start_root, check_obj_not_in_domain_callback, NULL);
break;
}
case ROOT_DESC_RUN_LEN:
diff --git a/mono/metadata/sgen-gc.c b/mono/metadata/sgen-gc.c
index b3c69379e81..890001a8cb2 100644
--- a/mono/metadata/sgen-gc.c
+++ b/mono/metadata/sgen-gc.c
@@ -322,9 +322,6 @@ static int stat_wbarrier_value_copy = 0;
static int stat_wbarrier_object_copy = 0;
#endif
-int stat_minor_gcs = 0;
-int stat_major_gcs = 0;
-
static long long stat_pinned_objects = 0;
static long long time_minor_pre_collection_fragment_clear = 0;
@@ -552,7 +549,6 @@ static void report_finalizer_roots (void);
static void report_registered_roots (void);
static void pin_from_roots (void *start_nursery, void *end_nursery, GrayQueue *queue);
-static int pin_objects_from_addresses (GCMemSection *section, void **start, void **end, void *start_nursery, void *end_nursery, ScanCopyContext ctx);
static void finish_gray_stack (int generation, GrayQueue *queue);
void mono_gc_scan_for_specific_ref (MonoObject *key, gboolean precise);
@@ -894,21 +890,25 @@ sgen_drain_gray_stack (int max_objs, ScanCopyContext ctx)
}
/*
- * Addresses from start to end are already sorted. This function finds
+ * Addresses in the pin queue are already sorted. This function finds
* the object header for each address and pins the object. The
- * addresses must be inside the passed section. The (start of the)
+ * addresses must be inside the nursery section. The (start of the)
* address array is overwritten with the addresses of the actually
* pinned objects. Return the number of pinned objects.
*/
static int
-pin_objects_from_addresses (GCMemSection *section, void **start, void **end, void *start_nursery, void *end_nursery, ScanCopyContext ctx)
+pin_objects_from_nursery_pin_queue (ScanCopyContext ctx)
{
+ GCMemSection *section = nursery_section;
+ void **start = section->pin_queue_start;
+ void **end = start + section->pin_queue_num_entries;
+ void *start_nursery = section->data;
+ void *end_nursery = section->next_data;
void *last = NULL;
int count = 0;
void *search_start;
- void *last_obj = NULL;
- size_t last_obj_size = 0;
void *addr;
+ void *pinning_front = start_nursery;
size_t idx;
void **definitely_pinned = start;
ScanObjectFunc scan_func = ctx.scan_func;
@@ -917,93 +917,132 @@ pin_objects_from_addresses (GCMemSection *section, void **start, void **end, voi
sgen_nursery_allocator_prepare_for_pinning ();
while (start < end) {
+ void *obj_to_pin = NULL;
+ size_t obj_to_pin_size = 0;
+
addr = *start;
- /* the range check should be reduntant */
- if (addr != last && addr >= start_nursery && addr < end_nursery) {
- SGEN_LOG (5, "Considering pinning addr %p", addr);
- /* multiple pointers to the same object */
- if (addr >= last_obj && (char*)addr < (char*)last_obj + last_obj_size) {
- start++;
+
+ SGEN_ASSERT (0, addr >= start_nursery && addr < end_nursery, "Potential pinning address out of range");
+ SGEN_ASSERT (0, addr >= last, "Pin queue not sorted");
+
+ if (addr == last) {
+ ++start;
+ continue;
+ }
+
+ SGEN_LOG (5, "Considering pinning addr %p", addr);
+ /* We've already processed everything up to pinning_front. */
+ if (addr < pinning_front) {
+ start++;
+ continue;
+ }
+
+ /*
+ * Find the closest scan start <= addr. We might search backward in the
+ * scan_starts array because entries might be NULL. In the worst case we
+ * start at start_nursery.
+ */
+ idx = ((char*)addr - (char*)section->data) / SCAN_START_SIZE;
+ SGEN_ASSERT (0, idx < section->num_scan_start, "Scan start index out of range");
+ search_start = (void*)section->scan_starts [idx];
+ if (!search_start || search_start > addr) {
+ while (idx) {
+ --idx;
+ search_start = section->scan_starts [idx];
+ if (search_start && search_start <= addr)
+ break;
+ }
+ if (!search_start || search_start > addr)
+ search_start = start_nursery;
+ }
+
+ /*
+ * If the pinning front is closer than the scan start we found, start
+ * searching at the front.
+ */
+ if (search_start < pinning_front)
+ search_start = pinning_front;
+
+ /*
+ * Now addr should be in an object a short distance from search_start.
+ *
+ * search_start must point to zeroed mem or point to an object.
+ */
+ do {
+ size_t obj_size;
+
+ /* Skip zeros. */
+ if (!*(void**)search_start) {
+ search_start = (void*)ALIGN_UP ((mword)search_start + sizeof (gpointer));
+ /* The loop condition makes sure we don't overrun addr. */
continue;
}
- idx = ((char*)addr - (char*)section->data) / SCAN_START_SIZE;
- g_assert (idx < section->num_scan_start);
- search_start = (void*)section->scan_starts [idx];
- if (!search_start || search_start > addr) {
- while (idx) {
- --idx;
- search_start = section->scan_starts [idx];
- if (search_start && search_start <= addr)
- break;
- }
- if (!search_start || search_start > addr)
- search_start = start_nursery;
+
+ obj_size = ALIGN_UP (safe_object_get_size ((MonoObject*)search_start));
+
+ if (addr >= search_start && (char*)addr < (char*)search_start + obj_size) {
+ /* This is the object we're looking for. */
+ obj_to_pin = search_start;
+ obj_to_pin_size = obj_size;
+ break;
}
- if (search_start < last_obj)
- search_start = (char*)last_obj + last_obj_size;
- /* now addr should be in an object a short distance from search_start
- * Note that search_start must point to zeroed mem or point to an object.
- */
- do {
- if (!*(void**)search_start) {
- /* Consistency check */
- /*
- for (frag = nursery_fragments; frag; frag = frag->next) {
- if (search_start >= frag->fragment_start && search_start < frag->fragment_end)
- g_assert_not_reached ();
- }
- */
+ /* Skip to the next object */
+ search_start = (void*)((char*)search_start + obj_size);
+ } while (search_start <= addr);
- search_start = (void*)ALIGN_UP ((mword)search_start + sizeof (gpointer));
- continue;
- }
- last_obj = search_start;
- last_obj_size = ALIGN_UP (safe_object_get_size ((MonoObject*)search_start));
+ /* We've searched past the address we were looking for. */
+ if (!obj_to_pin) {
+ pinning_front = search_start;
+ goto next_pin_queue_entry;
+ }
- if (((MonoObject*)last_obj)->synchronisation == GINT_TO_POINTER (-1)) {
- /* Marks the beginning of a nursery fragment, skip */
- } else {
- SGEN_LOG (8, "Pinned try match %p (%s), size %zd", last_obj, safe_name (last_obj), last_obj_size);
- if (addr >= search_start && (char*)addr < (char*)last_obj + last_obj_size) {
- if (scan_func) {
- scan_func (search_start, queue);
- } else {
- SGEN_LOG (4, "Pinned object %p, vtable %p (%s), count %d\n",
- search_start, *(void**)search_start, safe_name (search_start), count);
- binary_protocol_pin (search_start,
- (gpointer)LOAD_VTABLE (search_start),
- safe_object_get_size (search_start));
+ /*
+ * We've found an object to pin. It might still be a dummy array, but we
+ * can advance the pinning front in any case.
+ */
+ pinning_front = (char*)obj_to_pin + obj_to_pin_size;
+
+ /*
+ * If this is a dummy array marking the beginning of a nursery
+ * fragment, we don't pin it.
+ */
+ if (((MonoObject*)obj_to_pin)->synchronisation == GINT_TO_POINTER (-1))
+ goto next_pin_queue_entry;
+
+ /*
+ * Finally - pin the object!
+ */
+ if (scan_func) {
+ scan_func (obj_to_pin, queue);
+ } else {
+ SGEN_LOG (4, "Pinned object %p, vtable %p (%s), count %d\n",
+ obj_to_pin, *(void**)obj_to_pin, safe_name (obj_to_pin), count);
+ binary_protocol_pin (obj_to_pin,
+ (gpointer)LOAD_VTABLE (obj_to_pin),
+ safe_object_get_size (obj_to_pin));
#ifdef ENABLE_DTRACE
- if (G_UNLIKELY (MONO_GC_OBJ_PINNED_ENABLED ())) {
- int gen = sgen_ptr_in_nursery (search_start) ? GENERATION_NURSERY : GENERATION_OLD;
- MonoVTable *vt = (MonoVTable*)LOAD_VTABLE (search_start);
- MONO_GC_OBJ_PINNED ((mword)search_start,
- sgen_safe_object_get_size (search_start),
- vt->klass->name_space, vt->klass->name, gen);
- }
+ if (G_UNLIKELY (MONO_GC_OBJ_PINNED_ENABLED ())) {
+ int gen = sgen_ptr_in_nursery (obj_to_pin) ? GENERATION_NURSERY : GENERATION_OLD;
+ MonoVTable *vt = (MonoVTable*)LOAD_VTABLE (obj_to_pin);
+ MONO_GC_OBJ_PINNED ((mword)obj_to_pin,
+ sgen_safe_object_get_size (obj_to_pin),
+ vt->klass->name_space, vt->klass->name, gen);
+ }
#endif
- pin_object (search_start);
- GRAY_OBJECT_ENQUEUE (queue, search_start);
- if (G_UNLIKELY (do_pin_stats))
- sgen_pin_stats_register_object (search_start, last_obj_size);
- definitely_pinned [count] = search_start;
- count++;
- }
- break;
- }
- }
- /* skip to the next object */
- search_start = (void*)((char*)search_start + last_obj_size);
- } while (search_start <= addr);
- /* we either pinned the correct object or we ignored the addr because
- * it points to unused zeroed memory.
- */
- last = addr;
+ pin_object (obj_to_pin);
+ GRAY_OBJECT_ENQUEUE (queue, obj_to_pin);
+ if (G_UNLIKELY (do_pin_stats))
+ sgen_pin_stats_register_object (obj_to_pin, obj_to_pin_size);
+ definitely_pinned [count] = obj_to_pin;
+ count++;
}
- start++;
+
+ next_pin_queue_entry:
+ last = addr;
+ ++start;
}
//printf ("effective pinned: %d (at the end: %d)\n", count, (char*)end_nursery - (char*)last);
if (mono_profiler_get_events () & MONO_PROFILE_GC_ROOTS) {
@@ -1017,19 +1056,18 @@ pin_objects_from_addresses (GCMemSection *section, void **start, void **end, voi
return count;
}
-void
-sgen_pin_objects_in_section (GCMemSection *section, ScanCopyContext ctx)
-{
- size_t num_entries = section->pin_queue_num_entries;
- if (num_entries) {
- void **start = section->pin_queue_start;
- size_t reduced_to;
- reduced_to = pin_objects_from_addresses (section, start, start + num_entries,
- section->data, section->next_data, ctx);
- section->pin_queue_num_entries = reduced_to;
- if (!reduced_to)
- section->pin_queue_start = NULL;
- }
+static void
+pin_objects_in_nursery (ScanCopyContext ctx)
+{
+ size_t reduced_to;
+
+ if (!nursery_section->pin_queue_num_entries)
+ return;
+
+ reduced_to = pin_objects_from_nursery_pin_queue (ctx);
+ nursery_section->pin_queue_num_entries = reduced_to;
+ if (!reduced_to)
+ nursery_section->pin_queue_start = NULL;
}
@@ -1239,24 +1277,10 @@ typedef struct {
GrayQueue *queue;
} UserCopyOrMarkData;
-static MonoNativeTlsKey user_copy_or_mark_key;
-
static void
-init_user_copy_or_mark_key (void)
+single_arg_user_copy_or_mark (void **obj, void *gc_data)
{
- mono_native_tls_alloc (&user_copy_or_mark_key, NULL);
-}
-
-static void
-set_user_copy_or_mark_data (UserCopyOrMarkData *data)
-{
- mono_native_tls_set_value (user_copy_or_mark_key, data);
-}
-
-static void
-single_arg_user_copy_or_mark (void **obj)
-{
- UserCopyOrMarkData *data = mono_native_tls_get_value (user_copy_or_mark_key);
+ UserCopyOrMarkData *data = gc_data;
data->func (obj, data->queue);
}
@@ -1312,9 +1336,7 @@ precisely_scan_objects_from (void** start_root, void** end_root, char* n_start,
case ROOT_DESC_USER: {
UserCopyOrMarkData data = { copy_func, queue };
MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
- set_user_copy_or_mark_data (&data);
- marker (start_root, single_arg_user_copy_or_mark);
- set_user_copy_or_mark_data (NULL);
+ marker (start_root, single_arg_user_copy_or_mark, &data);
break;
}
case ROOT_DESC_RUN_LEN:
@@ -1456,7 +1478,7 @@ report_finalizer_roots (void)
static GCRootReport *root_report;
static void
-single_arg_report_root (void **obj)
+single_arg_report_root (void **obj, void *gc_data)
{
if (*obj)
add_profile_gc_root (root_report, *obj, MONO_PROFILE_GC_ROOT_OTHER, 0);
@@ -1498,7 +1520,7 @@ precisely_report_roots_from (GCRootReport *report, void** start_root, void** end
case ROOT_DESC_USER: {
MonoGCRootMarkFunc marker = sgen_get_user_descriptor_func (desc);
root_report = report;
- marker (start_root, single_arg_report_root);
+ marker (start_root, single_arg_report_root, NULL);
break;
}
case ROOT_DESC_RUN_LEN:
@@ -2211,7 +2233,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
return TRUE;
MONO_GC_BEGIN (GENERATION_NURSERY);
- binary_protocol_collection_begin (stat_minor_gcs, GENERATION_NURSERY);
+ binary_protocol_collection_begin (gc_stats.minor_gc_count, GENERATION_NURSERY);
verify_nursery ();
@@ -2237,7 +2259,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
/* FIXME: optimize later to use the higher address where an object can be present */
nursery_next = MAX (nursery_next, sgen_get_nursery_end ());
- SGEN_LOG (1, "Start nursery collection %d %p-%p, size: %d", stat_minor_gcs, sgen_get_nursery_start (), nursery_next, (int)(nursery_next - sgen_get_nursery_start ()));
+ SGEN_LOG (1, "Start nursery collection %d %p-%p, size: %d", gc_stats.minor_gc_count, sgen_get_nursery_start (), nursery_next, (int)(nursery_next - sgen_get_nursery_start ()));
max_garbage_amount = nursery_next - sgen_get_nursery_start ();
g_assert (nursery_section->size >= max_garbage_amount);
@@ -2261,7 +2283,6 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
init_gray_queue ();
- stat_minor_gcs++;
gc_stats.minor_gc_count ++;
MONO_GC_CHECKPOINT_1 (GENERATION_NURSERY);
@@ -2278,12 +2299,12 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
/* pin cemented objects */
sgen_cement_iterate (pin_stage_object_callback, NULL);
/* identify pinned objects */
- sgen_optimize_pin_queue (0);
+ sgen_optimize_pin_queue ();
sgen_pinning_setup_section (nursery_section);
ctx.scan_func = NULL;
ctx.copy_func = NULL;
ctx.queue = WORKERS_DISTRIBUTE_GRAY_QUEUE;
- sgen_pin_objects_in_section (nursery_section, ctx);
+ pin_objects_in_nursery (ctx);
sgen_pinning_trim_queue_to_section (nursery_section);
TV_GETTIME (atv);
@@ -2397,7 +2418,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
sgen_workers_reset_data ();
if (objects_pinned) {
- sgen_optimize_pin_queue (0);
+ sgen_optimize_pin_queue ();
sgen_pinning_setup_section (nursery_section);
}
@@ -2426,10 +2447,10 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
major_collector.finish_nursery_collection ();
TV_GETTIME (all_btv);
- gc_stats.minor_gc_time_usecs += TV_ELAPSED (all_atv, all_btv);
+ gc_stats.minor_gc_time += TV_ELAPSED (all_atv, all_btv);
if (heap_dump_file)
- dump_heap ("minor", stat_minor_gcs - 1, NULL);
+ dump_heap ("minor", gc_stats.minor_gc_count - 1, NULL);
/* prepare the pin queue for the next collection */
sgen_finish_pinning ();
@@ -2457,7 +2478,7 @@ collect_nursery (SgenGrayQueue *unpin_queue, gboolean finish_up_concurrent_mark)
objects_pinned = 0;
MONO_GC_END (GENERATION_NURSERY);
- binary_protocol_collection_end (stat_minor_gcs - 1, GENERATION_NURSERY);
+ binary_protocol_collection_end (gc_stats.minor_gc_count - 1, GENERATION_NURSERY);
if (check_nursery_objects_pinned && !sgen_minor_collector.is_split)
sgen_check_nursery_objects_pinned (unpin_queue != NULL);
@@ -2563,7 +2584,7 @@ major_copy_or_mark_from_roots (size_t *old_next_pin_slot, gboolean finish_up_con
sgen_cement_reset ();
}
- sgen_optimize_pin_queue (0);
+ sgen_optimize_pin_queue ();
/*
* The concurrent collector doesn't move objects, neither on
@@ -2651,7 +2672,7 @@ major_copy_or_mark_from_roots (size_t *old_next_pin_slot, gboolean finish_up_con
if (concurrent_collection_in_progress && sgen_minor_collector.is_split) {
scan_nursery_objects (ctx);
} else {
- sgen_pin_objects_in_section (nursery_section, ctx);
+ pin_objects_in_nursery (ctx);
if (check_nursery_objects_pinned && !sgen_minor_collector.is_split)
sgen_check_nursery_objects_pinned (!concurrent_collection_in_progress || finish_up_concurrent_mark);
}
@@ -2755,7 +2776,7 @@ static void
major_start_collection (gboolean concurrent, size_t *old_next_pin_slot)
{
MONO_GC_BEGIN (GENERATION_OLD);
- binary_protocol_collection_begin (stat_major_gcs, GENERATION_OLD);
+ binary_protocol_collection_begin (gc_stats.major_gc_count, GENERATION_OLD);
current_collection_generation = GENERATION_OLD;
#ifndef DISABLE_PERFCOUNTERS
@@ -2785,8 +2806,7 @@ major_start_collection (gboolean concurrent, size_t *old_next_pin_slot)
check_scan_starts ();
degraded_mode = 0;
- SGEN_LOG (1, "Start major collection %d", stat_major_gcs);
- stat_major_gcs++;
+ SGEN_LOG (1, "Start major collection %d", gc_stats.major_gc_count);
gc_stats.major_gc_count ++;
if (major_collector.start_major_collection)
@@ -2869,7 +2889,7 @@ major_finish_collection (const char *reason, size_t old_next_pin_slot, gboolean
/*This is slow, but we just OOM'd*/
sgen_pin_queue_clear_discarded_entries (nursery_section, old_next_pin_slot);
- sgen_optimize_pin_queue (0);
+ sgen_optimize_pin_queue ();
sgen_find_section_pin_queue_start_end (nursery_section);
objects_pinned = 0;
}
@@ -2945,7 +2965,7 @@ major_finish_collection (const char *reason, size_t old_next_pin_slot, gboolean
time_major_fragment_creation += TV_ELAPSED (btv, atv);
if (heap_dump_file)
- dump_heap ("major", stat_major_gcs - 1, reason);
+ dump_heap ("major", gc_stats.major_gc_count - 1, reason);
if (fin_ready_list || critical_fin_list) {
SGEN_LOG (4, "Finalizer-thread wakeup: ready %d", num_ready_finalizers);
@@ -2971,7 +2991,7 @@ major_finish_collection (const char *reason, size_t old_next_pin_slot, gboolean
//consistency_check ();
MONO_GC_END (GENERATION_OLD);
- binary_protocol_collection_end (stat_major_gcs - 1, GENERATION_OLD);
+ binary_protocol_collection_end (gc_stats.major_gc_count - 1, GENERATION_OLD);
}
static gboolean
@@ -2996,7 +3016,7 @@ major_do_collection (const char *reason)
major_finish_collection (reason, old_next_pin_slot, FALSE);
TV_GETTIME (all_btv);
- gc_stats.major_gc_time_usecs += TV_ELAPSED (all_atv, all_btv);
+ gc_stats.major_gc_time += TV_ELAPSED (all_atv, all_btv);
/* FIXME: also report this to the user, preferably in gc-end. */
if (major_collector.get_and_reset_num_major_objects_marked)
@@ -3715,9 +3735,9 @@ mono_gc_conservatively_scan_area (void *start, void *end)
}
void*
-mono_gc_scan_object (void *obj)
+mono_gc_scan_object (void *obj, void *gc_data)
{
- UserCopyOrMarkData *data = mono_native_tls_get_value (user_copy_or_mark_key);
+ UserCopyOrMarkData *data = gc_data;
current_object_ops.copy_or_mark_object (&obj, data->queue);
return obj;
}
@@ -3749,9 +3769,7 @@ scan_thread_data (void *start_nursery, void *end_nursery, gboolean precise, Gray
SGEN_LOG (3, "Scanning thread %p, range: %p-%p, size: %td, pinned=%zd", info, info->stack_start, info->stack_end, (char*)info->stack_end - (char*)info->stack_start, sgen_get_pinned_count ());
if (gc_callbacks.thread_mark_func && !conservative_stack_mark) {
UserCopyOrMarkData data = { NULL, queue };
- set_user_copy_or_mark_data (&data);
- gc_callbacks.thread_mark_func (info->runtime_data, info->stack_start, info->stack_end, precise);
- set_user_copy_or_mark_data (NULL);
+ gc_callbacks.thread_mark_func (info->runtime_data, info->stack_start, info->stack_end, precise, &data);
} else if (!precise) {
if (!conservative_stack_mark) {
fprintf (stderr, "Precise stack mark not supported - disabling.\n");
@@ -3817,11 +3835,11 @@ sgen_thread_register (SgenThreadInfo* info, void *addr)
binary_protocol_thread_register ((gpointer)mono_thread_info_get_tid (info));
/* On win32, stack_start_limit should be 0, since the stack can grow dynamically */
-#ifndef HOST_WIN32
mono_thread_info_get_stack_bounds (&staddr, &stsize);
-#endif
if (staddr) {
+#ifndef HOST_WIN32
info->stack_start_limit = staddr;
+#endif
info->stack_end = staddr + stsize;
} else {
gsize stack_bottom = (gsize)addr;
@@ -3863,6 +3881,12 @@ sgen_thread_unregister (SgenThreadInfo *p)
binary_protocol_thread_unregister ((gpointer)tid);
SGEN_LOG (3, "unregister thread %p (%p)", p, (gpointer)tid);
+#ifndef HAVE_KW_THREAD
+ mono_native_tls_set_value (thread_info_key, NULL);
+#else
+ sgen_thread_info = NULL;
+#endif
+
if (p->info.runtime_thread)
mono_threads_add_joinable_thread ((gpointer)tid);
@@ -4319,8 +4343,8 @@ int
mono_gc_collection_count (int generation)
{
if (generation == 0)
- return stat_minor_gcs;
- return stat_major_gcs;
+ return gc_stats.minor_gc_count;
+ return gc_stats.major_gc_count;
}
int64_t
@@ -4571,8 +4595,6 @@ mono_gc_base_init (void)
LOCK_INIT (sgen_interruption_mutex);
LOCK_INIT (pin_queue_mutex);
- init_user_copy_or_mark_key ();
-
if ((env = g_getenv (MONO_GC_PARAMS_NAME))) {
opts = g_strsplit (env, ",", -1);
for (ptr = opts; *ptr; ++ptr) {
@@ -4947,6 +4969,10 @@ mono_gc_base_init (void)
nursery_clear_policy = CLEAR_AT_GC;
} else if (!strcmp (opt, "clear-nursery-at-gc")) {
nursery_clear_policy = CLEAR_AT_GC;
+ } else if (!strcmp (opt, "clear-at-tlab-creation")) {
+ nursery_clear_policy = CLEAR_AT_TLAB_CREATION;
+ } else if (!strcmp (opt, "debug-clear-at-tlab-creation")) {
+ nursery_clear_policy = CLEAR_AT_TLAB_CREATION_DEBUG;
} else if (!strcmp (opt, "check-scan-starts")) {
do_scan_starts_check = TRUE;
} else if (!strcmp (opt, "verify-nursery-at-minor-gc")) {
@@ -4975,7 +5001,16 @@ mono_gc_base_init (void)
}
} else if (g_str_has_prefix (opt, "binary-protocol=")) {
char *filename = strchr (opt, '=') + 1;
- binary_protocol_init (filename);
+ char *colon = strrchr (filename, ':');
+ size_t limit = -1;
+ if (colon) {
+ if (!mono_gc_parse_environment_string_extract_number (colon + 1, &limit)) {
+ sgen_env_var_error (MONO_GC_DEBUG_NAME, "Ignoring limit.", "Binary protocol file size limit must be an integer.");
+ limit = -1;
+ }
+ *colon = '\0';
+ }
+ binary_protocol_init (filename, (long long)limit);
} else if (!sgen_bridge_handle_gc_debug (opt)) {
sgen_env_var_error (MONO_GC_DEBUG_NAME, "Ignoring.", "Unknown option `%s`.", opt);
@@ -4996,14 +5031,15 @@ mono_gc_base_init (void)
fprintf (stderr, " disable-major\n");
fprintf (stderr, " xdomain-checks\n");
fprintf (stderr, " check-concurrent\n");
- fprintf (stderr, " clear-at-gc\n");
- fprintf (stderr, " clear-nursery-at-gc\n");
+ fprintf (stderr, " clear-[nursery-]at-gc\n");
+ fprintf (stderr, " clear-at-tlab-creation\n");
+ fprintf (stderr, " debug-clear-at-tlab-creation\n");
fprintf (stderr, " check-scan-starts\n");
fprintf (stderr, " no-managed-allocator\n");
fprintf (stderr, " print-allowance\n");
fprintf (stderr, " print-pinning\n");
fprintf (stderr, " heap-dump=<filename>\n");
- fprintf (stderr, " binary-protocol=<filename>\n");
+ fprintf (stderr, " binary-protocol=<filename>[:<file-size-limit>]\n");
sgen_bridge_print_gc_debug_usage ();
fprintf (stderr, "\n");
diff --git a/mono/metadata/sgen-gc.h b/mono/metadata/sgen-gc.h
index 9168aebfead..41a7151ba29 100644
--- a/mono/metadata/sgen-gc.h
+++ b/mono/metadata/sgen-gc.h
@@ -58,7 +58,8 @@ typedef struct _SgenThreadInfo SgenThreadInfo;
*/
typedef enum {
CLEAR_AT_GC,
- CLEAR_AT_TLAB_CREATION
+ CLEAR_AT_TLAB_CREATION,
+ CLEAR_AT_TLAB_CREATION_DEBUG
} NurseryClearPolicy;
NurseryClearPolicy sgen_get_nursery_clear_policy (void) MONO_INTERNAL;
@@ -957,8 +958,6 @@ struct _LOSObject {
char data [MONO_ZERO_LEN_ARRAY];
};
-#define ARRAY_OBJ_INDEX(ptr,array,elem_size) (((char*)(ptr) - ((char*)(array) + G_STRUCT_OFFSET (MonoArray, vector))) / (elem_size))
-
extern LOSObject *los_object_list;
extern mword los_memory_usage;
@@ -1039,24 +1038,43 @@ extern __thread char *stack_end;
#endif
#ifdef HAVE_KW_THREAD
-#define EMIT_TLS_ACCESS(mb,member,key) do { \
+
+#define EMIT_TLS_ACCESS_NEXT_ADDR(mb) do { \
+ mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \
+ mono_mb_emit_byte ((mb), CEE_MONO_TLS); \
+ mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_TLAB_NEXT_ADDR); \
+ } while (0)
+
+#define EMIT_TLS_ACCESS_TEMP_END(mb) do { \
mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \
mono_mb_emit_byte ((mb), CEE_MONO_TLS); \
- mono_mb_emit_i4 ((mb), (key)); \
+ mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_TLAB_TEMP_END); \
} while (0)
+
#else
#if defined(__APPLE__) || defined (HOST_WIN32)
-#define EMIT_TLS_ACCESS(mb,member,key) do { \
+#define EMIT_TLS_ACCESS_NEXT_ADDR(mb) do { \
mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \
mono_mb_emit_byte ((mb), CEE_MONO_TLS); \
mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_THREAD_INFO); \
- mono_mb_emit_icon ((mb), G_STRUCT_OFFSET (SgenThreadInfo, member)); \
+ mono_mb_emit_icon ((mb), MONO_STRUCT_OFFSET (SgenThreadInfo, tlab_next_addr)); \
mono_mb_emit_byte ((mb), CEE_ADD); \
mono_mb_emit_byte ((mb), CEE_LDIND_I); \
} while (0)
+
+#define EMIT_TLS_ACCESS_TEMP_END(mb) do { \
+ mono_mb_emit_byte ((mb), MONO_CUSTOM_PREFIX); \
+ mono_mb_emit_byte ((mb), CEE_MONO_TLS); \
+ mono_mb_emit_i4 ((mb), TLS_KEY_SGEN_THREAD_INFO); \
+ mono_mb_emit_icon ((mb), MONO_STRUCT_OFFSET (SgenThreadInfo, tlab_temp_end)); \
+ mono_mb_emit_byte ((mb), CEE_ADD); \
+ mono_mb_emit_byte ((mb), CEE_LDIND_I); \
+ } while (0)
+
#else
-#define EMIT_TLS_ACCESS(mb,member,key) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
+#define EMIT_TLS_ACCESS_NEXT_ADDR(mb) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
+#define EMIT_TLS_ACCESS_TEMP_END(mb) do { g_error ("sgen is not supported when using --with-tls=pthread.\n"); } while (0)
#endif
#endif
@@ -1064,7 +1082,6 @@ extern __thread char *stack_end;
/* Other globals */
extern GCMemSection *nursery_section;
-extern int stat_major_gcs;
extern guint32 collect_before_allocs;
extern guint32 verify_before_allocs;
extern gboolean has_per_allocation_action;
diff --git a/mono/metadata/sgen-internal.c b/mono/metadata/sgen-internal.c
index 37ac5c6f329..9474d7cec5a 100644
--- a/mono/metadata/sgen-internal.c
+++ b/mono/metadata/sgen-internal.c
@@ -27,11 +27,19 @@
#include "metadata/sgen-memory-governor.h"
/* keep each size a multiple of ALLOC_ALIGN */
+#if SIZEOF_VOID_P == 4
static const int allocator_sizes [] = {
8, 16, 24, 32, 40, 48, 64, 80,
- 96, 128, 160, 192, 224, 248, 320, 384,
- 448, 528, 584, 680, 816, 1088, 1360, 2040,
- 2336, 2728, 3272, 4088, 5456, 8184 };
+ 96, 128, 160, 192, 224, 248, 296, 320,
+ 384, 448, 504, 528, 584, 680, 816, 1088,
+ 1360, 2040, 2336, 2728, 3272, 4088, 5456, 8184 };
+#else
+static const int allocator_sizes [] = {
+ 8, 16, 24, 32, 40, 48, 64, 80,
+ 96, 128, 160, 192, 224, 248, 320, 328,
+ 384, 448, 528, 584, 680, 816, 1016, 1088,
+ 1360, 2040, 2336, 2728, 3272, 4088, 5456, 8184 };
+#endif
#define NUM_ALLOCATORS (sizeof (allocator_sizes) / sizeof (int))
diff --git a/mono/metadata/sgen-marksweep.c b/mono/metadata/sgen-marksweep.c
index d3093385805..d3093385805 100755..100644
--- a/mono/metadata/sgen-marksweep.c
+++ b/mono/metadata/sgen-marksweep.c
diff --git a/mono/metadata/sgen-new-bridge.c b/mono/metadata/sgen-new-bridge.c
index ad486c0c47f..d07203db4d1 100644
--- a/mono/metadata/sgen-new-bridge.c
+++ b/mono/metadata/sgen-new-bridge.c
@@ -68,6 +68,10 @@
#define XREFS old_xrefs
#endif
+#define OPTIMIZATION_COPY
+#define OPTIMIZATION_FORWARD
+#define OPTIMIZATION_SINGLETON_DYN_ARRAY
+
typedef struct {
int size;
int capacity; /* if negative, data points to another DynArray's data */
@@ -320,9 +324,11 @@ dyn_array_ptr_init (DynPtrArray *da)
static void
dyn_array_ptr_uninit (DynPtrArray *da)
{
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
if (da->array.capacity == 1)
dyn_array_ptr_init (da);
else
+#endif
dyn_array_uninit (&da->array, sizeof (void*));
}
@@ -335,16 +341,23 @@ dyn_array_ptr_size (DynPtrArray *da)
static void
dyn_array_ptr_empty (DynPtrArray *da)
{
- dyn_array_empty (&da->array);
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
+ if (da->array.capacity == 1)
+ dyn_array_ptr_init (da);
+ else
+#endif
+ dyn_array_empty (&da->array);
}
static void*
dyn_array_ptr_get (DynPtrArray *da, int x)
{
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
if (da->array.capacity == 1) {
g_assert (x == 0);
return da->array.data;
}
+#endif
return ((void**)da->array.data)[x];
}
@@ -353,6 +366,7 @@ dyn_array_ptr_add (DynPtrArray *da, void *ptr)
{
void **p;
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
if (da->array.capacity == 0) {
da->array.capacity = 1;
da->array.size = 1;
@@ -364,7 +378,9 @@ dyn_array_ptr_add (DynPtrArray *da, void *ptr)
p0 = dyn_array_add (&da->array, sizeof (void*));
*p0 = ptr0;
p = dyn_array_add (&da->array, sizeof (void*));
- } else {
+ } else
+#endif
+ {
p = dyn_array_add (&da->array, sizeof (void*));
}
*p = ptr;
@@ -378,10 +394,13 @@ dyn_array_ptr_pop (DynPtrArray *da)
int size = da->array.size;
void *p;
g_assert (size > 0);
+#ifdef OPTIMIZATION_SINGLETON_DYN_ARRAY
if (da->array.capacity == 1) {
p = dyn_array_ptr_get (da, 0);
dyn_array_init (&da->array);
- } else {
+ } else
+#endif
+ {
g_assert (da->array.capacity > 1);
dyn_array_ensure_independent (&da->array, sizeof (void*));
p = dyn_array_ptr_get (da, size - 1);
@@ -579,12 +598,16 @@ object_needs_expansion (MonoObject **objp)
static HashEntry*
follow_forward (HashEntry *entry)
{
+#ifdef OPTIMIZATION_FORWARD
while (entry->v.dfs1.forwarded_to) {
HashEntry *next = entry->v.dfs1.forwarded_to;
if (next->v.dfs1.forwarded_to)
entry->v.dfs1.forwarded_to = next->v.dfs1.forwarded_to;
entry = next;
}
+#else
+ g_assert (!entry->v.dfs1.forwarded_to);
+#endif
return entry;
}
@@ -660,6 +683,7 @@ dfs1 (HashEntry *obj_entry)
* continuing processing this object, we start over with the
* object it points to.
*/
+#ifdef OPTIMIZATION_FORWARD
if (!obj_entry->is_bridge && num_links == 1) {
HashEntry *dst_entry = dyn_array_ptr_pop (&dfs_stack);
HashEntry *obj_entry_again = dyn_array_ptr_pop (&dfs_stack);
@@ -671,6 +695,7 @@ dfs1 (HashEntry *obj_entry)
}
goto again;
}
+#endif
}
if (src) {
@@ -774,8 +799,10 @@ scc_add_xref (SCC *src, SCC *dst)
return;
src->flag = TRUE;
dyn_array_int_add (&dst->old_xrefs, src->index);
+#ifdef OPTIMIZATION_COPY
} else if (dyn_array_int_size (&dst->old_xrefs) == 0) {
dyn_array_int_copy (&dst->old_xrefs, &src->old_xrefs);
+#endif
} else {
int i;
for (i = 0; i < dyn_array_int_size (&src->old_xrefs); ++i) {
diff --git a/mono/metadata/sgen-nursery-allocator.c b/mono/metadata/sgen-nursery-allocator.c
index 4ac1aa0c211..3d422e6b7b8 100644
--- a/mono/metadata/sgen-nursery-allocator.c
+++ b/mono/metadata/sgen-nursery-allocator.c
@@ -393,7 +393,7 @@ par_alloc_from_fragment (SgenFragmentAllocator *allocator, SgenFragment *frag, s
* allocating from this dying fragment as it doesn't respect SGEN_MAX_NURSERY_WASTE
* when doing second chance allocation.
*/
- if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION && claim_remaining_size (frag, end)) {
+ if ((sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION || sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION_DEBUG) && claim_remaining_size (frag, end)) {
sgen_clear_range (end, frag->fragment_end);
HEAVY_STAT (InterlockedExchangeAdd (&stat_wasted_bytes_trailer, frag->fragment_end - end));
#ifdef NALLOC_DEBUG
@@ -651,7 +651,7 @@ sgen_clear_allocator_fragments (SgenFragmentAllocator *allocator)
void
sgen_clear_nursery_fragments (void)
{
- if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION) {
+ if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION || sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION_DEBUG) {
sgen_clear_allocator_fragments (&mutator_allocator);
sgen_minor_collector.clear_fragments ();
}
@@ -714,6 +714,8 @@ add_nursery_frag (SgenFragmentAllocator *allocator, size_t frag_size, char* frag
/* memsetting just the first chunk start is bound to provide better cache locality */
if (sgen_get_nursery_clear_policy () == CLEAR_AT_GC)
memset (frag_start, 0, frag_size);
+ else if (sgen_get_nursery_clear_policy () == CLEAR_AT_TLAB_CREATION_DEBUG)
+ memset (frag_start, 0xff, frag_size);
#ifdef NALLOC_DEBUG
/* XXX convert this into a flight record entry
diff --git a/mono/metadata/sgen-os-posix.c b/mono/metadata/sgen-os-posix.c
index 3a709276a6f..909b8382c81 100644
--- a/mono/metadata/sgen-os-posix.c
+++ b/mono/metadata/sgen-os-posix.c
@@ -36,7 +36,7 @@
#include "metadata/object-internals.h"
#include "utils/mono-signal-handler.h"
-#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
const static int suspend_signal_num = SIGXFSZ;
#else
const static int suspend_signal_num = SIGPWR;
diff --git a/mono/metadata/sgen-os-win32.c b/mono/metadata/sgen-os-win32.c
index 36769f35cb2..36769f35cb2 100755..100644
--- a/mono/metadata/sgen-os-win32.c
+++ b/mono/metadata/sgen-os-win32.c
diff --git a/mono/metadata/sgen-pinning.c b/mono/metadata/sgen-pinning.c
index 85ee6e9f400..d91692d42e9 100644
--- a/mono/metadata/sgen-pinning.c
+++ b/mono/metadata/sgen-pinning.c
@@ -25,10 +25,9 @@
#include "metadata/sgen-gc.h"
#include "metadata/sgen-pinning.h"
#include "metadata/sgen-protocol.h"
+#include "metadata/sgen-pointer-queue.h"
-static void** pin_queue;
-static size_t pin_queue_size = 0;
-static size_t next_pin_slot = 0;
+static SgenPointerQueue pin_queue;
static size_t last_num_pinned = 0;
#define PIN_HASH_SIZE 1024
@@ -43,20 +42,8 @@ sgen_init_pinning (void)
void
sgen_finish_pinning (void)
{
- last_num_pinned = next_pin_slot;
- next_pin_slot = 0;
-}
-
-static void
-realloc_pin_queue (void)
-{
- size_t new_size = pin_queue_size? pin_queue_size + pin_queue_size/2: 1024;
- void **new_pin = sgen_alloc_internal_dynamic (sizeof (void*) * new_size, INTERNAL_MEM_PIN_QUEUE, TRUE);
- memcpy (new_pin, pin_queue, sizeof (void*) * next_pin_slot);
- sgen_free_internal_dynamic (pin_queue, sizeof (void*) * pin_queue_size, INTERNAL_MEM_PIN_QUEUE);
- pin_queue = new_pin;
- pin_queue_size = new_size;
- SGEN_LOG (4, "Reallocated pin queue to size: %zd", new_size);
+ last_num_pinned = pin_queue.next_slot;
+ sgen_pointer_queue_clear (&pin_queue);
}
void
@@ -69,37 +56,19 @@ sgen_pin_stage_ptr (void *ptr)
pin_hash_filter [hash_idx] = ptr;
- if (next_pin_slot >= pin_queue_size)
- realloc_pin_queue ();
-
- pin_queue [next_pin_slot++] = ptr;
-}
-
-static size_t
-optimized_pin_queue_search (void *addr)
-{
- size_t first = 0, last = next_pin_slot;
- while (first < last) {
- size_t middle = first + ((last - first) >> 1);
- if (addr <= pin_queue [middle])
- last = middle;
- else
- first = middle + 1;
- }
- g_assert (first == last);
- return first;
+ sgen_pointer_queue_add (&pin_queue, ptr);
}
void**
sgen_find_optimized_pin_queue_area (void *start, void *end, size_t *num)
{
size_t first, last;
- first = optimized_pin_queue_search (start);
- last = optimized_pin_queue_search (end);
+ first = sgen_pointer_queue_search (&pin_queue, start);
+ last = sgen_pointer_queue_search (&pin_queue, end);
*num = last - first;
if (first == last)
return NULL;
- return pin_queue + first;
+ return pin_queue.data + first;
}
void
@@ -114,21 +83,21 @@ sgen_find_section_pin_queue_start_end (GCMemSection *section)
void
sgen_pinning_setup_section (GCMemSection *section)
{
- section->pin_queue_start = pin_queue;
- section->pin_queue_num_entries = next_pin_slot;
+ section->pin_queue_start = pin_queue.data;
+ section->pin_queue_num_entries = pin_queue.next_slot;
}
void
sgen_pinning_trim_queue_to_section (GCMemSection *section)
{
- next_pin_slot = section->pin_queue_num_entries;
+ pin_queue.next_slot = section->pin_queue_num_entries;
}
void
sgen_pin_queue_clear_discarded_entries (GCMemSection *section, size_t max_pin_slot)
{
void **start = section->pin_queue_start + section->pin_queue_num_entries;
- void **end = pin_queue + max_pin_slot;
+ void **end = pin_queue.data + max_pin_slot;
void *addr;
if (!start)
@@ -144,30 +113,15 @@ sgen_pin_queue_clear_discarded_entries (GCMemSection *section, size_t max_pin_sl
/* reduce the info in the pin queue, removing duplicate pointers and sorting them */
void
-sgen_optimize_pin_queue (size_t start_slot)
+sgen_optimize_pin_queue (void)
{
- void **start, **cur, **end;
- /* sort and uniq pin_queue: we just sort and we let the rest discard multiple values */
- /* it may be better to keep ranges of pinned memory instead of individually pinning objects */
- SGEN_LOG (5, "Sorting pin queue, size: %zd", next_pin_slot);
- if ((next_pin_slot - start_slot) > 1)
- sgen_sort_addresses (pin_queue + start_slot, next_pin_slot - start_slot);
- start = cur = pin_queue + start_slot;
- end = pin_queue + next_pin_slot;
- while (cur < end) {
- *start = *cur++;
- while (*start == *cur && cur < end)
- cur++;
- start++;
- };
- next_pin_slot = start - pin_queue;
- SGEN_LOG (5, "Pin queue reduced to size: %zd", next_pin_slot);
+ sgen_pointer_queue_sort_uniq (&pin_queue);
}
size_t
sgen_get_pinned_count (void)
{
- return next_pin_slot;
+ return pin_queue.next_slot;
}
void
@@ -176,8 +130,9 @@ sgen_dump_pin_queue (void)
int i;
for (i = 0; i < last_num_pinned; ++i) {
- SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %zd", pin_queue [i], sgen_safe_name (pin_queue [i]), sgen_safe_object_get_size (pin_queue [i]));
- }
+ void *ptr = pin_queue.data [i];
+ SGEN_LOG (3, "Bastard pinning obj %p (%s), size: %zd", ptr, sgen_safe_name (ptr), sgen_safe_object_get_size (ptr));
+ }
}
typedef struct _CementHashEntry CementHashEntry;
@@ -246,7 +201,8 @@ sgen_cement_concurrent_finish (void)
gboolean
sgen_cement_lookup (char *obj)
{
- int i = mono_aligned_addr_hash (obj) % SGEN_CEMENT_HASH_SIZE;
+ guint hv = mono_aligned_addr_hash (obj);
+ int i = SGEN_CEMENT_HASH (hv);
SGEN_ASSERT (5, sgen_ptr_in_nursery (obj), "Looking up cementing for non-nursery objects makes no sense");
@@ -264,6 +220,7 @@ sgen_cement_lookup (char *obj)
gboolean
sgen_cement_lookup_or_register (char *obj)
{
+ guint hv;
int i;
CementHashEntry *hash;
gboolean concurrent_cementing = sgen_concurrent_collection_in_progress ();
@@ -279,17 +236,8 @@ sgen_cement_lookup_or_register (char *obj)
else
hash = cement_hash;
- /*
- * We use modulus hashing, which is fine with constants as gcc
- * can optimize them to multiplication, but with variable
- * values it would be a bad idea given armv7 has no hardware
- * for division, making it 20x slower than a multiplication.
- *
- * This code path can be quite hot, depending on the workload,
- * so if we make the hash size user-adjustable we should
- * figure out something not involving division.
- */
- i = mono_aligned_addr_hash (obj) % SGEN_CEMENT_HASH_SIZE;
+ hv = mono_aligned_addr_hash (obj);
+ i = SGEN_CEMENT_HASH (hv);
SGEN_ASSERT (5, sgen_ptr_in_nursery (obj), "Can only cement pointers to nursery objects");
diff --git a/mono/metadata/sgen-pinning.h b/mono/metadata/sgen-pinning.h
index ef41df24d2f..46db46536cd 100644
--- a/mono/metadata/sgen-pinning.h
+++ b/mono/metadata/sgen-pinning.h
@@ -28,7 +28,7 @@ enum {
};
void sgen_pin_stage_ptr (void *ptr) MONO_INTERNAL;
-void sgen_optimize_pin_queue (size_t start_slot) MONO_INTERNAL;
+void sgen_optimize_pin_queue (void) MONO_INTERNAL;
void sgen_init_pinning (void) MONO_INTERNAL;
void sgen_finish_pinning (void) MONO_INTERNAL;
void sgen_pin_queue_clear_discarded_entries (GCMemSection *section, size_t max_pin_slot) MONO_INTERNAL;
diff --git a/mono/metadata/sgen-pointer-queue.c b/mono/metadata/sgen-pointer-queue.c
new file mode 100644
index 00000000000..fe491605d52
--- /dev/null
+++ b/mono/metadata/sgen-pointer-queue.c
@@ -0,0 +1,88 @@
+/*
+ * sgen-pointer-queue.c: A pointer queue that can be sorted.
+ *
+ * Copyright (C) 2014 Xamarin Inc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License 2.0 as published by the Free Software Foundation;
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License 2.0 along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "metadata/sgen-gc.h"
+#include "metadata/sgen-pointer-queue.h"
+
+#ifdef HAVE_SGEN_GC
+
+void
+sgen_pointer_queue_clear (SgenPointerQueue *queue)
+{
+ queue->next_slot = 0;
+}
+
+static void
+realloc_queue (SgenPointerQueue *queue)
+{
+ size_t new_size = queue->size ? queue->size + queue->size/2 : 1024;
+ void **new_data = sgen_alloc_internal_dynamic (sizeof (void*) * new_size, INTERNAL_MEM_PIN_QUEUE, TRUE);
+ memcpy (new_data, queue->data, sizeof (void*) * queue->next_slot);
+ sgen_free_internal_dynamic (queue->data, sizeof (void*) * queue->size, INTERNAL_MEM_PIN_QUEUE);
+ queue->data = new_data;
+ queue->size = new_size;
+ SGEN_LOG (4, "Reallocated pointer queue to size: %lu", new_size);
+}
+
+void
+sgen_pointer_queue_add (SgenPointerQueue *queue, void *ptr)
+{
+ if (queue->next_slot >= queue->size)
+ realloc_queue (queue);
+
+ queue->data [queue->next_slot++] = ptr;
+}
+
+size_t
+sgen_pointer_queue_search (SgenPointerQueue *queue, void *addr)
+{
+ size_t first = 0, last = queue->next_slot;
+ while (first < last) {
+ size_t middle = first + ((last - first) >> 1);
+ if (addr <= queue->data [middle])
+ last = middle;
+ else
+ first = middle + 1;
+ }
+ g_assert (first == last);
+ return first;
+}
+
+void
+sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue)
+{
+ void **start, **cur, **end;
+ /* sort and uniq pin_queue: we just sort and we let the rest discard multiple values */
+ /* it may be better to keep ranges of pinned memory instead of individually pinning objects */
+ SGEN_LOG (5, "Sorting pointer queue, size: %lu", queue->next_slot);
+ if (queue->next_slot > 1)
+ sgen_sort_addresses (queue->data, queue->next_slot);
+ start = cur = queue->data;
+ end = queue->data + queue->next_slot;
+ while (cur < end) {
+ *start = *cur++;
+ while (*start == *cur && cur < end)
+ cur++;
+ start++;
+ };
+ queue->next_slot = start - queue->data;
+ SGEN_LOG (5, "Pointer queue reduced to size: %lu", queue->next_slot);
+}
+
+#endif
diff --git a/mono/metadata/sgen-pointer-queue.h b/mono/metadata/sgen-pointer-queue.h
new file mode 100644
index 00000000000..031870f1285
--- /dev/null
+++ b/mono/metadata/sgen-pointer-queue.h
@@ -0,0 +1,34 @@
+/*
+ * sgen-pointer-queue.h: A pointer queue that can be sorted.
+ *
+ * Copyright (C) 2014 Xamarin Inc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License 2.0 as published by the Free Software Foundation;
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License 2.0 along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef __MONO_SGEN_POINTER_QUEUE_H__
+#define __MONO_SGEN_POINTER_QUEUE_H__
+
+typedef struct {
+ void **data;
+ size_t size;
+ size_t next_slot;
+} SgenPointerQueue;
+
+void sgen_pointer_queue_add (SgenPointerQueue *queue, void *ptr) MONO_INTERNAL;
+void sgen_pointer_queue_clear (SgenPointerQueue *queue) MONO_INTERNAL;
+void sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue) MONO_INTERNAL;
+size_t sgen_pointer_queue_search (SgenPointerQueue *queue, void *addr) MONO_INTERNAL;
+
+#endif
diff --git a/mono/metadata/sgen-protocol.c b/mono/metadata/sgen-protocol.c
index 0ed3ebbd0ff..a8f9b34c825 100644
--- a/mono/metadata/sgen-protocol.c
+++ b/mono/metadata/sgen-protocol.c
@@ -46,10 +46,57 @@ struct _BinaryProtocolBuffer {
static BinaryProtocolBuffer * volatile binary_protocol_buffers = NULL;
-void
-binary_protocol_init (const char *filename)
+static char* filename_or_prefix = NULL;
+static int current_file_index = 0;
+static long long current_file_size = 0;
+static long long file_size_limit;
+
+static char*
+filename_for_index (int index)
+{
+ char *filename;
+
+ SGEN_ASSERT (0, file_size_limit > 0, "Indexed binary protocol filename must only be used with file size limit");
+
+ filename = sgen_alloc_internal_dynamic (strlen (filename_or_prefix) + 32, INTERNAL_MEM_BINARY_PROTOCOL, TRUE);
+ sprintf (filename, "%s.%d", filename_or_prefix, index);
+
+ return filename;
+}
+
+static void
+free_filename (char *filename)
{
+ SGEN_ASSERT (0, file_size_limit > 0, "Indexed binary protocol filename must only be used with file size limit");
+
+ sgen_free_internal_dynamic (filename, strlen (filename_or_prefix) + 32, INTERNAL_MEM_BINARY_PROTOCOL);
+}
+
+static void
+binary_protocol_open_file (void)
+{
+ char *filename;
+
+ if (file_size_limit > 0)
+ filename = filename_for_index (current_file_index);
+ else
+ filename = filename_or_prefix;
+
binary_protocol_file = fopen (filename, "w");
+
+ if (file_size_limit > 0)
+ free_filename (filename);
+}
+
+void
+binary_protocol_init (const char *filename, long long limit)
+{
+ filename_or_prefix = sgen_alloc_internal_dynamic (strlen (filename) + 1, INTERNAL_MEM_BINARY_PROTOCOL, TRUE);
+ strcpy (filename_or_prefix, filename);
+
+ file_size_limit = limit;
+
+ binary_protocol_open_file ();
}
gboolean
@@ -110,10 +157,32 @@ binary_protocol_flush_buffer (BinaryProtocolBuffer *buffer)
{
g_assert (buffer->index > 0);
fwrite (buffer->buffer, 1, buffer->index, binary_protocol_file);
+ current_file_size += buffer->index;
sgen_free_os_memory (buffer, sizeof (BinaryProtocolBuffer), SGEN_ALLOC_INTERNAL);
}
+static void
+binary_protocol_check_file_overflow (void)
+{
+ if (file_size_limit <= 0 || current_file_size < file_size_limit)
+ return;
+
+ fclose (binary_protocol_file);
+ binary_protocol_file = NULL;
+
+ if (current_file_index > 0) {
+ char *filename = filename_for_index (current_file_index - 1);
+ unlink (filename);
+ free_filename (filename);
+ }
+
+ ++current_file_index;
+ current_file_size = 0;
+
+ binary_protocol_open_file ();
+}
+
void
binary_protocol_flush_buffers (gboolean force)
{
@@ -136,8 +205,10 @@ binary_protocol_flush_buffers (gboolean force)
binary_protocol_buffers = NULL;
- for (i = num_buffers - 1; i >= 0; --i)
+ for (i = num_buffers - 1; i >= 0; --i) {
binary_protocol_flush_buffer (bufs [i]);
+ binary_protocol_check_file_overflow ();
+ }
sgen_free_internal_dynamic (buf, num_buffers * sizeof (BinaryProtocolBuffer*), INTERNAL_MEM_BINARY_PROTOCOL);
diff --git a/mono/metadata/sgen-protocol.h b/mono/metadata/sgen-protocol.h
index 1483880e3e3..c2552280df4 100644
--- a/mono/metadata/sgen-protocol.h
+++ b/mono/metadata/sgen-protocol.h
@@ -234,7 +234,7 @@ typedef struct {
/* missing: finalizers, roots, non-store wbarriers */
-void binary_protocol_init (const char *filename) MONO_INTERNAL;
+void binary_protocol_init (const char *filename, long long limit) MONO_INTERNAL;
gboolean binary_protocol_is_enabled (void) MONO_INTERNAL;
void binary_protocol_flush_buffers (gboolean force) MONO_INTERNAL;
diff --git a/mono/metadata/sgen-qsort.h b/mono/metadata/sgen-qsort.h
index b0cfdff25ad..75577e57122 100644
--- a/mono/metadata/sgen-qsort.h
+++ b/mono/metadata/sgen-qsort.h
@@ -49,4 +49,4 @@ static void qsort_##NAME (ARRAY_TYPE base[], size_t nel) { \
} \
-#endif \ No newline at end of file
+#endif
diff --git a/mono/metadata/sgen-stw.c b/mono/metadata/sgen-stw.c
index 5a2ab0e9687..5a2ab0e9687 100755..100644
--- a/mono/metadata/sgen-stw.c
+++ b/mono/metadata/sgen-stw.c
diff --git a/mono/metadata/threadpool.c b/mono/metadata/threadpool.c
index f0bcf61114a..39ade54daa1 100644
--- a/mono/metadata/threadpool.c
+++ b/mono/metadata/threadpool.c
@@ -84,7 +84,7 @@ enum {
};
typedef struct {
- CRITICAL_SECTION io_lock; /* access to sock_to_state */
+ mono_mutex_t io_lock; /* access to sock_to_state */
int inited; // 0 -> not initialized , 1->initializing, 2->initialized, 3->cleaned up
MonoGHashTable *sock_to_state;
@@ -160,7 +160,7 @@ static MonoClass *socket_async_call_klass;
static MonoClass *process_async_call_klass;
static GPtrArray *wsqs;
-CRITICAL_SECTION wsqs_lock;
+mono_mutex_t wsqs_lock;
static gboolean suspended;
/* Hooks */
@@ -314,14 +314,14 @@ get_events_from_list (MonoMList *list)
static void
socket_io_cleanup (SocketIOData *data)
{
- EnterCriticalSection (&data->io_lock);
+ mono_mutex_lock (&data->io_lock);
if (data->inited != 2) {
- LeaveCriticalSection (&data->io_lock);
+ mono_mutex_unlock (&data->io_lock);
return;
}
data->inited = 3;
data->shutdown (data->event_data);
- LeaveCriticalSection (&data->io_lock);
+ mono_mutex_unlock (&data->io_lock);
}
static int
@@ -443,15 +443,15 @@ mono_thread_pool_remove_socket (int sock)
if (socket_io_data.inited == 0)
return;
- EnterCriticalSection (&socket_io_data.io_lock);
+ mono_mutex_lock (&socket_io_data.io_lock);
if (socket_io_data.sock_to_state == NULL) {
- LeaveCriticalSection (&socket_io_data.io_lock);
+ mono_mutex_unlock (&socket_io_data.io_lock);
return;
}
list = mono_g_hash_table_lookup (socket_io_data.sock_to_state, GINT_TO_POINTER (sock));
if (list)
mono_g_hash_table_remove (socket_io_data.sock_to_state, GINT_TO_POINTER (sock));
- LeaveCriticalSection (&socket_io_data.io_lock);
+ mono_mutex_unlock (&socket_io_data.io_lock);
while (list) {
state = (MonoSocketAsyncResult *) mono_mlist_get_data (list);
@@ -506,7 +506,7 @@ socket_io_init (SocketIOData *data)
}
}
- EnterCriticalSection (&data->io_lock);
+ mono_mutex_lock (&data->io_lock);
data->sock_to_state = mono_g_hash_table_new_type (g_direct_hash, g_direct_equal, MONO_HASH_VALUE_GC);
#ifdef HAVE_EPOLL
data->event_system = EPOLL_BACKEND;
@@ -520,7 +520,7 @@ socket_io_init (SocketIOData *data)
init_event_system (data);
mono_thread_create_internal (mono_get_root_domain (), data->wait, data, TRUE, SMALL_STACK);
- LeaveCriticalSection (&data->io_lock);
+ mono_mutex_unlock (&data->io_lock);
data->inited = 2;
threadpool_start_thread (&async_io_tp);
}
@@ -543,9 +543,9 @@ socket_io_add (MonoAsyncResult *ares, MonoSocketAsyncResult *state)
MONO_OBJECT_SETREF (state, ares, ares);
fd = GPOINTER_TO_INT (state->handle);
- EnterCriticalSection (&data->io_lock);
+ mono_mutex_lock (&data->io_lock);
if (data->sock_to_state == NULL) {
- LeaveCriticalSection (&data->io_lock);
+ mono_mutex_unlock (&data->io_lock);
return;
}
list = mono_g_hash_table_lookup (data->sock_to_state, GINT_TO_POINTER (fd));
@@ -731,11 +731,11 @@ print_pool_info (ThreadPool *tp)
g_print ("Queued: %d\n", (tp->tail - tp->head));
if (tp == &async_tp) {
int i;
- EnterCriticalSection (&wsqs_lock);
+ mono_mutex_lock (&wsqs_lock);
for (i = 0; i < wsqs->len; i++) {
g_print ("\tWSQ %d: %d\n", i, mono_wsq_count (g_ptr_array_index (wsqs, i)));
}
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
} else {
g_print ("\tSockets: %d\n", mono_g_hash_table_size (socket_io_data.sock_to_state));
}
@@ -798,7 +798,7 @@ monitor_thread (gpointer unused)
continue;
need_one = (mono_cq_count (tp->queue) > 0);
if (!need_one && !tp->is_io) {
- EnterCriticalSection (&wsqs_lock);
+ mono_mutex_lock (&wsqs_lock);
for (i = 0; wsqs != NULL && i < wsqs->len; i++) {
MonoWSQ *wsq;
wsq = g_ptr_array_index (wsqs, i);
@@ -807,7 +807,7 @@ monitor_thread (gpointer unused)
break;
}
}
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
}
if (need_one)
threadpool_start_thread (tp);
@@ -842,7 +842,7 @@ mono_thread_pool_init (void)
}
MONO_GC_REGISTER_ROOT_FIXED (socket_io_data.sock_to_state);
- InitializeCriticalSection (&socket_io_data.io_lock);
+ mono_mutex_init_recursive (&socket_io_data.io_lock);
if (g_getenv ("MONO_THREADS_PER_CPU") != NULL) {
threads_per_cpu = atoi (g_getenv ("MONO_THREADS_PER_CPU"));
if (threads_per_cpu < 1)
@@ -857,7 +857,7 @@ mono_thread_pool_init (void)
async_call_klass = mono_class_from_name (mono_defaults.corlib, "System", "MonoAsyncCall");
g_assert (async_call_klass);
- InitializeCriticalSection (&wsqs_lock);
+ mono_mutex_init_recursive (&wsqs_lock);
wsqs = g_ptr_array_sized_new (MAX (100 * cpu_count, thread_count));
#ifndef DISABLE_PERFCOUNTERS
@@ -1006,12 +1006,12 @@ mono_thread_pool_cleanup (void)
}
if (wsqs) {
- EnterCriticalSection (&wsqs_lock);
+ mono_mutex_lock (&wsqs_lock);
mono_wsq_cleanup ();
if (wsqs)
g_ptr_array_free (wsqs, TRUE);
wsqs = NULL;
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
MONO_SEM_DESTROY (&async_tp.new_job);
}
}
@@ -1161,11 +1161,11 @@ mono_thread_pool_remove_domain_jobs (MonoDomain *domain, int timeout)
threadpool_clear_queue (&async_tp, domain);
threadpool_clear_queue (&async_io_tp, domain);
- EnterCriticalSection (&socket_io_data.io_lock);
+ mono_mutex_lock (&socket_io_data.io_lock);
if (socket_io_data.sock_to_state)
mono_g_hash_table_foreach_remove (socket_io_data.sock_to_state, remove_sockstate_for_domain, domain);
- LeaveCriticalSection (&socket_io_data.io_lock);
+ mono_mutex_unlock (&socket_io_data.io_lock);
/*
* There might be some threads out that could be about to execute stuff from the given domain.
@@ -1218,21 +1218,21 @@ add_wsq (void)
int i;
MonoWSQ *wsq;
- EnterCriticalSection (&wsqs_lock);
+ mono_mutex_lock (&wsqs_lock);
wsq = mono_wsq_create ();
if (wsqs == NULL) {
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
return NULL;
}
for (i = 0; i < wsqs->len; i++) {
if (g_ptr_array_index (wsqs, i) == NULL) {
wsqs->pdata [i] = wsq;
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
return wsq;
}
}
g_ptr_array_add (wsqs, wsq);
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
return wsq;
}
@@ -1244,9 +1244,9 @@ remove_wsq (MonoWSQ *wsq)
if (wsq == NULL)
return;
- EnterCriticalSection (&wsqs_lock);
+ mono_mutex_lock (&wsqs_lock);
if (wsqs == NULL) {
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
return;
}
g_ptr_array_remove_fast (wsqs, wsq);
@@ -1262,7 +1262,7 @@ remove_wsq (MonoWSQ *wsq)
}
}
mono_wsq_destroy (wsq);
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
}
static void
@@ -1279,7 +1279,7 @@ try_steal (MonoWSQ *local_wsq, gpointer *data, gboolean retry)
if (mono_runtime_is_shutting_down ())
return;
- EnterCriticalSection (&wsqs_lock);
+ mono_mutex_lock (&wsqs_lock);
for (i = 0; wsqs != NULL && i < wsqs->len; i++) {
MonoWSQ *wsq;
@@ -1288,11 +1288,11 @@ try_steal (MonoWSQ *local_wsq, gpointer *data, gboolean retry)
continue;
mono_wsq_try_steal (wsqs->pdata [i], data, ms);
if (*data != NULL) {
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
return;
}
}
- LeaveCriticalSection (&wsqs_lock);
+ mono_mutex_unlock (&wsqs_lock);
ms += 10;
} while (retry && ms < 11);
}
diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c
index a2fc6e4517f..a0e5f8469d6 100755..100644
--- a/mono/metadata/threads.c
+++ b/mono/metadata/threads.c
@@ -120,19 +120,19 @@ typedef struct {
#define UICULTURES_START_IDX NUM_CACHED_CULTURES
/* Controls access to the 'threads' hash table */
-#define mono_threads_lock() EnterCriticalSection (&threads_mutex)
-#define mono_threads_unlock() LeaveCriticalSection (&threads_mutex)
-static CRITICAL_SECTION threads_mutex;
+#define mono_threads_lock() mono_mutex_lock (&threads_mutex)
+#define mono_threads_unlock() mono_mutex_unlock (&threads_mutex)
+static mono_mutex_t threads_mutex;
/* Controls access to context static data */
-#define mono_contexts_lock() EnterCriticalSection (&contexts_mutex)
-#define mono_contexts_unlock() LeaveCriticalSection (&contexts_mutex)
-static CRITICAL_SECTION contexts_mutex;
+#define mono_contexts_lock() mono_mutex_lock (&contexts_mutex)
+#define mono_contexts_unlock() mono_mutex_unlock (&contexts_mutex)
+static mono_mutex_t contexts_mutex;
/* Controls access to the 'joinable_threads' hash table */
-#define joinable_threads_lock() EnterCriticalSection (&joinable_threads_mutex)
-#define joinable_threads_unlock() LeaveCriticalSection (&joinable_threads_mutex)
-static CRITICAL_SECTION joinable_threads_mutex;
+#define joinable_threads_lock() mono_mutex_lock (&joinable_threads_mutex)
+#define joinable_threads_unlock() mono_mutex_unlock (&joinable_threads_mutex)
+static mono_mutex_t joinable_threads_mutex;
/* Holds current status of static data heap */
static StaticDataInfo thread_static_info;
@@ -208,9 +208,9 @@ static MonoException* mono_thread_execute_interruption (MonoInternalThread *thre
static void ref_stack_destroy (gpointer rs);
/* Spin lock for InterlockedXXX 64 bit functions */
-#define mono_interlocked_lock() EnterCriticalSection (&interlocked_mutex)
-#define mono_interlocked_unlock() LeaveCriticalSection (&interlocked_mutex)
-static CRITICAL_SECTION interlocked_mutex;
+#define mono_interlocked_lock() mono_mutex_lock (&interlocked_mutex)
+#define mono_interlocked_unlock() mono_mutex_unlock (&interlocked_mutex)
+static mono_mutex_t interlocked_mutex;
/* global count of thread interruptions requested */
static gint32 thread_interruption_requested = 0;
@@ -332,19 +332,19 @@ static gboolean handle_remove(MonoInternalThread *thread)
static void ensure_synch_cs_set (MonoInternalThread *thread)
{
- CRITICAL_SECTION *synch_cs;
+ mono_mutex_t *synch_cs;
if (thread->synch_cs != NULL) {
return;
}
- synch_cs = g_new0 (CRITICAL_SECTION, 1);
- InitializeCriticalSection (synch_cs);
+ synch_cs = g_new0 (mono_mutex_t, 1);
+ mono_mutex_init_recursive (synch_cs);
if (InterlockedCompareExchangePointer ((gpointer *)&thread->synch_cs,
synch_cs, NULL) != NULL) {
/* Another thread must have installed this CS */
- DeleteCriticalSection (synch_cs);
+ mono_mutex_destroy (synch_cs);
g_free (synch_cs);
}
}
@@ -356,13 +356,13 @@ lock_thread (MonoInternalThread *thread)
ensure_synch_cs_set (thread);
g_assert (thread->synch_cs);
- EnterCriticalSection (thread->synch_cs);
+ mono_mutex_lock (thread->synch_cs);
}
static inline void
unlock_thread (MonoInternalThread *thread)
{
- LeaveCriticalSection (thread->synch_cs);
+ mono_mutex_unlock (thread->synch_cs);
}
/*
@@ -529,8 +529,8 @@ create_internal_thread (void)
vt = mono_class_vtable (mono_get_root_domain (), mono_defaults.internal_thread_class);
thread = (MonoInternalThread*)mono_gc_alloc_mature (vt);
- thread->synch_cs = g_new0 (CRITICAL_SECTION, 1);
- InitializeCriticalSection (thread->synch_cs);
+ thread->synch_cs = g_new0 (mono_mutex_t, 1);
+ mono_mutex_init_recursive (thread->synch_cs);
thread->apartment_state = ThreadApartmentState_Unknown;
thread->managed_id = get_next_managed_thread_id ();
@@ -651,7 +651,7 @@ static guint32 WINAPI start_wrapper_internal(void *data)
/* if the name was set before starting, we didn't invoke the profiler callback */
if (internal->name && (internal->flags & MONO_THREAD_FLAG_NAME_SET)) {
- char *tname = g_utf16_to_utf8 (internal->name, -1, NULL, NULL, NULL);
+ char *tname = g_utf16_to_utf8 (internal->name, internal->name_len, NULL, NULL, NULL);
mono_profiler_thread_name (internal->tid, tname);
g_free (tname);
}
@@ -987,6 +987,27 @@ mono_thread_detach (MonoThread *thread)
mono_thread_detach_internal (thread->internal_thread);
}
+/*
+ * mono_thread_detach_if_exiting:
+ *
+ * Detach the current thread from the runtime if it is exiting, i.e. it is running pthread dtors.
+ * This should be used at the end of embedding code which calls into managed code, and which
+ * can be called from pthread dtors, like dealloc: implementations in objective-c.
+ */
+void
+mono_thread_detach_if_exiting (void)
+{
+ if (mono_thread_info_is_exiting ()) {
+ MonoInternalThread *thread;
+
+ thread = mono_thread_internal_current ();
+ if (thread) {
+ mono_thread_detach_internal (thread);
+ mono_thread_info_detach ();
+ }
+ }
+}
+
void
mono_thread_exit ()
{
@@ -1079,9 +1100,9 @@ ves_icall_System_Threading_InternalThread_Thread_free_internal (MonoInternalThre
CloseHandle (thread);
if (this->synch_cs) {
- CRITICAL_SECTION *synch_cs = this->synch_cs;
+ mono_mutex_t *synch_cs = this->synch_cs;
this->synch_cs = NULL;
- DeleteCriticalSection (synch_cs);
+ mono_mutex_destroy (synch_cs);
g_free (synch_cs);
}
@@ -2536,10 +2557,10 @@ mono_thread_init_tls (void)
void mono_thread_init (MonoThreadStartCB start_cb,
MonoThreadAttachCB attach_cb)
{
- InitializeCriticalSection(&threads_mutex);
- InitializeCriticalSection(&interlocked_mutex);
- InitializeCriticalSection(&contexts_mutex);
- InitializeCriticalSection(&joinable_threads_mutex);
+ mono_mutex_init_recursive(&threads_mutex);
+ mono_mutex_init_recursive(&interlocked_mutex);
+ mono_mutex_init_recursive(&contexts_mutex);
+ mono_mutex_init_recursive(&joinable_threads_mutex);
background_change_event = CreateEvent (NULL, TRUE, FALSE, NULL);
g_assert(background_change_event != NULL);
@@ -2580,11 +2601,11 @@ void mono_thread_cleanup (void)
* critical sections can be locked when mono_thread_cleanup is
* called.
*/
- DeleteCriticalSection (&threads_mutex);
- DeleteCriticalSection (&interlocked_mutex);
- DeleteCriticalSection (&contexts_mutex);
- DeleteCriticalSection (&delayed_free_table_mutex);
- DeleteCriticalSection (&small_id_mutex);
+ mono_mutex_destroy (&threads_mutex);
+ mono_mutex_destroy (&interlocked_mutex);
+ mono_mutex_destroy (&contexts_mutex);
+ mono_mutex_destroy (&delayed_free_table_mutex);
+ mono_mutex_destroy (&small_id_mutex);
CloseHandle (background_change_event);
#endif
@@ -3577,7 +3598,7 @@ static const int static_data_size [NUM_STATIC_DATA_IDX] = {
static uintptr_t* static_reference_bitmaps [NUM_STATIC_DATA_IDX];
static void
-mark_tls_slots (void *addr, MonoGCMarkFunc mark_func)
+mark_tls_slots (void *addr, MonoGCMarkFunc mark_func, void *gc_data)
{
int i;
gpointer *static_data = addr;
@@ -3593,7 +3614,7 @@ mark_tls_slots (void *addr, MonoGCMarkFunc mark_func)
void ** p = ptr;
while (bmap) {
if ((bmap & 1) && *p) {
- mark_func (p);
+ mark_func (p, gc_data);
}
p++;
bmap >>= 1;
diff --git a/mono/metadata/threads.h b/mono/metadata/threads.h
index ab3f6cba7dd..79b5b360342 100644
--- a/mono/metadata/threads.h
+++ b/mono/metadata/threads.h
@@ -48,6 +48,8 @@ MONO_API void mono_threads_request_thread_dump (void);
MONO_API mono_bool mono_thread_is_foreign (MonoThread *thread);
+extern MONO_API void mono_thread_detach_if_exiting (void);
+
MONO_END_DECLS
#endif /* _MONO_METADATA_THREADS_H_ */
diff --git a/mono/metadata/tpool-epoll.c b/mono/metadata/tpool-epoll.c
index 41242c6b5e9..bab57abf876 100644
--- a/mono/metadata/tpool-epoll.c
+++ b/mono/metadata/tpool-epoll.c
@@ -78,7 +78,7 @@ tp_epoll_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
}
}
}
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
}
static void
@@ -129,10 +129,10 @@ tp_epoll_wait (gpointer p)
return;
}
- EnterCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_lock (&socket_io_data->io_lock);
if (socket_io_data->inited == 3) {
g_free (events);
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
return; /* cleanup called */
}
@@ -175,7 +175,7 @@ tp_epoll_wait (gpointer p)
epoll_ctl (epollfd, EPOLL_CTL_DEL, fd, evt);
}
}
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
threadpool_append_jobs (&async_io_tp, (MonoObject **) async_results, nresults);
mono_gc_bzero_aligned (async_results, sizeof (gpointer) * nresults);
}
diff --git a/mono/metadata/tpool-kqueue.c b/mono/metadata/tpool-kqueue.c
index f2ca4f4158d..1cbd26f26e6 100644
--- a/mono/metadata/tpool-kqueue.c
+++ b/mono/metadata/tpool-kqueue.c
@@ -59,7 +59,7 @@ tp_kqueue_modify (gpointer p, int fd, int operation, int events, gboolean is_new
EV_SET (&evt, fd, EVFILT_WRITE, EV_ADD | EV_ENABLE | EV_ONESHOT, 0, 0, 0);
kevent_change (data->fd, &evt, "ADD write");
}
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
}
static void
@@ -110,10 +110,10 @@ tp_kqueue_wait (gpointer p)
return;
}
- EnterCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_lock (&socket_io_data->io_lock);
if (socket_io_data->inited == 3) {
g_free (events);
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
return; /* cleanup called */
}
@@ -155,7 +155,7 @@ tp_kqueue_wait (gpointer p)
mono_g_hash_table_remove (socket_io_data->sock_to_state, GINT_TO_POINTER (fd));
}
}
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
threadpool_append_jobs (&async_io_tp, (MonoObject **) async_results, nresults);
mono_gc_bzero_aligned (async_results, sizeof (gpointer) * nresults);
}
diff --git a/mono/metadata/tpool-poll.c b/mono/metadata/tpool-poll.c
index e44e3385988..aa1077bf07f 100644
--- a/mono/metadata/tpool-poll.c
+++ b/mono/metadata/tpool-poll.c
@@ -84,7 +84,7 @@ tp_poll_modify (gpointer p, int fd, int operation, int events, gboolean is_new)
socket_io_data = p;
data = socket_io_data->event_data;
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
MONO_SEM_WAIT (&data->new_sem);
INIT_POLLFD (&data->newpfd, GPOINTER_TO_INT (fd), events);
@@ -270,11 +270,11 @@ tp_poll_wait (gpointer p)
if (nsock == 0)
continue;
- EnterCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_lock (&socket_io_data->io_lock);
if (socket_io_data->inited == 3) {
g_free (pfds);
mono_ptr_array_destroy (async_results);
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
return; /* cleanup called */
}
@@ -314,7 +314,7 @@ tp_poll_wait (gpointer p)
maxfd--;
}
}
- LeaveCriticalSection (&socket_io_data->io_lock);
+ mono_mutex_unlock (&socket_io_data->io_lock);
threadpool_append_jobs (&async_io_tp, (MonoObject **) async_results.data, nresults);
mono_ptr_array_clear (async_results);
}
diff --git a/mono/metadata/verify.c b/mono/metadata/verify.c
index b23a830dbcb..95bde8efbc5 100644
--- a/mono/metadata/verify.c
+++ b/mono/metadata/verify.c
@@ -369,7 +369,7 @@ init_verifier_stats (void)
static gboolean
token_bounds_check (MonoImage *image, guint32 token)
{
- if (image->dynamic)
+ if (image_is_dynamic (image))
return mono_reflection_is_valid_dynamic_token ((MonoDynamicImage*)image, token);
return image->tables [mono_metadata_token_table (token)].rows >= mono_metadata_token_index (token) && mono_metadata_token_index (token) > 0;
}
@@ -1004,11 +1004,13 @@ verifier_load_type (VerifyContext *ctx, int token, const char *opcode) {
MonoClass *class = mono_method_get_wrapper_data (ctx->method, (guint32)token);
type = class ? &class->byval_arg : NULL;
} else {
+ MonoError error;
if (!IS_TYPE_DEF_OR_REF_OR_SPEC (token) || !token_bounds_check (ctx->image, token)) {
ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid type token 0x%08x at 0x%04x", token, ctx->ip_offset), MONO_EXCEPTION_BAD_IMAGE);
return NULL;
}
- type = mono_type_get_full (ctx->image, token, ctx->generic_context);
+ type = mono_type_get_checked (ctx->image, token, ctx->generic_context, &error);
+ mono_error_cleanup (&error); /*FIXME don't swallow the error */
}
if (!type || mono_loader_get_last_error ()) {
@@ -1352,8 +1354,6 @@ is_correct_rethrow (MonoMethodHeader *header, guint offset)
clause = &header->clauses [i];
if (MONO_OFFSET_IN_HANDLER (clause, offset))
return 1;
- if (MONO_OFFSET_IN_FILTER (clause, offset))
- return 1;
}
return 0;
}
@@ -4420,7 +4420,7 @@ static void
do_ldstr (VerifyContext *ctx, guint32 token)
{
GSList *error = NULL;
- if (ctx->method->wrapper_type == MONO_WRAPPER_NONE && !ctx->image->dynamic) {
+ if (ctx->method->wrapper_type == MONO_WRAPPER_NONE && !image_is_dynamic (ctx->image)) {
if (mono_metadata_token_code (token) != MONO_TOKEN_STRING) {
ADD_VERIFY_ERROR2 (ctx, g_strdup_printf ("Invalid string token %x at 0x%04x", token, ctx->ip_offset), MONO_EXCEPTION_BAD_IMAGE);
return;
@@ -6023,7 +6023,7 @@ mono_verifier_is_enabled_for_image (MonoImage *image)
gboolean
mono_verifier_is_method_full_trust (MonoMethod *method)
{
- return mono_verifier_is_class_full_trust (method->klass) && !method->dynamic;
+ return mono_verifier_is_class_full_trust (method->klass) && !method_is_dynamic (method);
}
/*
@@ -6283,7 +6283,7 @@ mono_verifier_verify_class (MonoClass *class)
if (!class->parent &&
class != mono_defaults.object_class &&
!MONO_CLASS_IS_INTERFACE (class) &&
- (!class->image->dynamic && class->type_token != 0x2000001)) /*<Module> is the first type in the assembly*/
+ (!image_is_dynamic (class->image) && class->type_token != 0x2000001)) /*<Module> is the first type in the assembly*/
return FALSE;
if (class->parent) {
if (MONO_CLASS_IS_INTERFACE (class->parent))
diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in
index cd935b50bb7..f928eec806d 100755
--- a/mono/mini/Makefile.am.in
+++ b/mono/mini/Makefile.am.in
@@ -276,9 +276,15 @@ endif
# Create monow.exe, linked for the 'windows' subsystem
if HOST_WIN32
+if SUPPORT_BOEHM
monow_LDADD = $(mono_boehm_LDADD)
monow_LDFLAGS = $(mono_boehm_LDFLAGS) -mwindows
monow_SOURCES = $(mono_boehm_SOURCES)
+else
+monow_LDADD = $(mono_sgen_LDADD)
+monow_LDFLAGS = $(mono_sgen_LDFLAGS) -mwindows
+monow_SOURCES = $(mono_sgen_SOURCES)
+endif
endif
genmdesc_SOURCES = \
@@ -426,7 +432,8 @@ common_sources = \
xdebug.c \
mini-llvm.h \
mini-llvm-cpp.h \
- alias-analysis.c
+ alias-analysis.c \
+ mini-cross-helpers.c
test_sources = \
basic-calls.cs \
diff --git a/mono/mini/alias-analysis.c b/mono/mini/alias-analysis.c
index bc5bd8e0126..c260dae2c7a 100644
--- a/mono/mini/alias-analysis.c
+++ b/mono/mini/alias-analysis.c
@@ -156,6 +156,7 @@ lower_memory_access (MonoCompile *cfg)
g_hash_table_remove_all (addr_loads);
for (ins = bb->code; ins; ins = ins->next) {
+handle_instruction:
switch (ins->opcode) {
case OP_LDADDR:
g_hash_table_insert (addr_loads, GINT_TO_POINTER (ins->dreg), ins);
@@ -197,7 +198,11 @@ lower_memory_access (MonoCompile *cfg)
tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->sreg1));
if (tmp) {
if (cfg->verbose_level > 2) { printf ("Found candidate load:"); mono_print_ins (ins); }
- needs_dce |= lower_load (cfg, ins, tmp);
+ if (lower_load (cfg, ins, tmp)) {
+ needs_dce = TRUE;
+ /* Try to propagate known aliases if an OP_MOVE was inserted */
+ goto handle_instruction;
+ }
}
break;
@@ -214,7 +219,11 @@ lower_memory_access (MonoCompile *cfg)
tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->dreg));
if (tmp) {
if (cfg->verbose_level > 2) { printf ("Found candidate store:"); mono_print_ins (ins); }
- needs_dce |= lower_store (cfg, ins, tmp);
+ if (lower_store (cfg, ins, tmp)) {
+ needs_dce = TRUE;
+ /* Try to propagate known aliases if an OP_MOVE was inserted */
+ goto handle_instruction;
+ }
}
break;
@@ -229,6 +238,15 @@ lower_memory_access (MonoCompile *cfg)
needs_dce |= lower_store_imm (cfg, ins, tmp);
}
break;
+ case OP_CHECK_THIS:
+ case OP_NOT_NULL:
+ tmp = g_hash_table_lookup (addr_loads, GINT_TO_POINTER (ins->sreg1));
+ if (tmp) {
+ if (cfg->verbose_level > 2) { printf ("Found null check over local: "); mono_print_ins (ins); }
+ NULLIFY_INS (ins);
+ needs_dce = TRUE;
+ }
+ break;
}
}
}
@@ -237,13 +255,14 @@ lower_memory_access (MonoCompile *cfg)
}
static gboolean
-recompute_aliased_variables (MonoCompile *cfg)
+recompute_aliased_variables (MonoCompile *cfg, int *restored_vars)
{
int i;
MonoBasicBlock *bb;
MonoInst *ins;
int kills = 0;
int adds = 0;
+ *restored_vars = 0;
for (i = 0; i < cfg->num_varinfo; i++) {
MonoInst *var = cfg->varinfo [i];
@@ -275,7 +294,8 @@ recompute_aliased_variables (MonoCompile *cfg)
}
}
}
-
+ *restored_vars = adds;
+
mono_jit_stats.alias_found += kills;
mono_jit_stats.alias_removed += kills - adds;
if (kills > adds) {
@@ -299,6 +319,7 @@ TODO:
void
mono_local_alias_analysis (MonoCompile *cfg)
{
+ int i, restored_vars = 1;
if (!cfg->has_indirection)
return;
@@ -319,17 +340,18 @@ mono_local_alias_analysis (MonoCompile *cfg)
/*
Some variables no longer need to be flagged as indirect, find them.
+ Since indirect vars are converted into global vregs, each pass eliminates only one level of indirection.
+ Most cases only need one pass and some 2.
*/
- if (!recompute_aliased_variables (cfg))
- goto done;
-
- /*
- A lot of simplification just took place, we recompute local variables and do DCE to
- really profit from the previous gains
- */
- mono_handle_global_vregs (cfg);
- if (cfg->opt & MONO_OPT_DEADCE)
- mono_local_deadce (cfg);
+ for (i = 0; i < 3 && restored_vars > 0 && recompute_aliased_variables (cfg, &restored_vars); ++i) {
+ /*
+ A lot of simplification just took place, we recompute local variables and do DCE to
+ really profit from the previous gains
+ */
+ mono_handle_global_vregs (cfg);
+ if (cfg->opt & MONO_OPT_DEADCE)
+ mono_local_deadce (cfg);
+ }
done:
if (cfg->verbose_level > 2)
diff --git a/mono/mini/aot-compiler.c b/mono/mini/aot-compiler.c
index 660d9da1e04..299b6c2cc63 100644
--- a/mono/mini/aot-compiler.c
+++ b/mono/mini/aot-compiler.c
@@ -43,6 +43,7 @@
#include <sys/stat.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/tabledefs.h>
#include <mono/metadata/class.h>
#include <mono/metadata/object.h>
@@ -111,7 +112,7 @@ struct _ReadOnlyValue {
gpointer ptr;
} value;
};
-static ReadOnlyValue *readonly_values = NULL;
+static ReadOnlyValue *readonly_values;
typedef struct MonoAotOptions {
char *outfile;
@@ -148,6 +149,7 @@ typedef struct MonoAotOptions {
char *mtriple;
char *llvm_path;
char *instances_logfile_path;
+ char *logfile;
} MonoAotOptions;
typedef struct MonoAotStats {
@@ -205,7 +207,7 @@ typedef struct MonoAotCompile {
MonoAotStats stats;
int method_index;
char *static_linking_symbol;
- CRITICAL_SECTION mutex;
+ mono_mutex_t mutex;
gboolean use_bin_writer;
gboolean gas_line_numbers;
MonoImageWriter *w;
@@ -243,6 +245,7 @@ typedef struct MonoAotCompile {
int objc_selector_index, objc_selector_index_2;
GPtrArray *objc_selectors;
GHashTable *objc_selector_to_index;
+ FILE *logfile;
FILE *instances_logfile;
} MonoAotCompile;
@@ -253,8 +256,8 @@ typedef struct {
gboolean jit_used, llvm_used;
} MonoPltEntry;
-#define mono_acfg_lock(acfg) EnterCriticalSection (&((acfg)->mutex))
-#define mono_acfg_unlock(acfg) LeaveCriticalSection (&((acfg)->mutex))
+#define mono_acfg_lock(acfg) mono_mutex_lock (&((acfg)->mutex))
+#define mono_acfg_unlock(acfg) mono_mutex_unlock (&((acfg)->mutex))
/* This points to the current acfg in LLVM mode */
static MonoAotCompile *llvm_acfg;
@@ -302,6 +305,38 @@ get_patch_name (int info)
static char*
get_plt_entry_debug_sym (MonoAotCompile *acfg, MonoJumpInfo *ji, GHashTable *cache);
+static void
+aot_printf (MonoAotCompile *acfg, const gchar *format, ...)
+{
+ FILE *output;
+ va_list args;
+
+ if (acfg->logfile)
+ output = acfg->logfile;
+ else
+ output = stdout;
+
+ va_start (args, format);
+ vfprintf (output, format, args);
+ va_end (args);
+}
+
+static void
+aot_printerrf (MonoAotCompile *acfg, const gchar *format, ...)
+{
+ FILE *output;
+ va_list args;
+
+ if (acfg->logfile)
+ output = acfg->logfile;
+ else
+ output = stderr;
+
+ va_start (args, format);
+ vfprintf (output, format, args);
+ va_end (args);
+}
+
/* Wrappers around the image writer functions */
static inline void
@@ -2298,7 +2333,9 @@ find_typespec_for_class (MonoAotCompile *acfg, MonoClass *klass)
if (!acfg->typespec_classes) {
acfg->typespec_classes = mono_mempool_alloc0 (acfg->mempool, sizeof (MonoClass*) * len);
for (i = 0; i < len; ++i) {
- acfg->typespec_classes [i] = mono_class_get_full (acfg->image, MONO_TOKEN_TYPE_SPEC | (i + 1), NULL);
+ MonoError error;
+ acfg->typespec_classes [i] = mono_class_get_and_inflate_typespec_checked (acfg->image, MONO_TOKEN_TYPE_SPEC | (i + 1), NULL, &error);
+ g_assert (mono_error_ok (&error)); /* FIXME error handling */
}
}
for (i = 0; i < len; ++i) {
@@ -2665,8 +2702,10 @@ encode_method_ref (MonoAotCompile *acfg, MonoMethod *method, guint8 *buf, guint8
case MONO_WRAPPER_LDFLDA:
case MONO_WRAPPER_STFLD:
case MONO_WRAPPER_ISINST: {
- MonoClass *proxy_class = mono_marshal_get_wrapper_info (method);
- encode_klass_ref (acfg, proxy_class, p, &p);
+ WrapperInfo *info = mono_marshal_get_wrapper_info (method);
+
+ g_assert (info);
+ encode_klass_ref (acfg, info->d.proxy.klass, p, &p);
break;
}
case MONO_WRAPPER_LDFLD_REMOTE:
@@ -3110,7 +3149,7 @@ add_extra_method_with_depth (MonoAotCompile *acfg, MonoMethod *method, int depth
method = mini_get_shared_method (method);
if (acfg->aot_opts.log_generics)
- printf ("%*sAdding method %s.\n", depth, "", mono_method_full_name (method, TRUE));
+ aot_printf (acfg, "%*sAdding method %s.\n", depth, "", mono_method_full_name (method, TRUE));
add_method_full (acfg, method, TRUE, depth);
}
@@ -3500,14 +3539,15 @@ add_wrappers (MonoAotCompile *acfg)
/* delegate-invoke wrappers */
for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPEDEF].rows; ++i) {
+ MonoError error;
MonoClass *klass;
MonoCustomAttrInfo *cattr;
token = MONO_TOKEN_TYPE_DEF | (i + 1);
- klass = mono_class_get (acfg->image, token);
+ klass = mono_class_get_checked (acfg->image, token, &error);
if (!klass) {
- mono_loader_clear_error ();
+ mono_error_cleanup (&error);
continue;
}
@@ -3588,13 +3628,14 @@ add_wrappers (MonoAotCompile *acfg)
/* array access wrappers */
for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPESPEC].rows; ++i) {
+ MonoError error;
MonoClass *klass;
token = MONO_TOKEN_TYPE_SPEC | (i + 1);
- klass = mono_class_get (acfg->image, token);
+ klass = mono_class_get_checked (acfg->image, token, &error);
if (!klass) {
- mono_loader_clear_error ();
+ mono_error_cleanup (&error);
continue;
}
@@ -3771,13 +3812,14 @@ add_wrappers (MonoAotCompile *acfg)
/* StructureToPtr/PtrToStructure wrappers */
for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPEDEF].rows; ++i) {
+ MonoError error;
MonoClass *klass;
token = MONO_TOKEN_TYPE_DEF | (i + 1);
- klass = mono_class_get (acfg->image, token);
+ klass = mono_class_get_checked (acfg->image, token, &error);
if (!klass) {
- mono_loader_clear_error ();
+ mono_error_cleanup (&error);
continue;
}
@@ -3926,7 +3968,7 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
return;
if (acfg->aot_opts.log_generics)
- printf ("%*sAdding generic instance %s [%s].\n", depth, "", mono_type_full_name (&klass->byval_arg), ref);
+ aot_printf (acfg, "%*sAdding generic instance %s [%s].\n", depth, "", mono_type_full_name (&klass->byval_arg), ref);
g_hash_table_insert (acfg->ginst_hash, klass, klass);
@@ -3976,7 +4018,7 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
method = mono_marshal_get_delegate_invoke (method, NULL);
if (acfg->aot_opts.log_generics)
- printf ("%*sAdding method %s.\n", depth, "", mono_method_full_name (method, TRUE));
+ aot_printf (acfg, "%*sAdding method %s.\n", depth, "", mono_method_full_name (method, TRUE));
add_method (acfg, method);
}
@@ -4236,13 +4278,14 @@ add_generic_instances (MonoAotCompile *acfg)
}
for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPESPEC].rows; ++i) {
+ MonoError error;
MonoClass *klass;
token = MONO_TOKEN_TYPE_SPEC | (i + 1);
- klass = mono_class_get (acfg->image, token);
+ klass = mono_class_get_checked (acfg->image, token, &error);
if (!klass || klass->rank) {
- mono_loader_clear_error ();
+ mono_error_cleanup (&error);
continue;
}
@@ -5042,6 +5085,7 @@ encode_patch (MonoAotCompile *acfg, MonoJumpInfo *patch_info, guint8 *buf, guint
} else {
encode_value (0, p, &p);
}
+ encode_value (patch_info->data.del_tramp->virtual, p, &p);
break;
case MONO_PATCH_INFO_FIELD:
case MONO_PATCH_INFO_SFLDA:
@@ -5324,16 +5368,14 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
if (use_unwind_ops) {
guint32 encoded_len;
guint8 *encoded;
+ guint32 unwind_desc;
- /*
- * This is a duplicate of the data in the .debug_frame section, but that
- * section cannot be accessed using the dl interface.
- */
encoded = mono_unwind_ops_encode (cfg->unwind_ops, &encoded_len);
- encode_value (get_unwind_info_offset (acfg, encoded, encoded_len), p, &p);
- g_free (encoded);
+
+ unwind_desc = get_unwind_info_offset (acfg, encoded, encoded_len);
+ encode_value (unwind_desc, p, &p);
} else {
- encode_value (jinfo->used_regs, p, &p);
+ encode_value (jinfo->unwind_info, p, &p);
}
/*Encode the number of holes before the number of clauses to make decoding easier*/
@@ -5430,6 +5472,7 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
eh_info = mono_jit_info_get_arch_eh_info (jinfo);
encode_value (eh_info->stack_size, p, &p);
+ encode_value (eh_info->epilog_size, p, &p);
}
if (jinfo->has_generic_jit_info) {
@@ -5563,14 +5606,15 @@ emit_exception_debug_info (MonoAotCompile *acfg, MonoCompile *cfg)
static guint32
emit_klass_info (MonoAotCompile *acfg, guint32 token)
{
- MonoClass *klass = mono_class_get (acfg->image, token);
+ MonoError error;
+ MonoClass *klass = mono_class_get_checked (acfg->image, token, &error);
guint8 *p, *buf;
int i, buf_size, res;
gboolean no_special_static, cant_encode;
gpointer iter = NULL;
if (!klass) {
- mono_loader_clear_error ();
+ mono_error_cleanup (&error);
buf_size = 16;
@@ -6348,6 +6392,8 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
opts->instances_logfile_path = g_strdup (arg + strlen ("log-instances="));
} else if (str_begins_with (arg, "log-instances")) {
opts->log_instances = TRUE;
+ } else if (str_begins_with (arg, "internal-logfile=")) {
+ opts->logfile = g_strdup (arg + strlen ("internal-logfile="));
} else if (str_begins_with (arg, "mtriple=")) {
opts->mtriple = g_strdup (arg + strlen ("mtriple="));
} else if (str_begins_with (arg, "llvm-path=")) {
@@ -7011,7 +7057,7 @@ mono_aot_patch_info_dup (MonoJumpInfo* ji)
* Emit the LLVM code into an LLVM bytecode file, and compile it using the LLVM
* tools.
*/
-static void
+static gboolean
emit_llvm_file (MonoAotCompile *acfg)
{
char *command, *opts, *tempbc;
@@ -7091,10 +7137,9 @@ emit_llvm_file (MonoAotCompile *acfg)
opts = g_strdup ("-targetlibinfo -no-aa -basicaa -notti -instcombine -simplifycfg -sroa -domtree -early-cse -lazy-value-info -correlated-propagation -simplifycfg -instcombine -simplifycfg -reassociate -domtree -loops -loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine -scalar-evolution -loop-simplify -lcssa -indvars -loop-idiom -loop-deletion -loop-unroll -memdep -gvn -memdep -memcpyopt -sccp -instcombine -lazy-value-info -correlated-propagation -domtree -memdep -adce -simplifycfg -instcombine -strip-dead-prototypes -domtree -verify");
#if 1
command = g_strdup_printf ("%sopt -f %s -o \"%s.opt.bc\" \"%s.bc\"", acfg->aot_opts.llvm_path, opts, acfg->tmpbasename, acfg->tmpbasename);
- printf ("Executing opt: %s\n", command);
- if (system (command) != 0) {
- exit (1);
- }
+ aot_printf (acfg, "Executing opt: %s\n", command);
+ if (system (command) != 0)
+ return FALSE;
#endif
g_free (opts);
@@ -7120,11 +7165,11 @@ emit_llvm_file (MonoAotCompile *acfg)
command = g_strdup_printf ("%sllc %s -disable-gnu-eh-frame -enable-mono-eh-frame -o \"%s\" \"%s.opt.bc\"", acfg->aot_opts.llvm_path, acfg->llc_args->str, acfg->tmpfname, acfg->tmpbasename);
- printf ("Executing llc: %s\n", command);
+ aot_printf (acfg, "Executing llc: %s\n", command);
- if (system (command) != 0) {
- exit (1);
- }
+ if (system (command) != 0)
+ return FALSE;
+ return TRUE;
}
#endif
@@ -7797,10 +7842,11 @@ emit_class_name_table (MonoAotCompile *acfg)
for (i = 0; i < table_size; ++i)
g_ptr_array_add (table, NULL);
for (i = 0; i < acfg->image->tables [MONO_TABLE_TYPEDEF].rows; ++i) {
+ MonoError error;
token = MONO_TOKEN_TYPE_DEF | (i + 1);
- klass = mono_class_get (acfg->image, token);
+ klass = mono_class_get_checked (acfg->image, token, &error);
if (!klass) {
- mono_loader_clear_error ();
+ mono_error_cleanup (&error);
continue;
}
full_name = mono_type_get_name_full (mono_class_get_type (klass), MONO_TYPE_NAME_FORMAT_FULL_NAME);
@@ -8259,8 +8305,8 @@ emit_file_info (MonoAotCompile *acfg)
emit_int32 (acfg, align);
}
#else
- emit_int32 (acfg, __alignof__ (double));
- emit_int32 (acfg, __alignof__ (gint64));
+ emit_int32 (acfg, MONO_ABI_ALIGNOF (double));
+ emit_int32 (acfg, MONO_ABI_ALIGNOF (gint64));
#endif
emit_int32 (acfg, MONO_TRAMPOLINE_NUM);
emit_int32 (acfg, acfg->tramp_page_size);
@@ -8368,7 +8414,7 @@ emit_dwarf_info (MonoAotCompile *acfg)
#endif
}
-static void
+static gboolean
collect_methods (MonoAotCompile *acfg)
{
int mindex, i;
@@ -8382,9 +8428,9 @@ collect_methods (MonoAotCompile *acfg)
method = mono_get_method (acfg->image, token, NULL);
if (!method) {
- printf ("Failed to load method 0x%x from '%s'.\n", token, image->name);
- printf ("Run with MONO_LOG_LEVEL=debug for more information.\n");
- exit (1);
+ aot_printerrf (acfg, "Failed to load method 0x%x from '%s'.\n", token, image->name);
+ aot_printerrf (acfg, "Run with MONO_LOG_LEVEL=debug for more information.\n");
+ return FALSE;
}
/* Load all methods eagerly to skip the slower lazy loading code */
@@ -8448,6 +8494,7 @@ collect_methods (MonoAotCompile *acfg)
if (acfg->aot_opts.full_aot)
add_wrappers (acfg);
+ return TRUE;
}
static void
@@ -8560,9 +8607,9 @@ compile_asm (MonoAotCompile *acfg)
#endif
if (acfg->aot_opts.asm_only) {
- printf ("Output file: '%s'.\n", acfg->tmpfname);
+ aot_printf (acfg, "Output file: '%s'.\n", acfg->tmpfname);
if (acfg->aot_opts.static_link)
- printf ("Linking symbol: '%s'.\n", acfg->static_linking_symbol);
+ aot_printf (acfg, "Linking symbol: '%s'.\n", acfg->static_linking_symbol);
return 0;
}
@@ -8575,7 +8622,7 @@ compile_asm (MonoAotCompile *acfg)
objfile = g_strdup_printf ("%s.o", acfg->tmpfname);
}
command = g_strdup_printf ("%s%s %s %s -o %s %s", tool_prefix, AS_NAME, AS_OPTIONS, acfg->as_args ? acfg->as_args->str : "", objfile, acfg->tmpfname);
- printf ("Executing the native assembler: %s\n", command);
+ aot_printf (acfg, "Executing the native assembler: %s\n", command);
if (system (command) != 0) {
g_free (command);
g_free (objfile);
@@ -8585,8 +8632,8 @@ compile_asm (MonoAotCompile *acfg)
g_free (command);
if (acfg->aot_opts.static_link) {
- printf ("Output file: '%s'.\n", objfile);
- printf ("Linking symbol: '%s'.\n", acfg->static_linking_symbol);
+ aot_printf (acfg, "Output file: '%s'.\n", objfile);
+ aot_printf (acfg, "Linking symbol: '%s'.\n", acfg->static_linking_symbol);
g_free (objfile);
return 0;
}
@@ -8603,7 +8650,7 @@ compile_asm (MonoAotCompile *acfg)
#else
command = g_strdup_printf ("%sld %s -shared -o %s %s.o", tool_prefix, LD_OPTIONS, tmp_outfile_name, acfg->tmpfname);
#endif
- printf ("Executing the native linker: %s\n", command);
+ aot_printf (acfg, "Executing the native linker: %s\n", command);
if (system (command) != 0) {
g_free (tmp_outfile_name);
g_free (outfile_name);
@@ -8625,7 +8672,7 @@ compile_asm (MonoAotCompile *acfg)
* happens a lot in emit_and_reloc_code (), so we need to get rid of them.
*/
command = g_strdup_printf ("%sstrip --strip-symbol=\\$a --strip-symbol=\\$d %s", tool_prefix, tmp_outfile_name);
- printf ("Stripping the binary: %s\n", command);
+ aot_printf (acfg, "Stripping the binary: %s\n", command);
if (system (command) != 0) {
g_free (tmp_outfile_name);
g_free (outfile_name);
@@ -8639,7 +8686,7 @@ compile_asm (MonoAotCompile *acfg)
#if defined(TARGET_MACH)
command = g_strdup_printf ("dsymutil %s", outfile_name);
- printf ("Executing dsymutil: %s\n", command);
+ aot_printf (acfg, "Executing dsymutil: %s\n", command);
if (system (command) != 0) {
return 1;
}
@@ -8653,7 +8700,7 @@ compile_asm (MonoAotCompile *acfg)
g_free (objfile);
if (acfg->aot_opts.save_temps)
- printf ("Retained input file.\n");
+ aot_printf (acfg, "Retained input file.\n");
else
unlink (acfg->tmpfname);
@@ -8698,7 +8745,7 @@ acfg_create (MonoAssembly *ass, guint32 opts)
acfg->klass_blob_hash = g_hash_table_new (NULL, NULL);
acfg->method_blob_hash = g_hash_table_new (NULL, NULL);
acfg->plt_entry_debug_sym_cache = g_hash_table_new (g_str_hash, g_str_equal);
- InitializeCriticalSection (&acfg->mutex);
+ mono_mutex_init_recursive (&acfg->mutex);
return acfg;
}
@@ -8758,15 +8805,6 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
TV_DECLARE (atv);
TV_DECLARE (btv);
-#if !defined(MONO_ARCH_GSHAREDVT_SUPPORTED) || !defined(ENABLE_GSHAREDVT)
- if (opts & MONO_OPT_GSHAREDVT) {
- fprintf (stderr, "-O=gsharedvt not supported on this platform.\n");
- exit (1);
- }
-#endif
-
- printf ("Mono Ahead of Time compiler - compiling assembly %s\n", image->name);
-
acfg = acfg_create (ass, opts);
memset (&acfg->aot_opts, 0, sizeof (acfg->aot_opts));
@@ -8783,21 +8821,34 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
mono_aot_parse_options (aot_options, &acfg->aot_opts);
+ if (acfg->aot_opts.logfile) {
+ acfg->logfile = fopen (acfg->aot_opts.logfile, "a+");
+ }
+
if (acfg->aot_opts.static_link)
acfg->aot_opts.autoreg = TRUE;
//acfg->aot_opts.print_skipped_methods = TRUE;
+#if !defined(MONO_ARCH_GSHAREDVT_SUPPORTED) || !defined(ENABLE_GSHAREDVT)
+ if (opts & MONO_OPT_GSHAREDVT) {
+ aot_printerrf (acfg, "-O=gsharedvt not supported on this platform.\n");
+ return 1;
+ }
+#endif
+
+ aot_printf (acfg, "Mono Ahead of Time compiler - compiling assembly %s\n", image->name);
+
#ifndef MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES
if (acfg->aot_opts.full_aot) {
- printf ("--aot=full is not supported on this platform.\n");
+ aot_printerrf (acfg, "--aot=full is not supported on this platform.\n");
return 1;
}
#endif
if (acfg->aot_opts.direct_pinvoke && !acfg->aot_opts.static_link) {
- fprintf (stderr, "The 'direct-pinvoke' AOT option also requires the 'static' AOT option.\n");
- exit (1);
+ aot_printerrf (acfg, "The 'direct-pinvoke' AOT option also requires the 'static' AOT option.\n");
+ return 1;
}
if (acfg->aot_opts.static_link)
@@ -8810,7 +8861,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
opt->gen_seq_points = TRUE;
if (!mono_debug_enabled ()) {
- fprintf (stderr, "The soft-debug AOT option requires the --debug option.\n");
+ aot_printerrf (acfg, "The soft-debug AOT option requires the --debug option.\n");
return 1;
}
acfg->flags |= MONO_AOT_FILE_FLAG_DEBUG;
@@ -8822,8 +8873,8 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
acfg->flags |= MONO_AOT_FILE_FLAG_WITH_LLVM;
if (acfg->aot_opts.soft_debug) {
- fprintf (stderr, "The 'soft-debug' option is not supported when compiling with LLVM.\n");
- exit (1);
+ aot_printerrf (acfg, "The 'soft-debug' option is not supported when compiling with LLVM.\n");
+ return 1;
}
}
@@ -8833,8 +8884,8 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
if (acfg->aot_opts.instances_logfile_path) {
acfg->instances_logfile = fopen (acfg->aot_opts.instances_logfile_path, "w");
if (!acfg->instances_logfile) {
- fprintf (stderr, "Unable to create logfile: '%s'.\n", acfg->aot_opts.instances_logfile_path);
- exit (1);
+ aot_printerrf (acfg, "Unable to create logfile: '%s'.\n", acfg->aot_opts.instances_logfile_path);
+ return 1;
}
}
@@ -8880,7 +8931,9 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
mono_set_partial_sharing_supported (TRUE);
*/
- collect_methods (acfg);
+ res = collect_methods (acfg);
+ if (!res)
+ return 1;
acfg->cfgs_size = acfg->methods->len + 32;
acfg->cfgs = g_new0 (MonoCompile*, acfg->cfgs_size);
@@ -8932,6 +8985,8 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
#ifdef ENABLE_LLVM
if (acfg->llvm) {
+ gboolean res;
+
if (acfg->aot_opts.asm_only) {
if (acfg->aot_opts.outfile) {
acfg->tmpfname = g_strdup_printf ("%s", acfg->aot_opts.outfile);
@@ -8945,7 +9000,9 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
acfg->tmpfname = g_strdup_printf ("%s.s", acfg->tmpbasename);
}
- emit_llvm_file (acfg);
+ res = emit_llvm_file (acfg);
+ if (!res)
+ return FALSE;
}
#endif
@@ -8963,7 +9020,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
acfg->fp = fopen (tmp_outfile_name, "w");
if (!acfg->fp) {
- printf ("Unable to create temporary file '%s': %s\n", tmp_outfile_name, strerror (errno));
+ aot_printf (acfg, "Unable to create temporary file '%s': %s\n", tmp_outfile_name, strerror (errno));
return 1;
}
@@ -8987,7 +9044,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
}
}
if (acfg->fp == 0) {
- fprintf (stderr, "Unable to open file '%s': %s\n", acfg->tmpfname, strerror (errno));
+ aot_printerrf (acfg, "Unable to open file '%s': %s\n", acfg->tmpfname, strerror (errno));
return 1;
}
acfg->w = img_writer_create (acfg->fp, FALSE);
@@ -9024,7 +9081,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
if (!acfg->aot_opts.nodebug || acfg->aot_opts.dwarf_debug) {
if (acfg->aot_opts.dwarf_debug && !mono_debug_enabled ()) {
- fprintf (stderr, "The dwarf AOT option requires the --debug option.\n");
+ aot_printerrf (acfg, "The dwarf AOT option requires the --debug option.\n");
return 1;
}
acfg->dwarf = mono_dwarf_writer_create (acfg->w, NULL, 0, FALSE, !acfg->gas_line_numbers);
@@ -9112,7 +9169,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
all_sizes = acfg->stats.code_size + acfg->stats.info_size + acfg->stats.ex_info_size + acfg->stats.unwind_info_size + acfg->stats.class_info_size + acfg->stats.got_info_size + acfg->stats.offsets_size + acfg->stats.plt_size;
- printf ("Code: %d(%d%%) Info: %d(%d%%) Ex Info: %d(%d%%) Unwind Info: %d(%d%%) Class Info: %d(%d%%) PLT: %d(%d%%) GOT Info: %d(%d%%) Offsets: %d(%d%%) GOT: %d\n",
+ aot_printf (acfg, "Code: %d(%d%%) Info: %d(%d%%) Ex Info: %d(%d%%) Unwind Info: %d(%d%%) Class Info: %d(%d%%) PLT: %d(%d%%) GOT Info: %d(%d%%) Offsets: %d(%d%%) GOT: %d\n",
acfg->stats.code_size, acfg->stats.code_size * 100 / all_sizes,
acfg->stats.info_size, acfg->stats.info_size * 100 / all_sizes,
acfg->stats.ex_info_size, acfg->stats.ex_info_size * 100 / all_sizes,
@@ -9122,19 +9179,19 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
acfg->stats.got_info_size, acfg->stats.got_info_size * 100 / all_sizes,
acfg->stats.offsets_size, acfg->stats.offsets_size * 100 / all_sizes,
(int)(acfg->got_offset * sizeof (gpointer)));
- printf ("Compiled: %d/%d (%d%%)%s, No GOT slots: %d (%d%%), Direct calls: %d (%d%%)\n",
+ aot_printf (acfg, "Compiled: %d/%d (%d%%)%s, No GOT slots: %d (%d%%), Direct calls: %d (%d%%)\n",
acfg->stats.ccount, acfg->stats.mcount, acfg->stats.mcount ? (acfg->stats.ccount * 100) / acfg->stats.mcount : 100,
llvm_stats_msg,
acfg->stats.methods_without_got_slots, acfg->stats.mcount ? (acfg->stats.methods_without_got_slots * 100) / acfg->stats.mcount : 100,
acfg->stats.direct_calls, acfg->stats.all_calls ? (acfg->stats.direct_calls * 100) / acfg->stats.all_calls : 100);
if (acfg->stats.genericcount)
- printf ("%d methods are generic (%d%%)\n", acfg->stats.genericcount, acfg->stats.mcount ? (acfg->stats.genericcount * 100) / acfg->stats.mcount : 100);
+ aot_printf (acfg, "%d methods are generic (%d%%)\n", acfg->stats.genericcount, acfg->stats.mcount ? (acfg->stats.genericcount * 100) / acfg->stats.mcount : 100);
if (acfg->stats.abscount)
- printf ("%d methods contain absolute addresses (%d%%)\n", acfg->stats.abscount, acfg->stats.mcount ? (acfg->stats.abscount * 100) / acfg->stats.mcount : 100);
+ aot_printf (acfg, "%d methods contain absolute addresses (%d%%)\n", acfg->stats.abscount, acfg->stats.mcount ? (acfg->stats.abscount * 100) / acfg->stats.mcount : 100);
if (acfg->stats.lmfcount)
- printf ("%d methods contain lmf pointers (%d%%)\n", acfg->stats.lmfcount, acfg->stats.mcount ? (acfg->stats.lmfcount * 100) / acfg->stats.mcount : 100);
+ aot_printf (acfg, "%d methods contain lmf pointers (%d%%)\n", acfg->stats.lmfcount, acfg->stats.mcount ? (acfg->stats.lmfcount * 100) / acfg->stats.mcount : 100);
if (acfg->stats.ocount)
- printf ("%d methods have other problems (%d%%)\n", acfg->stats.ocount, acfg->stats.mcount ? (acfg->stats.ocount * 100) / acfg->stats.mcount : 100);
+ aot_printf (acfg, "%d methods have other problems (%d%%)\n", acfg->stats.ocount, acfg->stats.mcount ? (acfg->stats.ocount * 100) / acfg->stats.mcount : 100);
TV_GETTIME (atv);
res = img_writer_emit_writeout (acfg->w);
@@ -9146,7 +9203,7 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
int err = rename (tmp_outfile_name, outfile_name);
if (err) {
- printf ("Unable to rename '%s' to '%s': %s\n", tmp_outfile_name, outfile_name, strerror (errno));
+ aot_printf (acfg, "Unable to rename '%s' to '%s': %s\n", tmp_outfile_name, outfile_name, strerror (errno));
return 1;
}
} else {
@@ -9162,13 +9219,13 @@ mono_compile_assembly (MonoAssembly *ass, guint32 opts, const char *aot_options)
if (acfg->aot_opts.stats) {
int i;
- printf ("GOT slot distribution:\n");
+ aot_printf (acfg, "GOT slot distribution:\n");
for (i = 0; i < MONO_PATCH_INFO_NONE; ++i)
if (acfg->stats.got_slot_types [i])
- printf ("\t%s: %d (%d)\n", get_patch_name (i), acfg->stats.got_slot_types [i], acfg->stats.got_slot_info_sizes [i]);
+ aot_printf (acfg, "\t%s: %d (%d)\n", get_patch_name (i), acfg->stats.got_slot_types [i], acfg->stats.got_slot_info_sizes [i]);
}
- printf ("JIT time: %d ms, Generation time: %d ms, Assembly+Link time: %d ms.\n", acfg->stats.jit_time / 1000, acfg->stats.gen_time / 1000, acfg->stats.link_time / 1000);
+ aot_printf (acfg, "JIT time: %d ms, Generation time: %d ms, Assembly+Link time: %d ms.\n", acfg->stats.jit_time / 1000, acfg->stats.gen_time / 1000, acfg->stats.link_time / 1000);
acfg_free (acfg);
diff --git a/mono/mini/aot-runtime.c b/mono/mini/aot-runtime.c
index 5634e57777c..213d5b56ab2 100644
--- a/mono/mini/aot-runtime.c
+++ b/mono/mini/aot-runtime.c
@@ -37,6 +37,7 @@
#include <sys/wait.h> /* for WIFEXITED, WEXITSTATUS */
#endif
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/tabledefs.h>
#include <mono/metadata/class.h>
#include <mono/metadata/object.h>
@@ -54,12 +55,17 @@
#include <mono/utils/mono-mmap.h>
#include "mono/utils/mono-compiler.h"
#include <mono/utils/mono-counters.h>
+#include <mono/utils/mono-digest.h>
#include "mini.h"
#include "version.h"
#ifndef DISABLE_AOT
+#ifdef TARGET_OSX
+#define ENABLE_AOT_CACHE
+#endif
+
#ifdef TARGET_WIN32
#define SHARED_EXT ".dll"
#elif ((defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__)) || defined(__MACH__)) && !defined(__linux__)
@@ -138,7 +144,7 @@ typedef struct MonoAotModule {
MonoDl *sofile;
JitInfoMap *async_jit_info_table;
- CRITICAL_SECTION mutex;
+ mono_mutex_t mutex;
} MonoAotModule;
typedef struct {
@@ -148,9 +154,9 @@ typedef struct {
} TrampolinePage;
static GHashTable *aot_modules;
-#define mono_aot_lock() EnterCriticalSection (&aot_mutex)
-#define mono_aot_unlock() LeaveCriticalSection (&aot_mutex)
-static CRITICAL_SECTION aot_mutex;
+#define mono_aot_lock() mono_mutex_lock (&aot_mutex)
+#define mono_aot_unlock() mono_mutex_unlock (&aot_mutex)
+static mono_mutex_t aot_mutex;
/*
* Maps assembly names to the mono_aot_module_<NAME>_info symbols in the
@@ -166,15 +172,11 @@ static GHashTable *ji_to_amodule;
/*
* Whenever to AOT compile loaded assemblies on demand and store them in
- * a cache under $HOME/.mono/aot-cache.
+ * a cache.
*/
-static gboolean use_aot_cache = FALSE;
+static gboolean enable_aot_cache = FALSE;
-/*
- * Whenever to spawn a new process to AOT a file or do it in-process. Only relevant if
- * use_aot_cache is TRUE.
- */
-static gboolean spawn_compiler = TRUE;
+static gboolean mscorlib_aot_loaded;
/* For debugging */
static gint32 mono_last_aot_method = -1;
@@ -198,9 +200,9 @@ static GHashTable *aot_jit_icall_hash;
#define USE_PAGE_TRAMPOLINES 0
#endif
-#define mono_aot_page_lock() EnterCriticalSection (&aot_page_mutex)
-#define mono_aot_page_unlock() LeaveCriticalSection (&aot_page_mutex)
-static CRITICAL_SECTION aot_page_mutex;
+#define mono_aot_page_lock() mono_mutex_lock (&aot_page_mutex)
+#define mono_aot_page_unlock() mono_mutex_unlock (&aot_page_mutex)
+static mono_mutex_t aot_page_mutex;
static void
init_plt (MonoAotModule *info);
@@ -212,13 +214,13 @@ init_plt (MonoAotModule *info);
static inline void
amodule_lock (MonoAotModule *amodule)
{
- EnterCriticalSection (&amodule->mutex);
+ mono_mutex_lock (&amodule->mutex);
}
static inline void
amodule_unlock (MonoAotModule *amodule)
{
- LeaveCriticalSection (&amodule->mutex);
+ mono_mutex_unlock (&amodule->mutex);
}
/*
@@ -242,7 +244,7 @@ load_image (MonoAotModule *amodule, int index, gboolean set_error)
assembly = mono_assembly_load (&amodule->image_names [index], amodule->assembly->basedir, &status);
if (!assembly) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module %s is unusable because dependency %s is not found.\n", amodule->aot_name, amodule->image_names [index].name);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable because dependency %s is not found.\n", amodule->aot_name, amodule->image_names [index].name);
amodule->out_of_date = TRUE;
if (set_error) {
@@ -254,7 +256,7 @@ load_image (MonoAotModule *amodule, int index, gboolean set_error)
}
if (strcmp (assembly->image->guid, amodule->image_guids [index])) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module %s is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s').\n", amodule->aot_name, amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable (GUID of dependent assembly %s doesn't match (expected '%s', got '%s').\n", amodule->aot_name, amodule->image_names [index].name, amodule->image_guids [index], assembly->image->guid);
amodule->out_of_date = TRUE;
return NULL;
}
@@ -403,6 +405,7 @@ decode_generic_context (MonoAotModule *module, MonoGenericContext *ctx, guint8 *
static MonoClass*
decode_klass_ref (MonoAotModule *module, guint8 *buf, guint8 **endbuf)
{
+ MonoError error;
MonoImage *image;
MonoClass *klass = NULL, *eklass;
guint32 token, rank, idx;
@@ -421,21 +424,24 @@ decode_klass_ref (MonoAotModule *module, guint8 *buf, guint8 **endbuf)
image = load_image (module, 0, TRUE);
if (!image)
return NULL;
- klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF + idx);
+ klass = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF + idx, &error);
+ g_assert (mono_error_ok (&error));
break;
case MONO_AOT_TYPEREF_TYPEDEF_INDEX_IMAGE:
idx = decode_value (p, &p);
image = load_image (module, decode_value (p, &p), TRUE);
if (!image)
return NULL;
- klass = mono_class_get (image, MONO_TOKEN_TYPE_DEF + idx);
+ klass = mono_class_get_checked (image, MONO_TOKEN_TYPE_DEF + idx, &error);
+ g_assert (mono_error_ok (&error));
break;
case MONO_AOT_TYPEREF_TYPESPEC_TOKEN:
token = decode_value (p, &p);
image = module->assembly->image;
if (!image)
return NULL;
- klass = mono_class_get (image, token);
+ klass = mono_class_get_checked (image, token, &error);
+ g_assert (mono_error_ok (&error));
break;
case MONO_AOT_TYPEREF_GINST: {
MonoClass *gclass;
@@ -488,7 +494,6 @@ decode_klass_ref (MonoAotModule *module, guint8 *buf, guint8 **endbuf)
serial = decode_value (p, &p);
}
- // FIXME: Memory management
t = g_new0 (MonoType, 1);
t->type = type;
if (container) {
@@ -496,7 +501,7 @@ decode_klass_ref (MonoAotModule *module, guint8 *buf, guint8 **endbuf)
g_assert (serial == 0);
} else {
/* Anonymous */
- MonoGenericParam *par = (MonoGenericParam*)g_new0 (MonoGenericParamFull, 1);
+ MonoGenericParam *par = (MonoGenericParam*)mono_image_alloc0 (module->assembly->image, sizeof (MonoGenericParamFull));
par->num = num;
par->serial = serial;
// FIXME:
@@ -1272,132 +1277,286 @@ decode_resolve_method_ref (MonoAotModule *module, guint8 *buf, guint8 **endbuf)
return decode_resolve_method_ref_with_target (module, NULL, buf, endbuf);
}
+#ifdef ENABLE_AOT_CACHE
+
+/* AOT CACHE */
+
+/*
+ * FIXME:
+ * - Add options for controlling the cache size
+ * - Handle full cache by deleting old assemblies lru style
+ * - Maybe add a threshold after an assembly is AOT compiled
+ * - Add options for enabling this for specific main assemblies
+ */
+
+/* The cache directory */
+static char *cache_dir;
+
+/* The number of assemblies AOTed in this run */
+static int cache_count;
+
+/* Whenever to AOT in-process */
+static gboolean in_process;
+
static void
-create_cache_structure (void)
+collect_assemblies (gpointer data, gpointer user_data)
{
- const char *home;
- char *tmp;
- int err;
+ MonoAssembly *ass = data;
+ GSList **l = user_data;
- home = g_get_home_dir ();
- if (!home)
- return;
+ *l = g_slist_prepend (*l, ass);
+}
- tmp = g_build_filename (home, ".mono", NULL);
- if (!g_file_test (tmp, G_FILE_TEST_IS_DIR)) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT creating directory %s", tmp);
-#ifdef HOST_WIN32
- err = mkdir (tmp);
-#else
- err = mkdir (tmp, 0777);
-#endif
- if (err) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT failed: %s", g_strerror (errno));
- g_free (tmp);
- return;
- }
+#define SHA1_DIGEST_LENGTH 20
+
+/*
+ * get_aot_config_hash:
+ *
+ * Return a hash for all the version information an AOT module depends on.
+ */
+static G_GNUC_UNUSED char*
+get_aot_config_hash (MonoAssembly *assembly)
+{
+ char *build_info;
+ GSList *l, *assembly_list = NULL;
+ GString *s;
+ int i;
+ guint8 digest [SHA1_DIGEST_LENGTH];
+ char *digest_str;
+
+ build_info = mono_get_runtime_build_info ();
+
+ s = g_string_new (build_info);
+
+ mono_assembly_foreach (collect_assemblies, &assembly_list);
+
+ /*
+ * The assembly list includes the current assembly as well, no need
+ * to add it.
+ */
+ for (l = assembly_list; l; l = l->next) {
+ MonoAssembly *ass = l->data;
+
+ g_string_append (s, "_");
+ g_string_append (s, ass->aname.name);
+ g_string_append (s, "_");
+ g_string_append (s, ass->image->guid);
}
- g_free (tmp);
- tmp = g_build_filename (home, ".mono", "aot-cache", NULL);
- if (!g_file_test (tmp, G_FILE_TEST_IS_DIR)) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT creating directory %s", tmp);
-#ifdef HOST_WIN32
- err = mkdir (tmp);
-#else
- err = mkdir (tmp, 0777);
-#endif
- if (err) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT failed: %s", g_strerror (errno));
- g_free (tmp);
- return;
- }
+
+ for (i = 0; i < s->len; ++i) {
+ if (!isalnum (s->str [i]) && s->str [i] != '-')
+ s->str [i] = '_';
}
- g_free (tmp);
+
+ mono_sha1_get_digest ((guint8*)s->str, s->len, digest);
+
+ digest_str = g_malloc0 ((SHA1_DIGEST_LENGTH * 2) + 1);
+ for (i = 0; i < SHA1_DIGEST_LENGTH; ++i)
+ sprintf (digest_str + (i * 2), "%02x", digest [i]);
+
+ mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT: file dependencies: %s, hash %s", s->str, digest_str);
+
+ g_string_free (s, TRUE);
+
+ return digest_str;
+}
+
+static void
+aot_cache_init (void)
+{
+ if (mono_aot_only)
+ return;
+ enable_aot_cache = TRUE;
+ in_process = TRUE;
}
/*
- * load_aot_module_from_cache:
- *
- * Experimental code to AOT compile loaded assemblies on demand.
+ * aot_cache_load_module:
*
- * FIXME:
- * - Add environment variable MONO_AOT_CACHE_OPTIONS
- * - Add options for controlling the cache size
- * - Handle full cache by deleting old assemblies lru style
- * - Add options for excluding assemblies during development
- * - Maybe add a threshold after an assembly is AOT compiled
- * - invoking a new mono process is a security risk
- * - recompile the AOT module if one of its dependencies changes
+ * Load the AOT image corresponding to ASSEMBLY from the aot cache, AOTing it if neccessary.
*/
static MonoDl*
-load_aot_module_from_cache (MonoAssembly *assembly, char **aot_name)
+aot_cache_load_module (MonoAssembly *assembly, char **aot_name)
{
- char *fname, *cmd, *tmp2, *aot_options;
+ MonoAotCacheConfig *config;
+ GSList *l;
+ char *fname, *tmp2, *aot_options, *failure_fname;
const char *home;
MonoDl *module;
gboolean res;
- gchar *out, *err;
gint exit_status;
+ char *hash;
+ int pid;
+ gboolean enabled;
+ FILE *failure_file;
*aot_name = NULL;
- if (assembly->image->dynamic)
+ if (image_is_dynamic (assembly->image))
return NULL;
- create_cache_structure ();
+ /* Check in the list of assemblies enabled for aot caching */
+ config = mono_get_aot_cache_config ();
+
+ enabled = FALSE;
+ if (config->apps) {
+ MonoDomain *domain = mono_domain_get ();
+ MonoAssembly *entry_assembly = domain->entry_assembly;
+
+ // FIXME: This cannot be used for mscorlib during startup, since entry_assembly is not set yet
+ for (l = config->apps; l; l = l->next) {
+ char *n = l->data;
+
+ if ((entry_assembly && !strcmp (entry_assembly->aname.name, n)) || (!entry_assembly && !strcmp (assembly->aname.name, n)))
+ break;
+ }
+ if (l)
+ enabled = TRUE;
+ }
- home = g_get_home_dir ();
+ if (!enabled) {
+ for (l = config->assemblies; l; l = l->next) {
+ char *n = l->data;
- tmp2 = g_strdup_printf ("%s-%s%s", assembly->image->assembly_name, assembly->image->guid, SHARED_EXT);
- fname = g_build_filename (home, ".mono", "aot-cache", tmp2, NULL);
+ if (!strcmp (assembly->aname.name, n))
+ break;
+ }
+ if (l)
+ enabled = TRUE;
+ }
+ if (!enabled)
+ return NULL;
+
+ if (!cache_dir) {
+ home = g_get_home_dir ();
+ if (!home)
+ return NULL;
+ cache_dir = g_strdup_printf ("%s/Library/Caches/mono/aot-cache", home);
+ if (!g_file_test (cache_dir, G_FILE_TEST_EXISTS|G_FILE_TEST_IS_DIR))
+ g_mkdir_with_parents (cache_dir, 0777);
+ }
+
+ /*
+ * The same assembly can be used in multiple configurations, i.e. multiple
+ * versions of the runtime, with multiple versions of dependent assemblies etc.
+ * To handle this, we compute a version string containing all this information, hash it,
+ * and use the hash as a filename suffix.
+ */
+ hash = get_aot_config_hash (assembly);
+
+ tmp2 = g_strdup_printf ("%s-%s%s", assembly->image->assembly_name, hash, SHARED_EXT);
+ fname = g_build_filename (cache_dir, tmp2, NULL);
*aot_name = fname;
g_free (tmp2);
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT trying to load from cache: '%s'.", fname);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: loading from cache: '%s'.", fname);
module = mono_dl_open (fname, MONO_DL_LAZY, NULL);
- if (!module) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT not found.");
+ if (module)
+ return module;
- mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT precompiling assembly '%s'... ", assembly->image->name);
+ if (!strcmp (assembly->aname.name, "mscorlib") && !mscorlib_aot_loaded)
+ /*
+ * Can't AOT this during startup, so we AOT it when called later from
+ * mono_aot_get_method ().
+ */
+ return NULL;
- aot_options = g_strdup_printf ("outfile=%s", fname);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: not found.");
- if (spawn_compiler) {
- /* FIXME: security */
- /* FIXME: Has to pass the assembly loading path to the child process */
- cmd = g_strdup_printf ("mono -O=all --aot=%s %s", aot_options, assembly->image->name);
+ /* Only AOT one assembly per run to avoid slowing down execution too much */
+ if (cache_count > 0)
+ return NULL;
+ cache_count ++;
+
+ /* Check for previous failure */
+ failure_fname = g_strdup_printf ("%s.failure", fname);
+ failure_file = fopen (failure_fname, "r");
+ if (failure_file) {
+ mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT: assembly '%s' previously failed to compile '%s' ('%s')... ", assembly->image->name, fname, failure_fname);
+ g_free (failure_fname);
+ return NULL;
+ } else {
+ g_free (failure_fname);
+ fclose (failure_file);
+ }
- res = g_spawn_command_line_sync (cmd, &out, &err, &exit_status, NULL);
+ mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT: compiling assembly '%s'... ", assembly->image->name);
-#if !defined(HOST_WIN32) && !defined(__ppc__) && !defined(__ppc64__) && !defined(__powerpc__)
- if (res) {
- if (!WIFEXITED (exit_status) && (WEXITSTATUS (exit_status) == 0))
- mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT failed: %s.", err);
- else
- mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT succeeded.");
- g_free (out);
- g_free (err);
- }
-#endif
- g_free (cmd);
- } else {
+ /*
+ * We need to invoke the AOT compiler here. There are multiple approaches:
+ * - spawn a new runtime process. This can be hard when running with mkbundle, and
+ * its hard to make the new process load the same set of assemblies.
+ * - doing it in-process. This exposes the current process to bugs/leaks/side effects of
+ * the AOT compiler.
+ * - fork a new process and do the work there.
+ */
+ if (in_process) {
+ aot_options = g_strdup_printf ("outfile=%s,internal-logfile=%s.log", fname, fname);
+ /* Maybe due this in another thread ? */
+ res = mono_compile_assembly (assembly, mono_parse_default_optimizations (NULL), aot_options);
+ if (!res) {
+ failure_fname = g_strdup_printf ("%s.failure", fname);
+ failure_file = fopen (failure_fname, "a+");
+ fclose (failure_file);
+ g_free (failure_fname);
+ }
+ } else {
+ /*
+ * - Avoid waiting for the aot process to finish ?
+ * (less overhead, but multiple processes could aot the same assembly at the same time)
+ */
+ pid = fork ();
+ if (pid == 0) {
+ FILE *logfile;
+ char *logfile_name;
+
+ /* Child */
+
+ logfile_name = g_strdup_printf ("%s/aot.log", cache_dir);
+ logfile = fopen (logfile_name, "a+");
+ g_free (logfile_name);
+
+ dup2 (fileno (logfile), 1);
+ dup2 (fileno (logfile), 2);
+
+ aot_options = g_strdup_printf ("outfile=%s", fname);
res = mono_compile_assembly (assembly, mono_parse_default_optimizations (NULL), aot_options);
if (!res) {
- mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT failed.");
+ exit (1);
} else {
- mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT succeeded.");
+ exit (0);
}
+ } else {
+ /* Parent */
+ waitpid (pid, &exit_status, 0);
+ if (!WIFEXITED (exit_status) && (WEXITSTATUS (exit_status) == 0))
+ mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT: failed.");
+ else
+ mono_trace (G_LOG_LEVEL_MESSAGE, MONO_TRACE_AOT, "AOT: succeeded.");
}
-
- module = mono_dl_open (fname, MONO_DL_LAZY, NULL);
-
- g_free (aot_options);
}
+ module = mono_dl_open (fname, MONO_DL_LAZY, NULL);
+
return module;
}
+#else
+
+static void
+aot_cache_init (void)
+{
+}
+
+static MonoDl*
+aot_cache_load_module (MonoAssembly *assembly, char **aot_name)
+{
+ return NULL;
+}
+
+#endif
+
static void
find_symbol (MonoDl *module, gpointer *globals, const char *name, gpointer *value)
{
@@ -1583,7 +1742,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
*/
return;
- if (assembly->image->dynamic || assembly->ref_only)
+ if (image_is_dynamic (assembly->image) || assembly->ref_only)
return;
if (mono_security_cas_enabled ())
@@ -1596,16 +1755,17 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
info = NULL;
mono_aot_unlock ();
+ sofile = NULL;
+
if (info) {
/* Statically linked AOT module */
- sofile = NULL;
aot_name = g_strdup_printf ("%s", assembly->aname.name);
mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "Found statically linked AOT module '%s'.\n", aot_name);
globals = info->globals;
} else {
- if (use_aot_cache)
- sofile = load_aot_module_from_cache (assembly, &aot_name);
- else {
+ if (enable_aot_cache)
+ sofile = aot_cache_load_module (assembly, &aot_name);
+ if (!sofile) {
char *err;
aot_name = g_strdup_printf ("%s%s", assembly->image->name, SHARED_EXT);
@@ -1652,7 +1812,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
fprintf (stderr, "Failed to load AOT module '%s' while running in aot-only mode: %s.\n", aot_name, msg);
exit (1);
} else {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT module %s is unusable: %s.\n", aot_name, msg);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: module %s is unusable: %s.\n", aot_name, msg);
}
g_free (msg);
g_free (aot_name);
@@ -1677,8 +1837,8 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
align_int64 = align;
}
#else
- align_double = __alignof__ (double);
- align_int64 = __alignof__ (gint64);
+ align_double = MONO_ABI_ALIGNOF (double);
+ align_int64 = MONO_ABI_ALIGNOF (gint64);
#endif
/* Sanity check */
@@ -1701,7 +1861,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
amodule->method_to_code = g_hash_table_new (mono_aligned_addr_hash, NULL);
amodule->blob = blob;
- InitializeCriticalSection (&amodule->mutex);
+ mono_mutex_init_recursive (&amodule->mutex);
/* Read image table */
{
@@ -1873,14 +2033,14 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
}
if (amodule->out_of_date) {
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT Module %s is unusable because a dependency is out-of-date.\n", assembly->image->name);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: Module %s is unusable because a dependency is out-of-date.\n", assembly->image->name);
if (mono_aot_only) {
fprintf (stderr, "Failed to load AOT module '%s' while running in aot-only mode because a dependency cannot be found or it is out of date.\n", aot_name);
exit (1);
}
}
else
- mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT loaded AOT Module for %s.\n", assembly->image->name);
+ mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_AOT, "AOT: loaded AOT Module for %s.\n", assembly->image->name);
}
/*
@@ -1932,8 +2092,8 @@ mono_aot_register_module (gpointer *aot_info)
void
mono_aot_init (void)
{
- InitializeCriticalSection (&aot_mutex);
- InitializeCriticalSection (&aot_page_mutex);
+ mono_mutex_init_recursive (&aot_mutex);
+ mono_mutex_init_recursive (&aot_page_mutex);
aot_modules = g_hash_table_new (NULL, NULL);
#ifndef __native_client__
@@ -1943,8 +2103,7 @@ mono_aot_init (void)
if (g_getenv ("MONO_LASTAOT"))
mono_last_aot_method = atoi (g_getenv ("MONO_LASTAOT"));
- if (g_getenv ("MONO_AOT_CACHE"))
- use_aot_cache = TRUE;
+ aot_cache_init ();
}
void
@@ -2136,8 +2295,11 @@ mono_aot_get_class_from_name (MonoImage *image, const char *name_space, const ch
name_space2 = mono_metadata_string_heap (image, cols [MONO_TYPEDEF_NAMESPACE]);
if (!strcmp (name, name2) && !strcmp (name_space, name_space2)) {
+ MonoError error;
amodule_unlock (amodule);
- *klass = mono_class_get (image, token);
+ *klass = mono_class_get_checked (image, token, &error);
+ if (!mono_error_ok (&error))
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
/* Add to cache */
if (*klass) {
@@ -2291,11 +2453,11 @@ decode_llvm_mono_eh_frame (MonoAotModule *amodule, MonoDomain *domain,
mono_domain_alloc0_lock_free (domain, MONO_SIZEOF_JIT_INFO + (sizeof (MonoJitExceptionInfo) * (ei_len + nested_len)) + extra_size);
jinfo->code_size = code_len;
- jinfo->used_regs = mono_cache_unwind_info (info.unw_info, info.unw_info_len);
+ jinfo->unwind_info = mono_cache_unwind_info (info.unw_info, info.unw_info_len);
jinfo->d.method = method;
jinfo->code_start = code;
jinfo->domain_neutral = 0;
- /* This signals that used_regs points to a normal cached unwind info */
+ /* This signals that unwind_info points to a normal cached unwind info */
jinfo->from_aot = 0;
jinfo->num_clauses = ei_len + nested_len;
@@ -2377,7 +2539,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
{
int i, buf_len, num_clauses, len;
MonoJitInfo *jinfo;
- guint used_int_regs, flags;
+ guint unwind_info, flags;
gboolean has_generic_jit_info, has_dwarf_unwind_info, has_clauses, has_seq_points, has_try_block_holes, has_arch_eh_jit_info;
gboolean from_llvm, has_gc_map;
guint8 *p;
@@ -2400,13 +2562,10 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
has_arch_eh_jit_info = (flags & 128) != 0;
if (has_dwarf_unwind_info) {
- guint32 offset;
-
- offset = decode_value (p, &p);
- g_assert (offset < (1 << 30));
- used_int_regs = offset;
+ unwind_info = decode_value (p, &p);
+ g_assert (unwind_info < (1 << 30));
} else {
- used_int_regs = decode_value (p, &p);
+ unwind_info = decode_value (p, &p);
}
if (has_generic_jit_info)
generic_info_size = sizeof (MonoGenericJitInfo);
@@ -2498,7 +2657,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
}
jinfo->code_size = code_len;
- jinfo->used_regs = used_int_regs;
+ jinfo->unwind_info = unwind_info;
jinfo->d.method = method;
jinfo->code_start = code;
jinfo->domain_neutral = 0;
@@ -2540,6 +2699,7 @@ decode_exception_debug_info (MonoAotModule *amodule, MonoDomain *domain,
eh_info = mono_jit_info_get_arch_eh_info (jinfo);
eh_info->stack_size = decode_value (p, &p);
+ eh_info->epilog_size = decode_value (p, &p);
}
if (async) {
@@ -2699,7 +2859,7 @@ mono_aot_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len)
mono_aot_unlock ();
}
- p = amodule->unwind_info + ji->used_regs;
+ p = amodule->unwind_info + ji->unwind_info;
*unwind_info_len = decode_value (p, &p);
return p;
}
@@ -3032,7 +3192,7 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
goto cleanup;
break;
case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE:
- ji->data.del_tramp = mono_mempool_alloc0 (mp, sizeof (MonoClassMethodPair));
+ ji->data.del_tramp = mono_mempool_alloc0 (mp, sizeof (MonoDelegateClassMethodPair));
ji->data.del_tramp->klass = decode_klass_ref (aot_module, p, &p);
if (!ji->data.del_tramp->klass)
goto cleanup;
@@ -3041,6 +3201,7 @@ decode_patch (MonoAotModule *aot_module, MonoMemPool *mp, MonoJumpInfo *ji, guin
if (!ji->data.del_tramp->method)
goto cleanup;
}
+ ji->data.del_tramp->virtual = decode_value (p, &p) ? TRUE : FALSE;
break;
case MONO_PATCH_INFO_IMAGE:
ji->data.image = load_image (aot_module, decode_value (p, &p), TRUE);
@@ -3308,8 +3469,12 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
MonoJitInfo *jinfo = NULL;
guint8 *code, *info;
- if (mono_profiler_get_events () & MONO_PROFILE_ENTER_LEAVE)
+ if (mono_profiler_get_events () & MONO_PROFILE_ENTER_LEAVE) {
+ if (mono_aot_only)
+ /* The caller cannot handle this */
+ g_assert_not_reached ();
return NULL;
+ }
if ((domain != mono_get_root_domain ()) && (!(amodule->info.opts & MONO_OPT_SHARED)))
/* Non shared AOT code can't be used in other appdomains */
@@ -3325,7 +3490,7 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
if (!method)
method = mono_get_method (image, token, NULL);
full_name = mono_method_full_name (method, TRUE);
- mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT NOT FOUND: %s.", full_name);
+ mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT: NOT FOUND: %s.", full_name);
g_free (full_name);
}
return NULL;
@@ -3444,7 +3609,7 @@ load_method (MonoDomain *domain, MonoAotModule *amodule, MonoImage *image, MonoM
if (!jinfo)
jinfo = mono_aot_find_jit_info (domain, amodule->assembly->image, code);
- mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT FOUND method %s [%p - %p %p]", full_name, code, code + jinfo->code_size, info);
+ mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT: FOUND method %s [%p - %p %p]", full_name, code, code + jinfo->code_size, info);
g_free (full_name);
}
@@ -3640,6 +3805,15 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
MonoAotModule *amodule = klass->image->aot_module;
guint8 *code;
+ if (enable_aot_cache && !amodule && domain->entry_assembly && klass->image == mono_defaults.corlib) {
+ /* This cannot be AOTed during startup, so do it now */
+ if (!mscorlib_aot_loaded) {
+ mscorlib_aot_loaded = TRUE;
+ load_aot_module (klass->image->assembly, NULL);
+ amodule = klass->image->aot_module;
+ }
+ }
+
if (!amodule)
return NULL;
@@ -4150,7 +4324,7 @@ load_function_full (MonoAotModule *amodule, const char *name, MonoTrampInfo **ou
if (!code)
g_error ("Symbol '%s' not found in AOT file '%s'.\n", name, amodule->aot_name);
- mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT FOUND function '%s' in AOT file '%s'.", name, amodule->aot_name);
+ mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_AOT, "AOT: FOUND function '%s' in AOT file '%s'.", name, amodule->aot_name);
/* Load info */
@@ -4771,7 +4945,7 @@ mono_aot_set_make_unreadable (gboolean unreadable)
make_unreadable = unreadable;
if (make_unreadable && !inited) {
- mono_counters_register ("AOT pagefaults", MONO_COUNTER_JIT | MONO_COUNTER_INT, &n_pagefaults);
+ mono_counters_register ("AOT: pagefaults", MONO_COUNTER_JIT | MONO_COUNTER_INT, &n_pagefaults);
}
}
diff --git a/mono/mini/cpu-amd64.md b/mono/mini/cpu-amd64.md
index b734d4c4fe7..bb6f32f9e6b 100644
--- a/mono/mini/cpu-amd64.md
+++ b/mono/mini/cpu-amd64.md
@@ -293,15 +293,13 @@ amd64_icompare_reg_membase: src1:i src2:b len:8
amd64_set_xmmreg_r4: dest:f src1:f len:14 clob:m
amd64_set_xmmreg_r8: dest:f src1:f len:14 clob:m
amd64_save_sp_to_lmf: len:16
-tls_get: dest:i len:16
+tls_get: dest:i len:32
tls_get_reg: dest:i src1:i len:32
tls_set: src1:i len:16
tls_set_reg: src1:i src2:i len:32
atomic_add_i4: src1:b src2:i dest:i len:32
-atomic_add_new_i4: src1:b src2:i dest:i len:32
-atomic_exchange_i4: src1:b src2:i dest:a len:32
atomic_add_i8: src1:b src2:i dest:i len:32
-atomic_add_new_i8: src1:b src2:i dest:i len:32
+atomic_exchange_i4: src1:b src2:i dest:a len:32
atomic_exchange_i8: src1:b src2:i dest:a len:32
atomic_cas_i4: src1:b src2:i src3:a dest:a len:24
atomic_cas_i8: src1:b src2:i src3:a dest:a len:24
diff --git a/mono/mini/cpu-arm.md b/mono/mini/cpu-arm.md
index 367cb5d4c5a..431936113c3 100644
--- a/mono/mini/cpu-arm.md
+++ b/mono/mini/cpu-arm.md
@@ -347,6 +347,6 @@ gc_liveness_use: len:0
gc_spill_slot_liveness_def: len:0
gc_param_slot_liveness_def: len:0
+atomic_add_i4: dest:i src1:i src2:i len:64
atomic_exchange_i4: dest:i src1:i src2:i len:64
atomic_cas_i4: dest:i src1:i src2:i src3:i len:64
-atomic_add_new_i4: dest:i src1:i src2:i len:64
diff --git a/mono/mini/cpu-arm64.md b/mono/mini/cpu-arm64.md
index d57b6eeda2b..7d9e40b2266 100644
--- a/mono/mini/cpu-arm64.md
+++ b/mono/mini/cpu-arm64.md
@@ -414,8 +414,8 @@ arm64_cbzx: src1:i len:16
arm64_cbnzw: src1:i len:16
arm64_cbnzx: src1:i len:16
-atomic_add_new_i4: dest:i src1:i src2:i len:32
-atomic_add_new_i8: dest:i src1:i src2:i len:32
+atomic_add_i4: dest:i src1:i src2:i len:32
+atomic_add_i8: dest:i src1:i src2:i len:32
atomic_exchange_i4: dest:i src1:i src2:i len:32
atomic_exchange_i8: dest:i src1:i src2:i len:32
atomic_cas_i4: dest:i src1:i src2:i src3:i len:32
diff --git a/mono/mini/cpu-ia64.md b/mono/mini/cpu-ia64.md
index 5d4fec04432..0bae69301bd 100644
--- a/mono/mini/cpu-ia64.md
+++ b/mono/mini/cpu-ia64.md
@@ -153,14 +153,12 @@ endfinally: len:96
aot_const: dest:i len:48
tls_get: dest:i len:48
atomic_add_i4: src1:b src2:i dest:i len:48
-atomic_add_new_i4: src1:b src2:i dest:i len:48
-atomic_exchange_i4: src1:b src2:i dest:i len:48
atomic_add_i8: src1:b src2:i dest:i len:48
-atomic_add_new_i8: src1:b src2:i dest:i len:48
-atomic_add_imm_new_i4: src1:b dest:i len:48
-atomic_add_imm_new_i8: src1:b dest:i len:48
+atomic_exchange_i4: src1:b src2:i dest:i len:48
atomic_exchange_i8: src1:b src2:i dest:i len:48
memory_barrier: len:48
+atomic_add_imm_i4: src1:b dest:i len:48
+atomic_add_imm_i8: src1:b dest:i len:48
adc: dest:i src1:i src2:i len:48
addcc: dest:i src1:i src2:i len:48
subcc: dest:i src1:i src2:i len:48
diff --git a/mono/mini/cpu-ppc.md b/mono/mini/cpu-ppc.md
index e8f83655fc8..44a482aad13 100644
--- a/mono/mini/cpu-ppc.md
+++ b/mono/mini/cpu-ppc.md
@@ -313,4 +313,5 @@ vcall2_membase: src1:b len:16 clob:c
jump_table: dest:i len:8
+atomic_add_i4: src1:b src2:i dest:i len:20
atomic_cas_i4: src1:b src2:i src3:i dest:i len:38
diff --git a/mono/mini/cpu-ppc64.md b/mono/mini/cpu-ppc64.md
index 889af55b4a2..114bc3cf3b1 100644
--- a/mono/mini/cpu-ppc64.md
+++ b/mono/mini/cpu-ppc64.md
@@ -380,8 +380,7 @@ vcall2_membase: src1:b len:16 clob:c
jump_table: dest:i len:20
-atomic_add_new_i4: src1:b src2:i dest:i len:20
-atomic_add_new_i8: src1:b src2:i dest:i len:20
-
+atomic_add_i4: src1:b src2:i dest:i len:20
+atomic_add_i8: src1:b src2:i dest:i len:20
atomic_cas_i4: src1:b src2:i src3:i dest:i len:38
atomic_cas_i8: src1:b src2:i src3:i dest:i len:38
diff --git a/mono/mini/cpu-s390x.md b/mono/mini/cpu-s390x.md
index 4bcfa33bafb..b3dce352ec6 100644
--- a/mono/mini/cpu-s390x.md
+++ b/mono/mini/cpu-s390x.md
@@ -56,8 +56,6 @@ and_imm: dest:i src1:i len:24
aot_const: dest:i len:8
atomic_add_i4: src1:b src2:i dest:i len:28
atomic_add_i8: src1:b src2:i dest:i len:30
-atomic_add_new_i4: src1:b src2:i dest:i len:28
-atomic_add_new_i8: src1:b src2:i dest:i len:30
atomic_exchange_i4: src1:b src2:i dest:i len:18
atomic_exchange_i8: src1:b src2:i dest:i len:24
br: len:6
diff --git a/mono/mini/cpu-x86.md b/mono/mini/cpu-x86.md
index cc14b0dc152..ca87f2fba43 100644
--- a/mono/mini/cpu-x86.md
+++ b/mono/mini/cpu-x86.md
@@ -301,12 +301,11 @@ bigmul: len:2 dest:l src1:a src2:i
bigmul_un: len:2 dest:l src1:a src2:i
sext_i1: dest:i src1:y len:3
sext_i2: dest:i src1:y len:3
-tls_get: dest:i len:20
+tls_get: dest:i len:32
tls_get_reg: dest:i src1:i len:20
tls_set: src1:i len:20
tls_set_reg: src1:i src2:i len:20
atomic_add_i4: src1:b src2:i dest:i len:16
-atomic_add_new_i4: src1:b src2:i dest:i len:16
atomic_exchange_i4: src1:b src2:i dest:a len:24
atomic_cas_i4: src1:b src2:i src3:a dest:a len:24
memory_barrier: len:16
diff --git a/mono/mini/debug-mini.c b/mono/mini/debug-mini.c
index 3167fa5a473..742b6e93d9d 100644
--- a/mono/mini/debug-mini.c
+++ b/mono/mini/debug-mini.c
@@ -689,7 +689,7 @@ mono_debug_print_vars (gpointer ip, gboolean only_arguments)
* breakpoint when the method is JITed.
*/
-static GPtrArray *breakpoints = NULL;
+static GPtrArray *breakpoints;
static int
mono_debugger_insert_breakpoint_full (MonoMethodDesc *desc)
diff --git a/mono/mini/debugger-agent.c b/mono/mini/debugger-agent.c
index d9032db69a6..59194301869 100644
--- a/mono/mini/debugger-agent.c
+++ b/mono/mini/debugger-agent.c
@@ -289,7 +289,7 @@ typedef struct {
#define HEADER_LENGTH 11
#define MAJOR_VERSION 2
-#define MINOR_VERSION 34
+#define MINOR_VERSION 36
typedef enum {
CMD_SET_VM = 1,
@@ -401,7 +401,9 @@ typedef enum {
typedef enum {
INVOKE_FLAG_DISABLE_BREAKPOINTS = 1,
- INVOKE_FLAG_SINGLE_THREADED = 2
+ INVOKE_FLAG_SINGLE_THREADED = 2,
+ INVOKE_FLAG_RETURN_OUT_THIS = 4,
+ INVOKE_FLAG_RETURN_OUT_ARGS = 8
} InvokeFlags;
typedef enum {
@@ -694,8 +696,8 @@ static mono_mutex_t debugger_thread_exited_mutex;
static DebuggerProfiler debugger_profiler;
/* The single step request instance */
-static SingleStepReq *ss_req = NULL;
-static gpointer ss_invoke_addr = NULL;
+static SingleStepReq *ss_req;
+static gpointer ss_invoke_addr;
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
/* Number of single stepping operations in progress */
@@ -721,9 +723,9 @@ static gboolean buffer_replies;
static ReplyPacket reply_packets [128];
int nreply_packets;
-#define dbg_lock() EnterCriticalSection (&debug_mutex)
-#define dbg_unlock() LeaveCriticalSection (&debug_mutex)
-static CRITICAL_SECTION debug_mutex;
+#define dbg_lock() mono_mutex_lock (&debug_mutex)
+#define dbg_unlock() mono_mutex_unlock (&debug_mutex)
+static mono_mutex_t debug_mutex;
static void transport_init (void);
static void transport_connect (const char *address);
@@ -959,7 +961,7 @@ mono_debugger_agent_parse_options (char *options)
void
mono_debugger_agent_init (void)
{
- InitializeCriticalSection (&debug_mutex);
+ mono_mutex_init_recursive (&debug_mutex);
if (!agent_config.enabled)
return;
@@ -1435,6 +1437,41 @@ register_socket_transport (void)
register_transport (&trans);
}
+/*
+ * socket_fd_transport_connect:
+ *
+ */
+static void
+socket_fd_transport_connect (const char *address)
+{
+ int res;
+
+ res = sscanf (address, "%d", &conn_fd);
+ if (res != 1) {
+ fprintf (stderr, "debugger-agent: socket-fd transport address is invalid: '%s'\n", address);
+ exit (1);
+ }
+
+ if (!transport_handshake ())
+ exit (1);
+}
+
+static void
+register_socket_fd_transport (void)
+{
+ DebuggerTransport trans;
+
+ /* This is the same as the 'dt_socket' transport, but receives an already connected socket fd */
+ trans.name = "socket-fd";
+ trans.connect = socket_fd_transport_connect;
+ trans.close1 = socket_transport_close1;
+ trans.close2 = socket_transport_close2;
+ trans.send = socket_transport_send;
+ trans.recv = socket_transport_recv;
+
+ register_transport (&trans);
+}
+
#endif /* DISABLE_SOCKET_TRANSPORT */
/*
@@ -1473,6 +1510,7 @@ transport_init (void)
#ifndef DISABLE_SOCKET_TRANSPORT
register_socket_transport ();
+ register_socket_fd_transport ();
#endif
for (i = 0; i < ntransports; ++i) {
@@ -1543,7 +1581,7 @@ transport_handshake (void)
/* Read answer */
res = transport_recv (buf, strlen (handshake_msg));
- if ((res != strlen (handshake_msg)) || (memcmp (buf, handshake_msg, strlen (handshake_msg) != 0))) {
+ if ((res != strlen (handshake_msg)) || (memcmp (buf, handshake_msg, strlen (handshake_msg)) != 0)) {
fprintf (stderr, "debugger-agent: DWP handshake failed.\n");
return FALSE;
}
@@ -6559,9 +6597,14 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
err = decode_value (sig->params [i], domain, (guint8*)&args [i], p, &p, end);
if (err)
break;
-
if (args [i] && ((MonoObject*)args [i])->vtable->domain != domain)
NOT_IMPLEMENTED;
+
+ if (sig->params [i]->byref) {
+ arg_buf [i] = g_alloca (sizeof (mgreg_t));
+ *(gpointer*)arg_buf [i] = args [i];
+ args [i] = arg_buf [i];
+ }
} else {
arg_buf [i] = g_alloca (mono_class_instance_size (mono_class_from_mono_type (sig->params [i])));
err = decode_value (sig->params [i], domain, arg_buf [i], p, &p, end);
@@ -6582,7 +6625,6 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
/*
* Add an LMF frame to link the stack frames on the invoke method with our caller.
*/
- /* FIXME: Move this to arch specific code */
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
if (invoke->has_ctx) {
MonoLMF **lmf_addr;
@@ -6611,7 +6653,14 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
buffer_add_byte (buf, 0);
buffer_add_value (buf, &mono_defaults.object_class->byval_arg, &exc, domain);
} else {
- buffer_add_byte (buf, 1);
+ gboolean out_this = FALSE;
+ gboolean out_args = FALSE;
+
+ if ((invoke->flags & INVOKE_FLAG_RETURN_OUT_THIS) && CHECK_PROTOCOL_VERSION (2, 35))
+ out_this = TRUE;
+ if ((invoke->flags & INVOKE_FLAG_RETURN_OUT_ARGS) && CHECK_PROTOCOL_VERSION (2, 35))
+ out_args = TRUE;
+ buffer_add_byte (buf, 1 + (out_this ? 2 : 0) + (out_args ? 4 : 0));
if (sig->ret->type == MONO_TYPE_VOID) {
if (!strcmp (m->name, ".ctor") && !m->klass->valuetype) {
buffer_add_value (buf, &mono_defaults.object_class->byval_arg, &this, domain);
@@ -6635,6 +6684,21 @@ do_invoke_method (DebuggerTlsData *tls, Buffer *buf, InvokeData *invoke, guint8
} else {
NOT_IMPLEMENTED;
}
+ if (out_this)
+ /* Return the new value of the receiver after the call */
+ buffer_add_value (buf, &m->klass->byval_arg, this_buf, domain);
+ if (out_args) {
+ buffer_add_int (buf, nargs);
+ for (i = 0; i < nargs; ++i) {
+ if (MONO_TYPE_IS_REFERENCE (sig->params [i]))
+ buffer_add_value (buf, sig->params [i], &args [i], domain);
+ else if (sig->params [i]->byref)
+ /* add_value () does an indirection */
+ buffer_add_value (buf, sig->params [i], &arg_buf [i], domain);
+ else
+ buffer_add_value (buf, sig->params [i], arg_buf [i], domain);
+ }
+ }
}
tls->disable_breakpoints = FALSE;
@@ -7694,7 +7758,7 @@ buffer_add_cattr_arg (Buffer *buf, MonoType *t, MonoDomain *domain, MonoObject *
buffer_add_value (buf, t, mono_object_unbox (val), domain);
}
-static void
+static int
buffer_add_cattrs (Buffer *buf, MonoDomain *domain, MonoImage *image, MonoClass *attr_klass, MonoCustomAttrInfo *cinfo)
{
int i, j;
@@ -7702,7 +7766,7 @@ buffer_add_cattrs (Buffer *buf, MonoDomain *domain, MonoImage *image, MonoClass
if (!cinfo) {
buffer_add_int (buf, 0);
- return;
+ return ERR_NONE;
}
for (i = 0; i < cinfo->num_attrs; ++i) {
@@ -7720,7 +7784,11 @@ buffer_add_cattrs (Buffer *buf, MonoDomain *domain, MonoImage *image, MonoClass
MonoError error;
mono_reflection_create_custom_attr_data_args (image, attr->ctor, attr->data, attr->data_size, &typed_args, &named_args, &arginfo, &error);
- g_assert (mono_error_ok (&error));
+ if (!mono_error_ok (&error)) {
+ DEBUG(2, fprintf (log_file, "[dbg] mono_reflection_create_custom_attr_data_args () failed with: '%s'\n", mono_error_get_message (&error)));
+ mono_error_cleanup (&error);
+ return ERR_LOADER_ERROR;
+ }
buffer_add_methodid (buf, domain, attr->ctor);
@@ -7763,6 +7831,8 @@ buffer_add_cattrs (Buffer *buf, MonoDomain *domain, MonoImage *image, MonoClass
g_free (arginfo);
}
}
+
+ return ERR_NONE;
}
/* FIXME: Code duplication with icall.c */
@@ -7945,7 +8015,9 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
cinfo = mono_custom_attrs_from_class (klass);
- buffer_add_cattrs (buf, domain, klass->image, attr_klass, cinfo);
+ err = buffer_add_cattrs (buf, domain, klass->image, attr_klass, cinfo);
+ if (err)
+ return err;
break;
}
case CMD_TYPE_GET_FIELD_CATTRS: {
@@ -7962,7 +8034,9 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
cinfo = mono_custom_attrs_from_field (klass, field);
- buffer_add_cattrs (buf, domain, klass->image, attr_klass, cinfo);
+ err = buffer_add_cattrs (buf, domain, klass->image, attr_klass, cinfo);
+ if (err)
+ return err;
break;
}
case CMD_TYPE_GET_PROPERTY_CATTRS: {
@@ -7979,7 +8053,9 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
cinfo = mono_custom_attrs_from_property (klass, prop);
- buffer_add_cattrs (buf, domain, klass->image, attr_klass, cinfo);
+ err = buffer_add_cattrs (buf, domain, klass->image, attr_klass, cinfo);
+ if (err)
+ return err;
break;
}
case CMD_TYPE_GET_VALUES:
@@ -8590,7 +8666,9 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
cinfo = mono_custom_attrs_from_method (method);
- buffer_add_cattrs (buf, domain, method->klass->image, attr_klass, cinfo);
+ err = buffer_add_cattrs (buf, domain, method->klass->image, attr_klass, cinfo);
+ if (err)
+ return err;
break;
}
case CMD_METHOD_MAKE_GENERIC_METHOD: {
@@ -9691,5 +9769,11 @@ mono_debugger_agent_debug_log_is_enabled (void)
return FALSE;
}
+void
+mono_debugger_agent_unhandled_exception (MonoException *exc)
+{
+ g_assert_not_reached ();
+}
+
#endif
diff --git a/mono/mini/decompose.c b/mono/mini/decompose.c
index f2dd9ee8552..07242d86138 100644
--- a/mono/mini/decompose.c
+++ b/mono/mini/decompose.c
@@ -13,6 +13,7 @@
#include "jit-icalls.h"
#include <mono/metadata/gc-internal.h>
+#include <mono/metadata/abi-details.h>
#ifndef DISABLE_JIT
@@ -485,7 +486,7 @@ mono_decompose_opcode (MonoCompile *cfg, MonoInst *ins)
ins->opcode = OP_ICONST;
MONO_INST_NULLIFY_SREGS (ins);
ins->inst_c0 = 0;
- } else if ((ins->inst_imm > 0) && (ins->inst_imm < (1L << 32)) && (power != -1)) {
+ } else if ((ins->inst_imm > 0) && (ins->inst_imm < (1LL << 32)) && (power != -1)) {
gboolean is_long = ins->opcode == OP_LREM_IMM;
int compensator_reg = alloc_ireg (cfg);
int intermediate_reg;
@@ -1556,7 +1557,7 @@ mono_decompose_array_access_opts (MonoCompile *cfg)
switch (ins->opcode) {
case OP_LDLEN:
NEW_LOAD_MEMBASE_FLAGS (cfg, dest, OP_LOADI4_MEMBASE, ins->dreg, ins->sreg1,
- G_STRUCT_OFFSET (MonoArray, max_length), ins->flags | MONO_INST_INVARIANT_LOAD);
+ MONO_STRUCT_OFFSET (MonoArray, max_length), ins->flags | MONO_INST_INVARIANT_LOAD);
MONO_ADD_INS (cfg->cbb, dest);
break;
case OP_BOUNDS_CHECK:
@@ -1595,7 +1596,7 @@ mono_decompose_array_access_opts (MonoCompile *cfg)
break;
case OP_STRLEN:
MONO_EMIT_NEW_LOAD_MEMBASE_OP_FLAGS (cfg, OP_LOADI4_MEMBASE, ins->dreg,
- ins->sreg1, G_STRUCT_OFFSET (MonoString, length), ins->flags | MONO_INST_INVARIANT_LOAD);
+ ins->sreg1, MONO_STRUCT_OFFSET (MonoString, length), ins->flags | MONO_INST_INVARIANT_LOAD);
break;
default:
break;
diff --git a/mono/mini/driver.c b/mono/mini/driver.c
index daca0dcf38d..7b34b18df0e 100644
--- a/mono/mini/driver.c
+++ b/mono/mini/driver.c
@@ -57,7 +57,7 @@
#include "version.h"
#include "debugger-agent.h"
-static FILE *mini_stats_fd = NULL;
+static FILE *mini_stats_fd;
static void mini_usage (void);
@@ -1517,9 +1517,6 @@ mono_main (int argc, char* argv[])
if (g_getenv ("MONO_NO_SMP"))
mono_set_use_smp (FALSE);
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
g_log_set_always_fatal (G_LOG_LEVEL_ERROR);
g_log_set_fatal_mask (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR);
@@ -1906,6 +1903,11 @@ mono_main (int argc, char* argv[])
mono_load_coree (argv [i]);
#endif
+ /* Parse gac loading options before loading assemblies. */
+ if (mono_compile_aot || action == DO_EXEC || action == DO_DEBUGGER) {
+ mono_config_parse (config_file);
+ }
+
mono_set_defaults (mini_verbose, opt);
domain = mini_init (argv [i], forced_version);
@@ -1971,11 +1973,6 @@ mono_main (int argc, char* argv[])
break;
}
- /* Parse gac loading options before loading assemblies. */
- if (mono_compile_aot || action == DO_EXEC || action == DO_DEBUGGER) {
- mono_config_parse (config_file);
- }
-
#ifdef MONO_JIT_INFO_TABLE_TEST
if (test_jit_info_table)
jit_info_table_test (domain);
@@ -2181,6 +2178,8 @@ mono_jit_init_version (const char *domain_name, const char *runtime_version)
void
mono_jit_cleanup (MonoDomain *domain)
{
+ mono_thread_manage ();
+
mini_cleanup (domain);
}
diff --git a/mono/mini/dwarfwriter.c b/mono/mini/dwarfwriter.c
index 9f68a62683e..67585763b69 100644
--- a/mono/mini/dwarfwriter.c
+++ b/mono/mini/dwarfwriter.c
@@ -1376,6 +1376,7 @@ static const guint8 *token_handler_ip;
static char*
token_handler (MonoDisHelper *dh, MonoMethod *method, guint32 token)
{
+ MonoError error;
char *res, *desc;
MonoMethod *cmethod;
MonoClass *klass;
@@ -1389,10 +1390,12 @@ token_handler (MonoDisHelper *dh, MonoMethod *method, guint32 token)
case CEE_ISINST:
case CEE_CASTCLASS:
case CEE_LDELEMA:
- if (method->wrapper_type)
+ if (method->wrapper_type) {
klass = data;
- else
- klass = mono_class_get_full (method->klass->image, token, NULL);
+ } else {
+ klass = mono_class_get_checked (method->klass->image, token, &error);
+ g_assert (mono_error_ok (&error)); /* FIXME error handling */
+ }
res = g_strdup_printf ("<%s>", klass->name);
break;
case CEE_NEWOBJ:
diff --git a/mono/mini/exceptions-amd64.c b/mono/mini/exceptions-amd64.c
index 212416e06cf..12b4ef31dde 100644
--- a/mono/mini/exceptions-amd64.c
+++ b/mono/mini/exceptions-amd64.c
@@ -19,6 +19,7 @@
#endif
#include <mono/arch/amd64/amd64-codegen.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/tabledefs.h>
#include <mono/metadata/threads.h>
@@ -207,21 +208,21 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
amd64_mov_reg_reg (code, AMD64_R11, AMD64_ARG_REG1, 8);
/* Restore all registers except %rip and %r11 */
- amd64_mov_reg_membase (code, AMD64_RAX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rax), 8);
- amd64_mov_reg_membase (code, AMD64_RCX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rcx), 8);
- amd64_mov_reg_membase (code, AMD64_RDX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rdx), 8);
- amd64_mov_reg_membase (code, AMD64_RBX, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rbx), 8);
- amd64_mov_reg_membase (code, AMD64_RBP, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rbp), 8);
- amd64_mov_reg_membase (code, AMD64_RSI, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rsi), 8);
- amd64_mov_reg_membase (code, AMD64_RDI, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rdi), 8);
- //amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r8), 8);
- //amd64_mov_reg_membase (code, AMD64_R9, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r9), 8);
- //amd64_mov_reg_membase (code, AMD64_R10, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r10), 8);
- amd64_mov_reg_membase (code, AMD64_R12, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r12), 8);
- amd64_mov_reg_membase (code, AMD64_R13, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r13), 8);
- amd64_mov_reg_membase (code, AMD64_R14, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r14), 8);
+ amd64_mov_reg_membase (code, AMD64_RAX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rax), 8);
+ amd64_mov_reg_membase (code, AMD64_RCX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rcx), 8);
+ amd64_mov_reg_membase (code, AMD64_RDX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rdx), 8);
+ amd64_mov_reg_membase (code, AMD64_RBX, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rbx), 8);
+ amd64_mov_reg_membase (code, AMD64_RBP, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rbp), 8);
+ amd64_mov_reg_membase (code, AMD64_RSI, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rsi), 8);
+ amd64_mov_reg_membase (code, AMD64_RDI, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rdi), 8);
+ //amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r8), 8);
+ //amd64_mov_reg_membase (code, AMD64_R9, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r9), 8);
+ //amd64_mov_reg_membase (code, AMD64_R10, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r10), 8);
+ amd64_mov_reg_membase (code, AMD64_R12, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r12), 8);
+ amd64_mov_reg_membase (code, AMD64_R13, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r13), 8);
+ amd64_mov_reg_membase (code, AMD64_R14, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r14), 8);
#if !defined(__native_client_codegen__)
- amd64_mov_reg_membase (code, AMD64_R15, AMD64_R11, G_STRUCT_OFFSET (MonoContext, r15), 8);
+ amd64_mov_reg_membase (code, AMD64_R15, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, r15), 8);
#endif
/*
@@ -232,8 +233,8 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
* size. Hence the stack pointer can be restored only after
* we have finished loading everything from the context.
*/
- amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rsp), 8);
- amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, G_STRUCT_OFFSET (MonoContext, rip), 8);
+ amd64_mov_reg_membase (code, AMD64_R8, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rsp), 8);
+ amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, MONO_STRUCT_OFFSET (MonoContext, rip), 8);
amd64_mov_reg_reg (code, AMD64_RSP, AMD64_R8, 8);
/* jump to the saved IP */
@@ -293,18 +294,18 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
amd64_alu_reg_imm (code, X86_SUB, AMD64_RSP, 8);
/* set new EBP */
- amd64_mov_reg_membase (code, AMD64_RBP, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rbp), 8);
+ amd64_mov_reg_membase (code, AMD64_RBP, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rbp), 8);
/* load callee saved regs */
- amd64_mov_reg_membase (code, AMD64_RBX, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rbx), 8);
- amd64_mov_reg_membase (code, AMD64_R12, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r12), 8);
- amd64_mov_reg_membase (code, AMD64_R13, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r13), 8);
- amd64_mov_reg_membase (code, AMD64_R14, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r14), 8);
+ amd64_mov_reg_membase (code, AMD64_RBX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rbx), 8);
+ amd64_mov_reg_membase (code, AMD64_R12, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r12), 8);
+ amd64_mov_reg_membase (code, AMD64_R13, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r13), 8);
+ amd64_mov_reg_membase (code, AMD64_R14, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r14), 8);
#if !defined(__native_client_codegen__)
- amd64_mov_reg_membase (code, AMD64_R15, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, r15), 8);
+ amd64_mov_reg_membase (code, AMD64_R15, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, r15), 8);
#endif
#ifdef TARGET_WIN32
- amd64_mov_reg_membase (code, AMD64_RDI, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rdi), 8);
- amd64_mov_reg_membase (code, AMD64_RSI, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoContext, rsi), 8);
+ amd64_mov_reg_membase (code, AMD64_RDI, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rdi), 8);
+ amd64_mov_reg_membase (code, AMD64_RSI, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoContext, rsi), 8);
#endif
/* call the handler */
@@ -590,6 +591,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
guint8 *cfa;
guint32 unwind_info_len;
guint8 *unwind_info;
+ guint8 *epilog;
frame->type = FRAME_TYPE_MANAGED;
@@ -602,6 +604,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
printf ("%s %p %p\n", ji->d.method->name, ji->code_start, ip);
mono_print_unwind_info (unwind_info, unwind_info_len);
*/
+ epilog = (guint8*)ji->code_start + ji->code_size - mono_jinfo_get_epilog_size (ji);
regs [AMD64_RAX] = new_ctx->rax;
regs [AMD64_RBX] = new_ctx->rbx;
@@ -619,7 +622,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start,
(guint8*)ji->code_start + ji->code_size,
- ip, regs, MONO_MAX_IREGS + 1,
+ ip, &epilog, regs, MONO_MAX_IREGS + 1,
save_locations, MONO_MAX_IREGS, &cfa);
new_ctx->rax = regs [AMD64_RAX];
@@ -1399,25 +1402,25 @@ mono_tasklets_arch_restore (void)
amd64_mov_reg_reg (code, cont_reg, MONO_AMD64_ARG_REG1, 8);
amd64_mov_reg_reg (code, AMD64_RAX, MONO_AMD64_ARG_REG2, 8);
/* setup the copy of the stack */
- amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, G_STRUCT_OFFSET (MonoContinuation, stack_used_size), sizeof (int));
+ amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, stack_used_size), sizeof (int));
amd64_shift_reg_imm (code, X86_SHR, AMD64_RCX, 3);
x86_cld (code);
- amd64_mov_reg_membase (code, AMD64_RSI, cont_reg, G_STRUCT_OFFSET (MonoContinuation, saved_stack), sizeof (gpointer));
- amd64_mov_reg_membase (code, AMD64_RDI, cont_reg, G_STRUCT_OFFSET (MonoContinuation, return_sp), sizeof (gpointer));
+ amd64_mov_reg_membase (code, AMD64_RSI, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, saved_stack), sizeof (gpointer));
+ amd64_mov_reg_membase (code, AMD64_RDI, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_sp), sizeof (gpointer));
amd64_prefix (code, X86_REP_PREFIX);
amd64_movsl (code);
/* now restore the registers from the LMF */
NOT_IMPLEMENTED;
- amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, G_STRUCT_OFFSET (MonoContinuation, lmf), 8);
- amd64_mov_reg_membase (code, AMD64_RSP, AMD64_RCX, G_STRUCT_OFFSET (MonoLMF, rsp), 8);
+ amd64_mov_reg_membase (code, AMD64_RCX, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 8);
+ amd64_mov_reg_membase (code, AMD64_RSP, AMD64_RCX, MONO_STRUCT_OFFSET (MonoLMF, rsp), 8);
/* restore the lmf chain */
/*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4);
x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/
/* state is already in rax */
- amd64_jump_membase (code, cont_reg, G_STRUCT_OFFSET (MonoContinuation, return_ip));
+ amd64_jump_membase (code, cont_reg, MONO_STRUCT_OFFSET (MonoContinuation, return_ip));
g_assert ((code - start) <= kMaxCodeSize);
nacl_global_codeman_validate(&start, kMaxCodeSize, &code);
diff --git a/mono/mini/exceptions-arm.c b/mono/mini/exceptions-arm.c
index 87d66c04d06..d7fd3318f3d 100644
--- a/mono/mini/exceptions-arm.c
+++ b/mono/mini/exceptions-arm.c
@@ -25,6 +25,7 @@
#include <mono/arch/arm/arm-codegen.h>
#include <mono/arch/arm/arm-vfp-codegen.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/tabledefs.h>
#include <mono/metadata/threads.h>
@@ -61,16 +62,16 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
ctx_reg = ARMREG_R0;
if (!mono_arch_is_soft_float ()) {
- ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, fregs));
+ ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, fregs));
ARM_FLDMD (code, ARM_VFP_D0, 16, ARMREG_IP);
}
/* move pc to PC */
- ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, pc));
- ARM_STR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, regs) + (ARMREG_PC * sizeof (mgreg_t)));
+ ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, pc));
+ ARM_STR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, regs) + (ARMREG_PC * sizeof (mgreg_t)));
/* restore everything */
- ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET(MonoContext, regs));
+ ARM_ADD_REG_IMM8 (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET(MonoContext, regs));
ARM_LDM (code, ARMREG_IP, 0xffff);
/* never reached */
@@ -111,8 +112,8 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
/* restore all the regs from ctx (in r0), but not sp, the stack pointer */
ctx_reg = ARMREG_R0;
- ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, G_STRUCT_OFFSET (MonoContext, pc));
- ARM_ADD_REG_IMM8 (code, ARMREG_LR, ctx_reg, G_STRUCT_OFFSET(MonoContext, regs) + (MONO_ARM_FIRST_SAVED_REG * sizeof (mgreg_t)));
+ ARM_LDR_IMM (code, ARMREG_IP, ctx_reg, MONO_STRUCT_OFFSET (MonoContext, pc));
+ ARM_ADD_REG_IMM8 (code, ARMREG_LR, ctx_reg, MONO_STRUCT_OFFSET(MonoContext, regs) + (MONO_ARM_FIRST_SAVED_REG * sizeof (mgreg_t)));
ARM_LDM (code, ARMREG_LR, MONO_ARM_REGSAVE_MASK);
/* call handler at eip (r1) and set the first arg with the exception (r2) */
ARM_MOV_REG_REG (code, ARMREG_R0, ARMREG_R2);
@@ -423,7 +424,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start,
(guint8*)ji->code_start + ji->code_size,
- ip, regs, MONO_MAX_IREGS + 8,
+ ip, NULL, regs, MONO_MAX_IREGS + 8,
save_locations, MONO_MAX_IREGS, &cfa);
for (i = 0; i < 16; ++i)
diff --git a/mono/mini/exceptions-mips.c b/mono/mini/exceptions-mips.c
index ad6f2552c0e..34197145048 100644
--- a/mono/mini/exceptions-mips.c
+++ b/mono/mini/exceptions-mips.c
@@ -413,7 +413,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start,
(guint8*)ji->code_start + ji->code_size,
- ip, regs, MONO_MAX_IREGS,
+ ip, NULL, regs, MONO_MAX_IREGS,
save_locations, MONO_MAX_IREGS, &cfa);
for (i = 0; i < MONO_MAX_IREGS; ++i)
diff --git a/mono/mini/exceptions-ppc.c b/mono/mini/exceptions-ppc.c
index d2429325d94..6c3878e97b8 100644
--- a/mono/mini/exceptions-ppc.c
+++ b/mono/mini/exceptions-ppc.c
@@ -550,7 +550,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start,
(guint8*)ji->code_start + ji->code_size,
- ip, regs, ppc_lr + 1,
+ ip, NULL, regs, ppc_lr + 1,
save_locations, MONO_MAX_IREGS, &cfa);
/* we substract 4, so that the IP points into the call instruction */
diff --git a/mono/mini/exceptions-s390x.c b/mono/mini/exceptions-s390x.c
index 4820c52a355..74c8a0f37a3 100644
--- a/mono/mini/exceptions-s390x.c
+++ b/mono/mini/exceptions-s390x.c
@@ -478,9 +478,9 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
memcpy(&regs, &ctx->uc_mcontext.gregs, sizeof(regs));
mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start,
- (guint8 *) ji->code_start + ji->code_size,
- ip, regs, 16, save_locations,
- MONO_MAX_IREGS, &cfa);
+ (guint8 *) ji->code_start + ji->code_size,
+ ip, NULL, regs, 16, save_locations,
+ MONO_MAX_IREGS, &cfa);
memcpy (&new_ctx->uc_mcontext.gregs, &regs, sizeof(regs));
MONO_CONTEXT_SET_IP(new_ctx, regs[14] - 2);
MONO_CONTEXT_SET_BP(new_ctx, cfa);
diff --git a/mono/mini/exceptions-x86.c b/mono/mini/exceptions-x86.c
index b9f2844038a..d335d7ea5c6 100644
--- a/mono/mini/exceptions-x86.c
+++ b/mono/mini/exceptions-x86.c
@@ -13,6 +13,7 @@
#include <signal.h>
#include <string.h>
+#include <mono/metadata/abi-details.h>
#include <mono/arch/x86/x86-codegen.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/tabledefs.h>
@@ -88,13 +89,14 @@ mono_win32_get_handle_stackoverflow (void)
x86_mov_reg_reg (code, X86_EDI, X86_ESP, 4);
/* use the new freed stack from sigcontext */
+ /* XXX replace usage of struct sigcontext with MonoContext so we can use MONO_STRUCT_OFFSET */
x86_mov_reg_membase (code, X86_ESP, X86_EBX, G_STRUCT_OFFSET (struct sigcontext, esp), 4);
/* get the current domain */
x86_call_code (code, mono_domain_get);
/* get stack overflow exception from domain object */
- x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4);
+ x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoDomain, stack_overflow_ex), 4);
/* call mono_arch_handle_exception (sctx, stack_overflow_exception_obj) */
x86_push_reg (code, X86_EAX);
@@ -320,16 +322,16 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
/* restore EBX */
- x86_mov_reg_membase (code, X86_EBX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebx), 4);
+ x86_mov_reg_membase (code, X86_EBX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebx), 4);
/* restore EDI */
- x86_mov_reg_membase (code, X86_EDI, X86_EAX, G_STRUCT_OFFSET (MonoContext, edi), 4);
+ x86_mov_reg_membase (code, X86_EDI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, edi), 4);
/* restore ESI */
- x86_mov_reg_membase (code, X86_ESI, X86_EAX, G_STRUCT_OFFSET (MonoContext, esi), 4);
+ x86_mov_reg_membase (code, X86_ESI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, esi), 4);
/* restore EDX */
- x86_mov_reg_membase (code, X86_EDX, X86_EAX, G_STRUCT_OFFSET (MonoContext, edx), 4);
+ x86_mov_reg_membase (code, X86_EDX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, edx), 4);
/*
* The context resides on the stack, in the stack frame of the
@@ -341,24 +343,24 @@ mono_arch_get_restore_context (MonoTrampInfo **info, gboolean aot)
*/
/* load ESP into EBP */
- x86_mov_reg_membase (code, X86_EBP, X86_EAX, G_STRUCT_OFFSET (MonoContext, esp), 4);
+ x86_mov_reg_membase (code, X86_EBP, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, esp), 4);
/* load return address into ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eip), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, eip), 4);
/* save the return addr to the restored stack - 4 */
x86_mov_membase_reg (code, X86_EBP, -4, X86_ECX, 4);
/* load EBP into ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebp), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebp), 4);
/* save EBP to the restored stack - 8 */
x86_mov_membase_reg (code, X86_EBP, -8, X86_ECX, 4);
/* load EAX into ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, eax), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, eax), 4);
/* save EAX to the restored stack - 12 */
x86_mov_membase_reg (code, X86_EBP, -12, X86_ECX, 4);
/* restore ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ecx), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ecx), 4);
/* restore ESP - 12 */
x86_lea_membase (code, X86_ESP, X86_EBP, -12);
@@ -417,11 +419,11 @@ mono_arch_get_call_filter (MonoTrampInfo **info, gboolean aot)
x86_push_reg (code, X86_EBP);
/* set new EBP */
- x86_mov_reg_membase (code, X86_EBP, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebp), 4);
+ x86_mov_reg_membase (code, X86_EBP, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebp), 4);
/* restore registers used by global register allocation (EBX & ESI) */
- x86_mov_reg_membase (code, X86_EBX, X86_EAX, G_STRUCT_OFFSET (MonoContext, ebx), 4);
- x86_mov_reg_membase (code, X86_ESI, X86_EAX, G_STRUCT_OFFSET (MonoContext, esi), 4);
- x86_mov_reg_membase (code, X86_EDI, X86_EAX, G_STRUCT_OFFSET (MonoContext, edi), 4);
+ x86_mov_reg_membase (code, X86_EBX, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, ebx), 4);
+ x86_mov_reg_membase (code, X86_ESI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, esi), 4);
+ x86_mov_reg_membase (code, X86_EDI, X86_EAX, MONO_STRUCT_OFFSET (MonoContext, edi), 4);
/* align stack and save ESP */
x86_mov_reg_reg (code, X86_EDX, X86_ESP, 4);
@@ -814,7 +816,7 @@ mono_arch_find_jit_info (MonoDomain *domain, MonoJitTlsData *jit_tls,
mono_unwind_frame (unwind_info, unwind_info_len, ji->code_start,
(guint8*)ji->code_start + ji->code_size,
- ip, regs, MONO_MAX_IREGS + 1,
+ ip, NULL, regs, MONO_MAX_IREGS + 1,
save_locations, MONO_MAX_IREGS, &cfa);
new_ctx->eax = regs [X86_EAX];
@@ -1206,26 +1208,26 @@ mono_tasklets_arch_restore (void)
x86_mov_reg_membase (code, X86_EAX, X86_ESP, 8, 4);
/* setup the copy of the stack */
- x86_mov_reg_membase (code, X86_ECX, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, stack_used_size), 4);
x86_shift_reg_imm (code, X86_SHR, X86_ECX, 2);
x86_cld (code);
- x86_mov_reg_membase (code, X86_ESI, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, saved_stack), 4);
- x86_mov_reg_membase (code, X86_EDI, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, return_sp), 4);
+ x86_mov_reg_membase (code, X86_ESI, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, saved_stack), 4);
+ x86_mov_reg_membase (code, X86_EDI, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, return_sp), 4);
x86_prefix (code, X86_REP_PREFIX);
x86_movsl (code);
/* now restore the registers from the LMF */
- x86_mov_reg_membase (code, X86_ECX, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, lmf), 4);
- x86_mov_reg_membase (code, X86_EBX, X86_ECX, G_STRUCT_OFFSET (MonoLMF, ebx), 4);
- x86_mov_reg_membase (code, X86_EBP, X86_ECX, G_STRUCT_OFFSET (MonoLMF, ebp), 4);
- x86_mov_reg_membase (code, X86_ESI, X86_ECX, G_STRUCT_OFFSET (MonoLMF, esi), 4);
- x86_mov_reg_membase (code, X86_EDI, X86_ECX, G_STRUCT_OFFSET (MonoLMF, edi), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, lmf), 4);
+ x86_mov_reg_membase (code, X86_EBX, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebx), 4);
+ x86_mov_reg_membase (code, X86_EBP, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, ebp), 4);
+ x86_mov_reg_membase (code, X86_ESI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, esi), 4);
+ x86_mov_reg_membase (code, X86_EDI, X86_ECX, MONO_STRUCT_OFFSET (MonoLMF, edi), 4);
/* restore the lmf chain */
/*x86_mov_reg_membase (code, X86_ECX, X86_ESP, 12, 4);
x86_mov_membase_reg (code, X86_ECX, 0, X86_EDX, 4);*/
- x86_jump_membase (code, X86_EDX, G_STRUCT_OFFSET (MonoContinuation, return_ip));
+ x86_jump_membase (code, X86_EDX, MONO_STRUCT_OFFSET (MonoContinuation, return_ip));
g_assert ((code - start) <= 48);
saved = start;
return (MonoContinuationRestore)saved;
diff --git a/mono/mini/gshared.cs b/mono/mini/gshared.cs
index fe65826ce4d..d0ee4fac40d 100644
--- a/mono/mini/gshared.cs
+++ b/mono/mini/gshared.cs
@@ -40,6 +40,12 @@ class GFoo3<T> {
// The tests use arrays to pass/receive values to keep the calling convention of the methods stable, which is a current limitation of the runtime support for gsharedvt.
//
+//
+// Interfaces are used to prevent the AOT compiler from discovering instantiations, thus forcing the usage of the gsharedvt
+// versions of methods. Unused vtype type arguments are used to test gsharedvt methods with ref type arguments, i.e.
+// when calling foo<T,T2> as foo<object,bool>, the gsharedvt version is used, but with a ref type argument.
+//
+
// FIXME: Add mixed ref/noref tests, i.e. Dictionary<string, int>
#if MOBILE
@@ -221,6 +227,9 @@ public class Tests
res = iface.Unbox<AnEnum, int> (AnEnum.One, 0, AnEnum.Two);
if (res != AnEnum.Two)
return 2;
+ int res2 = iface.Unbox<int, AnEnum> (0, AnEnum.One, AnEnum.Two);
+ if (res2 != 1)
+ return 3;
return 0;
}
@@ -935,6 +944,47 @@ public class Tests
return 0;
}
+ public interface IFace1<T> {
+ void m1 ();
+ void m2 ();
+ void m3 ();
+ void m4 ();
+ void m5 ();
+ }
+
+ public class ClassIFace<T> : IFace1<T> {
+ public void m1 () {
+ }
+ public void m2 () {
+ }
+ public void m3 () {
+ }
+ public void m4 () {
+ }
+ public void m5 () {
+ }
+ }
+
+ interface IFaceIFaceCall {
+ void call<T, T2> (IFace1<object> iface);
+ }
+
+ class MakeIFaceCall : IFaceIFaceCall {
+ public void call<T, T2> (IFace1<object> iface) {
+ iface.m1 ();
+ }
+ }
+
+ // Check normal interface calls from gsharedvt call to fully instantiated methods
+ public static int test_0_instatiated_iface_call () {
+ ClassIFace<object> c1 = new ClassIFace<object> ();
+
+ IFaceIFaceCall c = new MakeIFaceCall ();
+
+ c.call<object, int> (c1);
+ return 0;
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
static string to_string<T, T2>(T t, T2 t2) {
return t.ToString ();
@@ -1009,7 +1059,36 @@ public class Tests
return 0;
}
- struct Pair<T1, T2> {
+ interface IConstrainedCalls {
+ Pair<int, int> vtype_ret<T, T2>(T t, T2 t2) where T: IReturnVType;
+ }
+
+ public interface IReturnVType {
+ Pair<int, int> return_vtype ();
+ }
+
+ public class CConstrainedCalls : IConstrainedCalls {
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public Pair<int, int> vtype_ret<T, T2>(T t, T2 t2) where T : IReturnVType {
+ return t.return_vtype ();
+ }
+ }
+
+ class ReturnVType : IReturnVType {
+ public Pair<int, int> return_vtype () {
+ return new Pair<int, int> () { First = 1, Second = 2 };
+ }
+ }
+
+ public static int test_0_constrained_vtype_ret () {
+ IConstrainedCalls c = new CConstrainedCalls ();
+ var r = c.vtype_ret<ReturnVType, int> (new ReturnVType (), 1);
+ if (r.First != 1 || r.Second != 2)
+ return 1;
+ return 0;
+ }
+
+ public struct Pair<T1, T2> {
public T1 First;
public T2 Second;
}
@@ -1019,6 +1098,7 @@ public class Tests
return action(null, state);
}
+ [Category ("!FULLAOT")]
public static int test_0_delegate_wrappers () {
Func<object, Pair<int, int>, Pair<int, int>> del1 = delegate (object o, Pair<int, int> p) { return p; };
Func<object, Pair<int, int>, Pair<int, int>> del2 = delegate (object o, Pair<int, int> p) { return p; };
@@ -1459,6 +1539,42 @@ public class Tests
var c = new ReadOnlyCollection<AnEnum> (arr);
return c.Contains (AnEnum.Two) == false ? 0 : 1;
}
+
+ interface IFaceCallPatching {
+ bool caller<T, T2> ();
+ }
+
+ class CallPatching2<T> {
+ T t;
+ public object o;
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public bool callee () {
+ return (string)o == "ABC";
+ }
+ }
+
+ class CallPatching : IFaceCallPatching {
+ public bool caller<T, T2> () {
+ var c = new CallPatching2<T> ();
+ c.o = "ABC";
+ return c.callee ();
+ }
+ }
+
+ //
+ // This tests that generic calls made from gsharedvt methods are not patched normally.
+ // If they are, the first call to 'caller' would patch in the gshared version of
+ // 'callee', causing the second call to fail because the gshared version of callee
+ // wouldn't work with CallPatching2<bool> since it has a different object layout.
+ //
+ public static int test_0_call_patching () {
+ IFaceCallPatching c = new CallPatching ();
+ c.caller<object, bool> ();
+ if (!c.caller<bool, bool> ())
+ return 1;
+ return 0;
+ }
}
// #13191
diff --git a/mono/mini/helpers.c b/mono/mini/helpers.c
index 43bd17e2fa4..4c0950163fb 100644
--- a/mono/mini/helpers.c
+++ b/mono/mini/helpers.c
@@ -214,8 +214,14 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
#else
#if defined(sparc) && !defined(__GNUC__)
#define DIS_CMD "dis"
-#elif defined(__i386__) || defined(__x86_64__)
+#elif defined(TARGET_X86)
#define DIS_CMD "objdump -l -d"
+#elif defined(TARGET_AMD64)
+ #if defined(HOST_WIN32)
+ #define DIS_CMD "x86_64-w64-mingw32-objdump.exe -M x86-64 -d"
+ #else
+ #define DIS_CMD "objdump -l -d"
+ #endif
#else
#define DIS_CMD "objdump -d"
#endif
@@ -281,7 +287,7 @@ mono_disassemble_code (MonoCompile *cfg, guint8 *code, int size, char *id)
unused = system (cmd);
g_free (cmd);
#endif
-
+
cmd = g_strdup_printf (ARCH_PREFIX DIS_CMD " %s %s", objdump_args, o_file);
unused = system (cmd);
g_free (cmd);
diff --git a/mono/mini/image-writer.c b/mono/mini/image-writer.c
index 62b2b3525a5..13c055bd1e1 100644
--- a/mono/mini/image-writer.c
+++ b/mono/mini/image-writer.c
@@ -125,7 +125,7 @@
#define USE_ELF_WRITER 1
#endif
-#if defined(TARGET_ARM) && !defined(TARGET_MACH)
+#if defined(TARGET_ARM) && !defined(TARGET_MACH) && !defined(HOST_WIN32)
#define USE_ELF_WRITER 1
#endif
diff --git a/mono/mini/ir-emit.h b/mono/mini/ir-emit.h
index 9ba92bf3765..c208c2a4b12 100644
--- a/mono/mini/ir-emit.h
+++ b/mono/mini/ir-emit.h
@@ -933,15 +933,15 @@ static int ccount = 0;
if (!(cfg->opt & MONO_OPT_ABCREM)) { \
MONO_EMIT_NULL_CHECK (cfg, array_reg); \
if (COMPILE_LLVM (cfg)) \
- MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
+ MONO_EMIT_DEFAULT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg), TRUE); \
else \
- MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), G_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
+ MONO_ARCH_EMIT_BOUNDS_CHECK ((cfg), (array_reg), MONO_STRUCT_OFFSET (array_type, array_length_field), (index_reg)); \
} else { \
MonoInst *ins; \
MONO_INST_NEW ((cfg), ins, OP_BOUNDS_CHECK); \
ins->sreg1 = array_reg; \
ins->sreg2 = index_reg; \
- ins->inst_imm = G_STRUCT_OFFSET (array_type, array_length_field); \
+ ins->inst_imm = MONO_STRUCT_OFFSET (array_type, array_length_field); \
ins->flags |= MONO_INST_FAULT; \
MONO_ADD_INS ((cfg)->cbb, ins); \
(cfg)->flags |= MONO_CFG_HAS_ARRAY_ACCESS; \
diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c
index 45c7689a58a..fcfcf4f3cd1 100644
--- a/mono/mini/jit-icalls.c
+++ b/mono/mini/jit-icalls.c
@@ -17,7 +17,7 @@
#endif
#include "jit-icalls.h"
-
+#include <mono/utils/mono-error-internals.h>
void*
mono_ldftn (MonoMethod *method)
{
@@ -1022,9 +1022,9 @@ mono_helper_ldstr_mscorlib (guint32 idx)
MonoObject*
mono_helper_newobj_mscorlib (guint32 idx)
{
- MonoClass *klass = mono_class_get (mono_defaults.corlib, MONO_TOKEN_TYPE_DEF | idx);
-
- g_assert (klass);
+ MonoError error;
+ MonoClass *klass = mono_class_get_checked (mono_defaults.corlib, MONO_TOKEN_TYPE_DEF | idx, &error);
+ mono_error_raise_exception (&error);
return mono_object_new (mono_domain_get (), klass);
}
@@ -1061,6 +1061,7 @@ MonoObject*
mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass)
{
MonoJitTlsData *jit_tls = NULL;
+ MonoClass *oklass;
if (mini_get_debug_options ()->better_cast_details) {
jit_tls = mono_native_tls_get_value (mono_jit_tls_id);
@@ -1070,13 +1071,14 @@ mono_object_castclass_unbox (MonoObject *obj, MonoClass *klass)
if (!obj)
return NULL;
- if (klass->enumtype && obj->vtable->klass == klass->element_class)
+ oklass = obj->vtable->klass;
+ if ((klass->enumtype && oklass == klass->element_class) || (oklass->enumtype && klass == oklass->element_class))
return obj;
if (mono_object_isinst (obj, klass))
return obj;
if (mini_get_debug_options ()->better_cast_details) {
- jit_tls->class_cast_from = obj->vtable->klass;
+ jit_tls->class_cast_from = oklass;
jit_tls->class_cast_to = klass;
}
diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c
index 7ed3d639745..5dd518b9c0b 100644
--- a/mono/mini/method-to-ir.c
+++ b/mono/mini/method-to-ir.c
@@ -33,7 +33,8 @@
#endif
#include <mono/utils/memcheck.h>
-
+#include "mini.h"
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/attrdefs.h>
#include <mono/metadata/loader.h>
@@ -60,7 +61,6 @@
#include <mono/utils/mono-memory-model.h>
#include <mono/metadata/mono-basic-block.h>
-#include "mini.h"
#include "trace.h"
#include "ir-emit.h"
@@ -139,13 +139,13 @@ int mono_op_to_op_imm_noemul (int opcode);
MONO_API MonoInst* mono_emit_native_call (MonoCompile *cfg, gconstpointer func, MonoMethodSignature *sig, MonoInst **args);
/* helper methods signatures */
-static MonoMethodSignature *helper_sig_class_init_trampoline = NULL;
-static MonoMethodSignature *helper_sig_domain_get = NULL;
-static MonoMethodSignature *helper_sig_generic_class_init_trampoline = NULL;
-static MonoMethodSignature *helper_sig_generic_class_init_trampoline_llvm = NULL;
-static MonoMethodSignature *helper_sig_rgctx_lazy_fetch_trampoline = NULL;
-static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline = NULL;
-static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline_llvm = NULL;
+static MonoMethodSignature *helper_sig_class_init_trampoline;
+static MonoMethodSignature *helper_sig_domain_get;
+static MonoMethodSignature *helper_sig_generic_class_init_trampoline;
+static MonoMethodSignature *helper_sig_generic_class_init_trampoline_llvm;
+static MonoMethodSignature *helper_sig_rgctx_lazy_fetch_trampoline;
+static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline;
+static MonoMethodSignature *helper_sig_monitor_enter_exit_trampoline_llvm;
/*
* Instruction metadata
@@ -1523,7 +1523,7 @@ mini_emit_interface_bitmap_check (MonoCompile *cfg, int intf_bit_reg, int base_r
static void
mini_emit_load_intf_bit_reg_class (MonoCompile *cfg, int intf_bit_reg, int klass_reg, MonoClass *klass)
{
- mini_emit_interface_bitmap_check (cfg, intf_bit_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, interface_bitmap), klass);
+ mini_emit_interface_bitmap_check (cfg, intf_bit_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, interface_bitmap), klass);
}
/*
@@ -1533,7 +1533,7 @@ mini_emit_load_intf_bit_reg_class (MonoCompile *cfg, int intf_bit_reg, int klass
static void
mini_emit_load_intf_bit_reg_vtable (MonoCompile *cfg, int intf_bit_reg, int vtable_reg, MonoClass *klass)
{
- mini_emit_interface_bitmap_check (cfg, intf_bit_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, interface_bitmap), klass);
+ mini_emit_interface_bitmap_check (cfg, intf_bit_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, interface_bitmap), klass);
}
/*
@@ -1564,7 +1564,7 @@ mini_emit_max_iid_check_vtable (MonoCompile *cfg, int vtable_reg, MonoClass *kla
{
int max_iid_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, max_interface_id));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, max_interface_id));
mini_emit_max_iid_check (cfg, max_iid_reg, klass, false_target);
}
@@ -1575,7 +1575,7 @@ mini_emit_max_iid_check_class (MonoCompile *cfg, int klass_reg, MonoClass *klass
{
int max_iid_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, max_interface_id));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, max_iid_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, max_interface_id));
mini_emit_max_iid_check (cfg, max_iid_reg, klass, false_target);
}
@@ -1589,11 +1589,11 @@ mini_emit_isninst_cast_inst (MonoCompile *cfg, int klass_reg, MonoClass *klass,
mono_class_setup_supertypes (klass);
if (klass->idepth > MONO_DEFAULT_SUPERTABLE_SIZE) {
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, idepth));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, idepth));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, idepth_reg, klass->idepth);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBLT_UN, false_target);
}
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, supertypes));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, supertypes));
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stype, stypes_reg, ((klass->idepth - 1) * SIZEOF_VOID_P));
if (klass_ins) {
MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, stype, klass_ins->dreg);
@@ -1689,14 +1689,14 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas
int eclass_reg = alloc_preg (cfg);
g_assert (!klass_inst);
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, rank));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, rank));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, klass->rank);
MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
- // MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, cast_class));
+ // MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, cast_class));
if (klass->cast_class == mono_defaults.object_class) {
int parent_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, G_STRUCT_OFFSET (MonoClass, parent));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, MONO_STRUCT_OFFSET (MonoClass, parent));
mini_emit_class_check_branch (cfg, parent_reg, mono_defaults.enum_class->parent, OP_PBNE_UN, object_is_null);
mini_emit_class_check (cfg, eclass_reg, mono_defaults.enum_class);
} else if (klass->cast_class == mono_defaults.enum_class->parent) {
@@ -1714,7 +1714,7 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas
if ((klass->rank == 1) && (klass->byval_arg.type == MONO_TYPE_SZARRAY) && (obj_reg != -1)) {
/* Check that the object is a vector too */
int bounds_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, G_STRUCT_OFFSET (MonoArray, bounds));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, MONO_STRUCT_OFFSET (MonoArray, bounds));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, bounds_reg, 0);
MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
}
@@ -1726,11 +1726,11 @@ mini_emit_castclass_inst (MonoCompile *cfg, int obj_reg, int klass_reg, MonoClas
mono_class_setup_supertypes (klass);
if (klass->idepth > MONO_DEFAULT_SUPERTABLE_SIZE) {
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, idepth));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU2_MEMBASE, idepth_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, idepth));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, idepth_reg, klass->idepth);
MONO_EMIT_NEW_COND_EXC (cfg, LT_UN, "InvalidCastException");
}
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, supertypes));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stypes_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, supertypes));
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, stype, stypes_reg, ((klass->idepth - 1) * SIZEOF_VOID_P));
mini_emit_class_check_inst (cfg, stype, klass, klass_inst);
}
@@ -1930,7 +1930,7 @@ emit_push_lmf (MonoCompile *cfg)
EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
lmf_reg = ins->dreg;
/* Save previous_lmf */
- EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf), lmf_ins->dreg);
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), lmf_ins->dreg);
/* Set new LMF */
emit_tls_set (cfg, lmf_reg, TLS_KEY_LMF);
} else {
@@ -1947,7 +1947,7 @@ emit_push_lmf (MonoCompile *cfg)
MONO_ADD_INS (cfg->cbb, ins);
lmf_reg = alloc_preg (cfg);
- EMIT_NEW_BIALU_IMM (cfg, lmf_ins, OP_PADD_IMM, lmf_reg, jit_tls_dreg, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
+ EMIT_NEW_BIALU_IMM (cfg, lmf_ins, OP_PADD_IMM, lmf_reg, jit_tls_dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, lmf));
} else {
lmf_ins = mono_emit_jit_icall (cfg, mono_get_lmf_addr, NULL);
}
@@ -1967,7 +1967,7 @@ emit_push_lmf (MonoCompile *cfg)
/* call pthread_getspecific () */
jit_tls_ins = mono_emit_jit_icall (cfg, pthread_getspecific, args);
/* lmf_addr = &jit_tls->lmf */
- EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, cfg->lmf_addr_var->dreg, jit_tls_ins->dreg, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
+ EMIT_NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, cfg->lmf_addr_var->dreg, jit_tls_ins->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, lmf));
lmf_ins = ins;
#else
lmf_ins = mono_emit_jit_icall (cfg, mono_get_lmf_addr, NULL);
@@ -1982,7 +1982,7 @@ emit_push_lmf (MonoCompile *cfg)
prev_lmf_reg = alloc_preg (cfg);
/* Save previous_lmf */
EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, cfg->lmf_addr_var->dreg, 0);
- EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf), prev_lmf_reg);
+ EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), prev_lmf_reg);
/* Set new lmf */
EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, cfg->lmf_addr_var->dreg, 0, lmf_reg);
}
@@ -2008,7 +2008,7 @@ emit_pop_lmf (MonoCompile *cfg)
if (cfg->lmf_ir_mono_lmf && mini_tls_get_supported (cfg, TLS_KEY_LMF)) {
/* Load previous_lmf */
prev_lmf_reg = alloc_preg (cfg);
- EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* Set new LMF */
emit_tls_set (cfg, prev_lmf_reg, TLS_KEY_LMF);
} else {
@@ -2022,7 +2022,7 @@ emit_pop_lmf (MonoCompile *cfg)
lmf_addr_reg = cfg->lmf_addr_var->dreg;
prev_lmf_reg = alloc_preg (cfg);
- EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, prev_lmf_reg, lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_addr_reg, 0, prev_lmf_reg);
}
}
@@ -2344,7 +2344,6 @@ callvirt_to_call (int opcode)
return -1;
}
-#ifdef MONO_ARCH_HAVE_IMT
/* Either METHOD or IMT_ARG needs to be set */
static void
emit_imt_argument (MonoCompile *cfg, MonoCallInst *call, MonoMethod *method, MonoInst *imt_arg)
@@ -2398,7 +2397,6 @@ emit_imt_argument (MonoCompile *cfg, MonoCallInst *call, MonoMethod *method, Mon
mono_arch_emit_imt_argument (cfg, call, imt_arg);
#endif
}
-#endif
static MonoJumpInfo *
mono_patch_info_new (MonoMemPool *mp, int ip, MonoJumpInfoType type, gconstpointer target)
@@ -2755,7 +2753,7 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
/* Make a call to delegate->invoke_impl */
call->inst.inst_basereg = this_reg;
- call->inst.inst_offset = G_STRUCT_OFFSET (MonoDelegate, invoke_impl);
+ call->inst.inst_offset = MONO_STRUCT_OFFSET (MonoDelegate, invoke_impl);
MONO_ADD_INS (cfg->cbb, (MonoInst*)call);
/* We must emit a dummy use here because the delegate trampoline will
@@ -2809,17 +2807,15 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
call->inst.opcode = callvirt_to_call (call->inst.opcode);
} else {
vtable_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, this_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, this_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
if (method->klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
slot_reg = -1;
-#ifdef MONO_ARCH_HAVE_IMT
if (mono_use_imt) {
guint32 imt_slot = mono_method_get_imt_slot (method);
emit_imt_argument (cfg, call, call->method, imt_arg);
slot_reg = vtable_reg;
offset = ((gint32)imt_slot - MONO_IMT_SIZE) * SIZEOF_VOID_P;
}
-#endif
if (slot_reg == -1) {
slot_reg = alloc_preg (cfg);
mini_emit_load_intf_reg_vtable (cfg, slot_reg, vtable_reg, method->klass);
@@ -2827,14 +2823,12 @@ mono_emit_method_call_full (MonoCompile *cfg, MonoMethod *method, MonoMethodSign
}
} else {
slot_reg = vtable_reg;
- offset = G_STRUCT_OFFSET (MonoVTable, vtable) +
+ offset = MONO_STRUCT_OFFSET (MonoVTable, vtable) +
((mono_method_get_vtable_index (method)) * (SIZEOF_VOID_P));
-#ifdef MONO_ARCH_HAVE_IMT
if (imt_arg) {
g_assert (mono_method_signature (method)->generic_param_count);
emit_imt_argument (cfg, call, call->method, imt_arg);
}
-#endif
}
call->inst.sreg1 = slot_reg;
@@ -3307,7 +3301,7 @@ emit_get_rgctx (MonoCompile *cfg, MonoMethod *method, int context_used)
int vtable_reg;
vtable_reg = alloc_preg (cfg);
- EMIT_NEW_LOAD_MEMBASE (cfg, vtable_var, OP_LOAD_MEMBASE, vtable_reg, mrgctx_var->dreg, G_STRUCT_OFFSET (MonoMethodRuntimeGenericContext, class_vtable));
+ EMIT_NEW_LOAD_MEMBASE (cfg, vtable_var, OP_LOAD_MEMBASE, vtable_reg, mrgctx_var->dreg, MONO_STRUCT_OFFSET (MonoMethodRuntimeGenericContext, class_vtable));
vtable_var->type = STACK_PTR;
}
@@ -3317,7 +3311,7 @@ emit_get_rgctx (MonoCompile *cfg, MonoMethod *method, int context_used)
int vtable_reg;
vtable_reg = alloc_preg (cfg);
- EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, vtable_reg, this->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, vtable_reg, this->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
return ins;
}
}
@@ -3486,7 +3480,7 @@ emit_get_gsharedvt_info (MonoCompile *cfg, gpointer data, MonoRgctxInfoType rgct
idx = get_gsharedvt_info_slot (cfg, data, rgctx_type);
/* Load info->entries [idx] */
dreg = alloc_preg (cfg);
- EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, cfg->gsharedvt_info_var->dreg, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, cfg->gsharedvt_info_var->dreg, MONO_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
return ins;
}
@@ -3569,12 +3563,12 @@ save_cast_details (MonoCompile *cfg, MonoClass *klass, int obj_reg, gboolean nul
}
MONO_ADD_INS (cfg->cbb, tls_get);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, G_STRUCT_OFFSET (MonoJitTlsData, class_cast_from), klass_reg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, class_cast_from), klass_reg);
MONO_EMIT_NEW_PCONST (cfg, to_klass_reg, klass);
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, G_STRUCT_OFFSET (MonoJitTlsData, class_cast_to), to_klass_reg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, tls_get->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, class_cast_to), to_klass_reg);
if (null_check) {
MONO_START_BB (cfg, is_null_bb);
@@ -3593,7 +3587,7 @@ reset_cast_details (MonoCompile *cfg)
MONO_ADD_INS (cfg->cbb, tls_get);
/* It is enough to reset the from field */
- MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STORE_MEMBASE_IMM, tls_get->dreg, G_STRUCT_OFFSET (MonoJitTlsData, class_cast_from), 0);
+ MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STORE_MEMBASE_IMM, tls_get->dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, class_cast_from), 0);
}
}
@@ -3610,11 +3604,11 @@ mini_emit_check_array_type (MonoCompile *cfg, MonoInst *obj, MonoClass *array_cl
save_cast_details (cfg, array_class, obj->dreg, FALSE, NULL);
- MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
if (cfg->opt & MONO_OPT_SHARED) {
int class_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, class_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, class_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
if (cfg->compile_aot) {
int klass_reg = alloc_preg (cfg);
MONO_EMIT_NEW_CLASSCONST (cfg, klass_reg, array_class);
@@ -3700,8 +3694,8 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
int rank_reg = alloc_dreg (cfg ,STACK_I4);
obj_reg = sp [0]->dreg;
- MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, rank));
+ MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, rank));
/* FIXME: generics */
g_assert (klass->rank == 0);
@@ -3710,8 +3704,8 @@ handle_unbox (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, int context_use
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, 0);
MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, element_class));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, element_class));
if (context_used) {
MonoInst *element_class;
@@ -4111,12 +4105,12 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context
save_cast_details (cfg, klass, obj_reg, FALSE, NULL);
if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
mini_emit_iface_cast (cfg, vtable_reg, klass, NULL, NULL);
} else {
int klass_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
if (!klass->rank && !cfg->compile_aot && !(cfg->opt & MONO_OPT_SHARED) && (klass->flags & TYPE_ATTRIBUTE_SEALED)) {
/* the remoting code is broken, access the class for now */
@@ -4129,12 +4123,12 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context
}
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, vtable_reg, vt);
} else {
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, klass_reg, klass);
}
MONO_EMIT_NEW_COND_EXC (cfg, NE_UN, "InvalidCastException");
} else {
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
mini_emit_castclass_inst (cfg, obj_reg, klass_reg, klass, klass_inst, is_null_bb);
}
}
@@ -4195,7 +4189,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, obj_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, is_null_bb);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, vtable_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
g_assert (!context_used);
@@ -4209,14 +4203,14 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
int eclass_reg = alloc_preg (cfg);
g_assert (!context_used);
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, rank));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADU1_MEMBASE, rank_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, rank));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, rank_reg, klass->rank);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false_bb);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, G_STRUCT_OFFSET (MonoClass, cast_class));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, eclass_reg, klass_reg, MONO_STRUCT_OFFSET (MonoClass, cast_class));
if (klass->cast_class == mono_defaults.object_class) {
int parent_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, G_STRUCT_OFFSET (MonoClass, parent));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, parent_reg, eclass_reg, MONO_STRUCT_OFFSET (MonoClass, parent));
mini_emit_class_check_branch (cfg, parent_reg, mono_defaults.enum_class->parent, OP_PBNE_UN, is_null_bb);
mini_emit_class_check_branch (cfg, eclass_reg, mono_defaults.enum_class, OP_PBEQ, is_null_bb);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, false_bb);
@@ -4233,7 +4227,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
if ((klass->rank == 1) && (klass->byval_arg.type == MONO_TYPE_SZARRAY)) {
/* Check that the object is a vector too */
int bounds_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, G_STRUCT_OFFSET (MonoArray, bounds));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg, obj_reg, MONO_STRUCT_OFFSET (MonoArray, bounds));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, bounds_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false_bb);
}
@@ -4243,7 +4237,7 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
}
} else if (mono_class_is_nullable (klass)) {
g_assert (!context_used);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
/* the is_null_bb target simply copies the input register to the output */
mini_emit_isninst_cast (cfg, klass_reg, klass->cast_class, false_bb, is_null_bb);
} else {
@@ -4259,13 +4253,13 @@ handle_isinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src, int context_us
}
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, vtable_reg, vt);
} else {
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, klass_reg, klass);
}
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false_bb);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, is_null_bb);
} else {
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
/* the is_null_bb target simply copies the input register to the output */
mini_emit_isninst_cast_inst (cfg, klass_reg, klass, klass_inst, false_bb, is_null_bb);
}
@@ -4322,16 +4316,16 @@ handle_cisinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
#endif
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
#ifndef DISABLE_REMOTING
mini_emit_iface_cast (cfg, tmp_reg, klass, interface_fail_bb, true_bb);
MONO_START_BB (cfg, interface_fail_bb);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
mini_emit_class_check_branch (cfg, klass_reg, mono_defaults.transparent_proxy_class, OP_PBNE_UN, false_bb);
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, false2_bb);
#else
@@ -4340,16 +4334,16 @@ handle_cisinst (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
} else {
#ifndef DISABLE_REMOTING
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
mini_emit_class_check_branch (cfg, klass_reg, mono_defaults.transparent_proxy_class, OP_PBNE_UN, no_proxy_bb);
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, no_proxy_bb);
@@ -4424,22 +4418,22 @@ handle_ccastclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
#ifndef DISABLE_REMOTING
NEW_BBLOCK (cfg, interface_fail_bb);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
mini_emit_iface_cast (cfg, tmp_reg, klass, interface_fail_bb, ok_result_bb);
MONO_START_BB (cfg, interface_fail_bb);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
mini_emit_class_check (cfg, klass_reg, mono_defaults.transparent_proxy_class);
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
MONO_EMIT_NEW_COND_EXC (cfg, EQ, "InvalidCastException");
MONO_EMIT_NEW_ICONST (cfg, dreg, 1);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
#else
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
mini_emit_iface_cast (cfg, tmp_reg, klass, NULL, NULL);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, ok_result_bb);
#endif
@@ -4447,16 +4441,16 @@ handle_ccastclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
#ifndef DISABLE_REMOTING
NEW_BBLOCK (cfg, no_proxy_bb);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoObject, vtable));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoVTable, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoVTable, klass));
mini_emit_class_check_branch (cfg, klass_reg, mono_defaults.transparent_proxy_class, OP_PBNE_UN, no_proxy_bb);
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, G_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, remote_class));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, tmp_reg, MONO_STRUCT_OFFSET (MonoRemoteClass, proxy_class));
tmp_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, G_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, tmp_reg, obj_reg, MONO_STRUCT_OFFSET (MonoTransparentProxy, custom_type_info));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, tmp_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, no_proxy_bb);
@@ -4497,14 +4491,26 @@ handle_ccastclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src)
* Returns NULL and set the cfg exception on error.
*/
static G_GNUC_UNUSED MonoInst*
-handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, MonoMethod *method, int context_used)
+handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, MonoMethod *method, int context_used, gboolean virtual)
{
MonoInst *ptr;
int dreg;
- gpointer *trampoline;
+ gpointer trampoline;
MonoInst *obj, *method_ins, *tramp_ins;
MonoDomain *domain;
guint8 **code_slot;
+
+ // FIXME reenable optimisation for virtual case
+ if (virtual)
+ return NULL;
+
+ if (virtual) {
+ MonoMethod *invoke = mono_get_delegate_invoke (klass);
+ g_assert (invoke);
+
+ if (!mono_get_delegate_virtual_invoke_impl (mono_method_signature (invoke), context_used ? NULL : method))
+ return NULL;
+ }
obj = handle_alloc (cfg, klass, FALSE, 0);
if (!obj)
@@ -4515,17 +4521,18 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
/* Set target field */
/* Optimize away setting of NULL target */
if (!(target->opcode == OP_PCONST && target->inst_p0 == 0)) {
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, target), target->dreg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, target), target->dreg);
if (cfg->gen_write_barriers) {
dreg = alloc_preg (cfg);
- EMIT_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, target));
+ EMIT_NEW_BIALU_IMM (cfg, ptr, OP_PADD_IMM, dreg, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, target));
emit_write_barrier (cfg, ptr, target);
}
}
/* Set method field */
method_ins = emit_get_rgctx_method (cfg, context_used, method, MONO_RGCTX_INFO_METHOD);
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method), method_ins->dreg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, method), method_ins->dreg);
+
/*
* To avoid looking up the compiled code belonging to the target method
* in mono_delegate_trampoline (), we allocate a per-domain memory slot to
@@ -4553,22 +4560,37 @@ handle_delegate_ctor (MonoCompile *cfg, MonoClass *klass, MonoInst *target, Mono
else
EMIT_NEW_PCONST (cfg, code_slot_ins, code_slot);
}
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, method_code), code_slot_ins->dreg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, method_code), code_slot_ins->dreg);
}
- /* Set invoke_impl field */
if (cfg->compile_aot) {
- MonoClassMethodPair *del_tramp;
+ MonoDelegateClassMethodPair *del_tramp;
- del_tramp = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoClassMethodPair));
+ del_tramp = mono_mempool_alloc0 (cfg->mempool, sizeof (MonoDelegateClassMethodPair));
del_tramp->klass = klass;
del_tramp->method = context_used ? NULL : method;
+ del_tramp->virtual = virtual;
EMIT_NEW_AOTCONST (cfg, tramp_ins, MONO_PATCH_INFO_DELEGATE_TRAMPOLINE, del_tramp);
} else {
- trampoline = mono_create_delegate_trampoline_with_method (cfg->domain, klass, context_used ? NULL : method);
+ if (virtual)
+ trampoline = mono_create_delegate_virtual_trampoline (cfg->domain, klass, context_used ? NULL : method);
+ else
+ trampoline = mono_create_delegate_trampoline_info (cfg->domain, klass, context_used ? NULL : method);
EMIT_NEW_PCONST (cfg, tramp_ins, trampoline);
}
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, G_STRUCT_OFFSET (MonoDelegate, invoke_impl), tramp_ins->dreg);
+
+ /* Set invoke_impl field */
+ if (virtual) {
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, invoke_impl), tramp_ins->dreg);
+ } else {
+ dreg = alloc_preg (cfg);
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, tramp_ins->dreg, MONO_STRUCT_OFFSET (MonoDelegateTrampInfo, invoke_impl));
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, invoke_impl), dreg);
+
+ dreg = alloc_preg (cfg);
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, dreg, tramp_ins->dreg, MONO_STRUCT_OFFSET (MonoDelegateTrampInfo, method_ptr));
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STORE_MEMBASE_REG, obj->dreg, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr), dreg);
+ }
/* All the checks which are in mono_delegate_ctor () are done by the delegate trampoline */
@@ -4815,7 +4837,7 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
if (size == 1 || size == 2 || size == 4 || size == 8) {
static const int fast_log2 [] = { 1, 0, 1, -1, 2, -1, -1, -1, 3 };
- EMIT_NEW_X86_LEA (cfg, ins, array_reg, index2_reg, fast_log2 [size], G_STRUCT_OFFSET (MonoArray, vector));
+ EMIT_NEW_X86_LEA (cfg, ins, array_reg, index2_reg, fast_log2 [size], MONO_STRUCT_OFFSET (MonoArray, vector));
ins->klass = mono_class_get_element_class (klass);
ins->type = STACK_MP;
@@ -4838,7 +4860,7 @@ mini_emit_ldelema_1_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_MUL_IMM, mult_reg, index2_reg, size);
}
MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, array_reg, mult_reg);
- NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, G_STRUCT_OFFSET (MonoArray, vector));
+ NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, MONO_STRUCT_OFFSET (MonoArray, vector));
ins->klass = mono_class_get_element_class (klass);
ins->type = STACK_MP;
MONO_ADD_INS (cfg->cbb, ins);
@@ -4890,21 +4912,21 @@ mini_emit_ldelema_2_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
/* range checking */
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, bounds_reg,
- arr->dreg, G_STRUCT_OFFSET (MonoArray, bounds));
+ arr->dreg, MONO_STRUCT_OFFSET (MonoArray, bounds));
MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, low1_reg,
- bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+ bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
MONO_EMIT_NEW_BIALU (cfg, OP_PSUB, realidx1_reg, index1, low1_reg);
MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, high1_reg,
- bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, length));
+ bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, length));
MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, high1_reg, realidx1_reg);
MONO_EMIT_NEW_COND_EXC (cfg, LE_UN, "IndexOutOfRangeException");
MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, low2_reg,
- bounds_reg, sizeof (MonoArrayBounds) + G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+ bounds_reg, sizeof (MonoArrayBounds) + MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
MONO_EMIT_NEW_BIALU (cfg, OP_PSUB, realidx2_reg, index2, low2_reg);
MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, high2_reg,
- bounds_reg, sizeof (MonoArrayBounds) + G_STRUCT_OFFSET (MonoArrayBounds, length));
+ bounds_reg, sizeof (MonoArrayBounds) + MONO_STRUCT_OFFSET (MonoArrayBounds, length));
MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, high2_reg, realidx2_reg);
MONO_EMIT_NEW_COND_EXC (cfg, LE_UN, "IndexOutOfRangeException");
@@ -4912,7 +4934,7 @@ mini_emit_ldelema_2_ins (MonoCompile *cfg, MonoClass *klass, MonoInst *arr, Mono
MONO_EMIT_NEW_BIALU (cfg, OP_PADD, sum_reg, mult_reg, realidx2_reg);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_PMUL_IMM, mult2_reg, sum_reg, size);
MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, mult2_reg, arr->dreg);
- NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, G_STRUCT_OFFSET (MonoArray, vector));
+ NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, MONO_STRUCT_OFFSET (MonoArray, vector));
ins->type = STACK_MP;
ins->klass = klass;
@@ -5061,7 +5083,7 @@ emit_array_store (MonoCompile *cfg, MonoClass *klass, MonoInst **sp, gboolean sa
} else if (sp [1]->opcode == OP_ICONST) {
int array_reg = sp [0]->dreg;
int index_reg = sp [1]->dreg;
- int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + G_STRUCT_OFFSET (MonoArray, vector);
+ int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + MONO_STRUCT_OFFSET (MonoArray, vector);
if (safety_checks)
MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg);
@@ -5270,7 +5292,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
MONO_EMIT_BOUNDS_CHECK (cfg, args [0]->dreg, MonoString, length, index_reg);
#if defined(TARGET_X86) || defined(TARGET_AMD64)
- EMIT_NEW_X86_LEA (cfg, ins, args [0]->dreg, index_reg, 1, G_STRUCT_OFFSET (MonoString, chars));
+ EMIT_NEW_X86_LEA (cfg, ins, args [0]->dreg, index_reg, 1, MONO_STRUCT_OFFSET (MonoString, chars));
add_reg = ins->dreg;
/* Avoid a warning */
mult_reg = 0;
@@ -5280,7 +5302,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SHL_IMM, mult_reg, index_reg, 1);
MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, mult_reg, args [0]->dreg);
EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADU2_MEMBASE, dreg,
- add_reg, G_STRUCT_OFFSET (MonoString, chars));
+ add_reg, MONO_STRUCT_OFFSET (MonoString, chars));
#endif
type_from_op (ins, NULL, NULL);
return ins;
@@ -5301,7 +5323,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
/* The corlib functions check for oob already. */
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_SHL_IMM, mult_reg, args [1]->dreg, 1);
MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, mult_reg, args [0]->dreg);
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI2_MEMBASE_REG, add_reg, G_STRUCT_OFFSET (MonoString, chars), args [2]->dreg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREI2_MEMBASE_REG, add_reg, MONO_STRUCT_OFFSET (MonoString, chars), args [2]->dreg);
return cfg->cbb->last_ins;
} else
return NULL;
@@ -5310,8 +5332,8 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
if (strcmp (cmethod->name, "GetType") == 0) {
int dreg = alloc_ireg_ref (cfg);
int vt_reg = alloc_preg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vt_reg, args [0]->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
- EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, vt_reg, G_STRUCT_OFFSET (MonoVTable, type));
+ MONO_EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, vt_reg, args [0]->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, vt_reg, MONO_STRUCT_OFFSET (MonoVTable, type));
type_from_op (ins, NULL, NULL);
return ins;
@@ -5351,22 +5373,22 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
NEW_BBLOCK (cfg, szarray_bb);
EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, ins, OP_LOAD_MEMBASE, bounds_reg,
- args [0]->dreg, G_STRUCT_OFFSET (MonoArray, bounds));
+ args [0]->dreg, MONO_STRUCT_OFFSET (MonoArray, bounds));
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, bounds_reg, 0);
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_IBEQ, szarray_bb);
/* Non-szarray case */
if (get_length)
EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, dreg,
- bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, length));
+ bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, length));
else
EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, dreg,
- bounds_reg, G_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
+ bounds_reg, MONO_STRUCT_OFFSET (MonoArrayBounds, lower_bound));
MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, end_bb);
MONO_START_BB (cfg, szarray_bb);
/* Szarray case */
if (get_length)
EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADI4_MEMBASE, dreg,
- args [0]->dreg, G_STRUCT_OFFSET (MonoArray, max_length));
+ args [0]->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length));
else
MONO_EMIT_NEW_ICONST (cfg, dreg, 0);
MONO_START_BB (cfg, end_bb);
@@ -5385,9 +5407,9 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
int dreg = alloc_ireg (cfg);
int vtable_reg = alloc_preg (cfg);
MONO_EMIT_NEW_LOAD_MEMBASE_OP_FAULT (cfg, OP_LOAD_MEMBASE, vtable_reg,
- args [0]->dreg, G_STRUCT_OFFSET (MonoObject, vtable));
+ args [0]->dreg, MONO_STRUCT_OFFSET (MonoObject, vtable));
EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOADU1_MEMBASE, dreg,
- vtable_reg, G_STRUCT_OFFSET (MonoVTable, rank));
+ vtable_reg, MONO_STRUCT_OFFSET (MonoVTable, rank));
type_from_op (ins, NULL, NULL);
return ins;
@@ -5395,7 +5417,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
int dreg = alloc_ireg (cfg);
EMIT_NEW_LOAD_MEMBASE_FAULT (cfg, ins, OP_LOADI4_MEMBASE, dreg,
- args [0]->dreg, G_STRUCT_OFFSET (MonoArray, max_length));
+ args [0]->dreg, MONO_STRUCT_OFFSET (MonoArray, max_length));
type_from_op (ins, NULL, NULL);
return ins;
@@ -5404,7 +5426,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
} else if (cmethod->klass == runtime_helpers_class) {
if (strcmp (cmethod->name, "get_OffsetToStringData") == 0) {
- EMIT_NEW_ICONST (cfg, ins, G_STRUCT_OFFSET (MonoString, chars));
+ EMIT_NEW_ICONST (cfg, ins, MONO_STRUCT_OFFSET (MonoString, chars));
return ins;
} else
return NULL;
@@ -5510,18 +5532,17 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
}
#endif
-#ifdef MONO_ARCH_HAVE_ATOMIC_ADD
if (strcmp (cmethod->name, "Increment") == 0) {
MonoInst *ins_iconst;
guint32 opcode = 0;
if (fsig->params [0]->type == MONO_TYPE_I4) {
- opcode = OP_ATOMIC_ADD_NEW_I4;
- cfg->has_atomic_add_new_i4 = TRUE;
+ opcode = OP_ATOMIC_ADD_I4;
+ cfg->has_atomic_add_i4 = TRUE;
}
#if SIZEOF_REGISTER == 8
else if (fsig->params [0]->type == MONO_TYPE_I8)
- opcode = OP_ATOMIC_ADD_NEW_I8;
+ opcode = OP_ATOMIC_ADD_I8;
#endif
if (opcode) {
if (!mono_arch_opcode_supported (opcode))
@@ -5536,7 +5557,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
ins->inst_basereg = args [0]->dreg;
ins->inst_offset = 0;
ins->sreg2 = ins_iconst->dreg;
- ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+ ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
MONO_ADD_INS (cfg->cbb, ins);
}
} else if (strcmp (cmethod->name, "Decrement") == 0) {
@@ -5544,12 +5565,12 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
guint32 opcode = 0;
if (fsig->params [0]->type == MONO_TYPE_I4) {
- opcode = OP_ATOMIC_ADD_NEW_I4;
- cfg->has_atomic_add_new_i4 = TRUE;
+ opcode = OP_ATOMIC_ADD_I4;
+ cfg->has_atomic_add_i4 = TRUE;
}
#if SIZEOF_REGISTER == 8
else if (fsig->params [0]->type == MONO_TYPE_I8)
- opcode = OP_ATOMIC_ADD_NEW_I8;
+ opcode = OP_ATOMIC_ADD_I8;
#endif
if (opcode) {
if (!mono_arch_opcode_supported (opcode))
@@ -5564,19 +5585,19 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
ins->inst_basereg = args [0]->dreg;
ins->inst_offset = 0;
ins->sreg2 = ins_iconst->dreg;
- ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+ ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
MONO_ADD_INS (cfg->cbb, ins);
}
} else if (strcmp (cmethod->name, "Add") == 0) {
guint32 opcode = 0;
if (fsig->params [0]->type == MONO_TYPE_I4) {
- opcode = OP_ATOMIC_ADD_NEW_I4;
- cfg->has_atomic_add_new_i4 = TRUE;
+ opcode = OP_ATOMIC_ADD_I4;
+ cfg->has_atomic_add_i4 = TRUE;
}
#if SIZEOF_REGISTER == 8
else if (fsig->params [0]->type == MONO_TYPE_I8)
- opcode = OP_ATOMIC_ADD_NEW_I8;
+ opcode = OP_ATOMIC_ADD_I8;
#endif
if (opcode) {
if (!mono_arch_opcode_supported (opcode))
@@ -5586,13 +5607,11 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
ins->inst_basereg = args [0]->dreg;
ins->inst_offset = 0;
ins->sreg2 = args [1]->dreg;
- ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+ ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
MONO_ADD_INS (cfg->cbb, ins);
}
}
-#endif /* MONO_ARCH_HAVE_ATOMIC_ADD */
-#ifdef MONO_ARCH_HAVE_ATOMIC_EXCHANGE
if (strcmp (cmethod->name, "Exchange") == 0) {
guint32 opcode;
gboolean is_ref = fsig->params [0]->type == MONO_TYPE_OBJECT;
@@ -5642,9 +5661,7 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
if (cfg->gen_write_barriers && is_ref)
emit_write_barrier (cfg, args [0], args [1]);
}
-#endif /* MONO_ARCH_HAVE_ATOMIC_EXCHANGE */
-
-#ifdef MONO_ARCH_HAVE_ATOMIC_CAS
+
if ((strcmp (cmethod->name, "CompareExchange") == 0)) {
int size = 0;
gboolean is_ref = mini_type_is_reference (cfg, fsig->params [1]);
@@ -5681,7 +5698,6 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
if (cfg->gen_write_barriers && is_ref)
emit_write_barrier (cfg, args [0], args [1]);
}
-#endif /* MONO_ARCH_HAVE_ATOMIC_CAS */
if (strcmp (cmethod->name, "MemoryBarrier") == 0)
ins = emit_memory_barrier (cfg, FullBarrier);
@@ -6322,6 +6338,7 @@ mini_get_method (MonoCompile *cfg, MonoMethod *m, guint32 token, MonoClass *klas
static inline MonoClass*
mini_get_class (MonoMethod *method, guint32 token, MonoGenericContext *context)
{
+ MonoError error;
MonoClass *klass;
if (method->wrapper_type != MONO_WRAPPER_NONE) {
@@ -6329,7 +6346,8 @@ mini_get_class (MonoMethod *method, guint32 token, MonoGenericContext *context)
if (context)
klass = mono_class_inflate_generic_class (klass, context);
} else {
- klass = mono_class_get_full (method->klass->image, token, context);
+ klass = mono_class_get_and_inflate_typespec_checked (method->klass->image, token, context, &error);
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
}
if (klass)
mono_class_init (klass);
@@ -6515,7 +6533,7 @@ initialize_array_data (MonoMethod *method, gboolean aot, unsigned char *ip, Mono
return NULL;
*out_size = size;
/*g_print ("optimized in %s: size: %d, numelems: %d\n", method->name, size, newarr->inst_newa_len->inst_c0);*/
- if (!method->klass->image->dynamic) {
+ if (!image_is_dynamic (method->klass->image)) {
field_index = read32 (ip + 2) & 0xffffff;
mono_metadata_field_info (method->klass->image, field_index - 1, NULL, &rva, NULL);
data_ptr = mono_image_rva_map (method->klass->image, rva);
@@ -6752,7 +6770,7 @@ emit_managed_static_data_access (MonoCompile *cfg, MonoInst *thread_ins, int off
// idx = (offset >> 24) - 1;
// return ((char*) thread->static_data [idx]) + (offset & 0xffffff);
static_data_reg = alloc_ireg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, G_STRUCT_OFFSET (MonoInternalThread, static_data));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, MONO_STRUCT_OFFSET (MonoInternalThread, static_data));
idx_reg = alloc_ireg (cfg);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISHR_IMM, idx_reg, offset_reg, 24);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ISUB_IMM, idx_reg, idx_reg, 1);
@@ -7206,7 +7224,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
cfg->gsharedvt_locals_var = locals_var;
dreg = alloc_ireg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, dreg, var->dreg, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, locals_size));
+ MONO_EMIT_NEW_LOAD_MEMBASE_OP (cfg, OP_LOADI4_MEMBASE, dreg, var->dreg, MONO_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, locals_size));
MONO_INST_NEW (cfg, ins, OP_LOCALLOC);
ins->dreg = locals_var->dreg;
@@ -8009,7 +8027,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
} else if (cmethod->klass->image != mono_defaults.corlib && !(cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) && !cmethod->klass->valuetype) {
/* 'The type parameter is instantiated as a reference type' case below. */
} else if (((cmethod->klass == mono_defaults.object_class) || (cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) || (!cmethod->klass->valuetype && cmethod->klass->image != mono_defaults.corlib)) &&
- (MONO_TYPE_IS_VOID (fsig->ret) || MONO_TYPE_IS_PRIMITIVE (fsig->ret) || MONO_TYPE_IS_REFERENCE (fsig->ret) || mini_is_gsharedvt_type (cfg, fsig->ret)) &&
+ (MONO_TYPE_IS_VOID (fsig->ret) || MONO_TYPE_IS_PRIMITIVE (fsig->ret) || MONO_TYPE_IS_REFERENCE (fsig->ret) || MONO_TYPE_ISSTRUCT (fsig->ret) || mini_is_gsharedvt_type (cfg, fsig->ret)) &&
(fsig->param_count == 0 || (!fsig->hasthis && fsig->param_count == 1) || (fsig->param_count == 1 && (MONO_TYPE_IS_REFERENCE (fsig->params [0]) || mini_is_gsharedvt_type (cfg, fsig->params [0]))))) {
MonoInst *args [16];
@@ -8058,7 +8076,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (mini_is_gsharedvt_type (cfg, fsig->ret)) {
ins = handle_unbox_gsharedvt (cfg, mono_class_from_mono_type (fsig->ret), ins, &bblock);
- } else if (MONO_TYPE_IS_PRIMITIVE (fsig->ret)) {
+ } else if (MONO_TYPE_IS_PRIMITIVE (fsig->ret) || MONO_TYPE_ISSTRUCT (fsig->ret)) {
MonoInst *add;
/* Unbox */
@@ -8395,8 +8413,10 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
/*
* Making generic calls out of gsharedvt methods.
+ * This needs to be used for all generic calls, not just ones with a gsharedvt signature, to avoid
+ * patching gshared method addresses into a gsharedvt method.
*/
- if (cmethod && cfg->gsharedvt && mini_is_gsharedvt_signature (cfg, fsig)) {
+ if (cmethod && cfg->gsharedvt && (mini_is_gsharedvt_signature (cfg, fsig) || cmethod->is_inflated || cmethod->klass->generic_class)) {
MonoRgctxInfoType info_type;
if (virtual) {
@@ -8414,6 +8434,11 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
cmethod, MONO_RGCTX_INFO_METHOD);
/* This is not needed, as the trampoline code will pass one, and it might be passed in the same reg as the imt arg */
vtable_arg = NULL;
+ } else if ((cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) && !imt_arg) {
+ /* This can happen when we call a fully instantiated iface method */
+ imt_arg = emit_get_rgctx_method (cfg, context_used,
+ cmethod, MONO_RGCTX_INFO_METHOD);
+ vtable_arg = NULL;
}
}
@@ -10380,7 +10405,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
// return ((char*) thread->static_data [idx]) + (offset & 0xffffff);
MONO_ADD_INS (cfg->cbb, thread_ins);
static_data_reg = alloc_ireg (cfg);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, G_STRUCT_OFFSET (MonoInternalThread, static_data));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, static_data_reg, thread_ins->dreg, MONO_STRUCT_OFFSET (MonoInternalThread, static_data));
if (cfg->compile_aot) {
int offset_reg, offset2_reg, idx_reg;
@@ -10750,7 +10775,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MonoInst *iargs [3];
int add_reg = alloc_ireg_mp (cfg);
- EMIT_NEW_BIALU_IMM (cfg, iargs [0], OP_PADD_IMM, add_reg, ins->dreg, G_STRUCT_OFFSET (MonoArray, vector));
+ EMIT_NEW_BIALU_IMM (cfg, iargs [0], OP_PADD_IMM, add_reg, ins->dreg, MONO_STRUCT_OFFSET (MonoArray, vector));
if (cfg->compile_aot) {
EMIT_NEW_AOTCONST_TOKEN (cfg, iargs [1], MONO_PATCH_INFO_RVA, method->klass->image, GPOINTER_TO_UINT(field_token), STACK_PTR, NULL);
} else {
@@ -10847,7 +10872,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
} else if (sp [1]->opcode == OP_ICONST) {
int array_reg = sp [0]->dreg;
int index_reg = sp [1]->dreg;
- int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + G_STRUCT_OFFSET (MonoArray, vector);
+ int offset = (mono_class_array_element_size (klass) * sp [1]->inst_c0) + MONO_STRUCT_OFFSET (MonoArray, vector);
MONO_EMIT_BOUNDS_CHECK (cfg, array_reg, MonoArray, max_length, index_reg);
EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &klass->byval_arg, array_reg, offset);
@@ -10925,7 +10950,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MONO_INST_NEW (cfg, ins, *ip);
--sp;
CHECK_OPSIZE (5);
- klass = mono_class_get_full (image, read32 (ip + 1), generic_context);
+ klass = mono_class_get_and_inflate_typespec_checked (image, read32 (ip + 1), generic_context, &error);
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
CHECK_TYPELOAD (klass);
mono_class_init (klass);
@@ -10936,7 +10962,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (!src_var)
src_var = mono_compile_create_var_for_vreg (cfg, &mono_defaults.typed_reference_class->byval_arg, OP_LOCAL, sp [0]->dreg);
EMIT_NEW_VARLOADA (cfg, src, src_var, src_var->inst_vtype);
- MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, src->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass));
+ MONO_EMIT_NEW_LOAD_MEMBASE (cfg, klass_reg, src->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass));
if (context_used) {
MonoInst *klass_ins;
@@ -10950,7 +10976,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
} else {
mini_emit_class_check (cfg, klass_reg, klass);
}
- EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, src->dreg, G_STRUCT_OFFSET (MonoTypedRef, value));
+ EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, dreg, src->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, value));
ins->type = STACK_MP;
*sp++ = ins;
ip += 5;
@@ -10965,7 +10991,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
MONO_INST_NEW (cfg, ins, *ip);
--sp;
CHECK_OPSIZE (5);
- klass = mono_class_get_full (image, read32 (ip + 1), generic_context);
+ klass = mono_class_get_and_inflate_typespec_checked (image, read32 (ip + 1), generic_context, &error);
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
CHECK_TYPELOAD (klass);
mono_class_init (klass);
@@ -10979,22 +11006,22 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
int type_reg = alloc_preg (cfg);
const_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_KLASS);
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass), const_ins->dreg);
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_ins->dreg, G_STRUCT_OFFSET (MonoClass, byval_arg));
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass), const_ins->dreg);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_ins->dreg, MONO_STRUCT_OFFSET (MonoClass, byval_arg));
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
} else if (cfg->compile_aot) {
int const_reg = alloc_preg (cfg);
int type_reg = alloc_preg (cfg);
MONO_EMIT_NEW_CLASSCONST (cfg, const_reg, klass);
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass), const_reg);
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_reg, G_STRUCT_OFFSET (MonoClass, byval_arg));
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass), const_reg);
+ MONO_EMIT_NEW_BIALU_IMM (cfg, OP_ADD_IMM, type_reg, const_reg, MONO_STRUCT_OFFSET (MonoClass, byval_arg));
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type), type_reg);
} else {
- MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, type), &klass->byval_arg);
- MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, klass), klass);
+ MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type), &klass->byval_arg);
+ MONO_EMIT_NEW_STORE_MEMBASE_IMM (cfg, OP_STOREP_MEMBASE_IMM, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, klass), klass);
}
- MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, G_STRUCT_OFFSET (MonoTypedRef, value), sp [0]->dreg);
+ MONO_EMIT_NEW_STORE_MEMBASE (cfg, OP_STOREP_MEMBASE_REG, addr->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, value), sp [0]->dreg);
EMIT_NEW_TEMPLOAD (cfg, ins, loc->inst_c0);
ins->type = STACK_VTYPE;
@@ -11088,10 +11115,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
tclass, MONO_RGCTX_INFO_REFLECTION_TYPE);
} else if (cfg->compile_aot) {
if (method->wrapper_type) {
- if (mono_class_get (tclass->image, tclass->type_token) == tclass && !generic_context) {
+ mono_error_init (&error); //got to do it since there are multiple conditionals below
+ if (mono_class_get_checked (tclass->image, tclass->type_token, &error) == tclass && !generic_context) {
/* Special case for static synchronized wrappers */
EMIT_NEW_TYPE_FROM_HANDLE_CONST (cfg, ins, tclass->image, tclass->type_token, generic_context);
} else {
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
/* FIXME: n is not a normal token */
DISABLE_AOT (cfg);
EMIT_NEW_PCONST (cfg, ins, NULL);
@@ -11574,9 +11603,9 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
break;
}
case CEE_MONO_JIT_ATTACH: {
- MonoInst *args [16];
+ MonoInst *args [16], *domain_ins;
MonoInst *ad_ins, *lmf_ins;
- MonoBasicBlock *next_bb = NULL;
+ MonoBasicBlock *next_bb = NULL, *call_bb = NULL;
cfg->orig_domain_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
@@ -11593,14 +11622,24 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (MONO_ARCH_HAVE_TLS_GET && ad_ins && lmf_ins) {
NEW_BBLOCK (cfg, next_bb);
+ NEW_BBLOCK (cfg, call_bb);
+ if (cfg->compile_aot) {
+ /* AOT code is only used in the root domain */
+ EMIT_NEW_PCONST (cfg, domain_ins, NULL);
+ } else {
+ EMIT_NEW_PCONST (cfg, domain_ins, cfg->domain);
+ }
MONO_ADD_INS (cfg->cbb, ad_ins);
- MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, ad_ins->dreg, 0);
- MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, next_bb);
+ MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, ad_ins->dreg, domain_ins->dreg);
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, call_bb);
MONO_ADD_INS (cfg->cbb, lmf_ins);
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, lmf_ins->dreg, 0);
- MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, next_bb);
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, call_bb);
+
+ MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, next_bb);
+ MONO_START_BB (cfg, call_bb);
}
if (cfg->compile_aot) {
@@ -11737,7 +11776,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if ((sp > stack_start) && (ip + 6 + 5 < end) && ip_in_bb (cfg, bblock, ip + 6) && (ip [6] == CEE_NEWOBJ)) {
MonoMethod *ctor_method = mini_get_method (cfg, method, read32 (ip + 7), NULL, generic_context);
if (ctor_method && (ctor_method->klass->parent == mono_defaults.multicastdelegate_class)) {
- MonoInst *target_ins;
+ MonoInst *target_ins, *handle_ins;
MonoMethod *invoke;
int invoke_context_used;
@@ -11766,12 +11805,15 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
ip += 6;
if (cfg->verbose_level > 3)
g_print ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
- sp --;
- *sp = handle_delegate_ctor (cfg, ctor_method->klass, target_ins, cmethod, context_used);
- CHECK_CFG_EXCEPTION;
- ip += 5;
- sp ++;
- break;
+ if ((handle_ins = handle_delegate_ctor (cfg, ctor_method->klass, target_ins, cmethod, context_used, FALSE))) {
+ sp --;
+ *sp = handle_ins;
+ CHECK_CFG_EXCEPTION;
+ ip += 5;
+ sp ++;
+ break;
+ }
+ ip -= 6;
}
#endif
}
@@ -11806,6 +11848,47 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
ensure_method_is_allowed_to_call_method (cfg, method, cmethod, bblock, ip);
}
+ /*
+ * Optimize the common case of ldvirtftn+delegate creation
+ */
+ if ((sp > stack_start) && (ip + 6 + 5 < end) && ip_in_bb (cfg, bblock, ip + 6) && (ip [6] == CEE_NEWOBJ) && (ip > header->code && ip [-1] == CEE_DUP)) {
+ MonoMethod *ctor_method = mini_get_method (cfg, method, read32 (ip + 7), NULL, generic_context);
+ if (ctor_method && (ctor_method->klass->parent == mono_defaults.multicastdelegate_class)) {
+ MonoInst *target_ins, *handle_ins;
+ MonoMethod *invoke;
+ int invoke_context_used;
+
+ invoke = mono_get_delegate_invoke (ctor_method->klass);
+ if (!invoke || !mono_method_signature (invoke))
+ LOAD_ERROR;
+
+ invoke_context_used = mini_method_check_context_used (cfg, invoke);
+
+ target_ins = sp [-1];
+
+ if (mono_security_core_clr_enabled ())
+ ensure_method_is_allowed_to_call_method (cfg, method, ctor_method, bblock, ip);
+
+#if defined(MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE)
+ /* FIXME: SGEN support */
+ if (invoke_context_used == 0) {
+ ip += 6;
+ if (cfg->verbose_level > 3)
+ g_print ("converting (in B%d: stack: %d) %s", bblock->block_num, (int)(sp - stack_start), mono_disasm_code_one (NULL, method, ip, NULL));
+ if ((handle_ins = handle_delegate_ctor (cfg, ctor_method->klass, target_ins, cmethod, context_used, TRUE))) {
+ sp -= 2;
+ *sp = handle_ins;
+ CHECK_CFG_EXCEPTION;
+ ip += 5;
+ sp ++;
+ break;
+ }
+ ip -= 6;
+ }
+#endif
+ }
+ }
+
--sp;
args [0] = *sp;
@@ -12062,7 +12145,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
bblock->flags |= BB_EXCEPTION_UNSAFE;
- g_assert (handler_offset != -1);
+ if (handler_offset == -1)
+ UNVERIFIED;
EMIT_NEW_TEMPLOAD (cfg, load, mono_find_exvar_for_offset (cfg, handler_offset)->inst_c0);
MONO_INST_NEW (cfg, ins, OP_RETHROW);
@@ -12082,19 +12166,25 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
guint32 val;
int ialign;
- GSHAREDVT_FAILURE (*ip);
-
CHECK_STACK_OVF (1);
CHECK_OPSIZE (6);
token = read32 (ip + 2);
- if (mono_metadata_token_table (token) == MONO_TABLE_TYPESPEC && !method->klass->image->dynamic && !generic_context) {
- MonoType *type = mono_type_create_from_typespec (image, token);
+ if (mono_metadata_token_table (token) == MONO_TABLE_TYPESPEC && !image_is_dynamic (method->klass->image) && !generic_context) {
+ MonoType *type = mono_type_create_from_typespec_checked (image, token, &error);
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
+ if (!type)
+ UNVERIFIED;
+
val = mono_type_size (type, &ialign);
} else {
- MonoClass *klass = mono_class_get_full (image, token, generic_context);
+ MonoClass *klass = mono_class_get_and_inflate_typespec_checked (image, token, generic_context, &error);
+ mono_error_cleanup (&error); /* FIXME don't swallow the error */
CHECK_TYPELOAD (klass);
mono_class_init (klass);
val = mono_type_size (&klass->byval_arg, &ialign);
+
+ if (mini_is_gsharedvt_klass (cfg, klass))
+ GSHAREDVT_FAILURE (*ip);
}
EMIT_NEW_ICONST (cfg, ins, val);
*sp++= ins;
@@ -12114,7 +12204,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
if (!src_var)
src_var = mono_compile_create_var_for_vreg (cfg, &mono_defaults.typed_reference_class->byval_arg, OP_LOCAL, sp [0]->dreg);
EMIT_NEW_VARLOADA (cfg, src, src_var, src_var->inst_vtype);
- EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &mono_defaults.typehandle_class->byval_arg, src->dreg, G_STRUCT_OFFSET (MonoTypedRef, type));
+ EMIT_NEW_LOAD_MEMBASE_TYPE (cfg, ins, &mono_defaults.typehandle_class->byval_arg, src->dreg, MONO_STRUCT_OFFSET (MonoTypedRef, type));
*sp++ = ins;
ip += 2;
break;
@@ -13240,7 +13330,7 @@ mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts)
g_assert_not_reached ();
}
reg2 = alloc_ireg (cfg);
- NEW_LOAD_MEMBASE (cfg, load2, OP_LOADI4_MEMBASE, reg2, reg1, G_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
+ NEW_LOAD_MEMBASE (cfg, load2, OP_LOADI4_MEMBASE, reg2, reg1, MONO_STRUCT_OFFSET (MonoGSharedVtMethodRuntimeInfo, entries) + (idx * sizeof (gpointer)));
/* Load the locals area address */
reg3 = alloc_ireg (cfg);
if (locals_var->opcode == OP_REGOFFSET) {
diff --git a/mono/mini/mini-amd64.c b/mono/mini/mini-amd64.c
index 38a7649bc29..3cefc22c87d 100644
--- a/mono/mini/mini-amd64.c
+++ b/mono/mini/mini-amd64.c
@@ -20,6 +20,7 @@
#include <unistd.h>
#endif
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/threads.h>
@@ -39,10 +40,6 @@
#include "debugger-agent.h"
#include "mini-gc.h"
-#ifdef HOST_WIN32
-static gint jit_tls_offset = -1;
-#endif
-
#ifdef MONO_XEN_OPT
static gboolean optimize_for_xen = TRUE;
#else
@@ -63,20 +60,13 @@ static gboolean optimize_for_xen = TRUE;
#endif
/* This mutex protects architecture specific caches */
-#define mono_mini_arch_lock() EnterCriticalSection (&mini_arch_mutex)
-#define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
-static CRITICAL_SECTION mini_arch_mutex;
+#define mono_mini_arch_lock() mono_mutex_lock (&mini_arch_mutex)
+#define mono_mini_arch_unlock() mono_mutex_unlock (&mini_arch_mutex)
+static mono_mutex_t mini_arch_mutex;
MonoBreakpointInfo
mono_breakpoint_info [MONO_BREAKPOINT_ARRAY_SIZE];
-/* Structure used by the sequence points in AOTed code */
-typedef struct {
- gpointer ss_trigger_page;
- gpointer bp_trigger_page;
- gpointer bp_addrs [MONO_ZERO_LEN_ARRAY];
-} SeqPointInfo;
-
/*
* The code generated for sequence points reads from this location, which is
* made read-only when single stepping is enabled.
@@ -536,14 +526,10 @@ typedef struct {
#define DEBUG(a) if (cfg->verbose_level > 1) a
#ifdef HOST_WIN32
-#define PARAM_REGS 4
-
static AMD64_Reg_No param_regs [] = { AMD64_RCX, AMD64_RDX, AMD64_R8, AMD64_R9 };
static AMD64_Reg_No return_regs [] = { AMD64_RAX, AMD64_RDX };
#else
-#define PARAM_REGS 6
-
static AMD64_Reg_No param_regs [] = { AMD64_RDI, AMD64_RSI, AMD64_RDX, AMD64_RCX, AMD64_R8, AMD64_R9 };
static AMD64_Reg_No return_regs [] = { AMD64_RAX, AMD64_RDX };
@@ -1117,15 +1103,8 @@ get_call_info (MonoGenericSharingContext *gsctx, MonoMemPool *mp, MonoMethodSign
}
/* fall through */
case MONO_TYPE_VALUETYPE:
- add_valuetype (gsctx, sig, ainfo, sig->params [i], FALSE, &gr, &fr, &stack_size);
- break;
case MONO_TYPE_TYPEDBYREF:
-#if defined( HOST_WIN32 ) || defined( __native_client_codegen__ )
add_valuetype (gsctx, sig, ainfo, sig->params [i], FALSE, &gr, &fr, &stack_size);
-#else
- stack_size += sizeof (MonoTypedRef);
- ainfo->storage = ArgOnStack;
-#endif
break;
case MONO_TYPE_U8:
case MONO_TYPE_I8:
@@ -1254,7 +1233,7 @@ mono_arch_init (void)
{
int flags;
- InitializeCriticalSection (&mini_arch_mutex);
+ mono_mutex_init_recursive (&mini_arch_mutex);
#if defined(__native_client_codegen__)
mono_native_tls_alloc (&nacl_instruction_depth, NULL);
mono_native_tls_set_value (nacl_instruction_depth, (gpointer)0);
@@ -1292,7 +1271,7 @@ mono_arch_init (void)
void
mono_arch_cleanup (void)
{
- DeleteCriticalSection (&mini_arch_mutex);
+ mono_mutex_destroy (&mini_arch_mutex);
#if defined(__native_client_codegen__)
mono_native_tls_free (nacl_instruction_depth);
mono_native_tls_free (nacl_rex_tag);
@@ -2028,13 +2007,13 @@ mono_arch_create_vars (MonoCompile *cfg)
if (cfg->method->save_lmf)
cfg->create_lmf_var = TRUE;
-#if !defined(HOST_WIN32)
if (cfg->method->save_lmf) {
cfg->lmf_ir = TRUE;
+#if !defined(HOST_WIN32)
if (mono_get_lmf_tls_offset () != -1 && !optimize_for_xen)
cfg->lmf_ir_mono_lmf = TRUE;
- }
#endif
+ }
#ifndef MONO_AMD64_NO_PUSHES
cfg->arch_eh_jit_info = 1;
@@ -2618,12 +2597,6 @@ typedef struct {
CallInfo *cinfo;
} ArchDynCallInfo;
-typedef struct {
- mgreg_t regs [PARAM_REGS];
- mgreg_t res;
- guint8 *ret;
-} DynCallArgs;
-
static gboolean
dyn_call_supported (MonoMethodSignature *sig, CallInfo *cinfo)
{
@@ -3420,7 +3393,7 @@ mono_emit_stack_alloc (MonoCompile *cfg, guchar *code, MonoInst* tree)
int need_touch = FALSE;
#if defined(HOST_WIN32)
- need_touch = TRUE;
+ need_touch = TRUE;
#elif defined(MONO_ARCH_SIGSEGV_ON_ALTSTACK)
if (!tree->flags & MONO_INST_INIT)
need_touch = TRUE;
@@ -3654,9 +3627,22 @@ guint8*
mono_amd64_emit_tls_get (guint8* code, int dreg, int tls_offset)
{
#ifdef HOST_WIN32
- g_assert (tls_offset < 64);
- x86_prefix (code, X86_GS_PREFIX);
- amd64_mov_reg_mem (code, dreg, (tls_offset * 8) + 0x1480, 8);
+ if (tls_offset < 64) {
+ x86_prefix (code, X86_GS_PREFIX);
+ amd64_mov_reg_mem (code, dreg, (tls_offset * 8) + 0x1480, 8);
+ } else {
+ guint8 *buf [16];
+
+ g_assert (tls_offset < 0x440);
+ /* Load TEB->TlsExpansionSlots */
+ x86_prefix (code, X86_GS_PREFIX);
+ amd64_mov_reg_mem (code, dreg, 0x1780, 8);
+ amd64_test_reg_reg (code, dreg, dreg);
+ buf [0] = code;
+ amd64_branch (code, X86_CC_EQ, code, TRUE);
+ amd64_mov_reg_membase (code, dreg, dreg, (tls_offset * 8) - 0x200, 8);
+ amd64_patch (buf [0], code);
+ }
#elif defined(__APPLE__)
x86_prefix (code, X86_GS_PREFIX);
amd64_mov_reg_mem (code, dreg, tls_gs_offset + (tls_offset * 8), 8);
@@ -3765,79 +3751,22 @@ emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offse
* sp is saved right before calls but we need to save it here too so
* async stack walks would work.
*/
- amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
+ amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
/* Save rbp */
- amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), AMD64_RBP, 8);
+ amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), AMD64_RBP, 8);
if (cfg->arch.omit_fp && cfa_offset != -1)
- mono_emit_unwind_op_offset (cfg, code, AMD64_RBP, - (cfa_offset - (lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp))));
+ mono_emit_unwind_op_offset (cfg, code, AMD64_RBP, - (cfa_offset - (lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp))));
/* These can't contain refs */
- mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
-#ifdef HOST_WIN32
- mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF);
-#endif
- mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rip), SLOT_NOREF);
- mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), SLOT_NOREF);
+ mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
+ mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rip), SLOT_NOREF);
+ mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), SLOT_NOREF);
/* These are handled automatically by the stack marking code */
- mini_gc_set_slot_type_from_fp (cfg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), SLOT_NOREF);
+ mini_gc_set_slot_type_from_fp (cfg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), SLOT_NOREF);
return code;
}
-#ifdef HOST_WIN32
-/*
- * emit_push_lmf:
- *
- * Emit code to push an LMF structure on the LMF stack.
- */
-static guint8*
-emit_push_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, gboolean *args_clobbered)
-{
- if (jit_tls_offset != -1) {
- code = mono_amd64_emit_tls_get (code, AMD64_RAX, jit_tls_offset);
- amd64_alu_reg_imm (code, X86_ADD, AMD64_RAX, G_STRUCT_OFFSET (MonoJitTlsData, lmf));
- } else {
- /*
- * The call might clobber argument registers, but they are already
- * saved to the stack/global regs.
- */
- if (args_clobbered)
- *args_clobbered = TRUE;
- code = emit_call (cfg, code, MONO_PATCH_INFO_INTERNAL_METHOD,
- (gpointer)"mono_get_lmf_addr", TRUE);
- }
-
- /* Save lmf_addr */
- amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), AMD64_RAX, sizeof(gpointer));
- /* Save previous_lmf */
- amd64_mov_reg_membase (code, AMD64_R11, AMD64_RAX, 0, sizeof(gpointer));
- amd64_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer));
- /* Set new lmf */
- amd64_lea_membase (code, AMD64_R11, cfg->frame_reg, lmf_offset);
- amd64_mov_membase_reg (code, AMD64_RAX, 0, AMD64_R11, sizeof(gpointer));
-
- return code;
-}
-#endif
-
-#ifdef HOST_WIN32
-/*
- * emit_pop_lmf:
- *
- * Emit code to pop an LMF structure from the LMF stack.
- */
-static guint8*
-emit_pop_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
-{
- /* Restore previous lmf */
- amd64_mov_reg_membase (code, AMD64_RCX, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer));
- amd64_mov_reg_membase (code, AMD64_R11, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), sizeof(gpointer));
- amd64_mov_membase_reg (code, AMD64_R11, 0, AMD64_RCX, sizeof(gpointer));
-
- return code;
-}
-#endif
-
#define REAL_PRINT_REG(text,reg) \
mono_assert (reg >= 0); \
amd64_push_reg (code, AMD64_RAX); \
@@ -4306,7 +4235,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
/* Load info var */
amd64_mov_reg_membase (code, AMD64_R11, info_var->inst_basereg, info_var->inst_offset, 8);
- val = ((offset) * sizeof (guint8*)) + G_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
+ val = ((offset) * sizeof (guint8*)) + MONO_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
/* Load the info->bp_addrs [offset], which is either a valid address or the address of a trigger page */
amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, val, 8);
amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, 0, 8);
@@ -4937,12 +4866,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
/* Save result */
amd64_mov_reg_membase (code, AMD64_R11, var->inst_basereg, var->inst_offset, 8);
- amd64_mov_membase_reg (code, AMD64_R11, G_STRUCT_OFFSET (DynCallArgs, res), AMD64_RAX, 8);
+ amd64_mov_membase_reg (code, AMD64_R11, MONO_STRUCT_OFFSET (DynCallArgs, res), AMD64_RAX, 8);
break;
}
case OP_AMD64_SAVE_SP_TO_LMF: {
MonoInst *lmf_var = cfg->lmf_var;
- amd64_mov_membase_reg (code, lmf_var->inst_basereg, lmf_var->inst_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
+ amd64_mov_membase_reg (code, lmf_var->inst_basereg, lmf_var->inst_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), AMD64_RSP, 8);
break;
}
case OP_X86_PUSH:
@@ -5635,25 +5564,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
int dreg = ins->dreg;
guint32 size = (ins->opcode == OP_ATOMIC_ADD_I4) ? 4 : 8;
- if (dreg == ins->inst_basereg)
- dreg = AMD64_R11;
-
- if (dreg != ins->sreg2)
- amd64_mov_reg_reg (code, ins->dreg, ins->sreg2, size);
-
- x86_prefix (code, X86_LOCK_PREFIX);
- amd64_xadd_membase_reg (code, ins->inst_basereg, ins->inst_offset, dreg, size);
-
- if (dreg != ins->dreg)
- amd64_mov_reg_reg (code, ins->dreg, dreg, size);
-
- break;
- }
- case OP_ATOMIC_ADD_NEW_I4:
- case OP_ATOMIC_ADD_NEW_I8: {
- int dreg = ins->dreg;
- guint32 size = (ins->opcode == OP_ATOMIC_ADD_NEW_I4) ? 4 : 8;
-
if ((dreg == ins->sreg2) || (dreg == ins->inst_basereg))
dreg = AMD64_R11;
@@ -6601,7 +6511,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
MonoBasicBlock *bb;
MonoMethodSignature *sig;
MonoInst *ins;
- int alloc_size, pos, i, cfa_offset, quad, max_epilog_size;
+ int alloc_size, pos, i, cfa_offset, quad, max_epilog_size, save_area_offset;
guint8 *code;
CallInfo *cinfo;
MonoInst *lmf_var = cfg->lmf_var;
@@ -6778,7 +6688,6 @@ mono_arch_emit_prolog (MonoCompile *cfg)
}
#endif
-#ifndef TARGET_WIN32
if (mini_get_debug_options ()->init_stacks) {
/* Fill the stack frame with a dummy value to force deterministic behavior */
@@ -6809,43 +6718,38 @@ mono_arch_emit_prolog (MonoCompile *cfg)
amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RSP, -8, 8);
amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RSP, -16, 8);
}
-#endif
/* Save LMF */
- if (method->save_lmf) {
+ if (method->save_lmf)
code = emit_setup_lmf (cfg, code, lmf_var->inst_offset, cfa_offset);
- }
/* Save callee saved registers */
- if (TRUE || !method->save_lmf) {
- gint32 save_area_offset;
-
- if (cfg->arch.omit_fp) {
- save_area_offset = cfg->arch.reg_save_area_offset;
- /* Save caller saved registers after sp is adjusted */
- /* The registers are saved at the bottom of the frame */
- /* FIXME: Optimize this so the regs are saved at the end of the frame in increasing order */
- } else {
- /* The registers are saved just below the saved rbp */
- save_area_offset = cfg->arch.reg_save_area_offset;
- }
-
- for (i = 0; i < AMD64_NREG; ++i)
- if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->arch.saved_iregs & (1 << i))) {
- amd64_mov_membase_reg (code, cfg->frame_reg, save_area_offset, i, 8);
+ if (cfg->arch.omit_fp) {
+ save_area_offset = cfg->arch.reg_save_area_offset;
+ /* Save caller saved registers after sp is adjusted */
+ /* The registers are saved at the bottom of the frame */
+ /* FIXME: Optimize this so the regs are saved at the end of the frame in increasing order */
+ } else {
+ /* The registers are saved just below the saved rbp */
+ save_area_offset = cfg->arch.reg_save_area_offset;
+ }
- if (cfg->arch.omit_fp) {
- mono_emit_unwind_op_offset (cfg, code, i, - (cfa_offset - save_area_offset));
- /* These are handled automatically by the stack marking code */
- mini_gc_set_slot_type_from_cfa (cfg, - (cfa_offset - save_area_offset), SLOT_NOREF);
- } else {
- mono_emit_unwind_op_offset (cfg, code, i, - (-save_area_offset + (2 * 8)));
- // FIXME: GC
- }
+ for (i = 0; i < AMD64_NREG; ++i) {
+ if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->arch.saved_iregs & (1 << i))) {
+ amd64_mov_membase_reg (code, cfg->frame_reg, save_area_offset, i, 8);
- save_area_offset += 8;
- async_exc_point (code);
+ if (cfg->arch.omit_fp) {
+ mono_emit_unwind_op_offset (cfg, code, i, - (cfa_offset - save_area_offset));
+ /* These are handled automatically by the stack marking code */
+ mini_gc_set_slot_type_from_cfa (cfg, - (cfa_offset - save_area_offset), SLOT_NOREF);
+ } else {
+ mono_emit_unwind_op_offset (cfg, code, i, - (-save_area_offset + (2 * 8)));
+ // FIXME: GC
}
+
+ save_area_offset += 8;
+ async_exc_point (code);
+ }
}
/* store runtime generic context */
@@ -7042,13 +6946,8 @@ mono_arch_emit_prolog (MonoCompile *cfg)
}
}
-#ifdef HOST_WIN32
- if (method->save_lmf) {
- code = emit_push_lmf (cfg, code, lmf_var->inst_offset, &args_clobbered);
- }
-#else
- args_clobbered = TRUE;
-#endif
+ if (cfg->method->save_lmf)
+ args_clobbered = TRUE;
if (trace) {
args_clobbered = TRUE;
@@ -7145,7 +7044,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
if (cfg->compile_aot) {
amd64_mov_reg_membase (code, AMD64_R11, info_var->inst_basereg, info_var->inst_offset, 8);
- amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, G_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page), 8);
+ amd64_mov_reg_membase (code, AMD64_R11, AMD64_R11, MONO_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page), 8);
} else {
amd64_mov_reg_imm (code, AMD64_R11, (guint64)ss_trigger_page);
}
@@ -7169,7 +7068,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
CallInfo *cinfo;
gint32 lmf_offset = cfg->lmf_var ? ((MonoInst*)cfg->lmf_var)->inst_offset : -1;
gint32 save_area_offset = cfg->arch.reg_save_area_offset;
-
+
max_epilog_size = get_max_epilog_size (cfg);
while (cfg->code_len + max_epilog_size > (cfg->code_size - 16)) {
@@ -7180,6 +7079,14 @@ mono_arch_emit_epilog (MonoCompile *cfg)
code = cfg->native_code + cfg->code_len;
+ cfg->has_unwind_info_for_epilog = TRUE;
+
+ /* Mark the start of the epilog */
+ mono_emit_unwind_op_mark_loc (cfg, code, 0);
+
+ /* Save the uwind state which is needed by the out-of-line code */
+ mono_emit_unwind_op_remember_state (cfg, code);
+
if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
code = mono_arch_instrument_epilog (cfg, mono_trace_leave_method, code, TRUE);
@@ -7187,18 +7094,14 @@ mono_arch_emit_epilog (MonoCompile *cfg)
pos = 0;
if (method->save_lmf) {
-#ifdef HOST_WIN32
- code = emit_pop_lmf (cfg, code, lmf_offset);
-#endif
-
/* check if we need to restore protection of the stack after a stack overflow */
- if (mono_get_jit_tls_offset () != -1) {
+ if (!cfg->compile_aot && mono_get_jit_tls_offset () != -1) {
guint8 *patch;
code = mono_amd64_emit_tls_get (code, AMD64_RCX, mono_get_jit_tls_offset ());
/* we load the value in a separate instruction: this mechanism may be
* used later as a safer way to do thread interruption
*/
- amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RCX, G_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 8);
+ amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RCX, MONO_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 8);
x86_alu_reg_imm (code, X86_CMP, X86_ECX, 0);
patch = code;
x86_branch8 (code, X86_CC_Z, 0, FALSE);
@@ -7209,7 +7112,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
/* FIXME: maybe save the jit tls in the prolog */
}
if (cfg->used_int_regs & (1 << AMD64_RBP)) {
- amd64_mov_reg_membase (code, AMD64_RBP, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), 8);
+ amd64_mov_reg_membase (code, AMD64_RBP, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), 8);
}
}
@@ -7217,8 +7120,11 @@ mono_arch_emit_epilog (MonoCompile *cfg)
for (i = 0; i < AMD64_NREG; ++i) {
if (AMD64_IS_CALLEE_SAVED_REG (i) && (cfg->arch.saved_iregs & (1 << i))) {
/* Restore only used_int_regs, not arch.saved_iregs */
- if (cfg->used_int_regs & (1 << i))
+ if (cfg->used_int_regs & (1 << i)) {
amd64_mov_reg_membase (code, i, cfg->frame_reg, save_area_offset, 8);
+ mono_emit_unwind_op_same_value (cfg, code, i);
+ async_exc_point (code);
+ }
save_area_offset += 8;
}
}
@@ -7249,14 +7155,20 @@ mono_arch_emit_epilog (MonoCompile *cfg)
}
if (cfg->arch.omit_fp) {
- if (cfg->arch.stack_alloc_size)
+ if (cfg->arch.stack_alloc_size) {
amd64_alu_reg_imm (code, X86_ADD, AMD64_RSP, cfg->arch.stack_alloc_size);
+ }
} else {
amd64_leave (code);
+ mono_emit_unwind_op_same_value (cfg, code, AMD64_RBP);
}
+ mono_emit_unwind_op_def_cfa (cfg, code, AMD64_RSP, 8);
async_exc_point (code);
amd64_ret (code);
+ /* Restore the unwind state to be the same as before the epilog */
+ mono_emit_unwind_op_restore_state (cfg, code);
+
cfg->code_len = code - cfg->native_code;
g_assert (cfg->code_len < cfg->code_size);
@@ -7855,15 +7767,15 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
/* Replace the this argument with the target */
amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
- amd64_mov_reg_membase (code, AMD64_ARG_REG1, AMD64_RAX, G_STRUCT_OFFSET (MonoDelegate, target), 8);
- amd64_jump_membase (code, AMD64_RAX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ amd64_mov_reg_membase (code, AMD64_ARG_REG1, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 8);
+ amd64_jump_membase (code, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
g_assert ((code - start) < 64);
} else {
start = code = mono_global_codeman_reserve (64);
if (param_count == 0) {
- amd64_jump_membase (code, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ amd64_jump_membase (code, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
} else {
/* We have to shift the arguments left */
amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
@@ -7878,7 +7790,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
#endif
}
- amd64_jump_membase (code, AMD64_RAX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ amd64_jump_membase (code, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
}
g_assert ((code - start) < 64);
}
@@ -7987,24 +7899,37 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
return start;
}
+
+gpointer
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
+{
+ guint8 *code, *start;
+ int size = 20;
+
+ start = code = mono_global_codeman_reserve (size);
+
+ /* Replace the this argument with the target */
+ amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
+ amd64_mov_reg_membase (code, AMD64_ARG_REG1, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 8);
+
+ if (load_imt_reg) {
+ /* Load the IMT reg */
+ amd64_mov_reg_membase (code, MONO_ARCH_IMT_REG, AMD64_RAX, MONO_STRUCT_OFFSET (MonoDelegate, method), 8);
+ }
+
+ /* Load the vtable */
+ amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoObject, vtable), 8);
+ amd64_jump_membase (code, AMD64_RAX, offset);
+
+ return start;
+}
+
void
mono_arch_finish_init (void)
{
-#ifdef HOST_WIN32
- /*
- * We need to init this multiple times, since when we are first called, the key might not
- * be initialized yet.
- */
- jit_tls_offset = mono_get_jit_tls_key ();
-
- /* Only 64 tls entries can be accessed using inline code */
- if (jit_tls_offset >= 64)
- jit_tls_offset = -1;
-#else
-#ifdef MONO_XEN_OPT
+#if !defined(HOST_WIN32) && defined(MONO_XEN_OPT)
optimize_for_xen = access ("/proc/xen", F_OK) == 0;
#endif
-#endif
}
void
@@ -8012,8 +7937,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
{
}
-#ifdef MONO_ARCH_HAVE_IMT
-
#if defined(__default_codegen__)
#define CMP_SIZE (6 + 1)
#define CMP_REG_REG_SIZE (4 + 1)
@@ -8216,7 +8139,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
{
return (MonoMethod*)regs [MONO_ARCH_IMT_REG];
}
-#endif
MonoVTable*
mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -8640,3 +8562,19 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
}
#endif
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+ switch (opcode) {
+ case OP_ATOMIC_ADD_I4:
+ case OP_ATOMIC_ADD_I8:
+ case OP_ATOMIC_EXCHANGE_I4:
+ case OP_ATOMIC_EXCHANGE_I8:
+ case OP_ATOMIC_CAS_I4:
+ case OP_ATOMIC_CAS_I8:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
diff --git a/mono/mini/mini-amd64.h b/mono/mini/mini-amd64.h
index 89009f38803..b7c974e3acd 100644
--- a/mono/mini/mini-amd64.h
+++ b/mono/mini/mini-amd64.h
@@ -167,9 +167,6 @@ struct MonoLMF {
* If the third lowest bit is set, then this is a MonoLMFTramp structure.
*/
gpointer previous_lmf;
-#ifdef HOST_WIN32
- gpointer lmf_addr;
-#endif
#if defined(__default_codegen__) || defined(HOST_WIN32)
guint64 rip;
#elif defined(__native_client_codegen__)
@@ -206,6 +203,28 @@ typedef struct MonoCompileArch {
gpointer lmf_var;
} MonoCompileArch;
+
+
+#ifdef HOST_WIN32
+#define PARAM_REGS 4
+#else
+#define PARAM_REGS 6
+#endif
+
+/* Structure used by the sequence points in AOTed code */
+typedef struct {
+ gpointer ss_trigger_page;
+ gpointer bp_trigger_page;
+ gpointer bp_addrs [MONO_ZERO_LEN_ARRAY];
+} SeqPointInfo;
+
+typedef struct {
+ mgreg_t regs [PARAM_REGS];
+ mgreg_t res;
+ guint8 *ret;
+} DynCallArgs;
+
+
#define MONO_CONTEXT_SET_LLVM_EXC_REG(ctx, exc) do { (ctx)->rax = (gsize)exc; } while (0)
#define MONO_ARCH_INIT_TOP_LMF_ENTRY(lmf)
@@ -290,7 +309,7 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_NOMAP32BIT
-#elif defined (__FreeBSD__)
+#elif defined (__FreeBSD__) || defined(__FreeBSD_kernel__)
#define REG_RAX 7
#define REG_RCX 4
@@ -337,11 +356,7 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
#define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
#define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_HAVE_TLS_GET (mono_amd64_have_tls_get ())
#define MONO_ARCH_IMT_REG AMD64_R10
#define MONO_ARCH_IMT_SCRATCH_REG AMD64_R11
diff --git a/mono/mini/mini-arm.c b/mono/mini/mini-arm.c
index 71ed6a53d2e..b644d7dca7a 100644
--- a/mono/mini/mini-arm.c
+++ b/mono/mini/mini-arm.c
@@ -12,6 +12,7 @@
#include "mini.h"
#include <string.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-mmap.h>
@@ -87,9 +88,9 @@ void sys_icache_invalidate (void *start, size_t len);
#endif
/* This mutex protects architecture specific caches */
-#define mono_mini_arch_lock() EnterCriticalSection (&mini_arch_mutex)
-#define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
-static CRITICAL_SECTION mini_arch_mutex;
+#define mono_mini_arch_lock() mono_mutex_lock (&mini_arch_mutex)
+#define mono_mini_arch_unlock() mono_mutex_unlock (&mini_arch_mutex)
+static mono_mutex_t mini_arch_mutex;
static gboolean v5_supported = FALSE;
static gboolean v6_supported = FALSE;
@@ -152,13 +153,6 @@ static gpointer ss_trigger_page;
/* Enabled breakpoints read from this trigger page */
static gpointer bp_trigger_page;
-/* Structure used by the sequence points in AOTed code */
-typedef struct {
- gpointer ss_trigger_page;
- gpointer bp_trigger_page;
- guint8* bp_addrs [MONO_ZERO_LEN_ARRAY];
-} SeqPointInfo;
-
/*
* TODO:
* floating point support: on ARM it is a mess, there are at least 3
@@ -208,7 +202,9 @@ int mono_exc_esp_offset = 0;
} \
} while (0)
+#ifndef DISABLE_JIT
static void mono_arch_compute_omit_fp (MonoCompile *cfg);
+#endif
const char*
mono_arch_regname (int reg)
@@ -393,7 +389,8 @@ emit_move_return_value (MonoCompile *cfg, MonoInst *ins, guint8 *code)
case OP_FCALL_REG:
case OP_FCALL_MEMBASE:
if (IS_VFP) {
- if (((MonoCallInst*)ins)->signature->ret->type == MONO_TYPE_R4) {
+ MonoType *sig_ret = mini_type_get_underlying_type (NULL, ((MonoCallInst*)ins)->signature->ret);
+ if (sig_ret->type == MONO_TYPE_R4) {
if (IS_HARD_FLOAT) {
ARM_CVTS (code, ins->dreg, ARM_VFP_F0);
} else {
@@ -461,7 +458,7 @@ emit_save_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
(gpointer)"pthread_getspecific");
code = emit_call_seq (cfg, code);
/* lmf_addr = &jit_tls->lmf */
- lmf_offset = G_STRUCT_OFFSET (MonoJitTlsData, lmf);
+ lmf_offset = MONO_STRUCT_OFFSET (MonoJitTlsData, lmf);
g_assert (arm_is_imm8 (lmf_offset));
ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_R0, lmf_offset, 0);
@@ -484,18 +481,18 @@ emit_save_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
*/
code = emit_big_add (code, ARMREG_R1, ARMREG_SP, lmf_offset);
/* r0 is the result from mono_get_lmf_addr () */
- ARM_STR_IMM (code, ARMREG_R0, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+ ARM_STR_IMM (code, ARMREG_R0, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
/* new_lmf->previous_lmf = *lmf_addr */
- ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
- ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* *(lmf_addr) = r1 */
- ARM_STR_IMM (code, ARMREG_R1, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_STR_IMM (code, ARMREG_R1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* Skip method (only needed for trampoline LMF frames) */
- ARM_STR_IMM (code, ARMREG_SP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, sp));
- ARM_STR_IMM (code, ARMREG_FP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, fp));
+ ARM_STR_IMM (code, ARMREG_SP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, sp));
+ ARM_STR_IMM (code, ARMREG_FP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, fp));
/* save the current IP */
ARM_MOV_REG_REG (code, ARMREG_IP, ARMREG_PC);
- ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, G_STRUCT_OFFSET (MonoLMF, ip));
+ ARM_STR_IMM (code, ARMREG_IP, ARMREG_R1, MONO_STRUCT_OFFSET (MonoLMF, ip));
for (i = 0; i < sizeof (MonoLMF); i += sizeof (mgreg_t))
mini_gc_set_slot_type_from_fp (cfg, lmf_offset + i, SLOT_NOREF);
@@ -603,11 +600,11 @@ emit_restore_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset)
}
/* ip = previous_lmf */
- ARM_LDR_IMM (code, ARMREG_IP, basereg, offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_LDR_IMM (code, ARMREG_IP, basereg, offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* lr = lmf_addr */
- ARM_LDR_IMM (code, ARMREG_LR, basereg, offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+ ARM_LDR_IMM (code, ARMREG_LR, basereg, offset + MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
/* *(lmf_addr) = previous_lmf */
- ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
return code;
}
@@ -682,8 +679,8 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
start = code = mono_global_codeman_reserve (12);
/* Replace the this argument with the target */
- ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
- ARM_LDR_IMM (code, ARMREG_R0, ARMREG_R0, G_STRUCT_OFFSET (MonoDelegate, target));
+ ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ ARM_LDR_IMM (code, ARMREG_R0, ARMREG_R0, MONO_STRUCT_OFFSET (MonoDelegate, target));
ARM_MOV_REG_REG (code, ARMREG_PC, ARMREG_IP);
g_assert ((code - start) <= 12);
@@ -695,7 +692,7 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
size = 8 + param_count * 4;
start = code = mono_global_codeman_reserve (size);
- ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ ARM_LDR_IMM (code, ARMREG_IP, ARMREG_R0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
/* slide down the arguments */
for (i = 0; i < param_count; ++i) {
ARM_MOV_REG_REG (code, (ARMREG_R0 + i), (ARMREG_R0 + i + 1));
@@ -800,6 +797,12 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
}
gpointer
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
+{
+ return NULL;
+}
+
+gpointer
mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
{
return (gpointer)regs [ARMREG_R0];
@@ -811,17 +814,12 @@ mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
void
mono_arch_cpu_init (void)
{
-#ifdef TARGET_IOS
- i8_align = 4;
-#else
- i8_align = __alignof__ (gint64);
-#endif
-
+ i8_align = MONO_ABI_ALIGNOF (gint64);
#ifdef MONO_CROSS_COMPILE
/* Need to set the alignment of i8 since it can different on the target */
#ifdef TARGET_ANDROID
/* linux gnueabi */
- mono_type_set_alignment (MONO_TYPE_I8, 8);
+ mono_type_set_alignment (MONO_TYPE_I8, i8_align);
#endif
#endif
}
@@ -840,12 +838,12 @@ create_function_wrapper (gpointer function)
ARM_SUB_REG_IMM8 (code, ARMREG_SP, ARMREG_SP, sizeof (MonoContext));
/* save ip, lr and pc into their correspodings ctx.regs slots. */
- ARM_STR_IMM (code, ARMREG_IP, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs) + sizeof (mgreg_t) * ARMREG_IP);
- ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
- ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
+ ARM_STR_IMM (code, ARMREG_IP, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs) + sizeof (mgreg_t) * ARMREG_IP);
+ ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
+ ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
/* save r0..r10 and fp */
- ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, regs));
+ ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, regs));
ARM_STM (code, ARMREG_IP, 0x0fff);
/* now we can update fp. */
@@ -854,11 +852,11 @@ create_function_wrapper (gpointer function)
/* make ctx.esp hold the actual value of sp at the beginning of this method. */
ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_FP, sizeof (MonoContext));
ARM_STR_IMM (code, ARMREG_R0, ARMREG_IP, 4 * ARMREG_SP);
- ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_SP);
+ ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_SP);
/* make ctx.eip hold the address of the call. */
ARM_SUB_REG_IMM8 (code, ARMREG_LR, ARMREG_LR, 4);
- ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, G_STRUCT_OFFSET (MonoContext, pc));
+ ARM_STR_IMM (code, ARMREG_LR, ARMREG_SP, MONO_STRUCT_OFFSET (MonoContext, pc));
/* r0 now points to the MonoContext */
ARM_MOV_REG_REG (code, ARMREG_R0, ARMREG_FP);
@@ -879,12 +877,12 @@ create_function_wrapper (gpointer function)
ARM_BLX_REG (code, ARMREG_IP);
/* we're back; save ctx.eip and ctx.esp into the corresponding regs slots. */
- ARM_LDR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, pc));
- ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
- ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
+ ARM_LDR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, pc));
+ ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_LR);
+ ARM_STR_IMM (code, ARMREG_R0, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs) + 4 * ARMREG_PC);
/* make ip point to the regs array, then restore everything, including pc. */
- ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_FP, G_STRUCT_OFFSET (MonoContext, regs));
+ ARM_ADD_REG_IMM8 (code, ARMREG_IP, ARMREG_FP, MONO_STRUCT_OFFSET (MonoContext, regs));
ARM_LDM (code, ARMREG_IP, 0xffff);
mono_arch_flush_icache (start, code - start);
@@ -900,7 +898,7 @@ mono_arch_init (void)
{
const char *cpu_arch;
- InitializeCriticalSection (&mini_arch_mutex);
+ mono_mutex_init_recursive (&mini_arch_mutex);
#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
if (mini_get_debug_options ()->soft_breakpoints) {
single_step_func_wrapper = create_function_wrapper (debugger_agent_single_step_from_context);
@@ -1225,13 +1223,6 @@ typedef struct {
#define DEBUG(a)
-#ifndef __GNUC__
-/*#define __alignof__(a) sizeof(a)*/
-#define __alignof__(type) G_STRUCT_OFFSET(struct { char c; type x; }, x)
-#endif
-
-#define PARAM_REGS 4
-
static void inline
add_general (guint *gr, guint *stack_size, ArgInfo *ainfo, gboolean simple)
{
@@ -1980,7 +1971,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
offset += size;
}
- if (cfg->has_atomic_exchange_i4 || cfg->has_atomic_cas_i4 || cfg->has_atomic_add_new_i4) {
+ if (cfg->has_atomic_exchange_i4 || cfg->has_atomic_cas_i4 || cfg->has_atomic_add_i4) {
/* Allocate a temporary used by the atomic ops */
size = 4;
align = 4;
@@ -2445,7 +2436,7 @@ mono_arch_emit_call (MonoCompile *cfg, MonoCallInst *call)
*/
float_arg->flags |= MONO_INST_VOLATILE;
- MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, float_arg->dreg, in->dreg);
+ MONO_EMIT_NEW_UNALU (cfg, OP_FMOVE, float_arg->dreg, in->dreg);
/* We use the dreg to look up the instruction later. The hreg is used to
* emit the instruction that loads the value into the FP reg.
@@ -2606,19 +2597,13 @@ mono_arch_is_inst_imm (gint64 imm)
return TRUE;
}
-#define DYN_CALL_STACK_ARGS 6
-
typedef struct {
MonoMethodSignature *sig;
CallInfo *cinfo;
+ MonoType *rtype;
+ MonoType **param_types;
} ArchDynCallInfo;
-typedef struct {
- mgreg_t regs [PARAM_REGS + DYN_CALL_STACK_ARGS];
- mgreg_t res, res2;
- guint8 *ret;
-} DynCallArgs;
-
static gboolean
dyn_call_supported (CallInfo *cinfo, MonoMethodSignature *sig)
{
@@ -2675,6 +2660,8 @@ dyn_call_supported (CallInfo *cinfo, MonoMethodSignature *sig)
if (t->byref)
continue;
+ t = mini_replace_type (t);
+
switch (t->type) {
case MONO_TYPE_R4:
case MONO_TYPE_R8:
@@ -2700,6 +2687,7 @@ mono_arch_dyn_call_prepare (MonoMethodSignature *sig)
{
ArchDynCallInfo *info;
CallInfo *cinfo;
+ int i;
cinfo = get_call_info (NULL, NULL, sig);
@@ -2712,6 +2700,10 @@ mono_arch_dyn_call_prepare (MonoMethodSignature *sig)
// FIXME: Preprocess the info to speed up start_dyn_call ()
info->sig = sig;
info->cinfo = cinfo;
+ info->rtype = mini_replace_type (sig->ret);
+ info->param_types = g_new0 (MonoType*, sig->param_count);
+ for (i = 0; i < sig->param_count; ++i)
+ info->param_types [i] = mini_replace_type (sig->params [i]);
return (MonoDynCallInfo*)info;
}
@@ -2752,7 +2744,7 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
p->regs [greg ++] = (mgreg_t)ret;
for (i = pindex; i < sig->param_count; i++) {
- MonoType *t = mono_type_get_underlying_type (sig->params [i]);
+ MonoType *t = dinfo->param_types [i];
gpointer *arg = args [arg_index ++];
ArgInfo *ainfo = &dinfo->cinfo->args [i + sig->hasthis];
int slot = -1;
@@ -2840,13 +2832,11 @@ void
mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
{
ArchDynCallInfo *ainfo = (ArchDynCallInfo*)info;
- MonoMethodSignature *sig = ((ArchDynCallInfo*)info)->sig;
- MonoType *ptype;
+ MonoType *ptype = ainfo->rtype;
guint8 *ret = ((DynCallArgs*)buf)->ret;
mgreg_t res = ((DynCallArgs*)buf)->res;
mgreg_t res2 = ((DynCallArgs*)buf)->res2;
- ptype = mini_type_get_underlying_type (NULL, sig->ret);
switch (ptype->type) {
case MONO_TYPE_VOID:
*(gpointer*)ret = NULL;
@@ -4174,7 +4164,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
break;
case OP_ATOMIC_EXCHANGE_I4:
case OP_ATOMIC_CAS_I4:
- case OP_ATOMIC_ADD_NEW_I4: {
+ case OP_ATOMIC_ADD_I4: {
int tmpreg;
guint8 *buf [16];
@@ -4217,7 +4207,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
arm_patch (buf [2], buf [0]);
arm_patch (buf [1], code);
break;
- case OP_ATOMIC_ADD_NEW_I4:
+ case OP_ATOMIC_ADD_I4:
buf [0] = code;
ARM_DMB (code, ARM_DMB_SY);
ARM_LDREX_REG (code, ARMREG_LR, ins->sreg1);
@@ -4489,7 +4479,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ARM_LDR_IMM (code, dreg, info_var->inst_basereg, info_var->inst_offset);
/* Add the offset */
- val = ((offset / 4) * sizeof (guint8*)) + G_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
+ val = ((offset / 4) * sizeof (guint8*)) + MONO_STRUCT_OFFSET (SeqPointInfo, bp_addrs);
/* Load the info->bp_addrs [offset], which is either 0 or the address of a trigger page */
if (arm_is_imm12 ((int)val)) {
ARM_LDR_IMM (code, dreg, dreg, val);
@@ -5014,8 +5004,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
/* Save result */
ARM_LDR_IMM (code, ARMREG_IP, var->inst_basereg, var->inst_offset);
- ARM_STR_IMM (code, ARMREG_R0, ARMREG_IP, G_STRUCT_OFFSET (DynCallArgs, res));
- ARM_STR_IMM (code, ARMREG_R1, ARMREG_IP, G_STRUCT_OFFSET (DynCallArgs, res2));
+ ARM_STR_IMM (code, ARMREG_R0, ARMREG_IP, MONO_STRUCT_OFFSET (DynCallArgs, res));
+ ARM_STR_IMM (code, ARMREG_R1, ARMREG_IP, MONO_STRUCT_OFFSET (DynCallArgs, res2));
break;
}
case OP_THROW: {
@@ -5335,8 +5325,9 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
code = mono_arm_emit_vfp_scratch_restore (cfg, code, vfp_scratch1);
break;
- case OP_SETFRET:
- if (mono_method_signature (cfg->method)->ret->type == MONO_TYPE_R4) {
+ case OP_SETFRET: {
+ MonoType *sig_ret = mini_type_get_underlying_type (NULL, mono_method_signature (cfg->method)->ret);
+ if (sig_ret->type == MONO_TYPE_R4) {
ARM_CVTD (code, ARM_VFP_F0, ins->sreg1);
if (!IS_HARD_FLOAT) {
@@ -5350,6 +5341,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
}
}
break;
+ }
case OP_FCONV_TO_I1:
code = emit_float_to_int (cfg, code, ins->dreg, ins->sreg1, 1, TRUE);
break;
@@ -6139,7 +6131,7 @@ mono_arch_emit_prolog (MonoCompile *cfg)
ARM_LDR_IMM (code, dreg, info_var->inst_basereg, info_var->inst_offset);
/* Load the trigger page addr */
- ARM_LDR_IMM (code, dreg, dreg, G_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page));
+ ARM_LDR_IMM (code, dreg, dreg, MONO_STRUCT_OFFSET (SeqPointInfo, ss_trigger_page));
ARM_STR_IMM (code, dreg, ss_trigger_page_var->inst_basereg, ss_trigger_page_var->inst_offset);
}
}
@@ -6428,8 +6420,6 @@ mono_arch_flush_register_windows (void)
{
}
-#ifdef MONO_ARCH_HAVE_IMT
-
#ifndef DISABLE_JIT
void
@@ -6915,8 +6905,6 @@ mono_arch_build_imt_thunk (MonoVTable *vtable, MonoDomain *domain, MonoIMTCheckI
return start;
}
-#endif
-
mgreg_t
mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
{
@@ -6941,8 +6929,7 @@ mono_arch_get_trampolines (gboolean aot)
return mono_arm_get_exception_trampolines (aot);
}
-
-#ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED
+#if defined(MONO_ARCH_SOFT_DEBUG_SUPPORTED)
/*
* mono_arch_set_breakpoint:
*
@@ -7220,9 +7207,9 @@ gboolean
mono_arch_opcode_supported (int opcode)
{
switch (opcode) {
+ case OP_ATOMIC_ADD_I4:
case OP_ATOMIC_EXCHANGE_I4:
case OP_ATOMIC_CAS_I4:
- case OP_ATOMIC_ADD_NEW_I4:
return v7_supported;
default:
return FALSE;
diff --git a/mono/mini/mini-arm.h b/mono/mini/mini-arm.h
index 131d4330016..7c3fd9ad041 100644
--- a/mono/mini/mini-arm.h
+++ b/mono/mini/mini-arm.h
@@ -167,6 +167,23 @@ typedef struct {
int map [MONO_ZERO_LEN_ARRAY];
} GSharedVtCallInfo;
+/* Structure used by the sequence points in AOTed code */
+typedef struct {
+ gpointer ss_trigger_page;
+ gpointer bp_trigger_page;
+ guint8* bp_addrs [MONO_ZERO_LEN_ARRAY];
+} SeqPointInfo;
+
+
+#define PARAM_REGS 4
+#define DYN_CALL_STACK_ARGS 6
+
+typedef struct {
+ mgreg_t regs [PARAM_REGS + DYN_CALL_STACK_ARGS];
+ mgreg_t res, res2;
+ guint8 *ret;
+} DynCallArgs;
+
void arm_patch (guchar *code, const guchar *target);
guint8* mono_arm_emit_load_imm (guint8 *code, int dreg, guint32 val);
int mono_arm_is_rotated_imm8 (guint32 val, gint *rot_amount);
@@ -246,7 +263,6 @@ typedef struct MonoCompileArch {
#define ARM_NUM_REG_FPARGS 0
#define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
#define MONO_ARCH_AOT_SUPPORTED 1
@@ -257,7 +273,10 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_DYN_CALL_SUPPORTED 1
#define MONO_ARCH_DYN_CALL_PARAM_AREA 24
+#ifndef MONO_CROSS_COMPILE
#define MONO_ARCH_SOFT_DEBUG_SUPPORTED 1
+#endif
+
#define MONO_ARCH_HAVE_EXCEPTIONS_INIT 1
#define MONO_ARCH_HAVE_GET_TRAMPOLINES 1
#define MONO_ARCH_HAVE_CONTEXT_SET_INT_REG 1
@@ -274,10 +293,6 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_HAVE_OP_TAIL_CALL 1
#endif
#define MONO_ARCH_HAVE_DUMMY_INIT 1
-#define MONO_ARCH_HAVE_OPCODE_SUPPORTED 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
#if defined(__native_client__)
#undef MONO_ARCH_SOFT_DEBUG_SUPPORTED
diff --git a/mono/mini/mini-cross-helpers.c b/mono/mini/mini-cross-helpers.c
new file mode 100644
index 00000000000..dede99f3ee9
--- /dev/null
+++ b/mono/mini/mini-cross-helpers.c
@@ -0,0 +1,13 @@
+#include "config.h"
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/mini/mini-cross-helpers.c"
+#else
+
+void mono_cross_helpers_run (void);
+
+void
+mono_cross_helpers_run (void)
+{
+}
+#endif
diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c
index dcdc2ea68f5..5993ddddb63 100644
--- a/mono/mini/mini-exceptions.c
+++ b/mono/mini/mini-exceptions.c
@@ -2237,6 +2237,8 @@ print_stack_frame_to_string (StackFrameInfo *frame, MonoContext *ctx, gpointer d
return FALSE;
}
+#ifndef MONO_CROSS_COMPILE
+
static gboolean handling_sigsegv = FALSE;
/*
@@ -2264,7 +2266,7 @@ mono_handle_native_sigsegv (int signal, void *ctx)
;
#else
while (1) {
- sleep (0);
+ sleep (1);
}
#endif
}
@@ -2360,6 +2362,16 @@ mono_handle_native_sigsegv (int signal, void *ctx)
}
}
+#else
+
+void
+mono_handle_native_sigsegv (int signal, void *ctx)
+{
+ g_assert_not_reached ();
+}
+
+#endif /* !MONO_CROSS_COMPILE */
+
static void
mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx)
{
@@ -2747,5 +2759,16 @@ mono_jinfo_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len)
if (ji->from_aot)
return mono_aot_get_unwind_info (ji, unwind_info_len);
else
- return mono_get_cached_unwind_info (ji->used_regs, unwind_info_len);
+ return mono_get_cached_unwind_info (ji->unwind_info, unwind_info_len);
+}
+
+int
+mono_jinfo_get_epilog_size (MonoJitInfo *ji)
+{
+ MonoArchEHJitInfo *info;
+
+ info = mono_jit_info_get_arch_eh_info (ji);
+ g_assert (info);
+
+ return info->epilog_size;
}
diff --git a/mono/mini/mini-gc.c b/mono/mini/mini-gc.c
index 29c92711fda..a528b3fea6d 100644
--- a/mono/mini/mini-gc.c
+++ b/mono/mini/mini-gc.c
@@ -436,6 +436,8 @@ static int callee_saved_regs [] = { ARMREG_V1, ARMREG_V2, ARMREG_V3, ARMREG_V4,
static int callee_saved_regs [] = { };
#elif defined(TARGET_S390X)
static int callee_saved_regs [] = { s390_r6, s390_r7, s390_r8, s390_r9, s390_r10, s390_r11, s390_r12, s390_r13, s390_r14 };
+#elif defined(TARGET_POWERPC)
+static int callee_saved_regs [] = { ppc_r6, ppc_r7, ppc_r8, ppc_r9, ppc_r10, ppc_r11, ppc_r12, ppc_r13, ppc_r14 };
#endif
static guint32
@@ -1103,7 +1105,7 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
* pass.
*/
static void
-precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
+precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end, void *gc_data)
{
int findex, i;
FrameInfo *fi;
@@ -1141,7 +1143,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
MonoObject *obj = *ptr;
if (obj) {
DEBUG (fprintf (logfile, "\tref %s0x%x(fp)=%p: %p ->", (guint8*)ptr >= (guint8*)fi->fp ? "" : "-", ABS ((int)((gssize)ptr - (gssize)fi->fp)), ptr, obj));
- *ptr = mono_gc_scan_object (obj);
+ *ptr = mono_gc_scan_object (obj, gc_data);
DEBUG (fprintf (logfile, " %p.\n", *ptr));
} else {
DEBUG (fprintf (logfile, "\tref %s0x%x(fp)=%p: %p.\n", (guint8*)ptr >= (guint8*)fi->fp ? "" : "-", ABS ((int)((gssize)ptr - (gssize)fi->fp)), ptr, obj));
@@ -1182,7 +1184,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
if (obj) {
DEBUG (fprintf (logfile, "\treg %s saved at %p: %p ->", mono_arch_regname (fi->regs [i]), ptr, obj));
- *ptr = mono_gc_scan_object (obj);
+ *ptr = mono_gc_scan_object (obj, gc_data);
DEBUG (fprintf (logfile, " %p.\n", *ptr));
} else {
DEBUG (fprintf (logfile, "\treg %s saved at %p: %p\n", mono_arch_regname (fi->regs [i]), ptr, obj));
@@ -1210,7 +1212,7 @@ precise_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
* structure filled up by thread_suspend_func.
*/
static void
-thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise)
+thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gboolean precise, void *gc_data)
{
TlsData *tls = user_data;
@@ -1221,7 +1223,7 @@ thread_mark_func (gpointer user_data, guint8 *stack_start, guint8 *stack_end, gb
if (!precise)
conservative_pass (tls, stack_start, stack_end);
else
- precise_pass (tls, stack_start, stack_end);
+ precise_pass (tls, stack_start, stack_end, gc_data);
}
#ifndef DISABLE_JIT
diff --git a/mono/mini/mini-generic-sharing.c b/mono/mini/mini-generic-sharing.c
index ab9245f26a9..4c42fd9a750 100644
--- a/mono/mini/mini-generic-sharing.c
+++ b/mono/mini/mini-generic-sharing.c
@@ -1343,9 +1343,6 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
if (virtual) {
/* Same as in mono_emit_method_call_full () */
-#ifndef MONO_ARCH_HAVE_IMT
- NOT_IMPLEMENTED;
-#endif
if ((method->klass->parent == mono_defaults.multicastdelegate_class) && (!strcmp (method->name, "Invoke"))) {
/* See mono_emit_method_call_full () */
/* The gsharedvt trampoline will recognize this constant */
@@ -2689,7 +2686,9 @@ mini_method_get_rgctx (MonoMethod *m)
gboolean
mini_type_is_vtype (MonoCompile *cfg, MonoType *t)
{
- return MONO_TYPE_ISSTRUCT (t) || mini_is_gsharedvt_variable_type (cfg, t);
+ t = mini_native_type_replace_type (t);
+
+ return MONO_TYPE_ISSTRUCT (t) || mini_is_gsharedvt_variable_type (cfg, t);
}
gboolean
diff --git a/mono/mini/mini-ia64.c b/mono/mini/mini-ia64.c
index 17cc1f9f2f7..2daf4fca598 100644
--- a/mono/mini/mini-ia64.c
+++ b/mono/mini/mini-ia64.c
@@ -1487,10 +1487,10 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_LOADR8_MEMBASE:
case OP_ATOMIC_EXCHANGE_I4:
case OP_ATOMIC_EXCHANGE_I8:
- case OP_ATOMIC_ADD_NEW_I4:
- case OP_ATOMIC_ADD_NEW_I8:
- case OP_ATOMIC_ADD_IMM_NEW_I4:
- case OP_ATOMIC_ADD_IMM_NEW_I8:
+ case OP_ATOMIC_ADD_I4:
+ case OP_ATOMIC_ADD_I8:
+ case OP_ATOMIC_ADD_IMM_I4:
+ case OP_ATOMIC_ADD_IMM_I8:
/* There are no membase instructions on ia64 */
if (ins->inst_offset == 0) {
break;
@@ -2934,12 +2934,12 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_MEMORY_BARRIER:
ia64_mf (code);
break;
- case OP_ATOMIC_ADD_IMM_NEW_I4:
+ case OP_ATOMIC_ADD_IMM_I4:
g_assert (ins->inst_offset == 0);
ia64_fetchadd4_acq_hint (code, ins->dreg, ins->inst_basereg, ins->inst_imm, 0);
ia64_adds_imm (code, ins->dreg, ins->inst_imm, ins->dreg);
break;
- case OP_ATOMIC_ADD_IMM_NEW_I8:
+ case OP_ATOMIC_ADD_IMM_I8:
g_assert (ins->inst_offset == 0);
ia64_fetchadd8_acq_hint (code, ins->dreg, ins->inst_basereg, ins->inst_imm, 0);
ia64_adds_imm (code, ins->dreg, ins->inst_imm, ins->dreg);
@@ -2951,7 +2951,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_ATOMIC_EXCHANGE_I8:
ia64_xchg8_hint (code, ins->dreg, ins->inst_basereg, ins->sreg2, 0);
break;
- case OP_ATOMIC_ADD_NEW_I4: {
+ case OP_ATOMIC_ADD_I4: {
guint8 *label, *buf;
/* From libatomic_ops */
@@ -2971,7 +2971,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
ia64_add (code, ins->dreg, GP_SCRATCH_REG, ins->sreg2);
break;
}
- case OP_ATOMIC_ADD_NEW_I8: {
+ case OP_ATOMIC_ADD_I8: {
guint8 *label, *buf;
/* From libatomic_ops */
@@ -4526,8 +4526,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
{
}
-#ifdef MONO_ARCH_HAVE_IMT
-
/*
* LOCKING: called with the domain lock held
*/
@@ -4638,7 +4636,6 @@ mono_arch_emit_imt_argument (MonoCompile *cfg, MonoCallInst *call, MonoInst *imt
{
/* Done by the implementation of the CALL_MEMBASE opcodes */
}
-#endif
gpointer
mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
@@ -4652,6 +4649,12 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
return NULL;
}
+gpointer
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
+{
+ return NULL;
+}
+
MonoInst*
mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignature *fsig, MonoInst **args)
{
@@ -4669,9 +4672,9 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
guint32 opcode;
if (fsig->params [0]->type == MONO_TYPE_I4)
- opcode = OP_ATOMIC_ADD_IMM_NEW_I4;
+ opcode = OP_ATOMIC_ADD_IMM_I4;
else if (fsig->params [0]->type == MONO_TYPE_I8)
- opcode = OP_ATOMIC_ADD_IMM_NEW_I8;
+ opcode = OP_ATOMIC_ADD_IMM_I8;
else
g_assert_not_reached ();
MONO_INST_NEW (cfg, ins, opcode);
@@ -4684,9 +4687,9 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
guint32 opcode;
if (fsig->params [0]->type == MONO_TYPE_I4)
- opcode = OP_ATOMIC_ADD_IMM_NEW_I4;
+ opcode = OP_ATOMIC_ADD_IMM_I4;
else if (fsig->params [0]->type == MONO_TYPE_I8)
- opcode = OP_ATOMIC_ADD_IMM_NEW_I8;
+ opcode = OP_ATOMIC_ADD_IMM_I8;
else
g_assert_not_reached ();
MONO_INST_NEW (cfg, ins, opcode);
@@ -4708,9 +4711,9 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
if (is_imm) {
if (fsig->params [0]->type == MONO_TYPE_I4)
- opcode = OP_ATOMIC_ADD_IMM_NEW_I4;
+ opcode = OP_ATOMIC_ADD_IMM_I4;
else if (fsig->params [0]->type == MONO_TYPE_I8)
- opcode = OP_ATOMIC_ADD_IMM_NEW_I8;
+ opcode = OP_ATOMIC_ADD_IMM_I8;
else
g_assert_not_reached ();
@@ -4719,12 +4722,12 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
ins->inst_basereg = args [0]->dreg;
ins->inst_offset = 0;
ins->inst_imm = imm;
- ins->type = (opcode == OP_ATOMIC_ADD_IMM_NEW_I4) ? STACK_I4 : STACK_I8;
+ ins->type = (opcode == OP_ATOMIC_ADD_IMM_I4) ? STACK_I4 : STACK_I8;
} else {
if (fsig->params [0]->type == MONO_TYPE_I4)
- opcode = OP_ATOMIC_ADD_NEW_I4;
+ opcode = OP_ATOMIC_ADD_I4;
else if (fsig->params [0]->type == MONO_TYPE_I8)
- opcode = OP_ATOMIC_ADD_NEW_I8;
+ opcode = OP_ATOMIC_ADD_I8;
else
g_assert_not_reached ();
@@ -4733,7 +4736,7 @@ mono_arch_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMetho
ins->inst_basereg = args [0]->dreg;
ins->inst_offset = 0;
ins->sreg2 = args [1]->dreg;
- ins->type = (opcode == OP_ATOMIC_ADD_NEW_I4) ? STACK_I4 : STACK_I8;
+ ins->type = (opcode == OP_ATOMIC_ADD_I4) ? STACK_I4 : STACK_I8;
}
MONO_ADD_INS (cfg->cbb, ins);
}
@@ -4754,3 +4757,17 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
/* FIXME: implement */
g_assert_not_reached ();
}
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+ switch (opcode) {
+ case OP_ATOMIC_ADD_I4:
+ case OP_ATOMIC_ADD_I8:
+ case OP_ATOMIC_EXCHANGE_I4:
+ case OP_ATOMIC_EXCHANGE_I8:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
diff --git a/mono/mini/mini-ia64.h b/mono/mini/mini-ia64.h
index 4d4f1df4431..d419bc26c72 100644
--- a/mono/mini/mini-ia64.h
+++ b/mono/mini/mini-ia64.h
@@ -114,8 +114,6 @@ unw_dyn_region_info_t* mono_ia64_create_unwind_region (Ia64CodegenState *code);
#define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
#define MONO_ARCH_HAVE_SAVE_UNWIND_INFO 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK 1
#define MONO_ARCH_THIS_AS_FIRST_ARG 1
diff --git a/mono/mini/mini-llvm-cpp.cpp b/mono/mini/mini-llvm-cpp.cpp
index 032059d9314..7560fcf012b 100644
--- a/mono/mini/mini-llvm-cpp.cpp
+++ b/mono/mini/mini-llvm-cpp.cpp
@@ -600,6 +600,21 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
TargetOptions opts;
opts.JITExceptionHandling = 1;
+#if LLVM_API_VERSION >= 2
+ StringRef cpu_name = sys::getHostCPUName ();
+
+ // EngineBuilder no longer has a copy assignment operator (?)
+ std::unique_ptr<Module> Owner(unwrap(MP));
+ EngineBuilder b (std::move(Owner));
+ EngineBuilder &eb = b;
+#ifdef TARGET_AMD64
+ ExecutionEngine *EE = b.setJITMemoryManager (mono_mm).setTargetOptions (opts).setAllocateGVsWithCode (true).setMCPU (cpu_name).setCodeModel (CodeModel::Large).create ();
+#else
+ ExecutionEngine *EE = b.setJITMemoryManager (mono_mm).setTargetOptions (opts).setAllocateGVsWithCode (true).setMCPU (cpu_name).create ();
+#endif
+
+#else
+
EngineBuilder b (unwrap (MP));
EngineBuilder &eb = b;
eb = eb.setJITMemoryManager (mono_mm).setTargetOptions (opts).setAllocateGVsWithCode (true);
@@ -612,6 +627,8 @@ mono_llvm_create_ee (LLVMModuleProviderRef MP, AllocCodeMemoryCb *alloc_cb, Func
#endif
ExecutionEngine *EE = eb.create ();
+#endif
+
g_assert (EE);
mono_ee->EE = EE;
diff --git a/mono/mini/mini-llvm.c b/mono/mini/mini-llvm.c
index c6f04b8073a..df6de20bab4 100644
--- a/mono/mini/mini-llvm.c
+++ b/mono/mini/mini-llvm.c
@@ -3328,12 +3328,12 @@ process_bb (EmitContext *ctx, MonoBasicBlock *bb)
values [ins->dreg] = mono_llvm_build_atomic_rmw (builder, LLVM_ATOMICRMW_OP_XCHG, args [0], args [1]);
break;
}
- case OP_ATOMIC_ADD_NEW_I4:
- case OP_ATOMIC_ADD_NEW_I8: {
+ case OP_ATOMIC_ADD_I4:
+ case OP_ATOMIC_ADD_I8: {
LLVMValueRef args [2];
LLVMTypeRef t;
- if (ins->opcode == OP_ATOMIC_ADD_NEW_I4)
+ if (ins->opcode == OP_ATOMIC_ADD_I4)
t = LLVMInt32Type ();
else
t = LLVMInt64Type ();
diff --git a/mono/mini/mini-mips.c b/mono/mini/mini-mips.c
index 235fd33a449..2aa6bd1d268 100644
--- a/mono/mini/mini-mips.c
+++ b/mono/mini/mini-mips.c
@@ -15,6 +15,7 @@
#include <string.h>
#include <asm/cachectl.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-mmap.h>
@@ -56,9 +57,9 @@ enum {
};
/* This mutex protects architecture specific caches */
-#define mono_mini_arch_lock() EnterCriticalSection (&mini_arch_mutex)
-#define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
-static CRITICAL_SECTION mini_arch_mutex;
+#define mono_mini_arch_lock() mono_mutex_lock (&mini_arch_mutex)
+#define mono_mini_arch_unlock() mono_mutex_unlock (&mini_arch_mutex)
+static mono_mutex_t mini_arch_mutex;
int mono_exc_esp_offset = 0;
static int tls_mode = TLS_MODE_DETECT;
@@ -551,8 +552,8 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
start = code = mono_global_codeman_reserve (16);
/* Replace the this argument with the target */
- mips_lw (code, mips_temp, mips_a0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
- mips_lw (code, mips_a0, mips_a0, G_STRUCT_OFFSET (MonoDelegate, target));
+ mips_lw (code, mips_temp, mips_a0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ mips_lw (code, mips_a0, mips_a0, MONO_STRUCT_OFFSET (MonoDelegate, target));
mips_jr (code, mips_temp);
mips_nop (code);
@@ -565,7 +566,7 @@ get_delegate_invoke_impl (gboolean has_target, gboolean param_count, guint32 *co
size = 16 + param_count * 4;
start = code = mono_global_codeman_reserve (size);
- mips_lw (code, mips_temp, mips_a0, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ mips_lw (code, mips_temp, mips_a0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
/* slide down the arguments */
for (i = 0; i < param_count; ++i) {
mips_move (code, mips_a0 + i, mips_a0 + i + 1);
@@ -669,6 +670,12 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
}
gpointer
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
+{
+ return NULL;
+}
+
+gpointer
mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
{
g_assert(regs);
@@ -700,7 +707,7 @@ mono_arch_cpu_init (void)
void
mono_arch_init (void)
{
- InitializeCriticalSection (&mini_arch_mutex);
+ mono_mutex_init_recursive (&mini_arch_mutex);
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
bp_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
@@ -713,7 +720,7 @@ mono_arch_init (void)
void
mono_arch_cleanup (void)
{
- DeleteCriticalSection (&mini_arch_mutex);
+ mono_mutex_destroy (&mini_arch_mutex);
}
/*
@@ -5844,8 +5851,6 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
return ctx->sc_regs [reg];
}
-#ifdef MONO_ARCH_HAVE_IMT
-
#define ENABLE_WRONG_METHOD_CHECK 0
#define MIPS_LOAD_SEQUENCE_LENGTH 8
@@ -5999,7 +6004,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
{
return (MonoMethod*) regs [MONO_ARCH_IMT_REG];
}
-#endif
MonoVTable*
mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -6142,3 +6146,9 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
}
#endif /* MONO_ARCH_SOFT_DEBUG_SUPPORTED */
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+ return FALSE;
+}
diff --git a/mono/mini/mini-mips.h b/mono/mini/mini-mips.h
index 7476469c271..c94f7c898f3 100644
--- a/mono/mini/mini-mips.h
+++ b/mono/mini/mini-mips.h
@@ -257,7 +257,6 @@ typedef struct MonoCompileArch {
#define MIPS_LAST_FPARG_REG mips_f19
#endif
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_IMT_REG mips_t0
#define MONO_ARCH_VTABLE_REG mips_a0
diff --git a/mono/mini/mini-ops.h b/mono/mini/mini-ops.h
index b1a31ee16d7..e667a4c08f5 100644
--- a/mono/mini/mini-ops.h
+++ b/mono/mini/mini-ops.h
@@ -847,32 +847,36 @@ MINI_OP(OP_XMOVE, "xmove", XREG, XREG, NONE)
MINI_OP(OP_XZERO, "xzero", XREG, NONE, NONE)
MINI_OP(OP_XPHI, "xphi", XREG, NONE, NONE)
-/* Atomic specific
-
- Note, OP_ATOMIC_ADD_IMM_NEW_I4 and
- OP_ATOMIC_ADD_NEW_I4 returns the new
- value compared to OP_ATOMIC_ADD_I4 that
- returns the old value.
-
- OP_ATOMIC_ADD_NEW_I4 is used by
- Interlocked::Increment and Interlocked:Decrement
- and atomic_add_i4 by Interlocked::Add
+/*
+ * These are used for efficient implementation of the
+ * methods on the System.Threading.Interlocked class
+ * on architectures that support it. This is checked
+ * via mono_arch_opcode_supported ().
+ *
+ * Note that while the 32-bit variants are used on
+ * both 32-bit and 64-bit systems, the 64-bit variants
+ * are only used if the system is 64-bit. If that is
+ * not the case, the fallback code in the runtime is
+ * used instead. This is done because decomposing the
+ * 64-bit variants to instructions operating on 32-bit
+ * registers is very complicated on some architectures.
+ *
+ * The memory_barrier instruction translates to a full
+ * acquire/release barrier. Such a memory barrier is
+ * implied at the beginning and end of all other atomic
+ * operations, such that they ensure sequential
+ * consistency.
+ *
+ * All of these return the new value at the given
+ * memory location after performing the operation.
*/
MINI_OP(OP_ATOMIC_ADD_I4, "atomic_add_i4", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_NEW_I4, "atomic_add_new_i4", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_IMM_I4, "atomic_add_imm_i4", IREG, IREG, NONE)
-MINI_OP(OP_ATOMIC_ADD_IMM_NEW_I4, "atomic_add_imm_new_i4", IREG, IREG, NONE)
-MINI_OP(OP_ATOMIC_EXCHANGE_I4, "atomic_exchange_i4", IREG, IREG, IREG)
-
MINI_OP(OP_ATOMIC_ADD_I8, "atomic_add_i8", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_NEW_I8, "atomic_add_new_i8", IREG, IREG, IREG)
-MINI_OP(OP_ATOMIC_ADD_IMM_I8, "atomic_add_imm_i8", IREG, IREG, NONE)
-MINI_OP(OP_ATOMIC_ADD_IMM_NEW_I8, "atomic_add_imm_new_i8", IREG, IREG, NONE)
+MINI_OP(OP_ATOMIC_EXCHANGE_I4, "atomic_exchange_i4", IREG, IREG, IREG)
MINI_OP(OP_ATOMIC_EXCHANGE_I8, "atomic_exchange_i8", IREG, IREG, IREG)
-MINI_OP(OP_MEMORY_BARRIER, "memory_barrier", NONE, NONE, NONE)
-
MINI_OP3(OP_ATOMIC_CAS_I4, "atomic_cas_i4", IREG, IREG, IREG, IREG)
MINI_OP3(OP_ATOMIC_CAS_I8, "atomic_cas_i8", IREG, IREG, IREG, IREG)
+MINI_OP(OP_MEMORY_BARRIER, "memory_barrier", NONE, NONE, NONE)
/* Conditional move opcodes.
* Must be in the same order as the matching CEE_B... opcodes
@@ -1077,6 +1081,9 @@ MINI_OP(OP_S390_ISUB_OVF_UN, "s390_int_sub_ovf_un", IREG, IREG, IREG)
#endif
#if defined(__ia64__)
+MINI_OP(OP_ATOMIC_ADD_IMM_I4, "atomic_add_imm_i4", IREG, IREG, NONE)
+MINI_OP(OP_ATOMIC_ADD_IMM_I8, "atomic_add_imm_i8", IREG, IREG, NONE)
+
MINI_OP(OP_IA64_LOAD, "ia64_load", NONE, NONE, NONE)
MINI_OP(OP_IA64_LOADI1, "ia64_loadi1", NONE, NONE, NONE)
MINI_OP(OP_IA64_LOADU1, "ia64_loadu1", NONE, NONE, NONE)
diff --git a/mono/mini/mini-ppc.c b/mono/mini/mini-ppc.c
index d2a7aec7cd7..a7c83988da6 100644
--- a/mono/mini/mini-ppc.c
+++ b/mono/mini/mini-ppc.c
@@ -12,6 +12,7 @@
#include "mini.h"
#include <string.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/utils/mono-proclib.h>
@@ -61,9 +62,9 @@ enum {
#define BREAKPOINT_SIZE (PPC_LOAD_SEQUENCE_LENGTH + 4)
/* This mutex protects architecture specific caches */
-#define mono_mini_arch_lock() EnterCriticalSection (&mini_arch_mutex)
-#define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
-static CRITICAL_SECTION mini_arch_mutex;
+#define mono_mini_arch_lock() mono_mutex_lock (&mini_arch_mutex)
+#define mono_mini_arch_unlock() mono_mutex_unlock (&mini_arch_mutex)
+static mono_mutex_t mini_arch_mutex;
int mono_exc_esp_offset = 0;
static int tls_mode = TLS_MODE_DETECT;
@@ -391,14 +392,14 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
code = mono_ppc_create_pre_code_ftnptr (code);
/* Replace the this argument with the target */
- ppc_ldptr (code, ppc_r0, G_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
+ ppc_ldptr (code, ppc_r0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
#ifdef PPC_USES_FUNCTION_DESCRIPTOR
/* it's a function descriptor */
/* Can't use ldptr as it doesn't work with r0 */
ppc_ldptr_indexed (code, ppc_r0, 0, ppc_r0);
#endif
ppc_mtctr (code, ppc_r0);
- ppc_ldptr (code, ppc_r3, G_STRUCT_OFFSET (MonoDelegate, target), ppc_r3);
+ ppc_ldptr (code, ppc_r3, MONO_STRUCT_OFFSET (MonoDelegate, target), ppc_r3);
ppc_bcctr (code, PPC_BR_ALWAYS, 0);
g_assert ((code - start) <= size);
@@ -412,7 +413,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
if (!aot)
code = mono_ppc_create_pre_code_ftnptr (code);
- ppc_ldptr (code, ppc_r0, G_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
+ ppc_ldptr (code, ppc_r0, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr), ppc_r3);
#ifdef PPC_USES_FUNCTION_DESCRIPTOR
/* it's a function descriptor */
ppc_ldptr_indexed (code, ppc_r0, 0, ppc_r0);
@@ -511,6 +512,12 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
}
gpointer
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
+{
+ return NULL;
+}
+
+gpointer
mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
{
mgreg_t *r = (mgreg_t*)regs;
@@ -613,7 +620,7 @@ mono_arch_init (void)
if (mono_cpu_count () > 1)
cpu_hw_caps |= PPC_SMP_CAPABLE;
- InitializeCriticalSection (&mini_arch_mutex);
+ mono_mutex_init_recursive (&mini_arch_mutex);
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
bp_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
@@ -628,7 +635,7 @@ mono_arch_init (void)
void
mono_arch_cleanup (void)
{
- DeleteCriticalSection (&mini_arch_mutex);
+ mono_mutex_destroy (&mini_arch_mutex);
}
/*
@@ -2429,6 +2436,7 @@ loop_start:
case OP_IDIV_IMM:
case OP_IREM_IMM:
case OP_IREM_UN_IMM:
+ CASE_PPC64 (OP_LREM_IMM) {
NEW_INS (cfg, temp, OP_ICONST);
temp->inst_c0 = ins->inst_imm;
temp->dreg = mono_alloc_ireg (cfg);
@@ -2441,9 +2449,12 @@ loop_start:
ins->opcode = OP_IDIV_UN;
else if (ins->opcode == OP_IREM_UN_IMM)
ins->opcode = OP_IREM_UN;
+ else if (ins->opcode == OP_LREM_IMM)
+ ins->opcode = OP_LREM;
last_ins = temp;
/* handle rem separately */
goto loop_start;
+ }
case OP_IREM:
case OP_IREM_UN:
CASE_PPC64 (OP_LREM)
@@ -4384,23 +4395,35 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
else
ppc_mr (code, ins->dreg, ins->sreg1);
break;
- case OP_ATOMIC_ADD_NEW_I4:
- case OP_ATOMIC_ADD_NEW_I8: {
- guint8 *loop = code, *branch;
+ case OP_ATOMIC_ADD_I4:
+ CASE_PPC64 (OP_ATOMIC_ADD_I8) {
+ int location = ins->inst_basereg;
+ int addend = ins->sreg2;
+ guint8 *loop, *branch;
g_assert (ins->inst_offset == 0);
+
+ loop = code;
ppc_sync (code);
- if (ins->opcode == OP_ATOMIC_ADD_NEW_I4)
- ppc_lwarx (code, ppc_r0, 0, ins->inst_basereg);
+ if (ins->opcode == OP_ATOMIC_ADD_I4)
+ ppc_lwarx (code, ppc_r0, 0, location);
+#ifdef __mono_ppc64__
else
- ppc_ldarx (code, ppc_r0, 0, ins->inst_basereg);
- ppc_add (code, ppc_r0, ppc_r0, ins->sreg2);
- if (ins->opcode == OP_ATOMIC_ADD_NEW_I4)
- ppc_stwcxd (code, ppc_r0, 0, ins->inst_basereg);
+ ppc_ldarx (code, ppc_r0, 0, location);
+#endif
+
+ ppc_add (code, ppc_r0, ppc_r0, addend);
+
+ if (ins->opcode == OP_ATOMIC_ADD_I4)
+ ppc_stwcxd (code, ppc_r0, 0, location);
+#ifdef __mono_ppc64__
else
- ppc_stdcxd (code, ppc_r0, 0, ins->inst_basereg);
+ ppc_stdcxd (code, ppc_r0, 0, location);
+#endif
+
branch = code;
ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
ppc_patch (branch, loop);
+
ppc_sync (code);
ppc_mr (code, ins->dreg, ppc_r0);
break;
@@ -4435,10 +4458,11 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
else
ppc_ldarx (code, ppc_r0, 0, location);
#endif
- ppc_cmp (code, 0, ins->opcode == OP_ATOMIC_CAS_I4 ? 0 : 1, ppc_r0, comparand);
+ ppc_cmp (code, 0, ins->opcode == OP_ATOMIC_CAS_I4 ? 0 : 1, ppc_r0, comparand);
not_equal = code;
ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
+
if (ins->opcode == OP_ATOMIC_CAS_I4)
ppc_stwcxd (code, value, 0, location);
#ifdef __mono_ppc64__
@@ -4449,8 +4473,8 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
lost_reservation = code;
ppc_bc (code, PPC_BR_FALSE, PPC_BR_EQ, 0);
ppc_patch (lost_reservation, start);
-
ppc_patch (not_equal, code);
+
ppc_sync (code);
ppc_mr (code, ins->dreg, ppc_r0);
break;
@@ -5541,8 +5565,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
{
}
-#ifdef MONO_ARCH_HAVE_IMT
-
#define CMP_SIZE (PPC_LOAD_SEQUENCE_LENGTH + 4)
#define BR_SIZE 4
#define LOADSTORE_SIZE 4
@@ -5698,7 +5720,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
return (MonoMethod*)(gsize) r [MONO_ARCH_IMT_REG];
}
-#endif
MonoVTable*
mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -5945,3 +5966,19 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
}
#endif
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+ switch (opcode) {
+ case OP_ATOMIC_ADD_I4:
+ case OP_ATOMIC_CAS_I4:
+#ifdef TARGET_POWERPC64
+ case OP_ATOMIC_ADD_I8:
+ case OP_ATOMIC_CAS_I8:
+#endif
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
diff --git a/mono/mini/mini-ppc.h b/mono/mini/mini-ppc.h
index 13b6adb5376..c3025a712e0 100644
--- a/mono/mini/mini-ppc.h
+++ b/mono/mini/mini-ppc.h
@@ -68,7 +68,6 @@ typedef struct MonoCompileArch {
#ifdef __mono_ppc64__
#define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS
#define MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
#define PPC_USES_FUNCTION_DESCRIPTOR
#ifndef __mono_ilp32__
@@ -95,7 +94,7 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
#define MONO_ARCH_EMULATE_FREM 1
#define MONO_ARCH_BIGMUL_INTRINS 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
+#define MONO_ARCH_GC_MAPS_SUPPORTED 1
/* Parameters used by the register allocator */
#define MONO_ARCH_CALLEE_REGS ((0xff << ppc_r3) | (1 << ppc_r11) | (1 << ppc_r12))
@@ -171,7 +170,6 @@ typedef struct MonoCompileArch {
#endif /* HAVE_WORKING_SIGALTSTACK */
#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_IMT_REG ppc_r12
#define MONO_ARCH_VTABLE_REG ppc_r12
diff --git a/mono/mini/mini-s390x.c b/mono/mini/mini-s390x.c
index fbc6278a342..435ef2904a4 100644
--- a/mono/mini/mini-s390x.c
+++ b/mono/mini/mini-s390x.c
@@ -246,8 +246,8 @@ if (ins->inst_target_bb->native_offset) { \
#define JUMP_SIZE 6
#define ENABLE_WRONG_METHOD_CHECK 0
-#define mono_mini_arch_lock() EnterCriticalSection (&mini_arch_mutex)
-#define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
+#define mono_mini_arch_lock() mono_mutex_lock (&mini_arch_mutex)
+#define mono_mini_arch_unlock() mono_mutex_unlock (&mini_arch_mutex)
/*========================= End of Defines =========================*/
@@ -260,6 +260,7 @@ if (ins->inst_target_bb->native_offset) { \
#include <sys/types.h>
#include <unistd.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/profiler-private.h>
@@ -409,7 +410,7 @@ static gpointer bp_trigger_page;
breakpoint_t breakpointCode;
-static CRITICAL_SECTION mini_arch_mutex;
+static mono_mutex_t mini_arch_mutex;
/*====================== End of Global Variables ===================*/
@@ -1259,7 +1260,7 @@ mono_arch_init (void)
{
guint8 *code;
- InitializeCriticalSection (&mini_arch_mutex);
+ mono_mutex_init_recursive (&mini_arch_mutex);
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ);
bp_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ);
@@ -1290,7 +1291,7 @@ mono_arch_cleanup (void)
mono_vfree (ss_trigger_page, mono_pagesize ());
if (bp_trigger_page)
mono_vfree (bp_trigger_page, mono_pagesize ());
- DeleteCriticalSection (&mini_arch_mutex);
+ mono_mutex_destroy (&mini_arch_mutex);
}
/*========================= End of Function ========================*/
@@ -4529,15 +4530,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
s390_lgr (code, ins->dreg, s390_r1);
}
break;
- case OP_ATOMIC_ADD_NEW_I8: {
- s390_lgr (code, s390_r1, ins->sreg2);
- s390_lg (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
- s390_agr (code, s390_r1, s390_r0);
- s390_csg (code, s390_r0, s390_r1, ins->inst_basereg, ins->inst_offset);
- s390_jnz (code, -10);
- s390_lgr (code, ins->dreg, s390_r1);
- }
- break;
case OP_ATOMIC_EXCHANGE_I8: {
s390_lg (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
s390_csg (code, s390_r0, ins->sreg2, ins->inst_basereg, ins->inst_offset);
@@ -4554,15 +4546,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
s390_lgfr(code, ins->dreg, s390_r1);
}
break;
- case OP_ATOMIC_ADD_NEW_I4: {
- s390_lgfr(code, s390_r1, ins->sreg2);
- s390_lgf (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
- s390_agr (code, s390_r1, s390_r0);
- s390_cs (code, s390_r0, s390_r1, ins->inst_basereg, ins->inst_offset);
- s390_jnz (code, -9);
- s390_lgfr(code, ins->dreg, s390_r1);
- }
- break;
case OP_ATOMIC_EXCHANGE_I4: {
s390_l (code, s390_r0, 0, ins->inst_basereg, ins->inst_offset);
s390_cs (code, s390_r0, ins->sreg2, ins->inst_basereg, ins->inst_offset);
@@ -5616,8 +5599,8 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
start = code = mono_global_codeman_reserve (size);
/* Replace the this argument with the target */
- s390_lg (code, s390_r1, 0, s390_r2, G_STRUCT_OFFSET(MonoDelegate, method_ptr));
- s390_lg (code, s390_r2, 0, s390_r2, G_STRUCT_OFFSET(MonoDelegate, target));
+ s390_lg (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ s390_lg (code, s390_r2, 0, s390_r2, MONO_STRUCT_OFFSET (MonoDelegate, target));
s390_br (code, s390_r1);
g_assert ((code - start) <= size);
@@ -5628,7 +5611,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
size = 32 + param_count * 8;
start = code = mono_global_codeman_reserve (size);
- s390_lg (code, s390_r1, 0, s390_r2, G_STRUCT_OFFSET(MonoDelegate, method_ptr));
+ s390_lg (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
/* slide down the arguments */
for (i = 0; i < param_count; ++i) {
s390_lgr (code, (s390_r2 + i), (s390_r2 + i + 1));
@@ -5745,6 +5728,22 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
/*------------------------------------------------------------------*/
/* */
+/* Name - mono_arch_get_delegate_virtual_invoke_impl. */
+/* */
+/* Function - */
+/* */
+/*------------------------------------------------------------------*/
+
+gpointer
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
+{
+ return NULL;
+}
+
+/*========================= End of Function ========================*/
+
+/*------------------------------------------------------------------*/
+/* */
/* Name - mono_arch_build_imt_thunk. */
/* */
/* Function - */
@@ -6138,3 +6137,17 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
/*========================= End of Function ========================*/
#endif
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+ switch (opcode) {
+ case OP_ATOMIC_ADD_I4:
+ case OP_ATOMIC_ADD_I8:
+ case OP_ATOMIC_EXCHANGE_I4:
+ case OP_ATOMIC_EXCHANGE_I8:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
diff --git a/mono/mini/mini-s390x.h b/mono/mini/mini-s390x.h
index 8ca5fb27ad2..50b74c51fd9 100644
--- a/mono/mini/mini-s390x.h
+++ b/mono/mini/mini-s390x.h
@@ -45,12 +45,9 @@ typedef struct
#define MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS 1
#define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1
#define MONO_ARCH_NEED_DIV_CHECK 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
#define MONO_ARCH_SIGNAL_STACK_SIZE 256*1024
#define MONO_ARCH_HAVE_DECOMPOSE_OPTS 1
#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_HAVE_TLS_GET 1
#define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
#define MONO_ARCH_IMT_REG s390_r9
diff --git a/mono/mini/mini-sparc.c b/mono/mini/mini-sparc.c
index ec65fb5c6b9..3b95fd97033 100644
--- a/mono/mini/mini-sparc.c
+++ b/mono/mini/mini-sparc.c
@@ -4430,3 +4430,9 @@ mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
/* FIXME: implement */
g_assert_not_reached ();
}
+
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+ return FALSE;
+}
diff --git a/mono/mini/mini-sparc.h b/mono/mini/mini-sparc.h
index f2b3b41d796..4b947784558 100644
--- a/mono/mini/mini-sparc.h
+++ b/mono/mini/mini-sparc.h
@@ -102,7 +102,6 @@ typedef struct MonoCompileArch {
#define MONO_ARCH_EMULATE_LCONV_TO_R8_UN 1
#define MONO_ARCH_EMULATE_FREM 1
#define MONO_ARCH_NEED_DIV_CHECK 1
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_IMT_REG sparc_g1
#define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS 1
#define MONO_ARCH_HAVE_TLS_INIT 1
diff --git a/mono/mini/mini-trampolines.c b/mono/mini/mini-trampolines.c
index 6e56ed5d2a0..f65dab8c1e7 100644
--- a/mono/mini/mini-trampolines.c
+++ b/mono/mini/mini-trampolines.c
@@ -22,14 +22,14 @@
*/
guint8* mono_trampoline_code [MONO_TRAMPOLINE_NUM];
-static GHashTable *class_init_hash_addr = NULL;
-static GHashTable *rgctx_lazy_fetch_trampoline_hash = NULL;
-static GHashTable *rgctx_lazy_fetch_trampoline_hash_addr = NULL;
+static GHashTable *class_init_hash_addr;
+static GHashTable *rgctx_lazy_fetch_trampoline_hash;
+static GHashTable *rgctx_lazy_fetch_trampoline_hash_addr;
static guint32 trampoline_calls, jit_trampolines, unbox_trampolines, static_rgctx_trampolines;
-#define mono_trampolines_lock() EnterCriticalSection (&trampolines_mutex)
-#define mono_trampolines_unlock() LeaveCriticalSection (&trampolines_mutex)
-static CRITICAL_SECTION trampolines_mutex;
+#define mono_trampolines_lock() mono_mutex_lock (&trampolines_mutex)
+#define mono_trampolines_unlock() mono_mutex_unlock (&trampolines_mutex)
+static mono_mutex_t trampolines_mutex;
#ifdef MONO_ARCH_GSHARED_SUPPORTED
@@ -138,8 +138,6 @@ mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
}
#endif
-#ifdef MONO_ARCH_HAVE_IMT
-
/*
* Either IMPL_METHOD or AOT_ADDR will be set on return.
*/
@@ -243,7 +241,6 @@ __attribute__ ((noinline))
}
}
}
-#endif
/*
* This is a super-ugly hack to fix bug #616463.
@@ -406,7 +403,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
orig_vtable_slot = vtable_slot;
vtable_slot_to_patch = vtable_slot;
-#ifdef MONO_ARCH_HAVE_IMT
/* IMT call */
if (vt && (gpointer)vtable_slot < (gpointer)vt) {
MonoMethod *impl_method = NULL;
@@ -464,7 +460,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
m = impl_method;
}
}
-#endif
/*
* The virtual check is needed because is_generic_method_definition (m) could
@@ -484,9 +479,7 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
else
g_assert (!m->klass->generic_container);
-#ifdef MONO_ARCH_HAVE_IMT
generic_virtual = mono_arch_find_imt_method (regs, code);
-#endif
if (generic_virtual) {
g_assert (generic_virtual->is_inflated);
context.method_inst = ((MonoMethodInflated*)generic_virtual)->context.method_inst;
@@ -524,7 +517,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
g_assert_not_reached ();
#endif
} else {
-#ifdef MONO_ARCH_HAVE_IMT
MonoObject *this_argument = mono_arch_get_this_arg_from_call (regs, code);
vt = this_argument->vtable;
@@ -537,9 +529,6 @@ common_call_trampoline (mgreg_t *regs, guint8 *code, MonoMethod *m, guint8* tram
mono_class_setup_supertypes (this_argument->vtable->klass);
klass = this_argument->vtable->klass->supertypes [m->klass->idepth - 1];
}
-#else
- NOT_IMPLEMENTED;
-#endif
}
g_assert (vtable_slot || klass);
@@ -816,11 +805,9 @@ mono_generic_virtual_remoting_trampoline (mgreg_t *regs, guint8 *code, MonoMetho
else
g_assert (!m->klass->generic_container);
-#ifdef MONO_ARCH_HAVE_IMT
imt_method = mono_arch_find_imt_method (regs, code);
if (imt_method->is_inflated)
context.method_inst = ((MonoMethodInflated*)imt_method)->context.method_inst;
-#endif
m = mono_class_inflate_generic_method (declaring, &context);
m = mono_marshal_get_remoting_invoke_with_check (m);
@@ -981,24 +968,14 @@ mono_monitor_exit_trampoline (mgreg_t *regs, guint8 *code, MonoObject *obj, guin
#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
-typedef struct {
- MonoMethod *invoke;
- gpointer impl_this;
- gpointer impl_nothis;
- MonoMethod *method;
- MonoMethodSignature *invoke_sig;
- MonoMethodSignature *sig;
- gboolean need_rgctx_tramp;
-} DelegateTrampInfo;
-
/*
* Precompute data to speed up mono_delegate_trampoline ().
* METHOD might be NULL.
*/
-static gpointer
+static MonoDelegateTrampInfo*
create_delegate_trampoline_data (MonoDomain *domain, MonoClass *klass, MonoMethod *method)
{
- DelegateTrampInfo *tramp_data;
+ MonoDelegateTrampInfo *tramp_data;
MonoMethod *invoke;
MonoError err;
@@ -1006,7 +983,7 @@ create_delegate_trampoline_data (MonoDomain *domain, MonoClass *klass, MonoMetho
invoke = mono_get_delegate_invoke (klass);
g_assert (invoke);
- tramp_data = mono_domain_alloc (domain, sizeof (DelegateTrampInfo));
+ tramp_data = mono_domain_alloc0 (domain, sizeof (MonoDelegateTrampInfo));
tramp_data->invoke = invoke;
tramp_data->invoke_sig = mono_method_signature (invoke);
tramp_data->impl_this = mono_arch_get_delegate_invoke_impl (mono_method_signature (invoke), TRUE);
@@ -1039,7 +1016,7 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
gboolean need_rgctx_tramp = FALSE;
gboolean need_unbox_tramp = FALSE;
gboolean enable_caching = TRUE;
- DelegateTrampInfo *tramp_info = (DelegateTrampInfo*)arg;
+ MonoDelegateTrampInfo *tramp_info = (MonoDelegateTrampInfo*)arg;
MonoMethod *invoke = tramp_info->invoke;
guint8 *impl_this = tramp_info->impl_this;
guint8 *impl_nothis = tramp_info->impl_nothis;
@@ -1161,6 +1138,9 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
delegate->method_ptr = mono_create_static_rgctx_trampoline (method, delegate->method_ptr);
}
+ /* Necessary for !code condition to fallback to slow path */
+ code = NULL;
+
multicast = ((MonoMulticastDelegate*)delegate)->prev != NULL;
if (!multicast && !callvirt) {
if (method && (method->flags & METHOD_ATTRIBUTE_STATIC) && mono_method_signature (method)->param_count == mono_method_signature (invoke)->param_count + 1)
@@ -1168,18 +1148,20 @@ mono_delegate_trampoline (mgreg_t *regs, guint8 *code, gpointer *arg, guint8* tr
code = impl_this;
else
code = delegate->target ? impl_this : impl_nothis;
+ }
- if (code) {
- delegate->invoke_impl = mono_get_addr_from_ftnptr (code);
- return code;
- }
+ if (!code) {
+ /* The general, unoptimized case */
+ m = mono_marshal_get_delegate_invoke (invoke, delegate);
+ code = mono_compile_method (m);
+ code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
}
- /* The general, unoptimized case */
- m = mono_marshal_get_delegate_invoke (invoke, delegate);
- code = mono_compile_method (m);
- code = mini_add_method_trampoline (NULL, m, code, mono_method_needs_static_rgctx_invoke (m, FALSE), FALSE);
delegate->invoke_impl = mono_get_addr_from_ftnptr (code);
+ if (enable_caching && !callvirt && tramp_info->method) {
+ tramp_info->method_ptr = delegate->method_ptr;
+ tramp_info->invoke_impl = delegate->invoke_impl;
+ }
return code;
}
@@ -1308,7 +1290,7 @@ create_trampoline_code (MonoTrampolineType tramp_type)
void
mono_trampolines_init (void)
{
- InitializeCriticalSection (&trampolines_mutex);
+ mono_mutex_init_recursive (&trampolines_mutex);
if (mono_aot_only)
return;
@@ -1353,7 +1335,7 @@ mono_trampolines_cleanup (void)
if (rgctx_lazy_fetch_trampoline_hash_addr)
g_hash_table_destroy (rgctx_lazy_fetch_trampoline_hash_addr);
- DeleteCriticalSection (&trampolines_mutex);
+ mono_mutex_destroy (&trampolines_mutex);
}
guint8 *
@@ -1540,30 +1522,29 @@ mono_create_jit_trampoline_from_token (MonoImage *image, guint32 token)
/*
- * mono_create_delegate_trampoline_with_method:
+ * mono_create_delegate_trampoline_info:
*
* Create a delegate trampoline for the KLASS+METHOD pair.
*/
-gpointer
-mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klass, MonoMethod *method)
+MonoDelegateTrampInfo*
+mono_create_delegate_trampoline_info (MonoDomain *domain, MonoClass *klass, MonoMethod *method)
{
#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
- gpointer ptr;
- guint32 code_size = 0;
- gpointer tramp_info;
+ MonoDelegateTrampInfo *tramp_info;
MonoClassMethodPair pair, *dpair;
+ guint32 code_size = 0;
pair.klass = klass;
pair.method = method;
mono_domain_lock (domain);
- ptr = g_hash_table_lookup (domain_jit_info (domain)->delegate_trampoline_hash, &pair);
+ tramp_info = g_hash_table_lookup (domain_jit_info (domain)->delegate_trampoline_hash, &pair);
mono_domain_unlock (domain);
- if (ptr)
- return ptr;
+ if (tramp_info)
+ return tramp_info;
tramp_info = create_delegate_trampoline_data (domain, klass, method);
- ptr = mono_create_specific_trampoline (tramp_info, MONO_TRAMPOLINE_DELEGATE, domain, &code_size);
+ tramp_info->invoke_impl = mono_create_specific_trampoline (tramp_info, MONO_TRAMPOLINE_DELEGATE, domain, &code_size);
g_assert (code_size);
dpair = mono_domain_alloc0 (domain, sizeof (MonoClassMethodPair));
@@ -1571,10 +1552,10 @@ mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klas
/* store trampoline address */
mono_domain_lock (domain);
- g_hash_table_insert (domain_jit_info (domain)->delegate_trampoline_hash, dpair, ptr);
+ g_hash_table_insert (domain_jit_info (domain)->delegate_trampoline_hash, dpair, tramp_info);
mono_domain_unlock (domain);
- return ptr;
+ return tramp_info;
#else
return NULL;
#endif
@@ -1583,7 +1564,24 @@ mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klas
gpointer
mono_create_delegate_trampoline (MonoDomain *domain, MonoClass *klass)
{
- return mono_create_delegate_trampoline_with_method (domain, klass, NULL);
+#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
+ return mono_create_delegate_trampoline_info (domain, klass, NULL)->invoke_impl;
+#else
+ return NULL;
+#endif
+}
+
+gpointer
+mono_create_delegate_virtual_trampoline (MonoDomain *domain, MonoClass *klass, MonoMethod *method)
+{
+#ifdef MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE
+ MonoMethod *invoke = mono_get_delegate_invoke (klass);
+ g_assert (invoke);
+
+ return mono_get_delegate_virtual_invoke_impl (mono_method_signature (invoke), method);
+#else
+ return NULL;
+#endif
}
gpointer
diff --git a/mono/mini/mini-unwind.h b/mono/mini/mini-unwind.h
index 6b6ba7ad2f9..a2c9f49805d 100644
--- a/mono/mini/mini-unwind.h
+++ b/mono/mini/mini-unwind.h
@@ -60,6 +60,13 @@
#define DW_CFA_lo_user 0x1c
#define DW_CFA_hi_user 0x3f
+/*
+ * Mono extension, advance loc to a location stored outside the unwind info.
+ * This is required to make the unwind descriptors sharable, since otherwise each one would contain
+ * an advance_loc with a different offset just before the unwind ops for the epilog.
+ */
+#define DW_CFA_mono_advance_loc DW_CFA_lo_user
+
/* Represents one unwind instruction */
typedef struct {
guint8 op; /* One of DW_CFA_... */
@@ -84,6 +91,16 @@ typedef struct {
#define mono_emit_unwind_op_same_value(cfg,ip,reg) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_same_value, (reg), 0)
/* Reg is saved at cfa+offset */
#define mono_emit_unwind_op_offset(cfg,ip,reg,offset) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_offset, (reg), (offset))
+/* Save the unwind state into an implicit stack */
+#define mono_emit_unwind_op_remember_state(cfg,ip) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_remember_state, 0, 0)
+/* Restore the unwind state from the state stack */
+#define mono_emit_unwind_op_restore_state(cfg,ip) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_restore_state, 0, 0)
+/*
+ * Mark the current location as a location stored outside the unwind info, which will be passed
+ * explicitly to mono_unwind_frame () in the MARK_LOCATIONS argument. This allows the unwind info
+ * to be shared among multiple methods.
+ */
+#define mono_emit_unwind_op_mark_loc(cfg,ip,n) mono_emit_unwind_op (cfg, (ip) - (cfg)->native_code, DW_CFA_mono_advance_loc, 0, (n))
/* Similar macros usable when a cfg is not available, like for trampolines */
#define mono_add_unwind_op_def_cfa(op_list,code,buf,reg,offset) do { (op_list) = g_slist_append ((op_list), mono_create_unwind_op ((code) - (buf), DW_CFA_def_cfa, (reg), (offset))); } while (0)
@@ -127,7 +144,8 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len) MONO_INTERNAL;
void
mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
- guint8 *start_ip, guint8 *end_ip, guint8 *ip, mgreg_t *regs, int nregs,
+ guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations,
+ mgreg_t *regs, int nregs,
mgreg_t **save_locations, int save_locations_len,
guint8 **out_cfa) MONO_INTERNAL;
diff --git a/mono/mini/mini-x86.c b/mono/mini/mini-x86.c
index 3de9b0be1a2..c7931e328ff 100644
--- a/mono/mini/mini-x86.c
+++ b/mono/mini/mini-x86.c
@@ -17,6 +17,7 @@
#include <unistd.h>
#endif
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/debug-helpers.h>
#include <mono/metadata/threads.h>
@@ -44,9 +45,9 @@ static gboolean optimize_for_xen = TRUE;
#endif
/* This mutex protects architecture specific caches */
-#define mono_mini_arch_lock() EnterCriticalSection (&mini_arch_mutex)
-#define mono_mini_arch_unlock() LeaveCriticalSection (&mini_arch_mutex)
-static CRITICAL_SECTION mini_arch_mutex;
+#define mono_mini_arch_lock() mono_mutex_lock (&mini_arch_mutex)
+#define mono_mini_arch_unlock() mono_mutex_unlock (&mini_arch_mutex)
+static mono_mutex_t mini_arch_mutex;
#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
@@ -757,7 +758,7 @@ mono_arch_cpu_init (void)
void
mono_arch_init (void)
{
- InitializeCriticalSection (&mini_arch_mutex);
+ mono_mutex_init_recursive (&mini_arch_mutex);
ss_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ);
bp_trigger_page = mono_valloc (NULL, mono_pagesize (), MONO_MMAP_READ|MONO_MMAP_32BIT);
@@ -780,7 +781,7 @@ mono_arch_cleanup (void)
mono_vfree (ss_trigger_page, mono_pagesize ());
if (bp_trigger_page)
mono_vfree (bp_trigger_page, mono_pagesize ());
- DeleteCriticalSection (&mini_arch_mutex);
+ mono_mutex_destroy (&mini_arch_mutex);
}
/*
@@ -1065,7 +1066,7 @@ mono_arch_allocate_vars (MonoCompile *cfg)
cfg->frame_reg = X86_EBP;
offset = 0;
- if (cfg->has_atomic_add_new_i4 || cfg->has_atomic_exchange_i4) {
+ if (cfg->has_atomic_add_i4 || cfg->has_atomic_exchange_i4) {
/* The opcode implementations use callee-saved regs as scratch regs by pushing and pop-ing them, but that is not async safe */
cfg->used_int_regs |= (1 << X86_EBX) | (1 << X86_EDI) | (1 << X86_ESI);
}
@@ -2460,12 +2461,22 @@ mono_x86_emit_tls_get (guint8* code, int dreg, int tls_offset)
* See the Under the Hood article in the May 1996 issue of Microsoft Systems
* Journal and/or a disassembly of the TlsGet () function.
*/
- g_assert (tls_offset < 64);
x86_prefix (code, X86_FS_PREFIX);
x86_mov_reg_mem (code, dreg, 0x18, 4);
- /* Dunno what this does but TlsGetValue () contains it */
- x86_alu_membase_imm (code, X86_AND, dreg, 0x34, 0);
- x86_mov_reg_membase (code, dreg, dreg, 3600 + (tls_offset * 4), 4);
+ if (tls_offset < 64) {
+ x86_mov_reg_membase (code, dreg, dreg, 3600 + (tls_offset * 4), 4);
+ } else {
+ guint8 *buf [16];
+
+ g_assert (tls_offset < 0x440);
+ /* Load TEB->TlsExpansionSlots */
+ x86_mov_reg_membase (code, dreg, dreg, 0xf94, 4);
+ x86_test_reg_reg (code, dreg, dreg);
+ buf [0] = code;
+ x86_branch (code, X86_CC_EQ, code, TRUE);
+ x86_mov_reg_membase (code, dreg, dreg, (tls_offset * 4) - 0x100, 4);
+ x86_patch (buf [0], code);
+ }
#else
if (optimize_for_xen) {
x86_prefix (code, X86_GS_PREFIX);
@@ -2539,13 +2550,13 @@ static guint8*
emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offset)
{
/* save all caller saved regs */
- x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), X86_EBX, sizeof (mgreg_t));
- mono_emit_unwind_op_offset (cfg, code, X86_EBX, - cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx));
- x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), X86_EDI, sizeof (mgreg_t));
- mono_emit_unwind_op_offset (cfg, code, X86_EDI, - cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi));
- x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), X86_ESI, sizeof (mgreg_t));
- mono_emit_unwind_op_offset (cfg, code, X86_ESI, - cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi));
- x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebp), X86_EBP, sizeof (mgreg_t));
+ x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx), X86_EBX, sizeof (mgreg_t));
+ mono_emit_unwind_op_offset (cfg, code, X86_EBX, - cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx));
+ x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi), X86_EDI, sizeof (mgreg_t));
+ mono_emit_unwind_op_offset (cfg, code, X86_EDI, - cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi));
+ x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi), X86_ESI, sizeof (mgreg_t));
+ mono_emit_unwind_op_offset (cfg, code, X86_ESI, - cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi));
+ x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebp), X86_EBP, sizeof (mgreg_t));
/* save the current IP */
if (cfg->compile_aot) {
@@ -2556,17 +2567,17 @@ emit_setup_lmf (MonoCompile *cfg, guint8 *code, gint32 lmf_offset, int cfa_offse
mono_add_patch_info (cfg, code + 1 - cfg->native_code, MONO_PATCH_INFO_IP, NULL);
x86_mov_reg_imm (code, X86_EAX, 0);
}
- x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (mgreg_t));
-
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebp), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, esp), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF);
- mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
+ x86_mov_membase_reg (code, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (mgreg_t));
+
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, eip), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebp), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esp), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, method), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, lmf_addr), SLOT_NOREF);
+ mini_gc_set_slot_type_from_cfa (cfg, -cfa_offset + lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), SLOT_NOREF);
return code;
}
@@ -4372,28 +4383,7 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
case OP_ATOMIC_ADD_I4: {
int dreg = ins->dreg;
- if (dreg == ins->inst_basereg) {
- x86_push_reg (code, ins->sreg2);
- dreg = ins->sreg2;
- }
-
- if (dreg != ins->sreg2)
- x86_mov_reg_reg (code, ins->dreg, ins->sreg2, 4);
-
- x86_prefix (code, X86_LOCK_PREFIX);
- x86_xadd_membase_reg (code, ins->inst_basereg, ins->inst_offset, dreg, 4);
-
- if (dreg != ins->dreg) {
- x86_mov_reg_reg (code, ins->dreg, dreg, 4);
- x86_pop_reg (code, dreg);
- }
-
- break;
- }
- case OP_ATOMIC_ADD_NEW_I4: {
- int dreg = ins->dreg;
-
- g_assert (cfg->has_atomic_add_new_i4);
+ g_assert (cfg->has_atomic_add_i4);
/* hack: limit in regalloc, dreg != sreg1 && dreg != sreg2 */
if (ins->sreg2 == dreg) {
@@ -5596,7 +5586,7 @@ mono_arch_emit_epilog (MonoCompile *cfg)
/* we load the value in a separate instruction: this mechanism may be
* used later as a safer way to do thread interruption
*/
- x86_mov_reg_membase (code, X86_ECX, X86_ECX, G_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_ECX, MONO_STRUCT_OFFSET (MonoJitTlsData, restore_stack_prot), 4);
x86_alu_reg_imm (code, X86_CMP, X86_ECX, 0);
patch = code;
x86_branch8 (code, X86_CC_Z, 0, FALSE);
@@ -5609,14 +5599,14 @@ mono_arch_emit_epilog (MonoCompile *cfg)
/* restore caller saved regs */
if (cfg->used_int_regs & (1 << X86_EBX)) {
- x86_mov_reg_membase (code, X86_EBX, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), 4);
+ x86_mov_reg_membase (code, X86_EBX, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, ebx), 4);
}
if (cfg->used_int_regs & (1 << X86_EDI)) {
- x86_mov_reg_membase (code, X86_EDI, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), 4);
+ x86_mov_reg_membase (code, X86_EDI, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, edi), 4);
}
if (cfg->used_int_regs & (1 << X86_ESI)) {
- x86_mov_reg_membase (code, X86_ESI, cfg->frame_reg, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), 4);
+ x86_mov_reg_membase (code, X86_ESI, cfg->frame_reg, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, esi), 4);
}
/* EBP is restored by LEAVE */
@@ -5840,8 +5830,6 @@ mono_arch_free_jit_tls_data (MonoJitTlsData *tls)
{
}
-#ifdef MONO_ARCH_HAVE_IMT
-
// Linear handler, the bsearch head compare is shorter
//[2 + 4] x86_alu_reg_imm (code, X86_CMP, ins->sreg1, ins->inst_imm);
//[1 + 1] x86_branch8(inst,cond,imm,is_signed)
@@ -6010,7 +5998,6 @@ mono_arch_find_imt_method (mgreg_t *regs, guint8 *code)
{
return (MonoMethod*) regs [MONO_ARCH_IMT_REG];
}
-#endif
MonoVTable*
mono_arch_find_static_call_vtable (mgreg_t *regs, guint8 *code)
@@ -6203,10 +6190,8 @@ mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code)
* The stack looks like:
* <other args>
* <this=delegate>
- * <return addr>
- * <4 pointers pushed by mono_arch_create_trampoline_code ()>
*/
- res = (((MonoObject**)esp) [5 + (offset / 4)]);
+ res = ((MonoObject**)esp) [0];
if (cinfo)
g_free (cinfo);
return res;
@@ -6231,9 +6216,9 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
/* Replace the this argument with the target */
x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoDelegate, target), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 4);
x86_mov_membase_reg (code, X86_ESP, 4, X86_ECX, 4);
- x86_jump_membase (code, X86_EAX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ x86_jump_membase (code, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
g_assert ((code - start) < code_reserve);
} else {
@@ -6272,7 +6257,7 @@ get_delegate_invoke_impl (gboolean has_target, guint32 param_count, guint32 *cod
x86_mov_membase_reg (code, X86_ESP, (i+1)*4, X86_EAX, 4);
}
- x86_jump_membase (code, X86_ECX, G_STRUCT_OFFSET (MonoDelegate, method_ptr));
+ x86_jump_membase (code, X86_ECX, MONO_STRUCT_OFFSET (MonoDelegate, method_ptr));
g_assert ((code - start) < code_reserve);
}
@@ -6378,6 +6363,36 @@ mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_targe
return start;
}
+gpointer
+mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg)
+{
+ guint8 *code, *start;
+ int size = 24;
+
+ /*
+ * The stack contains:
+ * <delegate>
+ * <return addr>
+ */
+ start = code = mono_global_codeman_reserve (size);
+
+ /* Replace the this argument with the target */
+ x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, target), 4);
+ x86_mov_membase_reg (code, X86_ESP, 4, X86_ECX, 4);
+
+ if (load_imt_reg) {
+ /* Load the IMT reg */
+ x86_mov_reg_membase (code, MONO_ARCH_IMT_REG, X86_EAX, MONO_STRUCT_OFFSET (MonoDelegate, method), 4);
+ }
+
+ /* Load the vtable */
+ x86_mov_reg_membase (code, X86_EAX, X86_ECX, MONO_STRUCT_OFFSET (MonoObject, vtable), 4);
+ x86_jump_membase (code, X86_EAX, offset);
+
+ return start;
+}
+
mgreg_t
mono_arch_context_get_int_reg (MonoContext *ctx, int reg)
{
@@ -6849,6 +6864,19 @@ mono_arch_init_lmf_ext (MonoLMFExt *ext, gpointer prev_lmf)
#endif
+gboolean
+mono_arch_opcode_supported (int opcode)
+{
+ switch (opcode) {
+ case OP_ATOMIC_ADD_I4:
+ case OP_ATOMIC_EXCHANGE_I4:
+ case OP_ATOMIC_CAS_I4:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
#if defined(ENABLE_GSHAREDVT)
#include "../../../mono-extensions/mono/mini/mini-x86-gsharedvt.c"
diff --git a/mono/mini/mini-x86.h b/mono/mini/mini-x86.h
index 2f7eaca37b6..05b977c547a 100644
--- a/mono/mini/mini-x86.h
+++ b/mono/mini/mini-x86.h
@@ -48,7 +48,7 @@ struct sigcontext {
#endif /* __HAIKU__ */
#if defined( __linux__) || defined(__sun) || defined(__APPLE__) || defined(__NetBSD__) || \
- defined(__FreeBSD__) || defined(__OpenBSD__)
+ defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
#define MONO_ARCH_USE_SIGACTION
#endif
@@ -209,12 +209,11 @@ typedef struct {
#define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1
#define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
#define MONO_ARCH_NEED_GOT_VAR 1
+#ifndef HOST_WIN32
+/* X86 uses jit_tls->lmf (See emit_push_lmf ()) */
#define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
+#endif
#define MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE 1
-#define MONO_ARCH_HAVE_ATOMIC_ADD 1
-#define MONO_ARCH_HAVE_ATOMIC_EXCHANGE 1
-#define MONO_ARCH_HAVE_ATOMIC_CAS 1
-#define MONO_ARCH_HAVE_IMT 1
#define MONO_ARCH_HAVE_TLS_GET (mono_x86_have_tls_get ())
#define MONO_ARCH_IMT_REG X86_EDX
#define MONO_ARCH_VTABLE_REG X86_EDX
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 4d4c39c2f2a..a31e9003a13 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -88,15 +88,15 @@ MonoNativeTlsKey mono_jit_tls_id;
MONO_FAST_TLS_DECLARE(mono_jit_tls);
#endif
-MonoTraceSpec *mono_jit_trace_calls = NULL;
+MonoTraceSpec *mono_jit_trace_calls;
gboolean mono_compile_aot = FALSE;
/* If this is set, no code is generated dynamically, everything is taken from AOT files */
gboolean mono_aot_only = FALSE;
/* Whenever to use IMT */
-gboolean mono_use_imt = ARCH_HAVE_IMT;
-MonoMethodDesc *mono_inject_async_exc_method = NULL;
+gboolean mono_use_imt = TRUE;
+MonoMethodDesc *mono_inject_async_exc_method;
int mono_inject_async_exc_pos;
-MonoMethodDesc *mono_break_at_bb_method = NULL;
+MonoMethodDesc *mono_break_at_bb_method;
int mono_break_at_bb_bb_num;
gboolean mono_do_x86_stack_align = TRUE;
const char *mono_build_date;
@@ -111,13 +111,13 @@ static int mini_verbose = 0;
*/
gboolean mono_use_llvm = FALSE;
-#define mono_jit_lock() EnterCriticalSection (&jit_mutex)
-#define mono_jit_unlock() LeaveCriticalSection (&jit_mutex)
-static CRITICAL_SECTION jit_mutex;
+#define mono_jit_lock() mono_mutex_lock (&jit_mutex)
+#define mono_jit_unlock() mono_mutex_unlock (&jit_mutex)
+static mono_mutex_t jit_mutex;
-static MonoCodeManager *global_codeman = NULL;
+static MonoCodeManager *global_codeman;
-static GHashTable *jit_icall_name_hash = NULL;
+static GHashTable *jit_icall_name_hash;
static MonoDebugOptions debug_options;
@@ -141,6 +141,8 @@ gboolean disable_vtypes_in_regs = FALSE;
static GSList *tramp_infos;
+static void register_icalls (void);
+
gpointer
mono_realloc_native_code (MonoCompile *cfg)
{
@@ -1526,7 +1528,7 @@ mono_create_jump_table (MonoCompile *cfg, MonoInst *label, MonoBasicBlock **bbs,
static MonoMethodSignature *
mono_get_array_new_va_signature (int arity)
{
- static GHashTable *sighash = NULL;
+ static GHashTable *sighash;
MonoMethodSignature *res;
int i;
@@ -1860,7 +1862,7 @@ mono_allocate_stack_slots2 (MonoCompile *cfg, gboolean backward, guint32 *stack_
else {
int ialign;
- size = mono_type_size (t, &ialign);
+ size = mini_type_stack_size (NULL, t, &ialign);
align = ialign;
if (MONO_CLASS_IS_SIMD (cfg, mono_class_from_mono_type (t)))
@@ -2155,7 +2157,7 @@ mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_s
} else {
int ialign;
- size = mono_type_size (t, &ialign);
+ size = mini_type_stack_size (NULL, t, &ialign);
align = ialign;
if (mono_class_from_mono_type (t)->exception_type)
@@ -2362,8 +2364,8 @@ mono_allocate_stack_slots (MonoCompile *cfg, gboolean backward, guint32 *stack_s
static mono_byte emul_opcode_hit_cache [(OP_LAST>>EMUL_HIT_SHIFT) + 1] = {0};
static short emul_opcode_num = 0;
static short emul_opcode_alloced = 0;
-static short *emul_opcode_opcodes = NULL;
-static MonoJitICallInfo **emul_opcode_map = NULL;
+static short *emul_opcode_opcodes;
+static MonoJitICallInfo **emul_opcode_map;
MonoJitICallInfo *
mono_find_jit_opcode_emulation (int opcode)
@@ -2952,9 +2954,6 @@ mini_get_tls_offset (MonoTlsKey key)
case TLS_KEY_JIT_TLS:
#ifdef HOST_WIN32
offset = mono_get_jit_tls_key ();
- /* Only 64 tls entries can be accessed using inline code */
- if (offset >= 64)
- offset = -1;
#else
offset = mono_get_jit_tls_offset ();
#endif
@@ -3064,6 +3063,16 @@ mono_get_lmf_addr_intrinsic (MonoCompile* cfg)
#endif /* !DISABLE_JIT */
+
+static gboolean
+mini_tls_key_supported (MonoTlsKey key)
+{
+ if (!MONO_ARCH_HAVE_TLS_GET)
+ return FALSE;
+
+ return mini_get_tls_offset (key) != -1;
+}
+
void
mono_add_patch_info (MonoCompile *cfg, int ip, MonoJumpInfoType type, gconstpointer target)
{
@@ -3149,8 +3158,8 @@ mono_patch_info_dup_mp (MonoMemPool *mp, MonoJumpInfo *patch_info)
res->data.rgctx_entry->data = mono_patch_info_dup_mp (mp, res->data.rgctx_entry->data);
break;
case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE:
- res->data.del_tramp = mono_mempool_alloc0 (mp, sizeof (MonoClassMethodPair));
- memcpy (res->data.del_tramp, patch_info->data.del_tramp, sizeof (MonoClassMethodPair));
+ res->data.del_tramp = mono_mempool_alloc0 (mp, sizeof (MonoDelegateClassMethodPair));
+ memcpy (res->data.del_tramp, patch_info->data.del_tramp, sizeof (MonoDelegateClassMethodPair));
break;
case MONO_PATCH_INFO_GSHAREDVT_CALL:
res->data.gsharedvt = mono_mempool_alloc (mp, sizeof (MonoJumpInfoGSharedVtCall));
@@ -3242,7 +3251,7 @@ mono_patch_info_hash (gconstpointer data)
/* Hash on the selector name */
return g_str_hash (ji->data.target);
case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE:
- return (ji->type << 8) | (gsize)ji->data.del_tramp->klass | (gsize)ji->data.del_tramp->method;
+ return (ji->type << 8) | (gsize)ji->data.del_tramp->klass | (gsize)ji->data.del_tramp->method | (gsize)ji->data.del_tramp->virtual;
default:
printf ("info type: %d\n", ji->type);
mono_print_ji (ji); printf ("\n");
@@ -3297,7 +3306,7 @@ mono_patch_info_equal (gconstpointer ka, gconstpointer kb)
case MONO_PATCH_INFO_GSHAREDVT_METHOD:
return ji1->data.gsharedvt_method->method == ji2->data.gsharedvt_method->method;
case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE:
- return ji1->data.del_tramp->klass == ji2->data.del_tramp->klass && ji1->data.del_tramp->method == ji2->data.del_tramp->method;
+ return ji1->data.del_tramp->klass == ji2->data.del_tramp->klass && ji1->data.del_tramp->method == ji2->data.del_tramp->method && ji1->data.del_tramp->virtual == ji2->data.del_tramp->virtual;
default:
if (ji1->data.target != ji2->data.target)
return 0;
@@ -3467,9 +3476,12 @@ mono_resolve_patch_target (MonoMethod *method, MonoDomain *domain, guint8 *code,
break;
}
case MONO_PATCH_INFO_DELEGATE_TRAMPOLINE: {
- MonoClassMethodPair *del_tramp = patch_info->data.del_tramp;
+ MonoDelegateClassMethodPair *del_tramp = patch_info->data.del_tramp;
- target = mono_create_delegate_trampoline_with_method (domain, del_tramp->klass, del_tramp->method);
+ if (del_tramp->virtual)
+ target = mono_create_delegate_virtual_trampoline (domain, del_tramp->klass, del_tramp->method);
+ else
+ target = mono_create_delegate_trampoline_info (domain, del_tramp->klass, del_tramp->method);
break;
}
case MONO_PATCH_INFO_SFLDA: {
@@ -4299,7 +4311,7 @@ create_jit_info_for_trampoline (MonoMethod *wrapper, MonoTrampInfo *info)
jinfo->d.method = wrapper;
jinfo->code_start = info->code;
jinfo->code_size = info->code_size;
- jinfo->used_regs = mono_cache_unwind_info (uw_info, info_len);
+ jinfo->unwind_info = mono_cache_unwind_info (uw_info, info_len);
if (!info->uw_info)
g_free (uw_info);
@@ -4342,6 +4354,9 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
if (stack_size)
arch_eh_info_size = sizeof (MonoArchEHJitInfo);
}
+
+ if (cfg->has_unwind_info_for_epilog && !arch_eh_info_size)
+ arch_eh_info_size = sizeof (MonoArchEHJitInfo);
if (cfg->try_block_holes) {
for (tmp = cfg->try_block_holes; tmp; tmp = tmp->next) {
@@ -4382,7 +4397,6 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
jinfo->d.method = cfg->method_to_register;
jinfo->code_start = cfg->native_code;
jinfo->code_size = cfg->code_len;
- jinfo->used_regs = cfg->used_int_regs;
jinfo->domain_neutral = (cfg->opt & MONO_OPT_SHARED) != 0;
jinfo->num_clauses = num_clauses;
@@ -4628,19 +4642,28 @@ create_jit_info (MonoCompile *cfg, MonoMethod *method_to_compile)
}
}
- /*
- * Its possible to generate dwarf unwind info for xdebug etc, but not actually
- * using it during runtime, hence the define.
- */
if (cfg->encoded_unwind_ops) {
- jinfo->used_regs = mono_cache_unwind_info (cfg->encoded_unwind_ops, cfg->encoded_unwind_ops_len);
+ /* Generated by LLVM */
+ jinfo->unwind_info = mono_cache_unwind_info (cfg->encoded_unwind_ops, cfg->encoded_unwind_ops_len);
g_free (cfg->encoded_unwind_ops);
} else if (cfg->unwind_ops) {
guint32 info_len;
guint8 *unwind_info = mono_unwind_ops_encode (cfg->unwind_ops, &info_len);
+ guint32 unwind_desc;
+
+ unwind_desc = mono_cache_unwind_info (unwind_info, info_len);
- jinfo->used_regs = mono_cache_unwind_info (unwind_info, info_len);
+ if (cfg->has_unwind_info_for_epilog) {
+ MonoArchEHJitInfo *info;
+
+ info = mono_jit_info_get_arch_eh_info (jinfo);
+ g_assert (info);
+ info->epilog_size = cfg->code_size - cfg->epilog_begin;
+ }
+ jinfo->unwind_info = unwind_desc;
g_free (unwind_info);
+ } else {
+ jinfo->unwind_info = cfg->used_int_regs;
}
return jinfo;
@@ -5820,7 +5843,7 @@ lookup_method (MonoDomain *domain, MonoMethod *method)
}
#if ENABLE_JIT_MAP
-static FILE* perf_map_file = NULL;
+static FILE* perf_map_file;
void
mono_enable_jit_map (void)
@@ -6097,18 +6120,11 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
else
shared = NULL;
- /*
- * FIXME: lookup_method_inner requires the loader lock.
- * FIXME: This is no longer true, can this be dropped ?
- */
- mono_loader_lock ();
mono_domain_lock (target_domain);
/* Check if some other thread already did the job. In this case, we can
discard the code this thread generated. */
- mono_domain_jit_code_hash_lock (target_domain);
-
info = lookup_method_inner (target_domain, method, shared);
if (info) {
/* We can't use a domain specific method in another domain */
@@ -6117,18 +6133,18 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
// printf("Discarding code for method %s\n", method->name);
}
}
-
if (code == NULL) {
+ /* The lookup + insert is atomic since this is done inside the domain lock */
+ mono_domain_jit_code_hash_lock (target_domain);
mono_internal_hash_table_insert (&target_domain->jit_code_hash, cfg->jit_info->d.method, cfg->jit_info);
mono_domain_jit_code_hash_unlock (target_domain);
+
code = cfg->native_code;
if (cfg->generic_sharing_context && mono_method_is_generic_sharable (method, FALSE))
mono_stats.generics_shared_methods++;
if (cfg->gsharedvt)
mono_stats.gsharedvt_methods++;
- } else {
- mono_domain_jit_code_hash_unlock (target_domain);
}
jinfo = cfg->jit_info;
@@ -6180,7 +6196,6 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
mono_emit_jit_map (jinfo);
#endif
mono_domain_unlock (target_domain);
- mono_loader_unlock ();
vtable = mono_class_vtable (target_domain, method->klass);
if (!vtable) {
@@ -6363,9 +6378,11 @@ mono_jit_free_method (MonoDomain *domain, MonoMethod *method)
mono_domain_lock (domain);
g_hash_table_remove (domain_jit_info (domain)->dynamic_code_hash, method);
+ mono_domain_jit_code_hash_lock (domain);
mono_internal_hash_table_remove (&domain->jit_code_hash, method);
+ mono_domain_jit_code_hash_unlock (domain);
g_hash_table_remove (domain_jit_info (domain)->jump_trampoline_hash, method);
- g_hash_table_remove (domain_jit_info (domain)->runtime_invoke_hash, method);
+ mono_conc_hashtable_remove (domain_jit_info (domain)->runtime_invoke_hash, method);
/* Remove jump targets in this method */
g_hash_table_iter_init (&iter, domain_jit_info (domain)->jump_target_hash);
@@ -6443,9 +6460,9 @@ mono_jit_find_compiled_method_with_jit_info (MonoDomain *domain, MonoMethod *met
gboolean mono_do_single_method_regression = FALSE;
guint32 mono_single_method_regression_opt = 0;
-MonoMethod *mono_current_single_method = NULL;
-GSList *mono_single_method_list = NULL;
-GHashTable *mono_single_method_hash = NULL;
+MonoMethod *mono_current_single_method;
+GSList *mono_single_method_list;
+GHashTable *mono_single_method_hash;
guint32
mono_get_optimizations_for_method (MonoMethod *method, guint32 default_opt)
@@ -6506,9 +6523,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
domain_info = domain_jit_info (domain);
- mono_domain_lock (domain);
- info = g_hash_table_lookup (domain_info->runtime_invoke_hash, method);
- mono_domain_unlock (domain);
+ info = mono_conc_hashtable_lookup (domain_info->runtime_invoke_hash, method);
if (!info) {
if (mono_security_core_clr_enabled ()) {
@@ -6649,15 +6664,11 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
if (!info->dyn_call_info)
info->runtime_invoke = mono_jit_compile_method (invoke);
- mono_domain_lock (domain);
- info2 = g_hash_table_lookup (domain_info->runtime_invoke_hash, method);
+ info2 = mono_conc_hashtable_insert (domain_info->runtime_invoke_hash, method, info);
if (info2) {
g_free (info);
info = info2;
- } else {
- g_hash_table_insert (domain_info->runtime_invoke_hash, method, info);
}
- mono_domain_unlock (domain);
}
runtime_invoke = info->runtime_invoke;
@@ -6756,8 +6767,10 @@ SIG_HANDLER_FUNC (, mono_sigfpe_signal_handler)
return;
mono_handle_native_sigsegv (SIGSEGV, ctx);
- if (mono_do_crash_chaining)
+ if (mono_do_crash_chaining) {
mono_chain_signal (SIG_HANDLER_PARAMS);
+ return;
+ }
}
mono_arch_handle_exception (ctx, exc);
@@ -6808,8 +6821,10 @@ SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
if (!mono_do_crash_chaining && mono_chain_signal (SIG_HANDLER_PARAMS))
return;
mono_handle_native_sigsegv (SIGSEGV, ctx);
- if (mono_do_crash_chaining)
+ if (mono_do_crash_chaining) {
mono_chain_signal (SIG_HANDLER_PARAMS);
+ return;
+ }
}
ji = mono_jit_info_table_find (mono_domain_get (), mono_arch_ip_from_context (ctx));
@@ -6853,8 +6868,10 @@ SIG_HANDLER_FUNC (, mono_sigsegv_signal_handler)
mono_handle_native_sigsegv (SIGSEGV, ctx);
- if (mono_do_crash_chaining)
+ if (mono_do_crash_chaining) {
mono_chain_signal (SIG_HANDLER_PARAMS);
+ return;
+ }
}
mono_arch_handle_exception (ctx, NULL);
@@ -6938,6 +6955,62 @@ mini_get_vtable_trampoline (int slot_index)
return vtable_trampolines [index];
}
+gpointer
+mono_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method)
+{
+ gboolean is_virtual_generic, is_interface, load_imt_reg;
+ int offset, idx;
+
+ static guint8 **cache = NULL;
+ static int cache_size = 0;
+
+ if (!method)
+ return NULL;
+
+ /* FIXME Support more cases */
+ if (mono_aot_only)
+ return NULL;
+
+ if (MONO_TYPE_ISSTRUCT (sig->ret))
+ return NULL;
+
+ is_virtual_generic = method->is_inflated && mono_method_get_declaring_generic_method (method)->is_generic;
+ is_interface = method->klass->flags & TYPE_ATTRIBUTE_INTERFACE ? TRUE : FALSE;
+ load_imt_reg = is_virtual_generic || is_interface;
+
+ if (is_interface && !is_virtual_generic)
+ offset = ((gint32)mono_method_get_imt_slot (method) - MONO_IMT_SIZE) * SIZEOF_VOID_P;
+ else
+ offset = G_STRUCT_OFFSET (MonoVTable, vtable) + ((mono_method_get_vtable_index (method)) * (SIZEOF_VOID_P));
+
+ idx = (offset / SIZEOF_VOID_P + MONO_IMT_SIZE) * 2 + (load_imt_reg ? 1 : 0);
+ g_assert (idx >= 0);
+
+ /* Resize the cache to idx + 1 */
+ if (cache_size < idx + 1) {
+ mono_jit_lock ();
+ if (cache_size < idx + 1) {
+ guint8 **new_cache;
+ int new_cache_size = idx + 1;
+
+ new_cache = g_new0 (guint8*, new_cache_size);
+ if (cache)
+ memcpy (new_cache, cache, cache_size * sizeof (guint8*));
+ g_free (cache);
+
+ mono_memory_barrier ();
+ cache = new_cache;
+ cache_size = new_cache_size;
+ }
+ mono_jit_unlock ();
+ }
+
+ if (cache [idx])
+ return cache [idx];
+
+ return cache [idx] = mono_arch_get_delegate_virtual_invoke_impl (sig, method, offset, load_imt_reg);
+}
+
static gpointer
mini_get_imt_trampoline (int slot_index)
{
@@ -7107,7 +7180,7 @@ mini_create_jit_domain_info (MonoDomain *domain)
info->jit_trampoline_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
info->delegate_trampoline_hash = g_hash_table_new (class_method_pair_hash, class_method_pair_equal);
info->llvm_vcall_trampoline_hash = g_hash_table_new (mono_aligned_addr_hash, NULL);
- info->runtime_invoke_hash = g_hash_table_new_full (mono_aligned_addr_hash, NULL, NULL, runtime_invoke_info_free);
+ info->runtime_invoke_hash = mono_conc_hashtable_new_full (&domain->lock, mono_aligned_addr_hash, NULL, NULL, runtime_invoke_info_free);
info->seq_points = g_hash_table_new_full (mono_aligned_addr_hash, NULL, NULL, seq_point_info_free);
info->arch_seq_points = g_hash_table_new (mono_aligned_addr_hash, NULL);
info->jump_target_hash = g_hash_table_new (NULL, NULL);
@@ -7186,7 +7259,7 @@ mini_free_jit_domain_info (MonoDomain *domain)
if (info->static_rgctx_trampoline_hash)
g_hash_table_destroy (info->static_rgctx_trampoline_hash);
g_hash_table_destroy (info->llvm_vcall_trampoline_hash);
- g_hash_table_destroy (info->runtime_invoke_hash);
+ mono_conc_hashtable_destroy (info->runtime_invoke_hash);
g_hash_table_destroy (info->seq_points);
g_hash_table_destroy (info->arch_seq_points);
if (info->agent_info)
@@ -7217,7 +7290,9 @@ mini_init (const char *filename, const char *runtime_version)
}
#endif
- InitializeCriticalSection (&jit_mutex);
+ mono_mutex_init_recursive (&jit_mutex);
+
+ mono_cross_helpers_run ();
/* Happens when using the embedding interface */
if (!default_opt_set)
@@ -7240,7 +7315,6 @@ mini_init (const char *filename, const char *runtime_version)
if (!global_codeman)
global_codeman = mono_code_manager_new ();
- jit_icall_name_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
memset (&callbacks, 0, sizeof (callbacks));
callbacks.create_ftnptr = mini_create_ftnptr;
@@ -7249,13 +7323,12 @@ mini_init (const char *filename, const char *runtime_version)
callbacks.set_cast_details = mono_set_cast_details;
callbacks.debug_log = mono_debugger_agent_debug_log;
callbacks.debug_log_is_enabled = mono_debugger_agent_debug_log_is_enabled;
+ callbacks.tls_key_supported = mini_tls_key_supported;
-#ifdef MONO_ARCH_HAVE_IMT
if (mono_use_imt) {
callbacks.get_vtable_trampoline = mini_get_vtable_trampoline;
callbacks.get_imt_trampoline = mini_get_imt_trampoline;
}
-#endif
mono_install_callbacks (&callbacks);
@@ -7266,7 +7339,6 @@ mini_init (const char *filename, const char *runtime_version)
mono_threads_runtime_init (&ticallbacks);
-
if (g_getenv ("MONO_DEBUG") != NULL)
mini_parse_debug_options ();
@@ -7305,9 +7377,6 @@ mini_init (const char *filename, const char *runtime_version)
mono_trampolines_init ();
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
mono_native_tls_alloc (&mono_jit_tls_id, NULL);
if (default_opt & MONO_OPT_AOT)
@@ -7355,9 +7424,8 @@ mini_init (const char *filename, const char *runtime_version)
mono_install_get_class_from_name (mono_aot_get_class_from_name);
mono_install_jit_info_find_in_aot (mono_aot_find_jit_info);
- if (debug_options.collect_pagefault_stats) {
+ if (debug_options.collect_pagefault_stats)
mono_aot_set_make_unreadable (TRUE);
- }
if (runtime_version)
domain = mono_init_version (filename, runtime_version);
@@ -7370,14 +7438,12 @@ mini_init (const char *filename, const char *runtime_version)
mono_marshal_use_aot_wrappers (TRUE);
}
-#ifdef MONO_ARCH_HAVE_IMT
if (mono_use_imt) {
if (mono_aot_only)
mono_install_imt_thunk_builder (mono_aot_get_imt_thunk);
else
mono_install_imt_thunk_builder (mono_arch_build_imt_thunk);
}
-#endif
/*Init arch tls information only after the metadata side is inited to make sure we see dynamic appdomain tls keys*/
mono_arch_finish_init ();
@@ -7390,6 +7456,58 @@ mini_init (const char *filename, const char *runtime_version)
/* This should come after mono_init () too */
mini_gc_init ();
+#ifndef DISABLE_JIT
+ mono_create_helper_signatures ();
+#endif
+
+ register_jit_stats ();
+
+#define JIT_CALLS_WORK
+#ifdef JIT_CALLS_WORK
+ /* Needs to be called here since register_jit_icall depends on it */
+ mono_marshal_init ();
+
+ jit_icall_name_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+ mono_arch_register_lowlevel_calls ();
+
+ register_icalls ();
+
+ mono_generic_sharing_init ();
+#endif
+
+#ifdef MONO_ARCH_SIMD_INTRINSICS
+ mono_simd_intrinsics_init ();
+#endif
+
+#if MONO_SUPPORT_TASKLETS
+ mono_tasklets_init ();
+#endif
+
+ if (mono_compile_aot)
+ /*
+ * Avoid running managed code when AOT compiling, since the platform
+ * might only support aot-only execution.
+ */
+ mono_runtime_set_no_exec (TRUE);
+
+#define JIT_RUNTIME_WORKS
+#ifdef JIT_RUNTIME_WORKS
+ mono_install_runtime_cleanup ((MonoDomainFunc)mini_cleanup);
+ mono_runtime_init (domain, mono_thread_start_cb, mono_thread_attach_cb);
+ mono_thread_attach (domain);
+#endif
+
+ mono_profiler_runtime_initialized ();
+
+ MONO_VES_INIT_END ();
+
+ return domain;
+}
+
+static void
+register_icalls (void)
+{
mono_add_internal_call ("System.Diagnostics.StackFrame::get_frame_info",
ves_icall_get_frame_info);
mono_add_internal_call ("System.Diagnostics.StackTrace::get_trace",
@@ -7408,19 +7526,6 @@ mini_init (const char *filename, const char *runtime_version)
mono_debugger_agent_unhandled_exception);
#endif
-#ifndef DISABLE_JIT
- mono_create_helper_signatures ();
-#endif
-
- register_jit_stats ();
-
-#define JIT_CALLS_WORK
-#ifdef JIT_CALLS_WORK
- /* Needs to be called here since register_jit_icall depends on it */
- mono_marshal_init ();
-
- mono_arch_register_lowlevel_calls ();
-
/*
* It's important that we pass `TRUE` as the last argument here, as
* it causes the JIT to omit a wrapper for these icalls. If the JIT
@@ -7621,41 +7726,10 @@ mini_init (const char *filename, const char *runtime_version)
register_icall (mono_object_isinst_with_cache, "mono_object_isinst_with_cache", "object object ptr ptr", FALSE);
register_icall (mono_debugger_agent_user_break, "mono_debugger_agent_user_break", "void", FALSE);
-#endif
#ifdef TARGET_IOS
register_icall (pthread_getspecific, "pthread_getspecific", "ptr ptr", TRUE);
#endif
-
- mono_generic_sharing_init ();
-
-#ifdef MONO_ARCH_SIMD_INTRINSICS
- mono_simd_intrinsics_init ();
-#endif
-
-#if MONO_SUPPORT_TASKLETS
- mono_tasklets_init ();
-#endif
-
- if (mono_compile_aot)
- /*
- * Avoid running managed code when AOT compiling, since the platform
- * might only support aot-only execution.
- */
- mono_runtime_set_no_exec (TRUE);
-
-#define JIT_RUNTIME_WORKS
-#ifdef JIT_RUNTIME_WORKS
- mono_install_runtime_cleanup ((MonoDomainFunc)mini_cleanup);
- mono_runtime_init (domain, mono_thread_start_cb, mono_thread_attach_cb);
- mono_thread_attach (domain);
-#endif
-
- mono_profiler_runtime_initialized ();
-
- MONO_VES_INIT_END ();
-
- return domain;
}
MonoJitStats mono_jit_stats = {0};
@@ -7787,9 +7861,9 @@ mini_cleanup (MonoDomain *domain)
mono_native_tls_free (mono_jit_tls_id);
- DeleteCriticalSection (&jit_mutex);
+ mono_mutex_destroy (&jit_mutex);
- DeleteCriticalSection (&mono_delegate_section);
+ mono_mutex_destroy (&mono_delegate_section);
mono_code_manager_cleanup ();
@@ -7959,16 +8033,6 @@ mono_arch_get_gsharedvt_trampoline (MonoTrampInfo **info, gboolean aot)
#endif
-#ifndef MONO_ARCH_HAVE_OPCODE_SUPPORTED
-
-gboolean
-mono_arch_opcode_supported (int opcode)
-{
- return TRUE;
-}
-
-#endif
-
#if defined(MONO_ARCH_GSHAREDVT_SUPPORTED) && !defined(ENABLE_GSHAREDVT)
gboolean
@@ -7996,10 +8060,10 @@ typedef struct MonoJumpTableChunk {
/* gpointer entries[total]; */
} MonoJumpTableChunk;
-static MonoJumpTableChunk* g_jumptable = NULL;
-#define mono_jumptable_lock() EnterCriticalSection (&jumptable_mutex)
-#define mono_jumptable_unlock() LeaveCriticalSection (&jumptable_mutex)
-static CRITICAL_SECTION jumptable_mutex;
+static MonoJumpTableChunk* g_jumptable;
+#define mono_jumptable_lock() mono_mutex_lock (&jumptable_mutex)
+#define mono_jumptable_unlock() mono_mutex_unlock (&jumptable_mutex)
+static mono_mutex_t jumptable_mutex;
static MonoJumpTableChunk*
mono_create_jumptable_chunk (guint32 max_entries)
@@ -8014,7 +8078,7 @@ void
mono_jumptable_init (void)
{
if (g_jumptable == NULL) {
- InitializeCriticalSection (&jumptable_mutex);
+ mono_mutex_init_recursive (&jumptable_mutex);
g_jumptable = mono_create_jumptable_chunk (DEFAULT_JUMPTABLE_CHUNK_ELEMENTS);
}
}
@@ -8070,7 +8134,7 @@ mono_jumptable_cleanup (void)
current = prev;
}
g_jumptable = NULL;
- DeleteCriticalSection (&jumptable_mutex);
+ mono_mutex_destroy (&jumptable_mutex);
}
}
diff --git a/mono/mini/mini.h b/mono/mini/mini.h
index 76cbdf32022..4bb5ad1d7d4 100644
--- a/mono/mini/mini.h
+++ b/mono/mini/mini.h
@@ -30,6 +30,7 @@
#include <mono/utils/mono-threads.h>
#include <mono/utils/mono-tls.h>
#include <mono/utils/atomic.h>
+#include <mono/utils/mono-conc-hashtable.h>
#define MONO_BREAKPOINT_ARRAY_SIZE 64
@@ -122,7 +123,7 @@
#endif
/* Version number of the AOT file format */
-#define MONO_AOT_FILE_VERSION 100
+#define MONO_AOT_FILE_VERSION 102
//TODO: This is x86/amd64 specific.
#define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
@@ -132,6 +133,10 @@
#define printf g_print
#endif
+#if !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR)
+#define MONO_JIT_TLS_DATA_HAS_LMF
+#endif
+
#define MONO_TYPE_IS_PRIMITIVE(t) ((!(t)->byref && ((((t)->type >= MONO_TYPE_BOOLEAN && (t)->type <= MONO_TYPE_R8) || ((t)->type >= MONO_TYPE_I && (t)->type <= MONO_TYPE_U)))))
/* Constants used to encode different types of methods in AOT */
@@ -285,6 +290,13 @@ typedef struct
MonoMethod *method;
} MonoClassMethodPair;
+typedef struct
+{
+ MonoClass *klass;
+ MonoMethod *method;
+ gboolean virtual;
+} MonoDelegateClassMethodPair;
+
/* Per-domain information maintained by the JIT */
typedef struct
{
@@ -295,15 +307,15 @@ typedef struct
GHashTable *class_init_trampoline_hash;
GHashTable *jump_trampoline_hash;
GHashTable *jit_trampoline_hash;
- /* Maps ClassMethodPair -> DelegateTrampInfo */
GHashTable *delegate_trampoline_hash;
+ /* Maps ClassMethodPair -> MonoDelegateTrampInfo */
GHashTable *static_rgctx_trampoline_hash;
GHashTable *llvm_vcall_trampoline_hash;
/* maps MonoMethod -> MonoJitDynamicMethodInfo */
GHashTable *dynamic_code_hash;
GHashTable *method_code_hash;
/* Maps methods to a RuntimeInvokeInfo structure */
- GHashTable *runtime_invoke_hash;
+ MonoConcurrentHashTable *runtime_invoke_hash;
/* Maps MonoMethod to a GPtrArray containing sequence point locations */
GHashTable *seq_points;
/* Debugger agent data */
@@ -1025,9 +1037,8 @@ typedef struct {
typedef struct {
gpointer end_of_stack;
guint32 stack_size;
-#if !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR)
+ /* !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR) */
MonoLMF *lmf;
-#endif
MonoLMF *first_lmf;
gpointer restore_stack_prot;
guint32 handling_stack_ovf;
@@ -1160,6 +1171,19 @@ typedef struct {
gpointer entries [MONO_ZERO_LEN_ARRAY];
} MonoGSharedVtMethodRuntimeInfo;
+typedef struct
+{
+ MonoMethod *invoke;
+ MonoMethod *method;
+ MonoMethodSignature *invoke_sig;
+ MonoMethodSignature *sig;
+ gpointer method_ptr;
+ gpointer invoke_impl;
+ gpointer impl_this;
+ gpointer impl_nothis;
+ gboolean need_rgctx_tramp;
+} MonoDelegateTrampInfo;
+
typedef enum {
#define PATCH_INFO(a,b) MONO_PATCH_INFO_ ## a,
#include "patch-info.h"
@@ -1228,7 +1252,7 @@ struct MonoJumpInfo {
MonoJumpInfoGSharedVtCall *gsharedvt;
MonoGSharedVtMethodInfo *gsharedvt_method;
MonoMethodSignature *sig;
- MonoClassMethodPair *del_tramp;
+ MonoDelegateClassMethodPair *del_tramp;
} data;
};
@@ -1266,6 +1290,7 @@ typedef enum {
MONO_TRAMPOLINE_NUM
} MonoTrampolineType;
+/* These trampolines return normally to their caller */
#define MONO_TRAMPOLINE_TYPE_MUST_RETURN(t) \
((t) == MONO_TRAMPOLINE_CLASS_INIT || \
(t) == MONO_TRAMPOLINE_GENERIC_CLASS_INIT || \
@@ -1491,10 +1516,11 @@ typedef struct {
guint soft_breakpoints : 1;
guint arch_eh_jit_info : 1;
guint has_indirection : 1;
- guint has_atomic_add_new_i4 : 1;
+ guint has_atomic_add_i4 : 1;
guint has_atomic_exchange_i4 : 1;
guint has_atomic_cas_i4 : 1;
guint check_pinvoke_callconv : 1;
+ guint has_unwind_info_for_epilog : 1;
gpointer debug_info;
guint32 lmf_offset;
guint16 *intvars;
@@ -2202,7 +2228,8 @@ gpointer mono_create_jit_trampoline (MonoMethod *method) MONO_INTERNAL;
gpointer mono_create_jit_trampoline_from_token (MonoImage *image, guint32 token) MONO_INTERNAL;
gpointer mono_create_jit_trampoline_in_domain (MonoDomain *domain, MonoMethod *method) MONO_LLVM_INTERNAL;
gpointer mono_create_delegate_trampoline (MonoDomain *domain, MonoClass *klass) MONO_INTERNAL;
-gpointer mono_create_delegate_trampoline_with_method (MonoDomain *domain, MonoClass *klass, MonoMethod *method) MONO_INTERNAL;
+MonoDelegateTrampInfo* mono_create_delegate_trampoline_info (MonoDomain *domain, MonoClass *klass, MonoMethod *method) MONO_INTERNAL;
+gpointer mono_create_delegate_virtual_trampoline (MonoDomain *domain, MonoClass *klass, MonoMethod *method) MONO_INTERNAL;
gpointer mono_create_rgctx_lazy_fetch_trampoline (guint32 offset) MONO_INTERNAL;
gpointer mono_create_monitor_enter_trampoline (void) MONO_INTERNAL;
gpointer mono_create_monitor_exit_trampoline (void) MONO_INTERNAL;
@@ -2276,6 +2303,9 @@ void mono_handle_global_vregs (MonoCompile *cfg) MONO_INTERNAL;
void mono_spill_global_vars (MonoCompile *cfg, gboolean *need_local_opts) MONO_INTERNAL;
void mono_if_conversion (MonoCompile *cfg) MONO_INTERNAL;
+/* virtual function delegate */
+gpointer mono_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method) MONO_INTERNAL;
+
/* methods that must be provided by the arch-specific port */
void mono_arch_init (void) MONO_INTERNAL;
void mono_arch_finish_init (void) MONO_INTERNAL;
@@ -2426,6 +2456,7 @@ void mono_arch_nullify_class_init_trampoline(guint8 *code, mgreg_t *regs) MO
int mono_arch_get_this_arg_reg (guint8 *code) MONO_INTERNAL;
gpointer mono_arch_get_this_arg_from_call (mgreg_t *regs, guint8 *code) MONO_INTERNAL;
gpointer mono_arch_get_delegate_invoke_impl (MonoMethodSignature *sig, gboolean has_target) MONO_INTERNAL;
+gpointer mono_arch_get_delegate_virtual_invoke_impl (MonoMethodSignature *sig, MonoMethod *method, int offset, gboolean load_imt_reg) MONO_INTERNAL;
gpointer mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, guint32 *code_len) MONO_INTERNAL;
void mono_arch_emit_imt_argument (MonoCompile *cfg, MonoCallInst *call, MonoInst *imt_arg) MONO_INTERNAL;
MonoMethod* mono_arch_find_imt_method (mgreg_t *regs, guint8 *code) MONO_INTERNAL;
@@ -2480,6 +2511,7 @@ typedef gboolean (*MonoExceptionFrameWalk) (MonoMethod *method, gpointer ip
gboolean mono_exception_walk_trace (MonoException *ex, MonoExceptionFrameWalk func, gpointer user_data);
void mono_restore_context (MonoContext *ctx) MONO_INTERNAL;
guint8* mono_jinfo_get_unwind_info (MonoJitInfo *ji, guint32 *unwind_info_len) MONO_INTERNAL;
+int mono_jinfo_get_epilog_size (MonoJitInfo *ji) MONO_INTERNAL;
gboolean
mono_find_jit_info_ext (MonoDomain *domain, MonoJitTlsData *jit_tls,
@@ -2779,6 +2811,8 @@ void mono_runtime_posix_install_handlers (void) MONO_INTERNAL;
pid_t mono_runtime_syscall_fork (void) MONO_INTERNAL;
void mono_gdb_render_native_backtraces (pid_t crashed_pid) MONO_INTERNAL;
+void mono_cross_helpers_run (void) MONO_INTERNAL;
+
/*
* Signal handling
*/
@@ -2805,7 +2839,7 @@ void mono_gdb_render_native_backtraces (pid_t crashed_pid) MONO_INTERNAL;
#endif
#endif
-#ifdef MONO_ARCH_USE_SIGACTION
+#if defined(MONO_ARCH_USE_SIGACTION) && !defined(HOST_WIN32)
#define SIG_HANDLER_SIGNATURE(ftn) ftn (int _dummy, siginfo_t *info, void *context)
#define SIG_HANDLER_FUNC(access, ftn) MONO_SIGNAL_HANDLER_FUNC (access, ftn, (int _dummy, siginfo_t *info, void *context))
#define SIG_HANDLER_PARAMS _dummy, info, context
@@ -2865,12 +2899,6 @@ gboolean SIG_HANDLER_SIGNATURE (mono_chain_signal) MONO_INTERNAL;
#define MONO_ARCH_DYN_CALL_PARAM_AREA 0
#endif
-#ifdef MONO_ARCH_HAVE_IMT
-#define ARCH_HAVE_IMT 1
-#else
-#define ARCH_HAVE_IMT 0
-#endif
-
#ifdef MONO_ARCH_VARARG_ICALLS
#define ARCH_VARARG_ICALLS 1
#else
diff --git a/mono/mini/simd-intrinsics.c b/mono/mini/simd-intrinsics.c
index ff737bbe934..2fb8f0709a9 100644
--- a/mono/mini/simd-intrinsics.c
+++ b/mono/mini/simd-intrinsics.c
@@ -13,6 +13,7 @@
#include "mini.h"
#include "ir-emit.h"
#include "mono/utils/bsearch.h"
+#include <mono/metadata/abi-details.h>
/*
General notes on SIMD intrinsics
@@ -1569,7 +1570,7 @@ mono_emit_vector_ldelema (MonoCompile *cfg, MonoType *array_type, MonoInst *arr,
MONO_EMIT_NEW_BIALU_IMM (cfg, OP_MUL_IMM, mult_reg, index2_reg, size);
MONO_EMIT_NEW_BIALU (cfg, OP_PADD, add_reg, array_reg, mult_reg);
- NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, G_STRUCT_OFFSET (MonoArray, vector));
+ NEW_BIALU_IMM (cfg, ins, OP_PADD_IMM, add_reg, add_reg, MONO_STRUCT_OFFSET (MonoArray, vector));
ins->type = STACK_PTR;
MONO_ADD_INS (cfg->cbb, ins);
diff --git a/mono/mini/ssapre.c b/mono/mini/ssapre.c
index a6499d13d5f..692eedfaccb 100644
--- a/mono/mini/ssapre.c
+++ b/mono/mini/ssapre.c
@@ -651,7 +651,7 @@ add_expression_to_tree (MonoSsapreExpression *tree, MonoSsapreExpression *expres
}
#if (MONO_APPLY_SSAPRE_TO_SINGLE_EXPRESSION)
-static char *mono_ssapre_expression_name = NULL;
+static char *mono_ssapre_expression_name;
static gboolean
check_ssapre_expression_name (MonoSsapreWorkArea *area, MonoSsapreExpressionDescription *expression_description) {
if (area->expression_is_handled_father) {
diff --git a/mono/mini/tasklets.c b/mono/mini/tasklets.c
index 6766c26a694..28e7644d29c 100644
--- a/mono/mini/tasklets.c
+++ b/mono/mini/tasklets.c
@@ -8,10 +8,10 @@
#if defined(MONO_SUPPORT_TASKLETS)
/* keepalive_stacks could be a per-stack var to avoid locking overhead */
-static MonoGHashTable *keepalive_stacks = NULL;
-static CRITICAL_SECTION tasklets_mutex;
-#define tasklets_lock() EnterCriticalSection(&tasklets_mutex)
-#define tasklets_unlock() LeaveCriticalSection(&tasklets_mutex)
+static MonoGHashTable *keepalive_stacks;
+static mono_mutex_t tasklets_mutex;
+#define tasklets_lock() mono_mutex_lock(&tasklets_mutex)
+#define tasklets_unlock() mono_mutex_unlock(&tasklets_mutex)
/* LOCKING: tasklets_mutex is assumed to e taken */
static void
@@ -146,7 +146,7 @@ continuation_restore (MonoContinuation *cont, int state)
void
mono_tasklets_init (void)
{
- InitializeCriticalSection (&tasklets_mutex);
+ mono_mutex_init_recursive (&tasklets_mutex);
mono_add_internal_call ("Mono.Tasklets.Continuation::alloc", continuation_alloc);
mono_add_internal_call ("Mono.Tasklets.Continuation::free", continuation_free);
diff --git a/mono/mini/tramp-amd64.c b/mono/mini/tramp-amd64.c
index 69f4fb65979..9ba8502250f 100644
--- a/mono/mini/tramp-amd64.c
+++ b/mono/mini/tramp-amd64.c
@@ -13,6 +13,7 @@
#include <config.h>
#include <glib.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/tabledefs.h>
@@ -585,17 +586,17 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, 8, sizeof(gpointer));
else
amd64_mov_reg_imm (code, AMD64_R11, 0);
- amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rip), AMD64_R11, sizeof(mgreg_t));
+ amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rip), AMD64_R11, sizeof(mgreg_t));
/* Save fp */
amd64_mov_reg_membase (code, AMD64_R11, AMD64_RSP, framesize, sizeof(mgreg_t));
- amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rbp), AMD64_R11, sizeof(mgreg_t));
+ amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rbp), AMD64_R11, sizeof(mgreg_t));
/* Save sp */
amd64_mov_reg_reg (code, AMD64_R11, AMD64_RSP, sizeof(mgreg_t));
amd64_alu_reg_imm (code, X86_ADD, AMD64_R11, framesize + 16);
- amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, rsp), AMD64_R11, sizeof(mgreg_t));
+ amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, rsp), AMD64_R11, sizeof(mgreg_t));
/* Save pointer to registers */
amd64_lea_membase (code, AMD64_R11, AMD64_RBP, saved_regs_offset);
- amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, regs), AMD64_R11, sizeof(mgreg_t));
+ amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, regs), AMD64_R11, sizeof(mgreg_t));
if (aot) {
code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_get_lmf_addr");
@@ -605,13 +606,13 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
amd64_call_reg (code, AMD64_R11);
/* Save lmf_addr */
- amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), AMD64_RAX, sizeof(gpointer));
+ amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), AMD64_RAX, sizeof(gpointer));
/* Save previous_lmf */
/* Set the lowest bit to signal that this LMF has the ip field set */
/* Set the third lowest bit to signal that this is a MonoLMFTramp structure */
amd64_mov_reg_membase (code, AMD64_R11, AMD64_RAX, 0, sizeof(gpointer));
amd64_alu_reg_imm_size (code, X86_ADD, AMD64_R11, 0x5, sizeof(gpointer));
- amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer));
+ amd64_mov_membase_reg (code, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), AMD64_R11, sizeof(gpointer));
/* Set new lmf */
amd64_lea_membase (code, AMD64_R11, AMD64_RBP, lmf_offset);
amd64_mov_membase_reg (code, AMD64_RAX, 0, AMD64_R11, sizeof(gpointer));
@@ -658,9 +659,9 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
amd64_mov_reg_membase (code, AMD64_RAX, AMD64_RBP, res_offset, sizeof(mgreg_t));
/* Restore LMF */
- amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer));
+ amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof(gpointer));
amd64_alu_reg_imm_size (code, X86_SUB, AMD64_RCX, 0x5, sizeof(gpointer));
- amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, lmf_offset + G_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), sizeof(gpointer));
+ amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, lmf_offset + MONO_STRUCT_OFFSET (MonoLMFTramp, lmf_addr), sizeof(gpointer));
amd64_mov_membase_reg (code, AMD64_R11, 0, AMD64_RCX, sizeof(gpointer));
/*
@@ -833,7 +834,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
amd64_mov_reg_reg (code, AMD64_RAX, AMD64_ARG_REG1, 8);
} else {
/* load rgctx ptr from vtable */
- amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), sizeof(gpointer));
+ amd64_mov_reg_membase (code, AMD64_RAX, AMD64_ARG_REG1, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), sizeof(gpointer));
/* is the rgctx ptr null? */
amd64_test_reg_reg (code, AMD64_RAX, AMD64_RAX);
/* if yes, jump to actual trampoline */
@@ -972,7 +973,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
unwind_ops = mono_arch_get_cie_program ();
- if (mono_thread_get_tls_offset () != -1) {
+ if (!aot && mono_thread_get_tls_offset () != -1) {
/* MonoObject* obj is in RDI */
/* is obj null? */
amd64_test_reg_reg (code, AMD64_RDI, AMD64_RDI);
@@ -981,7 +982,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
amd64_branch8 (code, X86_CC_Z, -1, 1);
/* load obj->synchronization to RCX */
- amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, G_STRUCT_OFFSET (MonoObject, synchronisation), 8);
+ amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 8);
if (mono_gc_is_moving ()) {
/*if bit zero is set it's a thin hash*/
@@ -1003,7 +1004,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
/* load MonoInternalThread* into RDX */
code = mono_amd64_emit_tls_get (code, AMD64_RDX, mono_thread_get_tls_offset ());
/* load TID into RDX */
- amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 8);
+ amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 8);
/* is synchronization->owner null? */
amd64_alu_membase_imm_size (code, X86_CMP, AMD64_RCX, owner_offset, 0, 8);
@@ -1097,7 +1098,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
unwind_ops = mono_arch_get_cie_program ();
- if (mono_thread_get_tls_offset () != -1) {
+ if (!aot && mono_thread_get_tls_offset () != -1) {
/* MonoObject* obj is in RDI */
/* is obj null? */
amd64_test_reg_reg (code, AMD64_RDI, AMD64_RDI);
@@ -1106,7 +1107,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
amd64_branch8 (code, X86_CC_Z, -1, 1);
/* load obj->synchronization to RCX */
- amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, G_STRUCT_OFFSET (MonoObject, synchronisation), 8);
+ amd64_mov_reg_membase (code, AMD64_RCX, AMD64_RDI, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 8);
if (mono_gc_is_moving ()) {
/*if bit zero is set it's a thin hash*/
@@ -1129,7 +1130,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
/* load MonoInternalThread* into RDX */
code = mono_amd64_emit_tls_get (code, AMD64_RDX, mono_thread_get_tls_offset ());
/* load TID into RDX */
- amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 8);
+ amd64_mov_reg_membase (code, AMD64_RDX, AMD64_RDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 8);
/* is synchronization->owner == TID */
amd64_alu_membase_reg_size (code, X86_CMP, AMD64_RCX, owner_offset, AMD64_RDX, 8);
/* if no, jump to actual trampoline */
@@ -1228,7 +1229,7 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
if (mono_get_jit_tls_offset () != -1) {
code = mono_amd64_emit_tls_get (code, AMD64_RDI, mono_get_jit_tls_offset ());
- amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RDI, G_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 8);
+ amd64_mov_reg_membase (code, AMD64_RDI, AMD64_RDI, MONO_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 8);
/* Simulate a call */
amd64_push_reg (code, AMD64_RAX);
amd64_jump_code (code, tramp);
diff --git a/mono/mini/tramp-arm.c b/mono/mini/tramp-arm.c
index 9810f48f79c..bb500a7c0f5 100644
--- a/mono/mini/tramp-arm.c
+++ b/mono/mini/tramp-arm.c
@@ -12,6 +12,7 @@
#include <config.h>
#include <glib.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/tabledefs.h>
@@ -296,33 +297,33 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
*/
/* r0 is the result from mono_get_lmf_addr () */
- ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+ ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
/* new_lmf->previous_lmf = *lmf_addr */
- ARM_LDR_IMM (code, ARMREG_R2, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
- ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_LDR_IMM (code, ARMREG_R2, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* *(lmf_addr) = r1 */
- ARM_STR_IMM (code, ARMREG_V1, ARMREG_R0, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_STR_IMM (code, ARMREG_V1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* save method info (it's in v2) */
if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP))
- ARM_STR_IMM (code, ARMREG_V2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, method));
+ ARM_STR_IMM (code, ARMREG_V2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, method));
else {
ARM_MOV_REG_IMM8 (code, ARMREG_R2, 0);
- ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, method));
+ ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, method));
}
/* save caller SP */
code = mono_arm_emit_load_imm (code, ARMREG_R2, cfa_offset);
ARM_ADD_REG_REG (code, ARMREG_R2, ARMREG_SP, ARMREG_R2);
- ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, sp));
+ ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, sp));
/* save caller FP */
- ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (G_STRUCT_OFFSET (MonoLMF, iregs) + ARMREG_FP*4));
- ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fp));
+ ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (MONO_STRUCT_OFFSET (MonoLMF, iregs) + ARMREG_FP*4));
+ ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fp));
/* save the IP (caller ip) */
if (tramp_type == MONO_TRAMPOLINE_JUMP) {
ARM_MOV_REG_IMM8 (code, ARMREG_R2, 0);
} else {
- ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (G_STRUCT_OFFSET (MonoLMF, iregs) + 13*4));
+ ARM_LDR_IMM (code, ARMREG_R2, ARMREG_V1, (MONO_STRUCT_OFFSET (MonoLMF, iregs) + 13*4));
}
- ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, ip));
+ ARM_STR_IMM (code, ARMREG_R2, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, ip));
/* Save VFP registers. */
if (mono_arm_is_hard_float ()) {
@@ -331,7 +332,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
* it's easier than attempting to store them on the stack since
* this trampoline code is pretty messy.
*/
- ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fregs));
+ ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fregs));
ARM_FSTMD (code, ARM_VFP_D0, 8, ARMREG_R0);
}
@@ -339,7 +340,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
* Now we're ready to call xxx_trampoline ().
*/
/* Arg 1: the saved registers */
- ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, iregs), 0);
+ ARM_ADD_REG_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, iregs), 0);
/* Arg 2: code (next address to the instruction that called us) */
if (tramp_type == MONO_TRAMPOLINE_JUMP) {
@@ -378,7 +379,7 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
* clobbered). This way we can just restore all the regs in one inst
* and branch to IP.
*/
- ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, iregs) + (ARMREG_R12 * sizeof (mgreg_t)));
+ ARM_STR_IMM (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, iregs) + (ARMREG_R12 * sizeof (mgreg_t)));
/* Check for thread interruption */
/* This is not perf critical code so no need to check the interrupt flag */
@@ -413,15 +414,15 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
* the same state as before we executed.
*/
/* ip = previous_lmf */
- ARM_LDR_IMM (code, ARMREG_IP, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_LDR_IMM (code, ARMREG_IP, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* lr = lmf_addr */
- ARM_LDR_IMM (code, ARMREG_LR, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, lmf_addr));
+ ARM_LDR_IMM (code, ARMREG_LR, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, lmf_addr));
/* *(lmf_addr) = previous_lmf */
- ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, G_STRUCT_OFFSET (MonoLMF, previous_lmf));
+ ARM_STR_IMM (code, ARMREG_IP, ARMREG_LR, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
/* Restore VFP registers. */
if (mono_arm_is_hard_float ()) {
- ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, G_STRUCT_OFFSET (MonoLMF, fregs));
+ ARM_ADD_REG_IMM8 (code, ARMREG_R0, ARMREG_V1, MONO_STRUCT_OFFSET (MonoLMF, fregs));
ARM_FLDMD (code, ARM_VFP_D0, 8, ARMREG_R0);
}
@@ -703,8 +704,8 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
ARM_MOV_REG_REG (code, ARMREG_R1, ARMREG_R0);
} else {
/* load rgctx ptr from vtable */
- g_assert (arm_is_imm12 (G_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
- ARM_LDR_IMM (code, ARMREG_R1, ARMREG_R0, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
+ g_assert (arm_is_imm12 (MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
+ ARM_LDR_IMM (code, ARMREG_R1, ARMREG_R0, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
/* is the rgctx ptr null? */
ARM_CMP_REG_IMM (code, ARMREG_R1, 0, 0);
/* if yes, jump to actual trampoline */
diff --git a/mono/mini/tramp-mips.c b/mono/mini/tramp-mips.c
index d7b598537d8..9b80527ae79 100644
--- a/mono/mini/tramp-mips.c
+++ b/mono/mini/tramp-mips.c
@@ -16,6 +16,7 @@
#include <config.h>
#include <glib.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/tabledefs.h>
@@ -408,8 +409,8 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
mips_move (code, mips_a1, mips_a0);
} else {
/* load rgctx ptr from vtable */
- g_assert (mips_is_imm16 (G_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
- mips_lw (code, mips_a1, mips_a0, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
+ g_assert (mips_is_imm16 (MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context)));
+ mips_lw (code, mips_a1, mips_a0, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context));
/* is the rgctx ptr null? */
/* if yes, jump to actual trampoline */
rgctx_null_jumps [njumps ++] = code;
diff --git a/mono/mini/tramp-ppc.c b/mono/mini/tramp-ppc.c
index aec06abc142..6fac1a1bcb0 100644
--- a/mono/mini/tramp-ppc.c
+++ b/mono/mini/tramp-ppc.c
@@ -14,6 +14,7 @@
#include <config.h>
#include <glib.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/tabledefs.h>
@@ -545,7 +546,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
ppc_mr (code, ppc_r4, PPC_FIRST_ARG_REG);
} else {
/* load rgctx ptr from vtable */
- ppc_ldptr (code, ppc_r4, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), PPC_FIRST_ARG_REG);
+ ppc_ldptr (code, ppc_r4, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), PPC_FIRST_ARG_REG);
/* is the rgctx ptr null? */
ppc_compare_reg_imm (code, 0, ppc_r4, 0);
/* if yes, jump to actual trampoline */
diff --git a/mono/mini/tramp-s390x.c b/mono/mini/tramp-s390x.c
index d694c70f01d..fa664e12e11 100644
--- a/mono/mini/tramp-s390x.c
+++ b/mono/mini/tramp-s390x.c
@@ -46,6 +46,7 @@
#include <glib.h>
#include <string.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/marshal.h>
#include <mono/metadata/tabledefs.h>
@@ -533,7 +534,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
s390_lgr (code, s390_r1, s390_r2);
} else {
/* load rgctx ptr from vtable */
- s390_lg (code, s390_r1, 0, s390_r2, G_STRUCT_OFFSET(MonoVTable, runtime_generic_context));
+ s390_lg (code, s390_r1, 0, s390_r2, MONO_STRUCT_OFFSET(MonoVTable, runtime_generic_context));
/* is the rgctx ptr null? */
s390_ltgr (code, s390_r1, s390_r1);
/* if yes, jump to actual trampoline */
diff --git a/mono/mini/tramp-x86.c b/mono/mini/tramp-x86.c
index 5d9f17dff5e..4b3b5b6192d 100644
--- a/mono/mini/tramp-x86.c
+++ b/mono/mini/tramp-x86.c
@@ -10,6 +10,7 @@
#include <config.h>
#include <glib.h>
+#include <mono/metadata/abi-details.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/metadata-internals.h>
#include <mono/metadata/marshal.h>
@@ -25,6 +26,8 @@
#include "mini.h"
#include "mini-x86.h"
+#define ALIGN_TO(val,align) ((((guint64)val) + ((align) - 1)) & ~((align) - 1))
+
/*
* mono_arch_get_unbox_trampoline:
* @m: method pointer
@@ -297,9 +300,9 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
{
char *tramp_name;
guint8 *buf, *code, *tramp;
- int pushed_args, pushed_args_caller_saved;
GSList *unwind_ops = NULL;
MonoJumpInfo *ji = NULL;
+ int i, offset, frame_size, regarray_offset, lmf_offset, caller_ip_offset, arg_offset;
unwind_ops = mono_arch_get_cie_program ();
@@ -310,65 +313,75 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
* the ret address is at: esp + (pushed_args + 1) * sizeof (gpointer)
*/
- /* Put all registers into an array on the stack
- * If this code is changed, make sure to update the offset value in
- * mono_arch_get_this_arg_from_call () in mini-x86.c.
- */
- x86_push_reg (code, X86_EDI);
- x86_push_reg (code, X86_ESI);
- x86_push_reg (code, X86_EBP);
- x86_push_reg (code, X86_ESP);
- x86_push_reg (code, X86_EBX);
- x86_push_reg (code, X86_EDX);
- x86_push_reg (code, X86_ECX);
- x86_push_reg (code, X86_EAX);
-
- pushed_args_caller_saved = pushed_args = 8;
-
- /* Align stack on apple */
- x86_alu_reg_imm (code, X86_SUB, X86_ESP, 4);
-
- pushed_args ++;
-
- /* save LMF begin */
-
- /* save the IP (caller ip) */
- if (tramp_type == MONO_TRAMPOLINE_JUMP)
- x86_push_imm (code, 0);
- else
- x86_push_membase (code, X86_ESP, (pushed_args + 1) * sizeof (gpointer));
-
- pushed_args++;
-
+ // FIXME: Unwind info
+
+ /* Compute frame offsets relative to the frame pointer %ebp */
+ arg_offset = sizeof (mgreg_t);
+ caller_ip_offset = 2 * sizeof (mgreg_t);
+ offset = 0;
+ offset += sizeof (MonoLMF);
+ lmf_offset = -offset;
+ offset += X86_NREG * sizeof (mgreg_t);
+ regarray_offset = -offset;
+ /* Argument area */
+ offset += 4 * sizeof (mgreg_t);
+ frame_size = ALIGN_TO (offset, MONO_ARCH_FRAME_ALIGNMENT);
+
+ /* Allocate frame */
x86_push_reg (code, X86_EBP);
- x86_push_reg (code, X86_ESI);
- x86_push_reg (code, X86_EDI);
- x86_push_reg (code, X86_EBX);
-
- pushed_args += 4;
-
- /* save ESP */
- x86_push_reg (code, X86_ESP);
- /* Adjust ESP so it points to the previous frame */
- x86_alu_membase_imm (code, X86_ADD, X86_ESP, 0, (pushed_args + 2) * 4);
-
- pushed_args ++;
-
- /* save method info */
- if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP))
- x86_push_membase (code, X86_ESP, pushed_args * sizeof (gpointer));
- else
- x86_push_imm (code, 0);
-
- pushed_args++;
-
- /* On apple, the stack is correctly aligned to 16 bytes because pushed_args is
- * 16 and there is the extra trampoline arg + the return ip pushed by call
- * FIXME: Note that if an exception happens while some args are pushed
- * on the stack, the stack will be misaligned.
- */
- g_assert (pushed_args == 16);
+ x86_mov_reg_reg (code, X86_EBP, X86_ESP, sizeof (mgreg_t));
+ /* There are three words on the stack, adding + 4 aligns the stack to 16, which is needed on osx */
+ x86_alu_reg_imm (code, X86_SUB, X86_ESP, frame_size + sizeof (mgreg_t));
+
+ /* Save all registers */
+ for (i = X86_EAX; i <= X86_EDI; ++i) {
+ int reg = i;
+
+ if (i == X86_EBP) {
+ /* Save original ebp */
+ /* EAX is already saved */
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, 0, sizeof (mgreg_t));
+ reg = X86_EAX;
+ } else if (i == X86_ESP) {
+ /* Save original esp */
+ /* EAX is already saved */
+ x86_mov_reg_reg (code, X86_EAX, X86_EBP, sizeof (mgreg_t));
+ /* Saved ebp + trampoline arg + return addr */
+ x86_alu_reg_imm (code, X86_ADD, X86_EAX, 3 * sizeof (mgreg_t));
+ reg = X86_EAX;
+ }
+ x86_mov_membase_reg (code, X86_EBP, regarray_offset + (i * sizeof (mgreg_t)), reg, sizeof (mgreg_t));
+ }
+ /* Setup LMF */
+ /* eip */
+ if (tramp_type == MONO_TRAMPOLINE_JUMP) {
+ x86_mov_membase_imm (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), 0, sizeof (mgreg_t));
+ } else {
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, caller_ip_offset, sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, eip), X86_EAX, sizeof (mgreg_t));
+ }
+ /* method */
+ if ((tramp_type == MONO_TRAMPOLINE_JIT) || (tramp_type == MONO_TRAMPOLINE_JUMP)) {
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, arg_offset, sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), X86_EAX, sizeof (mgreg_t));
+ } else {
+ x86_mov_membase_imm (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, method), 0, sizeof (mgreg_t));
+ }
+ /* esp */
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_ESP * sizeof (mgreg_t)), sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esp), X86_EAX, sizeof (mgreg_t));
+ /* callee save registers */
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EBX * sizeof (mgreg_t)), sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebx), X86_EAX, sizeof (mgreg_t));
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EDI * sizeof (mgreg_t)), sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, edi), X86_EAX, sizeof (mgreg_t));
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_ESI * sizeof (mgreg_t)), sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, esi), X86_EAX, sizeof (mgreg_t));
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, regarray_offset + (X86_EBP * sizeof (mgreg_t)), sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, ebp), X86_EAX, sizeof (mgreg_t));
+
+ /* Push LMF */
/* get the address of lmf for the current thread */
if (aot) {
code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_get_lmf_addr");
@@ -376,53 +389,46 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
} else {
x86_call_code (code, mono_get_lmf_addr);
}
- /* push lmf */
- x86_push_reg (code, X86_EAX);
- /* push *lfm (previous_lmf) */
- x86_push_membase (code, X86_EAX, 0);
+ /* lmf->lmf_addr = lmf_addr (%eax) */
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), X86_EAX, sizeof (mgreg_t));
+ /* lmf->previous_lmf = *(lmf_addr) */
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, 0, sizeof (mgreg_t));
/* Signal to mono_arch_find_jit_info () that this is a trampoline frame */
- x86_alu_membase_imm (code, X86_ADD, X86_ESP, 0, 1);
- /* *(lmf) = ESP */
- x86_mov_membase_reg (code, X86_EAX, 0, X86_ESP, 4);
- /* save LFM end */
-
- pushed_args += 2;
-
- /* starting the call sequence */
-
- /* FIXME: Push the trampoline address */
- x86_push_imm (code, 0);
-
- pushed_args++;
-
- /* push the method info */
- x86_push_membase (code, X86_ESP, pushed_args * sizeof (gpointer));
-
- pushed_args++;
-
- /* push the return address onto the stack */
- if (tramp_type == MONO_TRAMPOLINE_JUMP)
- x86_push_imm (code, 0);
- else
- x86_push_membase (code, X86_ESP, (pushed_args + 1) * sizeof (gpointer));
- pushed_args++;
- /* push the address of the register array */
- x86_lea_membase (code, X86_EAX, X86_ESP, (pushed_args - 8) * sizeof (gpointer));
- x86_push_reg (code, X86_EAX);
-
- pushed_args++;
+ x86_alu_reg_imm (code, X86_ADD, X86_ECX, 1);
+ x86_mov_membase_reg (code, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), X86_ECX, sizeof (mgreg_t));
+ /* *lmf_addr = lmf */
+ x86_lea_membase (code, X86_ECX, X86_EBP, lmf_offset);
+ x86_mov_membase_reg (code, X86_EAX, 0, X86_ECX, sizeof (mgreg_t));
+
+ /* Call trampoline function */
+ /* Arg 1 - registers */
+ x86_lea_membase (code, X86_EAX, X86_EBP, regarray_offset);
+ x86_mov_membase_reg (code, X86_ESP, (0 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t));
+ /* Arg2 - calling code */
+ if (tramp_type == MONO_TRAMPOLINE_JUMP) {
+ x86_mov_membase_imm (code, X86_ESP, (1 * sizeof (mgreg_t)), 0, sizeof (mgreg_t));
+ } else {
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, caller_ip_offset, sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_ESP, (1 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t));
+ }
+ /* Arg3 - trampoline argument */
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, arg_offset, sizeof (mgreg_t));
+ x86_mov_membase_reg (code, X86_ESP, (2 * sizeof (mgreg_t)), X86_EAX, sizeof (mgreg_t));
+ /* Arg4 - trampoline address */
+ // FIXME:
+ x86_mov_membase_imm (code, X86_ESP, (3 * sizeof (mgreg_t)), 0, sizeof (mgreg_t));
#ifdef __APPLE__
/* check the stack is aligned after the ret ip is pushed */
- /*x86_mov_reg_reg (buf, X86_EDX, X86_ESP, 4);
- x86_alu_reg_imm (buf, X86_AND, X86_EDX, 15);
- x86_alu_reg_imm (buf, X86_CMP, X86_EDX, 0);
- x86_branch_disp (buf, X86_CC_Z, 3, FALSE);
- x86_breakpoint (buf);*/
+ /*
+ x86_mov_reg_reg (code, X86_EDX, X86_ESP, 4);
+ x86_alu_reg_imm (code, X86_AND, X86_EDX, 15);
+ x86_alu_reg_imm (code, X86_CMP, X86_EDX, 0);
+ x86_branch_disp (code, X86_CC_Z, 3, FALSE);
+ x86_breakpoint (code);
+ */
#endif
- mono_add_unwind_op_def_cfa (unwind_ops, code, buf, X86_ESP, ((pushed_args + 2) * 4));
-
if (aot) {
char *icall_name = g_strdup_printf ("trampoline_func_%d", tramp_type);
code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, icall_name);
@@ -432,96 +438,53 @@ mono_arch_create_generic_trampoline (MonoTrampolineType tramp_type, MonoTrampInf
x86_call_code (code, tramp);
}
- x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4*4);
-
- pushed_args -= 4;
+ /*
+ * Overwrite the trampoline argument with the address we need to jump to,
+ * to free %eax.
+ */
+ x86_mov_membase_reg (code, X86_EBP, arg_offset, X86_EAX, 4);
- /* Check for thread interruption */
- /* This is not perf critical code so no need to check the interrupt flag */
- /* Align the stack on osx */
- x86_alu_reg_imm (code, X86_SUB, X86_ESP, 3 * 4);
- x86_push_reg (code, X86_EAX);
+ /* Check for interruptions */
if (aot) {
code = mono_arch_emit_load_aotconst (buf, code, &ji, MONO_PATCH_INFO_JIT_ICALL_ADDR, "mono_thread_force_interruption_checkpoint");
x86_call_reg (code, X86_EAX);
} else {
x86_call_code (code, (guint8*)mono_thread_force_interruption_checkpoint);
}
- x86_pop_reg (code, X86_EAX);
- x86_alu_reg_imm (code, X86_ADD, X86_ESP, 3 * 4);
/* Restore LMF */
-
- /* ebx = previous_lmf */
- x86_pop_reg (code, X86_EBX);
- pushed_args--;
- x86_alu_reg_imm (code, X86_SUB, X86_EBX, 1);
-
- /* edi = lmf */
- x86_pop_reg (code, X86_EDI);
- pushed_args--;
-
- /* *(lmf) = previous_lmf */
- x86_mov_membase_reg (code, X86_EDI, 0, X86_EBX, 4);
-
- /* discard method info */
- x86_pop_reg (code, X86_ESI);
- pushed_args--;
-
- /* discard ESP */
- x86_pop_reg (code, X86_ESI);
- pushed_args--;
-
- /* restore caller saved regs */
- x86_pop_reg (code, X86_EBX);
- x86_pop_reg (code, X86_EDI);
- x86_pop_reg (code, X86_ESI);
- x86_pop_reg (code, X86_EBP);
-
- pushed_args -= 4;
-
- /* discard save IP */
- x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4);
- pushed_args--;
-
- /* restore LMF end */
-
- if (!MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) {
- /*
- * Overwrite the method ptr with the address we need to jump to,
- * to free %eax.
- */
- x86_mov_membase_reg (code, X86_ESP, pushed_args * sizeof (gpointer), X86_EAX, 4);
+ x86_mov_reg_membase (code, X86_EAX, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, lmf_addr), sizeof (mgreg_t));
+ x86_mov_reg_membase (code, X86_ECX, X86_EBP, lmf_offset + G_STRUCT_OFFSET (MonoLMF, previous_lmf), sizeof (mgreg_t));
+ x86_alu_reg_imm (code, X86_SUB, X86_ECX, 1);
+ x86_mov_membase_reg (code, X86_EAX, 0, X86_ECX, sizeof (mgreg_t));
+
+ /* Restore registers */
+ for (i = X86_EAX; i <= X86_EDI; ++i) {
+ if (i == X86_ESP || i == X86_EBP)
+ continue;
+ if (i == X86_EAX && !((tramp_type == MONO_TRAMPOLINE_RESTORE_STACK_PROT) || (tramp_type == MONO_TRAMPOLINE_AOT_PLT)))
+ continue;
+ x86_mov_reg_membase (code, i, X86_EBP, regarray_offset + (i * 4), 4);
}
- /* Restore caller saved registers */
- x86_mov_reg_membase (code, X86_ECX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_ECX) * 4, 4);
- x86_mov_reg_membase (code, X86_EDX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_EDX) * 4, 4);
- if ((tramp_type == MONO_TRAMPOLINE_RESTORE_STACK_PROT) || (tramp_type == MONO_TRAMPOLINE_AOT_PLT))
- x86_mov_reg_membase (code, X86_EAX, X86_ESP, (pushed_args - pushed_args_caller_saved + X86_EAX) * 4, 4);
-
- if (!MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) {
- /* Pop saved reg array + stack align */
- x86_alu_reg_imm (code, X86_ADD, X86_ESP, 9 * 4);
- pushed_args -= 9;
- g_assert (pushed_args == 0);
- } else {
- /* Pop saved reg array + stack align + method ptr */
- x86_alu_reg_imm (code, X86_ADD, X86_ESP, 10 * 4);
- pushed_args -= 10;
-
- /* We've popped one more stack item than we've pushed (the
- method ptr argument), so we must end up at -1. */
- g_assert (pushed_args == -1);
- }
+ /* Restore frame */
+ x86_leave (code);
- /*block guard trampolines are called with the stack aligned but must exit with the stack unaligned. */
- if (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD) {
- x86_pop_reg (code, X86_EAX);
- x86_alu_reg_imm (code, X86_ADD, X86_ESP, 0x8);
- x86_jump_reg (code, X86_EAX);
- } else {
+ if (MONO_TRAMPOLINE_TYPE_MUST_RETURN (tramp_type)) {
+ /* Load the value returned by the trampoline */
+ x86_mov_reg_membase (code, X86_EAX, X86_ESP, 0, 4);
+ /* The trampoline returns normally, pop the trampoline argument */
+ x86_alu_reg_imm (code, X86_ADD, X86_ESP, 4);
x86_ret (code);
+ } else {
+ /* The trampoline argument is at the top of the stack, and it contains the address we need to branch to */
+ if (tramp_type == MONO_TRAMPOLINE_HANDLER_BLOCK_GUARD) {
+ x86_pop_reg (code, X86_EAX);
+ x86_alu_reg_imm (code, X86_ADD, X86_ESP, 0x8);
+ x86_jump_reg (code, X86_EAX);
+ } else {
+ x86_ret (code);
+ }
}
nacl_global_codeman_validate (&buf, 256, &code);
@@ -622,7 +585,7 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
x86_mov_reg_membase (code, X86_EAX, X86_ESP, 4, 4);
if (!mrgctx) {
/* load rgctx ptr from vtable */
- x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoVTable, runtime_generic_context), 4);
+ x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoVTable, runtime_generic_context), 4);
/* is the rgctx ptr null? */
x86_test_reg_reg (code, X86_EAX, X86_EAX);
/* if yes, jump to actual trampoline */
@@ -834,7 +797,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
x86_branch8 (code, X86_CC_Z, -1, 1);
/* load obj->synchronization to ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoObject, synchronisation), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 4);
if (mono_gc_is_moving ()) {
/*if bit zero is set it's a thin hash*/
@@ -865,7 +828,7 @@ mono_arch_create_monitor_enter_trampoline (MonoTrampInfo **info, gboolean aot)
code = mono_x86_emit_tls_get (code, X86_EDX, mono_thread_get_tls_offset ());
}
/* load TID into EDX */
- x86_mov_reg_membase (code, X86_EDX, X86_EDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 4);
+ x86_mov_reg_membase (code, X86_EDX, X86_EDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 4);
/* is synchronization->owner null? */
x86_alu_membase_imm (code, X86_CMP, X86_ECX, owner_offset, 0);
@@ -975,7 +938,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
x86_branch8 (code, X86_CC_Z, -1, 1);
/* load obj->synchronization to ECX */
- x86_mov_reg_membase (code, X86_ECX, X86_EAX, G_STRUCT_OFFSET (MonoObject, synchronisation), 4);
+ x86_mov_reg_membase (code, X86_ECX, X86_EAX, MONO_STRUCT_OFFSET (MonoObject, synchronisation), 4);
if (mono_gc_is_moving ()) {
/*if bit zero is set it's a thin hash*/
@@ -1006,7 +969,7 @@ mono_arch_create_monitor_exit_trampoline (MonoTrampInfo **info, gboolean aot)
code = mono_x86_emit_tls_get (code, X86_EDX, mono_thread_get_tls_offset ());
}
/* load TID into EDX */
- x86_mov_reg_membase (code, X86_EDX, X86_EDX, G_STRUCT_OFFSET (MonoInternalThread, tid), 4);
+ x86_mov_reg_membase (code, X86_EDX, X86_EDX, MONO_STRUCT_OFFSET (MonoInternalThread, tid), 4);
/* is synchronization->owner == TID */
x86_alu_membase_reg (code, X86_CMP, X86_ECX, owner_offset, X86_EDX);
/* if no, jump to actual trampoline */
@@ -1121,7 +1084,7 @@ mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
if (mono_get_jit_tls_offset () != -1) {
code = mono_x86_emit_tls_get (code, X86_EAX, mono_get_jit_tls_offset ());
- x86_mov_reg_membase (code, X86_EAX, X86_EAX, G_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 4);
+ x86_mov_reg_membase (code, X86_EAX, X86_EAX, MONO_STRUCT_OFFSET (MonoJitTlsData, handler_block_return_address), 4);
} else {
/*Slow path uses a c helper*/
x86_call_code (code, handler_block_trampoline_helper);
diff --git a/mono/mini/unwind.c b/mono/mini/unwind.c
index 8a7d46eae49..31024bfee0f 100644
--- a/mono/mini/unwind.c
+++ b/mono/mini/unwind.c
@@ -33,7 +33,7 @@ typedef struct {
#define ALIGN_TO(val,align) ((((size_t)val) + ((align) - 1)) & ~((align) - 1))
-static CRITICAL_SECTION unwind_mutex;
+static mono_mutex_t unwind_mutex;
static MonoUnwindInfo **cached_info;
static int cached_info_next, cached_info_size;
@@ -41,8 +41,8 @@ static GSList *cached_info_list;
/* Statistics */
static int unwind_info_size;
-#define unwind_lock() EnterCriticalSection (&unwind_mutex)
-#define unwind_unlock() LeaveCriticalSection (&unwind_mutex)
+#define unwind_lock() mono_mutex_lock (&unwind_mutex)
+#define unwind_unlock() mono_mutex_unlock (&unwind_mutex)
#ifdef TARGET_AMD64
static int map_hw_reg_to_dwarf_reg [] = { 0, 2, 1, 3, 7, 6, 4, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
@@ -57,13 +57,15 @@ static int map_hw_reg_to_dwarf_reg [] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
#define DWARF_DATA_ALIGN (-4)
#define DWARF_PC_REG (mono_hw_reg_to_dwarf_reg (ARMREG_LR))
#elif defined(TARGET_ARM64)
-#define NUM_REGS 32
+#define NUM_REGS 96
#define DWARF_DATA_ALIGN (-8)
/* LR */
#define DWARF_PC_REG 30
static int map_hw_reg_to_dwarf_reg [] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ /* v8..v15 */
+ 72, 73, 74, 75, 76, 77, 78, 79,
};
#elif defined (TARGET_X86)
#ifdef __APPLE__
@@ -307,10 +309,23 @@ mono_print_unwind_info (guint8 *unwind_info, int unwind_info_len)
offset = decode_sleb128 (p, &p) * DWARF_DATA_ALIGN;
printf ("CFA: [%x] offset_extended_sf: %s at cfa-0x%x\n", pos, mono_arch_regname (mono_dwarf_reg_to_hw_reg (reg)), -offset);
break;
+ case DW_CFA_same_value:
+ reg = decode_uleb128 (p, &p);
+ printf ("CFA: [%x] same_value: %s\n", pos, mono_arch_regname (mono_dwarf_reg_to_hw_reg (reg)));
+ break;
case DW_CFA_advance_loc4:
pos += read32 (p);
p += 4;
break;
+ case DW_CFA_remember_state:
+ printf ("CFA: [%x] remember_state\n", pos);
+ break;
+ case DW_CFA_restore_state:
+ printf ("CFA: [%x] restore_state\n", pos);
+ break;
+ case DW_CFA_mono_advance_loc:
+ printf ("CFA: [%x] mono_advance_loc\n", pos);
+ break;
default:
g_assert_not_reached ();
}
@@ -348,9 +363,31 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len)
/* Convert the register from the hw encoding to the dwarf encoding */
reg = mono_hw_reg_to_dwarf_reg (op->reg);
+ if (op->op == DW_CFA_mono_advance_loc) {
+ /* This advances loc to its location */
+ loc = op->when;
+ }
+
/* Emit an advance_loc if neccesary */
while (op->when > loc) {
- if (op->when - loc < 32) {
+ if (op->when - loc > 65536) {
+ *p ++ = DW_CFA_advance_loc4;
+ *(guint32*)p = (guint32)(op->when - loc);
+ g_assert (read32 (p) == (guint32)(op->when - loc));
+ p += 4;
+ loc = op->when;
+ } else if (op->when - loc > 256) {
+ *p ++ = DW_CFA_advance_loc2;
+ *(guint16*)p = (guint16)(op->when - loc);
+ g_assert (read16 (p) == (guint32)(op->when - loc));
+ p += 2;
+ loc = op->when;
+ } else if (op->when - loc >= 32) {
+ *p ++ = DW_CFA_advance_loc1;
+ *(guint8*)p = (guint8)(op->when - loc);
+ p += 1;
+ loc = op->when;
+ } else if (op->when - loc < 32) {
*p ++ = DW_CFA_advance_loc | (op->when - loc);
loc = op->when;
} else {
@@ -373,6 +410,10 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len)
*p ++ = op->op;
encode_uleb128 (reg, p, &p);
break;
+ case DW_CFA_same_value:
+ *p ++ = op->op;
+ encode_uleb128 (reg, p, &p);
+ break;
case DW_CFA_offset:
if (reg > 63) {
*p ++ = DW_CFA_offset_extended_sf;
@@ -383,6 +424,15 @@ mono_unwind_ops_encode (GSList *unwind_ops, guint32 *out_len)
encode_uleb128 (op->val / DWARF_DATA_ALIGN, p, &p);
}
break;
+ case DW_CFA_remember_state:
+ case DW_CFA_restore_state:
+ *p ++ = op->op;
+ break;
+ case DW_CFA_mono_advance_loc:
+ /* Only one location is supported */
+ g_assert (op->val == 0);
+ *p ++ = op->op;
+ break;
default:
g_assert_not_reached ();
break;
@@ -416,6 +466,12 @@ print_dwarf_state (int cfa_reg, int cfa_offset, int ip, int nregs, Loc *location
printf ("\n");
}
+typedef struct {
+ Loc locations [NUM_REGS];
+ guint8 reg_saved [NUM_REGS];
+ int cfa_reg, cfa_offset;
+} UnwindState;
+
/*
* Given the state of the current frame as stored in REGS, execute the unwind
* operations in unwind_info until the location counter reaches POS. The result is
@@ -423,19 +479,23 @@ print_dwarf_state (int cfa_reg, int cfa_offset, int ip, int nregs, Loc *location
* If SAVE_LOCATIONS is non-NULL, it should point to an array of size SAVE_LOCATIONS_LEN.
* On return, the nth entry will point to the address of the stack slot where register
* N was saved, or NULL, if it was not saved by this frame.
+ * MARK_LOCATIONS should contain the locations marked by mono_emit_unwind_op_mark_loc (), if any.
* This function is signal safe.
*/
void
mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
- guint8 *start_ip, guint8 *end_ip, guint8 *ip, mgreg_t *regs, int nregs,
+ guint8 *start_ip, guint8 *end_ip, guint8 *ip, guint8 **mark_locations,
+ mgreg_t *regs, int nregs,
mgreg_t **save_locations, int save_locations_len,
guint8 **out_cfa)
{
Loc locations [NUM_REGS];
guint8 reg_saved [NUM_REGS];
- int i, pos, reg, cfa_reg, cfa_offset, offset;
+ int i, pos, reg, cfa_reg = -1, cfa_offset = 0, offset;
guint8 *p;
guint8 *cfa_val;
+ UnwindState state_stack [1];
+ int state_stack_pos;
memset (reg_saved, 0, sizeof (reg_saved));
@@ -443,6 +503,7 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
pos = 0;
cfa_reg = -1;
cfa_offset = -1;
+ state_stack_pos = 0;
while (pos <= ip - start_ip && p < unwind_info + unwind_info_len) {
int op = *p & 0xc0;
@@ -489,10 +550,42 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
locations [reg].loc_type = LOC_OFFSET;
locations [reg].offset = offset * DWARF_DATA_ALIGN;
break;
+ case DW_CFA_same_value:
+ reg = decode_uleb128 (p, &p);
+ locations [reg].loc_type = LOC_SAME;
+ break;
+ case DW_CFA_advance_loc1:
+ pos += *p;
+ p += 1;
+ break;
+ case DW_CFA_advance_loc2:
+ pos += read16 (p);
+ p += 2;
+ break;
case DW_CFA_advance_loc4:
pos += read32 (p);
p += 4;
break;
+ case DW_CFA_remember_state:
+ g_assert (state_stack_pos == 0);
+ memcpy (&state_stack [0].locations, &locations, sizeof (locations));
+ memcpy (&state_stack [0].reg_saved, &reg_saved, sizeof (reg_saved));
+ state_stack [0].cfa_reg = cfa_reg;
+ state_stack [0].cfa_offset = cfa_offset;
+ state_stack_pos ++;
+ break;
+ case DW_CFA_restore_state:
+ g_assert (state_stack_pos == 1);
+ state_stack_pos --;
+ memcpy (&locations, &state_stack [0].locations, sizeof (locations));
+ memcpy (&reg_saved, &state_stack [0].reg_saved, sizeof (reg_saved));
+ cfa_reg = state_stack [0].cfa_reg;
+ cfa_offset = state_stack [0].cfa_offset;
+ break;
+ case DW_CFA_mono_advance_loc:
+ g_assert (mark_locations [0]);
+ pos = mark_locations [0] - start_ip;
+ break;
default:
g_assert_not_reached ();
}
@@ -506,6 +599,7 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
if (save_locations)
memset (save_locations, 0, save_locations_len * sizeof (mgreg_t*));
+ g_assert (cfa_reg != -1);
cfa_val = (guint8*)regs [mono_dwarf_reg_to_hw_reg (cfa_reg)] + cfa_offset;
for (i = 0; i < NUM_REGS; ++i) {
if (reg_saved [i] && locations [i].loc_type == LOC_OFFSET) {
@@ -523,7 +617,7 @@ mono_unwind_frame (guint8 *unwind_info, guint32 unwind_info_len,
void
mono_unwind_init (void)
{
- InitializeCriticalSection (&unwind_mutex);
+ mono_mutex_init_recursive (&unwind_mutex);
mono_counters_register ("Unwind info size", MONO_COUNTER_JIT | MONO_COUNTER_INT, &unwind_info_size);
}
@@ -533,7 +627,7 @@ mono_unwind_cleanup (void)
{
int i;
- DeleteCriticalSection (&unwind_mutex);
+ mono_mutex_destroy (&unwind_mutex);
if (!cached_info)
return;
@@ -555,7 +649,7 @@ mono_unwind_cleanup (void)
* A copy is made of the unwind info.
* This function is useful for two reasons:
* - many methods have the same unwind info
- * - MonoJitInfo->used_regs is an int so it can't store the pointer to the unwind info
+ * - MonoJitInfo->unwind_info is an int so it can't store the pointer to the unwind info
*/
guint32
mono_cache_unwind_info (guint8 *unwind_info, guint32 unwind_info_len)
diff --git a/mono/profiler/proflog.c b/mono/profiler/proflog.c
index f5ca7472a1c..9021a00b24d 100644
--- a/mono/profiler/proflog.c
+++ b/mono/profiler/proflog.c
@@ -803,14 +803,14 @@ gc_resize (MonoProfiler *profiler, int64_t new_size) {
EXIT_LOG (logbuffer);
}
-#define MAX_FRAMES 16
+#define MAX_FRAMES 32
typedef struct {
int count;
MonoMethod* methods [MAX_FRAMES];
int32_t il_offsets [MAX_FRAMES];
int32_t native_offsets [MAX_FRAMES];
} FrameData;
-static int num_frames = MAX_FRAMES / 2;
+static int num_frames = MAX_FRAMES;
static mono_bool
walk_stack (MonoMethod *method, int32_t native_offset, int32_t il_offset, mono_bool managed, void* data)
@@ -1481,6 +1481,8 @@ elf_dl_callback (struct dl_phdr_info *info, size_t size, void *data)
return 0;
}
filename = info->dlpi_name;
+ if (!filename)
+ return 0;
if (!info->dlpi_addr && !filename [0]) {
int l = readlink ("/proc/self/exe", buf, sizeof (buf) - 1);
if (l > 0) {
diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am
index 80c8f7e536a..7d448d374ad 100644
--- a/mono/tests/Makefile.am
+++ b/mono/tests/Makefile.am
@@ -695,7 +695,7 @@ tests: $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_
#
# Test that no symbols are missed in eglib-remap.h
#
-OK_G_SYMBOLS='g_list\|g_slist\|g_concat_dir_and_file'
+OK_G_SYMBOLS='g_list\|g_slist\|g_concat_dir_and_file\|g_Ctoc'
if NACL_CODEGEN
test-eglib-remap:
else
diff --git a/mono/tests/finalizer-wait.cs b/mono/tests/finalizer-wait.cs
index 9b9bf2dc3df..dde31cbc345 100644
--- a/mono/tests/finalizer-wait.cs
+++ b/mono/tests/finalizer-wait.cs
@@ -6,35 +6,25 @@ class P {
static public int count = 0;
~P () {
- T.finalized = true;
- Thread.Sleep (1000);
// Console.WriteLine ("finalizer done");
count++;
}
}
class T {
-
- static public bool finalized = false;
-
- static void makeP () {
- P p = new P ();
- p = null;
- }
-
static int Main () {
- var t = new Thread (makeP);
- t.Start ();
- t.Join ();
-
- GC.Collect ();
- while (!finalized) {
- Thread.Sleep (100);
+ for (int i = 0; i < 1000; ++i) {
+ var t = new Thread (() => {
+ P p = new P ();
+ });
+ t.Start ();
+ t.Join ();
+
+ GC.Collect ();
+ GC.WaitForPendingFinalizers ();
+ if (P.count != i + 1)
+ return 1;
}
- GC.WaitForPendingFinalizers ();
-
- if (P.count == 0)
- return 1;
return 0;
}
}
diff --git a/mono/tests/gc-descriptors/Makefile.am b/mono/tests/gc-descriptors/Makefile.am
index 4daa22ba806..54eca51ef51 100755
--- a/mono/tests/gc-descriptors/Makefile.am
+++ b/mono/tests/gc-descriptors/Makefile.am
@@ -10,7 +10,7 @@ descriptor-tests.exe : descriptor-tests.cs
$(MCS) -Warn:0 descriptor-tests.cs
descriptor-tests.cs : descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py
- -cp $^ .
+ if [ "$(srcdir)" != "$(builddir)" ]; then cp $^ .; fi
$(srcdir)/gen-descriptor-tests.py >descriptor-tests.cs
EXTRA_DIST = descriptor-tests-driver.cs descriptor-tests-prefix.cs gen-descriptor-tests.py
diff --git a/mono/tests/marshal7.cs b/mono/tests/marshal7.cs
index 02cfbbd40a6..640f4a04d78 100644
--- a/mono/tests/marshal7.cs
+++ b/mono/tests/marshal7.cs
@@ -218,9 +218,9 @@ public class Test
if (Marshal.SizeOf (typeof (TestStruct10)) != 12)
return 16;
} else {
- if (Marshal.SizeOf (typeof (TestStruct8)) != 16)
+ if (Marshal.SizeOf (typeof (TestStruct8)) != 16 && Marshal.SizeOf (typeof (TestStruct8)) != 12)
return 14;
- if (Marshal.SizeOf (typeof (TestStruct10)) != 16)
+ if (Marshal.SizeOf (typeof (TestStruct10)) != 16 && Marshal.SizeOf (typeof (TestStruct10)) != 12)
return 16;
}
if (Marshal.SizeOf (typeof (TestStruct9)) != 12)
diff --git a/mono/tests/pinvoke3.cs b/mono/tests/pinvoke3.cs
index ded0626819a..ae64d16e090 100644
--- a/mono/tests/pinvoke3.cs
+++ b/mono/tests/pinvoke3.cs
@@ -1087,29 +1087,32 @@ public class Tests {
[DllImport ("libtest", EntryPoint="mono_test_marshal_call_callback")]
public static extern int mono_test_marshal_call_callback ();
- public static int test_0_appdomain_swich () {
- callback = delegate () { return 42; };
- mono_test_marshal_set_callback (callback);
-
+ public static int test_0_appdomain_switch () {
// FIXME: The appdomain unload hangs
- return 0;
- /*
+ //return 0;
AppDomain ad = AppDomain.CreateDomain ("foo");
var c = (CallbackClass)ad.CreateInstanceAndUnwrap (
typeof (CallbackClass).Assembly.FullName, "Tests/CallbackClass");
- int res = c.OtherDomainTest ();
+ c.SetCallback ();
+ int domain_id = AppDomain.CurrentDomain.Id;
+ int new_id = mono_test_marshal_call_callback ();
+ int res = 0;
+ if (new_id == domain_id)
+ res = 1;
+ if (AppDomain.CurrentDomain.Id != domain_id)
+ res = 2;
AppDomain.Unload (ad);
return res;
- */
}
+ static int domain_callback () {
+ return AppDomain.CurrentDomain.Id;
+ }
+
class CallbackClass : MarshalByRefObject {
- public int OtherDomainTest () {
- int appDomainId = AppDomain.CurrentDomain.Id;
- int res = mono_test_marshal_call_callback ();
- if (res != 42)
- return 2;
- return appDomainId == AppDomain.CurrentDomain.Id ? 0 : 1;
+ public int SetCallback () {
+ mono_test_marshal_set_callback (domain_callback);
+ return 0;
}
}
}
diff --git a/mono/unit-tests/.gitignore b/mono/unit-tests/.gitignore
index d4624ea5816..0b2579b6eae 100644
--- a/mono/unit-tests/.gitignore
+++ b/mono/unit-tests/.gitignore
@@ -4,6 +4,7 @@
/.libs
/*.la
/*.lo
+/*.trs
/test-gc-memfuncs
/test-mono-linked-list-set
/test-sgen-qsort
diff --git a/mono/unit-tests/Makefile.am b/mono/unit-tests/Makefile.am
index 70ba8ab3a5e..23797f64633 100644
--- a/mono/unit-tests/Makefile.am
+++ b/mono/unit-tests/Makefile.am
@@ -11,6 +11,7 @@ endif
if !CROSS_COMPILE
if !HOST_WIN32
if SUPPORT_BOEHM
+if !PLATFORM_GNU
test_sgen_qsort_SOURCES = test-sgen-qsort.c
test_sgen_qsort_CFLAGS = $(TEST_CFLAGS)
@@ -27,10 +28,16 @@ test_mono_linked_list_set_CFLAGS = $(TEST_CFLAGS)
test_mono_linked_list_set_LDADD = $(TEST_LDADD)
test_mono_linked_list_set_LDFLAGS = $(TEST_LDFLAGS)
-noinst_PROGRAMS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set
+test_conc_hashtable_SOURCES = test-conc-hashtable.c
+test_conc_hashtable_CFLAGS = $(TEST_CFLAGS)
+test_conc_hashtable_LDADD = $(TEST_LDADD)
+test_conc_hashtable_LDFLAGS = $(TEST_LDFLAGS)
-TESTS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set
+noinst_PROGRAMS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set test-conc-hashtable
+TESTS = test-sgen-qsort test-gc-memfuncs test-mono-linked-list-set test-conc-hashtable
+
+endif !PLATFORM_GNU
endif SUPPORT_BOEHM
endif !HOST_WIN32
endif !CROSS_COMPILE
diff --git a/mono/unit-tests/test-conc-hashtable.c b/mono/unit-tests/test-conc-hashtable.c
new file mode 100644
index 00000000000..ed09d593b6b
--- /dev/null
+++ b/mono/unit-tests/test-conc-hashtable.c
@@ -0,0 +1,324 @@
+/*
+ * test-conc-hashtable.c: Unit test for the concurrent hashtable.
+ *
+ * Copyright (C) 2014 Xamarin Inc
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License 2.0 as published by the Free Software Foundation;
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License 2.0 along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include "config.h"
+
+#include "utils/mono-threads.h"
+#include "utils/mono-conc-hashtable.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <assert.h>
+
+#include <pthread.h>
+
+static int
+single_writer_single_reader (void)
+{
+ mono_mutex_t mutex;
+ MonoConcurrentHashTable *h;
+ int res = 0;
+
+ mono_mutex_init (&mutex);
+ h = mono_conc_hashtable_new (&mutex, NULL, NULL);
+ mono_conc_hashtable_insert (h, GUINT_TO_POINTER (10), GUINT_TO_POINTER (20));
+ mono_conc_hashtable_insert (h, GUINT_TO_POINTER (30), GUINT_TO_POINTER (40));
+ mono_conc_hashtable_insert (h, GUINT_TO_POINTER (50), GUINT_TO_POINTER (60));
+ mono_conc_hashtable_insert (h, GUINT_TO_POINTER (2), GUINT_TO_POINTER (3));
+
+ if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (30)) != GUINT_TO_POINTER (40))
+ res = 1;
+ if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (10)) != GUINT_TO_POINTER (20))
+ res = 2;
+ if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (2)) != GUINT_TO_POINTER (3))
+ res = 3;
+ if (mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (50)) != GUINT_TO_POINTER (60))
+ res = 4;
+
+ mono_conc_hashtable_destroy (h);
+ mono_mutex_destroy (&mutex);
+ if (res)
+ printf ("SERIAL TEST FAILED %d\n", res);
+ return res;
+}
+
+static MonoConcurrentHashTable *hash;
+
+static void*
+pw_sr_thread (void *arg)
+{
+ int i, idx = 1000 * GPOINTER_TO_INT (arg);
+ mono_thread_info_attach ((gpointer)&arg);
+
+ for (i = 0; i < 1000; ++i)
+ mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + idx), GINT_TO_POINTER (i + 1));
+ return NULL;
+}
+
+static int
+parallel_writer_single_reader (void)
+{
+ pthread_t a,b,c;
+ mono_mutex_t mutex;
+ int i, j, res = 0;
+
+ mono_mutex_init (&mutex);
+ hash = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+ pthread_create (&a, NULL, pw_sr_thread, GINT_TO_POINTER (1));
+ pthread_create (&b, NULL, pw_sr_thread, GINT_TO_POINTER (2));
+ pthread_create (&c, NULL, pw_sr_thread, GINT_TO_POINTER (3));
+
+ pthread_join (a, NULL);
+ pthread_join (b, NULL);
+ pthread_join (c, NULL);
+
+ for (i = 0; i < 1000; ++i) {
+ for (j = 1; j < 4; ++j) {
+ if (mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (j * 1000 + i)) != GINT_TO_POINTER (i + 1)) {
+ res = j + 1;
+ goto done;
+ }
+ }
+ }
+
+done:
+ mono_conc_hashtable_destroy (hash);
+ mono_mutex_destroy (&mutex);
+ if (res)
+ printf ("PAR_WRITER_SINGLE_READER TEST FAILED %d\n", res);
+ return res;
+}
+
+
+static void*
+pr_sw_thread (void *arg)
+{
+ int i = 0, idx = 100 * GPOINTER_TO_INT (arg);
+ mono_thread_info_attach ((gpointer)&arg);
+
+ while (i < 100) {
+ gpointer res = mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (i + idx + 1));
+ if (!res)
+ continue;
+ if (res != GINT_TO_POINTER ((i + idx) * 2 + 1))
+ return GINT_TO_POINTER (i);
+ ++i;
+ }
+ return NULL;
+}
+
+static int
+single_writer_parallel_reader (void)
+{
+ pthread_t a,b,c;
+ mono_mutex_t mutex;
+ gpointer ra, rb, rc;
+ int i, res = 0;
+ ra = rb = rc = GINT_TO_POINTER (1);
+
+ mono_mutex_init (&mutex);
+ hash = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+ pthread_create (&a, NULL, pr_sw_thread, GINT_TO_POINTER (0));
+ pthread_create (&b, NULL, pr_sw_thread, GINT_TO_POINTER (1));
+ pthread_create (&c, NULL, pr_sw_thread, GINT_TO_POINTER (2));
+
+ for (i = 0; i < 100; ++i) {
+ mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 0 + 1), GINT_TO_POINTER ((i + 0) * 2 + 1));
+ mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 100 + 1), GINT_TO_POINTER ((i + 100) * 2 + 1));
+ mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 200 + 1), GINT_TO_POINTER ((i + 200) * 2 + 1));
+ }
+
+ pthread_join (a, &ra);
+ pthread_join (b, &rb);
+ pthread_join (c, &rc);
+ res = GPOINTER_TO_INT (ra) + GPOINTER_TO_INT (rb) + GPOINTER_TO_INT (rc);
+
+ mono_conc_hashtable_destroy (hash);
+ mono_mutex_destroy (&mutex);
+ if (res)
+ printf ("SINGLE_WRITER_PAR_READER TEST FAILED %d\n", res);
+ return res;
+}
+
+int running = 1;
+
+static void*
+pw_pr_r_thread (void *arg)
+{
+ int key, val, i;
+ mono_thread_info_attach ((gpointer)&arg);
+
+ /* i will not be incremented as long as running is set to 1, this guarantee that
+ we loop over all the keys at least once after the writer threads have finished */
+ for (i = 0; i < 2; i += 1 - running) {
+ for (key = 1; key < 3 * 1000 + 1; key++) {
+ val = GPOINTER_TO_INT (mono_conc_hashtable_lookup (hash, GINT_TO_POINTER (key)));
+
+ if (!val)
+ continue;
+ if (key != val)
+ return GINT_TO_POINTER (key);
+ }
+ }
+ return NULL;
+}
+
+static void*
+pw_pr_w_add_thread (void *arg)
+{
+ int i, idx = 1000 * GPOINTER_TO_INT (arg);
+
+ mono_thread_info_attach ((gpointer)&arg);
+
+ for (i = idx; i < idx + 1000; i++)
+ mono_conc_hashtable_insert (hash, GINT_TO_POINTER (i + 1), GINT_TO_POINTER (i + 1));
+ return NULL;
+}
+
+static void*
+pw_pr_w_del_thread (void *arg)
+{
+ int i, idx = 1000 * GPOINTER_TO_INT (arg);
+
+ mono_thread_info_attach ((gpointer)&arg);
+
+ for (i = idx; i < idx + 1000; i++)
+ mono_conc_hashtable_remove (hash, GINT_TO_POINTER (i + 1));
+ return NULL;
+}
+
+static int
+parallel_writer_parallel_reader (void)
+{
+ pthread_t wa, wb, wc, ra, rb, rc;
+ mono_mutex_t mutex;
+ gpointer a, b, c;
+ int res = 0, i;
+
+ srand(time(NULL));
+
+ mono_mutex_init (&mutex);
+ hash = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+ for (i = 0; i < 2; i++) {
+ running = 1;
+
+ pthread_create (&ra, NULL, pw_pr_r_thread, NULL);
+ pthread_create (&rb, NULL, pw_pr_r_thread, NULL);
+ pthread_create (&rc, NULL, pw_pr_r_thread, NULL);
+
+ switch (i) {
+ case 0:
+ pthread_create (&wa, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (0));
+ pthread_create (&wb, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (1));
+ pthread_create (&wc, NULL, pw_pr_w_add_thread, GINT_TO_POINTER (2));
+ break;
+ case 1:
+ pthread_create (&wa, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (0));
+ pthread_create (&wb, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (1));
+ pthread_create (&wc, NULL, pw_pr_w_del_thread, GINT_TO_POINTER (2));
+ break;
+ }
+
+ pthread_join (wa, NULL);
+ pthread_join (wb, NULL);
+ pthread_join (wc, NULL);
+
+ running = 0;
+
+ pthread_join (ra, &a);
+ pthread_join (rb, &b);
+ pthread_join (rc, &c);
+
+ res += GPOINTER_TO_INT (a) + GPOINTER_TO_INT (b) + GPOINTER_TO_INT (c);
+ }
+
+ if (res)
+ printf ("PAR_WRITER_PAR_READER TEST FAILED %d %d %d\n", GPOINTER_TO_INT (a), GPOINTER_TO_INT (b), GPOINTER_TO_INT (c));
+
+ mono_conc_hashtable_destroy (hash);
+ mono_mutex_destroy (&mutex);
+
+ return res;
+}
+
+static void
+benchmark_conc (void)
+{
+ mono_mutex_t mutex;
+ MonoConcurrentHashTable *h;
+ int i, j;
+
+ mono_mutex_init (&mutex);
+ h = mono_conc_hashtable_new (&mutex, NULL, NULL);
+
+ for (i = 1; i < 10 * 1000; ++i)
+ mono_conc_hashtable_insert (h, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i));
+
+
+ for (j = 0; j < 100000; ++j)
+ for (i = 1; i < 10 * 105; ++i)
+ mono_conc_hashtable_lookup (h, GUINT_TO_POINTER (i));
+
+ mono_conc_hashtable_destroy (h);
+ mono_mutex_destroy (&mutex);
+
+}
+
+static void
+benchmark_glib (void)
+{
+ GHashTable *h;
+ int i, j;
+
+ h = g_hash_table_new (NULL, NULL);
+
+ for (i = 1; i < 10 * 1000; ++i)
+ g_hash_table_insert (h, GUINT_TO_POINTER (i), GUINT_TO_POINTER (i));
+
+
+ for (j = 0; j < 100000; ++j)
+ for (i = 1; i < 10 * 105; ++i)
+ g_hash_table_lookup (h, GUINT_TO_POINTER (i));
+
+ g_hash_table_destroy (h);
+}
+
+int
+main (void)
+{
+ MonoThreadInfoCallbacks cb = { NULL };
+ int res = 0;
+
+ mono_threads_init (&cb, sizeof (MonoThreadInfo));
+ mono_thread_info_attach ((gpointer)&cb);
+
+ // benchmark_conc ();
+ // benchmark_glib ();
+
+ res += single_writer_single_reader ();
+ res += parallel_writer_single_reader ();
+ res += single_writer_parallel_reader ();
+ res += parallel_writer_parallel_reader ();
+
+ return res;
+} \ No newline at end of file
diff --git a/mono/utils/Makefile.am b/mono/utils/Makefile.am
index 881888fccee..c5464d16b16 100644
--- a/mono/utils/Makefile.am
+++ b/mono/utils/Makefile.am
@@ -99,6 +99,10 @@ monoutils_sources = \
mono-threads-mach.c \
mono-threads-mach-helper.c \
mono-threads-windows.c \
+ mono-threads-linux.c \
+ mono-threads-freebsd.c \
+ mono-threads-openbsd.c \
+ mono-threads-android.c \
mono-threads.h \
mono-tls.h \
mono-tls.c \
@@ -110,7 +114,11 @@ monoutils_sources = \
mono-hwcap.c \
bsearch.h \
bsearch.c \
- mono-signal-handler.h
+ mono-signal-handler.h \
+ mono-conc-hashtable.h \
+ mono-conc-hashtable.c \
+ sha1.h \
+ sha1.c
arch_sources =
diff --git a/mono/utils/atomic.c b/mono/utils/atomic.c
index 9ab8746f299..9ab8746f299 100755..100644
--- a/mono/utils/atomic.c
+++ b/mono/utils/atomic.c
diff --git a/mono/utils/atomic.h b/mono/utils/atomic.h
index c1a1a94b475..306800cfe1d 100755
--- a/mono/utils/atomic.h
+++ b/mono/utils/atomic.h
@@ -108,13 +108,19 @@ static inline gint64 InterlockedAdd64(volatile gint64 *dest, gint64 add)
#endif
#endif
+#ifdef HOST_WIN32
+#define TO_INTERLOCKED_ARGP(ptr) ((volatile LONG*)(ptr))
+#else
+#define TO_INTERLOCKED_ARGP(ptr) (ptr)
+#endif
+
/* And now for some dirty hacks... The Windows API doesn't
* provide any useful primitives for this (other than getting
* into architecture-specific madness), so use CAS. */
static inline gint32 InterlockedRead(volatile gint32 *src)
{
- return InterlockedCompareExchange (src, 0, 0);
+ return InterlockedCompareExchange (TO_INTERLOCKED_ARGP (src), 0, 0);
}
static inline gint64 InterlockedRead64(volatile gint64 *src)
@@ -129,7 +135,7 @@ static inline gpointer InterlockedReadPointer(volatile gpointer *src)
static inline void InterlockedWrite(volatile gint32 *dst, gint32 val)
{
- InterlockedExchange (dst, val);
+ InterlockedExchange (TO_INTERLOCKED_ARGP (dst), val);
}
static inline void InterlockedWrite64(volatile gint64 *dst, gint64 val)
diff --git a/mono/utils/hazard-pointer.c b/mono/utils/hazard-pointer.c
index b412e77d7d5..a662261270d 100644
--- a/mono/utils/hazard-pointer.c
+++ b/mono/utils/hazard-pointer.c
@@ -46,7 +46,7 @@ static volatile gint32 overflow_busy [HAZARD_TABLE_OVERFLOW];
static MonoLockFreeArrayQueue delayed_free_queue = MONO_LOCK_FREE_ARRAY_QUEUE_INIT (sizeof (DelayedFreeItem));
/* The table for small ID assignment */
-static CRITICAL_SECTION small_id_mutex;
+static mono_mutex_t small_id_mutex;
static int small_id_next;
static int highest_small_id = -1;
static MonoBitSet *small_id_table;
@@ -63,7 +63,7 @@ mono_thread_small_id_alloc (void)
{
int i, id = -1;
- EnterCriticalSection (&small_id_mutex);
+ mono_mutex_lock (&small_id_mutex);
if (!small_id_table)
small_id_table = mono_bitset_new (1, 0);
@@ -125,7 +125,7 @@ mono_thread_small_id_alloc (void)
mono_memory_write_barrier ();
}
- LeaveCriticalSection (&small_id_mutex);
+ mono_mutex_unlock (&small_id_mutex);
return id;
}
@@ -134,13 +134,13 @@ void
mono_thread_small_id_free (int id)
{
/* MonoBitSet operations are not atomic. */
- EnterCriticalSection (&small_id_mutex);
+ mono_mutex_lock (&small_id_mutex);
g_assert (id >= 0 && id < small_id_table->size);
g_assert (mono_bitset_test_fast (small_id_table, id));
mono_bitset_clear_fast (small_id_table, id);
- LeaveCriticalSection (&small_id_mutex);
+ mono_mutex_unlock (&small_id_mutex);
}
static gboolean
@@ -345,7 +345,7 @@ mono_thread_smr_init (void)
{
int i;
- InitializeCriticalSection(&small_id_mutex);
+ mono_mutex_init_recursive(&small_id_mutex);
mono_counters_register ("Hazardous pointers", MONO_COUNTER_JIT | MONO_COUNTER_INT, &hazardous_pointer_count);
for (i = 0; i < HAZARD_TABLE_OVERFLOW; ++i) {
diff --git a/mono/utils/mono-codeman.c b/mono/utils/mono-codeman.c
index c8f74682535..5c2a83b1189 100644
--- a/mono/utils/mono-codeman.c
+++ b/mono/utils/mono-codeman.c
@@ -26,6 +26,8 @@
#include <nacl/nacl_dyncode.h>
#include <mono/mini/mini.h>
#endif
+#include <mono/utils/mono-mutex.h>
+
static uintptr_t code_memory_used = 0;
static size_t dynamic_code_alloc_count;
@@ -231,7 +233,7 @@ nacl_inverse_modify_patch_target (unsigned char *target)
#define VALLOC_FREELIST_SIZE 16
-static CRITICAL_SECTION valloc_mutex;
+static mono_mutex_t valloc_mutex;
static GHashTable *valloc_freelists;
static void*
@@ -241,14 +243,14 @@ codechunk_valloc (void *preferred, guint32 size)
GSList *freelist;
if (!valloc_freelists) {
- InitializeCriticalSection (&valloc_mutex);
+ mono_mutex_init_recursive (&valloc_mutex);
valloc_freelists = g_hash_table_new (NULL, NULL);
}
/*
* Keep a small freelist of memory blocks to decrease pressure on the kernel memory subsystem to avoid #3321.
*/
- EnterCriticalSection (&valloc_mutex);
+ mono_mutex_lock (&valloc_mutex);
freelist = g_hash_table_lookup (valloc_freelists, GUINT_TO_POINTER (size));
if (freelist) {
ptr = freelist->data;
@@ -260,7 +262,7 @@ codechunk_valloc (void *preferred, guint32 size)
if (!ptr && preferred)
ptr = mono_valloc (NULL, size, MONO_PROT_RWX | ARCH_MAP_FLAGS);
}
- LeaveCriticalSection (&valloc_mutex);
+ mono_mutex_unlock (&valloc_mutex);
return ptr;
}
@@ -269,7 +271,7 @@ codechunk_vfree (void *ptr, guint32 size)
{
GSList *freelist;
- EnterCriticalSection (&valloc_mutex);
+ mono_mutex_lock (&valloc_mutex);
freelist = g_hash_table_lookup (valloc_freelists, GUINT_TO_POINTER (size));
if (!freelist || g_slist_length (freelist) < VALLOC_FREELIST_SIZE) {
freelist = g_slist_prepend (freelist, ptr);
@@ -277,7 +279,7 @@ codechunk_vfree (void *ptr, guint32 size)
} else {
mono_vfree (ptr, size);
}
- LeaveCriticalSection (&valloc_mutex);
+ mono_mutex_unlock (&valloc_mutex);
}
static void
@@ -545,9 +547,10 @@ new_codechunk (CodeChunk *last, int dynamic, int size)
return NULL;
} else {
/* Try to allocate code chunks next to each other to help the VM */
+ ptr = NULL;
if (last)
ptr = codechunk_valloc ((guint8*)last->data + last->size, chunk_size);
- else
+ if (!ptr)
ptr = codechunk_valloc (NULL, chunk_size);
if (!ptr)
return NULL;
diff --git a/mono/utils/mono-compiler.h b/mono/utils/mono-compiler.h
index 22623d074fb..c1d0e27a49c 100644
--- a/mono/utils/mono-compiler.h
+++ b/mono/utils/mono-compiler.h
@@ -214,6 +214,9 @@
#define __func__ __FUNCTION__
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+
#endif /* _MSC_VER */
#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
diff --git a/mono/utils/mono-conc-hashtable.c b/mono/utils/mono-conc-hashtable.c
new file mode 100644
index 00000000000..ae97769a64b
--- /dev/null
+++ b/mono/utils/mono-conc-hashtable.c
@@ -0,0 +1,371 @@
+/*
+ * mono-conc-hashtable.h: A mostly concurrent hashtable
+ *
+ * Author:
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ *
+ * (C) 2014 Xamarin
+ */
+
+#include "mono-conc-hashtable.h"
+#include <mono/utils/hazard-pointer.h>
+
+/* Configuration knobs. */
+
+#define INITIAL_SIZE 32
+#define LOAD_FACTOR 0.75f
+#define TOMBSTONE ((gpointer)(ssize_t)-1)
+
+typedef struct {
+ gpointer key;
+ gpointer value;
+} key_value_pair;
+
+typedef struct {
+ int table_size;
+ key_value_pair *kvs;
+} conc_table;
+
+struct _MonoConcurrentHashTable {
+ volatile conc_table *table; /* goes to HP0 */
+ GHashFunc hash_func;
+ GEqualFunc equal_func;
+ mono_mutex_t *mutex;
+ int element_count;
+ int overflow_count;
+ GDestroyNotify key_destroy_func;
+ GDestroyNotify value_destroy_func;
+};
+
+static conc_table*
+conc_table_new (int size)
+{
+ conc_table *res = g_new (conc_table, 1);
+ res->table_size = size;
+ res->kvs = g_new0 (key_value_pair, size);
+ return res;
+}
+
+static void
+conc_table_free (gpointer ptr)
+{
+ conc_table *table = ptr;
+ g_free (table->kvs);
+ g_free (table);
+}
+
+static void
+conc_table_lf_free (conc_table *table)
+{
+ mono_thread_hazardous_free_or_queue (table, conc_table_free, TRUE, FALSE);
+}
+
+
+/*
+A common problem with power of two hashtables is that it leads of bad clustering when dealing
+with aligned numbers.
+
+The solution here is to mix the bits from two primes plus the hash itself, it produces a better spread
+than just the numbers.
+*/
+
+static MONO_ALWAYS_INLINE int
+mix_hash (int hash)
+{
+ return ((hash * 215497) >> 16) ^ (hash * 1823231 + hash);
+}
+
+static MONO_ALWAYS_INLINE void
+insert_one_local (conc_table *table, GHashFunc hash_func, gpointer key, gpointer value)
+{
+ key_value_pair *kvs = table->kvs;
+ int table_mask = table->table_size - 1;
+ int hash = mix_hash (hash_func (key));
+ int i = hash & table_mask;
+
+ while (table->kvs [i].key)
+ i = (i + 1) & table_mask;
+
+ kvs [i].key = key;
+ kvs [i].value = value;
+}
+
+/* LOCKING: Must be called holding hash_table->mutex */
+static void
+expand_table (MonoConcurrentHashTable *hash_table)
+{
+ conc_table *old_table = (conc_table*)hash_table->table;
+ conc_table *new_table = conc_table_new (old_table->table_size * 2);
+ key_value_pair *kvs = old_table->kvs;
+ int i;
+
+ for (i = 0; i < old_table->table_size; ++i) {
+ if (kvs [i].key && kvs [i].key != TOMBSTONE)
+ insert_one_local (new_table, hash_table->hash_func, kvs [i].key, kvs [i].value);
+ }
+ mono_memory_barrier ();
+ hash_table->table = new_table;
+ hash_table->overflow_count = (int)(new_table->table_size * LOAD_FACTOR);
+ conc_table_lf_free (old_table);
+}
+
+
+MonoConcurrentHashTable*
+mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func)
+{
+ MonoConcurrentHashTable *res = g_new0 (MonoConcurrentHashTable, 1);
+ res->mutex = mutex;
+ res->hash_func = hash_func ? hash_func : g_direct_hash;
+ res->equal_func = key_equal_func;
+ // res->equal_func = g_direct_equal;
+ res->table = conc_table_new (INITIAL_SIZE);
+ res->element_count = 0;
+ res->overflow_count = (int)(INITIAL_SIZE * LOAD_FACTOR);
+ return res;
+}
+
+MonoConcurrentHashTable*
+mono_conc_hashtable_new_full (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func)
+{
+ MonoConcurrentHashTable *res = mono_conc_hashtable_new (mutex, hash_func, key_equal_func);
+ res->key_destroy_func = key_destroy_func;
+ res->value_destroy_func = value_destroy_func;
+ return res;
+}
+
+
+void
+mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table)
+{
+ if (hash_table->key_destroy_func || hash_table->value_destroy_func) {
+ int i;
+ conc_table *table = (conc_table*)hash_table->table;
+ key_value_pair *kvs = table->kvs;
+
+ for (i = 0; i < table->table_size; ++i) {
+ if (kvs [i].key && kvs [i].key != TOMBSTONE) {
+ if (hash_table->key_destroy_func)
+ (hash_table->key_destroy_func) (kvs [i].key);
+ if (hash_table->value_destroy_func)
+ (hash_table->value_destroy_func) (kvs [i].value);
+ }
+ }
+ }
+ conc_table_free ((gpointer)hash_table->table);
+ g_free (hash_table);
+}
+
+gpointer
+mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key)
+{
+ MonoThreadHazardPointers* hp;
+ conc_table *table;
+ int hash, i, table_mask;
+ key_value_pair *kvs;
+ hash = mix_hash (hash_table->hash_func (key));
+ hp = mono_hazard_pointer_get ();
+
+retry:
+ table = get_hazardous_pointer ((gpointer volatile*)&hash_table->table, hp, 0);
+ table_mask = table->table_size - 1;
+ kvs = table->kvs;
+ i = hash & table_mask;
+
+ if (G_LIKELY (!hash_table->equal_func)) {
+ while (kvs [i].key) {
+ if (key == kvs [i].key) {
+ gpointer value;
+ /* The read of keys must happen before the read of values */
+ mono_memory_barrier ();
+ value = kvs [i].value;
+ /* FIXME check for NULL if we add suppport for removal */
+ mono_hazard_pointer_clear (hp, 0);
+ return value;
+ }
+ i = (i + 1) & table_mask;
+ }
+ } else {
+ GEqualFunc equal = hash_table->equal_func;
+
+ while (kvs [i].key) {
+ if (kvs [i].key != TOMBSTONE && equal (key, kvs [i].key)) {
+ gpointer value;
+ /* The read of keys must happen before the read of values */
+ mono_memory_barrier ();
+ value = kvs [i].value;
+
+ /* We just read a value been deleted, try again. */
+ if (G_UNLIKELY (!value))
+ goto retry;
+
+ mono_hazard_pointer_clear (hp, 0);
+ return value;
+ }
+ i = (i + 1) & table_mask;
+ }
+ }
+
+ /* The table might have expanded and the value is now on the newer table */
+ mono_memory_barrier ();
+ if (hash_table->table != table)
+ goto retry;
+
+ mono_hazard_pointer_clear (hp, 0);
+ return NULL;
+}
+
+/**
+ * mono_conc_hashtable_remove
+ *
+ * @Returns the old value if key is already present or null
+ */
+gpointer
+mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key)
+{
+ conc_table *table;
+ key_value_pair *kvs;
+ int hash, i, table_mask;
+
+ g_assert (key != NULL && key != TOMBSTONE);
+
+ hash = mix_hash (hash_table->hash_func (key));
+ mono_mutex_lock (hash_table->mutex);
+
+ table = (conc_table*)hash_table->table;
+ kvs = table->kvs;
+ table_mask = table->table_size - 1;
+ i = hash & table_mask;
+
+ if (!hash_table->equal_func) {
+ for (;;) {
+ if (!kvs [i].key) {
+ mono_mutex_unlock (hash_table->mutex);
+ return NULL; /*key not found*/
+ }
+
+ if (key == kvs [i].key) {
+ gpointer value = kvs [i].value;
+ kvs [i].value = NULL;
+ mono_memory_barrier ();
+ kvs [i].key = TOMBSTONE;
+
+ mono_mutex_unlock (hash_table->mutex);
+ if (hash_table->key_destroy_func != NULL)
+ (*hash_table->key_destroy_func) (key);
+ if (hash_table->value_destroy_func != NULL)
+ (*hash_table->value_destroy_func) (value);
+
+ return value;
+ }
+ i = (i + 1) & table_mask;
+ }
+ } else {
+ GEqualFunc equal = hash_table->equal_func;
+ for (;;) {
+ if (!kvs [i].key) {
+ mono_mutex_unlock (hash_table->mutex);
+ return NULL; /*key not found*/
+ }
+
+ if (kvs [i].key != TOMBSTONE && equal (key, kvs [i].key)) {
+ gpointer old_key = kvs [i].key;
+ gpointer value = kvs [i].value;
+ kvs [i].value = NULL;
+ mono_memory_barrier ();
+ kvs [i].key = TOMBSTONE;
+
+ mono_mutex_unlock (hash_table->mutex);
+ if (hash_table->key_destroy_func != NULL)
+ (*hash_table->key_destroy_func) (old_key);
+ if (hash_table->value_destroy_func != NULL)
+ (*hash_table->value_destroy_func) (value);
+ return value;
+ }
+
+ i = (i + 1) & table_mask;
+ }
+ }
+}
+/**
+ * mono_conc_hashtable_insert
+ *
+ * @Returns the old value if key is already present or null
+ */
+gpointer
+mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value)
+{
+ conc_table *table;
+ key_value_pair *kvs;
+ int hash, i, table_mask;
+
+ g_assert (key != NULL && key != TOMBSTONE);
+ g_assert (value != NULL);
+
+ hash = mix_hash (hash_table->hash_func (key));
+ mono_mutex_lock (hash_table->mutex);
+
+ if (hash_table->element_count >= hash_table->overflow_count)
+ expand_table (hash_table);
+
+ table = (conc_table*)hash_table->table;
+ kvs = table->kvs;
+ table_mask = table->table_size - 1;
+ i = hash & table_mask;
+
+ if (!hash_table->equal_func) {
+ for (;;) {
+ if (!kvs [i].key || kvs [i].key == TOMBSTONE) {
+ kvs [i].value = value;
+ /* The write to values must happen after the write to keys */
+ mono_memory_barrier ();
+ kvs [i].key = key;
+ ++hash_table->element_count;
+ mono_mutex_unlock (hash_table->mutex);
+ return NULL;
+ }
+ if (key == kvs [i].key) {
+ gpointer value = kvs [i].value;
+ mono_mutex_unlock (hash_table->mutex);
+ return value;
+ }
+ i = (i + 1) & table_mask;
+ }
+ } else {
+ GEqualFunc equal = hash_table->equal_func;
+ for (;;) {
+ if (!kvs [i].key || kvs [i].key == TOMBSTONE) {
+ kvs [i].value = value;
+ /* The write to values must happen after the write to keys */
+ mono_memory_barrier ();
+ kvs [i].key = key;
+ ++hash_table->element_count;
+ mono_mutex_unlock (hash_table->mutex);
+ return NULL;
+ }
+ if (equal (key, kvs [i].key)) {
+ gpointer value = kvs [i].value;
+ mono_mutex_unlock (hash_table->mutex);
+ return value;
+ }
+ i = (i + 1) & table_mask;
+ }
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mono/utils/mono-conc-hashtable.h b/mono/utils/mono-conc-hashtable.h
new file mode 100644
index 00000000000..65792bc54c8
--- /dev/null
+++ b/mono/utils/mono-conc-hashtable.h
@@ -0,0 +1,27 @@
+/*
+ * mono-conc-hashtable.h: A mostly concurrent hashtable
+ *
+ * Author:
+ * Rodrigo Kumpera (kumpera@gmail.com)
+ *
+ * (C) 2014 Xamarin
+ */
+
+#ifndef __MONO_CONCURRENT_HASHTABLE_H__
+#define __MONO_CONCURRENT_HASHTABLE_H__
+
+#include <mono/utils/mono-compiler.h>
+#include <mono/utils/mono-mutex.h>
+#include <glib.h>
+
+typedef struct _MonoConcurrentHashTable MonoConcurrentHashTable;
+
+MonoConcurrentHashTable* mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func) MONO_INTERNAL;
+MonoConcurrentHashTable* mono_conc_hashtable_new_full (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func) MONO_INTERNAL;
+void mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table) MONO_INTERNAL;
+gpointer mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL;
+gpointer mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value) MONO_INTERNAL;
+gpointer mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL;
+
+#endif
+
diff --git a/mono/utils/mono-context.h b/mono/utils/mono-context.h
index a84b5b5096a..11254802fc4 100755
--- a/mono/utils/mono-context.h
+++ b/mono/utils/mono-context.h
@@ -180,7 +180,8 @@ typedef struct {
#define MONO_CONTEXT_GET_BP(ctx) ((gpointer)((ctx)->rbp))
#define MONO_CONTEXT_GET_SP(ctx) ((gpointer)((ctx)->rsp))
-#if defined (HOST_WIN32)
+#if defined (HOST_WIN32) && !defined(__GNUC__)
+/* msvc doesn't support inline assembly, so have to use a separate .asm file */
extern void mono_context_get_current (void *);
#define MONO_CONTEXT_GET_CURRENT(ctx) do { mono_context_get_current((void*)&(ctx)); } while (0)
diff --git a/mono/utils/mono-error-internals.h b/mono/utils/mono-error-internals.h
index 80672403089..ac2394fa41c 100644
--- a/mono/utils/mono-error-internals.h
+++ b/mono/utils/mono-error-internals.h
@@ -33,6 +33,9 @@ void
mono_error_set_assembly_load (MonoError *error, const char *assembly_name, const char *msg_format, ...) MONO_INTERNAL;
void
+mono_error_set_assembly_load_simple (MonoError *error, const char *assembly_name, gboolean refection_only) MONO_INTERNAL;
+
+void
mono_error_set_type_load_class (MonoError *error, MonoClass *klass, const char *msg_format, ...) MONO_INTERNAL;
void
@@ -68,6 +71,9 @@ mono_error_set_from_loader_error (MonoError *error) MONO_INTERNAL;
MonoException*
mono_error_prepare_exception (MonoError *error, MonoError *error_out) MONO_INTERNAL;
+MonoException*
+mono_error_convert_to_exception (MonoError *error) MONO_INTERNAL;
+
void
mono_error_raise_exception (MonoError *error) MONO_INTERNAL;
diff --git a/mono/utils/mono-error.c b/mono/utils/mono-error.c
index a59de349f30..63d6fcc00f8 100644
--- a/mono/utils/mono-error.c
+++ b/mono/utils/mono-error.c
@@ -188,6 +188,16 @@ mono_error_set_assembly_load (MonoError *oerror, const char *assembly_name, cons
set_error_message ();
}
+
+void
+mono_error_set_assembly_load_simple (MonoError *oerror, const char *assembly_name, gboolean refection_only)
+{
+ if (refection_only)
+ mono_error_set_assembly_load (oerror, assembly_name, "Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.");
+ else
+ mono_error_set_assembly_load (oerror, assembly_name, "Could not load file or assembly or one of its dependencies.");
+}
+
void
mono_error_set_type_load_class (MonoError *oerror, MonoClass *klass, const char *msg_format, ...)
{
@@ -321,10 +331,7 @@ mono_error_set_from_loader_error (MonoError *oerror)
break;
case MONO_EXCEPTION_FILE_NOT_FOUND:
- if (loader_error->ref_only)
- mono_error_set_assembly_load (oerror, loader_error->assembly_name, "Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event.");
- else
- mono_error_set_assembly_load (oerror, loader_error->assembly_name, "Could not load file or assembly or one of its dependencies.");
+ mono_error_set_assembly_load_simple (oerror, loader_error->assembly_name, loader_error->ref_only);
break;
case MONO_EXCEPTION_METHOD_ACCESS:
@@ -629,20 +636,18 @@ mono_error_prepare_exception (MonoError *oerror, MonoError *error_out)
}
/*
-Raises the exception of @error.
-Does nothing if @error has a success error code.
-Aborts in case of a double fault. This happens when it can't recover from an error caused by trying
-to construct the first exception object.
-The error object @error is cleaned up.
+Convert this MonoError to an exception if it's faulty or return NULL.
+The error object is cleant after.
*/
-void
-mono_error_raise_exception (MonoError *target_error)
+
+MonoException*
+mono_error_convert_to_exception (MonoError *target_error)
{
MonoError error;
MonoException *ex;
if (mono_error_ok (target_error))
- return;
+ return NULL;
ex = mono_error_prepare_exception (target_error, &error);
if (!mono_error_ok (&error)) {
@@ -654,6 +659,21 @@ mono_error_raise_exception (MonoError *target_error)
mono_error_cleanup (&error);
}
mono_error_cleanup (target_error);
+ return ex;
+}
- mono_raise_exception (ex);
+
+/*
+Raises the exception of @error.
+Does nothing if @error has a success error code.
+Aborts in case of a double fault. This happens when it can't recover from an error caused by trying
+to construct the first exception object.
+The error object @error is cleaned up.
+*/
+void
+mono_error_raise_exception (MonoError *target_error)
+{
+ MonoException *ex = mono_error_convert_to_exception (target_error);
+ if (ex)
+ mono_raise_exception (ex);
}
diff --git a/mono/utils/mono-logger.c b/mono/utils/mono-logger.c
index bfe84f04f7d..a6be2717e58 100644
--- a/mono/utils/mono-logger.c
+++ b/mono/utils/mono-logger.c
@@ -16,6 +16,7 @@ static MonoTraceMask current_mask = MONO_TRACE_ALL;
static const char *mono_log_domain = "Mono";
static GQueue *level_stack = NULL;
+static MonoPrintCallback print_callback, printerr_callback;
/**
* mono_trace_init:
@@ -254,3 +255,87 @@ mono_trace_is_traced (GLogLevelFlags level, MonoTraceMask mask)
{
return (level <= current_level && mask & current_mask);
}
+
+static MonoLogCallback log_callback;
+
+static const char*
+log_level_get_name (GLogLevelFlags log_level)
+{
+ switch (log_level & G_LOG_LEVEL_MASK) {
+ case G_LOG_LEVEL_ERROR: return "error";
+ case G_LOG_LEVEL_CRITICAL: return "critical";
+ case G_LOG_LEVEL_WARNING: return "warning";
+ case G_LOG_LEVEL_MESSAGE: return "message";
+ case G_LOG_LEVEL_INFO: return "info";
+ case G_LOG_LEVEL_DEBUG: return "debug";
+ default: return "unknown";
+ }
+}
+
+static void
+log_adapter (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
+{
+ log_callback (log_domain, log_level_get_name (log_level), message, log_level & G_LOG_LEVEL_ERROR, user_data);
+}
+
+/**
+ * mono_trace_set_log_handler:
+ *
+ * @callback The callback that will replace the default logging handler
+ * @user_data Argument passed to @callback
+ *
+ * The log handler replaces the default runtime logger. All logging requests with be routed to it.
+ * If the fatal argument in the callback is true, the callback must abort the current process. The runtime expects that
+ * execution will not resume after a fatal error.
+ */
+void
+mono_trace_set_log_handler (MonoLogCallback callback, void *user_data)
+{
+ g_assert (callback);
+ log_callback = callback;
+ g_log_set_default_handler (log_adapter, user_data);
+}
+
+static void
+print_handler (const char *string)
+{
+ print_callback (string, TRUE);
+}
+
+static void
+printerr_handler (const char *string)
+{
+ printerr_callback (string, FALSE);
+}
+
+/**
+ * mono_trace_set_print_handler:
+ *
+ * @callback The callback that will replace the default runtime behavior for stdout output.
+ *
+ * The print handler replaces the default runtime stdout output handler. This is used by free form output done by the runtime.
+ *
+ */
+void
+mono_trace_set_print_handler (MonoPrintCallback callback)
+{
+ g_assert (callback);
+ print_callback = callback;
+ g_set_print_handler (print_handler);
+}
+
+/**
+ * mono_trace_set_printerr_handler:
+ *
+ * @callback The callback that will replace the default runtime behavior for stderr output.
+ *
+ * The print handler replaces the default runtime stderr output handler. This is used by free form output done by the runtime.
+ *
+ */
+void
+mono_trace_set_printerr_handler (MonoPrintCallback callback)
+{
+ g_assert (callback);
+ printerr_callback = callback;
+ g_set_print_handler (printerr_handler);
+}
diff --git a/mono/utils/mono-logger.h b/mono/utils/mono-logger.h
index 3f07378c769..36f7714f2ed 100644
--- a/mono/utils/mono-logger.h
+++ b/mono/utils/mono-logger.h
@@ -10,6 +10,19 @@ mono_trace_set_level_string (const char *value);
MONO_API void
mono_trace_set_mask_string (const char *value);
+typedef void (*MonoLogCallback) (const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data);
+typedef void (*MonoPrintCallback) (const char *string, mono_bool is_stdout);
+
+MONO_API void
+mono_trace_set_log_handler (MonoLogCallback callback, void *user_data);
+
+MONO_API void
+mono_trace_set_print_handler (MonoPrintCallback callback);
+
+MONO_API void
+mono_trace_set_printerr_handler (MonoPrintCallback callback);
+
+
MONO_END_DECLS
#endif /* __MONO_LOGGER_H__ */
diff --git a/mono/utils/mono-mutex.h b/mono/utils/mono-mutex.h
index 01a5c83ac23..864c660ea4e 100644
--- a/mono/utils/mono-mutex.h
+++ b/mono/utils/mono-mutex.h
@@ -11,6 +11,8 @@
#ifndef __MONO_MUTEX_H__
#define __MONO_MUTEX_H__
+#include <config.h>
+
#include <glib.h>
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
@@ -18,6 +20,7 @@
#include <time.h>
#ifdef HOST_WIN32
+#include <winsock2.h>
#include <windows.h>
#endif
diff --git a/mono/utils/mono-proclib.c b/mono/utils/mono-proclib.c
index 7971cb09cf3..3f032f9d22c 100644
--- a/mono/utils/mono-proclib.c
+++ b/mono/utils/mono-proclib.c
@@ -408,11 +408,17 @@ get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul
struct task_basic_info t_info;
mach_msg_type_number_t th_count = TASK_BASIC_INFO_COUNT;
- if (task_for_pid (mach_task_self (), pid, &task) != KERN_SUCCESS)
- RET_ERROR (MONO_PROCESS_ERROR_NOT_FOUND);
+ if (pid == getpid ()) {
+ /* task_for_pid () doesn't work on ios, even for the current process */
+ task = mach_task_self ();
+ } else {
+ if (task_for_pid (mach_task_self (), pid, &task) != KERN_SUCCESS)
+ RET_ERROR (MONO_PROCESS_ERROR_NOT_FOUND);
+ }
if (task_info (task, TASK_BASIC_INFO, (task_info_t)&t_info, &th_count) != KERN_SUCCESS) {
- mach_port_deallocate (mach_task_self (), task);
+ if (pid != getpid ())
+ mach_port_deallocate (mach_task_self (), task);
RET_ERROR (MONO_PROCESS_ERROR_OTHER);
}
@@ -425,7 +431,8 @@ get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul
else
ret = 0;
- mach_port_deallocate (mach_task_self (), task);
+ if (pid != getpid ())
+ mach_port_deallocate (mach_task_self (), task);
return ret;
#else
diff --git a/mono/utils/mono-publib.h b/mono/utils/mono-publib.h
index 505592a862f..cc1e1364e26 100644
--- a/mono/utils/mono-publib.h
+++ b/mono/utils/mono-publib.h
@@ -60,6 +60,7 @@ typedef unsigned __int64 uint64_t;
typedef int32_t mono_bool;
typedef uint8_t mono_byte;
typedef uint16_t mono_unichar2;
+typedef uint32_t mono_unichar4;
typedef void (*MonoFunc) (void* data, void* user_data);
typedef void (*MonoHFunc) (void* key, void* value, void* user_data);
diff --git a/mono/utils/mono-sigcontext.h b/mono/utils/mono-sigcontext.h
index daa82bbef37..05817a842f3 100644
--- a/mono/utils/mono-sigcontext.h
+++ b/mono/utils/mono-sigcontext.h
@@ -16,14 +16,14 @@
#if defined(TARGET_X86)
-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__DragonFly__)
#include <ucontext.h>
#endif
#if defined(__APPLE__)
#include <AvailabilityMacros.h>
#endif
-#if defined(__FreeBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_eax)
#define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ebx)
#define UCONTEXT_REG_ECX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_ecx)
@@ -154,7 +154,7 @@ typedef struct ucontext {
#elif defined(TARGET_AMD64)
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <ucontext.h>
#endif
@@ -176,7 +176,7 @@ typedef struct ucontext {
#define UCONTEXT_REG_R13(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r13)
#define UCONTEXT_REG_R14(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r14)
#define UCONTEXT_REG_R15(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__r15)
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#define UCONTEXT_REG_RAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rax)
#define UCONTEXT_REG_RBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rbx)
#define UCONTEXT_REG_RCX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.mc_rcx)
diff --git a/mono/utils/mono-threads-android.c b/mono/utils/mono-threads-android.c
new file mode 100644
index 00000000000..a72ee81a560
--- /dev/null
+++ b/mono/utils/mono-threads-android.c
@@ -0,0 +1,9 @@
+#include <config.h>
+
+#if defined(PLATFORM_ANDROID)
+
+#ifdef ENABLE_EXTENSION_MODULE
+#include "../../../mono-extensions/mono/utils/mono-threads-android.c"
+#endif
+
+#endif
diff --git a/mono/utils/mono-threads-freebsd.c b/mono/utils/mono-threads-freebsd.c
new file mode 100644
index 00000000000..7cbbca14b57
--- /dev/null
+++ b/mono/utils/mono-threads-freebsd.c
@@ -0,0 +1,24 @@
+#include <config.h>
+
+#if defined(__FreeBSD__)
+
+#include <pthread.h>
+#include <pthread_np.h>
+
+void
+mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
+{
+ pthread_attr_t attr;
+ guint8 *current = (guint8*)&attr;
+
+ *staddr = NULL;
+ *stsize = (size_t)-1;
+
+ pthread_attr_init (&attr);
+ pthread_attr_get_np (pthread_self (), &attr);
+
+ pthread_attr_getstack (&attr, (void**)staddr, stsize);
+ pthread_attr_destroy (&attr);
+}
+
+#endif
diff --git a/mono/utils/mono-threads-linux.c b/mono/utils/mono-threads-linux.c
new file mode 100644
index 00000000000..e2ee61c42f8
--- /dev/null
+++ b/mono/utils/mono-threads-linux.c
@@ -0,0 +1,21 @@
+#include <config.h>
+
+#if defined(__linux__) && !defined(PLATFORM_ANDROID)
+
+#include <mono/utils/mono-threads.h>
+#include <pthread.h>
+
+void
+mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
+{
+ pthread_attr_t attr;
+
+ *staddr = NULL;
+ *stsize = (size_t)-1;
+
+ pthread_getattr_np (pthread_self (), &attr);
+ pthread_attr_getstack (&attr, (void**)staddr, stsize);
+ pthread_attr_destroy (&attr);
+}
+
+#endif
diff --git a/mono/utils/mono-threads-mach-helper.c b/mono/utils/mono-threads-mach-helper.c
index cafb3fe96d0..fd95b92fad1 100644
--- a/mono/utils/mono-threads-mach-helper.c
+++ b/mono/utils/mono-threads-mach-helper.c
@@ -11,6 +11,7 @@
#if defined(__MACH__)
+#include <stdio.h>
#include <objc/runtime.h>
#include <objc/message.h>
#include <mono/utils/mono-compiler.h>
diff --git a/mono/utils/mono-threads-mach.c b/mono/utils/mono-threads-mach.c
index f4ad2637e57..4ed6820e900 100644
--- a/mono/utils/mono-threads-mach.c
+++ b/mono/utils/mono-threads-mach.c
@@ -11,18 +11,19 @@
#if defined(__MACH__)
+/* For pthread_main_np, pthread_get_stackaddr_np and pthread_get_stacksize_np */
+#define _DARWIN_C_SOURCE 1
+
#include <mono/utils/mach-support.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-semaphore.h>
#include <mono/utils/mono-threads.h>
#include <mono/utils/hazard-pointer.h>
+#include <mono/utils/mono-mmap.h>
#include <mono/metadata/gc-internal.h>
#include <mono/metadata/appdomain.h>
#include <mono/metadata/threads-types.h>
-#include <pthread.h>
-#include <errno.h>
-
void
mono_threads_init_platform (void)
{
@@ -148,4 +149,24 @@ mono_threads_core_set_name (MonoNativeThreadId tid, const char *name)
/* pthread_setnmae_np() on Mac is not documented and doesn't receive thread id. */
}
+void
+mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
+{
+ *staddr = (guint8*)pthread_get_stackaddr_np (pthread_self());
+ *stsize = pthread_get_stacksize_np (pthread_self());
+
+#ifdef TARGET_OSX
+ /*
+ * Mavericks reports stack sizes as 512kb:
+ * http://permalink.gmane.org/gmane.comp.java.openjdk.hotspot.devel/11590
+ * https://bugs.openjdk.java.net/browse/JDK-8020753
+ */
+ if (pthread_main_np () && *stsize == 512 * 1024)
+ *stsize = 2048 * mono_pagesize ();
+#endif
+
+ /* staddr points to the start of the stack, not the end */
+ *staddr -= *stsize;
+}
+
#endif
diff --git a/mono/utils/mono-threads-openbsd.c b/mono/utils/mono-threads-openbsd.c
new file mode 100644
index 00000000000..96a962230e1
--- /dev/null
+++ b/mono/utils/mono-threads-openbsd.c
@@ -0,0 +1,32 @@
+#include <config.h>
+
+#if defined(__OpenBSD__)
+
+#include <pthread.h>
+#include <pthread_np.h>
+
+void
+mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
+{
+ /* TODO : Determine if this code is actually still needed. It may already be covered by the case above. */
+ pthread_attr_t attr;
+ guint8 *current = (guint8*)&attr;
+
+ *staddr = NULL;
+ *stsize = (size_t)-1;
+
+ pthread_attr_init (&attr);
+
+ stack_t ss;
+ int rslt;
+
+ rslt = pthread_stackseg_np (pthread_self (), &ss);
+ g_assert (rslt == 0);
+
+ *staddr = (guint8*)((size_t)ss.ss_sp - ss.ss_size);
+ *stsize = ss.ss_size;
+
+ pthread_attr_destroy (&attr);
+}
+
+#endif
diff --git a/mono/utils/mono-threads-posix.c b/mono/utils/mono-threads-posix.c
index 37bc7580da5..ce087bbc36b 100644
--- a/mono/utils/mono-threads-posix.c
+++ b/mono/utils/mono-threads-posix.c
@@ -9,11 +9,6 @@
#include <config.h>
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
-#include <pthread.h>
-#include <pthread_np.h>
-#endif
-
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-semaphore.h>
#include <mono/utils/mono-threads.h>
@@ -28,11 +23,6 @@
extern int tkill (pid_t tid, int signal);
#endif
-#if defined(PLATFORM_MACOSX) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
-void *pthread_get_stackaddr_np(pthread_t);
-size_t pthread_get_stacksize_np(pthread_t);
-#endif
-
#if defined(_POSIX_VERSION) || defined(__native_client__)
#include <sys/resource.h>
#include <signal.h>
@@ -179,114 +169,6 @@ mono_threads_core_resume_created (MonoThreadInfo *info, MonoNativeThreadId tid)
MONO_SEM_POST (&info->create_suspended_sem);
}
-void
-mono_threads_core_get_stack_bounds (guint8 **staddr, size_t *stsize)
-{
-#if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
- /* Mac OS X */
- *staddr = (guint8*)pthread_get_stackaddr_np (pthread_self());
- *stsize = pthread_get_stacksize_np (pthread_self());
-
-
-#ifdef TARGET_OSX
- /*
- * Mavericks reports stack sizes as 512kb:
- * http://permalink.gmane.org/gmane.comp.java.openjdk.hotspot.devel/11590
- * https://bugs.openjdk.java.net/browse/JDK-8020753
- */
- if (*stsize == 512 * 1024)
- *stsize = 2048 * mono_pagesize ();
-#endif
-
- /* staddr points to the start of the stack, not the end */
- *staddr -= *stsize;
-
- /* When running under emacs, sometimes staddr is not aligned to a page size */
- *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize() - 1));
- return;
-
-#elif (defined(HAVE_PTHREAD_GETATTR_NP) || defined(HAVE_PTHREAD_ATTR_GET_NP)) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
- /* Linux, BSD */
-
- pthread_attr_t attr;
- guint8 *current = (guint8*)&attr;
-
- *staddr = NULL;
- *stsize = (size_t)-1;
-
- pthread_attr_init (&attr);
-
-#if defined(HAVE_PTHREAD_GETATTR_NP)
- /* Linux */
- pthread_getattr_np (pthread_self(), &attr);
-
-#elif defined(HAVE_PTHREAD_ATTR_GET_NP)
- /* BSD */
- pthread_attr_get_np (pthread_self(), &attr);
-
-#else
-#error Cannot determine which API is needed to retrieve pthread attributes.
-#endif
-
- pthread_attr_getstack (&attr, (void**)staddr, stsize);
- pthread_attr_destroy (&attr);
-
- if (*staddr)
- g_assert ((current > *staddr) && (current < *staddr + *stsize));
-
- /* When running under emacs, sometimes staddr is not aligned to a page size */
- *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
- return;
-
-#elif defined(__OpenBSD__)
- /* OpenBSD */
- /* TODO : Determine if this code is actually still needed. It may already be covered by the case above. */
-
- pthread_attr_t attr;
- guint8 *current = (guint8*)&attr;
-
- *staddr = NULL;
- *stsize = (size_t)-1;
-
- pthread_attr_init (&attr);
-
- stack_t ss;
- int rslt;
-
- rslt = pthread_stackseg_np(pthread_self(), &ss);
- g_assert (rslt == 0);
-
- *staddr = (guint8*)((size_t)ss.ss_sp - ss.ss_size);
- *stsize = ss.ss_size;
-
- pthread_attr_destroy (&attr);
-
- if (*staddr)
- g_assert ((current > *staddr) && (current < *staddr + *stsize));
-
- /* When running under emacs, sometimes staddr is not aligned to a page size */
- *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
- return;
-
-#elif defined(sun) || defined(__native_client__)
- /* Solaris/Illumos, NaCl */
- pthread_attr_t attr;
- pthread_attr_init (&attr);
- pthread_attr_getstacksize (&attr, &stsize);
- pthread_attr_destroy (&attr);
- *staddr = NULL;
- return;
-
-#else
- /* FIXME: It'd be better to use the 'error' preprocessor macro here so we know
- at compile-time if the target platform isn't supported. */
-#warning "Unable to determine how to retrieve a thread's stack-bounds for this platform in 'mono_thread_get_stack_bounds()'."
- *staddr = NULL;
- *stsize = 0;
- return;
-#endif
-}
-
gboolean
mono_threads_core_yield (void)
{
diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c
index 0258e2aa28f..cbb768aea8c 100644
--- a/mono/utils/mono-threads.c
+++ b/mono/utils/mono-threads.c
@@ -14,6 +14,7 @@
#include <mono/utils/mono-tls.h>
#include <mono/utils/hazard-pointer.h>
#include <mono/utils/mono-memory-model.h>
+#include <mono/utils/mono-mmap.h>
#include <errno.h>
@@ -41,7 +42,7 @@ static MonoSemType global_suspend_semaphore;
static size_t thread_info_size;
static MonoThreadInfoCallbacks threads_callbacks;
static MonoThreadInfoRuntimeCallbacks runtime_callbacks;
-static MonoNativeTlsKey thread_info_key, small_id_key;
+static MonoNativeTlsKey thread_info_key, thread_exited_key, small_id_key;
static MonoLinkedListSet thread_list;
static gboolean disable_new_interrupt = FALSE;
static gboolean mono_threads_inited = FALSE;
@@ -168,6 +169,8 @@ unregister_thread (void *arg)
THREADS_DEBUG ("unregistering info %p\n", info);
+ mono_native_tls_set_value (thread_exited_key, GUINT_TO_POINTER (1));
+
mono_threads_core_unregister (info);
/*
@@ -206,6 +209,27 @@ unregister_thread (void *arg)
mono_thread_small_id_free (small_id);
}
+static void
+thread_exited_dtor (void *arg)
+{
+#if defined(__MACH__)
+ /*
+ * Since we use pthread dtors to clean up thread data, if a thread
+ * is attached to the runtime by another pthread dtor after our dtor
+ * has ran, it will never be detached, leading to various problems
+ * since the thread ids etc. will be reused while they are still in
+ * the threads hashtables etc.
+ * Dtors are called in a loop until all user tls entries are 0,
+ * but the loop has a maximum count (4), so if we set the tls
+ * variable every time, it will remain set when system tls dtors
+ * are ran. This allows mono_thread_info_is_exiting () to detect
+ * whenever the thread is exiting, even if it is executed from a
+ * system tls dtor (i.e. obj-c dealloc methods).
+ */
+ mono_native_tls_set_value (thread_exited_key, GUINT_TO_POINTER (1));
+#endif
+}
+
/**
* Removes the current thread from the thread list.
* This must be called from the thread unregister callback and nowhere else.
@@ -304,6 +328,22 @@ mono_thread_info_detach (void)
}
}
+/*
+ * mono_thread_info_is_exiting:
+ *
+ * Return whenever the current thread is exiting, i.e. it is running pthread
+ * dtors.
+ */
+gboolean
+mono_thread_info_is_exiting (void)
+{
+#if defined(__MACH__)
+ if (mono_native_tls_get_value (thread_exited_key) == GUINT_TO_POINTER (1))
+ return TRUE;
+#endif
+ return FALSE;
+}
+
void
mono_threads_init (MonoThreadInfoCallbacks *callbacks, size_t info_size)
{
@@ -312,8 +352,10 @@ mono_threads_init (MonoThreadInfoCallbacks *callbacks, size_t info_size)
thread_info_size = info_size;
#ifdef HOST_WIN32
res = mono_native_tls_alloc (&thread_info_key, NULL);
+ res = mono_native_tls_alloc (&thread_exited_key, NULL);
#else
res = mono_native_tls_alloc (&thread_info_key, unregister_thread);
+ res = mono_native_tls_alloc (&thread_exited_key, thread_exited_dtor);
#endif
g_assert (res);
@@ -357,18 +399,21 @@ mono_threads_get_runtime_callbacks (void)
The return value is only valid until a matching mono_thread_info_resume is called
*/
static MonoThreadInfo*
-mono_thread_info_suspend_sync (MonoNativeThreadId tid, gboolean interrupt_kernel)
+mono_thread_info_suspend_sync (MonoNativeThreadId tid, gboolean interrupt_kernel, const char **error_condition)
{
MonoThreadHazardPointers *hp = mono_hazard_pointer_get ();
MonoThreadInfo *info = mono_thread_info_lookup (tid); /*info on HP1*/
- if (!info)
+ if (!info) {
+ *error_condition = "Thread not found";
return NULL;
+ }
MONO_SEM_WAIT_UNITERRUPTIBLE (&info->suspend_semaphore);
/*thread is on the process of detaching*/
if (mono_thread_info_run_state (info) > STATE_RUNNING) {
mono_hazard_pointer_clear (hp, 1);
+ *error_condition = "Thread is detaching";
return NULL;
}
@@ -384,6 +429,7 @@ mono_thread_info_suspend_sync (MonoNativeThreadId tid, gboolean interrupt_kernel
if (!mono_threads_core_suspend (info)) {
MONO_SEM_POST (&info->suspend_semaphore);
mono_hazard_pointer_clear (hp, 1);
+ *error_condition = "Could not suspend thread";
return NULL;
}
@@ -557,8 +603,9 @@ mono_thread_info_safe_suspend_sync (MonoNativeThreadId id, gboolean interrupt_ke
mono_thread_info_suspend_lock ();
for (;;) {
- if (!(info = mono_thread_info_suspend_sync (id, interrupt_kernel))) {
- g_warning ("failed to suspend thread %p, hopefully it is dead", (gpointer)id);
+ const char *suspend_error = "Unknown error";
+ if (!(info = mono_thread_info_suspend_sync (id, interrupt_kernel, &suspend_error))) {
+ g_warning ("failed to suspend thread %p due to %s, hopefully it is dead", (gpointer)id, suspend_error);
mono_thread_info_suspend_unlock ();
return NULL;
}
@@ -567,7 +614,7 @@ mono_thread_info_safe_suspend_sync (MonoNativeThreadId id, gboolean interrupt_ke
break;
if (!mono_thread_info_core_resume (info)) {
- g_warning ("failed to result thread %p, hopefully it is dead", (gpointer)id);
+ g_warning ("failed to resume thread %p, hopefully it is dead", (gpointer)id);
mono_hazard_pointer_clear (mono_hazard_pointer_get (), 1);
mono_thread_info_suspend_unlock ();
return NULL;
@@ -741,7 +788,16 @@ mono_threads_create_thread (LPTHREAD_START_ROUTINE start, gpointer arg, guint32
void
mono_thread_info_get_stack_bounds (guint8 **staddr, size_t *stsize)
{
+ guint8 *current = (guint8 *)&stsize;
mono_threads_core_get_stack_bounds (staddr, stsize);
+ if (!*staddr)
+ return;
+
+ /* Sanity check the result */
+ g_assert ((current > *staddr) && (current < *staddr + *stsize));
+
+ /* When running under emacs, sometimes staddr is not aligned to a page size */
+ *staddr = (guint8*)((gssize)*staddr & ~(mono_pagesize () - 1));
}
gboolean
diff --git a/mono/utils/mono-threads.h b/mono/utils/mono-threads.h
index dbd25a8f778..d97543313c9 100644
--- a/mono/utils/mono-threads.h
+++ b/mono/utils/mono-threads.h
@@ -227,6 +227,9 @@ mono_thread_info_attach (void *baseptr) MONO_INTERNAL;
void
mono_thread_info_detach (void) MONO_INTERNAL;
+gboolean
+mono_thread_info_is_exiting (void) MONO_INTERNAL;
+
THREAD_INFO_TYPE *
mono_thread_info_current (void) MONO_INTERNAL;
diff --git a/mono/utils/sha1.c b/mono/utils/sha1.c
new file mode 100644
index 00000000000..7dec326b2ec
--- /dev/null
+++ b/mono/utils/sha1.c
@@ -0,0 +1,176 @@
+/* $OpenBSD: sha1.c,v 1.22 2012/08/27 21:05:43 miod Exp $ */
+
+/*
+ * SHA-1 in C
+ * By Steve Reid <steve@edmweb.com>
+ * 100% Public Domain
+ *
+ * Test Vectors (from FIPS PUB 180-1)
+ * "abc"
+ * A9993E36 4706816A BA3E2571 7850C26C 9CD0D89D
+ * "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+ * 84983E44 1C3BD26E BAAE4AA1 F95129E5 E54670F1
+ * A million repetitions of "a"
+ * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F
+ */
+
+#include <sys/param.h>
+#include <string.h>
+#include <stdint.h>
+#include <sha1.h>
+
+#define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits))))
+
+/*
+ * blk0() and blk() perform the initial expand.
+ * I got the idea of expanding during the round function from SSLeay
+ */
+#if BYTE_ORDER == LITTLE_ENDIAN
+# define blk0(i) (block->l[i] = (rol(block->l[i],24)&0xFF00FF00) \
+ |(rol(block->l[i],8)&0x00FF00FF))
+#else
+# define blk0(i) block->l[i]
+#endif
+#define blk(i) (block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
+ ^block->l[(i+2)&15]^block->l[i&15],1))
+
+/*
+ * (R0+R1), R2, R3, R4 are the different operations (rounds) used in SHA1
+ */
+#define R0(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk0(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R1(v,w,x,y,z,i) z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
+#define R2(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
+#define R3(v,w,x,y,z,i) z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
+#define R4(v,w,x,y,z,i) z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);
+
+typedef union {
+ guint8 c[64];
+ guint32 l[16];
+} CHAR64LONG16;
+
+/*
+ * Hash a single 512-bit block. This is the core of the algorithm.
+ */
+void
+SHA1Transform(guint32 state[5], const guint8 buffer[SHA1_BLOCK_LENGTH])
+{
+ guint32 a, b, c, d, e;
+ guint8 workspace[SHA1_BLOCK_LENGTH];
+ CHAR64LONG16 *block = (CHAR64LONG16 *)workspace;
+
+ (void)memcpy(block, buffer, SHA1_BLOCK_LENGTH);
+
+ /* Copy context->state[] to working vars */
+ a = state[0];
+ b = state[1];
+ c = state[2];
+ d = state[3];
+ e = state[4];
+
+ /* 4 rounds of 20 operations each. Loop unrolled. */
+ R0(a,b,c,d,e, 0); R0(e,a,b,c,d, 1); R0(d,e,a,b,c, 2); R0(c,d,e,a,b, 3);
+ R0(b,c,d,e,a, 4); R0(a,b,c,d,e, 5); R0(e,a,b,c,d, 6); R0(d,e,a,b,c, 7);
+ R0(c,d,e,a,b, 8); R0(b,c,d,e,a, 9); R0(a,b,c,d,e,10); R0(e,a,b,c,d,11);
+ R0(d,e,a,b,c,12); R0(c,d,e,a,b,13); R0(b,c,d,e,a,14); R0(a,b,c,d,e,15);
+ R1(e,a,b,c,d,16); R1(d,e,a,b,c,17); R1(c,d,e,a,b,18); R1(b,c,d,e,a,19);
+ R2(a,b,c,d,e,20); R2(e,a,b,c,d,21); R2(d,e,a,b,c,22); R2(c,d,e,a,b,23);
+ R2(b,c,d,e,a,24); R2(a,b,c,d,e,25); R2(e,a,b,c,d,26); R2(d,e,a,b,c,27);
+ R2(c,d,e,a,b,28); R2(b,c,d,e,a,29); R2(a,b,c,d,e,30); R2(e,a,b,c,d,31);
+ R2(d,e,a,b,c,32); R2(c,d,e,a,b,33); R2(b,c,d,e,a,34); R2(a,b,c,d,e,35);
+ R2(e,a,b,c,d,36); R2(d,e,a,b,c,37); R2(c,d,e,a,b,38); R2(b,c,d,e,a,39);
+ R3(a,b,c,d,e,40); R3(e,a,b,c,d,41); R3(d,e,a,b,c,42); R3(c,d,e,a,b,43);
+ R3(b,c,d,e,a,44); R3(a,b,c,d,e,45); R3(e,a,b,c,d,46); R3(d,e,a,b,c,47);
+ R3(c,d,e,a,b,48); R3(b,c,d,e,a,49); R3(a,b,c,d,e,50); R3(e,a,b,c,d,51);
+ R3(d,e,a,b,c,52); R3(c,d,e,a,b,53); R3(b,c,d,e,a,54); R3(a,b,c,d,e,55);
+ R3(e,a,b,c,d,56); R3(d,e,a,b,c,57); R3(c,d,e,a,b,58); R3(b,c,d,e,a,59);
+ R4(a,b,c,d,e,60); R4(e,a,b,c,d,61); R4(d,e,a,b,c,62); R4(c,d,e,a,b,63);
+ R4(b,c,d,e,a,64); R4(a,b,c,d,e,65); R4(e,a,b,c,d,66); R4(d,e,a,b,c,67);
+ R4(c,d,e,a,b,68); R4(b,c,d,e,a,69); R4(a,b,c,d,e,70); R4(e,a,b,c,d,71);
+ R4(d,e,a,b,c,72); R4(c,d,e,a,b,73); R4(b,c,d,e,a,74); R4(a,b,c,d,e,75);
+ R4(e,a,b,c,d,76); R4(d,e,a,b,c,77); R4(c,d,e,a,b,78); R4(b,c,d,e,a,79);
+
+ /* Add the working vars back into context.state[] */
+ state[0] += a;
+ state[1] += b;
+ state[2] += c;
+ state[3] += d;
+ state[4] += e;
+
+ /* Wipe variables */
+ a = b = c = d = e = 0;
+}
+
+
+/*
+ * SHA1Init - Initialize new context
+ */
+void
+SHA1Init(SHA1_CTX *context)
+{
+
+ /* SHA1 initialization constants */
+ context->count = 0;
+ context->state[0] = 0x67452301;
+ context->state[1] = 0xEFCDAB89;
+ context->state[2] = 0x98BADCFE;
+ context->state[3] = 0x10325476;
+ context->state[4] = 0xC3D2E1F0;
+}
+
+
+/*
+ * Run your data through this.
+ */
+void
+SHA1Update(SHA1_CTX *context, const guint8 *data, size_t len)
+{
+ size_t i, j;
+
+ j = (size_t)((context->count >> 3) & 63);
+ context->count += (len << 3);
+ if ((j + len) > 63) {
+ (void)memcpy(&context->buffer[j], data, (i = 64-j));
+ SHA1Transform(context->state, context->buffer);
+ for ( ; i + 63 < len; i += 64)
+ SHA1Transform(context->state, (guint8 *)&data[i]);
+ j = 0;
+ } else {
+ i = 0;
+ }
+ (void)memcpy(&context->buffer[j], &data[i], len - i);
+}
+
+
+/*
+ * Add padding and return the message digest.
+ */
+void
+SHA1Pad(SHA1_CTX *context)
+{
+ guint8 finalcount[8];
+ guint i;
+
+ for (i = 0; i < 8; i++) {
+ finalcount[i] = (guint8)((context->count >>
+ ((7 - (i & 7)) * 8)) & 255); /* Endian independent */
+ }
+ SHA1Update(context, (guint8 *)"\200", 1);
+ while ((context->count & 504) != 448)
+ SHA1Update(context, (guint8 *)"\0", 1);
+ SHA1Update(context, finalcount, 8); /* Should cause a SHA1Transform() */
+}
+
+void
+SHA1Final(guint8 digest[SHA1_DIGEST_LENGTH], SHA1_CTX *context)
+{
+ guint i;
+
+ SHA1Pad(context);
+ if (digest) {
+ for (i = 0; i < SHA1_DIGEST_LENGTH; i++) {
+ digest[i] = (guint8)
+ ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
+ }
+ memset(context, 0, sizeof(*context));
+ }
+}
diff --git a/mono/utils/sha1.h b/mono/utils/sha1.h
new file mode 100644
index 00000000000..588518266ca
--- /dev/null
+++ b/mono/utils/sha1.h
@@ -0,0 +1,50 @@
+/* $OpenBSD: sha1.h,v 1.24 2012/12/05 23:19:57 deraadt Exp $ */
+
+/*
+ * SHA-1 in C
+ * By Steve Reid <steve@edmweb.com>
+ * 100% Public Domain
+ */
+
+#ifndef _SHA1_H
+#define _SHA1_H
+
+#include <glib.h>
+
+#define SHA1_BLOCK_LENGTH 64
+#define SHA1_DIGEST_LENGTH 20
+#define SHA1_DIGEST_STRING_LENGTH (SHA1_DIGEST_LENGTH * 2 + 1)
+
+typedef struct {
+ guint32 state[5];
+ guint64 count;
+ guint8 buffer[SHA1_BLOCK_LENGTH];
+} SHA1_CTX;
+
+G_BEGIN_DECLS
+void SHA1Init(SHA1_CTX *);
+void SHA1Pad(SHA1_CTX *);
+void SHA1Transform(guint32 [5], const guint8 [SHA1_BLOCK_LENGTH]);
+void SHA1Update(SHA1_CTX *, const guint8 *, size_t);
+void SHA1Final(guint8 [SHA1_DIGEST_LENGTH], SHA1_CTX *);
+char *SHA1End(SHA1_CTX *, char *);
+char *SHA1File(const char *, char *);
+char *SHA1FileChunk(const char *, char *, off_t, off_t);
+char *SHA1Data(const guint8 *, size_t, char *);
+G_END_DECLS
+
+#define HTONDIGEST(x) do { \
+ x[0] = htonl(x[0]); \
+ x[1] = htonl(x[1]); \
+ x[2] = htonl(x[2]); \
+ x[3] = htonl(x[3]); \
+ x[4] = htonl(x[4]); } while (0)
+
+#define NTOHDIGEST(x) do { \
+ x[0] = ntohl(x[0]); \
+ x[1] = ntohl(x[1]); \
+ x[2] = ntohl(x[2]); \
+ x[3] = ntohl(x[3]); \
+ x[4] = ntohl(x[4]); } while (0)
+
+#endif /* _SHA1_H */
diff --git a/msvc/libmonoruntime.vcxproj b/msvc/libmonoruntime.vcxproj
index 4520e2a0927..3635bdae2d5 100644
--- a/msvc/libmonoruntime.vcxproj
+++ b/msvc/libmonoruntime.vcxproj
@@ -125,6 +125,7 @@
<ClCompile Include="..\mono\metadata\threadpool.c" />
<ClCompile Include="..\mono\metadata\threads.c" />
<ClCompile Include="..\mono\metadata\verify.c" />
+ <ClCompile Include="..\mono\mini\mini-cross-helpers.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\mono\metadata\appdomain.h" />
diff --git a/msvc/libmonoutils.vcxproj b/msvc/libmonoutils.vcxproj
index b760ab76971..be579809125 100644
--- a/msvc/libmonoutils.vcxproj
+++ b/msvc/libmonoutils.vcxproj
@@ -30,6 +30,7 @@
<ClCompile Include="..\mono\utils\mach-support-x86.c" />
<ClCompile Include="..\mono\utils\mach-support.c" />
<ClCompile Include="..\mono\utils\mono-codeman.c" />
+ <ClCompile Include="..\mono\utils\mono-conc-hashtable.c" />
<ClCompile Include="..\mono\utils\mono-context.c" />
<ClCompile Include="..\mono\utils\mono-counters.c" />
<ClCompile Include="..\mono\utils\mono-dl.c" />
@@ -85,6 +86,7 @@
<ClInclude Include="..\mono\utils\memcheck.h" />
<ClInclude Include="..\mono\utils\mono-codeman.h" />
<ClInclude Include="..\mono\utils\mono-compiler.h" />
+ <ClInclude Include="..\mono\utils\mono-conc-hashtable.h" />
<ClInclude Include="..\mono\utils\mono-context.h" />
<ClInclude Include="..\mono\utils\mono-counters.h" />
<ClInclude Include="..\mono\utils\mono-digest.h" />
@@ -274,6 +276,9 @@
<PreBuildEvent>
<Command>winsetup.bat</Command>
</PreBuildEvent>
+ <MASM>
+ <PreprocessorDefinitions>X64</PreprocessorDefinitions>
+ </MASM>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
diff --git a/msvc/mono.def b/msvc/mono.def
index 6a1f0d49d54..61d1779c336 100644
--- a/msvc/mono.def
+++ b/msvc/mono.def
@@ -243,6 +243,7 @@ mono_domain_has_type_resolve
mono_domain_is_unloading
mono_domain_owns_vtable_slot
mono_domain_set
+mono_domain_set_config
mono_domain_set_internal
mono_domain_try_type_resolve
mono_domain_try_unload
diff --git a/msvc/monosgen.def b/msvc/monosgen.def
index 0cbc870c9a4..2c7a641e8a7 100644
--- a/msvc/monosgen.def
+++ b/msvc/monosgen.def
@@ -244,6 +244,7 @@ mono_domain_has_type_resolve
mono_domain_is_unloading
mono_domain_owns_vtable_slot
mono_domain_set
+mono_domain_set_config
mono_domain_set_internal
mono_domain_try_type_resolve
mono_domain_try_unload
diff --git a/msvc/monosgen64.def b/msvc/monosgen64.def
index 84f306ab796..d1c62a89b70 100644
--- a/msvc/monosgen64.def
+++ b/msvc/monosgen64.def
@@ -243,6 +243,7 @@ mono_domain_has_type_resolve
mono_domain_is_unloading
mono_domain_owns_vtable_slot
mono_domain_set
+mono_domain_set_config
mono_domain_set_internal
mono_domain_try_type_resolve
mono_domain_try_unload
diff --git a/runtime/Makefile.am b/runtime/Makefile.am
index df404acf398..ca34a6f396f 100644
--- a/runtime/Makefile.am
+++ b/runtime/Makefile.am
@@ -170,7 +170,7 @@ etc/mono/config: ../data/config Makefile $(symlinks)
d=`cd ../support && pwd`; \
sed 's,target="$(prefix)/$(reloc_libdir)/libMonoPosixHelper$(libsuffix)",target="'$$d'/libMonoPosixHelper.la",' ../data/config > $@t
if test -z "$(libgdiplus_loc)"; then :; else \
- sed 's,target="[^"]*libgdiplus[^"]*",target="$(libgdiplus_loc)",' $@t > $@tt; \
+ sed 's,target="$(libgdiplus_install_loc)",target="$(libgdiplus_loc)",' $@t > $@tt; \
mv -f $@tt $@t; fi
mv -f $@t $@
diff --git a/tools/sgen/gcpausevis.py b/tools/sgen/gcpausevis.py
index 66eb3138369..87d3e64d4ed 100755
--- a/tools/sgen/gcpausevis.py
+++ b/tools/sgen/gcpausevis.py
@@ -49,19 +49,19 @@ for line in iter (proc.stdout.readline, ''):
if m:
generation = int (m.group (1))
concurrent = int (m.group (2))
- usecs = int (m.group (3))
- start = int (m.group (4))
+ msecs = int (m.group (3)) / 10.0 / 1000.0
+ start = int (m.group (4)) / 10.0 / 1000.0
if generation == 0:
generation = "minor"
- minor_pausetimes.append (usecs)
+ minor_pausetimes.append (msecs)
else:
generation = "major"
- major_pausetimes.append (usecs)
+ major_pausetimes.append (msecs)
if concurrent == 1:
kind = "CONC"
else:
kind = "SYNC"
- rec = (generation, start, start + usecs, kind)
+ rec = (generation, start, start + msecs, kind)
print rec
data.append (rec)
@@ -72,6 +72,7 @@ if show_histogram:
if show_major:
pausetimes += major_pausetimes
plt.hist (pausetimes, 100)
+ plt.xlabel ('Pause time in msec')
else:
data = np.array (data, dtype = [('caption', '|S20'), ('start', int), ('stop', int), ('kind', '|S20')])
cap, start, stop=data['caption'], data['start'], data['stop']