Merge pull request #4621 from alexanderkyte/strdup_env
authorAlexander Kyte <alexmkyte@gmail.com>
Thu, 30 Mar 2017 22:17:29 +0000 (18:17 -0400)
committerGitHub <noreply@github.com>
Thu, 30 Mar 2017 22:17:29 +0000 (18:17 -0400)
[runtime] Switch getenv to use heap memory

1342 files changed:
.gitmodules
Makefile.am
configure.ac
data/lldb/monobt.py
docs/Makefile.am
docs/doxyfile
docs/exdoc
docs/sources/mono-api-jitinternal.html
external/binary-reference-assemblies
external/cecil
external/corefx
external/corert
external/ikdasm
external/linker
external/xunit-binaries [new submodule]
man/csharp.1
man/mono.1
mcs/build/Makefile
mcs/build/common/Consts.cs.in
mcs/build/library.make
mcs/build/platforms/darwin.make
mcs/build/profiles/monodroid.make
mcs/build/profiles/monotouch_runtime.make
mcs/build/profiles/monotouch_watch.make
mcs/build/profiles/monotouch_watch_runtime.make
mcs/build/profiles/net_4_x.make
mcs/build/profiles/xammac.make
mcs/build/profiles/xammac_net_4_5.make
mcs/build/rules.make
mcs/build/tests.make
mcs/class/.gitignore
mcs/class/Makefile
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildPropertyGroup.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ConsoleLogger.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Target.cs
mcs/class/Microsoft.Build/Microsoft.Build.Construction/ElementLocation.cs
mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/Project.cs
mcs/class/Microsoft.Build/Microsoft.Build.Evaluation/ProjectCollection.cs
mcs/class/Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_x.csproj
mcs/class/Mono.Cecil/Makefile
mcs/class/Mono.Cecil/Mono.Cecil-net_4_x.csproj
mcs/class/Mono.Cecil/Mono.Cecil.dll.sources
mcs/class/Mono.CodeContracts/Mono.CodeContracts-net_4_x.csproj
mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/TdsComm.cs
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft-net_4_x.csproj
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/FieldInfoMirror.cs
mcs/class/Mono.Posix/Mono.Unix.Android/AndroidUtils.cs [new file with mode: 0644]
mcs/class/Mono.Posix/Mono.Unix.Native/NativeConvert.cs
mcs/class/Mono.Posix/monodroid_Mono.Posix.dll.sources [new file with mode: 0644]
mcs/class/Mono.Security/Mono.Security.Interface/MonoTlsProviderFactory.Apple.cs [deleted file]
mcs/class/Mono.Security/monotouch_Mono.Security.dll.sources
mcs/class/Mono.Simd/Mono.Simd/Vector16b.cs
mcs/class/Mono.Simd/Mono.Simd/Vector16sb.cs
mcs/class/Mono.Simd/Mono.Simd/Vector2d.cs
mcs/class/Mono.Simd/Mono.Simd/Vector2l.cs
mcs/class/Mono.Simd/Mono.Simd/Vector2ul.cs
mcs/class/Mono.Simd/Mono.Simd/Vector4f.cs
mcs/class/Mono.Simd/Mono.Simd/Vector4i.cs
mcs/class/Mono.Simd/Mono.Simd/Vector4ui.cs
mcs/class/Mono.Simd/Mono.Simd/Vector8s.cs
mcs/class/Mono.Simd/Mono.Simd/Vector8us.cs
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_x.csproj
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap.dll.sources
mcs/class/System.Configuration/System.Configuration.Internal/DelegatingConfigHost.cs
mcs/class/System.Configuration/System.Configuration.Internal/IInternalConfigHost.cs
mcs/class/System.Configuration/System.Configuration/AppSettingsSection.cs
mcs/class/System.Configuration/System.Configuration/Configuration.cs
mcs/class/System.Configuration/System.Configuration/ConfigurationElement.cs
mcs/class/System.Configuration/System.Configuration/ConfigurationElementCollection.cs
mcs/class/System.Configuration/System.Configuration/ConfigurationProperty.cs
mcs/class/System.Configuration/System.Configuration/ConfigurationSectionGroup.cs
mcs/class/System.Configuration/System.Configuration/ConnectionStringSettingsCollection.cs
mcs/class/System.Configuration/System.Configuration/DpapiProtectedConfigurationProvider.cs
mcs/class/System.Configuration/System.Configuration/IgnoreSection.cs
mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.cs
mcs/class/System.Configuration/System.Configuration/ProtectedConfigurationProvider.cs
mcs/class/System.Configuration/System.Configuration/ProviderSettings.cs
mcs/class/System.Configuration/System.Configuration/ProviderSettingsCollection.cs
mcs/class/System.Configuration/System.Configuration/RsaProtectedConfigurationProvider.cs
mcs/class/System.Configuration/System.Configuration/SectionInformation.cs
mcs/class/System.Configuration/System.Configuration/ValidatorCallback.cs
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeMemoryMappedFileHandle.cs
mcs/class/System.Core/System.Core-net_4_x.csproj
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
mcs/class/System.Core/System.Security.Cryptography/AesCryptoServiceProvider.cs
mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs
mcs/class/System.Core/common_System.Core.dll.sources
mcs/class/System.Core/dynamic_System.Core.dll.sources
mcs/class/System.Data.Linq/src/DbLinq/Data/Linq/DataContext.cs
mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleCommandBuilder.cs
mcs/class/System.Data/Makefile
mcs/class/System.Data/System.Data.SqlClient/SqlConnection.cs
mcs/class/System.Data/System.Data.SqlClient/SqlCredential.cs
mcs/class/System.Data/System.Data_test.dll.sources
mcs/class/System.Data/Test/ProviderTests/Common/ConnectionConfig.cs
mcs/class/System.Data/Test/ProviderTests/Common/ConnectionManager.cs
mcs/class/System.Data/Test/ProviderTests/Common/DBHelper.cs
mcs/class/System.Data/Test/ProviderTests/Common/DataProvider.cs
mcs/class/System.Data/Test/ProviderTests/Common/EngineConfig.cs
mcs/class/System.Data/Test/ProviderTests/Common/EngineType.cs
mcs/class/System.Data/Test/ProviderTests/Common/ProviderTestsConfigurationHandler.cs
mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest.cs
mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DbDataReaderTest.cs
mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/IDbCommandTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.Connected.Tests.dll.sources
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataAdapterTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterCollectionTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlClientFactoryTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataAdapterTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataReaderTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterTest.cs
mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlTransactionTest.cs
mcs/class/System.Data/Test/ProviderTests/app-net_1_1.config
mcs/class/System.Data/Test/ProviderTests/app-net_2_0.config
mcs/class/System.Data/Test/ProviderTests/sql/MySQL_5.sql
mcs/class/System.Data/Test/ProviderTests/sql/sqlserver.sql
mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandBuilderTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionStringBuilderTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataAdapterTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcParameterCollectionTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcParameterTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionAttributeTest.cs
mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionTest.cs
mcs/class/System.Data/Test/System.Data.OleDb/OleDbCommandTest.cs
mcs/class/System.Data/Test/System.Data.OleDb/OleDbConnectionTest.cs
mcs/class/System.Data/Test/System.Data.OleDb/OleDbDataAdapterTest.cs
mcs/class/System.Data/Test/System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs
mcs/class/System.Data/Test/System.Data.OleDb/OleDbParameterCollectionTest.cs
mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs
mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionTest.cs
mcs/class/System.Data/Test/test-config-file
mcs/class/System.Data/mobile_System.Data.dll.sources
mcs/class/System.Data/testing_aot_full_System.Data_test.dll.exclude.sources [deleted file]
mcs/class/System.Data/testing_aot_hybrid_System.Data_test.dll.exclude.sources [deleted file]
mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomSerializer.cs
mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomSerializerBase.cs
mcs/class/System.Design/System.ComponentModel.Design.Serialization/DesignerSerializationManager.cs
mcs/class/System.Design/System.ComponentModel.Design.Serialization/ObjectStatementCollection.cs
mcs/class/System.Design/System.ComponentModel.Design.Serialization/RootContext.cs
mcs/class/System.Design/System.ComponentModel.Design/ComponentDesigner.cs
mcs/class/System.Design/System.ComponentModel.Design/DesignSurfaceManager.cs
mcs/class/System.Design/System.ComponentModel.Design/EventBindingService.cs
mcs/class/System.Design/System.ComponentModel.Design/MenuCommandService.cs
mcs/class/System.Design/System.Data.Design/TypedDataSetGeneratorException.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/BaseDataListComponentEditor.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/BaseDataListDesigner.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/DataListComponentEditor.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/ListControlDataBindingHandler.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/PanelDesigner.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/RepeaterDesigner.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/TableCellsCollectionEditor.cs
mcs/class/System.Design/System.Web.UI.Design.WebControls/TableRowsCollectionEditor.cs
mcs/class/System.Design/System.Windows.Forms.Design/ComponentTray.cs
mcs/class/System.Design/System.Windows.Forms.Design/ControlDesigner.cs
mcs/class/System.Design/System.Windows.Forms.Design/DocumentDesigner.cs
mcs/class/System.Design/System.Windows.Forms.Design/ParentControlDesigner.cs
mcs/class/System.Design/System.Windows.Forms.Design/ScrollableControlDesigner.cs
mcs/class/System.DirectoryServices/System.DirectoryServices-net_4_x.csproj
mcs/class/System.DirectoryServices/System.DirectoryServices.dll.sources
mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryEntries.cs
mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryServicesPermission.cs
mcs/class/System.DirectoryServices/System.DirectoryServices/DirectoryServicesPermissionEntryCollection.cs
mcs/class/System.DirectoryServices/System.DirectoryServices/PropertyValueCollection.cs
mcs/class/System.DirectoryServices/System.DirectoryServices/ResultPropertyCollection.cs
mcs/class/System.DirectoryServices/System.DirectoryServices/ResultPropertyValueCollection.cs
mcs/class/System.DirectoryServices/System.DirectoryServices/SchemaNameCollection.cs
mcs/class/System.Drawing/System.Drawing.Design/CategoryNameCollection.cs
mcs/class/System.Drawing/System.Drawing.Design/PaintValueEventArgs.cs
mcs/class/System.Drawing/System.Drawing.Design/PropertyValueItem.cs
mcs/class/System.Drawing/System.Drawing.Design/ToolboxComponentsCreatedEventArgs.cs
mcs/class/System.Drawing/System.Drawing.Design/UITypeEditor.cs
mcs/class/System.Drawing/System.Drawing.Drawing2D/GraphicsPath.cs
mcs/class/System.Drawing/System.Drawing.Drawing2D/HatchBrush.cs
mcs/class/System.Drawing/System.Drawing.Imaging/ColorMatrix.cs
mcs/class/System.Drawing/System.Drawing.Imaging/EncoderParameter.cs
mcs/class/System.Drawing/System.Drawing.Imaging/ImageAttributes.cs
mcs/class/System.Drawing/System.Drawing.Imaging/Metafile.cs
mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs
mcs/class/System.Drawing/System.Drawing.Text/PrivateFontCollection.cs
mcs/class/System.Drawing/System.Drawing/Bitmap.cs
mcs/class/System.Drawing/System.Drawing/BufferedGraphics.cs
mcs/class/System.Drawing/System.Drawing/BufferedGraphicsContext.cs
mcs/class/System.Drawing/System.Drawing/Font.cs
mcs/class/System.Drawing/System.Drawing/Graphics.cs
mcs/class/System.Drawing/System.Drawing/Icon.cs
mcs/class/System.Drawing/System.Drawing/Image.cs
mcs/class/System.Drawing/System.Drawing/Region.cs
mcs/class/System.Drawing/System.Drawing/gdipFunctions.cs
mcs/class/System.Drawing/System.Drawing/macFunctions.cs
mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs
mcs/class/System.EnterpriseServices/System.EnterpriseServices/ContextUtil.cs
mcs/class/System.EnterpriseServices/System.EnterpriseServices/RegistrationException.cs
mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors/CardSpacePolicyElement.cs
mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors/CardSpaceSelector.cs
mcs/class/System.IdentityModel/System.IdentityModel.Claims/Claim.cs
mcs/class/System.IdentityModel/System.IdentityModel.Claims/ClaimSet.cs
mcs/class/System.IdentityModel/System.IdentityModel.Claims/WindowsClaimSet.cs
mcs/class/System.IdentityModel/System.IdentityModel.Policy/AuthorizationContext.cs
mcs/class/System.IdentityModel/System.IdentityModel.Policy/EvaluationContext.cs
mcs/class/System.IdentityModel/System.IdentityModel.Selectors/KerberosSecurityTokenProvider.cs
mcs/class/System.IdentityModel/System.IdentityModel.Selectors/SecurityTokenManager.cs
mcs/class/System.IdentityModel/System.IdentityModel.Selectors/SecurityTokenProvider.cs
mcs/class/System.IdentityModel/System.IdentityModel.Selectors/SecurityTokenRequirement.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/BinaryKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/BootstrapContext.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/EncryptedKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/GenericXmlSecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/InMemorySymmetricSecurityKey.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/KerberosReceiverSecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/KerberosRequestorSecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/LocalIdKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/RsaKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/RsaSecurityKey.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/RsaSecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAction.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAdvice.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAssertion.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAssertionKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAttribute.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAttributeStatement.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAuthenticationStatement.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAuthorityBinding.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAuthorizationDecisionClaimResource.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlAuthorizationDecisionStatement.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlConditions.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlEvidence.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlSecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlSerializer.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlStatement.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SamlSubject.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityKeyIdentifier.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenException.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenExpiredException.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenNotYetValidException.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenReplayDetectedException.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/SecurityTokenValidationException.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/WindowsSecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509IssuerSerialKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509SubjectKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509ThumbprintKeyIdentifierClause.cs
mcs/class/System.IdentityModel/System.IdentityModel.Tokens/X509WindowsSecurityToken.cs
mcs/class/System.IdentityModel/System.IdentityModel/SignatureVerificationFailedException.cs
mcs/class/System.Management/System.Management/MethodDataCollection.cs
mcs/class/System.Numerics/Makefile
mcs/class/System.Numerics/System.Numerics-net_4_x.csproj
mcs/class/System.Numerics/System.Numerics.dll.sources
mcs/class/System.Numerics/System.Numerics_xtest.dll.sources [new file with mode: 0644]
mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/CipherReference.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/DataReference.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedReference.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptedXml.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionMethod.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/EncryptionProperty.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoEncryptedKey.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoRetrievalMethod.cs
mcs/class/System.Security/System.Security.Cryptography.Xml/KeyReference.cs
mcs/class/System.Security/System.Security.Permissions/DataProtectionPermission.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/DiscoveryEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpAnnouncementEndpointElement.cs
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery.Configuration/UdpDiscoveryEndpointElement.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/Atom10ItemFormatter.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationContent.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/SyndicationItem.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Syndication/XmlSyndicationContent.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebChannelFactory.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web/WebOperationContext.cs
mcs/class/System.ServiceModel.Web/System.ServiceModel/WebHttpBinding.cs
mcs/class/System.ServiceModel.Web/System/UriTemplateMatchException.cs
mcs/class/System.ServiceModel/System.Collections.Generic/KeyedByTypeCollection.cs
mcs/class/System.ServiceModel/System.Collections.Generic/SynchronizedKeyedCollection.cs
mcs/class/System.ServiceModel/System.Collections.Generic/SynchronizedReadOnlyCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/Binding.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/ChannelListenerBase_1.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/CustomBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/Message.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageBuffer.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageFault.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MessageHeaders.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/MtomMessageEncodingBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/NamedPipetransportBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/StreamUpgradeBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/TransactionFlowBindingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Channels/UnderstoodHeaders.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BinaryMessageEncodingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/BindingsSection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ClientCredentialsElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ReliableSessionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceCredentialsElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/ServiceModelConfigurationElementCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardBindingOptionalReliableSessionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardBindingReliableSessionElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/StandardEndpointsSection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Configuration/TextMessageEncodingElement.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/FaultDescriptionCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/IServiceBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/IWsdlImporter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/MetadataConversionError.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/OperationContractGenerationContext.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/PolicyAssertionCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceContractGenerator.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceDescription.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/ServiceEndpointCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/TypedMessageConverter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlEndpointConversionContext.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlExporter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/WsdlImporter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Description/XmlSerializerOperationBehavior.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ActionMessageFilter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ExceptionHandler.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/FilterInvalidBodyAccessException.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IDispatchMessageFormatter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IDispatchMessageInspector.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IDispatchOperationSelector.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IErrorHandler.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IInstanceContextInitializer.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IInstanceProvider.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/IMessageFilterTable.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InstanceContextIdleCallback.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/InvalidBodyAccessException.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/MatchAllMessageFilter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/MatchNoneMessageFilter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/MessageFilterNodeQuotaExceededException.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/MessageFilterTable.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/MultipleMessageFilterMatchesException.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/NavigatorInvalidBodyAccessException.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/SeekableXPathNavigator.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XPathMessageContext.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XPathMessageFilter.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XPathMessageFilterTable.cs
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/XPathNavigatorException.cs
mcs/class/System.ServiceModel/System.ServiceModel.PeerResolvers/UnregisterInfo.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/IssuedSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/KerberosSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/RsaSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SecureConversationSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SecurityContextSecurityToken.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SslSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SspiSecurityToken.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/SspiSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/UserNameSecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security.Tokens/X509SecurityTokenParameters.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security/MessagePartSpecification.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security/ServiceCredentialsSecurityTokenManager.cs
mcs/class/System.ServiceModel/System.ServiceModel.Security/WSSecurityTokenSerializer.cs
mcs/class/System.ServiceModel/System.ServiceModel/AddressAccessDeniedException.cs
mcs/class/System.ServiceModel/System.ServiceModel/AddressAlreadyInUseException.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelFactory_1.cs
mcs/class/System.ServiceModel/System.ServiceModel/ChannelTerminatedException.cs
mcs/class/System.ServiceModel/System.ServiceModel/ClientBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/ClientCredentialsSecurityTokenManager.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexChannelFactory.cs
mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/EndpointAddress.cs
mcs/class/System.ServiceModel/System.ServiceModel/EndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/FaultException.cs
mcs/class/System.ServiceModel/System.ServiceModel/MsmqException.cs
mcs/class/System.ServiceModel/System.ServiceModel/MsmqPoisonMessageException.cs
mcs/class/System.ServiceModel/System.ServiceModel/OptionalReliableSession.cs
mcs/class/System.ServiceModel/System.ServiceModel/PoisonMessageException.cs
mcs/class/System.ServiceModel/System.ServiceModel/ReliableSession.cs
mcs/class/System.ServiceModel/System.ServiceModel/RsaEndpointIdentity.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceAuthorizationManager.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHost.cs
mcs/class/System.ServiceModel/System.ServiceModel/ServiceHostBase.cs
mcs/class/System.ServiceModel/System.ServiceModel/UriSchemeKeyedCollection.cs
mcs/class/System.ServiceModel/System.ServiceModel/WS2007FederationHttpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/WS2007HttpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/WSFederationHttpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/WSHttpBinding.cs
mcs/class/System.ServiceModel/System.ServiceModel/X509CertificateEndpointIdentity.cs
mcs/class/System.Transactions/System.Transactions/CommittableTransaction.cs
mcs/class/System.Transactions/System.Transactions/IDtcTransaction.cs
mcs/class/System.Transactions/System.Transactions/IPromotableSinglePhaseNotification.cs
mcs/class/System.Transactions/System.Transactions/ISinglePhaseNotification.cs
mcs/class/System.Transactions/System.Transactions/PreparingEnlistment.cs
mcs/class/System.Transactions/System.Transactions/SubordinateTransaction.cs
mcs/class/System.Transactions/System.Transactions/Transaction.cs
mcs/class/System.Transactions/System.Transactions/TransactionInterop.cs
mcs/class/System.Transactions/System.Transactions/TransactionManager.cs
mcs/class/System.Transactions/System.Transactions/TransactionOptions.cs
mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
mcs/class/System.Transactions/Test/TransactionScopeTest.cs
mcs/class/System.Web.ApplicationServices/System.Web.Security/MembershipProvider.cs
mcs/class/System.Web.ApplicationServices/System.Web.Security/MembershipUser.cs
mcs/class/System.Web.ApplicationServices/System.Web.Security/RoleProvider.cs
mcs/class/System.Web.Extensions/Makefile
mcs/class/System.Web.Extensions/System.Web.Handlers/ScriptModule.cs
mcs/class/System.Web.Extensions/System.Web.UI/ScriptResourceAttribute.cs
mcs/class/System.Web.Extensions/Test/standalone-tests/.gitignore [new file with mode: 0644]
mcs/class/System.Web.Extensions/Test/standalone-tests/DataPager_NumericPagerField_Bug615315.cs
mcs/class/System.Web/System.Web.Configuration_2.0/AssemblyCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/BufferModesCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/EventMappingSettingsCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/HttpModuleActionCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/ProfileSettingsCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/RootProfilePropertySettingsCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/RuleSettingsCollection.cs
mcs/class/System.Web/System.Web.Configuration_2.0/TagMapInfo.cs
mcs/class/System.Web/System.Web.Configuration_2.0/TrustLevelCollection.cs
mcs/class/System.Web/System.Web.Hosting/HostingEnvironment.cs
mcs/class/System.Web/System.Web.Hosting/IAppManagerAppDomainFactory.cs
mcs/class/System.Web/System.Web.Management/IWebEventCustomEvaluator.cs
mcs/class/System.Web/System.Web.Management/WebBaseEvent.cs
mcs/class/System.Web/System.Web.Security/ActiveDirectoryMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/Membership.cs
mcs/class/System.Web/System.Web.Security/Roles.cs
mcs/class/System.Web/System.Web.Security/SqlMembershipProvider.cs
mcs/class/System.Web/System.Web.Security/SqlRoleProvider.cs
mcs/class/System.Web/System.Web.SessionState_2.0/HttpSessionState.cs
mcs/class/System.Web/System.Web.SessionState_2.0/IHttpSessionState.cs
mcs/class/System.Web/System.Web.SessionState_2.0/ISessionIDManager.cs
mcs/class/System.Web/System.Web.SessionState_2.0/ISessionStateItemCollection.cs
mcs/class/System.Web/System.Web.SessionState_2.0/SessionStateStoreData.cs
mcs/class/System.Web/System.Web.UI.Adapters/ControlAdapter.cs
mcs/class/System.Web/System.Web.UI.Adapters/PageAdapter.cs
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlImage.cs
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelect.cs
mcs/class/System.Web/System.Web.UI.WebControls.WebParts/ConnectionInterfaceCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls.WebParts/ConsumerConnectionPoint.cs
mcs/class/System.Web/System.Web.UI.WebControls.WebParts/ProviderConnectionPoint.cs
mcs/class/System.Web/System.Web.UI.WebControls.WebParts/WebPartVerb.cs
mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs
mcs/class/System.Web/System.Web.UI.WebControls/BaseCompareValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/BaseValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/BoundField.cs
mcs/class/System.Web/System.Web.UI.WebControls/ButtonField.cs
mcs/class/System.Web/System.Web.UI.WebControls/Calendar.cs
mcs/class/System.Web/System.Web.UI.WebControls/CheckBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/CompareValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/CompositeControl.cs
mcs/class/System.Web/System.Web.UI.WebControls/ControlParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/CookieParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataControlFieldCell.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataControlFieldCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataControlFieldHeaderCell.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataGridItem.cs
mcs/class/System.Web/System.Web.UI.WebControls/DataKey.cs
mcs/class/System.Web/System.Web.UI.WebControls/DetailsView.cs
mcs/class/System.Web/System.Web.UI.WebControls/DetailsViewDeleteEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/DetailsViewInsertEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/DetailsViewRowCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/DetailsViewUpdateEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/FontUnit.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormView.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormViewCommandEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormViewDeleteEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormViewInsertEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormViewRow.cs
mcs/class/System.Web/System.Web.UI.WebControls/FormViewUpdateEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/GridView.cs
mcs/class/System.Web/System.Web.UI.WebControls/GridViewDeleteEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/GridViewRowCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/HotSpotCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/HyperLink.cs
mcs/class/System.Web/System.Web.UI.WebControls/HyperLinkColumn.cs
mcs/class/System.Web/System.Web.UI.WebControls/HyperLinkField.cs
mcs/class/System.Web/System.Web.UI.WebControls/ImageField.cs
mcs/class/System.Web/System.Web.UI.WebControls/LinkButton.cs
mcs/class/System.Web/System.Web.UI.WebControls/ListControl.cs
mcs/class/System.Web/System.Web.UI.WebControls/ListItem.cs
mcs/class/System.Web/System.Web.UI.WebControls/Literal.cs
mcs/class/System.Web/System.Web.UI.WebControls/Menu.cs
mcs/class/System.Web/System.Web.UI.WebControls/MenuItemBindingCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/MenuItemCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/MenuItemStyleCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/MenuItemTemplateContainer.cs
mcs/class/System.Web/System.Web.UI.WebControls/MultiView.cs
mcs/class/System.Web/System.Web.UI.WebControls/PagedDataSource.cs
mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs
mcs/class/System.Web/System.Web.UI.WebControls/ParameterCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/QueryStringParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/RegularExpressionValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/RepeatInfo.cs
mcs/class/System.Web/System.Web.UI.WebControls/RequiredFieldValidator.cs
mcs/class/System.Web/System.Web.UI.WebControls/ServerValidateEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/SessionParameter.cs
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapDataSourceView.cs
mcs/class/System.Web/System.Web.UI.WebControls/SiteMapPath.cs
mcs/class/System.Web/System.Web.UI.WebControls/SqlDataSource.cs
mcs/class/System.Web/System.Web.UI.WebControls/Style.cs
mcs/class/System.Web/System.Web.UI.WebControls/SubMenuStyleCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeNode.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeNodeBindingCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeNodeCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeNodeStyleCollection.cs
mcs/class/System.Web/System.Web.UI.WebControls/TreeView.cs
mcs/class/System.Web/System.Web.UI.WebControls/Unit.cs
mcs/class/System.Web/System.Web.UI.WebControls/Wizard.cs
mcs/class/System.Web/System.Web.UI.WebControls/WizardNavigationEventArgs.cs
mcs/class/System.Web/System.Web.UI.WebControls/WizardNavigationEventHandler.cs
mcs/class/System.Web/System.Web.UI/AttributeCollection.cs
mcs/class/System.Web/System.Web.UI/ChtmlTextWriter.cs
mcs/class/System.Web/System.Web.UI/CompiledTemplateBuilder.cs
mcs/class/System.Web/System.Web.UI/Control.cs
mcs/class/System.Web/System.Web.UI/ControlCollection.cs
mcs/class/System.Web/System.Web.UI/ControlValuePropertyAttribute.cs
mcs/class/System.Web/System.Web.UI/DataBinder.cs
mcs/class/System.Web/System.Web.UI/DataSourceControl.cs
mcs/class/System.Web/System.Web.UI/DataSourceSelectArguments.cs
mcs/class/System.Web/System.Web.UI/DataSourceView.cs
mcs/class/System.Web/System.Web.UI/DataSourceViewOperationCallback.cs
mcs/class/System.Web/System.Web.UI/ExpressionBindingCollection.cs
mcs/class/System.Web/System.Web.UI/HtmlTextWriter.cs
mcs/class/System.Web/System.Web.UI/LiteralControl.cs
mcs/class/System.Web/System.Web.UI/Page.cs
mcs/class/System.Web/System.Web.UI/PageHandlerFactory.cs
mcs/class/System.Web/System.Web.UI/Pair.cs
mcs/class/System.Web/System.Web.UI/TemplateContainerAttribute.cs
mcs/class/System.Web/System.Web.UI/TemplateControl.cs
mcs/class/System.Web/System.Web.UI/XPathBinder.cs
mcs/class/System.Web/System.Web.dll.sources
mcs/class/System.Web/System.Web/HttpCachePolicy.cs
mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
mcs/class/System.Web/System.Web/HttpContext.cs
mcs/class/System.Web/System.Web/HttpContextWrapper.cs
mcs/class/System.Web/System.Web/HttpCookieCollection.cs
mcs/class/System.Web/System.Web/HttpFileCollection.cs
mcs/class/System.Web/System.Web/HttpModuleCollection.cs
mcs/class/System.Web/System.Web/HttpParseException.cs
mcs/class/System.Web/System.Web/HttpResponseWrapper.cs
mcs/class/System.Web/System.Web/HttpUtility.cs
mcs/class/System.Web/System.Web/ParserErrorCollection.cs
mcs/class/System.Web/System.Web/SiteMapNode.cs
mcs/class/System.Web/System.Web/SiteMapNodeCollection.cs
mcs/class/System.Web/System.Web/TraceContext.cs
mcs/class/System.Web/Test/tools/standalone-runner.cs
mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization.Charting/DataPointCustomProperties.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewColumnCollection.cs
mcs/class/System.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnCollectionTest.cs
mcs/class/System.Xaml/System.Windows.Markup/ContentWrapperAttribute.cs
mcs/class/System.Xaml/System.Xaml.Schema/XamlTypeName.cs
mcs/class/System.Xaml/System.Xaml.Schema/XamlValueConverter.cs
mcs/class/System.Xaml/System.Xaml/XamlMember.cs
mcs/class/System.Xaml/System.Xaml/XamlServices.cs
mcs/class/System.Xaml/System.Xaml/XamlType.cs
mcs/class/System.Xaml/System.Xaml/XamlXmlWriter.cs
mcs/class/System/Makefile
mcs/class/System/Mono.AppleTls/AppleCertificateHelper.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/AppleTlsContext.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/AppleTlsProvider.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/AppleTlsStream.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/Certificate.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/Enums.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/INativeObject.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/ImportExport.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/Items.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/Policy.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/SecureTransport.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/SslConnection.cs [new file with mode: 0644]
mcs/class/System/Mono.AppleTls/Trust.cs [new file with mode: 0644]
mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
mcs/class/System/Mono.Net.Security/MonoTlsProviderFactory.cs
mcs/class/System/MonoTouch/Dummy.cs [new file with mode: 0644]
mcs/class/System/System-bare-net_4_x.csproj
mcs/class/System/System-net_4_x.csproj
mcs/class/System/System-secxml-net_4_x.csproj
mcs/class/System/System.Configuration/ConfigXmlDocument.cs
mcs/class/System/System.Configuration/SettingElement.cs
mcs/class/System/System.Configuration/SpecialSettingAttribute.cs
mcs/class/System/System.Diagnostics/CounterSample.cs
mcs/class/System/System.Diagnostics/EventLogEntryCollection.cs
mcs/class/System/System.Diagnostics/EventLogTraceListener.cs
mcs/class/System/System.Diagnostics/Process.cs
mcs/class/System/System.IO.Compression/DeflateStream.cs
mcs/class/System/System.IO.Ports/SerialPort.cs
mcs/class/System/System.Net.Mail/AlternateView.cs
mcs/class/System/System.Net.Mail/MailAddress.cs
mcs/class/System/System.Net.Mail/SmtpClient.cs
mcs/class/System/System.Net.Mail/SmtpException.cs
mcs/class/System/System.Net.Mail/SmtpFailedRecipientException.cs
mcs/class/System/System.Net.Mail/SmtpFailedRecipientsException.cs
mcs/class/System/System.Net.Security/SslStream.cs
mcs/class/System/System.Net.Sockets/Socket.cs
mcs/class/System/System.Net.Sockets/SocketAsyncResult.cs
mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs [deleted file]
mcs/class/System/System.Net.WebSockets/ClientWebSocket.platformnotsupported.cs [deleted file]
mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs [deleted file]
mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocket.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocketContext.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocketError.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocketException.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs [deleted file]
mcs/class/System/System.Net.WebSockets/WebSocketState.cs [deleted file]
mcs/class/System/System.Net/HttpWebRequest.cs
mcs/class/System/System.Net/HttpWebResponse.cs
mcs/class/System/System.Net/ListenerPrefix.cs
mcs/class/System/System.Net/MacProxy.cs
mcs/class/System/System.Security.Cryptography.X509Certificates/OpenFlags.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/StoreLocation.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/StoreName.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedNameFlags.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509FindType.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509IncludeOption.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509KeyUsageFlags.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509NameType.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509RevocationFlag.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509RevocationMode.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierHashAlgorithm.cs [deleted file]
mcs/class/System/System.Security.Cryptography.X509Certificates/X509VerificationFlags.cs [deleted file]
mcs/class/System/System.Security.Permissions/StorePermission.cs
mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs
mcs/class/System/Test/System.ComponentModel/ToolboxItemAttributeTests.cs
mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs
mcs/class/System/Test/System.Diagnostics/ProcessTest.cs
mcs/class/System/Test/System.Net.Mail/SmtpExceptionTest.cs
mcs/class/System/Test/System.Net.Security/SslStreamTest.cs
mcs/class/System/Test/System.Net.WebSockets/ClientWebSocketTest.cs
mcs/class/System/Test/System.Net/HttpWebResponseTest.cs
mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs
mcs/class/System/common.sources
mcs/class/System/corefx/SR.cs
mcs/class/System/monodroid_System_test.dll.exclude.sources
mcs/class/System/xammac_net_4_5_System.dll.sources
mcs/class/WindowsBase/System.ComponentModel/CurrentChangingEventHandler.cs
mcs/class/Xunit.NetCore.Extensions/Makefile [new file with mode: 0644]
mcs/class/Xunit.NetCore.Extensions/Microsoft.Xunit.Performance/BenchmarkAttribute.cs [new file with mode: 0644]
mcs/class/Xunit.NetCore.Extensions/Microsoft.Xunit.Performance/BenchmarkDiscover.cs [new file with mode: 0644]
mcs/class/Xunit.NetCore.Extensions/Xunit.NetCore.Extensions.dll.sources [new file with mode: 0644]
mcs/class/corlib/CoreFoundation/CFHelpers.cs
mcs/class/corlib/Makefile
mcs/class/corlib/ReferenceSources/RuntimeType.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509CertificateImplApple.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs [deleted file]
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.Apple.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509Helper.cs
mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs [deleted file]
mcs/class/corlib/System.Threading/WaitHandle.cs
mcs/class/corlib/System/Array.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/NumberFormatter.cs
mcs/class/corlib/Test/Microsoft.Win32/RegistryKeyTest.cs
mcs/class/corlib/Test/System.Collections.Generic/ListTest.cs
mcs/class/corlib/Test/System.IO/FileTest.cs
mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs
mcs/class/corlib/Test/System.Reflection.Emit/ModuleBuilderTest.cs
mcs/class/corlib/Test/System.Reflection.Emit/TypeBuilderTest.cs
mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs
mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs
mcs/class/corlib/Test/System.Reflection/ModuleTest.cs
mcs/class/corlib/Test/System.Resources/ResourceManagerTest.cs
mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentTest.cs
mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs
mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs
mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs
mcs/class/corlib/Test/System/ActivatorTest.cs
mcs/class/corlib/Test/System/ArraySortArgChecks.cs
mcs/class/corlib/Test/System/ArrayTest.cs
mcs/class/corlib/Test/System/Int32Test.cs
mcs/class/corlib/Test/System/TypeTest.cs
mcs/class/corlib/coreclr/ArraySortHelper.cs [new file with mode: 0644]
mcs/class/corlib/coreclr/SorterArray.cs [new file with mode: 0644]
mcs/class/corlib/corert/Array.Portable.cs [new file with mode: 0644]
mcs/class/corlib/corert/Debug.cs
mcs/class/corlib/corert/RelocatedTypeAttribute.cs [new file with mode: 0644]
mcs/class/corlib/corert/RuntimeThread.cs [new file with mode: 0644]
mcs/class/corlib/corlib-net_4_x.csproj
mcs/class/corlib/corlib.dll.sources
mcs/class/legacy/Mono.Cecil/legacy_Mono.Cecil-net_4_x.csproj [new file with mode: 0644]
mcs/class/reference-assemblies/Makefile
mcs/class/referencesource/System/compmod/system/componentmodel/EditorAttribute.cs
mcs/class/referencesource/System/compmod/system/componentmodel/ExpandableObjectConverter.cs
mcs/class/referencesource/System/compmod/system/componentmodel/InvalidEnumArgumentException.cs
mcs/class/referencesource/System/compmod/system/componentmodel/design/serialization/InstanceDescriptor.cs
mcs/class/referencesource/System/services/monitoring/system/diagnosticts/Process.cs
mcs/class/referencesource/mscorlib/system/reflection/typedelegator.cs
mcs/class/referencesource/mscorlib/system/type.cs
mcs/errors/CS0122-38-lib.cs
mcs/errors/cs0122-38.cs
mcs/mcs/class.cs
mcs/mcs/ikvm.cs
mcs/mcs/settings.cs
mcs/tools/cil-stringreplacer/cil-stringreplacer-net_4_x.csproj
mcs/tools/corcompare/mono-api-info-net_4_x.csproj
mcs/tools/corcompare/mono-api-info.cs
mcs/tools/csharp/repl.cs
mcs/tools/linker/monolinker-net_4_x.csproj
mcs/tools/linker/monolinker.exe.sources
mcs/tools/mdb2ppdb/mdb2ppdb-net_4_x.csproj
mcs/tools/mdoc/mdoc-net_4_x.csproj
mcs/tools/mkbundle/mkbundle.cs
mcs/tools/mono-symbolicate/Makefile
mcs/tools/mono-symbolicate/Test/symbolicate.expected
mcs/tools/mono-symbolicate/mono-symbolicate-net_4_x.csproj
mcs/tools/mono-symbolicate/mono-symbolicate.exe.sources
mcs/tools/pdb2mdb/pdb2mdb-net_4_x.csproj
mcs/tools/xbuild/Makefile
mcs/tools/xbuild/frameworks/net_4.5.1.xml
mcs/tools/xbuild/frameworks/net_4.5.2.xml
mcs/tools/xbuild/frameworks/net_4.6.1.xml
mcs/tools/xbuild/frameworks/net_4.6.2.xml
mcs/tools/xbuild/frameworks/net_4.6.xml
mono/cil/cil-opcodes.xml
mono/cil/opcode.def
mono/dis/main.c
mono/dis/util.c
mono/metadata/abi-details.h
mono/metadata/appdomain-icalls.h
mono/metadata/appdomain.c
mono/metadata/appdomain.h
mono/metadata/assembly-internals.h
mono/metadata/assembly.c
mono/metadata/assembly.h
mono/metadata/attach.c
mono/metadata/attach.h
mono/metadata/attrdefs.h
mono/metadata/blob.h
mono/metadata/boehm-gc.c
mono/metadata/cil-coff.h
mono/metadata/class-accessors.c
mono/metadata/class-inlines.h
mono/metadata/class-internals.h
mono/metadata/class.c
mono/metadata/class.h
mono/metadata/cominterop-win32-internals.h
mono/metadata/cominterop.c
mono/metadata/cominterop.h
mono/metadata/console-io.h
mono/metadata/console-null.c
mono/metadata/console-unix.c
mono/metadata/console-win32-internals.h
mono/metadata/console-win32-uwp.c
mono/metadata/console-win32.c
mono/metadata/coree-internals.h
mono/metadata/coree-windows-uwp.c
mono/metadata/coree.c
mono/metadata/coree.h
mono/metadata/culture-info-tables.h
mono/metadata/culture-info.h
mono/metadata/custom-attrs-internals.h
mono/metadata/custom-attrs.c
mono/metadata/debug-helpers.c
mono/metadata/debug-helpers.h
mono/metadata/debug-mono-ppdb.c
mono/metadata/debug-mono-ppdb.h
mono/metadata/debug-mono-symfile.c
mono/metadata/debug-mono-symfile.h
mono/metadata/decimal-ms.c
mono/metadata/decimal-ms.h
mono/metadata/domain-internals.h
mono/metadata/domain.c
mono/metadata/dynamic-image-internals.h
mono/metadata/dynamic-image.c
mono/metadata/dynamic-stream-internals.h
mono/metadata/dynamic-stream.c
mono/metadata/environment.c
mono/metadata/environment.h
mono/metadata/exception-internals.h
mono/metadata/exception.c
mono/metadata/exception.h
mono/metadata/file-mmap-posix.c
mono/metadata/file-mmap-windows.c
mono/metadata/file-mmap.h
mono/metadata/filewatcher.c
mono/metadata/filewatcher.h
mono/metadata/gc-internals.h
mono/metadata/gc-stats.c
mono/metadata/gc.c
mono/metadata/handle.c
mono/metadata/handle.h
mono/metadata/icall-def.h
mono/metadata/icall-internals.h
mono/metadata/icall-windows-internals.h
mono/metadata/icall-windows-uwp.c
mono/metadata/icall-windows.c
mono/metadata/icall.c
mono/metadata/image-internals.h
mono/metadata/image.c
mono/metadata/image.h
mono/metadata/jit-info.c
mono/metadata/loader.c
mono/metadata/loader.h
mono/metadata/locales.c
mono/metadata/locales.h
mono/metadata/lock-tracer.c
mono/metadata/lock-tracer.h
mono/metadata/marshal-internals.h
mono/metadata/marshal-windows-internals.h
mono/metadata/marshal-windows-uwp.c
mono/metadata/marshal-windows.c
mono/metadata/marshal.c
mono/metadata/marshal.h
mono/metadata/mempool-internals.h
mono/metadata/mempool.c
mono/metadata/mempool.h
mono/metadata/metadata-cross-helpers.c
mono/metadata/metadata-internals.h
mono/metadata/metadata-verify.c
mono/metadata/metadata.c
mono/metadata/metadata.h
mono/metadata/method-builder.c
mono/metadata/method-builder.h
mono/metadata/monitor.c
mono/metadata/monitor.h
mono/metadata/mono-basic-block.c
mono/metadata/mono-basic-block.h
mono/metadata/mono-config-dirs.c
mono/metadata/mono-config-dirs.h
mono/metadata/mono-config.c
mono/metadata/mono-config.h
mono/metadata/mono-debug.c
mono/metadata/mono-debug.h
mono/metadata/mono-endian.c
mono/metadata/mono-endian.h
mono/metadata/mono-gc.h
mono/metadata/mono-hash.c
mono/metadata/mono-hash.h
mono/metadata/mono-mlist.c
mono/metadata/mono-mlist.h
mono/metadata/mono-perfcounters-def.h
mono/metadata/mono-perfcounters.c
mono/metadata/mono-perfcounters.h
mono/metadata/mono-ptr-array.h
mono/metadata/mono-route.c
mono/metadata/mono-route.h
mono/metadata/mono-security-windows-internals.h
mono/metadata/mono-security-windows-uwp.c
mono/metadata/mono-security-windows.c
mono/metadata/mono-security.c
mono/metadata/nacl-stub.c
mono/metadata/null-gc.c
mono/metadata/number-formatter.h
mono/metadata/number-ms.c
mono/metadata/number-ms.h
mono/metadata/object-internals.h
mono/metadata/object-offsets.h
mono/metadata/object.c
mono/metadata/object.h
mono/metadata/opcodes.c
mono/metadata/opcodes.h
mono/metadata/profiler-private.h
mono/metadata/profiler.c
mono/metadata/profiler.h
mono/metadata/property-bag.c
mono/metadata/property-bag.h
mono/metadata/rand.c
mono/metadata/rand.h
mono/metadata/reflection-cache.h
mono/metadata/reflection-internals.h
mono/metadata/reflection.c
mono/metadata/reflection.h
mono/metadata/remoting.c
mono/metadata/remoting.h
mono/metadata/row-indexes.h
mono/metadata/runtime.c
mono/metadata/runtime.h
mono/metadata/security-core-clr.c
mono/metadata/security-core-clr.h
mono/metadata/security-manager.c
mono/metadata/security-manager.h
mono/metadata/security.h
mono/metadata/seq-points-data.c
mono/metadata/seq-points-data.h
mono/metadata/sgen-bridge-internals.h
mono/metadata/sgen-bridge.c
mono/metadata/sgen-bridge.h
mono/metadata/sgen-client-mono.h
mono/metadata/sgen-dynarray.h
mono/metadata/sgen-mono.c
mono/metadata/sgen-new-bridge.c
mono/metadata/sgen-old-bridge.c
mono/metadata/sgen-stw.c
mono/metadata/sgen-tarjan-bridge.c
mono/metadata/sgen-toggleref.c
mono/metadata/sgen-toggleref.h
mono/metadata/sre-encode.c
mono/metadata/sre-internals.h
mono/metadata/sre-save.c
mono/metadata/sre.c
mono/metadata/string-icalls.c
mono/metadata/string-icalls.h
mono/metadata/sysmath.c
mono/metadata/sysmath.h
mono/metadata/tabledefs.h
mono/metadata/threadpool-io-epoll.c
mono/metadata/threadpool-io-kqueue.c
mono/metadata/threadpool-io-poll.c
mono/metadata/threadpool-io.c
mono/metadata/threadpool-io.h
mono/metadata/threadpool-worker-default.c
mono/metadata/threadpool-worker.h
mono/metadata/threadpool.c
mono/metadata/threadpool.h
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/metadata/threads.h
mono/metadata/tokentype.h
mono/metadata/verify-internals.h
mono/metadata/verify.c
mono/metadata/verify.h
mono/metadata/w32error-unix.c
mono/metadata/w32error-win32.c
mono/metadata/w32error.h
mono/metadata/w32event-unix.c
mono/metadata/w32event-win32.c
mono/metadata/w32event.h
mono/metadata/w32file-internals.h
mono/metadata/w32file-unix-glob.c
mono/metadata/w32file-unix-glob.h
mono/metadata/w32file-unix.c
mono/metadata/w32file-win32-internals.h
mono/metadata/w32file-win32-uwp.c
mono/metadata/w32file-win32.c
mono/metadata/w32file.c
mono/metadata/w32file.h
mono/metadata/w32handle-namespace.c
mono/metadata/w32handle-namespace.h
mono/metadata/w32handle.c
mono/metadata/w32handle.h
mono/metadata/w32mutex-unix.c
mono/metadata/w32mutex-win32.c
mono/metadata/w32mutex.h
mono/metadata/w32process-internals.h
mono/metadata/w32process-unix-bsd.c
mono/metadata/w32process-unix-default.c
mono/metadata/w32process-unix-haiku.c
mono/metadata/w32process-unix-internals.h
mono/metadata/w32process-unix-osx.c
mono/metadata/w32process-unix.c
mono/metadata/w32process-win32-internals.h
mono/metadata/w32process-win32-uwp.c
mono/metadata/w32process-win32.c
mono/metadata/w32process.c
mono/metadata/w32process.h
mono/metadata/w32semaphore-unix.c
mono/metadata/w32semaphore-win32.c
mono/metadata/w32semaphore.h
mono/metadata/w32socket-internals.h
mono/metadata/w32socket-unix.c
mono/metadata/w32socket-win32.c
mono/metadata/w32socket.c
mono/metadata/w32socket.h
mono/metadata/wrapper-types.h
mono/mini/Makefile.am.in
mono/mini/abcremoval.c
mono/mini/abcremoval.h
mono/mini/alias-analysis.c
mono/mini/aot-compiler.c
mono/mini/aot-compiler.h
mono/mini/aot-runtime.c
mono/mini/arch-stubs.c
mono/mini/basic-simd.cs
mono/mini/branch-opts.c
mono/mini/cfgdump.c
mono/mini/cfgdump.h
mono/mini/cfold.c
mono/mini/cpu-x86.md
mono/mini/debug-mini.c
mono/mini/debugger-agent.c
mono/mini/debugger-agent.h
mono/mini/decompose.c
mono/mini/dominators.c
mono/mini/driver.c
mono/mini/dwarfwriter.c
mono/mini/dwarfwriter.h
mono/mini/exceptions-amd64.c
mono/mini/exceptions-arm.c
mono/mini/exceptions-arm64.c
mono/mini/exceptions-ia64.c
mono/mini/exceptions-mips.c
mono/mini/exceptions-ppc.c
mono/mini/exceptions-s390x.c
mono/mini/exceptions-sparc.c
mono/mini/exceptions-x86.c
mono/mini/exceptions.cs
mono/mini/genmdesc.c
mono/mini/graph.c
mono/mini/helpers.c
mono/mini/iltests.il
mono/mini/image-writer.c
mono/mini/image-writer.h
mono/mini/interp/hacks.h
mono/mini/interp/interp-internals.h
mono/mini/interp/interp.c
mono/mini/interp/interp.h
mono/mini/interp/mintops.c
mono/mini/interp/mintops.def
mono/mini/interp/mintops.h
mono/mini/interp/transform.c
mono/mini/ir-emit.h
mono/mini/jit-icalls.c
mono/mini/jit-icalls.h
mono/mini/jit.h
mono/mini/linear-scan.c
mono/mini/liveness.c
mono/mini/lldb.c
mono/mini/lldb.h
mono/mini/llvm-jit.h
mono/mini/llvm-runtime.h
mono/mini/local-propagation.c
mono/mini/main.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64-gsharedvt.c
mono/mini/mini-amd64-gsharedvt.h
mono/mini/mini-amd64.c
mono/mini/mini-amd64.h
mono/mini/mini-arch.h
mono/mini/mini-arm-gsharedvt.c
mono/mini/mini-arm.c
mono/mini/mini-arm.h
mono/mini/mini-arm64-gsharedvt.c
mono/mini/mini-arm64-gsharedvt.h
mono/mini/mini-arm64.c
mono/mini/mini-arm64.h
mono/mini/mini-codegen.c
mono/mini/mini-cross-helpers.c
mono/mini/mini-darwin.c
mono/mini/mini-exceptions.c
mono/mini/mini-gc.c
mono/mini/mini-gc.h
mono/mini/mini-generic-sharing.c
mono/mini/mini-ia64.c
mono/mini/mini-ia64.h
mono/mini/mini-llvm-cpp.h
mono/mini/mini-llvm-loaded.c
mono/mini/mini-llvm.c
mono/mini/mini-llvm.h
mono/mini/mini-mips.c
mono/mini/mini-mips.h
mono/mini/mini-native-types.c
mono/mini/mini-ops.h
mono/mini/mini-posix.c
mono/mini/mini-ppc.c
mono/mini/mini-ppc.h
mono/mini/mini-runtime.c
mono/mini/mini-s390x.c
mono/mini/mini-s390x.h
mono/mini/mini-sparc.c
mono/mini/mini-sparc.h
mono/mini/mini-trampolines.c
mono/mini/mini-unwind.h
mono/mini/mini-windows-dllmain.c
mono/mini/mini-windows-uwp.c
mono/mini/mini-windows.c
mono/mini/mini-windows.h
mono/mini/mini-x86-gsharedvt.c
mono/mini/mini-x86.c
mono/mini/mini-x86.h
mono/mini/mini.c
mono/mini/mini.h
mono/mini/mixed.cs [new file with mode: 0644]
mono/mini/regalloc.h
mono/mini/seq-points.c
mono/mini/seq-points.h
mono/mini/simd-intrinsics.c
mono/mini/ssa.c
mono/mini/support-s390x.h
mono/mini/tasklets.c
mono/mini/tasklets.h
mono/mini/trace.c
mono/mini/trace.h
mono/mini/tramp-amd64-gsharedvt.c
mono/mini/tramp-amd64.c
mono/mini/tramp-arm-gsharedvt.c
mono/mini/tramp-arm.c
mono/mini/tramp-arm64-gsharedvt.c
mono/mini/tramp-arm64.c
mono/mini/tramp-ia64.c
mono/mini/tramp-mips.c
mono/mini/tramp-ppc.c
mono/mini/tramp-s390x.c
mono/mini/tramp-sparc.c
mono/mini/tramp-x86-gsharedvt.c
mono/mini/tramp-x86.c
mono/mini/type-checking.c
mono/mini/unwind.c
mono/mini/xdebug.c
mono/profiler/mono-profiler-aot.c
mono/sgen/gc-internal-agnostic.h
mono/sgen/sgen-alloc.c
mono/sgen/sgen-archdep.h
mono/sgen/sgen-array-list.c
mono/sgen/sgen-array-list.h
mono/sgen/sgen-cardtable.c
mono/sgen/sgen-cardtable.h
mono/sgen/sgen-client.h
mono/sgen/sgen-conf.h
mono/sgen/sgen-copy-object.h
mono/sgen/sgen-debug.c
mono/sgen/sgen-descriptor.c
mono/sgen/sgen-descriptor.h
mono/sgen/sgen-fin-weak-hash.c
mono/sgen/sgen-gc.c
mono/sgen/sgen-gc.h
mono/sgen/sgen-gchandles.c
mono/sgen/sgen-gray.c
mono/sgen/sgen-gray.h
mono/sgen/sgen-hash-table.c
mono/sgen/sgen-hash-table.h
mono/sgen/sgen-internal.c
mono/sgen/sgen-layout-stats.c
mono/sgen/sgen-layout-stats.h
mono/sgen/sgen-los.c
mono/sgen/sgen-major-copy-object.h
mono/sgen/sgen-marksweep-drain-gray-stack.h
mono/sgen/sgen-marksweep.c
mono/sgen/sgen-memory-governor.c
mono/sgen/sgen-memory-governor.h
mono/sgen/sgen-minor-copy-object.h
mono/sgen/sgen-minor-scan-object.h
mono/sgen/sgen-nursery-allocator.c
mono/sgen/sgen-pinning-stats.c
mono/sgen/sgen-pinning.c
mono/sgen/sgen-pinning.h
mono/sgen/sgen-pointer-queue.c
mono/sgen/sgen-pointer-queue.h
mono/sgen/sgen-protocol-def.h
mono/sgen/sgen-protocol.c
mono/sgen/sgen-protocol.h
mono/sgen/sgen-qsort.c
mono/sgen/sgen-qsort.h
mono/sgen/sgen-scan-object.h
mono/sgen/sgen-simple-nursery.c
mono/sgen/sgen-split-nursery.c
mono/sgen/sgen-tagged-pointer.h
mono/sgen/sgen-thread-pool.c
mono/sgen/sgen-thread-pool.h
mono/sgen/sgen-workers.c
mono/sgen/sgen-workers.h
mono/tests/Makefile.am
mono/tests/abort-cctor-2.cs [new file with mode: 0644]
mono/tests/abort-cctor.cs
mono/tests/bug-30085.cs
mono/tests/runtime-invoke.cs
mono/tests/test-runner.cs
mono/tests/testing_gac/.gitattributes [new file with mode: 0644]
mono/tests/testing_gac/.gitignore [new file with mode: 0644]
mono/tests/testing_gac/Makefile.am [new file with mode: 0644]
mono/tests/testing_gac/README [new file with mode: 0644]
mono/tests/testing_gac/testkey.snk [new file with mode: 0644]
mono/tests/testing_gac/v1/app-refl-load.cs [new file with mode: 0644]
mono/tests/testing_gac/v1/app.cs [new file with mode: 0644]
mono/tests/testing_gac/v1/gactestlib.cs [new file with mode: 0644]
mono/tests/testing_gac/v2/gactestlib.cs [new file with mode: 0644]
mono/tests/w32message.cs
mono/utils/atomic.c
mono/utils/atomic.h
mono/utils/bsearch.c
mono/utils/bsearch.h
mono/utils/checked-build.c
mono/utils/checked-build.h
mono/utils/dtrace.h
mono/utils/gc_wrapper.h
mono/utils/hazard-pointer.c
mono/utils/hazard-pointer.h
mono/utils/json.c
mono/utils/json.h
mono/utils/linux_magic.h
mono/utils/lock-free-alloc.c
mono/utils/lock-free-alloc.h
mono/utils/lock-free-array-queue.c
mono/utils/lock-free-array-queue.h
mono/utils/lock-free-queue.c
mono/utils/lock-free-queue.h
mono/utils/mach-support-amd64.c
mono/utils/mach-support-arm.c
mono/utils/mach-support-arm64.c
mono/utils/mach-support-unknown.c
mono/utils/mach-support-x86.c
mono/utils/mach-support.c
mono/utils/mach-support.h
mono/utils/memfuncs.c
mono/utils/memfuncs.h
mono/utils/mono-codeman.c
mono/utils/mono-codeman.h
mono/utils/mono-compiler.h
mono/utils/mono-complex.h
mono/utils/mono-conc-hashtable.c
mono/utils/mono-conc-hashtable.h
mono/utils/mono-context.c
mono/utils/mono-context.h
mono/utils/mono-coop-mutex.h
mono/utils/mono-coop-semaphore.h
mono/utils/mono-counters.c
mono/utils/mono-counters.h
mono/utils/mono-digest.h
mono/utils/mono-dl-darwin.c
mono/utils/mono-dl-fallback.h
mono/utils/mono-dl-posix.c
mono/utils/mono-dl-windows-internals.h
mono/utils/mono-dl-windows-uwp.c
mono/utils/mono-dl-windows.c
mono/utils/mono-dl.c
mono/utils/mono-dl.h
mono/utils/mono-embed.c
mono/utils/mono-embed.h
mono/utils/mono-error-internals.h
mono/utils/mono-error.c
mono/utils/mono-error.h
mono/utils/mono-filemap.c
mono/utils/mono-hwcap-arm.c
mono/utils/mono-hwcap-arm64.c
mono/utils/mono-hwcap-cross.c
mono/utils/mono-hwcap-ia64.c
mono/utils/mono-hwcap-mips.c
mono/utils/mono-hwcap-ppc.c
mono/utils/mono-hwcap-s390x.c
mono/utils/mono-hwcap-sparc.c
mono/utils/mono-hwcap-sparc.h
mono/utils/mono-hwcap-vars.h
mono/utils/mono-hwcap-x86.c
mono/utils/mono-hwcap.c
mono/utils/mono-hwcap.h
mono/utils/mono-internal-hash.c
mono/utils/mono-internal-hash.h
mono/utils/mono-io-portability.c
mono/utils/mono-io-portability.h
mono/utils/mono-lazy-init.h
mono/utils/mono-linked-list-set.c
mono/utils/mono-linked-list-set.h
mono/utils/mono-log-android.c
mono/utils/mono-log-common.c
mono/utils/mono-log-darwin.c
mono/utils/mono-log-posix.c
mono/utils/mono-log-windows.c
mono/utils/mono-logger-internals.h
mono/utils/mono-logger.c
mono/utils/mono-logger.h
mono/utils/mono-machine.h
mono/utils/mono-math.c
mono/utils/mono-math.h
mono/utils/mono-md5.c
mono/utils/mono-membar.h
mono/utils/mono-memory-model.h
mono/utils/mono-mmap-internals.h
mono/utils/mono-mmap-windows-internals.h
mono/utils/mono-mmap-windows-uwp.c
mono/utils/mono-mmap-windows.c
mono/utils/mono-mmap.c
mono/utils/mono-mmap.h
mono/utils/mono-networkinterfaces.c
mono/utils/mono-networkinterfaces.h
mono/utils/mono-once.h
mono/utils/mono-os-mutex.h
mono/utils/mono-os-semaphore.h
mono/utils/mono-path.c
mono/utils/mono-path.h
mono/utils/mono-poll.c
mono/utils/mono-poll.h
mono/utils/mono-proclib-windows-internals.h
mono/utils/mono-proclib-windows-uwp.c
mono/utils/mono-proclib-windows.c
mono/utils/mono-proclib.c
mono/utils/mono-proclib.h
mono/utils/mono-property-hash.c
mono/utils/mono-property-hash.h
mono/utils/mono-publib.c
mono/utils/mono-publib.h
mono/utils/mono-rand-windows-internals.h
mono/utils/mono-rand-windows-uwp.c
mono/utils/mono-rand-windows.c
mono/utils/mono-rand.c
mono/utils/mono-rand.h
mono/utils/mono-sha1.c
mono/utils/mono-sigcontext.h
mono/utils/mono-signal-handler.h
mono/utils/mono-stack-unwinding.h
mono/utils/mono-stdlib.c
mono/utils/mono-stdlib.h
mono/utils/mono-string.h
mono/utils/mono-threads-android.c
mono/utils/mono-threads-api.h
mono/utils/mono-threads-coop.c
mono/utils/mono-threads-coop.h
mono/utils/mono-threads-debug.h
mono/utils/mono-threads-freebsd.c
mono/utils/mono-threads-linux.c
mono/utils/mono-threads-mach-helper.c
mono/utils/mono-threads-mach.c
mono/utils/mono-threads-netbsd.c
mono/utils/mono-threads-openbsd.c
mono/utils/mono-threads-posix-signals.c
mono/utils/mono-threads-posix.c
mono/utils/mono-threads-state-machine.c
mono/utils/mono-threads-windows.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h
mono/utils/mono-time.c
mono/utils/mono-time.h
mono/utils/mono-tls.c
mono/utils/mono-tls.h
mono/utils/mono-uri.c
mono/utils/mono-uri.h
mono/utils/mono-value-hash.c
mono/utils/mono-value-hash.h
mono/utils/monobitset.c
mono/utils/monobitset.h
mono/utils/networking-fallback.c
mono/utils/networking-missing.c
mono/utils/networking-posix.c
mono/utils/networking-windows.c
mono/utils/networking.c
mono/utils/networking.h
mono/utils/os-event-unix.c
mono/utils/os-event-win32.c
mono/utils/os-event.h
mono/utils/parse.c
mono/utils/parse.h
mono/utils/refcount.h
mono/utils/strenc.c
mono/utils/strenc.h
mono/utils/w32api.h
msvc/compare-config-files.ps1
msvc/genmdesc.vcxproj
msvc/libmono-static.vcxproj
msvc/mono.sln
msvc/scripts/order.xml
msvc/winsetup.bat
net_4_x.sln
scripts/ci/run-test-interpreter.sh
scripts/xbuild.in
tools/locale-builder/Patterns.cs
tools/nuget-hash-extractor/Makefile
tools/nuget-hash-extractor/download.sh
tools/nuget-hash-extractor/nuget-hash-extractor.cs
tools/pedump/pedump.c
winconfig.h

index 0ecdafacf2dc89703756c3625c200905f9651cda..942bec22d076328a62a6b76d54437b0c94fb2910 100644 (file)
@@ -55,3 +55,6 @@
 [submodule "external/corert"]
        path = external/corert
        url = git://github.com/mono/corert.git
+[submodule "external/xunit-binaries"]
+       path = external/xunit-binaries
+       url = git://github.com/mono/xunit-binaries.git
index 16e5ba16c16ef6a2292039a17e01d5c1abd5043a..1dbe3b14a2ecd964a9bf9f6ce48492b3eed09520 100644 (file)
@@ -56,15 +56,14 @@ DISTCLEANFILES= mono-uninstalled.pc
 # building with monolite
 mcslib = $(mcs_topdir)/class/lib
 monolite = $(mcslib)/monolite
-mono_corlib_version = $(shell sed -n "s/\#define MONO_CORLIB_VERSION //p" $(srcdir)/mono/metadata/appdomain.c)
-monolite_url = http://download.mono-project.com/monolite/monolite-$(mono_corlib_version)-latest.tar.gz
+monolite_url = https://download.mono-project.com/monolite/monolite-$(MONO_CORLIB_VERSION)-latest.tar.gz
 .PHONY: get-monolite-latest 
 get-monolite-latest:
        -rm -fr $(mcslib)/monolite-*
        -mkdir -p $(mcslib)
        test ! -d $(monolite) || test ! -d $(monolite).old || rm -fr $(monolite).old
        test ! -d $(monolite) || mv -f $(monolite) $(monolite).old
-       cd $(mcslib) && { (wget -O- $(monolite_url) || curl $(monolite_url)) | gzip -d | tar xf - ; }
+       cd $(mcslib) && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
        cd $(mcslib) && mv -f monolite-* monolite
 
 if BITCODE
index 187a683af4e265dd4687b43f5a35684dbdf3d121..bb1aecfa5ee583c8f59ec299599ca8582c06c7cb 100644 (file)
@@ -1,8 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 #AC_PREREQ([2.62])
 
-# when bumping version number below, keep it in sync with man/mono.1 too
-AC_INIT(mono, [4.9.1],
+AC_INIT(mono, [5.1.0],
         [http://bugzilla.xamarin.com/enter_bug.cgi?classification=Mono])
 
 AC_CONFIG_SRCDIR([README.md])
@@ -29,6 +28,24 @@ AC_PROG_LN_S
 
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
+MONO_VERSION_MAJOR=`echo $VERSION | cut -d . -f 1`
+MONO_VERSION_MINOR=`echo $VERSION | cut -d . -f 2`
+MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
+
+# This is the version number of the corlib-runtime interface. When
+# making changes to this interface (by changing the layout
+# of classes the runtime knows about, changing icall signature or
+# semantics etc), increment this variable.
+#
+# This can be reset to 0 when Mono's version number is bumped
+# since it's part of the corlib version (the prefix '1' in the full
+# version number is to ensure the number isn't treated as octal in C)
+MONO_CORLIB_COUNTER=1
+MONO_CORLIB_VERSION=`printf "1%02d%02d%02d%03d" $MONO_VERSION_MAJOR $MONO_VERSION_MINOR $MONO_VERSION_BUILD $MONO_CORLIB_COUNTER`
+
+AC_DEFINE_UNQUOTED(MONO_CORLIB_VERSION,$MONO_CORLIB_VERSION,[Version of the corlib-runtime interface])
+AC_SUBST(MONO_CORLIB_VERSION)
+
 case $host_os in
 *cygwin* )
                 echo "Run configure using ./configure --host=i686-pc-mingw32"
@@ -216,9 +233,6 @@ case "$host" in
                CFLAGS="$CFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
                CXXFLAGS="$CXXFLAGS -DPAGE_SIZE=4096 -DS_IWRITE=S_IWUSR"
 
-               # The configure check can't detect this
-               AC_DEFINE(HAVE_LARGE_FILE_SUPPORT, 1, [Have large file support])
-
                # to bypass the underscore linker check, can't work when cross-compiling
                mono_cv_uscore=yes
                mono_cv_clang=no
@@ -4425,6 +4439,7 @@ mono/tests/Makefile
 mono/tests/tests-config
 mono/tests/assemblyresolve/Makefile
 mono/tests/gc-descriptors/Makefile
+mono/tests/testing_gac/Makefile
 mono/unit-tests/Makefile
 mono/benchmark/Makefile
 mono/mini/Makefile
@@ -4535,6 +4550,7 @@ fi
     }')]
 
     echo "MONO_VERSION = $myver" >> $mcs_topdir/build/config.make
+    echo "MONO_CORLIB_VERSION = $MONO_CORLIB_VERSION" >> $mcs_topdir/build/config.make
 
     if test x$host_darwin = xyes; then
       echo "PLATFORM = darwin" >> $mcs_topdir/build/config.make
index 0e4713816d742ad79cccd869b4911d8687fbec2f..8b2a973b820138931ef25784bf0f5671444c7304 100644 (file)
@@ -9,16 +9,38 @@ def print_frames(thread, num_frames, current_thread):
 
     for frame in thread.frames[:+num_frames]:
         pc = str(frame.addr)
-        fmt = '  %c %s'
         var = frame
-        if pc[0] == '0':
+        function_name = frame.GetFunctionName()
+        if function_name == "ves_exec_method_with_context":
+            try:
+                s = 'frame->runtime_method->method'
+                klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
+                methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
+
+                ipoffset = frame.EvaluateExpression('ip').GetValueAsUnsigned()
+                insn = ''
+                if ipoffset != 0:
+                    ipoffset -= frame.EvaluateExpression('rtm->code').GetValueAsUnsigned()
+                    insn = "\"" + frame.EvaluateExpression('mono_interp_opname [*ip]').summary[1:-1] + "\""
+                var = '%s::%s @ %d %s || %s' % (klassname, methodname, ipoffset, insn, frame)
+            except Exception as e:
+                print "DBG: execfail:" + str(e)
+        elif function_name == "mono_interp_transform_method":
+            try:
+                s = 'runtime_method->method'
+                klassname = frame.EvaluateExpression('(char*) ' + s + '->klass->name').summary[1:-1]
+                methodname = frame.EvaluateExpression('(char*) ' + s + '->name').summary[1:-1]
+                var = 'transforming %s::%s || %s' % (klassname, methodname, frame)
+            except Exception as e:
+                print "DBG: transformfail:" + str(e)
+        elif pc[0] == '0':
             try:
                 framestr = frame.EvaluateExpression('(char*)mono_pmip((void*)%s)' % pc).summary[1:-1]
                 var = 'frame #%i: %s%s' % (frame.idx, pc, framestr)
             except:
                 pass
 
-        print fmt % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
+        print '  %c %s' % ('*' if current_thread and frame.idx == selected_frame.idx else ' ', var)
 
 def monobt(debugger, command, result, dict):
     opts = {'all_bt': False, 'num_frames': None}
@@ -53,4 +75,5 @@ def __lldb_init_module (debugger, dict):
     # This initializer is being run from LLDB in the embedded command interpreter
     # Add any commands contained in this module to LLDB
     debugger.HandleCommand('command script add -f monobt.monobt monobt')
-    print '"monobt" command installed'
\ No newline at end of file
+    debugger.HandleCommand('command alias mbt monobt')
+    print '"monobt" command installed'
index 99652f30dc5bbc41b41ddf6487e3087cb6d9f736..95519541ea38a58696b2486b69ce7cea78d77a9e 100644 (file)
@@ -87,7 +87,7 @@ mono-file-formats.zip: mono-file-formats.tree
 mono-file-formats.tree: $(srcdir)/docs.make $(srcdir)/Makefile.am $(srcdir)/deploy/.stamp
        $(TOOL_MAKE) $@
 
-deploy/.stamp: convert.exe Makefile.am 
+deploy/.stamp: convert.exe Makefile.am exdoc
        $(mkdir_p) html
        runtimedir=`cd ../runtime && pwd`; export runtimedir; \
        MONO_PATH=$(CLASS) perl $(srcdir)/exdoc -h $(srcdir) -t . $(srcdir)/../mono/*/*.c
index 9c0e6b22feb5d0a99921bf341bfec9f3e2a0dc0d..ec53ca5401e577b7be8a3148e8e04c3c359e5b49 100644 (file)
@@ -19,7 +19,7 @@ ENUM_VALUES_PER_LINE = 1
 EXCLUDE_SYMLINKS = NO
 EXPAND_ONLY_PREDEF = NO
 EXTENSION_MAPPING = c=C h=C
-EXTRACT_ALL = YES
+EXTRACT_ALL = NO
 EXTRACT_STATIC = YES
 EXT_LINKS_IN_WINDOW = NO
 FILE_PATTERNS = *.c *.h
@@ -27,9 +27,9 @@ FULL_PATH_NAMES = YES
 GENERATE_BUGLIST = YES
 GENERATE_DEPRECATEDLIST = YES
 GENERATE_HTML = YES
-GENERATE_PERLMOD = YES
 GENERATE_LEGEND = YES
-GENERATE_TESTLIST = YES
+GENERATE_PERLMOD = NO
+GENERATE_TESTLIST = NO
 GENERATE_TODOLIST = YES
 GENERATE_TREEVIEW = YES
 GRAPHICAL_HIERARCHY = YES
@@ -60,6 +60,7 @@ MULTILINE_CPP_IS_BRIEF = NO
 OPTIMIZE_OUTPUT_FOR_C = YES
 OUTPUT_DIRECTORY = doxygen-output
 OUTPUT_LANGUAGE = English
+PREDEFINED = "HAVE_SGEN_GC="
 PROJECT_NAME = "Mono"
 QT_AUTOBRIEF = NO
 QUIET = NO
@@ -77,6 +78,7 @@ SHOW_USED_FILES = YES
 SKIP_FUNCTION_MACROS = YES
 SORT_BRIEF_DOCS = YES
 SORT_GROUP_NAMES = YES
+SORT_MEMBER_DOCS = YES
 SOURCE_BROWSER = YES
 SOURCE_TOOLTIPS = YES
 STRIP_CODE_COMMENTS = NO
@@ -89,4 +91,4 @@ VERBATIM_HEADERS = YES
 WARNINGS = YES
 WARN_IF_DOC_ERROR = YES
 WARN_IF_UNDOCUMENTED = YES
-WARN_NO_PARAMDOC = NO
+WARN_NO_PARAMDOC = YES
index 517956c3e6387b07137055ee91f9d5f64b62c09d..92027663e6d6f7244b55fdcf8fa4f33a05f504c8 100644 (file)
 #!/usr/bin/perl
 
-if ($ARGV[0] eq "-h"){
-    $sourcedir = $ARGV[1];
-    $dir = $sourcedir;
-    $html = 1;
-    shift @ARGV;
-    shift @ARGV;
+use warnings;
+use strict;
+
+use Getopt::Long;
+use Pod::Usage;
+
+# Options
+my $HELP = 0;
+my $SOURCE_DIR = '';
+my $TARGET_DIR = '';
+my $WARNINGS = 0;
+
+GetOptions(
+    "help" => \$HELP,
+    "html|h=s" => \$SOURCE_DIR,
+    "target|t=s" => \$TARGET_DIR,
+    "warnings|W" => \$WARNINGS,
+) or pod2usage(1);
+
+pod2usage(0) if $HELP;
+
+exdoc();
+
+#
+# Main entry point.
+#
+sub exdoc {
+    my %templates = ();
+    my %docs = ();
+    my $stylesheet = load_stylesheet($SOURCE_DIR);
+    load_templates($SOURCE_DIR, \%templates);
+    process_source_files(\%docs);
+    merge(\%docs, \%templates, \$stylesheet);
+}
+
+#
+# Load CSS stylesheet.
+#
+sub load_stylesheet {
+    my ($dir_path) = @_;
+    my $file_path = "$dir_path/api-style.css";
+    open (my $file, '<', $file_path) or die "Could not open $file_path";
+    local $/;
+    my $contents = <$file>;
+    close $file;
+    return $contents;
 }
-open (FILE, "$dir/api-style.css" || die "Did not find $dir/api-style.css");
-while (<FILE>){
-    $css = $css . $_;
+
+#
+# Load HTML templates.
+#
+sub load_templates {
+    my ($dir_path, $templates) = @_;
+    opendir (my $dir, "$dir_path/sources/") or die "Could not open $dir_path";
+    while (my $file_name = readdir ($dir)) {
+        next if $file_name !~ /mono-api-.*\.html$/;
+        open (my $file, "$dir_path/sources/$file_name") or die "Could not open $file_name";
+        my $contents = '';
+        my @api = ();
+        while (<$file>) {
+            $contents .= $_;
+            if (/name="api:(.*?)"/) {
+                s/.*name="api:(\w+?)".*/$1/;
+                push @api, $_;
+            }
+        }
+        close $file;
+        $templates->{$file_name}->{contents} = $contents;
+        $templates->{$file_name}->{api} = \@api;
+    }
+    closedir $dir;
 }
 
-if ($ARGV[0] eq "-t"){
-    $dir = $ARGV[1];
-    shift @ARGV;
+#
+# Extract documentation from all source files.
+#
+sub process_source_files {
+    my ($docs) = @_;
+    for my $file_path (@ARGV) {
+        process_source_file($file_path, $docs);
+    }
 }
 
-if ($html){
-    opendir (D, "$sourcedir/sources/") || die "Can not open $dir";
-    while ($n = readdir (D)){
-       if ($n =~ /mono-api-.*\.html$/){
-           open (IN, "$sourcedir/sources/$n") || die "Can not open $n";
-           $files[$filecount] = $n;
-           while (<IN>){
-               @files_content[$filecount] .= $_;
-               if (/name="api:(.*?)"/){
-                   $_ =~ s/.*name="api:(\w+?)".*/\1/;
-                   $apis[$filecount] .= "$_";
-               }
-           }
-           $filecount++;
-           close IN;
-       }
+#
+# Extract documentation from a single source file.
+#
+sub process_source_file {
+    my ($file_path, $docs) = @_;
+    open (my $file, '<', $file_path) or die "Could not open $file_path";
+    while (<$file>) {
+        next if (!/\/\*\* *\n/);
+        process_function($file, $file_path, $docs);
     }
+    close $file;
 }
 
-while (<ARGV>){
-       if (/\/\*\* *\n/){
-               &process_doc;
-       } else {
-               #print "IGNORING: $_";
-       }
+#
+# Extract documentation from a single function.
+#
+sub process_function {
+
+    my ($file, $file_path, $docs) = @_;
+
+    my $PARAMETER_SECTION = 0;
+    my $BODY_SECTION = 1;
+    my $RETURN_SECTION = 2;
+    my $section = $PARAMETER_SECTION;
+
+    my $name = do {
+        $_ = <$file>;
+        chomp;
+        s/^ \* //;
+        s/:$//;
+        $_
+    };
+
+    # Ignore irrelevant functions, and those with the wrong doc format.
+    return if $name !~ /^mono_\w+$/;
+
+    my $deprecated;
+    my @parameters = ();
+    my $body = '';
+    my $returns = '';
+    my $prototype = '';
+
+    while (<$file>) {
+
+        # We've reached the last line in the documentation block.
+        if (/^ \*\*?\//) {
+
+            # Grab function prototype.
+            while (<$file>) {
+                $prototype .= $_;
+                last if /\{/;
+            }
+
+            # Clean up prototype.
+            $prototype = do {
+                $_ = $prototype;
+                # Strip braces and trailing whitespace.
+                s/{//;
+                s/ +$//;
+                # Turn "Type * xxx" into "Type* xxx"
+                s/^(\w+)\W+\*/$1*/;
+                $_;
+            };
+
+            # Process formatting within sections.
+            for my $parameter (@parameters) {
+                process_formatting(\$parameter->{description}, $file_path, $.);
+            }
+            process_formatting(\$returns, $file_path, $.);
+            process_formatting(\$body, $file_path, $.);
+            if (defined($deprecated)) {
+                process_formatting(\$deprecated, $file_path, $.);
+            }
+            $body =~ s/\n/ /g;
+
+            if (exists($docs->{body}->{$name})) {
+                my $origin = $docs->{origin}->{$name};
+                if ($WARNINGS) {
+                    warn
+                      "$file_path:$.: Redundant documentation for $name\n",
+                      "$origin->{file}:$origin->{line}: Previously defined here\n";
+                }
+            }
+            $docs->{origin}->{$name} = { file => $file_path, line => $. };
+            $docs->{body}->{$name} = $body;
+            $docs->{parameters}->{$name} = \@parameters;
+            $docs->{deprecated}->{$name} = $deprecated if defined $deprecated;
+            $docs->{return}->{$name} = $returns;
+            $docs->{prototype}->{$name} = $prototype;
+            last;
+
+        }
+
+        # Strip newlines and asterisk prefix.
+        chomp;
+        s/^ +\*//;
+
+        # Replace blank lines with paragraph breaks.
+        $_ = '<p>' if /^\s*$/;
+
+        if ($section == $PARAMETER_SECTION) {
+            if (/\s*\\param +(\w+)(.*)/) {
+                # print "$file_path:$.: warning: Got parameter $1\n";
+                push @parameters, { name => $1, description => $2 };
+            } elsif (/\s*\\deprecated(.*)/) {
+                # print "$file_path:$.: warning: Got deprecated annotation\n";
+                $deprecated = $1;
+            } elsif (/\s*(\w+):(.*)/) {
+                if ($1 eq 'deprecated') {
+                    warn "$file_path:$.: Old-style monodoc notation 'deprecated:' used\n"
+                        if $WARNINGS;
+                    $deprecated = $2;
+                } else {
+                    warn "$file_path:$.: Old-style monodoc notation 'param:' used\n"
+                        if $WARNINGS;
+                    push @parameters, { name => $1, description => $2 };
+                }
+            } else {
+                # $body = "\t$_\n";
+                $section = $BODY_SECTION;
+                redo;
+            }
+        } elsif ($section == $BODY_SECTION) {
+            if (s/(Returns?:\s*|\\returns?\s*)//) {
+                $returns = "\t$_\n";
+                $section = $RETURN_SECTION;
+            } else {
+                $body .= "\n\t$_";
+            }
+        } elsif ($section == $RETURN_SECTION) {
+            $returns .= "\n\t$_";
+        } else {
+            die "Invalid section $section\n";
+        }
+    }
+}
+
+#
+# Substitute formatting within documentation text.
+#
+sub process_formatting {
+    my ($content, $file_path, $current_line) = @_;
+    $_ = $$content;
+
+    # Constants
+    s{NULL}{<code>NULL</code>}g;
+    s{TRUE}{<code>TRUE</code>}g;
+    s{FALSE}{<code>FALSE</code>}g;
+
+    # Parameters
+    warn "$file_path:$current_line: Old-style monodoc notation '\@param' used\n"
+        if s{@(\w+)}{<i>$1</i>}g && $WARNINGS;
+    s{\\p +(\w+)}{<i>$1</i>}g;
+
+    # Code
+    warn "$file_path:$current_line: Old-style monodoc notation '#code' used\n"
+        if s{#(\w+)}{<code>$1</code>}g && $WARNINGS;
+    warn "$file_path:$current_line: Old-style monodoc notation '`code`' used\n"
+        if s{\`((?!api:)[:.\w\*]+)\`}{<code>$1</code>}g && $WARNINGS;
+    s{\\c +(\S+(?<![.,:;]))}{<code>$1</code>}g;
+
+    $$content = $_;
 }
 
-if ($html){
-    for ($f = 0; $f < $filecount; $f++){
-       $name = $files[$f];
-       open (OUT, "> $dir/html/$name") || die "Can not create $dir/html/$name";
-       print "Merging: $name\n";
-       print OUT<<EOF;
+#
+# Merge templates with stylesheet and documentation extracted from sources.
+#
+sub merge {
+    my ($docs, $templates, $stylesheet) = @_;
+    my $last = '';
+    for my $name (keys %$templates) {
+        open (my $output_file, '>', "$TARGET_DIR/html/$name")
+          or die "Could not create $TARGET_DIR/html/$name";
+        print "Merging: $name\n";
+        print $output_file <<EOF;
 <?xml version="1.0" encoding="utf-8"?>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
     <title>$name</title>
     <style type="text/css">
-$css
+$stylesheet
    </style>
 </head>
 <body>
 <div class="mapi-docs">
 EOF
-       @a = split (/\n/, $files_content[$f]);
-       $strikeextra = "";
-       $api_shown = 0;
-       for ($ai = 0; $ai < $#a; $ai++){
-           $line = $a[$ai];
-           
-           ($api,$caption) = $line =~  /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/;
-           if ($api ne ""){
-               if ($api_shown == 1){
-                   print OUT "</div> <!-- class=mapi -->\n\n";
-                   if ($deprecated{$api}){
-                       $strike = "mapi-strike";
-                       $strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $deprecated{$api};
-                   } else {
-                       $strike = "";
-                       $strikeextra = "";
-                   }
-               }
-               $api_shown = 1;
-               $proto = $prototype{$api};
-               if ($proto eq ""){
-                   $proto = "$api";
-               }
-
-                print OUT<<EOF;
+        my @a = split (/\n/, $templates->{$name}->{contents});
+        my $strike = '';
+        my $strikeextra = '';
+        my $api_shown = 0;
+        for (my $ai = 0; $ai < $#a; $ai++) {
+            my $line = $a[$ai];
+            if (my ($api, $caption) = ($line =~ /<h4><a name=\"api:(\w+)\">(\w+)<\/a><\/h4>/)) {
+                if ($api_shown == 1) {
+                    print $output_file "</div> <!-- class=mapi -->\n\n";
+                    if ($docs->{deprecated}->{$api}) {
+                        $strike = "mapi-strike";
+                        $strikeextra = "</div><br><div class='mapi-deprecated'><b>Deprecated:</b> " . $docs->{deprecated}->{$api};
+                    } else {
+                        $strike = "";
+                        $strikeextra = "";
+                    }
+                }
+                $api_shown = 1;
+                my $proto = $docs->{prototype}->{$api} // $api;
+
+                print $output_file <<EOF;
 <a name="api:$api"></a>
 <div class="mapi">
     <div class="mapi-entry $strike"><code>$api$strikeextra</code></div>
@@ -98,228 +302,201 @@ EOF
             <div class="mapi-prototype">$proto</div>
             <p>
 EOF
-                $ppars = $arguments{$api};
-               if ($ppars ne "" && (!($ppars =~ /^[ \t]+$/))){
-                   print OUT "            <div class=\"mapi-section\">Parameters</div>\n";
-                   print OUT "            <table class=\"mapi-parameters\"><tbody>".${arguments{$api}}."</tbody></table>";
-               }
-           
-               &opt_print ("Return value", $returns{$api}, 0);
-               &opt_print ("Description", $bodies{$api}, 0);
-               print OUT "        </div><!--mapi-description-->\n    </div><!--height container-->\n";
-           } else {
-               if ($line =~ /@API_IDX@/){
-                   $apis_toc = &create_toc ($apis[$f]);
-                   $line =~ s/\@API_IDX\@/$apis_toc/;
-               }
-               if ($line =~ /^<h4/){
-                   print OUT "</div>\n";
-                   $api_shown = 0;
-               }
-               if ($line =~ /`/){
-               }
-               print OUT "$line\n";
-           }
-       }
-       print OUT<<EOF;
-   </div>
-</body>
-</html>
-EOF
-       close OUT;
-       system ("$ENV{runtimedir}/mono-wrapper convert.exe $dir/html/$name $dir/html/x-$name");
-
-
-       # clean up the mess that AgilityPack does, it CDATAs our CSS
-       open HACK, "$dir/html/x-$name" || die "Could not open $dir/html/x-$name";
-       open HACKOUT, ">$dir/deploy/$name" || die "Could not open output";
-
-       $line = 0;
-       $doprint = 0;
-       while (<HACK>){
-           print HACKOUT $last if ($doprint);
-           $line++;
-           s/^\/\/<!\[CDATA\[//;
-           s/^\/\/\]\]>\/\///;
-
-           # Remove the junk <span> wrapper generated by AgilityPack
-           if ($line==1){
-               s/<span>//;
-           }
-           if (/<style type/){
-               # Replace the CSS in the XHTML output with the original CSS
-               print HACKOUT $_;
-               print HACKOUT $css;
-               while (<HACK>){
-                   last if (/<\/style>/);
-               }
-           }
-           $last = $_;
-           $doprint = 1;
-       }
-       if (!($last =~ /span/)){
-           print HACKOUT $last;
-       }
-
-       #system ("cp.exe $dir/html/$name $dir/deploy/$name");
-    }
-}
+                if (exists ($docs->{parameters}->{$api})) {
+                    my $ppars = $docs->{parameters}->{$api};
+                    if (@$ppars) {
+                        print $output_file
+                          "            <div class=\"mapi-section\">Parameters</div>\n",
+                          "            <table class=\"mapi-parameters\"><tbody>",
+                          render_parameters($ppars),
+                          "</tbody></table>";
+                    }
+                }
+
+                opt_print ($output_file, "Return value", $docs->{return}->{$api});
+                opt_print ($output_file, "Description", $docs->{body}->{$api});
+                print $output_file "        </div><!--mapi-description-->\n    </div><!--height container-->\n";
+            } else {
+                if ($line =~ /\@API_IDX\@/) {
+                    my $apis_toc = create_toc ($docs, $templates->{$name}->{api});
+                    $line =~ s/\@API_IDX\@/$apis_toc/;
+                }
+                if ($line =~ /^<h4/) {
+                    print $output_file "</div>\n";
+                    $api_shown = 0;
+                }
+                if ($line =~ /`/) {
+                }
+                print $output_file "$line\n";
+            }
+        }
+        print $output_file
+          "   </div>",
+          "</body>",
+          "</html>";
+        close $output_file;
+        system ("$ENV{runtimedir}/mono-wrapper convert.exe $TARGET_DIR/html/$name $TARGET_DIR/html/x-$name");
 
-sub process_doc {
-       $doc = "";
-       $func = <>;
-       chop $func;
-       $func =~ s/^ \* //;
-       $func =~ s/:$//;
-       print "Function: $func\n" if (!$html);
-       $args = "";
-       $inbody = 0;
-       $returns = "";
-       $body = "";
-       $functions[$fn++] = $func;
-       $deprecated = 0;
-       # Process arguments
-       while (<>){
-           s/NULL/<code>NULL<\/code>/g;
-           s/TRUE/<code>TRUE<\/code>/g;
-           s/FALSE/<code>FALSE<\/code>/g;
-           if (/^ \*\*?\//){
-                   $body =~ s/@(\w+)/<i>\1<\/i>/g;
-                   $returns =~ s/@(\w+)/<i>\1<\/i>/g;
-                   $args =~ s/@(\w+)/<i>\1<\/i>/g;
-
-                   $body =~ s/#(\w+)/<code>\1<\/code>/g;
-                   $returns =~ s/#(\w+)/<code>\1<\/code>/g;
-                   $args =~ s/#(\w+)/<code>\1<\/code>/g;
-
-                   $returns =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
-                   $args =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
-                   $body =~ s/\`([:.\w\*]+)\`/<code>\1<\/code>/g;
-                   
-                   $body =~ s/\n/ /;
-                   $bodies{$func} = $body;
-                   $arguments{$func} = $args;
-                   $deprecated{$func} = $deprecated;
-                   $returns{$func} = $returns;
-                   $proto = "";
-                   while (<>){
-                       $proto .= $_;
-                       last if (/\{/);
-                   }
-                   $proto =~ s/{//;
-                   # clean it up a little, remove newlines, empty space at end
-                   $proto =~ s/ +$//;
-                   # Turn "Type * xxx" into "Type* xxx"
-                   $proto =~ s/^(\w+)\W+\*/\1\*/;
-                   $prototype{$func} = $proto;
-                   return;
-               }
-               chop;
-               s/^\ \*//;
-               $_ = "<p>" if (/^\s*$/);
-                               
-               if ($inbody == 0){
-                   if (/\s*(\w+):(.*)/){
-                       if ($1 eq "deprecated"){
-                           $deprecated = $2;
-                       } else {
-                           #$args .= "<dt><i>$1:</i></dt><dd>$2</dd>";
-                           $args .= "<tr><td><i>$1</i><td>$2</td></td></tr>";
-                       }
-                   } else {
-                       
-                       $body = "\t$_\n";
-
-                       $inbody = 1;
-                   }
-               } elsif ($inbody == 1) {
-                   if (/Returns?:/){
-                       s/Returns?://;
-                       $returns = "\t$_\n";
-                       $inbody = 2;
-                   } else {
-                       $body .= "\n\t$_";
-                   }
-               } else {
-                   $returns .= "\n\t$_";
-               }
-                  
-       }
+        # Clean up the mess that AgilityPack makes (it CDATAs our CSS).
+        open (my $hack_input, '<', "$TARGET_DIR/html/x-$name")
+          or die "Could not open $TARGET_DIR/html/x-$name";
+        open (my $hack_output, '>', "$TARGET_DIR/deploy/$name")
+          or die "Could not open output";
+
+        my $line = 0;
+        my $doprint = 0;
+        while (<$hack_input>) {
+            print $hack_output $last if ($doprint);
+            $line++;
+            s/^\/\/<!\[CDATA\[//;
+            s/^\/\/\]\]>\/\///;
+
+            # Remove the junk <span> wrapper generated by AgilityPack.
+            if ($line==1) {
+                s/<span>//;
+            }
+            if (/<style type/) {
+                # Replace the CSS in the XHTML output with the original CSS.
+                print $hack_output $_;
+                print $hack_output $$stylesheet;
+                while (<$hack_input>) {
+                    last if (/<\/style>/);
+                }
+            }
+            $last = $_;
+            $doprint = 1;
+        }
+        if (!($last =~ /span/)) {
+            print $hack_output $last;
+        }
+        # system ("cp.exe $TARGET_DIR/html/$name $TARGET_DIR/deploy/$name");
+    }
 }
 
 sub create_toc {
-    my ($apis_listed) = @_;
+    my ($docs, $apis_listed) = @_;
     my $type_size = 0;
     my $name_size = 0;
-    my $ret, $xname, $args, $line;
-    $apis_toc = "";
+    my ($ret, $xname, $args);
+    my $apis_toc = "";
 
-
-    # Try to align things, so compute type size, method size, and arguments
-    foreach $line (split /\n/, $apis_listed){
-       $p = $prototype{$line};
-       ($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
-       $tl = length ($ret);
-       $pl = length ($xname);
-
-       $type_size = $tl if ($tl > $type_size);
-       $name_size = $pl if ($pl > $name_size);
+    # Try to align things; compute type size, method size, and arguments.
+    foreach my $line (split /\n/, $apis_listed) {
+        if (exists ($docs->{prototype}->{$line})) {
+            my $p = $docs->{prototype}->{$line};
+            if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
+                my $tl = length ($ret);
+                my $pl = length ($xname);
+                $type_size = $tl if ($tl > $type_size);
+                $name_size = $pl if ($pl > $name_size);
+            }
+        }
     }
 
     $type_size++;
     $name_size++;
 
-    foreach $line (split /\n/, $apis_listed){
-       chop;
-       $p = $prototype{$line};
-       ($ret, $xname, $args) = $p =~ /(.*)\n(\w+)[ \t](.*)/;
-       if ($xname eq ""){
-           $xname = $line;
-       }
-       
-       $rspace = " " x ($type_size - length ($ret));
-       $nspace = " " x ($name_size - length ($xname));
-       $args = &format ($args, length ($ret . $rspace . $xname . $nspace), 60);
-       $apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
+    foreach my $line (split /\n/, $apis_listed) {
+        chomp($line);
+        if (exists($docs->{prototype}->{$line})) {
+            my $p = $docs->{prototype}->{$line};
+            if (my ($ret, $xname, $args) = ($p =~ /(.*)\n(\w+)[ \t](.*)/)) {
+                $xname = $line if $xname eq "";
+                my $rspace = " " x ($type_size - length ($ret));
+                my $nspace = " " x ($name_size - length ($xname));
+                $args = wrap ($args, length ($ret . $rspace . $xname . $nspace), 60);
+                $apis_toc .= "$ret$rspace<a href=\"\#api:$line\">$xname</a>$nspace$args\n";
+            }
+        }
     }
     return $apis_toc;
 }
 
-#
-# Formats the rest of the arguments in a way that will fit in N columns
-#
-sub format {
+sub wrap {
     my ($args, $size, $limit) = @_;
     my $sret = "";
 
-#    return $args if ((length (args) + size) < $limit);
+    # return $args if ((length (args) + size) < $limit);
     
-    $remain = $limit - $size;
-    @sa = split /,/, $args;
-    $linelen = $size;
-    foreach $arg (@sa){
-       if ($sret eq ""){
-           $sret = $arg . ", ";
-           $linelen += length ($sret);
-       } else {
-           if ($linelen + length ($arg) < $limit){
-               $sret .= "FITS" . $arg . ", ";
-           } else {
-               $newline = " " x ($size) . $arg . ", ";
-               $linelen = length ($newline);
-               $sret .= "\n" . $newline;
-           }
-       }
+    my $remain = $limit - $size;
+    my @sa = split /,/, $args;
+    my $linelen = $size;
+    foreach my $arg (@sa) {
+        if ($sret eq "") {
+            $sret = $arg . ", ";
+            $linelen += length ($sret);
+        } else {
+            if ($linelen + length ($arg) < $limit) {
+                $sret .= "FITS" . $arg . ", ";
+            } else {
+                my $newline = " " x ($size) . $arg . ", ";
+                my $linelen = length ($newline);
+                $sret .= "\n" . $newline;
+            }
+        }
     }
     $sret =~ s/, $/;/;
     return $sret;
 }
 
+#
+# Print a section if non-empty.
+#
 sub opt_print {
-    my ($caption, $opttext, $quote) = @_;
+    my ($output, $caption, $opttext) = @_;
+    if (defined($opttext) && $opttext ne '' && $opttext !~ /^[ \t]+$/) {
+        print $output
+          "             <div class=\"mapi-section\">$caption</div>\n",
+          "             <div>$opttext</div>\n";
+    }
+}
 
-    if ($opttext ne "" && (!($opttext =~ /^[ \t]+$/))){
-       print OUT "             <div class=\"mapi-section\">$caption</div>\n";
-        print OUT "             <div>$opttext</div>\n";
+#
+# Render parameter information as table.
+#
+sub render_parameters {
+    my ($parameters) = @_;
+    my $result = '';
+    for my $parameter (@$parameters) {
+        $result .= "<tr><td><i>$parameter->{name}</i></td><td>$parameter->{description}</td></tr>";
     }
+    return $result;
 }
+
+__END__
+
+=head1 NAME
+
+exdoc - Compiles API docs from Mono sources and HTML templates.
+
+=head1 SYNOPSIS
+
+    exdoc [OPTIONS] [FILE...]
+
+=head1 OPTIONS
+
+=over 4
+
+=item B<--help>
+
+Print this help message.
+
+=item B<--html> I<DIR>, B<-h> I<DIR>
+
+Use I<DIR> as the input path for HTML sources.
+
+=item B<--target> I<DIR>, B<-t> I<DIR>
+
+Use I<DIR> as the target path for output.
+
+=item B<--warnings>, B<-W>
+
+Enable warnings about documentation errors.
+
+=back
+
+=head1 DESCRIPTION
+
+Reads HTML templates and C sources, extracting documentation from the sources and splicing it into the templates.
+
+=cut
index 1feff043f65acf732fdce5c649592d25fb2b01bc..bf6650e0b43b071de2241d0fbc3cbd1d15e9e377 100644 (file)
 <h4><a name="api:mono_profiler_startup">mono_profiler_startup</a></h4>
 <h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4> 
 <h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4> 
-<h4><a name="api:mono_profiler_gc_event">mono_profiler_gc_event</a></h4> 
-<h4><a name="api:mono_profiler_gc_heap_resize">mono_profiler_gc_heap_resize</a></h4>
 <h4><a name="api:mono_profiler_stat_hit">mono_profiler_stat_hit</a></h4> 
index 6c77197318fe85dfddf75a1b344b9bf8d0007b0b..febc100f0313f0dc9d75dd1bcea45e87134b5b55 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 6c77197318fe85dfddf75a1b344b9bf8d0007b0b
+Subproject commit febc100f0313f0dc9d75dd1bcea45e87134b5b55
index 1ab0b08ad40962d4f794f12ce042b98d2148df52..229946f543f65db2b102188427cda4b68fc08ee6 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1ab0b08ad40962d4f794f12ce042b98d2148df52
+Subproject commit 229946f543f65db2b102188427cda4b68fc08ee6
index 63c51e726292149b4868db71baa883e5ad173766..78360b22e71b70de1d8cc9588cb4ef0040449c31 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 63c51e726292149b4868db71baa883e5ad173766
+Subproject commit 78360b22e71b70de1d8cc9588cb4ef0040449c31
index 31eda261991f9f6c1add1686b6d3799f835b2978..8dce492077a2cd43abff2e9d4e0c9e186f44af2e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 31eda261991f9f6c1add1686b6d3799f835b2978
+Subproject commit 8dce492077a2cd43abff2e9d4e0c9e186f44af2e
index c30bfe5a31a8eb95701af9d763549587f2bb6b48..88b67c42ca8b7d58141c176b46749819bfcef166 160000 (submodule)
@@ -1 +1 @@
-Subproject commit c30bfe5a31a8eb95701af9d763549587f2bb6b48
+Subproject commit 88b67c42ca8b7d58141c176b46749819bfcef166
index e4d9784ac37b9ebf4757175c92bc7a3ec9fd867a..1bdcf6b7bfbe3b03fdaa76f6124d0d7374f08615 160000 (submodule)
@@ -1 +1 @@
-Subproject commit e4d9784ac37b9ebf4757175c92bc7a3ec9fd867a
+Subproject commit 1bdcf6b7bfbe3b03fdaa76f6124d0d7374f08615
diff --git a/external/xunit-binaries b/external/xunit-binaries
new file mode 160000 (submodule)
index 0000000..b8e20d2
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit b8e20d265b368dd6252703d5afd038d0b028e388
index a0f9e6f4f6acd62c6df19b1a0a84aadca07e306c..430a160896890929ca709deef67a6085bdd83460 100644 (file)
@@ -2,31 +2,22 @@
 .if t .sp .5v
 .if n .sp
 ..
-.TH csharp 1 "4 September 2008"
+.TH csharp 1 "22 March 2017"
 .SH NAME 
-csharp, gsharp \- Interactive C# Shell 
+csharp \- Interactive C# Shell and Scripting
 .SH SYNOPSIS
 .B csharp [--attach PID] [-e EXPRESSION] [file1 [file2]]
-[options] 
-.P
-.B gsharp [file1 [file2]]
+[compiler-options] [--|-s script-options]
 .SH DESCRIPTION
 The 
 .I csharp
-is an interactive C# shell that allows the user to enter and evaluate
-C# statements and expressions from the command line.   The regular 
+command is an interactive C# shell and scripting host that allows
+the user to enter and evaluate C# statements and expressions from
+the command line or execute C# scripts.
+The regular
 .I mcs
 command line options can be used in this version of the compiler. 
 .PP
-The 
-.I gsharp
-command is a GUI version of the C# interpreter that uses Gtk# and
-provides an area to attach widgets as well.      This version can be
-attached to other Gtk# applications in a safe way as it injects itself
-into the main loop of a Gtk# application, avoiding any problems
-arising from the multi-threaded nature of injecting itself into a
-target process.
-.PP
 Files specified in the command line will be loaded and executed as
 scripts.
 .PP
@@ -35,9 +26,31 @@ Starting with Mono 2.10, the
 command can be used as an interpreter executed by executables flagged
 with the Unix execute attribute.   To do this, make the first line of
 your C# source code look like this:
+.PP
 .nf
-"#!/usr/bin/csharp" 
-Console.WriteLine ("Hello, World");
+  #!/usr/bin/csharp
+  Console.WriteLine ("Hello, World");
+.fi
+.PP
+Starting with Mono 5.0, command line arguments may now be passed
+to the
+.I csharp
+command by specifying either the
+.I -s
+or
+.I --
+(script) options.
+.PP
+The
+.I -s
+option is ideal for interpreting executable scripts that utilize
+shebang syntax (introduced in Mono 2.10). This allows command line
+arguments to be passed to and consumed cleanly by the script:
+.PP
+.nf
+  #!/usr/bin/csharp -s
+  foreach (var arg in Args)
+    Console.WriteLine ($"script argument: {arg}");
 .fi
 .SH OPTIONS
 The commands accept all of the commands that are available to the 
@@ -45,6 +58,23 @@ The commands accept all of the commands that are available to the
 command, so you can reference assemblies, specify paths, language
 level and so on from the command line.   In addition, the following
 command line options are supported:
+.TP
+.I "\-s" SCRIPT_FILE
+This option is ideal for authoring executable scripts that utilize
+the Unix shebang feature. Unix will implicitly append as an argument
+the path of the script to execute. When the executable is invoked,
+any arguments then passed to it will be available in the
+.I Args
+global. Example:
+.I "#!/usr/bin/env csharp -s"
+.TP
+.I "\-\-"
+Any arguments that follow will not be passed to the compiler driver,
+and instead will be made available in the
+.I Args
+global. Example:
+.I csharp -- a b c
+will result in Args = { "a", "b", "c" } in the interactive shell.
 .TP 
 .I "\-\-attach"
 This is an advanced option and should only be used if you have a deep
@@ -290,6 +320,15 @@ statements and expressions are executed are static, they can be
 invoked directly from the shell.   These are the available properties
 and methods:
 .TP
+.I Args
+An easy to consume array of any arguments specified after either
+.I -s
+or
+.I --
+on the command line. Ideal for self-executing scripts utilizing the
+.I -s
+option.
+.TP
 .I void LoadAssembly(string assembly)
 Loads the given assembly.   This is equivalent to passing the compiler
 the -r: flag with the specified string. 
index 4c99a8dd0d8ffe38e12cbaf81b7a5710da13c1f0..e9e64c2850850a7257899c65a02be581cac0d48d 100644 (file)
@@ -19,14 +19,6 @@ mono \- Mono's ECMA-CLI native code generator (Just-in-Time and Ahead-of-Time)
 \fImono\fP is a runtime implementation of the ECMA Common Language
 Infrastructure.  This can be used to run ECMA and .NET applications.
 .PP
-The runtime contains a native code generator that transforms the
-Common Intermediate Language into native code.
-.PP
-The code generator can operate in two modes: just in time compilation
-(JIT) or ahead of time compilation (AOT).  Since code can be
-dynamically loaded, the runtime environment and the JIT are always
-present, even if code is compiled ahead of time.
-.PP
 The runtime loads the specified
 .I file
 and optionally passes
@@ -36,12 +28,26 @@ to it.  The
 .I file
 is an ECMA assembly.  They typically have a .exe or .dll extension.
 .PP
+These executables can reference additionaly functionality in the form
+of assembly references.  By default those assembly references are
+resolved as follows: the \fBmscorlib.dll\fR is resolved from the
+system profile that is configured by Mono, and other assemblies are
+loaded from the Global Assembly Cache (GAC).   
+.PP
+The runtime contains a native code generator that transforms the
+Common Intermediate Language into native code.
+.PP
+The code generator can operate in two modes: just in time compilation
+(JIT) or ahead of time compilation (AOT).  Since code can be
+dynamically loaded, the runtime environment and the JIT are always
+present, even if code is compiled ahead of time.
+.PP
 The runtime provides a number of configuration options for running
 applications, for developing and debugging, and for testing and
 debugging the runtime itself.
 .PP
-The \fImono\fP command uses the Boehm conservative garbage collector
-while the \fImono-sgen\fP command uses a moving and generational
+The \fImono\fP command uses the moving and generational SGen garbage collector
+while the \fImono-boehm\fP command uses the conservative Boehm
 garbage collector.
 .SH PORTABILITY
 On Unix-based systems, Mono provides a mechanism to emulate the 
@@ -87,7 +93,7 @@ information which is not available on the generated file.  When
 precompiling code, you might want to compile with all optimizations
 (-O=all).  Pre-compiled code is position independent code.
 .Sp
-Pre compilation is just a mechanism to reduce startup time, increase
+Precompilation is just a mechanism to reduce startup time, increase
 code sharing across multiple mono processes and avoid just-in-time
 compilation program startup costs.  The original assembly must still
 be present, as the metadata is contained there.
@@ -104,11 +110,6 @@ than one can be specified:
 .RS
 .ne 8
 .TP
-.I autoreg
-The AOT compiler will emit a (ELF only) library initializer to automatically
-register the aot compiled module with the runtime.  This is only useful in static
-mode
-.TP
 .I asmonly
 Instructs the AOT compiler to output assembly code instead of an
 object file.
@@ -118,11 +119,6 @@ object file.
 If specified, forces the generated AOT files to be bound to the
 runtime version of the compiling Mono.   This will prevent the AOT
 files from being consumed by a different Mono runtime.
-.I full
-.Sp
-This is currently an experimental feature as it is not complete.
-This instructs Mono to precompile code that has historically not been
-precompiled with AOT.   
 .TP
 .I data-outfile=FILE.dll.aotdata
 .Sp
@@ -134,10 +130,59 @@ on demand by using the
 .I mono_install_load_aot_data_hook
 method.
 .TP
+.I direct-icalls
+.Sp
+When this option is specified, icalls (internal calls made from the
+standard library into the mono runtime code) are invoked directly
+instead of going through the operating system symbol lookup operation.
+This requires use of the
+.I static
+option.
+.TP
 .I direct-pinvoke
 .Sp
 When this option is specified, P/Invoke methods are invoked directly
 instead of going through the operating system symbol lookup operation.
+This requires use of the
+.I static
+option.
+.TP
+.I dwarfdebug
+Instructs the AOT compiler to emit DWARF debugging information. When
+used together with the nodebug option, only DWARF debugging
+information is emitted, but not the information that can be used at
+runtime.
+.TP
+.I full
+.Sp
+This creates binaries which can be used with the --full-aot option.
+.TP
+.I hybrid
+.Sp
+This creates binaries which can be used with the --hybrid-aot option.
+.TP
+.I llvm
+AOT will be performed with the LLVM backend instead of the Mono backend where possible. This will be slower to compile but most likely result in a performance improvement.
+.TP
+.I llvmonly
+AOT will be performed with the LLVM backend exclusively and the Mono backend will not be used. The only output in this mode will be the bitcode file normally specified with the
+.I llvm-outfile
+option. Use of
+.I llvmonly
+automatically enables the
+.I full
+and
+.I llvm
+options. This feature is experimental.
+.TP
+.I llvm-outfile=[filename]
+Gives the path for the temporary LLVM bitcode file created during AOT.
+.TP
+.I info
+Print the architecture the AOT in this copy of Mono targets and quit.
+.TP
+.I ld-flags
+Additional flags to pass to the C linker (if the current AOT mode calls for invoking it).
 .TP
 .I llvm-path=<PREFIX>
 Same for the llvm tools 'opt' and 'llc'.
@@ -156,7 +201,12 @@ llc compiler.
 .I nimt-trampolines=[number]
 When compiling in full aot mode, the IMT trampolines must be precreated
 in the AOT image.  You can add additional method trampolines with this argument.
-Defaults to 128.
+Defaults to 512.
+.TP
+.I ngsharedvt-trampolines=[number]
+When compiling in full aot mode, the value type generic sharing trampolines must be precreated
+in the AOT image.  You can add additional method trampolines with this argument.
+Defaults to 512.
 .TP
 .I nodebug
 Instructs the AOT compiler to not output any debugging information.
@@ -166,23 +216,22 @@ This prevents the AOT compiler from generating a direct calls to a
 method.   The AOT compiler usually generates direct calls for certain
 methods that do not require going through the PLT (for example,
 methods that are known to not require a hook like a static
-constructor) or call into simple internal calls. 
-.TP
-.I dwarfdebug
-Instructs the AOT compiler to emit DWARF debugging information. When
-used together with the nodebug option, only DWARF debugging
-information is emitted, but not the information that can be used at
-runtime.
+constructor) or call into simple internal calls.
 .TP
 .I nrgctx-trampolines=[number]
 When compiling in full aot mode, the generic sharing trampolines must be precreated
 in the AOT image.  You can add additional method trampolines with this argument.
-Defaults to 1024.
+Defaults to 4096.
+.TP
+.I nrgctx-fetch-trampolines=[number]
+When compiling in full aot mode, the generic sharing fetch trampolines must be precreated
+in the AOT image.  You can add additional method trampolines with this argument.
+Defaults to 128.
 .TP
 .I ntrampolines=[number]
 When compiling in full aot mode, the method trampolines must be precreated
 in the AOT image.  You can add additional method trampolines with this argument.
-Defaults to 1024.
+Defaults to 4096.
 .TP
 .I outfile=[filename]
 Instructs the AOT compiler to save the output to the specified file.
@@ -191,6 +240,16 @@ Instructs the AOT compiler to save the output to the specified file.
 If the AOT compiler cannot compile a method for any reason, enabling this flag
 will output the skipped methods to the console.
 .TP
+.I profile=[file]
+Specify a file to use for profile-guided optimization. See the "AOT PROFILING" section. To specify multiple files, include the
+.I profile
+option multiple times.
+.TP
+.I profile-only
+AOT *only* the methods described in the files specified with the
+.I profile
+option. See the "AOT PROFILING" section.
+.TP
 .I readonly-value=namespace.typename.fieldname=type/value
 Override the value of a static readonly field. Usually, during JIT
 compilation, the static constructor is ran eagerly, so the value of
@@ -203,7 +262,6 @@ Note that signed/unsigned numbers do not matter here, just the storage size.
 This option can be specified multiple times and it doesn't prevent the static
 constructor for the type defining the field to execute with the usual rules
 at runtime (hence possibly computing a different value for the field).
-
 .TP
 .I save-temps,keep-temps
 Instructs the AOT compiler to keep temporary files.
@@ -232,6 +290,9 @@ mono_aot_register_module (mono_aot_module_hello_info);
 .I stats
 Print various stats collected during AOT compilation.
 .TP
+.I temp_path=[path]
+Explicitly specify path to store temporary files created during AOT compilation.
+.TP
 .I threads=[number]
 This is an experimental option for the AOT compiler to use multiple threads
 when compiling the methods.
@@ -241,8 +302,11 @@ Prepends <PREFIX> to the name of tools ran by the AOT compiler, i.e. 'as'/'ld'.
 example, --tool=prefix=arm-linux-gnueabi- will make the AOT compiler run
 'arm-linux-gnueabi-as' instead of 'as'.
 .TP
-.I write-symbols
-Instructs the AOT compiler to emit debug symbol information.
+.I verbose
+Prints additional information about type loading failures.
+.TP
+.I write-symbols,no-write-symbols
+Instructs the AOT compiler to emit (or not emit) debug symbol information.
 .PP
 For more information about AOT, see: http://www.mono-project.com/docs/advanced/aot/
 .RE
@@ -264,8 +328,8 @@ List of additional directories to search for AOT images.
 This instructs the Mono runtime to
 start a debugging agent inside the Mono runtime and connect it to a
 client user interface will control the Mono process.
-This option is typically used by IDEs, like the MonoDevelop IDE.
-.PP
+This option is typically used by IDEs, like the MonoDevelop or Visual Studio IDEs.
+.RS
 The configuration is specified using one of more of the following options:
 .RS
 .ne 8
@@ -292,10 +356,10 @@ actively waits for the debugger front end to connect to the Mono process.
 Mono will print out to stdout the IP address and port where it is listening.
 .TP
 .I setpgid=[y/n]
-If set to yes, Mono will call \fBsetpgid(0, 0)\fB on startup, if that function
+If set to yes, Mono will call \fBsetpgid(0, 0)\fR on startup, if that function
 is available on the system. This is useful for ensuring that signals delivered
 to a process that is executing the debuggee are not propagated to the debuggee,
-e.g. when Ctrl-C sends \fBSIGINT\fB to the \fBsdb\fB tool.
+e.g. when Ctrl-C sends \fBSIGINT\fR to the \fBsdb\fR tool.
 .TP
 .I suspend=[y/n]
 Defaults to yes, with the default option Mono will suspend the vm on startup 
@@ -318,10 +382,12 @@ the heap as much as possible at the expense of slowing down garbage
 collection a bit.
 .TP
 \fB--full-aot\fR
-This is an experimental flag that instructs the Mono runtime to not
+This flag instructs the Mono runtime to not
 generate any code at runtime and depend exclusively on the code
-generated from using mono --aot=full previously.   This is useful for
-platforms that do not permit dynamic code generation.
+generated from using mono --aot=full previously.  This is useful for
+platforms that do not permit dynamic code generation, or if you need
+to run assemblies that have been stripped of IL (for example using
+mono-cil-strip).
 .Sp
 Notice that this feature will abort execution at runtime if a codepath
 in your program, or Mono's class libraries attempts to generate code
@@ -351,6 +417,14 @@ will switch to '/bin/mono64' iff '/bin/mono' is a 32-bit build).
 \fB--help\fR, \fB-h\fR
 Displays usage instructions.
 .TP
+\fB--hybrid-aot\fR
+This flag allows the Mono runtime to run assemblies
+that have been stripped of IL, for example using mono-cil-strip. For this to
+work, the assembly must have been AOT compiled with --aot=hybrid.
+
+This flag is similar to --full-aot, but it does not disable the JIT. This means
+you can use dynamic features such as System.Reflection.Emit.
+.TP
 \fB--llvm\fR
 If the Mono runtime has been compiled with LLVM support (not available
 in all configurations), Mono will use the LLVM optimization and code
@@ -528,7 +602,7 @@ platforms, and only when using gdb 7.0 or later.
 Turns on profiling.  For more information about profiling applications
 and code coverage see the sections "PROFILING" and "CODE COVERAGE"
 below. 
-.TP
+.Sp
 This option can be used multiple times, each time will load an
 additional profiler.   This allows developers to use modules that
 extend the JIT through the Mono profiling interface.
@@ -1692,7 +1766,7 @@ Captures the interrupt signal (Control-C) and displays a stack trace
 when pressed.  Useful to find out where the program is executing at a
 given point.  This only displays the stack trace of a single thread. 
 .TP
-\fBinit-stacks\FR 
+\fBinit-stacks\fR
 Instructs the runtime to initialize the stack with
 some known values (0x2a on x86-64) at the start of a method to assist
 in debuggin the JIT engine.
@@ -1942,8 +2016,8 @@ http://www.mono-project.com/community/help/mailing-lists/
 http://www.mono-project.com
 .SH SEE ALSO
 .PP
-certmgr(1), csharp(1), mcs(1), mdb(1), monocov(1), monodis(1),
-mono-config(5), mozroots(1), mprof-report(1), pdb2mdb(1), xsp(1), mod_mono(8).
+certmgr(1), cert-sync(1), csharp(1), gacutil(1), mcs(1), mdb(1), monocov(1), monodis(1),
+mono-config(5), mprof-report(1), pdb2mdb(1), xsp(1), mod_mono(8).
 .PP
 For more information on AOT:
 http://www.mono-project.com/docs/advanced/aot/
index 14ad0cbd10c74283e2d25bc4cb1682d77c5dcb90..5af3d0449898ad5d21b2a0a6ac5d1da61cf4f7f4 100644 (file)
@@ -12,7 +12,8 @@ clean-local:
 
 common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
        test -n '$(MONO_VERSION)'
-       sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' $< > $@
+       test -n '$(MONO_CORLIB_VERSION)'
+       sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' -e 's,@''MONO_CORLIB_VERSION@,$(MONO_CORLIB_VERSION),' $< > $@
 
 PLATFORMS = darwin linux win32
 PROFILES = \
index 87b005e763a2c4b30abb0dd0f05862fe49c10380..8bb64bc43a700954c45074712655ac02159ec3fc 100644 (file)
@@ -38,6 +38,7 @@ static class Consts
        public const string MonoCompany = "Mono development team";
        public const string MonoProduct = "Mono Common Language Infrastructure";
        public const string MonoCopyright = "(c) Various Mono authors";
+       public const int MonoCorlibVersion = @MONO_CORLIB_VERSION@;
 
 #if MOBILE
        // Versions of .NET Framework for Silverlight 4.0
index 3ad567a86e05a398f11f26c8fba22cfb0fe3038b..b2870bf58c8bf3fc0215836e2d3358298fe64de8 100644 (file)
@@ -134,7 +134,7 @@ csproj-local: csproj-library csproj-test
 intermediate_clean=$(subst /,-,$(intermediate))
 csproj-library:
        config_file=`basename $(LIBRARY) .dll`-$(intermediate_clean)$(PROFILE).input; \
-       case "$(thisdir)" in *"Facades"*) config_file=Facades_$$config_file;; esac; \
+       case "$(thisdir)" in *"Facades"*) config_file=Facades_$$config_file;; *"legacy"*) config_file=legacy_$$config_file;; esac; \
        echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
        (echo $(is_boot); \
        echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS); \
@@ -266,7 +266,7 @@ endif
 # make dist will collect files in .sources files from all profiles
 dist-local: dist-default
        subs=' ' ; \
-       for f in `$(topdir)/tools/removecomments.sh $(filter-out $(wildcard *_test.dll.sources) $(wildcard *exclude.sources),$(wildcard *.sources))` $(TEST_FILES) ; do \
+       for f in `$(topdir)/tools/removecomments.sh $(filter-out $(wildcard *_test.dll.sources) $(wildcard *_xtest.dll.sources) $(wildcard *exclude.sources),$(wildcard *.sources))` $(TEST_FILES) ; do \
          case $$f in \
          ../*) : ;; \
          *.g.cs) : ;; \
index af397fe1c11e9d9cc569d54449a355adbc7c01e1..ef7e6ca58f25b52a88b8e07ce29265bd5b781be2 100644 (file)
@@ -1,12 +1,12 @@
 # -*- makefile -*-
 #
-# Platform-specific makefile rules. This one's for linux.
+# Platform-specific makefile rules. This one's for macOS.
 #
 
 PLATFORM_MCS_FLAGS =
 PLATFORM_RUNTIME = $(RUNTIME)
 PLATFORM_CORLIB = mscorlib.dll
-PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,
+PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,MacNotWorking,
 
 EXTERNAL_MCS = mcs
 EXTERNAL_MBAS = mbas
index a32065f040d6a6febdf5f443e210496b6b5c2f72..d53f405b1c999186812b12c1ef33c7fecba13e20 100644 (file)
@@ -31,7 +31,6 @@ PROFILE_MCS_FLAGS = \
        $(PLATFORM_DEBUG_FLAGS)
 
 FRAMEWORK_VERSION = 2.1
-NO_TEST = yes
 
 # the tuner takes care of the install
 NO_INSTALL = yes
index 67408bbf9ce4416bc9d380518a3925f0002b46d3..32715b8bbf5aae40a456e68f4d0eb2b23d68e2bb 100644 (file)
@@ -42,3 +42,5 @@ MOBILE_PROFILE = yes
 NO_CONSOLE = yes
 
 PROFILE_DISABLE_BTLS=1
+MONO_FEATURE_APPLETLS=1
+ONLY_APPLETLS=1
index 4bba2f421ac849b4f0869f32b72a1b4d57f51e3c..d78b268303e6ad2432576bb0fc66197bb2a337eb 100644 (file)
@@ -9,3 +9,6 @@ NO_THREAD_SUSPEND_RESUME=1
 NO_MULTIPLE_APPDOMAINS=1
 NO_PROCESS_START=1
 NO_MONO_SECURITY=1
+MONO_FEATURE_APPLETLS=
+ONLY_APPLETLS=
+MONO_FEATURE_APPLE_X509=1
index e826c7e7e31e1b734fbd5625532536f3184d787a..75dc474e1eda3691c61d826e17d6b53f46b3796d 100644 (file)
@@ -10,3 +10,6 @@ NO_THREAD_SUSPEND_RESUME=1
 # so we need a System.dll that can do that.
 #NO_PROCESS_START=1
 NO_MONO_SECURITY=1
+MONO_FEATURE_APPLETLS=
+ONLY_APPLETLS=
+MONO_FEATURE_APPLE_X509=1
index e4a274076ed3fcd45cc6b5871952a878c4c23621..b5350c6918f5a7793d4410ebc9893ee3e6aab15f 100644 (file)
@@ -15,3 +15,4 @@ PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -no
 
 FRAMEWORK_VERSION = 4.5
 XBUILD_VERSION = 4.0
+MONO_FEATURE_APPLETLS=1
index 97265214662c26d192f71636e4ba90cfee19005f..e6d9c296178e6f5533c9fea862417ef7cb96bf93 100644 (file)
@@ -38,3 +38,5 @@ MOBILE_PROFILE = yes
 NO_CONSOLE = yes
 
 PROFILE_DISABLE_BTLS=1
+MONO_FEATURE_APPLETLS=1
+ONLY_APPLETLS=1
index b9881fe64def8d8c9b90731784504d8780795474..73851e183ad7288fa3e87880b645ee38da4463a6 100644 (file)
@@ -18,5 +18,6 @@ NO_SYSTEM_DRAWING_DEPENDENCY=1
 NO_SYSTEM_SERVICEMODEL_ACTIVATION_DEPENDENCY=1
 NO_SYSTEM_DESIGN_DEPENDENCY=1
 NO_SYSTEM_DIRECTORY_SERVICES_DEPENDENCY=1
-
 PROFILE_DISABLE_BTLS=1
+MONO_FEATURE_APPLETLS=1
+ONLY_APPLETLS=1
index 12dcb28ac98a1d2f0105fb1c36f4808417bdb84a..2ee6460b949118bd9e031c19a02d50dc9f72efb5 100644 (file)
@@ -33,7 +33,7 @@ USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_M
 USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
 USE_CFLAGS = $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS)
 CSCOMPILE = $(Q_MCS) $(MCS) $(USE_MCS_FLAGS)
-CSC_RUNTIME_FLAGS = --aot-path=$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE) --gc-params=nursery-size=64m
+CSC_RUNTIME_FLAGS = --aot-path=$(abspath $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)) --gc-params=nursery-size=64m
 BASCOMPILE = $(MBAS) $(USE_MBAS_FLAGS)
 CCOMPILE = $(CC) $(USE_CFLAGS)
 BOOT_COMPILE = $(Q_MCS) $(BOOTSTRAP_MCS) $(USE_MCS_FLAGS)
index d9f6a95ff72b5d1653e3a0f809d994029c3ee5cf..45c77ebda49466d3a905a36e3f06f97e4e9d80cd 100644 (file)
@@ -20,8 +20,18 @@ TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
 ifndef NO_TEST
 
 test_nunit_lib = nunitlite.dll
+xunit_core := xunit.core xunit.abstractions xunit.assert
+xunit_deps := System.Runtime
+xunit_class_deps := Xunit.NetCore.Extensions
+
+xunit_libs_ref = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(xunit_core))
+xunit_libs_ref += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/Facades/%.dll,$(xunit_deps))
+
+xunit_libs_dep = $(xunit_class_deps:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%.dll)
+xunit_libs_ref += $(xunit_libs_dep:%=-r:%)
 
 TEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(TEST_LIB_REFS))
+XTEST_LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE)/%.dll,$(XTEST_LIB_REFS))
 
 test_nunit_dep = $(test_nunit_lib:%=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)%)
 test_nunit_ref = $(test_nunit_dep:%=-r:%)
@@ -34,6 +44,7 @@ test_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources)
 endif
 
 test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
+
 test_sourcefile_excludes = $(test_lib).exclude.sources
 
 test_pdb = $(test_lib:.dll=.pdb)
@@ -42,12 +53,26 @@ test_makefrag = $(depsdir)/$(test_lib).makefrag
 test_flags = -r:$(the_assembly) $(test_nunit_ref) $(TEST_MCS_FLAGS) $(TEST_LIB_MCS_FLAGS)
 tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.pdb) $(test_response) $(test_makefrag)
 
+xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
+
+ifeq ($(wildcard $(xtest_sourcefile)),)
+xtest_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
+endif
+
+xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
+
+xtest_response = $(depsdir)/$(xtest_lib).response
+xtest_makefrag = $(depsdir)/$(xtest_lib).makefrag
+xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LIB_MCS_FLAGS)
+
 ifndef HAVE_CS_TESTS
 HAVE_CS_TESTS := $(wildcard $(test_sourcefile))
 endif
 
 HAVE_SOURCE_EXCLUDES := $(wildcard $(test_sourcefile_excludes))
 
+HAVE_CS_XTESTS := $(wildcard $(xtest_sourcefile))
+
 endif # !NO_TEST
 
 ifndef NO_TEST
@@ -61,6 +86,10 @@ endif
        echo "stamp" >$@
 
 tests_CLEAN_FILES += $(topdir)/build/deps/nunit-$(PROFILE).stamp
+
+$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)Xunit.NetCore.Extensions.dll:
+       $(MAKE) -C $(topdir)/class/Xunit.NetCore.Extensions
+
 endif
 
 test_assemblies :=
@@ -157,6 +186,57 @@ $(test_makefrag): $(test_response)
 
 -include $(test_makefrag)
 
+build-test-lib: $(test_lib)
+       @echo Building testing lib
+
+endif
+
+
+ifdef HAVE_CS_XTESTS
+
+XTEST_HARNESS_PATH = $(topdir)/../external/xunit-binaries
+XTEST_HARNESS = $(XTEST_HARNESS_PATH)/xunit.console.exe
+XTEST_HARNESS_FLAGS := -noappdomain -noshadow -parallel none -nunit TestResult-$(PROFILE)-xunit.xml
+XTEST_TRAIT := -notrait category=failing -notrait category=nonnetcoreapptests -notrait Benchmark=true -notrait category=outerloop
+
+ifdef FIXTURE
+XTEST_HARNESS_FLAGS += -class $(FIXTURE)
 endif
 
+ifdef TESTNAME
+XTEST_HARNESS_FLAGS += -method $(TESTNAME)
+endif
+
+check: run-xunit-test-local
+run-xunit-test: run-xunit-test-local
+xunit-test-local: $(xunit_test_lib)
+run-xunit-test-local: run-xunit-test-lib
+
+# ln -s is a HACK for xunit runner to require xunit.execution.desktop.dll file in local folder on .net only
+run-xunit-test-lib: xunit-test-local
+       @ln -fs $(XTEST_HARNESS_PATH)/xunit.execution.desktop.dll xunit.execution.desktop.dll
+       ok=:; \
+       PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" $(TEST_RUNTIME) $(RUNTIME_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xunit_test_lib) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) || ok=false; \
+       $$ok
+       @rm -f xunit.execution.desktop.dll
+
+$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep)
+       $(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response)
+
+xtest_response_preprocessed = $(xtest_response)_preprocessed
+
+# This handles .excludes/.sources pairs, as well as resolving the
+# includes that occur in .sources files
+$(xtest_response): $(xtest_sourcefile)
+       $(SHELL) $(topdir)/build/gensources.sh $@ '$(xtest_sourcefile)' '$(xtest_sourcefile_excludes)'
+
+$(xtest_makefrag): $(xtest_response)
+       @echo Creating $@ ...
+       @sed 's,^,$(xunit_test_lib): ,' $< >$@
+
+-include $(xtest_makefrag)
+
+endif
+
+
 .PHONY: patch-nunitlite-appconfig
index 7890bf0fef55dc8fffe4dcd37506f9dc3c1857a8..4da3ed027ecfd901653351ee7744606e8181cc1f 100644 (file)
@@ -1,2 +1,3 @@
 /lib
 /compat/
+monolite-*.tar.gz
index fa9e99d722dfc86189a2cfa2bda0c2a669044e98..3f981f77aba50c4f2f1a4a430cff729bf516cc23 100644 (file)
@@ -111,6 +111,7 @@ monodroid_dirs := \
        $(mobile_common_dirs)   \
        Mono.CompilerServices.SymbolWriter      \
        Mono.Btls.Interface     \
+       Mono.Posix      \
        $(pcl_facade_dirs)
 
 monotouch_dirs := \
@@ -425,6 +426,11 @@ $(build_files:%=lib/build/%):
 
 dist-monolite: $(monolite_files) lib/$(monolite_dir)/mcs.exe
 
+package-monolite-latest:
+       MONOLITE=monolite-$(MONO_CORLIB_VERSION)-latest; \
+       $(MAKE) dist-monolite monolite_dir=$$MONOLITE; \
+       tar zcvpf $$MONOLITE.tar.gz --directory=lib $$MONOLITE/
+
 dist-default: dist-monolite
 
 dist-local: dist-default
index 9800c6883f57527042e4bc6cbf9ca3be2dd3e921..d75ac2543e4a1ed16b52bc1964987bdf8608a1cb 100644 (file)
@@ -168,19 +168,19 @@ namespace Microsoft.Build.BuildEngine {
                                        yield return kvp.Value;
                }
 
-               public void RemoveProperty (BuildProperty propertyToRemove)
+               public void RemoveProperty (BuildProperty property)
                {
-                       if (propertyToRemove == null)
-                               throw new ArgumentNullException ("propertyToRemove");
+                       if (property == null)
+                               throw new ArgumentNullException ("property");
 
                        if (FromXml) {
-                               if (!propertyToRemove.FromXml)
+                               if (!property.FromXml)
                                        throw new InvalidOperationException ("The specified property does not belong to the current property group.");
 
-                               propertyToRemove.XmlElement.ParentNode.RemoveChild (propertyToRemove.XmlElement);
-                               properties.Remove (propertyToRemove);
+                               property.XmlElement.ParentNode.RemoveChild (property.XmlElement);
+                               properties.Remove (property);
                        } else
-                               propertiesByName.Remove (propertyToRemove.Name);
+                               propertiesByName.Remove (property.Name);
                }
 
                public void RemoveProperty (string propertyName)
index ff6acda08f3a4e3465a0ec2ff5237c56694f2a65..2e3e06f47a8330b18e59e8fa890082a23751e1a0 100644 (file)
@@ -296,14 +296,14 @@ namespace Microsoft.Build.BuildEngine
                        return build_records.GetOrAdd (key, _ => new BuildRecord (this));
                }
 
-               public void BuildStartedHandler (object sender, BuildStartedEventArgs args)
+               public void BuildStartedHandler (object sender, BuildStartedEventArgs e)
                {
-                       GetBuildRecord (sender).BuildStartedHandler (sender, args);
+                       GetBuildRecord (sender).BuildStartedHandler (sender, e);
                }
                
-               public void BuildFinishedHandler (object sender, BuildFinishedEventArgs args)
+               public void BuildFinishedHandler (object sender, BuildFinishedEventArgs e)
                {
-                       GetBuildRecord (sender).BuildFinishedHandler (args);
+                       GetBuildRecord (sender).BuildFinishedHandler (e);
                        ((IDictionary) build_records).Remove (sender);
                }
                
@@ -315,47 +315,47 @@ namespace Microsoft.Build.BuildEngine
                {
                        GetBuildRecord (sender).PopEvent (args);
                }
-               public void ProjectStartedHandler (object sender, ProjectStartedEventArgs args)
+               public void ProjectStartedHandler (object sender, ProjectStartedEventArgs e)
                {
-                       GetBuildRecord (sender).ProjectStartedHandler (args);
+                       GetBuildRecord (sender).ProjectStartedHandler (e);
                }
-               public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs args)
+               public void ProjectFinishedHandler (object sender, ProjectFinishedEventArgs e)
                {
-                       GetBuildRecord (sender).ProjectFinishedHandler (args);
+                       GetBuildRecord (sender).ProjectFinishedHandler (e);
                }               
-               public void TargetStartedHandler (object sender, TargetStartedEventArgs args)
+               public void TargetStartedHandler (object sender, TargetStartedEventArgs e)
                {
-                       GetBuildRecord (sender).TargetStartedHandler (args);
+                       GetBuildRecord (sender).TargetStartedHandler (e);
                }
-               public void TargetFinishedHandler (object sender, TargetFinishedEventArgs args)
+               public void TargetFinishedHandler (object sender, TargetFinishedEventArgs e)
                {
-                       GetBuildRecord (sender).TargetFinishedHandler (args);
+                       GetBuildRecord (sender).TargetFinishedHandler (e);
                }
-               public void TaskStartedHandler (object sender, TaskStartedEventArgs args)
+               public void TaskStartedHandler (object sender, TaskStartedEventArgs e)
                {
-                       GetBuildRecord (sender).TaskStartedHandler (args);
+                       GetBuildRecord (sender).TaskStartedHandler (e);
                }
-               public void TaskFinishedHandler (object sender, TaskFinishedEventArgs args)
+               public void TaskFinishedHandler (object sender, TaskFinishedEventArgs e)
                {
-                       GetBuildRecord (sender).TaskFinishedHandler (args);
+                       GetBuildRecord (sender).TaskFinishedHandler (e);
                }
-               public void MessageHandler (object sender, BuildMessageEventArgs args)
+               public void MessageHandler (object sender, BuildMessageEventArgs e)
                {
-                       GetBuildRecord (sender).MessageHandler (args);
+                       GetBuildRecord (sender).MessageHandler (e);
                }
-               public void WarningHandler (object sender, BuildWarningEventArgs args)
+               public void WarningHandler (object sender, BuildWarningEventArgs e)
                {
-                       GetBuildRecord (sender).WarningHandler (args);
+                       GetBuildRecord (sender).WarningHandler (e);
                }
-               public void ErrorHandler (object sender, BuildErrorEventArgs args)
+               public void ErrorHandler (object sender, BuildErrorEventArgs e)
                {
-                       GetBuildRecord (sender).ErrorHandler (args);
+                       GetBuildRecord (sender).ErrorHandler (e);
                }
                
                [MonoTODO]
-               public void CustomEventHandler (object sender, CustomBuildEventArgs args)
+               public void CustomEventHandler (object sender, CustomBuildEventArgs e)
                {
-                       build_records [sender].CustomHandler (args);
+                       build_records [sender].CustomHandler (e);
                }
 
                void SetColor (ConsoleColor color)
index b4ed8562382595c92f99c2b474a5c9ecc4043757..b1e95b14c69ef46d2271defdd679deedf2e3a3f0 100644 (file)
@@ -131,17 +131,17 @@ namespace Microsoft.Build.BuildEngine {
                }
 
                [MonoTODO ("Not tested")]
-               public void AddNewImport (string importLocation,
-                                         string importCondition)
+               public void AddNewImport (string projectFile,
+                                         string condition)
                {
-                       if (importLocation == null)
-                               throw new ArgumentNullException ("importLocation");
+                       if (projectFile == null)
+                               throw new ArgumentNullException ("projectFile");
 
                        XmlElement importElement = xmlDocument.CreateElement ("Import", XmlNamespace);
                        xmlDocument.DocumentElement.AppendChild (importElement);
-                       importElement.SetAttribute ("Project", importLocation);
-                       if (!String.IsNullOrEmpty (importCondition))
-                               importElement.SetAttribute ("Condition", importCondition);
+                       importElement.SetAttribute ("Project", projectFile);
+                       if (!String.IsNullOrEmpty (condition))
+                               importElement.SetAttribute ("Condition", condition);
 
                        AddImport (importElement, null, false);
                        MarkProjectAsDirty ();
@@ -506,9 +506,9 @@ namespace Microsoft.Build.BuildEngine {
                        Load (projectFileName, ProjectLoadSettings.None);
                }
 
-               public void Load (string projectFileName, ProjectLoadSettings settings)
+               public void Load (string projectFileName, ProjectLoadSettings projectLoadSettings)
                {
-                       project_load_settings = settings;
+                       project_load_settings = projectLoadSettings;
                        if (String.IsNullOrEmpty (projectFileName))
                                throw new ArgumentNullException ("projectFileName");
 
@@ -644,7 +644,7 @@ namespace Microsoft.Build.BuildEngine {
                
                [MonoTODO]
                // NOTE: does not modify imported projects
-               public void RemoveItemGroupsWithMatchingCondition (string matchingCondition)
+               public void RemoveItemGroupsWithMatchingCondition (string matchCondition)
                {
                        throw new NotImplementedException ();
                }
@@ -697,9 +697,9 @@ namespace Microsoft.Build.BuildEngine {
                        isDirty = false;
                }
 
-               public void Save (TextWriter outTextWriter)
+               public void Save (TextWriter textWriter)
                {
-                       xmlDocument.Save (outTextWriter);
+                       xmlDocument.Save (textWriter);
                        isDirty = false;
                }
 
@@ -733,12 +733,12 @@ namespace Microsoft.Build.BuildEngine {
                        throw new NotImplementedException ();
                }
 
-               public void SetProjectExtensions (string id, string xmlText)
+               public void SetProjectExtensions (string id, string content)
                {
                        if (id == null)
                                throw new ArgumentNullException ("id");
-                       if (xmlText == null)
-                               throw new ArgumentNullException ("xmlText");
+                       if (content == null)
+                               throw new ArgumentNullException ("content");
 
                        XmlNode projectExtensions, node;
 
@@ -749,7 +749,7 @@ namespace Microsoft.Build.BuildEngine {
                                xmlDocument.DocumentElement.AppendChild (projectExtensions);
 
                                node = xmlDocument.CreateElement (id, XmlNamespace);
-                               node.InnerXml = xmlText;
+                               node.InnerXml = content;
                                projectExtensions.AppendChild (node);
                        } else {
                                node = xmlDocument.SelectSingleNode (String.Format ("/tns:Project/tns:ProjectExtensions/tns:{0}", id), XmlNamespaceManager);
@@ -759,7 +759,7 @@ namespace Microsoft.Build.BuildEngine {
                                        projectExtensions.AppendChild (node);
                                }
                                
-                               node.InnerXml = xmlText;
+                               node.InnerXml = content;
                                
                        }
 
index dd1b9cc88c22293fb00c16bc9f1f48c6b13aa5d4..e4f384bceacf19d8a63d48efc268bf5f6078a832 100644 (file)
@@ -111,11 +111,11 @@ namespace Microsoft.Build.BuildEngine {
                }
 
                // FIXME: shouldn't we remove it from XML?
-               public void RemoveTask (BuildTask buildTask)
+               public void RemoveTask (BuildTask taskElement)
                {
-                       if (buildTask == null)
-                               throw new ArgumentNullException ("buildTask");
-                       buildTasks.Remove (buildTask);
+                       if (taskElement == null)
+                               throw new ArgumentNullException ("taskElement");
+                       buildTasks.Remove (taskElement);
                }
 
                bool Build ()
index 271029897218c81eb9d1a562cac5a734fa1c0c77..794d33e0fc7a8b2424455d3bc9e0ca8c2904eacd 100644 (file)
@@ -45,9 +45,9 @@ namespace Microsoft.Build.Construction
                        get { return Line == 0 ? File : String.Format ("{0} ({1}{2})", File, Line, Column != 0 ? "," + Column : String.Empty); }
                }
 
-               public override bool Equals (object other)
+               public override bool Equals (object obj)
                {
-                       var o = other as ElementLocation;
+                       var o = obj as ElementLocation;
                        return (object) o != null && o.File == File && o.Line == Line && o.Column == Column;
                }
 
index 4189bf8b2f108f19b8086e5a8fa52423e329419a..e4263aa9de1c6ba6bc994e8facf7998cf05d02b1 100644 (file)
@@ -79,27 +79,27 @@ namespace Microsoft.Build.Evaluation
        + "{data.Items.Count} #Targets={data.Targets.Count}")]
        public class Project
        {
-               public Project (XmlReader xml)
-                       : this (ProjectRootElement.Create (xml))
+               public Project (XmlReader xmlReader)
+                       : this (ProjectRootElement.Create (xmlReader))
                {
                }
 
-               public Project (XmlReader xml, IDictionary<string, string> globalProperties,
+               public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
                                              string toolsVersion)
-                       : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion)
+                       : this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion)
                {
                }
 
-               public Project (XmlReader xml, IDictionary<string, string> globalProperties,
+               public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
                                              string toolsVersion, ProjectCollection projectCollection)
-                       : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection)
+                       : this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion, projectCollection)
                {
                }
 
-               public Project (XmlReader xml, IDictionary<string, string> globalProperties,
+               public Project (XmlReader xmlReader, IDictionary<string, string> globalProperties,
                                              string toolsVersion, ProjectCollection projectCollection,
                                              ProjectLoadSettings loadSettings)
-                       : this (ProjectRootElement.Create (xml), globalProperties, toolsVersion, projectCollection, loadSettings)
+                       : this (ProjectRootElement.Create (xmlReader), globalProperties, toolsVersion, projectCollection, loadSettings)
                {
                }
 
index 01a66207142e41dec4ebf2fd0b1fa8710341147b..21df964a75ad4c13a065c2ea747d182d50889a0e 100644 (file)
@@ -49,15 +49,15 @@ namespace Microsoft.Build.Evaluation
 {
        public class ProjectCollection : IDisposable
        {
-               public delegate void ProjectAddedEventHandler (object target, ProjectAddedToProjectCollectionEventArgs args);
+               public delegate void ProjectAddedEventHandler (object sender, ProjectAddedToProjectCollectionEventArgs e);
                
                public class ProjectAddedToProjectCollectionEventArgs : EventArgs
                {
-                       public ProjectAddedToProjectCollectionEventArgs (ProjectRootElement project)
+                       public ProjectAddedToProjectCollectionEventArgs (ProjectRootElement element)
                        {
-                               if (project == null)
+                               if (element == null)
                                        throw new ArgumentNullException ("project");
-                               ProjectRootElement = project;
+                               ProjectRootElement = element;
                        }
                        
                        public ProjectRootElement ProjectRootElement { get; private set; }
@@ -98,8 +98,8 @@ namespace Microsoft.Build.Evaluation
                {
                }
 
-               public ProjectCollection (ToolsetDefinitionLocations toolsetDefinitionLocations)
-               : this (null, null, toolsetDefinitionLocations)
+               public ProjectCollection (ToolsetDefinitionLocations toolsetLocations)
+               : this (null, null, toolsetLocations)
                {
                }
 
index 01ff5285e50722c7f4b347382d0fa13f6ddbd184..d2ed9a93716c1a2c46f3f7f5c49e34f85df0d22f 100644 (file)
       <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
       <Name>System-net_4_x</Name>\r
     </ProjectReference>\r
-    <Reference Include="./../../class/lib/net_4_x/Mono.Cecil.dll">\r
-      <SpecificVersion>False</SpecificVersion>\r
-      <HintPath>./../../class/lib/net_4_x/Mono.Cecil.dll</HintPath>\r
-      <Private>False</Private>\r
-    </Reference>\r
+    <ProjectReference Include="../Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
+      <Name>Mono.Cecil-net_4_x</Name>\r
+    </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Folder Include="Properties\" />\r
index d8807afa49ea9fbcbc3756b665ee3ac847deefa1..16bba0c898cfc4684cdb3020f29c23e19e70ef77 100644 (file)
@@ -5,7 +5,7 @@ LIBRARY = Mono.Cecil.dll
 LIBRARY_SNK = ../mono.snk
 LIBRARY_PACKAGE = none
 
-LIB_REFS = System.Core
+LIB_REFS = System.Core System
 LIB_MCS_FLAGS = -keyfile:$(LIBRARY_SNK) -d:NET_4_0 /publicsign
 
 NO_TEST = yes
index f1cbfb1d8fe0ac5002cadaf05368ae0cb073866a..5589b9bcbb1c5159903b9d1765d2fa9d3ffb6abb 100644 (file)
@@ -1,4 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
 <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <PropertyGroup>\r
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
@@ -33,7 +34,7 @@
     <DebugType>full</DebugType>\r
     <NoWarn>1699</NoWarn>\r
     <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;NET_3_5</DefineConstants>\r
+    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;NET_4_0</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
@@ -41,7 +42,7 @@
     <DebugType>pdbonly</DebugType>\r
     <NoWarn>1699</NoWarn>\r
     <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;DISABLE_CAS_USE;NET_3_5</DefineConstants>\r
+    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;NET_4_0</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
   </PropertyGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <ItemGroup>\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\Code.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\CodeReader.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\CodeWriter.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\Document.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\ExceptionHandler.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\ILProcessor.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\Instruction.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\MethodBody.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\OpCode.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\OpCodes.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\SequencePoint.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\Symbols.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\VariableDefinition.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\VariableReference.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\BlobHeap.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\Buffers.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\CodedIndex.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\ElementType.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\GuidHeap.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\Heap.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\MetadataToken.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\Row.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\StringHeap.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\TableHeap.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\TokenType.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\UserStringHeap.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\Utilities.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\BinaryStreamReader.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\BinaryStreamWriter.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\ByteBuffer.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\ByteBufferEqualityComparer.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\DataDirectory.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\Image.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\ImageReader.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\ImageWriter.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\Section.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\TextMap.cs" />\r
+    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Cil\*.cs" />\r
+    <Compile Include="..\..\..\external\cecil\Mono.Cecil.Metadata\*.cs" />\r
+    <Compile Include="..\..\..\external\cecil\Mono.Cecil.PE\*.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\ArrayType.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\AssemblyDefinition.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\AssemblyFlags.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\SecurityDeclaration.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\SentinelType.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\TargetRuntime.cs" />\r
+    <Compile Include="..\..\..\external\cecil\Mono.Cecil\Treatments.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\TypeAttributes.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\TypeDefinition.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\TypeDefinitionCollection.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\TypeSpecification.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\TypeSystem.cs" />\r
     <Compile Include="..\..\..\external\cecil\Mono.Cecil\VariantType.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Collections.Generic\Collection.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Collections.Generic\ReadOnlyCollection.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Security.Cryptography\CryptoConvert.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono.Security.Cryptography\CryptoService.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono\Actions.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono\Empty.cs" />\r
-    <Compile Include="..\..\..\external\cecil\Mono\Funcs.cs" />\r
-    <Compile Include="..\..\..\external\cecil\System.Runtime.CompilerServices\ExtensionAttribute.cs" />\r  </ItemGroup>\r
+    <Compile Include="..\..\..\external\cecil\Mono.Cecil\WindowsRuntimeProjections.cs" />\r
+    <Compile Include="..\..\..\external\cecil\Mono.Collections.Generic\*.cs" />\r
+    <Compile Include="..\..\..\external\cecil\Mono.Security.Cryptography\*.cs" />\r
+    <Compile Include="..\..\..\external\cecil\Mono\*.cs" />\r
+    <Compile Include="..\..\..\external\cecil\ProjectInfo.cs" />\r
+    <Compile Include="Consts.cs" />\r  </ItemGroup>\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
        Other similar extension points exist, see Microsoft.Common.targets.\r
   <Target Name="BeforeBuild">\r
       <Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>\r
       <Name>System.Core-net_4_x</Name>\r
     </ProjectReference>\r
+    <ProjectReference Include="../System/System-net_4_x.csproj">\r
+      <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
+      <Name>System-net_4_x</Name>\r
+    </ProjectReference>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <Folder Include="Properties\" />\r
index 9cc36d56a35298de246498624b20fcb806adddac..c79662e74a364def5e3711bee093c15faf66f6bb 100644 (file)
@@ -6,7 +6,6 @@ Consts.cs
 ../../../external/cecil/Mono.Cecil.PE/*.cs
 ../../../external/cecil/Mono.Collections.Generic/*.cs
 ../../../external/cecil/Mono.Security.Cryptography/*.cs
-../../../external/cecil/System.Security.Cryptography/*.cs
 
 ../../../external/cecil/Mono.Cecil/ArrayType.cs
 ../../../external/cecil/Mono.Cecil/AssemblyDefinition.cs
index 3fe4e15cd8fa236a9256b69faf3239b01c175992..b6d1fa590309c6ee108ca8be647cd62817ee97e7 100644 (file)
       <Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>\r
       <Name>System.Core-net_4_x</Name>\r
     </ProjectReference>\r
-    <Reference Include="./../../class/lib/net_4_x/Mono.Cecil.dll">\r
-      <SpecificVersion>False</SpecificVersion>\r
-      <HintPath>./../../class/lib/net_4_x/Mono.Cecil.dll</HintPath>\r
-      <Private>False</Private>\r
-    </Reference>\r
+    <ProjectReference Include="../Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
+      <Name>Mono.Cecil-net_4_x</Name>\r
+    </ProjectReference>\r
     <ProjectReference Include="../Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_x.csproj">\r
       <Project>{CF14D34A-F69B-47FB-A99C-D25C77198F30}</Project>\r
       <Name>Mono.Cecil.Mdb-net_4_x</Name>\r
index 3892035220ce24f61a90e9f1c0c7a632f7936e73..8e19ec9af9649c6f84577ae83c41fbacb08fb64a 100644 (file)
@@ -105,7 +105,7 @@ namespace Mono.Data.Tds.Protocol {
                        }
 
                        try {
-                               socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
+                               socket = new Socket (endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
                                IAsyncResult ares = socket.BeginConnect (endPoint, null, null);
                                int timeout_ms = timeout * 1000;
                                if (timeout > 0 && !ares.IsCompleted && !ares.AsyncWaitHandle.WaitOne (timeout_ms, false))
index 6ef706be8fea33156c07f35f86a37fd17d03b5c9..d54235f6fbaed4676dacf175166dd64147e5652a 100644 (file)
       <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
       <Name>System-net_4_x</Name>\r
     </ProjectReference>\r
-    <Reference Include="./../../class/lib/net_4_x/Mono.Cecil.dll">\r
-      <SpecificVersion>False</SpecificVersion>\r
-      <HintPath>./../../class/lib/net_4_x/Mono.Cecil.dll</HintPath>\r
-      <Private>False</Private>\r
-    </Reference>\r
+    <ProjectReference Include="../Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
+      <Name>Mono.Cecil-net_4_x</Name>\r
+    </ProjectReference>\r
     <ProjectReference Include="../System.Core/System.Core-net_4_x.csproj">\r
       <Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>\r
       <Name>System.Core-net_4_x</Name>\r
index 6c53a6f464e783eed234371f2996bd70adeea30d..6d4f37017466a0e8d05d7d8d4e914b54bdc8cf8d 100644 (file)
@@ -200,6 +200,20 @@ namespace Mono.Debugger.Soft
                                        res.Add (attr);
                        return res.ToArray ();
                }
+
+               public string FullName {
+                       get {
+                               string type_namespace = DeclaringType.Namespace;
+                               string type_name = DeclaringType.Name;
+                               StringBuilder sb = new StringBuilder ();
+                               if (type_namespace != String.Empty)
+                                       sb.Append (type_namespace).Append (".");
+                               sb.Append (type_name);
+                               sb.Append (":");
+                               sb.Append (Name);
+                               return sb.ToString ();
+                       }
+               }
        }
 }
 
diff --git a/mcs/class/Mono.Posix/Mono.Unix.Android/AndroidUtils.cs b/mcs/class/Mono.Posix/Mono.Unix.Android/AndroidUtils.cs
new file mode 100644 (file)
index 0000000..3b40a82
--- /dev/null
@@ -0,0 +1,47 @@
+using System;
+using System.Reflection;
+
+// using Android.Runtime;
+// using Android.Util;
+
+namespace Mono.Unix.Android
+{
+       internal sealed class AndroidUtils
+       {
+               const string TAG = "Mono.Posix";
+
+               delegate void DetectCPUAndArchitecture (out ushort builtForCPU, out ushort runningOnCPU, out bool is64bit);
+
+               readonly static DetectCPUAndArchitecture detectCPUAndArchitecture;
+
+               static AndroidUtils ()
+               {
+                       Type androidRuntime = Type.GetType ("Android.Runtime.AndroidEnvironment, Mono.Android", true);
+
+                       MethodInfo mi = androidRuntime.GetMethod ("DetectCPUAndArchitecture", BindingFlags.NonPublic | BindingFlags.Static);
+                       detectCPUAndArchitecture = (DetectCPUAndArchitecture) Delegate.CreateDelegate (typeof(DetectCPUAndArchitecture), mi);
+               }
+
+               public static bool AreRealTimeSignalsSafe ()
+               {
+                       ushort built_for_cpu;
+                       ushort running_on_cpu;
+                       bool is64bit;
+
+                       detectCPUAndArchitecture (out built_for_cpu, out running_on_cpu, out is64bit);
+
+                       // CPUArchitecture builtForCPU = Enum.IsDefined (typeof (CPUArchitecture), built_for_cpu) ? (CPUArchitecture)built_for_cpu : CPUArchitecture.Unknown;
+                       // CPUArchitecture runningOnCPU = Enum.IsDefined (typeof (CPUArchitecture), running_on_cpu) ? (CPUArchitecture)running_on_cpu : CPUArchitecture.Unknown;
+
+                       // Log.Info (TAG, " Built for CPU: {0}", builtForCPU);
+                       // Log.Info (TAG, "Running on CPU: {0}", runningOnCPU);
+                       // Log.Info (TAG, "64-bit process: {0}", is64bit ? "yes" : "no");
+
+                       // For now real-time signals aren't safe at all, alas
+                       bool safe = false;
+                       // Log.Info (TAG, "Real-time signals are {0}safe on this platform", safe ? String.Empty : "not ");
+                       
+                       return safe;
+               }
+       }
+}
\ No newline at end of file
index 57c03140112b75746de381257b13e4b763886f5c..810e13a7ca8fe68b471e058d9df45bc4c0e1e43f 100644 (file)
@@ -8,6 +8,9 @@ using System;
 using System.IO;
 using System.Runtime.InteropServices;
 using Mono.Unix.Native;
+#if MONODROID
+using Mono.Unix.Android;
+#endif
 
 namespace Mono.Unix.Native {
 
@@ -17,7 +20,17 @@ namespace Mono.Unix.Native {
                //
                // Non-generated exports
                //
-#if !MONODROID
+#if MONODROID
+               [DllImport (LIB, EntryPoint="Mono_Posix_FromRealTimeSignum")]
+               static extern int HelperFromRealTimeSignum (Int32 offset, out Int32 rval);
+
+               static int FromRealTimeSignum (Int32 offset, out Int32 rval)
+               {
+                       if (!AndroidUtils.AreRealTimeSignalsSafe ())
+                               throw new PlatformNotSupportedException ("Real-time signals are not supported on this Android architecture");
+                       return HelperFromRealTimeSignum (offset, out rval);
+               }
+#else
                [DllImport (LIB, EntryPoint="Mono_Posix_FromRealTimeSignum")]
                private static extern int FromRealTimeSignum (Int32 offset, out Int32 rval);
 #endif
diff --git a/mcs/class/Mono.Posix/monodroid_Mono.Posix.dll.sources b/mcs/class/Mono.Posix/monodroid_Mono.Posix.dll.sources
new file mode 100644 (file)
index 0000000..0d242e6
--- /dev/null
@@ -0,0 +1,2 @@
+#include Mono.Posix.dll.sources
+./Mono.Unix.Android/AndroidUtils.cs
diff --git a/mcs/class/Mono.Security/Mono.Security.Interface/MonoTlsProviderFactory.Apple.cs b/mcs/class/Mono.Security/Mono.Security.Interface/MonoTlsProviderFactory.Apple.cs
deleted file mode 100644 (file)
index d77e723..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Mono.Security.Interface
-{
-       delegate MonoTlsProvider MonoTlsProviderFactoryDelegate ();
-
-       static partial class MonoTlsProviderFactory
-       {
-               internal static MonoTlsProviderFactoryDelegate _PrivateFactoryDelegate;
-       }
-}
index 463682e1d99d9a811bf3e09f789b5be6cba4f328..5c615f7b543ffdf6ebb51f2df596ce1081685461 100644 (file)
@@ -1,4 +1,3 @@
 #include Mono.Security.dll.sources
 ../corlib/CommonCrypto/CommonCrypto.cs
 ../corlib/CommonCrypto/RC4CommonCrypto.cs
-Mono.Security.Interface/MonoTlsProviderFactory.Apple.cs
index e626959aa1fb2b8e5abb583d369ac48d0b466892..f6eb089e95a22dae35bee5511f3b9c3ba0639337 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 16)]
        public struct Vector16b
        {
index e0dc37effe2946bae177b0facd6cc1d7df2e53ad..58395987ca1584d3120fc63879ae336a3da5d92e 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 16)]
        [CLSCompliant(false)]
        public struct Vector16sb
index 9c57b793928aef0a7a454e5b5d0339a9709c2841..59f0bb753826f323edac085c3d43e556788f250c 100644 (file)
@@ -30,7 +30,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
-
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        public struct Vector2d
        {
index 0e5a1d80e2f634333c7f57a35b73f4eaed3a51e9..a08d06d14e357628c7023d96d62f28c277d7e865 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        public struct Vector2l
        {
index de273f596b62fae978e96716f2e992f5638de56c..25de9047d560c0f4553e059f12130f2713b1e590 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        [CLSCompliant(false)]
        public struct Vector2ul
index db7143b9b4952b293cdef1282405e012f7df392a..e018f92e6898e6959af5693ceb51dadfa5e585c0 100644 (file)
@@ -84,6 +84,7 @@ namespace Mono.Simd
                Replace Shuffle with less bug prone methods
 */
 
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        public struct Vector4f
        {
index aa5ee39d697716244c4439b01230101895748295..1df6171b41ef9ffa0dc9c91a64b0dcb1e297d20b 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        public struct Vector4i
        {
index c62365c61a3337906905f93b8f3ee23b9c04d23d..b961987a5eafd1295750e950b4b5ca0a78cadd00 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        [CLSCompliant(false)]
        public struct Vector4ui
index be178470a85e19f302f9cbffe4419624c7bc2e2e..1008c20920b7b478d1f316f0dc69ea86923c1a98 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        public struct Vector8s
        {
index 2c9afd33c0b3076ff0180196ed3f32a12558f5a5..0aa16ee49a89960db5497cb37705b346163f3f4b 100644 (file)
@@ -29,6 +29,7 @@ using System.Runtime.InteropServices;
 
 namespace Mono.Simd
 {
+       [Obsolete ("Use the types in the System.Numerics.Vectors namespace")]
        [StructLayout(LayoutKind.Explicit, Pack = 0, Size = 16)]
        [CLSCompliant(false)]
        public struct Vector8us
index 51d2835d5d5868f158bc83b808cfaa760a3556fd..e2c1501046cc9537b6fba8b0f0e615ea35be250e 100644 (file)
@@ -49,7 +49,7 @@
   </PropertyGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <ItemGroup>\r
-    <Compile Include="..\..\build\common\Consts.cs.in" />\r
+    <Compile Include="..\..\build\common\Consts.cs" />\r
     <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Boolean.cs" />\r
     <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Choice.cs" />\r
     <Compile Include="Novell.Directory.Ldap.Asn1\Asn1Decoder.cs" />\r
index d5010fd1970591d149e8ac43a38e5c4990a7651b..7c62434346c2e711f6622fdf8c10045339e968d9 100755 (executable)
@@ -1,5 +1,5 @@
 Novell.Directory.Ldap/AssemblyInfo.cs
-../../build/common/Consts.cs.in
+../../build/common/Consts.cs
 Novell.Directory.Ldap/SupportClass.cs
 Novell.Directory.Ldap.Utilclass/Base64.cs
 Novell.Directory.Ldap.Utilclass/DN.cs
index c642a6ce5b672d77fb00c7ea627e4a95ed92f912..db86289ba1ac218b2a63b6829701f3990422c66a 100644 (file)
@@ -56,9 +56,9 @@ namespace System.Configuration.Internal
                        return host.CreateDeprecatedConfigContext (configPath);
                }
                
-               public virtual string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection)
+               public virtual string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)
                {
-                       return host.DecryptSection (encryptedXml, protectionProvider, protectedSection);
+                       return host.DecryptSection (encryptedXml, protectionProvider, protectedConfigSection);
                }
                
                public virtual void DeleteStream (string streamName)
@@ -66,14 +66,14 @@ namespace System.Configuration.Internal
                        host.DeleteStream (streamName);
                }
                
-               public virtual string EncryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection)
+               public virtual string EncryptSection (string clearTextXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection)
                {
-                       return host.EncryptSection (encryptedXml, protectionProvider, protectedSection);
+                       return host.EncryptSection (clearTextXml, protectionProvider, protectedConfigSection);
                }
                
-               public virtual string GetConfigPathFromLocationSubPath (string configPath, string locatinSubPath)
+               public virtual string GetConfigPathFromLocationSubPath (string configPath, string locationSubPath)
                {
-                       return host.GetConfigPathFromLocationSubPath (configPath, locatinSubPath);
+                       return host.GetConfigPathFromLocationSubPath (configPath, locationSubPath);
                }
                
                public virtual Type GetConfigType (string typeName, bool throwOnError)
@@ -111,14 +111,14 @@ namespace System.Configuration.Internal
                        return host.Impersonate ();
                }
                
-               public virtual void Init (IInternalConfigRoot root, params object[] hostInitParams)
+               public virtual void Init (IInternalConfigRoot configRoot, params object[] hostInitParams)
                {
-                       host.Init (root, hostInitParams);
+                       host.Init (configRoot, hostInitParams);
                }
                
-               public virtual void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot root, params object[] hostInitConfigurationParams)
+               public virtual void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams)
                {
-                       host.InitForConfiguration (ref locationSubPath, out configPath, out locationConfigPath, root, hostInitConfigurationParams);
+                       host.InitForConfiguration (ref locationSubPath, out configPath, out locationConfigPath, configRoot, hostInitConfigurationParams);
                }
                
                public virtual bool IsAboveApplication (string configPath)
index 2cde5e60c788f9f212202d2ed7cdf581d758536b..0445508661f3cab32fdba62270e71f7f87f5521a 100644 (file)
@@ -38,10 +38,10 @@ namespace System.Configuration.Internal
        {
                object CreateConfigurationContext (string configPath, string locationSubPath);
                object CreateDeprecatedConfigContext (string configPath);
-               string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection);
+               string DecryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection);
                void DeleteStream (string streamName);
-               string EncryptSection (string encryptedXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedSection);
-               string GetConfigPathFromLocationSubPath (string configPath, string locatinSubPath);
+               string EncryptSection (string clearTextXml, ProtectedConfigurationProvider protectionProvider, ProtectedConfigurationSection protectedConfigSection);
+               string GetConfigPathFromLocationSubPath (string configPath, string locationSubPath);
                Type GetConfigType (string typeName, bool throwOnError);
                string GetConfigTypeName (Type t);
                void GetRestrictedPermissions (IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady);
@@ -49,8 +49,8 @@ namespace System.Configuration.Internal
                string GetStreamNameForConfigSource (string streamName, string configSource);
                object GetStreamVersion (string streamName);
                IDisposable Impersonate ();
-               void Init (IInternalConfigRoot root, params object[] hostInitParams);
-               void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot root, params object[] hostInitConfigurationParams);
+               void Init (IInternalConfigRoot configRoot, params object[] hostInitParams);
+               void InitForConfiguration (ref string locationSubPath, out string configPath, out string locationConfigPath, IInternalConfigRoot configRoot, params object[] hostInitConfigurationParams);
                bool IsAboveApplication (string configPath);
                bool IsConfigRecordRequired (string configPath);
                bool IsDefinitionAllowed (string configPath, ConfigurationAllowDefinition allowDefinition, ConfigurationAllowExeDefinition allowExeDefinition);
index 9badcd34afdf5f85d9f3656310870bfdc67e2c70..65b63cdee8b266d8699e9eb47c6e565b1f84ac7e 100644 (file)
@@ -95,10 +95,10 @@ namespace System.Configuration {
 
                [MonoTODO]
                protected internal override string SerializeSection (
-                       ConfigurationElement parent, string name, ConfigurationSaveMode mode)
+                       ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode)
                {
                        if (File == "") {
-                               return base.SerializeSection (parent, name, mode);
+                               return base.SerializeSection (parentElement, name, saveMode);
                        }
                        else {
                                throw new NotImplementedException ();
index fb48cc9664f27b743154806f992f342e7e9a8f35..7e78b1b325f1946ab1bcbb8e95c0ee43ffa7681f 100644 (file)
@@ -251,9 +251,9 @@ namespace System.Configuration {
                        get { return RootSectionGroup.Sections; }
                }
                
-               public ConfigurationSection GetSection (string path)
+               public ConfigurationSection GetSection (string sectionName)
                {
-                       string[] parts = path.Split ('/');
+                       string[] parts = sectionName.Split ('/');
                        if (parts.Length == 1)
                                return Sections [parts[0]];
 
@@ -267,9 +267,9 @@ namespace System.Configuration {
                                return null;
                }
                
-               public ConfigurationSectionGroup GetSectionGroup (string path)
+               public ConfigurationSectionGroup GetSectionGroup (string sectionGroupName)
                {
-                       string[] parts = path.Split ('/');
+                       string[] parts = sectionGroupName.Split ('/');
                        ConfigurationSectionGroup group = SectionGroups [parts[0]];
                        for (int n=1; group != null && n<parts.Length; n++)
                                group = group.SectionGroups [parts [n]];
@@ -388,14 +388,14 @@ namespace System.Configuration {
                        Save (ConfigurationSaveMode.Modified, false);
                }
                
-               public void Save (ConfigurationSaveMode mode)
+               public void Save (ConfigurationSaveMode saveMode)
                {
-                       Save (mode, false);
+                       Save (saveMode, false);
                }
                
-               public void Save (ConfigurationSaveMode mode, bool forceUpdateAll)
+               public void Save (ConfigurationSaveMode saveMode, bool forceSaveAll)
                {
-                       if (!forceUpdateAll && (mode != ConfigurationSaveMode.Full) && !HasValues (mode)) {
+                       if (!forceSaveAll && (saveMode != ConfigurationSaveMode.Full) && !HasValues (saveMode)) {
                                ResetModified ();
                                return;
                        }
@@ -410,7 +410,7 @@ namespace System.Configuration {
                                if (saveStart != null)
                                        saveStart (this, new ConfigurationSaveEventArgs (streamName, true, null, ctx));
                                
-                               Save (stream, mode, forceUpdateAll);
+                               Save (stream, saveMode, forceSaveAll);
                                system.Host.WriteCompleted (streamName, true, ctx);
                        } catch (Exception ex) {
                                saveEx = ex;
@@ -428,15 +428,15 @@ namespace System.Configuration {
                        SaveAs (filename, ConfigurationSaveMode.Modified, false);
                }
                
-               public void SaveAs (string filename, ConfigurationSaveMode mode)
+               public void SaveAs (string filename, ConfigurationSaveMode saveMode)
                {
-                       SaveAs (filename, mode, false);
+                       SaveAs (filename, saveMode, false);
                }
 
                [MonoInternalNote ("Detect if file has changed")]
-               public void SaveAs (string filename, ConfigurationSaveMode mode, bool forceUpdateAll)
+               public void SaveAs (string filename, ConfigurationSaveMode saveMode, bool forceSaveAll)
                {
-                       if (!forceUpdateAll && (mode != ConfigurationSaveMode.Full) && !HasValues (mode)) {
+                       if (!forceSaveAll && (saveMode != ConfigurationSaveMode.Full) && !HasValues (saveMode)) {
                                ResetModified ();
                                return;
                        }
@@ -444,7 +444,7 @@ namespace System.Configuration {
                        string dir = Path.GetDirectoryName (Path.GetFullPath (filename));
                        if (!Directory.Exists (dir))
                                Directory.CreateDirectory (dir);
-                       Save (new FileStream (filename, FileMode.OpenOrCreate, FileAccess.Write), mode, forceUpdateAll);
+                       Save (new FileStream (filename, FileMode.OpenOrCreate, FileAccess.Write), saveMode, forceSaveAll);
                }
 
                void Save (Stream stream, ConfigurationSaveMode mode, bool forceUpdateAll)
index 1123e9ad15642f65c7df07e1bbf333a5feb79a2a..a1e6e16d9535378634eff6a5832e803ee88abf09 100644 (file)
@@ -155,7 +155,7 @@ namespace System.Configuration
                }
 
                [MonoTODO]
-               protected virtual void ListErrors (IList list)
+               protected virtual void ListErrors (IList errorList)
                {
                        throw new NotImplementedException ();
                }
@@ -215,24 +215,24 @@ namespace System.Configuration
                        return defaultCollection;
                }
 
-               protected internal object this [ConfigurationProperty property] {
-                       get { return this [property.Name]; }
-                       set { this [property.Name] = value; }
+               protected internal object this [ConfigurationProperty prop] {
+                       get { return this [prop.Name]; }
+                       set { this [prop.Name] = value; }
                }
 
-               protected internal object this [string property_name] {
+               protected internal object this [string propertyName] {
                        get {
-                               PropertyInformation pi = ElementInformation.Properties [property_name];
+                               PropertyInformation pi = ElementInformation.Properties [propertyName];
                                if (pi == null)
-                                       throw new InvalidOperationException ("Property '" + property_name + "' not found in configuration element");
+                                       throw new InvalidOperationException ("Property '" + propertyName + "' not found in configuration element");
 
                                return pi.Value;
                        }
 
                        set {
-                               PropertyInformation pi = ElementInformation.Properties [property_name];
+                               PropertyInformation pi = ElementInformation.Properties [propertyName];
                                if (pi == null)
-                                       throw new InvalidOperationException ("Property '" + property_name + "' not found in configuration element");
+                                       throw new InvalidOperationException ("Property '" + propertyName + "' not found in configuration element");
 
                                SetPropertyValue (pi.Property, value, false);
 
@@ -415,7 +415,7 @@ namespace System.Configuration
                        return false;
                }
 
-               protected virtual bool OnDeserializeUnrecognizedElement (string element, XmlReader reader)
+               protected virtual bool OnDeserializeUnrecognizedElement (string elementName, XmlReader reader)
                {
                        return false;
                }
@@ -545,16 +545,16 @@ namespace System.Configuration
                }
 
                protected internal virtual void Unmerge (
-                               ConfigurationElement source, ConfigurationElement parent,
-                               ConfigurationSaveMode updateMode)
+                               ConfigurationElement sourceElement, ConfigurationElement parentElement,
+                               ConfigurationSaveMode saveMode)
                {
-                       if (parent != null && source.GetType() != parent.GetType())
+                       if (parentElement != null && sourceElement.GetType() != parentElement.GetType())
                                throw new ConfigurationErrorsException ("Can't unmerge two elements of different type");
 
-                       bool isMinimalOrModified = updateMode == ConfigurationSaveMode.Minimal ||
-                               updateMode == ConfigurationSaveMode.Modified;
+                       bool isMinimalOrModified = saveMode == ConfigurationSaveMode.Minimal ||
+                               saveMode == ConfigurationSaveMode.Modified;
 
-                       foreach (PropertyInformation prop in source.ElementInformation.Properties)
+                       foreach (PropertyInformation prop in sourceElement.ElementInformation.Properties)
                        {
                                if (prop.ValueOrigin == PropertyValueOrigin.Default)
                                        continue;
@@ -562,7 +562,7 @@ namespace System.Configuration
                                PropertyInformation unmergedProp = ElementInformation.Properties [prop.Name];
                                
                                object sourceValue = prop.Value;
-                               if (parent == null || !parent.HasValue (prop.Name)) {
+                               if (parentElement == null || !parentElement.HasValue (prop.Name)) {
                                        unmergedProp.Value = sourceValue;
                                        continue;
                                }
@@ -570,26 +570,26 @@ namespace System.Configuration
                                if (sourceValue == null)
                                        continue;
 
-                               object parentValue = parent [prop.Name];
+                               object parentValue = parentElement [prop.Name];
                                if (!prop.IsElement) {
                                        if (!object.Equals (sourceValue, parentValue) || 
-                                           (updateMode == ConfigurationSaveMode.Full) ||
-                                           (updateMode == ConfigurationSaveMode.Modified && prop.ValueOrigin == PropertyValueOrigin.SetHere))
+                                           (saveMode == ConfigurationSaveMode.Full) ||
+                                           (saveMode == ConfigurationSaveMode.Modified && prop.ValueOrigin == PropertyValueOrigin.SetHere))
                                                unmergedProp.Value = sourceValue;
                                        continue;
                                }
 
-                               var sourceElement = (ConfigurationElement) sourceValue;
-                               if (isMinimalOrModified && !sourceElement.IsModified ())
+                               var sourceElementValue = (ConfigurationElement) sourceValue;
+                               if (isMinimalOrModified && !sourceElementValue.IsModified ())
                                        continue;
                                if (parentValue == null) {
                                        unmergedProp.Value = sourceValue;
                                        continue;
                                }
 
-                               var parentElement = (ConfigurationElement) parentValue;
+                               var parentElementValue = (ConfigurationElement) parentValue;
                                ConfigurationElement copy = (ConfigurationElement) unmergedProp.Value;
-                               copy.Unmerge (sourceElement, parentElement, updateMode);
+                               copy.Unmerge (sourceElementValue, parentElementValue, saveMode);
                        }
                }
                
index 6e379c87b9153222c541f65ea3cacf33c3561aed..c5a87877276f5cfd6de8e2f343b7fd986a4ca21b 100644 (file)
@@ -555,7 +555,7 @@ namespace System.Configuration
                        return false;
                }
                
-               protected internal override void Unmerge (ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode updateMode)
+               protected internal override void Unmerge (ConfigurationElement sourceElement, ConfigurationElement parentElement, ConfigurationSaveMode saveMode)
                {
                        ConfigurationElementCollection source = (ConfigurationElementCollection) sourceElement;
                        ConfigurationElementCollection parent = (ConfigurationElementCollection) parentElement;
@@ -565,9 +565,9 @@ namespace System.Configuration
                                object key = source.GetElementKey (sitem);
                                ConfigurationElement pitem = parent != null ? parent.BaseGet (key) as ConfigurationElement : null;
                                ConfigurationElement nitem = CreateNewElementInternal (null);
-                               if (pitem != null && updateMode != ConfigurationSaveMode.Full) {
-                                       nitem.Unmerge (sitem, pitem, updateMode);
-                                       if (nitem.HasValues (pitem, updateMode))
+                               if (pitem != null && saveMode != ConfigurationSaveMode.Full) {
+                                       nitem.Unmerge (sitem, pitem, saveMode);
+                                       if (nitem.HasValues (pitem, saveMode))
                                                BaseAdd (nitem);
                                } else {
                                        nitem.Unmerge (sitem, null, ConfigurationSaveMode.Full);
@@ -575,7 +575,7 @@ namespace System.Configuration
                                }
                        }
                        
-                       if (updateMode == ConfigurationSaveMode.Full)
+                       if (saveMode == ConfigurationSaveMode.Full)
                                EmitClear = true;
                        else if (parent != null) {
                                for (int n=0; n<parent.Count; n++) {
index ec3738812310c8e3e9649b5a33d41af3353d9dd4..50b8406ae41fa0e0974ca20756b6506c81a74d0e 100644 (file)
@@ -49,60 +49,60 @@ namespace System.Configuration
                        : this (name, type, NoDefaultValue, TypeDescriptor.GetConverter (type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
                { }
 
-               public ConfigurationProperty (string name, Type type, object default_value)
-                       : this (name, type, default_value, TypeDescriptor.GetConverter (type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
+               public ConfigurationProperty (string name, Type type, object defaultValue)
+                       : this (name, type, defaultValue, TypeDescriptor.GetConverter (type), new DefaultValidator(), ConfigurationPropertyOptions.None, null)
                { }
 
                public ConfigurationProperty (
-                                       string name, Type type, object default_value,
-                                       ConfigurationPropertyOptions flags)
-                       :this (name, type, default_value, TypeDescriptor.GetConverter (type), new DefaultValidator(), flags, null)
+                                       string name, Type type, object defaultValue,
+                                       ConfigurationPropertyOptions options)
+                       :this (name, type, defaultValue, TypeDescriptor.GetConverter (type), new DefaultValidator(), options, null)
                { }
                
                public ConfigurationProperty (
-                                       string name, Type type, object default_value,
-                                       TypeConverter converter,
-                                       ConfigurationValidatorBase validation,
-                                       ConfigurationPropertyOptions flags)
-                       : this (name, type, default_value, converter, validation, flags, null)
+                                       string name, Type type, object defaultValue,
+                                       TypeConverter typeConverter,
+                                       ConfigurationValidatorBase validator,
+                                       ConfigurationPropertyOptions options)
+                       : this (name, type, defaultValue, typeConverter, validator, options, null)
                { }
 
                public ConfigurationProperty (
-                                       string name, Type type, object default_value,
-                                       TypeConverter converter,
-                                       ConfigurationValidatorBase validation,
-                                       ConfigurationPropertyOptions flags,
+                                       string name, Type type, object defaultValue,
+                                       TypeConverter typeConverter,
+                                       ConfigurationValidatorBase validator,
+                                       ConfigurationPropertyOptions options,
                                        string description)
                {
                        this.name = name;
-                       this.converter = converter != null ? converter : TypeDescriptor.GetConverter (type);
-                       if (default_value != null) {
-                               if (default_value == NoDefaultValue) {
+                       this.converter = typeConverter != null ? typeConverter : TypeDescriptor.GetConverter (type);
+                       if (defaultValue != null) {
+                               if (defaultValue == NoDefaultValue) {
                                        switch (Type.GetTypeCode (type)) {
                                        case TypeCode.Object:
-                                               default_value = null;
+                                               defaultValue = null;
                                                break;
                                        case TypeCode.String:
-                                               default_value = String.Empty;
+                                               defaultValue = String.Empty;
                                                break;
                                        default:
-                                               default_value = Activator.CreateInstance (type);
+                                               defaultValue = Activator.CreateInstance (type);
                                                break;
                                        }
                                }
                                else
-                                       if (!type.IsAssignableFrom (default_value.GetType ())) {
-                                               if (!this.converter.CanConvertFrom (default_value.GetType ()))
+                                       if (!type.IsAssignableFrom (defaultValue.GetType ())) {
+                                               if (!this.converter.CanConvertFrom (defaultValue.GetType ()))
                                                        throw new ConfigurationErrorsException (String.Format ("The default value for property '{0}' has a different type than the one of the property itself: expected {1} but was {2}",
-                                                                                                          name, type, default_value.GetType ()));
+                                                                                                          name, type, defaultValue.GetType ()));
 
-                                               default_value = this.converter.ConvertFrom (default_value);
+                                               defaultValue = this.converter.ConvertFrom (defaultValue);
                                        }
                        }
-                       this.default_value = default_value;
-                       this.flags = flags;
+                       this.default_value = defaultValue;
+                       this.flags = options;
                        this.type = type;
-                       this.validation = validation != null ? validation : new DefaultValidator ();
+                       this.validation = validator != null ? validator : new DefaultValidator ();
                        this.description = description;
                }
 
index add89b5bd3f5bb673ecf4f83b3866822c205f6ae..1412ede6e6a5222285e912683b603091b5bf6aed 100644 (file)
@@ -70,9 +70,9 @@ namespace System.Configuration
                }
 
                [MonoTODO]
-               public void ForceDeclaration (bool require)
+               public void ForceDeclaration (bool force)
                {
-                       this.require_declaration = require;
+                       this.require_declaration = force;
                }
 
                public void ForceDeclaration ()
index 7da715ce56b673905927aac7fa1ab18965da320d..8044246f229ad1fa20d6bff7ba3e59be90939a94 100644 (file)
@@ -41,13 +41,13 @@ namespace System.Configuration
                 {
                 }
 
-                public new ConnectionStringSettings this [string Name]
+                public new ConnectionStringSettings this [string name]
                 {
                         get {
                                 foreach (ConfigurationElement c in this) {
                                         if (!(c is ConnectionStringSettings))
                                                 continue;
-                                        if (string.Compare(((ConnectionStringSettings) c).Name, Name, true, 
+                                        if (string.Compare(((ConnectionStringSettings) c).Name, name, true, 
                                                 System.Globalization.CultureInfo.InvariantCulture) == 0)
                                                 return c as ConnectionStringSettings;
 
index 71fd65b193fcf99f29d2996059274a042ec0df96..6ac6b6b39fb1063f67d5418eafe08e0b352ab429 100644 (file)
@@ -38,7 +38,7 @@ namespace System.Configuration
 Protection API, and is unimplemented in Mono.  For portability's sake,
 it is suggested that you use the RsaProtectedConfigurationProvider.";
                [MonoNotSupported (NotSupportedReason)]
-               public override XmlNode Decrypt (XmlNode encrypted_node)
+               public override XmlNode Decrypt (XmlNode encryptedNode)
                {
                        throw new NotSupportedException (NotSupportedReason);
                }
index 0e6672df18b5bb10dc4b1c5ce3af88e5333c3ddd..09883818be557d2a61847686f9d0fe05bf0a8783 100644 (file)
@@ -54,15 +54,15 @@ namespace System.Configuration {
                        return false;
                }
 
-               protected internal override void DeserializeSection (XmlReader reader)
+               protected internal override void DeserializeSection (XmlReader xmlReader)
                {
-                       xml = reader.ReadOuterXml ();
+                       xml = xmlReader.ReadOuterXml ();
                }
 
                [MonoTODO]
-               protected internal override void Reset (ConfigurationElement parentElement)
+               protected internal override void Reset (ConfigurationElement parentSection)
                {
-                       base.Reset (parentElement);
+                       base.Reset (parentSection);
                }
 
                [MonoTODO]
@@ -71,7 +71,7 @@ namespace System.Configuration {
                        base.ResetModified ();
                }
 
-               protected internal override string SerializeSection (ConfigurationElement parentElement, string name, ConfigurationSaveMode saveMode)
+               protected internal override string SerializeSection (ConfigurationElement parentSection, string name, ConfigurationSaveMode saveMode)
                {
                        return xml;
                }
index 0cf6136ae38ca111de4ffb463a475245dd7cf4b0..9812fdfb7a877f3871c9a9b7d33472d5461d0217 100644 (file)
@@ -330,7 +330,7 @@ namespace System.Configuration
 
                        CheckFileMap (level, map);
 
-                       if (locationSubPath == null)
+                       if (locationSubPath == null) {
                                switch (level) {
                                case ConfigurationUserLevel.PerUserRoaming:
                                        if (map.RoamingUserConfigFilename == null)
@@ -343,35 +343,37 @@ namespace System.Configuration
                                        locationSubPath = "local";
                                        break;
                                }
-
-                       configPath = null;
-                       string next = null;
-
-                       locationConfigPath = null;
+                       }
 
                        if (locationSubPath == "exe" || locationSubPath == null && map.ExeConfigFilename != null) {
                                configPath = "exe";
-                               next = "machine";
+                               locationSubPath = "machine";
                                locationConfigPath = map.ExeConfigFilename;
+                               return;
                        }
                        
                        if (locationSubPath == "local" && map.LocalUserConfigFilename != null) {
                                configPath = "local";
-                               next = "roaming";
+                               locationSubPath = "roaming";
                                locationConfigPath = map.LocalUserConfigFilename;
+                               return;
                        }
                        
                        if (locationSubPath == "roaming" && map.RoamingUserConfigFilename != null) {
                                configPath = "roaming";
-                               next = "exe";
+                               locationSubPath = "exe";
                                locationConfigPath = map.RoamingUserConfigFilename;
+                               return;
                        }
                        
-                       if ((locationSubPath == "machine" || configPath == null) && map.MachineConfigFilename != null) {
+                       if (locationSubPath == "machine" && map.MachineConfigFilename != null) {
                                configPath = "machine";
-                               next = null;
+                               locationSubPath = null;
+                               locationConfigPath = null;
+                               return;
                        }
-                       locationSubPath = next;
+
+                       throw new NotImplementedException ();
                }
        }
        
index aca0c163f02bcc4587b7a7223635fe172c732c5c..c957954115a5f3e09d1194311df59047e7ead3d1 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Configuration
                {
                }
 
-               public abstract XmlNode Decrypt (XmlNode encrypted_node);
+               public abstract XmlNode Decrypt (XmlNode encryptedNode);
 
                public abstract XmlNode Encrypt (XmlNode node);
        }
index 6d4db6a0b077bb72ef79978599a6d32cfa999417..ea4d72cc12c022178a472d881db44b96110670e6 100644 (file)
@@ -89,10 +89,10 @@ namespace System.Configuration
 
                [MonoTODO]
                protected internal override void Unmerge (
-                               ConfigurationElement source, ConfigurationElement parent,
-                               ConfigurationSaveMode updateMode)
+                               ConfigurationElement sourceElement, ConfigurationElement parentElement,
+                               ConfigurationSaveMode saveMode)
                {
-                       base.Unmerge (source, parent, updateMode);
+                       base.Unmerge (sourceElement, parentElement, saveMode);
                }
                
                [ConfigurationProperty ("name", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
index 25bbc3a41f4094a9e51b3fa36898319bfe5290db..f115cd2a3c97e9d498eac667706ed7c2a4c47c24 100644 (file)
@@ -58,15 +58,15 @@ namespace System.Configuration
                        return ((ProviderSettings)element).Name;
                }
                
-               public void Remove (string key)
+               public void Remove (string name)
                {
-                       BaseRemove (key);
+                       BaseRemove (name);
                }
                
-               public ProviderSettings this [int n]
+               public ProviderSettings this [int index]
                {
-                       get { return (ProviderSettings) BaseGet (n); }
-                       set { BaseAdd (n, value); }
+                       get { return (ProviderSettings) BaseGet (index); }
+                       set { BaseAdd (index, value); }
                }
                
                public new ProviderSettings this [string key]
index bbb0eea08b302223ce6347cb7ad559d2f2fe5f2d..d20a75195648e899c2fc53c81516d767b6eb782f 100644 (file)
@@ -63,11 +63,11 @@ namespace System.Configuration
                }
 
                [MonoTODO]
-               public override XmlNode Decrypt (XmlNode encrypted_node)
+               public override XmlNode Decrypt (XmlNode encryptedNode)
                {
                        XmlDocument doc = new ConfigurationXmlDocument ();
                        
-                       doc.Load (new StringReader (encrypted_node.OuterXml));
+                       doc.Load (new StringReader (encryptedNode.OuterXml));
 
                        EncryptedXml ex = new EncryptedXml (doc);
 
index f05406c4b5bf19f22054bca318f66cdef8f87a2a..5bbf19f1fa0b4a24bcd457dcdea0adf0ae4f424e 100644 (file)
@@ -175,13 +175,13 @@ namespace System.Configuration
                        return raw_xml;
                }
 
-               public void ProtectSection (string provider)
+               public void ProtectSection (string protectionProvider)
                {
-                       protection_provider = ProtectedConfiguration.GetProvider (provider, true);
+                       protection_provider = ProtectedConfiguration.GetProvider (protectionProvider, true);
                }
 
                [MonoTODO]
-               public void ForceDeclaration (bool require)
+               public void ForceDeclaration (bool force)
                {
                }
 
@@ -201,9 +201,9 @@ namespace System.Configuration
                        protection_provider = null;
                }
 
-               public void SetRawXml (string xml)
+               public void SetRawXml (string rawXml)
                {
-                       raw_xml = xml;
+                       raw_xml = rawXml;
                }
 
                [MonoTODO]
index 4713a1d4a373cd0530ba6431a1367ef609149b1b..7233b87d5132f4cee0fd3b47816c25d54c118339 100644 (file)
@@ -30,6 +30,6 @@ using System;
 using System.IO;
 
 namespace System.Configuration {
-       public delegate void ValidatorCallback (object o);
+       public delegate void ValidatorCallback (object value);
 }
 
index a862bf05db1389c0c338d9b86974f51f9e5c3fce..85b3fd50c14313ffaac6c55fa66b7d3b0c17bc68 100644 (file)
@@ -31,6 +31,7 @@ using System.Runtime.InteropServices;
 using System.Security.AccessControl;
 using System.Security.Permissions;
 using System.Security.Principal;
+using System.IO.MemoryMappedFiles;
 
 namespace Microsoft.Win32.SafeHandles
 {
@@ -42,10 +43,11 @@ namespace Microsoft.Win32.SafeHandles
                        handle = preexistingHandle;
                }
 
-               [MonoTODO]
                protected override bool ReleaseHandle ()
                {
-                       throw new NotImplementedException ();
+                       MemoryMapImpl.CloseMapping (handle);
+                       handle = IntPtr.Zero;
+                       return true;
                }
        }
 }
index bbac05969d4e48f14f7b21022d2d6589c0d42e2d..239c9d1bafd91aa5d4a90fc942251c2a9e2ea097 100644 (file)
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\ECKeyXmlFormat.cs" />\r
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\NCryptNative.cs" />\r
     <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\RsaCng.cs" />\r
+    <Compile Include="..\referencesource\System.Core\System\Security\Cryptography\X509Certificates\TrustStatus.cs" />\r
     <Compile Include="..\referencesource\System.Core\System\threading\ReaderWriterLockSlim\LockRecursionException.cs" />\r
     <Compile Include="..\referencesource\System.Core\System\threading\ReaderWriterLockSlim\ReaderWriterLockSlim.cs" />\r
     <Compile Include="..\referencesource\System.Core\System\threading\Tasks\TaskExtensions.cs" />\r
index 7a3cce164f61e2feffc9b46fcd751d1c75626e91..4adaaf514febde7d264e247301a62100237a3c0c 100644 (file)
@@ -33,7 +33,6 @@ using Microsoft.Win32.SafeHandles;
 using System.Runtime.InteropServices;
 using System.Runtime.CompilerServices;
 
-
 namespace System.IO.MemoryMappedFiles
 {
        internal static class MemoryMapImpl {
@@ -113,7 +112,6 @@ namespace System.IO.MemoryMappedFiles
                }
        }
 
-
        public class MemoryMappedFile : IDisposable {
                // MemoryMappedFileAccess fileAccess;
                // string name;
@@ -127,7 +125,7 @@ namespace System.IO.MemoryMappedFiles
                //
                FileStream stream;
                bool keepOpen;
-               IntPtr handle;
+               SafeMemoryMappedFileHandle handle;
 
                public static MemoryMappedFile CreateFromFile (string path)
                {
@@ -147,7 +145,7 @@ namespace System.IO.MemoryMappedFiles
                        IntPtr handle = MemoryMapImpl.OpenFile (path, mode, null, out capacity, MemoryMappedFileAccess.ReadWrite, MemoryMappedFileOptions.None);
 
                        return new MemoryMappedFile () {
-                               handle = handle,
+                               handle = new SafeMemoryMappedFileHandle (handle, true),
                                // fileAccess = MemoryMappedFileAccess.ReadWrite,
                                // fileCapacity = capacity
                        };
@@ -179,7 +177,7 @@ namespace System.IO.MemoryMappedFiles
                        IntPtr handle = MemoryMapImpl.OpenFile (path, mode, mapName, out capacity, access, MemoryMappedFileOptions.None);
                        
                        return new MemoryMappedFile () {
-                               handle = handle,
+                               handle = new SafeMemoryMappedFileHandle (handle, true),
                                // fileAccess = access,
                                // name = mapName,
                                // fileCapacity = capacity
@@ -202,7 +200,7 @@ namespace System.IO.MemoryMappedFiles
                        MemoryMapImpl.ConfigureHandleInheritability (handle, inheritability);
                                
                        return new MemoryMappedFile () {
-                               handle = handle,
+                               handle = new SafeMemoryMappedFileHandle (handle, true),
                                // fileAccess = access,
                                // name = mapName,
                                // fileCapacity = capacity,
@@ -229,7 +227,7 @@ namespace System.IO.MemoryMappedFiles
                        MemoryMapImpl.ConfigureHandleInheritability (handle, inheritability);
                                
                        return new MemoryMappedFile () {
-                               handle = handle,
+                               handle = new SafeMemoryMappedFileHandle (handle, true),
                                // fileAccess = access,
                                // name = mapName,
                                // fileCapacity = capacity,
@@ -252,7 +250,7 @@ namespace System.IO.MemoryMappedFiles
                        IntPtr handle = MemoryMapImpl.OpenFile (null, mode, mapName, out capacity, access, options);
                        
                        return new MemoryMappedFile () {
-                               handle = handle,
+                               handle = new SafeMemoryMappedFileHandle (handle, true),
                                // fileAccess = access,
                                // name = mapName,
                                // fileCapacity = capacity
@@ -339,7 +337,7 @@ namespace System.IO.MemoryMappedFiles
 
                public MemoryMappedViewStream CreateViewStream (long offset, long size, MemoryMappedFileAccess access)
                {
-                       var view = MemoryMappedView.Create (handle, offset, size, access);
+                       var view = MemoryMappedView.Create (handle.DangerousGetHandle (), offset, size, access);
                        return new MemoryMappedViewStream (view);
                }
 
@@ -355,7 +353,7 @@ namespace System.IO.MemoryMappedFiles
 
                public MemoryMappedViewAccessor CreateViewAccessor (long offset, long size, MemoryMappedFileAccess access)
                {
-                       var view = MemoryMappedView.Create (handle, offset, size, access);
+                       var view = MemoryMappedView.Create (handle.DangerousGetHandle (), offset, size, access);
                        return new MemoryMappedViewAccessor (view);
                }
 
@@ -370,16 +368,16 @@ namespace System.IO.MemoryMappedFiles
 
                protected virtual void Dispose (bool disposing)
                {
-                       if (disposing){
-                               if (stream != null){
+                       if (disposing) {
+                               if (stream != null) {
                                        if (keepOpen == false)
                                                stream.Close ();
                                        stream = null;
                                }
-                               if (handle != IntPtr.Zero) {
-                                       MemoryMapImpl.CloseMapping (handle);
-                                       handle = IntPtr.Zero;
-                               }
+                       }
+                       if (handle != null) {
+                               handle.Dispose ();
+                               handle = null;
                        }
                }
 
index 7dc7a62e7dd8c3df4024d1ff97d42b0cf5c3f1cc..0b05a53f089ffc27e41ce937fe86894317f83d0d 100644 (file)
@@ -51,18 +51,18 @@ namespace System.Security.Cryptography {
                        KeyValue = KeyBuilder.Key (KeySizeValue >> 3);
                }
                
-               public override ICryptoTransform CreateDecryptor (byte[] rgbKey, byte[] rgbIV
+               public override ICryptoTransform CreateDecryptor (byte[] key, byte[] iv
                {
                        if ((Mode == CipherMode.CFB) && (FeedbackSize > 64))
                                throw new CryptographicException ("CFB with Feedbaack > 64 bits");
-                       return new AesTransform (this, false, rgbKey, rgbIV);
+                       return new AesTransform (this, false, key, iv);
                }
                
-               public override ICryptoTransform CreateEncryptor (byte[] rgbKey, byte[] rgbIV
+               public override ICryptoTransform CreateEncryptor (byte[] key, byte[] iv
                {
                        if ((Mode == CipherMode.CFB) && (FeedbackSize > 64))
                                throw new CryptographicException ("CFB with Feedbaack > 64 bits");
-                       return new AesTransform (this, true, rgbKey, rgbIV);
+                       return new AesTransform (this, true, key, iv);
                }
 
                // I suppose some attributes differs ?!? because this does not look required
index 4fca0b34f42e8dd18a75b517a811e6db74e4cc3a..7757ca9d881b2881a8b233b68ead57ef1e2bd4ac 100644 (file)
@@ -511,6 +511,11 @@ namespace MonoTests.System.Linq.Expressions {
                [Test]
                public void CallNullableGetValueOrDefault () // #568989
                {
+#if MOBILE
+                       // ensure that int?.GetValueOrDefault won't be removed by the linker
+                       Assert.AreEqual (0, ((int?)0).GetValueOrDefault (3));
+#endif
+
                        var value = Expression.Parameter (typeof (int?), "value");
                        var default_parameter = Expression.Parameter (typeof (int), "default");
 
index d42159fb41252e6bef574875f04ac5445dc1bdfa..9e54bcb3f7227e907b9cbcb4fd4e7caad0ef485a 100644 (file)
@@ -88,6 +88,8 @@ System.Security.Cryptography/SHA256CryptoServiceProvider.cs
 System.Security.Cryptography/SHA384CryptoServiceProvider.cs
 System.Security.Cryptography/SHA512CryptoServiceProvider.cs
 
+../referencesource/System.Core/System/Security/Cryptography/X509Certificates/TrustStatus.cs
+
 ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/BitHelper.cs
 ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/HashSet.cs
 ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/HashSetEqualityComparer.cs
@@ -122,7 +124,6 @@ System.Security.Cryptography/SHA512CryptoServiceProvider.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/IRuntimeVariables.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/ReadOnlyCollectionBuilder.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/RuleCache.cs
-../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/RuntimeOps.ExpressionQuoter.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/RuntimeOps.RuntimeVariableList.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/RuntimeOps.MergedRuntimeVariables.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/RuntimeOps.RuntimeVariables.cs
index 27d916c49d552f573fbea9fbcaf3835ea125e6b9..7dc422513068b28226e989df350e806580d6947d 100644 (file)
@@ -32,3 +32,5 @@
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.Temps.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/StackSpiller.cs
 ../../../external/corefx/src/System.Linq.Expressions/src/System/Linq/Expressions/Compiler/VariableBinder.cs
+
+../../../external/corefx/src/System.Linq.Expressions/src/System/Runtime/CompilerServices/RuntimeOps.ExpressionQuoter.cs
index acef0f904787c5d6f670ef532e27b7ee545c8fc0..db68b96777b3473655a9a97785e4452b77f7157f 100644 (file)
@@ -192,12 +192,12 @@ namespace DbLinq.Data.Linq
         /// </summary>\r
         /// <param name="connectionString">specifies file or server connection</param>\r
         [DbLinqToDo]\r
-        public DataContext(string connectionString)\r
+        public DataContext(string fileOrServerOrConnection)\r
         {\r
             Profiler.At("START DataContext(string)");\r
-            IVendor ivendor = GetVendor(ref connectionString);\r
+            IVendor ivendor = GetVendor(ref fileOrServerOrConnection);\r
 \r
-            IDbConnection dbConnection = ivendor.CreateDbConnection(connectionString);\r
+            IDbConnection dbConnection = ivendor.CreateDbConnection(fileOrServerOrConnection);\r
             Init(new DatabaseContext(dbConnection), null, ivendor);\r
 \r
             Profiler.At("END DataContext(string)");\r
index 26fce3ab35bca21a6fb912b81fd57a357a1a8fe4..b4467919cee20ef63d4c5c2dcba846c9eb69f094 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // System.Data.OracleClient.OracleCommandBuilder.cs
 //
 // based on the SqlCommandBuilder in mcs/class/System.Data/System.Data.SqlClient
@@ -490,8 +490,8 @@ namespace System.Data.OracleClient {
                }
 
                 [MonoTODO]
-                protected override void ApplyParameterInfo (DbParameter dbParameter,
-                                                           DataRow row,
+                protected override void ApplyParameterInfo (DbParameter parameter,
+                                                           DataRow datarow,
                                                            StatementType statementType,
                                                            bool whereClause)
                 {
@@ -499,7 +499,7 @@ namespace System.Data.OracleClient {
                 }
 
                 [MonoTODO]
-                protected override string GetParameterName (int position)
+                protected override string GetParameterName (int parameterOrdinal)
                 {
                         throw new NotImplementedException ();
                 }
@@ -511,7 +511,7 @@ namespace System.Data.OracleClient {
                 }
 
                 [MonoTODO]
-                protected override string GetParameterPlaceholder (int position)
+                protected override string GetParameterPlaceholder (int parameterOrdinal)
                 {
                         throw new NotImplementedException ();
                 }
index d40b3e0e76d7bb3ec046e16aa1e85156cc76ddd9..992f970601ba62333fbe760f8f9f5b3677895aec 100644 (file)
@@ -53,6 +53,7 @@ EXTRA_DISTFILES = \
        $(wildcard Test/System.Data/schemas/*.xsd)              \
        Test/test-config-file                   \
        Test/System.Data/binserialize/*.bin     \
+       Test/ProviderTests/sql/*.sql    \
        SqliteTest.db   \
        corefx.common.sources
 
index ff5dc821d854f550cd59f6b5ab6be1db6207fb17..40ccb46eb118fc587d7357d9b90c1078fbea852e 100644 (file)
@@ -126,10 +126,10 @@ namespace System.Data.SqlClient
                        ConnectionString = connectionString;
                }
 
-               public SqlConnection (string connectionString, SqlCredential cred)
+               public SqlConnection (string connectionString, SqlCredential credential)
                {
                        ConnectionString = connectionString;
-                       Credentials = cred;
+                       Credentials = credential;
                }
 
                #endregion // Constructors
index 5b15b48cb66d28b53be95809b6a2cedb2d54ed5f..0bc80680560b4add463011e433f2505c99be0d47 100644 (file)
@@ -49,13 +49,13 @@ namespace System.Data.SqlClient {
 
                #region Constructors
 
-               public SqlCredential (string user, SecureString password)
+               public SqlCredential (string userId, SecureString password)
                {
-                       if (user == null)
-                               throw new ArgumentNullException("UserID");
+                       if (userId == null)
+                               throw new ArgumentNullException("userId");
                        if (password == null)
-                               throw new ArgumentNullException("Password");
-                       this.uid = user;
+                               throw new ArgumentNullException("password");
+                       this.uid = userId;
                        this.pwd = password;
                }
 
index ab2142345038288cc44b1fa724830cfa3d24bd86..d0cc818ecc9c01a7b7b974aaad8bd3db38fac771 100644 (file)
@@ -126,3 +126,29 @@ System.Data.SqlClient/SqlBulkCopyTest.cs
 Mono.Data.SqlExpressions/DataColumnExpressionTest.cs
 Mono.Data.SqlExpressions/DateComparisonTest.cs
 
+ProviderTests/Common/ConnectionConfig.cs
+ProviderTests/Common/ConnectionManager.cs
+ProviderTests/Common/DBHelper.cs
+ProviderTests/Common/DataProvider.cs
+ProviderTests/Common/EngineConfig.cs
+ProviderTests/Common/EngineType.cs
+ProviderTests/Common/ProviderTestsConfigurationHandler.cs
+ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs
+ProviderTests/System.Data.Odbc/OdbcCommandTest.cs
+ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs
+ProviderTests/System.Data.Odbc/OdbcDataAdapterTest.cs
+ProviderTests/System.Data.Odbc/OdbcParameterTest.cs
+ProviderTests/System.Data.Odbc/OdbcParameterCollectionTest.cs
+ProviderTests/ProviderIndependant/DataReaderTest.cs
+ProviderTests/ProviderIndependant/DbDataReaderTest.cs
+ProviderTests/ProviderIndependant/IDbCommandTest.cs
+ProviderTests/System.Data.SqlClient/SqlClientFactoryTest.cs
+ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs
+ProviderTests/System.Data.SqlClient/SqlCommandTest.cs
+ProviderTests/System.Data.SqlClient/SqlDataReaderTest.cs
+ProviderTests/System.Data.SqlClient/SqlDataAdapterTest.cs
+ProviderTests/System.Data.SqlClient/SqlTransactionTest.cs
+ProviderTests/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs
+ProviderTests/System.Data.SqlClient/SqlConnectionTest.cs
+ProviderTests/System.Data.SqlClient/SqlParameterTest.cs
+ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs
\ No newline at end of file
index 759282b00ac1a8d0491172609686f646e1ef53c2..829efab65bf097a49eea4b1dd3a29d21aecfb383 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_CONFIGURATION
+
 using System;
 using System.Collections;
 using System.Configuration;
 using System.Globalization;
 using System.Xml;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        internal sealed class ConnectionConfig
        {
@@ -110,3 +112,5 @@ namespace MonoTests.System.Data
                }
        }
 }
+
+#endif
\ No newline at end of file
index 9eb1664b7fe6bee0d885d195f3f8f57d13edb47e..29028c7859c2441670d2bddd00cf06e23ae2b04f 100644 (file)
 // SOFTWARE.
 
 using System;
-using System.Configuration;
+using System.Collections.Generic;
 using System.Data;
 using System.Data.Common;
+#if !NO_ODBC
+using System.Data.Odbc;
+#endif
+using System.Data.SqlClient;
+using System.IO;
+using System.Linq;
+using System.Text.RegularExpressions;
+using NUnit.Framework;
 
-
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        public class ConnectionManager
        {
-               private static ConnectionManager Instance;
-               private DbConnection _connection;
-               private string _connectionString;
-               private EngineConfig _engine;
+               private static ConnectionManager instance;
+               private ConnectionHolder<SqlConnection> sql;
+
+               private const string OdbcEnvVar = "SYSTEM_DATA_ODBC";
+               private const string SqlEnvVar = "SYSTEM_DATA_MSSQL";
 
-               static ConnectionManager () 
+               private ConnectionManager ()
                {
-                       Instance = new ConnectionManager ();
+                       //Environment.SetEnvironmentVariable(OdbcEnvVar, @"Driver={MySQL ODBC 5.3 Unicode Driver};server=127.0.0.1;uid=sa;pwd=qwerty123;";
+                       //Environment.SetEnvironmentVariable(SqlEnvVar, @"server=127.0.0.1;database=master;user id=sa;password=qwerty123";
+
+                       // Generate a random db name
+                       DatabaseName = "monotest" + Guid.NewGuid().ToString().Substring(0, 7);
+
+                       sql = CreateSqlConfig (SqlEnvVar);
+                       if (sql != null)
+                               CreateMssqlDatabase();
+                       
+#if !NO_ODBC
+                       odbc = CreateOdbcConfig (OdbcEnvVar);
+                       if (odbc != null)
+                               CreateMysqlDatabase();
+#endif
                }
 
-               private ConnectionManager ()
+               static ConnectionHolder<SqlConnection> CreateSqlConfig (string envVarName)
+               {
+                       string connectionString = Environment.GetEnvironmentVariable (envVarName);
+                       if (string.IsNullOrEmpty (connectionString))
+                               return null;
+
+                       SqlConnection connection;
+#if MOBILE
+                       connection = new SqlConnection ();
+#else
+                       DbProviderFactory factory = DbProviderFactories.GetFactory ("System.Data.SqlClient");
+                       connection = (SqlConnection)factory.CreateConnection ();
+#endif
+
+                       var engine = new EngineConfig {
+                               Type = EngineType.SQLServer,
+                               ClientVersion = 9,
+                               QuoteCharacter = "&quot;",
+                               SupportsMicroseconds = true,
+                               SupportsUniqueIdentifier = true,
+                               SupportsTimestamp = true,
+                       };
+
+                       return new ConnectionHolder<SqlConnection> (engine, connection, connectionString);
+               }
+
+#if !NO_ODBC
+               static ConnectionHolder<OdbcConnection> CreateOdbcConfig (string envVarName)
+               {
+                       string connectionString = Environment.GetEnvironmentVariable (envVarName);
+                       if (string.IsNullOrEmpty (connectionString))
+                               return null;
+
+                       DbProviderFactory factory = DbProviderFactories.GetFactory ("System.Data.Odbc");
+                       var connection = (OdbcConnection)factory.CreateConnection ();
+
+                       var engine = new EngineConfig {
+                               Type = EngineType.MySQL,
+                               QuoteCharacter = "`",
+                               RemovesTrailingSpaces = true,
+                               EmptyBinaryAsNull = true,
+                               SupportsDate = true,
+                               SupportsTime = true
+                       };
+
+                       return new ConnectionHolder<OdbcConnection> (engine, connection, connectionString);
+               }
+#endif
+
+               private void CreateMssqlDatabase()
                {
-                       string connection_name = Environment.GetEnvironmentVariable ("PROVIDER_TESTS_CONNECTION");
-                       if (connection_name == null || connection_name.Length == 0)
-                               throw new ArgumentException ("PROVIDER_TESTS_CONNECTION environment variable is not set.");
-
-                       ConnectionConfig [] connections = (ConnectionConfig [])
-                               ConfigurationManager.GetSection ("providerTests");
-                       foreach (ConnectionConfig connConfig in connections) {
-                               if (connConfig.Name != connection_name)
-                                       continue;
-
-                               _connectionString = connConfig.ConnectionString;
-                               DbProviderFactory factory = DbProviderFactories.GetFactory (
-                                       connConfig.Factory);
-                               _connection = factory.CreateConnection ();
-                               _connection.ConnectionString = _connectionString;
-                               _connectionString = _connection.ConnectionString;
-                               _engine = connConfig.Engine;
-                               return;
+                       DBHelper.ExecuteNonQuery(sql.Connection, $"CREATE DATABASE [{DatabaseName}]");
+                       sql.Connection.ChangeDatabase(DatabaseName);
+
+                       string query = File.ReadAllText(@"Test/ProviderTests/sql/sqlserver.sql");
+
+                       var queries = SplitSqlStatements(query);
+                       foreach (var subQuery in queries)
+                       {
+                               DBHelper.ExecuteNonQuery(sql.Connection, subQuery);
                        }
+               }
+
+#if !NO_ODBC
+               private void CreateMysqlDatabase()
+               {
+                       DBHelper.ExecuteNonQuery(odbc.Connection, $"CREATE DATABASE {DatabaseName}");
+                       odbc.Connection.ChangeDatabase(DatabaseName);
+                       odbc.ConnectionString += $"database={DatabaseName}";
 
-                       throw new ArgumentException ("Connection '" + connection_name + "' not found.");
+                       string query = File.ReadAllText("Test/ProviderTests/sql/MySQL_5.sql");
+
+                       var groups = query.Replace("delimiter ", "")
+                               .Split(new[] { "//\n" }, StringSplitOptions.RemoveEmptyEntries);
+
+                       foreach (var subQuery in groups[0].Split(new[] { ";" }, StringSplitOptions.RemoveEmptyEntries).Concat(groups.Skip(1)))
+                       {
+                               DBHelper.ExecuteNonQuery(odbc.Connection, subQuery);
+                       }
                }
+#endif
 
-               public static ConnectionManager Singleton {
-                       get {return Instance;}
+               private void DropMssqlDatabase()
+               {
+                       sql.Connection.ChangeDatabase("master");
+                       string query = $"ALTER DATABASE [{DatabaseName}] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;\nDROP DATABASE [{DatabaseName}]";
+                       DBHelper.ExecuteNonQuery(sql.Connection, query);
                }
 
-               public
-               DbConnection
-               Connection {
-                       get {return _connection;}
+#if !NO_ODBC
+               private void DropMysqlDatabase()
+               {
+                       string query = $"DROP DATABASE [{DatabaseName}]";
+                       DBHelper.ExecuteNonQuery(odbc.Connection, query);
                }
+#endif
 
-               public string ConnectionString {
-                       get {return _connectionString;}
+               // Split SQL script by "GO" statements
+               private static IEnumerable<string> SplitSqlStatements(string sqlScript)
+               {
+                       var statements = Regex.Split(sqlScript,
+                                       $@"^[\t ]*GO[\t ]*\d*[\t ]*(?:--.*)?$",
+                                       RegexOptions.Multiline | RegexOptions.IgnorePatternWhitespace | RegexOptions.IgnoreCase);
+                       return statements.Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Trim(' ', '\r', '\n'));
                }
 
-               internal EngineConfig Engine {
-                       get { return _engine; }
+               public static ConnectionManager Instance => instance ?? (instance = new ConnectionManager());
+
+               public string DatabaseName { get; }
+
+#if !NO_ODBC
+
+               private ConnectionHolder<OdbcConnection> odbc;
+
+               public ConnectionHolder<OdbcConnection> Odbc
+               {
+                       get
+                       {
+                               if (odbc == null)
+                                       Assert.Ignore($"{OdbcEnvVar} environment variable is not set");
+                               return odbc;
+                       }
+               }
+#endif
+
+               public ConnectionHolder<SqlConnection> Sql
+               {
+                       get
+                       {
+                               if (sql == null)
+                                       Assert.Ignore($"{SqlEnvVar} environment variable is not set");
+                               return sql;
+                       }
                }
 
-               public void OpenConnection ()
+               public void Close()
                {
-                       if (!(_connection.State == ConnectionState.Closed || _connection.State == ConnectionState.Broken))
-                               _connection.Close ();
-                       _connection.ConnectionString = _connectionString;
-                       _connection.Open ();
+                       sql?.CloseConnection();
+#if !NO_ODBC                   
+                       odbc?.CloseConnection();
+#endif
                }
+       }
+
+       public class ConnectionHolder<TConnection> where TConnection : DbConnection
+       {
+               private TConnection connection;
+
+               public EngineConfig EngineConfig { get; }
+
+               public TConnection Connection
+               {
+                       get
+                       {
+                               if (!(connection.State == ConnectionState.Closed || 
+                                       connection.State == ConnectionState.Broken))
+                                       connection.Close();
+                               connection.ConnectionString = ConnectionString;
+                               connection.Open();
+                               return connection;
+                       }
+               }
+
+               public void CloseConnection()
+               {
+                       if (connection != null && connection.State != ConnectionState.Closed)
+                               connection.Close();
+               }
+
+               public string ConnectionString { get; set; }
 
-               public void CloseConnection ()
+               public ConnectionHolder(EngineConfig engineConfig, TConnection connection, string connectionString)
                {
-                       if (_connection != null && _connection.State != ConnectionState.Closed)
-                               _connection.Close ();
+                       EngineConfig = engineConfig;
+                       this.connection = connection;
+                       ConnectionString = connectionString;
                }
        }
 }
index 3170c9c1261818e7009e63967ae906af7bbec7f8..4ef4a0b6c41c5dd07b2f6fe977b886068ea12888 100644 (file)
 
 using System;
 using System.Data;
-using System.Data.Common;
 using System.Text;
 
-using Mono.Data;
-
-using NUnit.Framework;
-
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        public sealed class DBHelper
        {
index d19bb10d40d3601f532536d36f4e0887b1fb12cc..2e1550d30bc458da5a527e3da7107e711a41d985 100644 (file)
@@ -30,7 +30,7 @@ using System;
 using System.Data;
 using System.Data.SqlClient;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        public class DataProvider
        {
@@ -47,7 +47,7 @@ namespace MonoTests.System.Data
                        query += "Select * from datetime_family order by id ASC;";
 
                        SqlDataAdapter adapter = new SqlDataAdapter (query,
-                               ConnectionManager.Singleton.ConnectionString);
+                               ConnectionManager.Instance.Sql.ConnectionString);
                        adapter.TableMappings.Add ("Table", "numeric_family");
                        adapter.TableMappings.Add ("Table1", "string_family");
                        adapter.TableMappings.Add ("Table2", "binary_family");
index e7765c3450fd20b3b3ba843da1cdc103ebc8ea96..6b426124ba142c9fe84a9fe703f4d776636cdeb9 100644 (file)
 //
 
 using System;
-using System.Configuration;
 using System.Globalization;
 using System.Xml;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
-       internal sealed class EngineConfig
+       public sealed class EngineConfig
        {
                private string name;
                private string quoteCharacter;
@@ -48,7 +47,7 @@ namespace MonoTests.System.Data
                private EngineType type;
                private int clientVersion;
 
-               private EngineConfig ()
+               public EngineConfig ()
                {
                }
 
@@ -61,42 +60,52 @@ namespace MonoTests.System.Data
                /// </summary>
                public string QuoteCharacter {
                        get { return quoteCharacter; }
+                       set { quoteCharacter = value; }
                }
 
                public EngineType Type {
                        get { return type; }
+                       set { type = value; }
                }
 
                public bool RemovesTrailingSpaces {
                        get { return removesTrailingSpaces; }
+                       set { removesTrailingSpaces = value; }
                }
 
                public bool EmptyBinaryAsNull {
                        get { return emptyBinaryAsNull; }
+                       set { emptyBinaryAsNull = value; }
                }
 
                public bool SupportsMicroseconds {
                        get { return supportsMicroseconds; }
+                       set { supportsMicroseconds = value; }
                }
 
                public bool SupportsUniqueIdentifier {
                        get { return supportsUniqueIdentifier; }
+                       set { supportsUniqueIdentifier = value; }
                }
 
                public bool SupportsDate {
                        get { return supportsDate; }
+                       set { supportsDate = value; }
                }
 
                public bool SupportsTime {
                        get { return supportsTime; }
+                       set { supportsTime = value; }
                }
 
                public bool SupportsTimestamp {
                        get { return supportsTimestamp; }
+                       set { supportsTimestamp = value; }
                }
 
                public int ClientVersion {
                       get { return clientVersion; }
+                      set { clientVersion = value; }
                }
 
                public static EngineConfig FromXml (XmlNode config)
@@ -183,14 +192,14 @@ namespace MonoTests.System.Data
                        string msg = string.Format (CultureInfo.InvariantCulture,
                                        "Invalid value '{0}' for attribute {1}.",
                                        value, name);
-                       throw new ConfigurationErrorsException (msg, cause, node);
+                       throw new ArgumentOutOfRangeException (msg, cause);
                }
 
                static Exception CreateAttributeMissingException (string name, XmlNode node)
                {
                        string msg = string.Format (CultureInfo.InvariantCulture,
                                "Missing '{0}' attribute.", name);
-                       throw new ConfigurationErrorsException (msg, node);
+                       throw new ArgumentException (msg);
                }
        }
 }
index bcd6a72d0c8b0a2a57ba114f6591c1a073cd2997..b172d5f25bf2b6671d878f13ac8647e4b64fde4e 100644 (file)
@@ -26,7 +26,7 @@
 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 // SOFTWARE.
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        public enum EngineType
        {
index fd7c01383d3e48be60057a134efdaf2f65f094aa..cb3ba28fee1dceebf54e991f72959360f1405175 100644 (file)
@@ -27,6 +27,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_CONFIGURATION
+
 using System;
 using System.Collections;
 using System.Configuration;
@@ -34,7 +36,7 @@ using System.Globalization;
 using System.Text;
 using System.Xml;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        class ProviderTestsConfigurationHandler : IConfigurationSectionHandler
        {
@@ -72,3 +74,5 @@ namespace MonoTests.System.Data
                }
        }
 }
+
+#endif
\ No newline at end of file
index 54515b893190f214ae7cfed02fb26bf0f7c6a866..35d9fdd783662c6e302cd6a2e54449fa70aa9a0a 100644 (file)
 using System;
 using System.Data;
 using System.Data.Common;
-using System.Data.Odbc;
 using System.Data.SqlClient;
 using System.Data.SqlTypes;
 using System.Globalization;
 using System.Text;
-
-using Mono.Data;
-
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        [TestFixture]
-       [Category ("odbc")]
        [Category ("sqlserver")]
        public class DataReaderTest
        {
@@ -88,17 +83,15 @@ namespace MonoTests.System.Data
                [SetUp]
                public void SetUp ()
                {
-                       conn = ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = conn.CreateCommand ();
                }
 
                [TearDown]
                public void TearDown ()
                {
-                       if (cmd != null)
-                               cmd.Dispose ();
-                       ConnectionManager.Singleton.CloseConnection ();
+                       cmd?.Dispose ();
+                       ConnectionManager.Instance.Close();
                }
 
                [Test]
@@ -252,6 +245,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetChars_Reader_NoData ()
                {
                        //Console.WriteLine ("GetChars_Reader_NoData - first_executereader");
@@ -261,9 +255,8 @@ namespace MonoTests.System.Data
                                try {
                                        rdr.GetChars (-1, 0, (char []) null, 0, 0);
                                        Assert.Fail ("#A1");
-                               } catch (InvalidOperationException ex) {
+                               } catch (IndexOutOfRangeException ex) {
                                        // No data exists for the row/column
-                                       Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2");
                                        Assert.IsNull (ex.InnerException, "#A3");
                                        Assert.IsNotNull (ex.Message, "#A4");
                                }
@@ -273,9 +266,8 @@ namespace MonoTests.System.Data
                                try {
                                        rdr.GetChars (-1, 0, (char []) null, 0, 0);
                                        Assert.Fail ("#C1");
-                               } catch (InvalidOperationException ex) {
+                               } catch (IndexOutOfRangeException ex) {
                                        // No data exists for the row/column
-                                       Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNull (ex.InnerException, "#C3");
                                        Assert.IsNotNull (ex.Message, "#C4");
                                }
@@ -291,7 +283,7 @@ namespace MonoTests.System.Data
                                cmd.CommandText = "SELECT * FROM employee WHERE lname='kumar'";
                                reader = cmd.ExecuteReader ();
 
-                               switch (ConnectionManager.Singleton.Engine.Type) {
+                               switch (ConnectionManager.Instance.Sql.EngineConfig.Type) {
                                case EngineType.SQLServer:
                                        Assert.AreEqual ("int", reader.GetDataTypeName (0), "#1");
                                        break;
@@ -640,7 +632,7 @@ namespace MonoTests.System.Data
                [Test]
                public void GetSchemaTable_Command_Disposed ()
                {
-                       if (RunningOnMono && (conn is OdbcConnection))
+                       if (RunningOnMono)
                                Assert.Ignore ("Our statement handle is closed when we dispose the (Odbc)Command");
 
                        IDataReader reader = null;
@@ -1007,7 +999,7 @@ namespace MonoTests.System.Data
                                cmd.CommandText = "select id, fname, id + 20 as plustwenty from employee";
                                reader = cmd.ExecuteReader (CommandBehavior.SchemaOnly | CommandBehavior.KeyInfo);
                                Assert.IsFalse (reader.IsClosed, "#1");
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                                Assert.IsTrue (reader.IsClosed, "#2");
                        } finally {
                                if (reader != null)
@@ -2405,6 +2397,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetBytes_DataIndex_Overflow ()
                {
                        cmd.CommandText = "SELECT type_blob FROM binary_family where id = 2";
@@ -2586,6 +2579,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetValues_Reader_Closed ()
                {
                        //Console.WriteLine ("GetValues_Reader_Closed - first_executereader");
@@ -2598,9 +2592,8 @@ namespace MonoTests.System.Data
                                try {
                                        rdr.GetValues ((object []) null);
                                        Assert.Fail ("#1");
-                               } catch (InvalidOperationException ex) {
+                               } catch (ArgumentNullException ex) {
                                        // No data exists for the row/column
-                                       Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2");
                                        Assert.IsNull (ex.InnerException, "#3");
                                        Assert.IsNotNull (ex.Message, "#4");
                                }
@@ -2608,6 +2601,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetValues_Reader_NoData ()
                {
                        //Console.WriteLine ("GetValues_Reader_NoData - first_executereader");                  
@@ -2617,9 +2611,8 @@ namespace MonoTests.System.Data
                                try {
                                        rdr.GetValues ((object []) null);
                                        Assert.Fail ("#A1");
-                               } catch (InvalidOperationException ex) {
+                               } catch (ArgumentNullException ex) {
                                        // No data exists for the row/column
-                                       Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2");
                                        Assert.IsNull (ex.InnerException, "#A3");
                                        Assert.IsNotNull (ex.Message, "#A4");
                                }
@@ -2629,9 +2622,8 @@ namespace MonoTests.System.Data
                                try {
                                        rdr.GetValues ((object []) null);
                                        Assert.Fail ("#C1");
-                               } catch (InvalidOperationException ex) {
+                               } catch (ArgumentNullException ex) {
                                        // No data exists for the row/column
-                                       Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2");
                                        Assert.IsNull (ex.InnerException, "#C3");
                                        Assert.IsNotNull (ex.Message, "#C4");
                                }
index 65b0952b1fbad7eb076e99b373ec41dfac805070..e93f9fbccab13a260cbb6666fa426f70db3b59ac 100644 (file)
 using System;
 using System.Data;
 using System.Data.Common;
-using System.Data.Odbc;
 using System.Data.SqlClient;
 using System.Data.SqlTypes;
 using System.Globalization;
-
-using Mono.Data;
-
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        [TestFixture]
-       [Category ("odbc")]
        [Category ("sqlserver")]
        public class DbDataReaderTest
        {
@@ -53,19 +48,16 @@ namespace MonoTests.System.Data
                [SetUp]
                public void SetUp ()
                {
-                       conn = ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = conn.CreateCommand ();
                }
 
                [TearDown]
                public void TearDown ()
                {
-                       if (cmd != null)
-                               cmd.Dispose ();
-                       if (rdr != null)
-                               rdr.Dispose ();
-                       ConnectionManager.Singleton.CloseConnection ();
+                       cmd?.Dispose ();
+                       rdr?.Dispose ();
+                       ConnectionManager.Instance.Close ();
                }
 
                [Test]
index 79903b490a94ce50249e5e8b28501980143f8b30..aa430adf701100a6f3598b142cd09bf04bc6b8a3 100644 (file)
 using System;
 using System.Data;
 using System.Data.Common;
-
-using Mono.Data;
-
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected
 {
        [TestFixture]
        [Category ("odbc"), Category ("sqlserver")]
@@ -48,8 +45,7 @@ namespace MonoTests.System.Data
                [SetUp]
                public void SetUp ()
                {
-                       conn = ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = conn.CreateCommand ();
                }
 
@@ -58,7 +54,7 @@ namespace MonoTests.System.Data
                {
                        if (cmd != null)
                                cmd.Dispose ();
-                       ConnectionManager.Singleton.CloseConnection ();
+                       ConnectionManager.Instance.Close ();
                }
 
                [Test]
@@ -167,9 +163,8 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (new byte [] { 0x32, 0x56, 0x00, 0x44, 0x22 }, val, "#A3");
                        }
 
-                       ConnectionManager.Singleton.CloseConnection ();
-                       conn = ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       ConnectionManager.Instance.Sql.CloseConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
 
                        using (IDataReader reader = cmd.ExecuteReader (behavior)) {
                                Assert.IsTrue (reader.Read (), "#B1");
@@ -185,9 +180,9 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (reader.Read (), "#C");
                        }
 
-                       ConnectionManager.Singleton.CloseConnection ();
-                       conn = ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       ConnectionManager.Instance.Sql.CloseConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
+
 
                        using (IDataReader reader = cmd.ExecuteReader (behavior)) {
                                Assert.IsTrue (reader.Read (), "#D");
index bc9fc67bcc93c9929e3cb8b6df59b413ef7f02cf..aae0e84b04933ca7e63d21d70049cbba2be6ae9b 100644 (file)
@@ -14,10 +14,13 @@ System.Data.Odbc/OdbcParameterCollectionTest.cs
 ProviderIndependant/DataReaderTest.cs
 ProviderIndependant/DbDataReaderTest.cs
 ProviderIndependant/IDbCommandTest.cs
+System.Data.SqlClient/SqlClientFactoryTest.cs
 System.Data.SqlClient/SqlCommandBuilderTest.cs
 System.Data.SqlClient/SqlCommandTest.cs
 System.Data.SqlClient/SqlDataReaderTest.cs
 System.Data.SqlClient/SqlDataAdapterTest.cs
 System.Data.SqlClient/SqlTransactionTest.cs
+System.Data.SqlClient/SqlConnectionStringBuilderTest.cs
 System.Data.SqlClient/SqlConnectionTest.cs
 System.Data.SqlClient/SqlParameterTest.cs
+System.Data.SqlClient/SqlParameterCollectionTest.cs
\ No newline at end of file
index a9a67fbd2a881b51600ba8c78b9ef75b6d37cfc2..4583ca8fe1d41233802d95b1d1fe071cfb0d8d34 100644 (file)
 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 // SOFTWARE.
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Common;
 using System.Data.Odbc;
-using Mono.Data;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected.Odbc
 {
        [TestFixture]
        [Category ("odbc")]
@@ -45,7 +46,7 @@ namespace MonoTests.System.Data
                [Test]
                public void GetInsertCommandTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        OdbcCommand cmd = null;
 
                        try {
@@ -94,17 +95,17 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetInsertCommandTestWithExpression ()
                {
-                       if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
+                       if (ConnectionManager.Instance.Odbc.EngineConfig.Type == EngineType.MySQL)
                                Assert.Ignore ("Schema info from MySQL is incomplete");
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        OdbcCommand cmd = null;
 
                        try {
@@ -123,14 +124,14 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetUpdateCommandTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        OdbcCommand cmd = null;
 
                        try {
@@ -177,7 +178,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -185,7 +186,7 @@ namespace MonoTests.System.Data
                [Ignore ("FIXME: Auto SQL generation during Update requires a valid SelectCommand")]
                public void GetUpdateCommandDBConcurrencyExceptionTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
                                string selectQuery = "select id, lname from employee where id = 3";
                                OdbcDataAdapter da = new OdbcDataAdapter (selectQuery, conn);
@@ -214,14 +215,15 @@ namespace MonoTests.System.Data
                                        Assert.AreEqual (1, ex.RowCount, "#6");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetInsertCommandTest_option_true ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
                                string selectQuery = "select id, lname from employee where id = 3";
                                OdbcDataAdapter da = new OdbcDataAdapter (selectQuery, conn);
@@ -236,14 +238,14 @@ namespace MonoTests.System.Data
                                Assert.AreSame (conn, cmd.Connection, "#2");
                                AssertInsertParameters (cmd, "#3:");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetInsertCommandTest_option_false ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
                                string selectQuery = "select id, lname from employee where id = 3";
                                OdbcDataAdapter da = new OdbcDataAdapter (selectQuery, conn);
@@ -258,14 +260,15 @@ namespace MonoTests.System.Data
                                Assert.AreSame (conn, cmd.Connection, "#2");
                                AssertInsertParameters (cmd, "#3:");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetUpdateCommandTest_option_true ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
                                string selectQuery = "select id, lname, id+1 as next_id from employee where id = 3";
                                OdbcDataAdapter da = new OdbcDataAdapter (selectQuery, conn);
@@ -280,14 +283,14 @@ namespace MonoTests.System.Data
                                Assert.AreSame (conn, cmd.Connection, "#2");
                                AssertUpdateParameters (cmd, "#3:");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetUpdateCommandTest_option_false ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
                                string selectQuery = "select id, lname, id+1 as next_id from employee where id = 3";
                                OdbcDataAdapter da = new OdbcDataAdapter (selectQuery, conn);
@@ -302,14 +305,15 @@ namespace MonoTests.System.Data
                                Assert.AreSame (conn, cmd.Connection, "#2");
                                AssertUpdateParameters (cmd, "#3:");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetDeleteCommandTest_option_true ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
                                string selectQuery = "select id, lname, id+1 as next_id from employee where id = 3";
                                OdbcDataAdapter da = new OdbcDataAdapter (selectQuery, conn);
@@ -324,14 +328,14 @@ namespace MonoTests.System.Data
                                Assert.AreSame (conn, cmd.Connection, "#2");
                                AssertDeleteParameters (cmd, "#3:");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetDeleteCommandTest_option_false ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
                                string selectQuery = "select id, lname, id+1 as next_id from employee where id = 3";
                                OdbcDataAdapter da = new OdbcDataAdapter (selectQuery, conn);
@@ -346,14 +350,14 @@ namespace MonoTests.System.Data
                                Assert.AreSame (conn, cmd.Connection, "#2");
                                AssertDeleteParameters (cmd, "#3:");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetDeleteCommandTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        OdbcCommand cmd = null;
 
                        try {
@@ -401,7 +405,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -409,7 +413,7 @@ namespace MonoTests.System.Data
                [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")]
                public void QuotePrefix_DeleteCommand_Generated ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        OdbcCommand cmd = null;
 
@@ -439,7 +443,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -447,7 +451,7 @@ namespace MonoTests.System.Data
                [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")]
                public void QuotePrefix_InsertCommand_Generated ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        OdbcCommand cmd = null;
 
@@ -477,7 +481,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -485,7 +489,7 @@ namespace MonoTests.System.Data
                [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")]
                public void QuotePrefix_UpdateCommand_Generated ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        OdbcCommand cmd = null;
 
@@ -515,7 +519,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -523,7 +527,7 @@ namespace MonoTests.System.Data
                [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")]
                public void QuoteSuffix_DeleteCommand_Generated ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        OdbcCommand cmd = null;
 
@@ -553,7 +557,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -561,7 +565,7 @@ namespace MonoTests.System.Data
                [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")]
                public void QuoteSuffix_InsertCommand_Generated ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        OdbcCommand cmd = null;
 
@@ -591,7 +595,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -599,7 +603,7 @@ namespace MonoTests.System.Data
                [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")]
                public void QuoteSuffix_UpdateCommand_Generated ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        OdbcCommand cmd = null;
 
@@ -629,7 +633,7 @@ namespace MonoTests.System.Data
                        } finally {
                                if (cmd != null)
                                        cmd.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -637,10 +641,9 @@ namespace MonoTests.System.Data
                public void QuoteIdentifier2 ()
                {
                        OdbcCommandBuilder cb;
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
-                       string quote_char = ConnectionManager.Singleton.Engine.QuoteCharacter;
+                       string quote_char = ConnectionManager.Instance.Odbc.EngineConfig.QuoteCharacter;
 
                        try {
                                cb = new OdbcCommandBuilder ();
@@ -708,7 +711,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (" ", cb.QuoteIdentifier (" ", conn), "#E11");
                                Assert.AreEqual ("\r", cb.QuoteIdentifier ("\r", conn), "#E12");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -719,7 +722,7 @@ namespace MonoTests.System.Data
                        Assert.AreEqual ("p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)");
                        Assert.AreEqual ("id", cmd.Parameters [0].SourceColumn, prefix + "SourceColumn (0)");
                        Assert.IsNull (cmd.Parameters [0].Value, prefix + "Value (0)");
-                       Assert.AreEqual (DbType.AnsiString, cmd.Parameters [1].DbType, prefix + "DbType (1)");
+                       Assert.AreEqual (DbType.String, cmd.Parameters [1].DbType, prefix + "DbType (1)");
                        Assert.AreEqual ("p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)");
                        Assert.AreEqual ("lname", cmd.Parameters [1].SourceColumn, prefix + "SourceColumn (1)");
                        Assert.IsNull (cmd.Parameters [1].Value, prefix + "Value (1)");
@@ -732,7 +735,7 @@ namespace MonoTests.System.Data
                        Assert.AreEqual ("p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)");
                        Assert.AreEqual ("id", cmd.Parameters [0].SourceColumn, prefix + "SourceColumn (0)");
                        Assert.IsNull (cmd.Parameters [0].Value, prefix + "Value (0)");
-                       Assert.AreEqual (DbType.AnsiString, cmd.Parameters [1].DbType, prefix + "DbType (1)");
+                       Assert.AreEqual (DbType.String, cmd.Parameters [1].DbType, prefix + "DbType (1)");
                        Assert.AreEqual ("p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)");
                        Assert.AreEqual ("lname", cmd.Parameters [1].SourceColumn, prefix + "SourceColumn (1)");
                        Assert.IsNull (cmd.Parameters [1].Value, prefix + "Value (1)");
@@ -744,7 +747,7 @@ namespace MonoTests.System.Data
                        Assert.AreEqual ("p4", cmd.Parameters [3].ParameterName, prefix + "ParameterName (3)");
                        Assert.AreEqual ("lname", cmd.Parameters [3].SourceColumn, prefix + "SourceColumn (3)");
                        Assert.AreEqual (1, cmd.Parameters [3].Value, prefix + "Value (3)");
-                       Assert.AreEqual (DbType.AnsiString, cmd.Parameters [4].DbType, prefix + "DbType (4)");
+                       Assert.AreEqual (DbType.String, cmd.Parameters [4].DbType, prefix + "DbType (4)");
                        Assert.AreEqual ("p5", cmd.Parameters [4].ParameterName, prefix + "ParameterName (4)");
                        Assert.AreEqual ("lname", cmd.Parameters [4].SourceColumn, prefix + "SourceColumn (4)");
                        Assert.IsNull (cmd.Parameters [4].Value, prefix + "Value (4)");
@@ -761,7 +764,7 @@ namespace MonoTests.System.Data
                        Assert.AreEqual ("p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)");
                        Assert.AreEqual ("lname", cmd.Parameters [1].SourceColumn, prefix + "SourceColumn (1)");
                        Assert.AreEqual (1, cmd.Parameters [1].Value, prefix + "Value (1)");
-                       Assert.AreEqual (DbType.AnsiString, cmd.Parameters [2].DbType, prefix + "DbType (2)");
+                       Assert.AreEqual (DbType.String, cmd.Parameters [2].DbType, prefix + "DbType (2)");
                        Assert.AreEqual ("p3", cmd.Parameters [2].ParameterName, prefix + "ParameterName (2)");
                        Assert.AreEqual ("lname", cmd.Parameters [2].SourceColumn, prefix + "SourceColumn (2)");
                        Assert.IsNull (cmd.Parameters [2].Value, prefix + "Value (2)");
@@ -772,3 +775,5 @@ namespace MonoTests.System.Data
                // FIXME: Add test for ContinueUpdateOnError property
        }
 }
+
+#endif
\ No newline at end of file
index 1a93a511d5faf42ef49c8219fce1df85e81e0d6f..27826d094b6efa2c5d464f63fb86624363e9704d 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Common;
 using System.Data.Odbc;
-using Mono.Data;
-
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+
+namespace MonoTests.System.Data.Connected.Odbc
 {
        [TestFixture]
        [Category ("odbc")]
@@ -48,8 +49,7 @@ namespace MonoTests.System.Data
                [SetUp]
                public void SetUp ()
                {
-                       conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Odbc.Connection;
                        cmd = conn.CreateCommand ();
                }
 
@@ -58,7 +58,7 @@ namespace MonoTests.System.Data
                {
                        if (cmd != null)
                                cmd.Dispose ();
-                       ConnectionManager.Singleton.CloseConnection ();
+                       ConnectionManager.Instance.Close ();
                }
 
                [Test]
@@ -150,7 +150,7 @@ namespace MonoTests.System.Data
                        cmd.CommandText = "select count(*) from employee where id <= ?;";
                        cmd.Parameters.Add ("@un", OdbcType.Int).Value = 3;
                        ret = cmd.ExecuteNonQuery ();
-                       switch (ConnectionManager.Singleton.Engine.Type) {
+                       switch (ConnectionManager.Instance.Odbc.EngineConfig.Type) {
                        case EngineType.SQLServer:
                                Assert.AreEqual (-1, ret, "#1");
                                break;
@@ -167,7 +167,7 @@ namespace MonoTests.System.Data
                        cmd.CommandText = "select * from employee where id <= ?;";
                        cmd.Parameters.Add ("@un", OdbcType.Int).Value = 3;
                        ret = cmd.ExecuteNonQuery ();
-                       switch (ConnectionManager.Singleton.Engine.Type) {
+                       switch (ConnectionManager.Instance.Odbc.EngineConfig.Type) {
                        case EngineType.SQLServer:
                                Assert.AreEqual (-1, ret, "#2");
                                break;
@@ -183,7 +183,7 @@ namespace MonoTests.System.Data
                        cmd.CommandType = CommandType.Text;
                        cmd.CommandText = "select * from employee where id <= 3;";
                        ret = cmd.ExecuteNonQuery ();
-                       switch (ConnectionManager.Singleton.Engine.Type) {
+                       switch (ConnectionManager.Instance.Odbc.EngineConfig.Type) {
                        case EngineType.SQLServer:
                                Assert.AreEqual (-1, ret, "#3");
                                break;
@@ -297,3 +297,5 @@ namespace MonoTests.System.Data
                }
        }
 }
+
+#endif
\ No newline at end of file
index 8d630a8343f3a6553bb172b01adaac201eba9b85..02c7c9a4ca3cbd3bbfc0c57f8b88894815236641 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Odbc;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.Odbc
+namespace MonoTests.System.Data.Connected.Odbc
 {
        [TestFixture]
        [Category ("odbc")]
@@ -41,9 +43,9 @@ namespace MonoTests.System.Data.Odbc
                [Test]
                public void FillTest ()
                {
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       try {
-                               ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
+                       try
+                       {
                                // For this Test, you must create sample table
                                // called person-age, with a non-zero number of rows
                                // and non-zero number of columns
@@ -70,16 +72,17 @@ namespace MonoTests.System.Data.Odbc
                                                                 "#4 column values must not be of size 0");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
+               [Ignore]
                public void InsertUtf8Test ()
                {
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       try {
-                               ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
+                       try
+                       {
                                DoExecuteNonQuery ((OdbcConnection) conn,
                                                   "CREATE TABLE odbc_ins_utf8_test(ival int not null, sval varchar(20))");
                                Assert.AreEqual (DoExecuteNonQuery ((OdbcConnection) conn,
@@ -97,7 +100,7 @@ namespace MonoTests.System.Data.Odbc
                                                 3);
                        } finally {
                                DoExecuteNonQuery ((OdbcConnection) conn, "DROP TABLE odbc_ins_utf8_test");
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -115,3 +118,5 @@ namespace MonoTests.System.Data.Odbc
                }
        }
 }
+
+#endif
\ No newline at end of file
index 2b8bf0b069cb4b561b09c657c5d811bb64e49999..a91b13eeca47a5048fbd0ff73d3d0096a24dc3dc 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Common;
 using System.Data.Odbc;
 using System.Globalization;
 using System.Text;
-
-using Mono.Data;
-
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+
+namespace MonoTests.System.Data.Connected.Odbc
 {
        [TestFixture]
        [Category ("odbc")]
@@ -84,8 +84,7 @@ namespace MonoTests.System.Data
                [SetUp]
                public void SetUp ()
                {
-                       conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Odbc.Connection;
                        cmd = conn.CreateCommand ();
                }
 
@@ -94,7 +93,7 @@ namespace MonoTests.System.Data
                {
                        if (cmd != null)
                                cmd.Dispose ();
-                       ConnectionManager.Singleton.CloseConnection ();
+                       ConnectionManager.Instance.Close ();
                }
 
                [Test]
@@ -198,7 +197,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (totalsize, ret, "#C1");
                        }
 
-                       ConnectionManager.Singleton.CloseConnection ();
+                       ConnectionManager.Instance.Odbc.CloseConnection ();
                }
 
                [Test]
@@ -323,7 +322,7 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (pkRow.IsNull ("BaseSchemaName"), "#A:BaseSchemaName_IsNull");
                                Assert.AreEqual (DBNull.Value, pkRow ["BaseSchemaName"], "#A:BaseSchemaName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseCatalogName"), "#A:BaseCatalogName_IsNull");
-                               Assert.AreEqual ("monotest", pkRow ["BaseCatalogName"], "#A:BaseCatalogName_Value");
+                               Assert.AreEqual (ConnectionManager.Instance.DatabaseName, pkRow ["BaseCatalogName"], "#A:BaseCatalogName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseTableName"), "#A:BaseTableName_IsNull");
                                Assert.AreEqual ("employee", pkRow ["BaseTableName"], "#A:BaseTableName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseColumnName"), "#A:BaseColumnName_IsNull");
@@ -411,7 +410,7 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (pkRow.IsNull ("BaseSchemaName"), "#C:BaseSchemaName_IsNull");
                                Assert.AreEqual (DBNull.Value, pkRow ["BaseSchemaName"], "#C:BaseSchemaName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseCatalogName"), "#C:BaseCatalogName_IsNull");
-                               Assert.AreEqual ("monotest", pkRow ["BaseCatalogName"], "#C:BaseCatalogName_Value");
+                               Assert.AreEqual (ConnectionManager.Instance.DatabaseName, pkRow ["BaseCatalogName"], "#C:BaseCatalogName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseTableName"), "#C:BaseTableName_IsNull");
                                Assert.AreEqual ("employee", pkRow ["BaseTableName"], "#C:BaseTableName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseColumnName"), "#C:BaseColumnName_IsNull");
@@ -502,7 +501,7 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (pkRow.IsNull ("BaseSchemaName"), "#E:BaseSchemaName_IsNull");
                                Assert.AreEqual (DBNull.Value, pkRow ["BaseSchemaName"], "#E:BaseSchemaName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseCatalogName"), "#E:BaseCatalogName_IsNull");
-                               Assert.AreEqual ("monotest", pkRow ["BaseCatalogName"], "#E:BaseCatalogName_Value");
+                               Assert.AreEqual (ConnectionManager.Instance.DatabaseName, pkRow ["BaseCatalogName"], "#E:BaseCatalogName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseTableName"), "#E:BaseTableName_IsNull");
                                Assert.AreEqual ("employee", pkRow ["BaseTableName"], "#E:BaseTableName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseColumnName"), "#E:BaseColumnName_IsNull");
@@ -590,7 +589,7 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (pkRow.IsNull ("BaseSchemaName"), "#G:BaseSchemaName_IsNull");
                                Assert.AreEqual (DBNull.Value, pkRow ["BaseSchemaName"], "#G:BaseSchemaName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseCatalogName"), "#G:BaseCatalogName_IsNull");
-                               Assert.AreEqual ("monotest", pkRow ["BaseCatalogName"], "#G:BaseCatalogName_Value");
+                               Assert.AreEqual (ConnectionManager.Instance.DatabaseName, pkRow ["BaseCatalogName"], "#G:BaseCatalogName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseTableName"), "#G:BaseTableName_IsNull");
                                Assert.AreEqual ("employee", pkRow ["BaseTableName"], "#G:BaseTableName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseColumnName"), "#G:BaseColumnName_IsNull");
@@ -683,7 +682,7 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (pkRow.IsNull ("BaseSchemaName"), "#I:BaseSchemaName_IsNull");
                                Assert.AreEqual (DBNull.Value, pkRow ["BaseSchemaName"], "#I:BaseSchemaName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseCatalogName"), "#I:BaseCatalogName_IsNull");
-                               Assert.AreEqual ("monotest", pkRow ["BaseCatalogName"], "#I:BaseCatalogName_Value");
+                               Assert.AreEqual (ConnectionManager.Instance.DatabaseName, pkRow ["BaseCatalogName"], "#I:BaseCatalogName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseTableName"), "#I:BaseTableName_IsNull");
                                Assert.AreEqual ("employee", pkRow ["BaseTableName"], "#I:BaseTableName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseColumnName"), "#I:BaseColumnName_IsNull");
@@ -771,7 +770,7 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (pkRow.IsNull ("BaseSchemaName"), "#K:BaseSchemaName_IsNull");
                                Assert.AreEqual (DBNull.Value, pkRow ["BaseSchemaName"], "#K:BaseSchemaName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseCatalogName"), "#K:BaseCatalogName_IsNull");
-                               Assert.AreEqual ("monotest", pkRow ["BaseCatalogName"], "#K:BaseCatalogName_Value");
+                               Assert.AreEqual (ConnectionManager.Instance.DatabaseName, pkRow ["BaseCatalogName"], "#K:BaseCatalogName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseTableName"), "#K:BaseTableName_IsNull");
                                Assert.AreEqual ("employee", pkRow ["BaseTableName"], "#K:BaseTableName_Value");
                                Assert.IsFalse (pkRow.IsNull ("BaseColumnName"), "#K:BaseColumnName_IsNull");
@@ -832,7 +831,7 @@ namespace MonoTests.System.Data
                        // MySQL currently does not support output parameters
                        // in its ODBC connector:
                        // http://www.paragon-cs.com/mag/issue3.pdf
-                       if (ConnectionManager.Singleton.Engine.Type != EngineType.SQLServer)
+                       if (ConnectionManager.Instance.Odbc.EngineConfig.Type != EngineType.SQLServer)
                                Assert.Ignore ("MySQL does not (yet) support output parameters using ODBC.");
 
                        IDataReader reader = null;
@@ -923,7 +922,7 @@ namespace MonoTests.System.Data
                [Test]
                public void FindZeroInToStringTest ()
                {
-                       if (ConnectionManager.Singleton.Engine.Type != EngineType.MySQL)
+                       if (ConnectionManager.Instance.Odbc.EngineConfig.Type != EngineType.MySQL)
                                Assert.Ignore ("Only applies to MySQL.");
 
                        IDataReader reader = null;
@@ -999,7 +998,7 @@ namespace MonoTests.System.Data
                [Test]
                public void Bug332404Test ()
                {
-                       if (ConnectionManager.Singleton.Engine.Type != EngineType.MySQL)
+                       if (ConnectionManager.Instance.Odbc.EngineConfig.Type != EngineType.MySQL)
                                Assert.Ignore ("Only applies to MySQL.");
 
                        cmd = new OdbcCommand ("DROP TABLE IF EXISTS odbc_test");
@@ -1026,7 +1025,7 @@ namespace MonoTests.System.Data
                [Test]
                public void Bug332400Test ()
                {
-                       if (ConnectionManager.Singleton.Engine.Type != EngineType.MySQL)
+                       if (ConnectionManager.Instance.Odbc.EngineConfig.Type != EngineType.MySQL)
                                Assert.Ignore ("Only applies to MySQL.");
 
                        cmd = new OdbcCommand ("DROP TABLE IF EXISTS blob_test");
@@ -1051,37 +1050,36 @@ namespace MonoTests.System.Data
                [Test]
                public void Bug419224Test () 
                {
-                       cmd = new OdbcCommand ("DROP TABLE IF EXISTS bug419224test");
+                       cmd = new OdbcCommand ("DROP TABLE IF EXISTS odbc_test");
                        cmd.Connection = conn;
                        cmd.ExecuteNonQuery ();
 
-                       cmd = new OdbcCommand ("CREATE TABLE bug419224test (id_test INTEGER NOT NULL, payload TINYBLOB NOT NULL)");
+                       cmd = new OdbcCommand ("CREATE TABLE odbc_test (id_test INTEGER NOT NULL, payload TINYBLOB NOT NULL)");
                        cmd.Connection = conn;
                        cmd.ExecuteNonQuery ();
 
-                       cmd = new OdbcCommand ("INSERT INTO odbc_test (id_test, payload) VALUES (1, 'test for bug419224)");
+                       cmd = new OdbcCommand ("INSERT INTO odbc_test (id_test, payload) VALUES (1, 'test for bug419224')");
                        cmd.Connection = conn;
                        cmd.ExecuteNonQuery ();
 
-                       OdbcDataAdapter Adaptador = new OdbcDataAdapter ();
+                       OdbcDataAdapter adaptador = new OdbcDataAdapter ();
+                       DataSet lector = new DataSet ();
 
-                       DataSet Lector = new DataSet ();
+                       adaptador.SelectCommand = new OdbcCommand ("SELECT * FROM odbc_test WHERE id_test=1", (OdbcConnection) conn);
+                       adaptador.Fill (lector);
+                       var payload = (byte[])lector.Tables[0].Rows[0]["payload"];
+                       Assert.AreEqual ("test for bug419224", Encoding.UTF8.GetString(payload));
 
-                       Adaptador.SelectCommand = new OdbcCommand ("SELECT * FROM odbc_test WHERE id_test=1", (OdbcConnection) conn);
-                       Adaptador.Fill (Lector);
-                       Assert.AreEqual (Lector.Tables[0].Rows[0]["payload"], 1.2346);
+                       OdbcDataReader newRdr = cmd.ExecuteReader();
 
+                       // tinyblob column index:
+                       int TinyblobIdx = 1;
 
-                       OdbcDataReader NewRdr = cmd.ExecuteReader();
+                       bool read = newRdr.Read();
 
-                       // tinyblob column index:
-                       int TinyblobIdx = 1;
-
-                       bool read = NewRdr.Read();
-
-                       if (read)
-                       {
-                               bool ret = NewRdr.IsDBNull(TinyblobIdx); 
+                       if (read)
+                       {
+                                       bool ret = newRdr.IsDBNull(TinyblobIdx); 
                                Assert.AreEqual (ret, false);
                        }
                }
@@ -1138,3 +1136,5 @@ namespace MonoTests.System.Data
                }
        }
 }
+
+#endif
\ No newline at end of file
index f08c918974e3ea09f82d376fee7daa959979f81b..0cbcad38ec285098a3a94d783435a90bcd77b689 100644 (file)
@@ -28,6 +28,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Text;
 using System.Data;
@@ -35,7 +37,7 @@ using System.Data.Odbc;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.Odbc
+namespace MonoTests.System.Data.Connected.Odbc
 {
        [TestFixture]
        [Category ("odbc")]
@@ -48,8 +50,7 @@ namespace MonoTests.System.Data.Odbc
                [Test]
                public void ParameterLengthTrimTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand cmd = conn.CreateCommand ();
@@ -61,15 +62,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (15, param.Size, "#1");
                                Assert.AreEqual (0, cmd.ExecuteScalar(), "#2");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void InsertTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -105,7 +105,7 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (OdbcType.NVarChar,OdbcCmd.Parameters[1].OdbcType, "#13 Parameters with null value must be of type NVarChar");
                                Assert.AreEqual (OdbcType.Text,OdbcCmd.Parameters[0].OdbcType, "#14 Parameter at index 0 is of type Text");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -116,8 +116,7 @@ namespace MonoTests.System.Data.Odbc
                [Test]
                public void InsertNoOverwriteTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -144,15 +143,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual ("Parameter1", OdbcCmd.Parameters[1].ParameterName, "#8 Parameters inserted without any name must get a default name");
                                Assert.AreEqual (null, OdbcCmd.Parameters[1].Value, "#9 Parameters inserted without any value must have null value");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void InsertNullTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -169,15 +167,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 The collection must contain only one parameter after Insert failed");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void InsertEmptyTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -195,15 +192,14 @@ namespace MonoTests.System.Data.Odbc
                                }
                                        
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void InsertAlreadyContainedParameterTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -223,15 +219,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#3 The collection must contain 2 parameters after Insert failed");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void InsertArgumentGreaterThanCountTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -248,15 +243,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 The collection must contain only 1 parameter after Insert failed");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void InsertNegativeArgumentTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -273,15 +267,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 The collection must contain only 1 parameter after Insert failed");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void InsertNonOdbcParameterTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -298,7 +291,7 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 The collection must contain only 1 parameter after Insert failed");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -306,8 +299,7 @@ namespace MonoTests.System.Data.Odbc
                [Test]
                public void AddRangeTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -332,7 +324,7 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual ("Parameter1", OdbcCmd.Parameters[1].ParameterName, "#5 Parameters added without any name must get a default name");
                                Assert.AreEqual (OdbcType.NVarChar,OdbcCmd.Parameters[1].OdbcType, "#6 Parameters with null value must be of type NVarChar");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -343,8 +335,7 @@ namespace MonoTests.System.Data.Odbc
                [Test]
                public void AddRangeParameterAlreadyContainedTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -366,7 +357,7 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (2, OdbcCmd.Parameters.Count, "#2 The collection must contain excatly 2 elements after AddRange failed for the third element");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -376,8 +367,7 @@ namespace MonoTests.System.Data.Odbc
                [Test]
                public void AddRangeArgumentNullExceptionTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -399,15 +389,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 If any of the parameters in the range is null, none of them should be added");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void AddRangeParameterContainedInAnotherCollTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -436,15 +425,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd2.Parameters.Count, "#4 All the elements before the invalid element must be added to the collection of OdbcCmd2");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void AddRangeMultiDimensionalArrayTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -468,15 +456,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (4, OdbcCmd.Parameters.IndexOf (p5Tmp), "#4 Not all elements are added");
                                Assert.AreEqual (OdbcType.NVarChar,OdbcCmd.Parameters[4].OdbcType, "#5 Parameters with null value must be of type NVarChar");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void AddRangeArrayValuesArgumentNullExceptionTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -500,7 +487,7 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 None of the elememts must be added if any one of them is null");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -510,8 +497,7 @@ namespace MonoTests.System.Data.Odbc
                [Test]
                public void ContainsTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -531,15 +517,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.IsFalse (OdbcCmd.Parameters.Contains ((Object)null), "#6 Contains must return false for empty string");
                                Assert.IsFalse (OdbcCmd.Parameters.Contains ((String)null), "#6 Contains must return false for empty string");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void ContainsNonOdbcParameterTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -555,15 +540,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#3 The collection must contain only one parameter");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void ContainsCaseSensitivityTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -578,15 +562,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (true, OdbcCmd.Parameters.Contains ("@LNAME"), "#3 Case sensitivity failed for Contains, should be case insensitive");
                                Assert.AreEqual (true, OdbcCmd.Parameters.Contains ("@LnAmE"), "#4 Case sensitivity failed for Contains, should be case insensitive");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void ContainsNotMineTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd1 = conn.CreateCommand ();
@@ -602,15 +585,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.IsTrue (OdbcCmd1.Parameters.Contains (p1));
                                Assert.IsFalse (OdbcCmd1.Parameters.Contains (p2));
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void IndexOfTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -632,15 +614,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (-1, OdbcCmd.Parameters.IndexOf ((Object)p3Tmp), "#9 non-existing parameter passed as Object did not return index -1");
                                Assert.AreEqual (-1, OdbcCmd.Parameters.IndexOf ((Object)null), "#10 null parameter passed as Object should return index -1");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void IndexOfCaseSensitivityTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -655,15 +636,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf ("@AGE"), "#4 Case sensitivity failed for IndexOf, should be case insensitive");
                                Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf ("@age"), "#5 Case sensitivity failed for IndexOf, should be case insensitive");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void IndexOfNonOdbcParameterTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -679,15 +659,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#3 The collection must contain only one parameter");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void CopyToTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -707,15 +686,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (null, DestinationParamArray [0], "#5 The remaining elements must remain un-initialized");
                                Assert.AreEqual (null, DestinationParamArray [3], "#6 The remaining elements must remain un-initialized");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void CopyToArgumentExceptionTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -736,15 +714,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (null, DestinationParamArray [3], "#5 The DestinationParamArray must remain un-initialized");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void CopyToMultiDimensionalArrayTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -766,15 +743,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (null, DestinationParamArray [1, 3], "#5 The DestinationParamArray must remain un-initialized");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void CopyToLowerBoundCheckTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -795,15 +771,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (null, DestinationParamArray [3], "#5 The DestinationParamArray must remain un-initialized");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void DuplicateParameterNameTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -827,15 +802,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (0, OdbcCmd.Parameters.IndexOf ((object) p1Lname));
                                Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf ((object) p2Lname));
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void RemoveTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -848,15 +822,14 @@ namespace MonoTests.System.Data.Odbc
                                OdbcCmd.Parameters.Remove (p1Lname);
                                Assert.AreEqual (0, OdbcCmd.Parameters.Count, "#2 Collection should not contain any parameters");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void RemoveNullTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -873,15 +846,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 The collection must contain only one parameter");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
                
                [Test]
                public void RemoveEmptyTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -898,15 +870,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 The collection must contain only one parameter");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void RemoveNonOdbcParameterTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -923,15 +894,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (1, OdbcCmd.Parameters.Count, "#2 The collection must contain only one parameter");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void RemoveNonExistingParameterTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -951,15 +921,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (0, OdbcCmd.Parameters.Count, "#3 The collection should not contain any parameters");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void RemoveParameterContainedInAnotherCollTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -986,15 +955,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (2, OdbcCmd2.Parameters.Count, "#6 The parameter collection of OdbcCmd2 should contain 2 parameters");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
                
                [Test]
                public void RemoveAtTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -1028,15 +996,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (0, OdbcCmd.Parameters.IndexOf(p2Age), "#13 p2Age should be at index 0");
                                Assert.AreEqual (1, OdbcCmd.Parameters.IndexOf(p3Tmp), "#14 p3Tmp should be at index 1");                               
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void RemoveAtOutOfRangeIndexTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -1055,15 +1022,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (0, OdbcCmd.Parameters.IndexOf(p1Lname), "#4 p1Lname is not at index 0");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
                
                [Test]
                public void RemoveAtNegativeIndexTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -1082,15 +1048,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (0, OdbcCmd.Parameters.IndexOf(p1Lname), "#4 p1Lname is not at index 0");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
                
                [Test]
                public void RemoveAtBoundaryTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -1109,15 +1074,14 @@ namespace MonoTests.System.Data.Odbc
                                        Assert.AreEqual (0, OdbcCmd.Parameters.IndexOf(p1Lname), "#4 p1Lname is not at index 0");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void AddWithValueTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -1201,15 +1165,14 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual (2,OdbcCmd.Parameters[8].Value, "#50 The parameter at index 8 must have value as 2");                                                    
                                Assert.AreEqual (OdbcType.NVarChar,OdbcCmd.Parameters[8].OdbcType, "#51 Parameter must be of type NVarChar");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
                [Test]
                public void DefaultNamesAndValuesTest ()
                {
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        try {
                                OdbcCommand OdbcCmd = conn.CreateCommand ();
@@ -1238,8 +1201,10 @@ namespace MonoTests.System.Data.Odbc
                                Assert.AreEqual ("Parameter2",OdbcCmd.Parameters[2].ParameterName, "#12 The parameter must have a default name");
                                Assert.AreEqual (OdbcType.NVarChar,OdbcCmd.Parameters[2].OdbcType, "#13 Parameters with null value must be of type NVarChar");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
        }
 }
+
+#endif
\ No newline at end of file
index 2abcc297f9a14ae961ead489b89ec2ca7b19e5ab..9cb09eac042bdf5010d77bfe1ccd2ee1563518cc 100644 (file)
@@ -28,6 +28,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Common;
@@ -35,12 +37,10 @@ using System.Data.Odbc;
 using System.Globalization;
 using System.Text;
 using System.Threading;
-
-using Mono.Data;
-
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+
+namespace MonoTests.System.Data.Connected.Odbc
 {
        [TestFixture]
        [Category ("odbc")]
@@ -69,8 +69,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_int from numeric_family where id = ?";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -248,8 +247,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_bigint from numeric_family where id = ?";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -433,8 +431,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_binary from binary_family where id = ?";
                        string delete_data = "delete from binary_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -651,8 +648,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_smallint from numeric_family where id = ?";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -833,15 +829,14 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_timestamp from binary_family where id = ?";
                        string delete_data = "delete from binary_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
                        OdbcParameter param;
 
                        try {
-                               if (!ConnectionManager.Singleton.Engine.SupportsTimestamp)
+                               if (!ConnectionManager.Instance.Odbc.EngineConfig.SupportsTimestamp)
                                        Assert.Ignore ("Timestamp test does not apply to the current driver (" + conn.Driver + ").");
 
                                cmd = conn.CreateCommand ();
@@ -895,8 +890,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_tinyint from numeric_family where id = ?";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -1070,9 +1064,8 @@ namespace MonoTests.System.Data
                public void StringParamTest ()
                {
                        string query = "select id, fname from employee where fname = ?";
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
                        try {
-                               ConnectionManager.Singleton.OpenConnection ();
                                OdbcCommand cmd = (OdbcCommand) conn.CreateCommand ();
                                cmd.CommandText = query;
 
@@ -1082,7 +1075,7 @@ namespace MonoTests.System.Data
                                Assert.IsTrue (dr.Read (), "#1 no data to test");
                                Assert.AreEqual (1, (int) dr [0], "#2 value not matching");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -1095,8 +1088,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_bit from numeric_family where id = ?";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -1130,11 +1122,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#B2");
                                Assert.AreEqual (2, dr.GetValue (0), "#B2");
                                Assert.AreEqual (typeof (bool), dr.GetFieldType (1), "#B3");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
-                                       // MySQL does not support true BIT type
-                                       Assert.AreEqual (true, dr.GetValue (1), "#B4");
-                               else
-                                       Assert.AreEqual (false, dr.GetValue (1), "#B4");
+                               Assert.AreEqual (false, dr.GetValue (1), "#B4");
                                Assert.IsFalse (dr.Read (), "#B5");
                                dr.Close ();
                                cmd.Dispose ();
@@ -1196,11 +1184,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#E2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#E3");
                                Assert.AreEqual (typeof (bool), dr.GetFieldType (1), "#E4");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
-                                       // MySQL does not support true BIT type
-                                       Assert.AreEqual (true, dr.GetValue (1), "#E5");
-                               else
-                                       Assert.AreEqual (false, dr.GetValue (1), "#E5");
+                               Assert.AreEqual (false, dr.GetValue (1), "#E5");
                                Assert.IsFalse (dr.Read (), "#E6");
                                dr.Close ();
                                cmd.Dispose ();
@@ -1247,8 +1231,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_char from string_family where id = ?";
                        string delete_data = "delete from string_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -1266,7 +1249,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#A2");
                                Assert.AreEqual (1, dr.GetValue (0), "#A3");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (1), "#A4");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual ("char", dr.GetValue (1), "#A5");
                                else
                                        Assert.AreEqual ("char      ", dr.GetValue (1), "#A5");
@@ -1301,7 +1284,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#C2");
                                Assert.AreEqual (3, dr.GetValue (0), "#C3");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (1), "#C4");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual (string.Empty, dr.GetValue (1), "#C5");
                                else
                                        Assert.AreEqual ("          ", dr.GetValue (1), "#C5");
@@ -1341,7 +1324,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#E2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#E3");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (1), "#E4");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual ("ABC", dr.GetValue (1), "#E5");
                                else
                                        Assert.AreEqual ("ABC       ", dr.GetValue (1), "#E5");
@@ -1394,7 +1377,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#G2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#G3");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (1), "#G4");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual (string.Empty, dr.GetValue (1), "#G5");
                                else
                                        Assert.AreEqual ("          ", dr.GetValue (1), "#G5");
@@ -1445,8 +1428,7 @@ namespace MonoTests.System.Data
                        string insert_data = "insert into numeric_family (id, type_decimal1, type_decimal2) values (6000, ?, ?)";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -1649,7 +1631,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (1), "#L4");
                                Assert.AreEqual (56789m, dr.GetValue (1), "#L5");
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (2), "#L6");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.Type == EngineType.MySQL)
                                        Assert.AreEqual (9876556.780m, dr.GetValue (2), "#L7");
                                else
                                        Assert.AreEqual (98765.570m, dr.GetValue (2), "#L7");
@@ -1677,16 +1659,11 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#M2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#M3");
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (1), "#M4");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
-                                       Assert.AreEqual (0m, dr.GetValue (1), "#M5");
-                               else
-                                       Assert.AreEqual (DBNull.Value, dr.GetValue (1), "#M5");
+                               Assert.AreEqual (DBNull.Value, dr.GetValue (1), "#M5");
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (2), "#M6");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
-                                       Assert.AreEqual (0m, dr.GetValue (1), "#M7");
-                               else
-                                       Assert.AreEqual (DBNull.Value, dr.GetValue (2), "#M7");
-                               Assert.IsFalse (dr.Read (), "#M8");
+                               Assert.AreEqual (DBNull.Value, dr.GetValue(1), "#M7");
+                               Assert.AreEqual (DBNull.Value, dr.GetValue (2), "#M8");
+                               Assert.IsFalse (dr.Read (), "#M9");
                                dr.Close ();
                                cmd.Dispose ();
                        } finally {
@@ -1709,8 +1686,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_double from numeric_family where id = ?";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -1893,8 +1869,7 @@ namespace MonoTests.System.Data
                        string select_data = "select type_blob from binary_family where id = ?";
                        string delete_data = "delete from binary_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -2124,9 +2099,8 @@ namespace MonoTests.System.Data
                        string select_data = "select type_nchar from string_family where type_nchar = ? and id = ?";
                        string select_by_id = "select type_nchar from string_family where id = ?";
                        string delete_data = "delete from string_family where id = 6000";
-                       
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -2142,7 +2116,7 @@ namespace MonoTests.System.Data
                                dr = cmd.ExecuteReader ();
                                Assert.IsTrue (dr.Read (), "#A1");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (0), "#A2");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual ("nch\u092d\u093er", dr.GetValue (0), "#A3");
                                else
                                        Assert.AreEqual ("nch\u092d\u093er    ", dr.GetValue (0), "#A3");
@@ -2173,7 +2147,7 @@ namespace MonoTests.System.Data
                                dr = cmd.ExecuteReader ();
                                Assert.IsTrue (dr.Read (), "#C1");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (0), "#C2");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual (string.Empty, dr.GetValue (0), "#C3");
                                else
                                        Assert.AreEqual ("          ", dr.GetValue (0), "#C3");
@@ -2209,7 +2183,7 @@ namespace MonoTests.System.Data
                                dr = cmd.ExecuteReader ();
                                Assert.IsTrue (dr.Read (), "#E1");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (0), "#E2");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual ("nchar", dr.GetValue (0), "#E3");
                                else
                                        Assert.AreEqual ("nchar     ", dr.GetValue (0), "#E3");
@@ -2235,7 +2209,7 @@ namespace MonoTests.System.Data
                                dr = cmd.ExecuteReader ();
                                Assert.IsTrue (dr.Read (), "#F1");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (0), "#F2");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual ("nch\u0488", dr.GetValue (0), "#F3");
                                else
                                        Assert.AreEqual ("nch\u0488      ", dr.GetValue (0), "#F3");
@@ -2261,7 +2235,7 @@ namespace MonoTests.System.Data
                                dr = cmd.ExecuteReader ();
                                Assert.IsTrue (dr.Read (), "#G1");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (0), "#G2");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual ("ch\u0488r", dr.GetValue (0), "#G3");
                                else
                                        Assert.AreEqual ("ch\u0488r      ", dr.GetValue (0), "#G3");
@@ -2310,7 +2284,7 @@ namespace MonoTests.System.Data
                                dr = cmd.ExecuteReader ();
                                Assert.IsTrue (dr.Read (), "#I1");
                                Assert.AreEqual (typeof (string), dr.GetFieldType (0), "#I2");
-                               if (ConnectionManager.Singleton.Engine.RemovesTrailingSpaces)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.RemovesTrailingSpaces)
                                        Assert.AreEqual (string.Empty, dr.GetValue (0), "#I3");
                                else
                                        Assert.AreEqual ("          ", dr.GetValue (0), "#I3");
@@ -2357,8 +2331,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select type_ntext from string_family where id = ?";
                        string delete_data = "delete from string_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -2513,8 +2486,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select type_text from string_family where id = ?";
                        string delete_data = "delete from string_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -2674,9 +2646,8 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_numeric1, type_numeric2 from numeric_family where id = ?";
                        string insert_data = "insert into numeric_family (id, type_numeric1, type_numeric2) values (6000, ?, ?)";
                        string delete_data = "delete from numeric_family where id = 6000";
-
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -2879,7 +2850,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (1), "#L4");
                                Assert.AreEqual (56789m, dr.GetValue (1), "#L5");
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (2), "#L6");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.Type == EngineType.MySQL)
                                        Assert.AreEqual (9876556.780m, dr.GetValue (2), "#L7");
                                else
                                        Assert.AreEqual (98765.570m, dr.GetValue (2), "#L7");
@@ -2907,15 +2878,10 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#M2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#M3");
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (1), "#M4");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
-                                       Assert.AreEqual (0m, dr.GetValue (1), "#M5");
-                               else
-                                       Assert.AreEqual (DBNull.Value, dr.GetValue (1), "#M5");
+                               Assert.AreEqual (DBNull.Value, dr.GetValue (1), "#M5");
                                Assert.AreEqual (typeof (decimal), dr.GetFieldType (2), "#M6");
-                               if (ConnectionManager.Singleton.Engine.Type == EngineType.MySQL)
-                                       Assert.AreEqual (0m, dr.GetValue (1), "#M7");
-                               else
-                                       Assert.AreEqual (DBNull.Value, dr.GetValue (2), "#M7");
+                               Assert.AreEqual (DBNull.Value, dr.GetValue(1), "#M7");
+                               Assert.AreEqual (DBNull.Value, dr.GetValue (2), "#M7");
                                Assert.IsFalse (dr.Read (), "#M8");
                                dr.Close ();
                                cmd.Dispose ();
@@ -2939,8 +2905,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select type_nvarchar from string_family where id = ?";
                        string delete_data = "delete from string_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -3131,8 +3096,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_varbinary from binary_family where id = ?";
                        string delete_data = "delete from binary_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -3362,8 +3326,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select type_varchar from string_family where id = ?";
                        string delete_data = "delete from string_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -3531,8 +3494,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_float from numeric_family where id = ?";
                        string delete_data = "delete from numeric_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -3549,7 +3511,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#D2");
                                Assert.AreEqual (1, dr.GetValue (0), "#D3");
                                Assert.AreEqual (typeof (float), dr.GetFieldType (1), "#D4");
-                               Assert.AreEqual (3.40E+38, dr.GetValue (1), "#D5");
+                               Assert.AreEqual (3.39999995E+38f, dr.GetValue (1), "#D5");
                                Assert.IsFalse (dr.Read (), "#D6");
                                dr.Close ();
                                cmd.Dispose ();
@@ -3566,7 +3528,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#A2");
                                Assert.AreEqual (1, dr.GetValue (0), "#A2");
                                Assert.AreEqual (typeof (float), dr.GetFieldType (1), "#A3");
-                               Assert.AreEqual (3.40E+38, dr.GetValue (1), "#A4");
+                               Assert.AreEqual (3.40E+38f, (float)dr.GetValue (1), 0.0000001f, "#A4");
                                Assert.IsFalse (dr.Read (), "#A5");
                                dr.Close ();
                                cmd.Dispose ();
@@ -3582,7 +3544,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#B2");
                                Assert.AreEqual (2, dr.GetValue (0), "#B2");
                                Assert.AreEqual (typeof (float), dr.GetFieldType (1), "#B3");
-                               Assert.AreEqual (-3.40E+38, dr.GetValue (1), "#B4");
+                               Assert.AreEqual(-3.40E+38f, (float)dr.GetValue(1), 0.0000001f, "#B4");
                                Assert.IsFalse (dr.Read (), "#B5");
                                dr.Close ();
                                cmd.Dispose ();
@@ -3633,7 +3595,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#E2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#E3");
                                Assert.AreEqual (typeof (float), dr.GetFieldType (1), "#E4");
-                               Assert.AreEqual (3.40E+38, dr.GetValue (1), "#E5");
+                               Assert.AreEqual(3.40E+38f, (float)dr.GetValue(1), 0.0000001f, "#E4");
                                Assert.IsFalse (dr.Read (), "#E6");
                                dr.Close ();
                                cmd.Dispose ();
@@ -3656,7 +3618,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#F2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#F3");
                                Assert.AreEqual (typeof (float), dr.GetFieldType (1), "#F4");
-                               Assert.AreEqual (-3.40E+38, dr.GetValue (1), "#F5");
+                               Assert.AreEqual (-3.40E+38f, (float)dr.GetValue(1), 0.0000001f, "#F4");
                                Assert.IsFalse (dr.Read (), "#F6");
                                dr.Close ();
                                cmd.Dispose ();
@@ -3726,8 +3688,7 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_smalldatetime from datetime_family where id = ?";
                        string delete_data = "delete from datetime_family where id = 6000";
 
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
@@ -3834,16 +3795,15 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_datetime from datetime_family where id = ?";
                        string delete_data = "delete from datetime_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
                        OdbcParameter param;
 
                        try {
-                               DateTime date = DateTime.ParseExact ("9999-12-31 23:59:59.997",
-                                       "yyyy-MM-dd HH:mm:ss.fff", CultureInfo.InvariantCulture);
+                               DateTime date = DateTime.ParseExact ("9999-12-31 23:59:59",
+                                       "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
 
                                cmd = conn.CreateCommand ();
                                cmd.CommandText = select_data;
@@ -3856,7 +3816,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#A2");
                                Assert.AreEqual (1, dr [0], "#A3");
                                Assert.AreEqual (typeof (DateTime), dr.GetFieldType (1), "#A4");
-                               if (ConnectionManager.Singleton.Engine.SupportsMicroseconds)
+                               if (ConnectionManager.Instance.Odbc.EngineConfig.SupportsMicroseconds)
                                        Assert.AreEqual (date, dr [1], "#A5");
                                else
                                        Assert.AreEqual (new DateTime (9999, 12, 31, 23, 59, 59), dr [1], "#A5");
@@ -3878,7 +3838,7 @@ namespace MonoTests.System.Data
                                dr.Close ();
                                cmd.Dispose ();
 
-                               date = new DateTime (1973, 8, 13, 17, 54, 33, 953);
+                               date = new DateTime (1973, 8, 13, 17, 54, 34);
 
                                cmd = conn.CreateCommand ();
                                cmd.CommandText = insert_data;
@@ -3898,10 +3858,7 @@ namespace MonoTests.System.Data
                                Assert.AreEqual (typeof (int), dr.GetFieldType (0), "#C2");
                                Assert.AreEqual (6000, dr.GetValue (0), "#C3");
                                Assert.AreEqual (typeof (DateTime), dr.GetFieldType (1), "#C4");
-                               if (ConnectionManager.Singleton.Engine.SupportsMicroseconds)
-                                       Assert.AreEqual (date, dr.GetValue (1), "#C5");
-                               else
-                                       Assert.AreEqual (new DateTime (1973, 8, 13, 17, 54, 33), dr.GetValue (1), "#C5");
+                               Assert.AreEqual (new DateTime (1973, 8, 13, 17, 54, 34), dr.GetValue (1), "#C5");
                                Assert.IsFalse (dr.Read (), "#C6");
                                dr.Close ();
                                cmd.Dispose ();
@@ -3948,15 +3905,14 @@ namespace MonoTests.System.Data
                        string select_by_id = "select type_date from datetime_family where id = ?";
                        string delete_data = "delete from datetime_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
                        OdbcParameter param;
 
                        try {
-                               if (!ConnectionManager.Singleton.Engine.SupportsDate)
+                               if (!ConnectionManager.Instance.Odbc.EngineConfig.SupportsDate)
                                        Assert.Ignore ("Date test does not apply to the current driver (" + conn.Driver + ").");
 
                                DateTime date = new DateTime (9999, 12, 31);
@@ -4048,18 +4004,17 @@ namespace MonoTests.System.Data
                        string select_by_id = "select type_time from datetime_family where id = ?";
                        string delete_data = "delete from datetime_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
                        OdbcParameter param;
 
                        try {
-                               if (!ConnectionManager.Singleton.Engine.SupportsTime)
+                               if (!ConnectionManager.Instance.Odbc.EngineConfig.SupportsTime)
                                        Assert.Ignore ("Time test does not apply to the current driver (" + conn.Driver + ").");
 
-                               TimeSpan time = ConnectionManager.Singleton.Engine.SupportsMicroseconds ?
+                               TimeSpan time = ConnectionManager.Instance.Odbc.EngineConfig.SupportsMicroseconds ?
                                        new TimeSpan (23, 58, 59, 953) : new TimeSpan (23, 58, 59);
 
                                cmd = conn.CreateCommand ();
@@ -4149,15 +4104,14 @@ namespace MonoTests.System.Data
                        string select_by_id = "select id, type_guid from string_family where id = ?";
                        string delete_data = "delete from string_family where id = 6000";
 
-                       OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
 
                        IDataReader dr = null;
                        OdbcCommand cmd = null;
                        OdbcParameter param;
 
                        try {
-                               if (!ConnectionManager.Singleton.Engine.SupportsUniqueIdentifier)
+                               if (!ConnectionManager.Instance.Odbc.EngineConfig.SupportsUniqueIdentifier)
                                        Assert.Ignore ("UniqueIdentifier test does not apply to the current driver (" + conn.Driver + ").");
 
                                cmd = conn.CreateCommand ();
@@ -4243,9 +4197,9 @@ namespace MonoTests.System.Data
                [Test]
                public void DBNullParameterTest()
                {
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       try {
-                               ConnectionManager.Singleton.OpenConnection ();
+                       OdbcConnection conn = ConnectionManager.Instance.Odbc.Connection;
+                       try
+                       {
                                OdbcDataAdapter Adaptador = new OdbcDataAdapter ();
                                DataSet Lector = new DataSet ();
 
@@ -4254,7 +4208,7 @@ namespace MonoTests.System.Data
                                Adaptador.Fill (Lector);
                                Assert.AreEqual (Lector.Tables[0].Rows[0][0], DBNull.Value, "#1 DBNull parameter not passed correctly");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Odbc.CloseConnection ();
                        }
                }
 
@@ -4349,3 +4303,5 @@ namespace MonoTests.System.Data
                }
        }
 }
+
+#endif
\ No newline at end of file
index c76b2be7617ffc66a7501cf41172f106655c013f..86fa4fb1b012c4a0fef1be744355ad256603733d 100644 (file)
@@ -35,9 +35,10 @@ using System.Net;
 using NUnit.Framework;
 using System.Collections;
 using System.Security.Permissions;
+
 using System.Security;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
index 1d1a3af3eb46e2cd1d209dd2c98a43800b83f0e4..a20abdff9c896aede3c3faf9206c1e6eb8c2d0d6 100644 (file)
@@ -34,11 +34,10 @@ using System.Data;
 using System.Data.Common;
 using System.Data.SqlClient;
 using System.Data.SqlTypes;
-using Mono.Data;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
@@ -50,8 +49,8 @@ namespace MonoTests.System.Data
                [TestFixtureSetUp]
                public void init ()
                {
-                       conn = new SqlConnection (ConnectionManager.Singleton.ConnectionString);
-                       engine = ConnectionManager.Singleton.Engine;
+                       conn = new SqlConnection (ConnectionManager.Instance.Sql.ConnectionString);
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                private static EngineConfig Engine {
@@ -65,13 +64,15 @@ namespace MonoTests.System.Data
                {
                        conn.Open ();
                }
+
                [TearDown]
                public void TearDown ()
                {
-                       conn.Close ();
+                       conn?.Close ();
                }
                
                [Test]
+               [Category("NotWorking")]
                public void GetInsertCommand1 ()
                {
                        SqlCommand cmd = null;
@@ -121,6 +122,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetInsertCommand1_Expression ()
                {
                        SqlCommand cmd = null;
@@ -148,6 +150,7 @@ namespace MonoTests.System.Data
                }
 
                [Test] // GetInsertCommand (Boolean)
+               [Category("NotWorking")]
                public void GetInsertCommand2 ()
                {
                        SqlCommand cmd = null;
@@ -198,6 +201,7 @@ namespace MonoTests.System.Data
                }
 
                [Test] // GetUpdateCommand ()
+               [Category("NotWorking")]
                public void GetUpdateCommand1 ()
                {
                        SqlCommand cmd = null;
@@ -311,6 +315,7 @@ namespace MonoTests.System.Data
                }
 
                [Test] // GetUpdateCommand (Boolean)
+               [Category("NotWorking")]
                public void GetUpdateCommand2 ()
                {
                        SqlCommand cmd = null;
@@ -474,6 +479,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetUpdateCommandDBConcurrencyExceptionTest ()
                {
                        string selectQuery = "select id, fname from employee where id = 1";
@@ -504,6 +510,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void GetDeleteCommandDBConcurrencyExceptionTest ()
                {
                        string selectQuery = "select id, fname from employee where id = 1";
@@ -534,6 +541,7 @@ namespace MonoTests.System.Data
                }
 
                [Test] // GetDeleteCommand ()
+               [Category("NotWorking")]
                public void GetDeleteCommand1 ()
                {
                        SqlCommand cmd = null;
@@ -641,6 +649,7 @@ namespace MonoTests.System.Data
                }
 
                [Test] // GetDeleteCommand ()
+               [Category("NotWorking")]
                public void GetDeleteCommand2 ()
                {
                        SqlCommand cmd = null;
@@ -759,6 +768,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void DefaultProperties ()
                {
                        SqlCommandBuilder cb = new SqlCommandBuilder ();
@@ -855,10 +865,7 @@ namespace MonoTests.System.Data
                                Assert.IsFalse (param.IsNullable, "#D:IsNullable");
                                Assert.AreEqual ("@param1", param.ParameterName, "#D:ParameterName");
                                Assert.AreEqual (5, param.Precision, "#D:Precision");
-                               if (ClientVersion == 7)
-                                       Assert.AreEqual (2, param.Scale, "#D:Scale");
-                               else
-                                       Assert.AreEqual (3, param.Scale, "#D:Scale");
+                               Assert.AreEqual (2, param.Scale, "#D:Scale");
                                //Assert.AreEqual (0, param.Size, "#D:Size");
                                Assert.AreEqual (SqlDbType.Decimal, param.SqlDbType, "#D:SqlDbType");
                                Assert.IsNull (param.Value, "#D:Value");
@@ -1110,11 +1117,7 @@ namespace MonoTests.System.Data
                        else
                                Assert.AreEqual ("@p1", param.ParameterName, prefix + "ParameterName (0)");
 
-                       if (ClientVersion > 7)
-                               Assert.AreEqual (0, param.Precision, prefix + "Precision (0)");
-                       else
-                               Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
-
+                       Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
                        Assert.AreEqual (0, param.Scale, prefix + "Scale (0)");
                        //Assert.AreEqual (0, param.Size, prefix + "Size (0)");
                        Assert.AreEqual ("id", param.SourceColumn, prefix + "SourceColumn (0)");
@@ -1215,10 +1218,7 @@ namespace MonoTests.System.Data
                        else
                                Assert.AreEqual ("@p1", param.ParameterName, prefix + "ParameterName (0)");
 
-                       if (ClientVersion > 7)
-                               Assert.AreEqual (0, param.Precision, prefix + "Precision (0)");
-                       else
-                               Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
+                       Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
 
                        Assert.AreEqual (0, param.Scale, prefix + "Scale (0)");
                        //Assert.AreEqual (0, param.Size, prefix + "Size (0)");
@@ -1296,10 +1296,7 @@ namespace MonoTests.System.Data
                        else
                                Assert.AreEqual ("@p1", param.ParameterName, prefix + "ParameterName (0)");
 
-                       if (ClientVersion > 7)
-                               Assert.AreEqual (0, param.Precision, prefix + "Precision (0)");
-                       else
-                               Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
+                       Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
 
                        Assert.AreEqual (0, param.Scale, prefix + "Scale (0)");
                        //Assert.AreEqual (0, param.Size, prefix + "Size (0)");
@@ -1370,10 +1367,7 @@ namespace MonoTests.System.Data
                        else
                                Assert.AreEqual ("@p4", param.ParameterName, prefix + "ParameterName (3)");
 
-                       if (ClientVersion > 7)
-                               Assert.AreEqual (0, param.Precision, prefix + "Precision (0)");
-                       else
-                               Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
+                       Assert.AreEqual (10, param.Precision, prefix + "Precision (0)");
 
                        Assert.AreEqual (0, param.Scale, prefix + "Scale (3)");
                        //Assert.AreEqual (0, param.Size, prefix + "Size (3)");
index f9ab15d3472278b3c92f97d8df574baf040fbd4f..7e6478299c4c8d3d67b441776e92d0532253f172 100644 (file)
@@ -39,7 +39,7 @@ using System.Xml;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.SqlClient
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
@@ -47,7 +47,7 @@ namespace MonoTests.System.Data.SqlClient
        {
                SqlConnection conn;
                SqlCommand cmd;
-               string connectionString = ConnectionManager.Singleton.ConnectionString;
+               string connectionString = ConnectionManager.Instance.Sql.ConnectionString;
                EngineConfig engine;
 
                static readonly decimal SMALLMONEY_MAX = 214748.3647m;
@@ -56,7 +56,7 @@ namespace MonoTests.System.Data.SqlClient
                [SetUp]
                public void SetUp ()
                {
-                       engine = ConnectionManager.Singleton.Engine;
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                [TearDown]
@@ -144,8 +144,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test] // bug #341743
                public void Dispose_Connection_Disposed ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
 
                        cmd = conn.CreateCommand ();
                        cmd.CommandText = "SELECT 'a'";
@@ -159,6 +158,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void ExecuteScalar ()
                {
                        conn = new SqlConnection (connectionString);
@@ -269,8 +269,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void ExecuteScalar_CommandText_Empty ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
 
                        cmd = conn.CreateCommand ();
 
@@ -448,6 +447,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void ExecuteNonQuery ()
                {
                        conn = new SqlConnection (connectionString);
@@ -1106,6 +1106,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void Prepare_Transaction_Only ()
                {
                        SqlTransaction trans = null;
@@ -1117,53 +1118,33 @@ namespace MonoTests.System.Data.SqlClient
                        // Text, without parameters
                        cmd = new SqlCommand ("select count(*) from whatever");
                        cmd.Transaction = trans;
-                       try {
-                               cmd.Prepare ();
-                               Assert.Fail ("#A1");
-                       } catch (NullReferenceException) {
-                       }
+                       cmd.Prepare();
 
                        // Text, with parameters
                        cmd = new SqlCommand ("select count(*) from whatever");
                        cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
                        cmd.Transaction = trans;
-                       try {
-                               cmd.Prepare ();
-                               Assert.Fail ("#B1");
-                       } catch (NullReferenceException) {
-                       }
+                       Assert.Throws<InvalidOperationException>(() => cmd.Prepare());
 
                        // Text, parameters cleared
                        cmd = new SqlCommand ("select count(*) from whatever");
                        cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
                        cmd.Parameters.Clear ();
                        cmd.Transaction = trans;
-                       try {
-                               cmd.Prepare ();
-                               Assert.Fail ("#C1");
-                       } catch (NullReferenceException) {
-                       }
+                       cmd.Prepare();
 
                        // StoredProcedure, without parameters
                        cmd = new SqlCommand ("FindCustomer");
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Transaction = trans;
-                       try {
-                               cmd.Prepare ();
-                               Assert.Fail ("#D1");
-                       } catch (NullReferenceException) {
-                       }
+                       cmd.Prepare();
 
                        // StoredProcedure, with parameters
                        cmd = new SqlCommand ("FindCustomer");
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add ("@TestPar1", SqlDbType.Int);
                        cmd.Transaction = trans;
-                       try {
-                               cmd.Prepare ();
-                               Assert.Fail ("#E1");
-                       } catch (NullReferenceException) {
-                       }
+                       cmd.Prepare();
                }
 
                [Test] // bug #412576
@@ -1357,8 +1338,7 @@ namespace MonoTests.System.Data.SqlClient
                        SqlParameter idParam;
                        SqlParameter dojParam;
 
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
 
                        // parameters with leading '@'
                        try {
@@ -1475,6 +1455,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test] // bug #319598
+               [Category("NotWorking")]
                public void LongStoredProcTest ()
                {
                        if (ClientVersion == 7)
@@ -1559,9 +1540,8 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void EnumParameterTest ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        try {
-                               ConnectionManager.Singleton.OpenConnection ();
                                // create temp sp here, should normally be created in Setup of test 
                                // case, but cannot be done right now because of ug #68978
                                DBHelper.ExecuteNonQuery (conn, "CREATE PROCEDURE #Bug66630 ("
@@ -1594,7 +1574,7 @@ namespace MonoTests.System.Data.SqlClient
                                DBHelper.ExecuteNonQuery (conn, "if exists (select name from sysobjects " +
                                                          " where name like '#temp_Bug66630' and type like 'P') " +
                                                          " drop procedure #temp_Bug66630; ");
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
@@ -1638,6 +1618,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void StoredProc_ParameterTest ()
                {
                        string create_query = CREATE_TMP_SP_PARAM_TEST;
@@ -2208,8 +2189,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void OutputParamSizeTest1 ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = new SqlCommand ();
                        cmd.Connection = conn;
 
@@ -2242,8 +2222,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void OutputParamSizeTest2 ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = new SqlCommand ();
                        cmd.Connection = conn;
 
@@ -2276,8 +2255,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void OutputParamSizeTest3 ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = new SqlCommand ();
                        cmd.Connection = conn;
 
@@ -2310,8 +2288,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void OutputParamSizeTest4 ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = new SqlCommand ();
                        cmd.Connection = conn;
 
@@ -2346,8 +2323,7 @@ namespace MonoTests.System.Data.SqlClient
                {
                        SqlParameter newId, id;
 
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
 
                        cmd = conn.CreateCommand ();
                        cmd.CommandText = "set @NewId=@Id + 2";
@@ -2489,7 +2465,7 @@ namespace MonoTests.System.Data.SqlClient
                {
                        cmd = new SqlCommand ();
                        string connectionString1 = null;
-                       connectionString1 = ConnectionManager.Singleton.ConnectionString + "Asynchronous Processing=true";
+                       connectionString1 = ConnectionManager.Instance.Sql.ConnectionString + ";Asynchronous Processing=true";
                        try {
                                SqlConnection conn1 = new SqlConnection (connectionString1);
                                conn1.Open ();
@@ -2503,11 +2479,12 @@ namespace MonoTests.System.Data.SqlClient
                                                Assert.AreEqual ("kumar", reader["lname"], "#1 ");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
                
                [Test]
+               [Ignore("MS .NET doesn't throw IOE here. TODO: check corefx")]
                public void BeginExecuteXmlReaderExceptionTest ()
                {
                        cmd = new SqlCommand ();
@@ -2520,12 +2497,12 @@ namespace MonoTests.System.Data.SqlClient
                                try {
                                        /*IAsyncResult result = */cmd.BeginExecuteXmlReader ();
                                } catch (InvalidOperationException) {
-                                       Assert.AreEqual (ConnectionManager.Singleton.ConnectionString, connectionString, "#1 Connection string has changed");
+                                       Assert.AreEqual (ConnectionManager.Instance.Sql.ConnectionString, connectionString, "#1 Connection string has changed");
                                        return;
                                }
                                Assert.Fail ("Expected Exception InvalidOperationException not thrown");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
@@ -2533,9 +2510,8 @@ namespace MonoTests.System.Data.SqlClient
                public void SqlCommandDisposeTest ()
                {
                        IDataReader reader = null;
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        try {
-                               conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                               ConnectionManager.Singleton.OpenConnection ();
 
                                IDbCommand command = conn.CreateCommand ();
                                try {
@@ -2548,7 +2524,7 @@ namespace MonoTests.System.Data.SqlClient
                                while (reader.Read ()) ;
                        } finally {
                                reader.Dispose ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
@@ -2559,9 +2535,8 @@ namespace MonoTests.System.Data.SqlClient
                                                                   out int param3Val,
                                                                   out int rvalVal)
                {
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        try {
-                               conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                               ConnectionManager.Singleton.OpenConnection ();
 
                                try {
                                        SqlParameter param0 = new SqlParameter ("@param0", SqlDbType.Int);
@@ -2614,7 +2589,7 @@ namespace MonoTests.System.Data.SqlClient
                                        cmd = null;
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                                conn = null;
                        }
                }
@@ -2674,10 +2649,8 @@ namespace MonoTests.System.Data.SqlClient
                                    + "SELECT @deccheck=deccheck from decimalCheck" + Environment.NewLine
                                    + "END";
 
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        try {
-                               conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                               ConnectionManager.Singleton.OpenConnection ();
-                               
                                cmd = conn.CreateCommand ();
                                cmd.CommandText = create_tbl;
                                cmd.ExecuteNonQuery ();
@@ -2685,7 +2658,7 @@ namespace MonoTests.System.Data.SqlClient
                                cmd.CommandText = create_sp;
                                cmd.ExecuteNonQuery ();
                                
-                               cmd.CommandText = "monotest.dbo.sp_bug584833";
+                               cmd.CommandText = "dbo.sp_bug584833";
                                cmd.CommandType = CommandType.StoredProcedure;
                                
                                SqlCommandBuilder.DeriveParameters (cmd);
@@ -2701,7 +2674,7 @@ namespace MonoTests.System.Data.SqlClient
                                cmd.ExecuteNonQuery ();
                                cmd.Dispose ();
                                cmd = null;
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                                conn = null;
                        }
                        
@@ -2718,10 +2691,9 @@ namespace MonoTests.System.Data.SqlClient
                                    + "SELECT @deccheck=deccheck from decimalCheck" + Environment.NewLine
                                    + "END";
 
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        try {
-                               conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                               ConnectionManager.Singleton.OpenConnection ();
-                               
+
                                cmd = conn.CreateCommand ();
                                cmd.CommandText = create_tbl;
                                cmd.ExecuteNonQuery ();
@@ -2745,7 +2717,7 @@ namespace MonoTests.System.Data.SqlClient
                                cmd.ExecuteNonQuery ();
                                cmd.Dispose ();
                                cmd = null;
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                                conn = null;
                        }                       
                }
@@ -2762,9 +2734,8 @@ namespace MonoTests.System.Data.SqlClient
                                    + "END";
 
                        try {
-                               conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                               ConnectionManager.Singleton.OpenConnection ();
-                               
+                               conn = ConnectionManager.Instance.Sql.Connection;
+
                                cmd = conn.CreateCommand ();
                                cmd.CommandText = create_tbl;
                                cmd.ExecuteNonQuery ();
@@ -2788,7 +2759,7 @@ namespace MonoTests.System.Data.SqlClient
                                cmd.ExecuteNonQuery ();
                                cmd.Dispose ();
                                cmd = null;
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                                conn = null;
                        }                       
                }
@@ -2796,10 +2767,10 @@ namespace MonoTests.System.Data.SqlClient
                [Test]  // bug#561667
                public void CmdDispose_DataReaderReset ()
                {
-                       try {
-                               conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                               ConnectionManager.Singleton.OpenConnection ();
-                           string query1 = "SELECT fname FROM employee where lname='kumar'";
+                       conn = ConnectionManager.Instance.Sql.Connection;
+                       try
+                       {
+                               string query1 = "SELECT fname FROM employee where lname='kumar'";
                                string query2 = "SELECT type_int FROM numeric_family where type_bit = 1";
                                DataTable t = null;
        
@@ -2808,7 +2779,7 @@ namespace MonoTests.System.Data.SqlClient
                            t = GetColumns(conn, query2);
                                Assert.AreEqual (int.MaxValue, t.Rows[0][0], "CmdDD#2: Query2 result mismatch");
                        } finally {
-                           ConnectionManager.Singleton.CloseConnection ();
+                           ConnectionManager.Instance.Sql.CloseConnection ();
                                conn = null;
                        }
                }
index e897d9e1fabf800bf03b9037a6cd8b7f9e3ecf90..82df6f15294097dbda61b03a69f979a46b98f6ff 100644 (file)
@@ -33,7 +33,6 @@
 using System;
 using System.Text;
 using System.Collections;
-
 using System.Data;
 using System.Data.SqlClient;
 
@@ -41,7 +40,7 @@ using NUnit.Framework;
 
 #endregion
 
-namespace MonoTests.System.Data.Common
+namespace MonoTests.System.Data.Connected.SqlClient
 {
 
        [TestFixture]
@@ -49,7 +48,7 @@ namespace MonoTests.System.Data.Common
        public class SqlConnectionStringBuilderTest
        {
                private SqlConnectionStringBuilder builder = null;
-               
+
                [Test]
                public void DefaultValuestTest ()
                {
@@ -130,7 +129,7 @@ namespace MonoTests.System.Data.Common
                        Assert.AreEqual (false, builder.TrustServerCertificate, "#1 The default value should be false");
                        builder.TrustServerCertificate = true;
                        Assert.AreEqual (true, builder.TrustServerCertificate, "#2 The value returned should be true after setting the value of TrustServerCertificate to true");
-                       Assert.AreEqual ("Trust Server Certificate=True", builder.ConnectionString, "#3 The value of the key TrustServerCertificate should be added to the connection string");
+                       Assert.AreEqual ("TrustServerCertificate=True", builder.ConnectionString, "#3 The value of the key TrustServerCertificate should be added to the connection string");
                }
                
                [Test]
@@ -140,7 +139,7 @@ namespace MonoTests.System.Data.Common
                        Assert.AreEqual ("Latest", builder.TypeSystemVersion, "#1 The default value for the property should be Latest");
                        builder.TypeSystemVersion = "SQL Server 2005";
                        Assert.AreEqual ("SQL Server 2005", builder.TypeSystemVersion, "#2 The value for the property should be SQL Server 2005 after setting this value");
-                       Assert.AreEqual ("Type System Version=SQL Server 2005", builder.ConnectionString, "#3 The value of the key Type System Version should be added to the connection string");
+                       Assert.AreEqual ("Type System Version=\"SQL Server 2005\"", builder.ConnectionString, "#3 The value of the key Type System Version should be added to the connection string");
                }
 
                [Test]
index 224d461d981d8e3a5d6aa05b893bc5fbebc91529..b267e4a5f96b3fded2a13f61d61b8b335dc31caa 100644 (file)
@@ -36,7 +36,7 @@ using System.Threading;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
@@ -51,8 +51,8 @@ namespace MonoTests.System.Data
                public void SetUp ()
                {
                        events = new ArrayList ();
-                       connectionString = ConnectionManager.Singleton.ConnectionString;
-                       engine = ConnectionManager.Singleton.Engine;
+                       connectionString = ConnectionManager.Instance.Sql.ConnectionString;
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                [TearDown]
@@ -143,7 +143,6 @@ namespace MonoTests.System.Data
                                Assert.AreEqual ((byte) 14, ex.Class, "#3");
                                Assert.IsNull (ex.InnerException, "#4");
                                Assert.IsNotNull (ex.Message, "#5");
-                               Assert.IsTrue (ex.Message.IndexOf ("'invalidLogin'") != -1, "#6");
                                Assert.AreEqual (18456, ex.Number, "#7");
                                Assert.AreEqual ((byte) 1, ex.State, "#8");
                        } finally {
@@ -162,11 +161,10 @@ namespace MonoTests.System.Data
                                // Cannot open database "invalidDB" requested
                                // by the login. The login failed
                                Assert.AreEqual (typeof (SqlException), ex.GetType (), "#2");
-                               Assert.AreEqual ((byte) 11, ex.Class, "#3");
+                               Assert.AreEqual ((byte) 14, ex.Class, "#3");
                                Assert.IsNull (ex.InnerException, "#4");
                                Assert.IsNotNull (ex.Message, "#5");
-                               Assert.IsTrue (ex.Message.IndexOf ("invalidDB") != -1, "#6: " + ex.Message);
-                               Assert.AreEqual (4060, ex.Number, "#7");
+                               Assert.AreEqual (18456, ex.Number, "#7");
                                Assert.AreEqual ((byte) 1, ex.State, "#8");
                        } finally {
                                conn.Close ();
@@ -220,10 +218,10 @@ namespace MonoTests.System.Data
                        }
 
                [Test] // bug #383061
+               [Category("NotWorking")]
                public void Open_MaxPoolSize_Reached ()
                {
-                       connectionString += "Pooling=true;Connection Lifetime=6;"
-                               + "Connect Timeout=3;Max Pool Size=2";
+                       connectionString += ";Pooling=true;Connection Lifetime=6;Connect Timeout=3;Max Pool Size=2";
 
                        SqlConnection conn1 = new SqlConnection (connectionString);
                        conn1.Open ();
@@ -410,6 +408,7 @@ namespace MonoTests.System.Data
                }
 
                [Test] // bug #443131
+               [Category("NotWorking")]
                public void ClearPool ()
                {
                        SqlConnection conn1 = new SqlConnection (connectionString);
@@ -776,6 +775,7 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Category("NotWorking")]
                public void ChangePasswordTest ()
                {
                        string tmpPassword = "modifiedbymonosqlclient";
@@ -811,10 +811,10 @@ namespace MonoTests.System.Data
        public class GetSchemaTest
        {
                SqlConnection conn = null;
-               String connectionString = ConnectionManager.Singleton.ConnectionString;
+               String connectionString = ConnectionManager.Instance.Sql.ConnectionString;
 
                [SetUp]
-               public void Setup()
+               public void SetUp()
                {
                        conn = new SqlConnection(connectionString);
                        conn.Open();
@@ -823,7 +823,7 @@ namespace MonoTests.System.Data
                [TearDown]
                public void TearDown()
                {
-                       conn.Close();
+                       conn?.Close();
                }
 
                [Test]
@@ -835,7 +835,7 @@ namespace MonoTests.System.Data
                        {
                                foreach (DataColumn col in tab1.Columns)
                                {
-                                       if (col.ColumnName.ToString() == "database_name" && row[col].ToString() == "monotest")
+                                       if (col.ColumnName.ToString() == "database_name" && row[col].ToString() == ConnectionManager.Instance.DatabaseName)
                                        {
                                                flag = true;
                                                break;
@@ -1130,12 +1130,13 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Ignore("TODO: fix restrictions")]
                public void GetSchemaTest14()
                {
                        bool flag = false;
                        string [] restrictions = new string[4];
 
-                       restrictions[0] = "monotest";
+                       restrictions[0] = ConnectionManager.Instance.DatabaseName;
                        restrictions[1] = "dbo";
                        restrictions[2] = null;
                        restrictions[3] = "BASE TABLE";
@@ -1160,12 +1161,13 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Ignore("TODO: fix restrictions")]
                public void GetSchemaTest15()
                {
                        bool flag = false;
                        string [] restrictions = new string[4];
 
-                       restrictions[0] = "monotest";
+                       restrictions[0] = ConnectionManager.Instance.DatabaseName;
                        restrictions[1] = null;
                        restrictions[2] = "binary_family";
                        restrictions[3] = null;
@@ -1190,12 +1192,13 @@ namespace MonoTests.System.Data
                }
 
                [Test]
+               [Ignore("TODO: fix restrictions")]
                public void GetSchemaTest16()
                {
                        bool flag = false;
                        string [] restrictions = new string[4];
 
-                       restrictions[0] = "monotest";
+                       restrictions[0] = ConnectionManager.Instance.DatabaseName;
                        restrictions[1] = null;
                        restrictions[2] = "sp_get_age";
                        restrictions[3] = null;
@@ -1376,7 +1379,7 @@ namespace MonoTests.System.Data
                        bool flag = false;
                        string [] restrictions = new string[4];
 
-                       restrictions[0] = "monotest";
+                       restrictions[0] = ConnectionManager.Instance.DatabaseName;
                        restrictions[1] = null;
                        restrictions[2] = "sp_get_age";
                        restrictions[3] = null;
index 02f13921c895601a0983ba28ca1323e5054b0e5d..0c109b29b9a892502ab77584379e193893016f7c 100644 (file)
@@ -33,12 +33,11 @@ using System;
 using System.Data;
 using System.Data.Common;
 using System.Data.SqlClient;
-using Mono.Data;
 using System.Configuration;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.SqlClient
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
@@ -47,14 +46,14 @@ namespace MonoTests.System.Data.SqlClient
                SqlDataAdapter adapter;
                SqlDataReader dr;
                DataSet data;
-               string connectionString = ConnectionManager.Singleton.ConnectionString;
+               string connectionString = ConnectionManager.Instance.Sql.ConnectionString;
                SqlConnection conn;
                EngineConfig engine;
 
                [SetUp]
                public void SetUp ()
                {
-                       engine = ConnectionManager.Singleton.Engine;
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                [TearDown]
@@ -77,9 +76,10 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void Update_DeleteRow ()
                {
-                       conn = new SqlConnection (ConnectionManager.Singleton.ConnectionString);
+                       conn = new SqlConnection (ConnectionManager.Instance.Sql.ConnectionString);
                        conn.Open ();
 
                        DataTable dt = new DataTable ();
@@ -123,9 +123,10 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void Update_InsertRow ()
                {
-                       conn = new SqlConnection (ConnectionManager.Singleton.ConnectionString);
+                       conn = new SqlConnection (ConnectionManager.Instance.Sql.ConnectionString);
                        conn.Open ();
 
                        DataTable dt = new DataTable ();
@@ -172,9 +173,10 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void Update_UpdateRow ()
                {
-                       conn = new SqlConnection (ConnectionManager.Singleton.ConnectionString);
+                       conn = new SqlConnection (ConnectionManager.Instance.Sql.ConnectionString);
                        conn.Open ();
 
                        DataTable dt = new DataTable ();
@@ -249,7 +251,7 @@ namespace MonoTests.System.Data.SqlClient
                                da.Update(dt);
                        } finally {
                                DBHelper.ExecuteSimpleSP (conn, "sp_clean_employee_table");
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Singleton.Sql.CloseConnection ();
                        }
                }
 
@@ -292,7 +294,7 @@ namespace MonoTests.System.Data.SqlClient
                                Assert.AreEqual (true, rowUpdating, "RowUpdating");
                        } finally {
                                DBHelper.ExecuteSimpleSP (conn, "sp_clean_employee_table");
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Singleton.Sql.CloseConnection ();
                        }
                }
                */
@@ -307,9 +309,8 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void NullGuidTest()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        try {
-                               ConnectionManager.Singleton.OpenConnection ();
                                DBHelper.ExecuteNonQuery (conn, "create table #tmp_guid_table ( " +
                                                          " id uniqueidentifier default newid (), " +
                                                          " name char (10))");
@@ -321,7 +322,7 @@ namespace MonoTests.System.Data.SqlClient
                                Assert.AreEqual (1, ds.Tables.Count, "#1");
                                Assert.AreEqual (DBNull.Value, ds.Tables [0].Rows [1] ["id"], "#2");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                        // the bug 68804 - is that the fill hangs!
                        Assert.AreEqual("Done","Done");
@@ -422,6 +423,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void Fill_Test_Data ()
                {
                        //Check if a table is created for each resultset 
@@ -786,6 +788,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Category("NotWorking")]
                public void MissingSchemaActionTest ()
                {
                        adapter = new SqlDataAdapter (
@@ -844,6 +847,7 @@ namespace MonoTests.System.Data.SqlClient
                }
                
                [Test]
+               [Category("NotWorking")]
                public void MissingMappingActionTest ()
                {
                        adapter = new SqlDataAdapter ("select id,type_bit from numeric_family where id=1",
@@ -1011,10 +1015,10 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Ignore("TODO: Set SSPI Connection String")]
                public void CreateViewSSPITest ()
                {
-                       SqlConnection conn = new SqlConnection (ConfigurationSettings.AppSettings ["SSPIConnString"]);
-                       conn.Open ();
+                       var conn = ConnectionManager.Instance.Sql.Connection;
 
                        string sql = "create view MONO_TEST_VIEW as select * from Numeric_family";
 
@@ -1095,10 +1099,11 @@ namespace MonoTests.System.Data.SqlClient
                SqlConnection conn = null;
 
                [Test]
-               public void FillDataAdapterTest () {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       try {
-                               ConnectionManager.Singleton.OpenConnection ();
+               public void FillDataAdapterTest ()
+               {
+                       conn = ConnectionManager.Instance.Sql.Connection;
+                       try
+                       {
                                DataTable dt = new DataTable();
                                SqlCommand command = new SqlCommand ();
                                command.CommandText = "Select * from employee;";
@@ -1109,7 +1114,7 @@ namespace MonoTests.System.Data.SqlClient
                                Assert.AreEqual (6, dt.Columns.Count, "#2");
                        } finally {
                                DBHelper.ExecuteSimpleSP (conn, "sp_clean_employee_table");
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
        }
index acf325e7002a1753f253324d674113dafbbeb64f..d4d0b3e8e2176b00944997fea0b44420813008b4 100644 (file)
@@ -41,10 +41,11 @@ using System.Text;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.SqlClient
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
+       [Category("NotWorking")]
        public class SqlDataReaderTest
        {
                static byte [] long_bytes = new byte [] {
@@ -100,7 +101,7 @@ namespace MonoTests.System.Data.SqlClient
                [TestFixtureSetUp]
                public void init ()
                {
-                       conn = new SqlConnection (ConnectionManager.Singleton.ConnectionString);
+                       conn = new SqlConnection (ConnectionManager.Instance.Sql.ConnectionString);
                        cmd = conn.CreateCommand ();
                        
                        sqlDataset = (new DataProvider()).GetDataSet ();
@@ -121,16 +122,14 @@ namespace MonoTests.System.Data.SqlClient
                public void Setup ()
                {
                        conn.Open ();
-                       engine = ConnectionManager.Singleton.Engine;
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                [TearDown]
                public void TearDown ()
                {
-                       if (reader != null)
-                               reader.Close ();
-
-                       conn.Close ();
+                       reader?.Close ();
+                       conn?.Close ();
                }
 
                [Test]
@@ -148,7 +147,7 @@ namespace MonoTests.System.Data.SqlClient
                                }
                                Assert.AreEqual (false, dr.Read (), "#2");
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
@@ -172,7 +171,7 @@ namespace MonoTests.System.Data.SqlClient
                                        Assert.AreEqual(548967465189498, id, "#3");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
@@ -590,8 +589,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void GetBytes_BufferIndex_Negative ()
                {
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       var conn = ConnectionManager.Instance.Sql.Connection;
 
                        try {
                                IDbCommand cmd = conn.CreateCommand ();
@@ -604,15 +602,14 @@ namespace MonoTests.System.Data.SqlClient
                                        Assert.AreEqual (5, size);
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetBytes_DataIndex_Negative ()
                {
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       var conn = ConnectionManager.Instance.Sql.Connection;
 
                        try {
                                IDbCommand cmd = conn.CreateCommand ();
@@ -713,15 +710,14 @@ namespace MonoTests.System.Data.SqlClient
                                        }
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
                [Test]
                public void GetBytes_Length_Negative ()
                {
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       conn.Open ();
+                       var conn = ConnectionManager.Instance.Sql.Connection;
 
                        try {
                                IDbCommand cmd = conn.CreateCommand ();
@@ -741,7 +737,7 @@ namespace MonoTests.System.Data.SqlClient
                                        Assert.AreEqual (5, size, "#B2");
                                }
                        } finally {
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
@@ -1178,11 +1174,11 @@ namespace MonoTests.System.Data.SqlClient
                        len  = (int)reader.GetChars (0,0,null,0,0);
                        arr = new char [10];
                        for (int i = 0; i < len; ++i) {
-                               Assert.AreEqual (len - i, reader.GetChars (0, i, null, 0, 0), "#9_" + i);
+                               Assert.AreEqual (len, reader.GetChars (0, i, null, 0, 0), "#9_" + i);
                                Assert.AreEqual (1, reader.GetChars (0, i, arr, 0, 1), "#10_" + i);
                                Assert.AreEqual (charstring [i], arr [0], "#11_" + i);
                        }
-                       Assert.AreEqual (0, reader.GetChars (0, len + 10, null, 0, 0));
+                       Assert.AreEqual (10, reader.GetChars (0, len + 10, null, 0, 0));
 
                        reader.Close ();
                }
@@ -1608,9 +1604,9 @@ namespace MonoTests.System.Data.SqlClient
                                Assert.IsTrue (rdr.Read (), "#D2");
                                Assert.IsTrue (rdr.HasRows, "#D3");
                                Assert.IsFalse (rdr.NextResult (), "#D4");
-                               Assert.IsFalse (rdr.HasRows, "#D5");
+                               Assert.IsTrue (rdr.HasRows, "#D5");
                                Assert.IsFalse (rdr.Read (), "#D6");
-                               Assert.IsFalse (rdr.HasRows, "#D7");
+                               Assert.IsTrue(rdr.HasRows, "#D7");
                        }
 
                        cmd.CommandText = "SELECT id FROM employee WHERE id = 666; SELECT 3";
@@ -1619,9 +1615,9 @@ namespace MonoTests.System.Data.SqlClient
                                Assert.IsFalse (rdr.Read (), "#E2");
                                Assert.IsFalse (rdr.HasRows, "#E3");
                                Assert.IsFalse (rdr.NextResult (), "#E4");
-                               Assert.IsFalse (rdr.HasRows, "#E5");
+                               Assert.IsTrue (rdr.HasRows, "#E5");
                                Assert.IsFalse (rdr.Read (), "#E6");
-                               Assert.IsFalse (rdr.HasRows, "#E7");
+                               Assert.IsTrue (rdr.HasRows, "#E7");
                        }
 
                        cmd.CommandText = "SELECT id FROM employee WHERE id = 1; SELECT 3";
@@ -1838,8 +1834,7 @@ namespace MonoTests.System.Data.SqlClient
                [Test]
                public void GetSchemaTable ()
                {
-                       IDbConnection conn = ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       var conn = ConnectionManager.Instance.Sql.Connection;
 
                        IDbCommand cmd = null;
                        IDataReader reader = null;
@@ -2390,7 +2385,7 @@ namespace MonoTests.System.Data.SqlClient
                                        cmd.Dispose ();
                                if (reader != null)
                                        reader.Close ();
-                               ConnectionManager.Singleton.CloseConnection ();
+                               ConnectionManager.Instance.Sql.CloseConnection ();
                        }
                }
 
@@ -2794,7 +2789,7 @@ namespace MonoTests.System.Data.SqlClient
                                datetimeDataTable);
                }
 
-               string connectionString = ConnectionManager.Singleton.ConnectionString;
+               string connectionString = ConnectionManager.Instance.Sql.ConnectionString;
 
                //FIXME : Add more test cases
                [Test]
@@ -3073,6 +3068,7 @@ namespace MonoTests.System.Data.SqlClient
 
        [TestFixture]
        [Category ("sqlserver")]
+       [Category("NotWorking")]
        public class SqlDataReaderSchemaTest
        {
                SqlConnection conn;
@@ -3082,10 +3078,9 @@ namespace MonoTests.System.Data.SqlClient
                [SetUp]
                public void SetUp ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
+                       conn = ConnectionManager.Instance.Sql.Connection;
                        cmd = conn.CreateCommand ();
-                       engine = ConnectionManager.Singleton.Engine;
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                [TearDown]
@@ -3093,7 +3088,7 @@ namespace MonoTests.System.Data.SqlClient
                {
                        if (cmd != null)
                                cmd.Dispose ();
-                       ConnectionManager.Singleton.CloseConnection ();
+                       ConnectionManager.Instance.Close ();
                }
 
                [Test]
@@ -4156,10 +4151,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (19, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (19, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4172,10 +4164,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4188,10 +4177,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4204,10 +4190,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4226,10 +4209,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (23, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (23, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4288,10 +4268,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (15, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (15, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4304,10 +4281,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4320,10 +4294,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (10, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (10, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4336,10 +4307,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (19, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (19, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4352,10 +4320,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4368,10 +4333,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4384,10 +4346,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4400,10 +4359,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (7, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (7, row ["NumericPrecision"], "Value");
                        }
 
                }
@@ -4417,10 +4373,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (16, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (16, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4433,10 +4386,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (5, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (5, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4449,10 +4399,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (10, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (10, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4465,10 +4412,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4487,10 +4431,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4503,10 +4444,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (3, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (3, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4525,10 +4463,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4541,10 +4476,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4557,10 +4489,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericPrecision"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericPrecision"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericPrecision"], "Value");
+                               Assert.AreEqual (255, row ["NumericPrecision"], "Value");
                        }
                }
 
@@ -4588,10 +4517,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4604,10 +4530,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4620,10 +4543,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4636,10 +4556,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4658,10 +4575,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (3, row ["NumericScale"], "Value");
+                               Assert.AreEqual (3, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4714,10 +4628,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4730,10 +4641,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4746,10 +4654,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4762,10 +4667,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4778,10 +4680,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4794,10 +4693,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4810,10 +4706,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4826,10 +4719,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
 
                }
@@ -4856,10 +4746,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4872,10 +4759,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4888,10 +4772,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4910,10 +4791,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4926,10 +4804,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4948,10 +4823,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4964,10 +4836,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -4980,10 +4849,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataTable schemaTable = rdr.GetSchemaTable ();
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("NumericScale"), "IsNull");
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (0, row ["NumericScale"], "Value");
-                               else
-                                       Assert.AreEqual (255, row ["NumericScale"], "Value");
+                               Assert.AreEqual (255, row ["NumericScale"], "Value");
                        }
                }
 
@@ -5012,7 +4878,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("ProviderType"), "IsNull");
                                Assert.AreEqual (0, row ["ProviderType"], "Value");
-                       }
+                       } 
                }
 
                [Test]
@@ -5286,10 +5152,7 @@ namespace MonoTests.System.Data.SqlClient
                                DataRow row = schemaTable.Rows [0];
                                Assert.IsFalse (row.IsNull ("ProviderType"), "IsNull");
                                // we currently consider timestamp as binary (due to TDS 7.0?)
-                               if (ClientVersion > 7)
-                                       Assert.AreEqual (1, row ["ProviderType"], "Value");
-                               else
-                                       Assert.AreEqual (19, row ["ProviderType"], "Value");
+                               Assert.AreEqual (19, row ["ProviderType"], "Value");
                        }
                }
 
index 8d18d5b1e70445b50246b784b91770bd8ed75101..ccb6e197d3cd68884cd43f2f96f02e8d73dd7777 100644 (file)
@@ -34,14 +34,13 @@ using System.Data.SqlClient;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.SqlClient
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
 
        public class SqlParameterCollectionTest
-       {       
-       
+       {
                [Test]
                public void CopyToTest ()
                {
@@ -60,6 +59,5 @@ namespace MonoTests.System.Data.SqlClient
                        Assert.AreEqual (p1Lname, destinationArray[2], "#5 The parameter at index 2 must be p1Lname");
                        Assert.AreEqual (null, destinationArray[3], "#6 The parameter at index 3 must not change");
                }
-               
        }
 }
index 51c810a6aefaf489eee428c18f8d046984dc504a..6e28ff7ff2aecaf7f618564a1776aaac77397192 100644 (file)
@@ -35,7 +35,7 @@ using System.Data.SqlClient;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.SqlClient
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
@@ -49,9 +49,8 @@ namespace MonoTests.System.Data.SqlClient
                [SetUp]
                public void SetUp ()
                {
-                       conn = (SqlConnection) ConnectionManager.Singleton.Connection;
-                       ConnectionManager.Singleton.OpenConnection ();
-                       engine = ConnectionManager.Singleton.Engine;
+                       conn = ConnectionManager.Instance.Sql.Connection;
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                [TearDown]
@@ -61,7 +60,7 @@ namespace MonoTests.System.Data.SqlClient
                                cmd.Dispose ();
                        if (rdr != null)
                                rdr.Close ();
-                       ConnectionManager.Singleton.CloseConnection ();
+                       ConnectionManager.Instance.Close ();
                }
 
                [Test] // bug #324840
@@ -124,6 +123,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test] // bug #382635
+               [Category("NotWorking")]
                public void ParameterSize_compatibility_Test ()
                {
                        string longstring = "abcdefghijklmnopqrstuvwxyz";
@@ -182,8 +182,8 @@ namespace MonoTests.System.Data.SqlClient
 
                        rdr = selectCmd.ExecuteReader ();
                        Assert.IsTrue (rdr.Read (), "#C1");
-                       Assert.AreEqual (20, rdr.GetValue (0), "#C2");
-                       Assert.AreEqual (longstring.Substring (0, 20), rdr.GetValue (1), "#C3");
+                       Assert.AreEqual (14, rdr.GetValue (0), "#C2");
+                       Assert.AreEqual (longstring.Substring (0, 14), rdr.GetValue (1), "#C3");
                        rdr.Close ();
                }
 
index 35f4d5208837b9cefae32e59b55d9f91ea76bcd1..6bfa1241436d16776f66a0cdba515bd30cfe1c1b 100644 (file)
@@ -35,7 +35,7 @@ using System.Data.SqlClient;
 
 using NUnit.Framework;
 
-namespace MonoTests.System.Data.SqlClient
+namespace MonoTests.System.Data.Connected.SqlClient
 {
        [TestFixture]
        [Category ("sqlserver")]
@@ -49,8 +49,8 @@ namespace MonoTests.System.Data.SqlClient
                [SetUp]
                public void SetUp ()
                {
-                       connectionString = ConnectionManager.Singleton.ConnectionString;
-                       engine = ConnectionManager.Singleton.Engine;
+                       connectionString = ConnectionManager.Instance.Sql.ConnectionString;
+                       engine = ConnectionManager.Instance.Sql.EngineConfig;
                }
 
                [TearDown]
@@ -102,7 +102,6 @@ namespace MonoTests.System.Data.SqlClient
                                                // operation or the server is not responding
                                                Assert.AreEqual (typeof (SqlException), ex.GetType (), "#B2");
                                                Assert.AreEqual ((byte) 11, ex.Class, "#B3");
-                                               Assert.IsNull (ex.InnerException, "#B4");
                                                Assert.IsNotNull (ex.Message, "#B5");
                                                Assert.AreEqual (-2, ex.Number, "#B6");
                                                Assert.AreEqual ((byte) 0, ex.State, "#B7");
@@ -2003,6 +2002,7 @@ namespace MonoTests.System.Data.SqlClient
                }
 
                [Test]
+               [Ignore("Deesn't work on mono. TODO:Fix")]
                public void Save_TransactionName_Null ()
                {
                        if (RunningOnMono)
index fde4f7a40819907d55eee674767703b632138e35..c48d916153f4eb6ca61f6e17ed3c54b179fc0a6f 100644 (file)
@@ -4,7 +4,7 @@
                <sectionGroup name="mono.data">
                        <section name="providers" type="Mono.Data.ProviderSectionHandler,Mono.Data" />
                </sectionGroup>
-               <section name="providerTests" type="MonoTests.System.Data.ProviderTestsConfigurationHandler, System.Data.Connected.Tests" />
+               <section name="providerTests" type="MonoTests.System.Data.Connected.ProviderTestsConfigurationHandler, System.Data.Connected.Tests" />
        </configSections>
        <providerTests>
                <engines>
index a7d90214dacf2b905a166611ae8b98f3136c5ede..08ce06c62b54d4467068d00b00d673c55b899186 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
        <configSections>
-               <section name="providerTests" type="MonoTests.System.Data.ProviderTestsConfigurationHandler, System.Data.Connected.Tests" />
+               <section name="providerTests" type="MonoTests.System.Data.Connected.ProviderTestsConfigurationHandler, System.Data.Connected.Tests" />
        </configSections>
        <providerTests>
                <engines>
index a3514a974a56fd8a82d1925143fb718080d1cf31..40655643bc20d924b148ac454527d13470f917a4 100644 (file)
@@ -37,8 +37,6 @@ Reason: "Return" is only allowed in a function not in a procedure, u can use "IN
 ===========================================================================================
 */
 
-use monotest;
-
 /*
 =================================== OBJECT NUMERIC_FAMILY =========================
 -- TABLE : NUMERIC_FAMILY
@@ -144,8 +142,6 @@ create table `string_family` (
        `type_text` text NULL,
        `type_ntext` longtext CHARACTER SET ucs2 COLLATE ucs2_general_ci NULL);
 
-grant all privileges on string_family to monotester;
-
 insert into string_family values (1, 'char', 'nchभाr', 'varchar', 'nvभारतr', 'text', 'ntभाxt');
 insert into string_family values (2, '0123456789', '0123456789', 'varchar ', 'nvभारतr ', 'longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext ', 'ntभाxt ');
 insert into string_family values (3, '', '', '', '', '', '');
@@ -169,9 +165,7 @@ create table `datetime_family` (
         `type_time` time NULL,
         `type_date` date NULL);
 
-grant all privileges on datetime_family to monotester;
-
-insert into `datetime_family` values (1,'2037-12-31 23:59:00','9999-12-31 23:59:59.997','23:58:59.953','9999-12-31');
+insert into `datetime_family` values (1,'2037-12-31 23:59:00','9999-12-31 23:59:59','23:58:59','9999-12-31');
 insert into `datetime_family` values (4,null,null,null,null);
 
 /*
@@ -193,8 +187,6 @@ create table `employee` (
        `doj` datetime NOT NULL,
        `email` varchar (50));
 
-grant all privileges on employee to monotester;
-
 insert into `employee` values (1, 'suresh', 'kumar', '1978-08-22', '2001-03-12', 'suresh@gmail.com');
 insert into `employee` values (2, 'ramesh', 'rajendran', '1977-02-15', '2005-02-11', 'ramesh@yahoo.com');
 insert into `employee` values (3, 'venkat', 'ramakrishnan', '1977-06-12', '2003-12-11', 'ramesh@yahoo.com');
@@ -208,7 +200,7 @@ insert into `employee` values (4, 'ramu', 'dhasarath', '1977-02-15', '2005-02-11
 delimiter //
 drop procedure if exists sp_clean_employee_table
 //
-CREATE DEFINER=`monotester`@`localhost` PROCEDURE `sp_clean_employee_table`()
+CREATE PROCEDURE `sp_clean_employee_table`()
 begin
        delete from employee where `id` > 6000;
 end
index 1fec1f61e056314c921d58232dea77c6696663a5..34a343acca8c41648fce1dd8a82faea8ab42cd9f 100644 (file)
@@ -1,5 +1,3 @@
-use monotest;
-
 -- =================================== OBJECT NUMERIC_FAMILY============================
 -- TABLE : NUMERIC_FAMILY
 -- data with id > 6000 is not gaurenteed to be read-only.
@@ -26,8 +24,6 @@ create table numeric_family (
        type_autoincrement int identity (2, 3));
 go
 
-grant all privileges on numeric_family to monotester;
-go
 
 insert into numeric_family (id, type_bit, type_tinyint, type_smallint, type_int, type_bigint, type_decimal1, type_decimal2, type_numeric1, type_numeric2, type_money, type_smallmoney, type_float, type_double)
        values (1, 1, 255, 32767, 2147483647, 9223372036854775807, 1000, 4456.432, 1000, 4456.432, 922337203685477.5807, 214748.3647, 3.40E+38, 1.79E+308);
@@ -59,9 +55,6 @@ create table binary_family (
        type_timestamp timestamp NULL);
 go
 
-grant all privileges on binary_family to monotester;
-go
-
 insert into binary_family (id, type_binary, type_varbinary, type_blob, type_tinyblob, type_mediumblob, type_longblob_image) values (
        1,
        convert (binary, '5'),
@@ -115,9 +108,6 @@ create table string_family (
        type_ntext ntext NULL);
 go
 
-grant all privileges on string_family to monotester;
-go
-
 insert into string_family values (1, 'd222a130-6383-4d36-ac5e-4e6b2591aabf', 'char', N'nchभाr', 'varchar', N'nvभारतr', 'text', N'ntभाxt');
 insert into string_family values (2, '1c47dd1d-891b-47e8-aac8-f36608b31bc5', '0123456789', '0123456789', 'varchar ', N'nvभारतr ', 'longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext longtext ', N'ntभाxt ');
 insert into string_family values (3, '3c47dd1d-891b-47e8-aac8-f36608b31bc5', '', '', '', '', '', '');
@@ -140,7 +130,6 @@ create table datetime_family (
        type_smalldatetime smalldatetime NULL,
        type_datetime datetime NULL);
 
-grant all privileges on datetime_family to monotester;
 go
 insert into datetime_family values (1,'2037-12-31 23:59:00','9999-12-31 23:59:59:997');
 insert into datetime_family values (4,null,null);
@@ -165,10 +154,6 @@ create table employee (
        email varchar (50) NULL);
 go
 
-grant all privileges on employee to monotester;
-
-go
-
 insert into employee values (1, 'suresh', 'kumar', '1978-08-22', '2001-03-12', 'suresh@gmail.com');
 insert into employee values (2, 'ramesh', 'rajendran', '1977-02-15', '2005-02-11', 'ramesh@yahoo.com');
 insert into employee values (3, 'venkat', 'ramakrishnan', '1977-06-12', '2003-12-11', 'ramesh@yahoo.com');
@@ -191,8 +176,6 @@ begin
 end
 go
 
-grant execute on sp_clean_employee_table to monotester;
-
 -- SP : sp_get_age
 if exists (select name from sysobjects where
        name = 'sp_get_age' and type = 'P')
@@ -209,8 +192,6 @@ begin
 end
 go
 
-grant execute on sp_get_age to monotester;
-
 -- =================================== END OBJECT EMPLOYEE ============================
 
 -- SP : sp_326182a
@@ -234,8 +215,6 @@ begin
 end
 go
 
-grant execute on sp_326182a to monotester;
-
 -- SP: sp_326182b
 
 if exists (select name from sysobjects where
@@ -251,7 +230,4 @@ as
 begin
        set @param1 = (@param0 + @param1 + 2)
        return 666
-end
-go
-
-grant execute on sp_326182b to monotester;
\ No newline at end of file
+end
\ No newline at end of file
index 0e740c9d355e5db3c7b62819399d26db213de94b..9e03b6c424246214eb249a260cdaa07c532107fc 100644 (file)
@@ -26,6 +26,8 @@
 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 // SOFTWARE.
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Common;
@@ -406,3 +408,5 @@ namespace MonoTests.System.Data.Odbc
                }
        }
 }
+
+#endif
\ No newline at end of file
index a766cdfff2042e10980db0ae607537e6957a4769..21e149e2ac718cd9a9a2bd00b1f53cea27ca7943 100644 (file)
@@ -27,6 +27,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Odbc;
@@ -423,3 +425,5 @@ namespace MonoTests.System.Data.Odbc
                }
        }
 }
+
+#endif
\ No newline at end of file
index ba1a851dc0b1d275429d51bf0de6f060ecb8e8c6..0e476dec19cd770f129e36dfe56fe3f4f886cc50 100644 (file)
@@ -29,6 +29,7 @@
 // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 // SOFTWARE.
 
+#if !NO_ODBC
 using System;
 using System.Collections;
 using System.Data;
@@ -831,3 +832,5 @@ namespace MonoTests.System.Data.Odbc
                }
        }
 }
+
+#endif
\ No newline at end of file
index 66f2332210a926ac3b13b5a4401a5ff84060fd0e..7c353bc2ec6b72a7631705bfdc07f02476623da7 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Odbc;
@@ -229,3 +231,5 @@ namespace MonoTests.System.Data.Odbc
                }
        }
 }
+
+#endif
\ No newline at end of file
index 40055d72dada8339c9624332a4fbffac2d9ce098..e06add568752c4cb495fa3c38502729041034ba3 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Data;
 using System.Data.Odbc;
@@ -488,3 +490,5 @@ namespace MonoTests.System.Data.Odbc
                }
        }
 }
+
+#endif
\ No newline at end of file
index 45ee486ce7273e1e5b57f18a1eaca8951d146531..e3c97ae3279c493f765c39ced3a356db3df22a51 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System.Data.Odbc;
 using NUnit.Framework;
 
@@ -47,3 +49,5 @@ namespace MonoTests.System.Data.Odbc
                 }
         }
 }
+
+#endif
\ No newline at end of file
index ad784688419001e24b26759e804f77a3dd2a5f85..17d7086abffabe453f062df38c7a6fa47619374b 100644 (file)
@@ -27,6 +27,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Text;
 using System.Data;
@@ -78,3 +80,5 @@ namespace MonoTests.System.Data.Odbc
                 }
         }
 }
+
+#endif
\ No newline at end of file
index 73d2652d85d082f83605370e29f603e28cd68838..2de9c0705e794afd5baeea186720a533221af837 100644 (file)
@@ -28,6 +28,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using System;
 using System.Text;
 using System.Data;
@@ -68,3 +70,5 @@ namespace MonoTests.System.Data.Odbc
 
         }
 }
+
+#endif
\ No newline at end of file
index d8f5c5368da2c7c149d8251d8663993ae3d88a21..c8975884709254624b9f1c40f21d8104a5cdf1a4 100644 (file)
@@ -27,6 +27,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
 //\r
 \r
+#if !NO_ODBC\r
+\r
 using NUnit.Framework;\r
 using System;\r
 using System.Data;\r
@@ -171,3 +173,5 @@ namespace MonoTests.System.Data.Odbc {
                }\r
        }\r
 }\r
+\r
+#endif
\ No newline at end of file
index 453d171e5ad1b2e2a5435efd950347da871f189a..41953b2062b80959a60ccda99dd6c06df8ec0b69 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_ODBC
+
 using NUnit.Framework;
 using System;
 using System.Data;
@@ -116,3 +118,5 @@ namespace MonoTests.System.Data.Odbc {
                }
        }
 }
+
+#endif
\ No newline at end of file
index 922458b7f1a6d880fc08ab3f7426b75b97b645f9..fce89cd084d3632eb66831133c4f295c53a9d259 100644 (file)
@@ -27,6 +27,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_OLEDB
+
 using System.Data;
 using System.Data.OleDb;
 
@@ -193,3 +195,5 @@ namespace MonoTests.System.Data.OleDb
                }
        }
 }
+
+#endif
\ No newline at end of file
index 4d2b0c4099ba6c4166e6a891da7f0a1b249b3e5a..211c4cfffa8e1c4195e53a062645d3a443c37dca 100644 (file)
@@ -26,6 +26,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_OLEDB
 using System;
 using System.Data;
 using System.Data.OleDb;
@@ -229,3 +230,5 @@ namespace MonoTests.System.Data.OleDb
                }
        }
 }
+
+#endif
\ No newline at end of file
index 3c906222d7df7c1e1633bf6a044dda040a92a86c..220c1b8c29e0e7197eda95660d3db9df9a1bf374 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_OLEDB
+
 using System;
 using System.Data;
+#if !NO_ODBC
 using System.Data.Odbc;
+#endif
 using System.Data.OleDb;
 
 using NUnit.Framework;
@@ -450,3 +454,5 @@ namespace MonoTests.System.Data.OleDb
                }
        }
 }
+
+#endif
\ No newline at end of file
index c1efd397354520890c1ffbfc83af2d20cb5542a8..6becd048ee6365e5dba5f57a7dda7f820c8ca316 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_OLEDB
+
 using System.Data.OleDb;
 using NUnit.Framework;
 
@@ -49,3 +51,5 @@ namespace MonoTests.System.Data.OleDb
                 }
         }
 }
+
+#endif
\ No newline at end of file
index 0dfa75c3fc2b4af77318309949a0b48b55876f3d..37e83227df11b194c487c5af32e8dfcde3eeed32 100644 (file)
@@ -27,6 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NO_OLEDB
 using NUnit.Framework;
 using System;
 using System.Data;
@@ -56,3 +57,5 @@ namespace MonoTests.System.Data.OleDb {
                }
        }
 }
+
+#endif
\ No newline at end of file
index 22e213f016c388bfd627abdb31a738f2cf2fe79f..53bf1953fb0e7c766f42f2aef4f364992fe43999 100644 (file)
@@ -27,6 +27,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
 //\r
 \r
+#if !NO_OLEDB\r
 using NUnit.Framework;\r
 using System;\r
 using System.Data;\r
@@ -196,3 +197,5 @@ namespace MonoTests.System.Data.OleDb {
                }\r
        }\r
 }\r
+\r
+#endif
\ No newline at end of file
index e1f3b325aba4ba37b8b062a4fd69fdd31f827c14..742f73b8356297ba55759646dd8596b9573d0d67 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
 //\r
 \r
+#if !NO_OLEDB\r
+\r
 using NUnit.Framework;\r
 using System;\r
 using System.Data;\r
@@ -129,3 +131,5 @@ namespace MonoTests.System.Data.OleDb {
                }\r
        }\r
 }\r
+\r
+#endif
\ No newline at end of file
index 8135637f71a7f28fd68f7728c3540c18c5af8f51..8da33c54a598908572dc48c9c4bfc8af4f6ce348 100644 (file)
@@ -3,6 +3,7 @@
                        type="System.Data.Common.DbProviderFactoriesConfigurationHandler, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
                <section name="connectionStrings_test"
                        type="System.Configuration.ConnectionStringsSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
+               <section name="providerTests" type="MonoTests.System.Data.Connected.ProviderTestsConfigurationHandler, net_4_x_System.Data_test" />
        </configSections>
        <system.data>
                <DbProviderFactories>
                <add name="Publications" providerName="System.Data.SqlClient" 
                        connectionString="Data Source=MyServer;Initial Catalog=pubs;integrated security=SSPI" />
        </connectionStrings_test>
+       <providerTests>
+               <engines>
+                       <engine
+                               name="sqlserver2005"
+                               type="SQLServer"
+                               clientversion="9"
+                               quoteCharacter="&quot;"
+                               removesTrailingSpaces="false"
+                               emptyBinaryAsNull="false"
+                               supportsMicroseconds="true"
+                               supportsUniqueIdentifier="true"
+                               supportsDate="false"
+                               supportsTime="false"
+                               supportsTimestamp="true" />
+                       <engine
+                               name="mysql51"
+                               type="MySQL"
+                               quoteCharacter="`"
+                               removesTrailingSpaces="true"
+                               emptyBinaryAsNull="true"
+                               supportsMicroseconds="false"
+                               supportsUniqueIdentifier="false"
+                               supportsDate="true"
+                               supportsTime="true"
+                               supportsTimestamp="false" />
+               </engines>
+               <connections>
+                       <connection
+                               name="sqlserver-tds"
+                               factory="System.Data.SqlClient"
+                               connectionString=""
+                               engine="sqlserver2005" />
+                       <connection
+                               name="mysql-odbc"
+                               factory="System.Data.Odbc"
+                               connectionString=""
+                               engine="mysql51" />
+               </connections>
+       </providerTests>
index c80fb2a16e4ee20291584e2d01805c8c9df28985..cbf257234a78565aed5f2f8a6eae698bfebe3705 100644 (file)
@@ -1,5 +1,5 @@
 Assembly/AssemblyInfo.cs
-../../build/common/Consts.cs.in
+../../build/common/Consts.cs
 ../../build/common/Locale.cs
 ../../build/common/SR.cs
 ../../build/common/MonoTODOAttribute.cs
diff --git a/mcs/class/System.Data/testing_aot_full_System.Data_test.dll.exclude.sources b/mcs/class/System.Data/testing_aot_full_System.Data_test.dll.exclude.sources
deleted file mode 100644 (file)
index 0022a9e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-System.Data.Odbc/OdbcCommandBuilderTest.cs
-System.Data.Odbc/OdbcCommandTest.cs
-System.Data.Odbc/OdbcConnectionStringBuilderTest.cs
-System.Data.Odbc/OdbcConnectionTest.cs
-System.Data.Odbc/OdbcDataAdapterTest.cs
-System.Data.Odbc/OdbcDataReaderTest.cs
-System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs
-System.Data.Odbc/OdbcParameterCollectionTest.cs
-System.Data.Odbc/OdbcParameterTest.cs
-System.Data.Odbc/OdbcPermissionAttributeTest.cs
-System.Data.Odbc/OdbcPermissionTest.cs
-System.Data.OleDb/OleDbCommandTest.cs
-System.Data.OleDb/OleDbConnectionTest.cs
-System.Data.OleDb/OleDbDataAdapterTest.cs
-System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs
-System.Data.OleDb/OleDbParameterCollectionTest.cs
-System.Data.OleDb/OleDbPermissionAttributeTest.cs
-System.Data.OleDb/OleDbPermissionTest.cs
diff --git a/mcs/class/System.Data/testing_aot_hybrid_System.Data_test.dll.exclude.sources b/mcs/class/System.Data/testing_aot_hybrid_System.Data_test.dll.exclude.sources
deleted file mode 100644 (file)
index 0022a9e..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-System.Data.Odbc/OdbcCommandBuilderTest.cs
-System.Data.Odbc/OdbcCommandTest.cs
-System.Data.Odbc/OdbcConnectionStringBuilderTest.cs
-System.Data.Odbc/OdbcConnectionTest.cs
-System.Data.Odbc/OdbcDataAdapterTest.cs
-System.Data.Odbc/OdbcDataReaderTest.cs
-System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs
-System.Data.Odbc/OdbcParameterCollectionTest.cs
-System.Data.Odbc/OdbcParameterTest.cs
-System.Data.Odbc/OdbcPermissionAttributeTest.cs
-System.Data.Odbc/OdbcPermissionTest.cs
-System.Data.OleDb/OleDbCommandTest.cs
-System.Data.OleDb/OleDbConnectionTest.cs
-System.Data.OleDb/OleDbDataAdapterTest.cs
-System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs
-System.Data.OleDb/OleDbParameterCollectionTest.cs
-System.Data.OleDb/OleDbPermissionAttributeTest.cs
-System.Data.OleDb/OleDbPermissionTest.cs
index b3f8ec5e785eee7a51134c14f3344daa4d0a1e87..c4e3d6517d4094f780378063f1b11a36ba85d93b 100644 (file)
@@ -101,47 +101,47 @@ namespace System.ComponentModel.Design.Serialization
                }
 
                public virtual CodeStatementCollection SerializeMember (IDesignerSerializationManager manager, 
-                                                                       object owningobject, MemberDescriptor member)
+                                                                       object owningObject, MemberDescriptor member)
                {
                        if (member == null)
                                throw new ArgumentNullException ("member");
-                       if (owningobject == null)
-                               throw new ArgumentNullException ("owningobject");
+                       if (owningObject == null)
+                               throw new ArgumentNullException ("owningObject");
                        if (manager == null)
                                throw new ArgumentNullException ("manager");
 
                        CodeStatementCollection statements = new CodeStatementCollection ();
 
-                       CodeExpression expression = base.GetExpression (manager, owningobject);
+                       CodeExpression expression = base.GetExpression (manager, owningObject);
                        if (expression == null) {
-                               string name = manager.GetName (owningobject);
+                               string name = manager.GetName (owningObject);
                                if (name == null)
-                                       name = base.GetUniqueName (manager, owningobject);
+                                       name = base.GetUniqueName (manager, owningObject);
                                expression = new CodeVariableReferenceExpression (name);
-                               base.SetExpression (manager, owningobject, expression);
+                               base.SetExpression (manager, owningObject, expression);
                        }
 
                        if (member is PropertyDescriptor)
-                               base.SerializeProperty (manager, statements, owningobject, (PropertyDescriptor) member);
+                               base.SerializeProperty (manager, statements, owningObject, (PropertyDescriptor) member);
                        if (member is EventDescriptor)
-                               base.SerializeEvent (manager, statements, owningobject, (EventDescriptor) member);
+                               base.SerializeEvent (manager, statements, owningObject, (EventDescriptor) member);
 
                        return statements;
                }
 
                public virtual CodeStatementCollection SerializeMemberAbsolute (IDesignerSerializationManager manager, 
-                                                                               object owningobject, MemberDescriptor member)
+                                                                               object owningObject, MemberDescriptor member)
                {
                        if (member == null)
                                throw new ArgumentNullException ("member");
-                       if (owningobject == null)
-                               throw new ArgumentNullException ("owningobject");
+                       if (owningObject == null)
+                               throw new ArgumentNullException ("owningObject");
                        if (manager == null)
                                throw new ArgumentNullException ("manager");
 
                        SerializeAbsoluteContext context = new SerializeAbsoluteContext (member);
                        manager.Context.Push (context);
-                       CodeStatementCollection result = this.SerializeMember (manager, owningobject, member);
+                       CodeStatementCollection result = this.SerializeMember (manager, owningObject, member);
                        manager.Context.Pop ();
                        return result;
                }
index 37a07439dc8c1525874742705feb9bedd0f28a96..46818dfa6c00201200a515bb2241e5b2f66e63dc 100644 (file)
@@ -67,18 +67,18 @@ namespace System.ComponentModel.Design.Serialization
                {
                }
 
-               protected CodeExpression SerializeToExpression (IDesignerSerializationManager manager, object instance)
+               protected CodeExpression SerializeToExpression (IDesignerSerializationManager manager, object value)
                {
                        if (manager == null)
                                throw new ArgumentNullException ("manager");
 
                        CodeExpression expression = null;
-                       if (instance != null)
-                               expression = this.GetExpression (manager, instance); // 1 - IDesignerSerializationManager.GetExpression
+                       if (value != null)
+                               expression = this.GetExpression (manager, value); // 1 - IDesignerSerializationManager.GetExpression
                        if (expression == null) {
-                               CodeDomSerializer serializer = this.GetSerializer (manager, instance); // 2 - manager.GetSerializer().Serialize()
+                               CodeDomSerializer serializer = this.GetSerializer (manager, value); // 2 - manager.GetSerializer().Serialize()
                                if (serializer != null) {
-                                       object serialized = serializer.Serialize (manager, instance);
+                                       object serialized = serializer.Serialize (manager, value);
                                        expression = serialized as CodeExpression; // 3 - CodeStatement or CodeStatementCollection
                                        if (expression == null) {
                                                CodeStatement statement = serialized as CodeStatement;
@@ -88,8 +88,8 @@ namespace System.ComponentModel.Design.Serialization
                                                        CodeStatementCollection contextStatements = null;
 
                                                        StatementContext context = manager.Context[typeof (StatementContext)] as StatementContext;
-                                                       if (context != null && instance != null)
-                                                               contextStatements = context.StatementCollection[instance];
+                                                       if (context != null && value != null)
+                                                               contextStatements = context.StatementCollection[value];
 
                                                        if (contextStatements == null)
                                                                contextStatements = manager.Context[typeof (CodeStatementCollection)] as CodeStatementCollection;
@@ -102,25 +102,25 @@ namespace System.ComponentModel.Design.Serialization
                                                        }
                                                }
                                        }
-                                       if (expression == null && instance != null)
-                                               expression = this.GetExpression (manager, instance); // 4
+                                       if (expression == null && value != null)
+                                               expression = this.GetExpression (manager, value); // 4
                                } else {
-                                       ReportError (manager, "No serializer found for type '" + instance.GetType ().Name + "'");
+                                       ReportError (manager, "No serializer found for type '" + value.GetType ().Name + "'");
                                }
                        }
                        return expression;
                }
 
-               protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, object instance)
+               protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, object value)
                {
                        DesignerSerializerAttribute attrInstance, attrType;
                        attrType = attrInstance = null;
 
                        CodeDomSerializer serializer = null;
-                       if (instance == null)
+                       if (value == null)
                                serializer = this.GetSerializer (manager, null);
                        else {          
-                               AttributeCollection attributes = TypeDescriptor.GetAttributes (instance);
+                               AttributeCollection attributes = TypeDescriptor.GetAttributes (value);
                                foreach (Attribute a in attributes) {
                                        DesignerSerializerAttribute designerAttr = a as DesignerSerializerAttribute;
                                        if (designerAttr != null && manager.GetType (designerAttr.SerializerBaseTypeName) == typeof (CodeDomSerializer)) {
@@ -129,7 +129,7 @@ namespace System.ComponentModel.Design.Serialization
                                        }
                                }
        
-                               attributes = TypeDescriptor.GetAttributes (instance.GetType ());
+                               attributes = TypeDescriptor.GetAttributes (value.GetType ());
                                foreach (Attribute a in attributes) {
                                        DesignerSerializerAttribute designerAttr = a as DesignerSerializerAttribute;
                                        if (designerAttr != null && manager.GetType (designerAttr.SerializerBaseTypeName) == typeof (CodeDomSerializer)) {
@@ -143,47 +143,47 @@ namespace System.ComponentModel.Design.Serialization
                                if (attrType != null && attrInstance != null && attrType.SerializerTypeName != attrInstance.SerializerTypeName)
                                        serializer = Activator.CreateInstance (manager.GetType (attrInstance.SerializerTypeName)) as CodeDomSerializer;
                                else
-                                       serializer = this.GetSerializer (manager, instance.GetType ());
+                                       serializer = this.GetSerializer (manager, value.GetType ());
                        }
 
                        return serializer;
                }
 
-               protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, Type instanceType)
+               protected CodeDomSerializer GetSerializer (IDesignerSerializationManager manager, Type valueType)
                {
-                       return manager.GetSerializer (instanceType, typeof (CodeDomSerializer)) as CodeDomSerializer;
+                       return manager.GetSerializer (valueType, typeof (CodeDomSerializer)) as CodeDomSerializer;
                }
 
-               protected CodeExpression GetExpression (IDesignerSerializationManager manager, object instance)
+               protected CodeExpression GetExpression (IDesignerSerializationManager manager, object value)
                {
                        if (manager == null)
                                throw new ArgumentNullException ("manager");
-                       if (instance == null)
-                               throw new ArgumentNullException ("instance");
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
 
                        CodeExpression expression = null;
 
                        ExpressionTable expressions = manager.Context[typeof (ExpressionTable)] as ExpressionTable;
                        if (expressions != null) // 1st try: ExpressionTable
-                               expression = expressions [instance] as CodeExpression;
+                               expression = expressions [value] as CodeExpression;
 
                        if (expression == null) { // 2nd try: RootContext
                                RootContext context = manager.Context[typeof (RootContext)] as RootContext;
-                               if (context != null && context.Value == instance)
+                               if (context != null && context.Value == value)
                                        expression = context.Expression;
                        }
 
                        if (expression == null) { // 3rd try: IReferenceService (instance.property.property.property
-                               string name = manager.GetName (instance);
+                               string name = manager.GetName (value);
                                if (name == null || name.IndexOf (".") == -1) {
                                        IReferenceService service = manager.GetService (typeof (IReferenceService)) as IReferenceService;
                                        if (service != null) {
-                                               name = service.GetName (instance);
+                                               name = service.GetName (value);
                                                if (name != null && name.IndexOf (".") != -1) {
                                                        string[] parts = name.Split (new char[] { ',' });
-                                                       instance = manager.GetInstance (parts[0]);
-                                                       if (instance != null) {
-                                                               expression = SerializeToExpression (manager, instance);
+                                                       value = manager.GetInstance (parts[0]);
+                                                       if (value != null) {
+                                                               expression = SerializeToExpression (manager, value);
                                                                if (expression != null) {
                                                                        for (int i=1; i < parts.Length; i++)
                                                                                expression = new CodePropertyReferenceExpression (expression, parts[i]);
@@ -196,19 +196,19 @@ namespace System.ComponentModel.Design.Serialization
                        return expression;
                }
 
-               protected void SetExpression (IDesignerSerializationManager manager, object instance, CodeExpression expression)
+               protected void SetExpression (IDesignerSerializationManager manager, object value, CodeExpression expression)
                {
-                       SetExpression (manager, instance, expression, false);
+                       SetExpression (manager, value, expression, false);
                }
 
                // XXX: isPreset - what does this do when set?
                //
-               protected void SetExpression (IDesignerSerializationManager manager, object instance, CodeExpression expression, bool isPreset)
+               protected void SetExpression (IDesignerSerializationManager manager, object value, CodeExpression expression, bool isPreset)
                {
                        if (manager == null)
                                throw new ArgumentNullException ("manager");
-                       if (instance == null)
-                               throw new ArgumentNullException ("instance");
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
                        if (expression == null)
                                throw new ArgumentNullException ("expression");
 
@@ -218,7 +218,7 @@ namespace System.ComponentModel.Design.Serialization
                                manager.Context.Append (expressions);
                        }
 
-                       expressions[instance] = expression;
+                       expressions[value] = expression;
                }
 
                protected bool IsSerialized (IDesignerSerializationManager manager, object value) 
@@ -227,14 +227,14 @@ namespace System.ComponentModel.Design.Serialization
                }
 
                // XXX: What should honorPreset do?
-               protected bool IsSerialized (IDesignerSerializationManager manager, object instance, bool honorPreset) 
+               protected bool IsSerialized (IDesignerSerializationManager manager, object value, bool honorPreset) 
                {
-                       if (instance == null)
-                               throw new ArgumentNullException ("instance");
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
                        if (manager == null)
                                throw new ArgumentNullException ("manager");
 
-                       if (this.GetExpression (manager, instance) != null)
+                       if (this.GetExpression (manager, value) != null)
                                return true;
                        else
                                return false;
@@ -390,20 +390,20 @@ namespace System.ComponentModel.Design.Serialization
                        return manager.CreateInstance (type, parameters, name, addToContainer);
                }
 
-               protected string GetUniqueName (IDesignerSerializationManager manager, object instance)
+               protected string GetUniqueName (IDesignerSerializationManager manager, object value)
                {
-                       if (instance == null)
-                               throw new ArgumentNullException ("instance");
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
                        if (manager == null)
                                throw new ArgumentNullException ("manager");
 
-                       string name = manager.GetName (instance);
+                       string name = manager.GetName (value);
                        if (name == null) {
                                INameCreationService service = manager.GetService (typeof (INameCreationService)) as INameCreationService;
-                               name = service.CreateName (null, instance.GetType ());
+                               name = service.CreateName (null, value.GetType ());
                                if (name == null)
-                                       name = instance.GetType ().Name.ToLower ();
-                               manager.SetName (instance, name);
+                                       name = value.GetType ().Name.ToLower ();
+                               manager.SetName (value, name);
                        }
                        return name;
                }
index 777d9ed18be09149573c4925b8fb62fb6cb51646..937fb3b0e75ffa2e5883ed953523bc53fd930c73 100644 (file)
@@ -220,7 +220,7 @@ namespace System.ComponentModel.Design.Serialization
                        return instance;
                }
 
-               public object GetSerializer (Type componentType, Type serializerType)
+               public object GetSerializer (Type objectType, Type serializerType)
                {
                        VerifyInSession ();
                        
@@ -229,17 +229,17 @@ namespace System.ComponentModel.Design.Serialization
                                
                        object serializer = null;
 
-                       if (componentType != null) {
+                       if (objectType != null) {
                                // try 1: from cache
                                //
-                               _serializersCache.TryGetValue (componentType, out serializer);
+                               _serializersCache.TryGetValue (objectType, out serializer);
 
                                // check for provider attribute and add it to the list of providers
                                //
                                if (serializer != null && !serializerType.IsAssignableFrom (serializer.GetType ()))
                                        serializer = null;
                                
-                               AttributeCollection attributes = TypeDescriptor.GetAttributes (componentType);
+                               AttributeCollection attributes = TypeDescriptor.GetAttributes (objectType);
                                DefaultSerializationProviderAttribute providerAttribute = attributes[typeof (DefaultSerializationProviderAttribute)] 
                                                                                                                                                           as DefaultSerializationProviderAttribute;
                                if (providerAttribute != null && this.GetType (providerAttribute.ProviderTypeName) == serializerType) {
@@ -252,8 +252,8 @@ namespace System.ComponentModel.Design.Serialization
 
                        // try 2: DesignerSerializerAttribute
                        //
-                       if (serializer == null && componentType != null) {
-                               AttributeCollection attributes = TypeDescriptor.GetAttributes (componentType);
+                       if (serializer == null && objectType != null) {
+                               AttributeCollection attributes = TypeDescriptor.GetAttributes (objectType);
                                DesignerSerializerAttribute serializerAttribute = attributes[typeof (DesignerSerializerAttribute)] as DesignerSerializerAttribute;
                                if (serializerAttribute != null && 
                                        this.GetType (serializerAttribute.SerializerBaseTypeName) == serializerType) {
@@ -266,14 +266,14 @@ namespace System.ComponentModel.Design.Serialization
                                }
                                
                                if (serializer != null)
-                                       _serializersCache[componentType] = serializer;
+                                       _serializersCache[objectType] = serializer;
                        }
 
                        // try 3: from provider
                        //
                        if (serializer == null && _serializationProviders != null) {
                                foreach (IDesignerSerializationProvider provider in _serializationProviders) {
-                                       serializer = provider.GetSerializer (this, null, componentType, serializerType);
+                                       serializer = provider.GetSerializer (this, null, objectType, serializerType);
                                        if (serializer != null)
                                                break;
                                }
@@ -332,19 +332,19 @@ namespace System.ComponentModel.Design.Serialization
                                _serializationCompleteHandler (this, EventArgs.Empty);
                }
                                
-               protected virtual Type GetType (string name)
+               protected virtual Type GetType (string typeName)
                {
-                       if (name == null)
-                               throw new ArgumentNullException ("name");
+                       if (typeName == null)
+                               throw new ArgumentNullException ("typeName");
                        
                        this.VerifyInSession ();
                        
                        Type result = null;
                        ITypeResolutionService typeResSvc = this.GetService (typeof (ITypeResolutionService)) as ITypeResolutionService;
                        if (typeResSvc != null)
-                               result = typeResSvc.GetType (name);
+                               result = typeResSvc.GetType (typeName);
                        if (result == null)
-                               result = Type.GetType (name);
+                               result = Type.GetType (typeName);
                        
                        return result;
                }
@@ -491,16 +491,16 @@ namespace System.ComponentModel.Design.Serialization
                }         
 #endregion
                
-               object IServiceProvider.GetService (Type service)
+               object IServiceProvider.GetService (Type serviceType)
                {
-                       return this.GetService (service);
+                       return this.GetService (serviceType);
                }
                
-               protected virtual object GetService (Type service)
+               protected virtual object GetService (Type serviceType)
                {
                        object result = null;
                        if (_serviceProvider != null)
-                               result = _serviceProvider.GetService (service);
+                               result = _serviceProvider.GetService (serviceType);
                        
                        return result;
                }
index 1961d840d7e9d31b6a765e4991bbf6b482791e9e..5712ddc249d3202599b41aa7df8dc70261c73e88 100644 (file)
@@ -54,9 +54,9 @@ namespace System.ComponentModel.Design.Serialization
                        return _statements.GetEnumerator ();
                }
 
-               public CodeStatementCollection this[object owner]
+               public CodeStatementCollection this[object statementOwner]
                {
-                       get { return _statements[owner] as CodeStatementCollection; }
+                       get { return _statements[statementOwner] as CodeStatementCollection; }
                }
 
                IEnumerator IEnumerable.GetEnumerator()
index 77f284dad48dab55e8c788068a4147d253e56ac9..a476a2ab6b0deec4c047dd58bee937eee16132ce 100644 (file)
@@ -40,13 +40,13 @@ namespace System.ComponentModel.Design.Serialization
                CodeExpression _expression;
                object _value;
 
-               public RootContext (CodeExpression expresion, object value)
+               public RootContext (CodeExpression expression, object value)
                {
-                       if (expresion == null)
+                       if (expression == null)
                                throw new ArgumentNullException ("expression");
                        if (value == null)
                                throw new ArgumentNullException ("value");
-                       _expression = expresion;
+                       _expression = expression;
                        _value = value;
                }
 
index 4362e35f110ad3fceff50c7f19777ea07c036e78..45b11116cc1d10bbec4bf3c39ba4eb5c2954e1d4 100644 (file)
@@ -408,10 +408,10 @@ namespace System.ComponentModel.Design
 
                // Helper method - not an ISerivceProvider
                //
-               protected virtual object GetService (Type service)
+               protected virtual object GetService (Type serviceType)
                {
                        if (_component != null && _component.Site != null)
-                               return _component.Site.GetService (service);
+                               return _component.Site.GetService (serviceType);
 
                        return null;
                }
index 38d1a604c06117f34cde38f6d5f1d8015f32928e..0a0d67474183ebc5b95351f61e94a4ca52ff9f0f 100644 (file)
@@ -73,9 +73,9 @@ namespace System.ComponentModel.Design
                {
                }
 
-               public DesignSurfaceManager (IServiceProvider serviceProvider)
+               public DesignSurfaceManager (IServiceProvider parentProvider)
                {
-                       _parentProvider = serviceProvider;
+                       _parentProvider = parentProvider;
                        this.ServiceContainer.AddService (typeof (IDesignerEventService), new DesignerEventService ());
                }
 
@@ -224,10 +224,10 @@ namespace System.ComponentModel.Design
                                
                }
                
-               public object GetService (Type service)
+               public object GetService (Type serviceType)
                {
                        if (_serviceContainer != null)
-                               return _serviceContainer.GetService (service);
+                               return _serviceContainer.GetService (serviceType);
 
                        return null;
                }
index 3eb602c5b141971bdabd9db0334541bbf7e24002..c2f5535b9a9bef70fddae9afb2b7ef6631b5f4b0 100644 (file)
@@ -50,8 +50,8 @@ namespace System.ComponentModel.Design
                protected abstract bool ShowCode (IComponent component, EventDescriptor e, string methodName);
                protected abstract bool ShowCode (int lineNumber);
                protected abstract bool ShowCode ();
-               protected abstract string CreateUniqueMethodName (IComponent component, EventDescriptor eventDescriptor);
-               protected abstract ICollection GetCompatibleMethods (EventDescriptor eventDescriptor);
+               protected abstract string CreateUniqueMethodName (IComponent component, EventDescriptor e);
+               protected abstract ICollection GetCompatibleMethods (EventDescriptor e);
 
                protected virtual void FreeMethod (IComponent component, EventDescriptor e, string methodName)
                {
@@ -67,10 +67,10 @@ namespace System.ComponentModel.Design
                }
  
 
-               protected object GetService (Type service)
+               protected object GetService (Type serviceType)
                {
                        if (_provider != null)
-                               return _provider.GetService (service);
+                               return _provider.GetService (serviceType);
                        return null;
                }
 
index cb6f015cf1bee987d834ae4a4f713727abffc4cf..8a4e797d9962802d0172f1af046cb56936c8867d 100644 (file)
@@ -210,12 +210,12 @@ namespace System.ComponentModel.Design
                        return false;
                }
 
-               public virtual bool GlobalInvoke (CommandID commandID, object arg)
+               public virtual bool GlobalInvoke (CommandID commandId, object arg)
                {
-                       if (commandID == null)
-                               throw new ArgumentNullException ("commandID");
+                       if (commandId == null)
+                               throw new ArgumentNullException ("commandId");
 
-                       MenuCommand command = this.FindCommand (commandID);
+                       MenuCommand command = this.FindCommand (commandId);
                        if (command != null) {
                                command.Invoke (arg);
                                return true;
index 61cd66cea52c1dc5675004bdfd07221bfd4043b9..f442854a3f189c097296f5ed822a144b94b72b02 100644 (file)
@@ -66,12 +66,12 @@ namespace System.Data.Design {
                                errorList.Add (info.GetString("KEY_ARRAYVALUES" + i));
                }
 
-               public TypedDataSetGeneratorException (String error) : base (error)
+               public TypedDataSetGeneratorException (String message) : base (message)
                {
                }
                
-               public TypedDataSetGeneratorException (String error, Exception inner
-                       : base (error, inner)
+               public TypedDataSetGeneratorException (String message, Exception innerException
+                       : base (message, innerException)
                {
                }
                #endregion //Constructors       
@@ -82,15 +82,15 @@ namespace System.Data.Design {
 
                #region Methods
                                                                                                     
-                public override void GetObjectData (SerializationInfo si, StreamingContext context)
+                public override void GetObjectData (SerializationInfo info, StreamingContext context)
                 {
-                       base.GetObjectData (si, context);
+                       base.GetObjectData (info, context);
                                                 
                        int count = (errorList != null) ? ErrorList.Count : 0;
-                       si.AddValue ("KEY_ARRAYCOUNT", count);
+                       info.AddValue ("KEY_ARRAYCOUNT", count);
 
                        for (int i=0; i < count; i++)
-                               si.AddValue("KEY_ARRAYVALUES" + i, ErrorList [i]);
+                               info.AddValue("KEY_ARRAYVALUES" + i, ErrorList [i]);
                 }
                                                                                                     
                 #endregion // Methods
index 5fba73eab9fdd432168c23fdd98a69d007a0eb11..8b2b9d60fce64ab13ee7653b5c0e229d46253152 100644 (file)
@@ -35,9 +35,9 @@ namespace System.Web.UI.Design.WebControls {
        {
                int initial_page;
 
-               public BaseDataListComponentEditor (int initial_page)
+               public BaseDataListComponentEditor (int initialPage)
                {
-                       this.initial_page = initial_page;
+                       this.initial_page = initialPage;
                }
 
                public override bool EditComponent (
index 22f9b85c0391147585ebd17acc3afe22f59a4530..5e9a0f2653e7944305348f1a6a9ebfa74fe0e2bf 100644 (file)
@@ -74,16 +74,16 @@ namespace System.Web.UI.Design.WebControls {
                }
 
                protected IEnumerable GetDesignTimeDataSource (
-                       int minimum_rows,
-                       out bool dummy_data_source)
+                       int minimumRows,
+                       out bool dummyDataSource)
                {
                        throw new NotImplementedException ();
                }
 
                protected IEnumerable GetDesignTimeDataSource (
-                       IEnumerable selected_data_source,
-                       int minimum_rows,
-                       out bool dummy_data_source)
+                       IEnumerable selectedDataSource,
+                       int minimumRows,
+                       out bool dummyDataSource)
                {
                        throw new NotImplementedException ();
                }
@@ -98,7 +98,7 @@ namespace System.Web.UI.Design.WebControls {
                        throw new NotImplementedException ();
                }
 
-               public override IEnumerable GetTemplateContainerDataSource (string template_name)
+               public override IEnumerable GetTemplateContainerDataSource (string templateName)
                {
                        throw new NotImplementedException ();
                }
@@ -108,7 +108,7 @@ namespace System.Web.UI.Design.WebControls {
                        throw new NotImplementedException ();
                }
 
-               protected internal void InvokePropertyBuilder (int initial_page)
+               protected internal void InvokePropertyBuilder (int initialPage)
                {
                        throw new NotImplementedException ();
                }
index 59bdb670f4ba369c125dacb172b4d0c4689cd8e5..96f54b622f2574f788c14fc2142af482585b2342 100644 (file)
@@ -38,8 +38,8 @@ namespace System.Web.UI.Design.WebControls {
                {
                }
 
-               public DataListComponentEditor (int initial_page)
-                       : base (initial_page)
+               public DataListComponentEditor (int initialPage)
+                       : base (initialPage)
                {
                }
 
index 3442c86eeae5a64f1bfa4f9ba2f6aea7b08b3166..755dadcca377d9cd25ad01015cb116c35afc1472 100644 (file)
@@ -38,7 +38,7 @@ namespace System.Web.UI.Design.WebControls {
                        throw new NotImplementedException ();
                }
 
-               public override void DataBindControl (IDesignerHost designer_host, Control control)
+               public override void DataBindControl (IDesignerHost designerHost, Control control)
                {
                        throw new NotImplementedException ();
                }
index 918b650f1ac07a9da576cfdab8606d12d5d9d269..4e057a6adb27ca59cfa9122c41ee34b77c2666a5 100644 (file)
@@ -37,7 +37,7 @@ namespace System.Web.UI.Design.WebControls {
                {
                }
 
-               protected override void MapPropertyToStyle (string name, object value)
+               protected override void MapPropertyToStyle (string propName, object varPropValue)
                {
                        throw new NotImplementedException ();
                }
index 8f6314559c4d5a3e2e3f468f7729857c7531655b..81d53cbca219b52fc954155bf7bf338384656741 100644 (file)
@@ -63,14 +63,14 @@ namespace System.Web.UI.Design.WebControls {
                        throw new NotImplementedException ();
                }
 
-               protected IEnumerable GetDesignTimeDataSource (int minimum_rows)
+               protected IEnumerable GetDesignTimeDataSource (int minimumRows)
                {
                        throw new NotImplementedException ();
                }
 
                protected IEnumerable GetDesignTimeDataSource (
-                       IEnumerable selected_data_source,
-                       int minimum_rows)
+                       IEnumerable selectedDataSource,
+                       int minimumRows)
                {
                        throw new NotImplementedException ();
                }
@@ -105,7 +105,7 @@ namespace System.Web.UI.Design.WebControls {
                        throw new NotImplementedException ();
                }
 
-               public override void OnComponentChanged (object sender, ComponentChangedEventArgs e)
+               public override void OnComponentChanged (object source, ComponentChangedEventArgs ce)
                {
                        throw new NotImplementedException ();
                }
index 4cbd0cefcd7f21553874a337742fe3ab1e1d1e5d..dc949952f919056c4330c7c25518d5e4e7a699cc 100644 (file)
@@ -42,7 +42,7 @@ namespace System.Web.UI.Design.WebControls {
                        throw new NotImplementedException ();
                }
 
-               protected override object CreateInstance (Type item_type)
+               protected override object CreateInstance (Type itemType)
                {
                        throw new NotImplementedException ();
                }
index 1961b98f073409a2ef0a95862744b5f447936e95..c7865dcf91131f4ed0969cc9c3efe90b0b8b5c52 100644 (file)
@@ -42,7 +42,7 @@ namespace System.Web.UI.Design.WebControls {
                        throw new NotImplementedException ();
                }
 
-               protected override object CreateInstance (Type item_type)
+               protected override object CreateInstance (Type itemType)
                {
                        throw new NotImplementedException ();
                }
index 970390e629c8c97cd8a562787657e7d27d58f853..5efc9c963fa236f7f0aa0b1297a43ff250532589 100644 (file)
@@ -235,10 +235,10 @@ namespace System.Windows.Forms.Design
                        return false;
                }
 
-               protected override object GetService (Type service)
+               protected override object GetService (Type serviceType)
                {
                        if (_serviceProvider != null) {
-                               return _serviceProvider.GetService (service);
+                               return _serviceProvider.GetService (serviceType);
                        }
                        return null;
                }
index 2eefad53d0fcebff14bddac2d56583009288bf0b..10641f4d3732faac0b3cd443be9b3b5e05345d37 100644 (file)
@@ -554,19 +554,19 @@ namespace System.Windows.Forms.Design
 
                
 #region Parenting
-               protected void HookChildControls (Control firstControl)
+               protected void HookChildControls (Control firstChild)
                {
-                       if (firstControl != null) {
-                               foreach (Control control in firstControl.Controls) {
+                       if (firstChild != null) {
+                               foreach (Control control in firstChild.Controls) {
                                        control.WindowTarget = (IWindowTarget) new WndProcRouter (control, (IMessageReceiver) this);
                                }
                        }
                }
 
-               protected void UnhookChildControls (Control firstControl)
+               protected void UnhookChildControls (Control firstChild)
                {
-                       if (firstControl != null) {
-                               foreach (Control control in firstControl.Controls) {
+                       if (firstChild != null) {
+                               foreach (Control control in firstChild.Controls) {
                                        if (control.WindowTarget is WndProcRouter)
                                                ((WndProcRouter) control.WindowTarget).Dispose ();
                                }
@@ -662,11 +662,11 @@ namespace System.Windows.Forms.Design
                        e.UseDefaultCursors = false;
                }
 
-               protected virtual void OnDragDrop (DragEventArgs e)
+               protected virtual void OnDragDrop (DragEventArgs de)
                {
                }
 
-               protected virtual void OnDragEnter (DragEventArgs e)
+               protected virtual void OnDragEnter (DragEventArgs de)
                {
                }
 
@@ -674,7 +674,7 @@ namespace System.Windows.Forms.Design
                {
                }
 
-               protected virtual void OnDragOver (DragEventArgs e)
+               protected virtual void OnDragOver (DragEventArgs de)
                {
                }
 #endregion
index 6d369dfc4f3ad84cf329350f3cb365277f01aacd..365ba61c7feb161fd11795080864f8f544e784e6 100644 (file)
@@ -494,9 +494,9 @@ namespace System.Windows.Forms.Design
                // component - The IComponent to ensure has a context menu service.
                // XXX: Not sure exactly what this should do...
                //
-               protected virtual void EnsureMenuEditorService (IComponent component)
+               protected virtual void EnsureMenuEditorService (IComponent c)
                {
-                       if (this.menuEditorService == null && component is ContextMenu)
+                       if (this.menuEditorService == null && c is ContextMenu)
                                menuEditorService = (IMenuEditorService) GetService (typeof (IMenuEditorService));
                }
 #endregion
index 469bcd67328b971958cdd23e11e79ac814106b12..eb53ae4bc538cd074508188feb7dd603ac73e507 100644 (file)
@@ -210,23 +210,23 @@ namespace System.Windows.Forms.Design
                        return false;
                }
 
-               public virtual bool CanParent (ControlDesigner designer)
+               public virtual bool CanParent (ControlDesigner controlDesigner)
                {
-                       return CanParent (designer.Control);
+                       return CanParent (controlDesigner.Control);
                }
 
-               protected override void OnDragDrop (DragEventArgs e)
+               protected override void OnDragDrop (DragEventArgs de)
                {
                        IUISelectionService selectionServ = this.GetService (typeof (IUISelectionService)) as IUISelectionService;
                        if (selectionServ != null) {
                                // once this is fired the parent control (parentcontroldesigner) will start getting dragover events.
                                //
-                               Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (e.X, e.Y)));
+                               Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (de.X, de.Y)));
                                selectionServ.DragDrop (false, this.Control, location.X, location.Y);
                        }
                }
 
-               protected override void OnDragEnter (DragEventArgs e)
+               protected override void OnDragEnter (DragEventArgs de)
                {
                        this.Control.Refresh ();
                }
@@ -236,16 +236,16 @@ namespace System.Windows.Forms.Design
                        this.Control.Refresh ();
                }
 
-               protected override void OnDragOver (DragEventArgs e)
+               protected override void OnDragOver (DragEventArgs de)
                {
                        IUISelectionService selectionServ = this.GetService (typeof (IUISelectionService)) as IUISelectionService;
                        if (selectionServ != null) {
                                // once ControlDesigner.MouseDragBegin is called this will start getting dragover events.
                                //
-                               Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (e.X, e.Y)));
+                               Point location = this.SnapPointToGrid (this.Control.PointToClient (new Point (de.X, de.Y)));
                                selectionServ.DragOver (this.Control, location.X, location.Y);
                        }
-                       e.Effect = DragDropEffects.Move;
+                       de.Effect = DragDropEffects.Move;
                }
 #endregion
 
index 266afd8f852cbfcd073387d6b8aa9af62308f897..567d3ace1538c8e1fe503b1827dc2e321c9ec907 100644 (file)
@@ -51,9 +51,9 @@ namespace System.Windows.Forms.Design
                private const int HTHSCROLL = 6;
                private const int HTVSCROLL = 7;
 
-               protected override bool GetHitTest (Point point)
+               protected override bool GetHitTest (Point pt)
                {
-                       if (base.GetHitTest (point)) {
+                       if (base.GetHitTest (pt)) {
                                return true;
                        }
 
@@ -65,7 +65,7 @@ namespace System.Windows.Forms.Design
                                int hitTestResult = (int) Native.SendMessage (this.Control.Handle,
                                                                                                                                         Native.Msg.WM_NCHITTEST,
                                                                                                                                         IntPtr.Zero,
-                                                                                                                                       (IntPtr) Native.LParam (point.X, point.Y));
+                                                                                                                                       (IntPtr) Native.LParam (pt.X, pt.Y));
                                if (hitTestResult == HTHSCROLL || hitTestResult == HTVSCROLL)
                                        return true;
                        }
index 78220178e53b056dc36b0dabfdc704d1b7e36b29..871ef48604068f5c1ab0b58a74b62c624e2d2b90 100644 (file)
@@ -49,7 +49,7 @@
   </PropertyGroup>\r
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
   <ItemGroup>\r
-    <Compile Include="..\..\build\common\Consts.cs.in" />\r
+    <Compile Include="..\..\build\common\Consts.cs" />\r
     <Compile Include="..\..\build\common\Locale.cs" />\r
     <Compile Include="..\..\build\common\MonoTODOAttribute.cs" />\r
     <Compile Include="Assembly\AssemblyInfo.cs" />\r
index acaf20cac11e7d6f21ba27ecd88aa28c7f419b8f..5861a327a1516252604c2f1fbb4a818bef9e8f8b 100644 (file)
@@ -1,5 +1,5 @@
 Assembly/AssemblyInfo.cs
-../../build/common/Consts.cs.in
+../../build/common/Consts.cs
 ../../build/common/Locale.cs
 System.DirectoryServices/ActiveDirectoryAccessRule.cs
 System.DirectoryServices/ActiveDirectoryAuditRule.cs
index 89cb0579359850e1288ad31c2e7cbcf7aed1d047..7d1a0abbb8b0b59c5e6cb77eeaf6772e895ae62d 100644 (file)
@@ -215,9 +215,9 @@ namespace System.DirectoryServices
                /// <param name="filter">relative distinguised name of the child
                /// </param>
                /// <returns>Child entry with the specified name </returns>
-               public DirectoryEntry Find(string filter)
+               public DirectoryEntry Find(string name)
                {
-                       DirectoryEntry child=CheckEntry(filter);
+                       DirectoryEntry child=CheckEntry(name);
                        return child;
                }
 
@@ -229,12 +229,12 @@ namespace System.DirectoryServices
                /// <param name="otype"> Type of the child i.e strutcuralObjectClass
                /// name of the child </param>
                /// <returns>Child entry with the specified name and type</returns>
-               public DirectoryEntry Find(string filter, string otype)
+               public DirectoryEntry Find(string name, string schemaClassName)
                {
-                       DirectoryEntry child=CheckEntry(filter);
+                       DirectoryEntry child=CheckEntry(name);
 
                        if( child != null)                      {
-                               if(child.Properties["objectclass"].ContainsCaselessStringValue(otype))
+                               if(child.Properties["objectclass"].ContainsCaselessStringValue(schemaClassName))
                                        return child;
                                else
                                        throw new SystemException("An unknown directory object was requested");
index d0d23937e27ba259b0da0292382f6a564f2d4fde..1df7a9ba452cacb19aaa173c82e7f0e3b990403a 100644 (file)
@@ -45,11 +45,11 @@ namespace System.DirectoryServices {
                        SetUp ();
                }
 
-               public DirectoryServicesPermission (DirectoryServicesPermissionEntry[] entries)
+               public DirectoryServicesPermission (DirectoryServicesPermissionEntry[] permissionAccessEntries)
                {
                        SetUp ();
                        innerCollection = new DirectoryServicesPermissionEntryCollection (this);
-                       innerCollection.AddRange (entries);
+                       innerCollection.AddRange (permissionAccessEntries);
                }
 
                public DirectoryServicesPermission (PermissionState state)
@@ -58,11 +58,11 @@ namespace System.DirectoryServices {
                        SetUp ();
                }
 
-               public DirectoryServicesPermission (DirectoryServicesPermissionAccess access, string path)
+               public DirectoryServicesPermission (DirectoryServicesPermissionAccess permissionAccess, string path)
                {
                        SetUp ();
                        innerCollection = new DirectoryServicesPermissionEntryCollection (this);
-                       innerCollection.Add (new DirectoryServicesPermissionEntry (access, path));
+                       innerCollection.Add (new DirectoryServicesPermissionEntry (permissionAccess, path));
                }
 
                public DirectoryServicesPermissionEntryCollection PermissionEntries {
index 95c07b65f6ef0df921bb0c45a76bd5c37f0e0753..c413ea6d4064a4a67045fa3aedf7700b807e739d 100644 (file)
@@ -61,47 +61,47 @@ namespace System.DirectoryServices {
                        set { List[index] = value; }
                }
 
-               public int Add (DirectoryServicesPermissionEntry entry)
+               public int Add (DirectoryServicesPermissionEntry value)
                {
-                       return List.Add (entry);
+                       return List.Add (value);
                }
 
-               public void AddRange (DirectoryServicesPermissionEntry[] entries)
+               public void AddRange (DirectoryServicesPermissionEntry[] value)
                {
-                       foreach (DirectoryServicesPermissionEntry entry in entries)
+                       foreach (DirectoryServicesPermissionEntry entry in value)
                                Add (entry);
                }
 
-               public void AddRange (DirectoryServicesPermissionEntryCollection entries)
+               public void AddRange (DirectoryServicesPermissionEntryCollection value)
                {
-                       foreach (DirectoryServicesPermissionEntry entry in entries)
+                       foreach (DirectoryServicesPermissionEntry entry in value)
                                Add (entry);
                }
 
-               public void CopyTo (DirectoryServicesPermissionEntry[] copy_to, int index)
+               public void CopyTo (DirectoryServicesPermissionEntry[] array, int index)
                {
                        foreach (DirectoryServicesPermissionEntry entry in List)
-                               copy_to[index++] = entry;
+                               array[index++] = entry;
                }
 
-               public bool Contains (DirectoryServicesPermissionEntry entry)
+               public bool Contains (DirectoryServicesPermissionEntry value)
                {
-                       return List.Contains (entry);
+                       return List.Contains (value);
                }
 
-               public int IndexOf (DirectoryServicesPermissionEntry entry)
+               public int IndexOf (DirectoryServicesPermissionEntry value)
                {
-                       return List.IndexOf (entry);
+                       return List.IndexOf (value);
                }
 
-               public void Insert (int pos, DirectoryServicesPermissionEntry entry)
+               public void Insert (int index, DirectoryServicesPermissionEntry value)
                {
-                       List.Insert (pos, entry);
+                       List.Insert (index, value);
                }
 
-               public void Remove (DirectoryServicesPermissionEntry entry)
+               public void Remove (DirectoryServicesPermissionEntry value)
                {
-                       List.Remove (entry);
+                       List.Remove (value);
                }
 
                protected override void OnClear ()
index 15089be8d54d7ec1b010650b35035026ba1de6b5..5b7533e7bd33c98082c381cde572c4b63df00afb 100644 (file)
@@ -85,16 +85,16 @@ namespace System.DirectoryServices
 
                }
 
-               public void AddRange(object[] values)
+               public void AddRange(object[] value)
                {
-                       foreach (object value in values)
-                               Add (value);
+                       foreach (object val in value)
+                               Add (val);
                }
 
-               public void AddRange (PropertyValueCollection coll)
+               public void AddRange (PropertyValueCollection value)
                {
-                       foreach (object value in coll)
-                               Add (value);
+                       foreach (object val in value)
+                               Add (val);
                }
 
                public int IndexOf( object value )  
@@ -132,10 +132,10 @@ namespace System.DirectoryServices
                        return false;
                }
 
-               public void CopyTo (object[] copy_to, int index)
+               public void CopyTo (object[] array, int index)
                {
                        foreach (object o in List)
-                               copy_to[index++] = o;
+                               array[index++] = o;
                }
 
                [MonoTODO]
index 2c7460276fdf710a212eb49aeb1692b250ae12d1..df35e219994142cf0aed68823b46ee3a6660dd7f 100644 (file)
@@ -58,10 +58,10 @@ namespace System.DirectoryServices
                        
                }
 
-               public ResultPropertyValueCollection this[string key]
+               public ResultPropertyValueCollection this[string name]
                {
                        get {
-                               return (ResultPropertyValueCollection) this.Dictionary[key.ToLower()];
+                               return (ResultPropertyValueCollection) this.Dictionary[name.ToLower()];
                        }
 //                     set { this.Dictionary[key] = value; } 
                }
@@ -72,9 +72,9 @@ namespace System.DirectoryServices
                } 
                
                //see if collection contains an entry corresponding to key
-               public bool Contains(string key)
+               public bool Contains(string propertyName)
                {
-                       return this.Dictionary.Contains(key.ToLower());
+                       return this.Dictionary.Contains(propertyName.ToLower());
                }
                
                public ICollection PropertyNames 
@@ -93,10 +93,10 @@ namespace System.DirectoryServices
                        }
                }
 
-               public void CopyTo (ResultPropertyValueCollection[] copy_to, int index)
+               public void CopyTo (ResultPropertyValueCollection[] array, int index)
                {
                        foreach (ResultPropertyValueCollection vals in Values)
-                               copy_to[index++] = vals;
+                               array[index++] = vals;
                }
        }
 }
index 05b352889de61595477b4054995e2240ac1c1189..e2703927095c5dd3370cfab0380bc3e3e337b0d4 100644 (file)
@@ -74,9 +74,9 @@ namespace System.DirectoryServices
                        return InnerList.Contains (value);
                }
 
-               public void CopyTo (object[] array, int index)
+               public void CopyTo (object[] values, int index)
                {
-                       InnerList.CopyTo (array, index);
+                       InnerList.CopyTo (values, index);
                }
 
                public int IndexOf (object value)
index 6b94d89070f3d42acf0e6b630e3f0c304c232c0f..2afb3bc8c6a999ec54ea90fead8de1407cf56bce 100644 (file)
@@ -158,19 +158,19 @@ namespace System.DirectoryServices
                }
 
                [MonoTODO]
-               public void AddRange (SchemaNameCollection coll)
+               public void AddRange (SchemaNameCollection value)
                {
                        throw new NotImplementedException();
                }
 
                [MonoTODO]
-               public void AddRange (string[] coll)
+               public void AddRange (string[] value)
                {
                        throw new NotImplementedException();
                }
 
                [MonoTODO]
-               public bool Contains (string s)
+               public bool Contains (string value)
                {
                        throw new NotImplementedException();
                }
@@ -182,25 +182,25 @@ namespace System.DirectoryServices
                }
 
                [MonoTODO]
-               public void CopyTo (string[] copy_to, int pos)
+               public void CopyTo (string[] stringArray, int index)
                {
                        throw new NotImplementedException();
                }
 
                [MonoTODO]
-               public int IndexOf (string s)
+               public int IndexOf (string value)
                {
                        throw new NotImplementedException();
                }
 
                [MonoTODO]
-               public void Insert (int pos, string s)
+               public void Insert (int index, string value)
                {
                        throw new NotImplementedException();
                }
 
                [MonoTODO]
-               public void Remove (string s)
+               public void Remove (string value)
                {
                        throw new NotImplementedException();
                }
index 259b101978d6c21f8371f1f0300f35a7cf5c6a34..7a0abfa2eea717bac6f69c3b2659a00e33b426e1 100644 (file)
 //
 
 using System.Collections;
-using System.Security.Permissions;
 
 namespace System.Drawing.Design
 {
-       [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
        public sealed class CategoryNameCollection : ReadOnlyCollectionBase
        {
                
index 1b7ba48f874efa593323577e2a3ee67a657d51af..837f39bf187891eeeff10bf43fc65bc497870975 100644 (file)
 //
 
 using System.ComponentModel;
-using System.Security.Permissions;
 
 namespace System.Drawing.Design
 {
-       [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
-       [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
        public class PaintValueEventArgs : EventArgs
        {
                private ITypeDescriptorContext context;
index ad6676f537195aaa540f8540dff76c6a350598a7..422728a14348479ceb65956ed2fc6a69b82ee291 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System.Security.Permissions;
-
 namespace System.Drawing.Design
 {
-       [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
-       [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
        public class PropertyValueUIItem
        {
 
index 5d0684bdf1e986a0db89bb1dece2e0f015e3fc73..f7969b9724961497f4c93aafb4ea362070e3627b 100644 (file)
 //
 
 using System.ComponentModel;
-using System.Security.Permissions;
 
 namespace System.Drawing.Design
 {
-       [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
-       [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
        public class ToolboxComponentsCreatedEventArgs : EventArgs
        {
                private IComponent[] components;
index 56ce1912fec68f47431d4d361e3a502aaeb15d0c..31f736a47bb07551f0a557125ed8cdc4f7e0dd92 100644 (file)
 //
 
 using System.ComponentModel;
-using System.Security.Permissions;
 using System.Collections;
 
 namespace System.Drawing.Design
 {
-       [PermissionSet (SecurityAction.LinkDemand, Unrestricted = true)]
-       [PermissionSet (SecurityAction.InheritanceDemand, Unrestricted = true)]
        public class UITypeEditor {
 
                static UITypeEditor ()
index 191fc387f4c09627c7c87e73102ee2a057ffef01..dc747fdfb588a297efdc715fa96d313f22c7c209 100644 (file)
@@ -221,27 +221,27 @@ namespace System.Drawing.Drawing2D
                 //
                 // AddArc
                 //
-                public void AddArc (Rectangle rect, float start_angle, float sweep_angle)
+                public void AddArc (Rectangle rect, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArcI (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArcI (nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddArc (RectangleF rect, float start_angle, float sweep_angle)
+                public void AddArc (RectangleF rect, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArc (nativePath, rect.X, rect.Y, rect.Width, rect.Height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArc (nativePath, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddArc (int x, int y, int width, int height, float start_angle, float sweep_angle)
+                public void AddArc (int x, int y, int width, int height, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArcI (nativePath, x, y, width, height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddArc (float x, float y, float width, float height, float start_angle, float sweep_angle)
+                public void AddArc (float x, float y, float width, float height, float startAngle, float sweepAngle)
                 {
-                        Status status = GDIPlus.GdipAddPathArc (nativePath, x, y, width, height, start_angle, sweep_angle);
+                        Status status = GDIPlus.GdipAddPathArc (nativePath, x, y, width, height, startAngle, sweepAngle);
                         GDIPlus.CheckStatus (status);                          
                 }
 
@@ -279,28 +279,28 @@ namespace System.Drawing.Drawing2D
                 //
                 // AddBeziers
                 //
-                public void AddBeziers (params Point [] pts)
+                public void AddBeziers (params Point [] points)
                 {
-                       if (pts == null)
-                               throw new ArgumentNullException ("pts");
-                        Status status = GDIPlus.GdipAddPathBeziersI (nativePath, pts, pts.Length);
+                       if (points == null)
+                               throw new ArgumentNullException ("points");
+                        Status status = GDIPlus.GdipAddPathBeziersI (nativePath, points, points.Length);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddBeziers (PointF [] pts)
+                public void AddBeziers (PointF [] points)
                 {
-                       if (pts == null)
-                               throw new ArgumentNullException ("pts");
-                        Status status = GDIPlus.GdipAddPathBeziers (nativePath, pts, pts.Length);
+                       if (points == null)
+                               throw new ArgumentNullException ("points");
+                        Status status = GDIPlus.GdipAddPathBeziers (nativePath, points, points.Length);
                         GDIPlus.CheckStatus (status);                          
                 }
 
                 //
                 // AddEllipse
                 //
-                public void AddEllipse (RectangleF r)
+                public void AddEllipse (RectangleF rect)
                 {
-                        Status status = GDIPlus.GdipAddPathEllipse (nativePath, r.X, r.Y, r.Width, r.Height);
+                        Status status = GDIPlus.GdipAddPathEllipse (nativePath, rect.X, rect.Y, rect.Width, rect.Height);
                         GDIPlus.CheckStatus (status);                          
                 }
                 
@@ -310,9 +310,9 @@ namespace System.Drawing.Drawing2D
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddEllipse (Rectangle r)
+                public void AddEllipse (Rectangle rect)
                 {
-                        Status status = GDIPlus.GdipAddPathEllipseI (nativePath, r.X, r.Y, r.Width, r.Height);
+                        Status status = GDIPlus.GdipAddPathEllipseI (nativePath, rect.X, rect.Y, rect.Width, rect.Height);
                         GDIPlus.CheckStatus (status);                          
                 }
                 
@@ -326,16 +326,16 @@ namespace System.Drawing.Drawing2D
                 //
                 // AddLine
                 //
-                public void AddLine (Point a, Point b)
+                public void AddLine (Point pt1, Point pt2)
                 {
-                        Status status = GDIPlus.GdipAddPathLineI (nativePath, a.X, a.Y, b.X, b.Y);
+                        Status status = GDIPlus.GdipAddPathLineI (nativePath, pt1.X, pt1.Y, pt2.X, pt2.Y);
                         GDIPlus.CheckStatus (status);                          
                 }
 
-                public void AddLine (PointF a, PointF b)
+                public void AddLine (PointF pt1, PointF pt2)
                 {
-                        Status status = GDIPlus.GdipAddPathLine (nativePath, a.X, a.Y, b.X,
-                                        b.Y);
+                        Status status = GDIPlus.GdipAddPathLine (nativePath, pt1.X, pt1.Y, pt2.X,
+                                        pt2.Y);
                                         
                        GDIPlus.CheckStatus (status);                                                                  
                 }
index 024e0c2adde5b360738ba020ff676d82efc2d3f0..9c92b91caa54c3059626815c0d889b0d08b6bfd5 100644 (file)
@@ -45,14 +45,14 @@ namespace System.Drawing.Drawing2D
                {
                }
 
-               public HatchBrush (HatchStyle hatchStyle, Color foreColor)
-                                       : this (hatchStyle, foreColor, Color.Black)
+               public HatchBrush (HatchStyle hatchstyle, Color foreColor)
+                                       : this (hatchstyle, foreColor, Color.Black)
                {
                }
 
-               public HatchBrush(HatchStyle hatchStyle, Color foreColor, Color backColor)
+               public HatchBrush(HatchStyle hatchstyle, Color foreColor, Color backColor)
                {
-                       Status status = GDIPlus.GdipCreateHatchBrush (hatchStyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
+                       Status status = GDIPlus.GdipCreateHatchBrush (hatchstyle, foreColor.ToArgb (), backColor.ToArgb (), out nativeObject);
                        GDIPlus.CheckStatus (status);
                }
 
index 3b042cad175e945dbd3b31229f1e5d37beb6b404..515362c99dfd4be37dc34685df791e478bc28f0a 100644 (file)
@@ -77,33 +77,33 @@ namespace System.Drawing.Imaging
                }
 
                [CLSCompliant(false)]
-               public ColorMatrix (float[][] matrix)
+               public ColorMatrix (float[][] newColorMatrix)
                {                       
-                       color00 = matrix [0][0];
-                       color01 = matrix [0][1];
-                       color02 = matrix [0][2];
-                       color03 = matrix [0][3];
-                       color04 = matrix [0][4];
-                       color10 = matrix [1][0];
-                       color11 = matrix [1][1];
-                       color12 = matrix [1][2];
-                       color13 = matrix [1][3];
-                       color14 = matrix [1][4];
-                       color20 = matrix [2][0];
-                       color21 = matrix [2][1];
-                       color22 = matrix [2][2];
-                       color23 = matrix [2][3];
-                       color24 = matrix [2][4];
-                       color30 = matrix [3][0];
-                       color31 = matrix [3][1];
-                       color32 = matrix [3][2];
-                       color33 = matrix [3][3];
-                       color34 = matrix [3][4];
-                       color40 = matrix [4][0];
-                       color41 = matrix [4][1];
-                       color42 = matrix [4][2];
-                       color43 = matrix [4][3];
-                       color44 = matrix [4][4];                                                
+                       color00 = newColorMatrix [0][0];
+                       color01 = newColorMatrix [0][1];
+                       color02 = newColorMatrix [0][2];
+                       color03 = newColorMatrix [0][3];
+                       color04 = newColorMatrix [0][4];
+                       color10 = newColorMatrix [1][0];
+                       color11 = newColorMatrix [1][1];
+                       color12 = newColorMatrix [1][2];
+                       color13 = newColorMatrix [1][3];
+                       color14 = newColorMatrix [1][4];
+                       color20 = newColorMatrix [2][0];
+                       color21 = newColorMatrix [2][1];
+                       color22 = newColorMatrix [2][2];
+                       color23 = newColorMatrix [2][3];
+                       color24 = newColorMatrix [2][4];
+                       color30 = newColorMatrix [3][0];
+                       color31 = newColorMatrix [3][1];
+                       color32 = newColorMatrix [3][2];
+                       color33 = newColorMatrix [3][3];
+                       color34 = newColorMatrix [3][4];
+                       color40 = newColorMatrix [4][0];
+                       color41 = newColorMatrix [4][1];
+                       color42 = newColorMatrix [4][2];
+                       color43 = newColorMatrix [4][3];
+                       color44 = newColorMatrix [4][4];                                                
                }
 
                // properties
index f21831faa49f42af62d3669d57a509e58db0957e..8f19320aac39c78e70b12869b1af47bbc0aa1c5a 100644 (file)
@@ -198,21 +198,21 @@ namespace System.Drawing.Imaging {
                        }
                }
 
-               public EncoderParameter (Encoder encoder, int numberOfValues, int type, int value)
+               public EncoderParameter (Encoder encoder, int NumberOfValues, int Type, int Value)
                {
                        this.encoder = encoder;
-                       this.valuePtr = (IntPtr) value;
-                       this.valuesCount = numberOfValues;
-                       this.type = (EncoderParameterValueType) type;
+                       this.valuePtr = (IntPtr) Value;
+                       this.valuesCount = NumberOfValues;
+                       this.type = (EncoderParameterValueType) Type;
                }
 
-               public EncoderParameter (Encoder encoder, int numerator1, int denominator1, int numerator2, int denominator2)
+               public EncoderParameter (Encoder encoder, int numerator1, int demoninator1, int numerator2, int demoninator2)
                {
                        this.encoder = encoder;
                        this.valuesCount = 1;
                        this.type = EncoderParameterValueType.ValueTypeRationalRange;
                        this.valuePtr = Marshal.AllocHGlobal (4 * 4);
-                       int [] valuearray = { numerator1, denominator1, numerator2, denominator2 };
+                       int [] valuearray = { numerator1, demoninator1, numerator2, demoninator2 };
                        Marshal.Copy (valuearray, 0, this.valuePtr, 4);
                }
 
index 4bf494ea08892e82f78bdc0a2409ae3107edd223..dbbf98d5fa134547418a2258eda7d98283940790 100644 (file)
@@ -160,22 +160,22 @@ namespace System.Drawing.Imaging {
                        SetColorKey (colorLow, colorHigh, ColorAdjustType.Default);
                }
 
-               public void SetColorMatrix (ColorMatrix colorMatrix)
+               public void SetColorMatrix (ColorMatrix newColorMatrix)
                {
-                       SetColorMatrix (colorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
+                       SetColorMatrix (newColorMatrix, ColorMatrixFlag.Default, ColorAdjustType.Default);
                }
 
-               public void SetColorMatrix (ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag)
+               public void SetColorMatrix (ColorMatrix newColorMatrix, ColorMatrixFlag flags)
                {
-                       SetColorMatrix (colorMatrix, colorMatrixFlag, ColorAdjustType.Default);
+                       SetColorMatrix (newColorMatrix, flags, ColorAdjustType.Default);
                }
 
-               public void SetColorMatrix (ColorMatrix colorMatrix, ColorMatrixFlag colorMatrixFlag, ColorAdjustType colorAdjustType)
+               public void SetColorMatrix (ColorMatrix newColorMatrix, ColorMatrixFlag mode, ColorAdjustType type)
                {
-                       IntPtr cm = ColorMatrix.Alloc (colorMatrix);
+                       IntPtr cm = ColorMatrix.Alloc (newColorMatrix);
                        try {
                                Status status = GDIPlus.GdipSetImageAttributesColorMatrix (nativeImageAttr, 
-                                       colorAdjustType, true, cm, IntPtr.Zero, colorMatrixFlag);
+                                       type, true, cm, IntPtr.Zero, mode);
                                GDIPlus.CheckStatus (status);
                        }
                        finally {
@@ -294,9 +294,9 @@ namespace System.Drawing.Imaging {
                        SetGamma (gamma, ColorAdjustType.Default);
                }
 
-               public void SetGamma (float gamma, ColorAdjustType coloradjust)
+               public void SetGamma (float gamma, ColorAdjustType type)
                {
-                       Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, coloradjust, true, gamma);
+                       Status status = GDIPlus.GdipSetImageAttributesGamma (nativeImageAttr, type, true, gamma);
                        GDIPlus.CheckStatus (status);                                           
                }       
                
index 7498619e3c045412c5eaabe24ecb612a11391c2c..b28654bae370bc05486a2be5e24de4a38a5fb9e4 100644 (file)
@@ -220,10 +220,10 @@ namespace System.Drawing.Imaging {
                }
 
                public Metafile (IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type,
-                       string description)
+                       string desc)
                {
                        Status status = GDIPlus.GdipRecordMetafileI (referenceHdc, type, ref frameRect, frameUnit,
-                               description, out nativeObject);
+                               desc, out nativeObject);
                        GDIPlus.CheckStatus (status);
                }
 
@@ -261,8 +261,8 @@ namespace System.Drawing.Imaging {
                }
                
                public Metafile (string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, 
-                       string description) : this (fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual,
-                       description
+                       string desc) : this (fileName, referenceHdc, frameRect, frameUnit, EmfType.EmfPlusDual,
+                       desc) 
                {
                }
                
@@ -405,11 +405,11 @@ namespace System.Drawing.Imaging {
                }
 
                [MonoLimitation ("Metafiles aren't only partially supported by libgdiplus.")]
-               public static MetafileHeader GetMetafileHeader (IntPtr henhmetafile, WmfPlaceableFileHeader wmfHeader)
+               public static MetafileHeader GetMetafileHeader (IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader)
                {
                        IntPtr header = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (MetafileHeader)));
                        try {
-                               Status status = GDIPlus.GdipGetMetafileHeaderFromEmf (henhmetafile, header);
+                               Status status = GDIPlus.GdipGetMetafileHeaderFromEmf (hmetafile, header);
                                GDIPlus.CheckStatus (status);
                                return new MetafileHeader (header);
                        }
index 7fd1df97572aad4c48cc250d08acf4a25e1d6c10..225730863701716bbc2b9273a17a0b333698bee0 100644 (file)
@@ -31,7 +31,6 @@
 //
 
 using System.Runtime.Serialization;
-using System.Security.Permissions;
 
 namespace System.Drawing.Printing {
 
@@ -50,7 +49,6 @@ namespace System.Drawing.Printing {
                {
                }
 
-               [SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]
                public override void GetObjectData (SerializationInfo info, StreamingContext context)
                {
                        if (info == null)
@@ -58,7 +56,7 @@ namespace System.Drawing.Printing {
 
                        base.GetObjectData (info, context);
                }
-               
+
                private static string GetMessage(PrinterSettings settings)
                {
                        if (settings.PrinterName == null || settings.PrinterName == String.Empty)
index 6da3937e740b104bf29218eae55c6ee32febc530..0b731a01f2ed182fe4fc31cd3daefa803baee2e3 100644 (file)
@@ -30,7 +30,6 @@
 //
 
 using System.IO;
-using System.Security.Permissions;
 using System.Runtime.InteropServices;
 
 namespace System.Drawing.Text {
@@ -62,7 +61,6 @@ namespace System.Drawing.Text {
                        GDIPlus.CheckStatus (status);                   
                }
 
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public void AddMemoryFont (IntPtr memory, int length) 
                {
                        // note: MS throw FileNotFoundException if something is bad with the data (except for a null pointer)
index 8acb49bb0fcac5a9e1fef53dc11aa09d7cbfb1ca..7a7d8c68952fd7dd9e8cace165984ef9d6096260 100644 (file)
 
 using System.IO;
 using System.Drawing.Imaging;
+using System.Reflection;
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
 using System.ComponentModel;
-using System.Security.Permissions;
 
 namespace System.Drawing
 {
@@ -133,7 +133,11 @@ namespace System.Drawing
                        if (resource == null)
                                throw new ArgumentException ("resource");
 
-                       Stream s = type.Assembly.GetManifestResourceStream (type, resource);
+                       // For compatibility with the .NET Framework
+                       if (type == null)
+                               throw new NullReferenceException();
+
+                       Stream s = type.GetTypeInfo ().Assembly.GetManifestResourceStream (type, resource);
                        if (s == null) {
                                string msg = Locale.GetText ("Resource '{0}' was not found.", resource);
                                throw new FileNotFoundException (msg);
@@ -228,14 +232,12 @@ namespace System.Drawing
                }
 
                [EditorBrowsable (EditorBrowsableState.Advanced)]
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public IntPtr GetHbitmap ()
                {
                        return GetHbitmap(Color.Gray);
                }
 
                [EditorBrowsable (EditorBrowsableState.Advanced)]
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public IntPtr GetHbitmap (Color background)
                {
                        IntPtr HandleBmp;
@@ -247,7 +249,6 @@ namespace System.Drawing
                }
 
                [EditorBrowsable (EditorBrowsableState.Advanced)]
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public IntPtr GetHicon ()
                {
                        IntPtr HandleIcon;
index b2529ffe466dad6154a34c74b3313551fbd37785..6d874797e07ca76947493896dad2ffabbc9acfd6 100644 (file)
@@ -30,7 +30,6 @@
 using System.ComponentModel;
 using System.Runtime.InteropServices;
 using System.Runtime.Serialization;
-using System.Security.Permissions;
 
 namespace System.Drawing
 {
@@ -106,7 +105,6 @@ namespace System.Drawing
                }
 
                [MonoTODO ("The targetDC parameter has no equivalent in libgdiplus.")]
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public void Render (IntPtr targetDC)
                {
                        throw new NotImplementedException ();
index 92181609fab3355a01b58d001d76316e1cf71064..721e00a98bfe44004bb56897573108f0a9d44f62 100644 (file)
@@ -30,7 +30,6 @@
 using System.ComponentModel;
 using System.Runtime.InteropServices;
 using System.Runtime.Serialization;
-using System.Security.Permissions;
 
 namespace System.Drawing
 {
@@ -54,7 +53,6 @@ namespace System.Drawing
                }
 
                [MonoTODO ("The targetDC parameter has no equivalent in libgdiplus.")]
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public BufferedGraphics Allocate (IntPtr targetDC, Rectangle targetRectangle)
                {
                        throw new NotImplementedException ();
index d542b642c433b0498e860152611afa4aa49c9e0b..31861d5123845aa92525989d58a76a31d2fa9a07 100644 (file)
@@ -31,9 +31,9 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System.Reflection;
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
-using System.Security.Permissions;
 using System.ComponentModel;
 
 namespace System.Drawing
@@ -428,10 +428,7 @@ namespace System.Drawing
                [Browsable(false)]
                public bool IsSystemFont {
                        get {
-                               if (systemFontName == null)
-                                       return false;
-
-                               return StringComparer.InvariantCulture.Compare (systemFontName, string.Empty) != 0;
+                               return !string.IsNullOrEmpty (systemFontName);
                        }
                }
 
@@ -591,7 +588,6 @@ namespace System.Drawing
                        }
                }
 
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public void ToLogFont (object logFont)
                {
                        if (GDIPlus.RunningOnUnix ()) {
@@ -616,7 +612,6 @@ namespace System.Drawing
                        }
                }
 
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public void ToLogFont (object logFont, Graphics graphics)
                {
                        if (graphics == null)
@@ -627,7 +622,7 @@ namespace System.Drawing
                        }
 
                        Type st = logFont.GetType ();
-                       if (!st.IsLayoutSequential)
+                       if (!st.GetTypeInfo ().IsLayoutSequential)
                                throw new ArgumentException ("logFont", Locale.GetText ("Layout must be sequential."));
 
                        // note: there is no exception if 'logFont' isn't big enough
index 64d13ab0594d1fa0d4bf6ecf7ffb3fa6761fb0f8..9c002db4162f54a2d1b5456965123bec4d358ede 100644 (file)
@@ -35,7 +35,6 @@ using System.Drawing.Imaging;
 using System.Drawing.Text;
 using System.ComponentModel;
 using System.Runtime.InteropServices;
-using System.Security.Permissions;
 using System.Text;
 
 namespace System.Drawing
@@ -56,7 +55,7 @@ namespace System.Drawing
                                                            IntPtr data,
                                                            PlayRecordCallback callbackData);
                
-               public delegate bool DrawImageAbort (IntPtr callbackData);
+               public delegate bool DrawImageAbort (IntPtr callbackdata);
 
                internal Graphics (IntPtr nativeGraphics)
                {
@@ -1692,7 +1691,6 @@ namespace System.Drawing
                }
 
                [EditorBrowsable (EditorBrowsableState.Advanced)]
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public static Graphics FromHdcInternal (IntPtr hdc)
                {
                        GDIPlus.Display = hdc;
@@ -1744,7 +1742,6 @@ namespace System.Drawing
                }
                
                [EditorBrowsable (EditorBrowsableState.Advanced)]
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public static Graphics FromHwndInternal (IntPtr hwnd)
                {
                        return FromHwnd (hwnd);
@@ -2015,13 +2012,11 @@ namespace System.Drawing
                }
 
                [EditorBrowsable (EditorBrowsableState.Advanced)]
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public void ReleaseHdc (IntPtr hdc)
                {
                        ReleaseHdcInternal (hdc);
                }
 
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public void ReleaseHdc ()
                {
                        ReleaseHdcInternal (deviceContextHdc);
@@ -2029,7 +2024,6 @@ namespace System.Drawing
 
                [MonoLimitation ("Can only be used when hdc was provided by Graphics.GetHdc() method")]
                [EditorBrowsable (EditorBrowsableState.Never)]
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public void ReleaseHdcInternal (IntPtr hdc)
                {
                        Status status = Status.InvalidParameter;
index f2da71b31413b95ec10dd0ef0bebf50a7ed5f12b..6fe88d5a2e02b682022c7150bc7102f84661a2d1 100644 (file)
@@ -36,9 +36,9 @@ using System.Collections;
 using System.ComponentModel;
 using System.Drawing.Imaging;
 using System.IO;
+using System.Reflection;
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
-using System.Security.Permissions;
 
 namespace System.Drawing
 {
@@ -230,7 +230,11 @@ namespace System.Drawing
                        if (resource == null)
                                throw new ArgumentException ("resource");
 
-                       using (Stream s = type.Assembly.GetManifestResourceStream (type, resource)) {
+                       // For compatibility with the .NET Framework
+                       if (type == null)
+                               throw new NullReferenceException();
+
+                       using (Stream s = type.GetTypeInfo ().Assembly.GetManifestResourceStream (type, resource)) {
                                if (s == null) {
                                        string msg = Locale.GetText ("Resource '{0}' was not found.", resource);
                                        throw new FileNotFoundException (msg);
@@ -262,7 +266,7 @@ namespace System.Drawing
 
                internal Icon (string resourceName, bool undisposable)
                {
-                       using (Stream s = typeof (Icon).Assembly.GetManifestResourceStream (resourceName)) {
+                       using (Stream s = typeof (Icon).GetTypeInfo ().Assembly.GetManifestResourceStream (resourceName)) {
                                if (s == null) {
                                        string msg = Locale.GetText ("Resource '{0}' was not found.", resourceName);
                                        throw new FileNotFoundException (msg);
@@ -338,7 +342,6 @@ namespace System.Drawing
                }
                
 #if !MONOTOUCH
-               [SecurityPermission (SecurityAction.LinkDemand, UnmanagedCode = true)]
                public static Icon FromHandle (IntPtr handle)
                {
                        if (handle == IntPtr.Zero)
@@ -861,10 +864,10 @@ Console.WriteLine ("\tbih.biClrImportant: {0}", bih.biClrImportant);
                                }
                                
                                imageData [j] = iidata;
-                               bihReader.Close();
+                               bihReader.Dispose ();
                        }                       
 
-                       reader.Close();
+                       reader.Dispose ();
                }
        }
 }
index c5af3c18e1bb7092d4c6c13353113f5a4f7ee898..6bd89918dd66815ca07baedfa7a8a3762c54c53f 100644 (file)
@@ -794,7 +794,7 @@ public abstract class Image : MarshalByRefObject, IDisposable , ICloneable, ISer
                        Status status = GDIPlus.GdipDisposeImage (nativeObject);
                        // dispose the stream (set under Win32 only if SD owns the stream) and ...
                        if (stream != null) {
-                               stream.Close ();
+                               stream.Dispose ();
                                stream = null;
                        }
                        // ... set nativeObject to null before (possibly) throwing an exception
index 3b1f0b3d9117b1bb8f5a35fcd05666b9e6905c90..0e3a550886ddc1a490b50acf0c336f1323eda9d9 100644 (file)
@@ -30,7 +30,6 @@
 
 using System.Drawing.Drawing2D;
 using System.Runtime.InteropServices;
-using System.Security.Permissions;
 
 namespace System.Drawing
 {
@@ -510,7 +509,6 @@ namespace System.Drawing
                        return result;                  
                }
                
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public static Region FromHrgn (IntPtr hrgn)
                {
                        if (hrgn == IntPtr.Zero)
@@ -639,7 +637,6 @@ namespace System.Drawing
                        }
                }
                // why is this a instance method ? and not static ?
-               [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
                public void ReleaseHrgn (IntPtr regionHandle)           
                {
                        if (regionHandle == IntPtr.Zero) 
index fedcd14d7e1a54d6e81365ad2f0ef2bf16def9c1..cdcdd99d2e5b6afb4bbfb10fff0d24d27a94e165 100644 (file)
@@ -7,7 +7,7 @@
 //     Sanjay Gupta (gsanjay@novell.com)
 //     Ravindra (rkumar@novell.com)
 //     Peter Dennis Bartok (pbartok@novell.com)
-//     Sebastien Pouliot  <sebastien@ximian.com>
+//     Sebastien Pouliot <sebastien@ximian.com>
 //
 // Copyright (C) 2004 - 2007 Novell, Inc (http://www.novell.com)
 //
@@ -46,7 +46,6 @@ namespace System.Drawing
        /// <summary>
        /// GDI+ API Functions
        /// </summary>
-       [SuppressUnmanagedCodeSecurity]
        internal static class GDIPlus {
                public const int FACESIZE = 32;
                public const int LANG_NEUTRAL = 0;
@@ -166,7 +165,7 @@ namespace System.Drawing
                // Copies an array of Points to unmanaged memory
                static public IntPtr FromPointToUnManagedMemoryI (Point [] pts)
                {
-                       int nPointSize =  Marshal.SizeOf (pts[0]);
+                       int nPointSize = Marshal.SizeOf (pts[0]);
                        IntPtr dest = Marshal.AllocHGlobal (nPointSize * pts.Length);
                        IntPtr pos = dest;
                        for (int i=0; i<pts.Length; i++, pos = new IntPtr (pos.ToInt64 () + nPointSize))
@@ -189,7 +188,7 @@ namespace System.Drawing
                // Copies an array of Points to unmanaged memory
                static public IntPtr FromPointToUnManagedMemory (PointF [] pts)
                {
-                       int nPointSize =  Marshal.SizeOf (pts[0]);
+                       int nPointSize = Marshal.SizeOf (pts[0]);
                        IntPtr dest = Marshal.AllocHGlobal (nPointSize * pts.Length);
                        IntPtr pos = dest;
                        for (int i=0; i<pts.Length; i++, pos = new IntPtr (pos.ToInt64 () + nPointSize))
@@ -287,7 +286,7 @@ namespace System.Drawing
                static internal extern Status GdipCreateRegionRect (ref RectangleF rect, out IntPtr region);
 
                [DllImport(GdiPlus)]
-               static internal extern Status GdipCreateRegionRectI (ref Rectangle rect,  out IntPtr region);
+               static internal extern Status GdipCreateRegionRectI (ref Rectangle rect, out IntPtr region);
 
                [DllImport(GdiPlus)]
                static internal extern Status GdipCreateRegionPath (IntPtr path, out IntPtr region);
@@ -311,7 +310,7 @@ namespace System.Drawing
                        float height, IntPtr graphics, out bool result);
 
                [DllImport(GdiPlus)]
-               static internal extern Status  GdipIsVisibleRegionRectI (IntPtr region, int x, int y, int width,
+               static internal extern Status GdipIsVisibleRegionRectI (IntPtr region, int x, int y, int width,
                        int height, IntPtr graphics, out bool result);
 
 
@@ -354,13 +353,13 @@ namespace System.Drawing
 
                [DllImport(GdiPlus)]
                static internal extern Status GdipGetRegionData (IntPtr region, byte[] buffer, int bufferSize,
-                 out int sizeFilled);
+                out int sizeFilled);
 
                [DllImport(GdiPlus)]
                static internal extern Status GdipGetRegionScansCount (IntPtr region, out int count, IntPtr matrix);
 
                [DllImport(GdiPlus)]
-               static internal extern Status GdipGetRegionScans (IntPtr region,  IntPtr rects, out int count,
+               static internal extern Status GdipGetRegionScans (IntPtr region, IntPtr rects, out int count,
                        IntPtr matrix);
 
                [DllImport(GdiPlus)]
@@ -397,7 +396,7 @@ namespace System.Drawing
                [DllImport(GdiPlus)]
                static internal extern Status GdipGetTextureImage (IntPtr texture, out IntPtr image);
                [DllImport(GdiPlus)]
-               static internal extern Status GdipCreateTexture (IntPtr image, WrapMode wrapMode,  out IntPtr texture);
+               static internal extern Status GdipCreateTexture (IntPtr image, WrapMode wrapMode, out IntPtr texture);
                [DllImport(GdiPlus)]
                static internal extern Status GdipCreateTextureIAI (IntPtr image, IntPtr imageAttributes, int x, int y, int width, int height, out IntPtr texture);
                [DllImport(GdiPlus)]
@@ -606,13 +605,13 @@ namespace System.Drawing
                [DllImport(GdiPlus)]
                static internal extern Status GdipFillEllipse (IntPtr graphics, IntPtr pen, float x, float y, float width, float height);
                [DllImport (GdiPlus)]
-               static internal extern  Status GdipFillPolygon (IntPtr graphics, IntPtr brush, PointF [] points, int count, FillMode fillMode);
+               static internal extern Status GdipFillPolygon (IntPtr graphics, IntPtr brush, PointF [] points, int count, FillMode fillMode);
                [DllImport (GdiPlus)]
-               static internal extern  Status GdipFillPolygonI (IntPtr graphics, IntPtr brush, Point [] points, int count, FillMode fillMode);
+               static internal extern Status GdipFillPolygonI (IntPtr graphics, IntPtr brush, Point [] points, int count, FillMode fillMode);
                [DllImport (GdiPlus)]
-               static internal extern  Status GdipFillPolygon2 (IntPtr graphics, IntPtr brush, PointF [] points, int count);
+               static internal extern Status GdipFillPolygon2 (IntPtr graphics, IntPtr brush, PointF [] points, int count);
                [DllImport (GdiPlus)]
-               static internal extern  Status GdipFillPolygon2I (IntPtr graphics, IntPtr brush, Point [] points, int count);
+               static internal extern Status GdipFillPolygon2I (IntPtr graphics, IntPtr brush, Point [] points, int count);
                [DllImport(GdiPlus)]
                static internal extern Status GdipFillRectangle (IntPtr graphics, IntPtr brush, float x1, float y1, float x2, float y2);
                [DllImport(GdiPlus)]
@@ -692,7 +691,7 @@ namespace System.Drawing
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipFillClosedCurve2(IntPtr graphics, IntPtr brush,
-                                         PointF [] points, int count, float tension, FillMode fillMode);
+                                       PointF [] points, int count, float tension, FillMode fillMode);
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipFillClosedCurve2I(IntPtr graphics, IntPtr brush,
@@ -710,7 +709,7 @@ namespace System.Drawing
                internal static extern Status GdipFillPath(IntPtr graphics, IntPtr brush, IntPtr path);
 
                [DllImport(GdiPlus)]
-               internal static extern Status GdipGetNearestColor(IntPtr graphics,  out int argb);
+               internal static extern Status GdipGetNearestColor(IntPtr graphics, out int argb);
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipIsVisiblePoint(IntPtr graphics, float x, float y, out bool result);
@@ -728,7 +727,7 @@ namespace System.Drawing
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipTransformPoints(IntPtr graphics, CoordinateSpace destSpace,
-                       CoordinateSpace srcSpace, IntPtr points,  int count);
+                       CoordinateSpace srcSpace, IntPtr points, int count);
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipTransformPointsI(IntPtr graphics, CoordinateSpace destSpace,
@@ -953,7 +952,7 @@ namespace System.Drawing
                internal static extern Status GdipSetStringFormatMeasurableCharacterRanges (IntPtr native,
                        int cnt, CharacterRange [] range);
 
-               [DllImport(GdiPlus)]
+               [DllImport(GdiPlus)]
                internal static extern Status GdipGetStringFormatMeasurableCharacterRangeCount (IntPtr native,
                        out int cnt);
 
@@ -1092,7 +1091,7 @@ namespace System.Drawing
                internal static extern Status GdipImageRotateFlip ( IntPtr image, RotateFlipType rotateFlipType );
 
                [DllImport(GdiPlus, CharSet=CharSet.Unicode)]
-               internal static extern Status GdipSaveImageToFile (IntPtr image, string filename,  ref Guid encoderClsID, IntPtr encoderParameters);
+               internal static extern Status GdipSaveImageToFile (IntPtr image, string filename, ref Guid encoderClsID, IntPtr encoderParameters);
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipSaveAdd ( IntPtr image, IntPtr encoderParameters );
@@ -1119,7 +1118,7 @@ namespace System.Drawing
 
 
                [DllImport(GdiPlus)]
-               internal static extern Status GdipDrawImagePointsI (IntPtr graphics, IntPtr image,  Point [] destPoints, int count);
+               internal static extern Status GdipDrawImagePointsI (IntPtr graphics, IntPtr image, Point [] destPoints, int count);
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipDrawImageRectRectI (IntPtr graphics, IntPtr image,
@@ -1155,7 +1154,7 @@ namespace System.Drawing
                                int srcheight, GraphicsUnit srcUnit);
 
                [DllImport(GdiPlus)]
-               internal static extern Status GdipCreateStringFormat(StringFormatFlags formatAttributes,  int language, out IntPtr native);
+               internal static extern Status GdipCreateStringFormat(StringFormatFlags formatAttributes, int language, out IntPtr native);
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipCreateHBITMAPFromBitmap (IntPtr bmp, out IntPtr HandleBmp, int clrbackground);
@@ -1170,7 +1169,7 @@ namespace System.Drawing
                internal static extern Status GdipCreateHICONFromBitmap (IntPtr bmp, out IntPtr HandleIcon);
 
                [DllImport(GdiPlus)]
-               internal static extern Status GdipCreateBitmapFromHICON (IntPtr  hicon,  out IntPtr bitmap);
+               internal static extern Status GdipCreateBitmapFromHICON (IntPtr hicon, out IntPtr bitmap);
 
                [DllImport(GdiPlus)]
                internal static extern Status GdipCreateBitmapFromResource (IntPtr hInstance,
@@ -1209,13 +1208,13 @@ namespace System.Drawing
                [DllImport (GdiPlus)]
                internal static extern Status GdipInvertMatrix (IntPtr matrix);
                [DllImport (GdiPlus)]
-               internal static extern Status GdipTransformMatrixPoints (IntPtr matrix, PointF [] pts, int count);
+               internal static extern Status GdipTransformMatrixPoints (IntPtr matrix, [In, Out] PointF [] pts, int count);
                [DllImport (GdiPlus)]
-               internal static extern Status GdipTransformMatrixPointsI (IntPtr matrix, Point [] pts, int count);
+               internal static extern Status GdipTransformMatrixPointsI (IntPtr matrix, [In, Out] Point [] pts, int count);
                [DllImport (GdiPlus)]
-               internal static extern Status GdipVectorTransformMatrixPoints (IntPtr matrix, PointF [] pts, int count);
+               internal static extern Status GdipVectorTransformMatrixPoints (IntPtr matrix, [In, Out] PointF [] pts, int count);
                [DllImport (GdiPlus)]
-               internal static extern Status GdipVectorTransformMatrixPointsI (IntPtr matrix, Point [] pts, int count);
+               internal static extern Status GdipVectorTransformMatrixPointsI (IntPtr matrix, [In, Out] Point [] pts, int count);
                [DllImport (GdiPlus)]
                internal static extern Status GdipIsMatrixInvertible (IntPtr matrix, out bool result);
 
@@ -1393,7 +1392,7 @@ namespace System.Drawing
                [DllImport (GdiPlus)]
                internal static extern Status GdipSetImageAttributesColorMatrix (IntPtr imageattr,
                                ColorAdjustType type, bool enableFlag, IntPtr colorMatrix,
-                               IntPtr grayMatrix,  ColorMatrixFlag flags);
+                               IntPtr grayMatrix, ColorMatrixFlag flags);
 
                [DllImport (GdiPlus)]
                internal static extern Status GdipSetImageAttributesGamma (IntPtr imageattr,
@@ -1428,13 +1427,13 @@ namespace System.Drawing
                        ColorAdjustType colorAdjustType);
 
                [DllImport (GdiPlus)]
-               internal static extern Status GdipSetImageAttributesWrapMode(IntPtr imageattr,  WrapMode wrap,
+               internal static extern Status GdipSetImageAttributesWrapMode(IntPtr imageattr, WrapMode wrap,
                        int argb, bool clamp);
 
 
                // Font
                [DllImport(GdiPlus)]
-               internal static extern Status GdipCreateFont (IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit  unit,  out IntPtr font);
+               internal static extern Status GdipCreateFont (IntPtr fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font);
                [DllImport(GdiPlus)]
                internal static extern Status GdipDeleteFont (IntPtr font);
                [DllImport(GdiPlus, CharSet=CharSet.Auto)]
@@ -1589,7 +1588,7 @@ namespace System.Drawing
 
                // String Format
                [DllImport (GdiPlus)]
-               internal static extern Status GdipCreateStringFormat(int formatAttributes, int language, out IntPtr  format);
+               internal static extern Status GdipCreateStringFormat(int formatAttributes, int language, out IntPtr format);
                [DllImport (GdiPlus)]
                internal static extern Status GdipStringFormatGetGenericDefault(out IntPtr format);
                [DllImport (GdiPlus)]
@@ -1710,7 +1709,7 @@ namespace System.Drawing
                        private byte[]  start_buf;
                        private int     start_buf_pos;
                        private int     start_buf_len;
-                       private byte[]  managedBuf;
+                       private byte[] managedBuf;
                        private const int default_bufsize = 4096;
 
                        public GdiPlusStreamHelper (Stream s, bool seekToOrigin)
@@ -1723,7 +1722,7 @@ namespace System.Drawing
                                }
                        }
 
-                       public int StreamGetHeaderImpl (IntPtr buf, int bufsz)  {
+                       public int StreamGetHeaderImpl (IntPtr buf, int bufsz) {
                                int     bytesRead;
 
                                start_buf = new byte[bufsz];
index 98d666b707810f383da7be2ed2d9ecd619781752..7fe2e704a8fbaae7e6730dcf8e799f36ea5add44 100644 (file)
@@ -34,7 +34,6 @@ using System.Security;
 
 namespace System.Drawing {
 
-       [SuppressUnmanagedCodeSecurity]
        internal static class MacSupport {
                internal static Hashtable contextReference = new Hashtable ();
                internal static object lockobj = new object ();
index 178bddb250a409f0edf8af0d7181013c8c7d0362..2d87ac21cd5ee404003264eaafd7cc092ea00b59 100644 (file)
@@ -608,7 +608,7 @@ namespace MonoTests.System.Drawing {
                                }                               
                        }
                
-                       hash = new MD5CryptoServiceProvider().ComputeHash (pixels);
+                       hash = MD5.Create ().ComputeHash (pixels);
                        return ByteArrayToString (hash);
                }
                public string RotateIndexedBmp (Bitmap src, RotateFlipType type)
@@ -658,7 +658,7 @@ namespace MonoTests.System.Drawing {
                        if (pixel_data == null)
                                return "--ERROR--";
 
-                       byte[] hash = new MD5CryptoServiceProvider().ComputeHash (pixel_data);
+                       byte[] hash = MD5.Create ().ComputeHash (pixel_data);
                        return ByteArrayToString (hash);
                }
                
index 3b3d96acc7bebf09ccb6bccbc5bd47e1ace9b7f8..e4028a717fd8616e056d4a9ad580c64b6db83912 100644 (file)
@@ -159,7 +159,7 @@ namespace System.EnterpriseServices {
                }\r
 \r
                [MonoTODO]\r
-               public static void SetNamedProperty (string name, object property)\r
+               public static void SetNamedProperty (string name, object value)\r
                {\r
                        throw new NotImplementedException ();\r
                }\r
index 634104d140e4f3a3eba23ddf38f9aabc66d890d8..450a1c7c42195aa321e3a6770da50bb3106b4a2c 100644 (file)
@@ -55,8 +55,8 @@ namespace System.EnterpriseServices {
                {\r
                }\r
 \r
-               public RegistrationException (string msg, Exception innerException)\r
-                       : base (msg, innerException)\r
+               public RegistrationException (string msg, Exception inner)\r
+                       : base (msg, inner)\r
                {\r
                }\r
 \r
index a7c85802fa9ad60d54d8d1ad427ffa47f81b7fb5..59487fcc710d5267faf5512ef97c6979ee365652 100644 (file)
@@ -36,15 +36,15 @@ namespace System.IdentityModel.Selectors
                public CardSpacePolicyElement (
                        XmlElement target, XmlElement issuer,
                        Collection<XmlElement> parameters,
-                       Uri policyNoticeLink,
-                       int policyNoticeVersion,
+                       Uri privacyNoticeLink,
+                       int privacyNoticeVersion,
                        bool isManagedIssuer)
                {
                        this.target = target;
                        this.issuer = issuer;
                        this.parameters = parameters ?? new Collection<XmlElement> ();
-                       this.policy_link = policyNoticeLink;
-                       policy_ver = policyNoticeVersion;
+                       this.policy_link = privacyNoticeLink;
+                       policy_ver = privacyNoticeVersion;
                        is_managed = isManagedIssuer;
                }
 
index 16b6de3a66a8d7893bf1cc6b000dc867936a70c9..4a37f4a1b06c62d81f44374127fe579aa4053b8b 100644 (file)
@@ -62,19 +62,19 @@ namespace System.IdentityModel.Selectors
                [MonoTODO]
                public static GenericXmlSecurityToken GetToken (
                        CardSpacePolicyElement [] policyChain,
-                       SecurityTokenSerializer serializer)
+                       SecurityTokenSerializer tokenSerializer)
                {
-                       return (GenericXmlSecurityToken) get_token.Invoke (impl, new object [] {policyChain, serializer});
+                       return (GenericXmlSecurityToken) get_token.Invoke (impl, new object [] {policyChain, tokenSerializer});
                }
 
                public static GenericXmlSecurityToken GetToken (
                        XmlElement endpoint,
                        IEnumerable<XmlElement> policy,
                        XmlElement requiredRemoteTokenIssuer,
-                       SecurityTokenSerializer serializer)
+                       SecurityTokenSerializer tokenSerializer)
                {
                        CardSpacePolicyElement pe = new CardSpacePolicyElement (endpoint, requiredRemoteTokenIssuer, new Collection<XmlElement> (new List<XmlElement> (policy)), null, 0, requiredRemoteTokenIssuer != null);
-                       return GetToken (new CardSpacePolicyElement [] {pe}, serializer);
+                       return GetToken (new CardSpacePolicyElement [] {pe}, tokenSerializer);
                }
 
                [MonoTODO]
index 17df9c02d6d682728dc698abfb6f1defe206fb2c..5a214aba0d023b94b59ea9841e9957a0cee4e254 100644 (file)
@@ -78,7 +78,7 @@ namespace System.IdentityModel.Claims
                }
 
                [MonoTODO]
-               public static Claim CreateDenyOnlyWindowsSidClaim (SecurityIdentifier identifier)
+               public static Claim CreateDenyOnlyWindowsSidClaim (SecurityIdentifier sid)
                {
                        throw new NotImplementedException ();
                }
index 35f2b509c3e7cf75a9dd8815a12dea6fce220e07..35bdf0a78fd4145d016567171761e8994812c4ef 100644 (file)
@@ -71,7 +71,7 @@ namespace System.IdentityModel.Claims
                }
 
                public abstract IEnumerable<Claim> FindClaims (
-                       string resourceType, string right);
+                       string claimType, string right);
 
                public abstract IEnumerator<Claim> GetEnumerator ();
 
index 539c7a6dca7c134c8c7263b3b548a662e96ebff1..b7370764ee6344717e3cc1798b977c9093dc1a84 100644 (file)
@@ -41,25 +41,25 @@ namespace System.IdentityModel.Claims
                // Constructors
 
                [MonoTODO]
-               public WindowsClaimSet (WindowsIdentity identity)
+               public WindowsClaimSet (WindowsIdentity windowsIdentity)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public WindowsClaimSet (WindowsIdentity identity, bool includeWindowsGroups)
+               public WindowsClaimSet (WindowsIdentity windowsIdentity, bool includeWindowsGroups)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public WindowsClaimSet (WindowsIdentity identity, DateTime expirationTime)
+               public WindowsClaimSet (WindowsIdentity windowsIdentity, DateTime expirationTime)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public WindowsClaimSet (WindowsIdentity identity, bool includeWindowsGroups, DateTime expirationTime)
+               public WindowsClaimSet (WindowsIdentity windowsIdentity, bool includeWindowsGroups, DateTime expirationTime)
                {
                        throw new NotImplementedException ();
                }
index b4479a72ff773feedb3a722dc323513b92f990a8..5b7287bf9cf858282e857e1c9a8d9a0b2c9267d3 100644 (file)
@@ -39,15 +39,15 @@ namespace System.IdentityModel.Policy
        {
                [MonoTODO]
                public static AuthorizationContext 
-                       CreateDefaultAuthorizationContext (IList<IAuthorizationPolicy> policies)
+                       CreateDefaultAuthorizationContext (IList<IAuthorizationPolicy> authorizationPolicies)
                {
-                       if (policies == null)
-                               throw new ArgumentNullException ("policies");
+                       if (authorizationPolicies == null)
+                               throw new ArgumentNullException ("authorizationPolicies");
 
                        string id = new UniqueId ().ToString ();
                        DefaultEvaluationContext ctx =
                                new DefaultEvaluationContext ();
-                       foreach (IAuthorizationPolicy a in policies) {
+                       foreach (IAuthorizationPolicy a in authorizationPolicies) {
                                object o = null;
                                a.Evaluate (ctx, ref o);
                        }
index 9f4e82b7e7896a275d1f3168696ca0b9ce5f6834..7fde4e6659dca3f11f08e3c7385a366b1fea7d8b 100644 (file)
@@ -46,10 +46,10 @@ namespace System.IdentityModel.Policy
                public abstract ReadOnlyCollection<ClaimSet> ClaimSets { get; }
 
                public abstract void AddClaimSet (
-                       IAuthorizationPolicy authorizationPolicy,
+                       IAuthorizationPolicy policy,
                        ClaimSet claimSet);
 
-               public abstract void RecordExpirationTime (DateTime time);
+               public abstract void RecordExpirationTime (DateTime expirationTime);
        }
 
        // default implementation
index 62d7d56782b7c268da482d868ba4bbb5a958e10f..644fda786cad80241bd5d0f9437a75e855f99df3 100644 (file)
@@ -46,11 +46,11 @@ namespace System.IdentityModel.Selectors
                }
 
                [MonoTODO]
-               public KerberosSecurityTokenProvider (string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential credential)
+               public KerberosSecurityTokenProvider (string servicePrincipalName, TokenImpersonationLevel tokenImpersonationLevel, NetworkCredential networkCredential)
                {
                        name = servicePrincipalName;
                        impersonation_level = tokenImpersonationLevel;
-                       this.credential = credential;
+                       this.credential = networkCredential;
                }
 
                string name;
index 7381e691500e25d2b080acbde12490dec182a9c7..b78eea054be8fcb04e6c9f36bc43de4b6e41b86e 100644 (file)
@@ -41,11 +41,11 @@ namespace System.IdentityModel.Selectors
 
                public abstract SecurityTokenAuthenticator 
                        CreateSecurityTokenAuthenticator (
-                       SecurityTokenRequirement requirement,
-                       out SecurityTokenResolver resolver);
+                       SecurityTokenRequirement tokenRequirement,
+                       out SecurityTokenResolver outOfBandTokenResolver);
 
                public abstract SecurityTokenProvider 
-                       CreateSecurityTokenProvider(SecurityTokenRequirement requirement);
+                       CreateSecurityTokenProvider(SecurityTokenRequirement tokenRequirement);
 
                public abstract SecurityTokenSerializer 
                        CreateSecurityTokenSerializer (SecurityTokenVersion version);
index 386e285bd77db7c414cd63107369f6d934f1d34f..9bc5a1ec5f6b1902c39c88d6727d967bd9f81703 100644 (file)
@@ -77,16 +77,16 @@ namespace System.IdentityModel.Selectors
                        EndCancelTokenCore (result);
                }
 
-               public SecurityToken RenewToken (TimeSpan timeout, SecurityToken token)
+               public SecurityToken RenewToken (TimeSpan timeout, SecurityToken tokenToBeRenewed)
                {
-                       return RenewTokenCore (timeout, token);
+                       return RenewTokenCore (timeout, tokenToBeRenewed);
                }
 
                public IAsyncResult BeginRenewToken (
-                       TimeSpan timeout, SecurityToken token,
+                       TimeSpan timeout, SecurityToken tokenToBeRenewed,
                        AsyncCallback callback, object state)
                {
-                       return BeginRenewTokenCore (timeout, token, callback, state);
+                       return BeginRenewTokenCore (timeout, tokenToBeRenewed, callback, state);
                }
 
                public SecurityToken EndRenewToken (IAsyncResult result)
@@ -101,7 +101,7 @@ namespace System.IdentityModel.Selectors
                        throw new NotSupportedException (String.Format ("Token cancellation on this security token provider '{0}' is not supported.", this));
                }
 
-               protected virtual SecurityToken RenewTokenCore (TimeSpan timeout, SecurityToken token)
+               protected virtual SecurityToken RenewTokenCore (TimeSpan timeout, SecurityToken tokenToBeRenewed)
                {
                        throw new NotSupportedException (String.Format ("Token renewal on this security token provider '{0}' is not supported.", this));
                }
@@ -124,7 +124,7 @@ namespace System.IdentityModel.Selectors
 
                protected virtual IAsyncResult BeginRenewTokenCore (
                        TimeSpan timeout,
-                       SecurityToken token,
+                       SecurityToken tokenToBeRenewed,
                        AsyncCallback callback, object state)
                {
                        throw new NotSupportedException (String.Format ("Token renewal on this security token provider '{0}' is not supported.", this));
index c75e373ab19eb5ee47967c20cf3f19acc9e0ed82..bff51cdf302451cea20e26e166e7073fd1538bcf 100644 (file)
@@ -125,28 +125,28 @@ namespace System.IdentityModel.Selectors
                        }
                }
 
-               public TValue GetProperty<TValue> (string property)
+               public TValue GetProperty<TValue> (string propertyName)
                {
                        TValue ret;
-                       if (TryGetProperty<TValue> (property, out ret))
+                       if (TryGetProperty<TValue> (propertyName, out ret))
                                return ret;
-                       throw new ArgumentException (String.Format ("Property '{0}' was not found.", property));
+                       throw new ArgumentException (String.Format ("Property '{0}' was not found.", propertyName));
                }
 
-               public bool TryGetProperty<TValue> (string property, out TValue value)
+               public bool TryGetProperty<TValue> (string propertyName, out TValue result)
                {
                        object tmp;
-                       value = default (TValue);
+                       result = default (TValue);
 
-                       if (!Properties.TryGetValue (property, out tmp))
+                       if (!Properties.TryGetValue (propertyName, out tmp))
                                return false;
                        if (tmp == null && !typeof (TValue).IsValueType)
-                               value = default (TValue);
+                               result = default (TValue);
                        else if (tmp is TValue)
-                               value = (TValue) tmp;
+                               result = (TValue) tmp;
                        else
-                               throw new ArgumentException (String.Format ("The value of property '{0}' is of type '{1}', while '{2}' is expected.", property, tmp.GetType (), typeof (TValue)));
-                       return value != null;
+                               throw new ArgumentException (String.Format ("The value of property '{0}' is of type '{1}', while '{2}' is expected.", propertyName, tmp.GetType (), typeof (TValue)));
+                       return result != null;
                }
        }
 }
index e82c35c1f6229918579e16ccee0ef3cf053a26b4..808479b45e10d73723a0a297e6aa43a14447b7be 100644 (file)
@@ -54,10 +54,10 @@ namespace System.IdentityModel.Tokens
                        return (byte []) GetRawBuffer ().Clone ();
                }
 
-               public override bool Matches (SecurityKeyIdentifierClause clause)
+               public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        BinaryKeyIdentifierClause other =
-                               clause as BinaryKeyIdentifierClause;
+                               keyIdentifierClause as BinaryKeyIdentifierClause;
                        if (other == null)
                                return false;
                        return Matches (other.GetRawBuffer ());
index d835a6acc8e3f9aa55bf18f950ca5b60981c1380..6b7625c16a52bc71c577a7b71f90f46df324e33d 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // BootstrapContext.cs
 //
 // Author:
@@ -60,14 +60,14 @@ namespace System.IdentityModel.Tokens {
                }
 
                /// <summary>Initializes a new instance of the <see cref="BootstrapContext"/> class by using the specified security token and token handler.</summary>
-               public BootstrapContext (SecurityToken token, SecurityTokenHandler handler)
+               public BootstrapContext (SecurityToken token, SecurityTokenHandler tokenHandler)
                {
                        if (token == null)
                                throw new ArgumentNullException ("token");
-                       if (handler == null)
-                               throw new ArgumentNullException ("handler");
+                       if (tokenHandler == null)
+                               throw new ArgumentNullException ("tokenHandler");
                        SecurityToken = token;
-                       SecurityTokenHandler = handler;
+                       SecurityTokenHandler = tokenHandler;
                }
 
                /// <summary>Initializes a new instance of the <see cref="BootstrapContext"/> class from a stream.</summary>
index 102a45afaf36583f18b8130287e9de446cf4be83..ea9b1c079e8ad806a6f744f88316139cb5bb52e4 100644 (file)
@@ -42,26 +42,26 @@ namespace System.IdentityModel.Tokens
 
                public EncryptedKeyIdentifierClause (
                        byte [] encryptedKey, string encryptionMethod, 
-                       SecurityKeyIdentifier identifier)
-                       : this (encryptedKey, encryptionMethod, identifier, null)
+                       SecurityKeyIdentifier encryptingKeyIdentifier)
+                       : this (encryptedKey, encryptionMethod, encryptingKeyIdentifier, null)
                {
                }
 
                public EncryptedKeyIdentifierClause (
                        byte [] encryptedKey, string encryptionMethod,
-                       SecurityKeyIdentifier identifier, string carriedKeyName)
-                       : this (encryptedKey, encryptionMethod, identifier, carriedKeyName, null, 0)
+                       SecurityKeyIdentifier encryptingKeyIdentifier, string carriedKeyName)
+                       : this (encryptedKey, encryptionMethod, encryptingKeyIdentifier, carriedKeyName, null, 0)
                {
                }
 
                public EncryptedKeyIdentifierClause (
                        byte [] encryptedKey, string encryptionMethod,
-                       SecurityKeyIdentifier identifier, string carriedKeyName,
+                       SecurityKeyIdentifier encryptingKeyIdentifier, string carriedKeyName,
                        byte [] derivationNonce, int derivationLength)
                        : base (encryptionMethod, encryptedKey, true, derivationNonce, derivationLength)
                {
                        this.carried_key_name = carriedKeyName;
-                       this.identifier = identifier;
+                       this.identifier = encryptingKeyIdentifier;
                        this.enc_method = encryptionMethod;
                }
 
@@ -100,10 +100,10 @@ namespace System.IdentityModel.Tokens
                        return true;
                }
 
-               public override bool Matches (SecurityKeyIdentifierClause clause)
+               public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        EncryptedKeyIdentifierClause e =
-                               clause as EncryptedKeyIdentifierClause;
+                               keyIdentifierClause as EncryptedKeyIdentifierClause;
                        return e != null && Matches (e.GetRawBuffer (), e.EncryptionMethod, e.CarriedKeyName);
                }
 
index e503a3588691dd02f9dc7a208c66c376f5f46d97..8b845d14b0aeb0682941dffaa8368b384b9b10b6 100644 (file)
@@ -111,7 +111,7 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public override bool MatchesKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index b6a0f8c329c80f5610474da9a3b1e50a2884bf7f..014d8a70f7f2686cd87480b0e296d6aefac06e18 100644 (file)
@@ -42,16 +42,16 @@ namespace System.IdentityModel.Tokens
        {
                byte [] key;
 
-               public InMemorySymmetricSecurityKey (byte [] key)
-                       : this (key, true)
+               public InMemorySymmetricSecurityKey (byte [] symmetricKey)
+                       : this (symmetricKey, true)
                {
                }
 
-               public InMemorySymmetricSecurityKey (byte [] key, bool clone)
+               public InMemorySymmetricSecurityKey (byte [] symmetricKey, bool cloneBuffer)
                {
-                       if (key == null)
-                               throw new ArgumentNullException ("key");
-                       this.key = clone ? (byte []) key.Clone() : key;
+                       if (symmetricKey == null)
+                               throw new ArgumentNullException ("symmetricKey");
+                       this.key = cloneBuffer ? (byte []) symmetricKey.Clone() : symmetricKey;
                }
 
                // SymmetricSecurityKey implementation
index 9d6badcb5f1d544c81c1fd6199d50670c074a31a..610efd0d48da17050d816d7ba364adcf985c1944 100644 (file)
@@ -72,7 +72,7 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public override bool MatchesKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index 3de266be9eca04ffc419134f9581fbfc9624696f..aabede60c0e87a1984bf02c19d2677faea64ac79 100644 (file)
@@ -98,7 +98,7 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public override bool MatchesKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index 82dbb01c4f21d253722086754148698838474189..c58bc50c99b6a1afe2974131148c18c358956494 100644 (file)
@@ -62,12 +62,12 @@ namespace System.IdentityModel.Tokens
                        get { return owner_type; }
                }
 
-               public override bool Matches (SecurityKeyIdentifierClause clause)
+               public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
                {
-                       if (clause == null)
-                               throw new ArgumentNullException ("clause");
+                       if (keyIdentifierClause == null)
+                               throw new ArgumentNullException ("keyIdentifierClause");
                        LocalIdKeyIdentifierClause c =
-                               clause as LocalIdKeyIdentifierClause;
+                               keyIdentifierClause as LocalIdKeyIdentifierClause;
                        return c != null && Matches (c.LocalId, c.OwnerType);
                }
 
index a06b6a38fa13f7b71e6843e3162c72beaedc241b..a448130eef33b52644b1a3feab579e60f88ad839 100644 (file)
@@ -78,12 +78,12 @@ namespace System.IdentityModel.Tokens
                        throw new NotImplementedException ();
                }
 
-               public override bool Matches (SecurityKeyIdentifierClause clause)
+               public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
                {
-                       if (clause == null)
-                               throw new ArgumentNullException ("clause");
+                       if (keyIdentifierClause == null)
+                               throw new ArgumentNullException ("keyIdentifierClause");
                        RsaKeyIdentifierClause rkic =
-                               clause as RsaKeyIdentifierClause;
+                               keyIdentifierClause as RsaKeyIdentifierClause;
                        return rkic != null && Matches (rkic.Rsa);
                }
 
index b1cc2bf2ee3957350cce6d3017fd59ba37bd19d1..2f5031ea72cd19ca70644c4ed2f61178bae0d248 100644 (file)
@@ -46,7 +46,7 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public override AsymmetricAlgorithm GetAsymmetricAlgorithm (
-                       string algorithm, bool privateKey)
+                       string algorithm, bool requiresPrivateKey)
                {
                        throw new NotImplementedException ();
                }
index c44bc1dc99851a604e91d945f7246447d8afcc8c..b3fd1fafd0c9e4ad0c89ac4fd9ece95ebc9e9605 100644 (file)
@@ -87,7 +87,7 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public override bool MatchesKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index 7deb10412229ec9d1714b7ee15b17c9cef661849..8f07e506e3297a8f5b1d04a50857b2279fb9d3ad 100644 (file)
@@ -87,7 +87,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        if (reader == null)
@@ -104,7 +104,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        if (writer == null)
                                throw new ArgumentNullException ("writer");
index 306de28a9083aebf0cd0afedd578d0ed80d76655..b4b295a687571f026332a212c0bc06536e7dffa1 100644 (file)
@@ -89,7 +89,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        if (reader == null)
@@ -105,7 +105,7 @@ namespace System.IdentityModel.Tokens
                                switch (reader.LocalName) {
                                case "Assertion":
                                        SamlAssertion a = new SamlAssertion ();
-                                       a.ReadXml (reader, samlSerializer, keyInfoTokenSerializer, outOfBandTokenResolver);
+                                       a.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
                                        assertions.Add (a);
                                        break;
                                case "AssertionIDReference":
@@ -120,7 +120,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        if (writer == null)
                                throw new ArgumentNullException ("writer");
@@ -130,7 +130,7 @@ namespace System.IdentityModel.Tokens
                        foreach (string idref in AssertionIdReferences)
                                writer.WriteElementString ("saml", "AssertionIDReference", SamlConstants.Namespace, idref);
                        foreach (SamlAssertion assertion in Assertions)
-                               assertion.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                               assertion.WriteXml (writer, samlSerializer, keyInfoSerializer);
                        writer.WriteEndElement ();
                }
        }
index 65715ee56b9e5e5ffb00b06f5672221426bb47e2..43d54cc3f6bbe26a7d692c8a4d77ba3368724609 100644 (file)
@@ -53,16 +53,16 @@ namespace System.IdentityModel.Tokens
                }
 
                public SamlAssertion (string assertionId, string issuer,
-                       DateTime issueInstant, SamlConditions conditions,
-                       SamlAdvice advice, IEnumerable<SamlStatement> statements)
+                       DateTime issueInstant, SamlConditions samlConditions,
+                       SamlAdvice samlAdvice, IEnumerable<SamlStatement> samlStatements)
                {
                        if (IsInvalidAssertionId (assertionId))
                                throw new ArgumentException (String.Format ("The assertionId '{0}' must be a valid XML NCName.", assertionId));
 
                        if (issuer == null || issuer.Length == 0)
                                throw new ArgumentException ("issuer");
-                       if (statements == null)
-                               throw new ArgumentNullException ("statements");
+                       if (samlStatements == null)
+                               throw new ArgumentNullException ("samlStatements");
 
                        major = 1;
                        minor = 1;
@@ -70,9 +70,9 @@ namespace System.IdentityModel.Tokens
                        assertion_id = assertionId;
                        this.issuer = issuer;
                        issue_instant = issueInstant;
-                       this.conditions = conditions;
-                       this.advice = advice;
-                       foreach (SamlStatement s in statements) {
+                       this.conditions = samlConditions;
+                       this.advice = samlAdvice;
+                       foreach (SamlStatement s in samlStatements) {
                                if (s == null)
                                        throw new ArgumentException ("statements contain null item.");
                                this.statements.Add (s);
@@ -180,7 +180,7 @@ namespace System.IdentityModel.Tokens
                [MonoTODO]
                public virtual void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
@@ -188,7 +188,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        if (writer == null)
                                throw new ArgumentNullException ("writer");
@@ -211,11 +211,11 @@ namespace System.IdentityModel.Tokens
 
                        try {
                                if (Conditions != null)
-                                       Conditions.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                                       Conditions.WriteXml (writer, samlSerializer, keyInfoSerializer);
                                if (Advice != null)
-                                       Advice.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                                       Advice.WriteXml (writer, samlSerializer, keyInfoSerializer);
                                foreach (SamlStatement statement in Statements)
-                                       statement.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                                       statement.WriteXml (writer, samlSerializer, keyInfoSerializer);
                        } catch (NotImplementedException) {
                                throw;
                        } catch (Exception ex) { // bad catch, eh?
@@ -226,7 +226,7 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                protected void ReadSignature (XmlDictionaryReader reader,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver,
                        SamlSerializer samlSerializer)
                {
index 61bf8b4de8577f4cff4f5b3286045e03f87c13b9..33d76628e4b4b7d584e2142fdc3c89e78b3d6d03 100644 (file)
@@ -49,7 +49,7 @@ namespace System.IdentityModel.Tokens
                }
 
                [MonoTODO]
-               public override bool Matches (SecurityKeyIdentifierClause clause)
+               public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index 92605125f51083b009f14cd9e9dfd363bb7615a2..f1e54538329887ad3e6cc04c9a89b8c637d6d4b4 100644 (file)
@@ -114,7 +114,7 @@ namespace System.IdentityModel.Tokens
                [MonoTODO]
                public virtual void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
@@ -122,7 +122,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        writer.WriteStartElement ("saml", "Attribute", SamlConstants.Namespace);
                        writer.WriteAttributeString ("AttributeName", Name);
index abd6206926f802c815d7dcac868188a5ddd3ffa3..0ef757e5d4d0140daf85380b48c3a93dfd2a6e57 100644 (file)
@@ -66,7 +66,7 @@ namespace System.IdentityModel.Tokens
                [MonoTODO]
                public override void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
@@ -74,14 +74,14 @@ namespace System.IdentityModel.Tokens
 
                public override void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        if (SamlSubject == null)
                                throw new SecurityTokenException ("Subject is null in the AttributeStatement");
                        writer.WriteStartElement ("saml", "AttributeStatement", SamlConstants.Namespace);
-                       SamlSubject.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                       SamlSubject.WriteXml (writer, samlSerializer, keyInfoSerializer);
                        foreach (SamlAttribute a in Attributes)
-                               a.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                               a.WriteXml (writer, samlSerializer, keyInfoSerializer);
                        writer.WriteEndElement ();
                }
 
index 4dd369238f89ab101a9ac43cefafd3f898ddbc27..13e07b66be89d23a7e35186fd524b0d33e8ad1e1 100644 (file)
@@ -124,7 +124,7 @@ namespace System.IdentityModel.Tokens
                [MonoTODO]
                public override void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
@@ -132,7 +132,7 @@ namespace System.IdentityModel.Tokens
 
                public override void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        if (writer == null)
                                throw new ArgumentNullException ("writer");
@@ -145,7 +145,7 @@ namespace System.IdentityModel.Tokens
                        writer.WriteAttributeString ("AuthenticationMethod", AuthenticationMethod);
                        writer.WriteAttributeString ("AuthenticationInstant", 
                                AuthenticationInstant.ToString (SamlConstants.DateFormat, CultureInfo.InvariantCulture));
-                       SamlSubject.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                       SamlSubject.WriteXml (writer, samlSerializer, keyInfoSerializer);
                        if (DnsAddress != null || IPAddress != null) {
                                writer.WriteStartElement ("saml", "SubjectLocality", SamlConstants.Namespace);
                                if (IPAddress != null)
index 8949c160ee1bd103cdc6267460f18d5e5bef366e..e9d8d77507dd5ac3b988c28c68a8e7f15512a503 100644 (file)
@@ -46,11 +46,11 @@ namespace System.IdentityModel.Tokens
                {
                }
 
-               public SamlAuthorityBinding (XmlQualifiedName kind, string binding, string location)
+               public SamlAuthorityBinding (XmlQualifiedName authorityKind, string binding, string location)
                {
-                       if (kind == null)
-                               throw new ArgumentNullException ("kind");
-                       AuthorityKind = kind;
+                       if (authorityKind == null)
+                               throw new ArgumentNullException ("authorityKind");
+                       AuthorityKind = authorityKind;
                        Binding = binding;
                        Location = location;
                }
index 94d3813459df62b6094aae68956aeb1cc030773d..16dfcce1d6285bbe9a61dcbdc3b8622403f631c0 100644 (file)
@@ -39,10 +39,10 @@ namespace System.IdentityModel.Tokens
        public class SamlAuthorizationDecisionClaimResource
        {
                public SamlAuthorizationDecisionClaimResource (
-                       string resource, SamlAccessDecision decision, string actionName, string actionNamespace)
+                       string resource, SamlAccessDecision accessDecision, string actionNamespace, string actionName)
                {
                        this.resource = resource;
-                       this.decision = decision;
+                       this.decision = accessDecision;
                        this.name = actionName;
                        this.ns = actionNamespace;
                }
index 816c2369fbdaebab768a9a37a2e49cdeec6c3859..a3cd23bbb9b717eb2b420d43f9eee2dab502d6fa 100644 (file)
@@ -132,7 +132,7 @@ namespace System.IdentityModel.Tokens
                public override void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer, 
                        SecurityTokenSerializer keyInfoSerializer, 
-                       SecurityTokenResolver resolver)
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        if (reader == null)
                                throw new ArgumentNullException ("reader");
@@ -159,20 +159,20 @@ namespace System.IdentityModel.Tokens
 
                        reader.MoveToContent ();
                        SamlSubject = new SamlSubject ();
-                       SamlSubject.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+                       SamlSubject.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
                        SamlActions.Clear ();
                        for (reader.MoveToContent ();
                             reader.LocalName == "Action" &&
                             reader.NamespaceURI == SamlConstants.Namespace;
                             reader.MoveToContent ()) {
                                SamlAction action = new SamlAction ();
-                               action.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+                               action.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
                                SamlActions.Add (action);
                        }
                        if (reader.LocalName == "Evidence" &&
                            reader.NamespaceURI == SamlConstants.Namespace) {
                                Evidence = new SamlEvidence ();
-                               Evidence.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+                               Evidence.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
                                reader.MoveToContent ();
                        }
                        reader.ReadEndElement ();
index e4e956844821b4d60c059a3d08520045149ec94f..d72e789b310facbad8edd086726ee3d3e0804ba4 100644 (file)
@@ -102,7 +102,7 @@ namespace System.IdentityModel.Tokens
                [MonoTODO]
                public virtual void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
@@ -110,7 +110,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        if (writer == null)
                                throw new ArgumentNullException ("writer");
@@ -123,7 +123,7 @@ namespace System.IdentityModel.Tokens
                        if (has_not_on_after)
                                writer.WriteAttributeString ("NotOnOrAfter", NotOnOrAfter.ToString (SamlConstants.DateFormat, invariant));
                        foreach (SamlCondition cond in Conditions)
-                               cond.WriteXml (writer, samlSerializer, keyInfoTokenSerializer);
+                               cond.WriteXml (writer, samlSerializer, keyInfoSerializer);
                        writer.WriteEndElement ();
                }
        }
index 65469029179324979a089ef0435609acdd58e1a9..dd66972c5026b26bf60cd86fc7eac201fa4b0109 100644 (file)
@@ -100,7 +100,7 @@ namespace System.IdentityModel.Tokens
                public virtual void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer, 
                        SecurityTokenSerializer keyInfoSerializer, 
-                       SecurityTokenResolver resolver)
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        if (reader == null)
                                throw new ArgumentNullException ("reader");
@@ -118,7 +118,7 @@ namespace System.IdentityModel.Tokens
                                switch (reader.LocalName) {
                                case "Assertion":
                                        SamlAssertion a = new SamlAssertion ();
-                                       a.ReadXml (reader, samlSerializer, keyInfoSerializer, resolver);
+                                       a.ReadXml (reader, samlSerializer, keyInfoSerializer, outOfBandTokenResolver);
                                        assertions.Add (a);
                                        break;
                                case "AssertionIDReference":
index c2d1538d1d0f9a47f1d37f3f040ead9fe037136e..7f58a9f2a6a84a119a76e5c7b0378c5e52c03ece 100644 (file)
@@ -87,7 +87,7 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public override bool MatchesKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index 85c1ea1c619802f6e1785947e8b0b1b7e146b5a4..03ff28b46a68b65b1aba687eca10da33ae1dedc9 100644 (file)
@@ -43,56 +43,56 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public virtual SamlAdvice LoadAdvice (XmlDictionaryReader reader,
-                       SecurityTokenSerializer tokenSerializer,
-                       SecurityTokenResolver tokenResolver)
+                       SecurityTokenSerializer keyInfoSerializer,
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public virtual SamlAssertion LoadAssertion (XmlDictionaryReader reader,
-                       SecurityTokenSerializer tokenSerializer,
-                       SecurityTokenResolver tokenResolver)
+                       SecurityTokenSerializer keyInfoSerializer,
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public virtual SamlAttribute LoadAttribute (XmlDictionaryReader reader,
-                       SecurityTokenSerializer tokenSerializer,
-                       SecurityTokenResolver tokenResolver)
+                       SecurityTokenSerializer keyInfoSerializer,
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public virtual SamlCondition LoadCondition (XmlDictionaryReader reader,
-                       SecurityTokenSerializer tokenSerializer,
-                       SecurityTokenResolver tokenResolver)
+                       SecurityTokenSerializer keyInfoSerializer,
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public virtual SamlConditions LoadConditions (XmlDictionaryReader reader,
-                       SecurityTokenSerializer tokenSerializer,
-                       SecurityTokenResolver tokenResolver)
+                       SecurityTokenSerializer keyInfoSerializer,
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public virtual SamlStatement LoadStatement (XmlDictionaryReader reader,
-                       SecurityTokenSerializer tokenSerializer,
-                       SecurityTokenResolver tokenResolver)
+                       SecurityTokenSerializer keyInfoSerializer,
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public virtual SamlSecurityToken ReadToken (XmlReader reader,
-                       SecurityTokenSerializer tokenSerializer,
-                       SecurityTokenResolver tokenResolver)
+                       SecurityTokenSerializer keyInfoSerializer,
+                       SecurityTokenResolver outOfBandTokenResolver)
                {
                        throw new NotImplementedException ();
                }
index 4feb41544bf0098091cd7aa9ae4b22cc53d3c40b..4917cf161f51b2bbdaefb2defbef423ba6829857 100644 (file)
@@ -49,11 +49,11 @@ namespace System.IdentityModel.Tokens
 
                public abstract void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver);
 
                public abstract void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer);
+                       SecurityTokenSerializer keyInfoSerializer);
        }
 }
index 975f9727e1931ef6870d3253efae2177e2b66a52..c456500a118d50b14c8534a90afc58552f924528 100644 (file)
@@ -153,7 +153,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void ReadXml (XmlDictionaryReader reader,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer,
+                       SecurityTokenSerializer keyInfoSerializer,
                        SecurityTokenResolver outOfBandTokenResolver)
                {
                        if (reader == null)
@@ -173,7 +173,7 @@ namespace System.IdentityModel.Tokens
 
                public virtual void WriteXml (XmlDictionaryWriter writer,
                        SamlSerializer samlSerializer,
-                       SecurityTokenSerializer keyInfoTokenSerializer)
+                       SecurityTokenSerializer keyInfoSerializer)
                {
                        if (writer == null)
                                throw new ArgumentNullException ("writer");
index 302fe39cf053f9d756780609139d92619e924c5a..bf35190026f86b722982909afc14a548558b469d 100644 (file)
@@ -42,9 +42,9 @@ namespace System.IdentityModel.Tokens
                        this.list = new List<SecurityKeyIdentifierClause> ();
                }
 
-               public SecurityKeyIdentifier (params SecurityKeyIdentifierClause [] identifiers)
+               public SecurityKeyIdentifier (params SecurityKeyIdentifierClause [] clauses)
                {
-                       this.list = new List<SecurityKeyIdentifierClause> (identifiers);
+                       this.list = new List<SecurityKeyIdentifierClause> (clauses);
                }
 
                List<SecurityKeyIdentifierClause> list;
@@ -67,15 +67,15 @@ namespace System.IdentityModel.Tokens
                        get { return is_readonly; }
                }
 
-               public SecurityKeyIdentifierClause this [int i] {
-                       get { return list [i]; }
+               public SecurityKeyIdentifierClause this [int index] {
+                       get { return list [index]; }
                }
 
-               public void Add (SecurityKeyIdentifierClause item)
+               public void Add (SecurityKeyIdentifierClause clause)
                {
                        if (is_readonly)
                                throw new InvalidOperationException ("This SecurityKeyIdentifier is read-only.");
-                       list.Add (item);
+                       list.Add (clause);
                }
 
                public SecurityKey CreateKey ()
@@ -121,13 +121,13 @@ namespace System.IdentityModel.Tokens
                        return sb.ToString ();
                }
 
-               public bool TryFind<TClause> (out TClause result)
+               public bool TryFind<TClause> (out TClause clause)
                        where TClause : SecurityKeyIdentifierClause
                {
-                       result = default (TClause);
+                       clause = default (TClause);
                        foreach (SecurityKeyIdentifierClause kic in this)
                                if (typeof (TClause).IsAssignableFrom (kic.GetType ())) {
-                                       result = (TClause) kic;
+                                       clause = (TClause) kic;
                                        return true;
                                }
                        return false;
index 1dba4954631b1a7f4cb250a028dd50ad99f72dbb..d464e524bcc9ff85865cff6eab84ec008f08a9bd 100644 (file)
@@ -39,12 +39,12 @@ namespace System.IdentityModel.Tokens
                        this.clause_type = clauseType;
                }
 
-               protected SecurityKeyIdentifierClause (string clauseType, byte [] derivationNonce, int derivationLength)
+               protected SecurityKeyIdentifierClause (string clauseType, byte [] nonce, int length)
                {
                        this.clause_type = clauseType;
-                       if (derivationNonce != null)
-                               this.nonce = (byte []) derivationNonce.Clone ();
-                       this.deriv_length = derivationLength;
+                       if (nonce != null)
+                               this.nonce = (byte []) nonce.Clone ();
+                       this.deriv_length = length;
                }
 
                string clause_type;
@@ -76,7 +76,7 @@ namespace System.IdentityModel.Tokens
                }
 
                [MonoTODO]
-               public virtual bool Matches (SecurityKeyIdentifierClause clause)
+               public virtual bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index 23a636626f8b237bab21a4940d6cc63820fca821..335808fc560caf14d12484c68e76c0d0cd159816 100644 (file)
@@ -63,24 +63,24 @@ namespace System.IdentityModel.Tokens
                }
 
                public virtual bool MatchesKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        return false;
                }
 
                [MonoTODO]
                public virtual SecurityKey ResolveKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
-                       if (skiClause == null)
-                               throw new ArgumentNullException ("skiClause");
-                       if (!MatchesKeyIdentifierClause (skiClause))
-                               throw new InvalidOperationException (String.Format ("This '{0}' security token does not support resolving '{1}' key identifier clause.", GetType (), skiClause));
-                       if (skiClause.CanCreateKey)
-                               return skiClause.CreateKey ();
+                       if (keyIdentifierClause == null)
+                               throw new ArgumentNullException ("keyIdentifierClause");
+                       if (!MatchesKeyIdentifierClause (keyIdentifierClause))
+                               throw new InvalidOperationException (String.Format ("This '{0}' security token does not support resolving '{1}' key identifier clause.", GetType (), keyIdentifierClause));
+                       if (keyIdentifierClause.CanCreateKey)
+                               return keyIdentifierClause.CreateKey ();
                        // FIXME: examine it.
                        if (SecurityKeys.Count == 0)
-                               throw new InvalidOperationException (String.Format ("This '{0}' security token does not have any keys that can be resolved.", GetType (), skiClause));
+                               throw new InvalidOperationException (String.Format ("This '{0}' security token does not have any keys that can be resolved.", GetType (), keyIdentifierClause));
                        return SecurityKeys [0];
                }
        }
index bdd6eb50e03aff0028500d722832153a117d6f8d..9ce9eb87b33272c5e3f791ceeaf129c7e4271821 100644 (file)
@@ -35,8 +35,8 @@ namespace System.IdentityModel.Tokens
        public class SecurityTokenException : SystemException
        {
                public SecurityTokenException () : base () {}
-               public SecurityTokenException (string msg) : base (msg) {}
-               public SecurityTokenException (string msg, Exception inner) : base (msg, inner) {}
+               public SecurityTokenException (string message) : base (message) {}
+               public SecurityTokenException (string message, Exception innerException) : base (message, innerException) {}
                protected SecurityTokenException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index c5301cd6f8ed148697bfe4d831dfe65896fd38e2..9aaf39d51a02d83460a1ddddff02475ed9a68474 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // SecurityTokenExpiredException.cs
 //
 // Author:
@@ -41,8 +41,8 @@ namespace System.IdentityModel.Tokens
                        : base(message)
                { }
 
-               public SecurityTokenExpiredException(string message, Exception innerException)
-                       : base(message, innerException)
+               public SecurityTokenExpiredException(string message, Exception inner)
+                       : base(message, inner)
                { }
 
                public SecurityTokenExpiredException(SerializationInfo info, StreamingContext context)
index 4f9e5f18f6c928ec20824583f523e6faa596c327..4f4b76d676ef013d57e2aaf4bfc3a4a39491c4cb 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // SecurityTokenNotYetValidException.cs
 //
 // Author:
@@ -41,8 +41,8 @@ namespace System.IdentityModel.Tokens
                        : base(message)
                { }
 
-               public SecurityTokenNotYetValidException(string message, Exception innerException)
-                       : base(message, innerException)
+               public SecurityTokenNotYetValidException(string message, Exception inner)
+                       : base(message, inner)
                { }
 
                public SecurityTokenNotYetValidException(SerializationInfo info, StreamingContext context)
index e04d0cbd28e59ee712b2e6cf15222a5dc3d35cb1..b0113defd8bbe701968794c4622d2e46cc4bbcf8 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // SecurityTokenReplayDetectedException.cs
 //
 // Author:
@@ -41,8 +41,8 @@ namespace System.IdentityModel.Tokens
                        : base(message)
                { }
 
-               public SecurityTokenReplayDetectedException(string message, Exception innerException)
-                       : base(message, innerException)
+               public SecurityTokenReplayDetectedException(string message, Exception inner)
+                       : base(message, inner)
                { }
 
                public SecurityTokenReplayDetectedException(SerializationInfo info, StreamingContext context)
index 72189b8b97db6f716dbc846b80a0389b89bd8a84..e9c5bc879b4d8e2e59efa8814f2cba94e24c1430 100644 (file)
@@ -35,8 +35,8 @@ namespace System.IdentityModel.Tokens
        public class SecurityTokenValidationException : SecurityTokenException
        {
                public SecurityTokenValidationException () : base () {}
-               public SecurityTokenValidationException (string msg) : base (msg) {}
-               public SecurityTokenValidationException (string msg, Exception inner) : base (msg, inner) {}
+               public SecurityTokenValidationException (string message) : base (message) {}
+               public SecurityTokenValidationException (string message, Exception innerException) : base (message, innerException) {}
                protected SecurityTokenValidationException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index 66c68c0030ba5da8bf2a7a3152dece259e48429c..1a37602138df09f91b3dd66c69ec277c9b627912 100644 (file)
@@ -42,14 +42,14 @@ namespace System.IdentityModel.Tokens
                }
 
                [MonoTODO]
-               public WindowsSecurityToken (WindowsIdentity identity)
+               public WindowsSecurityToken (WindowsIdentity windowsIdentity)
                {
                        throw new NotImplementedException ();
                }
 
-               public WindowsSecurityToken (WindowsIdentity identity, string id)
+               public WindowsSecurityToken (WindowsIdentity windowsIdentity, string id)
                {
-                       this.identity = identity;
+                       this.identity = windowsIdentity;
                        this.id = id;
                }
 
index f95ec9bb5d43c15b379adee5f9ee4f467477b909..3dc838424de18fc388c254732dcd90c5d0adb4bc 100644 (file)
@@ -99,10 +99,10 @@ namespace System.IdentityModel.Tokens
                        get { return serial; }
                }
 
-               public override bool Matches (SecurityKeyIdentifierClause clause)
+               public override bool Matches (SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        X509IssuerSerialKeyIdentifierClause other =
-                               clause as X509IssuerSerialKeyIdentifierClause;
+                               keyIdentifierClause as X509IssuerSerialKeyIdentifierClause;
                        return other != null && Matches (other.name, other.serial);
                }
 
index fe3751b96a6bd7bc049e0cfea060b403aff115dd..ea545764c01500fec9fc39929f2511785663b230 100644 (file)
@@ -111,27 +111,27 @@ namespace System.IdentityModel.Tokens
 
                [MonoTODO]
                public override bool MatchesKeyIdentifierClause (
-                       SecurityKeyIdentifierClause skiClause)
+                       SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        LocalIdKeyIdentifierClause l =
-                               skiClause as LocalIdKeyIdentifierClause;
+                               keyIdentifierClause as LocalIdKeyIdentifierClause;
                        if (l != null)
                                return l.LocalId == Id;
 
                        X509ThumbprintKeyIdentifierClause t =
-                               skiClause as X509ThumbprintKeyIdentifierClause;
+                               keyIdentifierClause as X509ThumbprintKeyIdentifierClause;
                        if (t != null)
                                return t.Matches (cert);
                        X509IssuerSerialKeyIdentifierClause i =
-                               skiClause as X509IssuerSerialKeyIdentifierClause;
+                               keyIdentifierClause as X509IssuerSerialKeyIdentifierClause;
                        if (i != null)
                                return i.Matches (cert);
                        X509SubjectKeyIdentifierClause s =
-                               skiClause as X509SubjectKeyIdentifierClause;
+                               keyIdentifierClause as X509SubjectKeyIdentifierClause;
                        if (s != null)
                                return s.Matches (cert);
                        X509RawDataKeyIdentifierClause r =
-                               skiClause as X509RawDataKeyIdentifierClause;
+                               keyIdentifierClause as X509RawDataKeyIdentifierClause;
                        if (r != null)
                                return r.Matches (cert);
 
index 9780e8b9e1fbb0f154c6a7b8b569232d3088d98d..b1f7adffe6f318b430609b054033468e7f955269 100644 (file)
@@ -35,8 +35,8 @@ namespace System.IdentityModel.Tokens
        public class X509SubjectKeyIdentifierClause : BinaryKeyIdentifierClause
        {
                [MonoTODO]
-               public X509SubjectKeyIdentifierClause (byte [] certificateSubject)
-                       : base (null, certificateSubject, true)
+               public X509SubjectKeyIdentifierClause (byte [] ski)
+                       : base (null, ski, true)
                {
                        throw new NotImplementedException ();
                }
@@ -66,7 +66,7 @@ namespace System.IdentityModel.Tokens
                }
 
                [MonoTODO]
-               public static bool TryCreateFrom (X509Certificate2 certificate, out X509SubjectKeyIdentifierClause clause)
+               public static bool TryCreateFrom (X509Certificate2 certificate, out X509SubjectKeyIdentifierClause keyIdentifierClause)
                {
                        throw new NotImplementedException ();
                }
index 4b8cdda2edf3f26b6be1ea77740ac4eba9abc3d8..0ae177e7d79357bc14fd9c6b76c53199e23811fa 100644 (file)
@@ -34,8 +34,8 @@ namespace System.IdentityModel.Tokens
 {
        public class X509ThumbprintKeyIdentifierClause : BinaryKeyIdentifierClause
        {
-               public X509ThumbprintKeyIdentifierClause (byte [] certificateThumbprint)
-                       : base (null, certificateThumbprint, true)
+               public X509ThumbprintKeyIdentifierClause (byte [] thumbprint)
+                       : base (null, thumbprint, true)
                {
                }
 
index c2c77269bcbbafe4560fd8362579b7fb7591ded5..fe0c7b52d50c6954bd0be6fe1565da83211c1b87 100644 (file)
@@ -37,16 +37,16 @@ namespace System.IdentityModel.Tokens
        public class X509WindowsSecurityToken : X509SecurityToken
        {
                [MonoTODO]
-               public X509WindowsSecurityToken (X509Certificate2 cert, WindowsIdentity identity)
-                       : base (cert)
+               public X509WindowsSecurityToken (X509Certificate2 certificate, WindowsIdentity windowsIdentity)
+                       : base (certificate)
                {
                        throw new NotImplementedException ();
                }
 
-               public X509WindowsSecurityToken (X509Certificate2 cert, WindowsIdentity identity, string id)
-                       : base (cert, id)
+               public X509WindowsSecurityToken (X509Certificate2 certificate, WindowsIdentity windowsIdentity, string id)
+                       : base (certificate, id)
                {
-                       this.identity = identity;
+                       this.identity = windowsIdentity;
                }
 
                WindowsIdentity identity;
index 0a1f0ceb480dfb7a01364937047ff4eeb076f827..6ce46ff3afd7864ef60d4564b767daea0e21a3bb 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // SignatureVerificationFailedException.cs
 //
 // Author:
@@ -41,8 +41,8 @@ namespace System.IdentityModel
                        : base(message)
                { }
 
-               public SignatureVerificationFailedException(string message, Exception innerException)
-                       : base(message, innerException)
+               public SignatureVerificationFailedException(string message, Exception inner)
+                       : base(message, inner)
                { }
 
                public SignatureVerificationFailedException(SerializationInfo info, StreamingContext context)
index 24691a7ce8843b98a15e8def5f03cee83a272375..dcf57c57c857635b0eb672383e371de107a3e86b 100644 (file)
@@ -68,7 +68,7 @@ namespace System.Management
                        throw new NotImplementedException ();
                }
 
-               public virtual void Add (string methodName, ManagementBaseObject inParams, ManagementBaseObject outParams)
+               public virtual void Add (string methodName, ManagementBaseObject inParameters, ManagementBaseObject outParameters)
                {
                        throw new NotImplementedException ();
                }
index 19d1e56a543b4ee70e00fe383e04279dc8dd0da3..f13e64122ace5db53316040604935379b3f4c7c7 100644 (file)
@@ -6,6 +6,8 @@ LIBRARY = System.Numerics.dll
 LIB_REFS = System
 LIB_MCS_FLAGS = /unsafe
 TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
+XTEST_LIB_REFS = System Facades/System.Threading.Tasks System.Runtime.InteropServices.RuntimeInformation System.Core System.Numerics.Vectors Microsoft.CSharp
+XTEST_LIB_FLAGS = -unsafe
 
 RESX_RESOURCE_STRING = \
        ../../../external/corefx/src/System.Runtime.Numerics/src/Resources/Strings.resx \
index 60a63a261c5646709fe3bb4542612d0e91808271..9e8451461edfad3081e604c0e28e9d99206356a8 100644 (file)
@@ -51,6 +51,7 @@
   <ItemGroup>\r
     <Compile Include="..\..\..\external\corefx\src\Common\src\System\Globalization\FormatProvider.Number.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\Common\src\System\Numerics\Hashing\HashHelpers.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Numerics.Vectors\src\System\MathF.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Numerics.Vectors\src\System\Numerics\JitIntrinsicAttribute.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Numerics.Vectors\src\System\Numerics\Matrix3x2.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Numerics.Vectors\src\System\Numerics\Matrix4x4.cs" />\r
index 1e56c801e93eb413f4a195e33b821d990f065615..4a50c42d7f362ca31cba282c9fc7c3ed178dd4f5 100644 (file)
@@ -21,6 +21,8 @@ corefx/Vector.cs
 ../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/Complex.cs
 ../../../external/corefx/src/System.Runtime.Numerics/src/System/Numerics/NumericsHelpers.cs
 
+../../../external/corefx/src/System.Numerics.Vectors/src/System/MathF.cs
+
 ../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/JitIntrinsicAttribute.cs
 ../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Matrix3x2.cs
 ../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/Matrix4x4.cs
diff --git a/mcs/class/System.Numerics/System.Numerics_xtest.dll.sources b/mcs/class/System.Numerics/System.Numerics_xtest.dll.sources
new file mode 100644 (file)
index 0000000..a012a0c
--- /dev/null
@@ -0,0 +1,8 @@
+../../../external/corefx/src/Common/tests/System/PlatformDetection.cs
+
+# ../../../external/corefx/src/System.Runtime.Numerics/tests/*.cs
+../../../external/corefx/src/System.Runtime.Numerics/tests/BigInteger/*.cs
+
+../../../external/corefx/src/System.Numerics.Vectors/src/System/Numerics/ConstantHelper.cs
+
+../../../external/corefx/src/System.Numerics.Vectors/tests/*.cs
index 52ddd84da3d6889bdc650f48072c2973778acb42..0dbbbdabad5c4ac82ec73c479e4350e058407670 100644 (file)
@@ -55,18 +55,18 @@ namespace System.Security.Cryptography.Pkcs {
                        _info = new SignerInfoCollection ();
                }
 
-               public SignedCms (ContentInfo content) 
-                       : this (content, false)
+               public SignedCms (ContentInfo contentInfo
+                       : this (contentInfo, false)
                {
                }
 
-               public SignedCms (ContentInfo content, bool detached) 
+               public SignedCms (ContentInfo contentInfo, bool detached) 
                        : this ()
                {
-                       if (content == null)
-                               throw new ArgumentNullException ("content");
+                       if (contentInfo == null)
+                               throw new ArgumentNullException ("contentInfo");
 
-                       _content = content;
+                       _content = contentInfo;
                        _detached = detached;
                }
 
@@ -75,14 +75,14 @@ namespace System.Security.Cryptography.Pkcs {
                        _type = signerIdentifierType;
                }
 
-               public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo content) 
-                       : this (content, false) 
+               public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo
+                       : this (contentInfo, false) 
                {
                        _type = signerIdentifierType;
                }
 
-               public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo content, bool detached) 
-                       : this (content, detached) 
+               public SignedCms (SubjectIdentifierType signerIdentifierType, ContentInfo contentInfo, bool detached) 
+                       : this (contentInfo, detached) 
                {
                        _type = signerIdentifierType;
                }
index b927fa2b71bcc88d1ac12e93ab49c8d3b62ed694..9c83f3bb0ab92d69900ac1510cf18bc4661a9588 100644 (file)
@@ -46,8 +46,8 @@ namespace System.Security.Cryptography.Xml {
                {
                }
        
-               public CipherReference (string uri, TransformChain tc)
-                       : base (uri, tc)
+               public CipherReference (string uri, TransformChain transformChain)
+                       : base (uri, transformChain)
                {
                }
        
index 23fedd437a1f7b60676b50c8ca6e5f25f6e9562f..c3aa93666810d79cb9528c1a816d2e4c5c63dbdb 100644 (file)
@@ -48,8 +48,8 @@ namespace System.Security.Cryptography.Xml {
                        ReferenceType = XmlEncryption.ElementNames.DataReference;
                }
        
-               public DataReference (string uri, TransformChain tc)
-                       : base (uri, tc)
+               public DataReference (string uri, TransformChain transformChain)
+                       : base (uri, transformChain)
                {
                        ReferenceType = XmlEncryption.ElementNames.DataReference;
                }
index 04f3799f8cc2760e975c2202ea379fbf1d53c3e7..e748523cbc49855417b2f7e308e61ecc142e1e57 100644 (file)
@@ -55,11 +55,11 @@ namespace System.Security.Cryptography.Xml {
                        TransformChain = new TransformChain ();
                }
        
-               protected EncryptedReference (string uri, TransformChain tc)
+               protected EncryptedReference (string uri, TransformChain transformChain)
                        : this ()
                {
                        Uri = uri;
-                       TransformChain = tc;
+                       TransformChain = transformChain;
                }
        
                #endregion // Constructors
index 6dde9199a2ad36d5c5f9d8620f7444ff22760df2..362f973e35619b9ed08fa418c824910786c85869 100644 (file)
@@ -138,19 +138,19 @@ namespace System.Security.Cryptography.Xml {
                        keyNameMapping.Clear ();
                }
 
-               public byte[] DecryptData (EncryptedData encryptedData, SymmetricAlgorithm symAlg)
+               public byte[] DecryptData (EncryptedData encryptedData, SymmetricAlgorithm symmetricAlgorithm)
                {
                        if (encryptedData == null)
                                throw new ArgumentNullException ("encryptedData");
-                       if (symAlg == null)
-                               throw new ArgumentNullException ("symAlg");
+                       if (symmetricAlgorithm == null)
+                               throw new ArgumentNullException ("symmetricAlgorithm");
 
-                       PaddingMode bak = symAlg.Padding;
+                       PaddingMode bak = symmetricAlgorithm.Padding;
                        try {
-                               symAlg.Padding = Padding;
-                               return Transform (encryptedData.CipherData.CipherValue, symAlg.CreateDecryptor (), symAlg.BlockSize / 8, true);
+                               symmetricAlgorithm.Padding = Padding;
+                               return Transform (encryptedData.CipherData.CipherValue, symmetricAlgorithm.CreateDecryptor (), symmetricAlgorithm.BlockSize / 8, true);
                        } finally {
-                               symAlg.Padding = bak;
+                               symmetricAlgorithm.Padding = bak;
                        }
                }
 
@@ -186,25 +186,25 @@ namespace System.Security.Cryptography.Xml {
                        return DecryptKey (encryptedKey.CipherData.CipherValue, (SymmetricAlgorithm) keyAlg);
                }
 
-               public static byte[] DecryptKey (byte[] keyData, SymmetricAlgorithm symAlg)
+               public static byte[] DecryptKey (byte[] keyData, SymmetricAlgorithm symmetricAlgorithm)
                {
                        if (keyData == null)
                                throw new ArgumentNullException ("keyData");
-                       if (symAlg == null)
-                               throw new ArgumentNullException ("symAlg");
+                       if (symmetricAlgorithm == null)
+                               throw new ArgumentNullException ("symmetricAlgorithm");
 
-                       if (symAlg is TripleDES)
-                               return SymmetricKeyWrap.TripleDESKeyWrapDecrypt (symAlg.Key, keyData);
-                       if (symAlg is Rijndael)
-                               return SymmetricKeyWrap.AESKeyWrapDecrypt (symAlg.Key, keyData);
+                       if (symmetricAlgorithm is TripleDES)
+                               return SymmetricKeyWrap.TripleDESKeyWrapDecrypt (symmetricAlgorithm.Key, keyData);
+                       if (symmetricAlgorithm is Rijndael)
+                               return SymmetricKeyWrap.AESKeyWrapDecrypt (symmetricAlgorithm.Key, keyData);
                        throw new CryptographicException ("The specified cryptographic transform is not supported.");
                }
 
                [MonoTODO ("Test this.")]
-               public static byte[] DecryptKey (byte[] keyData, RSA rsa, bool fOAEP)
+               public static byte[] DecryptKey (byte[] keyData, RSA rsa, bool useOAEP)
                {
                        AsymmetricKeyExchangeDeformatter deformatter = null;
-                       if (fOAEP) 
+                       if (useOAEP) 
                                deformatter = new RSAOAEPKeyExchangeDeformatter (rsa);
                        else
                                deformatter = new RSAPKCS1KeyExchangeDeformatter (rsa);
@@ -254,19 +254,19 @@ namespace System.Security.Cryptography.Xml {
                        throw new NotImplementedException ();
                }
 
-               public byte[] EncryptData (byte[] plainText, SymmetricAlgorithm symAlg)
+               public byte[] EncryptData (byte[] plaintext, SymmetricAlgorithm symmetricAlgorithm)
                {
-                       if (plainText == null)
-                               throw new ArgumentNullException ("plainText");
-                       if (symAlg == null)
-                               throw new ArgumentNullException ("symAlg");
+                       if (plaintext == null)
+                               throw new ArgumentNullException ("plaintext");
+                       if (symmetricAlgorithm == null)
+                               throw new ArgumentNullException ("symmetricAlgorithm");
 
-                       PaddingMode bak = symAlg.Padding;
+                       PaddingMode bak = symmetricAlgorithm.Padding;
                        try {
-                               symAlg.Padding = Padding;
-                               return EncryptDataCore (plainText, symAlg);
+                               symmetricAlgorithm.Padding = Padding;
+                               return EncryptDataCore (plaintext, symmetricAlgorithm);
                        } finally {
-                               symAlg.Padding = bak;
+                               symmetricAlgorithm.Padding = bak;
                        }
                }
 
@@ -289,37 +289,37 @@ namespace System.Security.Cryptography.Xml {
                        return output;
                }
 
-               public byte[] EncryptData (XmlElement inputElement, SymmetricAlgorithm symAlg, bool content)
+               public byte[] EncryptData (XmlElement inputElement, SymmetricAlgorithm symmetricAlgorithm, bool content)
                {
                        if (inputElement == null)
                                throw new ArgumentNullException ("inputElement");
 
                        if (content)
-                               return EncryptData (Encoding.GetBytes (inputElement.InnerXml), symAlg);
+                               return EncryptData (Encoding.GetBytes (inputElement.InnerXml), symmetricAlgorithm);
                        else
-                               return EncryptData (Encoding.GetBytes (inputElement.OuterXml), symAlg);
+                               return EncryptData (Encoding.GetBytes (inputElement.OuterXml), symmetricAlgorithm);
                }
 
-               public static byte[] EncryptKey (byte[] keyData, SymmetricAlgorithm symAlg)
+               public static byte[] EncryptKey (byte[] keyData, SymmetricAlgorithm symmetricAlgorithm)
                {
                        if (keyData == null)
                                throw new ArgumentNullException ("keyData");
-                       if (symAlg == null)
-                               throw new ArgumentNullException ("symAlg");
+                       if (symmetricAlgorithm == null)
+                               throw new ArgumentNullException ("symmetricAlgorithm");
 
-                       if (symAlg is TripleDES)
-                               return SymmetricKeyWrap.TripleDESKeyWrapEncrypt (symAlg.Key, keyData);
-                       if (symAlg is Rijndael)
-                               return SymmetricKeyWrap.AESKeyWrapEncrypt (symAlg.Key, keyData);
+                       if (symmetricAlgorithm is TripleDES)
+                               return SymmetricKeyWrap.TripleDESKeyWrapEncrypt (symmetricAlgorithm.Key, keyData);
+                       if (symmetricAlgorithm is Rijndael)
+                               return SymmetricKeyWrap.AESKeyWrapEncrypt (symmetricAlgorithm.Key, keyData);
 
                        throw new CryptographicException ("The specified cryptographic transform is not supported.");
                }
 
                [MonoTODO ("Test this.")]
-               public static byte[] EncryptKey (byte[] keyData, RSA rsa, bool fOAEP)
+               public static byte[] EncryptKey (byte[] keyData, RSA rsa, bool useOAEP)
                {
                        AsymmetricKeyExchangeFormatter formatter = null;
-                       if (fOAEP) 
+                       if (useOAEP) 
                                formatter = new RSAOAEPKeyExchangeFormatter (rsa);
                        else
                                formatter = new RSAPKCS1KeyExchangeFormatter (rsa);
@@ -402,25 +402,25 @@ namespace System.Security.Cryptography.Xml {
                        throw new ArgumentException ("keyAlg");
                }
 
-               public virtual byte[] GetDecryptionIV (EncryptedData encryptedData, string symAlgUri)
+               public virtual byte[] GetDecryptionIV (EncryptedData encryptedData, string symmetricAlgorithmUri)
                {
                        if (encryptedData == null)
                                throw new ArgumentNullException ("encryptedData");
 
-                       SymmetricAlgorithm symAlg = GetAlgorithm (symAlgUri);
+                       SymmetricAlgorithm symAlg = GetAlgorithm (symmetricAlgorithmUri);
                        byte[] iv = new Byte [symAlg.BlockSize / 8];
                        Buffer.BlockCopy (encryptedData.CipherData.CipherValue, 0, iv, 0, iv.Length);
                        return iv;
                }
 
-               public virtual SymmetricAlgorithm GetDecryptionKey (EncryptedData encryptedData, string symAlgUri)
+               public virtual SymmetricAlgorithm GetDecryptionKey (EncryptedData encryptedData, string symmetricAlgorithmUri)
                {
                        if (encryptedData == null)
                                throw new ArgumentNullException ("encryptedData");
-                       if (symAlgUri == null)
+                       if (symmetricAlgorithmUri == null)
                                return null;
 
-                       SymmetricAlgorithm symAlg = GetAlgorithm (symAlgUri);
+                       SymmetricAlgorithm symAlg = GetAlgorithm (symmetricAlgorithmUri);
                        symAlg.IV = GetDecryptionIV (encryptedData, encryptedData.EncryptionMethod.KeyAlgorithm);
                        KeyInfo keyInfo = encryptedData.KeyInfo;
                        foreach (KeyInfoClause clause in keyInfo) {
index 91815a19a308026260dbebccef5de3ad96883f1f..cd68158bf0f52f54d5eba00247857212dc21231a 100644 (file)
@@ -48,9 +48,9 @@ namespace System.Security.Cryptography.Xml {
                        KeyAlgorithm = null;
                }
 
-               public EncryptionMethod (string strAlgorithm)
+               public EncryptionMethod (string algorithm)
                {
-                       KeyAlgorithm = strAlgorithm;
+                       KeyAlgorithm = algorithm;
                }
 
                #endregion // Constructors
index eee49e6b6a0c95f78e689bf2e0730c098b770cf9..ca662892da9cc9f3435a37a9fadd63765a32e3fb 100644 (file)
@@ -47,9 +47,9 @@ namespace System.Security.Cryptography.Xml {
                {
                }
 
-               public EncryptionProperty (XmlElement elemProp)
+               public EncryptionProperty (XmlElement elementProperty)
                {
-                       LoadXml (elemProp);
+                       LoadXml (elementProperty);
                }
 
                #endregion // Constructors
index afd079b7dc2c62692308e6bdf3282b8111fab019..62aa8afd3ca781bd2966e3a194b520be9c381e7d 100644 (file)
@@ -48,9 +48,9 @@ namespace System.Security.Cryptography.Xml {
                {
                }
 
-               public KeyInfoEncryptedKey (EncryptedKey ek)
+               public KeyInfoEncryptedKey (EncryptedKey encryptedKey)
                {
-                       EncryptedKey = ek;
+                       EncryptedKey = encryptedKey;
                }
 
                #endregion // Constructors
index 2732de63be779629128cea996864910dac1f7c9d..532ba5ca2ce86400967963dae6c573a1def85d80 100644 (file)
@@ -49,10 +49,10 @@ namespace System.Security.Cryptography.Xml {
                        URI = strUri;
                }
 
-               public KeyInfoRetrievalMethod (string strUri, string strType)
+               public KeyInfoRetrievalMethod (string strUri, string typeName)
                        : this (strUri)
                {
-                       Type = strType;
+                       Type = typeName;
                }
 
                [ComVisible (false)]
index 2fe171e72f4b4d7eae831b8ff508f90af715361e..ba33bf25b32e31fd4ac366565a93364fff7afa22 100644 (file)
@@ -48,8 +48,8 @@ namespace System.Security.Cryptography.Xml {
                        ReferenceType = XmlEncryption.ElementNames.KeyReference;
                }
        
-               public KeyReference (string uri, TransformChain tc)
-                       : base (uri, tc)
+               public KeyReference (string uri, TransformChain transformChain)
+                       : base (uri, transformChain)
                {
                        ReferenceType = XmlEncryption.ElementNames.KeyReference;
                }
index e36b30e12b292b2b3aa0e9ee90daf3c576f63432..43560cd40cf6933fdd32f71bf8d21c705ec6c177 100644 (file)
@@ -45,10 +45,10 @@ namespace System.Security.Permissions {
                                _flags = DataProtectionPermissionFlags.AllFlags;
                }
 
-               public DataProtectionPermission (DataProtectionPermissionFlags flags
+               public DataProtectionPermission (DataProtectionPermissionFlags flag) 
                {
                        // reuse validation by the Flags property
-                       Flags = flags;
+                       Flags = flag;
                }
 
 
@@ -114,15 +114,15 @@ namespace System.Security.Permissions {
                        return ((_flags & ~dp._flags) == 0);
                }
 
-               public override void FromXml (SecurityElement e
+               public override void FromXml (SecurityElement securityElement
                {
                        // General validation in CodeAccessPermission
-                       PermissionHelper.CheckSecurityElement (e, "e", version, version);
+                       PermissionHelper.CheckSecurityElement (securityElement, "securityElement", version, version);
                        // Note: we do not (yet) care about the return value 
                        // as we only accept version 1 (min/max values)
 
                        _flags = (DataProtectionPermissionFlags) Enum.Parse (
-                               typeof (DataProtectionPermissionFlags), e.Attribute ("Flags"));
+                               typeof (DataProtectionPermissionFlags), securityElement.Attribute ("Flags"));
                }
 
                public override SecurityElement ToXml () 
index 9dbb1ed60719bb9ec3b7873eb4b5362afd5ba3ab..7166a0330f70f23d5d48e8e69cbc01dfa55f77d9 100644 (file)
@@ -126,7 +126,7 @@ namespace System.ServiceModel.Discovery.Configuration
                        // It seems to do nothing.
                }
                
-               protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
+               protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
                {
                        // It seems to do nothing.
                }
index ad09f0567cb291cfaf2d026be3f347baf51ccbba..5e6af3f8eebf17175a2d1d5b7681243660fa5b0d 100644 (file)
@@ -142,10 +142,10 @@ namespace System.ServiceModel.Discovery.Configuration
                        base.OnInitializeAndValidate (channelEndpointElement);
                }
 
-               protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
+               protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
                {
                        // It seems to do nothing.
-                       base.OnInitializeAndValidate (channelEndpointElement);
+                       base.OnInitializeAndValidate (serviceEndpointElement);
                }
        }
 }
index 8ac3d43a3e0bfd9f595df6f7f276babe94636b88..ece16ae6fcc4923f10801e04e53db55b2b43cf87 100644 (file)
@@ -150,10 +150,10 @@ namespace System.ServiceModel.Discovery.Configuration
                        base.OnInitializeAndValidate (channelEndpointElement);
                }
 
-               protected override void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement)
+               protected override void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement)
                {
                        // It seems to do nothing.
-                       base.OnInitializeAndValidate (channelEndpointElement);
+                       base.OnInitializeAndValidate (serviceEndpointElement);
                }
        }
 }
index 0c181289d2562c2b98b505d3c5f9ab117ab3e69d..7e2a31e73a3daa27b87dc0b95be0347606932e99 100644 (file)
@@ -64,8 +64,8 @@ namespace System.ServiceModel.Syndication
                {
                }
 
-               public Atom10ItemFormatter (SyndicationItem feedToWrite)
-                       : base (feedToWrite)
+               public Atom10ItemFormatter (SyndicationItem itemToWrite)
+                       : base (itemToWrite)
                {
                }
 
index 1191c92b2be3ef0683f244bb024eefff8c525cb9..1393a62493e14a08ec06d18dabbbbecf86b9c82e 100644 (file)
@@ -75,9 +75,9 @@ namespace System.ServiceModel.Syndication
                        return new XmlSyndicationContent (null, xmlSerializerObject, serializer);
                }
 
-               public static XmlSyndicationContent CreateXmlContent (XmlReader reader)
+               public static XmlSyndicationContent CreateXmlContent (XmlReader xmlReader)
                {
-                       return new XmlSyndicationContent (reader);
+                       return new XmlSyndicationContent (xmlReader);
                }
 
                #endregion
index 10f786c2ff389a88fe37518b5209305e70023741..1726b78eded0dfb887604d57c2b78ae1ae0ad245 100644 (file)
@@ -62,24 +62,24 @@ namespace System.ServiceModel.Syndication
                {
                }
 
-               public SyndicationItem (string title, string content, Uri feedAlternateLink)
-                       : this (title, content, feedAlternateLink, null, default (DateTimeOffset))
+               public SyndicationItem (string title, string content, Uri itemAlternateLink)
+                       : this (title, content, itemAlternateLink, null, default (DateTimeOffset))
                {
                }
 
-               public SyndicationItem (string title, string content, Uri feedAlternateLink, string id,
+               public SyndicationItem (string title, string content, Uri itemAlternateLink, string id,
                                        DateTimeOffset lastUpdatedTime)
-                       : this (title, content != null ? SyndicationContent.CreatePlaintextContent (content) : null, feedAlternateLink, id, lastUpdatedTime)
+                       : this (title, content != null ? SyndicationContent.CreatePlaintextContent (content) : null, itemAlternateLink, id, lastUpdatedTime)
                {
                }
 
-               public SyndicationItem (string title, SyndicationContent content, Uri feedAlternateLink, string id,
+               public SyndicationItem (string title, SyndicationContent content, Uri itemAlternateLink, string id,
                                        DateTimeOffset lastUpdatedTime)
                {
                        Title = title != null ? new TextSyndicationContent (title) : null;
                        Content = content;
-                       if (feedAlternateLink != null)
-                               AddPermalink (feedAlternateLink);
+                       if (itemAlternateLink != null)
+                               AddPermalink (itemAlternateLink);
                        Id = id;
                        LastUpdatedTime = lastUpdatedTime;
                }
@@ -210,11 +210,11 @@ namespace System.ServiceModel.Syndication
                        set { title = value; }
                }
 
-               public void AddPermalink (Uri link)
+               public void AddPermalink (Uri permalink)
                {
-                       if (link == null)
-                               throw new ArgumentNullException ("link");
-                       Links.Add (SyndicationLink.CreateAlternateLink (link));
+                       if (permalink == null)
+                               throw new ArgumentNullException ("permalink");
+                       Links.Add (SyndicationLink.CreateAlternateLink (permalink));
                }
 
                public virtual SyndicationItem Clone ()
index b380fd834ad074115d7a09271b23ccbb492db52c..174f06b584078685a637c0d16596e3d85a88b835 100644 (file)
@@ -119,9 +119,9 @@ namespace System.ServiceModel.Syndication
                        return extension.GetObject<TContent> ();
                }
 
-               public TContent ReadContent<TContent> (XmlObjectSerializer serializer)
+               public TContent ReadContent<TContent> (XmlObjectSerializer dataContractSerializer)
                {
-                       return extension.GetObject<TContent> (serializer);
+                       return extension.GetObject<TContent> (dataContractSerializer);
                }
 
                public TContent ReadContent<TContent> (XmlSerializer serializer)
index 4a5289dd51f235ed5f8067c560a1b46c627893f0..c05cf8f0c8e1ef783d24d22d032c99694511ad66 100644 (file)
@@ -56,13 +56,13 @@ namespace System.ServiceModel.Web
                }
 #endif
 
-               public WebChannelFactory(Type serviceType)
-                       : base (serviceType)
+               public WebChannelFactory(Type channelType)
+                       : base (channelType)
                {
                }
 
-               public WebChannelFactory (string configurationName)
-                       : base (configurationName)
+               public WebChannelFactory (string endpointConfigurationName)
+                       : base (endpointConfigurationName)
                {
                }
 
index a372b24c6b696e9bc809f0f58a9f5312092f6666..3e8e500329a578b4e4a9ec7a35f9c36790d6a9e3 100644 (file)
@@ -68,15 +68,15 @@ namespace System.ServiceModel.Web
                OutgoingWebRequestContext outgoing_request;
                OutgoingWebResponseContext outgoing_response;
 
-               public WebOperationContext (OperationContext operation)
+               public WebOperationContext (OperationContext operationContext)
                {
-                       if (operation == null)
-                               throw new ArgumentNullException ("operation");
+                       if (operationContext == null)
+                               throw new ArgumentNullException ("operationContext");
 
                        outgoing_request = new OutgoingWebRequestContext ();
-                       incoming_response = new IncomingWebResponseContext (operation);
+                       incoming_response = new IncomingWebResponseContext (operationContext);
 #if !MOBILE
-                       incoming_request = new IncomingWebRequestContext (operation);
+                       incoming_request = new IncomingWebRequestContext (operationContext);
                        outgoing_response = new OutgoingWebResponseContext ();
 #endif
                }
@@ -101,12 +101,12 @@ namespace System.ServiceModel.Web
                }
 #endif
 
-               public void Attach (OperationContext context)
+               public void Attach (OperationContext owner)
                {
                        // do nothing
                }
 
-               public void Detach (OperationContext context)
+               public void Detach (OperationContext owner)
                {
                        // do nothing
                }
index df3dd8f16f6576edf5def249884eca9d7f7c561e..2a71219697dbf668bb63282b8f33978c65c6437a 100644 (file)
@@ -45,9 +45,9 @@ namespace System.ServiceModel
                {
                }
 
-               public WebHttpBinding (WebHttpSecurityMode mode)
+               public WebHttpBinding (WebHttpSecurityMode securityMode)
                {
-                       Initialize (mode);
+                       Initialize (securityMode);
                }
 
                public WebHttpBinding (string configurationName)
index 3a6629e57bc5278eb6f154c94ea62ba12320e385..60ddd555928e15735f7d85428caac5e97e66afbf 100644 (file)
@@ -35,8 +35,8 @@ namespace System
        public class UriTemplateMatchException : SystemException
        {
                public UriTemplateMatchException () : base () {}
-               public UriTemplateMatchException (string msg) : base (msg) {}
-               public UriTemplateMatchException (string msg, Exception inner) : base (msg, inner) {}
+               public UriTemplateMatchException (string message) : base (message) {}
+               public UriTemplateMatchException (string message, Exception innerException) : base (message, innerException) {}
                protected UriTemplateMatchException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index 3e79f9e85ac5d5fbc4c5620ed8eb704c3b2d6e70..dc046928ad37d0624a63c41f52e0426e5ffcdcd3 100644 (file)
@@ -65,14 +65,14 @@ namespace System.Collections.Generic
                        return list;
                }
 
-               protected override void InsertItem (int index, TItem kind)
+               protected override void InsertItem (int index, TItem item)
                {
-                       base.InsertItem (index, kind);
+                       base.InsertItem (index, item);
                }
 
-               protected override void SetItem (int index, TItem kind)
+               protected override void SetItem (int index, TItem item)
                {
-                       base.SetItem (index, kind);
+                       base.SetItem (index, item);
                }
 
                public T Remove<T> ()
index 5e47797fc3f79a16401e0bccb79050966ae0bb2e..b110d15f243614a30ab6740c47aaece7aa9e98df 100644 (file)
@@ -57,10 +57,10 @@ namespace System.Collections.Generic
                }
 
                protected SynchronizedKeyedCollection (object syncRoot,
-                       IEqualityComparer<K> comparer, int capacity)
+                       IEqualityComparer<K> comparer, int dictionaryCreationThreshold)
                        : base (syncRoot)
                {
-                       dict = new Dictionary<K, T> (capacity, comparer);
+                       dict = new Dictionary<K, T> (dictionaryCreationThreshold, comparer);
                }
 
                // see bug #76417
index fdc7c3e56e7767b88e2802e8e9097440c6620cab..b7924ff5a781192001068ae253739a9ebe2f633c 100644 (file)
@@ -43,25 +43,25 @@ namespace System.Collections.Generic
                {
                }
 
-               public SynchronizedReadOnlyCollection (object sync_root)
-                       : this (sync_root, new List<T> ())
+               public SynchronizedReadOnlyCollection (object syncRoot)
+                       : this (syncRoot, new List<T> ())
                {
                }
 
-               public SynchronizedReadOnlyCollection (object sync_root, IEnumerable<T> list)
+               public SynchronizedReadOnlyCollection (object syncRoot, IEnumerable<T> list)
                {
-                       if (sync_root == null)
-                               throw new ArgumentNullException ("sync_root");
+                       if (syncRoot == null)
+                               throw new ArgumentNullException ("syncRoot");
 
                        if (list == null)
                                throw new ArgumentNullException ("list");
 
-                       this.sync_root = sync_root;
+                       this.sync_root = syncRoot;
                        this.l = new List<T> (list);
                }
 
-               public SynchronizedReadOnlyCollection (object sync_root, params T [] list)
-                       : this (sync_root, (IEnumerable<T>) list)
+               public SynchronizedReadOnlyCollection (object syncRoot, params T [] list)
+                       : this (syncRoot, (IEnumerable<T>) list)
                {
                }
 
index 9e66babb71aff4f93a2a183a089baa7ec2dba92f..5d942eebb25d119f29d778db8f46a4f3e0c0c139 100644 (file)
@@ -176,7 +176,7 @@ namespace System.ServiceModel.Channels
 
                public virtual IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
-                       Uri listenUri,
+                       Uri listenUriBaseAddress,
                        params object [] parameters)
                        where TChannel : class, IChannel
                {
@@ -184,16 +184,16 @@ namespace System.ServiceModel.Channels
                                new BindingParameterCollection ();
                        foreach (object o in parameters)
                                pl.Add (o);
-                       return BuildChannelListener<TChannel> (listenUri, pl);
+                       return BuildChannelListener<TChannel> (listenUriBaseAddress, pl);
                }
 
                public virtual IChannelListener<TChannel>
                        BuildChannelListener<TChannel> (
-                       Uri listenUri,
+                       Uri listenUriBaseAddress,
                        BindingParameterCollection parameters)
                        where TChannel : class, IChannel
                {
-                       return BuildChannelListener<TChannel> (listenUri,
+                       return BuildChannelListener<TChannel> (listenUriBaseAddress,
                                String.Empty, parameters);
                }
 
index be4ff59937a85d6340f0d20209c5bfb06c58bb3e..7c2936e07acbf85dda453bea12d1f0d427336114 100644 (file)
@@ -197,16 +197,16 @@ namespace System.ServiceModel.Channels
                }
 
                public IAsyncResult BeginAcceptChannel (
-                       AsyncCallback callback, object asyncState)
+                       AsyncCallback callback, object state)
                {
                        return BeginAcceptChannel (
-                               timeouts.ReceiveTimeout, callback, asyncState);
+                               timeouts.ReceiveTimeout, callback, state);
                }
 
                public IAsyncResult BeginAcceptChannel (TimeSpan timeout,
-                       AsyncCallback callback, object asyncState)
+                       AsyncCallback callback, object state)
                {
-                       return OnBeginAcceptChannel (timeout, callback, asyncState);
+                       return OnBeginAcceptChannel (timeout, callback, state);
                }
 
                public TChannel EndAcceptChannel (IAsyncResult result)
@@ -217,7 +217,7 @@ namespace System.ServiceModel.Channels
                protected abstract TChannel OnAcceptChannel (TimeSpan timeout);
 
                protected abstract IAsyncResult OnBeginAcceptChannel (TimeSpan timeout,
-                       AsyncCallback callback, object asyncState);
+                       AsyncCallback callback, object state);
 
                protected abstract TChannel OnEndAcceptChannel (IAsyncResult result);
        }
index feb1f9ae7758247e9ce9563dccc7d1c09d4d0e25..c1630966b01c4598325ad4e30536931ca49cf9d5 100644 (file)
@@ -43,8 +43,8 @@ namespace System.ServiceModel.Channels
                ISecurityCapabilities security;
                string scheme = "";
 
-               public CustomBinding (string name)
-                       : this (name, default_ns)
+               public CustomBinding (string configurationName)
+                       : this (configurationName, default_ns)
                {
                }
 
index 1b6be5ad60d66d7d4064dcf22255545d65abf0a7..a5e5b39ec653c203ec48a20cf641dcd411f27fc4 100644 (file)
@@ -334,19 +334,19 @@ namespace System.ServiceModel.Channels
 
                // 1)
                public static Message CreateMessage (MessageVersion version,
-                       FaultCode code, string reason, string action)
+                       FaultCode faultCode, string reason, string action)
                {
-                       MessageFault fault = MessageFault.CreateFault (code, reason);
+                       MessageFault fault = MessageFault.CreateFault (faultCode, reason);
                        return CreateMessage (version, fault, action);
                }
 
                // 2)
                public static Message CreateMessage (MessageVersion version,
-                       FaultCode code, string reason, object detail,
+                       FaultCode faultCode, string reason, object detail,
                        string action)
                {
                        MessageFault fault = MessageFault.CreateFault (
-                               code, new FaultReason (reason), detail);
+                               faultCode, new FaultReason (reason), detail);
                        return CreateMessage (version, fault, action);
                }
 
index ecbf261c316dc066cb37c6babecaafe198b1f6a2..1bb8186155dca65600a39f18acdc6d4b9eb959da 100644 (file)
@@ -47,9 +47,9 @@ namespace System.ServiceModel.Channels {
                        return CreateNavigator (XmlSpace.Default);
                }
 
-               public XPathNavigator CreateNavigator (int node_quota)
+               public XPathNavigator CreateNavigator (int nodeQuota)
                {
-                       return CreateNavigator (node_quota, XmlSpace.Default);
+                       return CreateNavigator (nodeQuota, XmlSpace.Default);
                }
 
                [MonoTODO ("supply proper quota")]
@@ -60,10 +60,10 @@ namespace System.ServiceModel.Channels {
                }
 
                [MonoTODO ("Handle node_quota and xmlspace")]
-               public XPathNavigator CreateNavigator (int node_quota, XmlSpace space)
+               public XPathNavigator CreateNavigator (int nodeQuota, XmlSpace space)
                {
                        if (nav_cache == null) {
-                               DTMXPathDocumentWriter2 pw = new DTMXPathDocumentWriter2 (new NameTable (), node_quota);
+                               DTMXPathDocumentWriter2 pw = new DTMXPathDocumentWriter2 (new NameTable (), nodeQuota);
                                XmlDictionaryWriter w = XmlDictionaryWriter.CreateDictionaryWriter (pw);
                                CreateMessage ().WriteMessage (w);
                                nav_cache = pw.CreateDocument ().CreateNavigator ();
index 8527e5c313419206b5ee66e7b38885e7a449c393..6e3675e95a2d7d99f58a0a62d0b8513dd335f04b 100644 (file)
@@ -220,26 +220,26 @@ namespace System.ServiceModel.Channels
 
                public static MessageFault CreateFault (FaultCode code,
                        FaultReason reason, object detail,
-                       XmlObjectSerializer formatter)
+                       XmlObjectSerializer serializer)
                {
                        return new SimpleMessageFault (code, reason, true,
-                               detail, formatter, String.Empty, String.Empty);
+                               detail, serializer, String.Empty, String.Empty);
                }
 
                public static MessageFault CreateFault (FaultCode code,
                        FaultReason reason, object detail,
-                       XmlObjectSerializer formatter, string actor)
+                       XmlObjectSerializer serializer, string actor)
                {
                        return new SimpleMessageFault (code, reason,
-                               true, detail, formatter, actor, String.Empty);
+                               true, detail, serializer, actor, String.Empty);
                }
 
                public static MessageFault CreateFault (FaultCode code,
                        FaultReason reason, object detail,
-                       XmlObjectSerializer formatter, string actor, string node)
+                       XmlObjectSerializer serializer, string actor, string node)
                {
                        return new SimpleMessageFault (code, reason,
-                               true, detail, formatter, actor, node);
+                               true, detail, serializer, actor, node);
                }
 
                // pretty simple implementation class
index c08ef8697dd13e5cba749f5e94fc573d69450439..3ee4ef203dead9ccad1dac7978026a856031c5dd 100644 (file)
@@ -50,10 +50,10 @@ namespace System.ServiceModel.Channels
                        new Dictionary<Type, XmlObjectSerializer> ();
                MessageVersion version;
 
-               public MessageHeaders (MessageHeaders headers)
-                       : this (headers.MessageVersion)
+               public MessageHeaders (MessageHeaders collection)
+                       : this (collection.MessageVersion)
                {
-                       CopyHeadersFrom (headers);
+                       CopyHeadersFrom (collection);
                }
 
                public MessageHeaders (MessageVersion version)
@@ -61,10 +61,10 @@ namespace System.ServiceModel.Channels
                {
                }
 
-               public MessageHeaders (MessageVersion version, int capacity)
+               public MessageHeaders (MessageVersion version, int initialSize)
                {
                        this.version = version;
-                       l = new List<MessageHeaderInfo> (capacity);
+                       l = new List<MessageHeaderInfo> (initialSize);
                }
                
                public void Add (MessageHeader header)
index 2b43d40adf1ee86d451bd797132edf7191155937..5faeb48c50227205b92b26c63786d676073fa3af 100644 (file)
@@ -49,10 +49,10 @@ namespace System.ServiceModel.Channels
                }
 
                public MtomMessageEncodingBindingElement (
-                       MessageVersion version, Encoding encoding)
+                       MessageVersion messageVersion, Encoding writeEncoding)
                {
-                       this.version = version;
-                       this.encoding = encoding;
+                       this.version = messageVersion;
+                       this.encoding = writeEncoding;
                }
 
                public int MaxBufferSize {
index 759bafd5b16ada72c59c80396bf4ae186a87fdcb..674d6cef46f84d51e60ee6d1018ccc69b767a073 100644 (file)
@@ -41,10 +41,10 @@ namespace System.ServiceModel.Channels
                }
 
                protected NamedPipeTransportBindingElement (
-                       NamedPipeTransportBindingElement other)
-                       : base (other)
+                       NamedPipeTransportBindingElement elementToBeCloned)
+                       : base (elementToBeCloned)
                {
-                       pool.CopyPropertiesFrom (other.pool);
+                       pool.CopyPropertiesFrom (elementToBeCloned.pool);
                }
 
                NamedPipeConnectionPoolSettings pool = new NamedPipeConnectionPoolSettings ();
index 0a5fa43897a31254f03bd51bad8a9746ecff7928..f6b58f582a377039c700e5f1c416e793f9e0f639 100644 (file)
@@ -37,7 +37,7 @@ namespace System.ServiceModel.Channels
                {
                }
 
-               protected StreamUpgradeBindingElement (StreamUpgradeBindingElement other)
+               protected StreamUpgradeBindingElement (StreamUpgradeBindingElement elementToBeCloned)
                {
                }
 
index dee266e465b9301daa4c88572e8223f8bdce9e8c..07356fb41833b902249fd92dc03f58c87c384817 100644 (file)
@@ -45,9 +45,9 @@ namespace System.ServiceModel.Channels
                {
                }
 
-               public TransactionFlowBindingElement (TransactionProtocol protocol)
+               public TransactionFlowBindingElement (TransactionProtocol transactionProtocol)
                {
-                       this.protocol = protocol;
+                       this.protocol = transactionProtocol;
                }
 
                public TransactionProtocol TransactionProtocol {
index cea035495e2be69d8ec040b06e75b3d2251989b2..92f746e2236079680a78a3af78976ba3fbff29b0 100644 (file)
@@ -40,14 +40,14 @@ namespace System.ServiceModel.Channels
                {
                        headers = new List<MessageHeaderInfo> ();
                }
-               public void Add (MessageHeaderInfo header)
+               public void Add (MessageHeaderInfo headerInfo)
                {
-                       headers.Add (header);
+                       headers.Add (headerInfo);
                }
 
-               public bool Contains (MessageHeaderInfo header)
+               public bool Contains (MessageHeaderInfo headerInfo)
                {
-                       return headers.Contains (header);
+                       return headers.Contains (headerInfo);
                }
 
                public IEnumerator<MessageHeaderInfo> GetEnumerator ()
@@ -55,9 +55,9 @@ namespace System.ServiceModel.Channels
                        return headers.GetEnumerator ();
                }
 
-               public void Remove (MessageHeaderInfo header)
+               public void Remove (MessageHeaderInfo headerInfo)
                {
-                       headers.Remove (header);
+                       headers.Remove (headerInfo);
                }
 
                IEnumerator IEnumerable.GetEnumerator ()
index a83fffc8b2ede9ea49d1c7a61148b3c56ec1ee6b..a69522b599e0edd9c6f56b3af3b9d419d6ac9ad5 100644 (file)
@@ -111,9 +111,9 @@ namespace System.ServiceModel.Configuration
                        return new BinaryMessageEncodingBindingElement ();
                }
 
-               public override void ApplyConfiguration (BindingElement element)
+               public override void ApplyConfiguration (BindingElement bindingElement)
                {
-                       var b = (BinaryMessageEncodingBindingElement) element;
+                       var b = (BinaryMessageEncodingBindingElement) bindingElement;
                        b.MaxReadPoolSize = MaxReadPoolSize;
                        b.MaxSessionSize = MaxSessionSize;
                        b.MaxWritePoolSize = MaxWritePoolSize;
@@ -121,9 +121,9 @@ namespace System.ServiceModel.Configuration
                        ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
                }
 
-               public override void CopyFrom (ServiceModelExtensionElement element)
+               public override void CopyFrom (ServiceModelExtensionElement from)
                {
-                       var b = (BinaryMessageEncodingElement) element;
+                       var b = (BinaryMessageEncodingElement) from;
                        MaxReadPoolSize = b.MaxReadPoolSize;
                        MaxSessionSize = b.MaxSessionSize;
                        MaxWritePoolSize = b.MaxWritePoolSize;
@@ -131,9 +131,9 @@ namespace System.ServiceModel.Configuration
                        ReaderQuotas.CopyFrom (b.ReaderQuotas);
                }
 
-               protected internal override void InitializeFrom (BindingElement element)
+               protected internal override void InitializeFrom (BindingElement bindingElement)
                {
-                       var b = (BinaryMessageEncodingBindingElement) element;
+                       var b = (BinaryMessageEncodingBindingElement) bindingElement;
                        MaxReadPoolSize = b.MaxReadPoolSize;
                        MaxSessionSize = b.MaxSessionSize;
                        MaxWritePoolSize = b.MaxWritePoolSize;
index 1b17fc25e3f4ea4e258d62df557ea50204009deb..8d0846419766dfca96d8ace9a4a0d03bdcbfa551 100644 (file)
@@ -165,12 +165,12 @@ namespace System.ServiceModel.Configuration
                        return sm.Bindings;
                }
 
-               public new BindingCollectionElement this [string name] {
+               public new BindingCollectionElement this [string binding] {
                        get {
-                               object element = base [name];
+                               object element = base [binding];
                                if (element is BindingCollectionElement)
                                        return (BindingCollectionElement) element;
-                               throw new NotImplementedException (String.Format ("Could not find {0}", name));
+                               throw new NotImplementedException (String.Format ("Could not find {0}", binding));
                        }
                }
 
index 9b1300e425db27c1330018df3831cadf24c51cce..b2460ce48a9e43f529c4d522a7e0437b5d258e23 100644 (file)
@@ -147,21 +147,21 @@ namespace System.ServiceModel.Configuration
                        return cb;
                }
 
-               protected internal void ApplyConfiguration (ClientCredentials cb)
+               protected internal void ApplyConfiguration (ClientCredentials behavior)
                {
-                       cb.SupportInteractive = SupportInteractive;
+                       behavior.SupportInteractive = SupportInteractive;
                        // how is "Type" used?
 
                        // ClientCertificate
                        if (!String.IsNullOrEmpty (ClientCertificate.FindValue))
-                               cb.ClientCertificate.SetCertificate (ClientCertificate.StoreLocation, ClientCertificate.StoreName, ClientCertificate.X509FindType, ClientCertificate.FindValue);
+                               behavior.ClientCertificate.SetCertificate (ClientCertificate.StoreLocation, ClientCertificate.StoreName, ClientCertificate.X509FindType, ClientCertificate.FindValue);
 
                        // HttpDigest
                        if (HttpDigest.ImpersonationLevel != TokenImpersonationLevel.None)
                                throw new NotImplementedException ();
 
                        // IssuedToken
-                       var bi = cb.IssuedToken;
+                       var bi = behavior.IssuedToken;
                        var ci = IssuedToken;
                        bi.CacheIssuedTokens = ci.CacheIssuedTokens;
                        bi.DefaultKeyEntropyMode = ci.DefaultKeyEntropyMode;
@@ -174,19 +174,19 @@ namespace System.ServiceModel.Configuration
 
                        // Peer
                        if (!String.IsNullOrEmpty (Peer.Certificate.FindValue))
-                               cb.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
+                               behavior.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
                        // cb.Peer.MeshPassword = /* cannot fill it here */
-                       cb.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
-                       cb.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
-                       cb.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
-                       cb.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
-                       cb.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
-                       cb.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
-                       cb.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
-                       cb.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
+                       behavior.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
+                       behavior.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
+                       behavior.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
+                       behavior.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
+                       behavior.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
+                       behavior.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
+                       behavior.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
+                       behavior.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
 
                        // ServiceCertificate
-                       var bsc = cb.ServiceCertificate;
+                       var bsc = behavior.ServiceCertificate;
                        var csc = ServiceCertificate;
                        var bsca = bsc.Authentication;
                        var csca = csc.Authentication;
@@ -202,8 +202,8 @@ namespace System.ServiceModel.Configuration
                        // cb.UserNamePassword : not configurable ...
 
                        // Windows
-                       cb.Windows.AllowedImpersonationLevel = Windows.AllowedImpersonationLevel;
-                       cb.Windows.AllowNtlm = Windows.AllowNtlm;
+                       behavior.Windows.AllowedImpersonationLevel = Windows.AllowedImpersonationLevel;
+                       behavior.Windows.AllowNtlm = Windows.AllowNtlm;
                }
 
                object CreateInstance (string typeName)
index 41220685f8a117be360ec6228b90ea760877d244..ff1c1441357e7edfd08da089a5377610783de6ba 100644 (file)
@@ -150,9 +150,9 @@ namespace System.ServiceModel.Configuration
                        return new ReliableSessionBindingElement ();
                }
 
-               public override void ApplyConfiguration (BindingElement element)
+               public override void ApplyConfiguration (BindingElement bindingElement)
                {
-                       var b = (ReliableSessionBindingElement) element;
+                       var b = (ReliableSessionBindingElement) bindingElement;
                        b.AcknowledgementInterval = AcknowledgementInterval;
                        b.FlowControlEnabled = FlowControlEnabled;
                        b.InactivityTimeout = InactivityTimeout;
@@ -163,9 +163,9 @@ namespace System.ServiceModel.Configuration
                        b.ReliableMessagingVersion = ReliableMessagingVersion;
                }
 
-               public override void CopyFrom (ServiceModelExtensionElement element)
+               public override void CopyFrom (ServiceModelExtensionElement from)
                {
-                       var b = (ReliableSessionElement) element;
+                       var b = (ReliableSessionElement) from;
                        AcknowledgementInterval = b.AcknowledgementInterval;
                        FlowControlEnabled = b.FlowControlEnabled;
                        InactivityTimeout = b.InactivityTimeout;
@@ -176,9 +176,9 @@ namespace System.ServiceModel.Configuration
                        ReliableMessagingVersion = b.ReliableMessagingVersion;
                }
 
-               protected internal override void InitializeFrom (BindingElement element)
+               protected internal override void InitializeFrom (BindingElement bindingElement)
                {
-                       var b = (ReliableSessionBindingElement) element;
+                       var b = (ReliableSessionBindingElement) bindingElement;
                        AcknowledgementInterval = b.AcknowledgementInterval;
                        FlowControlEnabled = b.FlowControlEnabled;
                        InactivityTimeout = b.InactivityTimeout;
index 9830a57ce690035aa64e9ff8a25f38117ebc67e5..498103508ced18adff08b18e71151da9cc2c235c 100644 (file)
@@ -132,57 +132,57 @@ namespace System.ServiceModel.Configuration
                        return sb;
                }
 
-               protected internal void ApplyConfiguration (ServiceCredentials sb)
+               protected internal void ApplyConfiguration (ServiceCredentials behavior)
                {
                        // IssuedToken
                        foreach (AllowedAudienceUriElement ae in IssuedTokenAuthentication.AllowedAudienceUris)
-                               sb.IssuedTokenAuthentication.AllowedAudienceUris.Add (ae.AllowedAudienceUri);
-                       sb.IssuedTokenAuthentication.AllowUntrustedRsaIssuers = IssuedTokenAuthentication.AllowUntrustedRsaIssuers;
-                       sb.IssuedTokenAuthentication.AudienceUriMode = IssuedTokenAuthentication.AudienceUriMode;
+                               behavior.IssuedTokenAuthentication.AllowedAudienceUris.Add (ae.AllowedAudienceUri);
+                       behavior.IssuedTokenAuthentication.AllowUntrustedRsaIssuers = IssuedTokenAuthentication.AllowUntrustedRsaIssuers;
+                       behavior.IssuedTokenAuthentication.AudienceUriMode = IssuedTokenAuthentication.AudienceUriMode;
 
                        if (!String.IsNullOrEmpty (IssuedTokenAuthentication.CustomCertificateValidatorType))
-                       sb.IssuedTokenAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (IssuedTokenAuthentication.CustomCertificateValidatorType);
-                       sb.IssuedTokenAuthentication.CertificateValidationMode = IssuedTokenAuthentication.CertificateValidationMode;
-                       sb.IssuedTokenAuthentication.RevocationMode = IssuedTokenAuthentication.RevocationMode;
-                       sb.IssuedTokenAuthentication.TrustedStoreLocation = IssuedTokenAuthentication.TrustedStoreLocation;
+                       behavior.IssuedTokenAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (IssuedTokenAuthentication.CustomCertificateValidatorType);
+                       behavior.IssuedTokenAuthentication.CertificateValidationMode = IssuedTokenAuthentication.CertificateValidationMode;
+                       behavior.IssuedTokenAuthentication.RevocationMode = IssuedTokenAuthentication.RevocationMode;
+                       behavior.IssuedTokenAuthentication.TrustedStoreLocation = IssuedTokenAuthentication.TrustedStoreLocation;
                        foreach (X509CertificateTrustedIssuerElement ce in IssuedTokenAuthentication.KnownCertificates)
-                               sb.IssuedTokenAuthentication.KnownCertificates.Add (GetCertificate (ce.StoreLocation, ce.StoreName, ce.X509FindType, ce.FindValue));
+                               behavior.IssuedTokenAuthentication.KnownCertificates.Add (GetCertificate (ce.StoreLocation, ce.StoreName, ce.X509FindType, ce.FindValue));
 
-                       sb.IssuedTokenAuthentication.SamlSerializer = (SamlSerializer) CreateInstance (IssuedTokenAuthentication.SamlSerializerType);
+                       behavior.IssuedTokenAuthentication.SamlSerializer = (SamlSerializer) CreateInstance (IssuedTokenAuthentication.SamlSerializerType);
 
 
                        // Peer
                        if (!String.IsNullOrEmpty (Peer.Certificate.FindValue))
-                               sb.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
+                               behavior.Peer.SetCertificate (Peer.Certificate.StoreLocation, Peer.Certificate.StoreName, Peer.Certificate.X509FindType, Peer.Certificate.FindValue);
                        // sb.Peer.MeshPassword = /* cannot fill it here */
-                       sb.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
-                       sb.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
-                       sb.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
-                       sb.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
-                       sb.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
-                       sb.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
-                       sb.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
-                       sb.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
+                       behavior.Peer.MessageSenderAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.MessageSenderAuthentication.CustomCertificateValidatorType);
+                       behavior.Peer.MessageSenderAuthentication.CertificateValidationMode = Peer.MessageSenderAuthentication.CertificateValidationMode;
+                       behavior.Peer.MessageSenderAuthentication.RevocationMode = Peer.MessageSenderAuthentication.RevocationMode;
+                       behavior.Peer.MessageSenderAuthentication.TrustedStoreLocation = Peer.MessageSenderAuthentication.TrustedStoreLocation;
+                       behavior.Peer.PeerAuthentication.CustomCertificateValidator = (X509CertificateValidator) CreateInstance (Peer.PeerAuthentication.CustomCertificateValidatorType);
+                       behavior.Peer.PeerAuthentication.CertificateValidationMode = Peer.PeerAuthentication.CertificateValidationMode;
+                       behavior.Peer.PeerAuthentication.RevocationMode = Peer.PeerAuthentication.RevocationMode;
+                       behavior.Peer.PeerAuthentication.TrustedStoreLocation = Peer.PeerAuthentication.TrustedStoreLocation;
 
                        // WSSC
-                       sb.SecureConversationAuthentication.SecurityStateEncoder = (SecurityStateEncoder) CreateInstance (SecureConversationAuthentication.SecurityStateEncoderType);
+                       behavior.SecureConversationAuthentication.SecurityStateEncoder = (SecurityStateEncoder) CreateInstance (SecureConversationAuthentication.SecurityStateEncoderType);
 
                        // X509
                        if (!String.IsNullOrEmpty (ServiceCertificate.FindValue))
-                               sb.ServiceCertificate.SetCertificate (ServiceCertificate.StoreLocation, ServiceCertificate.StoreName, ServiceCertificate.X509FindType, ServiceCertificate.FindValue);
+                               behavior.ServiceCertificate.SetCertificate (ServiceCertificate.StoreLocation, ServiceCertificate.StoreName, ServiceCertificate.X509FindType, ServiceCertificate.FindValue);
 
                        // UserNamePassword
-                       sb.UserNameAuthentication.CachedLogonTokenLifetime = UserNameAuthentication.CachedLogonTokenLifetime;
-                       sb.UserNameAuthentication.CacheLogonTokens = UserNameAuthentication.CacheLogonTokens;
-                       sb.UserNameAuthentication.CustomUserNamePasswordValidator = (UserNamePasswordValidator) CreateInstance (UserNameAuthentication.CustomUserNamePasswordValidatorType);
-                       sb.UserNameAuthentication.IncludeWindowsGroups = UserNameAuthentication.IncludeWindowsGroups;
-                       sb.UserNameAuthentication.MaxCachedLogonTokens = UserNameAuthentication.MaxCachedLogonTokens;
-                       sb.UserNameAuthentication.MembershipProvider = (MembershipProvider) CreateInstance (UserNameAuthentication.MembershipProviderName);
-                       sb.UserNameAuthentication.UserNamePasswordValidationMode = UserNameAuthentication.UserNamePasswordValidationMode;
+                       behavior.UserNameAuthentication.CachedLogonTokenLifetime = UserNameAuthentication.CachedLogonTokenLifetime;
+                       behavior.UserNameAuthentication.CacheLogonTokens = UserNameAuthentication.CacheLogonTokens;
+                       behavior.UserNameAuthentication.CustomUserNamePasswordValidator = (UserNamePasswordValidator) CreateInstance (UserNameAuthentication.CustomUserNamePasswordValidatorType);
+                       behavior.UserNameAuthentication.IncludeWindowsGroups = UserNameAuthentication.IncludeWindowsGroups;
+                       behavior.UserNameAuthentication.MaxCachedLogonTokens = UserNameAuthentication.MaxCachedLogonTokens;
+                       behavior.UserNameAuthentication.MembershipProvider = (MembershipProvider) CreateInstance (UserNameAuthentication.MembershipProviderName);
+                       behavior.UserNameAuthentication.UserNamePasswordValidationMode = UserNameAuthentication.UserNamePasswordValidationMode;
 
                        // Windows
-                       sb.WindowsAuthentication.AllowAnonymousLogons = WindowsAuthentication.AllowAnonymousLogons;
-                       sb.WindowsAuthentication.IncludeWindowsGroups = WindowsAuthentication.IncludeWindowsGroups;
+                       behavior.WindowsAuthentication.AllowAnonymousLogons = WindowsAuthentication.AllowAnonymousLogons;
+                       behavior.WindowsAuthentication.IncludeWindowsGroups = WindowsAuthentication.IncludeWindowsGroups;
                }
 
                X509Certificate2 GetCertificate (StoreLocation storeLocation, StoreName storeName, X509FindType findType, object findValue)
index 6de08d8d9015275a143dce8bd75ab8519c32d1a9..4dfa45e011d4d2f7f588a9f0d4ecab8fe93df733 100644 (file)
@@ -94,19 +94,19 @@ namespace System.ServiceModel.Configuration
                        return (ConfigurationElement) Activator.CreateInstance (typeof (ConfigurationElementType), new object [0]);
                }
 
-               public void CopyTo (ConfigurationElementType [] array, int index)
+               public void CopyTo (ConfigurationElementType [] array, int start)
                {
-                       base.CopyTo (array, index);
+                       base.CopyTo (array, start);
                }
 
-               public int IndexOf (ConfigurationElementType item)
+               public int IndexOf (ConfigurationElementType element)
                {
-                       return BaseIndexOf (item);
+                       return BaseIndexOf (element);
                }
 
-               public void Remove (ConfigurationElementType item)
+               public void Remove (ConfigurationElementType element)
                {
-                       BaseRemove (GetElementKey (item));
+                       BaseRemove (GetElementKey (element));
                }
 
                public void RemoveAt (int index)
@@ -114,9 +114,9 @@ namespace System.ServiceModel.Configuration
                        BaseRemoveAt (index);
                }
 
-               public void RemoveAt (object index)
+               public void RemoveAt (object key)
                {
-                       BaseRemove (index);
+                       BaseRemove (key);
                }
        }
 }
index 45b4b753ba6caa04d7c60b656f725116f9bdfe84..a2bf4f649e8aa15ebfe7e9178ca6b7357cbf5a4e 100644 (file)
@@ -92,10 +92,10 @@ namespace System.ServiceModel.Configuration
 
                // Methods
 
-               public void ApplyConfiguration (OptionalReliableSession s)
+               public void ApplyConfiguration (OptionalReliableSession optionalReliableSession)
                {
-                       base.ApplyConfiguration (s);
-                       s.Enabled = this.Enabled;
+                       base.ApplyConfiguration (optionalReliableSession);
+                       optionalReliableSession.Enabled = this.Enabled;
                }
        }
 
index 08d4aaa59a562ac8232857031d454e69f4a10895..6a06b7375b65a6e37e42b8a7d61ba48c80e0eeec 100644 (file)
@@ -115,10 +115,10 @@ namespace System.ServiceModel.Configuration
 
                // Methods
 
-               public void ApplyConfiguration (ReliableSession s)
+               public void ApplyConfiguration (ReliableSession reliableSession)
                {
-                       s.InactivityTimeout = InactivityTimeout;
-                       s.Ordered = Ordered;
+                       reliableSession.InactivityTimeout = InactivityTimeout;
+                       reliableSession.Ordered = Ordered;
                }
        }
 
index 559481da6b7486efc75c5e69f4a4e66738f0d10f..fe3a6ff11522ba76a13035eec8899686634aa98e 100644 (file)
@@ -114,11 +114,11 @@ namespace System.ServiceModel.Configuration
 
                protected abstract void OnApplyConfiguration (ServiceEndpoint endpoint, ChannelEndpointElement channelEndpointElement);
 
-               protected abstract void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement channelEndpointElement);
+               protected abstract void OnApplyConfiguration (ServiceEndpoint endpoint, ServiceEndpointElement serviceEndpointElement);
 
                protected abstract void OnInitializeAndValidate (ChannelEndpointElement channelEndpointElement);
 
-               protected abstract void OnInitializeAndValidate (ServiceEndpointElement channelEndpointElement);
+               protected abstract void OnInitializeAndValidate (ServiceEndpointElement serviceEndpointElement);
 
                protected override void Reset (ConfigurationElement parentElement)
                {
index 2a82a49ac5fa32fd1526b9a655671005dac034aa..aa38ecda1a570556bfd35b5f1d67174697b492ef 100644 (file)
@@ -109,12 +109,12 @@ namespace System.ServiceModel.Configuration
                        return sm.StandardEndpoints;
                }
 
-               public new EndpointCollectionElement this [string name] {
+               public new EndpointCollectionElement this [string endpoint] {
                        get {
-                               object element = base [name];
+                               object element = base [endpoint];
                                if (element is EndpointCollectionElement)
                                        return (EndpointCollectionElement) element;
-                               throw new ArgumentException (String.Format ("Could not find {0}", name));
+                               throw new ArgumentException (String.Format ("Could not find {0}", endpoint));
                        }
                }
 
index 56cfdc76f564e9d92e8430cc4de23c341c931041..2aa626e6186ea28ab23d3b3f290417cc64e3fb7c 100644 (file)
@@ -124,9 +124,9 @@ namespace System.ServiceModel.Configuration
                }
 
 
-               public override void ApplyConfiguration (BindingElement element)
+               public override void ApplyConfiguration (BindingElement bindingElement)
                {
-                       var b = (TextMessageEncodingBindingElement) element;
+                       var b = (TextMessageEncodingBindingElement) bindingElement;
                        b.MaxReadPoolSize = MaxReadPoolSize;
                        b.MaxWritePoolSize = MaxWritePoolSize;
                        b.MessageVersion = MessageVersion;
@@ -135,9 +135,9 @@ namespace System.ServiceModel.Configuration
                        ReaderQuotas.ApplyConfiguration (b.ReaderQuotas);
                }
 
-               public override void CopyFrom (ServiceModelExtensionElement element)
+               public override void CopyFrom (ServiceModelExtensionElement from)
                {
-                       var b = (TextMessageEncodingElement) element;
+                       var b = (TextMessageEncodingElement) from;
                        MaxReadPoolSize = b.MaxReadPoolSize;
                        MaxWritePoolSize = b.MaxWritePoolSize;
                        MessageVersion = b.MessageVersion;
@@ -146,9 +146,9 @@ namespace System.ServiceModel.Configuration
                        ReaderQuotas.CopyFrom (b.ReaderQuotas);
                }
 
-               protected internal override void InitializeFrom (BindingElement element)
+               protected internal override void InitializeFrom (BindingElement bindingElement)
                {
-                       var b = (TextMessageEncodingBindingElement) element;
+                       var b = (TextMessageEncodingBindingElement) bindingElement;
                        MaxReadPoolSize = b.MaxReadPoolSize;
                        MaxWritePoolSize = b.MaxWritePoolSize;
                        MessageVersion = b.MessageVersion;
index b77c331a401d92f025b6d16541b7c380626da090..11f9991a60f30c72cddfb6e1dbaa3d743e2b8d73 100644 (file)
@@ -40,20 +40,20 @@ namespace System.ServiceModel.Description
                {
                }
 
-               public FaultDescription Find (string name)
+               public FaultDescription Find (string action)
                {
                        foreach (FaultDescription d in this)
-                               if (d.Name == name)
+                               if (d.Name == action)
                                        return d;
                        return null;
                }
 
-               public Collection<FaultDescription> FindAll (string name)
+               public Collection<FaultDescription> FindAll (string action)
                {
                        Collection<FaultDescription> ret =
                                new Collection<FaultDescription> ();
                        foreach (FaultDescription d in this)
-                               if (d.Name == name)
+                               if (d.Name == action)
                                        ret.Add (d);
                        return ret;
                }
index 39103884b408e6de2789d802f0229ab2dfacd719..fb16e0a9a4870b9ac6e59556d1b61251347a261c 100644 (file)
@@ -35,17 +35,17 @@ namespace System.ServiceModel.Description
        public interface IServiceBehavior
        {
                void AddBindingParameters (
-                       ServiceDescription description,
+                       ServiceDescription serviceDescription,
                        ServiceHostBase serviceHostBase,
                        Collection<ServiceEndpoint> endpoints,
-                       BindingParameterCollection parameters);
+                       BindingParameterCollection bindingParameters);
 
                void ApplyDispatchBehavior (
-                       ServiceDescription description,
+                       ServiceDescription serviceDescription,
                        ServiceHostBase serviceHostBase);
 
                void Validate (
-                       ServiceDescription description,
+                       ServiceDescription serviceDescription,
                        ServiceHostBase serviceHostBase);
        }
 }
index 31374445b0b1a1f4e9cd7b2ec99bd6934882fdec..07a26129c50bfa87ca2924e707cf62b9d8d087c4 100644 (file)
@@ -41,9 +41,9 @@ namespace System.ServiceModel.Description
                        XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy);
 
                void ImportContract (WsdlImporter importer,
-                       WsdlContractConversionContext contractContext);
+                       WsdlContractConversionContext context);
 
                void ImportEndpoint (WsdlImporter importer,
-                       WsdlEndpointConversionContext endpointContext);
+                       WsdlEndpointConversionContext context);
        }
 }
index afa66b942941ba4ccf36a489b91a4511f8e8f8e8..91388a15594210d4caae4bc99fd2e1161f716816 100644 (file)
@@ -57,9 +57,9 @@ namespace System.ServiceModel.Description
                        get { return msg; }
                }
 
-               public override bool Equals (object other)
+               public override bool Equals (object obj)
                {
-                       MetadataConversionError e = other as MetadataConversionError;
+                       MetadataConversionError e = obj as MetadataConversionError;
                        return e != null &&
                                e.warning == warning &&
                                e.msg == msg;
index 274a2be62be773633fde11e04d6763c3161419a5..018250f4b9e20c270814a36bedf3f84ffbb9fc36 100644 (file)
@@ -53,7 +53,7 @@ namespace System.ServiceModel.Description
                        ServiceContractGenerationContext contract,
                        OperationDescription operation,
                        CodeTypeDeclaration declaringType,
-                       CodeMemberMethod method,
+                       CodeMemberMethod syncMethod,
                        CodeMemberMethod beginMethod,
                        CodeMemberMethod endMethod)
                {
@@ -61,7 +61,7 @@ namespace System.ServiceModel.Description
                        this.contract = contract;
                        this.operation = operation;
                        declaring_type = declaringType;
-                       this.method = method;
+                       this.method = syncMethod;
                        this.begin_method = beginMethod;
                        this.end_method = endMethod;
                }
index 60d03dc17c733a7a23b994fd9ed66e66db128b44..3fb7105f046e7e12f1a469124179e682492e8890 100644 (file)
@@ -41,45 +41,45 @@ namespace System.ServiceModel.Description
                {
                }
 
-               public PolicyAssertionCollection (IEnumerable<XmlElement> list)
-                       : base (new List<XmlElement> (list))
+               public PolicyAssertionCollection (IEnumerable<XmlElement> elements)
+                       : base (new List<XmlElement> (elements))
                {
                }
 
                [MonoTODO]
-               public bool Contains (string name, string ns)
+               public bool Contains (string localName, string namespaceUri)
                {
                        foreach (XmlElement el in this)
-                               if (el.LocalName == name && el.NamespaceURI == ns)
+                               if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
                                        return true;
                        return false;
                }
 
                [MonoTODO]
-               public XmlElement Find (string name, string ns)
+               public XmlElement Find (string localName, string namespaceUri)
                {
                        foreach (XmlElement el in this)
-                               if (el.LocalName == name && el.NamespaceURI == ns)
+                               if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
                                        return el;
                        return null;
                }
 
                [MonoTODO]
-               public Collection<XmlElement> FindAll (string name, string ns)
+               public Collection<XmlElement> FindAll (string localName, string namespaceUri)
                {
                        Collection<XmlElement> ret =
                                new Collection<XmlElement> ();
                        foreach (XmlElement el in this)
-                               if (el.LocalName == name && el.NamespaceURI == ns)
+                               if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
                                        ret.Add (el);
                        return ret;
                }
 
                [MonoTODO]
-               public XmlElement Remove (string name, string ns)
+               public XmlElement Remove (string localName, string namespaceUri)
                {
                        foreach (XmlElement el in this)
-                               if (el.LocalName == name && el.NamespaceURI == ns) {
+                               if (el.LocalName == localName && el.NamespaceURI == namespaceUri) {
                                        Remove (el);
                                        return el;
                                }
@@ -87,9 +87,9 @@ namespace System.ServiceModel.Description
                }
 
                [MonoTODO]
-               public Collection<XmlElement> RemoveAll (string name, string ns)
+               public Collection<XmlElement> RemoveAll (string localName, string namespaceUri)
                {
-                       Collection<XmlElement> list = FindAll (name, ns);
+                       Collection<XmlElement> list = FindAll (localName, namespaceUri);
                        foreach (XmlElement el in list)
                                Remove (el);
                        return list;
index 59f0aa2ce7f4e9fd457e7b6016f79bcfedc62eda..8590c4538c532deab96263dff10a91815823c294 100644 (file)
@@ -111,23 +111,23 @@ namespace System.ServiceModel.Description
                {
                }
 
-               public ServiceContractGenerator (CodeCompileUnit ccu)
-                       : this (ccu, null)
+               public ServiceContractGenerator (CodeCompileUnit targetCompileUnit)
+                       : this (targetCompileUnit, null)
                {
                }
 
-               public ServiceContractGenerator (ConfigurationType config)
-                       : this (null, config)
+               public ServiceContractGenerator (ConfigurationType targetConfig)
+                       : this (null, targetConfig)
                {
                }
 
-               public ServiceContractGenerator (CodeCompileUnit ccu, ConfigurationType config)
+               public ServiceContractGenerator (CodeCompileUnit targetCompileUnit, ConfigurationType targetConfig)
                {
-                       if (ccu == null)
+                       if (targetCompileUnit == null)
                                this.ccu = new CodeCompileUnit ();
                        else
-                               this.ccu = ccu;
-                       this.config = config;
+                               this.ccu = targetCompileUnit;
+                       this.config = targetConfig;
                        Options |= ServiceContractGenerationOptions.ChannelInterface | 
                                ServiceContractGenerationOptions.ClientClass;
                }
index 4235e393b8a89b489410fa67a541f53435db877c..5b6caccb2c20e38db25c6cf5a42c9fc68ebe9c10 100644 (file)
@@ -81,30 +81,30 @@ namespace System.ServiceModel.Description
                        set { service_type = value; }
                }
 
-               public static ServiceDescription GetService (Type type)
+               public static ServiceDescription GetService (Type serviceType)
                {
                        // null Type is not rejected
                        ServiceDescription sd = new ServiceDescription ();
-                       sd.ServiceType = type;
-                       if (type != null) {
-                               var att = type.GetCustomAttribute<ServiceBehaviorAttribute> (true);
+                       sd.ServiceType = serviceType;
+                       if (serviceType != null) {
+                               var att = serviceType.GetCustomAttribute<ServiceBehaviorAttribute> (true);
                                if (att != null) {
                                        sd.Name = att.Name;
                                        sd.Namespace = att.Namespace;
                                }
                                if (sd.Name == null)
-                                       sd.Name = type.Name;
+                                       sd.Name = serviceType.Name;
                                if (sd.Namespace == null)
                                        sd.Namespace = "http://tempuri.org/";
                        }
                        return sd;
                }
 
-               public static ServiceDescription GetService (object wellKnown)
+               public static ServiceDescription GetService (object serviceImplementation)
                {
                        // null instance is not rejected
                        ServiceDescription sd = new ServiceDescription ();
-                       sd.ServiceType = wellKnown != null ? wellKnown.GetType () : null;
+                       sd.ServiceType = serviceImplementation != null ? serviceImplementation.GetType () : null;
                        return sd;
                }
        }
index 191d411ed41c86e21abe97d4709a70aeb911dc9d..6641e62b4da9757f092aa0fbd763d6ccd258f0ac 100644 (file)
@@ -38,27 +38,27 @@ namespace System.ServiceModel.Description
                {
                }
 
-               public ServiceEndpoint Find (Type type)
+               public ServiceEndpoint Find (Type contractType)
                {
                        foreach (ServiceEndpoint e in this)
-                               if (e.Contract.ContractType == type)
+                               if (e.Contract.ContractType == contractType)
                                        return e;
                        return null;
                }
 
-               public ServiceEndpoint Find (Uri uri)
+               public ServiceEndpoint Find (Uri address)
                {
                        foreach (ServiceEndpoint e in this)
-                               if (e.Address.Uri == uri)
+                               if (e.Address.Uri == address)
                                        return e;
                        return null;
                }
 
-               public ServiceEndpoint Find (XmlQualifiedName name)
+               public ServiceEndpoint Find (XmlQualifiedName contractName)
                {
                        foreach (ServiceEndpoint e in this)
-                               if (e.Contract.Name == name.Name &&
-                                       e.Contract.Namespace == name.Namespace)
+                               if (e.Contract.Name == contractName.Name &&
+                                       e.Contract.Namespace == contractName.Namespace)
                                        return e;
                        return null;
                }
@@ -96,13 +96,13 @@ namespace System.ServiceModel.Description
                        return list;
                }
 
-               public Collection<ServiceEndpoint> FindAll (XmlQualifiedName name)
+               public Collection<ServiceEndpoint> FindAll (XmlQualifiedName contractName)
                {
                        Collection<ServiceEndpoint> list =
                                new Collection<ServiceEndpoint> ();
                        foreach (ServiceEndpoint e in this)
-                               if (e.Contract.Name == name.Name &&
-                                   e.Contract.Namespace == name.Namespace)
+                               if (e.Contract.Name == contractName.Name &&
+                                   e.Contract.Namespace == contractName.Namespace)
                                        list.Add (e);
                        return list;
                }
index 153f3713d2e4bcee7ad3605cb75e4e6db9ddf9ff..aff8033dacdd3f22cc962b1fecc0036adac2a28d 100644 (file)
@@ -73,50 +73,50 @@ namespace System.ServiceModel.Description
                }
 
                public static TypedMessageConverter Create (
-                       Type type, string action)
+                       Type messageContract, string action)
                {
-                       return Create (type, action, TempUri);
+                       return Create (messageContract, action, TempUri);
                }
 
                public static TypedMessageConverter Create (
-                       Type type, string action,
+                       Type messageContract, string action,
                        string defaultNamespace)
                {
-                       return Create (type, action, defaultNamespace, (DataContractFormatAttribute)null);
+                       return Create (messageContract, action, defaultNamespace, (DataContractFormatAttribute)null);
                }
 
                public static TypedMessageConverter Create (
-                       Type type, string action,
+                       Type messageContract, string action,
                        DataContractFormatAttribute formatterAttribute)
                {
-                       return Create (type, action, TempUri, formatterAttribute);
+                       return Create (messageContract, action, TempUri, formatterAttribute);
                }
 
                public static TypedMessageConverter Create (
-                       Type type,
+                       Type messageContract,
                        string action, string defaultNamespace,
                        DataContractFormatAttribute formatterAttribute)
                {
                        return new DefaultTypedMessageConverter (
                                new DataContractMessagesFormatter (
-                                       MessageContractToMessagesDescription (type, defaultNamespace, action),
+                                       MessageContractToMessagesDescription (messageContract, defaultNamespace, action),
                                        formatterAttribute));
                }
 
                public static TypedMessageConverter Create (
-                       Type type, string action,
+                       Type messageContract, string action,
                        XmlSerializerFormatAttribute formatterAttribute)
                {
-                       return Create (type, action, TempUri, formatterAttribute);
+                       return Create (messageContract, action, TempUri, formatterAttribute);
                }
 
                public static TypedMessageConverter Create (
-                       Type type, string action, string defaultNamespace,
+                       Type messageContract, string action, string defaultNamespace,
                        XmlSerializerFormatAttribute formatterAttribute)
                {
                        return new DefaultTypedMessageConverter (
                                new XmlMessagesFormatter (
-                                       MessageContractToMessagesDescription (type, defaultNamespace, action),
+                                       MessageContractToMessagesDescription (messageContract, defaultNamespace, action),
                                        formatterAttribute));
                }
 
index da253dd1e955feb176377b7cdde0bd83369401e0..b604d64c8ecfb84f1d2630973267987e50d6cb3a 100644 (file)
@@ -76,7 +76,7 @@ namespace System.ServiceModel.Description
                }
 
                public MessageDescription GetMessageDescription (
-                       MessageBinding message)
+                       MessageBinding messageBinding)
                {
                        throw new NotImplementedException ();
                }
@@ -88,7 +88,7 @@ namespace System.ServiceModel.Description
                }
 
                public OperationDescription GetOperationDescription (
-                       OperationBinding operation)
+                       OperationBinding operationBinding)
                {
                        throw new NotImplementedException ();
                }
index be5e051ff47524fa6ac28485f5baaa1836fa7e1a..a1ceff80101413176fcbd12990cfc34cdda04767 100644 (file)
@@ -441,12 +441,12 @@ namespace System.ServiceModel.Description
 
                public void ExportEndpoints (
                        IEnumerable<ServiceEndpoint> endpoints,
-                       XmlQualifiedName name)
+                       XmlQualifiedName wsdlServiceQName)
                {
                        if (endpoints == null)
                                throw new ArgumentNullException ("endpoints");
-                       if (name == null)
-                               throw new ArgumentNullException ("name");
+                       if (wsdlServiceQName == null)
+                               throw new ArgumentNullException ("wsdlServiceQName");
 
                        foreach (ServiceEndpoint ep in endpoints) {
                                if (ep.Contract.Name == ServiceMetadataBehavior.MexContractName)
index 562e02b25d43fd7b718d077cd2a6c23a80d2277b..dd95be31d54ae4331d1bdaf8669e09bb0ef0cb6d 100644 (file)
@@ -153,9 +153,9 @@ namespace System.ServiceModel.Description
                        beforeImportCalled = true;
                }
 
-               public SMBinding ImportBinding (WSBinding binding)
+               public SMBinding ImportBinding (WSBinding wsdlBinding)
                {
-                       return ImportBinding (binding, true).Binding;
+                       return ImportBinding (wsdlBinding, true).Binding;
                }
 
                ServiceEndpoint ImportBinding (WSBinding binding, bool throwOnError)
@@ -546,20 +546,20 @@ namespace System.ServiceModel.Description
                        }
                }
 
-               public ServiceEndpointCollection ImportEndpoints (WSBinding binding)
+               public ServiceEndpointCollection ImportEndpoints (WSBinding wsdlBinding)
                {
                        var coll = new ServiceEndpointCollection ();
-                       ImportEndpoints (coll, binding);
+                       ImportEndpoints (coll, wsdlBinding);
                        return coll;
                }
 
-               public ServiceEndpointCollection ImportEndpoints (PortType portType)
+               public ServiceEndpointCollection ImportEndpoints (PortType wsdlPortType)
                {
                        var coll = new ServiceEndpointCollection ();
 
                        foreach (WSServiceDescription wsd in wsdl_documents) {
                                foreach (WS.Binding binding in wsd.Bindings) {
-                                       if (!binding.Type.Name.Equals (portType.Name))
+                                       if (!binding.Type.Name.Equals (wsdlPortType.Name))
                                                continue;
 
                                        ImportEndpoints (coll, binding);
@@ -569,11 +569,11 @@ namespace System.ServiceModel.Description
                        return coll;
                }
 
-               public ServiceEndpointCollection ImportEndpoints (Service service)
+               public ServiceEndpointCollection ImportEndpoints (Service wsdlService)
                {
                        var coll = new ServiceEndpointCollection ();
                        
-                       foreach (Port port in service.Ports) {
+                       foreach (Port port in wsdlService.Ports) {
                                var sep = ImportEndpoint (port, false);
                                if (sep != null)
                                        coll.Add (sep);
index 26ee9d753d8beec3770a30e0154032b6e7534cc7..6a43f3510e9f1e667ed8fef1600252c7349da942 100644 (file)
@@ -51,13 +51,13 @@ namespace System.ServiceModel.Description
 
                public XmlSerializerOperationBehavior (
                        OperationDescription operation,
-                       XmlSerializerFormatAttribute format)
+                       XmlSerializerFormatAttribute attribute)
                {
                        if (operation == null)
                                throw new ArgumentNullException ("operation");
-                       if (format == null)
-                               format = new XmlSerializerFormatAttribute ();
-                       this.format = format;
+                       if (attribute == null)
+                               attribute = new XmlSerializerFormatAttribute ();
+                       this.format = attribute;
                        this.operation = operation;
                }
 
index 07ecb269b3a6aec28cd0bbf1bbb3303dacd57d6e..714395236747afb0f6bc4cdd8e259565c4a34086 100644 (file)
@@ -70,10 +70,10 @@ namespace System.ServiceModel.Dispatcher {
                        return false;
                }
 
-               public override bool Match (MessageBuffer buffer)
+               public override bool Match (MessageBuffer messageBuffer)
                {
                        bool retval;
-                       Message m = buffer.CreateMessage ();
+                       Message m = messageBuffer.CreateMessage ();
                        retval = Match (m);
                        m.Close ();
                        
index ed5cdd8428ef1d2144d21982ef00848085890a39..72133244baba28e708b9da3a0b19c99d491d0ab6 100644 (file)
@@ -65,6 +65,6 @@ namespace System.ServiceModel.Dispatcher {
                        set { transport_handler = value; }
                }
 
-               public abstract bool HandleException (Exception e);
+               public abstract bool HandleException (Exception exception);
        }
 }
\ No newline at end of file
index faa7b6c0773dd411403867749b50c04bce9f8997..9479897fb0c5a5dafd308d4413643cc7f09c7b6f 100644 (file)
@@ -38,19 +38,19 @@ namespace System.ServiceModel.Dispatcher
                Collection<MessageFilter> filters;
 
                public FilterInvalidBodyAccessException () : base ("Not allowed to navigate to body.") {}
-               public FilterInvalidBodyAccessException (string msg) : base (msg) {}
-               public FilterInvalidBodyAccessException (string msg, Exception inner) : base (msg, inner) {}            
+               public FilterInvalidBodyAccessException (string message) : base (message) {}
+               public FilterInvalidBodyAccessException (string message, Exception innerException) : base (message, innerException) {}          
                protected FilterInvalidBodyAccessException (SerializationInfo info, StreamingContext context)
                        : base (info, context) {}
 
-               public FilterInvalidBodyAccessException (string msg, Collection<MessageFilter> filters)
-                       : base (msg)
+               public FilterInvalidBodyAccessException (string message, Collection<MessageFilter> filters)
+                       : base (message)
                {
                        this.filters = filters;
                }
 
-               public FilterInvalidBodyAccessException (string msg, Exception inner, Collection<MessageFilter> filters)
-                       : base (msg, inner)
+               public FilterInvalidBodyAccessException (string message, Exception innerException, Collection<MessageFilter> filters)
+                       : base (message, innerException)
                {
                        this.filters = filters;
                }
index ca367777b14cca7389dbca13b83d340cb76e5146..b00e94f0428b66808f083685682c24d1de5d3651 100644 (file)
@@ -32,6 +32,6 @@ namespace System.ServiceModel.Dispatcher
        public interface IDispatchMessageFormatter
        {
                void DeserializeRequest (Message message, object [] parameters);
-               Message SerializeReply (MessageVersion version, object [] parameters, object result);
+               Message SerializeReply (MessageVersion messageVersion, object [] parameters, object result);
        }
 }
index b9c278cf08422724d89b7716f6d4296948785f5c..a8fcaac45ef6a92464916f900fb2849cf9c40804 100644 (file)
@@ -32,8 +32,8 @@ namespace System.ServiceModel.Dispatcher
 {
        public interface IDispatchMessageInspector
        {
-               object AfterReceiveRequest (ref Message message,
-                       IClientChannel channel, InstanceContext context);
-               void BeforeSendReply (ref Message message, object instance);
+               object AfterReceiveRequest (ref Message request,
+                       IClientChannel channel, InstanceContext instanceContext);
+               void BeforeSendReply (ref Message reply, object correlationState);
        }
 }
index 04441f07955efb455d0fcee2856348c263dc1ee5..49357ef56863269348a080a839738b7acffb52fe 100644 (file)
@@ -32,6 +32,6 @@ namespace System.ServiceModel.Dispatcher
 {
        public interface IDispatchOperationSelector
        {
-               string SelectOperation (ref Message msg);
+               string SelectOperation (ref Message message);
        }
 }
index f9b2f101b160d737038d595a15a986adebe3e930..9f5e99a6092cf72380f0834e6ed2e02e6a997986 100644 (file)
@@ -31,8 +31,8 @@ namespace System.ServiceModel.Dispatcher
 {
        public interface IErrorHandler
        {
-               bool HandleError (Exception exception);
-               void ProvideFault (Exception exception, MessageVersion version,
+               bool HandleError (Exception error);
+               void ProvideFault (Exception error, MessageVersion version,
                        ref Message fault);
        }
 }
index d3887da87794259b34f4c5d0dd4c5dbd0e68d95b..3d26c75c0970408c2cfa0d3ac78110f81964f79c 100644 (file)
@@ -32,6 +32,6 @@ namespace System.ServiceModel.Dispatcher
 {
        public interface IInstanceContextInitializer
        {
-               void Initialize (InstanceContext context, Message message);
+               void Initialize (InstanceContext instanceContext, Message message);
        }
 }
index eb93926827220c09b572bb64aa8ba8e32baf240f..22ba41ccfbcbc06688303a952306cf1a1b4b16b0 100644 (file)
@@ -31,8 +31,8 @@ namespace System.ServiceModel.Dispatcher
 {
        public interface IInstanceProvider
        {
-               object GetInstance (InstanceContext context);
-               object GetInstance (InstanceContext context, Message message);
-               void ReleaseInstance (InstanceContext context, object instance);
+               object GetInstance (InstanceContext instanceContext);
+               object GetInstance (InstanceContext instanceContext, Message message);
+               void ReleaseInstance (InstanceContext instanceContext, object instance);
        }
 }
index 5e185ac55b3899221f1d6415d8ce1b8938887023..6e5967ab6580d3633de8cca60a481a8804062b8d 100644 (file)
@@ -40,16 +40,16 @@ namespace System.ServiceModel.Dispatcher
                  IEnumerable<KeyValuePair<MessageFilter,TFilterData>>,
                  IEnumerable
        {
-               bool GetMatchingFilter (Message message, out MessageFilter result);
-               bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter result);
+               bool GetMatchingFilter (Message message, out MessageFilter filter);
+               bool GetMatchingFilter (MessageBuffer messageBuffer, out MessageFilter filter);
 
                bool GetMatchingFilters (Message message, ICollection<MessageFilter> results);
-               bool GetMatchingFilters (MessageBuffer buffer, ICollection<MessageFilter> results);
+               bool GetMatchingFilters (MessageBuffer messageBuffer, ICollection<MessageFilter> results);
 
-               bool GetMatchingValue (Message message, out TFilterData data);
-               bool GetMatchingValue (MessageBuffer buffer, out TFilterData data);
+               bool GetMatchingValue (Message message, out TFilterData value);
+               bool GetMatchingValue (MessageBuffer messageBuffer, out TFilterData value);
 
                bool GetMatchingValues (Message message, ICollection<TFilterData> results);
-               bool GetMatchingValues (MessageBuffer buffer, ICollection<TFilterData> results);
+               bool GetMatchingValues (MessageBuffer messageBuffer, ICollection<TFilterData> results);
        }
 }
index 9d46d2743b9e1a353970771248a04f54857bd291..ad6a5194a1bbfb31e6099257b922fdd2a6e3be7f 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // InstanceContextIdleCallback.cs
 //
 // Author: Atsushi Enomoto (atsushi@ximian.com)
@@ -28,5 +28,5 @@ using System;
 
 namespace System.ServiceModel.Dispatcher
 {
-       public delegate void InstanceContextIdleCallback (InstanceContext context);
+       public delegate void InstanceContextIdleCallback (InstanceContext instanceContext);
 }
index 2c34c3cd679ec87966115928b9dc2944dfaf84fb..7474906c6d097c1f434d7c25db76f84cd7151ac0 100644 (file)
@@ -34,8 +34,8 @@ namespace System.ServiceModel.Dispatcher
        [Serializable]
        public abstract class InvalidBodyAccessException : SystemException
        {
-               protected InvalidBodyAccessException (string msg) : base (msg) {}
-               protected InvalidBodyAccessException (string msg, Exception inner) : base (msg, inner) {}
+               protected InvalidBodyAccessException (string message) : base (message) {}
+               protected InvalidBodyAccessException (string message, Exception innerException) : base (message, innerException) {}
                protected InvalidBodyAccessException (SerializationInfo info, StreamingContext context)
                        : base (info, context) {}
        }
index 4f0aa6be5ea546d4d8d58c973ee2b8c2a9ce96b9..5b9de5e2f4ab00073d2000e425ec7a24fe510c62 100644 (file)
@@ -44,7 +44,7 @@ namespace System.ServiceModel.Dispatcher
                        return true; 
                }
 
-               public override bool Match (MessageBuffer buffer)
+               public override bool Match (MessageBuffer messageBuffer)
                {
                        // as documented
                        return true; 
index 32721443858f81762591eca6ce5f6f1e27cd4fb8..d0fe3aef8673ce1164e5a03d353e977707d278ad 100644 (file)
@@ -44,7 +44,7 @@ namespace System.ServiceModel.Dispatcher
                        return false; 
                }
 
-               public override bool Match (MessageBuffer buffer)
+               public override bool Match (MessageBuffer messageBuffer)
                {
                        // as documented
                        return false; 
index 50b526a913edc89f2b7b2022fc758cc55c808217..5801ca38919839dc1716ce59eb4db456ccf7b3f1 100644 (file)
@@ -38,19 +38,19 @@ namespace System.ServiceModel.Dispatcher
                Collection<MessageFilter> filters;
 
                public MessageFilterException () : this ("MessageFilter node quota exceeded.") {}
-               public MessageFilterException (string msg) : base (msg) {}
-               public MessageFilterException (string msg, Exception inner) : base (msg, inner) {}              
+               public MessageFilterException (string message) : base (message) {}
+               public MessageFilterException (string message, Exception innerException) : base (message, innerException) {}            
                protected MessageFilterException (SerializationInfo info, StreamingContext context)
                        : base (info, context) {}
 
-               public MessageFilterException (string msg, Collection<MessageFilter> filters)
-                       : base (msg)
+               public MessageFilterException (string message, Collection<MessageFilter> filters)
+                       : base (message)
                {
                        this.filters = filters;
                }
 
-               public MessageFilterException (string msg, Exception inner, Collection<MessageFilter> filters)
-                       : base (msg, inner)
+               public MessageFilterException (string message, Exception innerException, Collection<MessageFilter> filters)
+                       : base (message, innerException)
                {
                        this.filters = filters;
                }
index b0f4021300292bd10deb855efdae037b40924406..e93fb8be4f9bd0d54e53b13b73ac60d217b3cc1d 100644 (file)
@@ -46,9 +46,9 @@ namespace System.ServiceModel.Dispatcher
                public MessageFilterTable ()
                        : this (0) {} // 0 is the default
 
-               public MessageFilterTable (int default_priority)
+               public MessageFilterTable (int defaultPriority)
                {
-                       this.default_priority = default_priority;
+                       this.default_priority = defaultPriority;
                        table = new Dictionary<MessageFilter, TFilterData> ();
                        priority_list = new Dictionary<MessageFilter, int> ();
                }
@@ -85,9 +85,9 @@ namespace System.ServiceModel.Dispatcher
                        return table.ContainsKey (filter);
                }
 
-               public void CopyTo (KeyValuePair<MessageFilter, TFilterData> [] array, int index)
+               public void CopyTo (KeyValuePair<MessageFilter, TFilterData> [] array, int arrayIndex)
                {
-                       ((ICollection) table).CopyTo (array, index);
+                       ((ICollection) table).CopyTo (array, arrayIndex);
                }
 
                protected virtual IMessageFilterTable<TFilterData> CreateFilterTable (MessageFilter filter)
@@ -105,11 +105,11 @@ namespace System.ServiceModel.Dispatcher
                        return priority_list [filter];
                }
 
-               public bool GetMatchingFilter (Message message, out MessageFilter result)
+               public bool GetMatchingFilter (Message message, out MessageFilter filter)
                {
                        if (message == null)
                                throw new ArgumentNullException ("message is null");
-                       result = null;
+                       filter = null;
 
                        int count = 0;
                        foreach (MessageFilter f in table.Keys) {
@@ -121,14 +121,14 @@ namespace System.ServiceModel.Dispatcher
                                            "More than one filter matches.");
 
                                count++;
-                               result = f;
+                               filter = f;
                        }
                        return count == 1;
                }
 
-               public bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter result)
+               public bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter filter)
                {
-                       return GetMatchingFilter (buffer.CreateMessage (), out result);
+                       return GetMatchingFilter (buffer.CreateMessage (), out filter);
                }
 
                [MonoTODO ("Consider priority")]                
index b33c0fdca294da28bf2aec5939c5e5f4f6e073e6..9f8caadeb9b435900d729cfce93daffa09609c31 100644 (file)
@@ -38,19 +38,19 @@ namespace System.ServiceModel.Dispatcher
                Collection<MessageFilter> filters;
 
                public MultipleFilterMatchesException () : base () {}
-               public MultipleFilterMatchesException (string msg) : base (msg) {}
-               public MultipleFilterMatchesException (string msg, Exception inner) : base (msg, inner) {}              
+               public MultipleFilterMatchesException (string message) : base (message) {}
+               public MultipleFilterMatchesException (string message, Exception innerException) : base (message, innerException) {}            
                protected MultipleFilterMatchesException (SerializationInfo info, StreamingContext context)
                        : base (info, context) {}
 
-               public MultipleFilterMatchesException (string msg, Collection<MessageFilter> filters)
-                       : base (msg)
+               public MultipleFilterMatchesException (string message, Collection<MessageFilter> filters)
+                       : base (message)
                {
                        this.filters = filters;
                }
 
-               public MultipleFilterMatchesException (string msg, Exception inner, Collection<MessageFilter> filters)
-                       : base (msg, inner)
+               public MultipleFilterMatchesException (string message, Exception innerException, Collection<MessageFilter> filters)
+                       : base (message, innerException)
                {
                        this.filters = filters;
                }
index 08d3b19f6ba622d6113125e643f2fe209c39a6c6..595110a87c276a29e3a2b086418a42b8e4951a4c 100644 (file)
@@ -35,8 +35,8 @@ namespace System.ServiceModel.Dispatcher
        public class NavigatorInvalidBodyAccessException : InvalidBodyAccessException
        {
                public NavigatorInvalidBodyAccessException () : base ("Not allowed to navigate to body.") {}
-               public NavigatorInvalidBodyAccessException (string msg) : base (msg) {}
-               public NavigatorInvalidBodyAccessException (string msg, Exception inner) : base (msg, inner) {}
+               public NavigatorInvalidBodyAccessException (string message) : base (message) {}
+               public NavigatorInvalidBodyAccessException (string message, Exception innerException) : base (message, innerException) {}
                protected NavigatorInvalidBodyAccessException (SerializationInfo info, StreamingContext context)
                        : base (info, context) {}
        }
index cac0bf91116dfbf8cd74e6f58893c90769c78ee2..a4f8f2c721a91cdeb077eeb9cdc92c65a4774143 100644 (file)
@@ -36,12 +36,12 @@ namespace System.ServiceModel.Dispatcher
        {
                protected SeekableXPathNavigator () {}
 
-               public abstract XmlNodeOrder ComparePosition (long first, long second);
-               public abstract string GetLocalName (long node_position);
-               public abstract string GetName (long node_position);
-               public abstract string GetNamespace (long node_position);
-               public abstract XPathNodeType GetNodeType (long node_position);
-               public abstract string GetValue (long node_position);
+               public abstract XmlNodeOrder ComparePosition (long firstPosition, long secondPosition);
+               public abstract string GetLocalName (long nodePosition);
+               public abstract string GetName (long nodePosition);
+               public abstract string GetNamespace (long nodePosition);
+               public abstract XPathNodeType GetNodeType (long nodePosition);
+               public abstract string GetValue (long nodePosition);
 
                public abstract long CurrentPosition { get; set; }
        }
index 3bef60dc7cf8b33c4a41ce81b6d17ce60baebdab..302facfca815b83b1737ec7e030db4cb223bba42 100644 (file)
@@ -41,8 +41,8 @@ namespace System.ServiceModel.Dispatcher
                {
                }
 
-               public XPathMessageContext (NameTable nameTable)
-                       : base (nameTable)
+               public XPathMessageContext (NameTable table)
+                       : base (table)
                {
                        AddNamespace ("s11", Constants.Soap11);
                        AddNamespace ("s12", Constants.Soap12);
@@ -52,9 +52,9 @@ namespace System.ServiceModel.Dispatcher
                        get { return false; } // as documented.
                }
 
-               public override int CompareDocument (string uri1, string uri2)
+               public override int CompareDocument (string baseUri, string nextBaseUri)
                {
-                       return String.CompareOrdinal (uri1, uri2);
+                       return String.CompareOrdinal (baseUri, nextBaseUri);
                }
 
                public override bool PreserveWhitespace (XPathNavigator node)
index 17a612b62a1bdc3c6ee19c0b6be4ab2603a3e8e0..658a5d1ed05377b507747c963e24d1caaafd7c70 100644 (file)
@@ -68,9 +68,9 @@ namespace System.ServiceModel.Dispatcher
                        Initialize (xpath, namespaces);
                }
 
-               public XPathMessageFilter (string xpath, XsltContext namespaces)
+               public XPathMessageFilter (string xpath, XsltContext context)
                {
-                       Initialize (xpath, namespaces);
+                       Initialize (xpath, context);
                }
 
                [MonoTODO]
@@ -86,9 +86,9 @@ namespace System.ServiceModel.Dispatcher
                }
 
                [MonoTODO]
-               public XPathMessageFilter (XmlReader reader, XsltContext namespaces)
+               public XPathMessageFilter (XmlReader reader, XsltContext context)
                {
-                       Initialize (reader.ReadString (), namespaces);
+                       Initialize (reader.ReadString (), context);
                }
 
                private void Initialize (string xpath, XmlNamespaceManager nsmgr)
index 71d7536fd34d95852b8f0af0763bfe1611f25552..f0c72f5de86e0d3a8e954e08c6f781a6d1df21fb 100644 (file)
@@ -55,9 +55,9 @@ namespace System.ServiceModel.Dispatcher
                {
                }
 
-               public XPathMessageFilterTable (int quota)
+               public XPathMessageFilterTable (int capacity)
                {
-                       this.quota = quota;
+                       this.quota = capacity;
                }
 
                [DataMember]
@@ -66,9 +66,9 @@ namespace System.ServiceModel.Dispatcher
                        set { quota = value; }
                }
 
-               public TFilterData this [MessageFilter key] {
-                       get { return dict [key]; }
-                       set { dict [key] = value; }
+               public TFilterData this [MessageFilter filter] {
+                       get { return dict [filter]; }
+                       set { dict [filter] = value; }
                }
 
                public int Count {
@@ -114,17 +114,17 @@ namespace System.ServiceModel.Dispatcher
                                dict [item.Key].Equals (item.Value);
                }
 
-               public bool ContainsKey (MessageFilter key)
+               public bool ContainsKey (MessageFilter filter)
                {
-                       return dict.ContainsKey (key);
+                       return dict.ContainsKey (filter);
                }
 
-               public void CopyTo (KeyValuePair<MessageFilter,TFilterData> [] array, int index)
+               public void CopyTo (KeyValuePair<MessageFilter,TFilterData> [] array, int arrayIndex)
                {
-                       if (index < 0 || dict.Count >= array.Length - index)
-                               throw new ArgumentOutOfRangeException ("index");
+                       if (arrayIndex < 0 || dict.Count >= array.Length - arrayIndex)
+                               throw new ArgumentOutOfRangeException ("arrayIndex");
                        foreach (KeyValuePair<MessageFilter,TFilterData> item in dict)
-                               array [index++] = item;
+                               array [arrayIndex++] = item;
                }
 
                public IEnumerator<KeyValuePair<MessageFilter,TFilterData>> GetEnumerator ()
@@ -137,12 +137,12 @@ namespace System.ServiceModel.Dispatcher
                        return GetEnumerator ();
                }
 
-               public bool GetMatchingFilter (Message message, out MessageFilter result)
+               public bool GetMatchingFilter (Message message, out MessageFilter filter)
                {
                        throw new NotImplementedException ();
                }
 
-               public bool GetMatchingFilter (MessageBuffer buffer, out MessageFilter result)
+               public bool GetMatchingFilter (MessageBuffer messageBuffer, out MessageFilter filter)
                {
                        throw new NotImplementedException ();
                }
@@ -162,7 +162,7 @@ namespace System.ServiceModel.Dispatcher
                        throw new NotImplementedException ();
                }
 
-               public bool GetMatchingFilters (MessageBuffer buffer, ICollection<MessageFilter> results)
+               public bool GetMatchingFilters (MessageBuffer messageBuffer, ICollection<MessageFilter> results)
                {
                        throw new NotImplementedException ();
                }
@@ -182,7 +182,7 @@ namespace System.ServiceModel.Dispatcher
                        throw new NotImplementedException ();
                }
 
-               public bool GetMatchingValue (MessageBuffer buffer, out TFilterData data)
+               public bool GetMatchingValue (MessageBuffer messageBuffer, out TFilterData data)
                {
                        throw new NotImplementedException ();
                }
@@ -202,7 +202,7 @@ namespace System.ServiceModel.Dispatcher
                        throw new NotImplementedException ();
                }
 
-               public bool GetMatchingValues (MessageBuffer buffer, ICollection<TFilterData> results)
+               public bool GetMatchingValues (MessageBuffer messageBuffer, ICollection<TFilterData> results)
                {
                        throw new NotImplementedException ();
                }
index 365a7be5bfe80b1fd42c6bdd511e84a77f542675..b3cd66a6a3b84100488fe031ea6babcacc6d98ea 100644 (file)
@@ -36,9 +36,9 @@ namespace System.ServiceModel.Dispatcher
        public class XPathNavigatorException : XPathException
        {
                public XPathNavigatorException () : this ("Navigator node quota exceeded") {}
-               public XPathNavigatorException (string msg) : base (msg) {}
-               public XPathNavigatorException (string msg, Exception inner)
-                       : base (msg, inner) {}          
+               public XPathNavigatorException (string message) : base (message) {}
+               public XPathNavigatorException (string message, Exception innerException)
+                       : base (message, innerException) {}             
                protected XPathNavigatorException (SerializationInfo info,
                                                            StreamingContext context)
                        : base (info, context) {}
index 654f8550330973a4765650813a586261231cf202..a060cf0f5a8cac66caff65397819677ecec9a7d7 100644 (file)
@@ -29,10 +29,10 @@ namespace System.ServiceModel.PeerResolvers
                {
                }
                
-               public UnregisterInfo (string meshId, Guid registration_id)
+               public UnregisterInfo (string meshId, Guid registrationId)
                {
                        Body.MeshId = meshId;
-                       Body.RegistrationId = registration_id;
+                       Body.RegistrationId = registrationId;
                }
                
                public string MeshId {
index a865639e0b4744285ce77bb8281f43fde67b6221..762e5876baf5fd8978121560c14fab0474490b31 100644 (file)
@@ -61,17 +61,17 @@ namespace System.ServiceModel.Security.Tokens
                        binding = issuerBinding;
                }
 
-               protected IssuedSecurityTokenParameters (IssuedSecurityTokenParameters source)
-                       : base (source)
+               protected IssuedSecurityTokenParameters (IssuedSecurityTokenParameters other)
+                       : base (other)
                {
-                       binding = source.binding;
-                       issuer_address = source.issuer_address;
-                       issuer_meta_address = source.issuer_meta_address;
-                       key_size = source.key_size;
-                       key_type = source.key_type;
-                       token_type = source.token_type;
-                       reqs = new Collection<ClaimTypeRequirement> (source.reqs);
-                       additional_reqs = new Collection<XmlElement> (source.additional_reqs);
+                       binding = other.binding;
+                       issuer_address = other.issuer_address;
+                       issuer_meta_address = other.issuer_meta_address;
+                       key_size = other.key_size;
+                       key_type = other.key_type;
+                       token_type = other.token_type;
+                       reqs = new Collection<ClaimTypeRequirement> (other.reqs);
+                       additional_reqs = new Collection<XmlElement> (other.additional_reqs);
                }
 
                Binding binding;
index 37a82c0123157300da9aedea85c3137d6f6b4f74..9d6a5f0797886b31d4e45a069605b784ef063b63 100644 (file)
@@ -37,8 +37,8 @@ namespace System.ServiceModel.Security.Tokens
                {
                }
 
-               protected KerberosSecurityTokenParameters (KerberosSecurityTokenParameters source)
-                       : base (source)
+               protected KerberosSecurityTokenParameters (KerberosSecurityTokenParameters other)
+                       : base (other)
                {
                }
 
index f0dcdee2cf13a51355968891d5aba1b7f8ebc34a..02e2a7818b5d644f40365cd8a95b099f251a5fab 100644 (file)
@@ -39,8 +39,8 @@ namespace System.ServiceModel.Security.Tokens
                        RequireDerivedKeys = true;
                }
 
-               protected RsaSecurityTokenParameters (RsaSecurityTokenParameters source)
-                       : base (source)
+               protected RsaSecurityTokenParameters (RsaSecurityTokenParameters other)
+                       : base (other)
                {
                }
 
index 41a1376f053884266ff70be148235365855c5d36..16ea4653b1c851c9f280b5c569b9bc2d35af2de9 100644 (file)
@@ -111,11 +111,11 @@ namespace System.ServiceModel.Security.Tokens
                }
 #endif
 
-               protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters source)
-                       : base (source)
+               protected SecureConversationSecurityTokenParameters (SecureConversationSecurityTokenParameters other)
+                       : base (other)
                {
-                       this.element = (SecurityBindingElement) source.element.Clone ();
-                       this.cancellable = source.cancellable;
+                       this.element = (SecurityBindingElement) other.element.Clone ();
+                       this.cancellable = other.cancellable;
 #if !MOBILE && !XAMMAC_4_5
                        this.requirements = new ChannelProtectionRequirements (default_channel_protection_requirements);
 #endif
index 846d8358f519cfd8d0be81db5d058ead9da936fe..3bff55ef9db3d67b1f476261ac9ae491dac9de31 100644 (file)
@@ -200,10 +200,10 @@ namespace System.ServiceModel.Security.Tokens
                        throw new NotSupportedException (String.Format ("X509SecurityToken does not support creation of {0}.", t));
                }
 
-               public override bool MatchesKeyIdentifierClause (SecurityKeyIdentifierClause clause)
+               public override bool MatchesKeyIdentifierClause (SecurityKeyIdentifierClause keyIdentifierClause)
                {
                        SecurityContextKeyIdentifierClause sctic =
-                               clause as SecurityContextKeyIdentifierClause;
+                               keyIdentifierClause as SecurityContextKeyIdentifierClause;
                        return sctic != null && sctic.ContextId == ContextId &&
                               sctic.Generation == KeyGeneration;
                }
index 92bbf9d37f6f57c6d014526a8c07664883f7a075..9eb21fd621c303ddc3a5be88f6a099231590d05f 100644 (file)
@@ -52,11 +52,11 @@ namespace System.ServiceModel.Security.Tokens
                        this.cancel = requireCancellation;
                }
 
-               protected SslSecurityTokenParameters (SslSecurityTokenParameters source)
-                       : base (source)
+               protected SslSecurityTokenParameters (SslSecurityTokenParameters other)
+                       : base (other)
                {
-                       cert = source.cert;
-                       cancel = source.cancel;
+                       cert = other.cert;
+                       cancel = other.cancel;
                }
 
                bool cert, cancel;
index be273ce27e5dcfc2c7ffeaa9143f4cf4fde351db..72e2cb0a92b4eb525ed46f4b7a2277da11f4dc26 100644 (file)
@@ -44,7 +44,7 @@ namespace System.ServiceModel.Security.Tokens
                bool extract_groups, allow_unauth;
 
                [MonoTODO]
-               public SspiSecurityToken (NetworkCredential cred,
+               public SspiSecurityToken (NetworkCredential networkCredential,
                        bool extractGroupsForWindowsAccounts,
                        bool allowUnauthenticatedCallers)
                {
@@ -54,7 +54,7 @@ namespace System.ServiceModel.Security.Tokens
                [MonoTODO]
                public SspiSecurityToken (
                        TokenImpersonationLevel impersonationLevel,
-                       bool allowNtlm, NetworkCredential cred)
+                       bool allowNtlm, NetworkCredential networkCredential)
                {
                        throw new NotImplementedException ();
                }
index 16cf529e431de4ddff06959651061719efcc450a..1efbf1f1cd34a578343d4f63043e446a459574b4 100644 (file)
@@ -47,10 +47,10 @@ namespace System.ServiceModel.Security.Tokens
                        this.cancel = requireCancellation;
                }
 
-               protected SspiSecurityTokenParameters (SspiSecurityTokenParameters source)
-                       : base (source)
+               protected SspiSecurityTokenParameters (SspiSecurityTokenParameters other)
+                       : base (other)
                {
-                       this.cancel = source.cancel;
+                       this.cancel = other.cancel;
                }
 
                public bool RequireCancellation {
index 46f14360654c6e604d775af18b399764511d0e95..c69d8bb2c91ec889e17c02db273a7aee76f135a5 100644 (file)
@@ -40,8 +40,8 @@ namespace System.ServiceModel.Security.Tokens
                        RequireDerivedKeys = false;
                }
 
-               protected UserNameSecurityTokenParameters (UserNameSecurityTokenParameters source)
-                       : base (source)
+               protected UserNameSecurityTokenParameters (UserNameSecurityTokenParameters other)
+                       : base (other)
                {
                }
 
index c02dfd44342c14e30423551e80089277e9f70094..2d2aa06d568e4fdde23a91a7b8b45ee6c3e7fcb4 100644 (file)
@@ -51,10 +51,10 @@ namespace System.ServiceModel.Security.Tokens
                        InclusionMode = inclusionMode;
                }
 
-               protected X509SecurityTokenParameters (X509SecurityTokenParameters source)
-                       : base (source)
+               protected X509SecurityTokenParameters (X509SecurityTokenParameters other)
+                       : base (other)
                {
-                       reference_style = source.reference_style;
+                       reference_style = other.reference_style;
                }
 
                public X509KeyIdentifierClauseType X509ReferenceStyle {
index 17695f1ec289da5d15014570f974e479bf885c7a..7e30915cd66f993ab2e1fe81191e670b8a0d7c67 100644 (file)
@@ -95,14 +95,14 @@ namespace System.ServiceModel.Security
                                header_types = new ReadOnlyCollection<XmlQualifiedName> (header_types);
                }
 
-               public void Union (MessagePartSpecification other)
+               public void Union (MessagePartSpecification specification)
                {
-                       if (other == null)
-                               throw new ArgumentNullException ("other");
+                       if (specification == null)
+                               throw new ArgumentNullException ("specification");
                        if (header_types.IsReadOnly)
                                throw new InvalidOperationException ("This MessagePartSpecification is read-only.");
-                       body |= other.body;
-                       foreach (XmlQualifiedName q in other.header_types)
+                       body |= specification.body;
+                       foreach (XmlQualifiedName q in specification.header_types)
                                // Sigh. It could be much better here.
                                //if (!header_types.Contains (q))
                                        header_types.Add (q);
index d788a5a0b27ca6ace51b87cfb5db8e511483fca2..b747dee7c981d7428739d86dc279c056fa7361fc 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // ServiceCredentialsSecurityTokenManager.cs
 //
 // Author:
@@ -44,9 +44,9 @@ namespace System.ServiceModel.Security
                ServiceCredentials credentials;
 
                public ServiceCredentialsSecurityTokenManager (
-                       ServiceCredentials credentials)
+                       ServiceCredentials parent)
                {
-                       this.credentials = credentials;
+                       this.credentials = parent;
                }
 
                public ServiceCredentials ServiceCredentials {
@@ -55,35 +55,35 @@ namespace System.ServiceModel.Security
 
                [MonoTODO]
                public virtual EndpointIdentity GetIdentityOfSelf (
-                       SecurityTokenRequirement requirement)
+                       SecurityTokenRequirement tokenRequirement)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator (
-                       SecurityTokenRequirement requirement,
+                       SecurityTokenRequirement tokenRequirement,
                        out SecurityTokenResolver outOfBandTokenResolver)
                {
                        outOfBandTokenResolver = null;
-                       if (requirement.TokenType == SecurityTokenTypes.UserName)
-                               return CreateUserNameAuthenticator (requirement);
-                       if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
-                               return CreateX509Authenticator (requirement);
-                       if (requirement.TokenType == SecurityTokenTypes.Rsa)
+                       if (tokenRequirement.TokenType == SecurityTokenTypes.UserName)
+                               return CreateUserNameAuthenticator (tokenRequirement);
+                       if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
+                               return CreateX509Authenticator (tokenRequirement);
+                       if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa)
                                return new RsaSecurityTokenAuthenticator ();
-                       if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation) {
+                       if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation) {
                                SecurityBindingElement binding;
-                               if (!requirement.TryGetProperty<SecurityBindingElement> (ReqType.SecurityBindingElementProperty, out binding))
+                               if (!tokenRequirement.TryGetProperty<SecurityBindingElement> (ReqType.SecurityBindingElementProperty, out binding))
                                        throw new ArgumentException ("SecurityBindingElement is required in the security token requirement");
                                SecureConversationSecurityTokenParameters issuedParams;
-                               if (!requirement.TryGetProperty<SecureConversationSecurityTokenParameters> (ReqType.IssuedSecurityTokenParametersProperty, out issuedParams))
+                               if (!tokenRequirement.TryGetProperty<SecureConversationSecurityTokenParameters> (ReqType.IssuedSecurityTokenParametersProperty, out issuedParams))
                                        throw new ArgumentException ("IssuedSecurityTokenParameters are required in the security token requirement");
                                BindingContext issuerBC;
-                               if (!requirement.TryGetProperty<BindingContext> (ReqType.IssuerBindingContextProperty, out issuerBC))
+                               if (!tokenRequirement.TryGetProperty<BindingContext> (ReqType.IssuerBindingContextProperty, out issuerBC))
                                        throw new ArgumentException ("IssuerBindingContext is required in the security token requirement");
                                SecurityTokenVersion secVer;
-                               if (!requirement.TryGetProperty<SecurityTokenVersion> (ReqType.MessageSecurityVersionProperty, out secVer))
+                               if (!tokenRequirement.TryGetProperty<SecurityTokenVersion> (ReqType.MessageSecurityVersionProperty, out secVer))
                                        throw new ArgumentException ("MessageSecurityVersion property (of type SecurityTokenVersion) is required in the security token requirement");
 
                                // FIXME: get parameters from somewhere
@@ -92,16 +92,16 @@ namespace System.ServiceModel.Security
                                outOfBandTokenResolver = resolver;
                                SecurityContextSecurityTokenAuthenticator sc =
                                        new SecurityContextSecurityTokenAuthenticator ();
-                               return new SecureConversationSecurityTokenAuthenticator (requirement, sc, resolver);
+                               return new SecureConversationSecurityTokenAuthenticator (tokenRequirement, sc, resolver);
                        }
-                       if (requirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego)
-                               return CreateSslTokenAuthenticator (requirement);
-                       if (requirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego)
-                               return CreateSslTokenAuthenticator (requirement);
-                       if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
-                               return CreateSpnegoTokenAuthenticator (requirement);
+                       if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego)
+                               return CreateSslTokenAuthenticator (tokenRequirement);
+                       if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego)
+                               return CreateSslTokenAuthenticator (tokenRequirement);
+                       if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
+                               return CreateSpnegoTokenAuthenticator (tokenRequirement);
                        else
-                               throw new NotImplementedException ("Not implemented token type: " + requirement.TokenType);
+                               throw new NotImplementedException ("Not implemented token type: " + tokenRequirement.TokenType);
                }
 
                SpnegoSecurityTokenAuthenticator CreateSpnegoTokenAuthenticator (SecurityTokenRequirement requirement)
index 026daa9a8225a8cd4176fadb296b321bfe39bcc6..f690f32e86712321da088c641cc0a6ebabae5fc3 100644 (file)
@@ -239,7 +239,7 @@ namespace System.ServiceModel.Security
 
                [MonoTODO]
                public virtual SecurityKeyIdentifierClause CreateKeyIdentifierClauseFromTokenXml (
-                       XmlElement tokenXml, SecurityTokenReferenceStyle referenceStyle)
+                       XmlElement element, SecurityTokenReferenceStyle tokenReferenceStyle)
                {
                        throw new NotImplementedException ();
                }
index ac3b605cf9dbee23e19d6bc98c14751fe4e00442..0801770d6e948c8d2473a8121f14d9f872203bad 100644 (file)
@@ -34,8 +34,8 @@ namespace System.ServiceModel {
        public class AddressAccessDeniedException : CommunicationException
        {
                public AddressAccessDeniedException () : base () {}
-               public AddressAccessDeniedException (string msg) : base (msg) {}
-               public AddressAccessDeniedException (string msg, Exception inner) : base (msg, inner) {}
+               public AddressAccessDeniedException (string message) : base (message) {}
+               public AddressAccessDeniedException (string message, Exception innerException) : base (message, innerException) {}
                protected AddressAccessDeniedException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
 
index 70103060fb190f9555c01b3216f1be8e084bf8b5..33e238146f556a066cbffa63da0679205eb44d12 100644 (file)
@@ -34,8 +34,8 @@ namespace System.ServiceModel {
        public class AddressAlreadyInUseException : CommunicationException
        {
                public AddressAlreadyInUseException () : base () {}
-               public AddressAlreadyInUseException (string msg) : base (msg) {}
-               public AddressAlreadyInUseException (string msg, Exception inner) : base (msg, inner) {}
+               public AddressAlreadyInUseException (string message) : base (message) {}
+               public AddressAlreadyInUseException (string message, Exception innerException) : base (message, innerException) {}
                protected AddressAlreadyInUseException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
 
index 84b8f96db81167bdaab35788a4e94545208a1d82..d4d00e768cc499a726337e982617cbf2caa73ad5 100644 (file)
@@ -299,11 +299,11 @@ namespace System.ServiceModel
 
                protected void InitializeEndpoint (
                        string configurationName,
-                       EndpointAddress remoteAddress)
+                       EndpointAddress address)
                {
                        InitializeEndpoint (CreateDescription ());
-                       if (remoteAddress != null)
-                               service_endpoint.Address = remoteAddress;
+                       if (address != null)
+                               service_endpoint.Address = address;
                        ApplyConfiguration (configurationName);
                }
 
index 0f6560c743f6dec1e8d53e34efbeca3bf3b40dba..25277d302b919789384d0d62d260ef470a5dbf56 100644 (file)
@@ -125,14 +125,14 @@ namespace System.ServiceModel
                        return ch;
                }
 
-               public static TChannel CreateChannel (Binding binding, EndpointAddress address)
+               public static TChannel CreateChannel (Binding binding, EndpointAddress endpointAddress)
                {
-                       return CreateChannelCore (new ChannelFactory<TChannel> (binding, address), f => f.CreateChannel ());
+                       return CreateChannelCore (new ChannelFactory<TChannel> (binding, endpointAddress), f => f.CreateChannel ());
                }
 
-               public static TChannel CreateChannel (Binding binding, EndpointAddress address, Uri via)
+               public static TChannel CreateChannel (Binding binding, EndpointAddress endpointAddress, Uri via)
                {
-                       return CreateChannelCore (new ChannelFactory<TChannel> (binding), f => f.CreateChannel (address, via));
+                       return CreateChannelCore (new ChannelFactory<TChannel> (binding), f => f.CreateChannel (endpointAddress, via));
                }
 
                public virtual TChannel CreateChannel (EndpointAddress address, Uri via)
index 012b9b141ef6a2a6870928eaa62a0b955d26af18..2a5c04c74ebd26807f2b39d3681ca7240f5e5e6d 100644 (file)
@@ -35,8 +35,8 @@ namespace System.ServiceModel
        public class ChannelTerminatedException : CommunicationException
        {
                public ChannelTerminatedException () : base () {}
-               public ChannelTerminatedException (string msg) : base (msg) {}
-               public ChannelTerminatedException (string msg, Exception inner) : base (msg, inner) {}
+               public ChannelTerminatedException (string message) : base (message) {}
+               public ChannelTerminatedException (string message, Exception innerException) : base (message, innerException) {}
                protected ChannelTerminatedException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index 09f72793c27e486e858b9feee2a0bd83d116a067..54d4067b3afe92e30b55a1488458958fcd39b53c 100644 (file)
@@ -75,58 +75,58 @@ namespace System.ServiceModel
                {
                }
 
-               protected ClientBase (InstanceContext instance)
-                       : this (instance, "*")
+               protected ClientBase (InstanceContext callbackInstance)
+                       : this (callbackInstance, "*")
                {
                }
 
-               protected ClientBase (InstanceContext instance, string endpointConfigurationName)
+               protected ClientBase (InstanceContext callbackInstance, string endpointConfigurationName)
                {
-                       if (instance == null)
+                       if (callbackInstance == null)
                                throw new ArgumentNullException ("instanceContext");
                        if (endpointConfigurationName == null)
                                throw new ArgumentNullException ("endpointConfigurationName");
 
-                       Initialize (instance, endpointConfigurationName, null);
+                       Initialize (callbackInstance, endpointConfigurationName, null);
                }
 
-               protected ClientBase (InstanceContext instance,
+               protected ClientBase (InstanceContext callbackInstance,
                        string endpointConfigurationName, EndpointAddress remoteAddress)
                {
-                       if (instance == null)
+                       if (callbackInstance == null)
                                throw new ArgumentNullException ("instanceContext");
                        if (endpointConfigurationName == null)
                                throw new ArgumentNullException ("endpointConfigurationName");
                        if (remoteAddress == null)
                                throw new ArgumentNullException ("remoteAddress");
 
-                       Initialize (instance, endpointConfigurationName, remoteAddress);
+                       Initialize (callbackInstance, endpointConfigurationName, remoteAddress);
                }
 
-               protected ClientBase (InstanceContext instance,
+               protected ClientBase (InstanceContext callbackInstance,
                        string endpointConfigurationName, string remoteAddress)
                {
-                       if (instance == null)
+                       if (callbackInstance == null)
                                throw new ArgumentNullException ("instanceContext");
                        if (remoteAddress == null)
                                throw new ArgumentNullException ("endpointAddress");
                        if (endpointConfigurationName == null)
                                throw new ArgumentNullException ("endpointConfigurationName");
 
-                       Initialize (instance, endpointConfigurationName, new EndpointAddress (remoteAddress));
+                       Initialize (callbackInstance, endpointConfigurationName, new EndpointAddress (remoteAddress));
                }
 
-               protected ClientBase (InstanceContext instance,
+               protected ClientBase (InstanceContext callbackInstance,
                        Binding binding, EndpointAddress remoteAddress)
                {
-                       if (instance == null)
+                       if (callbackInstance == null)
                                throw new ArgumentNullException ("instanceContext");
                        if (binding == null)
                                throw new ArgumentNullException ("binding");
                        if (remoteAddress == null)
                                throw new ArgumentNullException ("remoteAddress");
 
-                       Initialize (instance, binding, remoteAddress);
+                       Initialize (callbackInstance, binding, remoteAddress);
                }
 
                protected ClientBase (ServiceEndpoint endpoint)
@@ -134,8 +134,8 @@ namespace System.ServiceModel
                {
                }
 
-               protected ClientBase (InstanceContext instance, ServiceEndpoint endpoint)
-                       : this (instance, new ChannelFactory<TChannel> (endpoint))
+               protected ClientBase (InstanceContext callbackInstance, ServiceEndpoint endpoint)
+                       : this (callbackInstance, new ChannelFactory<TChannel> (endpoint))
                {
                }
 
index af12296808a117512ff236b0317124d08480185a..c19ad84413ee740b22b682f65a805658a0609aaf 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // ClientCredentialsSecurityTokenManager.cs
 //
 // Author:
@@ -45,11 +45,11 @@ namespace System.ServiceModel
        {
                ClientCredentials credentials;
 
-               public ClientCredentialsSecurityTokenManager (ClientCredentials credentials)
+               public ClientCredentialsSecurityTokenManager (ClientCredentials clientCredentials)
                {
-                       if (credentials == null)
-                               throw new ArgumentNullException ("credentials");
-                       this.credentials = credentials;
+                       if (clientCredentials == null)
+                               throw new ArgumentNullException ("clientCredentials");
+                       this.credentials = clientCredentials;
                }
 
                public ClientCredentials ClientCredentials {
@@ -58,25 +58,25 @@ namespace System.ServiceModel
 
                [MonoTODO]
                public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator (
-                       SecurityTokenRequirement requirement,
+                       SecurityTokenRequirement tokenRequirement,
                        out SecurityTokenResolver outOfBandTokenResolver)
                {
                        outOfBandTokenResolver = null;
-                       if (requirement == null)
-                               throw new ArgumentNullException ("requirement");
-                       if (requirement.TokenType == SecurityTokenTypes.UserName) {
+                       if (tokenRequirement == null)
+                               throw new ArgumentNullException ("tokenRequirement");
+                       if (tokenRequirement.TokenType == SecurityTokenTypes.UserName) {
                                // unsupported
                        }
-                       else if (requirement.TokenType == SecurityTokenTypes.Rsa)
+                       else if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa)
                                return new RsaSecurityTokenAuthenticator ();
-                       else if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
-                               return CreateX509Authenticator (requirement);
-                       else if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
-                               return new SspiClientSecurityTokenAuthenticator (this, requirement);
+                       else if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
+                               return CreateX509Authenticator (tokenRequirement);
+                       else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego)
+                               return new SspiClientSecurityTokenAuthenticator (this, tokenRequirement);
                        else
-                               throw new NotImplementedException ("Security token type " + requirement.TokenType);
+                               throw new NotImplementedException ("Security token type " + tokenRequirement.TokenType);
 
-                       throw new NotSupportedException (String.Format ("Security token requirement '{0}' is not supported to create SecurityTokenAuthenticator.", requirement));
+                       throw new NotSupportedException (String.Format ("Security token requirement '{0}' is not supported to create SecurityTokenAuthenticator.", tokenRequirement));
                }
 
 
@@ -102,40 +102,40 @@ namespace System.ServiceModel
                #region CreateSecurityTokenProvider()
 
                [MonoTODO]
-               public override SecurityTokenProvider CreateSecurityTokenProvider (SecurityTokenRequirement requirement)
+               public override SecurityTokenProvider CreateSecurityTokenProvider (SecurityTokenRequirement tokenRequirement)
                {
-                       if (IsIssuedSecurityTokenRequirement (requirement))
-                               return CreateIssuedTokenProvider (requirement);
+                       if (IsIssuedSecurityTokenRequirement (tokenRequirement))
+                               return CreateIssuedTokenProvider (tokenRequirement);
 
                        bool isInitiator;
 
                        // huh, they are not constants but properties.
-                       if (requirement.TokenType == SecurityTokenTypes.X509Certificate)
-                               return CreateX509SecurityTokenProvider (requirement);
-                       else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation)
-                               return CreateSecureConversationProvider (requirement);
-                       else if (requirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego) {
-                               if (requirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
-                                       return CreateSslnegoProvider (requirement);
-                       } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego) {
-                               if (requirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
-                                       return CreateSslnegoProvider (requirement);
-                       } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SecurityContext) {
+                       if (tokenRequirement.TokenType == SecurityTokenTypes.X509Certificate)
+                               return CreateX509SecurityTokenProvider (tokenRequirement);
+                       else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecureConversation)
+                               return CreateSecureConversationProvider (tokenRequirement);
+                       else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego) {
+                               if (tokenRequirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
+                                       return CreateSslnegoProvider (tokenRequirement);
+                       } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.MutualSslnego) {
+                               if (tokenRequirement.TryGetProperty<bool> (ReqType.IsInitiatorProperty, out isInitiator) && isInitiator)
+                                       return CreateSslnegoProvider (tokenRequirement);
+                       } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SecurityContext) {
                                // FIXME: implement
-                       } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.Spnego) {
-                               return CreateSpnegoProvider (requirement);
-                       } else if (requirement.TokenType == ServiceModelSecurityTokenTypes.SspiCredential) {
+                       } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.Spnego) {
+                               return CreateSpnegoProvider (tokenRequirement);
+                       } else if (tokenRequirement.TokenType == ServiceModelSecurityTokenTypes.SspiCredential) {
                                // FIXME: implement
-                       } else if (requirement.TokenType == SecurityTokenTypes.Rsa) {
+                       } else if (tokenRequirement.TokenType == SecurityTokenTypes.Rsa) {
                                // FIXME: implement
-                       } else if (requirement.TokenType == SecurityTokenTypes.Saml) {
+                       } else if (tokenRequirement.TokenType == SecurityTokenTypes.Saml) {
                                // FIXME: implement
-                       } else if (requirement.TokenType == SecurityTokenTypes.UserName)
-                               return CreateUserNameProvider (requirement);
-                       else if (requirement.TokenType == SecurityTokenTypes.Kerberos) {
-                               return CreateKerberosProvider (requirement);
+                       } else if (tokenRequirement.TokenType == SecurityTokenTypes.UserName)
+                               return CreateUserNameProvider (tokenRequirement);
+                       else if (tokenRequirement.TokenType == SecurityTokenTypes.Kerberos) {
+                               return CreateKerberosProvider (tokenRequirement);
                        }
-                       throw new NotSupportedException (String.Format ("Token type '{0}' is not supported", requirement.TokenType));
+                       throw new NotSupportedException (String.Format ("Token type '{0}' is not supported", tokenRequirement.TokenType));
                }
 
                UserNameSecurityTokenProvider CreateUserNameProvider (
index 01336d803a50be8a40a7d2015c5358837439d86f..51d7685b53b1e653ff26f972834a467506223448 100644 (file)
@@ -93,47 +93,47 @@ namespace System.ServiceModel
                        callback_instance_type = callbackInstanceType;
                }
 
-               public DuplexChannelFactory (object callbackInstance)
-                       : this (new InstanceContext (callbackInstance))
+               public DuplexChannelFactory (object callbackObject)
+                       : this (new InstanceContext (callbackObject))
                {
                }
 
-               public DuplexChannelFactory (object callbackInstance,
+               public DuplexChannelFactory (object callbackObject,
                        string endpointConfigurationName)
-                       : this (new InstanceContext (callbackInstance), endpointConfigurationName)
+                       : this (new InstanceContext (callbackObject), endpointConfigurationName)
                {
                }
 
-               public DuplexChannelFactory (object callbackInstance,
+               public DuplexChannelFactory (object callbackObject,
                        string endpointConfigurationName,
                        EndpointAddress remoteAddress)
-                       : this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
+                       : this (new InstanceContext (callbackObject), endpointConfigurationName, remoteAddress)
                {
                }
 
-               public DuplexChannelFactory (object callbackInstance,
+               public DuplexChannelFactory (object callbackObject,
                        ServiceEndpoint endpoint)
-                       : this (new InstanceContext (callbackInstance), endpoint)
+                       : this (new InstanceContext (callbackObject), endpoint)
                {
                }
 
-               public DuplexChannelFactory (object callbackInstance,
+               public DuplexChannelFactory (object callbackObject,
                        Binding binding)
-                       : this (new InstanceContext (callbackInstance), binding)
+                       : this (new InstanceContext (callbackObject), binding)
                {
                }
 
-               public DuplexChannelFactory (object callbackInstance,
+               public DuplexChannelFactory (object callbackObject,
                        Binding binding,
                        string remoteAddress)
-                       : this (callbackInstance, binding, new EndpointAddress (remoteAddress))
+                       : this (callbackObject, binding, new EndpointAddress (remoteAddress))
                {
                }
 
-               public DuplexChannelFactory (object callbackInstance,
+               public DuplexChannelFactory (object callbackObject,
                        Binding binding,
                        EndpointAddress remoteAddress)
-                       : this (new InstanceContext (callbackInstance), binding, remoteAddress)
+                       : this (new InstanceContext (callbackObject), binding, remoteAddress)
                {
                }
 
index 64ce85812b5dabce76d928c81a1a802369c78231..c51ce43a77739320e33d3ba989049d01ae512b86 100644 (file)
@@ -52,8 +52,8 @@ namespace System.ServiceModel
                }
 
                protected DuplexClientBase (object callbackInstance,
-                       string bindingConfigurationName, EndpointAddress remoteAddress)
-                       : this (new InstanceContext (callbackInstance), bindingConfigurationName, remoteAddress)
+                       string endpointConfigurationName, EndpointAddress remoteAddress)
+                       : this (new InstanceContext (callbackInstance), endpointConfigurationName, remoteAddress)
                {
                }
 
@@ -87,8 +87,8 @@ namespace System.ServiceModel
                }
 
                protected DuplexClientBase (InstanceContext callbackInstance,
-                       string endpointConfigurationName, EndpointAddress address)
-                       : base (callbackInstance, endpointConfigurationName, address)
+                       string endpointConfigurationName, EndpointAddress remoteAddress)
+                       : base (callbackInstance, endpointConfigurationName, remoteAddress)
                {
                }
 
index 1740e4d99066ab81ce59ebfa32cce5e3c797bcfa..19e8a56ae742eac7cea8c55ff3dc6c70b1d992b3 100644 (file)
@@ -406,19 +406,19 @@ namespace System.ServiceModel
                public void WriteTo (
                        AddressingVersion addressingVersion,
                        XmlDictionaryWriter writer,
-                       XmlDictionaryString localname,
+                       XmlDictionaryString localName,
                        XmlDictionaryString ns)
                {
-                       writer.WriteStartElement (localname, ns);
+                       writer.WriteStartElement (localName, ns);
                        WriteContentsTo (addressingVersion, writer);
                        writer.WriteEndElement ();
                }
 
                public void WriteTo (
                        AddressingVersion addressingVersion,
-                       XmlWriter writer, string localname, string ns)
+                       XmlWriter writer, string localName, string ns)
                {
-                       writer.WriteStartElement (localname, ns);
+                       writer.WriteStartElement (localName, ns);
                        WriteContentsTo (addressingVersion, writer);
                        writer.WriteEndElement ();
                }
index 71ff2f0f13436e54537452d8db30e66aefc26115..9963d396158679271f74641dc480a8b0c9d86024 100644 (file)
@@ -110,9 +110,9 @@ namespace System.ServiceModel
                        return new X509CertificateEndpointIdentity (primaryCertificate, supportingCertificates);
                }
 
-               public override bool Equals (object other)
+               public override bool Equals (object obj)
                {
-                       EndpointIdentity e = other as EndpointIdentity;
+                       EndpointIdentity e = obj as EndpointIdentity;
                        return e != null && comparer.Equals (claim, e.claim);
                }
 
@@ -126,19 +126,19 @@ namespace System.ServiceModel
                        return String.Concat ("identity(", claim, ")");
                }
 
-               protected void Initialize (Claim claim)
+               protected void Initialize (Claim identityClaim)
                {
-                       Initialize (claim, Claim.DefaultComparer);
+                       Initialize (identityClaim, Claim.DefaultComparer);
                }
 
-               protected void Initialize (Claim claim, IEqualityComparer<Claim> comparer)
+               protected void Initialize (Claim identityClaim, IEqualityComparer<Claim> claimComparer)
                {
-                       if (claim == null)
-                               throw new ArgumentNullException ("claim");
-                       if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
-                       this.claim = claim;
-                       this.comparer = comparer;
+                       if (identityClaim == null)
+                               throw new ArgumentNullException ("identityClaim");
+                       if (claimComparer == null)
+                               throw new ArgumentNullException ("claimComparer");
+                       this.claim = identityClaim;
+                       this.comparer = claimComparer;
                }
        }
 }
index 05b3af01caf8117bb1e39b4eae01a04e70323469..1fdfa99acfb18153d9325239245f7844599af9cb 100644 (file)
@@ -44,13 +44,13 @@ namespace System.ServiceModel
                {
                }
 
-               public FaultException (string msg)
-                       : this (new FaultReason (msg))
+               public FaultException (string reason)
+                       : this (new FaultReason (reason))
                {
                }
 
-               public FaultException (string msg, FaultCode code)
-                       : this (new FaultReason (msg), code)
+               public FaultException (string reason, FaultCode code)
+                       : this (new FaultReason (reason), code)
                {
                }
 
index 223cd81753ed77683a4278d79775b35fc3491f35..f9970c33e4a55bb54c42d9f43f2b366f23f525ac 100644 (file)
@@ -36,9 +36,9 @@ namespace System.ServiceModel
        public class MsmqException : ExternalException
        {
                public MsmqException () : base () {}
-               public MsmqException (string msg) : base (msg) {}
-               public MsmqException (string msg, int win32ErrorCode) : base (msg, win32ErrorCode) {}
-               public MsmqException (string msg, Exception inner) : base (msg, inner) {}
+               public MsmqException (string message) : base (message) {}
+               public MsmqException (string message, int error) : base (message, error) {}
+               public MsmqException (string message, Exception inner) : base (message, inner) {}
                protected MsmqException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index 57fc6fe2872bb5070ad8ee9f0e953eec2a23f4ec..120a5ad8a2efd2b6f8995f944accab06a977fdd6 100644 (file)
@@ -35,8 +35,8 @@ namespace System.ServiceModel
        public class MsmqPoisonMessageException : PoisonMessageException
        {
                public MsmqPoisonMessageException () : base () {}
-               public MsmqPoisonMessageException (string msg) : base (msg) {}
-               public MsmqPoisonMessageException (string msg, Exception inner) : base (msg, inner) {}
+               public MsmqPoisonMessageException (string message) : base (message) {}
+               public MsmqPoisonMessageException (string message, Exception innerException) : base (message, innerException) {}
                protected MsmqPoisonMessageException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index 3d8ebe30b81b0f66ef5deaeea4a7bf83bd95ea8d..9dd6a59691730be8948177a4af8b225664d7c102 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // OptionalReliableSession.cs
 //
 // Author:
@@ -42,11 +42,11 @@ namespace System.ServiceModel
                {
                }
 
-               public OptionalReliableSession (ReliableSessionBindingElement binding)
-                       : base (binding)
+               public OptionalReliableSession (ReliableSessionBindingElement reliableSessionBindingElement)
+                       : base (reliableSessionBindingElement)
                {
-                       if (binding == null)
-                               throw new ArgumentNullException ("binding");
+                       if (reliableSessionBindingElement == null)
+                               throw new ArgumentNullException ("reliableSessionBindingElement");
                }
 
                public bool Enabled {
index 9d0fc743e67f9b5b1c67a3338bf21f4f06581c17..99751678f4770417a05e69d2230273d83ea1788a 100644 (file)
@@ -35,8 +35,8 @@ namespace System.ServiceModel
        public class PoisonMessageException : SystemException
        {
                public PoisonMessageException () : base () {}
-               public PoisonMessageException (string msg) : base (msg) {}
-               public PoisonMessageException (string msg, Exception inner) : base (msg, inner) {}
+               public PoisonMessageException (string message) : base (message) {}
+               public PoisonMessageException (string message, Exception innerException) : base (message, innerException) {}
                protected PoisonMessageException (SerializationInfo info, StreamingContext context) :
                        base (info, context) {}
        }
index 5a5a3509e68fc8da5d2ba671c858658bfa4a41a8..243ae798b2af1114b52cdb1a850623119378097e 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // ReliableSession.cs
 //
 // Author:
@@ -39,12 +39,12 @@ namespace System.ServiceModel
                {
                }
 
-               public ReliableSession (ReliableSessionBindingElement binding)
+               public ReliableSession (ReliableSessionBindingElement reliableSessionBindingElement)
                {
-                       if (binding == null)
-                               throw new ArgumentNullException ("binding");
-                       InactivityTimeout = binding.InactivityTimeout;
-                       Ordered = binding.Ordered;
+                       if (reliableSessionBindingElement == null)
+                               throw new ArgumentNullException ("reliableSessionBindingElement");
+                       InactivityTimeout = reliableSessionBindingElement.InactivityTimeout;
+                       Ordered = reliableSessionBindingElement.Ordered;
                }
 
                public TimeSpan InactivityTimeout { get; set; }
index 1d0bf8fefc0c705e6eb21b716cd7323b5a62f902..caca3f0b8433819c34a36b39cae4eba97e35e1da 100644 (file)
@@ -49,11 +49,11 @@ namespace System.ServiceModel
                        throw new NotImplementedException ();
                }
 
-               public RsaEndpointIdentity (X509Certificate2 cert)
+               public RsaEndpointIdentity (X509Certificate2 certificate)
                {
-                       if (cert == null)
-                               throw new ArgumentNullException ("cert");
-                       rsa = (RSA) cert.PublicKey.Key;
+                       if (certificate == null)
+                               throw new ArgumentNullException ("certificate");
+                       rsa = (RSA) certificate.PublicKey.Key;
                }
        }
 }
index 4a547c3ab8b86d5a34985b0d9b5ce2b4fa145fe1..14b5cec4aa8b35618648fd4f2a9f195c08822a2d 100644 (file)
@@ -33,24 +33,24 @@ namespace System.ServiceModel
 {
        public class ServiceAuthorizationManager
        {
-               public virtual bool CheckAccess (OperationContext context)
+               public virtual bool CheckAccess (OperationContext operationContext)
                {
-                       return CheckAccessCore (context);
+                       return CheckAccessCore (operationContext);
                }
 
-               public virtual bool CheckAccess (OperationContext context, ref Message message)
+               public virtual bool CheckAccess (OperationContext operationContext, ref Message message)
                {
-                       return CheckAccessCore (context);
+                       return CheckAccessCore (operationContext);
                }
 
                [MonoTODO]
-               protected virtual bool CheckAccessCore (OperationContext context)
+               protected virtual bool CheckAccessCore (OperationContext operationContext)
                {
                        return false;
                }
 
                [MonoTODO]
-               protected virtual ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies (OperationContext context)
+               protected virtual ReadOnlyCollection<IAuthorizationPolicy> GetAuthorizationPolicies (OperationContext operationContext)
                {
                        throw new NotImplementedException ();
                }
index e438c8f5b71f59e09ced2747c4c82441254084b4..47c3bc2993c55bb7c71dfd27cf8789ced5ac5a1e 100644 (file)
@@ -45,12 +45,12 @@ namespace System.ServiceModel
                {
                }
 
-               public ServiceHost (object serviceInstance,
+               public ServiceHost (object singletonInstance,
                        params Uri [] baseAddresses)
                {
-                       if (serviceInstance == null)
-                               throw new ArgumentNullException ("serviceInstance");
-                       InitializeDescription (serviceInstance,
+                       if (singletonInstance == null)
+                               throw new ArgumentNullException ("singletonInstance");
+                       InitializeDescription (singletonInstance,
                                new UriSchemeKeyedCollection (baseAddresses));
                }
 
@@ -165,10 +165,10 @@ namespace System.ServiceModel
                        InitializeDescription (baseAddresses);
                }
 
-               protected void InitializeDescription (object serviceInstance, UriSchemeKeyedCollection baseAddresses)
+               protected void InitializeDescription (object singletonInstance, UriSchemeKeyedCollection baseAddresses)
                {
-                       instance = serviceInstance;
-                       InitializeDescription (serviceInstance.GetType (), baseAddresses);
+                       instance = singletonInstance;
+                       InitializeDescription (singletonInstance.GetType (), baseAddresses);
                }
        }
 }
index 29a3d4aba6d72c5328cb908ee67a835a54b8f677..1a84cecc5842e18f6e3e6df25253cbea370641fd 100644 (file)
@@ -492,9 +492,9 @@ namespace System.ServiceModel
                                throw new InvalidOperationException ("The ServiceHost must have at least one application endpoint (that does not include metadata exchange endpoint) defined by either configuration, behaviors or call to AddServiceEndpoint methods.");
                }
 
-               protected void LoadConfigurationSection (ServiceElement element)
+               protected void LoadConfigurationSection (ServiceElement serviceSection)
                {
-                       ApplyServiceElement (element);
+                       ApplyServiceElement (serviceSection);
                }
 
                protected override sealed void OnAbort ()
index c2ea59f9a8a0815d7e4abfbd7978e9a52394085d..8430860cb7918b54981aba50d27152d168dd9fdb 100644 (file)
@@ -35,24 +35,24 @@ namespace System.ServiceModel
        public class UriSchemeKeyedCollection
                : SynchronizedKeyedCollection<string, Uri>
        {
-               public UriSchemeKeyedCollection (params Uri [] uris)
+               public UriSchemeKeyedCollection (params Uri [] addresses)
                        : base (new object ())
                {
-                       if (uris == null)
+                       if (addresses == null)
                                /* FIXME: masterinfo says, param name should be
                                   baseAddresses */
-                               throw new ArgumentNullException ("uris");
+                               throw new ArgumentNullException ("addresses");
 
-                       for (int i = 0; i < uris.Length; i ++) {
-                               if (!uris [i].IsAbsoluteUri)
+                       for (int i = 0; i < addresses.Length; i ++) {
+                               if (!addresses [i].IsAbsoluteUri)
                                        throw new ArgumentException ("Only an absolute URI can be used as a base address");
 
-                               if (Contains (uris [i].Scheme))
-                                       throw new ArgumentException ("Collection already contains an address with scheme "+ uris [i].Scheme);
-                               if (uris [i].Query != String.Empty)
+                               if (Contains (addresses [i].Scheme))
+                                       throw new ArgumentException ("Collection already contains an address with scheme "+ addresses [i].Scheme);
+                               if (addresses [i].Query != String.Empty)
                                        throw new ArgumentException ("A base address cannot contain a query string.");
 
-                               InsertItem (i, uris [i]);
+                               InsertItem (i, addresses [i]);
                        }
                }
 
index c0b1564ff2413e2d3442713bf2efb75c9a4b25c4..b0af17b06e852d063c78b885f15e0d65635b14d7 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // WS2007FederationHttpBinding.cs
 //
 // Author:
@@ -52,8 +52,8 @@ namespace System.ServiceModel
                }
 
                [MonoTODO]
-               public WS2007FederationHttpBinding (string configurationName)
-                       : base (configurationName)
+               public WS2007FederationHttpBinding (string configName)
+                       : base (configName)
                {
                        throw new NotImplementedException ();
                }
index 4ac7a2ea4813a5cb02cee96e83fa7280a1bbb37a..0a5cfbc3394c4290da6e0b7d6b83da5fe4a3e2b2 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // WS2007HttpBinding.cs
 //
 // Author:
@@ -40,19 +40,19 @@ namespace System.ServiceModel
                {
                }
 
-               public WS2007HttpBinding (SecurityMode mode)
-                       : base (mode)
+               public WS2007HttpBinding (SecurityMode securityMode)
+                       : base (securityMode)
                {
                }
 
-               public WS2007HttpBinding (SecurityMode mode, bool reliableSessionEnabled)
-                       : base (mode, reliableSessionEnabled)
+               public WS2007HttpBinding (SecurityMode securityMode, bool reliableSessionEnabled)
+                       : base (securityMode, reliableSessionEnabled)
                {
                }
 
                [MonoTODO]
-               public WS2007HttpBinding (string configurationName)
-                       : base (configurationName)
+               public WS2007HttpBinding (string configName)
+                       : base (configName)
                {
                }
        }
index cfc054ea7ae3289d10cfbf89e0c66c78760389e4..7fc121e8ad518abbbb1aa03f66514afde01e4791 100644 (file)
@@ -61,7 +61,7 @@ namespace System.ServiceModel
                }
 
                [MonoTODO]
-               public WSFederationHttpBinding (string configurationName)
+               public WSFederationHttpBinding (string configName)
                {
                        throw new NotImplementedException ();
                }
index 0a56a6df1fb2fcc834d673df313ee9314b728718..90a4849a6e3d18443b8587a7cbb3279272ccab8b 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // WSHttpBinding.cs
 //
 // Author:
@@ -45,20 +45,20 @@ namespace System.ServiceModel
                {
                }
 
-               public WSHttpBinding (SecurityMode mode)
-                       : this (mode, false)
+               public WSHttpBinding (SecurityMode securityMode)
+                       : this (securityMode, false)
                {
                }
 
-               public WSHttpBinding (SecurityMode mode,
+               public WSHttpBinding (SecurityMode securityMode,
                        bool reliableSessionEnabled)
                        : base (reliableSessionEnabled)
                {
-                       security = new WSHttpSecurity (mode);
+                       security = new WSHttpSecurity (securityMode);
                }
 
                [MonoTODO]
-               public WSHttpBinding (string configurationName)
+               public WSHttpBinding (string configName)
                {
                        throw new NotImplementedException ();
                }
index 88845ed8a60ffb6bd9ab525b457152f4a95a6252..3b71fc19e740737b9118dd46dce72f2adb87ea1c 100644 (file)
@@ -40,12 +40,12 @@ namespace System.ServiceModel
                X509Certificate2 primary;
                X509Certificate2Collection supporting, all;
 
-               public X509CertificateEndpointIdentity (X509Certificate2 cert)
+               public X509CertificateEndpointIdentity (X509Certificate2 certificate)
                {
-                       if (cert == null)
-                               throw new ArgumentNullException ("cert");
-                       primary = cert;
-                       Initialize (Claim.CreateThumbprintClaim (cert.GetCertHash ()));
+                       if (certificate == null)
+                               throw new ArgumentNullException ("certificate");
+                       primary = certificate;
+                       Initialize (Claim.CreateThumbprintClaim (certificate.GetCertHash ()));
                }
 
                public X509CertificateEndpointIdentity (
index f6781dc923fc6d5a14cc56e59f35a860f533a03e..f98f6fa6e129338cf2482e497d981ef24cc0b0db 100644 (file)
@@ -41,26 +41,26 @@ namespace System.Transactions
                        this.options = options;
                }
 
-               public IAsyncResult BeginCommit (AsyncCallback callback,
-                       object user_defined_state)
+               public IAsyncResult BeginCommit (AsyncCallback asyncCallback,
+                       object asyncState)
                {
-                       this.callback = callback;
-                       this.user_defined_state = user_defined_state;
+                       this.callback = asyncCallback;
+                       this.user_defined_state = asyncState;
 
                        AsyncCallback cb = null;
-                       if (callback != null)
+                       if (asyncCallback != null)
                                cb = new AsyncCallback (CommitCallback);
 
                        asyncResult = BeginCommitInternal (cb);
                        return this;
                }
                
-               public void EndCommit (IAsyncResult ar)
+               public void EndCommit (IAsyncResult asyncResult)
                {
-                       if (ar != this)
+                       if (asyncResult != this)
                                throw new ArgumentException ("The IAsyncResult parameter must be the same parameter as returned by BeginCommit.", "asyncResult");
 
-                       EndCommitInternal (asyncResult);
+                       EndCommitInternal (this.asyncResult);
                }
 
                private void CommitCallback (IAsyncResult ar)
index 65d012779cfb9f634f7d3d7d396a23ef192f72c1..29a2ee72120293faa3c356edd53bc0bdfd98e66e 100644 (file)
@@ -19,11 +19,11 @@ namespace System.Transactions
        [InterfaceType (ComInterfaceType.InterfaceIsIUnknown)]
        public interface IDtcTransaction
        {
-               void Abort (IntPtr manager, int whatever, int whatever2);
+               void Abort (IntPtr reason, int retaining, int async);
 
-               void Commit (int whatever, int whatever2, int whatever3);
+               void Commit (int retaining, int commitType, int reserved);
 
-               void GetTransactionInfo (IntPtr whatever);
+               void GetTransactionInfo (IntPtr transactionInformation);
        }
 }
 
index 4e01d02de6150218a6e1c31f49f35c34c1de5f75..9684e74298c8d72a6de6563730be2ea8c2ea2614 100644 (file)
@@ -14,9 +14,9 @@ namespace System.Transactions
        {
                void Initialize ();
 
-               void Rollback (SinglePhaseEnlistment enlistment);
+               void Rollback (SinglePhaseEnlistment singlePhaseEnlistment);
 
-               void SinglePhaseCommit (SinglePhaseEnlistment enlistment);
+               void SinglePhaseCommit (SinglePhaseEnlistment singlePhaseEnlistment);
        }
 }
 
index e206193a4c346e0efcaed492632ca50a88173c38..7d029fa0c7958216caf93cf371ba158639916611 100644 (file)
@@ -13,7 +13,7 @@ namespace System.Transactions
        public interface ISinglePhaseNotification
                : IEnlistmentNotification
        {
-               void SinglePhaseCommit (SinglePhaseEnlistment enlistment);
+               void SinglePhaseCommit (SinglePhaseEnlistment singlePhaseEnlistment);
        }
 }
 
index 766d637bbed5f5571a79406d232b5297c5fac567..e662279f85b5c65a21e2728dd10d3b66e6855990 100644 (file)
@@ -40,9 +40,9 @@ namespace System.Transactions
                }
 
                [MonoTODO]
-               public void ForceRollback (Exception ex)
+               public void ForceRollback (Exception e)
                {
-                       tx.Rollback (ex, enlisted);
+                       tx.Rollback (e, enlisted);
                        /* See test RMFail2 */
                        ((ManualResetEvent) waitHandle).Set ();
                }
index 198ab796d55a9a68ecadd30e1b10a558b7b69048..efb1c4007a3a82c2555bad1c7499833dd571e902 100644 (file)
@@ -14,7 +14,7 @@ namespace System.Transactions
        [Serializable]
        public sealed class SubordinateTransaction : Transaction
        {
-               public SubordinateTransaction (IsolationLevel level,
+               public SubordinateTransaction (IsolationLevel isoLevel,
                        ISimpleTransactionSuperior superior)
                {
                        throw new NotImplementedException ();
index 20c31072d9b00d20b51759ca1180610e3d0124d8..33422d15f1ea5b75a5fbd996e8b7a46ba9c82222 100644 (file)
@@ -137,44 +137,44 @@ namespace System.Transactions
 
                [MonoTODO]
                public DependentTransaction DependentClone (
-                       DependentCloneOption option)
+                       DependentCloneOption cloneOption)
                {
                        DependentTransaction d = 
-                               new DependentTransaction (this, option);
+                               new DependentTransaction (this, cloneOption);
                        dependents.Add (d);
                        return d;
                }
 
                [MonoTODO ("Only SinglePhase commit supported for durable resource managers.")]
                [PermissionSetAttribute (SecurityAction.LinkDemand)]
-               public Enlistment EnlistDurable (Guid manager,
-                       IEnlistmentNotification notification,
-                       EnlistmentOptions options)
+               public Enlistment EnlistDurable (Guid resourceManagerIdentifier,
+                       IEnlistmentNotification enlistmentNotification,
+                       EnlistmentOptions enlistmentOptions)
                {
                        throw new NotImplementedException ("DTC unsupported, only SinglePhase commit supported for durable resource managers.");
                }
 
                [MonoTODO ("Only Local Transaction Manager supported. Cannot have more than 1 durable resource per transaction. Only EnlistmentOptions.None supported yet.")]
                [PermissionSetAttribute (SecurityAction.LinkDemand)]
-               public Enlistment EnlistDurable (Guid manager,
-                       ISinglePhaseNotification notification,
-                       EnlistmentOptions options)
+               public Enlistment EnlistDurable (Guid resourceManagerIdentifier,
+                       ISinglePhaseNotification singlePhaseNotification,
+                       EnlistmentOptions enlistmentOptions)
                {
                        EnsureIncompleteCurrentScope ();
                        if (pspe != null || Durables.Count > 0)
                                throw new NotImplementedException ("DTC unsupported, multiple durable resource managers aren't supported.");
 
-                       if (options != EnlistmentOptions.None)
+                       if (enlistmentOptions != EnlistmentOptions.None)
                                throw new NotImplementedException ("EnlistmentOptions other than None aren't supported");
 
-                       Durables.Add (notification);
+                       Durables.Add (singlePhaseNotification);
 
                        /* FIXME: Enlistment ?? */
                        return new Enlistment ();
                }
 
                public bool EnlistPromotableSinglePhase (
-                       IPromotableSinglePhaseNotification notification)
+                       IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
                {
                        EnsureIncompleteCurrentScope ();
 
@@ -183,7 +183,7 @@ namespace System.Transactions
                        if (pspe != null || Durables.Count > 0)
                                return false;
 
-                       pspe = notification;
+                       pspe = promotableSinglePhaseNotification;
                        pspe.Initialize();
 
                        return true;
@@ -211,19 +211,19 @@ namespace System.Transactions
 
                [MonoTODO ("EnlistmentOptions being ignored")]
                public Enlistment EnlistVolatile (
-                       IEnlistmentNotification notification,
-                       EnlistmentOptions options)
+                       IEnlistmentNotification enlistmentNotification,
+                       EnlistmentOptions enlistmentOptions)
                {
-                       return EnlistVolatileInternal (notification, options);
+                       return EnlistVolatileInternal (enlistmentNotification, enlistmentOptions);
                }
 
                [MonoTODO ("EnlistmentOptions being ignored")]
                public Enlistment EnlistVolatile (
-                       ISinglePhaseNotification notification,
-                       EnlistmentOptions options)
+                       ISinglePhaseNotification singlePhaseNotification,
+                       EnlistmentOptions enlistmentOptions)
                {
                        /* FIXME: Anything extra reqd for this? */
-                       return EnlistVolatileInternal (notification, options);
+                       return EnlistVolatileInternal (singlePhaseNotification, enlistmentOptions);
                }
 
                private Enlistment EnlistVolatileInternal (
@@ -287,10 +287,10 @@ namespace System.Transactions
                        Rollback (null);
                }
 
-               public void Rollback (Exception ex)
+               public void Rollback (Exception e)
                {
                        EnsureIncompleteCurrentScope ();
-                       Rollback (ex, null);
+                       Rollback (e, null);
                }
 
                internal void Rollback (Exception ex, object abortingEnlisted)
index a764cf6e096157e1d29f4bca3dae7bbc469d5b50..2d0cf35bed6a0fe696e0f23c246de7552d87d18f 100644 (file)
@@ -25,27 +25,27 @@ namespace System.Transactions
 
                [MonoTODO]
                public static byte [] GetExportCookie (Transaction transaction,
-                       byte [] exportCookie)
+                       byte [] whereabouts)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public static Transaction GetTransactionFromDtcTransaction (
-                       IDtcTransaction dtc)
+                       IDtcTransaction transactionNative)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
                public static Transaction GetTransactionFromExportCookie (
-                       byte [] exportCookie)
+                       byte [] cookie)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO]
-               public static Transaction GetTransactionFromTransmitterPropagationToken (byte [] token)
+               public static Transaction GetTransactionFromTransmitterPropagationToken (byte [] propagationToken)
                {
                        throw new NotImplementedException ();
                }
index b0d90bc2eaae9dea0ce61b20157263519752e1af..491f46f765ab20a103dbe26913846cac6c6a1bad 100644 (file)
@@ -67,15 +67,15 @@ namespace System.Transactions
                }
 
                [MonoTODO ("Not implemented")]
-               public static void RecoveryComplete (Guid manager)
+               public static void RecoveryComplete (Guid resourceManagerIdentifier)
                {
                        throw new NotImplementedException ();
                }
 
                [MonoTODO ("Not implemented")]
-               public static Enlistment Reenlist (Guid manager,
-                       byte[] recoveryInfo,
-                       IEnlistmentNotification notification)
+               public static Enlistment Reenlist (Guid resourceManagerIdentifier,
+                       byte[] recoveryInformation,
+                       IEnlistmentNotification enlistmentNotification)
                {
                        throw new NotImplementedException ();
                }
index a466cfb74ca0627700543d1e41c78101dbe9bc9e..03fbab0966a6df749f73f95c626963681512dca8 100644 (file)
@@ -32,18 +32,18 @@ namespace System.Transactions
                        set { timeout = value; }
                }
 
-               public static bool operator == (TransactionOptions  o1,
-                       TransactionOptions o2)
+               public static bool operator == (TransactionOptions  x,
+                       TransactionOptions y)
                {
-                       return o1.level == o2.level &&
-                               o1.timeout == o2.timeout;
+                       return x.level == y.level &&
+                               x.timeout == y.timeout;
                }
 
-               public static bool operator != (TransactionOptions o1,
-                       TransactionOptions o2)
+               public static bool operator != (TransactionOptions x,
+                       TransactionOptions y)
                {
-                       return o1.level != o2.level ||
-                               o1.timeout != o2.timeout;
+                       return x.level != y.level ||
+                               x.timeout != y.timeout;
                }
 
                public override bool Equals (object obj)
index ac57713b59d85e08fcb5bf0ca159c08529a8bf3d..874ddde0d88af472e69ab26b4cde13798ecd6a0b 100644 (file)
@@ -39,39 +39,39 @@ namespace System.Transactions
                {
                }
 
-               public TransactionScope(TransactionScopeAsyncFlowOption asyncFlow)
+               public TransactionScope(TransactionScopeAsyncFlowOption asyncFlowOption)
                        : this(TransactionScopeOption.Required,
-                               TransactionManager.DefaultTimeout, asyncFlow)
+                               TransactionManager.DefaultTimeout, asyncFlowOption)
                {
                }
 
-               public TransactionScope (Transaction transaction)
-                       : this (transaction, TransactionManager.DefaultTimeout)
+               public TransactionScope (Transaction transactionToUse)
+                       : this (transactionToUse, TransactionManager.DefaultTimeout)
                {
                }
 
-               public TransactionScope (Transaction transaction,
-                       TimeSpan timeout)
-                       : this (transaction, timeout, DTCOption.None)
+               public TransactionScope (Transaction transactionToUse,
+                       TimeSpan scopeTimeout)
+                       : this (transactionToUse, scopeTimeout, DTCOption.None)
                {
                }
 
                [MonoTODO ("EnterpriseServicesInteropOption not supported.")]
-               public TransactionScope (Transaction transaction,
-                       TimeSpan timeout, DTCOption opt)
+               public TransactionScope (Transaction transactionToUse,
+                       TimeSpan scopeTimeout, DTCOption interopOption)
                {
                        Initialize (TransactionScopeOption.Required,
-                               transaction, defaultOptions, opt, timeout, TransactionScopeAsyncFlowOption.Suppress);
+                               transactionToUse, defaultOptions, interopOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress);
                }
 
-               public TransactionScope (TransactionScopeOption option)
-                       : this (option, TransactionManager.DefaultTimeout)
+               public TransactionScope (TransactionScopeOption scopeOption)
+                       : this (scopeOption, TransactionManager.DefaultTimeout)
                {
                }
 
-               public TransactionScope (TransactionScopeOption option,
-                       TimeSpan timeout)
-                       : this (option, timeout, TransactionScopeAsyncFlowOption.Suppress)
+               public TransactionScope (TransactionScopeOption scopeOption,
+                       TimeSpan scopeTimeout)
+                       : this (scopeOption, scopeTimeout, TransactionScopeAsyncFlowOption.Suppress)
                {
                }
 
@@ -80,25 +80,25 @@ namespace System.Transactions
                {
                }
 
-       public TransactionScope (TransactionScopeOption option,
-                       TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
+               public TransactionScope (TransactionScopeOption scopeOption,
+                       TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
                {
-                       Initialize (option, null, defaultOptions,
-                               DTCOption.None, timeout, asyncFlow);
+                       Initialize (scopeOption, null, defaultOptions,
+                               DTCOption.None, scopeTimeout, asyncFlow);
                }
 
                public TransactionScope (TransactionScopeOption scopeOption,
-                       TransactionOptions options)
-                       : this (scopeOption, options, DTCOption.None)
+                       TransactionOptions transactionOptions)
+                       : this (scopeOption, transactionOptions, DTCOption.None)
                {
                }
 
                [MonoTODO ("EnterpriseServicesInteropOption not supported")]
                public TransactionScope (TransactionScopeOption scopeOption,
-                       TransactionOptions options,
-                       DTCOption opt)
+                       TransactionOptions transactionOptions,
+                       DTCOption interopOption)
                {
-                       Initialize (scopeOption, null, options, opt,
+                       Initialize (scopeOption, null, transactionOptions, interopOption,
                                TransactionManager.DefaultTimeout, TransactionScopeAsyncFlowOption.Suppress);
                }
 
@@ -124,17 +124,17 @@ namespace System.Transactions
 
                void Initialize (TransactionScopeOption scopeOption,
                        Transaction tx, TransactionOptions options,
-                       DTCOption interop, TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
+                       DTCOption interop, TimeSpan scopeTimeout, TransactionScopeAsyncFlowOption asyncFlow)
                {
                        completed = false;
                        isRoot = false;
                        nested = 0;
                        asyncFlowEnabled = asyncFlow == TransactionScopeAsyncFlowOption.Enabled;
 
-                       if (timeout < TimeSpan.Zero)
-                               throw new ArgumentOutOfRangeException ("timeout");
+                       if (scopeTimeout < TimeSpan.Zero)
+                               throw new ArgumentOutOfRangeException ("scopeTimeout");
 
-                       this.timeout = timeout;
+                       this.timeout = scopeTimeout;
 
                        oldTransaction = Transaction.CurrentInternal;
 
index 1dbda6e1d228fbeb49710a4fc8b4d0309b647715..a474c995e63cfbbfa619608e9719db6857a83f64 100644 (file)
@@ -25,14 +25,14 @@ namespace MonoTests.System.Transactions
                                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");
+                               Assert.AreEqual ("scopeTimeout", ex.ParamName);
                        }
 
                        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");
+                               Assert.AreEqual ("scopeTimeout", ex.ParamName);
                        }
                }
 
index 068e1c45ccff43b779236ceaeeaf4fc2f1d3fee2..77a6fbeca398d7fd43f60f9761f1fe0ff85634ad 100644 (file)
@@ -72,21 +72,21 @@ namespace System.Web.Security
                {
                }
                
-               public abstract bool ChangePassword (string name, string oldPwd, string newPwd);
-               public abstract bool ChangePasswordQuestionAndAnswer (string name, string password, string newPwdQuestion, string newPwdAnswer);
-               public abstract MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
-               public abstract bool DeleteUser (string name, bool deleteAllRelatedData);
+               public abstract bool ChangePassword (string username, string oldPassword, string newPassword);
+               public abstract bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer);
+               public abstract MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status);
+               public abstract bool DeleteUser (string username, bool deleteAllRelatedData);
                public abstract MembershipUserCollection FindUsersByEmail (string emailToMatch, int pageIndex, int pageSize, out int totalRecords);
-               public abstract MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords);
+               public abstract MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords);
                public abstract MembershipUserCollection GetAllUsers (int pageIndex, int pageSize, out int totalRecords);
                public abstract int GetNumberOfUsersOnline ();
-               public abstract string GetPassword (string name, string answer);
-               public abstract MembershipUser GetUser (string name, bool userIsOnline);
+               public abstract string GetPassword (string username, string answer);
+               public abstract MembershipUser GetUser (string username, bool userIsOnline);
                public abstract MembershipUser GetUser (object providerUserKey, bool userIsOnline);
                public abstract string GetUserNameByEmail (string email);
-               public abstract string ResetPassword (string name, string answer);
+               public abstract string ResetPassword (string username, string answer);
                public abstract void UpdateUser (MembershipUser user);
-               public abstract bool ValidateUser (string name, string password);
+               public abstract bool ValidateUser (string username, string password);
                public abstract bool UnlockUser (string userName);
                
                public abstract string ApplicationName { get; set; }
@@ -101,11 +101,11 @@ namespace System.Web.Security
                public abstract string PasswordStrengthRegularExpression { get; }
                public abstract bool RequiresUniqueEmail { get; }
                
-               protected virtual void OnValidatingPassword (ValidatePasswordEventArgs args)
+               protected virtual void OnValidatingPassword (ValidatePasswordEventArgs e)
                {
                        MembershipValidatePasswordEventHandler eh = events [validatingPasswordEvent] as MembershipValidatePasswordEventHandler;
                        if (eh != null)
-                               eh (this, args);
+                               eh (this, e);
                }
 
                protected virtual byte [] DecryptPassword (byte [] encodedPassword)
index c370f21661bf432ac7d42bd09251d6a7db82db12..5bb84e31496749f003707fd2bc005b96a327a7eb 100644 (file)
@@ -119,9 +119,9 @@ namespace System.Web.Security
                        return GetPassword (null);
                }
                
-               public virtual string GetPassword (string answer)
+               public virtual string GetPassword (string passwordAnswer)
                {
-                       return Provider.GetPassword (UserName, answer);
+                       return Provider.GetPassword (UserName, passwordAnswer);
                }
                
                public virtual string ResetPassword ()
@@ -129,9 +129,9 @@ namespace System.Web.Security
                        return ResetPassword (null);
                }
                
-               public virtual string ResetPassword (string answer)
+               public virtual string ResetPassword (string passwordAnswer)
                {
-                       string newPass = Provider.ResetPassword (UserName, answer);
+                       string newPass = Provider.ResetPassword (UserName, passwordAnswer);
 
                        UpdateUser ();
                        
index ad9079c09fe9e909cd624643b058c472e66ca36b..6ea65718441454d7c2b20138362c577029db7798 100644 (file)
@@ -39,16 +39,16 @@ namespace System.Web.Security
                {
                }
                
-               public abstract void AddUsersToRoles (string [] usernames, string [] rolenames);
-               public abstract void CreateRole (string rolename);
-               public abstract bool DeleteRole (string rolename, bool throwOnPopulatedRole);
+               public abstract void AddUsersToRoles (string [] usernames, string [] roleNames);
+               public abstract void CreateRole (string roleName);
+               public abstract bool DeleteRole (string roleName, bool throwOnPopulatedRole);
                public abstract string [] FindUsersInRole (string roleName, string usernameToMatch);
                public abstract string [] GetAllRoles ();
                public abstract string [] GetRolesForUser (string username);
-               public abstract string [] GetUsersInRole (string rolename);
-               public abstract bool IsUserInRole (string username, string rolename);
-               public abstract void RemoveUsersFromRoles (string [] usernames, string [] rolenames);
-               public abstract bool RoleExists (string rolename);
+               public abstract string [] GetUsersInRole (string roleName);
+               public abstract bool IsUserInRole (string username, string roleName);
+               public abstract void RemoveUsersFromRoles (string [] usernames, string [] roleNames);
+               public abstract bool RoleExists (string roleName);
                public abstract string ApplicationName { get; set; }
        }
 }
index 5d3f278247ea539ff2de0fd17091828aaa43171b..dc21bcf31c1cea9773e28c1c19748bab0f7657a4 100644 (file)
@@ -86,7 +86,11 @@ $(STANDALONE_TEST_ASSEMBLY): $(the_assembly) Test/standalone-tests/Consts.cs
        $(CSCOMPILE) $(STANDALONE_TEST_MCS_FLAGS) -out:$@ -target:library @System.Web.Extensions_standalone_test.dll.sources
 
 Test/standalone-tests/Consts.cs: Test/standalone-tests/Consts.cs.in
+ifeq ($(PLATFORM), win32)
+       @sed 's,@SystemWebExtensionsClassDir@,$(shell cygpath -a -m .),' $< > $@
+else
        @sed 's,@SystemWebExtensionsClassDir@,$(shell pwd),' $< > $@
+endif
 
 include ../../build/library.make
 
index 9c05b6da132834d499f2ea1e75d2091544b16d35..fc53ba0bb3b833cb9888b1fa022b96c5a5276eff 100644 (file)
@@ -1,4 +1,4 @@
-//\r
+//\r
 // ScriptModule.cs\r
 //\r
 // Author:\r
@@ -37,10 +37,10 @@ namespace System.Web.Handlers
 {\r
        public class ScriptModule : IHttpModule\r
        {\r
-               protected virtual void Init (HttpApplication context) {\r
-                       context.PreSendRequestHeaders += new EventHandler (PreSendRequestHeaders);\r
-                       context.PostAcquireRequestState += new EventHandler (PostAcquireRequestState);\r
-                       context.AuthenticateRequest += new EventHandler (AuthenticateRequest);\r
+               protected virtual void Init (HttpApplication app) {\r
+                       app.PreSendRequestHeaders += new EventHandler (PreSendRequestHeaders);\r
+                       app.PostAcquireRequestState += new EventHandler (PostAcquireRequestState);\r
+                       app.AuthenticateRequest += new EventHandler (AuthenticateRequest);\r
                }\r
 \r
                void AuthenticateRequest (object sender, EventArgs e) {\r
index bb3c401d541af3c7b083bced6d92ba1e8c5b4b13..f09ccc9adc0d2e1bda7b82ef627bb6de989591c8 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // ScriptResourceAttribute.cs
 //
 // Author:
@@ -40,10 +40,10 @@ namespace System.Web.UI
                string _scriptResourceName;
                string _typeName;
 
-               public ScriptResourceAttribute (string scriptName, string scriptResourceName, string typeName) {
+               public ScriptResourceAttribute (string scriptName, string stringResourceName, string stringResourceClientTypeName) {
                        _scriptName = scriptName;
-                       _scriptResourceName = scriptResourceName;
-                       _typeName = typeName;
+                       _scriptResourceName = stringResourceName;
+                       _typeName = stringResourceClientTypeName;
                }
 
                public string ScriptName {
diff --git a/mcs/class/System.Web.Extensions/Test/standalone-tests/.gitignore b/mcs/class/System.Web.Extensions/Test/standalone-tests/.gitignore
new file mode 100644 (file)
index 0000000..e610081
--- /dev/null
@@ -0,0 +1 @@
+/Consts.cs
index ab36ccf501dd9ada4b0666ff3d2de854e6e424c7..2e8a8b33a886d1e71183ca44ab0b81ce77b6ad09 100644 (file)
@@ -57,7 +57,7 @@ namespace StandAloneTests.DataPager_NumericPagerField_Bug615315
                
                void TestQueryMode_Aspx_Start (string result, TestRunItem runItem)
                {
-                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><a disabled=""disabled"">First</a>&nbsp;<span>1</span>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=2"">2</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=3"">3</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=4"">4</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=5"">5</a>&nbsp;&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=6"">...</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=10"">Last</a>&nbsp;</span>";
+                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><a class=""aspNetDisabled"">First</a>&nbsp;<span>1</span>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=2"">2</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=3"">3</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=4"">4</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=5"">5</a>&nbsp;&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=6"">...</a>&nbsp;<a href=""/Test_QueryMode.aspx?pageNumber=10"">Last</a>&nbsp;</span>";
                        Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
                }
 
@@ -127,25 +127,25 @@ namespace StandAloneTests.DataPager_NumericPagerField_Bug615315
                
                void TestPostBackMode_Aspx_Start (string result, TestRunItem runItem)
                {
-                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" disabled=""disabled"" />&nbsp;<span>1</span>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl01','')"">2</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02','')"">3</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03','')"">4</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl04','')"">5</a>&nbsp;&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05','')"">...</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
+                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" disabled=""disabled"" />&nbsp;<span>1</span>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl01&#39;,&#39;&#39;)"">2</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02&#39;,&#39;&#39;)"">3</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03&#39;,&#39;&#39;)"">4</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl04&#39;,&#39;&#39;)"">5</a>&nbsp;&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05&#39;,&#39;&#39;)"">...</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
                        Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
                }
 
                void TestPostBackMode_Aspx_Page2 (string result, TestRunItem runItem)
                {
-                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" />&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl00','')"">1</a>&nbsp;<span>2</span>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02','')"">3</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03','')"">4</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl04','')"">5</a>&nbsp;&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05','')"">...</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
+                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" />&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl00&#39;,&#39;&#39;)"">1</a>&nbsp;<span>2</span>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02&#39;,&#39;&#39;)"">3</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03&#39;,&#39;&#39;)"">4</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl04&#39;,&#39;&#39;)"">5</a>&nbsp;&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05&#39;,&#39;&#39;)"">...</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
                        Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
                }
 
                void TestPostBackMode_Aspx_PageNext (string result, TestRunItem runItem)
                {
-                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" />&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl00','')"">...</a>&nbsp;<span>6</span>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02','')"">7</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03','')"">8</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl04','')"">9</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05','')"">10</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
+                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" />&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl00&#39;,&#39;&#39;)"">...</a>&nbsp;<span>6</span>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02&#39;,&#39;&#39;)"">7</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03&#39;,&#39;&#39;)"">8</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl04&#39;,&#39;&#39;)"">9</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05&#39;,&#39;&#39;)"">10</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
                        Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
                }
 
                void TestPostBackMode_Aspx_PagePrev (string result, TestRunItem runItem)
                {
-                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" />&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl00','')"">1</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl01','')"">2</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02','')"">3</a>&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03','')"">4</a>&nbsp;<span>5</span>&nbsp;&nbsp;<a href=""javascript:__doPostBack('ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05','')"">...</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
+                       string originalHtml = @"<span id=""ctl00_ContentPlaceHolder1_ListView1_DataPager1""><input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl00$ctl00"" value=""First"" />&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl00&#39;,&#39;&#39;)"">1</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl01&#39;,&#39;&#39;)"">2</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl02&#39;,&#39;&#39;)"">3</a>&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl03&#39;,&#39;&#39;)"">4</a>&nbsp;<span>5</span>&nbsp;&nbsp;<a href=""javascript:__doPostBack(&#39;ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl01$ctl05&#39;,&#39;&#39;)"">...</a>&nbsp;<input type=""submit"" name=""ctl00$ContentPlaceHolder1$ListView1$DataPager1$ctl02$ctl00"" value=""Last"" />&nbsp;</span>";
                        Helpers.ExtractAndCompareCodeFromHtml (result, originalHtml, "#A1");
                }
        }
index eb12379d18a2c76da2d04ee28e5130f79bd068bf..65c7d538856de0cd7e94bb6a0e5d0ff2affc9a98 100644 (file)
@@ -45,9 +45,9 @@ namespace System.Web.Configuration
                        properties = new ConfigurationPropertyCollection();
                }
 
-               public void Add (AssemblyInfo info)
+               public void Add (AssemblyInfo assemblyInformation)
                {
-                       BaseAdd (info, false);
+                       BaseAdd (assemblyInformation, false);
                }
                
                public void Clear ()
index 9150b7b7724682c4c155578db76b6837d85fe0d5..812b4b5fa4cd85b9ac641ba80652037937d59f6f 100644 (file)
@@ -74,8 +74,8 @@ namespace System.Web.Configuration {
                        set {  if (BaseGet(index) != null)  BaseRemoveAt(index);  BaseAdd(index, value); }
                }
 
-               public new BufferModeSettings this [string name] {
-                       get { return (BufferModeSettings) BaseGet (name); }
+               public new BufferModeSettings this [string key] {
+                       get { return (BufferModeSettings) BaseGet (key); }
                }
 
                protected internal override ConfigurationPropertyCollection Properties {
index 4ef5798fc293c6be8f1fea5057b502b32d15cda6..f35c51aac5dc16be8a132fa9cbe3f25f3bf12a0a 100644 (file)
@@ -99,8 +99,8 @@ namespace System.Web.Configuration {
                        set { if (BaseGet (index) != null) BaseRemoveAt (index); BaseAdd (index, value); }
                }
 
-               public new EventMappingSettings this [string name] {
-                       get { return (EventMappingSettings) BaseGet (name); }
+               public new EventMappingSettings this [string key] {
+                       get { return (EventMappingSettings) BaseGet (key); }
                }
 
                protected internal override ConfigurationPropertyCollection Properties {
index 7d314ac73c35366662f74559230c833e35663256..dd44ba4fa26b8a267ee0a2c163a3dc78f4b116da 100644 (file)
@@ -48,9 +48,9 @@ namespace System.Web.Configuration
                {
                }
                        
-               public void Add (HttpModuleAction httpModuleAction)
+               public void Add (HttpModuleAction httpModule)
                {
-                       BaseAdd (httpModuleAction);
+                       BaseAdd (httpModule);
                }
 
                public void Clear ()
index cb506ccf31ac28b49ec1136a452ad6d793386db9..d3dffccb01d67c086430ddf0cba2b8c561987fb7 100644 (file)
@@ -94,8 +94,8 @@ namespace System.Web.Configuration {
                        BaseRemoveAt (index);
                }
 
-               public new ProfileSettings this [string name] {
-                       get { return (ProfileSettings)BaseGet (name); }
+               public new ProfileSettings this [string key] {
+                       get { return (ProfileSettings)BaseGet (key); }
                }
 
                public ProfileSettings this [int index] {
index 2b66727eb5ba022987ec6c11e2143a69373a6f2e..eff9ad76e3436dfca8b1be68813d766782551a67 100644 (file)
@@ -51,9 +51,9 @@ namespace System.Web.Configuration
                        groupSettings = new ProfileGroupSettingsCollection ();
                }               
                
-               public override bool Equals (object obj)
+               public override bool Equals (object rootProfilePropertySettingsCollection)
                {
-                       RootProfilePropertySettingsCollection col = obj as RootProfilePropertySettingsCollection;
+                       RootProfilePropertySettingsCollection col = rootProfilePropertySettingsCollection as RootProfilePropertySettingsCollection;
                        if (col == null)
                                return false;
 
index 75ccd99b202a3d069879fbc1f340f0a2defb89ea..8598559f4525129e5dbf6a7336275a84f47b3d36 100644 (file)
@@ -94,8 +94,8 @@ namespace System.Web.Configuration {
                        BaseRemoveAt (index);
                }
 
-               public new RuleSettings this [string name] {
-                       get { return (RuleSettings) BaseGet (name); }
+               public new RuleSettings this [string key] {
+                       get { return (RuleSettings) BaseGet (key); }
                }
 
                public RuleSettings this [int index] {
index a8b129a119d967a349f45fa3643bed076bdb42dd..efdc4941021695b6bd92a235f89545c64c305a83 100644 (file)
@@ -69,9 +69,9 @@ namespace System.Web.Configuration
                        this.MappedTagType = mappedTagTypeName;
                }
 
-               public override bool Equals (object map)
+               public override bool Equals (object o)
                {
-                       TagMapInfo info = map as TagMapInfo;
+                       TagMapInfo info = o as TagMapInfo;
                        if (info == null)
                                return false;
 
index 478a207d82d15bf1bcfdb26fbcb7da45953dfb80..04097841934d7771bced7452fe113fcd99adadb5 100644 (file)
@@ -99,8 +99,8 @@ namespace System.Web.Configuration {
                        get { return "trustLevel"; }
                }
 
-               public new TrustLevel this [string name] {
-                       get { return (TrustLevel) BaseGet (name); }
+               public new TrustLevel this [string key] {
+                       get { return (TrustLevel) BaseGet (key); }
                }
 
                public TrustLevel this [int index] {
index 4b8a52f036de2deb44f292da94fd47541e04a425..2894a9009760fc7330bcedf7761d740fa77bb8e6 100644 (file)
 
 
 using System;
+using System.Collections.Generic;
 using System.Globalization;
+using System.Linq;
 using System.Security.Permissions;
 using System.Threading;
+using System.Threading.Tasks;
 using System.Web.Configuration;
 using System.Web.Caching;
 using System.Web.Util;
@@ -53,6 +56,8 @@ namespace System.Web.Hosting {
                static VirtualPathProvider vpath_provider = (HttpRuntime.AppDomainAppVirtualPath == null) ? null :
                                                                new DefaultVirtualPathProvider ();
                static int busy_count;
+               static BackgroundWorkScheduler _backgroundWorkScheduler = null; // created on demand
+               static readonly Task<object> _completedTask = Task.FromResult<object>(null);
 
                internal static bool HaveCustomVPP {
                        get;
@@ -212,6 +217,73 @@ namespace System.Web.Hosting {
                        if (Host != null)
                                Host.UnregisterObject (obj);
                }
+
+               // Schedules a task which can run in the background, independent of any request.
+               // This differs from a normal ThreadPool work item in that ASP.NET can keep track
+               // of how many work items registered through this API are currently running, and
+               // the ASP.NET runtime will try not to delay AppDomain shutdown until these work
+               // items have finished executing.
+               //
+               // Usage notes:
+               // - This API cannot be called outside of an ASP.NET-managed AppDomain.
+               // - The caller's ExecutionContext is not flowed to the work item.
+               // - Scheduled work items are not guaranteed to ever execute, e.g., when AppDomain
+               //   shutdown has already started by the time this API was called.
+               // - The provided CancellationToken will be signaled when the application is
+               //   shutting down. The work item should make every effort to honor this token.
+               //   If a work item does not honor this token and continues executing it will
+               //   eventually be considered rogue, and the ASP.NET runtime will rudely unload
+               //   the AppDomain without waiting for the work item to finish.
+               //
+               // This overload of QueueBackgroundWorkItem takes a void-returning callback; the
+               // work item will be considered finished when the callback returns.
+               [SecurityPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+               public static void QueueBackgroundWorkItem(Action<CancellationToken> workItem) {
+                       if (workItem == null) {
+                               throw new ArgumentNullException("workItem");
+                       }
+
+                       QueueBackgroundWorkItem(ct => { workItem(ct); return _completedTask; });
+               }
+
+               // See documentation on the other overload for a general API overview.
+               //
+               // This overload of QueueBackgroundWorkItem takes a Task-returning callback; the
+               // work item will be considered finished when the returned Task transitions to a
+               // terminal state.
+               [SecurityPermission(SecurityAction.LinkDemand, Unrestricted = true)]
+               public static void QueueBackgroundWorkItem(Func<CancellationToken, Task> workItem) {
+                       if (workItem == null) {
+                               throw new ArgumentNullException("workItem");
+                       }
+                       if (Host == null) {
+                               throw new InvalidOperationException(); // can only be called within an ASP.NET AppDomain
+                       }
+
+                       QueueBackgroundWorkItemInternal(workItem);
+               }
+
+               static void QueueBackgroundWorkItemInternal(Func<CancellationToken, Task> workItem) {
+                       Debug.Assert(workItem != null);
+
+                       BackgroundWorkScheduler scheduler = Volatile.Read(ref _backgroundWorkScheduler);
+
+                       // If the scheduler doesn't exist, lazily create it, but only allow one instance to ever be published to the backing field
+                       if (scheduler == null) {
+                               BackgroundWorkScheduler newlyCreatedScheduler = new BackgroundWorkScheduler(UnregisterObject, WriteUnhandledException);
+                               scheduler = Interlocked.CompareExchange(ref _backgroundWorkScheduler, newlyCreatedScheduler, null) ?? newlyCreatedScheduler;
+                               if (scheduler == newlyCreatedScheduler) {
+                                       RegisterObject(scheduler); // Only call RegisterObject if we just created the "winning" one
+                               }
+                       }
+
+                       scheduler.ScheduleWorkItem(workItem);
+               }
+
+               static void WriteUnhandledException (AppDomain appDomain, Exception exception)
+               {
+                       Console.Error.WriteLine ("Error in background work item: " + exception);
+               }
        }
 }
 
index 93fcadc9b65dffd7f15e54b0f63d85a52dcb8a21..8f81fd61c484ee52d665f94296a35cbabd46949a 100644 (file)
@@ -37,8 +37,8 @@ namespace System.Web.Hosting
         public interface IAppManagerAppDomainFactory
         {
                [return: MarshalAs (UnmanagedType.Interface)]
-                object Create ([In, MarshalAs(UnmanagedType.BStr)] string s,
-                              [In, MarshalAs(UnmanagedType.BStr)] string app_id);
+                object Create ([In, MarshalAs(UnmanagedType.BStr)] string appId,
+                              [In, MarshalAs(UnmanagedType.BStr)] string appPath);
                 void Stop ();
         }
 }
index 9a8c42dc6f85905f1a511faf40b6a54ab65ac115..d46422584756f3f96ad3063dcc2526ec7b462b54 100644 (file)
@@ -33,6 +33,6 @@ namespace System.Web.Management
 {
         public interface IWebEventCustomEvaluator
         {
-                bool CanFire (WebBaseEvent raised_event, RuleFiringRecord record);
+                bool CanFire (WebBaseEvent raisedEvent, RuleFiringRecord record);
         }
 }
index a7cd1a8e04289343c138177e05445f14459fe8b8..ef2adb8bda950d4cc5cf54949b74c0d593aeb81a 100644 (file)
@@ -36,19 +36,19 @@ namespace System.Web.Management
                 object event_source;
                 int event_code, event_detail_code;
 
-                protected WebBaseEvent (string message, object event_source, int event_code)
+                protected WebBaseEvent (string message, object eventSource, int eventCode)
                 {
                         this.message = message;
-                        this.event_source = event_source;
-                        this.event_code = event_code;
+                        this.event_source = eventSource;
+                        this.event_code = eventCode;
                 }
 
-                protected WebBaseEvent (string message, object event_source, int event_code, int event_detail_code)
+                protected WebBaseEvent (string message, object eventSource, int eventCode, int eventDetailCode)
                 {
                         this.message = message;
-                        this.event_source = event_source;
-                        this.event_code = event_code;
-                        this.event_detail_code = event_detail_code;
+                        this.event_source = eventSource;
+                        this.event_code = eventCode;
+                        this.event_detail_code = eventDetailCode;
                 }
                 
                 public static WebApplicationInformation ApplicationInformation {
@@ -116,7 +116,7 @@ namespace System.Web.Management
                         throw new NotImplementedException ();
                 }
 
-                public static void Raise (WebBaseEvent event_raised)
+                public static void Raise (WebBaseEvent eventRaised)
                 {
                         throw new NotImplementedException ();
                 }
@@ -126,7 +126,7 @@ namespace System.Web.Management
                         throw new NotImplementedException ();
                 }
 
-                public virtual string ToString (bool include_app_info, bool include_custom_event_details)
+                public virtual string ToString (bool includeAppInfo, bool includeCustomEventDetails)
                 {
                         throw new NotImplementedException ();
                 }
index 79b503fc6775c8f27f2f56374a6fc18d4294a88d..4d40d02016ee4f6068ac47c9f19b36ade159fa9b 100644 (file)
@@ -37,19 +37,19 @@ namespace System.Web.Security {
        public class ActiveDirectoryMembershipProvider : MembershipProvider {
                
                [MonoTODO ("Not implemented")]
-               public override bool ChangePassword (string username, string oldPwd, string newPwd)
+               public override bool ChangePassword (string username, string oldPassword, string newPassword)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO ("Not implemented")]
-               public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
+               public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer)
                {
                        throw new NotImplementedException ();
                }
                
                [MonoTODO ("Not implemented")]
-               public override MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
+               public override MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
                {
                        throw new NotImplementedException ();
                }
@@ -73,7 +73,7 @@ namespace System.Web.Security {
                }
                
                [MonoTODO ("Not implemented")]
-               public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
+               public override MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
                {
                        throw new NotImplementedException ();
                }
@@ -91,7 +91,7 @@ namespace System.Web.Security {
                }
                
                [MonoTODO("Not implemented")]
-               public override string GetPassword (string username, string answer)
+               public override string GetPassword (string username, string passwordAnswer)
                {
                        throw new NotImplementedException ();
                }
@@ -121,7 +121,7 @@ namespace System.Web.Security {
                }
                
                [MonoTODO("Not implemented")]
-               public override string ResetPassword (string username, string answer)
+               public override string ResetPassword (string username, string passwordAnswer)
                {
                        throw new NotImplementedException ();
                }
@@ -139,7 +139,7 @@ namespace System.Web.Security {
                }
                
                [MonoTODO("Not implemented")]
-               public override bool UnlockUser (string userName)
+               public override bool UnlockUser (string username)
                {
                        throw new NotImplementedException ();
                }
index dbedffc04b70a37d026494d253f389575a3f4b03..35fd75d96deb8e8d8825d74d9d56b7a971da2aca 100644 (file)
@@ -83,12 +83,12 @@ namespace System.Web.Security
                        return usr;
                }
                
-               public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, out MembershipCreateStatus status)
+               public static MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, out MembershipCreateStatus status)
                {
-                       return CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, null, out status);
+                       return CreateUser (username, password, email, passwordQuestion, passwordAnswer, isApproved, null, out status);
                }
                
-               public static MembershipUser CreateUser (string username, string password, string email, string pwdQuestion, string pwdAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
+               public static MembershipUser CreateUser (string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out MembershipCreateStatus status)
                {
                        if (String.IsNullOrEmpty (username)) {
                                status = MembershipCreateStatus.InvalidUserName;
@@ -100,7 +100,7 @@ namespace System.Web.Security
                                return null;
                        }
 
-                       return Provider.CreateUser (username, password, email, pwdQuestion, pwdAnswer, isApproved, providerUserKey, out status);
+                       return Provider.CreateUser (username, password, email, passwordQuestion, passwordAnswer, isApproved, providerUserKey, out status);
                }
                
                public static bool DeleteUser (string username)
@@ -221,9 +221,9 @@ namespace System.Web.Security
                        return Provider.GetUser (providerUserKey, userIsOnline);
                }
                
-               public static string GetUserNameByEmail (string email)
+               public static string GetUserNameByEmail (string emailToMatch)
                {
-                       return Provider.GetUserNameByEmail (email);
+                       return Provider.GetUserNameByEmail (emailToMatch);
                }
                
                public static void UpdateUser (MembershipUser user)
@@ -247,15 +247,15 @@ namespace System.Web.Security
                        return Provider.FindUsersByEmail (emailToMatch, pageIndex, pageSize, out totalRecords);
                }
                
-               public static MembershipUserCollection FindUsersByName (string nameToMatch)
+               public static MembershipUserCollection FindUsersByName (string usernameToMatch)
                {
                        int totalRecords;
-                       return Provider.FindUsersByName (nameToMatch, 0, int.MaxValue, out totalRecords);
+                       return Provider.FindUsersByName (usernameToMatch, 0, int.MaxValue, out totalRecords);
                }
                
-               public static MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
+               public static MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
                {
-                       return Provider.FindUsersByName (nameToMatch, pageIndex, pageSize, out totalRecords);
+                       return Provider.FindUsersByName (usernameToMatch, pageIndex, pageSize, out totalRecords);
                }
 
                public static string ApplicationName {
index 7ec98ead7d6f4f9011b60c71dfd8e54171f64334..f799c71258e8d0f593e28423f228479a060ce2de 100644 (file)
@@ -46,29 +46,29 @@ namespace System.Web.Security {
                }
 
 
-               public static void AddUsersToRole (string [] usernames, string rolename)
+               public static void AddUsersToRole (string [] usernames, string roleName)
                {
-                       Provider.AddUsersToRoles (usernames, new string[] {rolename});
+                       Provider.AddUsersToRoles (usernames, new string[] {roleName});
                }
                
-               public static void AddUsersToRoles (string [] usernames, string [] rolenames)
+               public static void AddUsersToRoles (string [] usernames, string [] roleNames)
                {
-                       Provider.AddUsersToRoles (usernames, rolenames);
+                       Provider.AddUsersToRoles (usernames, roleNames);
                }
                
-               public static void AddUserToRole (string username, string rolename)
+               public static void AddUserToRole (string username, string roleName)
                {
-                       Provider.AddUsersToRoles (new string[] {username}, new string[] {rolename});
+                       Provider.AddUsersToRoles (new string[] {username}, new string[] {roleName});
                }
                
-               public static void AddUserToRoles (string username, string [] rolenames)
+               public static void AddUserToRoles (string username, string [] roleNames)
                {
-                       Provider.AddUsersToRoles (new string[] {username}, rolenames);
+                       Provider.AddUsersToRoles (new string[] {username}, roleNames);
                }
                
-               public static void CreateRole (string rolename)
+               public static void CreateRole (string roleName)
                {
-                       Provider.CreateRole (rolename);
+                       Provider.CreateRole (roleName);
                }
                
                public static void DeleteCookie ()
@@ -91,14 +91,14 @@ namespace System.Web.Security {
                        }
                }
                
-               public static bool DeleteRole (string rolename)
+               public static bool DeleteRole (string roleName)
                {
-                       return Provider.DeleteRole (rolename, true);
+                       return Provider.DeleteRole (roleName, true);
                }
                
-               public static bool DeleteRole (string rolename, bool throwOnPopulatedRole)
+               public static bool DeleteRole (string roleName, bool throwOnPopulatedRole)
                {
-                       return Provider.DeleteRole (rolename, throwOnPopulatedRole);
+                       return Provider.DeleteRole (roleName, throwOnPopulatedRole);
                }
                
                public static string [] GetAllRoles ()
@@ -125,51 +125,51 @@ namespace System.Web.Security {
                        return Provider.GetRolesForUser (username);
                }
                
-               public static string [] GetUsersInRole (string rolename)
+               public static string [] GetUsersInRole (string roleName)
                {
-                       return Provider.GetUsersInRole (rolename);
+                       return Provider.GetUsersInRole (roleName);
                }
                
-               public static bool IsUserInRole (string rolename)
+               public static bool IsUserInRole (string roleName)
                {
-                       return IsUserInRole (CurrentUser, rolename);
+                       return IsUserInRole (CurrentUser, roleName);
                }
                
-               public static bool IsUserInRole (string username, string rolename)
+               public static bool IsUserInRole (string username, string roleName)
                {
                        if (String.IsNullOrEmpty (username))
                                return false;
-                       return Provider.IsUserInRole (username, rolename);
+                       return Provider.IsUserInRole (username, roleName);
                }
                
-               public static void RemoveUserFromRole (string username, string rolename)
+               public static void RemoveUserFromRole (string username, string roleName)
                {
-                       Provider.RemoveUsersFromRoles (new string[] {username}, new string[] {rolename});
+                       Provider.RemoveUsersFromRoles (new string[] {username}, new string[] {roleName});
                }
                
-               public static void RemoveUserFromRoles (string username, string [] rolenames)
+               public static void RemoveUserFromRoles (string username, string [] roleNames)
                {
-                       Provider.RemoveUsersFromRoles (new string[] {username}, rolenames);
+                       Provider.RemoveUsersFromRoles (new string[] {username}, roleNames);
                }
                
-               public static void RemoveUsersFromRole (string [] usernames, string rolename)
+               public static void RemoveUsersFromRole (string [] usernames, string roleName)
                {
-                       Provider.RemoveUsersFromRoles (usernames, new string[] {rolename});
+                       Provider.RemoveUsersFromRoles (usernames, new string[] {roleName});
                }
                
-               public static void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
+               public static void RemoveUsersFromRoles (string [] usernames, string [] roleNames)
                {
-                       Provider.RemoveUsersFromRoles (usernames, rolenames);
+                       Provider.RemoveUsersFromRoles (usernames, roleNames);
                }
                
-               public static bool RoleExists (string rolename)
+               public static bool RoleExists (string roleName)
                {
-                       return Provider.RoleExists (rolename);
+                       return Provider.RoleExists (roleName);
                }
                
-               public static string[] FindUsersInRole (string rolename, string usernameToMatch)
+               public static string[] FindUsersInRole (string roleName, string usernameToMatch)
                {
-                       return Provider.FindUsersInRole (rolename, usernameToMatch);
+                       return Provider.FindUsersInRole (roleName, usernameToMatch);
                }
                
                public static string ApplicationName {
index cca4e838166cbbd279bf56d9ee389d7c6dd54f6c..820acd502e2eded6595e077fd7a7f4b59e91e300 100644 (file)
@@ -122,28 +122,28 @@ namespace System.Web.Security {
                                throw new ArgumentException (String.Format ("invalid format for {0}", pName));
                }
 
-               public override bool ChangePassword (string username, string oldPwd, string newPwd)
+               public override bool ChangePassword (string username, string oldPassword, string newPassword)
                {
                        if (username != null) username = username.Trim ();
-                       if (oldPwd != null) oldPwd = oldPwd.Trim ();
-                       if (newPwd != null) newPwd = newPwd.Trim ();
+                       if (oldPassword != null) oldPassword = oldPassword.Trim ();
+                       if (newPassword != null) newPassword = newPassword.Trim ();
 
                        CheckParam ("username", username, 256);
-                       CheckParam ("oldPwd", oldPwd, 128);
-                       CheckParam ("newPwd", newPwd, 128);
+                       CheckParam ("oldPassword", oldPassword, 128);
+                       CheckParam ("newPassword", newPassword, 128);
 
-                       if (!CheckPassword (newPwd))
+                       if (!CheckPassword (newPassword))
                                throw new ArgumentException (string.Format (
                                                "New Password invalid. New Password length minimum: {0}. Non-alphanumeric characters required: {1}.",
                                                MinRequiredPasswordLength,
                                                MinRequiredNonAlphanumericCharacters));
 
                        using (DbConnection connection = CreateConnection ()) {
-                               PasswordInfo pi = ValidateUsingPassword (username, oldPwd);
+                               PasswordInfo pi = ValidateUsingPassword (username, oldPassword);
 
                                if (pi != null) {
-                                       EmitValidatingPassword (username, newPwd, false);
-                                       string db_password = EncodePassword (newPwd, pi.PasswordFormat, pi.PasswordSalt);
+                                       EmitValidatingPassword (username, newPassword, false);
+                                       string db_password = EncodePassword (newPassword, pi.PasswordFormat, pi.PasswordSalt);
 
                                        DbCommand command = factory.CreateCommand ();
                                        command.Connection = connection;
@@ -169,23 +169,23 @@ namespace System.Web.Security {
                        }
                }
 
-               public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPwdQuestion, string newPwdAnswer)
+               public override bool ChangePasswordQuestionAndAnswer (string username, string password, string newPasswordQuestion, string newPasswordAnswer)
                {
                        if (username != null) username = username.Trim ();
-                       if (newPwdQuestion != null) newPwdQuestion = newPwdQuestion.Trim ();
-                       if (newPwdAnswer != null) newPwdAnswer = newPwdAnswer.Trim ();
+                       if (newPasswordQuestion != null) newPasswordQuestion = newPasswordQuestion.Trim ();
+                       if (newPasswordAnswer != null) newPasswordAnswer = newPasswordAnswer.Trim ();
 
                        CheckParam ("username", username, 256);
                        if (RequiresQuestionAndAnswer)
-                               CheckParam ("newPwdQuestion", newPwdQuestion, 128);
+                               CheckParam ("newPasswordQuestion", newPasswordQuestion, 128);
                        if (RequiresQuestionAndAnswer)
-                               CheckParam ("newPwdAnswer", newPwdAnswer, 128);
+                               CheckParam ("newPasswordAnswer", newPasswordAnswer, 128);
 
                        using (DbConnection connection = CreateConnection ()) {
                                PasswordInfo pi = ValidateUsingPassword (username, password);
 
                                if (pi != null) {
-                                       string db_passwordAnswer = EncodePassword (newPwdAnswer, pi.PasswordFormat, pi.PasswordSalt);
+                                       string db_passwordAnswer = EncodePassword (newPasswordAnswer, pi.PasswordFormat, pi.PasswordSalt);
 
                                        DbCommand command = factory.CreateCommand ();
                                        command.Connection = connection;
@@ -194,7 +194,7 @@ namespace System.Web.Security {
 
                                        AddParameter (command, "@ApplicationName", ApplicationName);
                                        AddParameter (command, "@UserName", username);
-                                       AddParameter (command, "@NewPasswordQuestion", newPwdQuestion);
+                                       AddParameter (command, "@NewPasswordQuestion", newPasswordQuestion);
                                        AddParameter (command, "@NewPasswordAnswer", db_passwordAnswer);
                                        DbParameter returnValue = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
 
@@ -212,8 +212,8 @@ namespace System.Web.Security {
                public override MembershipUser CreateUser (string username,
                                                           string password,
                                                           string email,
-                                                          string pwdQuestion,
-                                                          string pwdAnswer,
+                                                          string passwordQuestion,
+                                                          string passwordAnswer,
                                                           bool isApproved,
                                                           object providerUserKey,
                                                           out MembershipCreateStatus status)
@@ -221,8 +221,8 @@ namespace System.Web.Security {
                        if (username != null) username = username.Trim ();
                        if (password != null) password = password.Trim ();
                        if (email != null) email = email.Trim ();
-                       if (pwdQuestion != null) pwdQuestion = pwdQuestion.Trim ();
-                       if (pwdAnswer != null) pwdAnswer = pwdAnswer.Trim ();
+                       if (passwordQuestion != null) passwordQuestion = passwordQuestion.Trim ();
+                       if (passwordAnswer != null) passwordAnswer = passwordAnswer.Trim ();
 
                        /* some initial validation */
                        if (username == null || username.Length == 0 || username.Length > 256 || username.IndexOf (',') != -1) {
@@ -245,14 +245,14 @@ namespace System.Web.Security {
                                return null;
                        }
                        if (RequiresQuestionAndAnswer &&
-                               (pwdQuestion == null ||
-                                pwdQuestion.Length == 0 || pwdQuestion.Length > 256)) {
+                               (passwordQuestion == null ||
+                                passwordQuestion.Length == 0 || passwordQuestion.Length > 256)) {
                                status = MembershipCreateStatus.InvalidQuestion;
                                return null;
                        }
                        if (RequiresQuestionAndAnswer &&
-                               (pwdAnswer == null ||
-                                pwdAnswer.Length == 0 || pwdAnswer.Length > 128)) {
+                               (passwordAnswer == null ||
+                                passwordAnswer.Length == 0 || passwordAnswer.Length > 128)) {
                                status = MembershipCreateStatus.InvalidAnswer;
                                return null;
                        }
@@ -275,7 +275,7 @@ namespace System.Web.Security {
 
                        password = EncodePassword (password, PasswordFormat, passwordSalt);
                        if (RequiresQuestionAndAnswer)
-                               pwdAnswer = EncodePassword (pwdAnswer, PasswordFormat, passwordSalt);
+                               passwordAnswer = EncodePassword (passwordAnswer, PasswordFormat, passwordSalt);
 
                        /* make sure the hashed/encrypted password and
                         * answer are still under 128 characters. */
@@ -285,7 +285,7 @@ namespace System.Web.Security {
                        }
 
                        if (RequiresQuestionAndAnswer) {
-                               if (pwdAnswer.Length > 128) {
+                               if (passwordAnswer.Length > 128) {
                                        status = MembershipCreateStatus.InvalidAnswer;
                                        return null;
                                }
@@ -307,8 +307,8 @@ namespace System.Web.Security {
                                        AddParameter (command, "@Password", password);
                                        AddParameter (command, "@PasswordSalt", passwordSalt);
                                        AddParameter (command, "@Email", email);
-                                       AddParameter (command, "@PasswordQuestion", pwdQuestion);
-                                       AddParameter (command, "@PasswordAnswer", pwdAnswer);
+                                       AddParameter (command, "@PasswordQuestion", passwordQuestion);
+                                       AddParameter (command, "@PasswordAnswer", passwordAnswer);
                                        AddParameter (command, "@IsApproved", isApproved);
                                        AddParameter (command, "@CurrentTimeUtc", Now);
                                        AddParameter (command, "@CreateDate", Now);
@@ -429,9 +429,9 @@ namespace System.Web.Security {
                        }
                }
 
-               public override MembershipUserCollection FindUsersByName (string nameToMatch, int pageIndex, int pageSize, out int totalRecords)
+               public override MembershipUserCollection FindUsersByName (string usernameToMatch, int pageIndex, int pageSize, out int totalRecords)
                {
-                       CheckParam ("nameToMatch", nameToMatch, 256);
+                       CheckParam ("usernameToMatch", usernameToMatch, 256);
 
                        if (pageIndex < 0)
                                throw new ArgumentException ("pageIndex must be >= 0");
@@ -449,7 +449,7 @@ namespace System.Web.Security {
 
                                AddParameter (command, "@PageIndex", pageIndex);
                                AddParameter (command, "@PageSize", pageSize);
-                               AddParameter (command, "@UserNameToMatch", nameToMatch);
+                               AddParameter (command, "@UserNameToMatch", usernameToMatch);
                                AddParameter (command, "@ApplicationName", ApplicationName);
                                // return value
                                AddParameter (command, "@ReturnValue", ParameterDirection.ReturnValue, null);
@@ -529,20 +529,20 @@ namespace System.Web.Security {
                        }
                }
 
-               public override string GetPassword (string username, string answer)
+               public override string GetPassword (string username, string passwordAnswer)
                {
                        if (!EnablePasswordRetrieval)
                                throw new NotSupportedException ("this provider has not been configured to allow the retrieval of passwords");
 
                        CheckParam ("username", username, 256);
                        if (RequiresQuestionAndAnswer)
-                               CheckParam ("answer", answer, 128);
+                               CheckParam ("passwordAnswer", passwordAnswer, 128);
 
                        PasswordInfo pi = GetPasswordInfo (username);
                        if (pi == null)
                                throw new ProviderException ("An error occurred while retrieving the password from the database");
 
-                       string user_answer = EncodePassword (answer, pi.PasswordFormat, pi.PasswordSalt);
+                       string user_answer = EncodePassword (passwordAnswer, pi.PasswordFormat, pi.PasswordSalt);
                        string password = null;
 
                        using (DbConnection connection = CreateConnection ()) {
@@ -790,7 +790,7 @@ namespace System.Web.Security {
                                ProvidersHelper.GetDbProviderFactory (connectionString.ProviderName);
                }
 
-               public override string ResetPassword (string username, string answer)
+               public override string ResetPassword (string username, string passwordAnswer)
                {
                        if (!EnablePasswordReset)
                                throw new NotSupportedException ("this provider has not been configured to allow the resetting of passwords");
@@ -798,7 +798,7 @@ namespace System.Web.Security {
                        CheckParam ("username", username, 256);
 
                        if (RequiresQuestionAndAnswer)
-                               CheckParam ("answer", answer, 128);
+                               CheckParam ("passwordAnswer", passwordAnswer, 128);
 
                        using (DbConnection connection = CreateConnection ()) {
 
@@ -810,7 +810,7 @@ namespace System.Web.Security {
                                EmitValidatingPassword (username, newPassword, false);
 
                                string db_password = EncodePassword (newPassword, pi.PasswordFormat, pi.PasswordSalt);
-                               string db_answer = EncodePassword (answer, pi.PasswordFormat, pi.PasswordSalt);
+                               string db_answer = EncodePassword (passwordAnswer, pi.PasswordFormat, pi.PasswordSalt);
 
                                DbCommand command = factory.CreateCommand ();
                                command.Connection = connection;
index 76ed81a58fce80463fa35ac52b4f87b80dfe3a55..770645f0445288eef79ed94acf41356f51656d77 100644 (file)
@@ -87,7 +87,7 @@ namespace System.Web.Security
                        return dbp;
                }
 
-               public override void AddUsersToRoles (string [] usernames, string [] rolenames)
+               public override void AddUsersToRoles (string [] usernames, string [] roleNames)
                {
                        Hashtable h = new Hashtable ();
 
@@ -102,7 +102,7 @@ namespace System.Web.Security
                        }
 
                        h = new Hashtable ();
-                       foreach (string r in rolenames) {
+                       foreach (string r in roleNames) {
                                if (r == null)
                                        throw new ArgumentNullException ("null element in rolenames array");
                                if (h.ContainsKey (r))
@@ -119,7 +119,7 @@ namespace System.Web.Security
                                command.Connection = connection;
                                command.CommandType = CommandType.StoredProcedure;
 
-                               AddParameter (command, "@RoleNames", String.Join (",", rolenames));
+                               AddParameter (command, "@RoleNames", String.Join (",", roleNames));
                                AddParameter (command, "@UserNames", String.Join (",", usernames));
                                AddParameter (command, "@ApplicationName", ApplicationName);
                                AddParameter (command, "@CurrentTimeUtc", DateTime.UtcNow);
@@ -139,12 +139,12 @@ namespace System.Web.Security
                        }
                }
 
-               public override void CreateRole (string rolename)
+               public override void CreateRole (string roleName)
                {
-                       if (rolename == null)
-                               throw new ArgumentNullException ("rolename");
+                       if (roleName == null)
+                               throw new ArgumentNullException ("roleName");
 
-                       if (rolename.Length == 0 || rolename.Length > 256 || rolename.IndexOf (',') != -1)
+                       if (roleName.Length == 0 || roleName.Length > 256 || roleName.IndexOf (',') != -1)
                                throw new ArgumentException ("rolename is in invalid format");
 
                        using (DbConnection connection = CreateConnection ()) {
@@ -154,25 +154,25 @@ namespace System.Web.Security
                                command.CommandType = CommandType.StoredProcedure;
                                
                                AddParameter (command, "@ApplicationName", ApplicationName);
-                               AddParameter (command, "@RoleName", rolename);
+                               AddParameter (command, "@RoleName", roleName);
                                DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
 
                                command.ExecuteNonQuery ();
                                int returnValue = (int) dbpr.Value;
 
                                if (returnValue == 1)
-                                       throw new ProviderException (rolename + " already exists in the database");
+                                       throw new ProviderException (roleName + " already exists in the database");
                                else
                                        return;
                        }
                }
 
-               public override bool DeleteRole (string rolename, bool throwOnPopulatedRole)
+               public override bool DeleteRole (string roleName, bool throwOnPopulatedRole)
                {
-                       if (rolename == null)
-                               throw new ArgumentNullException ("rolename");
+                       if (roleName == null)
+                               throw new ArgumentNullException ("roleName");
 
-                       if (rolename.Length == 0 || rolename.Length > 256 || rolename.IndexOf (',') != -1)
+                       if (roleName.Length == 0 || roleName.Length > 256 || roleName.IndexOf (',') != -1)
                                throw new ArgumentException ("rolename is in invalid format");
 
                        using (DbConnection connection = CreateConnection ()) {
@@ -182,7 +182,7 @@ namespace System.Web.Security
                                command.Connection = connection;
                                command.CommandType = CommandType.StoredProcedure;
                                AddParameter (command, "@ApplicationName", ApplicationName);
-                               AddParameter (command, "@RoleName", rolename);
+                               AddParameter (command, "@RoleName", roleName);
                                AddParameter (command, "@DeleteOnlyIfRoleIsEmpty", throwOnPopulatedRole);
                                DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
 
@@ -194,7 +194,7 @@ namespace System.Web.Security
                                if (returnValue == 1)
                                        return false; //role does not exist
                                else if (returnValue == 2 && throwOnPopulatedRole)
-                                       throw new ProviderException (rolename + " is not empty");
+                                       throw new ProviderException (roleName + " is not empty");
                                else
                                        return false;
                        }
@@ -272,7 +272,7 @@ namespace System.Web.Security
                        }
                }
 
-               public override string [] GetUsersInRole (string rolename)
+               public override string [] GetUsersInRole (string roleName)
                {
                        using (DbConnection connection = CreateConnection ()) {
                                DbCommand command = factory.CreateCommand ();
@@ -280,7 +280,7 @@ namespace System.Web.Security
                                command.Connection = connection;
 
                                command.CommandType = CommandType.StoredProcedure;
-                               AddParameter (command, "@RoleName", rolename);
+                               AddParameter (command, "@RoleName", roleName);
                                AddParameter (command, "@ApplicationName", ApplicationName);
 
                                DbDataReader reader = command.ExecuteReader ();
@@ -327,7 +327,7 @@ namespace System.Web.Security
                                ProvidersHelper.GetDbProviderFactory (connectionString.ProviderName);
                }
 
-               public override bool IsUserInRole (string username, string rolename)
+               public override bool IsUserInRole (string username, string roleName)
                {
                        using (DbConnection connection = CreateConnection ()) {
                                DbCommand command = factory.CreateCommand ();
@@ -335,7 +335,7 @@ namespace System.Web.Security
                                command.Connection = connection;
 
                                command.CommandType = CommandType.StoredProcedure;
-                               AddParameter (command, "@RoleName", rolename);
+                               AddParameter (command, "@RoleName", roleName);
                                AddParameter (command, "@UserName", username);
                                AddParameter (command, "@ApplicationName", ApplicationName);
                                DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
@@ -350,7 +350,7 @@ namespace System.Web.Security
                        }
                }
 
-               public override void RemoveUsersFromRoles (string [] usernames, string [] rolenames)
+               public override void RemoveUsersFromRoles (string [] usernames, string [] roleNames)
                {
                        Hashtable h = new Hashtable ();
 
@@ -365,7 +365,7 @@ namespace System.Web.Security
                        }
 
                        h = new Hashtable ();
-                       foreach (string r in rolenames) {
+                       foreach (string r in roleNames) {
                                if (r == null)
                                        throw new ArgumentNullException ("null element in rolenames array");
                                if (h.ContainsKey (r))
@@ -382,7 +382,7 @@ namespace System.Web.Security
                                command.CommandType = CommandType.StoredProcedure;
 
                                AddParameter (command, "@UserNames", String.Join (",", usernames));
-                               AddParameter (command, "@RoleNames", String.Join (",", rolenames));
+                               AddParameter (command, "@RoleNames", String.Join (",", roleNames));
                                AddParameter (command, "@ApplicationName", ApplicationName);
                                DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
 
@@ -402,7 +402,7 @@ namespace System.Web.Security
                        }
                }
 
-               public override bool RoleExists (string rolename)
+               public override bool RoleExists (string roleName)
                {
                        using (DbConnection connection = CreateConnection ()) {
 
@@ -412,7 +412,7 @@ namespace System.Web.Security
                                command.CommandType = CommandType.StoredProcedure;
 
                                AddParameter (command, "@ApplicationName", ApplicationName);
-                               AddParameter (command, "@RoleName", rolename);
+                               AddParameter (command, "@RoleName", roleName);
                                DbParameter dbpr = AddParameter (command, "@ReturnVal", ParameterDirection.ReturnValue, DbType.Int32, null);
 
                                command.ExecuteNonQuery ();
index 9428f68e0a1304f91da00797f2ab329cc436100d..f2b6e54b8e7b83ba8294de642d2466ce807707da 100644 (file)
@@ -86,9 +86,9 @@ public sealed class HttpSessionState : ICollection, IEnumerable
                get { return container.IsSynchronized; }
        }
 
-       public object this [string key] {
-               get { return container [key]; }
-               set { container [key] = value; }
+       public object this [string name] {
+               get { return container [name]; }
+               set { container [name] = value; }
        }
 
        public object this [int index] {
index b0bb4d063312595889031f98c723f678fd4f5136..d3d5b80ab0be5570e0bba174be22abff5c72b1f3 100644 (file)
@@ -37,11 +37,11 @@ namespace System.Web.SessionState {
        {
                ///methods
                void Abandon ();
-               void Add (string itemName, object itemValue);
+               void Add (string name, object value);
                void Clear ();
-               void CopyTo (Array sessionValues, int index);
+               void CopyTo (Array array, int index);
                IEnumerator GetEnumerator ();
-               void Remove (string itemName);
+               void Remove (string name);
                void RemoveAll ();
                void RemoveAt (int index);
        
index 272ab9b8e273486d62a2f23b957f722bdc87b0dc..d70a46a04a954f68e9b6df4e81ff0f32b7ef7570 100644 (file)
@@ -41,7 +41,7 @@ namespace System.Web.SessionState {
                void Initialize ();
                bool InitializeRequest (HttpContext context, bool suppressAutoDetectRedirect, out bool supportSessionIDReissue);
                void RemoveSessionID (HttpContext context);
-               void SaveSessionID (HttpContext context, string sessionID, out bool isRedirected, out bool isCookieAdded);
+               void SaveSessionID (HttpContext context, string id, out bool redirected, out bool cookieAdded);
                bool Validate (string id);
        }
 }
index 56e8f0110afd9ba5a549c7243e72f57ad4f37ca8..9cabdb0bea83b14f70af0a1718222744caab5d04 100644 (file)
@@ -36,7 +36,7 @@ namespace System.Web.SessionState {
        {
                ///methods
                void Clear ();
-               void Remove (string itemName);
+               void Remove (string name);
                void RemoveAt (int index);
        
                ///properties
index 7e4b770bcf9d7e11986d1276e2808480f09bb8a2..93343e98aa19b6761e180a6759aa3636b46edf49 100644 (file)
@@ -38,12 +38,12 @@ namespace System.Web.SessionState {
                HttpStaticObjectsCollection staticObjects;
                int timeout;
 
-               public SessionStateStoreData (ISessionStateItemCollection items,
-                                               HttpStaticObjectsCollection objects,
+               public SessionStateStoreData (ISessionStateItemCollection sessionItems,
+                                               HttpStaticObjectsCollection staticObjects,
                                                int timeout)
                {
-                       sessionItems = items;
-                       staticObjects = objects;
+                       this.sessionItems = sessionItems;
+                       this.staticObjects = staticObjects;
                        this.timeout = timeout;
                }
 
index ea0aa13b97df70875b3c7d3ffc115140804e2548..9fe54d8b7362f04d3b39673f4f9e845a1550259f 100644 (file)
@@ -92,9 +92,9 @@ namespace System.Web.UI.Adapters
                        }
                }
 
-               protected internal virtual void BeginRender (HtmlTextWriter w)
+               protected internal virtual void BeginRender (HtmlTextWriter writer)
                {
-                       w.BeginRender();
+                       writer.BeginRender();
                }
 
                protected internal virtual void CreateChildControls ()
@@ -104,9 +104,9 @@ namespace System.Web.UI.Adapters
                                control.CreateChildControls ();
                }
 
-               protected internal virtual void EndRender (HtmlTextWriter w)
+               protected internal virtual void EndRender (HtmlTextWriter writer)
                {
-                       w.EndRender ();
+                       writer.EndRender ();
                }
 
                protected internal virtual void LoadAdapterControlState (object state)
@@ -149,20 +149,20 @@ namespace System.Web.UI.Adapters
                                control.OnUnload(e);
                }
 
-               protected internal virtual void Render (HtmlTextWriter w)
+               protected internal virtual void Render (HtmlTextWriter writer)
                {
                        Control control = Control;
 
                        if (control != null)
-                               control.Render (w);
+                               control.Render (writer);
                }
 
-               protected internal virtual void RenderChildren (HtmlTextWriter w)
+               protected internal virtual void RenderChildren (HtmlTextWriter writer)
                {
                        Control control = Control;
 
                        if (control != null)
-                               control.RenderChildren (w);
+                               control.RenderChildren (writer);
                }
 
                protected internal virtual object SaveAdapterControlState ()
index a86a98f71be152bb9696bbfb9439e7195a5fcdf2..77a75ec3ac23591e0c45f9bd31c482cb7f3a197b 100644 (file)
@@ -89,23 +89,23 @@ namespace System.Web.UI.Adapters
                                radioButtons.Add(radioButton);
                }
 
-               public virtual void RenderBeginHyperlink (HtmlTextWriter w,
+               public virtual void RenderBeginHyperlink (HtmlTextWriter writer,
                                                          string targetUrl,
                                                          bool encodeUrl,
-                                                         string softKeyLabel)
+                                                         string softkeyLabel)
                {
-                       InternalRenderBeginHyperlink (w, targetUrl, encodeUrl, softKeyLabel, null);
+                       InternalRenderBeginHyperlink (writer, targetUrl, encodeUrl, softkeyLabel, null);
                }
 
-               public virtual void RenderBeginHyperlink (HtmlTextWriter w,
+               public virtual void RenderBeginHyperlink (HtmlTextWriter writer,
                                                          string targetUrl,
                                                          bool encodeUrl,
-                                                         string softKeyLabel,
+                                                         string softkeyLabel,
                                                          string accessKey)
                {
                        if (accessKey != null && accessKey.Length > 1)
                                throw new ArgumentOutOfRangeException("accessKey");
-                       InternalRenderBeginHyperlink (w, targetUrl, encodeUrl, softKeyLabel, accessKey);
+                       InternalRenderBeginHyperlink (writer, targetUrl, encodeUrl, softkeyLabel, accessKey);
                }
                
                void InternalRenderBeginHyperlink (HtmlTextWriter w,
@@ -121,35 +121,35 @@ namespace System.Web.UI.Adapters
                }
                
                
-               public virtual void RenderEndHyperlink (HtmlTextWriter w)
+               public virtual void RenderEndHyperlink (HtmlTextWriter writer)
                {
-                       w.RenderEndTag();
+                       writer.RenderEndTag();
                }
 
-               public virtual void RenderPostBackEvent (HtmlTextWriter w,
+               public virtual void RenderPostBackEvent (HtmlTextWriter writer,
                                                         string target,
                                                         string argument,
-                                                        string softKeyLabel,
+                                                        string softkeyLabel,
                                                         string text)
                {
-                       RenderPostBackEvent (w, target, argument, softKeyLabel, text, Page.Request.FilePath, null, true);
+                       RenderPostBackEvent (writer, target, argument, softkeyLabel, text, Page.Request.FilePath, null, true);
                }
 
-               public virtual void RenderPostBackEvent (HtmlTextWriter w,
+               public virtual void RenderPostBackEvent (HtmlTextWriter writer,
                                                         string target,
                                                         string argument,
-                                                        string softKeyLabel,
+                                                        string softkeyLabel,
                                                         string text,
                                                         string postUrl,
                                                         string accessKey)
                {
-                       RenderPostBackEvent (w, target, argument, softKeyLabel, text, postUrl, accessKey, true);
+                       RenderPostBackEvent (writer, target, argument, softkeyLabel, text, postUrl, accessKey, true);
                }
 
-               protected void RenderPostBackEvent (HtmlTextWriter w,
+               protected void RenderPostBackEvent (HtmlTextWriter writer,
                                                    string target,
                                                    string argument,
-                                                   string softKeyLabel,
+                                                   string softkeyLabel,
                                                    string text,
                                                    string postUrl,
                                                    string accessKey,
@@ -157,9 +157,9 @@ namespace System.Web.UI.Adapters
                {
                        string url = String.Format ("{0}?__VIEWSTATE={1}&__EVENTTARGET={2}&__EVENTARGUMENT={3}&__PREVIOUSPAGE={4}",
                                postUrl, HttpUtility.UrlEncode (Page.GetSavedViewState ()), target, argument, Page.Request.FilePath);
-                       RenderBeginHyperlink (w, url, encode, softKeyLabel, accessKey);
-                       w.Write(text);
-                       RenderEndHyperlink(w);
+                       RenderBeginHyperlink (writer, url, encode, softkeyLabel, accessKey);
+                       writer.Write(text);
+                       RenderEndHyperlink(writer);
                }
 
                public virtual string TransformText (string text) 
@@ -167,9 +167,9 @@ namespace System.Web.UI.Adapters
                        return text;
                }
                
-               protected internal virtual string GetPostBackFormReference (string formID)
+               protected internal virtual string GetPostBackFormReference (string formId)
                {
-                       return String.Format("document.forms['{0}']", formID);
+                       return String.Format("document.forms['{0}']", formId);
                }
                
                ListDictionary radio_button_group;
index 495b941099cadedb3088c7adeddd89a96d783039..4fa9af17d06a4936d74c7e3aeef34201cc161a75 100644 (file)
@@ -216,7 +216,7 @@ namespace System.Web.UI.HtmlControls
                        base.OnPreRender(e);
                }
 
-               protected override void RenderAttributes (HtmlTextWriter w)
+               protected override void RenderAttributes (HtmlTextWriter writer)
                {
                        /* Need to always render: method, action and id
                         */
@@ -268,12 +268,12 @@ namespace System.Web.UI.HtmlControls
                                        if (RenderingCompatibilityLessThan40)
                                                // LAMESPEC: MSDN says the 'name' attribute is rendered only in
                                                // Legacy mode, this is not true.
-                                               w.WriteAttribute ("name", Name);
+                                               writer.WriteAttribute ("name", Name);
                        }
                        
-                       w.WriteAttribute ("method", Method);
+                       writer.WriteAttribute ("method", Method);
                        if (String.IsNullOrEmpty (customAction))
-                               w.WriteAttribute ("action", action, true);
+                               writer.WriteAttribute ("action", action, true);
 
                        /*
                         * This is a hack that guarantees the ID is set properly for HtmlControl to
@@ -292,7 +292,7 @@ namespace System.Web.UI.HtmlControls
                        string submit = page != null ? page.GetSubmitStatements () : null;
                        if (!String.IsNullOrEmpty (submit)) {
                                Attributes.Remove ("onsubmit");
-                               w.WriteAttribute ("onsubmit", submit);
+                               writer.WriteAttribute ("onsubmit", submit);
                        }
                        
                        /* enctype and target should not be written if
@@ -300,11 +300,11 @@ namespace System.Web.UI.HtmlControls
                         */
                        string enctype = Enctype;
                        if (!String.IsNullOrEmpty (enctype))
-                               w.WriteAttribute ("enctype", enctype);
+                               writer.WriteAttribute ("enctype", enctype);
 
                        string target = Target;
                        if (!String.IsNullOrEmpty (target))
-                               w.WriteAttribute ("target", target);
+                               writer.WriteAttribute ("target", target);
 
                        string defaultbutton = DefaultButton;
                        if (!String.IsNullOrEmpty (defaultbutton)) {
@@ -315,7 +315,7 @@ namespace System.Web.UI.HtmlControls
                                                                                           ID));
 
                                if (page != null && DetermineRenderUplevel ()) {
-                                       w.WriteAttribute (
+                                       writer.WriteAttribute (
                                                "onkeypress",
                                                "javascript:return " + page.WebFormScriptReference + ".WebForm_FireDefaultButton(event, '" + c.ClientID + "')");
                                }
@@ -328,10 +328,10 @@ namespace System.Web.UI.HtmlControls
                        Attributes.Remove ("enctype");
                        Attributes.Remove ("target");
 
-                       base.RenderAttributes (w);
+                       base.RenderAttributes (writer);
                }
 
-               protected internal override void RenderChildren (HtmlTextWriter w)
+               protected internal override void RenderChildren (HtmlTextWriter writer)
                {
                        Page page = Page;
                        
@@ -340,22 +340,22 @@ namespace System.Web.UI.HtmlControls
                                page.RegisterForm (this);
                        }
                        if (page != null)
-                               page.OnFormRender (w, ClientID);
-                       base.RenderChildren (w);
+                               page.OnFormRender (writer, ClientID);
+                       base.RenderChildren (writer);
                        if (page != null)
-                               page.OnFormPostRender (w, ClientID);
+                               page.OnFormPostRender (writer, ClientID);
                }
 
                /* According to corcompare */
                [MonoTODO ("why override?")]
-               public override void RenderControl (HtmlTextWriter w)
+               public override void RenderControl (HtmlTextWriter writer)
                {
-                       base.RenderControl (w);
+                       base.RenderControl (writer);
                }
 
-               protected internal override void Render (HtmlTextWriter w)
+               protected internal override void Render (HtmlTextWriter output)
                {
-                       base.Render (w);
+                       base.Render (output);
                }
        }
 }
index 871e22e6ad9dbf83aa0f635b5c98eb995473abc1..dfee69482279de53ecc3b81ca591f9bfe3643efb 100644 (file)
@@ -185,9 +185,9 @@ namespace System.Web.UI.HtmlControls
                        }
                }
 
-               protected override void RenderAttributes (HtmlTextWriter w)
+               protected override void RenderAttributes (HtmlTextWriter writer)
                {
-                       PreProcessRelativeReference (w, "src");
+                       PreProcessRelativeReference (writer, "src");
 
                        /* MS does not seem to render the src attribute if it
                         * is empty. Firefox, at least, will fetch the current
@@ -197,13 +197,13 @@ namespace System.Web.UI.HtmlControls
                        if (src == null || src.Length == 0)
                                Attributes.Remove ("src");
 
-                       base.RenderAttributes (w);
+                       base.RenderAttributes (writer);
 
                        /* MS closes the HTML element at the end of
                         * the attributes too, according to the nunit
                         * tests
                         */
-                       w.Write (" /");
+                       writer.Write (" /");
                }
        }
 }
index 5416e3af666aa2834319955581f9ef419569c64a..fb1dbdc20a3cff6090bf3edeb6ff4745d0176fc1 100644 (file)
@@ -585,7 +585,7 @@ namespace System.Web.UI.HtmlControls
                        }
                }
                
-               protected override void RenderAttributes (HtmlTextWriter w)
+               protected override void RenderAttributes (HtmlTextWriter writer)
                {
                        Page page = Page;
                        if (page != null)
@@ -594,7 +594,7 @@ namespace System.Web.UI.HtmlControls
                        /* If there is no "name" attribute,
                         * LoadPostData doesn't work...
                         */
-                       w.WriteAttribute ("name", Name);
+                       writer.WriteAttribute ("name", Name);
                        Attributes.Remove ("name");
                        
                        /* Don't render the databinding attributes */
@@ -602,24 +602,24 @@ namespace System.Web.UI.HtmlControls
                        Attributes.Remove ("datatextfield");
                        Attributes.Remove ("datavaluefield");
                        
-                       base.RenderAttributes (w);
+                       base.RenderAttributes (writer);
                }
                
-               protected internal override void RenderChildren (HtmlTextWriter w)
+               protected internal override void RenderChildren (HtmlTextWriter writer)
                {
-                       base.RenderChildren (w);
+                       base.RenderChildren (writer);
 
                        if (items == null)
                                return;
                        
-                       w.WriteLine ();
+                       writer.WriteLine ();
 
                        bool done_sel = false;
                        
                        int count = items.Count;
                        for (int i = 0; i < count; i++) {
                                ListItem item = items[i];
-                               w.Indent++;
+                               writer.Indent++;
                                
                                /* Write the <option> elements this
                                 * way so that the output HTML matches
@@ -628,29 +628,29 @@ namespace System.Web.UI.HtmlControls
                                 * element, cos that breaks other
                                 * stuff.)
                                 */
-                               w.WriteBeginTag ("option");
+                               writer.WriteBeginTag ("option");
                                if (item.Selected && !done_sel) {
 
-                                       w.WriteAttribute ("selected", "selected");
+                                       writer.WriteAttribute ("selected", "selected");
 
                                        if (!Multiple) {
                                                done_sel = true;
                                        }
                                }
                                
-                               w.WriteAttribute ("value", item.Value, true);
+                               writer.WriteAttribute ("value", item.Value, true);
                                if (item.HasAttributes) {
                                        AttributeCollection attrs = item.Attributes;
                                        foreach (string key in attrs.Keys)
-                                               w.WriteAttribute (key, HttpUtility.HtmlAttributeEncode (attrs [key]));
+                                               writer.WriteAttribute (key, HttpUtility.HtmlAttributeEncode (attrs [key]));
                                }
-                               w.Write (HtmlTextWriter.TagRightChar);
+                               writer.Write (HtmlTextWriter.TagRightChar);
                                
-                               w.Write (HttpUtility.HtmlEncode(item.Text));
-                               w.WriteEndTag ("option");
-                               w.WriteLine ();
+                               writer.Write (HttpUtility.HtmlEncode(item.Text));
+                               writer.WriteEndTag ("option");
+                               writer.WriteLine ();
 
-                               w.Indent--;
+                               writer.Indent--;
                        }
                }
 
index 0ddd1f85537e27ef5a68c8a303084544c25768c9..d69f398988a328b0e3d5b7e1a60efd98a50c5dbc 100644 (file)
@@ -54,9 +54,9 @@ namespace System.Web.UI.WebControls.WebParts
                        InnerList.AddRange (connectionInterfaces);
                }
 
-               public bool Contains (Type t)
+               public bool Contains (Type value)
                {
-                       return InnerList.Contains (t);
+                       return InnerList.Contains (value);
                }
 
                public void CopyTo (Type[] array, 
@@ -65,9 +65,9 @@ namespace System.Web.UI.WebControls.WebParts
                        InnerList.CopyTo (array, index);
                }
 
-               public int IndexOf (Type t)
+               public int IndexOf (Type value)
                {
-                       return InnerList.IndexOf (t);
+                       return InnerList.IndexOf (value);
                }
 
                public Type this [ int index ] {
index 55b14d558c29881f2ff6da91fce4f6f33604c7fe..414fb2eed1f02580c0ca768747419cf1f1667285 100644 (file)
@@ -32,10 +32,10 @@ namespace System.Web.UI.WebControls.WebParts
 {
        public class ConsumerConnectionPoint : ConnectionPoint
        {
-               public ConsumerConnectionPoint (MethodInfo callBack, Type interFace,
-                       Type control, string name, string id, 
-                       bool allowsMultiConnections) : base (callBack, interFace,
-                                       control, name, id, allowsMultiConnections)
+               public ConsumerConnectionPoint (MethodInfo callbackMethod, Type interfaceType,
+                       Type controlType, string displayName, string id, 
+                       bool allowsMultipleConnections) : base (callbackMethod, interfaceType,
+                                       controlType, displayName, id, allowsMultipleConnections)
                {                       
                }
 
index ccf929e3955a15cac87f7d1f2092582968a05ca1..ce66e17394fd28c5287c01fd3f9169eded5ec1a3 100644 (file)
@@ -32,10 +32,10 @@ namespace System.Web.UI.WebControls.WebParts
 {
        public class ProviderConnectionPoint : ConnectionPoint
        {
-               public ProviderConnectionPoint (MethodInfo callBack, Type interFace,
-                       Type control, string name, string id,
-                       bool allowsMultiConnections) : base (callBack, interFace,
-                                       control, name, id, allowsMultiConnections)
+               public ProviderConnectionPoint (MethodInfo callbackMethod, Type interfaceType,
+                       Type controlType, string displayName, string id,
+                       bool allowsMultipleConnections) : base (callbackMethod, interfaceType,
+                                       controlType, displayName, id, allowsMultipleConnections)
                {
                }
 
index f67c7391df077613585923ba50cb12815004724f..38b281967997623173d9f1b697f246226cc1f55a 100644 (file)
@@ -53,11 +53,11 @@ namespace System.Web.UI.WebControls.WebParts
                        get { return id;}
                }
 
-               public WebPartVerb (string id, string clientHandler) {
+               public WebPartVerb (string id, string clientClickHandler) {
                        this.id = id;
-                       this.clientClickHandler = clientHandler;
+                       this.clientClickHandler = clientClickHandler;
                        stateBag = new StateBag ();
-                       stateBag.Add ("clientClickHandler", clientHandler);
+                       stateBag.Add ("clientClickHandler", clientClickHandler);
                }
 
 
index 4e866c0b4ac621cf5c183a42fac00663ec2b7ec6..42a36909e1b7ce7feb47a0b13bdea2fc3a0e1751 100644 (file)
@@ -53,7 +53,7 @@ namespace System.Web.UI.WebControls
                        base.OnInit(e);
                }
 
-               protected internal override void OnPreRender (EventArgs eee)
+               protected internal override void OnPreRender (EventArgs e)
                {
                        Hashtable ht = null;
                        
@@ -62,9 +62,9 @@ namespace System.Web.UI.WebControls
                                ht = ChooseAd ();
                        }
 
-                       AdCreatedEventArgs e = new AdCreatedEventArgs (ht);
-                       OnAdCreated (e);
-                       createdargs = e;
+                       AdCreatedEventArgs ev = new AdCreatedEventArgs (ht);
+                       OnAdCreated (ev);
+                       createdargs = ev;
                        
                }
 
@@ -80,27 +80,27 @@ namespace System.Web.UI.WebControls
                        throw new NotImplementedException ();
                }
 
-               protected internal override void Render (HtmlTextWriter w)
+               protected internal override void Render (HtmlTextWriter writer)
                {
                        AdCreatedEventArgs e = createdargs;
 
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
 
                        if (e.NavigateUrl != null && e.NavigateUrl.Length > 0)
-                               w.AddAttribute (HtmlTextWriterAttribute.Href, ResolveAdUrl (e.NavigateUrl));
+                               writer.AddAttribute (HtmlTextWriterAttribute.Href, ResolveAdUrl (e.NavigateUrl));
                        if (Target != null && Target.Length > 0)
-                               w.AddAttribute (HtmlTextWriterAttribute.Target, Target);
+                               writer.AddAttribute (HtmlTextWriterAttribute.Target, Target);
                        
-                       w.RenderBeginTag (HtmlTextWriterTag.A);
+                       writer.RenderBeginTag (HtmlTextWriterTag.A);
 
                        if (e.ImageUrl != null && e.ImageUrl.Length > 0)
-                               w.AddAttribute (HtmlTextWriterAttribute.Src, ResolveAdUrl (e.ImageUrl));
+                               writer.AddAttribute (HtmlTextWriterAttribute.Src, ResolveAdUrl (e.ImageUrl));
 
-                       w.AddAttribute (HtmlTextWriterAttribute.Alt, e.AlternateText == null ? String.Empty : e.AlternateText);
-                       w.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
-                       w.RenderBeginTag (HtmlTextWriterTag.Img);
-                       w.RenderEndTag (); // img
-                       w.RenderEndTag (); // a
+                       writer.AddAttribute (HtmlTextWriterAttribute.Alt, e.AlternateText == null ? String.Empty : e.AlternateText);
+                       writer.AddAttribute (HtmlTextWriterAttribute.Border, "0", false);
+                       writer.RenderBeginTag (HtmlTextWriterTag.Img);
+                       writer.RenderEndTag (); // img
+                       writer.RenderEndTag (); // a
                }
 
                string ResolveAdUrl (string url)
index 5969ffcc9b3fa45a31aafbefb034428efc304b9b..8f0af318c4fb8a5b8d273b3765023a0adaabfedd 100644 (file)
@@ -44,7 +44,7 @@ namespace System.Web.UI.WebControls
                {
                }
 
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
                        if (RenderUplevel) {
                                if (Page != null) {
@@ -69,7 +69,7 @@ namespace System.Web.UI.WebControls
                                }
                        }
 
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                }
 
                public static bool CanConvert (string text,
@@ -87,9 +87,9 @@ namespace System.Web.UI.WebControls
                        return BaseCompareValidator.Convert(text, type, false, out value);
                }
 
-               protected static bool Compare (string left, string right, ValidationCompareOperator op, ValidationDataType type)
+               protected static bool Compare (string leftText, string rightText, ValidationCompareOperator op, ValidationDataType type)
                {
-                       return BaseCompareValidator.Compare(left, false, right, false, op, type);       
+                       return BaseCompareValidator.Compare(leftText, false, rightText, false, op, type);       
                }
 
                protected override bool DetermineRenderUplevel ()
@@ -134,7 +134,7 @@ namespace System.Web.UI.WebControls
                        return order.ToString ();
                }
 
-               protected static int GetFullYear (int two_digit_year)
+               protected static int GetFullYear (int shortYear)
                {
                        /* This is an implementation that matches the
                         * docs on msdn, but MS doesn't seem to go by
@@ -142,10 +142,10 @@ namespace System.Web.UI.WebControls
                        int cutoff = CutoffYear;
                        int twodigitcutoff = cutoff % 100;
 
-                       if (two_digit_year <= twodigitcutoff)
-                               return cutoff - twodigitcutoff + two_digit_year;
+                       if (shortYear <= twodigitcutoff)
+                               return cutoff - twodigitcutoff + shortYear;
                        else
-                               return cutoff - twodigitcutoff - 100 + two_digit_year;
+                               return cutoff - twodigitcutoff - 100 + shortYear;
                }
 
                [DefaultValue (false)]
@@ -175,16 +175,16 @@ namespace System.Web.UI.WebControls
                        return Convert(text, type, cultureInvariant, out value);
                }
 
-               protected static bool Compare (string left, 
+               protected static bool Compare (string leftText
                                               bool cultureInvariantLeftText, 
-                                              string right, 
+                                              string rightText
                                               bool cultureInvariantRightText, 
                                               ValidationCompareOperator op, 
                                               ValidationDataType type)
                {
                        object lo, ro;
 
-                       if (!Convert(left, type, cultureInvariantLeftText, out lo))
+                       if (!Convert(leftText, type, cultureInvariantLeftText, out lo))
                                return false;
 
                        /* DataTypeCheck is a unary operator that only
@@ -195,7 +195,7 @@ namespace System.Web.UI.WebControls
                        /* pretty crackladen, but if we're unable to
                         * convert the rhs to @type, the comparison
                         * succeeds */
-                       if (!Convert(right, type, cultureInvariantRightText, out ro))
+                       if (!Convert(rightText, type, cultureInvariantRightText, out ro))
                                return true;
 
                        int comp = ((IComparable)lo).CompareTo((IComparable)ro);
index 5b30e41aa85a66b2e5385f0f11066f547ad5ea3d..77a24f745094f5fd9e3d1ccb5a5f29f4bd143b1c 100644 (file)
@@ -287,13 +287,13 @@ namespace System.Web.UI.WebControls
                        return o.ToString ();
                }
 
-               public static PropertyDescriptor GetValidationProperty (object o)
+               public static PropertyDescriptor GetValidationProperty (object component)
                {
                        PropertyDescriptorCollection props;
                        System.ComponentModel.AttributeCollection col;
 
-                       props = TypeDescriptor.GetProperties (o);
-                       col = TypeDescriptor.GetAttributes (o);
+                       props = TypeDescriptor.GetProperties (component);
+                       col = TypeDescriptor.GetAttributes (component);
 
                        foreach (Attribute at in col) {
                                ValidationPropertyAttribute vpa = at as ValidationPropertyAttribute;
index 8f067835b7533cb476d588ed2649d532d8e51654..acfb922daefe36502384de9b70617980e217afda 100644 (file)
@@ -186,12 +186,12 @@ namespace System.Web.UI.WebControls
                        get { return true; }
                }
                
-               protected virtual string FormatDataValue (object value, bool encode)
+               protected virtual string FormatDataValue (object dataValue, bool encode)
                {
                        string res;
                        bool htmlEncodeFormatString = HtmlEncodeFormatString;
-                       string stringValue = (value != null) ? value.ToString () : String.Empty;
-                       if (value == null || (stringValue.Length == 0 && ConvertEmptyStringToNull)) {
+                       string stringValue = (dataValue != null) ? dataValue.ToString () : String.Empty;
+                       if (dataValue == null || (stringValue.Length == 0 && ConvertEmptyStringToNull)) {
                                if (NullDisplayText.Length == 0) {
                                        encode = false;
                                        res = "&nbsp;";
@@ -201,7 +201,7 @@ namespace System.Web.UI.WebControls
                                string format = DataFormatString;
                                if (!String.IsNullOrEmpty (format)) {
                                        if (!encode || htmlEncodeFormatString)
-                                               res = String.Format (format, value);
+                                               res = String.Format (format, dataValue);
                                        else
                                                res = String.Format (format, encode ? HttpUtility.HtmlEncode (stringValue) : stringValue);
                                } else
index 30c1827bea938540395d32ffb49ae3757d91d961..fd0f857bb615e68cc90bf6bdeae74cad5386d01d 100644 (file)
@@ -107,14 +107,14 @@ namespace System.Web.UI.WebControls
                        return base.Initialize (sortingEnabled, control);
                }
                
-               protected virtual string FormatDataTextValue (object value)
+               protected virtual string FormatDataTextValue (object dataTextValue)
                {
                        if (DataTextFormatString.Length > 0)
-                               return String.Format (DataTextFormatString, value);
-                       else if (value == null)
+                               return String.Format (DataTextFormatString, dataTextValue);
+                       else if (dataTextValue == null)
                                return String.Empty;
                        else
-                               return value.ToString ();
+                               return dataTextValue.ToString ();
                }
                
                public override void InitializeCell (DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
index 5f67b35db343e39b6a9969ce331839607fb54a1c..1f7f7da5b0d19e6df524381bad568f7077e9202d 100644 (file)
@@ -542,24 +542,24 @@ namespace System.Web.UI.WebControls
                        RaisePostBackEvent (eventArgument);
                }
 
-               protected virtual void RaisePostBackEvent (string arg)
+               protected virtual void RaisePostBackEvent (string eventArgument)
                {
-                       ValidateEvent (UniqueID, arg);
-                       if (arg.Length < 1)
+                       ValidateEvent (UniqueID, eventArgument);
+                       if (eventArgument.Length < 1)
                                return;
 
-                       if (arg[0] == 'V') { // Goes to Next or Previous month
+                       if (eventArgument[0] == 'V') { // Goes to Next or Previous month
                                DateTime prev = VisibleDate;
-                               int days = Int32.Parse (arg.Substring (1));
+                               int days = Int32.Parse (eventArgument.Substring (1));
                                DateTime dt = GetGlobalCalendar().AddDays (dateZenith, days);
                                VisibleDate = dt;
                                OnVisibleMonthChanged (VisibleDate, prev);
                                return;
                        }
 
-                       if (arg[0] == 'R') { // Selects a range of dates
+                       if (eventArgument[0] == 'R') { // Selects a range of dates
                                string num, date, days;
-                               num = arg.Substring (1);
+                               num = eventArgument.Substring (1);
                                days = num.Substring (num.Length - 2, 2);
                                date = num.Substring (0, num.Length - 2);
                                DateTime d = GetGlobalCalendar().AddDays (dateZenith, Int32.Parse (date));
@@ -569,7 +569,7 @@ namespace System.Web.UI.WebControls
                        }
 
                        // Selects a single day
-                       int daysFromZenith = Int32.Parse (arg);
+                       int daysFromZenith = Int32.Parse (eventArgument);
                        DateTime day = GetGlobalCalendar().AddDays (dateZenith, daysFromZenith);
                        SelectedDates.SelectRange (day, day);
                        OnSelectionChanged ();
index 27c3a7fb9dc870f7018c9a6956ef0871173ecb54..7579eb9428c1fe94ec2614a669d07759c04f0d01 100644 (file)
@@ -304,7 +304,7 @@ namespace System.Web.UI.WebControls
                        return false;
                }
 
-               protected internal override void Render (HtmlTextWriter w)
+               protected internal override void Render (HtmlTextWriter writer)
                {
                        Page page = Page;
                        if (page != null) {
@@ -318,38 +318,38 @@ namespace System.Web.UI.WebControls
                                if (!RenderingCompatibilityLessThan40)
                                        ControlStyle.PrependCssClass (DisabledCssClass);
                                else
-                                       w.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Disabled, "disabled", false);
                                need_span = true;
                        }
 
                        if (need_span) {
-                               AddDisplayStyleAttribute (w);
-                               ControlStyle.AddAttributesToRender (w, this);
+                               AddDisplayStyleAttribute (writer);
+                               ControlStyle.AddAttributesToRender (writer, this);
                        }
                        
                        string tt = ToolTip;
                        if (tt != null && tt.Length > 0){
-                               w.AddAttribute ("title", tt);
+                               writer.AddAttribute ("title", tt);
                                need_span = true;
                        }
 
-                       if (HasAttributes && AddAttributesForSpan (w))
+                       if (HasAttributes && AddAttributesForSpan (writer))
                                need_span = true;
                        
                        if (need_span)
-                               w.RenderBeginTag (HtmlTextWriterTag.Span);
+                               writer.RenderBeginTag (HtmlTextWriterTag.Span);
 
                        TextAlign align = TextAlign;
                        if (align == TextAlign.Right) {
-                               RenderInput (w, enabled);
-                               RenderLabel (w);
+                               RenderInput (writer, enabled);
+                               RenderLabel (writer);
                        } else {
-                               RenderLabel (w);
-                               RenderInput (w, enabled);
+                               RenderLabel (writer);
+                               RenderInput (writer, enabled);
                        }
 
                        if (need_span)
-                               w.RenderEndTag ();
+                               writer.RenderEndTag ();
                }
 
                void RenderInput (HtmlTextWriter w, bool enabled)
index 207a32319b994ce974f7d2c8e5586f807b23e32c..f9015f2ef0362be0811458df90f5ce152bd14463 100644 (file)
@@ -43,7 +43,7 @@ namespace System.Web.UI.WebControls
                {
                }
 
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
                        if (RenderUplevel) {
                                RegisterExpandoAttribute (ClientID, "evaluationfunction", "CompareValidatorEvaluateIsValid");
@@ -54,7 +54,7 @@ namespace System.Web.UI.WebControls
                                RegisterExpandoAttribute (ClientID, "operator", Operator.ToString ());
                        }
 
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                }
 
                protected override bool ControlPropertiesValid ()
index 88614e2a1b4573ffb1cc99d3363d9edc0abccc08..beeaf5365653a4b2301a934cd79a67f4f357e7ea 100644 (file)
@@ -53,12 +53,12 @@ namespace System.Web.UI.WebControls
                        base.DataBind();
                }
 
-               protected internal override void Render (HtmlTextWriter w)
+               protected internal override void Render (HtmlTextWriter writer)
                {
                        /* make sure all the child controls have been created */
                        EnsureChildControls ();
                        /* and then... */
-                       base.Render (w);
+                       base.Render (writer);
                }
 
                void ICompositeControlDesignerAccessor.RecreateChildControls ()
index a94d6a3560a4fe70fba7fd8e998bf286958ef155..fe82e5895a6b80231e8aceae07f12ef2decdf9e5 100644 (file)
@@ -78,7 +78,7 @@ namespace System.Web.UI.WebControls
                        return new ControlParameter (this);
                }
                protected internal
-               override object Evaluate (HttpContext ctx, Control control)
+               override object Evaluate (HttpContext context, Control control)
                {
                        if (control == null)
                                return null;
index be5171213f371dd52366709a39314c99b3801f99..1b7b3e3f474fbbddd186f323f08d74af1e7851ec 100644 (file)
@@ -68,12 +68,12 @@ namespace System.Web.UI.WebControls
                        return new CookieParameter (this);
                }
                protected internal
-               override object Evaluate (HttpContext ctx, Control control)
+               override object Evaluate (HttpContext context, Control control)
                {
-                       if (ctx == null || ctx.Request == null)
+                       if (context == null || context.Request == null)
                                return null;
                        
-                       HttpCookie c = ctx.Request.Cookies [CookieName];
+                       HttpCookie c = context.Request.Cookies [CookieName];
                        if (c == null)
                                return null;
                        
index 2335873bddc2c1befd8eb7bc0b805dde2c7aa866..4865a5cb55e3d39802c8d2e51eb67bd0b7fde813 100644 (file)
@@ -36,13 +36,13 @@ namespace System.Web.UI.WebControls
        {
                DataControlField containerField;
                
-               public DataControlFieldCell (DataControlField containerField) : this (HtmlTextWriterTag.Td, containerField)
+               public DataControlFieldCell (DataControlField containingField) : this (HtmlTextWriterTag.Td, containingField)
                {               
                }
                
-               protected DataControlFieldCell (HtmlTextWriterTag tagKey, DataControlField containerField) : base (tagKey)
+               protected DataControlFieldCell (HtmlTextWriterTag tagKey, DataControlField containingField) : base (tagKey)
                {
-                       this.containerField = containerField;
+                       this.containerField = containingField;
                }
 
                public DataControlField ContainingField {
index 080ebcf5f28a660f37be53938a2f70953e8bb359..cd4fd52bc92dc528f32c116456b8dcae3cbe4cea 100644 (file)
@@ -94,8 +94,8 @@ namespace System.Web.UI.WebControls
                }
                
                [Browsable (false)]
-               public DataControlField this [int i] {
-                       get { return (DataControlField) ((IList)this) [i]; }
+               public DataControlField this [int index] {
+                       get { return (DataControlField) ((IList)this) [index]; }
                }
 
                protected override void OnInsertComplete (int index, object value)
index 2d2d958e588b2af9632b46f3272286655991fd31..6911a856791485f6f348b1fa1eda3435a360f9ed 100644 (file)
@@ -35,7 +35,7 @@ namespace System.Web.UI.WebControls
        {
                TableHeaderScope scope;
                
-               public DataControlFieldHeaderCell (DataControlField containerField): base (HtmlTextWriterTag.Th, containerField)
+               public DataControlFieldHeaderCell (DataControlField containingField): base (HtmlTextWriterTag.Th, containingField)
                {
                }
                
index c87a6b05e9affdf52e068f2d246791bf978621c0..1567f25d0d2222b7701a069adc3963dc9c51e214 100644 (file)
@@ -83,15 +83,15 @@ namespace System.Web.UI.WebControls
                #endregion      // IDataItemContainer Properties
 
                #region Public Instance Methods
-               protected override bool OnBubbleEvent(object source, EventArgs args)
+               protected override bool OnBubbleEvent(object source, EventArgs e)
                {
                        // Nikhil Kothari, pg 312-313:
-                       if (args is CommandEventArgs) {
-                               RaiseBubbleEvent(this, new DataGridCommandEventArgs(this, source, (CommandEventArgs)args));
+                       if (e is CommandEventArgs) {
+                               RaiseBubbleEvent(this, new DataGridCommandEventArgs(this, source, (CommandEventArgs)e));
                                return true;
                        }
 
-                       return base.OnBubbleEvent (source, args);
+                       return base.OnBubbleEvent (source, e);
                }
 
                protected internal virtual void SetItemType(ListItemType itemType)
index 347671436853274b9013b0855bc4da7278e7bb80..2b721dd3af37ff24d87d4efd8f77e019d359f4e0 100644 (file)
@@ -120,17 +120,17 @@ namespace System.Web.UI.WebControls
                        
                        return true;
                }
-               protected virtual void LoadViewState (object savedState)
+               protected virtual void LoadViewState (object state)
                {
-                       if (savedState is Pair) {
-                               Pair p = (Pair) savedState;
+                       if (state is Pair) {
+                               Pair p = (Pair) state;
                                object[] akeys = (object[]) p.First;
                                object[] avals = (object[]) p.Second;
                                for (int n=0; n<akeys.Length; n++) {
                                        keyTable [akeys[n]] = avals [n];
                                }
-                       } else if (savedState is object[]) {
-                               object[] avals = (object[]) savedState;
+                       } else if (state is object[]) {
+                               object[] avals = (object[]) state;
                                for (int n=0; n<avals.Length; n++)
                                        keyTable [keyNames[n]] = avals [n];
                        }
index b007474c550997c5dd73a059a672cc6d51c5e196..af981d0994395f7fb944f5e24164f85185df9482 100644 (file)
@@ -1109,24 +1109,24 @@ namespace System.Web.UI.WebControls
                        return style;
                }
                
-               protected override int CreateChildControls (IEnumerable data, bool dataBinding)
+               protected override int CreateChildControls (IEnumerable dataSource, bool dataBinding)
                {
-                       PagedDataSource dataSource = new PagedDataSource ();
-                       dataSource.DataSource = CurrentMode != DetailsViewMode.Insert ? data : null;
-                       dataSource.AllowPaging = AllowPaging;
-                       dataSource.PageSize = 1;
-                       dataSource.CurrentPageIndex = PageIndex;
+                       PagedDataSource pagedDataSource = new PagedDataSource ();
+                       pagedDataSource.DataSource = CurrentMode != DetailsViewMode.Insert ? dataSource : null;
+                       pagedDataSource.AllowPaging = AllowPaging;
+                       pagedDataSource.PageSize = 1;
+                       pagedDataSource.CurrentPageIndex = PageIndex;
 
                        if (dataBinding && CurrentMode != DetailsViewMode.Insert) {
                                DataSourceView view = GetData ();
                                if (view != null && view.CanPage) {
-                                       dataSource.AllowServerPaging = true;
+                                       pagedDataSource.AllowServerPaging = true;
                                        if (SelectArguments.RetrieveTotalRowCount)
-                                               dataSource.VirtualCount = SelectArguments.TotalRowCount;
+                                               pagedDataSource.VirtualCount = SelectArguments.TotalRowCount;
                                }
                        }
 
-                       bool showPager = AllowPaging && (dataSource.PageCount > 1);
+                       bool showPager = AllowPaging && (pagedDataSource.PageCount > 1);
 
                        Controls.Clear ();
                        table = CreateTable ();
@@ -1140,19 +1140,19 @@ namespace System.Web.UI.WebControls
                        // Gets the current data item
 
                        if (AllowPaging) {
-                               PageCount = dataSource.DataSourceCount;
+                               PageCount = pagedDataSource.DataSourceCount;
                                if (PageIndex >= PageCount && PageCount > 0)
-                                       pageIndex = dataSource.CurrentPageIndex = PageCount - 1;
-                               if (dataSource.DataSource != null) {
-                                       IEnumerator e = dataSource.GetEnumerator ();
+                                       pageIndex = pagedDataSource.CurrentPageIndex = PageCount - 1;
+                               if (pagedDataSource.DataSource != null) {
+                                       IEnumerator e = pagedDataSource.GetEnumerator ();
                                        if (e.MoveNext ())
                                                dataItem = e.Current;
                                }
                        } else {
                                int page = 0;
                                object lastItem = null;
-                               if (dataSource.DataSource != null) {
-                                       IEnumerator e = dataSource.GetEnumerator ();
+                               if (pagedDataSource.DataSource != null) {
+                                       IEnumerator e = pagedDataSource.GetEnumerator ();
                                        for (; e.MoveNext (); page++) {
                                                lastItem = e.Current;
                                                if (page == PageIndex)
@@ -1202,7 +1202,7 @@ namespace System.Web.UI.WebControls
                                if (showPager && PagerSettings.Position == PagerPosition.Top ||
                                                PagerSettings.Position == PagerPosition.TopAndBottom) {
                                        topPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
-                                       InitializePager (topPagerRow, dataSource);
+                                       InitializePager (topPagerRow, pagedDataSource);
                                        table.Rows.Add (topPagerRow);
                                }
 
@@ -1229,7 +1229,7 @@ namespace System.Web.UI.WebControls
                                if (showPager && PagerSettings.Position == PagerPosition.Bottom ||
                                                PagerSettings.Position == PagerPosition.TopAndBottom) {
                                        bottomPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
-                                       InitializePager (bottomPagerRow, dataSource);
+                                       InitializePager (bottomPagerRow, pagedDataSource);
                                        table.Rows.Add (bottomPagerRow);
                                }
                        }
@@ -1268,7 +1268,7 @@ namespace System.Web.UI.WebControls
                        return rstate;
                }
                
-               protected virtual void InitializePager (DetailsViewRow row, PagedDataSource dataSource)
+               protected virtual void InitializePager (DetailsViewRow row, PagedDataSource pagedDataSource)
                {
                        TableCell cell = new TableCell ();
                        cell.ColumnSpan = 2;
@@ -1276,7 +1276,7 @@ namespace System.Web.UI.WebControls
                        if (pagerTemplate != null)
                                pagerTemplate.InstantiateIn (cell);
                        else
-                               cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
+                               cell.Controls.Add (PagerSettings.CreatePagerControl (pagedDataSource.CurrentPageIndex, pagedDataSource.PageCount));
                        
                        row.Cells.Add (cell);
                }
@@ -1349,7 +1349,7 @@ namespace System.Web.UI.WebControls
                        return dic;
                }
                
-               protected virtual void ExtractRowValues (IOrderedDictionary fieldValues, bool includeReadOnlyFields, bool includePrimaryKey)
+               protected virtual void ExtractRowValues (IOrderedDictionary fieldValues, bool includeReadOnlyFields, bool includeKeys)
                {
                        foreach (DetailsViewRow row in Rows) {
                                if (row.Cells.Count < 1)
@@ -1358,7 +1358,7 @@ namespace System.Web.UI.WebControls
                                if (c != null)
                                        c.ContainingField.ExtractValuesFromCell (fieldValues, c, row.RowState, includeReadOnlyFields);
                        }
-                       if (!includePrimaryKey && DataKeyNames != null)
+                       if (!includeKeys && DataKeyNames != null)
                                foreach (string key in DataKeyNames)
                                        fieldValues.Remove (key);
                }
@@ -1595,9 +1595,9 @@ namespace System.Web.UI.WebControls
                        }
                }
                public
-               void SetPageIndex (int newIndex)
+               void SetPageIndex (int index)
                {
-                       DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (newIndex);
+                       DetailsViewPageEventArgs args = new DetailsViewPageEventArgs (index);
                        OnPageIndexChanging (args);
 
                        if (args.Cancel || !IsBoundUsingDataSourceID)
@@ -1764,11 +1764,11 @@ namespace System.Web.UI.WebControls
                        RequireBinding ();
                }
 
-               protected internal override void LoadControlState (object ob)
+               protected internal override void LoadControlState (object savedState)
                {
-                       if (ob == null)
+                       if (savedState == null)
                                return;
-                       object[] state = (object[]) ob;
+                       object[] state = (object[]) savedState;
                        base.LoadControlState (state[0]);
                        pageIndex = (int) state[1];
                        pageCount = (int) state[2];
@@ -1900,14 +1900,14 @@ namespace System.Web.UI.WebControls
                                ControlStyle.LoadViewState (states [12]);
                }
                
-               void ICallbackEventHandler.RaiseCallbackEvent (string eventArgs)
+               void ICallbackEventHandler.RaiseCallbackEvent (string eventArgument)
                {
-                       RaiseCallbackEvent (eventArgs);
+                       RaiseCallbackEvent (eventArgument);
                }
                
-               protected virtual void RaiseCallbackEvent (string eventArgs)
+               protected virtual void RaiseCallbackEvent (string eventArgument)
                {
-                       string[] clientData = eventArgs.Split ('|');
+                       string[] clientData = eventArgument.Split ('|');
                        PageIndex = int.Parse (clientData[0]);
                        
                        RaisePostBackEvent (clientData[1]);
index ac971e52f8b86a337960c6ce01aee29921db2d58..696c91fbafe981f9b6a81d3f868607854c7e484b 100644 (file)
@@ -39,9 +39,9 @@ namespace System.Web.UI.WebControls
                IOrderedDictionary keys;
                IOrderedDictionary values;
                
-               public DetailsViewDeleteEventArgs (int index)
+               public DetailsViewDeleteEventArgs (int rowIndex)
                {
-                       this.rowIndex = index;
+                       this.rowIndex = rowIndex;
                }
                
                internal DetailsViewDeleteEventArgs (int index, IOrderedDictionary keys, IOrderedDictionary values)
index 1a29e6b045d8ba0558294816045949fc62d9f9aa..654dd36836c2cbde5e11ba36c8966fd7ba48c6c1 100644 (file)
@@ -38,9 +38,9 @@ namespace System.Web.UI.WebControls
                object argument;
                IOrderedDictionary values;
                
-               public DetailsViewInsertEventArgs (object argument)
+               public DetailsViewInsertEventArgs (object commandArgument)
                {
-                       this.argument = argument;
+                       this.argument = commandArgument;
                }
                
                internal DetailsViewInsertEventArgs (object argument, IOrderedDictionary values)
index 40ac132b2e81dfdd6720731aee7492048f1123a5..f238754ff61b66eb343624c156748e5b2ce3e0ef 100644 (file)
@@ -42,8 +42,8 @@ namespace System.Web.UI.WebControls
                        this.rows = rows;
                }
                
-               public DetailsViewRow this [int i] {
-                       get { return (DetailsViewRow) rows [i]; }
+               public DetailsViewRow this [int index] {
+                       get { return (DetailsViewRow) rows [index]; }
                }
                
                public void CopyTo (DetailsViewRow[] array, int index)
index 3565e6d7f57977d9e9f2b90971ab650ab64a4f2b..ae3c193c23ef8ffe23855354c8b815e6e1cb396e 100644 (file)
@@ -39,9 +39,9 @@ namespace System.Web.UI.WebControls
                IOrderedDictionary newValues;
                IOrderedDictionary oldValues;
                
-               public DetailsViewUpdateEventArgs (object argument)
+               public DetailsViewUpdateEventArgs (object commandArgument)
                {
-                       this.argument = argument;
+                       this.argument = commandArgument;
                }
                
                internal DetailsViewUpdateEventArgs (object argument, IOrderedDictionary keys, IOrderedDictionary oldValues, IOrderedDictionary newValues)
index 20857a14abd383b78b246ab655901a85e2d7c543..7282dd10f27f16f1601866f7de7676a5d99402bc 100644 (file)
@@ -204,12 +204,12 @@ namespace System.Web.UI.WebControls
                        return new FontUnit (n);
                }
 
-               public string ToString (IFormatProvider fmt)
+               public string ToString (IFormatProvider formatProvider)
                {
                        if (type == FontSize.NotSet)
                                return String.Empty;
                        else if (type == FontSize.AsUnit)
-                               return unit.ToString (fmt);
+                               return unit.ToString (formatProvider);
                        else
                                return font_size_names [(int) type];
                }
index 3e6711bb8d4111b17f94299344d0fe3c65804f77..56ad7b4a1dfd4b77986f0b0c24119ed88e7041ce 100644 (file)
@@ -68,9 +68,9 @@ namespace System.Web.UI.WebControls
                        return new FormParameter (this);
                }
                protected internal
-               override object Evaluate (HttpContext ctx, Control control)
+               override object Evaluate (HttpContext context, Control control)
                {
-                       HttpRequest req = ctx != null ? ctx.Request : null;
+                       HttpRequest req = context != null ? context.Request : null;
                        if (req == null)
                                return null;
                        
index 55decb19cab8956616cca87da85a38ecc6aa59eb..082c31ed0a6032a14c51d332e52939b569735f72 100644 (file)
@@ -882,12 +882,12 @@ namespace System.Web.UI.WebControls
                        return arg;
                }
                
-               protected virtual FormViewRow CreateRow (int rowIndex, DataControlRowType rowType, DataControlRowState rowState)
+               protected virtual FormViewRow CreateRow (int itemIndex, DataControlRowType rowType, DataControlRowState rowState)
                {
                        if (rowType == DataControlRowType.Pager)
-                               return new FormViewPagerRow (rowIndex, rowType, rowState);
+                               return new FormViewPagerRow (itemIndex, rowType, rowState);
                        else
-                               return new FormViewRow (rowIndex, rowType, rowState);
+                               return new FormViewRow (itemIndex, rowType, rowState);
                }
                
                void RequireBinding ()
@@ -922,25 +922,25 @@ namespace System.Web.UI.WebControls
                        return style;
                }
                
-               protected override int CreateChildControls (IEnumerable data, bool dataBinding)
+               protected override int CreateChildControls (IEnumerable dataSource, bool dataBinding)
                {
-                       PagedDataSource dataSource = new PagedDataSource ();
-                       dataSource.DataSource = CurrentMode != FormViewMode.Insert ? data : null;
-                       dataSource.AllowPaging = AllowPaging;
-                       dataSource.PageSize = 1;
-                       dataSource.CurrentPageIndex = PageIndex;
+                       PagedDataSource pagedDataSource = new PagedDataSource ();
+                       pagedDataSource.DataSource = CurrentMode != FormViewMode.Insert ? dataSource : null;
+                       pagedDataSource.AllowPaging = AllowPaging;
+                       pagedDataSource.PageSize = 1;
+                       pagedDataSource.CurrentPageIndex = PageIndex;
 
                        if (dataBinding && CurrentMode != FormViewMode.Insert) {
                                DataSourceView view = GetData ();
                                if (view != null && view.CanPage) {
-                                       dataSource.AllowServerPaging = true;
+                                       pagedDataSource.AllowServerPaging = true;
                                        if (SelectArguments.RetrieveTotalRowCount)
-                                               dataSource.VirtualCount = SelectArguments.TotalRowCount;
+                                               pagedDataSource.VirtualCount = SelectArguments.TotalRowCount;
                                }
                        }
 
                        PagerSettings pagerSettings = PagerSettings;
-                       bool showPager = AllowPaging && pagerSettings.Visible && (dataSource.PageCount > 1);
+                       bool showPager = AllowPaging && pagerSettings.Visible && (pagedDataSource.PageCount > 1);
                        
                        Controls.Clear ();
                        table = CreateTable ();
@@ -953,20 +953,20 @@ namespace System.Web.UI.WebControls
                        // Gets the current data item
 
                        if (AllowPaging) {
-                               PageCount = dataSource.DataSourceCount;
+                               PageCount = pagedDataSource.DataSourceCount;
                                if (PageIndex >= PageCount && PageCount > 0)
-                                       pageIndex = dataSource.CurrentPageIndex = PageCount - 1;
+                                       pageIndex = pagedDataSource.CurrentPageIndex = PageCount - 1;
                                
-                               if (dataSource.DataSource != null) {
-                                       IEnumerator e = dataSource.GetEnumerator ();
+                               if (pagedDataSource.DataSource != null) {
+                                       IEnumerator e = pagedDataSource.GetEnumerator ();
                                        if (e.MoveNext ())
                                                dataItem = e.Current;
                                }
                        } else {
                                int page = 0;
                                object lastItem = null;
-                               if (dataSource.DataSource != null) {
-                                       IEnumerator e = dataSource.GetEnumerator ();
+                               if (pagedDataSource.DataSource != null) {
+                                       IEnumerator e = pagedDataSource.GetEnumerator ();
                                        for (; e.MoveNext (); page++) {
                                                lastItem = e.Current;
                                                if (page == PageIndex)
@@ -991,7 +991,7 @@ namespace System.Web.UI.WebControls
 
                        if (showPager && pagerSettings.Position == PagerPosition.Top || pagerSettings.Position == PagerPosition.TopAndBottom) {
                                topPagerRow = CreateRow (-1, DataControlRowType.Pager, DataControlRowState.Normal);
-                               InitializePager (topPagerRow, dataSource);
+                               InitializePager (topPagerRow, pagedDataSource);
                                table.Rows.Add (topPagerRow);
                        }
 
@@ -1024,7 +1024,7 @@ namespace System.Web.UI.WebControls
                        
                        if (showPager && pagerSettings.Position == PagerPosition.Bottom || pagerSettings.Position == PagerPosition.TopAndBottom) {
                                bottomPagerRow = CreateRow (0, DataControlRowType.Pager, DataControlRowState.Normal);
-                               InitializePager (bottomPagerRow, dataSource);
+                               InitializePager (bottomPagerRow, pagedDataSource);
                                table.Rows.Add (bottomPagerRow);
                        }
 
@@ -1046,7 +1046,7 @@ namespace System.Web.UI.WebControls
                        return rstate;
                }
                
-               protected virtual void InitializePager (FormViewRow row, PagedDataSource dataSource)
+               protected virtual void InitializePager (FormViewRow row, PagedDataSource pagedDataSource)
                {
                        TableCell cell = new TableCell ();
                        cell.ColumnSpan = 2;
@@ -1054,7 +1054,7 @@ namespace System.Web.UI.WebControls
                        if (pagerTemplate != null)
                                pagerTemplate.InstantiateIn (cell);
                        else
-                               cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
+                               cell.Controls.Add (PagerSettings.CreatePagerControl (pagedDataSource.CurrentPageIndex, pagedDataSource.PageCount));
                        
                        row.Cells.Add (cell);
                }
@@ -1497,10 +1497,10 @@ namespace System.Web.UI.WebControls
                        RequireBinding ();
                }
 
-               protected internal override void LoadControlState (object ob)
+               protected internal override void LoadControlState (object savedState)
                {
-                       if (ob == null) return;
-                       object[] state = (object[]) ob;
+                       if (savedState == null) return;
+                       object[] state = (object[]) savedState;
                        base.LoadControlState (state[0]);
                        pageIndex = (int) state[1];
                        pageCount = (int) state[2];
index 7e36a716d38b7e21a7c882c86a5792dee7770acc..d74cd37b7515925cf78c243a69865586a00df651 100644 (file)
@@ -34,9 +34,9 @@ namespace System.Web.UI.WebControls
        {
                object source;
                
-               public FormViewCommandEventArgs (object source, CommandEventArgs arguments) : base (arguments)
+               public FormViewCommandEventArgs (object commandSource, CommandEventArgs originalArgs) : base (originalArgs)
                {
-                       this.source = source;
+                       this.source = commandSource;
                }
                
                public object CommandSource {
index 5b5d8593b66b3a284d30e559371a2aac9b919c12..eac224b6cca2b0a0b98f103c8adc22442113c8a6 100644 (file)
@@ -39,9 +39,9 @@ namespace System.Web.UI.WebControls
                IOrderedDictionary keys;
                IOrderedDictionary values;
                
-               public FormViewDeleteEventArgs (int index)
+               public FormViewDeleteEventArgs (int rowIndex)
                {
-                       this.rowIndex = index;
+                       this.rowIndex = rowIndex;
                }
                
                internal FormViewDeleteEventArgs (int index, IOrderedDictionary keys, IOrderedDictionary values) 
index ce90ee92398139e7c05f2e4155819aaa2a0fdaa0..c189c852341208dee3ffcaf61ce678eb39269888 100644 (file)
@@ -38,9 +38,9 @@ namespace System.Web.UI.WebControls
                object argument;
                IOrderedDictionary values;
                
-               public FormViewInsertEventArgs (object argument)
+               public FormViewInsertEventArgs (object commandArgument)
                {
-                       this.argument = argument;
+                       this.argument = commandArgument;
                }
                
                internal FormViewInsertEventArgs (object argument, IOrderedDictionary values)
index ff8b000baaf3c863f006ad619b3aeed2a4e3288c..def2c43e5763c5bb655e0a37a4c1bb9fe5429474 100644 (file)
@@ -46,9 +46,9 @@ namespace System.Web.UI.WebControls
                        get;
                        set;
                }
-               public FormViewRow (int rowIndex, DataControlRowType rowType, DataControlRowState rowState)
+               public FormViewRow (int itemIndex, DataControlRowType rowType, DataControlRowState rowState)
                {
-                       this.rowIndex = rowIndex;
+                       this.rowIndex = itemIndex;
                        this.rowType = rowType;
                        this.rowState = rowState;
                }
index 27ce67d2703df1177e37b606214bd34d4942845a..edbf1de5b3fe87484b55106d1b2bb7fcf215c57b 100644 (file)
@@ -40,9 +40,9 @@ namespace System.Web.UI.WebControls
                IOrderedDictionary oldValues;
                IOrderedDictionary newValues;
                
-               public FormViewUpdateEventArgs (object argument)
+               public FormViewUpdateEventArgs (object commandArgument)
                {
-                       this.argument = argument;
+                       this.argument = commandArgument;
                }
                
                internal FormViewUpdateEventArgs (object argument, IOrderedDictionary keys, IOrderedDictionary oldValues, IOrderedDictionary newValues)
index 8e2695137dc52db23095d788fe99b00ddf509982..6989c73c4ce20158300ba76df6012e1cf8a8c8ff 100644 (file)
@@ -1375,44 +1375,44 @@ namespace System.Web.UI.WebControls
                        }
                }
                
-               protected override int CreateChildControls (IEnumerable data, bool dataBinding)
+               protected override int CreateChildControls (IEnumerable dataSource, bool dataBinding)
                {
                        // clear GridView
                        Controls.Clear ();
                        table = null;
                        rows = null;
 
-                       if (data == null)
+                       if (dataSource == null)
                                return 0;
 
-                       PagedDataSource dataSource;
+                       PagedDataSource pagedDataSource;
 
                        if (dataBinding) {
                                DataSourceView view = GetData ();
-                               dataSource = new PagedDataSource ();
-                               dataSource.DataSource = data;
+                               pagedDataSource = new PagedDataSource ();
+                               pagedDataSource.DataSource = dataSource;
                                
                                if (AllowPaging) {
-                                       dataSource.AllowPaging = true;
-                                       dataSource.PageSize = PageSize;
+                                       pagedDataSource.AllowPaging = true;
+                                       pagedDataSource.PageSize = PageSize;
                                        if (view.CanPage) {
-                                               dataSource.AllowServerPaging = true;
+                                               pagedDataSource.AllowServerPaging = true;
                                                if (SelectArguments.RetrieveTotalRowCount)
-                                                       dataSource.VirtualCount = SelectArguments.TotalRowCount;
+                                                       pagedDataSource.VirtualCount = SelectArguments.TotalRowCount;
                                        }
-                                       if (PageIndex >= dataSource.PageCount)
-                                               pageIndex = dataSource.PageCount - 1;
-                                       dataSource.CurrentPageIndex = PageIndex;
+                                       if (PageIndex >= pagedDataSource.PageCount)
+                                               pageIndex = pagedDataSource.PageCount - 1;
+                                       pagedDataSource.CurrentPageIndex = PageIndex;
                                }
                                
-                               PageCount = dataSource.PageCount;
+                               PageCount = pagedDataSource.PageCount;
                        } else {
-                               dataSource = new PagedDataSource ();
-                               dataSource.DataSource = data;
+                               pagedDataSource = new PagedDataSource ();
+                               pagedDataSource.DataSource = dataSource;
                                if (AllowPaging) {
-                                       dataSource.AllowPaging = true;
-                                       dataSource.PageSize = PageSize;
-                                       dataSource.CurrentPageIndex = PageIndex;
+                                       pagedDataSource.AllowPaging = true;
+                                       pagedDataSource.PageSize = PageSize;
+                                       pagedDataSource.CurrentPageIndex = PageIndex;
                                }
                        }
 
@@ -1423,7 +1423,7 @@ namespace System.Web.UI.WebControls
                        // Creates the set of fields to show
 
                        _dataEnumerator = null;
-                       ICollection fieldCollection = CreateColumns (dataSource, dataBinding);
+                       ICollection fieldCollection = CreateColumns (pagedDataSource, dataBinding);
                        int fieldCount = fieldCollection.Count;
                        DataControlField dcf;
                        DataControlField[] fields = new DataControlField [fieldCount];
@@ -1443,7 +1443,7 @@ namespace System.Web.UI.WebControls
                                enumerator = _dataEnumerator;
                                skip_first = true;
                        } else
-                               enumerator = dataSource.GetEnumerator ();
+                               enumerator = pagedDataSource.GetEnumerator ();
 
                        // Main table creation
                        Table mainTable = ContainedTable;
@@ -1469,7 +1469,7 @@ namespace System.Web.UI.WebControls
                                
                                if (list.Count == 0) {
                                        if (createPager && (PagerSettings.Position == PagerPosition.Top || PagerSettings.Position == PagerPosition.TopAndBottom)) {
-                                               topPagerRow = CreatePagerRow (fieldCount, dataSource);
+                                               topPagerRow = CreatePagerRow (fieldCount, pagedDataSource);
                                                OnRowCreated (new GridViewRowEventArgs (topPagerRow));
                                                mainTable.Rows.Add (topPagerRow);
                                                if (dataBinding) {
@@ -1527,7 +1527,7 @@ namespace System.Web.UI.WebControls
                                }
 
                                if (createPager && (PagerSettings.Position == PagerPosition.Bottom || PagerSettings.Position == PagerPosition.TopAndBottom)) {
-                                       bottomPagerRow = CreatePagerRow (fieldCount, dataSource);
+                                       bottomPagerRow = CreatePagerRow (fieldCount, pagedDataSource);
                                        OnRowCreated (new GridViewRowEventArgs (bottomPagerRow));
                                        mainTable.Rows.Add (bottomPagerRow);
                                        if (dataBinding) {
@@ -1545,7 +1545,7 @@ namespace System.Web.UI.WebControls
                                return -1;
 
                        if (AllowPaging)
-                               return dataSource.DataSourceCount;
+                               return pagedDataSource.DataSourceCount;
                        else
                                return list.Count;
                }
@@ -1586,7 +1586,7 @@ namespace System.Web.UI.WebControls
                        return row;
                }
                
-               protected virtual void InitializePager (GridViewRow row, int columnSpan, PagedDataSource dataSource)
+               protected virtual void InitializePager (GridViewRow row, int columnSpan, PagedDataSource pagedDataSource)
                {
                        TableCell cell = new TableCell ();
                        if (columnSpan > 1)
@@ -1595,7 +1595,7 @@ namespace System.Web.UI.WebControls
                        if (pagerTemplate != null)
                                pagerTemplate.InstantiateIn (cell);
                        else
-                               cell.Controls.Add (PagerSettings.CreatePagerControl (dataSource.CurrentPageIndex, dataSource.PageCount));
+                               cell.Controls.Add (PagerSettings.CreatePagerControl (pagedDataSource.CurrentPageIndex, pagedDataSource.PageCount));
                        
                        row.Cells.Add (cell);
                }
@@ -1983,9 +1983,9 @@ namespace System.Web.UI.WebControls
                        Sort (newSortExpression, newDirection);
                }
                
-               public virtual void Sort (string newSortExpression, SortDirection newSortDirection)
+               public virtual void Sort (string sortExpression, SortDirection sortDirection)
                {
-                       GridViewSortEventArgs args = new GridViewSortEventArgs (newSortExpression, newSortDirection);
+                       GridViewSortEventArgs args = new GridViewSortEventArgs (sortExpression, sortDirection);
                        OnSorting (args);
                        if (args.Cancel)
                                return;
@@ -2000,9 +2000,9 @@ namespace System.Web.UI.WebControls
                        OnSorted (EventArgs.Empty);
                }
                public
-               void SelectRow (int index)
+               void SelectRow (int rowIndex)
                {
-                       GridViewSelectEventArgs args = new GridViewSelectEventArgs (index);
+                       GridViewSelectEventArgs args = new GridViewSelectEventArgs (rowIndex);
                        OnSelectedIndexChanging (args);
                        if (!args.Cancel) {
                                RequireBinding ();
@@ -2011,9 +2011,9 @@ namespace System.Web.UI.WebControls
                        }
                }
                public
-               void SetPageIndex (int newIndex)
+               void SetPageIndex (int rowIndex)
                {
-                       GridViewPageEventArgs args = new GridViewPageEventArgs (newIndex);
+                       GridViewPageEventArgs args = new GridViewPageEventArgs (rowIndex);
                        OnPageIndexChanging (args);
                        
                        if (args.Cancel || !IsBoundUsingDataSourceID)
@@ -2024,9 +2024,9 @@ namespace System.Web.UI.WebControls
                        OnPageIndexChanged (EventArgs.Empty);
                }
                public
-               void SetEditRow (int index)
+               void SetEditRow (int rowIndex)
                {
-                       GridViewEditEventArgs args = new GridViewEditEventArgs (index);
+                       GridViewEditEventArgs args = new GridViewEditEventArgs (rowIndex);
                        OnRowEditing (args);
                        
                        if (args.Cancel || !IsBoundUsingDataSourceID)
@@ -2134,11 +2134,11 @@ namespace System.Web.UI.WebControls
                        currentEditNewValues = null;
                }
 
-               protected internal override void LoadControlState (object ob)
+               protected internal override void LoadControlState (object savedState)
                {
-                       if (ob == null)
+                       if (savedState == null)
                                return;
-                       object[] state = (object[]) ob;
+                       object[] state = (object[]) savedState;
                        base.LoadControlState (state[0]);
                        pageIndex = (int) state[1];
                        selectedIndex = (int) state[2];
@@ -2351,14 +2351,14 @@ namespace System.Web.UI.WebControls
                                ((IStateManager)sortedDescendingHeaderStyle).LoadViewState (states [15]);
                }
                
-               void ICallbackEventHandler.RaiseCallbackEvent (string eventArgs)
+               void ICallbackEventHandler.RaiseCallbackEvent (string eventArgument)
                {
-                       RaiseCallbackEvent (eventArgs);
+                       RaiseCallbackEvent (eventArgument);
                }
                
-               protected virtual void RaiseCallbackEvent (string eventArgs)
+               protected virtual void RaiseCallbackEvent (string eventArgument)
                {
-                       string[] clientData = eventArgs.Split ('|');
+                       string[] clientData = eventArgument.Split ('|');
                        PageIndex = int.Parse (clientData[0]);
                        SortExpression = HttpUtility.UrlDecode (clientData [1]);
                        SortDirection = (SortDirection) int.Parse (clientData [2]);
@@ -2384,18 +2384,18 @@ namespace System.Web.UI.WebControls
                        return sw.ToString ();
                }
 
-               string ICallbackContainer.GetCallbackScript (IButtonControl control, string argument)
+               string ICallbackContainer.GetCallbackScript (IButtonControl buttonControl, string argument)
                {
-                       return GetCallbackScript (control, argument);
+                       return GetCallbackScript (buttonControl, argument);
                }
                
-               protected virtual string GetCallbackScript (IButtonControl control, string argument)
+               protected virtual string GetCallbackScript (IButtonControl buttonControl, string argument)
                {
                        if (EnableSortingAndPagingCallbacks) {
                                Page page = Page;
                                if (page != null)
                                        page.ClientScript.RegisterForEventValidation (UniqueID, argument);
-                               return "javascript:GridView_ClientEvent (\"" + ClientID + "\",\"" + control.CommandName + "$" + control.CommandArgument + "\"); return false;";
+                               return "javascript:GridView_ClientEvent (\"" + ClientID + "\",\"" + buttonControl.CommandName + "$" + buttonControl.CommandArgument + "\"); return false;";
                        } else
                                return null;
                }
index 47a3de33f855aa36ebbdfba0017ba0f7ae02634e..e62233cf40ea0ff25b7ed1a0be99554b564a9545 100644 (file)
@@ -39,9 +39,9 @@ namespace System.Web.UI.WebControls
                IOrderedDictionary keys;
                IOrderedDictionary values;
                
-               public GridViewDeleteEventArgs (int index)
+               public GridViewDeleteEventArgs (int rowIndex)
                {
-                       this.rowIndex = index;
+                       this.rowIndex = rowIndex;
                }
                
                internal GridViewDeleteEventArgs (int index, IOrderedDictionary keys, IOrderedDictionary values)
index 257f9015fe6ff46a335f4d2f94e0ee7f3cebbba5..236f3144fa1ee75fbffe35272710d2ef4afe37e0 100644 (file)
@@ -42,8 +42,8 @@ namespace System.Web.UI.WebControls
                        this.rows = rows;
                }
                
-               public GridViewRow this [int i] {
-                       get { return (GridViewRow) rows [i]; }
+               public GridViewRow this [int index] {
+                       get { return (GridViewRow) rows [index]; }
                }
                
                public void CopyTo (GridViewRow[] array, int index)
index 664fba67bf488494f7cc9e73ada3c0d2fffec452..c8c43effa63359a90b2bb46fcdf228ac75f23c5b 100644 (file)
@@ -45,8 +45,8 @@ namespace System.Web.UI.WebControls
                        typeof (RectangleHotSpot)
                };
                                                    
-               public HotSpot this [int idx] {
-                       get { return (HotSpot) ((IList)this)[idx]; }
+               public HotSpot this [int index] {
+                       get { return (HotSpot) ((IList)this)[index]; }
                }
 
                public int Add (HotSpot spot)
@@ -54,9 +54,9 @@ namespace System.Web.UI.WebControls
                        return ((IList)this).Add (spot);
                }
                
-               protected override object CreateKnownType (int idx)
+               protected override object CreateKnownType (int index)
                {
-                       switch (idx) {
+                       switch (index) {
                                case 0:
                                        return new CircleHotSpot ();
                                case 1:
@@ -73,9 +73,9 @@ namespace System.Web.UI.WebControls
                        return _knownTypes;
                }
                
-               public void Insert (int idx, HotSpot spot)
+               public void Insert (int index, HotSpot spot)
                {
-                       ((IList)this).Insert (idx, spot);
+                       ((IList)this).Insert (index, spot);
                }
                
                protected override void OnValidate (object o)
@@ -91,9 +91,9 @@ namespace System.Web.UI.WebControls
                        ((IList)this).Remove (spot);
                }
 
-               public void RemoveAt (int idx)
+               public void RemoveAt (int index)
                {
-                       ((IList)this).RemoveAt (idx);
+                       ((IList)this).RemoveAt (index);
                }
 
                protected override void SetDirtyObject (object o)
index b90a4f0b947b60d2ed63d39668ffb4cde390d6ba..3151bbd3605d57ee488271bdfd517b7e1ebfd8c9 100644 (file)
@@ -49,19 +49,19 @@ namespace System.Web.UI.WebControls
                {
                }
                                
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
-                       base.AddAttributesToRender (w);
-                       AddDisplayStyleAttribute (w);
+                       base.AddAttributesToRender (writer);
+                       AddDisplayStyleAttribute (writer);
                        if (!IsEnabled)
                                return;
                        // add attributes - only if they're not empty
                        string t = Target;
                        string s = NavigateUrl;
                        if (s.Length > 0)
-                               w.AddAttribute (HtmlTextWriterAttribute.Href, ResolveClientUrl (s));
+                               writer.AddAttribute (HtmlTextWriterAttribute.Href, ResolveClientUrl (s));
                        if (t.Length > 0)
-                               w.AddAttribute (HtmlTextWriterAttribute.Target, t);
+                               writer.AddAttribute (HtmlTextWriterAttribute.Target, t);
                }
                
                protected override void AddParsedSubObject (object obj)
@@ -90,25 +90,25 @@ namespace System.Web.UI.WebControls
                        base.LoadViewState (savedState);
                }
                
-               protected internal override void RenderContents (HtmlTextWriter w)      
+               protected internal override void RenderContents (HtmlTextWriter writer) 
                {
                        if (HasControls () || HasRenderMethodDelegate ()) {
-                               base.RenderContents (w);
+                               base.RenderContents (writer);
                                return;
                        }
                        string image_url = ImageUrl;
                        if (!String.IsNullOrEmpty (image_url)) {
                                string str = ToolTip;
                                if (!String.IsNullOrEmpty (str))
-                                       w.AddAttribute (HtmlTextWriterAttribute.Title, str);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Title, str);
 
-                               w.AddAttribute (HtmlTextWriterAttribute.Src, ResolveClientUrl (image_url));
+                               writer.AddAttribute (HtmlTextWriterAttribute.Src, ResolveClientUrl (image_url));
                                str = Text;
-                                       w.AddAttribute (HtmlTextWriterAttribute.Alt, str);
-                               w.RenderBeginTag (HtmlTextWriterTag.Img);
-                               w.RenderEndTag ();
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Alt, str);
+                               writer.RenderBeginTag (HtmlTextWriterTag.Img);
+                               writer.RenderEndTag ();
                        } else
-                               w.Write (Text);
+                               writer.Write (Text);
                }
 
                [Bindable(true)]
index 3a35cdb09b5d99f3f2cdb5d7b1165eca3b96df2d..904d0d913ddb6d259c69262415940f68a05c962b 100644 (file)
@@ -113,22 +113,22 @@ namespace System.Web.UI.WebControls {
                        set { ViewState ["Text"] = value; }
                }
 
-               protected virtual string FormatDataNavigateUrlValue (object value)
+               protected virtual string FormatDataNavigateUrlValue (object dataUrlValue)
                {
                        string format = DataNavigateUrlFormatString;
                        if (format == "")
                                format = null;
 
-                       return DataBinder.FormatResult (value, format);
+                       return DataBinder.FormatResult (dataUrlValue, format);
                }
 
-               protected virtual string FormatDataTextValue (object value)
+               protected virtual string FormatDataTextValue (object dataTextValue)
                {
                        string format = DataTextFormatString;
                        if (format == "")
                                format = null;
 
-                       return DataBinder.FormatResult (value, format);
+                       return DataBinder.FormatResult (dataTextValue, format);
                }
 
                public override void Initialize ()
@@ -155,11 +155,11 @@ namespace System.Web.UI.WebControls {
                        ctrl.Target = Target;
                }
 
-               public override void InitializeCell (TableCell cell, int column_index, ListItemType item_type)
+               public override void InitializeCell (TableCell cell, int columnIndex, ListItemType itemType)
                {
-                       base.InitializeCell (cell, column_index, item_type);
+                       base.InitializeCell (cell, columnIndex, itemType);
 
-                       switch (item_type)
+                       switch (itemType)
                        {
                        case ListItemType.Separator: 
                        case ListItemType.Pager:
index df9fa49da84ae59bd360949986b2bdae6a8dd5e1..982b6734f7b39cce8a319cadc92ae4ec1e133e60 100644 (file)
@@ -45,9 +45,9 @@ namespace System.Web.UI.WebControls
                PropertyDescriptor[] urlProperties;
                static string[] emptyFields;
                
-               public override bool Initialize (bool sortingEnabled, Control control)
+               public override bool Initialize (bool enableSorting, Control control)
                {
-                       return base.Initialize (sortingEnabled, control);
+                       return base.Initialize (enableSorting, control);
                }
                
                [EditorAttribute ("System.Web.UI.Design.WebControls.DataFieldEditor, " + Consts.AssemblySystem_Design, "System.Drawing.Design.UITypeEditor, " + Consts.AssemblySystem_Drawing)]
index 7b0a331483091b118b175ff869923318c6d3426d..b8cf43ae7931dce90e19af7a1b0ddf85bbeffdd9 100644 (file)
@@ -46,9 +46,9 @@ namespace System.Web.UI.WebControls {
                PropertyDescriptor imageProperty;
                PropertyDescriptor textProperty;
                
-               public override bool Initialize (bool sortingEnabled, Control control)
+               public override bool Initialize (bool enableSorting, Control control)
                {
-                       return base.Initialize (sortingEnabled, control);
+                       return base.Initialize (enableSorting, control);
                }
 
                [DefaultValueAttribute ("")]
@@ -237,14 +237,14 @@ namespace System.Web.UI.WebControls {
                        }
                }
                
-               protected virtual string FormatImageUrlValue (object value)
+               protected virtual string FormatImageUrlValue (object dataValue)
                {
-                       if (value == null)
+                       if (dataValue == null)
                                return null;
                        else if (DataImageUrlFormatString.Length > 0)
-                               return string.Format (DataImageUrlFormatString, value);
+                               return string.Format (DataImageUrlFormatString, dataValue);
                        else
-                               return value.ToString ();
+                               return dataValue.ToString ();
                }
                
                protected virtual string GetFormattedAlternateText (Control controlContainer)
index 241934632a0e22d727f304ba5311c501125d226b..c5ae39c8595577f8b52c4baade3a69cc0e6d98ea 100644 (file)
@@ -49,13 +49,13 @@ namespace System.Web.UI.WebControls
                {
                }
        
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
                        Page page = Page;
                        if (page != null)
                                page.VerifyRenderingInServerForm (this);
 
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                        bool enabled = IsEnabled;
                        string onclick = OnClientClick;
                        onclick = ClientScriptManager.EnsureEndsWithSemicolon (onclick);
@@ -65,15 +65,15 @@ namespace System.Web.UI.WebControls
                        }
 
                        if (onclick.Length > 0)
-                               w.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick);
+                               writer.AddAttribute (HtmlTextWriterAttribute.Onclick, onclick);
                        
                        if (enabled && page != null) {
                                PostBackOptions options = GetPostBackOptions ();
                                string href = page.ClientScript.GetPostBackEventReference (options, true);
-                               w.AddAttribute (HtmlTextWriterAttribute.Href, href);
+                               writer.AddAttribute (HtmlTextWriterAttribute.Href, href);
                        }
                        
-                       AddDisplayStyleAttribute (w);
+                       AddDisplayStyleAttribute (writer);
                }
 
                protected virtual void RaisePostBackEvent (string eventArgument)
index a99a5555c2dc5865ee46042534c84e669ef38236..1dbe89198ac7690ac8229f5d26dbd8b3805220e2 100644 (file)
@@ -254,9 +254,9 @@ namespace System.Web.UI.WebControls {
                        }
                }
 
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                }
 
                public virtual void ClearSelection ()
index a37b9182f8d7f095ded5d6a5ee3a2579feaa184b..7cf08e944dbf04cadc157f1d52ad7fd3a42afb81 100644 (file)
@@ -58,9 +58,9 @@ namespace System.Web.UI.WebControls {
                {
                }
        
-               public static ListItem FromString (string text)
+               public static ListItem FromString (string s)
                {
-                       return new ListItem (text);
+                       return new ListItem (s);
                }
        
                public override bool Equals (object o)
index 7e832dec6fdc69a984d16a42dbc04b5f98dc126e..032b4d2fa9a7603d0aee3a055bf9f7555e40e53f 100644 (file)
@@ -101,12 +101,12 @@ namespace System.Web.UI.WebControls {
                }
 
                protected internal
-               override void Render (HtmlTextWriter output)
+               override void Render (HtmlTextWriter writer)
                {
                        if (Mode == LiteralMode.Encode)
-                               output.Write (HttpUtility.HtmlEncode (Text));
+                               writer.Write (HttpUtility.HtmlEncode (Text));
                        else
-                       output.Write (Text);
+                       writer.Write (Text);
                }
        }
 }
index 912f6c4f55771c1bd6a6f20152f8799744a961e6..1cfeea14f30feab7f1ed815a1a80da15b625695c 100644 (file)
@@ -1136,12 +1136,12 @@ namespace System.Web.UI.WebControls
                        return null;
                }
 
-               protected override void LoadViewState (object savedState)
+               protected override void LoadViewState (object state)
                {
-                       if (savedState == null)
+                       if (state == null)
                                return;
 
-                       object [] states = (object []) savedState;
+                       object [] states = (object []) state;
                        base.LoadViewState (states[0]);
                        
                        if (states[1] != null)
@@ -1178,10 +1178,10 @@ namespace System.Web.UI.WebControls
                        base.OnInit (e);
                }
                
-               protected internal override void LoadControlState (object ob)
+               protected internal override void LoadControlState (object savedState)
                {
-                       if (ob == null) return;
-                       object[] state = (object[]) ob;
+                       if (savedState == null) return;
+                       object[] state = (object[]) savedState;
                        base.LoadControlState (state[0]);
                        selectedItemPath = state[1] as string;
                }
@@ -1274,12 +1274,12 @@ namespace System.Web.UI.WebControls
                        base.DataBind ();
                }
                
-               protected override bool OnBubbleEvent (object source, EventArgs args)
+               protected override bool OnBubbleEvent (object source, EventArgs e)
                {
-                       if (!(args is CommandEventArgs))
+                       if (!(e is CommandEventArgs))
                                return false;
 
-                       MenuEventArgs menuArgs = args as MenuEventArgs;
+                       MenuEventArgs menuArgs = e as MenuEventArgs;
                        if (menuArgs != null && string.Equals (menuArgs.CommandName, MenuItemClickCommandName))
                                OnMenuItemClick (menuArgs);
                        return true;
index 6ed16f68b74b5c2c0c9ab8b9e30e6688373f918f..da9363a2345aaa352c2c8af605d48a291049534f 100644 (file)
@@ -68,9 +68,9 @@ namespace System.Web.UI.WebControls
                        return types;
                }
                
-               public int IndexOf (MenuItemBinding binding)
+               public int IndexOf (MenuItemBinding value)
                {
-                       return ((IList)this).IndexOf (binding);
+                       return ((IList)this).IndexOf (value);
                }
                
                public void Insert (int index, MenuItemBinding binding)
index 1bcb60e5ccc44964d48e59b7a5d158825ae64511..af6b7f6d0a5729dd42418c581541d4ab416ff740 100644 (file)
@@ -65,8 +65,8 @@ namespace System.Web.UI.WebControls
                                item.Menu = menu;
                }
                
-               public MenuItem this [int i] {
-                       get { return (MenuItem) items [i]; }
+               public MenuItem this [int index] {
+                       get { return (MenuItem) items [index]; }
                }
                
                public void Add (MenuItem child)
@@ -114,19 +114,19 @@ namespace System.Web.UI.WebControls
                        }
                }
                
-               public bool Contains (MenuItem child)
+               public bool Contains (MenuItem c)
                {
-                       return items.Contains (child);
+                       return items.Contains (c);
                }
                
-               public void CopyTo (Array itemArray, int index)
+               public void CopyTo (Array array, int index)
                {
-                       items.CopyTo (itemArray, index);
+                       items.CopyTo (array, index);
                }
                
-               public void CopyTo (MenuItem[] itemArray, int index)
+               public void CopyTo (MenuItem[] array, int index)
                {
-                       items.CopyTo (itemArray, index);
+                       items.CopyTo (array, index);
                }
                
                public IEnumerator GetEnumerator ()
@@ -134,18 +134,18 @@ namespace System.Web.UI.WebControls
                        return items.GetEnumerator ();
                }
                
-               public int IndexOf (MenuItem item)
+               public int IndexOf (MenuItem value)
                {
-                       return items.IndexOf (item);
+                       return items.IndexOf (value);
                }
                
-               public void Remove (MenuItem item)
+               public void Remove (MenuItem value)
                {
-                       int i = IndexOf (item);
+                       int i = IndexOf (value);
                        if (i == -1) return;
                        items.RemoveAt (i);
                        if (menu != null)
-                               item.Menu = null;
+                               value.Menu = null;
                        if (marked) {
                                SetDirty ();
                        }
index bf0a297256e082e9800d5aa92f902c98d6d61802..80dde584cbc43252ac13b1ef6af6a1a9337946fa 100644 (file)
@@ -53,9 +53,9 @@ namespace System.Web.UI.WebControls
                        return ((IList)this).Contains (style);
                }
                
-               public void CopyTo (MenuItemStyle[] array, int index)
+               public void CopyTo (MenuItemStyle[] styleArray, int index)
                {
-                       ((IList)this).CopyTo (array, index);
+                       ((IList)this).CopyTo (styleArray, index);
                }
                
                protected override object CreateKnownType (int index)
index a4681d9f9b5cfbd13d9aad20ed31217367301916..987f09bdf9096533699ef6eac10013a62d9e42c9 100644 (file)
@@ -40,15 +40,15 @@ namespace System.Web.UI.WebControls
                object dataItem;
                int index;
                
-               public MenuItemTemplateContainer (int itemIndex, MenuItem menuItem)
+               public MenuItemTemplateContainer (int itemIndex, MenuItem dataItem)
                {
-                       index = itemIndex;
-                       dataItem = menuItem;
+                       this.index = itemIndex;
+                       this.dataItem = dataItem;
                }
                
-               protected override bool OnBubbleEvent (object source, EventArgs args)
+               protected override bool OnBubbleEvent (object source, EventArgs e)
                {
-                       CommandEventArgs command = args as CommandEventArgs;
+                       CommandEventArgs command = e as CommandEventArgs;
                        if (command == null)
                                return false;
 
index 9c6d916fb024ab41f9db73cc8b46566aa0ece69d..faae2cee9de33124af589a9304c0e7a5b3655749 100644 (file)
@@ -59,10 +59,10 @@ namespace System.Web.UI.WebControls
                        remove { Events.RemoveHandler (ActiveViewChangedEvent, value); }
                }
                
-               protected override void AddParsedSubObject (object ob)
+               protected override void AddParsedSubObject (object obj)
                {
-                       if (ob is View)
-                               Controls.Add (ob as View);
+                       if (obj is View)
+                               Controls.Add (obj as View);
                        // LAMESPEC: msdn talks that only View contorls are allowed, for others controls HttpException should be thrown
                        // but actually, aspx praser adds LiteralControl controls.
                        //else
index 56600e995985d30a3670b7b641f3d6b3ac013aab..015c761d008078a6c1a0c6c4c2a5f684d20d6414 100644 (file)
@@ -220,15 +220,15 @@ namespace System.Web.UI.WebControls {
                        return source.GetEnumerator ();
                }
 
-               public PropertyDescriptorCollection GetItemProperties (PropertyDescriptor [] list_accessors)
+               public PropertyDescriptorCollection GetItemProperties (PropertyDescriptor [] listAccessors)
                {
                        ITypedList typed = source as ITypedList;
                        if (typed == null)
                                return null;
-                       return typed.GetItemProperties (list_accessors);
+                       return typed.GetItemProperties (listAccessors);
                }
 
-               public string GetListName (PropertyDescriptor [] list_accessors)
+               public string GetListName (PropertyDescriptor [] listAccessors)
                {
                        return String.Empty; // as documented
                }
index 6a6f99a07b2640b6c20a71ea1e476ab4b3c94bf4..9e1c41838761ad17813caa54720f29c805821de8 100644 (file)
@@ -47,14 +47,14 @@ namespace System.Web.UI.WebControls {
                {
                }
                
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                        
                        string image = BackImageUrl;
                        if (image != "") {
                                image = ResolveClientUrl (image);
-                               w.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, image);
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, image);
                        }
 
                        if (!String.IsNullOrEmpty (DefaultButton) && Page != null) {
@@ -64,32 +64,32 @@ namespace System.Web.UI.WebControls {
 
                                Page.ClientScript.RegisterWebFormClientScript ();
 
-                               w.AddAttribute ("onkeypress",
+                               writer.AddAttribute ("onkeypress",
                                                "javascript:return " + Page.WebFormScriptReference + ".WebForm_FireDefaultButton(event, '" + button.ClientID + "')");
                        }
 
                        if (Direction != ContentDirection.NotSet) {
-                               w.AddAttribute (HtmlTextWriterAttribute.Dir, Direction == ContentDirection.RightToLeft ? "rtl" : "ltr", false);
+                               writer.AddAttribute (HtmlTextWriterAttribute.Dir, Direction == ContentDirection.RightToLeft ? "rtl" : "ltr", false);
                        }
 
                        switch (ScrollBars) {
                        case ScrollBars.Auto:
-                               w.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "auto");
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "auto");
                                break;
                        case ScrollBars.Both:
-                               w.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "scroll");
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.Overflow, "scroll");
                                break;
                        case ScrollBars.Horizontal:
-                               w.AddStyleAttribute (HtmlTextWriterStyle.OverflowX, "scroll");
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.OverflowX, "scroll");
                                break;
                        case ScrollBars.Vertical:
-                               w.AddStyleAttribute (HtmlTextWriterStyle.OverflowY, "scroll");
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.OverflowY, "scroll");
                                break;
                        }
 
 
                        if (!Wrap) {
-                               w.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.WhiteSpace, "nowrap");
                        }
 
                        string align = "";
@@ -102,7 +102,7 @@ namespace System.Web.UI.WebControls {
                        }
 
                        if (align != "")
-                               w.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, align);
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.TextAlign, align);
                }
                PanelStyle PanelStyle {
                        get { return (ControlStyle as PanelStyle); }
index 0fa2d56c069d4c59c67cc3e8fa33820a1244361f..92b8d4dc2786fa27d64f85be999523adbdaf5a4d 100644 (file)
@@ -50,9 +50,9 @@ namespace System.Web.UI.WebControls
                                                    
                EventHandler _parametersChanged;
 
-               public int Add (Parameter param)
+               public int Add (Parameter parameter)
                {
-                       return ((IList)this).Add (param);
+                       return ((IList)this).Add (parameter);
                }
 
                public int Add (string name, string value)
@@ -70,9 +70,9 @@ namespace System.Web.UI.WebControls
                        return ((IList)this).Add (new Parameter (name, dbType, value));
                }
                
-               protected override object CreateKnownType (int idx)
+               protected override object CreateKnownType (int index)
                {
-                       switch (idx) {
+                       switch (index) {
                        case 0:
                                return new ControlParameter ();
                        case 1:
@@ -114,9 +114,9 @@ namespace System.Web.UI.WebControls
                                param.UpdateValue (context, control);
                }
                
-               public void Insert (int idx, Parameter param)
+               public void Insert (int index, Parameter parameter)
                {
-                       ((IList)this).Insert (idx, param);
+                       ((IList)this).Insert (index, parameter);
                }
 
                protected override void OnClearComplete ()
@@ -125,15 +125,15 @@ namespace System.Web.UI.WebControls
                        OnParametersChanged (EventArgs.Empty);
                }
 
-               protected override void OnInsert (int idx, object value)
+               protected override void OnInsert (int index, object value)
                {
-                       base.OnInsert (idx, value);
+                       base.OnInsert (index, value);
                        ((Parameter)value).SetOwnerCollection (this);
                }
 
-               protected override void OnInsertComplete (int idx, object value)
+               protected override void OnInsertComplete (int index, object value)
                {
-                       base.OnInsertComplete (idx, value);
+                       base.OnInsertComplete (index, value);
                        OnParametersChanged (EventArgs.Empty);
                }
 
@@ -151,14 +151,14 @@ namespace System.Web.UI.WebControls
                                throw new ArgumentException ("o is not a Parameter");
                }
 
-               public void Remove (Parameter param)
+               public void Remove (Parameter parameter)
                {
-                       ((IList)this).Remove (param);
+                       ((IList)this).Remove (parameter);
                }
 
-               public void RemoveAt (int idx)
+               public void RemoveAt (int index)
                {
-                       ((IList)this).RemoveAt (idx);
+                       ((IList)this).RemoveAt (index);
                }
 
                protected override void SetDirtyObject (object o)
@@ -181,12 +181,12 @@ namespace System.Web.UI.WebControls
                        return -1;
                }
 
-               public Parameter this[int idx] {
+               public Parameter this[int index] {
                        get {
-                               return (Parameter) ((IList)this)[idx];
+                               return (Parameter) ((IList)this)[index];
                        }
                        set {
-                               ((IList)this)[idx] = value;
+                               ((IList)this)[index] = value;
                        }
                }
 
@@ -212,19 +212,19 @@ namespace System.Web.UI.WebControls
                        remove { _parametersChanged -= value; }
                }
 
-               public bool Contains (Parameter param)
+               public bool Contains (Parameter parameter)
                {
-                       return ((IList)this).Contains (param);
+                       return ((IList)this).Contains (parameter);
                }
 
-               public void CopyTo (Parameter[] paramArray, int index)
+               public void CopyTo (Parameter[] parameterArray, int index)
                {
-                       ((IList)this).CopyTo (paramArray, index);
+                       ((IList)this).CopyTo (parameterArray, index);
                }
 
-               public int IndexOf (Parameter param)
+               public int IndexOf (Parameter parameter)
                {
-                       return ((IList)this).IndexOf (param);
+                       return ((IList)this).IndexOf (parameter);
                }
 
                protected override void OnRemoveComplete (int index, object value)
index e6813d1eef1cfd2bec7afb8b89456e5e4d42b910..f6e0fbe1acd6f9d18f7c27b8ec9bd93b69a38ddc 100644 (file)
@@ -69,12 +69,12 @@ namespace System.Web.UI.WebControls {
                        return new QueryStringParameter (this);
                }
                protected internal
-               override object Evaluate (HttpContext ctx, Control control)
+               override object Evaluate (HttpContext context, Control control)
                {
-                       if (ctx == null || ctx.Request == null)
+                       if (context == null || context.Request == null)
                                return null;
                        
-                       return ctx.Request.QueryString [QueryStringField];
+                       return context.Request.QueryString [QueryStringField];
                }
                
                [DefaultValueAttribute ("")]
index c80ad4d105ba60e0480b0acc6c383ad4ecd1512c..5764a48930cf8fc8e447834e1c8d58235494c0b4 100644 (file)
@@ -46,7 +46,7 @@ namespace System.Web.UI.WebControls {
                {
                }
 
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
                        if (RenderUplevel) {
                                RegisterExpandoAttribute (ClientID, "evaluationfunction", "RegularExpressionValidatorEvaluateIsValid");
@@ -54,7 +54,7 @@ namespace System.Web.UI.WebControls {
                                        RegisterExpandoAttribute (ClientID, "validationexpression", ValidationExpression, true);
                        }
 
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                }
 
                protected override bool EvaluateIsValid ()
index 953d23981ce05e66f58043095f9ffae058bc1a88..42b5ddb8a0ad15246bb04ddf1ce93d428935ccfa 100644 (file)
@@ -39,7 +39,7 @@ namespace System.Web.UI.WebControls {
        public sealed class RepeatInfo {
 
                // What is baseControl for ?
-               public void RenderRepeater (HtmlTextWriter w, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
+               public void RenderRepeater (HtmlTextWriter writer, IRepeatInfoUser user, Style controlStyle, WebControl baseControl)
                {
                        PrintValues (user);
                        RepeatLayout layout = RepeatLayout;
@@ -60,13 +60,13 @@ namespace System.Web.UI.WebControls {
                        }
                        if (RepeatDirection == RepeatDirection.Vertical) {
                                if (listLayout)
-                                       RenderList (w, user, controlStyle, baseControl);
+                                       RenderList (writer, user, controlStyle, baseControl);
                                else
-                                       RenderVert (w, user, controlStyle, baseControl);
+                                       RenderVert (writer, user, controlStyle, baseControl);
                        } else {
                                if (listLayout)
                                                throw new InvalidOperationException ("The UnorderedList and OrderedList layouts only support vertical layout.");
-                               RenderHoriz (w, user, controlStyle, baseControl);
+                               RenderHoriz (writer, user, controlStyle, baseControl);
                        }
                }
 
index d0e5bdf645f1223840b3ed2c198fe8d74f6ed220..d57bbc9ae19bb7c94b7094fd5332c59bf1e18d3c 100644 (file)
@@ -36,14 +36,14 @@ namespace System.Web.UI.WebControls {
        // attributes
        [ToolboxData ("<{0}:RequiredFieldValidator runat=\"server\" ErrorMessage=\"RequiredFieldValidator\"></{0}:RequiredFieldValidator>")]
        public class RequiredFieldValidator : BaseValidator {
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
                        if (RenderUplevel) {
                                RegisterExpandoAttribute (ClientID, "evaluationfunction", "RequiredFieldValidatorEvaluateIsValid");
                                RegisterExpandoAttribute (ClientID, "initialvalue", InitialValue, true);
                        }
 
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                }
                
                protected override bool EvaluateIsValid ()
index 7555cb77befed5b2cb2d51bf7f3fe9f3fe8bc1df..62b90b13d7fde5e68a7e276adeb12abc5096777f 100644 (file)
@@ -33,10 +33,10 @@ namespace System.Web.UI.WebControls {
                string value;
                bool is_valid;
                
-               public ServerValidateEventArgs (string value, bool is_valid)
+               public ServerValidateEventArgs (string value, bool isValid)
                {
                        this.value = value;
-                       this.is_valid = is_valid;
+                       this.is_valid = isValid;
                }
 
                public string Value {
index e90afda34ee92084bf41790ee14a80ea3d236d78..156754611bf1a881dca6a44d66215e29baa6c9c2 100644 (file)
@@ -68,12 +68,12 @@ namespace System.Web.UI.WebControls {
                        return new SessionParameter (this);
                }
                protected internal
-               override object Evaluate (HttpContext ctx, Control control)
+               override object Evaluate (HttpContext context, Control control)
                {
-                       if (ctx == null || ctx.Session == null)
+                       if (context == null || context.Session == null)
                                return null;
                        
-                       return ctx.Session [SessionField];
+                       return context.Session [SessionField];
                }
                
                [DefaultValueAttribute ("")]
index 071578a04104ef1808f73082281f8f843ff187ff..06899980797fd6bd320ad436d52d580e2fbad1d6 100644 (file)
@@ -42,13 +42,13 @@ namespace System.Web.UI.WebControls
        {
                SiteMapNodeCollection collection;
                
-               public SiteMapDataSourceView (SiteMapDataSource owner, string viewName, SiteMapNode node)
-               : this (owner, viewName, new SiteMapNodeCollection (node))
+               public SiteMapDataSourceView (SiteMapDataSource owner, string name, SiteMapNode node)
+               : this (owner, name, new SiteMapNodeCollection (node))
                {
                }
                
-               public SiteMapDataSourceView (SiteMapDataSource owner, string viewName, SiteMapNodeCollection collection)
-               : base (owner, viewName)
+               public SiteMapDataSourceView (SiteMapDataSource owner, string name, SiteMapNodeCollection collection)
+               : base (owner, name)
                {
                        this.collection = collection;
                }
index ae6e64a65811031ae0b5341b5c8d4f710dfc35e6..312b169c9b7fc8dc69b03a0a06e22103479f50ff 100644 (file)
@@ -451,12 +451,12 @@ namespace System.Web.UI.WebControls
                }
                
                [MonoTODO ("why override?")]
-               protected internal override void Render (HtmlTextWriter w)
+               protected internal override void Render (HtmlTextWriter writer)
                {
-                       base.Render (w);
+                       base.Render (writer);
                }
 
-               protected internal override void RenderContents (HtmlTextWriter w)
+               protected internal override void RenderContents (HtmlTextWriter writer)
                {
                        string skip_id = ClientID + "_SkipLink";
                        string altText = SkipLinkText;
@@ -464,27 +464,27 @@ namespace System.Web.UI.WebControls
                        
                        if (needAnchor) {
                                // Anchor start
-                               w.AddAttribute (HtmlTextWriterAttribute.Href, "#" + skip_id);
-                               w.RenderBeginTag (HtmlTextWriterTag.A);
+                               writer.AddAttribute (HtmlTextWriterAttribute.Href, "#" + skip_id);
+                               writer.RenderBeginTag (HtmlTextWriterTag.A);
 
                                // Image
-                               w.AddAttribute (HtmlTextWriterAttribute.Alt, altText);
-                               w.AddAttribute (HtmlTextWriterAttribute.Height, "0");
-                               w.AddAttribute (HtmlTextWriterAttribute.Width, "0");
-                               w.AddAttribute (HtmlTextWriterAttribute.Src, Page.ClientScript.GetWebResourceUrl (typeof (SiteMapPath), "transparent.gif"));
-                               w.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0px");
-                               w.RenderBeginTag (HtmlTextWriterTag.Img);
-                               w.RenderEndTag ();
+                               writer.AddAttribute (HtmlTextWriterAttribute.Alt, altText);
+                               writer.AddAttribute (HtmlTextWriterAttribute.Height, "0");
+                               writer.AddAttribute (HtmlTextWriterAttribute.Width, "0");
+                               writer.AddAttribute (HtmlTextWriterAttribute.Src, Page.ClientScript.GetWebResourceUrl (typeof (SiteMapPath), "transparent.gif"));
+                               writer.AddStyleAttribute (HtmlTextWriterStyle.BorderWidth, "0px");
+                               writer.RenderBeginTag (HtmlTextWriterTag.Img);
+                               writer.RenderEndTag ();
 
-                               w.RenderEndTag ();
+                               writer.RenderEndTag ();
                        }
 
-                       base.RenderContents (w);
+                       base.RenderContents (writer);
 
                        if (needAnchor) {
-                                w.AddAttribute(HtmlTextWriterAttribute.Id, skip_id);
-                                w.RenderBeginTag(HtmlTextWriterTag.A);
-                                w.RenderEndTag();
+                                writer.AddAttribute(HtmlTextWriterAttribute.Id, skip_id);
+                                writer.RenderBeginTag(HtmlTextWriterTag.A);
+                                writer.RenderEndTag();
                        }
                }
                
index e27be97b4108819d78de5879bcd1b41c5783e78b..5970caae0ac806b95fd50c8ea291ca4b057eeb47 100644 (file)
@@ -118,9 +118,9 @@ namespace System.Web.UI.WebControls {
                        return View.Delete (null, null);
                }
                
-               public IEnumerable Select (DataSourceSelectArguments args)
+               public IEnumerable Select (DataSourceSelectArguments arguments)
                {
-                       return View.Select (args);                      
+                       return View.Select (arguments);                 
                }
                
                public int Update ()
index b975b4ce35f2ce4adf1003f7be2a37ca6facca12..5557f2dc18e6c3bb36a4c4f96c727f0dbf366674 100644 (file)
@@ -673,10 +673,10 @@ namespace System.Web.UI.WebControls {
                        registered_class = name;
                }
 
-               public CssStyleCollection GetStyleAttributes (IUrlResolutionService resolver)
+               public CssStyleCollection GetStyleAttributes (IUrlResolutionService urlResolver)
                {
                        CssStyleCollection col = new CssStyleCollection ();
-                       FillStyleAttributes (col, resolver);
+                       FillStyleAttributes (col, urlResolver);
                        return col;
                }
 
index ed4a84bab557348cc1aeb57a0b34e7d931f50138..3e1b071c9d7cb43b1979fef7d741650bc9415b5b 100644 (file)
@@ -53,9 +53,9 @@ namespace System.Web.UI.WebControls
                        return ((IList)this).Contains (style);
                }
                
-               public void CopyTo (SubMenuStyle[] array, int index)
+               public void CopyTo (SubMenuStyle[] styleArray, int index)
                {
-                       ((IList)this).CopyTo (array, index);
+                       ((IList)this).CopyTo (styleArray, index);
                }
                
                protected override object CreateKnownType (int index)
index 1d6fa34163f3ad7c9f55ba59e67532b731518a71..6ceb488e1bf7081cd6e4fe7ebd0e6579e3f28237 100644 (file)
@@ -84,7 +84,7 @@ namespace System.Web.UI.WebControls {
                        "search"
                };
 
-               protected override void AddAttributesToRender (HtmlTextWriter w)
+               protected override void AddAttributesToRender (HtmlTextWriter writer)
                {
                        Page page = Page;
                        if (page != null)
@@ -93,17 +93,17 @@ namespace System.Web.UI.WebControls {
                        switch (TextMode) {
                        case TextBoxMode.MultiLine:
                                if (Columns != 0)
-                                       w.AddAttribute (HtmlTextWriterAttribute.Cols, Columns.ToString (), false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Cols, Columns.ToString (), false);
                                else
-                                       w.AddAttribute (HtmlTextWriterAttribute.Cols, "20", false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Cols, "20", false);
                                
                                if (Rows != 0)
-                                       w.AddAttribute (HtmlTextWriterAttribute.Rows, Rows.ToString (), false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Rows, Rows.ToString (), false);
                                else
-                                       w.AddAttribute (HtmlTextWriterAttribute.Rows, "2", false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Rows, "2", false);
 
                                if (!Wrap)
-                                       w.AddAttribute (HtmlTextWriterAttribute.Wrap, "off", false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Wrap, "off", false);
                                
                                break;
                                
@@ -111,45 +111,45 @@ namespace System.Web.UI.WebControls {
                        case TextBoxMode.Password:
                                
                                if (TextMode == TextBoxMode.Password)
-                                       w.AddAttribute (HtmlTextWriterAttribute.Type, "password", false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Type, "password", false);
                                else {
-                                       w.AddAttribute (HtmlTextWriterAttribute.Type, "text", false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Type, "text", false);
                                        if (Text.Length > 0)
-                                               w.AddAttribute (HtmlTextWriterAttribute.Value, Text);
+                                               writer.AddAttribute (HtmlTextWriterAttribute.Value, Text);
                                }
                                
                                if (Columns != 0)
-                                       w.AddAttribute (HtmlTextWriterAttribute.Size, Columns.ToString (), false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Size, Columns.ToString (), false);
                
                                if (MaxLength != 0)
-                                       w.AddAttribute (HtmlTextWriterAttribute.Maxlength, MaxLength.ToString (), false);
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Maxlength, MaxLength.ToString (), false);
 
                                if (AutoCompleteType != AutoCompleteType.None && TextMode == TextBoxMode.SingleLine)
                                        if (AutoCompleteType != AutoCompleteType.Disabled)
-                                               w.AddAttribute (HtmlTextWriterAttribute.VCardName, VCardValues [(int) AutoCompleteType]);
+                                               writer.AddAttribute (HtmlTextWriterAttribute.VCardName, VCardValues [(int) AutoCompleteType]);
                                        else
-                                               w.AddAttribute (HtmlTextWriterAttribute.AutoComplete, "off", false);
+                                               writer.AddAttribute (HtmlTextWriterAttribute.AutoComplete, "off", false);
                                break;  
                        }
 
                        if (AutoPostBack) {
-                               w.AddAttribute ("onkeypress", "if (WebForm_TextBoxKeyHandler(event) == false) return false;", false);
+                               writer.AddAttribute ("onkeypress", "if (WebForm_TextBoxKeyHandler(event) == false) return false;", false);
 
                                if (page != null) {
                                        string onchange = page.ClientScript.GetPostBackEventReference (GetPostBackOptions (), true);
                                        onchange = String.Concat ("setTimeout('", onchange.Replace ("\\", "\\\\").Replace ("'", "\\'"), "', 0)");
-                                       w.AddAttribute (HtmlTextWriterAttribute.Onchange, BuildScriptAttribute ("onchange", onchange));
+                                       writer.AddAttribute (HtmlTextWriterAttribute.Onchange, BuildScriptAttribute ("onchange", onchange));
                                }
                        } else if (page != null)
                                page.ClientScript.RegisterForEventValidation (UniqueID, String.Empty);
                                
 
                        if (ReadOnly)
-                               w.AddAttribute (HtmlTextWriterAttribute.ReadOnly, "ReadOnly", false);
+                               writer.AddAttribute (HtmlTextWriterAttribute.ReadOnly, "ReadOnly", false);
 
-                       w.AddAttribute (HtmlTextWriterAttribute.Name, UniqueID);
+                       writer.AddAttribute (HtmlTextWriterAttribute.Name, UniqueID);
                        
-                       base.AddAttributesToRender (w);
+                       base.AddAttributesToRender (writer);
                }
 
                protected override void AddParsedSubObject (object obj)
@@ -174,16 +174,16 @@ namespace System.Web.UI.WebControls {
                }
 
                protected internal
-               override void Render (HtmlTextWriter w)
+               override void Render (HtmlTextWriter writer)
                {
                        // Why didn't msft just override RenderContents!?
-                       RenderBeginTag (w);
+                       RenderBeginTag (writer);
                        if (TextMode == TextBoxMode.MultiLine) {
-                               w.WriteLine ();
-                               HttpUtility.HtmlEncode (Text, w);
+                               writer.WriteLine ();
+                               HttpUtility.HtmlEncode (Text, writer);
                        }
                        
-                       RenderEndTag (w);
+                       RenderEndTag (writer);
                }
                
                protected virtual
index 73c8d5fc401e4771f6d11c21fd86b140f15d66a0..c521745f036a45ced8a09bbf3b1190a0ea372fca 100644 (file)
@@ -506,17 +506,17 @@ namespace System.Web.UI.WebControls
                        Expanded = !Expanded.GetValueOrDefault(false);
                }
 
-               void IStateManager.LoadViewState (object savedState)
+               void IStateManager.LoadViewState (object state)
                {
-                       LoadViewState (savedState);
+                       LoadViewState (state);
                }
 
-               protected virtual void LoadViewState (object savedState)
+               protected virtual void LoadViewState (object state)
                {
-                       if (savedState == null)
+                       if (state == null)
                                return;
 
-                       object[] states = (object[]) savedState;
+                       object[] states = (object[]) state;
                        ViewState.LoadViewState (states [0]);
                        
                        if (tree != null && SelectedFlag)
index 887166dbfd2456e000b0b1d44cf8af2e7a9e4623..c6152b8d6906d729b59ef2739cc634df38f7fdb6 100644 (file)
@@ -53,9 +53,9 @@ namespace System.Web.UI.WebControls
                        return ((IList)this).Contains (binding);
                }
                
-               public void CopyTo (TreeNodeBinding[] array, int index)
+               public void CopyTo (TreeNodeBinding[] bindingArray, int index)
                {
-                       ((IList)this).CopyTo (array, index);
+                       ((IList)this).CopyTo (bindingArray, index);
                }
                
                protected override object CreateKnownType (int index)
index e022825bb925ff4be99d0b03bbc2a0d10c44defa..177cd5d73e8137a109884fc17e6d410a597b3d45 100644 (file)
@@ -65,8 +65,8 @@ namespace System.Web.UI.WebControls
                                node.Tree = tree;
                }
                
-               public TreeNode this [int i] {
-                       get { return (TreeNode) items [i]; }
+               public TreeNode this [int index] {
+                       get { return (TreeNode) items [index]; }
                }
                
                public void Add (TreeNode child)
@@ -127,9 +127,9 @@ namespace System.Web.UI.WebControls
                        }
                }
                
-               public bool Contains (TreeNode child)
+               public bool Contains (TreeNode c)
                {
-                       return items.Contains (child);
+                       return items.Contains (c);
                }
                
                public void CopyTo (TreeNode[] nodeArray, int index)
@@ -142,18 +142,18 @@ namespace System.Web.UI.WebControls
                        return items.GetEnumerator ();
                }
                
-               public int IndexOf (TreeNode node)
+               public int IndexOf (TreeNode value)
                {
-                       return items.IndexOf (node);
+                       return items.IndexOf (value);
                }
                
-               public void Remove (TreeNode node)
+               public void Remove (TreeNode value)
                {
-                       int i = IndexOf (node);
+                       int i = IndexOf (value);
                        if (i == -1) return;
                        items.RemoveAt (i);
                        if (tree != null)
-                               node.Tree = null;
+                               value.Tree = null;
                        if (marked) {
                                SetDirty ();
                        }
index b8761bf75daa0818090cd9e0cdea61cdfb1dec1f..3a78a6c606d909d8c53492a8f922664d837ee3ac 100644 (file)
@@ -57,9 +57,9 @@ namespace System.Web.UI.WebControls
                        return ((IList)this).Contains (style);
                }
                
-               public void CopyTo (TreeNodeStyle[] array, int index)
+               public void CopyTo (TreeNodeStyle[] styleArray, int index)
                {
-                       ((IList)this).CopyTo (array, index);
+                       ((IList)this).CopyTo (styleArray, index);
                }
                
                protected override object CreateKnownType (int index)
index f0ebcdeb3eaf0d54cd235454161b097dac8f7eeb..dddf18f0c56c2ea9df41bba7685e0a145057c881 100644 (file)
@@ -827,12 +827,12 @@ namespace System.Web.UI.WebControls
                        return null;
                }
 
-               protected override void LoadViewState (object savedState)
+               protected override void LoadViewState (object state)
                {
-                       if (savedState == null)
+                       if (state == null)
                                return;
                                
-                       object [] states = (object []) savedState;
+                       object [] states = (object []) state;
                        base.LoadViewState (states[0]);
                        
                        if (states[1] != null)
@@ -921,9 +921,9 @@ namespace System.Web.UI.WebControls
                }
                
                string callbackResult;
-               protected virtual void RaiseCallbackEvent (string eventArgs)
+               protected virtual void RaiseCallbackEvent (string eventArgument)
                {
-                       string[] args = eventArgs.Split ('|');
+                       string[] args = eventArgument.Split ('|');
                        RequiresDataBinding = true;
                        EnsureDataBound ();
                        
index 29cb4e82e376262994963b432371216914e71fe7..bd20017e7b9f36a61c57cc9010c8e693b15c2fd3 100644 (file)
@@ -376,14 +376,14 @@ namespace System.Web.UI.WebControls {
                        return ToString (Helpers.InvariantCulture);
                }
 
-               public string ToString (IFormatProvider provider)
+               public string ToString (IFormatProvider formatProvider)
                {
                        if (type == 0)
                                return String.Empty;
 
                        string ex = GetExtension (type);
 
-                       return value.ToString (provider) + ex;
+                       return value.ToString (formatProvider) + ex;
                }
        }
 
index 3cb54bf0dfd7aa6a3bd0f9e2c169982c398d6097..e7c1846c3719677c0adfaeb5049d1186dbe80126 100644 (file)
@@ -1299,13 +1299,13 @@ namespace System.Web.UI.WebControls
                        throw new NotImplementedException ();
                }
                
-               protected internal override void LoadControlState (object ob)
+               protected internal override void LoadControlState (object state)
                {
-                       if (ob == null) return;
-                       object[] state = (object[]) ob;
-                       base.LoadControlState (state[0]);
-                       activeStepIndex = (int) state[1];
-                       history = (ArrayList) state[2];
+                       if (state == null) return;
+                       object[] controlState = (object[]) state;
+                       base.LoadControlState (controlState[0]);
+                       activeStepIndex = (int) controlState[1];
+                       history = (ArrayList) controlState[2];
                }
                
                protected internal override object SaveControlState ()
index d451f634aa1d8b5b177238e6d81d4de3231fa6de..961e240e721d4ac89b1cdf9066c3e68c2f80dc6a 100644 (file)
@@ -37,10 +37,10 @@ namespace System.Web.UI.WebControls
                int nxtStepIndex;
                bool cancel;
                
-               public WizardNavigationEventArgs (int currentIndex, int nextIndex)
+               public WizardNavigationEventArgs (int currentStepIndex, int nextStepIndex)
                {
-                       this.curStepIndex = currentIndex;
-                       this.nxtStepIndex = nextIndex;
+                       this.curStepIndex = currentStepIndex;
+                       this.nxtStepIndex = nextStepIndex;
                        cancel = false;
                }
                
index 294f4825b1d10b345fe5787d1e3e8c09d27d0fe5..53d1544c524851e17ab5d1e7b5e244e02f34f39c 100644 (file)
@@ -29,6 +29,6 @@
 //
 
 namespace System.Web.UI.WebControls {
-       public delegate void WizardNavigationEventHandler (object source, WizardNavigationEventArgs e);
+       public delegate void WizardNavigationEventHandler (object sender, WizardNavigationEventArgs e);
 }
 
index 4bcf8835302941b49c07801dfd3ff6f1d3223f20..3044263a8da7c4045ceba007bdf1f658a97a956c 100644 (file)
@@ -48,9 +48,9 @@ namespace System.Web.UI {
                        this.bag = bag;
                }
 
-               public override bool Equals (object obj
+               public override bool Equals (object o) 
                {
-                       AttributeCollection other = obj as AttributeCollection;
+                       AttributeCollection other = o as AttributeCollection;
                        if (other == null) {
                                return false;
                        }
index f02d74c7d6ea761a154d579426a94fca5b30a9f4..e443504fd112cc73b728faac6c82c34392a12a10 100644 (file)
@@ -167,14 +167,14 @@ namespace System.Web.UI {
                        return (bool) attr_render [null];
                }
 
-               protected override bool OnStyleAttributeRender (string styleAttrName, string value, HtmlTextWriterStyle key)
+               protected override bool OnStyleAttributeRender (string name, string value, HtmlTextWriterStyle key)
                {
                        return key == HtmlTextWriterStyle.Display;
                }
 
-               protected override bool OnTagRender (string name, HtmlTextWriterTag tag)
+               protected override bool OnTagRender (string name, HtmlTextWriterTag key)
                {
-                       return tag != HtmlTextWriterTag.Span;
+                       return key != HtmlTextWriterTag.Span;
                }
        }
 }
index 0d4acd2943ef20bbfe3009573c34e5f952883da2..90361751a556e2140fc82c5a46081815b832ba1d 100644 (file)
@@ -41,14 +41,14 @@ public sealed class CompiledTemplateBuilder : ITemplate
 {
        BuildTemplateMethod templateMethod;
 
-       public CompiledTemplateBuilder (BuildTemplateMethod templateMethod)
+       public CompiledTemplateBuilder (BuildTemplateMethod buildTemplateMethod)
        {
-               this.templateMethod = templateMethod;
+               this.templateMethod = buildTemplateMethod;
        }
 
-       public void InstantiateIn (Control ctrl)
+       public void InstantiateIn (Control container)
        {
-               templateMethod (ctrl);
+               templateMethod (container);
        }
 }
 }
index d50949ac5026825a2b52219f95518946ef11e4f1..6a166f43e2e575b9c9e733d6f64e397ad4f63742 100644 (file)
@@ -1950,7 +1950,7 @@ namespace System.Web.UI
                        Page.SetFocus (this);
                }
 
-               protected internal virtual void LoadControlState (object state)
+               protected internal virtual void LoadControlState (object savedState)
                {
                }
 
index db51d4725c0c07a45be1cf83b48f2aedca59bc06..8929d3832d98c42e5e98e5f5692ace77487c45ac 100644 (file)
@@ -183,12 +183,12 @@ namespace System.Web.UI {
                        return new SimpleEnumerator (this);
                }
 
-               public virtual int IndexOf (Control c)
+               public virtual int IndexOf (Control value)
                {
-                       if (controls == null || c == null)
+                       if (controls == null || value == null)
                                return -1;
 
-                       return Array.IndexOf (controls, c);
+                       return Array.IndexOf (controls, value);
                }
 
                public virtual void Remove (Control value)
index 5810a86b19545a6e02404cd956ee87571939c207..6e9ea56b9c2e4bf8f434e68c3497f5ebedce4cd1 100644 (file)
@@ -38,21 +38,21 @@ namespace System.Web.UI {
                object propertyValue;
                Type propertyType;
 
-               public ControlValuePropertyAttribute (string propName) 
+               public ControlValuePropertyAttribute (string name) 
                {
-                       this.propertyName = propName;
+                       this.propertyName = name;
                }
 
-               public ControlValuePropertyAttribute (string propName, object propValue) 
+               public ControlValuePropertyAttribute (string name, object defaultValue) 
                {
-                       this.propertyName = propName;
-                       this.propertyValue = propValue;
+                       this.propertyName = name;
+                       this.propertyValue = defaultValue;
                }
 
-               public ControlValuePropertyAttribute (string propName, Type type, string propValue) 
+               public ControlValuePropertyAttribute (string name, Type type, string defaultValue) 
                {
-                       this.propertyName = propName;
-                       this.propertyValue = propValue;
+                       this.propertyName = name;
+                       this.propertyValue = defaultValue;
                        this.propertyType = type;
                }
 
index 822ac4b34639eb37d365995d1842c82c95207f99..34c8c955eb593e59b341b568478884941f87f80d 100644 (file)
@@ -167,9 +167,9 @@ namespace System.Web.UI {
                        return prop.GetValue (container, args);
                }
 
-               public static string GetIndexedPropertyValue (object container, string expr, string format)
+               public static string GetIndexedPropertyValue (object container, string propName, string format)
                {
-                       object result = GetIndexedPropertyValue (container, expr);
+                       object result = GetIndexedPropertyValue (container, propName);
                        return FormatResult (result, format);
                }
 
index 751a8ae1d1a2e700f740e97bf90ba42765d662b9..803a60e2e6563dcf27e457c37b55bcc6ab213143 100644 (file)
@@ -108,9 +108,9 @@ namespace System.Web.UI {
                }
 
                [EditorBrowsable (EditorBrowsableState.Never)]
-               public override void RenderControl (HtmlTextWriter tw)
+               public override void RenderControl (HtmlTextWriter writer)
                {
-                       base.RenderControl (tw);
+                       base.RenderControl (writer);
                }
 
                [EditorBrowsable (EditorBrowsableState.Never)]
index 6c0f0451912d878447739826b71d393e0399955d..3965b664f5f42ffd9a167ca3e2da7d92fac5ccf9 100644 (file)
@@ -57,22 +57,22 @@ namespace System.Web.UI
                        this.sortExpression = sortExpression;
                }
 
-               public DataSourceSelectArguments (int startingRowIndex, int maxRows)
+               public DataSourceSelectArguments (int startRowIndex, int maximumRows)
                {
-                       this.startingRowIndex = startingRowIndex;
-                       this.maxRows = maxRows;
+                       this.startingRowIndex = startRowIndex;
+                       this.maxRows = maximumRows;
                }
 
-               public DataSourceSelectArguments (string sortExpression, int startingRowIndex, int maxRows)
+               public DataSourceSelectArguments (string sortExpression, int startRowIndex, int maximumRows)
                {
                        this.sortExpression = sortExpression; 
-                       this.startingRowIndex = startingRowIndex;
-                       this.maxRows = maxRows;
+                       this.startingRowIndex = startRowIndex;
+                       this.maxRows = maximumRows;
                }
 
-               public void AddSupportedCapabilities (DataSourceCapabilities srcCapabilities)
+               public void AddSupportedCapabilities (DataSourceCapabilities capabilities)
                {
-                       this.dsc = this.dsc | srcCapabilities;
+                       this.dsc = this.dsc | capabilities;
                }
 
                // MSDN: The DataSourceSelectArguments class overrides the Object.Equals method to test 
index 7415b671ec96a16e45f27931d151c0727dd42e29..f8c4ae5adcd7c60fac25f6fec06851481ad649d5 100644 (file)
@@ -55,30 +55,30 @@ namespace System.Web.UI {
                        OnDataSourceViewChanged (EventArgs.Empty);
                }
 
-               public virtual void Delete (IDictionary keys, IDictionary values,
-                                               DataSourceViewOperationCallback callBack)
+               public virtual void Delete (IDictionary keys, IDictionary oldValues,
+                                               DataSourceViewOperationCallback callback)
                {
-                       if (callBack == null)
+                       if (callback == null)
                                throw new ArgumentNullException ("callBack");
 
                        int rowAffected;
                        try {
-                               rowAffected = ExecuteDelete (keys, values);
+                               rowAffected = ExecuteDelete (keys, oldValues);
                        }
                        catch (Exception e) {
-                               if (!callBack (0, e))
+                               if (!callback (0, e))
                                        throw;
                                return;
                        }
-                       callBack (rowAffected, null);
+                       callback (rowAffected, null);
                }
 
-               protected virtual int ExecuteDelete(IDictionary keys, IDictionary values)
+               protected virtual int ExecuteDelete(IDictionary keys, IDictionary oldValues)
                {
                        throw new NotSupportedException ();
                }
 
-               protected virtual int ExecuteInsert (IDictionary keys)
+               protected virtual int ExecuteInsert (IDictionary values)
                {
                        throw new NotSupportedException();
                }
@@ -93,29 +93,29 @@ namespace System.Web.UI {
                }
 
                public virtual void Insert (IDictionary values, 
-                                       DataSourceViewOperationCallback callBack)
+                                       DataSourceViewOperationCallback callback)
                {
-                       if (callBack == null)
-                               throw new ArgumentNullException("callBack");
+                       if (callback == null)
+                               throw new ArgumentNullException("callback");
 
                        int rowAffected;
                        try {
                                rowAffected = ExecuteInsert (values);
                        } catch (Exception e) {
-                               if (!callBack (0, e))
+                               if (!callback (0, e))
                                        throw;
                                return;
                        }
 
-                       callBack (rowAffected, null);
+                       callback (rowAffected, null);
                }
 
-               protected virtual void OnDataSourceViewChanged (EventArgs eventArgs)
+               protected virtual void OnDataSourceViewChanged (EventArgs e)
                {
                        if (eventsList != null) {
                                EventHandler evtHandler = eventsList [EventDataSourceViewChanged] as EventHandler;
                                if (evtHandler != null)
-                                       evtHandler(this, eventArgs);
+                                       evtHandler(this, e);
                        }
                }
                
@@ -137,34 +137,34 @@ namespace System.Web.UI {
                        return;
                }
 
-               public virtual void Select (DataSourceSelectArguments selectArgs,
-                                               DataSourceViewSelectCallback callBack)
+               public virtual void Select (DataSourceSelectArguments arguments,
+                                               DataSourceViewSelectCallback callback)
                {
-                       if (callBack == null)
+                       if (callback == null)
                                throw new ArgumentNullException("callBack");
 
-                       selectArgs.RaiseUnsupportedCapabilitiesError (this);
+                       arguments.RaiseUnsupportedCapabilitiesError (this);
                        
-                       IEnumerable selectList = ExecuteSelect (selectArgs);
-                       callBack (selectList);
+                       IEnumerable selectList = ExecuteSelect (arguments);
+                       callback (selectList);
                }
 
                public virtual void Update(IDictionary keys, IDictionary values,
-                       IDictionary oldValues, DataSourceViewOperationCallback callBack)
+                       IDictionary oldValues, DataSourceViewOperationCallback callback)
                {
-                       if (callBack == null)
-                               throw new ArgumentNullException ("callBack");
+                       if (callback == null)
+                               throw new ArgumentNullException ("callback");
 
                        int rowAffected;
                        try {
                                rowAffected = ExecuteUpdate (keys, values, oldValues);
                        } catch (Exception e) {
-                               if (!callBack (0, e))
+                               if (!callback (0, e))
                                        throw;
                                return;
                        }
 
-                       callBack (rowAffected, null);
+                       callback (rowAffected, null);
                } 
                
                public virtual bool CanDelete { get { return false; } }
index 003aabdd17d3415e8027eeb4deb78f358ce3b1b8..665a80ef14a13311755420218ecf057f0235aebd 100644 (file)
@@ -32,5 +32,5 @@ using System;
 
 namespace System.Web.UI
 {
-        public delegate bool DataSourceViewOperationCallback (int recordsAffected, Exception exception);
+        public delegate bool DataSourceViewOperationCallback (int affectedRecords, Exception ex);
 }
index a9590228e3295504bf7638a4479809f2abcc92b9..8cd4b7a874f1c7e67f8b9654831609f06637096a 100644 (file)
@@ -91,9 +91,9 @@ namespace System.Web.UI {
                        OnChanged (new EventArgs ());
                }
 
-               public bool Contains (string propertyName)
+               public bool Contains (string propName)
                {
-                       return list.Contains (propertyName);
+                       return list.Contains (propName);
                }
 
                public void CopyTo (Array array, int index)
@@ -101,17 +101,17 @@ namespace System.Web.UI {
                        list.CopyTo (array, index);
                }
 
-               public void CopyTo (ExpressionBinding [] bindings, int index)
+               public void CopyTo (ExpressionBinding [] array, int index)
                {
                        if (index < 0)
                                throw new ArgumentNullException ("Index cannot be negative");
-                       if (index >= bindings.Length)
+                       if (index >= array.Length)
                                throw new ArgumentException ("Index cannot be greater than or equal to length of array passed");            
-                       if (list.Count > (bindings.Length - index + 1))
+                       if (list.Count > (array.Length - index + 1))
                                throw new ArgumentException ("Number of elements in source is greater than available space from index to end of destination");
             
                        foreach (string key in list.Keys)
-                               bindings [index++] = (ExpressionBinding) list [key];
+                               array [index++] = (ExpressionBinding) list [key];
                }
 
                public IEnumerator GetEnumerator ()
index 45ce22e46e9fe5e50cbf3c0fded9fc049cdceccb..d0eb70ed90516e6530744bd7de2d911ca4fa3f42 100644 (file)
@@ -112,9 +112,9 @@ namespace System.Web.UI {
                }
 
 
-               public virtual void AddAttribute (string name, string value, bool fEncode)
+               public virtual void AddAttribute (string name, string value, bool fEndode)
                {
-                       if (fEncode)
+                       if (fEndode)
                                value = HttpUtility.HtmlAttributeEncode (value);
 
                        AddAttribute (name, value, GetAttributeKey (name));
@@ -562,10 +562,10 @@ namespace System.Web.UI {
                        b.Write (format, arg0, arg1);
                }
 
-               public override void Write (string format, params object [] args)
+               public override void Write (string format, params object [] arg)
                {
                        OutputTabs ();
-                       b.Write (format, args);
+                       b.Write (format, arg);
                }
 
                public override void Write (string s)
@@ -680,10 +680,10 @@ namespace System.Web.UI {
                        newline = true;
                }
 
-               public override void WriteLine (string format, params object [] args)
+               public override void WriteLine (string format, params object [] arg)
                {
                        OutputTabs ();
-                       b.WriteLine (format, args);
+                       b.WriteLine (format, arg);
                        newline = true;
                }
 
index b4274ba661f6795a8d5f5763aadb8ab3865d711d..ab78c49e8d74ccc746ee614501d743d57cb75159 100644 (file)
@@ -62,9 +62,9 @@ namespace System.Web.UI {
                         }
                 }
 
-               protected internal override void Render (HtmlTextWriter writer)
+               protected internal override void Render (HtmlTextWriter output)
                 {
-                        writer.Write (_text);
+                        output.Write (_text);
                 }
 
                protected override ControlCollection CreateControlCollection ()
index 69cd30decdf551af411d6dfa7937b71d1ecc26ad..eeb8a37d13266f4fde0a6f242c555e4b70665d1c 100644 (file)
@@ -1600,17 +1600,17 @@ public partial class Page : TemplateControl, IHttpHandler
        }
 
        [EditorBrowsable (EditorBrowsableState.Advanced)]
-       protected virtual void SavePageStateToPersistenceMedium (object viewState)
+       protected virtual void SavePageStateToPersistenceMedium (object state)
        {
                PageStatePersister persister = this.PageStatePersister;
                if (persister == null)
                        return;
-               Pair pair = viewState as Pair;
+               Pair pair = state as Pair;
                if (pair != null) {
                        persister.ViewState = pair.First;
                        persister.ControlState = pair.Second;
                } else
-                       persister.ViewState = viewState;
+                       persister.ViewState = state;
                persister.Save ();
        }
 
@@ -2531,9 +2531,9 @@ public partial class Page : TemplateControl, IHttpHandler
 
        [MonoDocumentationNote ("Not implemented.  Only used by .net aspx parser")]
        [EditorBrowsable (EditorBrowsableState.Never)]
-       protected object GetWrappedFileDependencies (string [] list)
+       protected object GetWrappedFileDependencies (string [] virtualFileDependencies)
        {
-               return list;
+               return virtualFileDependencies;
        }
 
        [MonoDocumentationNote ("Does nothing.  Used by .net aspx parser")]
index 9a882e38d2bd14f5ebda68f951a2c1df2ceaf556..a009c81d15f1f0988141b2778607f8cc893d126c 100644 (file)
@@ -39,9 +39,9 @@ namespace System.Web.UI
                {
                }
                
-               public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string url, string path)
+               public virtual IHttpHandler GetHandler (HttpContext context, string requestType, string virtualPath, string path)
                {
-                       return PageParser.GetCompiledPageInstance (url, path, context);
+                       return PageParser.GetCompiledPageInstance (virtualPath, path, context);
                }
 
                public virtual void ReleaseHandler (IHttpHandler handler)
index f8601e17c13e14185582d8ac093d07cd721d8790..b300cf5b1ab0328f3befab93c700e75c186c6427 100644 (file)
@@ -35,10 +35,10 @@ namespace System.Web.UI
        [Serializable]
        public sealed class Pair 
        {
-               public Pair (object first, object second)
+               public Pair (object x, object y)
                {
-                       First = first;
-                       Second = second;
+                       First = x;
+                       Second = y;
                }
 
                public Pair ()
index 6780219f5f84e6eab128c36a07421e89a70a4a7b..c4aa1c221d70ff5961dae3567fad11fedc2a9201 100644 (file)
@@ -40,10 +40,10 @@ namespace System.Web.UI
                Type containerType;
                BindingDirection direction;
                
-               public TemplateContainerAttribute (Type containerType, BindingDirection direction)
+               public TemplateContainerAttribute (Type containerType, BindingDirection bindingDirection)
                {
                        this.containerType = containerType;
-                       this.direction = direction;
+                       this.direction = bindingDirection;
                }
                
                public BindingDirection BindingDirection {
index 6480b008bd983488f7a684fb58121c89be6db3d4..69ca3faba68c0ceb20efce64f2601291e2c6cafe 100644 (file)
@@ -226,22 +226,22 @@ namespace System.Web.UI
                        return LoadControl (type, null);
                }
 
-               public Control LoadControl (Type type, object[] parameters) 
+               public Control LoadControl (Type t, object[] parameters) 
                {
                        object [] attrs = null;
 
-                       if (type != null)
-                               type.GetCustomAttributes (typeof (PartialCachingAttribute), true);
+                       if (t != null)
+                               t.GetCustomAttributes (typeof (PartialCachingAttribute), true);
                        if (attrs != null && attrs.Length == 1) {
                                PartialCachingAttribute attr = (PartialCachingAttribute) attrs [0];
-                               PartialCachingControl ctrl = new PartialCachingControl (type, parameters);
+                               PartialCachingControl ctrl = new PartialCachingControl (t, parameters);
                                ctrl.VaryByParams = attr.VaryByParams;
                                ctrl.VaryByControls = attr.VaryByControls;
                                ctrl.VaryByCustom = attr.VaryByCustom;
                                return ctrl;
                        }
 
-                       object control = Activator.CreateInstance (type, parameters);
+                       object control = Activator.CreateInstance (t, parameters);
                        if (control is UserControl)
                                ((UserControl) control).InitializeAsUserControl (Page);
 
@@ -495,34 +495,34 @@ namespace System.Web.UI
                        return DataBinder.Eval (Page.GetDataItem(), expression, format);
                }
        
-               protected internal object XPath (string xpathexpression)
+               protected internal object XPath (string xPathExpression)
                {
-                       return XPathBinder.Eval (Page.GetDataItem(), xpathexpression);
+                       return XPathBinder.Eval (Page.GetDataItem(), xPathExpression);
                }
        
-               protected internal object XPath (string xpathexpression, IXmlNamespaceResolver resolver)
+               protected internal object XPath (string xPathExpression, IXmlNamespaceResolver resolver)
                {
-                       return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, null, resolver);
+                       return XPathBinder.Eval (Page.GetDataItem (), xPathExpression, null, resolver);
                }
 
-               protected internal string XPath (string xpathexpression, string format)
+               protected internal string XPath (string xPathExpression, string format)
                {
-                       return XPathBinder.Eval (Page.GetDataItem(), xpathexpression, format);
+                       return XPathBinder.Eval (Page.GetDataItem(), xPathExpression, format);
                }
        
-               protected internal string XPath (string xpathexpression, string format, IXmlNamespaceResolver resolver)
+               protected internal string XPath (string xPathExpression, string format, IXmlNamespaceResolver resolver)
                {
-                       return XPathBinder.Eval (Page.GetDataItem (), xpathexpression, format, resolver);
+                       return XPathBinder.Eval (Page.GetDataItem (), xPathExpression, format, resolver);
                }
 
-               protected internal IEnumerable XPathSelect (string xpathexpression)
+               protected internal IEnumerable XPathSelect (string xPathExpression)
                {
-                       return XPathBinder.Select (Page.GetDataItem(), xpathexpression);
+                       return XPathBinder.Select (Page.GetDataItem(), xPathExpression);
                }
 
-               protected internal IEnumerable XPathSelect (string xpathexpression, IXmlNamespaceResolver resolver)
+               protected internal IEnumerable XPathSelect (string xPathExpression, IXmlNamespaceResolver resolver)
                {
-                       return XPathBinder.Select (Page.GetDataItem (), xpathexpression, resolver);
+                       return XPathBinder.Select (Page.GetDataItem (), xPathExpression, resolver);
                }
 
                // IFilterResolutionService
index 135edad6a4b7007d5292ee1bfd2eb6a648742776..ebf293b109abeb4b142715eec083cfd7a8c6e163 100644 (file)
@@ -42,22 +42,22 @@ namespace System.Web.UI
                {
                }
 
-               public static object Eval (object container, string xpath)
+               public static object Eval (object container, string xPath)
                {
-                       return Eval (container, xpath, (IXmlNamespaceResolver)null);
+                       return Eval (container, xPath, (IXmlNamespaceResolver)null);
                }
 
-               public static object Eval (object container, string xpath, IXmlNamespaceResolver resolver) 
+               public static object Eval (object container, string xPath, IXmlNamespaceResolver resolver) 
                {
-                       if (xpath == null || xpath.Length == 0)
-                               throw new ArgumentNullException ("xpath");
+                       if (xPath == null || xPath.Length == 0)
+                               throw new ArgumentNullException ("xPath");
 
                        IXPathNavigable factory = container as IXPathNavigable;
 
                        if (factory == null)
                                throw new ArgumentException ("container");
 
-                       object result = factory.CreateNavigator ().Evaluate (xpath, resolver);
+                       object result = factory.CreateNavigator ().Evaluate (xPath, resolver);
 
                        XPathNodeIterator itr = result as XPathNodeIterator;
                        if (itr != null) {
@@ -70,14 +70,14 @@ namespace System.Web.UI
                        return result;
                }
 
-               public static string Eval (object container, string xpath, string format)
+               public static string Eval (object container, string xPath, string format)
                {
-                       return Eval (container, xpath, format, null);
+                       return Eval (container, xPath, format, null);
                }
 
-               public static string Eval (object container, string xpath, string format, IXmlNamespaceResolver resolver)
+               public static string Eval (object container, string xPath, string format, IXmlNamespaceResolver resolver)
                {
-                       object result = Eval (container, xpath, resolver);
+                       object result = Eval (container, xPath, resolver);
                        
                        if (result == null)
                                return String.Empty;
@@ -87,22 +87,22 @@ namespace System.Web.UI
                        return String.Format (format, result);
                }
 
-               public static IEnumerable Select (object container, string xpath)
+               public static IEnumerable Select (object container, string xPath)
                {
-                       return Select (container, xpath, null);
+                       return Select (container, xPath, null);
                }
 
-               public static IEnumerable Select (object container, string xpath, IXmlNamespaceResolver resolver)
+               public static IEnumerable Select (object container, string xPath, IXmlNamespaceResolver resolver)
                {
-                       if (xpath == null || xpath.Length == 0)
-                               throw new ArgumentNullException ("xpath");
+                       if (xPath == null || xPath.Length == 0)
+                               throw new ArgumentNullException ("xPath");
                        
                        IXPathNavigable factory = container as IXPathNavigable;
                        
                        if (factory == null)
                                throw new ArgumentException ("container");
                        
-                       XPathNodeIterator itr = factory.CreateNavigator ().Select (xpath, resolver);
+                       XPathNodeIterator itr = factory.CreateNavigator ().Select (xPath, resolver);
                        ArrayList ret = new ArrayList ();
                        
                        while (itr.MoveNext ()) {
index 46f3627f416fa5f5342ba4ef05c35b8a56e65ba1..742d1b4eb09779e63e3f27c258dfc3d9e1847d89 100644 (file)
@@ -290,6 +290,7 @@ System.Web.Hosting/AppManagerAppDomainFactory.cs
 System.Web.Hosting/ApplicationInfo.cs
 System.Web.Hosting/ApplicationHost.cs
 System.Web.Hosting/ApplicationManager.cs
+../referencesource/System.Web/Hosting/BackgroundWorkScheduler.cs
 System.Web.Hosting/BareApplicationHost.cs
 System.Web.Hosting/DefaultVirtualDirectory.cs
 System.Web.Hosting/DefaultVirtualFile.cs
@@ -1199,6 +1200,7 @@ System.Web.UI/XhtmlMobileDocType.cs
 System.Web.UI/XhtmlTextWriter.cs
 System.Web.UI/XPathBinder.cs
 System.Web.Util/AltSerialization.cs
+../referencesource/System.Web/Util/CancellationTokenHelper.cs
 System.Web.Util/DataSourceHelper.cs
 System.Web.Util/DataSourceResolver.cs
 System.Web.Util/FileUtils.cs
index 4f9ddcda64181589b222cc9bad99f45628431763..8ab07311d909c5a9a404a1233925b11409f16af8 100644 (file)
@@ -229,15 +229,15 @@ namespace System.Web
                        last_modified_from_file_dependencies = true;
                }
 
-               public void SetMaxAge (TimeSpan date)
+               public void SetMaxAge (TimeSpan delta)
                {
-                       if (date < TimeSpan.Zero)
-                               throw new ArgumentOutOfRangeException ("date");
+                       if (delta < TimeSpan.Zero)
+                               throw new ArgumentOutOfRangeException ("delta");
 
-                       if (HaveMaxAge && MaxAge < date)
+                       if (HaveMaxAge && MaxAge < delta)
                                return;
 
-                       MaxAge = date;
+                       MaxAge = delta;
                        HaveMaxAge = true;
                }
 
index 9d28fbc04bd026121af47930fc6798260658a518..3292d30974c48fd1daafad5549422cc535f3e2a0 100644 (file)
@@ -84,23 +84,23 @@ namespace System.Web
                        }
                }
 
-               public bool this [ string param ] {
+               public bool this [ string header ] {
                        get {
-                               if (param == null)
+                               if (header == null)
                                        throw new ArgumentNullException ();
 
-                               return parms.Contains (param);
+                               return parms.Contains (header);
                        }
                        set {
-                               if (param == null)
+                               if (header == null)
                                        throw new ArgumentNullException ();
 
                                ignore_parms = false;
                                if (value)
-                                       if (!parms.Contains (param))
-                                               parms.Add (param, true);
+                                       if (!parms.Contains (header))
+                                               parms.Add (header, true);
                                else
-                                       parms.Remove (param);
+                                       parms.Remove (header);
                        }
                }
        }
index 5171412528a58ae0ab3e84cfcdbd5c0bdd01cc63..94648b5ed51476d54019924fb5f8f9009254478c 100644 (file)
@@ -519,9 +519,9 @@ namespace System.Web
                        return GetLocalObjectFromFactory (virtualPath, resourceKey, culture);
                }
 
-               public object GetSection (string name)
+               public object GetSection (string sectionName)
                {
-                       return WebConfigurationManager.GetSection (name);
+                       return WebConfigurationManager.GetSection (sectionName);
                }
 
                object IServiceProvider.GetService (Type service)
index 64975a813c0f8a93e76439a141399da2c45fee8e..92d7d179d597303aaa6887f9e4a8ac0dd00d29d0 100644 (file)
@@ -166,14 +166,14 @@ namespace System.Web
                        return HttpContext.GetGlobalResourceObject (classKey, resourceKey, culture);
                }
 
-               public override object GetLocalResourceObject (string overridePath, string resourceKey)
+               public override object GetLocalResourceObject (string virtualPath, string resourceKey)
                {
-                       return HttpContext.GetLocalResourceObject (overridePath, resourceKey);
+                       return HttpContext.GetLocalResourceObject (virtualPath, resourceKey);
                }
 
-               public override object GetLocalResourceObject (string overridePath, string resourceKey, CultureInfo culture)
+               public override object GetLocalResourceObject (string virtualPath, string resourceKey, CultureInfo culture)
                {
-                       return HttpContext.GetLocalResourceObject (overridePath, resourceKey, culture);
+                       return HttpContext.GetLocalResourceObject (virtualPath, resourceKey, culture);
                }
 
                public override object GetSection (string sectionName)
index e780ff380410b4aa816355d9c2430528f4fe9f02..81f9a061a5931b1cc8d9f4af2eabba9b5cf460e0 100644 (file)
@@ -88,13 +88,13 @@ namespace System.Web
                        BaseClear ();
                }
 
-               public void CopyTo (Array array, int index)
+               public void CopyTo (Array dest, int index)
                {
                        /* XXX this is kind of gross and inefficient
                         * since it makes a copy of the superclass's
                         * list */
                        object[] values = BaseGetAllValues();
-                       values.CopyTo (array, index);
+                       values.CopyTo (dest, index);
                }
 
                public string GetKey (int index)
index 7b77b5cc02c3c238b654e2efdeebdbd3dc02a69d..201e90dae4252e3b764c21ab580e42d142f0170e 100644 (file)
@@ -65,14 +65,14 @@ namespace System.Web {
                        return (HttpPostedFile)BaseGet (index);
                }
 
-               public HttpPostedFile Get (string key)
+               public HttpPostedFile Get (string name)
                {
-                       return (HttpPostedFile)BaseGet (key);
+                       return (HttpPostedFile)BaseGet (name);
                }
 
-               public HttpPostedFile this [string key] {
+               public HttpPostedFile this [string name] {
                        get {
-                               return Get (key);
+                               return Get (name);
                        }
                }
 
index 2c3bb7087117dd53338b22f87485ef832e2ca1aa..d10784c17afefa8617a71c37e694d5dd9d9dd5d9 100644 (file)
@@ -65,14 +65,14 @@ namespace System.Web {
                        return (IHttpModule)BaseGet (index);
                }
 
-               public IHttpModule Get (string key)
+               public IHttpModule Get (string name)
                {
-                       return (IHttpModule)BaseGet (key);
+                       return (IHttpModule)BaseGet (name);
                }
 
-               public IHttpModule this [string key] {
+               public IHttpModule this [string name] {
                        get {
-                               return Get (key);
+                               return Get (name);
                        }
                }
 
index 761d34744cc7d7bcde5525eebb04cc46e3683d0f..bad72200852765abfe1ccf7026bbc3d16df31700 100644 (file)
@@ -81,9 +81,9 @@ namespace System.Web
                }
 
                [SecurityPermission (SecurityAction.Demand, SerializationFormatter = true)]
-               public override void GetObjectData (SerializationInfo info, StreamingContext ctx)
+               public override void GetObjectData (SerializationInfo info, StreamingContext context)
                {
-                       base.GetObjectData (info, ctx);
+                       base.GetObjectData (info, context);
                        info.AddValue ("_virtualPath", virtualPath);
                        info.AddValue ("_parserErrors", errors);
                        info.AddValue ("_line", line);
index 1e437e4621fc0f50469090e946dd1e66e53acf1c..89c3e12f7a5cc243331cc2be09fe824d2dbe8e0e 100644 (file)
@@ -235,9 +235,9 @@ namespace System.Web
                        w.AppendToLog (param);
                }
 
-               public override string ApplyAppPathModifier (string overridePath)
+               public override string ApplyAppPathModifier (string virtualPath)
                {
-                       return w.ApplyAppPathModifier (overridePath);
+                       return w.ApplyAppPathModifier (virtualPath);
                }
 
                public override void BinaryWrite (byte [] buffer)
index 83fe4eb3b7193aab797cf0ca252095ead23716c2..0183aa2cab9a8bce6cf2f4160064302eac3ce91a 100644 (file)
@@ -112,34 +112,34 @@ namespace System.Web {
                                buf.Add ((byte)ch);
                }
                
-               public static string UrlDecode (string s, Encoding e)
+               public static string UrlDecode (string str, Encoding e)
                {
-                       if (null == s) 
+                       if (null == str
                                return null;
 
-                       if (s.IndexOf ('%') == -1 && s.IndexOf ('+') == -1)
-                               return s;
+                       if (str.IndexOf ('%') == -1 && str.IndexOf ('+') == -1)
+                               return str;
                        
                        if (e == null)
                                e = Encoding.UTF8;
 
-                       long len = s.Length;
+                       long len = str.Length;
                        var bytes = new List <byte> ();
                        int xchar;
                        char ch;
                        
                        for (int i = 0; i < len; i++) {
-                               ch = s [i];
-                               if (ch == '%' && i + 2 < len && s [i + 1] != '%') {
-                                       if (s [i + 1] == 'u' && i + 5 < len) {
+                               ch = str [i];
+                               if (ch == '%' && i + 2 < len && str [i + 1] != '%') {
+                                       if (str [i + 1] == 'u' && i + 5 < len) {
                                                // unicode hex sequence
-                                               xchar = GetChar (s, i + 2, 4);
+                                               xchar = GetChar (str, i + 2, 4);
                                                if (xchar != -1) {
                                                        WriteCharBytes (bytes, (char)xchar, e);
                                                        i += 5;
                                                } else
                                                        WriteCharBytes (bytes, '%', e);
-                                       } else if ((xchar = GetChar (s, i + 1, 2)) != -1) {
+                                       } else if ((xchar = GetChar (str, i + 1, 2)) != -1) {
                                                WriteCharBytes (bytes, (char)xchar, e);
                                                i += 2;
                                        } else {
@@ -338,18 +338,18 @@ namespace System.Web {
                        return UrlEncode(str, Encoding.UTF8);
                }
        
-               public static string UrlEncode (string s, Encoding Enc
+               public static string UrlEncode (string str, Encoding e
                {
-                       if (s == null)
+                       if (str == null)
                                return null;
 
-                       if (s == String.Empty)
+                       if (str == String.Empty)
                                return String.Empty;
 
                        bool needEncode = false;
-                       int len = s.Length;
+                       int len = str.Length;
                        for (int i = 0; i < len; i++) {
-                               char c = s [i];
+                               char c = str [i];
                                if ((c < '0') || (c < 'A' && c > '9') || (c > 'Z' && c < 'a') || (c > 'z')) {
                                        if (HttpEncoder.NotEncoded (c))
                                                continue;
@@ -360,11 +360,11 @@ namespace System.Web {
                        }
 
                        if (!needEncode)
-                               return s;
+                               return str;
 
                        // avoided GetByteCount call
-                       byte [] bytes = new byte[Enc.GetMaxByteCount(s.Length)];
-                       int realLen = Enc.GetBytes (s, 0, s.Length, bytes, 0);
+                       byte [] bytes = new byte[e.GetMaxByteCount(str.Length)];
+                       int realLen = e.GetBytes (str, 0, str.Length, bytes, 0);
                        return Encoding.ASCII.GetString (UrlEncodeToBytes (bytes, 0, realLen));
                }
          
@@ -593,9 +593,9 @@ namespace System.Web {
 
                        return sb.ToString ();
                }
-               public static string UrlPathEncode (string s)
+               public static string UrlPathEncode (string str)
                {
-                       return HttpEncoder.Current.UrlPathEncode (s);
+                       return HttpEncoder.Current.UrlPathEncode (str);
                }
 
                public static NameValueCollection ParseQueryString (string query)
index ebacf23fef958cf5e73ee3e3cd6b12750b1caf1d..fb9e688bbaa0100055071ae5c58458afb16b04bc 100644 (file)
@@ -40,9 +40,9 @@ namespace System.Web
                {
                }
 
-               public ParserErrorCollection (ParserError[] errors)
+               public ParserErrorCollection (ParserError[] value)
                {
-                       InnerList.AddRange (errors);
+                       InnerList.AddRange (value);
                }
                
                public ParserError this [int index]
@@ -51,44 +51,44 @@ namespace System.Web
                        set { InnerList[index] = value; }
                }
                
-               public int Add (ParserError error)
+               public int Add (ParserError value)
                {
-                       return List.Add (error);
+                       return List.Add (value);
                }
                
-               public void AddRange (ParserErrorCollection collection)
+               public void AddRange (ParserErrorCollection value)
                {
-                       InnerList.AddRange (collection);
+                       InnerList.AddRange (value);
                }
                
-               public void AddRange (ParserError[] errors)
+               public void AddRange (ParserError[] value)
                {
-                       InnerList.AddRange (errors);
+                       InnerList.AddRange (value);
                }
                
-               public bool Contains (ParserError error)
+               public bool Contains (ParserError value)
                {
-                       return InnerList.Contains (error);
+                       return InnerList.Contains (value);
                }
                
-               public void CopyTo (ParserError[] errors, int index)
+               public void CopyTo (ParserError[] array, int index)
                {
-                       List.CopyTo (errors, index);
+                       List.CopyTo (array, index);
                }
                
-               public int IndexOf (ParserError error)
+               public int IndexOf (ParserError value)
                {
-                       return InnerList.IndexOf (error);
+                       return InnerList.IndexOf (value);
                }
                
-               public void Insert (int index, ParserError error)
+               public void Insert (int index, ParserError value)
                {
-                       InnerList.Insert (index, error);
+                       InnerList.Insert (index, value);
                }
                
-               public void Remove (ParserError error)
+               public void Remove (ParserError value)
                {
-                       InnerList.Remove (error);
+                       InnerList.Remove (value);
                }
        }
 }
index b1660b8752c2365c8ff4981c3682921cafbd764c..41f49773fe3761b348b359013fac9d66b0c24e69 100644 (file)
@@ -81,9 +81,9 @@ namespace System.Web {
                        return new SiteMapHierarchicalDataSourceView (this);
                }
                
-               public virtual bool IsAccessibleToUser (System.Web.HttpContext ctx)
+               public virtual bool IsAccessibleToUser (System.Web.HttpContext context)
                {
-                       return provider.IsAccessibleToUser (ctx, this);
+                       return provider.IsAccessibleToUser (context, this);
                }
                
                public override string ToString()
@@ -297,9 +297,9 @@ namespace System.Web {
                        return node;
                }
                                
-               public override bool Equals (object ob)
+               public override bool Equals (object obj)
                {
-                       SiteMapNode node = ob as SiteMapNode;
+                       SiteMapNode node = obj as SiteMapNode;
                        if (node == null) return false;
                        
                        if (node.key != key ||
index 84a92091ce61b5ff19824c40c7cfaefc8c2d7426..da33bc4ab222a19c805be7bee29c71679041873d 100644 (file)
@@ -63,14 +63,14 @@ namespace System.Web
                        Add (value);
                }
                
-               public SiteMapNodeCollection (SiteMapNode[] values)
+               public SiteMapNodeCollection (SiteMapNode[] value)
                {
-                       AddRangeInternal (values);
+                       AddRangeInternal (value);
                }
                
-               public SiteMapNodeCollection (SiteMapNodeCollection values)
+               public SiteMapNodeCollection (SiteMapNodeCollection value)
                {
-                       AddRangeInternal (values);
+                       AddRangeInternal (value);
                }
                
                internal static SiteMapNodeCollection EmptyCollection {
index e887c76cff90e8d9b772dc41e425cfdcb1ceb24f..e695f8e9db768a428fbe138094d26562418e2b5e 100644 (file)
@@ -58,9 +58,9 @@ namespace System.Web
                        remove { events.AddHandler (traceFinishedEvent, value); }
                }
 
-               public TraceContext (HttpContext Context)
+               public TraceContext (HttpContext context)
                {
-                       _Context = Context;
+                       _Context = context;
                }
 
                internal bool HaveTrace {
@@ -104,34 +104,34 @@ namespace System.Web
                        }
                }
 
-               public void Warn(string msg)
+               public void Warn(string message)
                {
-                       Write (String.Empty, msg, null, true);
+                       Write (String.Empty, message, null, true);
                }
 
-               public void Warn(string category, string msg)
+               public void Warn(string category, string message)
                {
-                       Write (category, msg, null, true);
+                       Write (category, message, null, true);
                }
 
-               public void Warn (string category, string msg, Exception error)
+               public void Warn (string category, string message, Exception errorInfo)
                {
-                       Write (category, msg, error, true);
+                       Write (category, message, errorInfo, true);
                }
 
-               public void Write (string msg)
+               public void Write (string message)
                {
-                       Write (String.Empty, msg, null, false);
+                       Write (String.Empty, message, null, false);
                }
 
-               public void Write (string category, string msg)
+               public void Write (string category, string message)
                {
-                       Write (category, msg, null, false);
+                       Write (category, message, null, false);
                }
 
-               public void Write (string category, string msg, Exception error)
+               public void Write (string category, string message, Exception errorInfo)
                {
-                       Write (category, msg, error, false);
+                       Write (category, message, errorInfo, false);
                }
 
                void Write (string category, string msg, Exception error, bool Warning)
index d3de824333210066dc1a22e8d5dde570c31aaf78..e8f05421b5fbc6458357012280d1951874033656 100644 (file)
@@ -73,13 +73,16 @@ namespace StandAloneRunner
                static void Main (string[] args)
                {
                        try {
-                               Run (args);
+                               var success = Run (args);
+
+                               if (!success)
+                                       Environment.Exit (1);
                        } catch (Exception ex) {
                                Die ("Exception caught:{0}{1}", Environment.NewLine, ex.ToString ());
                        }
                }
 
-               static void Run (string[] args)
+               static bool Run (string[] args)
                {
                        bool showHelp = false;
                        string testName = null;
@@ -177,6 +180,8 @@ namespace StandAloneRunner
                                        writer.Dispose ();
                                }
                        }
+
+                       return failedCounter == 0;
                }
 
                static string FormatReport (StandaloneTest test)
index 4a185f574f231e6a3629fb0bda3f0aac030e3ccc..7bcbb5be4a00b55e60301aa142d029dde853d7a7 100644 (file)
@@ -1,4 +1,4 @@
-//
+//
 // Authors:
 // Jonathan Pobst (monkey@jpobst.com)
 // Francis Fisher (frankie@terrorise.me.uk)
@@ -59,7 +59,7 @@ namespace System.Windows.Forms.DataVisualization.Charting
                        }
                }
                [MonoTODO]
-               public string this[string propName] {
+               public string this[string name] {
                        get { 
                                throw new NotImplementedException ();
                        }
index 74a7b27968607a39dea04cd01bc0cbaa96dcac26..4a092d34568c64c7bbf9e4b9e3da813acdb90681 100644 (file)
@@ -272,12 +272,7 @@ namespace System.Windows.Forms
                {
                        public int Compare (DataGridViewColumn o1, DataGridViewColumn o2)
                        {
-                               if (o1.DisplayIndex == o2.DisplayIndex)
-                                       // Here we avoid the equal value swapping that both Array.Sort and ArrayList.Sort 
-                                       // do occasionally and preserve the user column insertation order.
-                                       return 1;
-                               else
-                                       return o1.DisplayIndex - o2.DisplayIndex;
+                               return o1.DisplayIndex.CompareTo (o2.DisplayIndex);
                        }
                }
        }
index cdea110d8cfdd76461ea1fa207a7502317edeb17..43062e98344fd32526c1ca5c60a4423db12c412d 100644 (file)
@@ -105,22 +105,30 @@ namespace MonoTests.System.Windows.Forms
                        f.Show ();
 
                        dgv.Columns.Add ("A1", "A1");
-                       Assert.AreEqual (0, dgv.Columns[0].Index, "A1");
-                       Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B1");
+                       Assert.AreEqual (0, dgv.Columns[0].Index, "#1");
+                       Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#2");
+                       Assert.AreEqual ("A1", dgv.Columns[0].Name, "#3");
+
 
                        dgv.Columns.Add ("A2", "A2");
-                       Assert.AreEqual (0, dgv.Columns[0].Index, "A2");
-                       Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B2");
-                       Assert.AreEqual (1, dgv.Columns[1].Index, "A3");
-                       Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "B3");
+                       Assert.AreEqual (0, dgv.Columns[0].Index, "#10");
+                       Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#11");
+                       Assert.AreEqual ("A1", dgv.Columns[0].Name, "#12");
+                       Assert.AreEqual (1, dgv.Columns[1].Index, "#13");
+                       Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "#14");
+                       Assert.AreEqual ("A2", dgv.Columns[1].Name, "#15");
 
                        dgv.Columns.Insert (0, new DataGridViewTextBoxColumn ());
-                       Assert.AreEqual (0, dgv.Columns[0].Index, "A4");
-                       Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B4");
-                       Assert.AreEqual (1, dgv.Columns[1].Index, "A5");
-                       Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "B5");
-                       Assert.AreEqual (2, dgv.Columns[2].Index, "A6");
-                       Assert.AreEqual (2, dgv.Columns[2].DisplayIndex, "B6");
+                       Assert.AreEqual (0, dgv.Columns[0].Index, "#20");
+                       Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#21");
+                       Assert.AreEqual ("", dgv.Columns[0].Name, "#22");
+
+                       Assert.AreEqual (1, dgv.Columns[1].Index, "#23");
+                       Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "#24");
+                       Assert.AreEqual ("A1", dgv.Columns[1].Name, "#25");
+                       Assert.AreEqual (2, dgv.Columns[2].Index, "#26");
+                       Assert.AreEqual (2, dgv.Columns[2].DisplayIndex, "#27");
+                       Assert.AreEqual ("A2", dgv.Columns[2].Name, "#28");
 
                        dgv.Columns.RemoveAt (1);
                        Assert.AreEqual (0, dgv.Columns[0].Index, "A7");
index d64a2a9645b2f88bed2dd535a6a76efb4a0ef87e..89896814ea4d2a33b6c99b11be464a0a216412f0 100755 (executable)
@@ -41,9 +41,9 @@ namespace System.Windows.Markup
                }
 #endif
 
-               public override bool Equals (object other)
+               public override bool Equals (object obj)
                {
-                       var cwa = other as ContentWrapperAttribute;
+                       var cwa = obj as ContentWrapperAttribute;
                        if (cwa == null)
                                return false;
                        return ContentWrapper != null ? ContentWrapper == cwa.ContentWrapper : cwa.ContentWrapper == null;
index 5cd79018f4a6ceb772153e3ee129202eb4c8d747..e6002c386db090d3b176fdf03a7267e57aef7f28 100644 (file)
@@ -105,14 +105,14 @@ namespace System.Xaml.Schema
 
                static readonly char [] comma_or_parens = new char [] {',', '(', ')'};
 
-               public static bool TryParseList (string typeNameList, IXamlNamespaceResolver namespaceResolver, out IList<XamlTypeName> list)
+               public static bool TryParseList (string typeNameList, IXamlNamespaceResolver namespaceResolver, out IList<XamlTypeName> result)
                {
                        if (typeNameList == null)
                                throw new ArgumentNullException ("typeNameList");
                        if (namespaceResolver == null)
                                throw new ArgumentNullException ("namespaceResolver");
 
-                       list = null;
+                       result = null;
                        int idx = 0;
                        int parens = 0;
                        XamlTypeName tn;
@@ -153,7 +153,7 @@ namespace System.Xaml.Schema
                                ret.Add (tn);
                        }
 
-                       list = ret;
+                       result = ret;
                        return true;
                }
 
index 5273358236a3f8e98dd834c0732287e9eda3a7fa..fda91aa3b9ce0a9070049ab0a97a5500a1d8c4c7 100755 (executable)
@@ -56,9 +56,9 @@ namespace System.Xaml.Schema
                public XamlType TargetType { get; private set; }
 
                
-               public static bool operator == (XamlValueConverter<TConverterBase> left, XamlValueConverter<TConverterBase> right)
+               public static bool operator == (XamlValueConverter<TConverterBase> converter1, XamlValueConverter<TConverterBase> converter2)
                {
-                       return IsNull (left) ? IsNull (right) : left.Equals (right);
+                       return IsNull (converter1) ? IsNull (converter2) : converter1.Equals (converter2);
                }
 
                static bool IsNull (XamlValueConverter<TConverterBase> a)
@@ -66,9 +66,9 @@ namespace System.Xaml.Schema
                        return Object.ReferenceEquals (a, null);
                }
 
-               public static bool operator != (XamlValueConverter<TConverterBase> left, XamlValueConverter<TConverterBase> right)
+               public static bool operator != (XamlValueConverter<TConverterBase> converter1, XamlValueConverter<TConverterBase> converter2)
                {
-                       return IsNull (left) ? !IsNull (right) : IsNull (right) || left.ConverterType != right.ConverterType || left.TargetType != right.TargetType || left.Name != right.Name;
+                       return IsNull (converter1) ? !IsNull (converter2) : IsNull (converter2) || converter1.ConverterType != converter2.ConverterType || converter1.TargetType != converter2.TargetType || converter1.Name != converter2.Name;
                }
                
                public bool Equals (XamlValueConverter<TConverterBase> other)
index ad03cbf628324356cdb88b0c3942e3d793b5ee48..4e0f460103958c08ae2e9ce03c066e5066349ef0 100644 (file)
@@ -236,9 +236,9 @@ namespace System.Xaml
                        get { return LookupValueSerializer (); }
                }
 
-               public static bool operator == (XamlMember left, XamlMember right)
+               public static bool operator == (XamlMember xamlMember1, XamlMember xamlMember2)
                {
-                       return IsNull (left) ? IsNull (right) : left.Equals (right);
+                       return IsNull (xamlMember1) ? IsNull (xamlMember2) : xamlMember1.Equals (xamlMember2);
                }
 
                static bool IsNull (XamlMember a)
@@ -246,14 +246,14 @@ namespace System.Xaml
                        return Object.ReferenceEquals (a, null);
                }
 
-               public static bool operator != (XamlMember left, XamlMember right)
+               public static bool operator != (XamlMember xamlMember1, XamlMember xamlMember2)
                {
-                       return !(left == right);
+                       return !(xamlMember1 == xamlMember2);
                }
                
-               public override bool Equals (object other)
+               public override bool Equals (object obj)
                {
-                       var x = other as XamlMember;
+                       var x = obj as XamlMember;
                        return Equals (x);
                }
                
index c8026d195a452f5607331bd1422937c8fcdcd0b9..115de3f7940de8fe65fd499478513639f954c030 100755 (executable)
@@ -83,23 +83,23 @@ namespace System.Xaml
                                Save (xw, instance);
                }
 
-               public static void Save (TextWriter textWriter, object instance)
+               public static void Save (TextWriter writer, object instance)
                {
-                       using (var xw = XmlWriter.Create (textWriter, new XmlWriterSettings () { OmitXmlDeclaration = true, Indent = true }))
+                       using (var xw = XmlWriter.Create (writer, new XmlWriterSettings () { OmitXmlDeclaration = true, Indent = true }))
                                Save (xw, instance);
                }
 
-               public static void Save (XmlWriter xmlWriter, object instance)
+               public static void Save (XmlWriter writer, object instance)
                {
-                       Save (new XamlXmlWriter (xmlWriter, new XamlSchemaContext ()), instance);
+                       Save (new XamlXmlWriter (writer, new XamlSchemaContext ()), instance);
                }
 
-               public static void Save (XamlWriter xamlWriter, object instance)
+               public static void Save (XamlWriter writer, object instance)
                {
-                       if (xamlWriter == null)
-                               throw new ArgumentNullException ("xamlWriter");
-                       var r = new XamlObjectReader (instance, xamlWriter.SchemaContext);
-                       Transform (r, xamlWriter);
+                       if (writer == null)
+                               throw new ArgumentNullException ("writer");
+                       var r = new XamlObjectReader (instance, writer.SchemaContext);
+                       Transform (r, writer);
                }
 
                public static void Transform (XamlReader xamlReader, XamlWriter xamlWriter)
index 6aebc3ebddd8abd38c72924788e64e13aa70613b..0081cca23759dc14af3689877d814df84cb918cf 100755 (executable)
@@ -252,9 +252,9 @@ namespace System.Xaml
                        return stn != null ? stn.Name : Name;
                }
 
-               public static bool operator == (XamlType left, XamlType right)
+               public static bool operator == (XamlType xamlType1, XamlType xamlType2)
                {
-                       return IsNull (left) ? IsNull (right) : left.Equals (right);
+                       return IsNull (xamlType1) ? IsNull (xamlType2) : xamlType1.Equals (xamlType2);
                }
 
                static bool IsNull (XamlType a)
@@ -262,9 +262,9 @@ namespace System.Xaml
                        return Object.ReferenceEquals (a, null);
                }
 
-               public static bool operator != (XamlType left, XamlType right)
+               public static bool operator != (XamlType xamlType1, XamlType xamlType2)
                {
-                       return !(left == right);
+                       return !(xamlType1 == xamlType2);
                }
                
                public bool Equals (XamlType other)
index 4d2a6571d95c795539c7cde22ede9ec74f0ce4a5..ef3be44fd52b5c1f3ee5f91c1cd3b8a1a832bf53 100755 (executable)
@@ -139,9 +139,9 @@ namespace System.Xaml
                        intl.WriteNamespace (namespaceDeclaration);
                }
 
-               public override void WriteStartObject (XamlType xamlType)
+               public override void WriteStartObject (XamlType type)
                {
-                       intl.WriteStartObject (xamlType);
+                       intl.WriteStartObject (type);
                }
                
                public override void WriteValue (object value)
index c71e98acfbb3de983040762641d00a4dd7083846..073bb3c9c25def79057bdda3d85bcef83a8fbd04 100644 (file)
@@ -16,7 +16,8 @@ endif
 
 RESX_RESOURCE_STRING = \
        ../../../external/corefx/src/System.Collections.Concurrent/src/Resources/Strings.resx \
-       ../../../external/corefx/src/System.Collections/src/Resources/Strings.resx
+       ../../../external/corefx/src/System.Collections/src/Resources/Strings.resx \
+       ../../../external/corefx/src/System.Buffers/src/Resources/Strings.resx
 
 TEST_RESOURCES = \
        Test/System/test-uri-props.txt \
@@ -36,7 +37,12 @@ endif
 
 ifndef MOBILE_PROFILE
 LIB_MCS_FLAGS += -d:CODEDOM
-TEST_LIB_REFS = System.Drawing $(MONO_SECURITY) System.Data System.Xml System.Core System.Configuration
+TEST_LIB_REFS = $(MONO_SECURITY) System.Data System.Xml System.Core System.Configuration
+
+ifndef NO_SYSTEM_DRAWING_DEPENDENCY
+TEST_LIB_REFS += System.Drawing
+endif
+
 else
 LIB_MCS_FLAGS += -nowarn:618
 TEST_LIB_REFS = $(MONO_SECURITY) System.Data System.Xml System.Core
@@ -53,6 +59,14 @@ REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
 TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
 endif
 
+ifdef MONO_FEATURE_APPLETLS
+LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLETLS
+endif
+
+ifdef ONLY_APPLETLS
+LIB_MCS_FLAGS += -d:ONLY_APPLETLS
+endif
+
 ifndef PROFILE_DISABLE_BTLS
 ifdef HAVE_BTLS
 
diff --git a/mcs/class/System/Mono.AppleTls/AppleCertificateHelper.cs b/mcs/class/System/Mono.AppleTls/AppleCertificateHelper.cs
new file mode 100644 (file)
index 0000000..d26abe9
--- /dev/null
@@ -0,0 +1,106 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+//
+// AppleCertificateHelper.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2015 Xamarin, Inc.
+//
+
+#if MONO_SECURITY_ALIAS
+extern alias MonoSecurity;
+#endif
+
+using System;
+using System.Collections;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Security.Cryptography.X509Certificates;
+
+#if MONO_SECURITY_ALIAS
+using MonoSecurity::Mono.Security.Interface;
+#else
+using Mono.Security.Interface;
+#endif
+
+namespace Mono.AppleTls
+{
+       static class AppleCertificateHelper
+       {
+               public static SecIdentity GetIdentity (X509Certificate certificate)
+               {
+                       /*
+                        * If we got an 'X509Certificate2', then we require it to have a private key
+                        * and import it.
+                        */
+                       var certificate2 = certificate as X509Certificate2;
+                       if (certificate2 != null)
+                               return SecIdentity.Import (certificate2);
+
+                       /*
+                        * Otherwise, we require the private key to be in the keychain.
+                        */
+                       using (var secCert = new SecCertificate (certificate)) {
+                               return SecKeyChain.FindIdentity (secCert, true);
+                       }
+               }
+
+               public static SecIdentity GetIdentity (X509Certificate certificate, out SecCertificate[] intermediateCerts)
+               {
+                       var identity = GetIdentity (certificate);
+
+                       var impl2 = certificate.Impl as X509Certificate2Impl;
+                       if (impl2 == null || impl2.IntermediateCertificates == null) {
+                               intermediateCerts = new SecCertificate [0];
+                               return identity;
+                       }
+
+                       try {
+                               intermediateCerts = new SecCertificate [impl2.IntermediateCertificates.Count];
+                               for (int i = 0; i < intermediateCerts.Length; i++)
+                                       intermediateCerts [i] = new SecCertificate (impl2.IntermediateCertificates [i]);
+
+                               return identity;
+                       } catch {
+                               identity.Dispose ();
+                               throw;
+                       }
+               }
+
+               public static bool InvokeSystemCertificateValidator (
+                       ICertificateValidator2 validator, string targetHost, bool serverMode,
+                       X509CertificateCollection certificates,
+                       ref MonoSslPolicyErrors errors, ref int status11)
+               {
+                       if (certificates == null) {
+                               errors |= MonoSslPolicyErrors.RemoteCertificateNotAvailable;
+                               return false;
+                       }
+
+                       if (!string.IsNullOrEmpty (targetHost)) {
+                               var pos = targetHost.IndexOf (':');
+                               if (pos > 0)
+                                       targetHost = targetHost.Substring (0, pos);
+                       }
+
+                       var policy = SecPolicy.CreateSslPolicy (!serverMode, targetHost);
+                       var trust = new SecTrust (certificates, policy);
+
+                       if (validator.Settings.TrustAnchors != null) {
+                               var status = trust.SetAnchorCertificates (validator.Settings.TrustAnchors);
+                               if (status != SecStatusCode.Success)
+                                       throw new InvalidOperationException (status.ToString ());
+                               trust.SetAnchorCertificatesOnly (false);
+                       }
+
+                       var result = trust.Evaluate ();
+                       if (result == SecTrustResult.Unspecified)
+                               return true;
+
+                       errors |= MonoSslPolicyErrors.RemoteCertificateChainErrors;
+                       return false;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs b/mcs/class/System/Mono.AppleTls/AppleTlsContext.cs
new file mode 100644 (file)
index 0000000..2f2fd6b
--- /dev/null
@@ -0,0 +1,907 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+//
+// AppleTlsContext.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2015 Xamarin, Inc.
+//
+
+#if MONO_SECURITY_ALIAS
+extern alias MonoSecurity;
+#endif
+
+using System;
+using System.IO;
+using System.Net;
+using System.Text;
+using System.Globalization;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Runtime.InteropServices;
+using SSA = System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+
+#if MONO_SECURITY_ALIAS
+using MonoSecurity::Mono.Security.Interface;
+#else
+using Mono.Security.Interface;
+#endif
+
+using Mono.Net;
+using Mono.Net.Security;
+using Mono.Util;
+
+using ObjCRuntime;
+
+namespace Mono.AppleTls
+{
+       class AppleTlsContext : MobileTlsContext
+       {
+               public const string SecurityLibrary = "/System/Library/Frameworks/Security.framework/Security";
+
+               GCHandle handle;
+               IntPtr context;
+               IntPtr connectionId;
+               SslReadFunc readFunc;
+               SslWriteFunc writeFunc;
+
+               SecIdentity serverIdentity;
+               SecIdentity clientIdentity;
+
+               X509Certificate remoteCertificate;
+               X509Certificate localClientCertificate;
+               MonoTlsConnectionInfo connectionInfo;
+               bool havePeerTrust;
+               bool isAuthenticated;
+               bool handshakeFinished;
+               int handshakeStarted;
+
+               bool closed;
+               bool disposed;
+               bool closedGraceful;
+               int pendingIO;
+
+               Exception lastException;
+
+               public AppleTlsContext (
+                       MobileAuthenticatedStream parent, bool serverMode, string targetHost,
+                       SSA.SslProtocols enabledProtocols, X509Certificate serverCertificate,
+                       X509CertificateCollection clientCertificates, bool askForClientCert)
+                       : base (parent, serverMode, targetHost, enabledProtocols,
+                               serverCertificate, clientCertificates, askForClientCert)
+               {
+                       handle = GCHandle.Alloc (this);
+                       connectionId = GCHandle.ToIntPtr (handle);
+                       readFunc = NativeReadCallback;
+                       writeFunc = NativeWriteCallback;
+
+                       if (IsServer) {
+                               if (serverCertificate == null)
+                                       throw new ArgumentNullException ("serverCertificate");
+                       }
+               }
+
+               public IntPtr Handle {
+                       get {
+                               if (!HasContext)
+                                       throw new ObjectDisposedException ("AppleTlsContext");
+                               return context;
+                       }
+               }
+
+               public override bool HasContext {
+                       get { return !disposed && context != IntPtr.Zero; }
+               }
+
+               [System.Diagnostics.Conditional ("APPLE_TLS_DEBUG")]
+               protected new void Debug (string message, params object[] args)
+               {
+                       Console.Error.WriteLine ("MobileTlsStream({0}): {1}", Parent.ID, string.Format (message, args));
+               }
+
+               void CheckStatusAndThrow (SslStatus status, params SslStatus[] acceptable)
+               {
+                       var last = Interlocked.Exchange (ref lastException, null);
+                       if (last != null)
+                               throw last;
+
+                       if (status == SslStatus.Success || Array.IndexOf (acceptable, status) > -1)
+                               return;
+
+                       switch (status) {
+                       case SslStatus.ClosedAbort:
+                               throw new IOException ("Connection closed.");
+
+                       case SslStatus.BadCert:
+                               throw new TlsException (AlertDescription.BadCertificate);
+
+                       case SslStatus.UnknownRootCert:
+                       case SslStatus.NoRootCert:
+                       case SslStatus.XCertChainInvalid:
+                               throw new TlsException (AlertDescription.CertificateUnknown, status.ToString ());
+
+                       case SslStatus.CertExpired:
+                       case SslStatus.CertNotYetValid:
+                               throw new TlsException (AlertDescription.CertificateExpired);
+
+                       case SslStatus.Protocol:
+                               throw new TlsException (AlertDescription.ProtocolVersion);
+
+                       default:
+                               throw new TlsException (AlertDescription.InternalError, "Unknown Secure Transport error `{0}'.", status);
+                       }
+               }
+
+               #region Handshake
+
+               public override bool IsAuthenticated {
+                       get { return isAuthenticated; }
+               }
+
+               public override void StartHandshake ()
+               {
+                       Debug ("StartHandshake: {0}", IsServer);
+
+                       if (Interlocked.CompareExchange (ref handshakeStarted, 1, 1) != 0)
+                               throw new InvalidOperationException ();
+
+                       InitializeConnection ();
+
+                       SetSessionOption (SslSessionOption.BreakOnCertRequested, true);
+                       SetSessionOption (SslSessionOption.BreakOnClientAuth, true);
+                       SetSessionOption (SslSessionOption.BreakOnServerAuth, true);
+
+                       if (IsServer) {
+                               SecCertificate[] intermediateCerts;
+                               serverIdentity = AppleCertificateHelper.GetIdentity (LocalServerCertificate, out intermediateCerts);
+                               if (serverIdentity == null)
+                                       throw new SSA.AuthenticationException ("Unable to get server certificate from keychain.");
+
+                               SetCertificate (serverIdentity, intermediateCerts);
+                               for (int i = 0; i < intermediateCerts.Length; i++)
+                                       intermediateCerts [i].Dispose ();
+                       }
+               }
+
+               public override void FinishHandshake ()
+               {
+                       InitializeSession ();
+
+                       isAuthenticated = true;
+               }
+
+               public override void Flush ()
+               {
+               }
+
+               public override bool ProcessHandshake ()
+               {
+                       if (handshakeFinished)
+                               throw new NotSupportedException ("Handshake already finished.");
+
+                       while (true) {
+                               lastException = null;
+                               var status = SSLHandshake (Handle);
+                               Debug ("Handshake: {0} - {0:x}", status);
+
+                               CheckStatusAndThrow (status, SslStatus.WouldBlock, SslStatus.PeerAuthCompleted, SslStatus.PeerClientCertRequested);
+
+                               if (status == SslStatus.PeerAuthCompleted) {
+                                       RequirePeerTrust ();
+                               } else if (status == SslStatus.PeerClientCertRequested) {
+                                       RequirePeerTrust ();
+                                       if (remoteCertificate == null)
+                                               throw new TlsException (AlertDescription.InternalError, "Cannot request client certificate before receiving one from the server.");
+                                       localClientCertificate = SelectClientCertificate (remoteCertificate, null);
+                                       if (localClientCertificate == null)
+                                               continue;
+                                       clientIdentity = AppleCertificateHelper.GetIdentity (localClientCertificate);
+                                       if (clientIdentity == null)
+                                               throw new TlsException (AlertDescription.CertificateUnknown);
+                                       SetCertificate (clientIdentity, new SecCertificate [0]);
+                               } else if (status == SslStatus.WouldBlock) {
+                                       return false;
+                               } else if (status == SslStatus.Success) {
+                                       handshakeFinished = true;
+                                       return true;
+                               }
+                       }
+               }
+
+               void RequirePeerTrust ()
+               {
+                       if (!havePeerTrust) {
+                               EvaluateTrust ();
+                               havePeerTrust = true;
+                       }
+               }
+
+               void EvaluateTrust ()
+               {
+                       InitializeSession ();
+
+                       /*
+                        * We're using .NET's SslStream semantics here.
+                        * 
+                        * A server must always provide a valid certificate.
+                        * 
+                        * However, in server mode, "ask for client certificate" means that
+                        * we ask the client to provide a certificate, then invoke the client
+                        * certificate validator - passing 'null' if the client didn't provide
+                        * any.
+                        * 
+                        */
+
+                       var trust = GetPeerTrust (!IsServer);
+                       X509CertificateCollection certificates;
+
+                       if (trust == null || trust.Count == 0) {
+                               remoteCertificate = null;
+                               if (!IsServer)
+                                       throw new TlsException (AlertDescription.CertificateUnknown);
+                               certificates = null;
+                       } else {
+                               if (trust.Count > 1)
+                                       Debug ("WARNING: Got multiple certificates in SecTrust!");
+
+                               certificates = new X509CertificateCollection ();
+                               for (int i = 0; i < trust.Count; i++)
+                                       certificates.Add (trust [(IntPtr)i].ToX509Certificate ());
+
+                               remoteCertificate = certificates [0];
+                               Debug ("Got peer trust: {0}", remoteCertificate);
+                       }
+
+                       bool ok;
+                       try {
+                               ok = ValidateCertificate (certificates);
+                       } catch (Exception ex) {
+                               Debug ("Certificate validation failed: {0}", ex);
+                               throw new TlsException (AlertDescription.CertificateUnknown, "Certificate validation threw exception.");
+                       }
+
+                       if (!ok)
+                               throw new TlsException (AlertDescription.CertificateUnknown);
+               }
+
+               void InitializeConnection ()
+               {
+                       context = SSLCreateContext (IntPtr.Zero, IsServer ? SslProtocolSide.Server : SslProtocolSide.Client, SslConnectionType.Stream);
+
+                       var result = SSLSetIOFuncs (Handle, readFunc, writeFunc);
+                       CheckStatusAndThrow (result);
+
+                       result = SSLSetConnection (Handle, connectionId);
+                       CheckStatusAndThrow (result);
+
+                       if ((EnabledProtocols & SSA.SslProtocols.Tls) != 0)
+                               MinProtocol = SslProtocol.Tls_1_0;
+                       else if ((EnabledProtocols & SSA.SslProtocols.Tls11) != 0)
+                               MinProtocol = SslProtocol.Tls_1_1;
+                       else
+                               MinProtocol = SslProtocol.Tls_1_2;
+
+                       if ((EnabledProtocols & SSA.SslProtocols.Tls12) != 0)
+                               MaxProtocol = SslProtocol.Tls_1_2;
+                       else if ((EnabledProtocols & SSA.SslProtocols.Tls11) != 0)
+                               MaxProtocol = SslProtocol.Tls_1_1;
+                       else
+                               MaxProtocol = SslProtocol.Tls_1_0;
+
+#if APPLE_TLS_DEBUG
+                       foreach (var c in GetSupportedCiphers ())
+                               Debug ("  {0} SslCipherSuite.{1} {2:x} {3}", IsServer ? "Server" : "Client", c, (int)c, (CipherSuiteCode)c);
+#endif
+
+                       if (Settings != null && Settings.EnabledCiphers != null) {
+                               SslCipherSuite [] ciphers = new SslCipherSuite [Settings.EnabledCiphers.Length];
+                               for (int i = 0 ; i < Settings.EnabledCiphers.Length; ++i)
+                                       ciphers [i] = (SslCipherSuite)Settings.EnabledCiphers[i];
+                               SetEnabledCiphers (ciphers);
+                       }
+
+                       if (AskForClientCertificate)
+                               SetClientSideAuthenticate (SslAuthenticate.Try);
+
+                       IPAddress address;
+                       if (!IsServer && !string.IsNullOrEmpty (TargetHost) &&
+                           !IPAddress.TryParse (TargetHost, out address)) {
+                               PeerDomainName = ServerName;
+                       }
+               }
+
+               void InitializeSession ()
+               {
+                       if (connectionInfo != null)
+                               return;
+
+                       var cipher = NegotiatedCipher;
+                       var protocol = GetNegotiatedProtocolVersion ();
+                       Debug ("GET CONNECTION INFO: {0:x}:{0} {1:x}:{1} {2}", cipher, protocol, (TlsProtocolCode)protocol);
+
+                       connectionInfo = new MonoTlsConnectionInfo {
+                               CipherSuiteCode = (CipherSuiteCode)cipher,
+                               ProtocolVersion = GetProtocol (protocol),
+                               PeerDomainName = PeerDomainName
+                       };
+               }
+
+               static TlsProtocols GetProtocol (SslProtocol protocol)
+               {
+                       switch (protocol) {
+                       case SslProtocol.Tls_1_0:
+                               return TlsProtocols.Tls10;
+                       case SslProtocol.Tls_1_1:
+                               return TlsProtocols.Tls11;
+                       case SslProtocol.Tls_1_2:
+                               return TlsProtocols.Tls12;
+                       default:
+                               throw new NotSupportedException ();
+                       }
+               }
+
+               public override MonoTlsConnectionInfo ConnectionInfo {
+                       get { return connectionInfo; }
+               }
+
+               internal override bool IsRemoteCertificateAvailable {
+                       get { return remoteCertificate != null; }
+               }
+
+               internal override X509Certificate LocalClientCertificate {
+                       get { return localClientCertificate; }
+               }
+
+               public override X509Certificate RemoteCertificate {
+                       get { return remoteCertificate; }
+               }
+
+               public override TlsProtocols NegotiatedProtocol {
+                       get { return connectionInfo.ProtocolVersion; }
+               }
+
+               #endregion
+
+               #region General P/Invokes
+
+               [DllImport (SecurityLibrary )]
+               extern static /* OSStatus */ SslStatus SSLGetProtocolVersionMax (/* SSLContextRef */ IntPtr context, out SslProtocol maxVersion);
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLSetProtocolVersionMax (/* SSLContextRef */ IntPtr context, SslProtocol maxVersion);
+
+               public SslProtocol MaxProtocol {
+                       get {
+                               SslProtocol value;
+                               var result = SSLGetProtocolVersionMax (Handle, out value);
+                               CheckStatusAndThrow (result);
+                               return value;
+                       }
+                       set {
+                               var result = SSLSetProtocolVersionMax (Handle, value);
+                               CheckStatusAndThrow (result);
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLGetProtocolVersionMin (/* SSLContextRef */ IntPtr context, out SslProtocol minVersion);
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLSetProtocolVersionMin (/* SSLContextRef */ IntPtr context, SslProtocol minVersion);
+
+               public SslProtocol MinProtocol {
+                       get {
+                               SslProtocol value;
+                               var result = SSLGetProtocolVersionMin (Handle, out value);
+                               CheckStatusAndThrow (result);
+                               return value;
+                       }
+                       set {
+                               var result = SSLSetProtocolVersionMin (Handle, value);
+                               CheckStatusAndThrow (result);
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLGetNegotiatedProtocolVersion (/* SSLContextRef */ IntPtr context, out SslProtocol protocol);
+
+               public SslProtocol GetNegotiatedProtocolVersion ()
+               {
+                       SslProtocol value;
+                       var result = SSLGetNegotiatedProtocolVersion (Handle, out value);
+                       CheckStatusAndThrow (result);
+                       return value;
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLGetSessionOption (/* SSLContextRef */ IntPtr context, SslSessionOption option, out bool value);
+
+               public bool GetSessionOption (SslSessionOption option)
+               {
+                       bool value;
+                       var result = SSLGetSessionOption (Handle, option, out value);
+                       CheckStatusAndThrow (result);
+                       return value;
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLSetSessionOption (/* SSLContextRef */ IntPtr context, SslSessionOption option, bool value);
+
+               public void SetSessionOption (SslSessionOption option, bool value)
+               {
+                       var result = SSLSetSessionOption (Handle, option, value);
+                       CheckStatusAndThrow (result);
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLSetClientSideAuthenticate (/* SSLContextRef */ IntPtr context, SslAuthenticate auth);
+
+               public void SetClientSideAuthenticate (SslAuthenticate auth)
+               {
+                       var result = SSLSetClientSideAuthenticate (Handle, auth);
+                       CheckStatusAndThrow (result);
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLHandshake (/* SSLContextRef */ IntPtr context);
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLGetSessionState (/* SSLContextRef */ IntPtr context, ref SslSessionState state);
+
+               public SslSessionState SessionState {
+                       get {
+                               var value = SslSessionState.Invalid;
+                               var result = SSLGetSessionState (Handle, ref value);
+                               CheckStatusAndThrow (result);
+                               return value;
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetPeerID (/* SSLContextRef */ IntPtr context, /* const void** */ out IntPtr peerID, /* size_t* */ out IntPtr peerIDLen);
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLSetPeerID (/* SSLContextRef */ IntPtr context, /* const void* */ byte* peerID, /* size_t */ IntPtr peerIDLen);
+
+               public unsafe byte[] PeerId {
+                       get {
+                               IntPtr length;
+                               IntPtr id;
+                               var result = SSLGetPeerID (Handle, out id, out length);
+                               CheckStatusAndThrow (result);
+                               if ((result != SslStatus.Success) || ((int)length == 0))
+                                       return null;
+                               var data = new byte [(int)length];
+                               Marshal.Copy (id, data, 0, (int) length);
+                               return data;
+                       }
+                       set {
+                               SslStatus result;
+                               IntPtr length = (value == null) ? IntPtr.Zero : (IntPtr)value.Length;
+                               fixed (byte *p = value) {
+                                       result = SSLSetPeerID (Handle, p, length);
+                               }
+                               CheckStatusAndThrow (result);
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetBufferedReadSize (/* SSLContextRef */ IntPtr context, /* size_t* */ out IntPtr bufSize);
+
+               public IntPtr BufferedReadSize {
+                       get {
+                               IntPtr value;
+                               var result = SSLGetBufferedReadSize (Handle, out value);
+                               CheckStatusAndThrow (result);
+                               return value;
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetNumberSupportedCiphers (/* SSLContextRef */ IntPtr context, /* size_t* */ out IntPtr numCiphers);
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetSupportedCiphers (/* SSLContextRef */ IntPtr context, SslCipherSuite *ciphers, /* size_t* */ ref IntPtr numCiphers);
+
+               public unsafe IList<SslCipherSuite> GetSupportedCiphers ()
+               {
+                       IntPtr n;
+                       var result = SSLGetNumberSupportedCiphers (Handle, out n);
+                       CheckStatusAndThrow (result);
+                       if ((result != SslStatus.Success) || ((int)n <= 0))
+                               return null;
+
+                       var ciphers = new SslCipherSuite [(int)n];
+                       fixed (SslCipherSuite *p = ciphers) {
+                               result = SSLGetSupportedCiphers (Handle, p, ref n);
+                       }
+                       CheckStatusAndThrow (result);
+                       return ciphers;
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetNumberEnabledCiphers (/* SSLContextRef */ IntPtr context, /* size_t* */ out IntPtr numCiphers);
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetEnabledCiphers (/* SSLContextRef */ IntPtr context, SslCipherSuite *ciphers, /* size_t* */ ref IntPtr numCiphers);
+
+               public unsafe IList<SslCipherSuite> GetEnabledCiphers ()
+               {
+                       IntPtr n;
+                       var result = SSLGetNumberEnabledCiphers (Handle, out n);
+                       CheckStatusAndThrow (result);
+                       if ((result != SslStatus.Success) || ((int)n <= 0))
+                               return null;
+
+                       var ciphers = new SslCipherSuite [(int)n];
+                       fixed (SslCipherSuite *p = ciphers) {
+                               result = SSLGetEnabledCiphers (Handle, p, ref n);
+                       }
+                       CheckStatusAndThrow (result);
+                       return ciphers;
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLSetEnabledCiphers (/* SSLContextRef */ IntPtr context, SslCipherSuite *ciphers, /* size_t */ IntPtr numCiphers);
+
+               public unsafe void SetEnabledCiphers (SslCipherSuite [] ciphers)
+               {
+                       if (ciphers == null)
+                               throw new ArgumentNullException ("ciphers");
+
+                       SslStatus result;
+
+                       fixed (SslCipherSuite *p = ciphers)
+                               result = SSLSetEnabledCiphers (Handle, p, (IntPtr)ciphers.Length);
+                       CheckStatusAndThrow (result);
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetNegotiatedCipher (/* SSLContextRef */ IntPtr context, /* SslCipherSuite* */ out SslCipherSuite cipherSuite);
+
+               public SslCipherSuite NegotiatedCipher {
+                       get {
+                               SslCipherSuite value;
+                               var result = SSLGetNegotiatedCipher (Handle, out value);
+                               CheckStatusAndThrow (result);
+                               return value;
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetPeerDomainNameLength (/* SSLContextRef */ IntPtr context, /* size_t* */ out IntPtr peerNameLen);
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetPeerDomainName (/* SSLContextRef */ IntPtr context, /* char* */ byte[] peerName, /* size_t */ ref IntPtr peerNameLen);
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLSetPeerDomainName (/* SSLContextRef */ IntPtr context, /* char* */ byte[] peerName, /* size_t */ IntPtr peerNameLen);
+
+               public string PeerDomainName {
+                       get {
+                               IntPtr length;
+                               var result = SSLGetPeerDomainNameLength (Handle, out length);
+                               CheckStatusAndThrow (result);
+                               if (result != SslStatus.Success || (int)length == 0)
+                                       return String.Empty;
+                               var bytes = new byte [(int)length];
+                               result = SSLGetPeerDomainName (Handle, bytes, ref length);
+                               CheckStatusAndThrow (result);
+
+                               int peerDomainLength = (int)length;
+
+                               if (result != SslStatus.Success)
+                                       return string.Empty;
+                               if (peerDomainLength > 0 && bytes [peerDomainLength-1] == 0)
+                                       peerDomainLength = peerDomainLength - 1;
+                               return Encoding.UTF8.GetString (bytes, 0, peerDomainLength);
+                       }
+                       set {
+                               SslStatus result;
+                               if (value == null) {
+                                       result = SSLSetPeerDomainName (Handle, null, (IntPtr)0);
+                               } else {
+                                       var bytes = Encoding.UTF8.GetBytes (value);
+                                       result = SSLSetPeerDomainName (Handle, bytes, (IntPtr)bytes.Length);
+                               }
+                               CheckStatusAndThrow (result);
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLSetCertificate (/* SSLContextRef */ IntPtr context, /* CFArrayRef */ IntPtr certRefs);
+
+               CFArray Bundle (SecIdentity identity, IEnumerable<SecCertificate> certificates)
+               {
+                       if (identity == null)
+                               throw new ArgumentNullException ("identity");
+                       int i = 0;
+
+                       int n = 0;
+                       if (certificates != null) {
+                               foreach (var obj in certificates)
+                                       n++;
+                       }
+
+                       var ptrs = new IntPtr [n + 1];
+                       ptrs [0] = identity.Handle;
+                       foreach (var certificate in certificates)
+                               ptrs [++i] = certificate.Handle;
+                       return CFArray.CreateArray (ptrs);
+               }
+
+               public void SetCertificate (SecIdentity identify, IEnumerable<SecCertificate> certificates)
+               {
+                       using (var array = Bundle (identify, certificates)) {
+                               var result = SSLSetCertificate (Handle, array.Handle);
+                               CheckStatusAndThrow (result);
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLGetClientCertificateState (/* SSLContextRef */ IntPtr context, out SslClientCertificateState clientState);
+
+               public SslClientCertificateState ClientCertificateState {
+                       get {
+                               SslClientCertificateState value;
+                               var result = SSLGetClientCertificateState (Handle, out value);
+                               CheckStatusAndThrow (result);
+                               return value;
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLCopyPeerTrust (/* SSLContextRef */ IntPtr context, /* SecTrustRef */ out IntPtr trust);
+
+               public SecTrust GetPeerTrust (bool requireTrust)
+               {
+                       IntPtr value;
+                       var result = SSLCopyPeerTrust (Handle, out value);
+                       if (requireTrust) {
+                               CheckStatusAndThrow (result);
+                               if (value == IntPtr.Zero)
+                                       throw new TlsException (AlertDescription.CertificateUnknown);
+                       }
+                       return (value == IntPtr.Zero) ? null : new SecTrust (value);
+               }
+
+               #endregion
+
+               #region IO Functions
+
+               [DllImport (SecurityLibrary)]
+               extern static /* SSLContextRef */ IntPtr SSLCreateContext (/* CFAllocatorRef */ IntPtr alloc, SslProtocolSide protocolSide, SslConnectionType connectionType);
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLSetConnection (/* SSLContextRef */ IntPtr context, /* SSLConnectionRef */ IntPtr connection);
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLSetIOFuncs (/* SSLContextRef */ IntPtr context, /* SSLReadFunc */ SslReadFunc readFunc, /* SSLWriteFunc */ SslWriteFunc writeFunc);
+
+               [MonoPInvokeCallback (typeof (SslReadFunc))]
+               static SslStatus NativeReadCallback (IntPtr ptr, IntPtr data, ref IntPtr dataLength)
+               {
+                       var handle = GCHandle.FromIntPtr (ptr);
+                       if (!handle.IsAllocated)
+                               return SslStatus.Internal;
+
+                       var context = (AppleTlsContext) handle.Target;
+                       if (context.disposed)
+                               return SslStatus.ClosedAbort;
+
+                       try {
+                               return context.NativeReadCallback (data, ref dataLength);
+                       } catch (Exception ex) {
+                               if (context.lastException == null)
+                                       context.lastException = ex;
+                               return SslStatus.Internal;
+                       }
+               }
+
+               [MonoPInvokeCallback (typeof (SslWriteFunc))]
+               static SslStatus NativeWriteCallback (IntPtr ptr, IntPtr data, ref IntPtr dataLength)
+               {
+                       var handle = GCHandle.FromIntPtr (ptr);
+                       if (!handle.IsAllocated)
+                               return SslStatus.Internal;
+
+                       var context = (AppleTlsContext) handle.Target;
+                       if (context.disposed)
+                               return SslStatus.ClosedAbort;
+
+                       try {
+                               return context.NativeWriteCallback (data, ref dataLength);
+                       } catch (Exception ex) {
+                               if (context.lastException == null)
+                                       context.lastException = ex;
+                               return SslStatus.Internal;
+                       }
+               }
+
+               SslStatus NativeReadCallback (IntPtr data, ref IntPtr dataLength)
+               {
+                       if (closed || disposed || Parent == null)
+                               return SslStatus.ClosedAbort;
+
+                       var len = (int)dataLength;
+                       var readBuffer = new byte [len];
+
+                       Debug ("NativeReadCallback: {0} {1}", dataLength, len);
+
+                       bool wantMore;
+                       var ret = Parent.InternalRead (readBuffer, 0, len, out wantMore);
+                       dataLength = (IntPtr)ret;
+
+                       Debug ("NativeReadCallback #1: {0} - {1} {2}", len, ret, wantMore);
+
+                       if (ret < 0)
+                               return SslStatus.ClosedAbort;
+
+                       Marshal.Copy (readBuffer, 0, data, ret);
+
+                       if (ret > 0)
+                               return SslStatus.Success;
+                       else if (wantMore)
+                               return SslStatus.WouldBlock;
+                       else if (ret == 0) {
+                               closedGraceful = true;
+                               return SslStatus.ClosedGraceful;
+                       } else {
+                               return SslStatus.Success;
+                       }
+               }
+
+               SslStatus NativeWriteCallback (IntPtr data, ref IntPtr dataLength)
+               {
+                       if (closed || disposed || Parent == null)
+                               return SslStatus.ClosedAbort;
+
+                       var len = (int)dataLength;
+                       var writeBuffer = new byte [len];
+
+                       Marshal.Copy (data, writeBuffer, 0, len);
+
+                       Debug ("NativeWriteCallback: {0}", len);
+
+                       var ok = Parent.InternalWrite (writeBuffer, 0, len);
+
+                       Debug ("NativeWriteCallback done: {0} {1}", len, ok);
+
+                       return ok ? SslStatus.Success : SslStatus.ClosedAbort;
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLRead (/* SSLContextRef */ IntPtr context, /* const void* */ byte* data, /* size_t */ IntPtr dataLength, /* size_t* */ out IntPtr processed);
+
+               public override unsafe int Read (byte[] buffer, int offset, int count, out bool wantMore)
+               {
+                       if (Interlocked.Exchange (ref pendingIO, 1) == 1)
+                               throw new InvalidOperationException ();
+
+                       Debug ("Read: {0},{1}", offset, count);
+
+                       lastException = null;
+
+                       try {
+                               IntPtr processed;
+                               SslStatus status;
+
+                               fixed (byte *d = &buffer [offset])
+                                       status = SSLRead (Handle, d, (IntPtr)count, out processed);
+
+                               Debug ("Read done: {0} {1} {2}", status, count, processed);
+
+                               if (closedGraceful && (status == SslStatus.ClosedAbort || status == SslStatus.ClosedGraceful)) {
+                                       /*
+                                        * This is really ugly, but unfortunately SSLRead() also returns 'SslStatus.ClosedAbort'
+                                        * when the first inner Read() returns 0.  MobileAuthenticatedStream.InnerRead() attempts
+                                        * to distinguish between a graceful close and abnormal termination of connection.
+                                        */
+                                       wantMore = false;
+                                       return 0;
+                               }
+
+                               CheckStatusAndThrow (status, SslStatus.WouldBlock, SslStatus.ClosedGraceful);
+                               wantMore = status == SslStatus.WouldBlock;
+                               return (int)processed;
+                       } catch (Exception ex) {
+                               Debug ("Read error: {0}", ex);
+                               throw;
+                       } finally {
+                               pendingIO = 0;
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern unsafe static /* OSStatus */ SslStatus SSLWrite (/* SSLContextRef */ IntPtr context, /* const void* */ byte* data, /* size_t */ IntPtr dataLength, /* size_t* */ out IntPtr processed);
+
+               public override unsafe int Write (byte[] buffer, int offset, int count, out bool wantMore)
+               {
+                       if (Interlocked.Exchange (ref pendingIO, 1) == 1)
+                               throw new InvalidOperationException ();
+
+                       Debug ("Write: {0},{1}", offset, count);
+
+                       lastException = null;
+
+                       try {
+                               SslStatus status = SslStatus.ClosedAbort;
+                               IntPtr processed = (IntPtr)(-1);
+
+                               fixed (byte *d = &buffer [offset])
+                                       status = SSLWrite (Handle, d, (IntPtr)count, out processed);
+
+                               Debug ("Write done: {0} {1}", status, processed);
+
+                               CheckStatusAndThrow (status, SslStatus.WouldBlock);
+
+                               wantMore = status == SslStatus.WouldBlock;
+                               return (int)processed;
+                       } finally {
+                               pendingIO = 0;
+                       }
+               }
+
+               [DllImport (SecurityLibrary)]
+               extern static /* OSStatus */ SslStatus SSLClose (/* SSLContextRef */ IntPtr context);
+
+               public override void Close ()
+               {
+                       if (Interlocked.Exchange (ref pendingIO, 1) == 1)
+                               throw new InvalidOperationException ();
+
+                       Debug ("Close");
+
+                       lastException = null;
+
+                       try {
+                               if (closed || disposed)
+                                       return;
+
+                               var status = SSLClose (Handle);
+                               Debug ("Close done: {0}", status);
+                               CheckStatusAndThrow (status);
+                       } finally {
+                               closed = true;
+                               pendingIO = 0;
+                       }
+               }
+
+               #endregion
+
+               protected override void Dispose (bool disposing)
+               {
+                       try {
+                               if (disposed)
+                                       return;
+                               if (disposing) {
+                                       disposed = true;
+                                       if (serverIdentity != null) {
+                                               serverIdentity.Dispose ();
+                                               serverIdentity = null;
+                                       }
+                                       if (clientIdentity != null) {
+                                               clientIdentity.Dispose ();
+                                               clientIdentity = null;
+                                       }
+                                       if (remoteCertificate != null) {
+                                               remoteCertificate.Dispose ();
+                                               remoteCertificate = null;
+                                       }
+                               }
+                       } finally {
+                               disposed = true;
+                               if (context != IntPtr.Zero) {
+                                       CFObject.CFRelease (context);
+                                       context = IntPtr.Zero;
+                               }
+                               base.Dispose (disposing);
+                       }
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/AppleTlsProvider.cs b/mcs/class/System/Mono.AppleTls/AppleTlsProvider.cs
new file mode 100644 (file)
index 0000000..81f1b62
--- /dev/null
@@ -0,0 +1,77 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+//
+// AppleTlsProvider.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2015 Xamarin, Inc.
+//
+
+#if MONO_SECURITY_ALIAS
+extern alias MonoSecurity;
+#endif
+
+using System;
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+
+using MNS = Mono.Net.Security;
+#if MONO_SECURITY_ALIAS
+using MonoSecurity::Mono.Security.Interface;
+#else
+using Mono.Security.Interface;
+#endif
+
+namespace Mono.AppleTls
+{
+       class AppleTlsProvider : MonoTlsProvider
+       {
+               static readonly Guid id = new Guid ("981af8af-a3a3-419a-9f01-a518e3a17c1c");
+
+               public override string Name {
+                       get { return "apple-tls"; }
+               }
+
+               public override Guid ID {
+                       get { return id; }
+               }
+
+               public override IMonoSslStream CreateSslStream (
+                       Stream innerStream, bool leaveInnerStreamOpen,
+                       MonoTlsSettings settings = null)
+               {
+                       return new AppleTlsStream (innerStream, leaveInnerStreamOpen, settings, this);
+               }
+
+               public override bool SupportsSslStream {
+                       get { return true; }
+               }
+
+               public override bool SupportsMonoExtensions {
+                       get { return true; }
+               }
+
+               public override bool SupportsConnectionInfo {
+                       get { return true; }
+               }
+
+               public override SslProtocols SupportedProtocols {
+                       get { return SslProtocols.Tls12 | SslProtocols.Tls11 | SslProtocols.Tls; }
+               }
+
+               internal override bool ValidateCertificate (
+                       ICertificateValidator2 validator, string targetHost, bool serverMode,
+                       X509CertificateCollection certificates, bool wantsChain, ref X509Chain chain,
+                       ref MonoSslPolicyErrors errors, ref int status11)
+               {
+                       if (wantsChain)
+                               chain = MNS.SystemCertificateValidator.CreateX509Chain (certificates);
+                       return AppleCertificateHelper.InvokeSystemCertificateValidator (validator, targetHost, serverMode, certificates, ref errors, ref status11);
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/AppleTlsStream.cs b/mcs/class/System/Mono.AppleTls/AppleTlsStream.cs
new file mode 100644 (file)
index 0000000..749fec6
--- /dev/null
@@ -0,0 +1,50 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+//
+// AppleTlsStream.cs
+//
+// Author:
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2016 Xamarin, Inc.
+//
+
+#if MONO_SECURITY_ALIAS
+extern alias MonoSecurity;
+#endif
+
+using System;
+using System.IO;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Security.Authentication;
+using System.Security.Cryptography.X509Certificates;
+
+using MNS = Mono.Net.Security;
+#if MONO_SECURITY_ALIAS
+using MonoSecurity::Mono.Security.Interface;
+#else
+using Mono.Security.Interface;
+#endif
+
+namespace Mono.AppleTls
+{
+       class AppleTlsStream : MNS.MobileAuthenticatedStream
+       {
+               public AppleTlsStream (Stream innerStream, bool leaveInnerStreamOpen, MonoTlsSettings settings, MonoTlsProvider provider)
+                       : base (innerStream, leaveInnerStreamOpen, settings, provider)
+               {
+               }
+
+               protected override MNS.MobileTlsContext CreateContext (
+                       MNS.MobileAuthenticatedStream parent, bool serverMode, string targetHost,
+                       SslProtocols enabledProtocols, X509Certificate serverCertificate,
+                       X509CertificateCollection clientCertificates, bool askForClientCert)
+               {
+                       return new AppleTlsContext (
+                               parent, serverMode, targetHost,
+                               enabledProtocols, serverCertificate,
+                               clientCertificates, askForClientCert);
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/Certificate.cs b/mcs/class/System/Mono.AppleTls/Certificate.cs
new file mode 100644 (file)
index 0000000..e78a85f
--- /dev/null
@@ -0,0 +1,341 @@
+// 
+// Certificate.cs: Implements the managed SecCertificate wrapper.
+//
+// Authors: 
+//     Miguel de Icaza
+//  Sebastien Pouliot  <sebastien@xamarin.com>
+//
+// Copyright 2010 Novell, Inc
+// Copyright 2012-2013 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.
+//
+
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+
+using System;
+using System.Runtime.InteropServices;
+using System.Security.Cryptography.X509Certificates;
+using Mono.Net;
+
+using ObjCRuntime;
+
+namespace Mono.AppleTls {
+
+       partial class SecCertificate : INativeObject, IDisposable {
+               internal IntPtr handle;
+               
+               internal SecCertificate (IntPtr handle, bool owns = false)
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new Exception ("Invalid handle");
+
+                       this.handle = handle;
+                       if (!owns)
+                               CFObject.CFRetain (handle);
+               }
+               
+               [DllImport (AppleTlsContext.SecurityLibrary, EntryPoint="SecCertificateGetTypeID")]
+               public extern static IntPtr GetTypeID ();
+                       
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static IntPtr SecCertificateCreateWithData (IntPtr allocator, IntPtr cfData);
+
+               public SecCertificate (X509Certificate certificate)
+               {
+                       if (certificate == null)
+                               throw new ArgumentNullException ("certificate");
+
+                       handle = certificate.Impl.GetNativeAppleCertificate ();
+                       if (handle != IntPtr.Zero) {
+                               CFObject.CFRetain (handle);
+                               return;
+                       }
+
+                       using (CFData cert = CFData.FromData (certificate.GetRawCertData ())) {
+                               Initialize (cert);
+                       }
+               }
+
+               internal SecCertificate (X509CertificateImpl impl)
+               {
+                       handle = impl.GetNativeAppleCertificate ();
+                       if (handle != IntPtr.Zero) {
+                               CFObject.CFRetain (handle);
+                               return;
+                       }
+
+                       using (CFData cert = CFData.FromData (impl.GetRawCertData ())) {
+                               Initialize (cert);
+                       }
+               }
+
+               void Initialize (CFData data)
+               {
+                       handle = SecCertificateCreateWithData (IntPtr.Zero, data.Handle);
+                       if (handle == IntPtr.Zero)
+                               throw new ArgumentException ("Not a valid DER-encoded X.509 certificate");
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static IntPtr SecCertificateCopySubjectSummary (IntPtr cert);
+
+               public string SubjectSummary {
+                       get {
+                               if (handle == IntPtr.Zero)
+                                       throw new ObjectDisposedException ("SecCertificate");
+                               
+                               IntPtr subjectSummaryHandle = IntPtr.Zero;
+                               try {
+                                       subjectSummaryHandle = SecCertificateCopySubjectSummary (handle);
+                                       CFString subjectSummary = CFString.AsString (subjectSummaryHandle);
+                                       return subjectSummary;
+                               }
+                               finally {
+                                       if (subjectSummaryHandle != IntPtr.Zero)
+                                               CFObject.CFRelease (subjectSummaryHandle);
+                               }
+                       }
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static /* CFDataRef */ IntPtr SecCertificateCopyData (/* SecCertificateRef */ IntPtr cert);
+
+               public CFData DerData {
+                       get {
+                               if (handle == IntPtr.Zero)
+                                       throw new ObjectDisposedException ("SecCertificate");
+
+                               IntPtr data = SecCertificateCopyData (handle);
+                               if (data == IntPtr.Zero)
+                                       throw new ArgumentException ("Not a valid certificate");
+                               return new CFData (data, true);
+                       }
+               }
+
+               public X509Certificate ToX509Certificate ()
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new ObjectDisposedException ("SecCertificate");
+
+                       return new X509Certificate (handle);
+               }
+
+               internal static bool Equals (SecCertificate first, SecCertificate second)
+               {
+                       /*
+                        * This is a little bit expensive, but unfortunately there is no better API to compare two
+                        * SecCertificateRef's for equality.
+                        */
+                       if (first == null)
+                               throw new ArgumentNullException ("first");
+                       if (second == null)
+                               throw new ArgumentNullException ("second");
+                       if (first.Handle == second.Handle)
+                               return true;
+
+                       using (var firstData = first.DerData)
+                       using (var secondData = second.DerData) {
+                               if (firstData.Handle == secondData.Handle)
+                                       return true;
+
+                               if (firstData.Length != secondData.Length)
+                                       return false;
+                               IntPtr length = (IntPtr)firstData.Length;
+                               for (long i = 0; i < (long)length; i++) {
+                                       if (firstData [i] != secondData [i])
+                                               return false;
+                               }
+
+                               return true;
+                       }
+               }
+
+               ~SecCertificate ()
+               {
+                       Dispose (false);
+               }
+
+               public IntPtr Handle {
+                       get {
+                               return handle;
+                       }
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (handle != IntPtr.Zero){
+                               CFObject.CFRelease (handle);
+                               handle = IntPtr.Zero;
+                       }
+               }
+       }
+
+       partial class SecIdentity : INativeObject, IDisposable {
+                
+               static readonly CFString ImportExportPassphase;
+               static readonly CFString ImportItemIdentity;
+               
+               static SecIdentity ()
+               {
+                       var handle = CFObject.dlopen (AppleTlsContext.SecurityLibrary, 0);
+                       if (handle == IntPtr.Zero)
+                               return;
+
+                       try {           
+                               ImportExportPassphase = CFObject.GetStringConstant (handle, "kSecImportExportPassphrase");
+                               ImportItemIdentity = CFObject.GetStringConstant (handle, "kSecImportItemIdentity");
+                       } finally {
+                               CFObject.dlclose (handle);
+                       }
+               }
+
+               internal IntPtr handle;
+               
+               internal SecIdentity (IntPtr handle, bool owns = false)
+               {
+                       this.handle = handle;
+                       if (!owns)
+                               CFObject.CFRetain (handle);
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary, EntryPoint="SecIdentityGetTypeID")]
+               public extern static IntPtr GetTypeID ();
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static /* OSStatus */ SecStatusCode SecIdentityCopyCertificate (/* SecIdentityRef */ IntPtr identityRef,  /* SecCertificateRef* */ out IntPtr certificateRef);
+
+               public SecCertificate Certificate {
+                       get {
+                               if (handle == IntPtr.Zero)
+                                       throw new ObjectDisposedException ("SecIdentity");
+                               IntPtr cert;
+                               SecStatusCode result = SecIdentityCopyCertificate (handle, out cert);
+                               if (result != SecStatusCode.Success)
+                                       throw new InvalidOperationException (result.ToString ());
+                               return new SecCertificate (cert, true);
+                       }
+               }
+
+               public static SecIdentity Import (byte[] data, string password)
+               {
+                       if (data == null)
+                               throw new ArgumentNullException ("data");
+                       if (string.IsNullOrEmpty (password)) // SecPKCS12Import() doesn't allow empty passwords.
+                               throw new ArgumentException ("password");
+                       using (var pwstring = CFString.Create (password))
+                       using (var options = CFDictionary.FromObjectAndKey (pwstring.Handle, ImportExportPassphase.Handle)) {
+                               CFDictionary [] array;
+                               SecStatusCode result = SecImportExport.ImportPkcs12 (data, options, out array);
+                               if (result != SecStatusCode.Success)
+                                       throw new InvalidOperationException (result.ToString ());
+
+                               return new SecIdentity (array [0].GetValue (ImportItemIdentity.Handle));
+                       }
+               }
+
+               public static SecIdentity Import (X509Certificate2 certificate)
+               {
+                       if (certificate == null)
+                               throw new ArgumentNullException ("certificate");
+                       if (!certificate.HasPrivateKey)
+                               throw new InvalidOperationException ("Need X509Certificate2 with a private key.");
+
+                       /*
+                        * SecPSK12Import does not allow any empty passwords, so let's generate
+                        * a semi-random one here.
+                        */
+                       var password = Guid.NewGuid ().ToString ();
+                       var pkcs12 = certificate.Export (X509ContentType.Pfx, password);
+                       return Import (pkcs12, password);
+               }
+
+               ~SecIdentity ()
+               {
+                       Dispose (false);
+               }
+
+               public IntPtr Handle {
+                       get {
+                               return handle;
+                       }
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (handle != IntPtr.Zero){
+                               CFObject.CFRelease (handle);
+                               handle = IntPtr.Zero;
+                       }
+               }
+       }
+
+       partial class SecKey : INativeObject, IDisposable {
+               internal IntPtr handle;
+               
+               public SecKey (IntPtr handle, bool owns = false)
+               {
+                       this.handle = handle;
+                       if (!owns)
+                               CFObject.CFRetain (handle);
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary, EntryPoint="SecKeyGetTypeID")]
+               public extern static IntPtr GetTypeID ();
+               
+               ~SecKey ()
+               {
+                       Dispose (false);
+               }
+
+               public IntPtr Handle {
+                       get {
+                               return handle;
+                       }
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (handle != IntPtr.Zero){
+                               CFObject.CFRelease (handle);
+                               handle = IntPtr.Zero;
+                       }
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/Enums.cs b/mcs/class/System/Mono.AppleTls/Enums.cs
new file mode 100644 (file)
index 0000000..3ec2107
--- /dev/null
@@ -0,0 +1,30 @@
+#if MONO_FEATURE_APPLETLS
+// Copyright 2011-2015 Xamarin Inc. All rights reserved.
+
+using ObjCRuntime;
+
+namespace Mono.AppleTls {
+
+       // this is a subset of OSStatus -> SInt32 -> signed int - see CoreFoundation.framework/Headers/CFBase.h
+       // values are defined in Security.framework/Headers/SecBase.h 
+       enum SecStatusCode {
+               Success                                                         = 0,
+               DuplicateItem                                           = -25299,
+               Param                                                           = -50,
+       }
+
+       // typedef uint32_t SecTrustResultType;
+       // values are defined in Security.framework/Headers/SecTrust.h 
+       enum SecTrustResult {
+               Invalid,
+               Proceed,
+
+               Confirm,
+               Deny,
+               Unspecified,
+               RecoverableTrustFailure,
+               FatalTrustFailure,
+               ResultOtherError,
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/INativeObject.cs b/mcs/class/System/Mono.AppleTls/INativeObject.cs
new file mode 100644 (file)
index 0000000..81c8003
--- /dev/null
@@ -0,0 +1,21 @@
+using System;
+
+namespace ObjCRuntime {
+
+       internal interface INativeObject {
+               IntPtr Handle { 
+                       get;
+               }
+       }
+
+       static class NativeObjectHelper {
+
+               // help to avoid the (too common pattern)
+               //      var p = x == null ? IntPtr.Zero : x.Handle;
+               static public IntPtr GetHandle (this INativeObject self)
+               {
+                       return self == null ? IntPtr.Zero : self.Handle;
+               }
+       }
+
+}
diff --git a/mcs/class/System/Mono.AppleTls/ImportExport.cs b/mcs/class/System/Mono.AppleTls/ImportExport.cs
new file mode 100644 (file)
index 0000000..518f0b1
--- /dev/null
@@ -0,0 +1,62 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+// 
+// ImportExport.cs
+//
+// Authors:
+//     Sebastien Pouliot  <sebastien@xamarin.com>
+//     
+// Copyright 2011-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;
+using System.Runtime.InteropServices;
+using ObjCRuntime;
+using Mono.Net;
+
+namespace Mono.AppleTls {
+
+       internal partial class SecImportExport {
+               
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static SecStatusCode SecPKCS12Import (IntPtr pkcs12_data, IntPtr options, out IntPtr items);
+               
+               static public SecStatusCode ImportPkcs12 (byte[] buffer, CFDictionary options, out CFDictionary[] array)
+               {
+                       using (CFData data = CFData.FromData (buffer)) {
+                               return ImportPkcs12 (data, options, out array);
+                       }
+               }
+
+               static public SecStatusCode ImportPkcs12 (CFData data, CFDictionary options, out CFDictionary [] array)
+               {
+                       if (options == null)
+                               throw new ArgumentNullException ("options");
+                       
+                       IntPtr handle;
+                       SecStatusCode code = SecPKCS12Import (data.Handle, options.Handle, out handle);
+                       array = CFArray.ArrayFromHandle <CFDictionary> (handle, h => new CFDictionary (h, false));
+                       CFObject.CFRelease (handle);
+                       return code;
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/Items.cs b/mcs/class/System/Mono.AppleTls/Items.cs
new file mode 100644 (file)
index 0000000..1c9fd03
--- /dev/null
@@ -0,0 +1,258 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+// 
+// Items.cs: Implements the KeyChain query access APIs
+//
+// We use strong types and a helper SecQuery class to simplify the
+// creation of the dictionary used to query the Keychain
+// 
+// Authors:
+//     Miguel de Icaza
+//     Sebastien Pouliot
+//     
+// Copyright 2010 Novell, Inc
+// Copyright 2011-2016 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;
+using System.Collections;
+using System.Runtime.InteropServices;
+using ObjCRuntime;
+using Mono.Net;
+
+namespace Mono.AppleTls {
+
+       enum SecKind {
+               Identity
+       }
+
+       static class SecKeyChain {
+               static readonly IntPtr MatchLimitAll;
+               static readonly IntPtr MatchLimitOne;
+               static readonly IntPtr MatchLimit;
+
+               static SecKeyChain ()
+               {
+                       var handle = CFObject.dlopen (AppleTlsContext.SecurityLibrary, 0);
+                       if (handle == IntPtr.Zero)
+                               return;
+
+                       try {           
+                               MatchLimit = CFObject.GetIntPtr (handle, "kSecMatchLimit");
+                               MatchLimitAll = CFObject.GetIntPtr (handle, "kSecMatchLimitAll");
+                               MatchLimitOne = CFObject.GetIntPtr (handle, "kSecMatchLimitOne");
+                       } finally {
+                               CFObject.dlclose (handle);
+                       }
+               }
+
+               public static SecIdentity FindIdentity (SecCertificate certificate, bool throwOnError = false)
+               {
+                       if (certificate == null)
+                               throw new ArgumentNullException ("certificate");
+                       var identity = FindIdentity (cert => SecCertificate.Equals (certificate, cert));
+                       if (!throwOnError || identity != null)
+                               return identity;
+
+                       throw new InvalidOperationException (string.Format ("Could not find SecIdentity for certificate '{0}' in keychain.", certificate.SubjectSummary));
+               }
+
+               static SecIdentity FindIdentity (Predicate<SecCertificate> filter)
+               {
+                       /*
+                        * Unfortunately, SecItemCopyMatching() does not allow any search
+                        * filters when looking up an identity.
+                        * 
+                        * The following lookup will return all identities from the keychain -
+                        * we then need need to find the right one.
+                        */
+                       using (var record = new SecRecord (SecKind.Identity)) {
+                               SecStatusCode status;
+                               var result = SecKeyChain.QueryAsReference (record, -1, out status);
+                               if (status != SecStatusCode.Success || result == null)
+                                       return null;
+
+                               for (int i = 0; i < result.Length; i++) {
+                                       var identity = (SecIdentity)result [i];
+                                       if (filter (identity.Certificate))
+                                               return identity;
+                               }
+                       }
+
+                       return null;
+               }
+               
+               public static INativeObject[] QueryAsReference (SecRecord query, int max, out SecStatusCode result)
+               {
+                       if (query == null){
+                               result = SecStatusCode.Param;
+                               return null;
+                       }
+
+                       using (var copy = query.queryDict.MutableCopy ()) {
+                               copy.SetValue (CFBoolean.True.Handle, SecItem.ReturnRef);
+                               SetLimit (copy, max);
+
+                               IntPtr ptr;
+                               result = SecItem.SecItemCopyMatching (copy.Handle, out ptr);
+                               if ((result == SecStatusCode.Success) && (ptr != IntPtr.Zero)) {
+                                       var array = CFArray.ArrayFromHandle<INativeObject> (ptr, p => {
+                                               IntPtr cfType = CFType.GetTypeID (p);
+                                               if (cfType == SecCertificate.GetTypeID ())
+                                                       return new SecCertificate (p, true);
+                                               else if (cfType == SecKey.GetTypeID ())
+                                                       return new SecKey (p, true);
+                                               else if (cfType == SecIdentity.GetTypeID ())
+                                                       return new SecIdentity (p, true);
+                                               else
+                                                       throw new Exception (String.Format ("Unexpected type: 0x{0:x}", cfType));
+                                       });
+                                       return array;
+                               }
+                               return null;
+                       }
+               }
+
+               static CFNumber SetLimit (CFMutableDictionary dict, int max)
+               {
+                       CFNumber n = null;
+                       IntPtr val;
+                       if (max == -1)
+                               val = MatchLimitAll;
+                       else if (max == 1)
+                               val = MatchLimitOne;
+                       else {
+                               n = CFNumber.FromInt32 (max);
+                               val = n.Handle;
+                       }
+                       
+                       dict.SetValue (val, SecKeyChain.MatchLimit);
+                       return n;
+               }
+       }
+       
+       class SecRecord : IDisposable {
+
+               static readonly IntPtr SecClassKey;
+               static SecRecord ()
+               {
+                       var handle = CFObject.dlopen (AppleTlsContext.SecurityLibrary, 0);
+                       if (handle == IntPtr.Zero)
+                               return;
+
+                       try {           
+                               SecClassKey = CFObject.GetIntPtr (handle, "kSecClassKey");
+                       } finally {
+                               CFObject.dlclose (handle);
+                       }
+               }
+
+               // Fix <= iOS 6 Behaviour - Desk #83099
+               // NSCFDictionary: mutating method sent to immutable object
+               // iOS 6 returns an inmutable NSDictionary handle and when we try to set its values it goes kaboom
+               // By explicitly calling `MutableCopy` we ensure we always have a mutable reference we expect that.
+               CFDictionary _queryDict;
+               internal CFDictionary queryDict 
+               { 
+                       get {
+                               return _queryDict;
+                       }
+                       set {
+                               _queryDict = value != null ? value.Copy () : null;
+                       }
+               }
+
+               public SecRecord (SecKind secKind)
+               {
+                       var kind = SecClass.FromSecKind (secKind);
+                       queryDict = CFDictionary.FromObjectAndKey (kind, SecClassKey);
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (queryDict != null){
+                               if (disposing){
+                                       queryDict.Dispose ();
+                                       queryDict = null;
+                               }
+                       }
+               }
+
+               ~SecRecord ()
+               {
+                       Dispose (false);
+               }
+       }
+       
+       partial class SecItem {
+               public static readonly IntPtr ReturnRef;
+               
+               static SecItem ()
+               {
+                       var handle = CFObject.dlopen (AppleTlsContext.SecurityLibrary, 0);
+                       if (handle == IntPtr.Zero)
+                               return;
+
+                       try {           
+                               ReturnRef = CFObject.GetIntPtr (handle, "kSecReturnRef");
+                       } finally {
+                               CFObject.dlclose (handle);
+                       }
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               internal extern static SecStatusCode SecItemCopyMatching (/* CFDictionaryRef */ IntPtr query, /* CFTypeRef* */ out IntPtr result);
+       }
+
+       static partial class SecClass {
+       
+               public static readonly IntPtr Identity;
+               
+               static SecClass ()
+               {
+                       var handle = CFObject.dlopen (AppleTlsContext.SecurityLibrary, 0);
+                       if (handle == IntPtr.Zero)
+                               return;
+
+                       try {           
+                               Identity = CFObject.GetIntPtr (handle, "kSecClassIdentity");
+                       } finally {
+                               CFObject.dlclose (handle);
+                       }
+               }
+
+               public static IntPtr FromSecKind (SecKind secKind)
+               {
+                       switch (secKind){
+                       case SecKind.Identity:
+                               return Identity;
+                       default:
+                               throw new ArgumentException ("secKind");
+                       }
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/Policy.cs b/mcs/class/System/Mono.AppleTls/Policy.cs
new file mode 100644 (file)
index 0000000..b91f713
--- /dev/null
@@ -0,0 +1,87 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+// 
+// Policy.cs: Implements the managed SecPolicy wrapper.
+//
+// Authors: 
+//     Miguel de Icaza
+//  Sebastien Pouliot  <sebastien@xamarin.com>
+//
+// Copyright 2010 Novell, Inc
+// Copyright 2012-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;
+using System.Runtime.InteropServices;
+using ObjCRuntime;
+using Mono.Net;
+
+namespace Mono.AppleTls {
+       partial class SecPolicy : INativeObject, IDisposable {
+               IntPtr handle;
+
+               internal SecPolicy (IntPtr handle, bool owns = false)
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new Exception ("Invalid handle");
+
+                       this.handle = handle;
+                       if (!owns)
+                               CFObject.CFRetain (handle);
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static IntPtr /* SecPolicyRef */ SecPolicyCreateSSL (bool server, IntPtr /* CFStringRef */ hostname);
+
+               static public SecPolicy CreateSslPolicy (bool server, string hostName)
+               {
+                       CFString host = hostName == null ? null : CFString.Create (hostName);
+                       IntPtr handle = host == null ? IntPtr.Zero : host.Handle; 
+                       SecPolicy policy = new SecPolicy (SecPolicyCreateSSL (server, handle), true);
+                       if (host != null)
+                               host.Dispose ();
+                       return policy;
+               }
+
+               ~SecPolicy ()
+               {
+                       Dispose (false);
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               public IntPtr Handle {
+                       get { return handle; }
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (handle != IntPtr.Zero){
+                               CFObject.CFRelease (handle);
+                               handle = IntPtr.Zero;
+                       }
+               }
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/SecureTransport.cs b/mcs/class/System/Mono.AppleTls/SecureTransport.cs
new file mode 100644 (file)
index 0000000..d19d6e4
--- /dev/null
@@ -0,0 +1,251 @@
+#if MONO_FEATURE_APPLETLS
+// Copyright 2014 Xamarin Inc. All rights reserved.
+
+namespace Mono.AppleTls {
+
+       // Security.framework/Headers/SecureTransport.h
+       // untyped enum
+       enum SslProtocol {
+               Unknown = 0,
+               // Ssl_3_0 = 2,
+               Tls_1_0 = 4,
+               Tls_1_1 = 7, 
+               Tls_1_2 = 8, 
+               // Dtls_1_0 = 9,
+               
+               /* Obsolete on iOS */
+               // Ssl_2_0 = 1,          
+               // Ssl_3_0_only = 3,         
+               // Tls_1_0_only = 5,         
+               // All = 6,                
+       }
+
+       // subset of OSStatus (int)
+       enum SslStatus {
+               Success                                 = 0,            // errSecSuccess in SecBase.h
+               Protocol                                = -9800,
+               Negotiation                             = -9801,
+               FatalAlert                              = -9802,
+               WouldBlock                              = -9803,
+               SessionNotFound                         = -9804,
+               ClosedGraceful                          = -9805,
+               ClosedAbort                             = -9806,
+               XCertChainInvalid                       = -9807,
+               BadCert                                 = -9808,
+               Crypto                                  = -9809,
+               Internal                                = -9810,
+               ModuleAttach                            = -9811,
+               UnknownRootCert                         = -9812,
+               NoRootCert                              = -9813,
+               CertExpired                             = -9814,
+               CertNotYetValid                         = -9815,
+               ClosedNotNotified                       = -9816,
+               BufferOverflow                          = -9817,
+               BadCipherSuite                          = -9818,
+               PeerUnexpectedMsg                       = -9819,
+               PeerBadRecordMac                        = -9820,
+               PeerDecryptionFail                      = -9821,
+               PeerRecordOverflow                      = -9822,
+               PeerDecompressFail                      = -9823,
+               PeerHandshakeFail                       = -9824,
+               PeerBadCert                             = -9825,
+               PeerUnsupportedCert                     = -9826,
+               PeerCertRevoked                         = -9827,
+               PeerCertExpired                         = -9828,
+               PeerCertUnknown                         = -9829,
+               IllegalParam                            = -9830,
+               PeerUnknownCA                           = -9831,
+               PeerAccessDenied                        = -9832,
+               PeerDecodeError                         = -9833,
+               PeerDecryptError                        = -9834,
+               PeerExportRestriction                   = -9835,
+               PeerProtocolVersion                     = -9836,
+               PeerInsufficientSecurity                = -9837,
+               PeerInternalError                       = -9838,
+               PeerUserCancelled                       = -9839,
+               PeerNoRenegotiation                     = -9840,
+               PeerAuthCompleted                       = -9841, // non fatal
+               PeerClientCertRequested                 = -9842, // non fatal
+               HostNameMismatch                        = -9843,
+               ConnectionRefused                       = -9844,
+               DecryptionFail                          = -9845,
+               BadRecordMac                            = -9846,
+               RecordOverflow                          = -9847,
+               BadConfiguration                        = -9848,
+               UnexpectedRecord                        = -9849,
+               SSLWeakPeerEphemeralDHKey               = -9850,
+               SSLClientHelloReceived                  = -9851 // non falta
+       }
+
+       // Security.framework/Headers/SecureTransport.h
+       // untyped enum
+       enum SslSessionOption {
+               BreakOnServerAuth,
+               BreakOnCertRequested,
+               BreakOnClientAuth,
+
+               // FalseStart,
+
+               // SendOneByteRecord,
+
+               // AllowServerIdentityChange = 5,
+               
+               // Fallback = 6,
+
+               // BreakOnClientHello = 7,
+
+               // AllowRenegotiation = 8,
+       }
+
+       // Security.framework/Headers/SecureTransport.h
+       // untyped enum
+       enum SslAuthenticate {
+               // Never,
+               // Always,
+               Try = 2,
+       }
+
+       // Security.framework/Headers/SecureTransport.h
+       // untyped enum
+       enum SslProtocolSide {
+               Server,
+               Client,
+       }
+
+       // Security.framework/Headers/SecureTransport.h
+       // untyped enum
+       enum SslConnectionType {
+               Stream,
+               // Datagram
+       }
+
+       // Security.framework/Headers/SecureTransport.h
+       // untyped enum
+       enum SslSessionState {
+               Invalid = -1,
+               // Idle,
+               // Handshake,
+               // Connected,
+               // Closed,
+               // Aborted
+       }
+
+       // Security.framework/Headers/SecureTransport.h
+       // untyped enum
+       enum SslClientCertificateState {
+               None,
+               Requested,
+               Sent,
+               Rejected
+       }
+
+       // Security.framework/Headers/CipherSuite.h
+       // 32 bits (uint32_t) on OSX, 16 bits (uint16_t) on iOS
+#if XAMMAC || XAMMAC_4_5
+       enum SslCipherSuite : uint {
+#else
+       enum SslCipherSuite : ushort {
+#endif
+               // DO NOT RENAME VALUES - they don't look good but we need them to keep compatibility with our System.dll code
+               // it's how it's defined across most SSL/TLS implementation (from RFC)
+
+               SSL_NULL_WITH_NULL_NULL                                         = 0x0000,       // value used before (not after) negotiation
+               TLS_NULL_WITH_NULL_NULL                                         = 0x0000,
+
+               // Not the whole list (too much unneeed metadata) but only what's supported
+               // FIXME needs to be expended with OSX 10.9
+
+               SSL_RSA_WITH_NULL_MD5                                           = 0x0001,
+               SSL_RSA_WITH_NULL_SHA                                           = 0x0002,
+               SSL_RSA_EXPORT_WITH_RC4_40_MD5                          = 0x0003,       // iOS 5.1 only
+               SSL_RSA_WITH_RC4_128_MD5                                        = 0x0004,
+               SSL_RSA_WITH_RC4_128_SHA                                        = 0x0005,
+               SSL_RSA_WITH_3DES_EDE_CBC_SHA                           = 0x000A,
+               SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA                       = 0x0016,
+               SSL_DH_anon_EXPORT_WITH_RC4_40_MD5                      = 0x0017,       // iOS 5.1 only
+               SSL_DH_anon_WITH_RC4_128_MD5                            = 0x0018,
+               SSL_DH_anon_WITH_3DES_EDE_CBC_SHA                       = 0x001B,
+
+               // TLS - identical values to SSL (above)
+
+               TLS_RSA_WITH_NULL_MD5                                           = 0x0001,
+               TLS_RSA_WITH_NULL_SHA                                           = 0x0002,
+               TLS_RSA_WITH_RC4_128_MD5                                        = 0x0004,
+               TLS_RSA_WITH_RC4_128_SHA                                        = 0x0005,
+               TLS_RSA_WITH_3DES_EDE_CBC_SHA                           = 0x000A,
+               TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA                       = 0x0016,
+               TLS_DH_anon_WITH_RC4_128_MD5                            = 0x0018,
+               TLS_DH_anon_WITH_3DES_EDE_CBC_SHA                       = 0x001B,
+
+               // TLS specific
+
+               TLS_PSK_WITH_NULL_SHA                                           = 0x002C,
+               TLS_RSA_WITH_AES_128_CBC_SHA                            = 0x002F,
+               TLS_DHE_RSA_WITH_AES_128_CBC_SHA                        = 0x0033,
+               TLS_DH_anon_WITH_AES_128_CBC_SHA                        = 0x0034,
+               TLS_RSA_WITH_AES_256_CBC_SHA                            = 0x0035,
+               TLS_DHE_RSA_WITH_AES_256_CBC_SHA                        = 0x0039,
+               TLS_DH_anon_WITH_AES_256_CBC_SHA                        = 0x003A,
+               TLS_RSA_WITH_NULL_SHA256                                        = 0x003B,
+               TLS_RSA_WITH_AES_128_CBC_SHA256                         = 0x003C,
+               TLS_RSA_WITH_AES_256_CBC_SHA256                         = 0x003D,
+               TLS_DHE_RSA_WITH_AES_128_CBC_SHA256                     = 0x0067,
+               TLS_DHE_RSA_WITH_AES_256_CBC_SHA256                     = 0x006B,
+               TLS_DH_anon_WITH_AES_128_CBC_SHA256                     = 0x006C,
+               TLS_DH_anon_WITH_AES_256_CBC_SHA256                     = 0x006D,
+               TLS_PSK_WITH_RC4_128_SHA                                        = 0x008A,
+               TLS_PSK_WITH_3DES_EDE_CBC_SHA                           = 0x008B,
+               TLS_PSK_WITH_AES_128_CBC_SHA                            = 0x008C,
+               TLS_PSK_WITH_AES_256_CBC_SHA                            = 0x008D,
+
+               TLS_RSA_WITH_AES_128_GCM_SHA256                         = 0x009C,       // iOS 9+
+               TLS_RSA_WITH_AES_256_GCM_SHA384                         = 0x009D,       // iOS 9+
+               TLS_DHE_RSA_WITH_AES_128_GCM_SHA256                     = 0x009E,       // iOS 9+
+               TLS_DHE_RSA_WITH_AES_256_GCM_SHA384                     = 0x009F,       // iOS 9+
+
+               TLS_DH_anon_WITH_AES_128_GCM_SHA256                     = 0x00A6,       // iOS 5.1 only
+               TLS_DH_anon_WITH_AES_256_GCM_SHA384                     = 0x00A7,       // iOS 5.1 only
+               TLS_PSK_WITH_AES_128_CBC_SHA256                         = 0x00AE,
+               TLS_PSK_WITH_AES_256_CBC_SHA384                         = 0x00AF,
+               TLS_PSK_WITH_NULL_SHA256                                        = 0x00B0,
+               TLS_PSK_WITH_NULL_SHA384                                        = 0x00B1,
+               TLS_ECDH_ECDSA_WITH_NULL_SHA                            = 0xC001,
+               TLS_ECDH_ECDSA_WITH_RC4_128_SHA                         = 0xC002,
+               TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA            = 0xC003,
+               TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA                     = 0xC004,
+               TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA                     = 0xC005,
+               TLS_ECDHE_ECDSA_WITH_NULL_SHA                           = 0xC006,
+               TLS_ECDHE_ECDSA_WITH_RC4_128_SHA                        = 0xC007,
+               TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA           = 0xC008,
+               TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA            = 0xC009,
+               TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA            = 0xC00A,
+               TLS_ECDH_RSA_WITH_NULL_SHA                                      = 0xC00B,
+               TLS_ECDH_RSA_WITH_RC4_128_SHA                           = 0xC00C,
+               TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA                      = 0xC00D,
+               TLS_ECDH_RSA_WITH_AES_128_CBC_SHA                       = 0xC00E,
+               TLS_ECDH_RSA_WITH_AES_256_CBC_SHA                       = 0xC00F,
+               TLS_ECDHE_RSA_WITH_NULL_SHA                                     = 0xC010,
+               TLS_ECDHE_RSA_WITH_RC4_128_SHA                          = 0xC011,
+               TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA                     = 0xC012,
+               TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA                      = 0xC013,
+               TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA                      = 0xC014,
+               TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256         = 0xC023,
+               TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384         = 0xC024,
+               TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256          = 0xC025,
+               TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384          = 0xC026,
+               TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256           = 0xC027,
+               TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384           = 0xC028,
+               TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256            = 0xC029,
+               TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384            = 0xC02A,
+
+               TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256         = 0xC02B,       // iOS 9+
+               TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384         = 0xC02C,       // iOS 9+
+               TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256          = 0xC02D,       // iOS 9+
+               TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384          = 0xC02E,       // iOS 9+
+               TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256           = 0xC02F,       // iOS 9+
+               TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384           = 0xC030,       // iOS 9+
+               TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256            = 0xC031,       // iOS 9+
+               TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384            = 0xC032,       // iOS 9+
+       }
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/SslConnection.cs b/mcs/class/System/Mono.AppleTls/SslConnection.cs
new file mode 100644 (file)
index 0000000..888a777
--- /dev/null
@@ -0,0 +1,18 @@
+#if MONO_FEATURE_APPLETLS
+//
+// SslConnection
+//
+// Authors:
+//     Sebastien Pouliot  <sebastien@xamarin.com>
+//
+// Copyright 2014 Xamarin Inc.
+//
+
+using System;
+
+namespace Mono.AppleTls 
+{
+       delegate SslStatus SslReadFunc (IntPtr connection, IntPtr data, /* size_t* */ ref IntPtr dataLength);
+       delegate SslStatus SslWriteFunc (IntPtr connection, IntPtr data, /* size_t* */ ref IntPtr dataLength);
+}
+#endif
diff --git a/mcs/class/System/Mono.AppleTls/Trust.cs b/mcs/class/System/Mono.AppleTls/Trust.cs
new file mode 100644 (file)
index 0000000..99c2cd8
--- /dev/null
@@ -0,0 +1,186 @@
+#if SECURITY_DEP && MONO_FEATURE_APPLETLS
+// 
+// Trust.cs: Implements the managed SecTrust wrapper.
+//
+// Authors: 
+//     Miguel de Icaza
+//  Sebastien Pouliot  <sebastien@xamarin.com>
+//
+// Copyright 2010 Novell, Inc
+// Copyright 2012-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;
+using System.Runtime.InteropServices;
+using System.Security;
+using System.Security.Cryptography.X509Certificates;
+using ObjCRuntime;
+using Mono.Net;
+
+namespace Mono.AppleTls {
+       partial class SecTrust : INativeObject, IDisposable {
+               IntPtr handle;
+
+               internal SecTrust (IntPtr handle, bool owns = false)
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new Exception ("Invalid handle");
+
+                       this.handle = handle;
+                       if (!owns)
+                               CFObject.CFRetain (handle);
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static SecStatusCode SecTrustCreateWithCertificates (
+                       /* CFTypeRef */            IntPtr certOrCertArray,
+                       /* CFTypeRef __nullable */ IntPtr policies,
+                       /* SecTrustRef *__nonull */ out IntPtr sectrustref);
+               
+
+               public SecTrust (X509CertificateCollection certificates, SecPolicy policy)
+               {
+                       if (certificates == null)
+                               throw new ArgumentNullException ("certificates");
+
+                       SecCertificate[] array = new SecCertificate [certificates.Count];
+                       int i = 0;
+                       foreach (var certificate in certificates)
+                               array [i++] = new SecCertificate (certificate);
+                       Initialize (array, policy);
+               }
+
+               void Initialize (SecCertificate[] array, SecPolicy policy)
+               {
+                       using (var certs = CFArray.CreateArray (array)) {
+                               Initialize (certs.Handle, policy);
+                       }
+               }
+
+               void Initialize (IntPtr certHandle, SecPolicy policy)
+               {
+                       SecStatusCode result = SecTrustCreateWithCertificates (certHandle, policy == null ? IntPtr.Zero : policy.Handle, out handle);
+                       if (result != SecStatusCode.Success)
+                               throw new ArgumentException (result.ToString ());
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static SecStatusCode /* OSStatus */ SecTrustEvaluate (IntPtr /* SecTrustRef */ trust, out /* SecTrustResultType */ SecTrustResult result);
+
+               public SecTrustResult Evaluate ()
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new ObjectDisposedException ("SecTrust");
+
+                       SecTrustResult trust;
+                       SecStatusCode result = SecTrustEvaluate (handle, out trust);
+                       if (result != SecStatusCode.Success)
+                               throw new InvalidOperationException (result.ToString ());
+                       return trust;
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static IntPtr /* CFIndex */ SecTrustGetCertificateCount (IntPtr /* SecTrustRef */ trust);
+
+               public int Count {
+                       get {
+                               if (handle == IntPtr.Zero)
+                                       return 0;
+                               return (int) SecTrustGetCertificateCount (handle);
+                       }
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static IntPtr /* SecCertificateRef */ SecTrustGetCertificateAtIndex (IntPtr /* SecTrustRef */ trust, IntPtr /* CFIndex */ ix);
+
+               public SecCertificate this [IntPtr index] {
+                       get {
+                               if (handle == IntPtr.Zero)
+                                       throw new ObjectDisposedException ("SecTrust");
+                               if (((long)index < 0) || ((long)index >= Count))
+                                       throw new ArgumentOutOfRangeException ("index");
+
+                               return new SecCertificate (SecTrustGetCertificateAtIndex (handle, index));
+                       }
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static SecStatusCode /* OSStatus */ SecTrustSetAnchorCertificates (IntPtr /* SecTrustRef */ trust, IntPtr /* CFArrayRef */ anchorCertificates);
+
+               public SecStatusCode SetAnchorCertificates (X509CertificateCollection certificates)
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new ObjectDisposedException ("SecTrust");
+                       if (certificates == null)
+                               return SecTrustSetAnchorCertificates (handle, IntPtr.Zero);
+
+                       SecCertificate[] array = new SecCertificate [certificates.Count];
+                       int i = 0;
+                       foreach (var certificate in certificates)
+                               array [i++] = new SecCertificate (certificate);
+                       return SetAnchorCertificates (array);
+               }
+
+               public SecStatusCode SetAnchorCertificates (SecCertificate[] array)
+               {
+                       if (array == null)
+                               return SecTrustSetAnchorCertificates (handle, IntPtr.Zero);
+                       using (var certs = CFArray.FromNativeObjects (array)) {
+                               return SecTrustSetAnchorCertificates (handle, certs.Handle);
+                       }
+               }
+
+               [DllImport (AppleTlsContext.SecurityLibrary)]
+               extern static SecStatusCode /* OSStatus */ SecTrustSetAnchorCertificatesOnly (IntPtr /* SecTrustRef */ trust, bool anchorCertificatesOnly);
+
+               public SecStatusCode SetAnchorCertificatesOnly (bool anchorCertificatesOnly)
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new ObjectDisposedException ("SecTrust");
+
+                       return SecTrustSetAnchorCertificatesOnly (handle, anchorCertificatesOnly);
+               }
+
+               ~SecTrust ()
+               {
+                       Dispose (false);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (handle != IntPtr.Zero) {
+                               CFObject.CFRelease (handle);
+                               handle = IntPtr.Zero;
+                       }
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               public IntPtr Handle {
+                       get { return handle; }
+               }
+       }
+}
+#endif
index 787de7577576d4223f934e12790662f37f35d143..bf326e51721db3f50c23396d1fd91bcd3d36f7df 100644 (file)
-// Copyright 2015 Xamarin Inc. All rights reserved.
+//
+// MonoTlsProviderFactory.cs
+//
+// Author:
+//      Chris Hamons  <chris.hamons@xamarin.com>
+//       Martin Baulig <martin.baulig@xamarin.com>
+//
+// Copyright (c) 2015 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.
+
+#if !ONLY_APPLETLS
+#error Use MonoTlsProviderFactory.cs instead
+#endif
+
 #if SECURITY_DEP
 
 #if MONO_SECURITY_ALIAS
 extern alias MonoSecurity;
 using MSI = MonoSecurity::Mono.Security.Interface;
+using MX = MonoSecurity::Mono.Security.X509;
 #else
 using MSI = Mono.Security.Interface;
+using MX = Mono.Security.X509;
 #endif
+using System.Security.Cryptography.X509Certificates;
+using Mono.AppleTls;
+
+#endif
+
+using System;
+using System.Net;
+using System.Collections.Generic;
+using System.Runtime.CompilerServices;
 
 namespace Mono.Net.Security
 {
+       /*
+        * Keep in sync with Mono.Security/Mono.Security.Interface/MonoTlsProvider.cs.
+        * Simple implementation that does hard codes only a single provider
+        */
        static partial class MonoTlsProviderFactory
        {
-               static MSI.MonoTlsProvider CreateDefaultProviderImpl ()
+               #region Internal API
+
+               /*
+                * APIs in this section are for consumption within System.dll only - do not access via
+                * reflection or from friend assemblies.
+                * 
+                * @IMonoTlsProvider is defined as empty interface outside 'SECURITY_DEP', so we don't need
+                * this conditional here.
+                */
+
+               internal static IMonoTlsProvider GetProviderInternal ()
+               {
+#if SECURITY_DEP
+                       return GetTlsProvider ();
+#else
+                       throw new NotSupportedException ("TLS Support not available.");
+#endif
+               }
+               
+               #endregion
+
+#if SECURITY_DEP
+               static object locker = new object ();
+               static IMonoTlsProvider provider;
+               static IMonoTlsProvider GetTlsProvider ()
                {
-                       MSI.MonoTlsProvider provider = null;
-                       if (MSI.MonoTlsProviderFactory._PrivateFactoryDelegate != null)
-                               provider = MSI.MonoTlsProviderFactory._PrivateFactoryDelegate ();
-                       return provider;
+                       lock (locker) {
+                               if (provider == null)
+                                       provider = new Private.MonoTlsProviderWrapper (new AppleTlsProvider ());
+                               return provider;
+                       }
                }
+
+
+               #region Mono.Security visible API
+
+               /*
+                * "Public" section, intended to be consumed via reflection.
+                * 
+                * Mono.Security.dll provides a public wrapper around these.
+                */
+
+               internal static MSI.MonoTlsProvider GetProvider ()
+               {
+                       return GetTlsProvider ().Provider;
+               }
+
+               internal static bool IsProviderSupported (string name)
+               {
+                       return true;
+               }
+
+               internal static MSI.MonoTlsProvider GetProvider (string name)
+               {
+                       return GetTlsProvider ().Provider;
+               }
+
+               internal static bool IsInitialized => true;
+
+               internal static void Initialize ()
+               {
+               }
+
+               internal static void Initialize (string provider)
+               {
+               }
+
+               internal static HttpWebRequest CreateHttpsRequest (Uri requestUri, MSI.MonoTlsProvider provider, MSI.MonoTlsSettings settings)
+               {
+                       lock (locker) {
+                               var internalProvider = provider != null ? new Private.MonoTlsProviderWrapper (provider) : null;
+                               return new HttpWebRequest (requestUri, internalProvider, settings);
+                       }
+               }
+
+               internal static HttpListener CreateHttpListener (X509Certificate certificate, MSI.MonoTlsProvider provider, MSI.MonoTlsSettings settings)
+               {
+                       lock (locker) {
+                               var internalProvider = provider != null ? new Private.MonoTlsProviderWrapper (provider) : null;
+                               return new HttpListener (certificate, internalProvider, settings);
+                       }
+               }
+               #endregion
+#endif
        }
 }
-#endif
+
index 0f25e003c7ebf0816f8f3e4013d1d51fb9eb7859..75138d8c715cf3d98741fd11398d41e1956a8f32 100644 (file)
@@ -24,6 +24,8 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#if !ONLY_APPLETLS // ONLY_APPLETLS uses MonoTlsProviderFactory.Apple.cs instead 
+
 #if SECURITY_DEP
 #if MONO_SECURITY_ALIAS
 extern alias MonoSecurity;
@@ -160,9 +162,17 @@ namespace Mono.Net.Security
                                        return;
                                providerRegistration = new Dictionary<string,string> ();
                                providerRegistration.Add ("legacy", "Mono.Net.Security.LegacyTlsProvider");
-                               providerRegistration.Add ("default", "Mono.Net.Security.LegacyTlsProvider");
+                       
+                               if (Platform.IsMacOS)
+                                       providerRegistration.Add ("default", "Mono.AppleTls.AppleTlsProvider");
+                               else
+                                       providerRegistration.Add ("default", "Mono.Net.Security.LegacyTlsProvider");
+
                                if (IsBtlsSupported ())
                                        providerRegistration.Add ("btls", "Mono.Btls.MonoBtlsProvider");
+                       
+                               providerRegistration.Add ("apple", "Mono.AppleTls.AppleTlsProvider");
+                               
                                X509Helper2.Initialize ();
                        }
                }
@@ -261,4 +271,4 @@ namespace Mono.Net.Security
 
        }
 }
-
+#endif
diff --git a/mcs/class/System/MonoTouch/Dummy.cs b/mcs/class/System/MonoTouch/Dummy.cs
new file mode 100644 (file)
index 0000000..f195a77
--- /dev/null
@@ -0,0 +1,16 @@
+#if MONOTOUCH
+
+namespace MonoTouch
+{
+       // Exists only not to break existing source code due to broken C# namespace rules
+       // which allow using for empty namespace
+       sealed class Dummy
+       {
+               private Dummy ()
+               {
+
+               }
+       }
+}
+
+#endif
index 7dd5a83d0fd4325bb0ba0639641f22c36699fc24..0b1baaa7af7b8a8f3c1fb15b9531bc2160c57e96 100644 (file)
@@ -29,7 +29,7 @@
     <DebugType>full</DebugType>\r
     <NoWarn>1699,436</NoWarn>\r
     <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_BTLS</DefineConstants>\r
+    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_APPLETLS;MONO_FEATURE_BTLS</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
@@ -37,7 +37,7 @@
     <DebugType>pdbonly</DebugType>\r
     <NoWarn>1699,436</NoWarn>\r
     <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_BTLS</DefineConstants>\r
+    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_APPLETLS;MONO_FEATURE_BTLS</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
     <Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\GZipStream.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\CodeDom\Compiler\IndentedTextWriter.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Runtime\src\System\Collections\Generic\ISet.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\OpenFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\StoreLocation.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\StoreName.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X500DistinguishedNameFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509ChainStatusFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509FindType.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509IncludeOption.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509KeyUsageFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509NameType.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509RevocationFlag.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509RevocationMode.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierHashAlgorithm.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509VerificationFlags.cs" />\r
     <Compile Include="..\..\build\common\SR.cs" />\r
     <Compile Include="..\referencesource\System\compmod\microsoft\win32\safehandles\SafeProcessHandle.cs" />\r
     <Compile Include="..\referencesource\System\compmod\system\codedom\compiler\GeneratedCodeAttribute.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangedEventHandler.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangingEventArgs.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangingEventHandler.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleCertificateHelper.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsContext.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsProvider.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsStream.cs" />\r
+    <Compile Include="Mono.AppleTls\Certificate.cs" />\r
+    <Compile Include="Mono.AppleTls\Enums.cs" />\r
+    <Compile Include="Mono.AppleTls\ImportExport.cs" />\r
+    <Compile Include="Mono.AppleTls\INativeObject.cs" />\r
+    <Compile Include="Mono.AppleTls\Items.cs" />\r
+    <Compile Include="Mono.AppleTls\Policy.cs" />\r
+    <Compile Include="Mono.AppleTls\SecureTransport.cs" />\r
+    <Compile Include="Mono.AppleTls\SslConnection.cs" />\r
+    <Compile Include="Mono.AppleTls\Trust.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsBio.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsContext.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsError.cs" />\r
     <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />\r
     <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />\r
     <Compile Include="Mono.Util\MonoPInvokeCallbackAttribute.cs" />\r
+    <Compile Include="MonoTouch\Dummy.cs" />\r
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\AutoWebProxyScriptEngine.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="System.Security.Authentication\HashAlgorithmType.cs" />\r
     <Compile Include="System.Security.Authentication\InvalidCredentialException.cs" />\r
     <Compile Include="System.Security.Authentication\SslProtocols.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\OpenFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\OSX509Certificates.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\PublicKey.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\StoreLocation.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\StoreName.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X500DistinguishedName.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X500DistinguishedNameFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509BasicConstraintsExtension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate2.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate2Collection.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainImplMono.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainPolicy.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainStatus.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainStatusFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509EnhancedKeyUsageExtension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Extension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ExtensionCollection.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ExtensionEnumerator.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509FindType.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Helper2.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509IncludeOption.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509KeyUsageExtension.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509KeyUsageFlags.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509NameType.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509RevocationFlag.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509RevocationMode.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Store.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509SubjectKeyIdentifierExtension.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509SubjectKeyIdentifierHashAlgorithm.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509VerificationFlags.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedData.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedDataCollection.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedDataEnumerator.cs" />\r
index edf92db6572ae2ccdf81cc6f98b3763b93ee598c..50577efc812c8c3943098149dc34bfa16b9bbfb4 100644 (file)
@@ -29,7 +29,7 @@
     <DebugType>full</DebugType>\r
     <NoWarn>1699,436</NoWarn>\r
     <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
+    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_APPLETLS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
@@ -37,7 +37,7 @@
     <DebugType>pdbonly</DebugType>\r
     <NoWarn>1699,436</NoWarn>\r
     <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
+    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_APPLETLS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS;CONFIGURATION_DEP</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
     <Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\GZipStream.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\CodeDom\Compiler\IndentedTextWriter.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Runtime\src\System\Collections\Generic\ISet.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\OpenFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\StoreLocation.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\StoreName.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X500DistinguishedNameFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509ChainStatusFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509FindType.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509IncludeOption.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509KeyUsageFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509NameType.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509RevocationFlag.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509RevocationMode.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierHashAlgorithm.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509VerificationFlags.cs" />\r
     <Compile Include="..\..\build\common\SR.cs" />\r
     <Compile Include="..\referencesource\System\compmod\microsoft\win32\safehandles\SafeProcessHandle.cs" />\r
     <Compile Include="..\referencesource\System\compmod\system\codedom\compiler\GeneratedCodeAttribute.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangedEventHandler.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangingEventArgs.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangingEventHandler.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleCertificateHelper.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsContext.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsProvider.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsStream.cs" />\r
+    <Compile Include="Mono.AppleTls\Certificate.cs" />\r
+    <Compile Include="Mono.AppleTls\Enums.cs" />\r
+    <Compile Include="Mono.AppleTls\ImportExport.cs" />\r
+    <Compile Include="Mono.AppleTls\INativeObject.cs" />\r
+    <Compile Include="Mono.AppleTls\Items.cs" />\r
+    <Compile Include="Mono.AppleTls\Policy.cs" />\r
+    <Compile Include="Mono.AppleTls\SecureTransport.cs" />\r
+    <Compile Include="Mono.AppleTls\SslConnection.cs" />\r
+    <Compile Include="Mono.AppleTls\Trust.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsBio.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsContext.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsError.cs" />\r
     <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />\r
     <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />\r
     <Compile Include="Mono.Util\MonoPInvokeCallbackAttribute.cs" />\r
+    <Compile Include="MonoTouch\Dummy.cs" />\r
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\AutoWebProxyScriptEngine.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="System.Security.Authentication\HashAlgorithmType.cs" />\r
     <Compile Include="System.Security.Authentication\InvalidCredentialException.cs" />\r
     <Compile Include="System.Security.Authentication\SslProtocols.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\OpenFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\OSX509Certificates.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\PublicKey.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\StoreLocation.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\StoreName.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X500DistinguishedName.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X500DistinguishedNameFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509BasicConstraintsExtension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate2.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate2Collection.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainImplMono.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainPolicy.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainStatus.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainStatusFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509EnhancedKeyUsageExtension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Extension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ExtensionCollection.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ExtensionEnumerator.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509FindType.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Helper2.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509IncludeOption.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509KeyUsageExtension.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509KeyUsageFlags.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509NameType.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509RevocationFlag.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509RevocationMode.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Store.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509SubjectKeyIdentifierExtension.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509SubjectKeyIdentifierHashAlgorithm.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509VerificationFlags.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedData.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedDataCollection.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedDataEnumerator.cs" />\r
index eca6f313214232790709a2f230a257ae159abb0e..ddaafd283905def3aa06f11aeee924e8e7a7aaf2 100644 (file)
@@ -29,7 +29,7 @@
     <DebugType>full</DebugType>\r
     <NoWarn>1699,436</NoWarn>\r
     <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
+    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_APPLETLS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
@@ -37,7 +37,7 @@
     <DebugType>pdbonly</DebugType>\r
     <NoWarn>1699,436</NoWarn>\r
     <Optimize>true</Optimize>\r
-    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
+    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;CONFIGURATION_2_0;FEATURE_PAL;SYSTEM_NAMESPACE;MONO;PLATFORM_UNIX;MONO_FEATURE_PROCESS_START;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;CODEDOM;MONO_FEATURE_APPLETLS;MONO_FEATURE_BTLS;SECURITY_DEP;XML_DEP;MONO_SECURITY_ALIAS</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
     <Compile Include="..\..\..\external\corefx\src\System.IO.Compression\src\System\IO\Compression\GZipStream.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Runtime.Extensions\src\System\CodeDom\Compiler\IndentedTextWriter.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Runtime\src\System\Collections\Generic\ISet.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\OpenFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\StoreLocation.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\StoreName.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X500DistinguishedNameFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509ChainStatusFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509FindType.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509IncludeOption.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509KeyUsageFlags.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509NameType.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509RevocationFlag.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509RevocationMode.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509SubjectKeyIdentifierHashAlgorithm.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509VerificationFlags.cs" />\r
     <Compile Include="..\..\build\common\SR.cs" />\r
     <Compile Include="..\referencesource\System\compmod\microsoft\win32\safehandles\SafeProcessHandle.cs" />\r
     <Compile Include="..\referencesource\System\compmod\system\codedom\compiler\GeneratedCodeAttribute.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangedEventHandler.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangingEventArgs.cs" />\r
     <Compile Include="Microsoft.Win32\UserPreferenceChangingEventHandler.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleCertificateHelper.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsContext.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsProvider.cs" />\r
+    <Compile Include="Mono.AppleTls\AppleTlsStream.cs" />\r
+    <Compile Include="Mono.AppleTls\Certificate.cs" />\r
+    <Compile Include="Mono.AppleTls\Enums.cs" />\r
+    <Compile Include="Mono.AppleTls\ImportExport.cs" />\r
+    <Compile Include="Mono.AppleTls\INativeObject.cs" />\r
+    <Compile Include="Mono.AppleTls\Items.cs" />\r
+    <Compile Include="Mono.AppleTls\Policy.cs" />\r
+    <Compile Include="Mono.AppleTls\SecureTransport.cs" />\r
+    <Compile Include="Mono.AppleTls\SslConnection.cs" />\r
+    <Compile Include="Mono.AppleTls\Trust.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsBio.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsContext.cs" />\r
     <Compile Include="Mono.Btls\MonoBtlsError.cs" />\r
     <Compile Include="Mono.Net.Security\NoReflectionHelper.cs" />\r
     <Compile Include="Mono.Net.Security\SystemCertificateValidator.cs" />\r
     <Compile Include="Mono.Util\MonoPInvokeCallbackAttribute.cs" />\r
+    <Compile Include="MonoTouch\Dummy.cs" />\r
     <Compile Include="ReferenceSources\AssertWrapper.cs" />\r
     <Compile Include="ReferenceSources\AutoWebProxyScriptEngine.cs" />\r
     <Compile Include="ReferenceSources\BinaryCompatibility.cs" />\r
     <Compile Include="System.Security.Authentication\HashAlgorithmType.cs" />\r
     <Compile Include="System.Security.Authentication\InvalidCredentialException.cs" />\r
     <Compile Include="System.Security.Authentication\SslProtocols.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\OpenFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\OSX509Certificates.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\PublicKey.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\StoreLocation.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\StoreName.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X500DistinguishedName.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X500DistinguishedNameFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509BasicConstraintsExtension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate2.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate2Collection.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainImplMono.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainPolicy.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainStatus.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509ChainStatusFlags.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509EnhancedKeyUsageExtension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Extension.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ExtensionCollection.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509ExtensionEnumerator.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509FindType.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Helper2.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509IncludeOption.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509KeyUsageExtension.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509KeyUsageFlags.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509NameType.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509RevocationFlag.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509RevocationMode.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Store.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509SubjectKeyIdentifierExtension.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509SubjectKeyIdentifierHashAlgorithm.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509VerificationFlags.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedData.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedDataCollection.cs" />\r
     <Compile Include="System.Security.Cryptography\AsnEncodedDataEnumerator.cs" />\r
index c6ec61f1af60067e9072385ad0d2f13720d2f9a7..8f66d022a818cdec9e05741f0ccac99c72bb67c5 100644 (file)
@@ -63,9 +63,9 @@ namespace System.Configuration
                        return new ConfigXmlCDataSection (this, data);
                }
 
-               public override XmlComment CreateComment (string comment)
+               public override XmlComment CreateComment (string data)
                {
-                       return new ConfigXmlComment (this, comment);
+                       return new ConfigXmlComment (this, data);
                }
 
                public override XmlElement CreateElement (string prefix, string localName, string namespaceUri)
index 2a711689493251c6ee6350c3534782e8a33a9db8..b4ea085301ebba81ecbd8cbdeb79277bc4e6031c 100644 (file)
@@ -93,9 +93,9 @@ namespace System.Configuration
                        get { return properties; }
                }
 
-               public override bool Equals (object o)
+               public override bool Equals (object settings)
                {
-                       SettingElement e = o as SettingElement;
+                       SettingElement e = settings as SettingElement;
                        if (e == null)
                                return false;
 
index b47afa3cc43f35d3610ec697aa5eaa598487d202..e8a20f502a2875f1648d9248c31de07ac4355990 100644 (file)
@@ -35,9 +35,9 @@ namespace System.Configuration
        {
                SpecialSetting setting;
 
-               public SpecialSettingAttribute (SpecialSetting setting)
+               public SpecialSettingAttribute (SpecialSetting specialSetting)
                {
-                       this.setting = setting;
+                       this.setting = specialSetting;
                }
 
                public SpecialSetting SpecialSetting {
index 64ecf29d541ebf3f43b2b10cfaba008506762b37..82132de9959fbde07ed4c9a0be92d50b2969620a 100644 (file)
@@ -125,34 +125,34 @@ namespace System.Diagnostics {
                        return CounterSampleCalculator.ComputeCounterValue (counterSample, nextCounterSample);
                }
 
-               public override bool Equals (object obj)
+               public override bool Equals (object o)
                {
-                       if (!(obj is CounterSample))
+                       if (!(o is CounterSample))
                                return false;
-                       return Equals ((CounterSample) obj);
+                       return Equals ((CounterSample) o);
                }
 
-               public bool Equals (CounterSample other)
+               public bool Equals (CounterSample sample)
                {
                        return
-                               rawValue == other.rawValue &&
-                               baseValue == other.counterFrequency &&
-                               counterFrequency == other.counterFrequency &&
-                               systemFrequency == other.systemFrequency &&
-                               timeStamp == other.timeStamp &&
-                               timeStamp100nSec == other.timeStamp100nSec &&
-                               counterTimeStamp == other.counterTimeStamp &&
-                               counterType == other.counterType;
+                               rawValue == sample.rawValue &&
+                               baseValue == sample.counterFrequency &&
+                               counterFrequency == sample.counterFrequency &&
+                               systemFrequency == sample.systemFrequency &&
+                               timeStamp == sample.timeStamp &&
+                               timeStamp100nSec == sample.timeStamp100nSec &&
+                               counterTimeStamp == sample.counterTimeStamp &&
+                               counterType == sample.counterType;
                }
 
-               public static bool operator == (CounterSample obj1, CounterSample obj2)
+               public static bool operator == (CounterSample a, CounterSample b)
                {
-                       return obj1.Equals (obj2);
+                       return a.Equals (b);
                }
 
-               public static bool operator != (CounterSample obj1, CounterSample obj2)
+               public static bool operator != (CounterSample a, CounterSample b)
                {
-                       return !obj1.Equals (obj2);
+                       return !a.Equals (b);
                }
 
                public override int GetHashCode ()
index c79752dffe720b925de59c7ac6659d7885ba72db..70cb0df4fcdb5f049e7b1d9f8749f71db0f2e053 100644 (file)
@@ -60,10 +60,10 @@ namespace System.Diagnostics {
                        get { return this; }
                }
 
-               public void CopyTo (EventLogEntry[] eventLogEntries, int index)
+               public void CopyTo (EventLogEntry[] entries, int index)
                {
-                       EventLogEntry[] entries = _impl.GetEntries ();
-                       Array.Copy (entries, 0, eventLogEntries, index, entries.Length);
+                       EventLogEntry[] evLogEntries = _impl.GetEntries ();
+                       Array.Copy (evLogEntries, 0, entries, index, evLogEntries.Length);
                }
 
                public IEnumerator GetEnumerator ()
index d7eeb0469776cd84328dcb5235459ed9402a68f6..46dad17505ba9fba58a28e08d303f562ff2212bf 100644 (file)
@@ -95,11 +95,11 @@ namespace System.Diagnostics
 
                [ComVisible (false)]
                public override void TraceData (TraceEventCache eventCache,
-                                               string source, TraceEventType eventType,
+                                               string source, TraceEventType severity,
                                                int id, object data)
                {
                        EventLogEntryType type;
-                       switch (eventType) {
+                       switch (severity) {
                        case TraceEventType.Critical:
                        case TraceEventType.Error:
                                type = EventLogEntryType.Error;
@@ -116,7 +116,7 @@ namespace System.Diagnostics
 
                [ComVisible (false)]
                public override void TraceData (TraceEventCache eventCache,
-                                               string source, TraceEventType eventType,
+                                               string source, TraceEventType severity,
                                                int id, params object [] data)
                {
                        string s = String.Empty;
@@ -126,23 +126,23 @@ namespace System.Diagnostics
                                        arr [i] = data [i] != null ? data [i].ToString () : String.Empty;
                                s = String.Join (", ", arr);
                        }
-                       TraceData (eventCache, source, eventType, id, s);
+                       TraceData (eventCache, source, severity, id, s);
                }
 
                [ComVisible (false)]
                public override void TraceEvent (TraceEventCache eventCache,
-                                                string source, TraceEventType eventType,
+                                                string source, TraceEventType severity,
                                                 int id, string message)
                {
-                       TraceData (eventCache, source, eventType, id, message);
+                       TraceData (eventCache, source, severity, id, message);
                }
 
                [ComVisible (false)]
                public override void TraceEvent (TraceEventCache eventCache,
-                                                string source, TraceEventType eventType,
+                                                string source, TraceEventType severity,
                                                 int id, string format, params object [] args)
                {
-                       TraceEvent (eventCache, source, eventType, id, format != null ? String.Format (format, args) : null);
+                       TraceEvent (eventCache, source, severity, id, format != null ? String.Format (format, args) : null);
                }
        }
 }
index 9b3fdf9dc5e26a631378240e3aba9405896f8dbd..59544083c38a96a0a74dbbf4769910302b163f83 100644 (file)
@@ -849,13 +849,13 @@ namespace System.Diagnostics
                }
 
                [Obsolete ("Process.Start is not supported on the current platform.", true)]
-               public static Process Start(string fileName, string username, SecureString password, string domain)
+               public static Process Start(string fileName, string userName, SecureString password, string domain)
                {
                        throw new PlatformNotSupportedException ("Process.Start is not supported on the current platform.");
                }
 
                [Obsolete ("Process.Start is not supported on the current platform.", true)]
-               public static Process Start(string fileName, string arguments, string username, SecureString password, string domain)
+               public static Process Start(string fileName, string arguments, string userName, SecureString password, string domain)
                {
                        throw new PlatformNotSupportedException ("Process.Start is not supported on the current platform.");
                }
index 4c41dbdf2e7ea58c0f6de168032ba6525427280f..9d8dd61eb2415641247d742c0cc3f77c7130ed3f 100644 (file)
@@ -193,8 +193,8 @@ namespace System.IO.Compression
                        }
                }
 
-               public override IAsyncResult BeginRead (byte [] buffer, int offset, int count,
-                                                       AsyncCallback cback, object state)
+               public override IAsyncResult BeginRead (byte [] array, int offset, int count,
+                                                       AsyncCallback asyncCallback, object asyncState)
                {
                        if (disposed)
                                throw new ObjectDisposedException (GetType ().FullName);
@@ -202,8 +202,8 @@ namespace System.IO.Compression
                        if (!CanRead)
                                throw new NotSupportedException ("This stream does not support reading");
 
-                       if (buffer == null)
-                               throw new ArgumentNullException ("buffer");
+                       if (array == null)
+                               throw new ArgumentNullException ("array");
 
                        if (count < 0)
                                throw new ArgumentOutOfRangeException ("count", "Must be >= 0");
@@ -211,15 +211,15 @@ namespace System.IO.Compression
                        if (offset < 0)
                                throw new ArgumentOutOfRangeException ("offset", "Must be >= 0");
 
-                       if (count + offset > buffer.Length)
+                       if (count + offset > array.Length)
                                throw new ArgumentException ("Buffer too small. count/offset wrong.");
 
                        ReadMethod r = new ReadMethod (ReadInternal);
-                       return r.BeginInvoke (buffer, offset, count, cback, state);
+                       return r.BeginInvoke (array, offset, count, asyncCallback, asyncState);
                }
 
-               public override IAsyncResult BeginWrite (byte [] buffer, int offset, int count,
-                                                       AsyncCallback cback, object state)
+               public override IAsyncResult BeginWrite (byte [] array, int offset, int count,
+                                                       AsyncCallback asyncCallback, object asyncState)
                {
                        if (disposed)
                                throw new ObjectDisposedException (GetType ().FullName);
@@ -227,8 +227,8 @@ namespace System.IO.Compression
                        if (!CanWrite)
                                throw new InvalidOperationException ("This stream does not support writing");
 
-                       if (buffer == null)
-                               throw new ArgumentNullException ("buffer");
+                       if (array == null)
+                               throw new ArgumentNullException ("array");
 
                        if (count < 0)
                                throw new ArgumentOutOfRangeException ("count", "Must be >= 0");
@@ -236,43 +236,43 @@ namespace System.IO.Compression
                        if (offset < 0)
                                throw new ArgumentOutOfRangeException ("offset", "Must be >= 0");
 
-                       if (count + offset > buffer.Length)
+                       if (count + offset > array.Length)
                                throw new ArgumentException ("Buffer too small. count/offset wrong.");
 
                        WriteMethod w = new WriteMethod (WriteInternal);
-                       return w.BeginInvoke (buffer, offset, count, cback, state);                     
+                       return w.BeginInvoke (array, offset, count, asyncCallback, asyncState);                 
                }
 
-               public override int EndRead(IAsyncResult async_result)
+               public override int EndRead(IAsyncResult asyncResult)
                {
-                       if (async_result == null)
-                               throw new ArgumentNullException ("async_result");
+                       if (asyncResult == null)
+                               throw new ArgumentNullException ("asyncResult");
 
-                       AsyncResult ares = async_result as AsyncResult;
+                       AsyncResult ares = asyncResult as AsyncResult;
                        if (ares == null)
-                               throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+                               throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
 
                        ReadMethod r = ares.AsyncDelegate as ReadMethod;
                        if (r == null)
-                               throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+                               throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
 
-                       return r.EndInvoke (async_result);
+                       return r.EndInvoke (asyncResult);
                }
 
-               public override void EndWrite (IAsyncResult async_result)
+               public override void EndWrite (IAsyncResult asyncResult)
                {
-                       if (async_result == null)
-                               throw new ArgumentNullException ("async_result");
+                       if (asyncResult == null)
+                               throw new ArgumentNullException ("asyncResult");
 
-                       AsyncResult ares = async_result as AsyncResult;
+                       AsyncResult ares = asyncResult as AsyncResult;
                        if (ares == null)
-                               throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+                               throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
 
                        WriteMethod w = ares.AsyncDelegate as WriteMethod;
                        if (w == null)
-                               throw new ArgumentException ("Invalid IAsyncResult", "async_result");
+                               throw new ArgumentException ("Invalid IAsyncResult", "asyncResult");
 
-                       w.EndInvoke (async_result);
+                       w.EndInvoke (asyncResult);
                        return;
                }
 
index 65189c5813f986b05aeac8d71d7bdbd7ed6f5c8a..5fb9d624e855f31c9fcc5cebe307c36b4ad42202 100644 (file)
@@ -696,13 +696,13 @@ namespace System.IO.Ports
                        return encoding.GetString (seen.ToArray ());
                }
 
-               public void Write (string str)
+               public void Write (string text)
                {
                        CheckOpen ();
-                       if (str == null)
-                               throw new ArgumentNullException ("str");
+                       if (text == null)
+                               throw new ArgumentNullException ("text");
                        
-                       byte [] buffer = encoding.GetBytes (str);
+                       byte [] buffer = encoding.GetBytes (text);
                        Write (buffer, 0, buffer.Length);
                }
 
@@ -739,9 +739,9 @@ namespace System.IO.Ports
                        stream.Write (bytes, 0, bytes.Length);
                }
 
-               public void WriteLine (string str)
+               public void WriteLine (string text)
                {
-                       Write (str + new_line);
+                       Write (text + new_line);
                }
 
                void CheckOpen ()
index 2a84e67de361acc803f459bb1f975057bce62f72..df85b0f97c76379d3b012df5f52f7c7d1986faca 100644 (file)
@@ -111,16 +111,16 @@ namespace System.Net.Mail {
                        return av;
                }
 
-               public static AlternateView CreateAlternateViewFromString (string content, Encoding encoding, string mediaType)
+               public static AlternateView CreateAlternateViewFromString (string content, Encoding contentEncoding, string mediaType)
                {
                        if (content == null)
                                throw new ArgumentNullException ("content");
-                       if (encoding == null)
-                               encoding = Encoding.UTF8;
-                       MemoryStream ms = new MemoryStream (encoding.GetBytes (content));
+                       if (contentEncoding == null)
+                               contentEncoding = Encoding.UTF8;
+                       MemoryStream ms = new MemoryStream (contentEncoding.GetBytes (content));
                        ContentType ct = new ContentType ();
                        ct.MediaType = mediaType;
-                       ct.CharSet = encoding.HeaderName;
+                       ct.CharSet = contentEncoding.HeaderName;
                        AlternateView av = new AlternateView (ms, ct);
                        av.TransferEncoding = TransferEncoding.QuotedPrintable;
                        return av;
index 5ffaf6b4bd110ee2dac9486133082dba434a1783..ff342b3cd0f1746e4932a332923b67a016d945d0 100644 (file)
@@ -143,12 +143,12 @@ namespace System.Net.Mail {
 
 #region Methods
                
-               public override bool Equals (object obj)
+               public override bool Equals (object value)
                {
-                       if (obj == null)
+                       if (value == null)
                                return false;
 
-                       return (0 == String.Compare (ToString (), obj.ToString (), StringComparison.OrdinalIgnoreCase));
+                       return (0 == String.Compare (ToString (), value.ToString (), StringComparison.OrdinalIgnoreCase));
                }
 
                public override int GetHashCode ()
index ca658c23d752345e3bbd9f5e7f6fa6434ae1f7ca..19197681a7ed5caad5500a133ca6bfca22560474 100644 (file)
@@ -742,9 +742,9 @@ namespace System.Net.Mail {
                        }
                }
 
-               public void Send (string from, string to, string subject, string body)
+               public void Send (string from, string recipients, string subject, string body)
                {
-                       Send (new MailMessage (from, to, subject, body));
+                       Send (new MailMessage (from, recipients, subject, body));
                }
 
                public Task SendMailAsync (MailMessage message)
@@ -836,9 +836,9 @@ namespace System.Net.Mail {
                        worker.RunWorkerAsync (userToken);
                }
 
-               public void SendAsync (string from, string to, string subject, string body, object userToken)
+               public void SendAsync (string from, string recipients, string subject, string body, object userToken)
                {
-                       SendAsync (new MailMessage (from, to, subject, body), userToken);
+                       SendAsync (new MailMessage (from, recipients, subject, body), userToken);
                }
 
                public void SendAsyncCancel ()
index ceda2dd7b9caa132f07aaf9b3bf42742366c10b1..7dc3e94bc0a74829635a7144e1330ed530895370 100644 (file)
@@ -57,14 +57,14 @@ namespace System.Net.Mail {
                {
                }
 
-               protected SmtpException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
+               protected SmtpException (SerializationInfo serializationInfo, StreamingContext streamingContext)
+                       : base (serializationInfo, streamingContext)
                {
                        try {
-                               statusCode = (SmtpStatusCode) info.GetValue ("Status", typeof (int));
+                               statusCode = (SmtpStatusCode) serializationInfo.GetValue ("Status", typeof (int));
                        } catch (SerializationException) {
                                //For compliance with previously serialized version:
-                               statusCode = (SmtpStatusCode) info.GetValue ("statusCode", typeof (SmtpStatusCode));
+                               statusCode = (SmtpStatusCode) serializationInfo.GetValue ("statusCode", typeof (SmtpStatusCode));
                        }
                }
 
@@ -91,12 +91,12 @@ namespace System.Net.Mail {
 
                #endregion // Properties
 
-               public override void GetObjectData (SerializationInfo info, StreamingContext context)
+               public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
                {
-                       if (info == null)
-                               throw new ArgumentNullException ("info");
-                       base.GetObjectData (info, context);
-                       info.AddValue ("Status", statusCode, typeof (int));
+                       if (serializationInfo == null)
+                               throw new ArgumentNullException ("serializationInfo");
+                       base.GetObjectData (serializationInfo, streamingContext);
+                       serializationInfo.AddValue ("Status", statusCode, typeof (int));
                }
                void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
                {
index c4dbe9c03416f9904074d69539bdbdb77c6e4b8c..faff2db4dbf1772a8c6c2c1715cd3ffd0c292aa6 100644 (file)
@@ -52,12 +52,12 @@ namespace System.Net.Mail {
                {
                }
 
-               protected SmtpFailedRecipientException (SerializationInfo serializationInfo, StreamingContext streamingContext)
-                       : base (serializationInfo, streamingContext)
+               protected SmtpFailedRecipientException (SerializationInfo info, StreamingContext context)
+                       : base (info, context)
                {
-                       if (serializationInfo == null)
-                               throw new ArgumentNullException ("serializationInfo");
-                       failedRecipient = serializationInfo.GetString ("failedRecipient");
+                       if (info == null)
+                               throw new ArgumentNullException ("info");
+                       failedRecipient = info.GetString ("failedRecipient");
                }
 
                public SmtpFailedRecipientException (SmtpStatusCode statusCode, string failedRecipient) : base (statusCode)
index 6f2e3af8e50d808092b2836f09c10893d703c199..70ac1a324b2d08c37a2b00e2266cbac7c535811d 100644 (file)
@@ -80,12 +80,12 @@ namespace System.Net.Mail {
 
                #region Methods
 
-               public override void GetObjectData (SerializationInfo info, StreamingContext context)
+               public override void GetObjectData (SerializationInfo serializationInfo, StreamingContext streamingContext)
                {
-                       if (info == null)
-                               throw new ArgumentNullException ("info");
-                       base.GetObjectData (info, context);
-                       info.AddValue ("innerExceptions", innerExceptions);
+                       if (serializationInfo == null)
+                               throw new ArgumentNullException ("serializationInfo");
+                       base.GetObjectData (serializationInfo, streamingContext);
+                       serializationInfo.AddValue ("innerExceptions", innerExceptions);
                }
 
                void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
index 264eb7a50f7e63acb55114459d7ec235dd94fee8..8d6e9ddbc5ea696dbf12c83f37f4a29bce44a421 100644 (file)
@@ -40,7 +40,6 @@ using CipherAlgorithmType = System.Security.Authentication.CipherAlgorithmType;
 using HashAlgorithmType = System.Security.Authentication.HashAlgorithmType;
 using ExchangeAlgorithmType = System.Security.Authentication.ExchangeAlgorithmType;
 
-using System;
 using System.IO;
 using System.Net;
 using System.Net.Security;
@@ -49,7 +48,6 @@ using System.Security.Cryptography.X509Certificates;
 using System.Security.Permissions;
 using System.Security.Principal;
 using System.Security.Cryptography;
-
 using System.Threading.Tasks;
 
 using MNS = Mono.Net.Security;
@@ -402,10 +400,81 @@ namespace System.Net.Security
        }
 }
 #else // !SECURITY_DEP
+
+using System.IO;
+using System.Threading.Tasks;
+
 namespace System.Net.Security
 {
-       public class SslStream
+       public class SslStream : Stream
        {
+               public SslStream (object innerStream)
+               {
+               }
+
+               public override bool CanRead {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public override bool CanSeek {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public override bool CanWrite {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public override long Length {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public override long Position {
+                       get {
+                               throw new NotImplementedException ();
+                       }
+
+                       set {
+                               throw new NotImplementedException ();
+                       }
+               }
+
+               public override void Flush ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override int Read (System.Byte [] buffer, int offset, int count)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override long Seek (long offset, SeekOrigin origin)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void SetLength (long value)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public override void Write (System.Byte [] buffer, int offset, int count)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               public virtual Task AuthenticateAsClientAsync (string targetHost, object clientCertificates, object enabledSslProtocols, bool checkCertificateRevocation)
+               {
+                       throw new NotImplementedException ();
+               }
        }
 }
 #endif
index 91d43ad31617cb9019794b41eb6c1264747b01a6..4d5d7b418496bad939a53f2b25840d4031ebb150 100644 (file)
@@ -709,11 +709,11 @@ namespace System.Net.Sockets
                        sockares.Complete (acc_socket, total);
                });
 
-               public Socket EndAccept (IAsyncResult result)
+               public Socket EndAccept (IAsyncResult asyncResult)
                {
                        int bytes;
                        byte[] buffer;
-                       return EndAccept (out buffer, out bytes, result);
+                       return EndAccept (out buffer, out bytes, asyncResult);
                }
 
                public Socket EndAccept (out byte[] buffer, out int bytesTransferred, IAsyncResult asyncResult)
@@ -948,7 +948,7 @@ namespace System.Net.Sockets
                        }
                });
 
-               public IAsyncResult BeginConnect (string host, int port, AsyncCallback callback, object state)
+               public IAsyncResult BeginConnect (string host, int port, AsyncCallback requestCallback, object state)
                {
                        ThrowIfDisposedAndClosed ();
 
@@ -961,31 +961,31 @@ namespace System.Net.Sockets
                        if (is_listening)
                                throw new InvalidOperationException ();
 
-                       return BeginConnect (Dns.GetHostAddresses (host), port, callback, state);
+                       return BeginConnect (Dns.GetHostAddresses (host), port, requestCallback, state);
                }
 
-               public IAsyncResult BeginConnect (EndPoint end_point, AsyncCallback callback, object state)
+               public IAsyncResult BeginConnect (EndPoint remoteEP, AsyncCallback callback, object state)
                {
                        ThrowIfDisposedAndClosed ();
 
-                       if (end_point == null)
-                               throw new ArgumentNullException ("end_point");
+                       if (remoteEP == null)
+                               throw new ArgumentNullException ("remoteEP");
                        if (is_listening)
                                throw new InvalidOperationException ();
 
                        SocketAsyncResult sockares = new SocketAsyncResult (this, callback, state, SocketOperation.Connect) {
-                               EndPoint = end_point,
+                               EndPoint = remoteEP,
                        };
 
                        // Bug #75154: Connect() should not succeed for .Any addresses.
-                       if (end_point is IPEndPoint) {
-                               IPEndPoint ep = (IPEndPoint) end_point;
+                       if (remoteEP is IPEndPoint) {
+                               IPEndPoint ep = (IPEndPoint) remoteEP;
                                if (ep.Address.Equals (IPAddress.Any) || ep.Address.Equals (IPAddress.IPv6Any)) {
                                        sockares.Complete (new SocketException ((int) SocketError.AddressNotAvailable), true);
                                        return sockares;
                                }
                                
-                               end_point = RemapIPEndPoint (ep);
+                               remoteEP = RemapIPEndPoint (ep);
                        }
 
                        int error = 0;
@@ -1004,7 +1004,7 @@ namespace System.Net.Sockets
                        bool blk = is_blocking;
                        if (blk)
                                Blocking = false;
-                       Connect_internal (m_Handle, end_point.Serialize (), out error, false);
+                       Connect_internal (m_Handle, remoteEP.Serialize (), out error, false);
                        if (blk)
                                Blocking = true;
 
@@ -1034,7 +1034,7 @@ namespace System.Net.Sockets
                        return sockares;
                }
 
-               public IAsyncResult BeginConnect (IPAddress[] addresses, int port, AsyncCallback callback, object state)
+               public IAsyncResult BeginConnect (IPAddress[] addresses, int port, AsyncCallback requestCallback, object state)
                {
                        ThrowIfDisposedAndClosed ();
 
@@ -1049,7 +1049,7 @@ namespace System.Net.Sockets
                        if (is_listening)
                                throw new InvalidOperationException ();
 
-                       SocketAsyncResult sockares = new SocketAsyncResult (this, callback, state, SocketOperation.Connect) {
+                       SocketAsyncResult sockares = new SocketAsyncResult (this, requestCallback, state, SocketOperation.Connect) {
                                Addresses = addresses,
                                Port = port,
                        };
@@ -1142,11 +1142,11 @@ namespace System.Net.Sockets
                        }
                });
 
-               public void EndConnect (IAsyncResult result)
+               public void EndConnect (IAsyncResult asyncResult)
                {
                        ThrowIfDisposedAndClosed ();
 
-                       SocketAsyncResult sockares = ValidateEndIAsyncResult (result, "EndConnect", "result");
+                       SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndConnect", "asyncResult");
 
                        if (!sockares.IsCompleted)
                                sockares.AsyncWaitHandle.WaitOne();
@@ -1629,21 +1629,21 @@ namespace System.Net.Sockets
                        }
                });
 
-               public IAsyncResult BeginReceiveFrom (byte[] buffer, int offset, int size, SocketFlags socket_flags, ref EndPoint remote_end, AsyncCallback callback, object state)
+               public IAsyncResult BeginReceiveFrom (byte[] buffer, int offset, int size, SocketFlags socketFlags, ref EndPoint remoteEP, AsyncCallback callback, object state)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
                        ThrowIfBufferOutOfRange (buffer, offset, size);
 
-                       if (remote_end == null)
-                               throw new ArgumentNullException ("remote_end");
+                       if (remoteEP == null)
+                               throw new ArgumentNullException ("remoteEP");
 
                        SocketAsyncResult sockares = new SocketAsyncResult (this, callback, state, SocketOperation.ReceiveFrom) {
                                Buffer = buffer,
                                Offset = offset,
                                Size = size,
-                               SockFlags = socket_flags,
-                               EndPoint = remote_end,
+                               SockFlags = socketFlags,
+                               EndPoint = remoteEP,
                        };
 
                        QueueIOSelectorJob (ReadSem, sockares.Handle, new IOSelectorJob (IOOperation.Read, BeginReceiveFromCallback, sockares));
@@ -1671,21 +1671,21 @@ namespace System.Net.Sockets
                        sockares.Complete (total);
                });
 
-               public int EndReceiveFrom(IAsyncResult result, ref EndPoint end_point)
+               public int EndReceiveFrom(IAsyncResult asyncResult, ref EndPoint endPoint)
                {
                        ThrowIfDisposedAndClosed ();
 
-                       if (end_point == null)
-                               throw new ArgumentNullException ("remote_end");
+                       if (endPoint == null)
+                               throw new ArgumentNullException ("endPoint");
 
-                       SocketAsyncResult sockares = ValidateEndIAsyncResult (result, "EndReceiveFrom", "result");
+                       SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndReceiveFrom", "asyncResult");
 
                        if (!sockares.IsCompleted)
                                sockares.AsyncWaitHandle.WaitOne();
 
                        sockares.CheckIfThrowDelayedException();
 
-                       end_point = sockares.EndPoint;
+                       endPoint = sockares.EndPoint;
 
                        return sockares.Total;
                }
@@ -2095,7 +2095,7 @@ m_Handle, buffer, offset + sent, size - sent, socketFlags, out nativeError, is_b
                        }
                });
 
-               public IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, SocketFlags socket_flags, EndPoint remote_end, AsyncCallback callback, object state)
+               public IAsyncResult BeginSendTo(byte[] buffer, int offset, int size, SocketFlags socketFlags, EndPoint remoteEP, AsyncCallback callback, object state)
                {
                        ThrowIfDisposedAndClosed ();
                        ThrowIfBufferNull (buffer);
@@ -2105,8 +2105,8 @@ m_Handle, buffer, offset + sent, size - sent, socketFlags, out nativeError, is_b
                                Buffer = buffer,
                                Offset = offset,
                                Size = size,
-                               SockFlags = socket_flags,
-                               EndPoint = remote_end,
+                               SockFlags = socketFlags,
+                               EndPoint = remoteEP,
                        };
 
                        QueueIOSelectorJob (WriteSem, sockares.Handle, new IOSelectorJob (IOOperation.Write, s => BeginSendToCallback ((SocketAsyncResult) s, 0), sockares));
@@ -2140,11 +2140,11 @@ m_Handle, buffer, offset + sent, size - sent, socketFlags, out nativeError, is_b
                        sockares.Complete ();
                }
 
-               public int EndSendTo (IAsyncResult result)
+               public int EndSendTo (IAsyncResult asyncResult)
                {
                        ThrowIfDisposedAndClosed ();
 
-                       SocketAsyncResult sockares = ValidateEndIAsyncResult (result, "EndSendTo", "result");
+                       SocketAsyncResult sockares = ValidateEndIAsyncResult (asyncResult, "EndSendTo", "result");
 
                        if (!sockares.IsCompleted)
                                sockares.AsyncWaitHandle.WaitOne();
@@ -2681,14 +2681,25 @@ m_Handle, buffer, offset + sent, size - sent, socketFlags, out nativeError, is_b
 
                void QueueIOSelectorJob (SemaphoreSlim sem, IntPtr handle, IOSelectorJob job)
                {
-                       sem.WaitAsync ().ContinueWith (t => {
+                       var task = sem.WaitAsync();
+                       // fast path without Task<Action> allocation.
+                       if (task.IsCompleted) {
                                if (CleanedUp) {
                                        job.MarkDisposed ();
                                        return;
                                }
-
                                IOSelector.Add (handle, job);
-                       });
+                       }
+                       else
+                       {
+                               task.ContinueWith( t => {
+                                       if (CleanedUp) {
+                                               job.MarkDisposed ();
+                                               return;
+                                       }
+                                       IOSelector.Add(handle, job);
+                               });
+                       }
                }
 
                void InitSocketAsyncEventArgs (SocketAsyncEventArgs e, AsyncCallback callback, object state, SocketOperation operation)
index 2533129e7e5682876c582442c9f229ca7386838a..3f5faef9bd6d7db746472c05f96c82a911ec91e4 100644 (file)
@@ -153,9 +153,8 @@ namespace System.Net.Sockets
                        Socket completedSocket = socket;
                        SocketOperation completedOperation = operation;
 
-                       AsyncCallback callback = AsyncCallback;
-                       if (callback != null) {
-                               ThreadPool.UnsafeQueueUserWorkItem (_ => callback (this), null);
+                       if (this.AsyncCallback != null) {
+                               ThreadPool.UnsafeQueueUserWorkItem(state => ((SocketAsyncResult)state).AsyncCallback((SocketAsyncResult)state), this);
                        }
 
                        /* Warning: any field on the current SocketAsyncResult might have changed, as the callback might have
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.cs
deleted file mode 100644 (file)
index dba02f2..0000000
+++ /dev/null
@@ -1,392 +0,0 @@
-//
-// ClientWebSocket.cs
-//
-// Authors:
-//       Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 2013 Xamarin Inc (http://www.xamarin.com).
-//
-// Lightly inspired from WebSocket4Net distributed under the Apache License 2.0
-//
-// 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.Net;
-using System.Net.Sockets;
-using System.Security.Principal;
-using System.Security.Cryptography.X509Certificates;
-using System.Runtime.CompilerServices;
-using System.Collections.Generic;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Globalization;
-using System.Text;
-using System.Security.Cryptography;
-
-namespace System.Net.WebSockets
-{
-       public class ClientWebSocket : WebSocket, IDisposable
-       {
-               const string Magic = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
-               const string VersionTag = "13";
-
-               ClientWebSocketOptions options;
-               WebSocketState state;
-               string subProtocol;
-
-               HttpWebRequest req;
-               WebConnection connection;
-               Socket underlyingSocket;
-
-               Random random = new Random ();
-
-               const int HeaderMaxLength = 14;
-               byte[] headerBuffer;
-               byte[] sendBuffer;
-               long remaining;
-               WebSocketMessageType currentMessageType;
-
-               public ClientWebSocket ()
-               {
-                       options = new ClientWebSocketOptions ();
-                       state = WebSocketState.None;
-                       headerBuffer = new byte[HeaderMaxLength];
-               }
-
-               public override void Dispose ()
-               {
-                       if (connection != null)
-                               connection.Close (false);
-               }
-
-               [MonoTODO]
-               public override void Abort ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public ClientWebSocketOptions Options {
-                       get {
-                               return options;
-                       }
-               }
-
-               public override WebSocketState State {
-                       get {
-                               return state;
-                       }
-               }
-
-               public override WebSocketCloseStatus? CloseStatus {
-                       get {
-                               if (state != WebSocketState.Closed)
-                                       return (WebSocketCloseStatus?)null;
-                               return WebSocketCloseStatus.Empty;
-                       }
-               }
-
-               public override string CloseStatusDescription {
-                       get {
-                               return null;
-                       }
-               }
-
-               public override string SubProtocol {
-                       get {
-                               return subProtocol;
-                       }
-               }
-
-               public async Task ConnectAsync (Uri uri, CancellationToken cancellationToken)
-               {
-                       state = WebSocketState.Connecting;
-                       var httpUri = new UriBuilder (uri);
-                       if (uri.Scheme == "wss")
-                               httpUri.Scheme = "https";
-                       else
-                               httpUri.Scheme = "http";
-                       req = (HttpWebRequest)WebRequest.Create (httpUri.Uri);
-                       req.ReuseConnection = true;
-                       if (options.Cookies != null)
-                               req.CookieContainer = options.Cookies;
-
-                       if (options.CustomRequestHeaders.Count > 0) {
-                               foreach (var header in options.CustomRequestHeaders)
-                                       req.Headers[header.Key] = header.Value;
-                       }
-
-                       var secKey = Convert.ToBase64String (Encoding.ASCII.GetBytes (Guid.NewGuid ().ToString ().Substring (0, 16)));
-                       string expectedAccept = Convert.ToBase64String (SHA1.Create ().ComputeHash (Encoding.ASCII.GetBytes (secKey + Magic)));
-
-                       req.Headers["Upgrade"] = "WebSocket";
-                       req.Headers["Sec-WebSocket-Version"] = VersionTag;
-                       req.Headers["Sec-WebSocket-Key"] = secKey;
-                       req.Headers["Sec-WebSocket-Origin"] = uri.Host;
-                       if (options.SubProtocols.Count > 0)
-                               req.Headers["Sec-WebSocket-Protocol"] = string.Join (",", options.SubProtocols);
-
-                       if (options.Credentials != null)
-                               req.Credentials = options.Credentials;
-                       if (options.ClientCertificates != null)
-                               req.ClientCertificates = options.ClientCertificates;
-                       if (options.Proxy != null)
-                               req.Proxy = options.Proxy;
-                       req.UseDefaultCredentials = options.UseDefaultCredentials;
-                       req.Connection = "Upgrade";
-
-                       HttpWebResponse resp = null;
-                       try {
-                               resp = (HttpWebResponse)(await req.GetResponseAsync ().ConfigureAwait (false));
-                       } catch (Exception e) {
-                               throw new WebSocketException (WebSocketError.Success, e);
-                       }
-
-                       connection = req.StoredConnection;
-                       underlyingSocket = connection.socket;
-
-                       if (resp.StatusCode != HttpStatusCode.SwitchingProtocols)
-                               throw new WebSocketException ("The server returned status code '" + (int)resp.StatusCode + "' when status code '101' was expected");
-                       if (!string.Equals (resp.Headers["Upgrade"], "WebSocket", StringComparison.OrdinalIgnoreCase)
-                               || !string.Equals (resp.Headers["Connection"], "Upgrade", StringComparison.OrdinalIgnoreCase)
-                               || !string.Equals (resp.Headers["Sec-WebSocket-Accept"], expectedAccept))
-                               throw new WebSocketException ("HTTP header error during handshake");
-                       if (resp.Headers["Sec-WebSocket-Protocol"] != null) {
-                               if (!options.SubProtocols.Contains (resp.Headers["Sec-WebSocket-Protocol"]))
-                                       throw new WebSocketException (WebSocketError.UnsupportedProtocol);
-                               subProtocol = resp.Headers["Sec-WebSocket-Protocol"];
-                       }
-
-                       state = WebSocketState.Open;
-               }
-
-               public override Task SendAsync (ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
-               {
-                       EnsureWebSocketConnected ();
-                       ValidateArraySegment (buffer);
-                       if (connection == null)
-                               throw new WebSocketException (WebSocketError.Faulted);
-                       var count = Math.Max (options.SendBufferSize, buffer.Count) + HeaderMaxLength;
-                       if (sendBuffer == null || sendBuffer.Length != count)
-                               sendBuffer = new byte[count];
-                       return Task.Run (() => {
-                               EnsureWebSocketState (WebSocketState.Open, WebSocketState.CloseReceived);
-                               var maskOffset = WriteHeader (messageType, buffer, endOfMessage);
-
-                               if (buffer.Count > 0)
-                                       MaskData (buffer, maskOffset);
-                               //underlyingSocket.Send (headerBuffer, 0, maskOffset + 4, SocketFlags.None);
-                               var headerLength = maskOffset + 4;
-                               Array.Copy (headerBuffer, sendBuffer, headerLength);
-                               underlyingSocket.Send (sendBuffer, 0, buffer.Count + headerLength, SocketFlags.None);
-                       });
-               }
-               
-               const int messageTypeContinuation = 0;
-               const int messageTypeText = 1;
-               const int messageTypeBinary = 2;
-               const int messageTypeClose = 8;
-
-               WebSocketMessageType WireToMessageType (byte msgType)
-               {
-                       
-                       if (msgType == messageTypeContinuation)
-                               return currentMessageType;
-                       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);
-
-                               bool isLast;
-                               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;
-                                       currentMessageType = 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];
-                                       }
-
-                                       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;
-                                       currentMessageType = WireToMessageType ((byte)(headerBuffer[0] & 0xF));
-                                       length = remaining;
-                               }
-
-                               if (currentMessageType == WebSocketMessageType.Close) {
-                                       state = WebSocketState.Closed;
-                                       var tmpBuffer = new byte[length];
-                                       connection.Read (req, tmpBuffer, 0, tmpBuffer.Length);
-                                       var closeStatus = (WebSocketCloseStatus)(tmpBuffer[0] << 8 | tmpBuffer[1]);
-                                       var closeDesc = tmpBuffer.Length > 2 ? Encoding.UTF8.GetString (tmpBuffer, 2, tmpBuffer.Length - 2) : string.Empty;
-                                       return new WebSocketReceiveResult ((int)length, currentMessageType, isLast, closeStatus, closeDesc);
-                               } 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)readLength, currentMessageType, isLast && remaining == 0);
-                               }
-                       });
-               }
-
-               // The damn difference between those two methods is that CloseAsync will wait for server acknowledgement before completing
-               // while CloseOutputAsync will send the close packet and simply complete.
-
-               public async override Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
-               {
-                       EnsureWebSocketConnected ();
-                       await SendCloseFrame (closeStatus, statusDescription, cancellationToken).ConfigureAwait (false);
-                       state = WebSocketState.CloseSent;
-                       // TODO: figure what's exceptions are thrown if the server returns something faulty here
-                       await ReceiveAsync (new ArraySegment<byte> (new byte[0]), cancellationToken).ConfigureAwait (false);
-                       state = WebSocketState.Closed;
-               }
-
-               public async override Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
-               {
-                       EnsureWebSocketConnected ();
-                       await SendCloseFrame (closeStatus, statusDescription, cancellationToken).ConfigureAwait (false);
-                       state = WebSocketState.CloseSent;
-               }
-
-               async Task SendCloseFrame (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
-               {
-                       var statusDescBuffer = string.IsNullOrEmpty (statusDescription) ? new byte[2] : new byte[2 + Encoding.UTF8.GetByteCount (statusDescription)];
-                       statusDescBuffer[0] = (byte)(((ushort)closeStatus) >> 8);
-                       statusDescBuffer[1] = (byte)(((ushort)closeStatus) & 0xFF);
-                       if (!string.IsNullOrEmpty (statusDescription))
-                               Encoding.UTF8.GetBytes (statusDescription, 0, statusDescription.Length, statusDescBuffer, 2);
-                       await SendAsync (new ArraySegment<byte> (statusDescBuffer), WebSocketMessageType.Close, true, cancellationToken).ConfigureAwait (false);
-               }
-
-               int WriteHeader (WebSocketMessageType type, ArraySegment<byte> buffer, bool endOfMessage)
-               {
-                       var opCode = MessageTypeToWire (type);
-                       var length = buffer.Count;
-
-                       headerBuffer[0] = (byte)(opCode | (endOfMessage ? 0x80 : 0));
-                       if (length < 126) {
-                               headerBuffer[1] = (byte)length;
-                       } else if (length <= ushort.MaxValue) {
-                               headerBuffer[1] = (byte)126;
-                               headerBuffer[2] = (byte)(length / 256);
-                               headerBuffer[3] = (byte)(length % 256);
-                       } else {
-                               headerBuffer[1] = (byte)127;
-
-                               int left = length;
-                               int unit = 256;
-
-                               for (int i = 9; i > 1; i--) {
-                                       headerBuffer[i] = (byte)(left % unit);
-                                       left = left / unit;
-                               }
-                       }
-
-                       var l = Math.Max (0, headerBuffer[1] - 125);
-                       var maskOffset = 2 + l * l * 2;
-                       GenerateMask (headerBuffer, maskOffset);
-
-                       // Since we are client only, we always mask the payload
-                       headerBuffer[1] |= 0x80;
-
-                       return maskOffset;
-               }
-
-               void GenerateMask (byte[] mask, int offset)
-               {
-                       mask[offset + 0] = (byte)random.Next (0, 255);
-                       mask[offset + 1] = (byte)random.Next (0, 255);
-                       mask[offset + 2] = (byte)random.Next (0, 255);
-                       mask[offset + 3] = (byte)random.Next (0, 255);
-               }
-
-               void MaskData (ArraySegment<byte> buffer, int maskOffset)
-               {
-                       var sendBufferOffset = maskOffset + 4;
-                       for (var i = 0; i < buffer.Count; i++)
-                               sendBuffer[i + sendBufferOffset] = (byte)(buffer.Array[buffer.Offset + i] ^ headerBuffer[maskOffset + (i % 4)]);
-               }
-
-               void EnsureWebSocketConnected ()
-               {
-                       if (state < WebSocketState.Open)
-                               throw new InvalidOperationException ("The WebSocket is not connected");
-               }
-
-               void EnsureWebSocketState (params WebSocketState[] validStates)
-               {
-                       foreach (var validState in validStates)
-                               if (state == validState)
-                                       return;
-                       throw new WebSocketException ("The WebSocket is in an invalid state ('" + state + "') for this operation. Valid states are: " + string.Join (", ", validStates));
-               }
-
-               void ValidateArraySegment (ArraySegment<byte> segment)
-               {
-                       if (segment.Array == null)
-                               throw new ArgumentNullException ("buffer.Array");
-                       if (segment.Offset < 0)
-                               throw new ArgumentOutOfRangeException ("buffer.Offset");
-                       if (segment.Offset + segment.Count > segment.Array.Length)
-                               throw new ArgumentOutOfRangeException ("buffer.Count");
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocket.platformnotsupported.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocket.platformnotsupported.cs
deleted file mode 100644 (file)
index 324ae42..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-//
-// ClientWebSocket.cs
-//
-// Author:
-//     Rolf Bjarne Kvinge <rolf@xamarin.com>
-//
-// Copyright (C) 2016 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.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.WebSockets
-{
-       public class ClientWebSocket : WebSocket, IDisposable
-       {
-               const string EXCEPTION_MESSAGE = "System.Net.WebSockets.ClientWebSocket is not supported on the current platform.";
-
-               public ClientWebSocket ()
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-
-               public override void Dispose ()
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-
-               public override void Abort ()
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-
-               public ClientWebSocketOptions Options {
-                       get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-               }
-
-               public override WebSocketState State {
-                       get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-               }
-
-               public override WebSocketCloseStatus? CloseStatus {
-                       get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-               }
-
-               public override string CloseStatusDescription {
-                       get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-               }
-
-               public override string SubProtocol {
-                       get { throw new PlatformNotSupportedException (EXCEPTION_MESSAGE); }
-               }
-
-               public Task ConnectAsync (Uri uri, CancellationToken cancellationToken)
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-
-               public override Task SendAsync (ArraySegment<byte> buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken)
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-
-               public override Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer, CancellationToken cancellationToken)
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-
-               public override Task CloseAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-
-               public override Task CloseOutputAsync (WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken)
-               {
-                       throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
-               }
-       }
-}
diff --git a/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs b/mcs/class/System/System.Net.WebSockets/ClientWebSocketOptions.cs
deleted file mode 100644 (file)
index 66b884a..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-//
-// ClientWebSocketOptions.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Net;
-using System.Security.Principal;
-using System.Security.Cryptography.X509Certificates;
-using System.Runtime.CompilerServices;
-using System.Collections.Generic;
-
-namespace System.Net.WebSockets
-{
-       public sealed class ClientWebSocketOptions
-       {
-               List<string> subprotocols = new List<string> ();
-               Dictionary<string, string> customRequestHeaders = new Dictionary<string, string> ();
-
-               public X509CertificateCollection ClientCertificates { get; set; }
-
-               public CookieContainer Cookies { get; set; }
-
-               public ICredentials Credentials { get; set; }
-
-               public TimeSpan KeepAliveInterval { get; set; }
-
-               public IWebProxy Proxy { get; set; }
-
-               public bool UseDefaultCredentials { get; set; }
-
-               internal IList<string> SubProtocols {
-                       get {
-                               return subprotocols.AsReadOnly ();
-                       }
-               }
-
-               internal Dictionary<string, string> CustomRequestHeaders {
-                       get {
-                               return customRequestHeaders;
-                       }
-               }
-
-               internal int ReceiveBufferSize {
-                       get;
-                       private set;
-               }
-
-               internal ArraySegment<byte> CustomReceiveBuffer {
-                       get;
-                       private set;
-               }
-
-               internal int SendBufferSize {
-                       get;
-                       private set;
-               }
-
-               public void AddSubProtocol (string subProtocol)
-               {
-                       subprotocols.Add (subProtocol);
-               }
-
-               public void SetBuffer (int receiveBufferSize, int sendBufferSize)
-               {
-                       SetBuffer (receiveBufferSize, sendBufferSize, new ArraySegment<byte> ());
-               }
-
-               public void SetBuffer (int receiveBufferSize, int sendBufferSize, ArraySegment<byte> buffer)
-               {
-                       ReceiveBufferSize = receiveBufferSize;
-                       SendBufferSize = sendBufferSize;
-                       CustomReceiveBuffer = buffer;
-               }
-
-               public void SetRequestHeader (string headerName, string headerValue)
-               {
-                       customRequestHeaders[headerName] = headerValue;
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs b/mcs/class/System/System.Net.WebSockets/HttpListenerWebSocketContext.cs
deleted file mode 100644 (file)
index d37eb24..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-//
-// HttpListenerWebSocketContext.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.
-//
-//
-
-#if SECURITY_DEP
-
-using System;
-using System.Net;
-using System.Collections.Specialized;
-using System.Collections.Generic;
-using System.Security.Principal;
-using System.Security.Cryptography.X509Certificates;
-using System.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public class HttpListenerWebSocketContext : WebSocketContext
-       {
-               [MonoTODO]
-               public override CookieCollection CookieCollection {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override NameValueCollection Headers {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override bool IsAuthenticated {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override bool IsLocal {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override bool IsSecureConnection {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override string Origin {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override Uri RequestUri {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override string SecWebSocketKey {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override IEnumerable<string> SecWebSocketProtocols {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override string SecWebSocketVersion {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override IPrincipal User {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               [MonoTODO]
-               public override WebSocket WebSocket {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocket.cs b/mcs/class/System/System.Net.WebSockets/WebSocket.cs
deleted file mode 100644 (file)
index 4d0c9b2..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-//
-// WebSocket.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Threading;
-using System.Threading.Tasks;
-using System.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public abstract class WebSocket : IDisposable
-       {
-               protected WebSocket ()
-               {
-                       
-               }
-
-               public abstract Nullable<WebSocketCloseStatus> CloseStatus { get; }
-               public abstract string CloseStatusDescription { get; }
-               public abstract WebSocketState State { get; }
-               public abstract string SubProtocol { get; }
-
-               [MonoTODO]
-               public static TimeSpan DefaultKeepAliveInterval {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
-               public abstract void Abort ();
-               
-               public abstract Task CloseAsync (WebSocketCloseStatus closeStatus,
-                                                string statusDescription,
-                                                CancellationToken cancellationToken);
-
-               public abstract Task CloseOutputAsync (WebSocketCloseStatus closeStatus,
-                                                      string statusDescription,
-                                                      CancellationToken cancellationToken);
-
-               public abstract Task<WebSocketReceiveResult> ReceiveAsync (ArraySegment<byte> buffer,
-                                                                          CancellationToken cancellationToken);
-
-               public abstract Task SendAsync (ArraySegment<byte> buffer,
-                                               WebSocketMessageType messageType,
-                                               bool endOfMessage,
-                                               CancellationToken cancellationToken);
-
-               [MonoTODO]
-               public static ArraySegment<byte> CreateClientBuffer (int receiveBufferSize, int sendBufferSize)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               [MonoTODO]
-               public static WebSocket CreateClientWebSocket (Stream innerStream,
-                                                              string subProtocol,
-                                                              int receiveBufferSize,
-                                                              int sendBufferSize,
-                                                              TimeSpan keepAliveInterval,
-                                                              bool useZeroMaskingKey,
-                                                              ArraySegment<byte> internalBuffer)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               [MonoTODO]
-               public static ArraySegment<byte> CreateServerBuffer (int receiveBufferSize)
-               {
-                       throw new NotImplementedException ();
-               }
-
-               [ObsoleteAttribute, MonoTODO]
-               public static bool IsApplicationTargeting45 ()
-               {
-                       return true;
-               }
-
-               [MonoTODO]
-               public static void RegisterPrefixes ()
-               {
-                       throw new NotImplementedException ();
-               }
-
-               public abstract void Dispose ();
-
-               protected static bool IsStateTerminal (WebSocketState state)
-               {
-                       return state == WebSocketState.Closed || state == WebSocketState.Aborted;
-               }
-
-               [MonoTODO]
-               protected static void ThrowOnInvalidState (WebSocketState state, params WebSocketState[] validStates)
-               {
-                       foreach (var validState in validStates)
-                               if (validState == state)
-                                       return;
-
-                       throw new NotImplementedException ();
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs b/mcs/class/System/System.Net.WebSockets/WebSocketCloseStatus.cs
deleted file mode 100644 (file)
index d662120..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// WebSocketCloseStatus.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public enum WebSocketCloseStatus
-       {
-               NormalClosure = 1000,
-               EndpointUnavailable = 1001,
-               ProtocolError = 1002,
-               InvalidMessageType = 1003,
-               Empty = 1005,
-               InvalidPayloadData = 1007,
-               PolicyViolation = 1008,
-               MessageTooBig = 1009,
-               MandatoryExtension = 1010,
-               InternalServerError = 1011
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketContext.cs b/mcs/class/System/System.Net.WebSockets/WebSocketContext.cs
deleted file mode 100644 (file)
index 1fd14a9..0000000
+++ /dev/null
@@ -1,70 +0,0 @@
-//
-// WebSocketContext.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Collections.Specialized;
-using System.Collections.Generic;
-using System.Security.Principal;
-using System.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public abstract class WebSocketContext
-       {
-               protected WebSocketContext ()
-               {
-                       
-               }
-
-               public abstract CookieCollection CookieCollection { get; }
-
-               public abstract NameValueCollection Headers { get; }
-
-               public abstract bool IsAuthenticated { get; }
-
-               public abstract bool IsLocal { get; }
-
-               public abstract bool IsSecureConnection { get; }
-
-               public abstract string Origin { get; }
-
-               public abstract Uri RequestUri { get; }
-
-               public abstract string SecWebSocketKey { get; }
-
-               public abstract IEnumerable<string> SecWebSocketProtocols { get; }
-
-               public abstract string SecWebSocketVersion { get; }
-
-               public abstract IPrincipal User { get; }
-
-               public abstract WebSocket WebSocket { get; }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketError.cs b/mcs/class/System/System.Net.WebSockets/WebSocketError.cs
deleted file mode 100644 (file)
index 1218d16..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// WebSocketError.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public enum WebSocketError
-       {
-               Success,
-               InvalidMessageType,
-               Faulted,
-               NativeError,
-               NotAWebSocket,
-               UnsupportedVersion,
-               UnsupportedProtocol,
-               HeaderError,
-               ConnectionClosedPrematurely,
-               InvalidState
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketException.cs b/mcs/class/System/System.Net.WebSockets/WebSocketException.cs
deleted file mode 100644 (file)
index 1c72406..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-//
-// WebSocketException.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.ComponentModel;
-using System.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public sealed class WebSocketException : Win32Exception
-       {
-               const string DefaultMessage = "Generic WebSocket exception";
-
-               public WebSocketException () : this (WebSocketError.Success, -1, DefaultMessage, null)
-               {
-                       
-               }
-
-               public WebSocketException (int nativeError) : this (WebSocketError.Success, nativeError, DefaultMessage, null)
-               {
-                       
-               }
-
-               public WebSocketException (string message) : this (WebSocketError.Success, -1, message, null)
-               {
-                       
-               }
-
-               public WebSocketException (WebSocketError error) : this (error, -1, DefaultMessage, null)
-               {
-               }
-
-               public WebSocketException (int nativeError, Exception innerException) : this (WebSocketError.Success, nativeError, DefaultMessage, innerException)
-               {
-                       
-               }
-
-               public WebSocketException (int nativeError, string message) : this (WebSocketError.Success, nativeError, message, null)
-               {
-                       
-               }
-
-               public WebSocketException (string message, Exception innerException) : this (WebSocketError.Success, -1, message, innerException)
-               {
-                       
-               }
-
-               public WebSocketException (WebSocketError error, Exception innerException) : this (error, -1, DefaultMessage, innerException)
-               {
-
-               }
-
-               public WebSocketException (WebSocketError error, int nativeError) : this (error, nativeError, DefaultMessage, null)
-               {
-               }
-
-               public WebSocketException (WebSocketError error, string message) : this (error, -1, message, null)
-               {
-               }
-
-               public WebSocketException (WebSocketError error, int nativeError, Exception innerException) : this (error, nativeError, DefaultMessage, innerException)
-               {
-               }
-
-               public WebSocketException (WebSocketError error, int nativeError, string message) : this (error, nativeError, message, null)
-               {
-               }
-
-               public WebSocketException (WebSocketError error, string message, Exception innerException) : this (error, -1, message, innerException)
-               {
-               }
-
-               public WebSocketException (WebSocketError error, int nativeError, string message, Exception innerException) : base (message, innerException)
-               {
-                       WebSocketErrorCode = error;
-               }
-
-               public WebSocketError WebSocketErrorCode {
-                       get;
-                       private set;
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs b/mcs/class/System/System.Net.WebSockets/WebSocketMessageType.cs
deleted file mode 100644 (file)
index 2369548..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-//
-// WebSocketMessageType.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public enum WebSocketMessageType
-       {
-               Text = 0,
-               Binary = 1,
-               Close = 2
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs b/mcs/class/System/System.Net.WebSockets/WebSocketReceiveResult.cs
deleted file mode 100644 (file)
index cadf967..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-//
-// WebSocketReceiveResult.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Security.Principal;
-using System.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public class WebSocketReceiveResult
-       {
-               public WebSocketReceiveResult (int count, WebSocketMessageType messageType, bool endOfMessage)
-                    : this (count, messageType, endOfMessage, null, null)
-               {
-               }
-
-               public WebSocketReceiveResult (int count,
-                                              WebSocketMessageType messageType,
-                                              bool endOfMessage,
-                                              WebSocketCloseStatus? closeStatus,
-                                              string closeStatusDescription)
-               {
-                       MessageType = messageType;
-                       CloseStatus = closeStatus;
-                       CloseStatusDescription = closeStatusDescription;
-                       Count = count;
-                       EndOfMessage = endOfMessage;
-               }
-
-               public WebSocketCloseStatus? CloseStatus {
-                       get;
-                       private set;
-               }
-
-               public string CloseStatusDescription {
-                       get;
-                       private set;
-               }
-
-               public int Count {
-                       get;
-                       private set;
-               }
-
-               public bool EndOfMessage {
-                       get;
-                       private set;
-               }
-
-               public WebSocketMessageType MessageType {
-                       get;
-                       private set;
-               }
-       }
-}
-
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketState.cs b/mcs/class/System/System.Net.WebSockets/WebSocketState.cs
deleted file mode 100644 (file)
index f942dae..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// WebSocketState.cs
-//
-// Authors:
-//    Jérémie Laval <jeremie dot laval at xamarin dot com>
-//
-// Copyright 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.Runtime.CompilerServices;
-
-namespace System.Net.WebSockets
-{
-       public enum WebSocketState
-       {
-               None,
-               Connecting,
-               Open,
-               CloseSent,
-               CloseReceived,
-               Closed,
-               Aborted
-       }
-}
-
index a57c579250ed33e6f27cb11ad04469840f3a06b3..5ca0425eb5af4444e5868505ef30bdac53e1890d 100644 (file)
@@ -1031,9 +1031,9 @@ namespace System.Net
                        return result.Response;
                }
                
-               public Stream EndGetRequestStream (IAsyncResult asyncResult, out TransportContext transportContext)
+               public Stream EndGetRequestStream (IAsyncResult asyncResult, out TransportContext context)
                {
-                       transportContext = null;
+                       context = null;
                        return EndGetRequestStream (asyncResult);
                }
 
index 5402d58f522a0f413aac15f2dc281e19a66d4827..5a32084972359603e7f55acefeefae274fc4477e 100644 (file)
@@ -86,10 +86,14 @@ namespace System.Net
                        }
 
                        string content_encoding = webHeaders ["Content-Encoding"];
-                       if (content_encoding == "gzip" && (data.request.AutomaticDecompression & DecompressionMethods.GZip) != 0)
+                       if (content_encoding == "gzip" && (data.request.AutomaticDecompression & DecompressionMethods.GZip) != 0) {
                                stream = new GZipStream (stream, CompressionMode.Decompress);
-                       else if (content_encoding == "deflate" && (data.request.AutomaticDecompression & DecompressionMethods.Deflate) != 0)
+                               webHeaders.Remove (HttpRequestHeader.ContentEncoding);
+                       }
+                       else if (content_encoding == "deflate" && (data.request.AutomaticDecompression & DecompressionMethods.Deflate) != 0) {
                                stream = new DeflateStream (stream, CompressionMode.Decompress);
+                               webHeaders.Remove (HttpRequestHeader.ContentEncoding);
+                       }
                }
 
                [Obsolete ("Serialization is obsoleted for this type", false)]
index c9c1077b1e2f813582583a0731b62d46fe6e27f4..f0b7ef8398e5f83e43ef92f093c97994cc23719a 100644 (file)
@@ -99,19 +99,26 @@ namespace System.Net {
                        if (start_host >= length)
                                throw new ArgumentException ("No host specified.");
 
-                       int colon = uri.IndexOf (':', start_host, length - start_host);
-                       int root;
-                       if (colon > 0) {
-                               host = uri.Substring (start_host, colon - start_host);
-                               root = uri.IndexOf ('/', colon, length - colon);
-                               port = (ushort) Int32.Parse (uri.Substring (colon + 1, root - colon - 1));
-                               path = uri.Substring (root);
+                       int startPort = uri.IndexOf (':', start_host, length - start_host);
+                       if (uri [start_host] == '[') {
+                               startPort = uri.IndexOf ("]:") + 1;
+                       }
+                       if (start_host == startPort)
+                               throw new ArgumentException ("No host specified.");
+
+                       int root = uri.IndexOf ('/', start_host, length - start_host);
+                       if (root == -1)
+                               throw new ArgumentException ("No path specified.");
+
+                       if (startPort > 0) {
+                               host = uri.Substring (start_host, startPort - start_host).Trim ('[', ']');
+                               port = UInt16.Parse (uri.Substring (startPort + 1, root - startPort - 1));
                        } else {
-                               root = uri.IndexOf ('/', start_host, length - start_host);
-                               host = uri.Substring (start_host, root - start_host);
+                               host = uri.Substring (start_host, root - start_host).Trim ('[', ']');
                                port = default_port;
-                               path = uri.Substring (root);
                        }
+                       path = uri.Substring (root);
+
                        if (path.Length != 1)
                                path = path.Substring (0, path.Length - 1);
                }
@@ -121,7 +128,7 @@ namespace System.Net {
                        if (uri == null)
                                throw new ArgumentNullException ("uriPrefix");
 
-                       if(!uri.StartsWith ("http://") && !uri.StartsWith ("https://"))
+                       if (!uri.StartsWith ("http://") && !uri.StartsWith ("https://"))
                                throw new ArgumentException ("Only 'http' and 'https' schemes are supported.");
 
                        int length = uri.Length;
@@ -129,27 +136,23 @@ namespace System.Net {
                        if (start_host >= length)
                                throw new ArgumentException ("No host specified.");
 
-                       int colon = uri.IndexOf (':', start_host, length - start_host);
-                       if (start_host == colon)
+                       int startPort = uri.IndexOf (':', start_host, length - start_host);
+                       if (uri [start_host] == '[')
+                               startPort = uri.IndexOf ("]:") + 1;
+                       if (start_host == startPort)
                                throw new ArgumentException ("No host specified.");
+                       int root = uri.IndexOf ('/', start_host, length - start_host);
+                       if (root == -1)
+                               throw new ArgumentException ("No path specified.");
 
-                       int root;
-                       if (colon > 0) {
-                               root = uri.IndexOf ('/', colon, length - colon);
-                               if (root == -1)
-                                       throw new ArgumentException ("No path specified.");
-
+                       if (startPort > 0) {
                                try {
-                                       int p = Int32.Parse (uri.Substring (colon + 1, root - colon - 1));
+                                       int p = Int32.Parse (uri.Substring (startPort + 1, root - startPort - 1));
                                        if (p <= 0 || p >= 65536)
                                                throw new Exception ();
                                } catch {
                                        throw new ArgumentException ("Invalid port.");
                                }
-                       } else {
-                               root = uri.IndexOf ('/', start_host, length - start_host);
-                               if (root == -1)
-                                       throw new ArgumentException ("No path specified.");
                        }
 
                        if (uri [uri.Length - 1] != '/')
@@ -158,4 +161,3 @@ namespace System.Net {
        }
 }
 #endif
-
index 8294f7b43d2574ac4142bfd1dc19476032484160..69b4133226bb0834e49955797829d1a81deb5d43 100644 (file)
@@ -29,10 +29,16 @@ using System.Net;
 using System.Collections.Generic;
 using System.Runtime.InteropServices;
 using System.Threading;
+using ObjCRuntime;
 
 namespace Mono.Net
 {
-       internal class CFObject : IDisposable
+       internal class CFType {
+               [DllImport (CFObject.CoreFoundationLibrary, EntryPoint="CFGetTypeID")]
+               public static extern IntPtr GetTypeID (IntPtr typeRef);
+       }
+
+       internal class CFObject : IDisposable, INativeObject
        {
                public const string CoreFoundationLibrary = "/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation";
                const string SystemLibrary = "/usr/lib/libSystem.dylib";
@@ -51,6 +57,25 @@ namespace Mono.Net
                        return dlsym (handle, symbol);
                }
 
+               public static CFString GetStringConstant (IntPtr handle, string symbol)
+               {
+                       var indirect = dlsym (handle, symbol);
+                       if (indirect == IntPtr.Zero)
+                               return null;
+                       var actual = Marshal.ReadIntPtr (indirect);
+                       if (actual == IntPtr.Zero)
+                               return null;
+                       return new CFString (actual, false);
+               }
+
+               public static IntPtr GetIntPtr (IntPtr handle, string symbol)
+               {
+                       var indirect = dlsym (handle, symbol);
+                       if (indirect == IntPtr.Zero)
+                               return IntPtr.Zero;
+                       return Marshal.ReadIntPtr (indirect);
+               }
+
                public static IntPtr GetCFObjectHandle (IntPtr handle, string symbol)
                {
                        var indirect = dlsym (handle, symbol);
@@ -76,7 +101,7 @@ namespace Mono.Net
                public IntPtr Handle { get; private set; }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static IntPtr CFRetain (IntPtr handle);
+               internal extern static IntPtr CFRetain (IntPtr handle);
 
                void Retain ()
                {
@@ -84,7 +109,7 @@ namespace Mono.Net
                }
 
                [DllImport (CoreFoundationLibrary)]
-               extern static void CFRelease (IntPtr handle);
+               internal extern static void CFRelease (IntPtr handle);
 
                void Release ()
                {
@@ -126,8 +151,22 @@ namespace Mono.Net
                                dlclose (handle);
                        }
                }
+               
+               public static CFArray FromNativeObjects (params INativeObject[] values)
+               {
+                       return new CFArray (Create (values), true);
+               }
+
+               public static unsafe IntPtr Create (params IntPtr[] values)
+               {
+                       if (values == null)
+                               throw new ArgumentNullException ("values");
+                       fixed (IntPtr* pv = values) {
+                               return CFArrayCreate (IntPtr.Zero, (IntPtr) pv, (IntPtr)values.Length, kCFTypeArrayCallbacks);
+                       }
+               }
 
-               static unsafe CFArray Create (params IntPtr[] values)
+               internal static unsafe CFArray CreateArray (params IntPtr[] values)
                {
                        if (values == null)
                                throw new ArgumentNullException ("values");
@@ -138,16 +177,19 @@ namespace Mono.Net
                                return new CFArray (handle, false);
                        }
                }
+               
+               public static CFArray CreateArray (params INativeObject[] values)
+               {
+                       return new CFArray (Create (values), true);
+               }
 
-               public static CFArray Create (params CFObject[] values)
+               public static IntPtr Create (params INativeObject[] values)
                {
                        if (values == null)
                                throw new ArgumentNullException ("values");
-
                        IntPtr[] _values = new IntPtr [values.Length];
-                       for (int i = 0; i < _values.Length; i++)
-                               _values[i] = values[i].Handle;
-
+                       for (int i = 0; i < _values.Length; ++i)
+                               _values [i] = values [i].Handle;
                        return Create (_values);
                }
 
@@ -166,6 +208,20 @@ namespace Mono.Net
                                return CFArrayGetValueAtIndex (Handle, (IntPtr) index);
                        }
                }
+               
+               static public T [] ArrayFromHandle<T> (IntPtr handle, Func<IntPtr, T> creation) where T : class, INativeObject
+               {
+                       if (handle == IntPtr.Zero)
+                               return null;
+
+                       var c = CFArrayGetCount (handle);
+                       T [] ret = new T [(int)c];
+
+                       for (uint i = 0; i < (uint)c; i++) {
+                               ret [i] = creation (CFArrayGetValueAtIndex (handle, (IntPtr)i));
+                       }
+                       return ret;
+               }
        }
 
        internal class CFNumber : CFObject
@@ -209,6 +265,15 @@ namespace Mono.Net
 
                        return value;
                }
+               
+               [DllImport (CoreFoundationLibrary)]
+               extern static IntPtr CFNumberCreate (IntPtr allocator, IntPtr theType, IntPtr valuePtr);        
+
+               public static CFNumber FromInt32 (int number)
+               {
+                       // 9 == kCFNumberIntType == C int
+                       return new CFNumber (CFNumberCreate (IntPtr.Zero, (IntPtr)9, (IntPtr)number), true);
+               }
 
                public static implicit operator int (CFNumber number)
                {
@@ -328,13 +393,105 @@ namespace Mono.Net
                }
        }
 
+       
+       internal class CFData : CFObject
+       {
+               public CFData (IntPtr handle, bool own) : base (handle, own) { }
+       
+               [DllImport (CoreFoundationLibrary)]
+               extern static /* CFDataRef */ IntPtr CFDataCreate (/* CFAllocatorRef */ IntPtr allocator, /* UInt8* */ IntPtr bytes, /* CFIndex */ IntPtr length);
+               public unsafe static CFData FromData (byte [] buffer)
+               {
+                       fixed (byte* p = buffer)
+                       {
+                               return FromData ((IntPtr)p, (IntPtr)buffer.Length);
+                       }
+               }
+
+               public static CFData FromData (IntPtr buffer, IntPtr length)
+               {
+                       return new CFData (CFDataCreate (IntPtr.Zero, buffer, length), true);
+               }
+               
+               public IntPtr Length {
+                       get { return CFDataGetLength (Handle); }
+               }
+
+               [DllImport (CoreFoundationLibrary)]
+               extern static /* CFIndex */ IntPtr CFDataGetLength (/* CFDataRef */ IntPtr theData);
+
+               [DllImport (CoreFoundationLibrary)]
+               extern static /* UInt8* */ IntPtr CFDataGetBytePtr (/* CFDataRef */ IntPtr theData);
+
+               /*
+                * Exposes a read-only pointer to the underlying storage.
+                */
+               public IntPtr Bytes {
+                       get { return CFDataGetBytePtr (Handle); }
+               }
+
+               public byte this [long idx] {
+                       get {
+                               if (idx < 0 || (ulong) idx > (ulong) Length)
+                                       throw new ArgumentException ("idx");
+                               return Marshal.ReadByte (new IntPtr (Bytes.ToInt64 () + idx));
+                       }
+
+                       set {
+                               throw new NotImplementedException ("NSData arrays can not be modified, use an NSMutableData instead");
+                       }
+               }
+
+       }
+
        internal class CFDictionary : CFObject
        {
+               static readonly IntPtr KeyCallbacks;
+               static readonly IntPtr ValueCallbacks;
+               
+               static CFDictionary ()
+               {
+                       var handle = dlopen (CoreFoundationLibrary, 0);
+                       if (handle == IntPtr.Zero)
+                               return;
+
+                       try {           
+                               KeyCallbacks = GetIndirect (handle, "kCFTypeDictionaryKeyCallBacks");
+                               ValueCallbacks = GetIndirect (handle, "kCFTypeDictionaryValueCallBacks");
+                       } finally {
+                               dlclose (handle);
+                       }
+               }
+
                public CFDictionary (IntPtr handle, bool own) : base (handle, own) { }
 
+               public static CFDictionary FromObjectAndKey (IntPtr obj, IntPtr key)
+               {
+                       return new CFDictionary (CFDictionaryCreate (IntPtr.Zero, new IntPtr[] { key }, new IntPtr [] { obj }, (IntPtr)1, KeyCallbacks, ValueCallbacks), true);
+               }
+               
+               [DllImport (CoreFoundationLibrary)]
+               extern static IntPtr CFDictionaryCreate (IntPtr allocator, IntPtr[] keys, IntPtr[] vals, IntPtr len, IntPtr keyCallbacks, IntPtr valCallbacks);
+
                [DllImport (CoreFoundationLibrary)]
                extern static IntPtr CFDictionaryGetValue (IntPtr handle, IntPtr key);
 
+               [DllImport (CoreFoundationLibrary)]
+               extern static IntPtr CFDictionaryCreateCopy (IntPtr allocator, IntPtr handle);
+
+               public CFDictionary Copy ()
+               {
+                       return new CFDictionary (CFDictionaryCreateCopy (IntPtr.Zero, Handle), true);
+               }
+               
+               public CFMutableDictionary MutableCopy ()
+               {
+                       return new CFMutableDictionary (CFDictionaryCreateMutableCopy (IntPtr.Zero, IntPtr.Zero, Handle), true);
+               }
+
+               [DllImport (CoreFoundationLibrary)]
+               extern static IntPtr CFDictionaryCreateMutableCopy (IntPtr allocator, IntPtr capacity, IntPtr theDict);
+
                public IntPtr GetValue (IntPtr key)
                {
                        return CFDictionaryGetValue (Handle, key);
@@ -346,6 +503,19 @@ namespace Mono.Net
                        }
                }
        }
+       
+       internal class CFMutableDictionary : CFDictionary
+       {
+               public CFMutableDictionary (IntPtr handle, bool own) : base (handle, own) { }
+
+               public void SetValue (IntPtr key, IntPtr val)
+               {
+                       CFDictionarySetValue (Handle, key, val);
+               }
+
+               [DllImport (CoreFoundationLibrary)]
+               extern static void CFDictionarySetValue (IntPtr handle, IntPtr key, IntPtr val);
+       }
 
        internal class CFUrl : CFObject
        {
@@ -1066,4 +1236,86 @@ namespace Mono.Net
                        return new CFWebProxy ();
                }
        }
+
+       class CFBoolean : INativeObject, IDisposable {
+               IntPtr handle;
+
+               public static readonly CFBoolean True;
+               public static readonly CFBoolean False;
+
+               static CFBoolean ()
+               {
+                       var handle = CFObject.dlopen (CFObject.CoreFoundationLibrary, 0);
+                       if (handle == IntPtr.Zero)
+                               return;
+                       try {
+                               True  = new CFBoolean (CFObject.dlsym (handle, "kCFBooleanTrue"), false);
+                               False = new CFBoolean (CFObject.dlsym (handle, "kCFBooleanFalse"), false);
+                       }
+                       finally {
+                               CFObject.dlclose (handle);
+                       }
+               }
+
+               internal CFBoolean (IntPtr handle, bool owns)
+               {
+                       this.handle = handle;
+                       if (!owns)
+                               CFObject.CFRetain (handle);
+               }
+
+               ~CFBoolean ()
+               {
+                       Dispose (false);
+               }
+
+               public IntPtr Handle {
+                       get {
+                               return handle;
+                       }
+               }
+
+               public void Dispose ()
+               {
+                       Dispose (true);
+                       GC.SuppressFinalize (this);
+               }
+
+               protected virtual void Dispose (bool disposing)
+               {
+                       if (handle != IntPtr.Zero){
+                               CFObject.CFRelease (handle);
+                               handle = IntPtr.Zero;
+                       }
+               }
+
+               public static implicit operator bool (CFBoolean value)
+               {
+                       return value.Value;
+               }
+
+               public static explicit operator CFBoolean (bool value)
+               {
+                       return FromBoolean (value);
+               }
+
+               public static CFBoolean FromBoolean (bool value)
+               {
+                       return value ? True : False;
+               }
+
+               [DllImport (CFObject.CoreFoundationLibrary)]
+               [return: MarshalAs (UnmanagedType.I1)]
+               extern static /* Boolean */ bool CFBooleanGetValue (/* CFBooleanRef */ IntPtr boolean);
+
+               public bool Value {
+                       get {return CFBooleanGetValue (handle);}
+               }
+
+               public static bool GetValue (IntPtr boolean)
+               {
+                       return CFBooleanGetValue (boolean);
+               }
+       }
+
 }
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/OpenFlags.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/OpenFlags.cs
deleted file mode 100644 (file)
index 627afab..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// OpenFlags.cs - System.Security.Cryptography.X509Certificates.OpenFlags
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       [Flags]
-       public enum OpenFlags {
-               ReadOnly,
-               ReadWrite, 
-               MaxAllowed,
-               OpenExistingOnly = 4,
-               IncludeArchived = 8
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/StoreLocation.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/StoreLocation.cs
deleted file mode 100644 (file)
index 4cbde50..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// StoreLocation.cs - System.Security.Cryptography.X509Certificates.StoreLocation
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       public enum StoreLocation {
-               CurrentUser = 1,
-               LocalMachine = 2
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/StoreName.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/StoreName.cs
deleted file mode 100644 (file)
index 5f32375..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// StoreName.cs - System.Security.Cryptography.X509Certificates.StoreName
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       public enum StoreName {
-               AddressBook = 1,
-               AuthRoot = 2,
-               CertificateAuthority = 3,
-               Disallowed = 4,
-               My = 5,
-               Root = 6,
-               TrustedPeople = 7,
-               TrustedPublisher = 8 
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedNameFlags.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X500DistinguishedNameFlags.cs
deleted file mode 100644 (file)
index 5e60223..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-//
-// System.Security.Cryptography.X509Certificates.X500DistinguishedNameFlags
-//
-// Author:
-//     Sebastien Pouliot  <sebastien@ximian.com>
-//
-// Copyright (C) 2004-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.
-//
-
-namespace System.Security.Cryptography.X509Certificates {
-
-       [Flags]
-       public enum X500DistinguishedNameFlags {
-               None = 0,
-               Reversed = 1,
-               UseSemicolons = 16,
-               DoNotUsePlusSign = 32,
-               DoNotUseQuotes = 64,
-               UseCommas = 128,
-               UseNewLines = 256,
-               UseUTF8Encoding = 4096,
-               UseT61Encoding = 8192,
-               ForceUTF8Encoding = 16384
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs
deleted file mode 100644 (file)
index e606819..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// X509ChainStatusFlags.cs - System.Security.Cryptography.X509Certificates.X509ChainStatusFlags
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       [Flags]
-       public enum X509ChainStatusFlags {
-               NoError = 0,
-               NotTimeValid = 1,
-               NotTimeNested = 2,
-               Revoked = 4,
-               NotSignatureValid = 8,
-               NotValidForUsage = 16,
-               UntrustedRoot = 32,
-               RevocationStatusUnknown = 64,
-               Cyclic = 128,
-               InvalidExtension = 256,
-               InvalidPolicyConstraints = 512,
-               InvalidBasicConstraints = 1024,
-               InvalidNameConstraints = 2048,
-               HasNotSupportedNameConstraint = 4096,
-               HasNotDefinedNameConstraint = 8192,
-               HasNotPermittedNameConstraint = 16384,
-               HasExcludedNameConstraint = 32768,
-               PartialChain = 65536,
-               CtlNotTimeValid = 131072,
-               CtlNotSignatureValid = 262144,
-               CtlNotValidForUsage = 524288,
-               OfflineRevocation = 16777216,
-               NoIssuanceChainPolicy = 33554432,
-               ExplicitDistrust = 67108864,
-               HasNotSupportedCriticalExtension = 134217728,
-               HasWeakSignature = 1048576,
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509FindType.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509FindType.cs
deleted file mode 100644 (file)
index 244ebdd..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// X509FindType.cs - System.Security.Cryptography.X509Certificates.X509FindType
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       public enum X509FindType {
-               FindByThumbprint,
-               FindBySubjectName,
-               FindBySubjectDistinguishedName,
-               FindByIssuerName,
-               FindByIssuerDistinguishedName,
-               FindBySerialNumber,
-               FindByTimeValid,
-               FindByTimeNotYetValid,
-               FindByTimeExpired,
-               FindByTemplateName,
-               FindByApplicationPolicy,
-               FindByCertificatePolicy,
-               FindByExtension,
-               FindByKeyUsage,
-               FindBySubjectKeyIdentifier,
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509IncludeOption.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509IncludeOption.cs
deleted file mode 100644 (file)
index 48023c2..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// X509IncludeOption.cs - System.Security.Cryptography.X509IncludeOption
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       public enum X509IncludeOption {
-               None,
-               ExcludeRoot,
-               EndCertOnly,
-               WholeChain
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509KeyUsageFlags.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509KeyUsageFlags.cs
deleted file mode 100644 (file)
index a108613..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-//
-// X509KeyUsageFlags.cs - System.Security.Cryptography.X509Certificates.X509KeyUsageFlags
-//
-// 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)
-//
-// 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 SECURITY_DEP
-
-namespace System.Security.Cryptography.X509Certificates {
-
-       [Flags]
-       public enum X509KeyUsageFlags {
-               None = 0,
-               EncipherOnly = 1,
-               CrlSign = 2,
-               KeyCertSign = 4,
-               KeyAgreement = 8,
-               DataEncipherment = 16,
-               KeyEncipherment = 32,
-               NonRepudiation = 64,
-               DigitalSignature = 128,
-               DecipherOnly = 32768
-       }
-}
-
-#endif
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509NameType.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509NameType.cs
deleted file mode 100644 (file)
index 8d4e8d8..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-//
-// X509NameType.cs - System.Security.Cryptography.X509NameType
-//
-// 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)
-//
-// 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 SECURITY_DEP
-
-namespace System.Security.Cryptography.X509Certificates {
-
-       public enum X509NameType {
-               SimpleName,
-               EmailName,
-               UpnName,
-               DnsName,
-               DnsFromAlternativeName,
-               UrlName
-       }
-}
-
-#endif
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509RevocationFlag.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509RevocationFlag.cs
deleted file mode 100644 (file)
index aacfc89..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// X509RevocationFlag.cs - System.Security.Cryptography.X509Certificates.X509RevocationFlag
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       public enum X509RevocationFlag {
-               EndCertificateOnly = 0,
-               EntireChain = 1,
-               ExcludeRoot = 2
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509RevocationMode.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509RevocationMode.cs
deleted file mode 100644 (file)
index 356fea8..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// X509RevocationMode.cs - System.Security.Cryptography.X509Certificates.X509RevocationMode
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       public enum X509RevocationMode {
-               NoCheck,
-               Online,
-               Offline
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierHashAlgorithm.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierHashAlgorithm.cs
deleted file mode 100644 (file)
index 7425323..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-//
-// System.Security.Cryptography.X509Certificates.X509SubjectKeyIdentifierHashAlgorithm
-//
-// Author:
-//     Sebastien Pouliot  <sebastien@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.
-//
-
-namespace System.Security.Cryptography.X509Certificates {
-
-       public enum X509SubjectKeyIdentifierHashAlgorithm {
-               Sha1 = 0,
-               ShortSha1 = 1,
-               CapiSha1 = 2
-       }
-}
-
diff --git a/mcs/class/System/System.Security.Cryptography.X509Certificates/X509VerificationFlags.cs b/mcs/class/System/System.Security.Cryptography.X509Certificates/X509VerificationFlags.cs
deleted file mode 100644 (file)
index 17ea081..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// X509VerificationFlags.cs - System.Security.Cryptography.X509Certificates.X509VerificationFlags
-//
-// 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)
-//
-// 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.Security.Cryptography.X509Certificates {
-
-       [Flags]
-       public enum X509VerificationFlags {
-               NoFlag = 0,
-               IgnoreNotTimeValid = 1,
-               IgnoreCtlNotTimeValid = 2,
-               IgnoreNotTimeNested = 4,
-               IgnoreInvalidBasicConstraints = 8,
-               AllowUnknownCertificateAuthority = 16,
-               IgnoreWrongUsage = 32,
-               IgnoreInvalidName = 64,
-               IgnoreInvalidPolicy = 128,
-               IgnoreEndRevocationUnknown = 256,
-               IgnoreCtlSignerRevocationUnknown = 512,
-               IgnoreCertificateAuthorityRevocationUnknown = 1024,
-               IgnoreRootRevocationUnknown = 2048,
-               AllFlags = IgnoreNotTimeValid | IgnoreCtlNotTimeValid | IgnoreNotTimeNested |
-                       IgnoreInvalidBasicConstraints | AllowUnknownCertificateAuthority |
-                       IgnoreWrongUsage | IgnoreInvalidName | IgnoreInvalidPolicy | 
-                       IgnoreEndRevocationUnknown | IgnoreCtlSignerRevocationUnknown |
-                       IgnoreCertificateAuthorityRevocationUnknown | IgnoreRootRevocationUnknown
-       }
-}
-
index 0debdb9b9b47d24041064d84868dbe94c90153b9..62ae915ca3b7fce7c748b192fa2367417df3e974 100644 (file)
@@ -46,10 +46,10 @@ namespace System.Security.Permissions {
                                _flags = StorePermissionFlags.NoFlags;
                }
 
-               public StorePermission (StorePermissionFlags flags
+               public StorePermission (StorePermissionFlags flag) 
                {
                        // reuse validation by the Flags property
-                       Flags = flags;
+                       Flags = flag;
                }
 
 
@@ -129,14 +129,14 @@ namespace System.Security.Permissions {
                        return ((_flags & ~dp._flags) == 0);
                }
 
-               public override void FromXml (SecurityElement e
+               public override void FromXml (SecurityElement securityElement
                {
                        // General validation in CodeAccessPermission
-                       PermissionHelper.CheckSecurityElement (e, "e", version, version);
+                       PermissionHelper.CheckSecurityElement (securityElement, "securityElement", version, version);
                        // Note: we do not (yet) care about the return value 
                        // as we only accept version 1 (min/max values)
 
-                       string s = e.Attribute ("Flags");
+                       string s = securityElement.Attribute ("Flags");
                        if (s == null)
                                _flags = StorePermissionFlags.NoFlags;
                        else
index ab92e6a4fb2fb3cbdbd458859bef000c6a5e5182..91b5379d8c046df5c39db4c32f7b8d6c5e1c2d28 100644 (file)
@@ -16,7 +16,7 @@ using System.ComponentModel.Design;
 using System.Globalization;
 using System.Reflection;
 using System.Runtime.InteropServices;
-#if !MOBILE && !MONOMAC
+#if !MOBILE && !MONOMAC && !XAMMAC_4_5
 using System.Drawing.Design;
 #endif
 using NUnit.Framework;
@@ -1053,7 +1053,7 @@ namespace MonoTests.System.ComponentModel
                                        return attr;
                        return null;
                }
-#if !MOBILE && !MONOMAC
+#if !MOBILE && !MONOMAC && !XAMMAC_4_5
                class GetEditor_test 
                {
                        [Editor (typeof (UIEditor), typeof (UITypeEditor))]
index 8707702ce0ec0276e14ddf4fefc927fbf40d2ccd..8f2662a26788b0a241de111dcd78e8572492636c 100644 (file)
@@ -16,7 +16,7 @@ namespace MonoTests.System.ComponentModel
        [TestFixture]
        public class ToolboxItemAttributeTests
        {
-#if !MOBILE && !MONOMAC
+#if !MOBILE && !MONOMAC && !XAMMAC_4_5
                [Test]
                public void DefaultType ()
                {
index e12f53291d208b523a3b974f70e561018a4a9ea2..50b605adae75845e1af063e2718bd2bb937a45e8 100644 (file)
@@ -287,7 +287,11 @@ namespace MonoTests.System.Configuration {
                [Test]
                public void TestSettings2_Properties ()
                {
+#if XAMMAC_4_5
+                       string expected = "MonoTests.System.Configuration.ProviderPoker, xammac_net_4_5_System_test, Version=0.0.0.0";
+#else
                        string expected = "MonoTests.System.Configuration.ProviderPoker, net_4_x_System_test, Version=0.0.0.0";
+#endif
                        Assert.AreEqual (expected, new SettingsProviderAttribute (typeof (ProviderPoker)).ProviderTypeName.Substring (0, expected.Length), "#1");
                        TestSettings2 settings = new TestSettings2 ();
 
index cb3827785af4dab4ced082075e03b608d27e1861..be41016a4d2e1325995f6ca240d2c728f152f623 100644 (file)
@@ -23,6 +23,13 @@ namespace MonoTests.System.Diagnostics
        [TestFixture]
        public class ProcessTest
        {
+               static bool RunningOnUnix {
+                       get {
+                               int p = (int)Environment.OSVersion.Platform;
+                               return ((p == 128) || (p == 4) || (p == 6));
+                       }
+               }
+
                [Test]
                public void GetProcessById_MachineName_Null ()
                {
@@ -729,13 +736,6 @@ namespace MonoTests.System.Diagnostics
                        bytesRead = stm.EndRead (ar);
                }
 
-               static bool RunningOnUnix {
-                       get {
-                               int p = (int)Environment.OSVersion.Platform;
-                               return ((p == 128) || (p == 4) || (p == 6));
-                       }
-               }
-
                public int bytesRead = -1;
 
                [Test]
index 40c11663fab1e1fce0138446c343cc81a4d78519..64469915dff1cc72f5228125ee95f3d2a1bd3fc0 100644 (file)
@@ -302,14 +302,14 @@ namespace MonoTests.System.Net.Mail {
                                Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
                                Assert.IsNull (ex.InnerException, "#3");
                                Assert.IsNotNull (ex.Message, "#4");
-                               Assert.AreEqual ("info", ex.ParamName, "#5");
+                               Assert.AreEqual ("serializationInfo", ex.ParamName, "#5");
                        }
                }
        }
 
        class MySmtpException : SmtpException {
-               public MySmtpException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
+               public MySmtpException (SerializationInfo serializationInfo, StreamingContext streamingContext)
+                       : base (serializationInfo, streamingContext)
                {
                }
        }
index e3542c34f37428c53bfd338e59b298a0909ff60a..be4e5ad98315b2356d2922376cf81bcc2da8fd56 100644 (file)
@@ -59,6 +59,7 @@ public class SslStreamTest {
        }
 
        [Test] //bug https://bugzilla.novell.com/show_bug.cgi?id=457120
+       [Category ("MacNotWorking")] // Works but launches a prompt on 10.12 that will fail if you don't click in a few seconds
 #if FEATURE_NO_BSD_SOCKETS
        [ExpectedException (typeof (PlatformNotSupportedException))]
 #endif
index b19688cf44cddcd6f2c9ada44d5259c8253967e0..a9a82f94a8d3c3e3fe5b530968e405d66190c845 100644 (file)
@@ -57,7 +57,7 @@ namespace MonoTests.System.Net.WebSockets
                }
 
                [Test]
-               [Category ("MobileNotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
+               [Category ("NotWorking")] // Fails when ran as part of the entire BCL test suite. Works when only this fixture is ran
                public void ServerHandshakeReturnCrapStatusCodeTest ()
                {
                        // On purpose, 
@@ -149,7 +149,7 @@ namespace MonoTests.System.Net.WebSockets
                        Assert.AreEqual (WebSocketState.CloseSent, socket.State);
 
                        var resp = socket.ReceiveAsync (new ArraySegment<byte> (new byte[0]), CancellationToken.None).Result;
-                       Assert.AreEqual (WebSocketState.Closed, socket.State);
+                       Assert.AreEqual (WebSocketState.CloseReceived, socket.State);
                        Assert.AreEqual (WebSocketMessageType.Close, resp.MessageType);
                        Assert.AreEqual (WebSocketCloseStatus.NormalClosure, resp.CloseStatus);
                        Assert.AreEqual (string.Empty, resp.CloseStatusDescription);
@@ -211,7 +211,7 @@ namespace MonoTests.System.Net.WebSockets
                                Assert.IsTrue (socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (5000));
                                Assert.IsTrue (socket.ReceiveAsync (new ArraySegment<byte> (new byte[0]), CancellationToken.None).Wait (5000));
                        } catch (AggregateException e) {
-                               AssertWebSocketException (e, WebSocketError.Success);
+                               AssertWebSocketException (e, WebSocketError.InvalidState);
                                return;
                        }
                        Assert.Fail ("Should have thrown");
@@ -226,7 +226,7 @@ namespace MonoTests.System.Net.WebSockets
                                Assert.IsTrue (socket.CloseAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (5000));
                                Assert.IsTrue (socket.SendAsync (new ArraySegment<byte> (new byte[0]), WebSocketMessageType.Text, true, CancellationToken.None).Wait (5000));
                        } catch (AggregateException e) {
-                               AssertWebSocketException (e, WebSocketError.Success);
+                               AssertWebSocketException (e, WebSocketError.InvalidState);
                                return;
                        }
                        Assert.Fail ("Should have thrown");
@@ -241,7 +241,7 @@ namespace MonoTests.System.Net.WebSockets
                                Assert.IsTrue (socket.CloseOutputAsync (WebSocketCloseStatus.NormalClosure, string.Empty, CancellationToken.None).Wait (5000));
                                Assert.IsTrue (socket.SendAsync (new ArraySegment<byte> (new byte[0]), WebSocketMessageType.Text, true, CancellationToken.None).Wait (5000));
                        } catch (AggregateException e) {
-                               AssertWebSocketException (e, WebSocketError.Success);
+                               AssertWebSocketException (e, WebSocketError.InvalidState);
                                return;
                        }
                        Assert.Fail ("Should have thrown");
@@ -296,7 +296,6 @@ namespace MonoTests.System.Net.WebSockets
                void AssertWebSocketException (AggregateException e, WebSocketError error, Type inner = null)
                {
                        var wsEx = e.InnerException as WebSocketException;
-                       Console.WriteLine (e.InnerException.ToString ());
                        Assert.IsNotNull (wsEx, "Not a websocketexception");
                        Assert.AreEqual (error, wsEx.WebSocketErrorCode);
                        if (inner != null) {
index b2c8e90488c059be03460d907142b53827d3a03f..ffa7f6359e5cd5ec17d70cc0701ff96b41e6d76f 100644 (file)
@@ -286,7 +286,7 @@ namespace MonoTests.System.Net
                                WebHeaderCollection headers = resp.Headers;
                                Assert.AreEqual (6, headers.Count, "#1");
                                Assert.AreEqual ("9", headers ["Content-Length"], "#2");
-                               Assert.AreEqual ("utf-8", headers ["Content-Encoding"], "#3");
+                               Assert.AreEqual ("identity", headers ["Content-Encoding"], "#3");
                                Assert.AreEqual ("text/xml; charset=UTF-8", headers ["Content-Type"], "#4");
                                Assert.AreEqual ("Wed, 08 Jan 2003 23:11:55 GMT", headers ["Last-Modified"], "#5");
                                Assert.AreEqual ("UserID=Miguel,StoreProfile=true", headers ["Set-Cookie"], "#6");
@@ -510,7 +510,7 @@ namespace MonoTests.System.Net
                        sw.WriteLine ("HTTP/1.0 200 OK");
                        sw.WriteLine ("Server: Mono/Test");
                        sw.WriteLine ("Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT");
-                       sw.WriteLine ("Content-Encoding: " + Encoding.UTF8.WebName);
+                       sw.WriteLine ("Content-Encoding: identity");
                        sw.WriteLine ("Content-Type: text/xml; charset=UTF-8");
                        sw.WriteLine ("Content-Length: 9");
                        sw.WriteLine ("Set-Cookie: UserID=Miguel");
@@ -521,6 +521,30 @@ namespace MonoTests.System.Net
 
                        return Encoding.UTF8.GetBytes (sw.ToString ());
                }
+
+               internal static byte [] GzipResponseHandler (Socket socket)
+               {
+                       StringWriter sw = new StringWriter ();
+                       sw.NewLine = "\r\n";
+                       sw.WriteLine ("HTTP/1.0 200 OK");
+                       sw.WriteLine ("Server: Mono/Test");
+                       sw.WriteLine ("Content-Encoding: gzip");
+                       sw.WriteLine ("Content-Type: text/xml; charset=UTF-8");
+                       sw.WriteLine ();
+                       sw.Flush ();
+
+                       var gzipDummyXml = new byte[] {
+                               0x1f, 0x8b, 0x08, 0x08, 0xb6, 0xb1, 0xd3, 0x58, 0x00, 0x03, 0x74, 0x65, 0x73, 0x74, 0x67, 0x7a,
+                               0x00, 0xb3, 0x49, 0x29, 0xcd, 0xcd, 0xad, 0x54, 0xd0, 0xb7, 0x03, 0x00, 0xed, 0x55, 0x32, 0xec,
+                               0x09, 0x00, 0x00, 0x00 };
+                       var header = Encoding.UTF8.GetBytes (sw.ToString ());
+                       
+                       var response = new byte[gzipDummyXml.Length + header.Length];
+                       header.CopyTo(response, 0);
+                       gzipDummyXml.CopyTo(response, header.Length);
+
+                       return response;
+               }
        }
 
        [TestFixture]
@@ -1193,5 +1217,38 @@ namespace MonoTests.System.Net
                                }
                        }
                }
+
+
+               [Test]
+#if FEATURE_NO_BSD_SOCKETS
+               [ExpectedException (typeof (PlatformNotSupportedException))]
+#endif
+               public void AutomaticDecompression ()
+               {
+                       IPEndPoint ep = NetworkHelpers.LocalEphemeralEndPoint();
+                       string url = "http://" + ep.ToString () + "/test/";
+
+                       using (SocketResponder responder = new SocketResponder (ep, s => HttpWebResponseTest.GzipResponseHandler (s))) {
+                               HttpWebRequest req = (HttpWebRequest) WebRequest.Create (url);
+                               req.Method = "GET";
+                               req.Timeout = 2000;
+                               req.ReadWriteTimeout = 2000;
+                               req.KeepAlive = false;
+                               req.AutomaticDecompression = DecompressionMethods.GZip;
+
+                               using (HttpWebResponse resp = (HttpWebResponse) req.GetResponse ()) {
+                                       Stream rs = resp.GetResponseStream ();
+                                       byte [] buffer = new byte [24];
+                                       try {
+                                               // read full response
+                                               Assert.AreEqual (9, rs.Read (buffer, 0, buffer.Length));
+                                               Assert.IsNull (resp.Headers[HttpRequestHeader.ContentEncoding]);
+                                       } finally {
+                                               rs.Close ();
+                                               req.Abort ();
+                                       }
+                               }
+                       }
+               }
        }
 }
index d8eed04fda125dc400e69cd7b7916d3625f9fff5..869154d63069df697cb35306539d66bbbb6a1260 100644 (file)
@@ -587,6 +587,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
                }
 
                [Test]
+               [Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
                [ExpectedException (typeof (CryptographicException))]
                public void Pkcs12_1_WithoutPassword ()
                {
@@ -601,6 +602,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
                }
 
                [Test]
+               [Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
                public void Pkcs12_2_Properties ()
                {
                        CheckPkcs12 (new X509Certificate (farscape_nopwd_pfx));
@@ -732,6 +734,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
 
                [Test]
                [ExpectedException (typeof (CryptographicException))]
+               [Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
                public void Pkcs7_Ctor ()
                {
                        new X509Certificate (farscape_pkcs7);
@@ -739,6 +742,7 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw==
 
                [Test]
                [ExpectedException (typeof (CryptographicException))]
+               [Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
                public void Pkcs7_Import ()
                {
                        X509Certificate x = new X509Certificate ();
index 15322fe8fc26a42a87007a96db58e7da3639c757..d267172d5b6fc081f5b26a7e615e9354f7ae8d04 100644 (file)
@@ -155,18 +155,6 @@ System.Net.Sockets/SocketReceiveFromResult.cs
 System.Net.Sockets/SocketReceiveMessageFromResult.cs
 System.Net.Sockets/SocketTaskExtensions.cs
 
-System.Net.WebSockets/ClientWebSocket.cs
-System.Net.WebSockets/ClientWebSocketOptions.cs
-System.Net.WebSockets/HttpListenerWebSocketContext.cs
-System.Net.WebSockets/WebSocket.cs
-System.Net.WebSockets/WebSocketCloseStatus.cs
-System.Net.WebSockets/WebSocketContext.cs
-System.Net.WebSockets/WebSocketError.cs
-System.Net.WebSockets/WebSocketException.cs
-System.Net.WebSockets/WebSocketMessageType.cs
-System.Net.WebSockets/WebSocketReceiveResult.cs
-System.Net.WebSockets/WebSocketState.cs
-
 System.Runtime.InteropServices.ComTypes/ADVF.cs
 System.Runtime.InteropServices.ComTypes/DATADIR.cs
 System.Runtime.InteropServices.ComTypes/DVASPECT.cs
@@ -204,13 +192,13 @@ System.Security.Cryptography/AsnEncodedData.cs
 System.Security.Cryptography/AsnEncodedDataCollection.cs
 System.Security.Cryptography/AsnEncodedDataEnumerator.cs
 
-System.Security.Cryptography.X509Certificates/OpenFlags.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/OpenFlags.cs
 System.Security.Cryptography.X509Certificates/OSX509Certificates.cs
 System.Security.Cryptography.X509Certificates/PublicKey.cs
-System.Security.Cryptography.X509Certificates/StoreLocation.cs
-System.Security.Cryptography.X509Certificates/StoreName.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/StoreLocation.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/StoreName.cs
 System.Security.Cryptography.X509Certificates/X500DistinguishedName.cs
-System.Security.Cryptography.X509Certificates/X500DistinguishedNameFlags.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X500DistinguishedNameFlags.cs
 System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtension.cs
 System.Security.Cryptography.X509Certificates/X509Certificate2.cs
 System.Security.Cryptography.X509Certificates/X509Certificate2Collection.cs
@@ -227,23 +215,23 @@ System.Security.Cryptography.X509Certificates/X509ChainImpl.cs
 System.Security.Cryptography.X509Certificates/X509ChainImplMono.cs
 System.Security.Cryptography.X509Certificates/X509ChainPolicy.cs
 System.Security.Cryptography.X509Certificates/X509ChainStatus.cs
-System.Security.Cryptography.X509Certificates/X509ChainStatusFlags.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ChainStatusFlags.cs
 System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs
 System.Security.Cryptography.X509Certificates/X509Extension.cs
 System.Security.Cryptography.X509Certificates/X509ExtensionCollection.cs
 System.Security.Cryptography.X509Certificates/X509ExtensionEnumerator.cs
-System.Security.Cryptography.X509Certificates/X509FindType.cs
-System.Security.Cryptography.X509Certificates/X509IncludeOption.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509FindType.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509IncludeOption.cs
 System.Security.Cryptography.X509Certificates/X509Helper2.cs
 System.Security.Cryptography.X509Certificates/X509KeyUsageExtension.cs
-System.Security.Cryptography.X509Certificates/X509KeyUsageFlags.cs
-System.Security.Cryptography.X509Certificates/X509NameType.cs
-System.Security.Cryptography.X509Certificates/X509RevocationFlag.cs
-System.Security.Cryptography.X509Certificates/X509RevocationMode.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509KeyUsageFlags.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509NameType.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509RevocationFlag.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509RevocationMode.cs
 System.Security.Cryptography.X509Certificates/X509Store.cs
 System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtension.cs
-System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierHashAlgorithm.cs
-System.Security.Cryptography.X509Certificates/X509VerificationFlags.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509SubjectKeyIdentifierHashAlgorithm.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509VerificationFlags.cs
 
 System.Threading/ThreadExceptionEventArgs.cs
 System.Threading/ThreadExceptionEventHandler.cs
@@ -292,6 +280,20 @@ Mono.Btls/X509ChainImplBtls.cs
 
 Mono.Http/NtlmClient.cs
 
+Mono.AppleTls/AppleCertificateHelper.cs
+Mono.AppleTls/AppleTlsContext.cs
+Mono.AppleTls/AppleTlsProvider.cs
+Mono.AppleTls/AppleTlsStream.cs
+Mono.AppleTls/INativeObject.cs
+Mono.AppleTls/Certificate.cs
+Mono.AppleTls/ImportExport.cs
+Mono.AppleTls/Enums.cs
+Mono.AppleTls/SecureTransport.cs
+Mono.AppleTls/Policy.cs
+Mono.AppleTls/Trust.cs
+Mono.AppleTls/SslConnection.cs
+Mono.AppleTls/Items.cs
+
 Mono.Net.Security/AsyncProtocolRequest.cs
 Mono.Net.Security/CallbackHelpers.cs
 Mono.Net.Security/ChainValidationHelper.cs
@@ -311,6 +313,8 @@ Mono.Net.Security/SystemCertificateValidator.cs
 
 Mono.Util/MonoPInvokeCallbackAttribute.cs
 
+MonoTouch/Dummy.cs
+
 ReferenceSources/AutoWebProxyScriptEngine.cs
 ReferenceSources/AssertWrapper.cs
 ReferenceSources/CAPI.cs
@@ -911,12 +915,28 @@ ReferenceSources/Win32Exception.cs
 
 corefx/SR.cs
 
+../../../external/corefx/src/Common/src/System/StringExtensions.cs
+
 ../../../external/corefx/src/Common/src/System/Collections/Generic/ArrayBuilder.cs
 ../../../external/corefx/src/Common/src/System/Collections/Generic/EnumerableHelpers.cs
 ../../../external/corefx/src/Common/src/System/Collections/Generic/LargeArrayBuilder.cs
 
+../../../external/corefx/src/Common/src/System/Net/SecurityProtocol.cs
+../../../external/corefx/src/Common/src/System/Net/UriScheme.cs
+
+../../../external/corefx/src/Common/src/System/Net/Logging/NetEventSource.Common.cs
+
+../../../external/corefx/src/Common/src/System/Net/WebSockets/ManagedWebSocket.cs
+../../../external/corefx/src/Common/src/System/Net/WebSockets/WebSocketValidate.cs
+
 ../../../external/corefx/src/System.Runtime/src/System/Collections/Generic/ISet.cs
 
+../../../external/corefx/src/System.Buffers/src/System/Buffers/ArrayPool.cs
+../../../external/corefx/src/System.Buffers/src/System/Buffers/ArrayPoolEventSource.cs
+../../../external/corefx/src/System.Buffers/src/System/Buffers/DefaultArrayPool.cs
+../../../external/corefx/src/System.Buffers/src/System/Buffers/DefaultArrayPoolBucket.cs
+../../../external/corefx/src/System.Buffers/src/System/Buffers/Utilities.cs
+
 ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/BitHelper.cs
 ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/ICollectionDebugView.cs
 ../../../external/corefx/src/System.Collections/src/System/Collections/Generic/IDictionaryDebugView.cs
@@ -939,4 +959,19 @@ corefx/SR.cs
 ../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/CompressionMode.cs
 ../../../external/corefx/src/System.IO.Compression/src/System/IO/Compression/GZipStream.cs
 
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocket.cs
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketCloseStatus.cs
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketContext.cs
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketError.cs
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketException.cs
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketMessageType.cs
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketReceiveResult.cs
+../../../external/corefx/src/System.Net.WebSockets/src/System/Net/WebSockets/WebSocketState.cs
+
+../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocket.cs
+../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/ClientWebSocketOptions.cs
+../../../external/corefx/src/System.Net.WebSockets.Client/src/System/Net/WebSockets/WebSocketHandle.Managed.cs
+
+../../../external/corefx/src/System.Net.HttpListener/src/System/Net/WebSockets/HttpListenerWebSocketContext.cs
+
 ../../../external/corefx/src/System.Runtime.Extensions/src/System/CodeDom/Compiler/IndentedTextWriter.cs
index d4b44ad444f0da93bb11458becea41b652001cc9..733acc5e21fad3d1d77a5ac1bebab195665aa426 100644 (file)
@@ -79,4 +79,5 @@ partial class SR
        public const string Serialization_MismatchedCount = "The serialized Count information doesn't match the number of items.";
        public const string Serialization_MissingKeys = "The keys for this dictionary are missing.";
        public const string Serialization_MissingValues = "The values for this dictionary are missing.";
+       public const string ArgumentException_BufferNotFromPool = "The buffer is not associated with this pool and may not be returned to it.";
 }
index 8b8f4861a488d7957b9a118b03a014a26bc3a08d..7c22e74e3db8d1bcc6470160832700bbba99a4f4 100644 (file)
@@ -11,7 +11,6 @@ Microsoft.Win32/SystemEventsCas.cs
 Microsoft.Win32/TimerElapsedEventArgsCas.cs
 Microsoft.Win32/UserPreferenceChangedEventArgsCas.cs
 Microsoft.Win32/UserPreferenceChangingEventArgsCas.cs
-System.Collections.Concurrent/CollectionStressTestHelper.cs
 System.Collections.Specialized/BitVector32Cas.cs
 System.Collections.Specialized/CollectionsUtilCas.cs
 System.Collections.Specialized/HybridDictionaryCas.cs
index beb6f2415cf1c7c2da9e4ba40f1a04757013f3b9..fe68fff758f91170508456245fee3a8f194fabee 100644 (file)
@@ -1 +1,2 @@
 #include net_4_x_System.dll.sources
+Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
index 7ff0ef376d6f63153adf2fa6ee3212817ca291b2..cf8634c54b77cc4e78c85dfdcd194d4267aeffee 100644 (file)
@@ -27,6 +27,6 @@ using System;
 
 namespace System.ComponentModel {
 
-       public delegate void CurrentChangingEventHandler (object sender, CurrentChangingEventArgs args);
+       public delegate void CurrentChangingEventHandler (object sender, CurrentChangingEventArgs e);
 
 }
diff --git a/mcs/class/Xunit.NetCore.Extensions/Makefile b/mcs/class/Xunit.NetCore.Extensions/Makefile
new file mode 100644 (file)
index 0000000..5be627d
--- /dev/null
@@ -0,0 +1,17 @@
+thisdir = class/Xunit.NetCore.Extensions
+SUBDIRS = 
+include ../../build/rules.make
+
+XUNIT_LIBS := xunit.core xunit.abstractions xunit.execution.desktop xunit.assert
+
+LIBRARY = Xunit.NetCore.Extensions.dll
+LIB_REFS = System System.Core System.Runtime.InteropServices.RuntimeInformation Facades/System.Runtime Facades/System.Threading.Tasks
+LIB_MCS_FLAGS = $(patsubst %,-r:$(topdir)/../external/xunit-binaries/%.dll,$(XUNIT_LIBS))
+
+EXTRA_DISTFILES =
+
+NO_TEST = yes
+NO_INSTALL = yes
+NO_SIGN_ASSEMBLY = yes
+
+include ../../build/library.make
diff --git a/mcs/class/Xunit.NetCore.Extensions/Microsoft.Xunit.Performance/BenchmarkAttribute.cs b/mcs/class/Xunit.NetCore.Extensions/Microsoft.Xunit.Performance/BenchmarkAttribute.cs
new file mode 100644 (file)
index 0000000..5697d10
--- /dev/null
@@ -0,0 +1,13 @@
+using System;
+using Xunit;
+using Xunit.Sdk;
+
+namespace Microsoft.Xunit.Performance
+{
+       [TraitDiscoverer("Microsoft.Xunit.Performance.BenchmarkDiscoverer", "Xunit.NetCore.Extensions")]
+       [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
+       public class BenchmarkAttribute : Attribute, ITraitAttribute
+       {
+               public long InnerIterationCount { get; set; }
+       }
+}
diff --git a/mcs/class/Xunit.NetCore.Extensions/Microsoft.Xunit.Performance/BenchmarkDiscover.cs b/mcs/class/Xunit.NetCore.Extensions/Microsoft.Xunit.Performance/BenchmarkDiscover.cs
new file mode 100644 (file)
index 0000000..40d2d8a
--- /dev/null
@@ -0,0 +1,14 @@
+using System.Collections.Generic;
+using Xunit.Sdk;
+using Xunit.Abstractions;
+
+namespace Xunit.NetCore.Extensions
+{
+    public class BenchmarkDiscoverer : ITraitDiscoverer
+    {
+        public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
+        {
+            yield return new KeyValuePair<string, string>("Benchmark", "True");
+        }
+    }
+}
diff --git a/mcs/class/Xunit.NetCore.Extensions/Xunit.NetCore.Extensions.dll.sources b/mcs/class/Xunit.NetCore.Extensions/Xunit.NetCore.Extensions.dll.sources
new file mode 100644 (file)
index 0000000..145dae4
--- /dev/null
@@ -0,0 +1,6 @@
+../../../external/buildtools/src/xunit.netcore.extensions/*.cs
+../../../external/buildtools/src/xunit.netcore.extensions/Attributes/*.cs
+../../../external/buildtools/src/xunit.netcore.extensions/Discoverers/*.cs
+
+Microsoft.Xunit.Performance/BenchmarkAttribute.cs
+Microsoft.Xunit.Performance/BenchmarkDiscover.cs
index 7a765d35b5504cc6049d5d5591988d3e8da169bd..6475f6f271acf51e328cff87ea062042f70a422f 100644 (file)
@@ -1,3 +1,4 @@
+#if MONO_FEATURE_APPLETLS || MONO_FEATURE_APPLE_X509
 using System;
 using System.Runtime.InteropServices;
 
@@ -108,3 +109,4 @@ namespace XamMac.CoreFoundation
                }
        }
 }
+#endif
index 19b9392fc781fcc43d1aab962c74c3f167b36d2e..ba8f3e4015ec7ea8b546a4e9e4c9a07616ef8f15 100644 (file)
@@ -72,6 +72,18 @@ ifndef NO_CONSOLE
 LIB_MCS_FLAGS += -d:MONO_FEATURE_CONSOLE
 endif
 
+ifdef MONO_FEATURE_APPLETLS
+LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLETLS
+endif
+
+ifdef ONLY_APPLETLS
+LIB_MCS_FLAGS += -d:ONLY_APPLETLS
+endif
+
+ifdef MONO_FEATURE_APPLE_X509
+LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLE_X509
+endif
+
 WARNING_ABOUT_DISABLED_WARNING=1635
 LOCAL_MCS_FLAGS = -unsafe -nostdlib -nowarn:612,618,$(WARNING_ABOUT_DISABLED_WARNING) -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC $(REFERENCE_SOURCES_FLAGS)
 DEFAULT_REFERENCES =
index d0b1473c7cd6d77edfae7bebbae07c837c7f9b7a..d124a93f25676f4965d892faf0848db55c460b5f 100644 (file)
@@ -794,6 +794,13 @@ namespace System
                        }
                }
 
+               public override bool IsSZArray {
+                       get {
+                               // TODO: intrinsic
+                               return IsArray && ReferenceEquals (this, GetElementType ().MakeArrayType ());
+                       }
+               }
+
                internal override bool IsUserType {
                        get {
                                return false;
index 718aadc3f374ab1ba539160635b4c594da13b2ab..3ffe8ee3f82ee700e05d89ab1af433806aee68a4 100644 (file)
@@ -1,3 +1,4 @@
+#if MONO_FEATURE_APPLETLS || MONO_FEATURE_APPLE_X509
 using System;
 using System.Text;
 using System.Runtime.InteropServices;
@@ -197,3 +198,4 @@ namespace System.Security.Cryptography.X509Certificates
                }
        }
 }
+#endif
diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509ContentType.cs
deleted file mode 100644 (file)
index 3467dc8..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-//
-// System.Security.Cryptography.X509Certificates.X509ContentType.cs
-//
-// Author:
-//     Sebastien Pouliot  <sebastien@ximian.com>
-//
-// Copyright (C) 2004-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.Runtime.InteropServices;
-
-namespace System.Security.Cryptography.X509Certificates {
-
-// Note: Definitions are useful for 1.0 and 1.1 so we declare them internal
-
-       [ComVisible (true)]
-       public
-       enum X509ContentType {
-               Unknown,
-               Cert,
-               // not supported by Silverlight 2.0 (MOBILE)
-               SerializedCert,
-               Pfx,
-               SerializedStore,
-               Pkcs7,
-               Authenticode,
-               Pkcs12 = Pfx
-       }
-}
index 995865a3c623a43dee23dfc4b208b99acfa6b759..410f94674443d0cc9118ba8c47d4101f55595c5e 100644 (file)
@@ -1,3 +1,4 @@
+#if MONO_FEATURE_APPLETLS || MONO_FEATURE_APPLE_X509
 using System;
 using System.Runtime.InteropServices;
 using MX = Mono.Security.X509;
@@ -7,12 +8,12 @@ namespace System.Security.Cryptography.X509Certificates
 {
        static partial class X509Helper
        {
-               public static X509CertificateImpl InitFromHandle (IntPtr handle)
+               public static X509CertificateImpl InitFromHandleApple (IntPtr handle)
                {
                        return new X509CertificateImplApple (handle, false);
                }
 
-               static X509CertificateImpl Import (byte[] rawData)
+               static X509CertificateImpl ImportApple (byte[] rawData)
                {
                        var handle = CFHelpers.CreateCertificateFromData (rawData);
                        if (handle != IntPtr.Zero)
@@ -35,3 +36,4 @@ namespace System.Security.Cryptography.X509Certificates
                }
        }
 }
+#endif
index 8bdd3db4daa29b51bf198b0379ff2b5df3b68e8d..4272f8d2e0bd6f09ad6eaabebd506c883bcab2c5 100644 (file)
@@ -49,6 +49,51 @@ namespace System.Security.Cryptography.X509Certificates
                                Interlocked.CompareExchange (ref nativeHelper, helper, null);
                }
 
+#if MONO_FEATURE_APPLETLS
+               static bool ShouldUseAppleTls
+               {
+                       get
+                       {
+                               if (!System.Environment.IsMacOS)
+                                       return false;
+                               // MONO_TLS_PROVIDER values default or apple (not legacy or btls) and must be on MacOS
+                               var variable = Environment.GetEnvironmentVariable ("MONO_TLS_PROVIDER");
+                               return string.IsNullOrEmpty (variable) || variable == "default" || variable == "apple"; // On Platform.IsMacOS default is AppleTlsProvider
+                       }
+               }
+#endif
+
+               public static X509CertificateImpl InitFromHandle (IntPtr handle)
+               {
+#if (MONO_FEATURE_APPLETLS && ONLY_APPLETLS) || MONO_FEATURE_APPLE_X509 // ONLY_APPLETLS should not support any other option
+                       return InitFromHandleApple (handle);
+#else
+
+#if MONO_FEATURE_APPLETLS // If we support AppleTls, which is the default, and not overriding to legacy
+                       if (ShouldUseAppleTls)
+                               return InitFromHandleApple (handle);
+#endif
+#if !MOBILE
+                       return InitFromHandleCore (handle);
+#elif !MONOTOUCH && !XAMMAC
+                       throw new NotSupportedException ();
+#endif
+#endif
+               }
+
+               static X509CertificateImpl Import (byte[] rawData)
+               {
+#if (MONO_FEATURE_APPLETLS && ONLY_APPLETLS) || MONO_FEATURE_APPLE_X509 // ONLY_APPLETLS should not support any other option
+                       return ImportApple (rawData);
+#else
+#if MONO_FEATURE_APPLETLS
+                       if (ShouldUseAppleTls)
+                               return ImportApple (rawData);
+#endif
+                       return ImportCore (rawData);
+#endif
+               }
+
 #if !MOBILE
                // typedef struct _CERT_CONTEXT {
                //      DWORD                   dwCertEncodingType;
@@ -70,7 +115,7 @@ namespace System.Security.Cryptography.X509Certificates
                // so we don't create any dependencies on Windows DLL in corlib
 
                [SecurityPermission (SecurityAction.Demand, UnmanagedCode = true)]
-               public static X509CertificateImpl InitFromHandle (IntPtr handle)
+               public static X509CertificateImpl InitFromHandleCore (IntPtr handle)
                {
                        // both Marshal.PtrToStructure and Marshal.Copy use LinkDemand (so they will always success from here)
                        CertificateContext cc = (CertificateContext) Marshal.PtrToStructure (handle, typeof (CertificateContext));
@@ -79,11 +124,6 @@ namespace System.Security.Cryptography.X509Certificates
                        var x509 = new MX.X509Certificate (data);
                        return new X509CertificateImplMono (x509);
                }
-#elif !MONOTOUCH && !XAMMAC
-               public static X509CertificateImpl InitFromHandle (IntPtr handle)
-               {
-                       throw new NotSupportedException ();
-               }
 #endif
 
                public static X509CertificateImpl InitFromCertificate (X509Certificate cert)
@@ -175,8 +215,7 @@ namespace System.Security.Cryptography.X509Certificates
                        return data;
                }
 
-#if !MONOTOUCH && !XAMMAC
-               static X509CertificateImpl Import (byte[] rawData)
+               static X509CertificateImpl ImportCore (byte[] rawData)
                {
                        MX.X509Certificate x509;
                        try {
@@ -193,7 +232,6 @@ namespace System.Security.Cryptography.X509Certificates
 
                        return new X509CertificateImplMono (x509);
                }
-#endif
 
                public static X509CertificateImpl Import (byte[] rawData, string password, X509KeyStorageFlags keyStorageFlags)
                {
diff --git a/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs b/mcs/class/corlib/System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs
deleted file mode 100644 (file)
index 9d4c286..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-//
-// System.Security.Cryptography.X509Certificates.X509KeyStorageFlags.cs
-//
-// Author:
-//     Sebastien Pouliot  <sebastien@ximian.com>
-//
-// Copyright (C) 2004-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.Runtime.InteropServices;
-
-namespace System.Security.Cryptography.X509Certificates {
-
-       [Flags]
-       [Serializable]
-       [ComVisible (true)]
-       public enum X509KeyStorageFlags {
-               DefaultKeySet = 0,
-               // not supported by Silverlight 2.0 (MOBILE)
-               UserKeySet = 1,
-               MachineKeySet = 2,
-               Exportable = 4,
-               UserProtected = 8,
-               PersistKeySet = 16 
-       }
-}
-
index f09b9fe7e551c33a006f27bf3fa1300258b73e04..dd91330355ed355081c3778ece51e449cb73c7ef 100644 (file)
@@ -45,6 +45,8 @@ namespace System.Threading
        {
                protected static readonly IntPtr InvalidHandle = (IntPtr) (-1);
 
+               internal const int MaxWaitHandles = 64;
+
                static int WaitMultiple(WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext, bool WaitAll)
                {
                        int release_last = -1;
index d2565a3c209a771fa2ad03c1a5b423c87ea06d9c..91b3709e63f41f430c71bc1e8bd29bbdb12cf979 100644 (file)
@@ -46,11 +46,7 @@ using System.Reflection.Emit;
 
 namespace System
 {
-       [Serializable]
-       [ComVisible (true)]
-       // FIXME: We are doing way to many double/triple exception checks for the overloaded functions"
-       public abstract class Array : ICloneable, ICollection, IList, IEnumerable
-               , IStructuralComparable, IStructuralEquatable
+       public abstract partial class Array
        {
                // Constructor
                private Array ()
@@ -118,6 +114,25 @@ namespace System
                        return false;
                }
 
+               int IList.IndexOf (object value)
+               {
+                       if (this.Rank > 1)
+                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
+
+                       int length = this.Length;
+                       for (int i = 0; i < length; i++) {
+                               if (Object.Equals (this.GetValueImpl (i), value))
+                                       // array index may not be zero-based.
+                                       // use lower bound
+                                       return i + this.GetLowerBound (0);
+                       }
+
+                       unchecked {
+                               // lower bound may be MinValue
+                               return this.GetLowerBound (0) - 1;
+                       }
+               }
+
                internal void InternalArray__ICollection_CopyTo<T> (T[] array, int index)
                {
                        if (array == null)
@@ -289,12 +304,6 @@ namespace System
                        }
                }
 
-               [ComVisible (false)]
-               public long LongLength {
-                       [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
-                       get { return Length; }
-               }
-
                public int Rank {
                        [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
                        get {
@@ -302,82 +311,6 @@ namespace System
                        }
                }
 
-               // IList interface
-               object IList.this [int index] {
-                       get {
-                               if (unchecked ((uint) index) >= unchecked ((uint) Length))
-                                       throw new IndexOutOfRangeException ("index");
-                               if (this.Rank > 1)
-                                       throw new ArgumentException (Locale.GetText ("Only single dimension arrays are supported."));
-                               return GetValueImpl (index);
-                       } 
-                       set {
-                               if (unchecked ((uint) index) >= unchecked ((uint) Length))
-                                       throw new IndexOutOfRangeException ("index");
-                               if (this.Rank > 1)
-                                       throw new ArgumentException (Locale.GetText ("Only single dimension arrays are supported."));
-                               SetValueImpl (value, index);
-                       }
-               }
-
-               int IList.Add (object value)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               void IList.Clear ()
-               {
-                       Array.Clear (this, this.GetLowerBound (0), this.Length);
-               }
-
-               bool IList.Contains (object value)
-               {
-                       if (this.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       int length = this.Length;
-                       for (int i = 0; i < length; i++) {
-                               if (Object.Equals (this.GetValueImpl (i), value))
-                                       return true;
-                       }
-                       return false;
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               int IList.IndexOf (object value)
-               {
-                       if (this.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       int length = this.Length;
-                       for (int i = 0; i < length; i++) {
-                               if (Object.Equals (this.GetValueImpl (i), value))
-                                       // array index may not be zero-based.
-                                       // use lower bound
-                                       return i + this.GetLowerBound (0);
-                       }
-
-                       unchecked {
-                               // lower bound may be MinValue
-                               return this.GetLowerBound (0) - 1;
-                       }
-               }
-
-               void IList.Insert (int index, object value)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               void IList.Remove (object value)
-               {
-                       throw new NotSupportedException ();
-               }
-
-               void IList.RemoveAt (int index)
-               {
-                       throw new NotSupportedException ();
-               }
-
                // InternalCall Methods
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                extern int GetRank ();
@@ -385,12 +318,6 @@ namespace System
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                public extern int GetLength (int dimension);
 
-               [ComVisible (false)]
-               public long GetLongLength (int dimension)
-               {
-                       return GetLength (dimension);
-               }
-
                [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                public extern int GetLowerBound (int dimension);
@@ -415,101 +342,12 @@ namespace System
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                internal extern static Array CreateInstanceImpl (Type elementType, int[] lengths, int[] bounds);
 
-               // Properties
-               int ICollection.Count {
-                       get {
-                               return Length;
-                       }
-               }
-
-               public bool IsSynchronized {
-                       get {
-                               return false;
-                       }
-               }
-
-               public object SyncRoot {
-                       get {
-                               return this;
-                       }
-               }
-
-               public bool IsFixedSize {
-                       get {
-                               return true;
-                       }
-               }
-
                public bool IsReadOnly {
                        get {
                                return false;
                        }
                }
 
-               public IEnumerator GetEnumerator ()
-               {
-                       return new SimpleEnumerator (this);
-               }
-
-               int IStructuralComparable.CompareTo (object other, IComparer comparer)
-               {
-                       if (other == null)
-                               return 1;
-
-                       Array arr = other as Array;
-                       if (arr == null)
-                               throw new ArgumentException ("Not an array", "other");
-
-                       int len = GetLength (0);
-                       if (len != arr.GetLength (0))
-                               throw new ArgumentException ("Not of the same length", "other");
-
-                       if (Rank > 1)
-                               throw new ArgumentException ("Array must be single dimensional");
-
-                       if (arr.Rank > 1)
-                               throw new ArgumentException ("Array must be single dimensional", "other");
-
-                       for (int i = 0; i < len; ++i) {
-                               object a = GetValue (i);
-                               object b = arr.GetValue (i);
-                               int r = comparer.Compare (a, b);
-                               if (r != 0)
-                                       return r;
-                       }
-                       return 0;
-               }
-
-               bool IStructuralEquatable.Equals (object other, IEqualityComparer comparer)
-               {
-                       Array o = other as Array;
-                       if (o == null || o.Length != Length)
-                               return false;
-
-                       if (Object.ReferenceEquals (other, this))
-                               return true;
-
-                       for (int i = 0; i < Length; i++) {
-                               object this_item = this.GetValue (i);
-                               object other_item = o.GetValue (i);
-                               if (!comparer.Equals (this_item, other_item))
-                                       return false;
-                       }
-                       return true;
-               }
-
-               int IStructuralEquatable.GetHashCode (IEqualityComparer comparer)
-               {
-                       if (comparer == null)
-                               throw new ArgumentNullException ("comparer");
-
-                       int hash = 0;
-                       for (int i = 0; i < Length; i++)
-                               hash = ((hash << 7) + hash) ^ comparer.GetHashCode (GetValueImpl (i));
-                       return hash;
-               }
-
                [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
                public int GetUpperBound (int dimension)
                {
@@ -539,48 +377,6 @@ namespace System
                        return GetValue (ind);
                }
 
-               [ComVisible (false)]
-               public object GetValue (long index)
-               {
-                       if (index < 0 || index > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("index", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       return GetValue ((int) index);
-               }
-
-               [ComVisible (false)]
-               public object GetValue (long index1, long index2)
-               {
-                       if (index1 < 0 || index1 > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("index1", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       if (index2 < 0 || index2 > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("index2", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       return GetValue ((int) index1, (int) index2);
-               }
-
-               [ComVisible (false)]
-               public object GetValue (long index1, long index2, long index3)
-               {
-                       if (index1 < 0 || index1 > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("index1", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       if (index2 < 0 || index2 > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("index2", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       if (index3 < 0 || index3 > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("index3", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       return GetValue ((int) index1, (int) index2, (int) index3);
-               }
-
                [ComVisible (false)]
                public void SetValue (object value, long index)
                {
@@ -648,11 +444,6 @@ namespace System
                        SetValue (value, ind);
                }
 
-               internal static Array UnsafeCreateInstance (Type elementType, int length)
-               {
-                       return CreateInstance (elementType, length);
-               }
-
                internal static Array UnsafeCreateInstance(Type elementType, int[] lengths, int[] lowerBounds)
                {
                        return CreateInstance(elementType, lengths, lowerBounds);
@@ -776,14 +567,6 @@ namespace System
                        return CreateInstance (elementType, GetIntArray (lengths));
                }
 
-               [ComVisible (false)]
-               public object GetValue (params long [] indices)
-               {
-                       if (indices == null)
-                               throw new ArgumentNullException ("indices");
-                       return GetValue (GetIntArray (indices));
-               }
-
                [ComVisible (false)]
                public void SetValue (object value, params long [] indices)
                {
@@ -792,94 +575,6 @@ namespace System
                        SetValue (value, GetIntArray (indices));
                }
 
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch (Array array, object value)
-               {
-                       return BinarySearch (array, value, null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch (Array array, object value, IComparer comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       if (array.Length == 0)
-                               return -1;
-
-                       return DoBinarySearch (array, array.GetLowerBound (0), array.GetLength (0), value, comparer);
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch (Array array, int index, int length, object value)
-               {
-                       return BinarySearch (array, index, length, value, null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch (Array array, int index, int length, object value, IComparer comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       if (index < array.GetLowerBound (0))
-                               throw new ArgumentOutOfRangeException ("index", Locale.GetText (
-                                       "index is less than the lower bound of array."));
-                       if (length < 0)
-                               throw new ArgumentOutOfRangeException ("length", Locale.GetText (
-                                       "Value has to be >= 0."));
-                       // re-ordered to avoid possible integer overflow
-                       if (index > array.GetLowerBound (0) + array.GetLength (0) - length)
-                               throw new ArgumentException (Locale.GetText (
-                                       "index and length do not specify a valid range in array."));
-
-                       if (array.Length == 0)
-                               return -1;
-
-                       return DoBinarySearch (array, index, length, value, comparer);
-               }
-
-               static int DoBinarySearch (Array array, int index, int length, object value, IComparer comparer)
-               {
-                       // cache this in case we need it
-                       if (comparer == null)
-                               comparer = Comparer.Default;
-
-                       int iMin = index;
-                       // Comment from Tum (tum@veridicus.com):
-                       // *Must* start at index + length - 1 to pass rotor test co2460binarysearch_iioi
-                       int iMax = index + length - 1;
-                       int iCmp = 0;
-                       try {
-                               while (iMin <= iMax) {
-                                       // Be careful with overflow
-                                       // http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html
-                                       int iMid = iMin + ((iMax - iMin) / 2);
-                                       object elt = array.GetValueImpl (iMid);
-
-                                       iCmp = comparer.Compare (elt, value);
-
-                                       if (iCmp == 0)
-                                               return iMid;
-                                       else if (iCmp > 0)
-                                               iMax = iMid - 1;
-                                       else
-                                               iMin = iMid + 1; // compensate for the rounding down
-                               }
-                       }
-                       catch (Exception e) {
-                               throw new InvalidOperationException (Locale.GetText ("Comparer threw an exception."), e);
-                       }
-
-                       return ~iMin;
-               }
-
                [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
                public static void Clear (Array array, int index, int length)
                {
@@ -903,9 +598,6 @@ namespace System
                [MethodImplAttribute (MethodImplOptions.InternalCall)]
                static extern void ClearInternal (Array a, int index, int count);
 
-               [MethodImplAttribute (MethodImplOptions.InternalCall)]
-               public extern object Clone ();
-
                [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
                public static void Copy (Array sourceArray, Array destinationArray, int length)
                {
@@ -934,6 +626,9 @@ namespace System
                                throw new ArgumentOutOfRangeException ("length", Locale.GetText (
                                        "Value has to be >= 0."));;
 
+                       if (sourceArray.Rank != destinationArray.Rank)
+                               throw new RankException(SR.Rank_MultiDimNotSupported);
+
                        if (sourceIndex < 0)
                                throw new ArgumentOutOfRangeException ("sourceIndex", Locale.GetText (
                                        "Value has to be >= 0."));;
@@ -961,9 +656,6 @@ namespace System
                                throw new ArgumentException (msg, string.Empty);
                        }
 
-                       if (sourceArray.Rank != destinationArray.Rank)
-                               throw new RankException (Locale.GetText ("Arrays must be of same size."));
-
                        Type src_type = sourceArray.GetType ().GetElementType ();
                        Type dst_type = destinationArray.GetType ().GetElementType ();
 
@@ -1020,2206 +712,37 @@ namespace System
                        return source.IsAssignableFrom (target) || target.IsAssignableFrom (source);
                }
 
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Copy (Array sourceArray, long sourceIndex, Array destinationArray,
-                                                                long destinationIndex, long length)
+               public static T [] FindAll<T> (T [] array, Predicate <T> match)
                {
-                       if (sourceArray == null)
-                               throw new ArgumentNullException ("sourceArray");
-
-                       if (destinationArray == null)
-                               throw new ArgumentNullException ("destinationArray");
-
-                       if (sourceIndex < Int32.MinValue || sourceIndex > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("sourceIndex",
-                                       Locale.GetText ("Must be in the Int32 range."));
-
-                       if (destinationIndex < Int32.MinValue || destinationIndex > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("destinationIndex",
-                                       Locale.GetText ("Must be in the Int32 range."));
-
-                       if (length < 0 || length > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("length", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       Copy (sourceArray, (int) sourceIndex, destinationArray, (int) destinationIndex, (int) length);
-               }
+                       if (array == null)
+                               throw new ArgumentNullException ("array");
 
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Copy (Array sourceArray, Array destinationArray, long length)
-               {
-                       if (length < 0 || length > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("length", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
+                       if (match == null)
+                               throw new ArgumentNullException ("match");
 
-                       Copy (sourceArray, destinationArray, (int) length);
-               }
+                       int pos = 0;
+                       T [] d = new T [array.Length];
+                       foreach (T t in array)
+                               if (match (t))
+                                       d [pos++] = t;
 
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int IndexOf (Array array, object value)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-       
-                       return IndexOf (array, value, 0, array.Length);
+                       Resize <T> (ref d, pos);
+                       return d;
                }
 
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int IndexOf (Array array, object value, int startIndex)
+               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
+               //
+               // The constrained copy should guarantee that if there is an exception thrown
+               // during the copy, the destination array remains unchanged.
+               // This is related to System.Runtime.Reliability.CER
+               public static void ConstrainedCopy (Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
                {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       return IndexOf (array, value, startIndex, array.Length - startIndex);
+                       Copy (sourceArray, sourceIndex, destinationArray, destinationIndex, length);
                }
 
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int IndexOf (Array array, object value, int startIndex, int count)
+               object GetValueWithFlattenedIndex_NoErrorCheck (int flattenedIndex)
                {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       // re-ordered to avoid possible integer overflow
-                       if (count < 0 || startIndex < array.GetLowerBound (0) || startIndex - 1 > array.GetUpperBound (0) - count)
-                               throw new ArgumentOutOfRangeException ();
-
-                       int max = startIndex + count;
-                       for (int i = startIndex; i < max; i++) {
-                               if (Object.Equals (array.GetValueImpl (i), value))
-                                       return i;
-                       }
-
-                       return array.GetLowerBound (0) - 1;
-               }
-
-               public void Initialize()
-               {
-                       //FIXME: We would like to find a compiler that uses
-                       // this method. It looks like this method do nothing
-                       // in C# so no exception is trown by the moment.
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int LastIndexOf (Array array, object value)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (array.Length == 0)
-                               return array.GetLowerBound (0) - 1;
-                       return LastIndexOf (array, value, array.Length - 1);
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int LastIndexOf (Array array, object value, int startIndex)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       return LastIndexOf (array, value, startIndex, startIndex - array.GetLowerBound (0) + 1);
-               }
-               
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int LastIndexOf (Array array, object value, int startIndex, int count)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-       
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       int lb = array.GetLowerBound (0);
-                       // Empty arrays do not throw ArgumentOutOfRangeException
-                       if (array.Length == 0)
-                               return lb - 1;
-
-                       if (count < 0 || startIndex < lb ||
-                               startIndex > array.GetUpperBound (0) || startIndex - count + 1 < lb)
-                               throw new ArgumentOutOfRangeException ();
-
-                       for (int i = startIndex; i >= startIndex - count + 1; i--) {
-                               if (Object.Equals (array.GetValueImpl (i), value))
-                                       return i;
-                       }
-
-                       return lb - 1;
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Reverse (Array array)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       Reverse (array, array.GetLowerBound (0), array.Length);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Reverse (Array array, int index, int length)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       if (index < array.GetLowerBound (0) || length < 0)
-                               throw new ArgumentOutOfRangeException ();
-
-                       // re-ordered to avoid possible integer overflow
-                       if (index > array.GetUpperBound (0) + 1 - length)
-                               throw new ArgumentException ();
-
-                       int end = index + length - 1;
-                       var et = array.GetType ().GetElementType ();
-                       switch (Type.GetTypeCode (et)) {
-                       case TypeCode.Boolean:
-                               while (index < end) {
-                                       bool a, b;
-
-                                       array.GetGenericValueImpl (index, out a);
-                                       array.GetGenericValueImpl (end, out b);
-                                       array.SetGenericValueImpl (index, ref b);
-                                       array.SetGenericValueImpl (end, ref a);
-                                       ++index;
-                                       --end;
-                               }
-                               return;
-
-                       case TypeCode.Byte:
-                       case TypeCode.SByte:
-                               while (index < end) {
-                                       byte a, b;
-
-                                       array.GetGenericValueImpl (index, out a);
-                                       array.GetGenericValueImpl (end, out b);
-                                       array.SetGenericValueImpl (index, ref b);
-                                       array.SetGenericValueImpl (end, ref a);
-                                       ++index;
-                                       --end;
-                               }
-                               return;
-
-                       case TypeCode.Int16:
-                       case TypeCode.UInt16:
-                       case TypeCode.Char:
-                               while (index < end) {
-                                       short a, b;
-
-                                       array.GetGenericValueImpl (index, out a);
-                                       array.GetGenericValueImpl (end, out b);
-                                       array.SetGenericValueImpl (index, ref b);
-                                       array.SetGenericValueImpl (end, ref a);
-                                       ++index;
-                                       --end;
-                               }
-                               return;
-
-                       case TypeCode.Int32:
-                       case TypeCode.UInt32:
-                       case TypeCode.Single:
-                               while (index < end) {
-                                       int a, b;
-
-                                       array.GetGenericValueImpl (index, out a);
-                                       array.GetGenericValueImpl (end, out b);
-                                       array.SetGenericValueImpl (index, ref b);
-                                       array.SetGenericValueImpl (end, ref a);
-                                       ++index;
-                                       --end;
-                               }
-                               return;
-
-                       case TypeCode.Int64:
-                       case TypeCode.UInt64:
-                       case TypeCode.Double:
-                               while (index < end) {
-                                       long a, b;
-
-                                       array.GetGenericValueImpl (index, out a);
-                                       array.GetGenericValueImpl (end, out b);
-                                       array.SetGenericValueImpl (index, ref b);
-                                       array.SetGenericValueImpl (end, ref a);
-                                       ++index;
-                                       --end;
-                               }
-                               return;
-
-                       case TypeCode.Decimal:
-                               while (index < end) {
-                                       decimal a, b;
-
-                                       array.GetGenericValueImpl (index, out a);
-                                       array.GetGenericValueImpl (end, out b);
-                                       array.SetGenericValueImpl (index, ref b);
-                                       array.SetGenericValueImpl (end, ref a);
-                                       ++index;
-                                       --end;
-                               }
-                               return;
-
-                       case TypeCode.String:
-                               while (index < end) {
-                                       object a, b;
-
-                                       array.GetGenericValueImpl (index, out a);
-                                       array.GetGenericValueImpl (end, out b);
-                                       array.SetGenericValueImpl (index, ref b);
-                                       array.SetGenericValueImpl (end, ref a);
-                                       ++index;
-                                       --end;
-                               }
-                               return;
-                       default:
-                               if (array is object[])
-                                       goto case TypeCode.String;
-
-                               // Very slow fallback
-                               while (index < end) {
-                                       object val = array.GetValueImpl (index);
-                                       array.SetValueImpl (array.GetValueImpl (end), index);
-                                       array.SetValueImpl (val, end);
-                                       ++index;
-                                       --end;
-                               }
-
-                               return;
-                       }
-               }
-
-               public static void Reverse<T>(T[] array)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException (nameof (array));
-
-                       Reverse (array, 0, array.Length);
-               }
-
-               public static void Reverse<T>(T[] array, int index, int length)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException (nameof (array));
-                       if (index < 0 || length < 0)
-                               throw new ArgumentOutOfRangeException ((index < 0 ? nameof (index) : nameof (length)));
-                       if (array.Length - index < length)
-                               throw new ArgumentException ();
-
-                       int i = index;
-                       int j = index + length - 1;
-                       while (i < j) {
-                               T temp = array [i];
-                               array [i] = array [j];
-                               array [j] = temp;
-                               i++;
-                               j--;
-                       }
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array array)
-               {
-                       Sort (array, (IComparer)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array keys, Array items)
-               {
-                       Sort (keys, items, (IComparer)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array array, IComparer comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       SortImpl (array, null, array.GetLowerBound (0), array.GetLength (0), comparer);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array array, int index, int length)
-               {
-                       Sort (array, index, length, (IComparer)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array keys, Array items, IComparer comparer)
-               {
-                       if (items == null) {
-                               Sort (keys, comparer);
-                               return;
-                       }               
-               
-                       if (keys == null)
-                               throw new ArgumentNullException ("keys");
-
-                       if (keys.Rank > 1 || items.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       SortImpl (keys, items, keys.GetLowerBound (0), keys.GetLength (0), comparer);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array keys, Array items, int index, int length)
-               {
-                       Sort (keys, items, index, length, (IComparer)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array array, int index, int length, IComparer comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                               
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-
-                       if (index < array.GetLowerBound (0))
-                               throw new ArgumentOutOfRangeException ("index");
-
-                       if (length < 0)
-                               throw new ArgumentOutOfRangeException ("length", Locale.GetText (
-                                       "Value has to be >= 0."));
-
-                       if (array.Length - (array.GetLowerBound (0) + index) < length)
-                               throw new ArgumentException ();
-                               
-                       SortImpl (array, null, index, length, comparer);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort (Array keys, Array items, int index, int length, IComparer comparer)
-               {
-                       if (items == null) {
-                               Sort (keys, index, length, comparer);
-                               return;
-                       }
-
-                       if (keys == null)
-                               throw new ArgumentNullException ("keys");
-
-                       if (keys.Rank > 1 || items.Rank > 1)
-                               throw new RankException ();
-
-                       if (keys.GetLowerBound (0) != items.GetLowerBound (0))
-                               throw new ArgumentException ();
-
-                       if (index < keys.GetLowerBound (0))
-                               throw new ArgumentOutOfRangeException ("index");
-
-                       if (length < 0)
-                               throw new ArgumentOutOfRangeException ("length", Locale.GetText (
-                                       "Value has to be >= 0."));
-
-                       if (items.Length - (index + items.GetLowerBound (0)) < length || keys.Length - (index + keys.GetLowerBound (0)) < length)
-                               throw new ArgumentException ();
-
-                       SortImpl (keys, items, index, length, comparer);
-               }
-
-               private static void SortImpl (Array keys, Array items, int index, int length, IComparer comparer)
-               {
-                       if (length <= 1)
-                               return;
-
-                       int low = index;
-                       int high = index + length - 1;
-
-#if !BOOTSTRAP_BASIC                   
-                       if (comparer == null && items is object[]) {
-                               /* Its better to compare typecodes as casts treat long/ulong/long based enums the same */
-                               switch (Type.GetTypeCode (keys.GetType ().GetElementType ())) {
-                               case TypeCode.Int32:
-                                       qsort (keys as Int32[], items as object[], low, high);
-                                       return;
-                               case TypeCode.Int64:
-                                       qsort (keys as Int64[], items as object[], low, high);
-                                       return;
-                               case TypeCode.Byte:
-                                       qsort (keys as byte[], items as object[], low, high);
-                                       return;
-                               case TypeCode.Char:
-                                       qsort (keys as char[], items as object[], low, high);
-                                       return;
-                               case TypeCode.DateTime:
-                                       qsort (keys as DateTime[], items as object[], low, high);
-                                       return;
-                               case TypeCode.Decimal:
-                                       qsort (keys as decimal[], items as object[], low, high);
-                                       return;
-                               case TypeCode.Double:
-                                       qsort (keys as double[], items as object[], low, high);
-                                       return;
-                               case TypeCode.Int16:
-                                       qsort (keys as Int16[], items as object[], low, high);
-                                       return;
-                               case TypeCode.SByte:
-                                       qsort (keys as SByte[], items as object[], low, high);
-                                       return;
-                               case TypeCode.Single:
-                                       qsort (keys as Single[], items as object[], low, high);
-                                       return;
-                               case TypeCode.UInt16:
-                                       qsort (keys as UInt16[], items as object[], low, high);
-                                       return; 
-                               case TypeCode.UInt32:
-                                       qsort (keys as UInt32[], items as object[], low, high);
-                                       return;
-                               case TypeCode.UInt64:
-                                       qsort (keys as UInt64[], items as object[], low, high);
-                                       return;
-                               default:
-                                       break;
-                               }                               
-                       }
-#endif
-
-                       if (comparer == null)
-                               CheckComparerAvailable (keys, low, high);
-                       try {
-                               qsort (keys, items, low, high, comparer);
-                       } catch (Exception e) {
-                               throw new InvalidOperationException (Locale.GetText ("The comparer threw an exception."), e);
-                       }
-               }
-               
-               struct QSortStack {
-                       public int high;
-                       public int low;
-               }
-               
-               static bool QSortArrange (Array keys, Array items, int lo, ref object v0, int hi, ref object v1, IComparer comparer)
-               {
-                       IComparable cmp;
-                       object tmp;
-                       
-                       if (comparer != null) {
-                               if (comparer.Compare (v1, v0) < 0) {
-                                       swap (keys, items, lo, hi);
-                                       tmp = v0;
-                                       v0 = v1;
-                                       v1 = tmp;
-                                       
-                                       return true;
-                               }
-                       } else if (v0 != null) {
-                               cmp = v1 as IComparable;
-                               
-                               if (v1 == null || cmp.CompareTo (v0) < 0) {
-                                       swap (keys, items, lo, hi);
-                                       tmp = v0;
-                                       v0 = v1;
-                                       v1 = tmp;
-                                       
-                                       return true;
-                               }
-                       }
-                       
-                       return false;
-               }
-               
-               unsafe static void qsort (Array keys, Array items, int low0, int high0, IComparer comparer)
-               {
-                       QSortStack* stack = stackalloc QSortStack [32];
-                       const int QSORT_THRESHOLD = 7;
-                       int high, low, mid, i, k;
-                       object key, hi, lo;
-                       IComparable cmp;
-                       int sp = 1;
-                       
-                       // initialize our stack
-                       stack[0].high = high0;
-                       stack[0].low = low0;
-                       
-                       do {
-                               // pop the stack
-                               sp--;
-                               high = stack[sp].high;
-                               low = stack[sp].low;
-                               
-                               if ((low + QSORT_THRESHOLD) > high) {
-                                       // switch to insertion sort
-                                       for (i = low + 1; i <= high; i++) {
-                                               for (k = i; k > low; k--) {
-                                                       lo = keys.GetValueImpl (k - 1);
-                                                       hi = keys.GetValueImpl (k);
-                                                       if (comparer != null) {
-                                                               if (comparer.Compare (hi, lo) >= 0)
-                                                                       break;
-                                                       } else {
-                                                               if (lo == null)
-                                                                       break;
-                                                               
-                                                               if (hi != null) {
-                                                                       cmp = hi as IComparable;
-                                                                       if (cmp.CompareTo (lo) >= 0)
-                                                                               break;
-                                                               }
-                                                       }
-                                                       
-                                                       swap (keys, items, k - 1, k);
-                                               }
-                                       }
-                                       
-                                       continue;
-                               }
-                               
-                               // calculate the middle element
-                               mid = low + ((high - low) / 2);
-                               
-                               // get the 3 keys
-                               key = keys.GetValueImpl (mid);
-                               hi = keys.GetValueImpl (high);
-                               lo = keys.GetValueImpl (low);
-                               
-                               // once we re-order the low, mid, and high elements to be in
-                               // ascending order, we'll use mid as our pivot.
-                               QSortArrange (keys, items, low, ref lo, mid, ref key, comparer);
-                               if (QSortArrange (keys, items, mid, ref key, high, ref hi, comparer))
-                                       QSortArrange (keys, items, low, ref lo, mid, ref key, comparer);
-                               
-                               cmp = key as IComparable;
-                               
-                               // since we've already guaranteed that lo <= mid and mid <= hi,
-                               // we can skip comparing them again.
-                               k = high - 1;
-                               i = low + 1;
-                               
-                               do {
-                                       // Move the walls in
-                                       if (comparer != null) {
-                                               // find the first element with a value >= pivot value
-                                               while (i < k && comparer.Compare (key, keys.GetValueImpl (i)) > 0)
-                                                       i++;
-                                               
-                                               // find the last element with a value <= pivot value
-                                               while (k > i && comparer.Compare (key, keys.GetValueImpl (k)) < 0)
-                                                       k--;
-                                       } else if (cmp != null) {
-                                               // find the first element with a value >= pivot value
-                                               while (i < k && cmp.CompareTo (keys.GetValueImpl (i)) > 0)
-                                                       i++;
-                                               
-                                               // find the last element with a value <= pivot value
-                                               while (k > i && cmp.CompareTo (keys.GetValueImpl (k)) < 0)
-                                                       k--;
-                                       } else {
-                                               // This has the effect of moving the null values to the front if comparer is null
-                                               while (i < k && keys.GetValueImpl (i) == null)
-                                                       i++;
-                                               
-                                               while (k > i && keys.GetValueImpl (k) != null)
-                                                       k--;
-                                       }
-                                       
-                                       if (k <= i)
-                                               break;
-                                       
-                                       swap (keys, items, i, k);
-                                       
-                                       i++;
-                                       k--;
-                               } while (true);
-                               
-                               // push our partitions onto the stack, largest first
-                               // (to make sure we don't run out of stack space)
-                               if ((high - k) >= (k - low)) {
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                               } else {
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                               }
-                       } while (sp > 0);
-               }
-
-               private static void CheckComparerAvailable (Array keys, int low, int high)
-               {
-                       // move null keys to beginning of array,
-                       // ensure that non-null keys implement IComparable
-                       for (int i = 0; i < high; i++) {
-                               object obj = keys.GetValueImpl (i);
-                               if (obj == null)
-                                       continue;
-                               if (!(obj is IComparable)) {
-                                       string msg = Locale.GetText ("No IComparable interface found for type '{0}'.");
-                                       throw new InvalidOperationException (String.Format (msg, obj.GetType ()));
-                               }  
-                       }
-               }
-
-               private static void swap (Array keys, Array items, int i, int j)
-               {
-                       object tmp = keys.GetValueImpl (i);
-                       keys.SetValueImpl (keys.GetValueImpl (j), i);
-                       keys.SetValueImpl (tmp, j);
-
-                       if (items != null) {
-                               tmp = items.GetValueImpl (i);
-                               items.SetValueImpl (items.GetValueImpl (j), i);
-                               items.SetValueImpl (tmp, j);
-                       }
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<T> (T [] array)
-               {
-                       Sort<T> (array, (IComparer<T>)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<TKey, TValue> (TKey [] keys, TValue [] items)
-               {
-                       Sort<TKey, TValue> (keys, items, (IComparer<TKey>)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<T> (T [] array, IComparer<T> comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       SortImpl<T> (array, 0, array.Length, comparer);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<TKey, TValue> (TKey [] keys, TValue [] items, IComparer<TKey> comparer)
-               {
-                       if (items == null) {
-                               Sort<TKey> (keys, comparer);
-                               return;
-                       }               
-               
-                       if (keys == null)
-                               throw new ArgumentNullException ("keys");
-
-                       if (keys.Length > items.Length)
-                               throw new ArgumentException ("Length of keys is larger than length of items.");
-
-                       SortImpl<TKey, TValue> (keys, items, 0, keys.Length, comparer);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<T> (T [] array, int index, int length)
-               {
-                       Sort<T> (array, index, length, (IComparer<T>)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<TKey, TValue> (TKey [] keys, TValue [] items, int index, int length)
-               {
-                       Sort<TKey, TValue> (keys, items, index, length, (IComparer<TKey>)null);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<T> (T [] array, int index, int length, IComparer<T> comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (index < 0)
-                               throw new ArgumentOutOfRangeException ("index");
-
-                       if (length < 0)
-                               throw new ArgumentOutOfRangeException ("length", Locale.GetText (
-                                       "Value has to be >= 0."));
-
-                       if (index + length > array.Length)
-                               throw new ArgumentException ();
-                               
-                       SortImpl<T> (array, index, length, comparer);
-               }
-
-               [ReliabilityContractAttribute (Consistency.MayCorruptInstance, Cer.MayFail)]
-               public static void Sort<TKey, TValue> (TKey [] keys, TValue [] items, int index, int length, IComparer<TKey> comparer)
-               {
-                       if (items == null) {
-                               Sort<TKey> (keys, index, length, comparer);
-                               return;
-                       }
-
-                       if (keys == null)
-                               throw new ArgumentNullException ("keys");
-
-                       if (index < 0)
-                               throw new ArgumentOutOfRangeException ("index");
-
-                       if (length < 0)
-                               throw new ArgumentOutOfRangeException ("length");
-
-                       if (items.Length - index < length || keys.Length - index < length)
-                               throw new ArgumentException ();
-
-                       SortImpl<TKey, TValue> (keys, items, index, length, comparer);
-               }
-
-               private static void SortImpl<TKey, TValue> (TKey [] keys, TValue [] items, int index, int length, IComparer<TKey> comparer)
-               {
-                       if (keys.Length <= 1)
-                               return;
-
-                       int low = index;
-                       int high = index + length - 1;
-                       
-                       //
-                       // Check for value types which can be sorted without Compare () method
-                       //
-                       if (comparer == null) {
-                               /* Avoid this when using full-aot to prevent the generation of many unused qsort<K,T> instantiations */
-#if !FULL_AOT_RUNTIME
-#if !BOOTSTRAP_BASIC
-                               switch (Type.GetTypeCode (typeof (TKey))) {
-                               case TypeCode.Int32:
-                                       qsort (keys as Int32[], items, low, high);
-                                       return;
-                               case TypeCode.Int64:
-                                       qsort (keys as Int64[], items, low, high);
-                                       return;
-                               case TypeCode.Byte:
-                                       qsort (keys as byte[], items, low, high);
-                                       return;
-                               case TypeCode.Char:
-                                       qsort (keys as char[], items, low, high);
-                                       return;
-                               case TypeCode.DateTime:
-                                       qsort (keys as DateTime[], items, low, high);
-                                       return;
-                               case TypeCode.Decimal:
-                                       qsort (keys as decimal[], items, low, high);
-                                       return;
-                               case TypeCode.Double:
-                                       qsort (keys as double[], items, low, high);
-                                       return;
-                               case TypeCode.Int16:
-                                       qsort (keys as Int16[], items, low, high);
-                                       return;
-                               case TypeCode.SByte:
-                                       qsort (keys as SByte[], items, low, high);
-                                       return;
-                               case TypeCode.Single:
-                                       qsort (keys as Single[], items, low, high);
-                                       return;
-                               case TypeCode.UInt16:
-                                       qsort (keys as UInt16[], items, low, high);
-                                       return; 
-                               case TypeCode.UInt32:
-                                       qsort (keys as UInt32[], items, low, high);
-                                       return;
-                               case TypeCode.UInt64:
-                                       qsort (keys as UInt64[], items, low, high);
-                                       return;
-                               }
-#endif
-#endif
-                               // Using Comparer<TKey> adds a small overload, but with value types it
-                               // helps us to not box them.
-                               if (typeof (IComparable<TKey>).IsAssignableFrom (typeof (TKey)) &&
-                                               typeof (TKey).IsValueType)
-                                       comparer = Comparer<TKey>.Default;
-                       }
-
-                       if (comparer == null)
-                               CheckComparerAvailable<TKey> (keys, low, high);
-                       //try {
-                               qsort (keys, items, low, high, comparer);
-                               //} catch (Exception e) {
-                               //throw new InvalidOperationException (Locale.GetText ("The comparer threw an exception."), e);
-                               //}
-               }
-
-               // Specialized version for items==null
-               private static void SortImpl<TKey> (TKey [] keys, int index, int length, IComparer<TKey> comparer)
-               {
-                       if (keys.Length <= 1)
-                               return;
-
-                       int low = index;
-                       int high = index + length - 1;
-                       
-                       //
-                       // Check for value types which can be sorted without Compare () method
-                       //
-                       if (comparer == null) {
-#if !BOOTSTRAP_BASIC                           
-                               switch (Type.GetTypeCode (typeof (TKey))) {
-                               case TypeCode.Int32:
-                                       qsort (keys as Int32[], low, high);
-                                       return;
-                               case TypeCode.Int64:
-                                       qsort (keys as Int64[], low, high);
-                                       return;
-                               case TypeCode.Byte:
-                                       qsort (keys as byte[], low, high);
-                                       return;
-                               case TypeCode.Char:
-                                       qsort (keys as char[], low, high);
-                                       return;
-                               case TypeCode.DateTime:
-                                       qsort (keys as DateTime[], low, high);
-                                       return;
-                               case TypeCode.Decimal:
-                                       qsort (keys as decimal[], low, high);
-                                       return;
-                               case TypeCode.Double:
-                                       qsort (keys as double[], low, high);
-                                       return;
-                               case TypeCode.Int16:
-                                       qsort (keys as Int16[], low, high);
-                                       return;
-                               case TypeCode.SByte:
-                                       qsort (keys as SByte[], low, high);
-                                       return;
-                               case TypeCode.Single:
-                                       qsort (keys as Single[], low, high);
-                                       return;
-                               case TypeCode.UInt16:
-                                       qsort (keys as UInt16[], low, high);
-                                       return; 
-                               case TypeCode.UInt32:
-                                       qsort (keys as UInt32[], low, high);
-                                       return;
-                               case TypeCode.UInt64:
-                                       qsort (keys as UInt64[], low, high);
-                                       return;
-                               }
-#endif
-                               // Using Comparer<TKey> adds a small overload, but with value types it
-                               // helps us to not box them.
-                               if (typeof (IComparable<TKey>).IsAssignableFrom (typeof (TKey)) &&
-                                               typeof (TKey).IsValueType)
-                                       comparer = Comparer<TKey>.Default;
-                       }
-
-                       if (comparer == null)
-                               CheckComparerAvailable<TKey> (keys, low, high);
-                       //try {
-                               qsort<TKey> (keys, low, high, comparer);
-                               //} catch (Exception e) {
-                               //throw new InvalidOperationException (Locale.GetText ("The comparer threw an exception."), e);
-                               //}
-               }
-               
-               public static void Sort<T> (T [] array, Comparison<T> comparison)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (comparison == null)
-                               throw new ArgumentNullException ("comparison");
-
-                       SortImpl<T> (array, array.Length, comparison);
-               }
-
-               // used by List<T>.Sort (Comparison <T>)
-               internal static void SortImpl<T> (T [] array, int length, Comparison<T> comparison)
-               {
-                       if (length <= 1)
-                               return;
-                       
-                       try {
-                               int low0 = 0;
-                               int high0 = length - 1;
-                               qsort<T> (array, low0, high0, comparison);
-                       } catch (InvalidOperationException) {
-                               throw;
-                       } catch (Exception e) {
-                               throw new InvalidOperationException (Locale.GetText ("Comparison threw an exception."), e);
-                       }
-               }
-               
-               static bool QSortArrange<T, U> (T [] keys, U [] items, int lo, int hi) where T : IComparable<T>
-               {
-                       if (keys[lo] != null) {
-                               if (keys[hi] == null || keys[hi].CompareTo (keys[lo]) < 0) {
-                                       swap (keys, items, lo, hi);
-                                       return true;
-                               }
-                       }
-                       
-                       return false;
-               }
-
-               // Specialized version for items==null
-               static bool QSortArrange<T> (T [] keys, int lo, int hi) where T : IComparable<T>
-               {
-                       if (keys[lo] != null) {
-                               if (keys[hi] == null || keys[hi].CompareTo (keys[lo]) < 0) {
-                                       swap (keys, lo, hi);
-                                       return true;
-                               }
-                       }
-                       
-                       return false;
-               }
-               
-               unsafe static void qsort<T, U> (T[] keys, U[] items, int low0, int high0) where T : IComparable<T>
-               {
-                       QSortStack* stack = stackalloc QSortStack [32];
-                       const int QSORT_THRESHOLD = 7;
-                       int high, low, mid, i, k;
-                       int sp = 1;
-                       T key;
-                       
-                       // initialize our stack
-                       stack[0].high = high0;
-                       stack[0].low = low0;
-                       
-                       do {
-                               // pop the stack
-                               sp--;
-                               high = stack[sp].high;
-                               low = stack[sp].low;
-                               
-                               if ((low + QSORT_THRESHOLD) > high) {
-                                       // switch to insertion sort
-                                       for (i = low + 1; i <= high; i++) {
-                                               for (k = i; k > low; k--) {
-                                                       // if keys[k] >= keys[k-1], break
-                                                       if (keys[k-1] == null)
-                                                               break;
-                                                       
-                                                       if (keys[k] != null && keys[k].CompareTo (keys[k-1]) >= 0)
-                                                               break;
-                                                       
-                                                       swap (keys, items, k - 1, k);
-                                               }
-                                       }
-                                       
-                                       continue;
-                               }
-                               
-                               // calculate the middle element
-                               mid = low + ((high - low) / 2);
-                               
-                               // once we re-order the lo, mid, and hi elements to be in
-                               // ascending order, we'll use mid as our pivot.
-                               QSortArrange<T, U> (keys, items, low, mid);
-                               if (QSortArrange<T, U> (keys, items, mid, high))
-                                       QSortArrange<T, U> (keys, items, low, mid);
-                               
-                               key = keys[mid];
-                               
-                               // since we've already guaranteed that lo <= mid and mid <= hi,
-                               // we can skip comparing them again
-                               k = high - 1;
-                               i = low + 1;
-                               
-                               do {
-                                       if (key != null) {
-                                               // find the first element with a value >= pivot value
-                                               while (i < k && key.CompareTo (keys[i]) > 0)
-                                                       i++;
-                                               
-                                               // find the last element with a value <= pivot value
-                                               while (k > i && key.CompareTo (keys[k]) < 0)
-                                                       k--;
-                                       } else {
-                                               while (i < k && keys[i] == null)
-                                                       i++;
-                                               
-                                               while (k > i && keys[k] != null)
-                                                       k--;
-                                       }
-                                       
-                                       if (k <= i)
-                                               break;
-                                       
-                                       swap (keys, items, i, k);
-                                       
-                                       i++;
-                                       k--;
-                               } while (true);
-                               
-                               // push our partitions onto the stack, largest first
-                               // (to make sure we don't run out of stack space)
-                               if ((high - k) >= (k - low)) {
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                               } else {
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                               }
-                       } while (sp > 0);
-               }               
-
-               // Specialized version for items==null
-               unsafe static void qsort<T> (T[] keys, int low0, int high0) where T : IComparable<T>
-               {
-                       QSortStack* stack = stackalloc QSortStack [32];
-                       const int QSORT_THRESHOLD = 7;
-                       int high, low, mid, i, k;
-                       int sp = 1;
-                       T key;
-                       
-                       // initialize our stack
-                       stack[0].high = high0;
-                       stack[0].low = low0;
-                       
-                       do {
-                               // pop the stack
-                               sp--;
-                               high = stack[sp].high;
-                               low = stack[sp].low;
-                               
-                               if ((low + QSORT_THRESHOLD) > high) {
-                                       // switch to insertion sort
-                                       for (i = low + 1; i <= high; i++) {
-                                               for (k = i; k > low; k--) {
-                                                       // if keys[k] >= keys[k-1], break
-                                                       if (keys[k-1] == null)
-                                                               break;
-                                                       
-                                                       if (keys[k] != null && keys[k].CompareTo (keys[k-1]) >= 0)
-                                                               break;
-                                                       
-                                                       swap (keys, k - 1, k);
-                                               }
-                                       }
-                                       
-                                       continue;
-                               }
-                               
-                               // calculate the middle element
-                               mid = low + ((high - low) / 2);
-                               
-                               // once we re-order the lo, mid, and hi elements to be in
-                               // ascending order, we'll use mid as our pivot.
-                               QSortArrange<T> (keys, low, mid);
-                               if (QSortArrange<T> (keys, mid, high))
-                                       QSortArrange<T> (keys, low, mid);
-                               
-                               key = keys[mid];
-                               
-                               // since we've already guaranteed that lo <= mid and mid <= hi,
-                               // we can skip comparing them again
-                               k = high - 1;
-                               i = low + 1;
-                               
-                               do {
-                                       if (key != null) {
-                                               // find the first element with a value >= pivot value
-                                               while (i < k && key.CompareTo (keys[i]) > 0)
-                                                       i++;
-                                               
-                                               // find the last element with a value <= pivot value
-                                               while (k >= i && key.CompareTo (keys[k]) < 0)
-                                                       k--;
-                                       } else {
-                                               while (i < k && keys[i] == null)
-                                                       i++;
-                                               
-                                               while (k >= i && keys[k] != null)
-                                                       k--;
-                                       }
-                                       
-                                       if (k <= i)
-                                               break;
-                                       
-                                       swap (keys, i, k);
-                                       
-                                       i++;
-                                       k--;
-                               } while (true);
-                               
-                               // push our partitions onto the stack, largest first
-                               // (to make sure we don't run out of stack space)
-                               if ((high - k) >= (k - low)) {
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                               } else {
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                               }
-                       } while (sp > 0);
-               }
-               
-               static bool QSortArrange<K, V> (K [] keys, V [] items, int lo, int hi, IComparer<K> comparer)
-               {
-                       IComparable<K> gcmp;
-                       IComparable cmp;
-                       
-                       if (comparer != null) {
-                               if (comparer.Compare (keys[hi], keys[lo]) < 0) {
-                                       swap<K, V> (keys, items, lo, hi);
-                                       return true;
-                               }
-                       } else if (keys[lo] != null) {
-                               if (keys[hi] == null) {
-                                       swap<K, V> (keys, items, lo, hi);
-                                       return true;
-                               }
-                               
-                               gcmp = keys[hi] as IComparable<K>;
-                               if (gcmp != null) {
-                                       if (gcmp.CompareTo (keys[lo]) < 0) {
-                                               swap<K, V> (keys, items, lo, hi);
-                                               return true;
-                                       }
-                                       
-                                       return false;
-                               }
-                               
-                               cmp = keys[hi] as IComparable;
-                               if (cmp != null) {
-                                       if (cmp.CompareTo (keys[lo]) < 0) {
-                                               swap<K, V> (keys, items, lo, hi);
-                                               return true;
-                                       }
-                                       
-                                       return false;
-                               }
-                       }
-                       
-                       return false;
-               }
-
-               // Specialized version for items==null
-               static bool QSortArrange<K> (K [] keys, int lo, int hi, IComparer<K> comparer)
-               {
-                       IComparable<K> gcmp;
-                       IComparable cmp;
-                       
-                       if (comparer != null) {
-                               if (comparer.Compare (keys[hi], keys[lo]) < 0) {
-                                       swap<K> (keys, lo, hi);
-                                       return true;
-                               }
-                       } else if (keys[lo] != null) {
-                               if (keys[hi] == null) {
-                                       swap<K> (keys, lo, hi);
-                                       return true;
-                               }
-                               
-                               gcmp = keys[hi] as IComparable<K>;
-                               if (gcmp != null) {
-                                       if (gcmp.CompareTo (keys[lo]) < 0) {
-                                               swap<K> (keys, lo, hi);
-                                               return true;
-                                       }
-                                       
-                                       return false;
-                               }
-                               
-                               cmp = keys[hi] as IComparable;
-                               if (cmp != null) {
-                                       if (cmp.CompareTo (keys[lo]) < 0) {
-                                               swap<K> (keys, lo, hi);
-                                               return true;
-                                       }
-                                       
-                                       return false;
-                               }
-                       }
-                       
-                       return false;
-               }
-               
-               unsafe static void qsort<K, V> (K [] keys, V [] items, int low0, int high0, IComparer<K> comparer)
-               {
-                       QSortStack* stack = stackalloc QSortStack [32];
-                       const int QSORT_THRESHOLD = 7;
-                       int high, low, mid, i, k;
-                       IComparable<K> gcmp;
-                       IComparable cmp;
-                       int sp = 1;
-                       K key;
-                       
-                       // initialize our stack
-                       stack[0].high = high0;
-                       stack[0].low = low0;
-                       
-                       do {
-                               // pop the stack
-                               sp--;
-                               high = stack[sp].high;
-                               low = stack[sp].low;
-                               
-                               if ((low + QSORT_THRESHOLD) > high) {
-                                       // switch to insertion sort
-                                       for (i = low + 1; i <= high; i++) {
-                                               for (k = i; k > low; k--) {
-                                                       // if keys[k] >= keys[k-1], break
-                                                       if (comparer != null) {
-                                                               if (comparer.Compare (keys[k], keys[k-1]) >= 0)
-                                                                       break;
-                                                       } else {
-                                                               if (keys[k-1] == null)
-                                                                       break;
-                                                               
-                                                               if (keys[k] != null) {
-                                                                       gcmp = keys[k] as IComparable<K>;
-                                                                       cmp = keys[k] as IComparable;
-                                                                       if (gcmp != null) {
-                                                                               if (gcmp.CompareTo (keys[k-1]) >= 0)
-                                                                                       break;
-                                                                       } else {
-                                                                               if (cmp.CompareTo (keys[k-1]) >= 0)
-                                                                                       break;
-                                                                       }
-                                                               }
-                                                       }
-                                                       
-                                                       swap<K, V> (keys, items, k - 1, k);
-                                               }
-                                       }
-                                       
-                                       continue;
-                               }
-                               
-                               // calculate the middle element
-                               mid = low + ((high - low) / 2);
-                               
-                               // once we re-order the low, mid, and high elements to be in
-                               // ascending order, we'll use mid as our pivot.
-                               QSortArrange<K, V> (keys, items, low, mid, comparer);
-                               if (QSortArrange<K, V> (keys, items, mid, high, comparer))
-                                       QSortArrange<K, V> (keys, items, low, mid, comparer);
-                               
-                               key = keys[mid];
-                               gcmp = key as IComparable<K>;
-                               cmp = key as IComparable;
-                               
-                               // since we've already guaranteed that lo <= mid and mid <= hi,
-                               // we can skip comparing them again.
-                               k = high - 1;
-                               i = low + 1;
-                               
-                               do {
-                                       // Move the walls in
-                                       if (comparer != null) {
-                                               // find the first element with a value >= pivot value
-                                               while (i < k && comparer.Compare (key, keys[i]) > 0)
-                                                       i++;
-                                               
-                                               // find the last element with a value <= pivot value
-                                               while (k > i && comparer.Compare (key, keys[k]) < 0)
-                                                       k--;
-                                       } else {
-                                               if (gcmp != null) {
-                                                       // find the first element with a value >= pivot value
-                                                       while (i < k && gcmp.CompareTo (keys[i]) > 0)
-                                                               i++;
-                                                       
-                                                       // find the last element with a value <= pivot value
-                                                       while (k > i && gcmp.CompareTo (keys[k]) < 0)
-                                                               k--;
-                                               } else if (cmp != null) {
-                                                       // find the first element with a value >= pivot value
-                                                       while (i < k && cmp.CompareTo (keys[i]) > 0)
-                                                               i++;
-                                                       
-                                                       // find the last element with a value <= pivot value
-                                                       while (k > i && cmp.CompareTo (keys[k]) < 0)
-                                                               k--;
-                                               } else {
-                                                       while (i < k && keys[i] == null)
-                                                               i++;
-                                                       
-                                                       while (k > i && keys[k] != null)
-                                                               k--;
-                                               }
-                                       }
-                                       
-                                       if (k <= i)
-                                               break;
-                                       
-                                       swap<K, V> (keys, items, i, k);
-                                       
-                                       i++;
-                                       k--;
-                               } while (true);
-                               
-                               // push our partitions onto the stack, largest first
-                               // (to make sure we don't run out of stack space)
-                               if ((high - k) >= (k - low)) {
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                               } else {
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                               }
-                       } while (sp > 0);
-               }
-
-               // Specialized version for items==null
-               unsafe static void qsort<K> (K [] keys, int low0, int high0, IComparer<K> comparer)
-               {
-                       QSortStack* stack = stackalloc QSortStack [32];
-                       const int QSORT_THRESHOLD = 7;
-                       int high, low, mid, i, k;
-                       IComparable<K> gcmp;
-                       IComparable cmp;
-                       int sp = 1;
-                       K key;
-                       
-                       // initialize our stack
-                       stack[0].high = high0;
-                       stack[0].low = low0;
-                       
-                       do {
-                               // pop the stack
-                               sp--;
-                               high = stack[sp].high;
-                               low = stack[sp].low;
-                               
-                               if ((low + QSORT_THRESHOLD) > high) {
-                                       // switch to insertion sort
-                                       for (i = low + 1; i <= high; i++) {
-                                               for (k = i; k > low; k--) {
-                                                       // if keys[k] >= keys[k-1], break
-                                                       if (comparer != null) {
-                                                               if (comparer.Compare (keys[k], keys[k-1]) >= 0)
-                                                                       break;
-                                                       } else {
-                                                               if (keys[k-1] == null)
-                                                                       break;
-                                                               
-                                                               if (keys[k] != null) {
-                                                                       gcmp = keys[k] as IComparable<K>;
-                                                                       cmp = keys[k] as IComparable;
-                                                                       if (gcmp != null) {
-                                                                               if (gcmp.CompareTo (keys[k-1]) >= 0)
-                                                                                       break;
-                                                                       } else {
-                                                                               if (cmp.CompareTo (keys[k-1]) >= 0)
-                                                                                       break;
-                                                                       }
-                                                               }
-                                                       }
-                                                       
-                                                       swap<K> (keys, k - 1, k);
-                                               }
-                                       }
-                                       
-                                       continue;
-                               }
-                               
-                               // calculate the middle element
-                               mid = low + ((high - low) / 2);
-                               
-                               // once we re-order the low, mid, and high elements to be in
-                               // ascending order, we'll use mid as our pivot.
-                               QSortArrange<K> (keys, low, mid, comparer);
-                               if (QSortArrange<K> (keys, mid, high, comparer))
-                                       QSortArrange<K> (keys, low, mid, comparer);
-                               
-                               key = keys[mid];
-                               gcmp = key as IComparable<K>;
-                               cmp = key as IComparable;
-                               
-                               // since we've already guaranteed that lo <= mid and mid <= hi,
-                               // we can skip comparing them again.
-                               k = high - 1;
-                               i = low + 1;
-                               
-                               do {
-                                       // Move the walls in
-                                       if (comparer != null) {
-                                               // find the first element with a value >= pivot value
-                                               while (i < k && comparer.Compare (key, keys[i]) > 0)
-                                                       i++;
-                                               
-                                               // find the last element with a value <= pivot value
-                                               while (k > i && comparer.Compare (key, keys[k]) < 0)
-                                                       k--;
-                                       } else {
-                                               if (gcmp != null) {
-                                                       // find the first element with a value >= pivot value
-                                                       while (i < k && gcmp.CompareTo (keys[i]) > 0)
-                                                               i++;
-                                                       
-                                                       // find the last element with a value <= pivot value
-                                                       while (k > i && gcmp.CompareTo (keys[k]) < 0)
-                                                               k--;
-                                               } else if (cmp != null) {
-                                                       // find the first element with a value >= pivot value
-                                                       while (i < k && cmp.CompareTo (keys[i]) > 0)
-                                                               i++;
-                                                       
-                                                       // find the last element with a value <= pivot value
-                                                       while (k > i && cmp.CompareTo (keys[k]) < 0)
-                                                               k--;
-                                               } else {
-                                                       while (i < k && keys[i] == null)
-                                                               i++;
-                                                       
-                                                       while (k > i && keys[k] != null)
-                                                               k--;
-                                               }
-                                       }
-                                       
-                                       if (k <= i)
-                                               break;
-                                       
-                                       swap<K> (keys, i, k);
-                                       
-                                       i++;
-                                       k--;
-                               } while (true);
-                               
-                               // push our partitions onto the stack, largest first
-                               // (to make sure we don't run out of stack space)
-                               if ((high - k) >= (k - low)) {
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                               } else {
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                               }
-                       } while (sp > 0);
-               }
-               
-               static bool QSortArrange<T> (T [] array, int lo, int hi, Comparison<T> compare)
-               {
-                       if (array[lo] != null) {
-                               if (array[hi] == null || compare (array[hi], array[lo]) < 0) {
-                                       swap<T> (array, lo, hi);
-                                       return true;
-                               }
-                       }
-                       
-                       return false;
-               }
-               
-               unsafe static void qsort<T> (T [] array, int low0, int high0, Comparison<T> compare)
-               {
-                       QSortStack* stack = stackalloc QSortStack [32];
-                       const int QSORT_THRESHOLD = 7;
-                       int high, low, mid, i, k;
-                       int sp = 1;
-                       T key;
-                       
-                       // initialize our stack
-                       stack[0].high = high0;
-                       stack[0].low = low0;
-                       
-                       do {
-                               // pop the stack
-                               sp--;
-                               high = stack[sp].high;
-                               low = stack[sp].low;
-                               
-                               if ((low + QSORT_THRESHOLD) > high) {
-                                       // switch to insertion sort
-                                       for (i = low + 1; i <= high; i++) {
-                                               for (k = i; k > low; k--) {
-                                                       if (compare (array[k], array[k-1]) >= 0)
-                                                               break;
-                                                       
-                                                       swap<T> (array, k - 1, k);
-                                               }
-                                       }
-                                       
-                                       continue;
-                               }
-                               
-                               // calculate the middle element
-                               mid = low + ((high - low) / 2);
-                               
-                               // once we re-order the lo, mid, and hi elements to be in
-                               // ascending order, we'll use mid as our pivot.
-                               QSortArrange<T> (array, low, mid, compare);
-                               if (QSortArrange<T> (array, mid, high, compare))
-                                       QSortArrange<T> (array, low, mid, compare);
-                               
-                               key = array[mid];
-                               
-                               // since we've already guaranteed that lo <= mid and mid <= hi,
-                               // we can skip comparing them again
-                               k = high - 1;
-                               i = low + 1;
-                               
-                               do {
-                                       // Move the walls in
-                                       if (key != null) {
-                                               // find the first element with a value >= pivot value
-                                               while (i < k && compare (key, array[i]) > 0)
-                                                       i++;
-                                               
-                                               // find the last element with a value <= pivot value
-                                               while (k > i && compare (key, array[k]) < 0)
-                                                       k--;
-                                       } else {
-                                               while (i < k && array[i] == null)
-                                                       i++;
-                                               
-                                               while (k > i && array[k] != null)
-                                                       k--;
-                                       }
-                                       
-                                       if (k <= i)
-                                               break;
-                                       
-                                       swap<T> (array, i, k);
-                                       
-                                       i++;
-                                       k--;
-                               } while (true);
-                               
-                               // push our partitions onto the stack, largest first
-                               // (to make sure we don't run out of stack space)
-                               if ((high - k) >= (k - low)) {
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                               } else {
-                                       if ((k - 1) > low) {
-                                               stack[sp].high = k;
-                                               stack[sp].low = low;
-                                               sp++;
-                                       }
-                                       
-                                       if ((k + 1) < high) {
-                                               stack[sp].high = high;
-                                               stack[sp].low = k;
-                                               sp++;
-                                       }
-                               }
-                       } while (sp > 0);
-               }
-
-               private static void CheckComparerAvailable<K> (K [] keys, int low, int high)
-               {
-                       // move null keys to beginning of array,
-                       // ensure that non-null keys implement IComparable
-                       for (int i = low; i < high; i++) {
-                               K key = keys [i];
-                               if (key != null) {
-                                       if (!(key is IComparable<K>) && !(key is IComparable)) {
-                                               string msg = Locale.GetText ("No IComparable<T> or IComparable interface found for type '{0}'.");
-                                               throw new InvalidOperationException (String.Format (msg, key.GetType ()));
-                                       }  
-                               }
-                       }
-               }
-
-               [MethodImpl ((MethodImplOptions)256)]
-               private static void swap<K, V> (K [] keys, V [] items, int i, int j)
-               {
-                       K tmp;
-
-                       tmp = keys [i];
-                       keys [i] = keys [j];
-                       keys [j] = tmp;
-
-                       if (items != null) {
-                               V itmp;
-                               itmp = items [i];
-                               items [i] = items [j];
-                               items [j] = itmp;
-                       }
-               }
-
-               [MethodImpl ((MethodImplOptions)256)]
-               private static void swap<T> (T [] array, int i, int j)
-               {
-                       T tmp = array [i];
-                       array [i] = array [j];
-                       array [j] = tmp;
-               }
-               
-               public void CopyTo (Array array, int index)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       // The order of these exception checks may look strange,
-                       // but that's how the microsoft runtime does it.
-                       if (this.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-                       if (index + this.GetLength (0) > array.GetLowerBound (0) + array.GetLength (0))
-                               throw new ArgumentException ("Destination array was not long " +
-                                       "enough. Check destIndex and length, and the array's " +
-                                       "lower bounds.");
-                       if (array.Rank > 1)
-                               throw new RankException (Locale.GetText ("Only single dimension arrays are supported."));
-                       if (index < 0)
-                               throw new ArgumentOutOfRangeException ("index", Locale.GetText (
-                                       "Value has to be >= 0."));
-
-                       Copy (this, this.GetLowerBound (0), array, index, this.GetLength (0));
-               }
-
-               [ComVisible (false)]
-               public void CopyTo (Array array, long index)
-               {
-                       if (index < 0 || index > Int32.MaxValue)
-                               throw new ArgumentOutOfRangeException ("index", Locale.GetText (
-                                       "Value must be >= 0 and <= Int32.MaxValue."));
-
-                       CopyTo (array, (int) index);
-               }
-
-               internal class SimpleEnumerator : IEnumerator, ICloneable
-               {
-                       Array enumeratee;
-                       int currentpos;
-                       int length;
-
-                       public SimpleEnumerator (Array arrayToEnumerate)
-                       {
-                               this.enumeratee = arrayToEnumerate;
-                               this.currentpos = -1;
-                               this.length = arrayToEnumerate.Length;
-                       }
-
-                       public object Current {
-                               get {
-                                       // Exception messages based on MS implementation
-                                       if (currentpos < 0 )
-                                               throw new InvalidOperationException (Locale.GetText (
-                                                       "Enumeration has not started."));
-                                       if  (currentpos >= length)
-                                               throw new InvalidOperationException (Locale.GetText (
-                                                       "Enumeration has already ended"));
-                                       // Current should not increase the position. So no ++ over here.
-                                       return enumeratee.GetValueImpl (currentpos);
-                               }
-                       }
-
-                       public bool MoveNext()
-                       {
-                               //The docs say Current should throw an exception if last
-                               //call to MoveNext returned false. This means currentpos
-                               //should be set to length when returning false.
-                               if (currentpos < length)
-                                       currentpos++;
-                               if(currentpos < length)
-                                       return true;
-                               else
-                                       return false;
-                       }
-
-                       public void Reset()
-                       {
-                               currentpos = -1;
-                       }
-
-                       public object Clone ()
-                       {
-                               return MemberwiseClone ();
-                       }
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static void Resize<T> (ref T [] array, int newSize)
-               {
-                       if (newSize < 0)
-                               throw new ArgumentOutOfRangeException ("newSize");
-                       
-                       if (array == null) {
-                               array = new T [newSize];
-                               return;
-                       }
-
-                       var arr = array;
-                       int length = arr.Length;
-                       if (length == newSize)
-                               return;
-                       
-                       T [] a = new T [newSize];
-                       int tocopy = Math.Min (newSize, length);
-
-                       if (tocopy < 9) {
-                               for (int i = 0; i < tocopy; ++i)
-                                       UnsafeStore (a, i, UnsafeLoad (arr, i));
-                       } else {
-                               FastCopy (arr, 0, a, 0, tocopy);
-                       }
-                       array = a;
-               }
-               
-               public static bool TrueForAll <T> (T [] array, Predicate <T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       foreach (T t in array)
-                               if (! match (t))
-                                       return false;
-                               
-                       return true;
-               }
-               
-               public static void ForEach<T> (T [] array, Action <T> action)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       if (action == null)
-                               throw new ArgumentNullException ("action");
-                       
-                       foreach (T t in array)
-                               action (t);
-               }
-               
-               public static TOutput[] ConvertAll<TInput, TOutput> (TInput [] array, Converter<TInput, TOutput> converter)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       if (converter == null)
-                               throw new ArgumentNullException ("converter");
-                       
-                       TOutput [] output = new TOutput [array.Length];
-                       for (int i = 0; i < array.Length; i ++)
-                               output [i] = converter (array [i]);
-                       
-                       return output;
-               }
-               
-               public static int FindLastIndex<T> (T [] array, Predicate <T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       return GetLastIndex (array, 0, array.Length, match);
-               }
-               
-               public static int FindLastIndex<T> (T [] array, int startIndex, Predicate<T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ();
-
-                       if (startIndex < 0 || (uint) startIndex > (uint) array.Length)
-                               throw new ArgumentOutOfRangeException ("startIndex");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       return GetLastIndex (array, 0, startIndex + 1, match);
-               }
-               
-               public static int FindLastIndex<T> (T [] array, int startIndex, int count, Predicate<T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-
-                       if (startIndex < 0 || (uint) startIndex > (uint) array.Length)
-                               throw new ArgumentOutOfRangeException ("startIndex");
-                       
-                       if (count < 0)
-                               throw new ArgumentOutOfRangeException ("count");
-
-                       if (startIndex - count + 1 < 0)
-                               throw new ArgumentOutOfRangeException ("count must refer to a location within the array");
-
-                       return GetLastIndex (array, startIndex - count + 1, count, match);
-               }
-
-               internal static int GetLastIndex<T> (T[] array, int startIndex, int count, Predicate<T> match)
-               {
-                       // unlike FindLastIndex, takes regular params for search range
-                       for (int i = startIndex + count; i != startIndex;)
-                               if (match (array [--i]))
-                                       return i;
-
-                       return -1;
-               }
-               
-               public static int FindIndex<T> (T [] array, Predicate<T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       return GetIndex (array, 0, array.Length, match);
-               }
-               
-               public static int FindIndex<T> (T [] array, int startIndex, Predicate<T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (startIndex < 0 || (uint) startIndex > (uint) array.Length)
-                               throw new ArgumentOutOfRangeException ("startIndex");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-
-                       return GetIndex (array, startIndex, array.Length - startIndex, match);
-               }
-               
-               public static int FindIndex<T> (T [] array, int startIndex, int count, Predicate<T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       
-                       if (startIndex < 0)
-                               throw new ArgumentOutOfRangeException ("startIndex");
-                       
-                       if (count < 0)
-                               throw new ArgumentOutOfRangeException ("count");
-
-                       if ((uint) startIndex + (uint) count > (uint) array.Length)
-                               throw new ArgumentOutOfRangeException ("index and count exceed length of list");
-
-                       return GetIndex (array, startIndex, count, match);
-               }
-
-               internal static int GetIndex<T> (T[] array, int startIndex, int count, Predicate<T> match)
-               {
-                       int end = startIndex + count;
-                       for (int i = startIndex; i < end; i ++)
-                               if (match (array [i]))
-                                       return i;
-                               
-                       return -1;
-               }
-               
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch<T> (T [] array, T value)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       
-                       return BinarySearch<T> (array, 0, array.Length, value, null);
-               }
-               
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch<T> (T [] array, T value, IComparer<T> comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       
-                       return BinarySearch<T> (array, 0, array.Length, value, comparer);
-               }
-               
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch<T> (T [] array, int index, int length, T value)
-               {
-                       return BinarySearch<T> (array, index, length, value, null);
-               }
-               
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static int BinarySearch<T> (T [] array, int index, int length, T value, IComparer<T> comparer)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       if (index < 0)
-                               throw new ArgumentOutOfRangeException ("index", Locale.GetText (
-                                       "index is less than the lower bound of array."));
-                       if (length < 0)
-                               throw new ArgumentOutOfRangeException ("length", Locale.GetText (
-                                       "Value has to be >= 0."));
-                       // re-ordered to avoid possible integer overflow
-                       if (index > array.Length - length)
-                               throw new ArgumentException (Locale.GetText (
-                                       "index and length do not specify a valid range in array."));
-                       if (comparer == null)
-                               comparer = Comparer <T>.Default;
-                       
-                       int iMin = index;
-                       int iMax = index + length - 1;
-                       int iCmp = 0;
-                       try {
-                               while (iMin <= iMax) {
-                                       // Be careful with overflows
-                                       int iMid = iMin + ((iMax - iMin) / 2);
-                                       iCmp = comparer.Compare (array [iMid], value);
-
-                                       if (iCmp == 0)
-                                               return iMid;
-
-                                       if (iCmp > 0)
-                                               iMax = iMid - 1;
-                                       else
-                                               iMin = iMid + 1; // compensate for the rounding down
-                               }
-                       } catch (Exception e) {
-                               throw new InvalidOperationException (Locale.GetText ("Comparer threw an exception."), e);
-                       }
-
-                       return ~iMin;
-               }
-               
-               public static int IndexOf<T> (T [] array, T value)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-       
-                       return IndexOf<T> (array, value, 0, array.Length);
-               }
-
-               public static int IndexOf<T> (T [] array, T value, int startIndex)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       return IndexOf<T> (array, value, startIndex, array.Length - startIndex);
-               }
-
-               public static int IndexOf<T> (T[] array, T value, int startIndex, int count)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       
-                       // re-ordered to avoid possible integer overflow
-                       if (count < 0 || startIndex < array.GetLowerBound (0) || startIndex - 1 > array.GetUpperBound (0) - count)
-                               throw new ArgumentOutOfRangeException ();
-
-                       return EqualityComparer<T>.Default.IndexOf (array, value, startIndex, count);
-               }
-               
-               public static int LastIndexOf<T> (T [] array, T value)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (array.Length == 0)
-                               return -1;
-                       return LastIndexOf<T> (array, value, array.Length - 1);
-               }
-
-               public static int LastIndexOf<T> (T [] array, T value, int startIndex)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       return LastIndexOf<T> (array, value, startIndex, startIndex + 1);
-               }
-
-               public static int LastIndexOf<T> (T [] array, T value, int startIndex, int count)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-                       
-                       if (count < 0 || startIndex < array.GetLowerBound (0) ||
-                               startIndex > array.GetUpperBound (0) || startIndex - count + 1 < array.GetLowerBound (0))
-                               throw new ArgumentOutOfRangeException ();
-                       
-                       EqualityComparer<T> equalityComparer = EqualityComparer<T>.Default;
-                       for (int i = startIndex; i >= startIndex - count + 1; i--) {
-                               if (equalityComparer.Equals (array [i], value))
-                                       return i;
-                       }
-
-                       return -1;
-               }
-               
-               public static T [] FindAll<T> (T [] array, Predicate <T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       int pos = 0;
-                       T [] d = new T [array.Length];
-                       foreach (T t in array)
-                               if (match (t))
-                                       d [pos++] = t;
-                       
-                       Resize <T> (ref d, pos);
-                       return d;
-               }
-
-               [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
-               public static T[] Empty<T>()
-               {
-                       return EmptyArray<T>.Value;
-               }
-
-               public static bool Exists<T> (T [] array, Predicate <T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       foreach (T t in array)
-                               if (match (t))
-                                       return true;
-                       return false;
-               }
-
-               public static ReadOnlyCollection<T> AsReadOnly<T> (T[] array)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       return new ReadOnlyCollection<T> (array);
-               }
-
-               public static void Fill<T> (T[] array, T value)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException (nameof (array));
-
-                       for (int i = 0; i < array.Length; i++)
-                               array [i] = value;
-               }
-
-               public static void Fill<T> (T[] array, T value, int startIndex, int count)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException (nameof (array));
-
-                       if (startIndex < 0 || startIndex > array.Length)
-                               throw new ArgumentOutOfRangeException (nameof (startIndex));
-
-                       if (count < 0 || startIndex > array.Length - count)
-                               throw new ArgumentOutOfRangeException (nameof (count));
-
-                       for (int i = startIndex; i < startIndex + count; i++)
-                               array [i] = value;
-               }
-
-               public static T Find<T> (T [] array, Predicate<T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       foreach (T t in array)
-                               if (match (t))
-                                       return t;
-                               
-                       return default (T);
-               }
-               
-               public static T FindLast<T> (T [] array, Predicate <T> match)
-               {
-                       if (array == null)
-                               throw new ArgumentNullException ("array");
-
-                       if (match == null)
-                               throw new ArgumentNullException ("match");
-                       
-                       for (int i = array.Length - 1; i >= 0; i--)
-                               if (match (array [i]))
-                                       return array [i];
-                               
-                       return default (T);
-               }
-
-               [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]           
-               //
-               // The constrained copy should guarantee that if there is an exception thrown
-               // during the copy, the destination array remains unchanged.
-               // This is related to System.Runtime.Reliability.CER
-               public static void ConstrainedCopy (Array sourceArray, int sourceIndex, Array destinationArray, int destinationIndex, int length)
-               {
-                       Copy (sourceArray, sourceIndex, destinationArray, destinationIndex, length);
+                       return GetValueImpl (flattenedIndex);
                }
 
                #region Unsafe array operations
index 72bf7779d501992cfca5ba03a9a038e16d926963..04247b244502738e218987625d7d650ef820e719 100644 (file)
@@ -48,16 +48,11 @@ namespace System {
        public static partial class Environment {
 
                /*
-                * This is the version number of the corlib-runtime interface. When
-                * making changes to this interface (by changing the layout
-                * of classes the runtime knows about, changing icall signature or
-                * semantics etc), increment this variable. Also increment the
-                * pair of this variable in the runtime in metadata/appdomain.c.
-                * Changes which are already detected at runtime, like the addition
-                * of icalls, do not require an increment.
+                * This is the version number of the corlib-runtime interface.
+                * It is defined in configure.ac.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 164;
+               private const int mono_corlib_version = Consts.MonoCorlibVersion;
 #pragma warning restore 169
 
                [ComVisible (true)]
index 72276936b08d43266180a2f39e868edb16ffb7ec..3e3d0d3e8f0e716708dd91edbe4a40e9f7c97e22 100644 (file)
@@ -1813,54 +1813,42 @@ namespace System
                                                return;
                                        }
                                }
-                               if (index == 2) {
-                                       if (zero) {
-                                               offset = lens [0] + lens [1] + 2;
-                                               length = format.Length - offset;
-                                               return;
-                                       }
-                                       if (positive) {
-                                               offset = 0;
-                                               length = lens [0];
-                                               return;
-                                       }
-                                       if (lens [1] > 0) {
-                                               positive = true;
-                                               offset = lens [0] + 1;
-                                               length = lens [1];
+                               if (zero) {
+                                       if (index == 2) {
+                                               if (format.Length - lastPos == 0) {
+                                                       offset = 0;
+                                                       length = lens [0];
+                                               } else {
+                                                       offset = lens [0] + lens [1] + 2;
+                                                       length = format.Length - offset;
+                                               }
                                                return;
                                        }
-                                       else {
+
+                                       if (lens [2] == 0) {
                                                offset = 0;
                                                length = lens [0];
-                                               return;
-                                       }
-                               }
-                               if (index == 3) {
-                                       if (zero) {
+                                       } else {
                                                offset = lens [0] + lens [1] + 2;
                                                length = lens [2];
-                                               return;
-                                       }
-                                       if (positive) {
-                                               offset = 0;
-                                               length = lens [0];
-                                               return;
-                                       }
-                                       if (lens [1] > 0) {
-                                               positive = true;
-                                               offset = lens [0] + 1;
-                                               length = lens [1];
-                                               return;
-                                       }
-                                       else {
-                                               offset = 0;
-                                               length = lens [0];
-                                               return;
                                        }
-                               }
 
-                               throw new ArgumentException ();
+                                       return;
+
+                               }
+                               if (positive) {
+                                       offset = 0;
+                                       length = lens [0];
+                                       return;
+                               }
+                               if (lens [1] > 0) {
+                                       positive = true;
+                                       offset = lens [0] + 1;
+                                       length = lens [1];
+                                       return;
+                               }
+                               offset = 0;
+                               length = lens [0];
                        }
 
                        public static CustomInfo Parse (string format, int offset, int length, NumberFormatInfo nfi)
index 7054084409dab3c72f7be13a1ddc4df6b7c49d9f..048091d2d7cb9dbb624836c4833bfa52d79b89cc 100755 (executable)
@@ -3436,15 +3436,20 @@ namespace MonoTests.Microsoft.Win32
                [Test]
                public void bugnew2 () // values cannot be written on registry root (hive)
                {
-                       string [] names = Registry.CurrentUser.GetValueNames ();
-                       Assert.IsNotNull (names, "#1");
-                       Registry.CurrentUser.SetValue ("name1", "value1");
-                       Assert.IsNotNull (Registry.CurrentUser.GetValue ("name1"), "#2");
-                       Assert.AreEqual ("value1", Registry.CurrentUser.GetValue ("name1"), "#3");
-                       string [] newNames = Registry.CurrentUser.GetValueNames ();
-                       Assert.IsNotNull (newNames, "#4");
-                       Assert.AreEqual (names.Length + 1, newNames.Length, "#5");
-                       Registry.CurrentUser.DeleteValue ("name1");
+                       try {
+                               string [] names = Registry.CurrentUser.GetValueNames ();
+                               Assert.IsNotNull (names, "#1");
+                               Registry.CurrentUser.SetValue ("name1", "value1");
+                               Assert.IsNotNull (Registry.CurrentUser.GetValue ("name1"), "#2");
+                               Assert.AreEqual ("value1", Registry.CurrentUser.GetValue ("name1"), "#3");
+                               string [] newNames = Registry.CurrentUser.GetValueNames ();
+                               Assert.IsNotNull (newNames, "#4");
+                               Assert.AreEqual (names.Length + 1, newNames.Length, "#5");
+                               Registry.CurrentUser.DeleteValue ("name1");
+                       } finally {
+                               Registry.CurrentUser.DeleteValue ("name1", false);
+                               Registry.CurrentUser.Flush ();
+                       }                               
                }
 
                [Test]
index be1f8f92729705b768877e3376a82ebb6e1ae6f7..9e89891211bfcee36eedb3d4d1c781e0f7343fc8 100644 (file)
@@ -37,6 +37,7 @@ using System.Collections.ObjectModel;
 using System.IO;
 using System.Runtime.Serialization.Formatters.Binary;
 using System.Text;
+using System.Linq;
 
 using NUnit.Framework;
 
@@ -373,6 +374,22 @@ namespace MonoTests.System.Collections.Generic {
                        }
                }
 
+               [Test]
+               public void SortTestTrickyPivot ()
+               {
+                       int[] array = new int[] { 1, 3, 5, 2, 6, 6, 6, 6, 6, 6, 6,7 ,4 };
+
+                       var list = array.ToList<int>();
+
+                       list.Sort(delegate (int x, int y)
+                       {
+                               return x < y ? -1 : 1;
+                       });
+
+                       var res = string.Join (",", list);
+                       Assert.AreEqual ("1,2,3,4,5,6,6,6,6,6,6,6,7", res);
+               }
+
                [Test]
                public void ClearTest ()
                {
@@ -1267,9 +1284,9 @@ namespace MonoTests.System.Collections.Generic {
                public void Test_Contains_After_Remove ()
                {
                        List<int> list = new List<int> ();
-            list.Add (2);
+                       list.Add (2);
 
-            list.Remove (2);
+                       list.Remove (2);
 
                        Assert.AreEqual (false, list.Contains (2), "#0");
                }
index c1dc8b59ab40fcece1dbb88b47849f7b8c7b77c1..cf95e49fa3a8774831a9cefea2ab49ea12d3ff9d 100644 (file)
@@ -2491,6 +2491,7 @@ namespace MonoTests.System.IO
                }
 
                [Test]
+               [Category ("LargeFileSupport")]
                public void Position_Large ()
                {
                        // fails if HAVE_LARGE_FILE_SUPPORT is not enabled in device builds
@@ -2513,6 +2514,7 @@ namespace MonoTests.System.IO
                }
 
                [Test]
+               [Category ("LargeFileSupport")]
                public void Seek_Large ()
                {
                        // fails if HAVE_LARGE_FILE_SUPPORT is not enabled in device builds
@@ -2537,7 +2539,7 @@ namespace MonoTests.System.IO
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // locks with offsets bigger than Int32.Max don't work on Android
+               [Category ("LargeFileSupport")]
                public void Lock_Large ()
                {
                        // note: already worked without HAVE_LARGE_FILE_SUPPORT
index f59f39301876c5dcbbd4f9164c122c672937704e..9e8485a48399d872b89e9e93f9674c92983b388b 100644 (file)
@@ -100,6 +100,7 @@ public class AssemblyBuilderTest
        }
 
        [Test]
+       [Category ("MobileNotWorking")]
        public void DefaultCtor ()
        {
                Assert.IsNotNull (ab.Evidence, "#1");
@@ -416,7 +417,7 @@ public class AssemblyBuilderTest
        }
 
        [Test]
-       [Category ("AndroidNotWorking")] // DefineResource doesn't allow path in its fileName parameter and the test attempts to write to / in effect
+       [Category ("MobileNotWorking")] // DefineResource doesn't allow path in its fileName parameter and the test attempts to write to / in effect
        public void TestDefineResource ()
        {
                ab.DefineResource ("foo", "FOO", "foo.txt", ResourceAttributes.Public);
@@ -593,12 +594,16 @@ public class AssemblyBuilderTest
        }
 
        [Test]
-       [Category ("AndroidNotWorking")] // Missing Mono.Compilerservices.SymbolWriter assembly
        public void TestDefineDynamicModule ()
        {
                ab.DefineDynamicModule ("foo", "foo.dll");
-               ab.DefineDynamicModule ("foo2", true);
                ab.DefineDynamicModule ("foo3", "foo3.dll");
+       }
+
+       [Category ("MobileNotWorking")] //XA doesn't ship SymbolWriter. https://bugzilla.xamarin.com/show_bug.cgi?id=53038
+       public void TestDefineDynamicModuleWithSymbolWriter ()
+       {
+               ab.DefineDynamicModule ("foo2", true);
                ab.DefineDynamicModule ("foo4", "foo4.dll", true);
        }
 
index 8e67c976f1e3bb267cc8781bbd720bd0561e2b2b..3bf8fe8246ed66f1c601320ffc257c329eb316fb 100644 (file)
@@ -136,11 +136,10 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                public void DefineType_Name_Null ()
                {
                        AssemblyBuilder ab = genAssembly ();
-                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", false);
                        try {
                                mb.DefineType ((string) null);
                                Assert.Fail ("#1");
@@ -153,11 +152,10 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                public void DefineType_Name_Empty ()
                {
                        AssemblyBuilder ab = genAssembly ();
-                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", false);
                        try {
                                mb.DefineType (string.Empty);
                                Assert.Fail ("#1");
@@ -171,11 +169,10 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                public void DefineType_Name_NullChar ()
                {
                        AssemblyBuilder ab = genAssembly ();
-                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", false);
                        try {
                                mb.DefineType ("\0test");
                                Assert.Fail ("#1");
@@ -191,11 +188,10 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                public void DefineType_InterfaceNotAbstract ()
                {
                        AssemblyBuilder ab = genAssembly ();
-                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", false);
 
                        try {
                                mb.DefineType ("ITest1", TypeAttributes.Interface);
@@ -228,13 +224,12 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                public void DefineType_Parent_Interface ()
                {
                        TypeBuilder tb;
 
                        AssemblyBuilder ab = genAssembly ();
-                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", false);
 
                        tb = mb.DefineType ("Foo", TypeAttributes.Class,
                                typeof (ICollection));
@@ -246,11 +241,10 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                public void DefineType_TypeSize ()
                {
                        AssemblyBuilder ab = genAssembly ();
-                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       ModuleBuilder mb = ab.DefineDynamicModule ("foo.dll", "foo.dll", false);
 
                        TypeBuilder tb = mb.DefineType ("Foo", TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.SequentialLayout,
                                typeof (ValueType), 1);
@@ -258,11 +252,10 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                [ExpectedException (typeof (ArgumentException))]
                public void DuplicateTypeName () {
                        AssemblyBuilder ab = genAssembly ();
-                       ModuleBuilder module = ab.DefineDynamicModule ("foo.dll", "foo.dll", true);
+                       ModuleBuilder module = ab.DefineDynamicModule ("foo.dll", "foo.dll", false);
 
                        var itb = module.DefineType ("TBase", TypeAttributes.Public);
 
@@ -274,7 +267,7 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
+               [Category ("MobileNotWorking")] // Missing Mono.CompilerServices.SymbolWriter assembly
                public void DuplicateSymbolDocument ()
                {
                        AssemblyBuilder ab = genAssembly ();
index 19be52d9a91b4b96f644a19d9b239df623d3ac66..94cfff6e2fd7bca624f849d260fb8df58d94487d 100644 (file)
@@ -1182,7 +1182,6 @@ namespace MonoTests.System.Reflection.Emit
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Fails with System.MethodAccessException : Method `t17:.ctor ()' is inaccessible from method `t18:.ctor ()'
                public void DefineDefaultConstructor_Parent_DefaultCtorInaccessible ()
                {
                        TypeBuilder tb;
@@ -1198,6 +1197,16 @@ namespace MonoTests.System.Reflection.Emit
                        try {
                                Activator.CreateInstance (emitted_type);
                                Assert.Fail ("#1");
+
+                               /* MOBILE special case MethodAccessException on reflection invokes and don't wrap them. */
+#if MOBILE
+                       } catch (MethodAccessException mae) {
+                               Assert.IsNull (mae.InnerException, "#2");
+                               Assert.IsNotNull (mae.Message, "#3");
+                               Assert.IsTrue (mae.Message.IndexOf (parent_type.FullName) != -1, "#4:" + mae.Message);
+                               Assert.IsTrue (mae.Message.IndexOf (".ctor") != -1, "#4:" + mae.Message);
+                       }
+#else
                        } catch (TargetInvocationException ex) {
                                Assert.AreEqual (typeof (TargetInvocationException), ex.GetType (), "#2");
                                Assert.IsNotNull (ex.InnerException, "#3");
@@ -1211,6 +1220,7 @@ namespace MonoTests.System.Reflection.Emit
                                Assert.IsTrue (mae.Message.IndexOf (parent_type.FullName) != -1, "#9:" + mae.Message);
                                Assert.IsTrue (mae.Message.IndexOf (".ctor") != -1, "#10:" + mae.Message);
                        }
+#endif
                }
 
                [Test]
index 6c76ecda8664bd286a2bf55d0f68a31ee98c4de5..b3a9ba8012726d237f2048468e8fee5e77fee8a7 100644 (file)
@@ -215,7 +215,6 @@ namespace MonoTests.System.Reflection
 
 #if !MONOTOUCH && !FULL_AOT_RUNTIME // Reflection.Emit is not supported.
                [Test]
-               [Category("AndroidNotWorking")] // Missing Mono.CompilerServices.SymbolWriter
                public void GetModules_MissingFile ()
                {
                        AssemblyName newName = new AssemblyName ();
@@ -223,7 +222,7 @@ namespace MonoTests.System.Reflection
 
                        AssemblyBuilder ab = Thread.GetDomain().DefineDynamicAssembly (newName, AssemblyBuilderAccess.RunAndSave, TempFolder);
 
-                       ModuleBuilder mb = ab.DefineDynamicModule ("myDynamicModule1", "myDynamicModule.dll", true);
+                       ModuleBuilder mb = ab.DefineDynamicModule ("myDynamicModule1", "myDynamicModule.dll", false);
 
                        ab.Save ("test_assembly.dll");
 
@@ -474,11 +473,7 @@ namespace MonoTests.System.Reflection
 // with the semantics of aot'ed assembly loading, as
 // aot may assert when loading. This assumes that it's
 // safe to greedly load everything.
-#if FULL_AOT_DESKTOP
-                       string [] names = { "testing_aot_full_corlib_test", "winaot_corlib_test" };
-#else
-                       string [] names = { "corlib_test_net_1_1", "corlib_test_net_2_0", "corlib_test_net_4_0", "corlib_test_net_4_5", "net_4_x_corlib_test", "corlib_plattest", "mscorlibtests", "BclTests" };
-#endif
+                       var names = new string[] { Assembly.GetCallingAssembly ().GetName ().Name };
 
                        foreach (string s in names)
                                if (Assembly.LoadWithPartialName (s) != null)
@@ -730,12 +725,12 @@ namespace MonoTests.System.Reflection
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Assemblies in Xamarin.Android cannot be directly as files
+               [Category ("AndroidNotWorking")] // Xamarin.Android assemblies are bundled so they don't exist in the file system.
                public void ReflectionOnlyLoadFrom ()
                {
                        string loc = typeof (AssemblyTest).Assembly.Location;
                        string filename = Path.GetFileName (loc);
-                       Assembly assembly = Assembly.ReflectionOnlyLoadFrom (filename);
+                       Assembly assembly = Assembly.ReflectionOnlyLoadFrom (loc);
 
                        Assert.IsNotNull (assembly);
                        Assert.IsTrue (assembly.ReflectionOnly);
index 0fbc27d11b449808c84742888593ae4ec371f774..6a22ea1c638288ad05e8789c0d273423091ec327 100644 (file)
@@ -287,12 +287,28 @@ namespace MonoTests.System.Reflection
                class GBD_D : GBD_C { public new virtual void f () {} }
                class GBD_E : GBD_D { public override    void f () {} }
 
+               class GBD_E2 : GBD_D { }
+               class GBD_F : GBD_E { }
+
+
                [Test]
                public void GetBaseDefinition ()
                {
                        Assert.AreEqual (typeof (GBD_A), typeof (GBD_C).GetMethod ("f").GetBaseDefinition ().DeclaringType);
+                       Assert.AreEqual (typeof (GBD_A), typeof (GBD_C).GetMethod ("f").GetBaseDefinition ().ReflectedType, "#1r");
+
                        Assert.AreEqual (typeof (GBD_D), typeof (GBD_D).GetMethod ("f").GetBaseDefinition ().DeclaringType);
+                       Assert.AreEqual (typeof (GBD_D), typeof (GBD_D).GetMethod ("f").GetBaseDefinition ().ReflectedType, "#2r");
+
                        Assert.AreEqual (typeof (GBD_D), typeof (GBD_E).GetMethod ("f").GetBaseDefinition ().DeclaringType);
+                       Assert.AreEqual (typeof (GBD_D), typeof (GBD_E).GetMethod ("f").GetBaseDefinition ().ReflectedType, "#3r");
+
+                       Assert.AreEqual (typeof (GBD_D), typeof (GBD_E2).GetMethod ("f").GetBaseDefinition ().DeclaringType, "#4");
+                       Assert.AreEqual (typeof (GBD_D), typeof (GBD_E2).GetMethod ("f").GetBaseDefinition ().ReflectedType, "#4r");
+
+                       Assert.AreEqual (typeof (GBD_D), typeof (GBD_F).GetMethod ("f").GetBaseDefinition ().DeclaringType, "#5");
+                       Assert.AreEqual (typeof (GBD_D), typeof (GBD_F).GetMethod ("f").GetBaseDefinition ().ReflectedType, "#5r");
+
                }
 
                class GenericBase<T,H> {
index dd4e8f1bc16035790c258abf95bf9c205549d77f..3edccf4028a967e4ebaa596f377a02b5e04164ea 100644 (file)
@@ -343,7 +343,6 @@ public class ModuleTest
        }
 #if !MONOTOUCH && !FULL_AOT_RUNTIME
        [Test]
-       [Category ("AndroidNotWorking")] // Mono.CompilerServices.SymbolWriter not available for Xamarin.Android
        public void GetTypes ()
        {
                AssemblyName newName = new AssemblyName ();
@@ -351,7 +350,7 @@ public class ModuleTest
 
                AssemblyBuilder ab = Thread.GetDomain().DefineDynamicAssembly (newName, AssemblyBuilderAccess.RunAndSave, TempFolder);
 
-               ModuleBuilder mb = ab.DefineDynamicModule ("myDynamicModule1", "myDynamicModule" + ".dll", true);
+               ModuleBuilder mb = ab.DefineDynamicModule ("myDynamicModule1", "myDynamicModule" + ".dll", false);
 
                TypeBuilder tb = mb.DefineType ("Foo", TypeAttributes.Public);
                tb.CreateType ();
index 151e21c581d395fd717b9c9d9a7f5b83ba3bd76b..9d2292bcfab24ebf689a7e99439c2b2e13830555 100644 (file)
@@ -785,6 +785,7 @@ namespace MonoTests.System.Resources
                }
 
                [Test]
+               [Category ("SatelliteAssembliesNotWorking")]
                public void TestSatellites ()
                {
                        ResourceManager manager = new ResourceManager("Resources", GetType ().Assembly);
index 832ac6fc1cc4c09cc745fee989c1ec1af40e4a4a..3326d29bbb0d01074e4a53b6fa8492e1f5275e18 100644 (file)
@@ -74,11 +74,7 @@ namespace MonoTests.System.Runtime.InteropServices {
                {
                        string dirname = RuntimeEnvironment.GetRuntimeDirectory ();
                        Assert.IsNotNull (dirname, "GetRuntimeDirectory");
-#if MONODROID
-                       Assert.IsTrue (dirname.Length == 0, "directory name empty");
-#else
-                       Assert.IsTrue (Directory.Exists (dirname), "Exists");
-#endif
+                       Assert.IsTrue (dirname.Length == 0 || Directory.Exists (dirname), "Exists");
                }
 
                [Test]
index ed0132cc88b3f060d39bbbb6089554b71cb65ea1..4a26c93036ca41281d61e92d0af5a1dafa73235c 100644 (file)
@@ -48,10 +48,7 @@ namespace MonoTests.System.Runtime.InteropServices
                        protected override void Dispose (bool manual)
                        {
                                disposed = true;
-#if !MONODROID
-                               // Bombs on Android (ObjectDisposedException)
                                base.Dispose (manual);
-#endif
                        }
                }
 
@@ -80,7 +77,6 @@ namespace MonoTests.System.Runtime.InteropServices
 
                [Test]
                [ExpectedException (typeof (ObjectDisposedException))]
-               [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue
                public void BadDispose2 ()
                {
                        FakeSafeHandle sf = new FakeSafeHandle ();
@@ -91,7 +87,6 @@ namespace MonoTests.System.Runtime.InteropServices
 
                [Test]
                [ExpectedException (typeof (ObjectDisposedException))]
-               [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue
                public void BadDispose3 ()
                {
                        FakeSafeHandle sf = new FakeSafeHandle ();
@@ -120,7 +115,6 @@ namespace MonoTests.System.Runtime.InteropServices
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue
                public void GoodDispose ()
                {
                        int dummyHandle = 0xDEAD;
@@ -238,7 +232,6 @@ namespace MonoTests.System.Runtime.InteropServices
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue
                public void ReleaseAfterDispose1 ()
                {
                        int dummyHandle = 0xDEAD;
@@ -267,7 +260,6 @@ namespace MonoTests.System.Runtime.InteropServices
 
                [Test]
                [ExpectedException (typeof (ObjectDisposedException))]
-               [Category ("AndroidNotWorking")] // Because of the FakeSafeHandle.Dispose issue
                public void ReleaseAfterDispose2 ()
                {
                        FakeSafeHandle sf = new FakeSafeHandle (true);
@@ -286,7 +278,6 @@ namespace MonoTests.System.Runtime.InteropServices
                }
 
                [Test]
-               [Category ("AndroidNotWorking")] // Not until Dispose runtime crasher in FakeSafeHandle is fixed
                public void NoReleaseUnowned ()
                {
                        FakeSafeHandle sf = new FakeSafeHandle (false);
index efbc57018e6b942dc8260569805bb702abc1e0dd..f49cf1ac3cf7686ca80449cf64ba50532100ce92 100644 (file)
@@ -72,7 +72,7 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates {
                        File.Delete("temp.b64");
                }
 
-#if !MOBILE
+#if !MOBILE && !MONOMAC
                public IntPtr GetHandleEx (byte[] certificate) 
                {
                        CertificateContext cc = new CertificateContext ();
@@ -104,11 +104,15 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates {
                }
 
                [Test]
-#if MOBILE
+#if MOBILE || MONOMAC
                [Ignore ("This constructor always throw a NotSupportedException under MOBILE and is useless without CryptoAPI (i.e. outside Windows)")]
 #endif
                public void ConstructorIntPtr ()
                {
+                       // This test uses a certificate format that only works
+                       if (PlatformID.Win32NT != Environment.OSVersion.Platform)
+                               return;
+
                        byte[] cert = { 0x30,0x82,0x01,0xFF,0x30,0x82,0x01,0x6C,0x02,0x05,0x02,0x72,0x00,0x06,0xE8,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x02,0x05,0x00,0x30,0x5F,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x20,0x30,0x1E,0x06,0x03,0x55,0x04,0x0A,0x13,0x17,0x52,0x53,0x41,0x20,0x44,0x61,0x74,0x61,0x20,0x53,0x65,0x63,0x75,0x72,0x69,0x74,0x79,0x2C,0x20,0x49,0x6E,0x63,0x2E,0x31,0x2E,0x30,0x2C,0x06,0x03,0x55,0x04,0x0B,0x13,0x25,0x53,0x65,0x63,0x75,0x72,0x65,0x20,0x53,0x65,0x72,0x76,
                                0x65,0x72,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x1E,0x17,0x0D,0x39,0x36,0x30,0x33,0x31,0x32,0x31,0x38,0x33,0x38,0x34,0x37,0x5A,0x17,0x0D,0x39,0x37,0x30,0x33,0x31,0x32,0x31,0x38,0x33,0x38,0x34,0x36,0x5A,0x30,0x61,0x31,0x0B,0x30,0x09,0x06,0x03,0x55,0x04,0x06,0x13,0x02,0x55,0x53,0x31,0x13,0x30,0x11,0x06,0x03,0x55,0x04,0x08,0x13,0x0A,0x43,0x61,0x6C,0x69,0x66,0x6F,0x72,0x6E,0x69,0x61,0x31,0x14,0x30,0x12,0x06,0x03,
                                0x55,0x04,0x0A,0x13,0x0B,0x43,0x6F,0x6D,0x6D,0x65,0x72,0x63,0x65,0x4E,0x65,0x74,0x31,0x27,0x30,0x25,0x06,0x03,0x55,0x04,0x0B,0x13,0x1E,0x53,0x65,0x72,0x76,0x65,0x72,0x20,0x43,0x65,0x72,0x74,0x69,0x66,0x69,0x63,0x61,0x74,0x69,0x6F,0x6E,0x20,0x41,0x75,0x74,0x68,0x6F,0x72,0x69,0x74,0x79,0x30,0x70,0x30,0x0D,0x06,0x09,0x2A,0x86,0x48,0x86,0xF7,0x0D,0x01,0x01,0x01,0x05,0x00,0x03,0x5F,0x00,0x30,0x5C,0x02,0x55,0x2D,0x58,0xE9,0xBF,0xF0,0x31,0xCD,0x79,0x06,0x50,0x5A,0xD5,0x9E,0x0E,0x2C,0xE6,0xC2,0xF7,0xF9,
index 24cf2b4ccc401c577389a81e641b12a151e9de90..ee5c13285bf8fdb2210b00103954378a01435b59 100644 (file)
@@ -487,6 +487,7 @@ public void Certificate6 ()
 // Certificate: basic\BADCERT.cer
 // - Bad certificate (will throw an exception)
 [Test]
+[Category ("MacNotWorking")] // SecCertificateCreateWithData does different things on 10.11 vs 10.12 with invalid certificates https://bugzilla.xamarin.com/show_bug.cgi?id=53689
 public void Certificate7 ()
 {
        // cannot be loaded - will throw an exception
index fc5d762eb2f9066343471a4a5b58aed79c0b1f46..a79540778e8284e31635572b188df8ced78de1f6 100644 (file)
@@ -412,6 +412,7 @@ namespace MonoTests.System {
                }
 
                [Test]
+               [Category ("MobileNotWorking")]
                [ExpectedException (typeof (ArgumentNullException))]
                public void GetObject_UrlNull ()
                {
index fcb55d4de09149efa3c67ee184e6e17b6d36d75e..4f7fa1fc1a7a6cf5fa7e30d2786c5c4be02432c7 100644 (file)
@@ -311,88 +311,47 @@ namespace MonoTests.System {
                }
        
                [Test]
-               public void Check_InvalidOperationException() {
-                       object[] arr = new object[] {new SomeComparable (), new SomeIncomparable (), new SomeComparable ()};
+               public void Check_NoInvalidOperationException ()
+               {
+                       Array arr = new object[] {new SomeComparable (), new SomeIncomparable (), new SomeComparable ()};
        
-                       try {
-                               Array.Sort (arr);
-                               Assert.Fail ("#1");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr);
                        
-                       try {
-                               Array.Sort (arr, (Array)null);
-                               Assert.Fail ("#2");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr, (Array)null);
                        
-                       try {
-                               Array.Sort (arr, (IComparer)null);
-                               Assert.Fail ("#3");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr, (IComparer)null);
                        
-                       try {
-                               Array.Sort (arr, 0, 3);
-                               Assert.Fail ("#4");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr, 0, 3);
                        
-                       try {
-                               Array.Sort (arr, null, null);
-                               Assert.Fail ("#5");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr, null, null);
                        
-                       try {
-                               Array.Sort (arr, null, 0, 3);
-                               Assert.Fail ("#6");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr, null, 0, 3);
                        
-                       try {
-                               Array.Sort (arr, 0, 3, null);
-                               Assert.Fail ("#7");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr, 0, 3, null);
                        
-                       try {
-                               Array.Sort (arr, null, 0, 3, null);
-                               Assert.Fail ("#8");
-                       } catch (InvalidOperationException) {}
-       
-                       try {
-                               Array.Sort<object> (arr);
-                               Assert.Fail ("#9");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort (arr, null, 0, 3, null);
+               }
+
+               [Test]
+               public void Check_NoInvalidOperationException_Generic ()
+               {
+                       object[] arr = new object[] {new SomeComparable (), new SomeIncomparable (), new SomeComparable ()};
+
+                       Array.Sort<object> (arr);
                        
-                       try {
-                               Array.Sort<object, object> (arr, null);
-                               Assert.Fail ("#10");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort<object, object> (arr, null);
                        
-                       try {
-                               Array.Sort<object> (arr, (IComparer<object>)null);
-                               Assert.Fail ("#11");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort<object> (arr, (IComparer<object>)null);
                        
-                       try {
-                               Array.Sort<object, object> (arr, null, null);
-                               Assert.Fail ("#12");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort<object, object> (arr, null, null);
                        
-                       try {
-                               Array.Sort<object> (arr, 0, 3);
-                               Assert.Fail ("#13");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort<object> (arr, 0, 3);
                        
-                       try {
-                               Array.Sort<object, object> (arr, null, 0, 3);
-                               Assert.Fail ("#14");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort<object, object> (arr, null, 0, 3);
                        
-                       try {
-                               Array.Sort<object> (arr, 0, 3, null);
-                               Assert.Fail ("#15");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort<object> (arr, 0, 3, null);
                        
-                       try {
-                               Array.Sort<object, object> (arr, null, 0, 3, null);
-                               Assert.Fail ("#16");
-                       } catch (InvalidOperationException) {}
+                       Array.Sort<object, object> (arr, null, 0, 3, null);
                }
        }               
 }
index f8d33b932faaff3ce22b010e82b0a73673e2de14..53df7555fdbe830cacff76a44a3158f97fefb209 100644 (file)
@@ -1003,7 +1003,6 @@ public class ArrayTest
                int[] myBoundArray = new int[1] { Int32.MinValue };
                Array myExtremeArray=Array.CreateInstance ( typeof(String), myLengthArray, myBoundArray );
                Assert.AreEqual (Int32.MaxValue, ((IList)myExtremeArray).IndexOf (42), "AD04");
-
        }
 
        [Test]
@@ -2583,6 +2582,26 @@ public class ArrayTest
                }
        }
 
+       [Test]
+       public void TestSortComparableMixed()
+       {
+               var m = new TestSortComparableMixed_Comparer ();
+               var arr = new object [] { 1, 2, m, 4, 5, 6, 7, 8, 9, 10 };
+
+               Array.Sort (arr);
+
+               var expected = new object [] { m, 1, 2, 4, 5, 6, 7, 8, 9, 10 };
+               Assert.AreEqual (expected, arr);
+       }
+
+       class TestSortComparableMixed_Comparer : IComparable
+       {
+               public int CompareTo (object other)
+               {
+                       return -1;
+               }
+       }
+
        [Test]
        public void TestInitializeEmpty()
        {
index 8d9a7fb03a02aa9bdcf2a1aff83ab6d1949fcaf3..d9cf780bb22140695c1f2ac537fd82af9eb7d363 100644 (file)
@@ -467,10 +467,14 @@ public class Int32Test
                int hundred = 100;
                int neghund = -100;
                
-               Assert.IsTrue ( hundred.ToString ("#;#") == "100", "#TS1");
-               Assert.IsTrue ( hundred.ToString ("-#;#") == "-100", "#TS2");
-               Assert.IsTrue ( neghund.ToString ("#;#") == "100", "#TS3");
-               Assert.IsTrue ( neghund.ToString ("#;-#") == "-100", "#TS3");
+               Assert.AreEqual ("100", hundred.ToString ("#;#"), "#TS1");
+               Assert.AreEqual ("-100", hundred.ToString ("-#;#"), "#TS2");
+               Assert.AreEqual ("100", neghund.ToString ("#;#"), "#TS3");
+               Assert.AreEqual ("-100", neghund.ToString ("#;-#"), "#TS4");
+               Assert.AreEqual ("3", 0.ToString ("3;;"), "#TS5");
+               Assert.AreEqual ("3", 0.ToString ("3;2;"), "#TS6");
+               Assert.AreEqual ("3", 0.ToString ("3;"), "#TS7");
+               Assert.AreEqual ("3", 0.ToString ("3;;;;;;;"), "#TS8");
        }
        
        [Test]
index 72300155135e4f7b93d04f914b52d093a997ac10..d1765680ff4f2066005bdee207ec5ccec672f5ff 100644 (file)
@@ -4305,7 +4305,7 @@ namespace MonoTests.System
                        var nm = new AssemblyName ("asm");
                        var ab = AssemblyBuilder.DefineDynamicAssembly (nm,
                                                                        AssemblyBuilderAccess.Run);
-                       var mb = ab.DefineDynamicModule("m", true);
+                       var mb = ab.DefineDynamicModule("m", false);
                        var tb = mb.DefineType ("NameSpace,+*&[]\\.Type,+*&[]\\",
                                                TypeAttributes.Class | TypeAttributes.Public);
 
diff --git a/mcs/class/corlib/coreclr/ArraySortHelper.cs b/mcs/class/corlib/coreclr/ArraySortHelper.cs
new file mode 100644 (file)
index 0000000..2f62281
--- /dev/null
@@ -0,0 +1,1216 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+/*============================================================
+**
+**
+** 
+**
+**
+** Purpose: class to sort arrays
+**
+** 
+===========================================================*/
+
+using System;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
+#if MONO
+using System.Diagnostics.Private;
+#endif
+
+namespace System.Collections.Generic
+{
+    #region ArraySortHelper for single arrays
+
+    internal interface IArraySortHelper<TKey>
+    {
+        void Sort(TKey[] keys, int index, int length, IComparer<TKey> comparer);
+        int BinarySearch(TKey[] keys, int index, int length, TKey value, IComparer<TKey> comparer);
+    }
+
+    internal static class IntrospectiveSortUtilities
+    {
+        // This is the threshold where Introspective sort switches to Insertion sort.
+        // Imperically, 16 seems to speed up most cases without slowing down others, at least for integers.
+        // Large value types may benefit from a smaller number.
+        internal const int IntrosortSizeThreshold = 16;
+
+        internal static int FloorLog2(int n)
+        {
+            int result = 0;
+            while (n >= 1)
+            {
+                result++;
+                n = n / 2;
+            }
+            return result;
+        }
+
+        internal static void ThrowOrIgnoreBadComparer(Object comparer)
+        {
+            throw new ArgumentException(Environment.GetResourceString("Arg_BogusIComparer", comparer));
+        }
+    }
+
+    [TypeDependencyAttribute("System.Collections.Generic.GenericArraySortHelper`1")]
+    internal class ArraySortHelper<T>
+        : IArraySortHelper<T>
+    {
+        private static volatile IArraySortHelper<T> defaultArraySortHelper;
+
+        public static IArraySortHelper<T> Default
+        {
+            get
+            {
+                IArraySortHelper<T> sorter = defaultArraySortHelper;
+                if (sorter == null)
+                    sorter = CreateArraySortHelper();
+
+                return sorter;
+            }
+        }
+
+        private static IArraySortHelper<T> CreateArraySortHelper()
+        {
+#if !MONO
+            if (typeof(IComparable<T>).IsAssignableFrom(typeof(T)))
+            {
+                defaultArraySortHelper = (IArraySortHelper<T>)RuntimeTypeHandle.Allocate(typeof(GenericArraySortHelper<string>).TypeHandle.Instantiate(new Type[] { typeof(T) }));
+            }
+            else
+#endif
+            {
+                defaultArraySortHelper = new ArraySortHelper<T>();
+            }
+            return defaultArraySortHelper;
+        }
+
+        #region IArraySortHelper<T> Members
+
+        public void Sort(T[] keys, int index, int length, IComparer<T> comparer)
+        {
+            Debug.Assert(keys != null, "Check the arguments in the caller!");
+            Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!");
+
+            // Add a try block here to detect IComparers (or their
+            // underlying IComparables, etc) that are bogus.
+            try
+            {
+                if (comparer == null)
+                {
+                    comparer = Comparer<T>.Default;
+                }
+
+                IntrospectiveSort(keys, index, length, comparer.Compare);
+            }
+            catch (IndexOutOfRangeException)
+            {
+                IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_IComparerFailed"), e);
+            }
+        }
+
+        public int BinarySearch(T[] array, int index, int length, T value, IComparer<T> comparer)
+        {
+            try
+            {
+                if (comparer == null)
+                {
+                    comparer = Comparer<T>.Default;
+                }
+
+                return InternalBinarySearch(array, index, length, value, comparer);
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_IComparerFailed"), e);
+            }
+        }
+
+        #endregion
+
+        internal static void Sort(T[] keys, int index, int length, Comparison<T> comparer)
+        {
+            Debug.Assert(keys != null, "Check the arguments in the caller!");
+            Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!");
+            Debug.Assert(comparer != null, "Check the arguments in the caller!");
+
+            // Add a try block here to detect bogus comparisons
+            try
+            {
+                IntrospectiveSort(keys, index, length, comparer);
+            }
+            catch (IndexOutOfRangeException)
+            {
+                IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_IComparerFailed"), e);
+            }
+        }
+
+        internal static int InternalBinarySearch(T[] array, int index, int length, T value, IComparer<T> comparer)
+        {
+            Contract.Requires(array != null, "Check the arguments in the caller!");
+            Contract.Requires(index >= 0 && length >= 0 && (array.Length - index >= length), "Check the arguments in the caller!");
+
+            int lo = index;
+            int hi = index + length - 1;
+            while (lo <= hi)
+            {
+                int i = lo + ((hi - lo) >> 1);
+                int order = comparer.Compare(array[i], value);
+
+                if (order == 0) return i;
+                if (order < 0)
+                {
+                    lo = i + 1;
+                }
+                else
+                {
+                    hi = i - 1;
+                }
+            }
+
+            return ~lo;
+        }
+
+        private static void SwapIfGreater(T[] keys, Comparison<T> comparer, int a, int b)
+        {
+            if (a != b)
+            {
+                if (comparer(keys[a], keys[b]) > 0)
+                {
+                    T key = keys[a];
+                    keys[a] = keys[b];
+                    keys[b] = key;
+                }
+            }
+        }
+
+        private static void Swap(T[] a, int i, int j)
+        {
+            if (i != j)
+            {
+                T t = a[i];
+                a[i] = a[j];
+                a[j] = t;
+            }
+        }
+
+        internal static void IntrospectiveSort(T[] keys, int left, int length, Comparison<T> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(left >= 0);
+            Contract.Requires(length >= 0);
+            Contract.Requires(length <= keys.Length);
+            Contract.Requires(length + left <= keys.Length);
+
+            if (length < 2)
+                return;
+
+            IntroSort(keys, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length), comparer);
+        }
+
+        private static void IntroSort(T[] keys, int lo, int hi, int depthLimit, Comparison<T> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi < keys.Length);
+
+            while (hi > lo)
+            {
+                int partitionSize = hi - lo + 1;
+                if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold)
+                {
+                    if (partitionSize == 1)
+                    {
+                        return;
+                    }
+                    if (partitionSize == 2)
+                    {
+                        SwapIfGreater(keys, comparer, lo, hi);
+                        return;
+                    }
+                    if (partitionSize == 3)
+                    {
+                        SwapIfGreater(keys, comparer, lo, hi - 1);
+                        SwapIfGreater(keys, comparer, lo, hi);
+                        SwapIfGreater(keys, comparer, hi - 1, hi);
+                        return;
+                    }
+
+                    InsertionSort(keys, lo, hi, comparer);
+                    return;
+                }
+
+                if (depthLimit == 0)
+                {
+                    Heapsort(keys, lo, hi, comparer);
+                    return;
+                }
+                depthLimit--;
+
+                int p = PickPivotAndPartition(keys, lo, hi, comparer);
+                // Note we've already partitioned around the pivot and do not have to move the pivot again.
+                IntroSort(keys, p + 1, hi, depthLimit, comparer);
+                hi = p - 1;
+            }
+        }
+
+        private static int PickPivotAndPartition(T[] keys, int lo, int hi, Comparison<T> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+            Contract.Ensures(Contract.Result<int>() >= lo && Contract.Result<int>() <= hi);
+
+            // Compute median-of-three.  But also partition them, since we've done the comparison.
+            int middle = lo + ((hi - lo) / 2);
+
+            // Sort lo, mid and hi appropriately, then pick mid as the pivot.
+            SwapIfGreater(keys, comparer, lo, middle);  // swap the low with the mid point
+            SwapIfGreater(keys, comparer, lo, hi);   // swap the low with the high
+            SwapIfGreater(keys, comparer, middle, hi); // swap the middle with the high
+
+            T pivot = keys[middle];
+            Swap(keys, middle, hi - 1);
+            int left = lo, right = hi - 1;  // We already partitioned lo and hi and put the pivot in hi - 1.  And we pre-increment & decrement below.
+
+            while (left < right)
+            {
+                while (comparer(keys[++left], pivot) < 0) ;
+                while (comparer(pivot, keys[--right]) < 0) ;
+
+                if (left >= right)
+                    break;
+
+                Swap(keys, left, right);
+            }
+
+            // Put pivot in the right location.
+            Swap(keys, left, (hi - 1));
+            return left;
+        }
+
+        private static void Heapsort(T[] keys, int lo, int hi, Comparison<T> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+
+            int n = hi - lo + 1;
+            for (int i = n / 2; i >= 1; i = i - 1)
+            {
+                DownHeap(keys, i, n, lo, comparer);
+            }
+            for (int i = n; i > 1; i = i - 1)
+            {
+                Swap(keys, lo, lo + i - 1);
+                DownHeap(keys, 1, i - 1, lo, comparer);
+            }
+        }
+
+        private static void DownHeap(T[] keys, int i, int n, int lo, Comparison<T> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(lo < keys.Length);
+
+            T d = keys[lo + i - 1];
+            int child;
+            while (i <= n / 2)
+            {
+                child = 2 * i;
+                if (child < n && comparer(keys[lo + child - 1], keys[lo + child]) < 0)
+                {
+                    child++;
+                }
+                if (!(comparer(d, keys[lo + child - 1]) < 0))
+                    break;
+                keys[lo + i - 1] = keys[lo + child - 1];
+                i = child;
+            }
+            keys[lo + i - 1] = d;
+        }
+
+        private static void InsertionSort(T[] keys, int lo, int hi, Comparison<T> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi >= lo);
+            Contract.Requires(hi <= keys.Length);
+
+            int i, j;
+            T t;
+            for (i = lo; i < hi; i++)
+            {
+                j = i;
+                t = keys[i + 1];
+                while (j >= lo && comparer(t, keys[j]) < 0)
+                {
+                    keys[j + 1] = keys[j];
+                    j--;
+                }
+                keys[j + 1] = t;
+            }
+        }
+    }
+
+    [Serializable()]
+    internal class GenericArraySortHelper<T>
+        : IArraySortHelper<T>
+        where T : IComparable<T>
+    {
+        // Do not add a constructor to this class because ArraySortHelper<T>.CreateSortHelper will not execute it
+
+        #region IArraySortHelper<T> Members
+
+        public void Sort(T[] keys, int index, int length, IComparer<T> comparer)
+        {
+            Debug.Assert(keys != null, "Check the arguments in the caller!");
+            Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!");
+
+            try
+            {
+                if (comparer == null || comparer == Comparer<T>.Default)
+                {
+                    IntrospectiveSort(keys, index, length);
+                }
+                else
+                {
+                    ArraySortHelper<T>.IntrospectiveSort(keys, index, length, comparer.Compare);
+                }
+            }
+            catch (IndexOutOfRangeException)
+            {
+                IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_IComparerFailed"), e);
+            }
+        }
+
+        public int BinarySearch(T[] array, int index, int length, T value, IComparer<T> comparer)
+        {
+            Debug.Assert(array != null, "Check the arguments in the caller!");
+            Debug.Assert(index >= 0 && length >= 0 && (array.Length - index >= length), "Check the arguments in the caller!");
+
+            try
+            {
+                if (comparer == null || comparer == Comparer<T>.Default)
+                {
+                    return BinarySearch(array, index, length, value);
+                }
+                else
+                {
+                    return ArraySortHelper<T>.InternalBinarySearch(array, index, length, value, comparer);
+                }
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_IComparerFailed"), e);
+            }
+        }
+
+        #endregion
+
+        // This function is called when the user doesn't specify any comparer.
+        // Since T is constrained here, we can call IComparable<T>.CompareTo here.
+        // We can avoid boxing for value type and casting for reference types.
+        private static int BinarySearch(T[] array, int index, int length, T value)
+        {
+            int lo = index;
+            int hi = index + length - 1;
+            while (lo <= hi)
+            {
+                int i = lo + ((hi - lo) >> 1);
+                int order;
+                if (array[i] == null)
+                {
+                    order = (value == null) ? 0 : -1;
+                }
+                else
+                {
+                    order = array[i].CompareTo(value);
+                }
+
+                if (order == 0)
+                {
+                    return i;
+                }
+
+                if (order < 0)
+                {
+                    lo = i + 1;
+                }
+                else
+                {
+                    hi = i - 1;
+                }
+            }
+
+            return ~lo;
+        }
+
+        private static void SwapIfGreaterWithItems(T[] keys, int a, int b)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(0 <= a && a < keys.Length);
+            Contract.Requires(0 <= b && b < keys.Length);
+
+            if (a != b)
+            {
+                if (keys[a] != null && keys[a].CompareTo(keys[b]) > 0)
+                {
+                    T key = keys[a];
+                    keys[a] = keys[b];
+                    keys[b] = key;
+                }
+            }
+        }
+
+        private static void Swap(T[] a, int i, int j)
+        {
+            if (i != j)
+            {
+                T t = a[i];
+                a[i] = a[j];
+                a[j] = t;
+            }
+        }
+
+        internal static void IntrospectiveSort(T[] keys, int left, int length)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(left >= 0);
+            Contract.Requires(length >= 0);
+            Contract.Requires(length <= keys.Length);
+            Contract.Requires(length + left <= keys.Length);
+
+            if (length < 2)
+                return;
+
+            IntroSort(keys, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
+        }
+
+        private static void IntroSort(T[] keys, int lo, int hi, int depthLimit)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi < keys.Length);
+
+            while (hi > lo)
+            {
+                int partitionSize = hi - lo + 1;
+                if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold)
+                {
+                    if (partitionSize == 1)
+                    {
+                        return;
+                    }
+                    if (partitionSize == 2)
+                    {
+                        SwapIfGreaterWithItems(keys, lo, hi);
+                        return;
+                    }
+                    if (partitionSize == 3)
+                    {
+                        SwapIfGreaterWithItems(keys, lo, hi - 1);
+                        SwapIfGreaterWithItems(keys, lo, hi);
+                        SwapIfGreaterWithItems(keys, hi - 1, hi);
+                        return;
+                    }
+
+                    InsertionSort(keys, lo, hi);
+                    return;
+                }
+
+                if (depthLimit == 0)
+                {
+                    Heapsort(keys, lo, hi);
+                    return;
+                }
+                depthLimit--;
+
+                int p = PickPivotAndPartition(keys, lo, hi);
+                // Note we've already partitioned around the pivot and do not have to move the pivot again.
+                IntroSort(keys, p + 1, hi, depthLimit);
+                hi = p - 1;
+            }
+        }
+
+        private static int PickPivotAndPartition(T[] keys, int lo, int hi)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+            Contract.Ensures(Contract.Result<int>() >= lo && Contract.Result<int>() <= hi);
+
+            // Compute median-of-three.  But also partition them, since we've done the comparison.
+            int middle = lo + ((hi - lo) / 2);
+
+            // Sort lo, mid and hi appropriately, then pick mid as the pivot.
+            SwapIfGreaterWithItems(keys, lo, middle);  // swap the low with the mid point
+            SwapIfGreaterWithItems(keys, lo, hi);   // swap the low with the high
+            SwapIfGreaterWithItems(keys, middle, hi); // swap the middle with the high
+
+            T pivot = keys[middle];
+            Swap(keys, middle, hi - 1);
+            int left = lo, right = hi - 1;  // We already partitioned lo and hi and put the pivot in hi - 1.  And we pre-increment & decrement below.
+
+            while (left < right)
+            {
+                if (pivot == null)
+                {
+                    while (left < (hi - 1) && keys[++left] == null) ;
+                    while (right > lo && keys[--right] != null) ;
+                }
+                else
+                {
+                    while (pivot.CompareTo(keys[++left]) > 0) ;
+                    while (pivot.CompareTo(keys[--right]) < 0) ;
+                }
+
+                if (left >= right)
+                    break;
+
+                Swap(keys, left, right);
+            }
+
+            // Put pivot in the right location.
+            Swap(keys, left, (hi - 1));
+            return left;
+        }
+
+        private static void Heapsort(T[] keys, int lo, int hi)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+
+            int n = hi - lo + 1;
+            for (int i = n / 2; i >= 1; i = i - 1)
+            {
+                DownHeap(keys, i, n, lo);
+            }
+            for (int i = n; i > 1; i = i - 1)
+            {
+                Swap(keys, lo, lo + i - 1);
+                DownHeap(keys, 1, i - 1, lo);
+            }
+        }
+
+        private static void DownHeap(T[] keys, int i, int n, int lo)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(lo < keys.Length);
+
+            T d = keys[lo + i - 1];
+            int child;
+            while (i <= n / 2)
+            {
+                child = 2 * i;
+                if (child < n && (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(keys[lo + child]) < 0))
+                {
+                    child++;
+                }
+                if (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(d) < 0)
+                    break;
+                keys[lo + i - 1] = keys[lo + child - 1];
+                i = child;
+            }
+            keys[lo + i - 1] = d;
+        }
+
+        private static void InsertionSort(T[] keys, int lo, int hi)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi >= lo);
+            Contract.Requires(hi <= keys.Length);
+
+            int i, j;
+            T t;
+            for (i = lo; i < hi; i++)
+            {
+                j = i;
+                t = keys[i + 1];
+                while (j >= lo && (t == null || t.CompareTo(keys[j]) < 0))
+                {
+                    keys[j + 1] = keys[j];
+                    j--;
+                }
+                keys[j + 1] = t;
+            }
+        }
+    }
+
+    #endregion
+
+    #region ArraySortHelper for paired key and value arrays
+
+    internal interface IArraySortHelper<TKey, TValue>
+    {
+        void Sort(TKey[] keys, TValue[] values, int index, int length, IComparer<TKey> comparer);
+    }
+
+    [TypeDependencyAttribute("System.Collections.Generic.GenericArraySortHelper`2")]
+    internal class ArraySortHelper<TKey, TValue>
+        : IArraySortHelper<TKey, TValue>
+    {
+        private static volatile IArraySortHelper<TKey, TValue> defaultArraySortHelper;
+
+        public static IArraySortHelper<TKey, TValue> Default
+        {
+            get
+            {
+                IArraySortHelper<TKey, TValue> sorter = defaultArraySortHelper;
+                if (sorter == null)
+                    sorter = CreateArraySortHelper();
+
+                return sorter;
+            }
+        }
+
+        private static IArraySortHelper<TKey, TValue> CreateArraySortHelper()
+        {
+#if !MONO
+            if (typeof(IComparable<TKey>).IsAssignableFrom(typeof(TKey)))
+            {
+                defaultArraySortHelper = (IArraySortHelper<TKey, TValue>)RuntimeTypeHandle.Allocate(typeof(GenericArraySortHelper<string, string>).TypeHandle.Instantiate(new Type[] { typeof(TKey), typeof(TValue) }));
+            }
+            else
+#endif
+            {
+                defaultArraySortHelper = new ArraySortHelper<TKey, TValue>();
+            }
+            return defaultArraySortHelper;
+        }
+
+        public void Sort(TKey[] keys, TValue[] values, int index, int length, IComparer<TKey> comparer)
+        {
+            Debug.Assert(keys != null, "Check the arguments in the caller!");  // Precondition on interface method
+            Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!");
+
+            // Add a try block here to detect IComparers (or their
+            // underlying IComparables, etc) that are bogus.
+            try
+            {
+                if (comparer == null || comparer == Comparer<TKey>.Default)
+                {
+                    comparer = Comparer<TKey>.Default;
+                }
+
+                IntrospectiveSort(keys, values, index, length, comparer);
+            }
+            catch (IndexOutOfRangeException)
+            {
+                IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_IComparerFailed"), e);
+            }
+        }
+
+        private static void SwapIfGreaterWithItems(TKey[] keys, TValue[] values, IComparer<TKey> comparer, int a, int b)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values == null || values.Length >= keys.Length);
+            Contract.Requires(comparer != null);
+            Contract.Requires(0 <= a && a < keys.Length);
+            Contract.Requires(0 <= b && b < keys.Length);
+
+            if (a != b)
+            {
+                if (comparer.Compare(keys[a], keys[b]) > 0)
+                {
+                    TKey key = keys[a];
+                    keys[a] = keys[b];
+                    keys[b] = key;
+                    if (values != null)
+                    {
+                        TValue value = values[a];
+                        values[a] = values[b];
+                        values[b] = value;
+                    }
+                }
+            }
+        }
+
+        private static void Swap(TKey[] keys, TValue[] values, int i, int j)
+        {
+            if (i != j)
+            {
+                TKey k = keys[i];
+                keys[i] = keys[j];
+                keys[j] = k;
+                if (values != null)
+                {
+                    TValue v = values[i];
+                    values[i] = values[j];
+                    values[j] = v;
+                }
+            }
+        }
+
+        internal static void IntrospectiveSort(TKey[] keys, TValue[] values, int left, int length, IComparer<TKey> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(left >= 0);
+            Contract.Requires(length >= 0);
+            Contract.Requires(length <= keys.Length);
+            Contract.Requires(length + left <= keys.Length);
+            Contract.Requires(length + left <= values.Length);
+
+            if (length < 2)
+                return;
+
+            IntroSort(keys, values, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length), comparer);
+        }
+
+        private static void IntroSort(TKey[] keys, TValue[] values, int lo, int hi, int depthLimit, IComparer<TKey> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi < keys.Length);
+
+            while (hi > lo)
+            {
+                int partitionSize = hi - lo + 1;
+                if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold)
+                {
+                    if (partitionSize == 1)
+                    {
+                        return;
+                    }
+                    if (partitionSize == 2)
+                    {
+                        SwapIfGreaterWithItems(keys, values, comparer, lo, hi);
+                        return;
+                    }
+                    if (partitionSize == 3)
+                    {
+                        SwapIfGreaterWithItems(keys, values, comparer, lo, hi - 1);
+                        SwapIfGreaterWithItems(keys, values, comparer, lo, hi);
+                        SwapIfGreaterWithItems(keys, values, comparer, hi - 1, hi);
+                        return;
+                    }
+
+                    InsertionSort(keys, values, lo, hi, comparer);
+                    return;
+                }
+
+                if (depthLimit == 0)
+                {
+                    Heapsort(keys, values, lo, hi, comparer);
+                    return;
+                }
+                depthLimit--;
+
+                int p = PickPivotAndPartition(keys, values, lo, hi, comparer);
+                // Note we've already partitioned around the pivot and do not have to move the pivot again.
+                IntroSort(keys, values, p + 1, hi, depthLimit, comparer);
+                hi = p - 1;
+            }
+        }
+
+        private static int PickPivotAndPartition(TKey[] keys, TValue[] values, int lo, int hi, IComparer<TKey> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+            Contract.Ensures(Contract.Result<int>() >= lo && Contract.Result<int>() <= hi);
+
+            // Compute median-of-three.  But also partition them, since we've done the comparison.
+            int middle = lo + ((hi - lo) / 2);
+
+            // Sort lo, mid and hi appropriately, then pick mid as the pivot.
+            SwapIfGreaterWithItems(keys, values, comparer, lo, middle);  // swap the low with the mid point
+            SwapIfGreaterWithItems(keys, values, comparer, lo, hi);   // swap the low with the high
+            SwapIfGreaterWithItems(keys, values, comparer, middle, hi); // swap the middle with the high
+
+            TKey pivot = keys[middle];
+            Swap(keys, values, middle, hi - 1);
+            int left = lo, right = hi - 1;  // We already partitioned lo and hi and put the pivot in hi - 1.  And we pre-increment & decrement below.
+
+            while (left < right)
+            {
+                while (comparer.Compare(keys[++left], pivot) < 0) ;
+                while (comparer.Compare(pivot, keys[--right]) < 0) ;
+
+                if (left >= right)
+                    break;
+
+                Swap(keys, values, left, right);
+            }
+
+            // Put pivot in the right location.
+            Swap(keys, values, left, (hi - 1));
+            return left;
+        }
+
+        private static void Heapsort(TKey[] keys, TValue[] values, int lo, int hi, IComparer<TKey> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+
+            int n = hi - lo + 1;
+            for (int i = n / 2; i >= 1; i = i - 1)
+            {
+                DownHeap(keys, values, i, n, lo, comparer);
+            }
+            for (int i = n; i > 1; i = i - 1)
+            {
+                Swap(keys, values, lo, lo + i - 1);
+                DownHeap(keys, values, 1, i - 1, lo, comparer);
+            }
+        }
+
+        private static void DownHeap(TKey[] keys, TValue[] values, int i, int n, int lo, IComparer<TKey> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(lo < keys.Length);
+
+            TKey d = keys[lo + i - 1];
+            TValue dValue = (values != null) ? values[lo + i - 1] : default(TValue);
+            int child;
+            while (i <= n / 2)
+            {
+                child = 2 * i;
+                if (child < n && comparer.Compare(keys[lo + child - 1], keys[lo + child]) < 0)
+                {
+                    child++;
+                }
+                if (!(comparer.Compare(d, keys[lo + child - 1]) < 0))
+                    break;
+                keys[lo + i - 1] = keys[lo + child - 1];
+                if (values != null)
+                    values[lo + i - 1] = values[lo + child - 1];
+                i = child;
+            }
+            keys[lo + i - 1] = d;
+            if (values != null)
+                values[lo + i - 1] = dValue;
+        }
+
+        private static void InsertionSort(TKey[] keys, TValue[] values, int lo, int hi, IComparer<TKey> comparer)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(comparer != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi >= lo);
+            Contract.Requires(hi <= keys.Length);
+
+            int i, j;
+            TKey t;
+            TValue tValue;
+            for (i = lo; i < hi; i++)
+            {
+                j = i;
+                t = keys[i + 1];
+                tValue = (values != null) ? values[i + 1] : default(TValue);
+                while (j >= lo && comparer.Compare(t, keys[j]) < 0)
+                {
+                    keys[j + 1] = keys[j];
+                    if (values != null)
+                        values[j + 1] = values[j];
+                    j--;
+                }
+                keys[j + 1] = t;
+                if (values != null)
+                    values[j + 1] = tValue;
+            }
+        }
+    }
+
+    internal class GenericArraySortHelper<TKey, TValue>
+        : IArraySortHelper<TKey, TValue>
+        where TKey : IComparable<TKey>
+    {
+        public void Sort(TKey[] keys, TValue[] values, int index, int length, IComparer<TKey> comparer)
+        {
+            Debug.Assert(keys != null, "Check the arguments in the caller!");
+            Debug.Assert(index >= 0 && length >= 0 && (keys.Length - index >= length), "Check the arguments in the caller!");
+
+            // Add a try block here to detect IComparers (or their
+            // underlying IComparables, etc) that are bogus.
+            try
+            {
+                if (comparer == null || comparer == Comparer<TKey>.Default)
+                {
+                    IntrospectiveSort(keys, values, index, length);
+                }
+                else
+                {
+                    ArraySortHelper<TKey, TValue>.IntrospectiveSort(keys, values, index, length, comparer);
+                }
+            }
+            catch (IndexOutOfRangeException)
+            {
+                IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException(Environment.GetResourceString("InvalidOperation_IComparerFailed"), e);
+            }
+        }
+
+        private static void SwapIfGreaterWithItems(TKey[] keys, TValue[] values, int a, int b)
+        {
+            if (a != b)
+            {
+                if (keys[a] != null && keys[a].CompareTo(keys[b]) > 0)
+                {
+                    TKey key = keys[a];
+                    keys[a] = keys[b];
+                    keys[b] = key;
+                    if (values != null)
+                    {
+                        TValue value = values[a];
+                        values[a] = values[b];
+                        values[b] = value;
+                    }
+                }
+            }
+        }
+
+        private static void Swap(TKey[] keys, TValue[] values, int i, int j)
+        {
+            if (i != j)
+            {
+                TKey k = keys[i];
+                keys[i] = keys[j];
+                keys[j] = k;
+                if (values != null)
+                {
+                    TValue v = values[i];
+                    values[i] = values[j];
+                    values[j] = v;
+                }
+            }
+        }
+
+        internal static void IntrospectiveSort(TKey[] keys, TValue[] values, int left, int length)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(left >= 0);
+            Contract.Requires(length >= 0);
+            Contract.Requires(length <= keys.Length);
+            Contract.Requires(length + left <= keys.Length);
+            Contract.Requires(length + left <= values.Length);
+
+            if (length < 2)
+                return;
+
+            IntroSort(keys, values, left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
+        }
+
+        private static void IntroSort(TKey[] keys, TValue[] values, int lo, int hi, int depthLimit)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi < keys.Length);
+
+            while (hi > lo)
+            {
+                int partitionSize = hi - lo + 1;
+                if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold)
+                {
+                    if (partitionSize == 1)
+                    {
+                        return;
+                    }
+                    if (partitionSize == 2)
+                    {
+                        SwapIfGreaterWithItems(keys, values, lo, hi);
+                        return;
+                    }
+                    if (partitionSize == 3)
+                    {
+                        SwapIfGreaterWithItems(keys, values, lo, hi - 1);
+                        SwapIfGreaterWithItems(keys, values, lo, hi);
+                        SwapIfGreaterWithItems(keys, values, hi - 1, hi);
+                        return;
+                    }
+
+                    InsertionSort(keys, values, lo, hi);
+                    return;
+                }
+
+                if (depthLimit == 0)
+                {
+                    Heapsort(keys, values, lo, hi);
+                    return;
+                }
+                depthLimit--;
+
+                int p = PickPivotAndPartition(keys, values, lo, hi);
+                // Note we've already partitioned around the pivot and do not have to move the pivot again.
+                IntroSort(keys, values, p + 1, hi, depthLimit);
+                hi = p - 1;
+            }
+        }
+
+        private static int PickPivotAndPartition(TKey[] keys, TValue[] values, int lo, int hi)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+            Contract.Ensures(Contract.Result<int>() >= lo && Contract.Result<int>() <= hi);
+
+            // Compute median-of-three.  But also partition them, since we've done the comparison.
+            int middle = lo + ((hi - lo) / 2);
+
+            // Sort lo, mid and hi appropriately, then pick mid as the pivot.
+            SwapIfGreaterWithItems(keys, values, lo, middle);  // swap the low with the mid point
+            SwapIfGreaterWithItems(keys, values, lo, hi);   // swap the low with the high
+            SwapIfGreaterWithItems(keys, values, middle, hi); // swap the middle with the high
+
+            TKey pivot = keys[middle];
+            Swap(keys, values, middle, hi - 1);
+            int left = lo, right = hi - 1;  // We already partitioned lo and hi and put the pivot in hi - 1.  And we pre-increment & decrement below.
+
+            while (left < right)
+            {
+                if (pivot == null)
+                {
+                    while (left < (hi - 1) && keys[++left] == null) ;
+                    while (right > lo && keys[--right] != null) ;
+                }
+                else
+                {
+                    while (pivot.CompareTo(keys[++left]) > 0) ;
+                    while (pivot.CompareTo(keys[--right]) < 0) ;
+                }
+
+                if (left >= right)
+                    break;
+
+                Swap(keys, values, left, right);
+            }
+
+            // Put pivot in the right location.
+            Swap(keys, values, left, (hi - 1));
+            return left;
+        }
+
+        private static void Heapsort(TKey[] keys, TValue[] values, int lo, int hi)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi > lo);
+            Contract.Requires(hi < keys.Length);
+
+            int n = hi - lo + 1;
+            for (int i = n / 2; i >= 1; i = i - 1)
+            {
+                DownHeap(keys, values, i, n, lo);
+            }
+            for (int i = n; i > 1; i = i - 1)
+            {
+                Swap(keys, values, lo, lo + i - 1);
+                DownHeap(keys, values, 1, i - 1, lo);
+            }
+        }
+
+        private static void DownHeap(TKey[] keys, TValue[] values, int i, int n, int lo)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(lo < keys.Length);
+
+            TKey d = keys[lo + i - 1];
+            TValue dValue = (values != null) ? values[lo + i - 1] : default(TValue);
+            int child;
+            while (i <= n / 2)
+            {
+                child = 2 * i;
+                if (child < n && (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(keys[lo + child]) < 0))
+                {
+                    child++;
+                }
+                if (keys[lo + child - 1] == null || keys[lo + child - 1].CompareTo(d) < 0)
+                    break;
+                keys[lo + i - 1] = keys[lo + child - 1];
+                if (values != null)
+                    values[lo + i - 1] = values[lo + child - 1];
+                i = child;
+            }
+            keys[lo + i - 1] = d;
+            if (values != null)
+                values[lo + i - 1] = dValue;
+        }
+
+        private static void InsertionSort(TKey[] keys, TValue[] values, int lo, int hi)
+        {
+            Contract.Requires(keys != null);
+            Contract.Requires(values != null);
+            Contract.Requires(lo >= 0);
+            Contract.Requires(hi >= lo);
+            Contract.Requires(hi <= keys.Length);
+
+            int i, j;
+            TKey t;
+            TValue tValue;
+            for (i = lo; i < hi; i++)
+            {
+                j = i;
+                t = keys[i + 1];
+                tValue = (values != null) ? values[i + 1] : default(TValue);
+                while (j >= lo && (t == null || t.CompareTo(keys[j]) < 0))
+                {
+                    keys[j + 1] = keys[j];
+                    if (values != null)
+                        values[j + 1] = values[j];
+                    j--;
+                }
+                keys[j + 1] = t;
+                if (values != null)
+                    values[j + 1] = tValue;
+            }
+        }
+    }
+
+    #endregion
+}
diff --git a/mcs/class/corlib/coreclr/SorterArray.cs b/mcs/class/corlib/coreclr/SorterArray.cs
new file mode 100644 (file)
index 0000000..da5086b
--- /dev/null
@@ -0,0 +1,422 @@
+using System.Collections;
+using System.Collections.Generic;
+
+namespace System
+{
+       partial class Array
+       {
+        // Private value type used by the Sort methods.
+        private struct SorterObjectArray
+        {
+            private Object[] keys;
+            private Object[] items;
+            private IComparer comparer;
+
+            internal SorterObjectArray(Object[] keys, Object[] items, IComparer comparer)
+            {
+                if (comparer == null) comparer = Comparer.Default;
+                this.keys = keys;
+                this.items = items;
+                this.comparer = comparer;
+            }
+
+            internal void SwapIfGreaterWithItems(int a, int b)
+            {
+                if (a != b)
+                {
+                    if (comparer.Compare(keys[a], keys[b]) > 0)
+                    {
+                        Object temp = keys[a];
+                        keys[a] = keys[b];
+                        keys[b] = temp;
+                        if (items != null)
+                        {
+                            Object item = items[a];
+                            items[a] = items[b];
+                            items[b] = item;
+                        }
+                    }
+                }
+            }
+
+            private void Swap(int i, int j)
+            {
+                Object t = keys[i];
+                keys[i] = keys[j];
+                keys[j] = t;
+
+                if (items != null)
+                {
+                    Object item = items[i];
+                    items[i] = items[j];
+                    items[j] = item;
+                }
+            }
+
+            internal void Sort(int left, int length)
+            {
+                IntrospectiveSort(left, length);
+            }
+
+            private void IntrospectiveSort(int left, int length)
+            {
+                if (length < 2)
+                    return;
+
+                try
+                {
+                    IntroSort(left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
+                }
+                catch (IndexOutOfRangeException)
+                {
+                    IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
+                }
+                catch (Exception e)
+                {
+                    throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
+                }
+            }
+
+            private void IntroSort(int lo, int hi, int depthLimit)
+            {
+                while (hi > lo)
+                {
+                    int partitionSize = hi - lo + 1;
+                    if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold)
+                    {
+                        if (partitionSize == 1)
+                        {
+                            return;
+                        }
+                        if (partitionSize == 2)
+                        {
+                            SwapIfGreaterWithItems(lo, hi);
+                            return;
+                        }
+                        if (partitionSize == 3)
+                        {
+                            SwapIfGreaterWithItems(lo, hi - 1);
+                            SwapIfGreaterWithItems(lo, hi);
+                            SwapIfGreaterWithItems(hi - 1, hi);
+                            return;
+                        }
+
+                        InsertionSort(lo, hi);
+                        return;
+                    }
+
+                    if (depthLimit == 0)
+                    {
+                        Heapsort(lo, hi);
+                        return;
+                    }
+                    depthLimit--;
+
+                    int p = PickPivotAndPartition(lo, hi);
+                    IntroSort(p + 1, hi, depthLimit);
+                    hi = p - 1;
+                }
+            }
+
+            private int PickPivotAndPartition(int lo, int hi)
+            {
+                // Compute median-of-three.  But also partition them, since we've done the comparison.
+                int mid = lo + (hi - lo) / 2;
+                // Sort lo, mid and hi appropriately, then pick mid as the pivot.
+                SwapIfGreaterWithItems(lo, mid);
+                SwapIfGreaterWithItems(lo, hi);
+                SwapIfGreaterWithItems(mid, hi);
+
+                Object pivot = keys[mid];
+                Swap(mid, hi - 1);
+                int left = lo, right = hi - 1;  // We already partitioned lo and hi and put the pivot in hi - 1.  And we pre-increment & decrement below.
+
+                while (left < right)
+                {
+                    while (comparer.Compare(keys[++left], pivot) < 0) ;
+                    while (comparer.Compare(pivot, keys[--right]) < 0) ;
+
+                    if (left >= right)
+                        break;
+
+                    Swap(left, right);
+                }
+
+                // Put pivot in the right location.
+                Swap(left, (hi - 1));
+                return left;
+            }
+
+            private void Heapsort(int lo, int hi)
+            {
+                int n = hi - lo + 1;
+                for (int i = n / 2; i >= 1; i = i - 1)
+                {
+                    DownHeap(i, n, lo);
+                }
+                for (int i = n; i > 1; i = i - 1)
+                {
+                    Swap(lo, lo + i - 1);
+
+                    DownHeap(1, i - 1, lo);
+                }
+            }
+
+            private void DownHeap(int i, int n, int lo)
+            {
+                Object d = keys[lo + i - 1];
+                Object dt = (items != null) ? items[lo + i - 1] : null;
+                int child;
+                while (i <= n / 2)
+                {
+                    child = 2 * i;
+                    if (child < n && comparer.Compare(keys[lo + child - 1], keys[lo + child]) < 0)
+                    {
+                        child++;
+                    }
+                    if (!(comparer.Compare(d, keys[lo + child - 1]) < 0))
+                        break;
+                    keys[lo + i - 1] = keys[lo + child - 1];
+                    if (items != null)
+                        items[lo + i - 1] = items[lo + child - 1];
+                    i = child;
+                }
+                keys[lo + i - 1] = d;
+                if (items != null)
+                    items[lo + i - 1] = dt;
+            }
+
+            private void InsertionSort(int lo, int hi)
+            {
+                int i, j;
+                Object t, ti;
+                for (i = lo; i < hi; i++)
+                {
+                    j = i;
+                    t = keys[i + 1];
+                    ti = (items != null) ? items[i + 1] : null;
+                    while (j >= lo && comparer.Compare(t, keys[j]) < 0)
+                    {
+                        keys[j + 1] = keys[j];
+                        if (items != null)
+                            items[j + 1] = items[j];
+                        j--;
+                    }
+                    keys[j + 1] = t;
+                    if (items != null)
+                        items[j + 1] = ti;
+                }
+            }
+        }
+
+        // Private value used by the Sort methods for instances of Array.
+        // This is slower than the one for Object[], since we can't use the JIT helpers
+        // to access the elements.  We must use GetValue & SetValue.
+        private struct SorterGenericArray
+        {
+            private Array keys;
+            private Array items;
+            private IComparer comparer;
+
+            internal SorterGenericArray(Array keys, Array items, IComparer comparer)
+            {
+                if (comparer == null) comparer = Comparer.Default;
+                this.keys = keys;
+                this.items = items;
+                this.comparer = comparer;
+            }
+
+            internal void SwapIfGreaterWithItems(int a, int b)
+            {
+                if (a != b)
+                {
+                    if (comparer.Compare(keys.GetValue(a), keys.GetValue(b)) > 0)
+                    {
+                        Object key = keys.GetValue(a);
+                        keys.SetValue(keys.GetValue(b), a);
+                        keys.SetValue(key, b);
+                        if (items != null)
+                        {
+                            Object item = items.GetValue(a);
+                            items.SetValue(items.GetValue(b), a);
+                            items.SetValue(item, b);
+                        }
+                    }
+                }
+            }
+
+            private void Swap(int i, int j)
+            {
+                Object t1 = keys.GetValue(i);
+                keys.SetValue(keys.GetValue(j), i);
+                keys.SetValue(t1, j);
+
+                if (items != null)
+                {
+                    Object t2 = items.GetValue(i);
+                    items.SetValue(items.GetValue(j), i);
+                    items.SetValue(t2, j);
+                }
+            }
+
+            internal void Sort(int left, int length)
+            {
+                IntrospectiveSort(left, length);
+            }
+
+            private void IntrospectiveSort(int left, int length)
+            {
+                if (length < 2)
+                    return;
+
+                try
+                {
+                    IntroSort(left, length + left - 1, 2 * IntrospectiveSortUtilities.FloorLog2(keys.Length));
+                }
+                catch (IndexOutOfRangeException)
+                {
+                    IntrospectiveSortUtilities.ThrowOrIgnoreBadComparer(comparer);
+                }
+                catch (Exception e)
+                {
+                    throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
+                }
+            }
+
+            private void IntroSort(int lo, int hi, int depthLimit)
+            {
+                while (hi > lo)
+                {
+                    int partitionSize = hi - lo + 1;
+                    if (partitionSize <= IntrospectiveSortUtilities.IntrosortSizeThreshold)
+                    {
+                        if (partitionSize == 1)
+                        {
+                            return;
+                        }
+                        if (partitionSize == 2)
+                        {
+                            SwapIfGreaterWithItems(lo, hi);
+                            return;
+                        }
+                        if (partitionSize == 3)
+                        {
+                            SwapIfGreaterWithItems(lo, hi - 1);
+                            SwapIfGreaterWithItems(lo, hi);
+                            SwapIfGreaterWithItems(hi - 1, hi);
+                            return;
+                        }
+
+                        InsertionSort(lo, hi);
+                        return;
+                    }
+
+                    if (depthLimit == 0)
+                    {
+                        Heapsort(lo, hi);
+                        return;
+                    }
+                    depthLimit--;
+
+                    int p = PickPivotAndPartition(lo, hi);
+                    IntroSort(p + 1, hi, depthLimit);
+                    hi = p - 1;
+                }
+            }
+
+            private int PickPivotAndPartition(int lo, int hi)
+            {
+                // Compute median-of-three.  But also partition them, since we've done the comparison.
+                int mid = lo + (hi - lo) / 2;
+
+                SwapIfGreaterWithItems(lo, mid);
+                SwapIfGreaterWithItems(lo, hi);
+                SwapIfGreaterWithItems(mid, hi);
+
+                Object pivot = keys.GetValue(mid);
+                Swap(mid, hi - 1);
+                int left = lo, right = hi - 1;  // We already partitioned lo and hi and put the pivot in hi - 1.  And we pre-increment & decrement below.
+
+                while (left < right)
+                {
+                    while (comparer.Compare(keys.GetValue(++left), pivot) < 0) ;
+                    while (comparer.Compare(pivot, keys.GetValue(--right)) < 0) ;
+
+                    if (left >= right)
+                        break;
+
+                    Swap(left, right);
+                }
+
+                // Put pivot in the right location.
+                Swap(left, (hi - 1));
+                return left;
+            }
+
+            private void Heapsort(int lo, int hi)
+            {
+                int n = hi - lo + 1;
+                for (int i = n / 2; i >= 1; i = i - 1)
+                {
+                    DownHeap(i, n, lo);
+                }
+                for (int i = n; i > 1; i = i - 1)
+                {
+                    Swap(lo, lo + i - 1);
+
+                    DownHeap(1, i - 1, lo);
+                }
+            }
+
+            private void DownHeap(int i, int n, int lo)
+            {
+                Object d = keys.GetValue(lo + i - 1);
+                Object dt = (items != null) ? items.GetValue(lo + i - 1) : null;
+                int child;
+                while (i <= n / 2)
+                {
+                    child = 2 * i;
+                    if (child < n && comparer.Compare(keys.GetValue(lo + child - 1), keys.GetValue(lo + child)) < 0)
+                    {
+                        child++;
+                    }
+
+                    if (!(comparer.Compare(d, keys.GetValue(lo + child - 1)) < 0))
+                        break;
+
+                    keys.SetValue(keys.GetValue(lo + child - 1), lo + i - 1);
+                    if (items != null)
+                        items.SetValue(items.GetValue(lo + child - 1), lo + i - 1);
+                    i = child;
+                }
+                keys.SetValue(d, lo + i - 1);
+                if (items != null)
+                    items.SetValue(dt, lo + i - 1);
+            }
+
+            private void InsertionSort(int lo, int hi)
+            {
+                int i, j;
+                Object t, dt;
+                for (i = lo; i < hi; i++)
+                {
+                    j = i;
+                    t = keys.GetValue(i + 1);
+                    dt = (items != null) ? items.GetValue(i + 1) : null;
+
+                    while (j >= lo && comparer.Compare(t, keys.GetValue(j)) < 0)
+                    {
+                        keys.SetValue(keys.GetValue(j), j + 1);
+                        if (items != null)
+                            items.SetValue(items.GetValue(j), j + 1);
+                        j--;
+                    }
+
+                    keys.SetValue(t, j + 1);
+                    if (items != null)
+                        items.SetValue(dt, j + 1);
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/mcs/class/corlib/corert/Array.Portable.cs b/mcs/class/corlib/corert/Array.Portable.cs
new file mode 100644 (file)
index 0000000..7eb3bc0
--- /dev/null
@@ -0,0 +1,1540 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime;
+using System.Threading;
+using System.Collections;
+using System.Diagnostics;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+using System.Diagnostics.Contracts;
+#if MONO
+using System.Diagnostics.Private;
+#endif
+
+namespace System
+{
+    public abstract partial class Array : ICollection, IEnumerable, IList, IStructuralComparable, IStructuralEquatable, ICloneable
+    {
+        public static ReadOnlyCollection<T> AsReadOnly<T>(T[] array)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            // T[] implements IList<T>.
+            return new ReadOnlyCollection<T>(array);
+        }
+
+        public static void Resize<T>(ref T[] array, int newSize)
+        {
+            if (newSize < 0)
+                throw new ArgumentOutOfRangeException(nameof(newSize), SR.ArgumentOutOfRange_NeedNonNegNum);
+
+            T[] larray = array;
+            if (larray == null)
+            {
+                array = new T[newSize];
+                return;
+            }
+
+            if (larray.Length != newSize)
+            {
+                T[] newArray = new T[newSize];
+                Copy(larray, 0, newArray, 0, larray.Length > newSize ? newSize : larray.Length);
+                array = newArray;
+            }
+        }
+
+        // Number of elements in the Array.
+        int ICollection.Count
+        { get { return Length; } }
+
+        // Is this Array read-only?
+        bool IList.IsReadOnly
+        { get { return false; } }
+
+        Object IList.this[int index]
+        {
+            get
+            {
+                return GetValue(index);
+            }
+
+            set
+            {
+                SetValue(value, index);
+            }
+        }
+
+        int IList.Add(Object value)
+        {
+            throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
+        }
+
+        bool IList.Contains(Object value)
+        {
+            return Array.IndexOf(this, value) >= 0;
+        }
+
+        void IList.Clear()
+        {
+            Array.Clear(this, 0, this.Length);
+        }
+
+        void IList.Insert(int index, Object value)
+        {
+            throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
+        }
+
+        void IList.Remove(Object value)
+        {
+            throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
+        }
+
+        void IList.RemoveAt(int index)
+        {
+            throw new NotSupportedException(SR.NotSupported_FixedSizeCollection);
+        }
+
+        // CopyTo copies a collection into an Array, starting at a particular
+        // index into the array.
+        // 
+        // This method is to support the ICollection interface, and calls
+        // Array.Copy internally.  If you aren't using ICollection explicitly,
+        // call Array.Copy to avoid an extra indirection.
+        // 
+        public void CopyTo(Array array, int index)
+        {
+            // Note: Array.Copy throws a RankException and we want a consistent ArgumentException for all the IList CopyTo methods.
+            if (array != null && array.Rank != 1)
+                throw new ArgumentException(SR.Arg_RankMultiDimNotSupported);
+
+            Array.Copy(this, 0, array, index, Length);
+        }
+
+        // Make a new array which is a deep copy of the original array.
+        // 
+        public Object Clone()
+        {
+            return MemberwiseClone();
+        }
+
+        Int32 IStructuralComparable.CompareTo(Object other, IComparer comparer)
+        {
+            if (other == null)
+            {
+                return 1;
+            }
+
+            Array o = other as Array;
+
+            if (o == null || this.Length != o.Length)
+            {
+                throw new ArgumentException(SR.ArgumentException_OtherNotArrayOfCorrectLength, nameof(other));
+            }
+
+            int i = 0;
+            int c = 0;
+
+            while (i < o.Length && c == 0)
+            {
+                object left = GetValue(i);
+                object right = o.GetValue(i);
+
+                c = comparer.Compare(left, right);
+                i++;
+            }
+
+            return c;
+        }
+
+        Boolean IStructuralEquatable.Equals(Object other, IEqualityComparer comparer)
+        {
+            if (other == null)
+            {
+                return false;
+            }
+
+            if (Object.ReferenceEquals(this, other))
+            {
+                return true;
+            }
+
+            Array o = other as Array;
+
+            if (o == null || o.Length != this.Length)
+            {
+                return false;
+            }
+
+            int i = 0;
+            while (i < o.Length)
+            {
+                object left = GetValue(i);
+                object right = o.GetValue(i);
+
+                if (!comparer.Equals(left, right))
+                {
+                    return false;
+                }
+                i++;
+            }
+
+            return true;
+        }
+
+        // From System.Web.Util.HashCodeCombiner
+        internal static int CombineHashCodes(int h1, int h2)
+        {
+            return (((h1 << 5) + h1) ^ h2);
+        }
+
+        int IStructuralEquatable.GetHashCode(IEqualityComparer comparer)
+        {
+            if (comparer == null)
+                throw new ArgumentNullException(nameof(comparer));
+
+            int ret = 0;
+
+            for (int i = (this.Length >= 8 ? this.Length - 8 : 0); i < this.Length; i++)
+            {
+                ret = CombineHashCodes(ret, comparer.GetHashCode(GetValue(i)));
+            }
+
+            return ret;
+        }
+
+        // Searches an array for a given element using a binary search algorithm.
+        // Elements of the array are compared to the search value using the
+        // IComparable interface, which must be implemented by all elements
+        // of the array and the given search value. This method assumes that the
+        // array is already sorted according to the IComparable interface;
+        // if this is not the case, the result will be incorrect.
+        //
+        // The method returns the index of the given value in the array. If the
+        // array does not contain the given value, the method returns a negative
+        // integer. The bitwise complement operator (~) can be applied to a
+        // negative result to produce the index of the first element (if any) that
+        // is larger than the given search value.
+        // 
+        public static int BinarySearch(Array array, Object value)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            return BinarySearch(array, 0, array.Length, value, null);
+        }
+
+        public static TOutput[] ConvertAll<TInput, TOutput>(TInput[] array, Converter<TInput, TOutput> converter)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            if (converter == null)
+                throw new ArgumentNullException(nameof(converter));
+
+            Contract.Ensures(Contract.Result<TOutput[]>() != null);
+            Contract.Ensures(Contract.Result<TOutput[]>().Length == array.Length);
+            Contract.EndContractBlock();
+
+            TOutput[] newArray = new TOutput[array.Length];
+            for (int i = 0; i < array.Length; i++)
+            {
+                newArray[i] = converter(array[i]);
+            }
+            return newArray;
+        }
+
+        public static void Copy(Array sourceArray, Array destinationArray, long length)
+        {
+            if (length > Int32.MaxValue || length < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+
+            Array.Copy(sourceArray, destinationArray, (int)length);
+        }
+
+        public static void Copy(Array sourceArray, long sourceIndex, Array destinationArray, long destinationIndex, long length)
+        {
+            if (sourceIndex > Int32.MaxValue || sourceIndex < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(sourceIndex), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            if (destinationIndex > Int32.MaxValue || destinationIndex < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(destinationIndex), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            if (length > Int32.MaxValue || length < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+
+            Array.Copy(sourceArray, (int)sourceIndex, destinationArray, (int)destinationIndex, (int)length);
+        }
+
+        public void CopyTo(Array array, long index)
+        {
+            if (index > Int32.MaxValue || index < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            Contract.EndContractBlock();
+
+            this.CopyTo(array, (int)index);
+        }
+
+        public static void ForEach<T>(T[] array, Action<T> action)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            if (action == null)
+                throw new ArgumentNullException(nameof(action));
+
+            Contract.EndContractBlock();
+
+            for (int i = 0; i < array.Length; i++)
+            {
+                action(array[i]);
+            }
+        }
+
+        public long LongLength
+        {
+            get
+            {
+                long ret = GetLength(0);
+
+                for (int i = 1; i < Rank; ++i)
+                {
+                    ret = ret * GetLength(i);
+                }
+
+                return ret;
+            }
+        }
+
+        public long GetLongLength(int dimension)
+        {
+            // This method does throw an IndexOutOfRangeException for compat if dimension < 0 or >= Rank
+            // by calling GetUpperBound
+            return GetLength(dimension);
+        }
+
+        public Object GetValue(long index)
+        {
+            if (index > Int32.MaxValue || index < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            Contract.EndContractBlock();
+
+            return this.GetValue((int)index);
+        }
+
+        public Object GetValue(long index1, long index2)
+        {
+            if (index1 > Int32.MaxValue || index1 < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(index1), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            if (index2 > Int32.MaxValue || index2 < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(index2), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            Contract.EndContractBlock();
+
+            return this.GetValue((int)index1, (int)index2);
+        }
+
+        public Object GetValue(long index1, long index2, long index3)
+        {
+            if (index1 > Int32.MaxValue || index1 < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(index1), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            if (index2 > Int32.MaxValue || index2 < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(index2), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            if (index3 > Int32.MaxValue || index3 < Int32.MinValue)
+                throw new ArgumentOutOfRangeException(nameof(index3), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+            Contract.EndContractBlock();
+
+            return this.GetValue((int)index1, (int)index2, (int)index3);
+        }
+
+        public Object GetValue(params long[] indices)
+        {
+            if (indices == null)
+                throw new ArgumentNullException(nameof(indices));
+            if (Rank != indices.Length)
+                throw new ArgumentException(SR.Arg_RankIndices);
+            Contract.EndContractBlock();
+
+            int[] intIndices = new int[indices.Length];
+
+            for (int i = 0; i < indices.Length; ++i)
+            {
+                long index = indices[i];
+                if (index > Int32.MaxValue || index < Int32.MinValue)
+                    throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_HugeArrayNotSupported);
+                intIndices[i] = (int)index;
+            }
+
+            return this.GetValue(intIndices);
+        }
+
+        public void Initialize()
+        {
+            // Project N port note: On the desktop, this api is a nop unless the array element type is a value type with
+            // an explicit nullary constructor. Such a type cannot be expressed in C# so Project N does not support this.
+            // The ILC toolchain fails the build if it encounters such a type.
+            return;
+        }        
+
+        public bool IsFixedSize { get { return true; } }
+
+        // Is this Array synchronized (i.e., thread-safe)?  If you want a synchronized
+        // collection, you can use SyncRoot as an object to synchronize your 
+        // collection with.  You could also call GetSynchronized() 
+        // to get a synchronized wrapper around the Array.
+        public bool IsSynchronized { get { return false; } }
+
+        // Returns an object appropriate for synchronizing access to this 
+        // Array.
+        public Object SyncRoot { get { return this; } }
+
+        // Searches a section of an array for a given element using a binary search
+        // algorithm. Elements of the array are compared to the search value using
+        // the IComparable interface, which must be implemented by all
+        // elements of the array and the given search value. This method assumes
+        // that the array is already sorted according to the IComparable
+        // interface; if this is not the case, the result will be incorrect.
+        //
+        // The method returns the index of the given value in the array. If the
+        // array does not contain the given value, the method returns a negative
+        // integer. The bitwise complement operator (~) can be applied to a
+        // negative result to produce the index of the first element (if any) that
+        // is larger than the given search value.
+        // 
+        public static int BinarySearch(Array array, int index, int length, Object value)
+        {
+            return BinarySearch(array, index, length, value, null);
+        }
+
+        // Searches an array for a given element using a binary search algorithm.
+        // Elements of the array are compared to the search value using the given
+        // IComparer interface. If comparer is null, elements of the
+        // array are compared to the search value using the IComparable
+        // interface, which in that case must be implemented by all elements of the
+        // array and the given search value. This method assumes that the array is
+        // already sorted; if this is not the case, the result will be incorrect.
+        // 
+        // The method returns the index of the given value in the array. If the
+        // array does not contain the given value, the method returns a negative
+        // integer. The bitwise complement operator (~) can be applied to a
+        // negative result to produce the index of the first element (if any) that
+        // is larger than the given search value.
+        // 
+        public static int BinarySearch(Array array, Object value, IComparer comparer)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            return BinarySearch(array, 0, array.Length, value, comparer);
+        }
+
+        // Searches a section of an array for a given element using a binary search
+        // algorithm. Elements of the array are compared to the search value using
+        // the given IComparer interface. If comparer is null,
+        // elements of the array are compared to the search value using the
+        // IComparable interface, which in that case must be implemented by
+        // all elements of the array and the given search value. This method
+        // assumes that the array is already sorted; if this is not the case, the
+        // result will be incorrect.
+        // 
+        // The method returns the index of the given value in the array. If the
+        // array does not contain the given value, the method returns a negative
+        // integer. The bitwise complement operator (~) can be applied to a
+        // negative result to produce the index of the first element (if any) that
+        // is larger than the given search value.
+        // 
+        public static int BinarySearch(Array array, int index, int length, Object value, IComparer comparer)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            if (index < 0 || length < 0)
+                throw new ArgumentOutOfRangeException((index < 0 ? nameof(index) : nameof(length)), SR.ArgumentOutOfRange_NeedNonNegNum);
+            if (array.Length - index < length)
+                throw new ArgumentException(SR.Argument_InvalidOffLen);
+            if (array.Rank != 1)
+                throw new RankException(SR.Rank_MultiDimNotSupported);
+
+            if (comparer == null) comparer = LowLevelComparer.Default;
+
+            int lo = index;
+            int hi = index + length - 1;
+            Object[] objArray = array as Object[];
+            if (objArray != null)
+            {
+                while (lo <= hi)
+                {
+                    // i might overflow if lo and hi are both large positive numbers. 
+                    int i = GetMedian(lo, hi);
+
+                    int c;
+                    try
+                    {
+                        c = comparer.Compare(objArray[i], value);
+                    }
+                    catch (Exception e)
+                    {
+                        throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
+                    }
+                    if (c == 0) return i;
+                    if (c < 0)
+                    {
+                        lo = i + 1;
+                    }
+                    else
+                    {
+                        hi = i - 1;
+                    }
+                }
+            }
+            else
+            {
+                while (lo <= hi)
+                {
+                    int i = GetMedian(lo, hi);
+
+                    int c;
+                    try
+                    {
+                        c = comparer.Compare(array.GetValue(i), value);
+                    }
+                    catch (Exception e)
+                    {
+                        throw new InvalidOperationException(SR.InvalidOperation_IComparerFailed, e);
+                    }
+                    if (c == 0) return i;
+                    if (c < 0)
+                    {
+                        lo = i + 1;
+                    }
+                    else
+                    {
+                        hi = i - 1;
+                    }
+                }
+            }
+            return ~lo;
+        }
+
+        private static int GetMedian(int low, int hi)
+        {
+            // Note both may be negative, if we are dealing with arrays w/ negative lower bounds.
+            return low + ((hi - low) >> 1);
+        }
+
+        public static int BinarySearch<T>(T[] array, T value)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            return BinarySearch<T>(array, 0, array.Length, value, null);
+        }
+
+        public static int BinarySearch<T>(T[] array, T value, System.Collections.Generic.IComparer<T> comparer)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            return BinarySearch<T>(array, 0, array.Length, value, comparer);
+        }
+
+        public static int BinarySearch<T>(T[] array, int index, int length, T value)
+        {
+            return BinarySearch<T>(array, index, length, value, null);
+        }
+
+        public static int BinarySearch<T>(T[] array, int index, int length, T value, System.Collections.Generic.IComparer<T> comparer)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            if (index < 0 || length < 0)
+                throw new ArgumentOutOfRangeException((index < 0 ? nameof(index) : nameof(length)), SR.ArgumentOutOfRange_NeedNonNegNum);
+            if (array.Length - index < length)
+                throw new ArgumentException(SR.Argument_InvalidOffLen);
+
+            return ArraySortHelper<T>.BinarySearch(array, index, length, value, comparer);
+        }
+
+        // Returns the index of the first occurrence of a given value in an array.
+        // The array is searched forwards, and the elements of the array are
+        // compared to the given value using the Object.Equals method.
+        // 
+        public static int IndexOf(Array array, Object value)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return IndexOf(array, value, 0, array.Length);
+        }
+
+        // Returns the index of the first occurrence of a given value in a range of
+        // an array. The array is searched forwards, starting at index
+        // startIndex and ending at the last element of the array. The
+        // elements of the array are compared to the given value using the
+        // Object.Equals method.
+        // 
+        public static int IndexOf(Array array, Object value, int startIndex)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return IndexOf(array, value, startIndex, array.Length - startIndex);
+        }
+
+        // Returns the index of the first occurrence of a given value in a range of
+        // an array. The array is searched forwards, starting at index
+        // startIndex and upto count elements. The
+        // elements of the array are compared to the given value using the
+        // Object.Equals method.
+        // 
+        public static int IndexOf(Array array, Object value, int startIndex, int count)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            if (array.Rank != 1)
+                throw new RankException(SR.Rank_MultiDimNotSupported);
+            if (startIndex < 0 || startIndex > array.Length)
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+            if (count < 0 || count > array.Length - startIndex)
+                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+
+            Object[] objArray = array as Object[];
+            int endIndex = startIndex + count;
+            if (objArray != null)
+            {
+                if (value == null)
+                {
+                    for (int i = startIndex; i < endIndex; i++)
+                    {
+                        if (objArray[i] == null) return i;
+                    }
+                }
+                else
+                {
+                    for (int i = startIndex; i < endIndex; i++)
+                    {
+                        Object obj = objArray[i];
+                        if (obj != null && obj.Equals(value)) return i;
+                    }
+                }
+            }
+            else
+            {
+                for (int i = startIndex; i < endIndex; i++)
+                {
+                    Object obj = array.GetValue(i);
+                    if (obj == null)
+                    {
+                        if (value == null) return i;
+                    }
+                    else
+                    {
+                        if (obj.Equals(value)) return i;
+                    }
+                }
+            }
+            return -1;
+        }
+
+        /// <summary>
+        /// This version is called from Array<T>.IndexOf and Contains<T>, so it's in every unique array instance due to array interface implementation.
+        /// Do not call into IndexOf<T>(Array array, Object value, int startIndex, int count) for size and space reasons.
+        /// Otherwise there will be two IndexOf methods for each unique array instance, and extra parameter checking which are not needed for the common case.
+        /// </summary>
+        public static int IndexOf<T>(T[] array, T value)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            // See comment above Array.GetComparerForReferenceTypesOnly for details
+            EqualityComparer<T> comparer = GetComparerForReferenceTypesOnly<T>();
+
+            if (comparer != null)
+            {
+                for (int i = 0; i < array.Length; i++)
+                {
+                    if (comparer.Equals(array[i], value))
+                        return i;
+                }
+            }
+            else
+            {
+                for (int i = 0; i < array.Length; i++)
+                {
+                    if (StructOnlyEquals<T>(array[i], value))
+                        return i;
+                }
+            }
+
+            return -1;
+        }
+
+        public static int IndexOf<T>(T[] array, T value, int startIndex)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return IndexOf(array, value, startIndex, array.Length - startIndex);
+        }
+
+        public static int IndexOf<T>(T[] array, T value, int startIndex, int count)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (startIndex < 0 || startIndex > array.Length)
+            {
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+            }
+
+            if (count < 0 || count > array.Length - startIndex)
+            {
+                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+            }
+
+            int endIndex = startIndex + count;
+
+            // See comment above Array.GetComparerForReferenceTypesOnly for details
+            EqualityComparer<T> comparer = GetComparerForReferenceTypesOnly<T>();
+
+            if (comparer != null)
+            {
+                for (int i = startIndex; i < endIndex; i++)
+                {
+                    if (comparer.Equals(array[i], value))
+                        return i;
+                }
+            }
+            else
+            {
+                for (int i = startIndex; i < endIndex; i++)
+                {
+                    if (StructOnlyEquals<T>(array[i], value))
+                        return i;
+                }
+            }
+
+            return -1;
+        }
+
+        public static int LastIndexOf(Array array, Object value)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            return LastIndexOf(array, value, array.Length - 1, array.Length);
+        }
+
+        // Returns the index of the last occurrence of a given value in a range of
+        // an array. The array is searched backwards, starting at index
+        // startIndex and ending at index 0. The elements of the array are
+        // compared to the given value using the Object.Equals method.
+        // 
+        public static int LastIndexOf(Array array, Object value, int startIndex)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            return LastIndexOf(array, value, startIndex, startIndex + 1);
+        }
+
+        // Returns the index of the last occurrence of a given value in a range of
+        // an array. The array is searched backwards, starting at index
+        // startIndex and counting uptocount elements. The elements of
+        // the array are compared to the given value using the Object.Equals
+        // method.
+        // 
+        public static int LastIndexOf(Array array, Object value, int startIndex, int count)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            if (array.Length == 0)
+            {
+                return -1;
+            }
+
+            if (startIndex < 0 || startIndex >= array.Length)
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+            if (count < 0)
+                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+            if (count > startIndex + 1)
+                throw new ArgumentOutOfRangeException("endIndex", SR.ArgumentOutOfRange_EndIndexStartIndex);
+            if (array.Rank != 1)
+                throw new RankException(SR.Rank_MultiDimNotSupported);
+
+            Object[] objArray = array as Object[];
+            int endIndex = startIndex - count + 1;
+            if (objArray != null)
+            {
+                if (value == null)
+                {
+                    for (int i = startIndex; i >= endIndex; i--)
+                    {
+                        if (objArray[i] == null) return i;
+                    }
+                }
+                else
+                {
+                    for (int i = startIndex; i >= endIndex; i--)
+                    {
+                        Object obj = objArray[i];
+                        if (obj != null && obj.Equals(value)) return i;
+                    }
+                }
+            }
+            else
+            {
+                for (int i = startIndex; i >= endIndex; i--)
+                {
+                    Object obj = array.GetValue(i);
+                    if (obj == null)
+                    {
+                        if (value == null) return i;
+                    }
+                    else
+                    {
+                        if (obj.Equals(value)) return i;
+                    }
+                }
+            }
+            return -1;  // Return lb-1 for arrays with negative lower bounds.
+        }
+
+        public static int LastIndexOf<T>(T[] array, T value)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return LastIndexOf(array, value, array.Length - 1, array.Length);
+        }
+
+        public static int LastIndexOf<T>(T[] array, T value, int startIndex)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            // if array is empty and startIndex is 0, we need to pass 0 as count
+            return LastIndexOf(array, value, startIndex, (array.Length == 0) ? 0 : (startIndex + 1));
+        }
+
+        public static int LastIndexOf<T>(T[] array, T value, int startIndex, int count)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (array.Length == 0)
+            {
+                //
+                // Special case for 0 length List
+                // accept -1 and 0 as valid startIndex for compablility reason.
+                //
+                if (startIndex != -1 && startIndex != 0)
+                {
+                    throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+                }
+
+                // only 0 is a valid value for count if array is empty
+                if (count != 0)
+                {
+                    throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+                }
+                return -1;
+            }
+
+            // Make sure we're not out of range            
+            if (startIndex < 0 || startIndex >= array.Length)
+            {
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+            }
+
+            // 2nd have of this also catches when startIndex == MAXINT, so MAXINT - 0 + 1 == -1, which is < 0.
+            if (count < 0 || startIndex - count + 1 < 0)
+            {
+                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+            }
+
+            // See comment above Array.GetComparerForReferenceTypesOnly for details
+            EqualityComparer<T> comparer = GetComparerForReferenceTypesOnly<T>();
+
+            int endIndex = startIndex - count + 1;
+            if (comparer != null)
+            {
+                for (int i = startIndex; i >= endIndex; i--)
+                {
+                    if (comparer.Equals(array[i], value))
+                        return i;
+                }
+            }
+            else
+            {
+                for (int i = startIndex; i >= endIndex; i--)
+                {
+                    if (StructOnlyEquals<T>(array[i], value))
+                        return i;
+                }
+            }
+
+            return -1;
+        }
+
+        // Reverses all elements of the given array. Following a call to this
+        // method, an element previously located at index i will now be
+        // located at index length - i - 1, where length is the
+        // length of the array.
+        // 
+        public static void Reverse(Array array)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            Reverse(array, 0, array.Length);
+        }
+
+        // Reverses the elements in a range of an array. Following a call to this
+        // method, an element in the range given by index and count
+        // which was previously located at index i will now be located at
+        // index index + (index + count - i - 1).
+        // Reliability note: This may fail because it may have to box objects.
+        // 
+        public static void Reverse(Array array, int index, int length)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            int lowerBound = array.GetLowerBound(0);
+            if (index < lowerBound || length < 0)
+                throw new ArgumentOutOfRangeException((index < lowerBound ? nameof(index) : nameof(length)), SR.ArgumentOutOfRange_NeedNonNegNum);
+            if (array.Length - (index - lowerBound) < length)
+                throw new ArgumentException(SR.Argument_InvalidOffLen);
+            if (array.Rank != 1)
+                throw new RankException(SR.Rank_MultiDimNotSupported);
+
+            int i = index;
+            int j = index + length - 1;
+            Object[] objArray = array as Object[];
+            if (objArray != null)
+            {
+                while (i < j)
+                {
+                    Object temp = objArray[i];
+                    objArray[i] = objArray[j];
+                    objArray[j] = temp;
+                    i++;
+                    j--;
+                }
+            }
+            else
+            {
+                while (i < j)
+                {
+                    Object temp = array.GetValue(i);
+                    array.SetValue(array.GetValue(j), i);
+                    array.SetValue(temp, j);
+                    i++;
+                    j--;
+                }
+            }
+        }
+
+        public static void Reverse<T>(T[] array)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            Reverse(array, 0, array.Length);
+        }
+
+        public static void Reverse<T>(T[] array, int index, int length)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            if (index < 0 || length < 0)
+                throw new ArgumentOutOfRangeException((index < 0 ? nameof(index) : nameof(length)), SR.ArgumentOutOfRange_NeedNonNegNum);
+            if (array.Length - index < length)
+                throw new ArgumentException(SR.Argument_InvalidOffLen);
+
+            int i = index;
+            int j = index + length - 1;
+            while (i < j)
+            {
+                T temp = array[i];
+                array[i] = array[j];
+                array[j] = temp;
+                i++;
+                j--;
+            }
+        }
+
+        // Sorts the elements of an array. The sort compares the elements to each
+        // other using the IComparable interface, which must be implemented
+        // by all elements of the array.
+        // 
+        public static void Sort(Array array)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            Sort(array, null, 0, array.Length, null);
+        }
+
+        // Sorts the elements in a section of an array. The sort compares the
+        // elements to each other using the IComparable interface, which
+        // must be implemented by all elements in the given section of the array.
+        // 
+        public static void Sort(Array array, int index, int length)
+        {
+            Sort(array, null, index, length, null);
+        }
+
+        // Sorts the elements of an array. The sort compares the elements to each
+        // other using the given IComparer interface. If comparer is
+        // null, the elements are compared to each other using the
+        // IComparable interface, which in that case must be implemented by
+        // all elements of the array.
+        // 
+        public static void Sort(Array array, IComparer comparer)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            Sort(array, null, 0, array.Length, comparer);
+        }
+
+        // Sorts the elements in a section of an array. The sort compares the
+        // elements to each other using the given IComparer interface. If
+        // comparer is null, the elements are compared to each other using
+        // the IComparable interface, which in that case must be implemented
+        // by all elements in the given section of the array.
+        // 
+        public static void Sort(Array array, int index, int length, IComparer comparer)
+        {
+            Sort(array, null, index, length, comparer);
+        }
+
+        public static void Sort(Array keys, Array items)
+        {
+            if (keys == null)
+            {
+                throw new ArgumentNullException(nameof(keys));
+            }
+
+            Sort(keys, items, keys.GetLowerBound(0), keys.Length, null);
+        }
+
+        public static void Sort(Array keys, Array items, IComparer comparer)
+        {
+            if (keys == null)
+            {
+                throw new ArgumentNullException(nameof(keys));
+            }
+
+            Sort(keys, items, keys.GetLowerBound(0), keys.Length, comparer);
+        }
+
+        public static void Sort(Array keys, Array items, int index, int length)
+        {
+            Sort(keys, items, index, length, null);
+        }
+
+        public static void Sort(Array keys, Array items, int index, int length, IComparer comparer)
+        {
+            if (keys == null)
+                throw new ArgumentNullException(nameof(keys));
+            if (keys.Rank != 1 || (items != null && items.Rank != 1))
+                throw new RankException(SR.Rank_MultiDimNotSupported);
+            int keysLowerBound = keys.GetLowerBound(0);
+            if (items != null && keysLowerBound != items.GetLowerBound(0))
+                throw new ArgumentException(SR.Arg_LowerBoundsMustMatch);
+            if (index < keysLowerBound || length < 0)
+                throw new ArgumentOutOfRangeException((length < 0 ? nameof(length) : nameof(index)), SR.ArgumentOutOfRange_NeedNonNegNum);
+            if (keys.Length - (index - keysLowerBound) < length || (items != null && (index - keysLowerBound) > items.Length - length))
+                throw new ArgumentException(SR.Argument_InvalidOffLen);
+
+            if (length > 1)
+            {
+#if CORERT
+                IComparer<Object> comparerT = new ComparerAsComparerT(comparer);
+                Object[] objKeys = keys as Object[];
+                Object[] objItems = items as Object[];
+
+                // Unfortunately, on Project N, we don't have the ability to specialize ArraySortHelper<> on demand
+                // for value types. Rather than incur a boxing cost on every compare and every swap (and maintain a separate introsort algorithm
+                // just for this), box them all, sort them as an Object[] array and unbox them back.
+
+                // Check if either of the arrays need to be copied.
+                if (objKeys == null)
+                {
+                    objKeys = new Object[index + length];
+                    Array.CopyImplValueTypeArrayToReferenceArray(keys, index, objKeys, index, length, reliable: false);
+                }
+                if (objItems == null && items != null)
+                {
+                    objItems = new Object[index + length];
+                    Array.CopyImplValueTypeArrayToReferenceArray(items, index, objItems, index, length, reliable: false);
+                }
+
+                Sort<Object, Object>(objKeys, objItems, index, length, comparerT);
+
+                // If either array was copied, copy it back into the original
+                if (objKeys != keys)
+                {
+                    Array.CopyImplReferenceArrayToValueTypeArray(objKeys, index, keys, index, length, reliable: false);
+                }
+                if (objItems != items)
+                {
+                    Array.CopyImplReferenceArrayToValueTypeArray(objItems, index, items, index, length, reliable: false);
+                }
+#else
+                Object[] objKeys = keys as Object[];
+                Object[] objItems = null;
+                if (objKeys != null)
+                    objItems = items as Object[];
+                if (objKeys != null && (items == null || objItems != null))
+                {
+                    SorterObjectArray sorter = new SorterObjectArray(objKeys, objItems, comparer);
+                    sorter.Sort(index, length);
+                }
+                else
+                {
+                       SorterGenericArray sorter = new SorterGenericArray(keys, items, comparer);
+                       sorter.Sort(index, length);
+                }
+#endif                
+            }
+        }
+
+        // Wraps an IComparer inside an IComparer<Object>.
+        private sealed class ComparerAsComparerT : IComparer<Object>
+        {
+            public ComparerAsComparerT(IComparer comparer)
+            {
+                _comparer = (comparer == null) ? LowLevelComparer.Default : comparer;
+            }
+
+            public int Compare(Object x, Object y)
+            {
+                return _comparer.Compare(x, y);
+            }
+
+            private IComparer _comparer;
+        }
+
+        public static void Sort<T>(T[] array)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+
+            Sort<T>(array, 0, array.Length, null);
+        }
+
+        public static void Sort<T>(T[] array, int index, int length)
+        {
+            Sort<T>(array, index, length, null);
+        }
+
+        public static void Sort<T>(T[] array, System.Collections.Generic.IComparer<T> comparer)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            Sort<T>(array, 0, array.Length, comparer);
+        }
+
+        public static void Sort<T>(T[] array, int index, int length, System.Collections.Generic.IComparer<T> comparer)
+        {
+            if (array == null)
+                throw new ArgumentNullException(nameof(array));
+            if (index < 0 || length < 0)
+                throw new ArgumentOutOfRangeException((length < 0 ? nameof(length) : nameof(index)), SR.ArgumentOutOfRange_NeedNonNegNum);
+            if (array.Length - index < length)
+                throw new ArgumentException(SR.Argument_InvalidOffLen);
+
+            if (length > 1)
+                ArraySortHelper<T>.Sort(array, index, length, comparer);
+        }
+
+        public static void Sort<T>(T[] array, Comparison<T> comparison)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (comparison == null)
+            {
+                throw new ArgumentNullException(nameof(comparison));
+            }
+
+            ArraySortHelper<T>.Sort(array, 0, array.Length, comparison);
+        }
+
+        public static void Sort<TKey, TValue>(TKey[] keys, TValue[] items)
+        {
+            if (keys == null)
+                throw new ArgumentNullException(nameof(keys));
+            Contract.EndContractBlock();
+            Sort<TKey, TValue>(keys, items, 0, keys.Length, null);
+        }
+
+        public static void Sort<TKey, TValue>(TKey[] keys, TValue[] items, int index, int length)
+        {
+            Sort<TKey, TValue>(keys, items, index, length, null);
+        }
+
+        public static void Sort<TKey, TValue>(TKey[] keys, TValue[] items, IComparer<TKey> comparer)
+        {
+            if (keys == null)
+                throw new ArgumentNullException(nameof(keys));
+            Contract.EndContractBlock();
+            Sort<TKey, TValue>(keys, items, 0, keys.Length, comparer);
+        }
+
+        public static void Sort<TKey, TValue>(TKey[] keys, TValue[] items, int index, int length, IComparer<TKey> comparer)
+        {
+            if (keys == null)
+                throw new ArgumentNullException(nameof(keys));
+            if (index < 0 || length < 0)
+                throw new ArgumentOutOfRangeException((length < 0 ? nameof(length) : nameof(index)), SR.ArgumentOutOfRange_NeedNonNegNum);
+            if (keys.Length - index < length || (items != null && index > items.Length - length))
+                throw new ArgumentException(SR.Argument_InvalidOffLen);
+            Contract.EndContractBlock();
+
+            if (length > 1)
+            {
+                if (items == null)
+                {
+                    Sort<TKey>(keys, index, length, comparer);
+                    return;
+                }
+
+                ArraySortHelper<TKey, TValue>.Default.Sort(keys, items, index, length, comparer);
+            }
+        }
+
+        public static T[] Empty<T>()
+        {
+            return EmptyArray<T>.Value;
+        }
+
+        public static bool Exists<T>(T[] array, Predicate<T> match)
+        {
+            return Array.FindIndex(array, match) != -1;
+        }
+
+        public static void Fill<T>(T[] array, T value)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            for (int i = 0; i < array.Length; i++)
+            {
+                array[i] = value;
+            }
+        }
+
+        public static void Fill<T>(T[] array, T value, int startIndex, int count)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (startIndex < 0 || startIndex > array.Length)
+            {
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+            }
+
+            if (count < 0 || startIndex > array.Length - count)
+            {
+                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+            }
+
+            for (int i = startIndex; i < startIndex + count; i++)
+            {
+                array[i] = value;
+            }
+        }
+
+        public static T Find<T>(T[] array, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (match == null)
+            {
+                throw new ArgumentNullException(nameof(match));
+            }
+
+            for (int i = 0; i < array.Length; i++)
+            {
+                if (match(array[i]))
+                {
+                    return array[i];
+                }
+            }
+            return default(T);
+        }
+
+        public static int FindIndex<T>(T[] array, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return FindIndex(array, 0, array.Length, match);
+        }
+
+        public static int FindIndex<T>(T[] array, int startIndex, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return FindIndex(array, startIndex, array.Length - startIndex, match);
+        }
+
+        public static int FindIndex<T>(T[] array, int startIndex, int count, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (startIndex < 0 || startIndex > array.Length)
+            {
+                throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+            }
+
+            if (count < 0 || startIndex > array.Length - count)
+            {
+                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+            }
+
+            if (match == null)
+            {
+                throw new ArgumentNullException(nameof(match));
+            }
+
+            int endIndex = startIndex + count;
+            for (int i = startIndex; i < endIndex; i++)
+            {
+                if (match(array[i])) return i;
+            }
+            return -1;
+        }
+
+        public static T FindLast<T>(T[] array, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (match == null)
+            {
+                throw new ArgumentNullException(nameof(match));
+            }
+
+            for (int i = array.Length - 1; i >= 0; i--)
+            {
+                if (match(array[i]))
+                {
+                    return array[i];
+                }
+            }
+            return default(T);
+        }
+
+        public static int FindLastIndex<T>(T[] array, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return FindLastIndex(array, array.Length - 1, array.Length, match);
+        }
+
+        public static int FindLastIndex<T>(T[] array, int startIndex, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            return FindLastIndex(array, startIndex, startIndex + 1, match);
+        }
+
+        public static int FindLastIndex<T>(T[] array, int startIndex, int count, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (match == null)
+            {
+                throw new ArgumentNullException(nameof(match));
+            }
+
+            if (array.Length == 0)
+            {
+                // Special case for 0 length List
+                if (startIndex != -1)
+                {
+                    throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+                }
+            }
+            else
+            {
+                // Make sure we're not out of range            
+                if (startIndex < 0 || startIndex >= array.Length)
+                {
+                    throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_Index);
+                }
+            }
+
+            // 2nd have of this also catches when startIndex == MAXINT, so MAXINT - 0 + 1 == -1, which is < 0.
+            if (count < 0 || startIndex - count + 1 < 0)
+            {
+                throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_Count);
+            }
+
+            int endIndex = startIndex - count;
+            for (int i = startIndex; i > endIndex; i--)
+            {
+                if (match(array[i]))
+                {
+                    return i;
+                }
+            }
+            return -1;
+        }
+
+        public static bool TrueForAll<T>(T[] array, Predicate<T> match)
+        {
+            if (array == null)
+            {
+                throw new ArgumentNullException(nameof(array));
+            }
+
+            if (match == null)
+            {
+                throw new ArgumentNullException(nameof(match));
+            }
+
+            for (int i = 0; i < array.Length; i++)
+            {
+                if (!match(array[i]))
+                {
+                    return false;
+                }
+            }
+            return true;
+        }
+
+        public IEnumerator GetEnumerator()
+        {
+            return new ArrayEnumerator(this);
+        }
+
+        // These functions look odd, as they are part of a complex series of compiler intrinsics
+        // designed to produce very high quality code for equality comparison cases without utilizing
+        // reflection like other platforms. The major complication is that the specification of
+        // IndexOf is that it is supposed to use IEquatable<T> if possible, but that requirement
+        // cannot be expressed in IL directly due to the lack of constraints.
+        // Instead, specialization at call time is used within the compiler. 
+        // 
+        // General Approach
+        // - Perform fancy redirection for Array.GetComparerForReferenceTypesOnly<T>(). If T is a reference 
+        //   type or UniversalCanon, have this redirect to EqualityComparer<T>.get_Default, Otherwise, use 
+        //   the function as is. (will return null in that case)
+        // - Change the contents of the IndexOf functions to have a pair of loops. One for if 
+        //   GetComparerForReferenceTypesOnly returns null, and one for when it does not. 
+        //   - If it does not return null, call the EqualityComparer<T> code.
+        //   - If it does return null, use a special function StructOnlyEquals<T>(). 
+        //     - Calls to that function result in calls to a pair of helper function in 
+        //       EqualityComparerHelpers (StructOnlyEqualsIEquatable, or StructOnlyEqualsNullable) 
+        //       depending on whether or not they are the right function to call.
+        // - The end result is that in optimized builds, we have the same single function compiled size 
+        //   characteristics that the old EqualsOnlyComparer<T>.Equals function had, but we maintain 
+        //   correctness as well.
+        private static EqualityComparer<T> GetComparerForReferenceTypesOnly<T>()
+        {
+#if !CORERT
+               return System.Runtime.CompilerServices.RuntimeHelpers.IsReferenceOrContainsReferences<T> () ? EqualityComparer<T>.Default : null;
+#else
+            return EqualityComparer<T>.Default;
+#endif
+        }
+
+        private static bool StructOnlyEquals<T>(T left, T right)
+        {
+            return left.Equals(right);
+        }
+
+        private sealed class ArrayEnumerator : IEnumerator, ICloneable
+        {
+            private Array _array;
+            private int _index;
+            private int _endIndex; // cache array length, since it's a little slow.
+
+            internal ArrayEnumerator(Array array)
+            {
+                _array = array;
+                _index = -1;
+                _endIndex = array.Length;
+            }
+
+            public bool MoveNext()
+            {
+                if (_index < _endIndex)
+                {
+                    _index++;
+                    return (_index < _endIndex);
+                }
+                return false;
+            }
+
+            public Object Current
+            {
+                get
+                {
+                    if (_index < 0) throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
+                    if (_index >= _endIndex) throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
+                    return _array.GetValueWithFlattenedIndex_NoErrorCheck(_index);
+                }
+            }
+
+            public void Reset()
+            {
+                _index = -1;
+            }
+
+            public object Clone()
+            {
+                return MemberwiseClone();
+            }
+        }
+    }
+}
\ No newline at end of file
index 3eaf922d1345de6a66c9acf4482ae86c20396cdf..4d2446c5eca7b47aa5a724b00b29bed2a89b7f00 100644 (file)
@@ -1,4 +1,3 @@
-
 namespace System.Diagnostics.Private
 {
        static partial class Debug
diff --git a/mcs/class/corlib/corert/RelocatedTypeAttribute.cs b/mcs/class/corlib/corert/RelocatedTypeAttribute.cs
new file mode 100644 (file)
index 0000000..b3dc5d6
--- /dev/null
@@ -0,0 +1,14 @@
+using System;
+using System.Diagnostics;
+
+namespace Internal.Runtime.CompilerServices
+{
+       [Conditional ("ALWAYSREMOVED")]
+       [AttributeUsage(AttributeTargets.All)]
+       class RelocatedTypeAttribute : Attribute
+       {
+               public RelocatedTypeAttribute(String originalAssemblySimpleName)
+               {
+               }
+       }
+}
\ No newline at end of file
diff --git a/mcs/class/corlib/corert/RuntimeThread.cs b/mcs/class/corlib/corert/RuntimeThread.cs
new file mode 100644 (file)
index 0000000..72810fa
--- /dev/null
@@ -0,0 +1,9 @@
+namespace Internal.Runtime.Augments
+{
+    class RuntimeThread
+    {
+       public static void InitializeThreadPoolThread ()
+       {
+       }
+    }
+}
\ No newline at end of file
index 8a80a2b0cc70e2ffffdd7bc72eacd420e9cabbf9..1515081c3d3af7cb044ae7a59aaf3c27b73c19bf 100644 (file)
@@ -29,7 +29,7 @@
     <DebugType>full</DebugType>\r
     <NoWarn>612,618,1635,1699</NoWarn>\r
     <Optimize>false</Optimize>\r
-    <DefineConstants>TRACE;INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE</DefineConstants>\r
+    <DefineConstants>TRACE;INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE;MONO_FEATURE_APPLETLS</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
@@ -37,7 +37,7 @@
     <DebugType>pdbonly</DebugType>\r
     <NoWarn>612,618,1635,1699</NoWarn>\r
     <Optimize>true</Optimize>\r
-    <DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE</DefineConstants>\r
+    <DefineConstants>INSIDE_CORLIB;MONO_CULTURE_DATA;LIBC;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;FEATURE_PAL;GENERICS_WORK;FEATURE_LIST_PREDICATES;FEATURE_SERIALIZATION;FEATURE_ASCII;FEATURE_LATIN1;FEATURE_UTF7;FEATURE_UTF32;MONO_HYBRID_ENCODING_SUPPORT;FEATURE_ASYNC_IO;NEW_EXPERIMENTAL_ASYNC_IO;FEATURE_UTF32;FEATURE_EXCEPTIONDISPATCHINFO;FEATURE_CORRUPTING_EXCEPTIONS;FEATURE_EXCEPTION_NOTIFICATIONS;FEATURE_STRONGNAME_MIGRATION;FEATURE_USE_LCID;FEATURE_FUSION;FEATURE_CRYPTO;FEATURE_X509_SECURESTRINGS;FEATURE_SYNCHRONIZATIONCONTEXT;FEATURE_SYNCHRONIZATIONCONTEXT_WAIT;HAS_CORLIB_CONTRACTS;FEATURE_MACL;FEATURE_REMOTING;MONO_COM;FEATURE_COMINTEROP;FEATURE_ROLE_BASED_SECURITY;MONO_FEATURE_THREAD_ABORT;MONO_FEATURE_THREAD_SUSPEND_RESUME;MONO_FEATURE_MULTIPLE_APPDOMAINS;MONO_FEATURE_CONSOLE;MONO_FEATURE_APPLETLS</DefineConstants>\r
     <ErrorReport>prompt</ErrorReport>\r
     <WarningLevel>4</WarningLevel>\r
   </PropertyGroup>\r
     <Compile Include="..\..\..\external\corefx\src\System.Collections.Concurrent\src\System\Collections\Concurrent\OrderablePartitioner.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Collections.Concurrent\src\System\Collections\Concurrent\Partitioner.cs" />\r
     <Compile Include="..\..\..\external\corefx\src\System.Collections.Concurrent\src\System\Collections\Concurrent\PartitionerStatic.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509ContentType.cs" />\r
+    <Compile Include="..\..\..\external\corefx\src\System.Security.Cryptography.X509Certificates\src\System\Security\Cryptography\X509Certificates\X509KeyStorageFlags.cs" />\r
     <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Unix\Interop.Libraries.cs" />\r
     <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Unix\System.Private.CoreLib.Native\Interop.MemAllocFree.cs" />\r
     <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Windows\Interop.Libraries.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Windows\mincore\Interop.Errors.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Windows\mincore\Interop.FormatMessage.cs" />\r
     <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Windows\mincore\Interop.MemAllocFree.cs" />\r
     <Compile Include="..\..\..\external\corert\src\Common\src\Interop\Windows\mincore\Interop.ThreadPoolIO.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\Common\src\System\Diagnostics\Debug.cs" />\r
     <Compile Include="..\..\..\external\corert\src\Common\src\System\Numerics\Hashing\HashHelpers.cs" />\r
     <Compile Include="..\..\..\external\corert\src\Runtime.Base\src\System\Runtime\InteropServices\NativeCallableAttribute.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\Interop\Windows\Interop.Errors.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\Interop\Windows\Interop.Libraries.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\Interop\Windows\Kernel32\Interop.FormatMessage.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\IO\Win32Marshal.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\CompilerServices\ITuple.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Runtime\CompilerServices\TupleElementNamesAttribute.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\Threading\DeferredDisposableLifetime.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\shared\System\TupleExtensions.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeThreadPoolIOHandle.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Collections\Generic\ArraySortHelper.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Collections\Generic\Dictionary.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Collections\Generic\IDictionaryDebugView.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Collections\LowLevelComparer.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Collections\ObjectEqualityComparer.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\IO\Win32Marshal.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\ITuple.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Runtime\CompilerServices\TupleElementNamesAttribute.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\DeferredDisposableLifetime.cs" />\r
+    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Diagnostics\Debug.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolBoundHandle.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.ExecutionContextCallbackArgs.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.OverlappedData.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolPreAllocatedOverlapped.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\Tuple.cs" />\r
-    <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\TupleExtensions.cs" />\r
     <Compile Include="..\..\..\external\corert\src\System.Private.CoreLib\src\System\ValueTuple.cs" />\r
     <Compile Include="..\..\build\common\AssemblyRef.cs" />\r
     <Compile Include="..\..\build\common\Consts.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\collections\emptyreadonlydictionaryinternal.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\collections\generic\comparer.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\collections\generic\debugview.cs" />\r
-    <Compile Include="..\referencesource\mscorlib\system\collections\generic\dictionary.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\collections\generic\equalitycomparer.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\collections\generic\icollection.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\collections\generic\icomparer.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\unsafecharbuffer.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\version.cs" />\r
     <Compile Include="Assembly\AssemblyInfo.cs" />\r
+    <Compile Include="coreclr\SorterArray.cs" />\r
+    <Compile Include="CoreFoundation\CFHelpers.cs" />\r
     <Compile Include="corefx\SR.cs" />\r
     <Compile Include="corert\AddrofIntrinsics.cs" />\r
+    <Compile Include="corert\Array.Portable.cs" />\r
     <Compile Include="corert\Debug.cs" />\r
     <Compile Include="corert\Interop.cs" />\r
     <Compile Include="corert\Interop.MemAllocFree.cs" />\r
+    <Compile Include="corert\RelocatedTypeAttribute.cs" />\r
+    <Compile Include="corert\RuntimeThread.cs" />\r
     <Compile Include="Microsoft.Win32\IRegistryApi.cs" />\r
     <Compile Include="Microsoft.Win32\Registry.cs" />\r
     <Compile Include="Microsoft.Win32\RegistryHive.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Certificate20.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509CertificateImpl.cs" />\r
+    <Compile Include="System.Security.Cryptography.X509Certificates\X509CertificateImplApple.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509CertificateImplMono.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509ContentType.cs" />\r
+    <Compile Include="System.Security.Cryptography.X509Certificates\X509Helper.Apple.cs" />\r
     <Compile Include="System.Security.Cryptography.X509Certificates\X509Helper.cs" />\r
-    <Compile Include="System.Security.Cryptography.X509Certificates\X509KeyStorageFlags.cs" />\r
     <Compile Include="System.Security.Cryptography\CryptoAPITransform.cs" />\r
     <Compile Include="System.Security.Cryptography\CryptoConfig.common.cs" />\r
     <Compile Include="System.Security.Cryptography\CryptoConfig.cs" />\r
index 59f60a88fb5cc55eac4c71194041ecdc3b9baa8b..6fb6cd13270d2815c36773ad9a211eb89be6eacd 100644 (file)
@@ -720,9 +720,9 @@ System.Security.Cryptography.X509Certificates/X509Certificate.cs
 System.Security.Cryptography.X509Certificates/X509Certificate20.cs
 System.Security.Cryptography.X509Certificates/X509CertificateImpl.cs
 System.Security.Cryptography.X509Certificates/X509CertificateImplMono.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509ContentType.cs
 System.Security.Cryptography.X509Certificates/X509Helper.cs
-System.Security.Cryptography.X509Certificates/X509ContentType.cs
-System.Security.Cryptography.X509Certificates/X509KeyStorageFlags.cs
+../../../external/corefx/src/System.Security.Cryptography.X509Certificates/src/System/Security/Cryptography/X509Certificates/X509KeyStorageFlags.cs
 System.Security.Permissions/CodeAccessSecurityAttribute.cs
 System.Security.Permissions/EnvironmentPermission.cs
 System.Security.Permissions/EnvironmentPermissionAccess.cs
@@ -1091,7 +1091,6 @@ ReferenceSources/Type.cs
 
 ../referencesource/mscorlib/system/collections/generic/comparer.cs
 ../referencesource/mscorlib/system/collections/generic/debugview.cs
-../referencesource/mscorlib/system/collections/generic/dictionary.cs
 ../referencesource/mscorlib/system/collections/generic/equalitycomparer.cs
 ../referencesource/mscorlib/system/collections/generic/icollection.cs
 ../referencesource/mscorlib/system/collections/generic/icomparer.cs
@@ -1637,10 +1636,15 @@ ReferenceSources/Type.cs
 ../referencesource/mscorlib/microsoft/win32/safehandles/safewaithandle.cs
 ../referencesource/mscorlib/microsoft/win32/safehandles/win32safehandles.cs
 
+coreclr/SorterArray.cs
+
 corert/AddrofIntrinsics.cs
+corert/Array.Portable.cs
 corert/Debug.cs
 corert/Interop.cs
 corert/Interop.MemAllocFree.cs
+corert/RelocatedTypeAttribute.cs
+corert/RuntimeThread.cs
 
 ../../../external/corert/src/Common/src/Interop/Unix/Interop.Libraries.cs
 
@@ -1648,32 +1652,43 @@ corert/Interop.MemAllocFree.cs
 
 ../../../external/corert/src/Common/src/Interop/Windows/Interop.Libraries.cs
 
-../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.Errors.cs
-../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.FormatMessage.cs
 ../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.MemAllocFree.cs
 ../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.ThreadPoolIO.cs
 
-../../../external/corert/src/Common/src/System/Diagnostics/Debug.cs
-
 ../../../external/corert/src/Common/src/System/Numerics/Hashing/HashHelpers.cs
 
 ../../../external/corert/src/Runtime.Base/src/System/Runtime/InteropServices/NativeCallableAttribute.cs
 
+
+../../../external/corert/src/System.Private.CoreLib/shared/Interop/Windows/Interop.Errors.cs
+../../../external/corert/src/System.Private.CoreLib/shared/Interop/Windows/Interop.Libraries.cs
+
+../../../external/corert/src/System.Private.CoreLib/shared/Interop/Windows/Kernel32/Interop.FormatMessage.cs
+
+../../../external/corert/src/System.Private.CoreLib/shared/System/TupleExtensions.cs
+
+../../../external/corert/src/System.Private.CoreLib/shared/System/IO/Win32Marshal.cs
+
+../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ITuple.cs
+../../../external/corert/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
+
+../../../external/corert/src/System.Private.CoreLib/shared/System/Threading/DeferredDisposableLifetime.cs
+
+
 ../../../external/corert/src/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeThreadPoolIOHandle.cs
 
 ../../../external/corert/src/System.Private.CoreLib/src/System/Tuple.cs
-../../../external/corert/src/System.Private.CoreLib/src/System/TupleExtensions.cs
 ../../../external/corert/src/System.Private.CoreLib/src/System/ValueTuple.cs
 
 ../../../external/corert/src/System.Private.CoreLib/src/System/Collections/LowLevelComparer.cs
 ../../../external/corert/src/System.Private.CoreLib/src/System/Collections/ObjectEqualityComparer.cs
 
-../../../external/corert/src/System.Private.CoreLib/src/System/IO/Win32Marshal.cs
+../../../external/corert/src/System.Private.CoreLib/src/System/Collections/Generic/ArraySortHelper.cs
+../../../external/corert/src/System.Private.CoreLib/src/System/Collections/Generic/IDictionaryDebugView.cs
+../../../external/corert/src/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs
 
-../../../external/corert/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ITuple.cs
-../../../external/corert/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
+../../../external/corert/src/System.Private.CoreLib/src/System/Diagnostics/Debug.cs
 
-../../../external/corert/src/System.Private.CoreLib/src/System/Threading/DeferredDisposableLifetime.cs
 ../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolBoundHandle.cs
 ../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolNativeOverlapped.cs
 ../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolNativeOverlapped.ExecutionContextCallbackArgs.cs
@@ -1690,3 +1705,7 @@ corefx/SR.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/OrderablePartitioner.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/Partitioner.cs
 ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/PartitionerStatic.cs
+
+System.Security.Cryptography.X509Certificates/X509CertificateImplApple.cs
+System.Security.Cryptography.X509Certificates/X509Helper.Apple.cs
+CoreFoundation/CFHelpers.cs
diff --git a/mcs/class/legacy/Mono.Cecil/legacy_Mono.Cecil-net_4_x.csproj b/mcs/class/legacy/Mono.Cecil/legacy_Mono.Cecil-net_4_x.csproj
new file mode 100644 (file)
index 0000000..1164355
--- /dev/null
@@ -0,0 +1,219 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->\r
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+  <PropertyGroup>\r
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>\r
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>\r
+    <ProductVersion>9.0.30729</ProductVersion>\r
+    <SchemaVersion>2.0</SchemaVersion>\r
+    <ProjectGuid>{CF1339E8-584B-4B3D-9A93-6F4AFDAFEE66}</ProjectGuid>\r
+    <OutputType>Library</OutputType>\r
+    <NoWarn>1699</NoWarn>\r
+    <OutputPath>./../../../class/lib/net_4_x/legacy</OutputPath>\r
+    <IntermediateOutputPath>obj-legacy</IntermediateOutputPath>\r
+    <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>\r
+    <NoStdLib>True</NoStdLib>\r
+    \r
+    <NoConfig>True</NoConfig>\r
+    \r
+    <AppDesignerFolder>Properties</AppDesignerFolder>\r
+    <RootNamespace>\r
+    </RootNamespace>\r
+    <AssemblyName>Mono.Cecil</AssemblyName>\r
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>\r
+    <FileAlignment>512</FileAlignment>\r
+  </PropertyGroup>\r
+    <PropertyGroup>\r
+    <SignAssembly>true</SignAssembly>\r
+  </PropertyGroup>\r
+  <PropertyGroup>\r
+    <AssemblyOriginatorKeyFile>../../mono.snk</AssemblyOriginatorKeyFile>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">\r
+    <DebugSymbols>true</DebugSymbols>\r
+    <DebugType>full</DebugType>\r
+    <NoWarn>1699</NoWarn>\r
+    <Optimize>false</Optimize>\r
+    <DefineConstants>TRACE;NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;NET_3_5</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">\r
+    <DebugType>pdbonly</DebugType>\r
+    <NoWarn>1699</NoWarn>\r
+    <Optimize>true</Optimize>\r
+    <DefineConstants>NET_4_0;NET_4_5;NET_4_6;MONO;WIN_PLATFORM;NET_3_5</DefineConstants>\r
+    <ErrorReport>prompt</ErrorReport>\r
+    <WarningLevel>4</WarningLevel>\r
+  </PropertyGroup>\r
+  <!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0, \r
+  Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This\r
+  is a problem to compile the Mono mscorlib.dll -->\r
+  <PropertyGroup>\r
+    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>\r
+  </PropertyGroup>\r
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />\r
+  <ItemGroup>\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\Code.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\CodeReader.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\CodeWriter.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\Document.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\ExceptionHandler.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\ILProcessor.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\Instruction.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\MethodBody.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\OpCode.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\OpCodes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\SequencePoint.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\Symbols.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\VariableDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Cil\VariableReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\BlobHeap.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\Buffers.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\CodedIndex.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\ElementType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\GuidHeap.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\Heap.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\MetadataToken.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\Row.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\StringHeap.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\TableHeap.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\TokenType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\UserStringHeap.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.Metadata\Utilities.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\BinaryStreamReader.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\BinaryStreamWriter.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\ByteBuffer.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\ByteBufferEqualityComparer.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\DataDirectory.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\Image.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\ImageReader.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\ImageWriter.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\Section.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil.PE\TextMap.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ArrayType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyFlags.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyHashAlgorithm.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyInfo.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyLinkedResource.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyNameDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyNameReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyReader.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\AssemblyWriter.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\BaseAssemblyResolver.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\CallSite.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\CustomAttribute.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\DefaultAssemblyResolver.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\EmbeddedResource.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\EventAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\EventDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\EventReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ExportedType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\FieldAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\FieldDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\FieldReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\FileAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\FunctionPointerType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\GenericInstanceMethod.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\GenericInstanceType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\GenericParameter.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\GenericParameterAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IConstantProvider.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ICustomAttributeProvider.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IGenericInstance.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IGenericParameterProvider.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IMarshalInfoProvider.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IMemberDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IMetadataScope.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IMetadataTokenProvider.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\IMethodSignature.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\Import.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\LinkedResource.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ManifestResourceAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MarshalInfo.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MemberDefinitionCollection.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MemberReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MetadataResolver.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MetadataSystem.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodCallingConvention.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodImplAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodReturnType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodSemanticsAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\MethodSpecification.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\Modifiers.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ModuleDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ModuleKind.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ModuleReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\NativeType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ParameterAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ParameterDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ParameterDefinitionCollection.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ParameterReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\PinnedType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\PInvokeAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\PInvokeInfo.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\PointerType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\PropertyAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\PropertyDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\PropertyReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\ReferenceType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\Resource.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\SecurityDeclaration.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\SentinelType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TargetRuntime.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TypeAttributes.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TypeDefinition.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TypeDefinitionCollection.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TypeParser.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TypeReference.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TypeSpecification.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\TypeSystem.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Cecil\VariantType.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Collections.Generic\Collection.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Collections.Generic\ReadOnlyCollection.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Security.Cryptography\CryptoConvert.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono.Security.Cryptography\CryptoService.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono\Actions.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono\Empty.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\Mono\Funcs.cs" />\r
+    <Compile Include="..\..\..\..\external\cecil-legacy\System.Runtime.CompilerServices\ExtensionAttribute.cs" />\r  </ItemGroup>\r
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
+       Other similar extension points exist, see Microsoft.Common.targets.\r
+  <Target Name="BeforeBuild">\r
+  </Target>\r
+  <Target Name="AfterBuild">\r
+  </Target>\r
+  -->\r
+  <PropertyGroup>\r
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
+    </PreBuildEvent>\r
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
+\r
+    </PreBuildEvent>\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
+    </PostBuildEvent>\r
+    <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
+\r
+    </PostBuildEvent>\r
+  </PropertyGroup>\r
+  <ItemGroup>\r
+    <ProjectReference Include="../../corlib/corlib-net_4_x.csproj">\r
+      <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
+      <Name>corlib-net_4_x</Name>\r
+    </ProjectReference>\r
+    <ProjectReference Include="../../System.Core/System.Core-net_4_x.csproj">\r
+      <Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>\r
+      <Name>System.Core-net_4_x</Name>\r
+    </ProjectReference>\r
+  </ItemGroup>\r
+  <ItemGroup>\r
+    <Folder Include="Properties\" />\r
+  </ItemGroup>\r
+</Project>\r
+
index 519786c3cf2af60442895a8c1350b26edc2950e1..425a983215473970ab5484bc9602437ff53b41fb 100644 (file)
@@ -6,17 +6,41 @@ all-local:
 
 PROFILE_DIR=$(DESTDIR)$(mono_libdir)/mono
 
+build-reference-assemblies:
+       $(MAKE) -C ../../../external/binary-reference-assemblies CSC="MONO_PATH=$(abspath $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)) $(INTERNAL_CSC)"
+
 install-local:
        $(MKINSTALLDIRS) $(PROFILE_DIR)/2.0-api
        $(MKINSTALLDIRS) $(PROFILE_DIR)/3.5-api
        $(MKINSTALLDIRS) $(PROFILE_DIR)/4.0-api
        $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.1-api
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.2-api
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6-api
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.1-api
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.2-api
        $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5-api/Facades
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.1-api/Facades
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.5.2-api/Facades
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6-api/Facades
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.1-api/Facades
+       $(MKINSTALLDIRS) $(PROFILE_DIR)/4.6.2-api/Facades
+
        $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v2.0/*.dll $(PROFILE_DIR)/2.0-api
        $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v3.5/*.dll $(PROFILE_DIR)/3.5-api
        $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.0/*.dll $(PROFILE_DIR)/4.0-api
        $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/*.dll $(PROFILE_DIR)/4.5-api
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5.1/*.dll $(PROFILE_DIR)/4.5.1-api
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5.2/*.dll $(PROFILE_DIR)/4.5.2-api
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.6/*.dll $(PROFILE_DIR)/4.6-api
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.6.1/*.dll $(PROFILE_DIR)/4.6.1-api
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.6.2/*.dll $(PROFILE_DIR)/4.6.2-api
        $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll $(PROFILE_DIR)/4.5-api/Facades
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5.1/Facades/*.dll $(PROFILE_DIR)/4.5.1-api/Facades
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.5.2/Facades/*.dll $(PROFILE_DIR)/4.5.2-api/Facades
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.6/Facades/*.dll $(PROFILE_DIR)/4.6-api/Facades
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.6.1/Facades/*.dll $(PROFILE_DIR)/4.6.1-api/Facades
+       $(INSTALL_LIB) ../../../external/binary-reference-assemblies/v4.6.2/Facades/*.dll $(PROFILE_DIR)/4.6.2-api/Facades
 
        # Unfortunately, a few programs (most notably NUnit and FSharp) have hardcoded checks for <prefix>/lib/mono/4.0/mscorlib.dll or Mono.Posix.dll,
        # so we need to place something there or those tools break. We decided to symlink to the reference assembly for now.
@@ -25,6 +49,47 @@ install-local:
        ln -sf ../4.0-api/mscorlib.dll $(PROFILE_DIR)/4.0/mscorlib.dll
        ln -sf ../4.0-api/Mono.Posix.dll $(PROFILE_DIR)/4.0/Mono.Posix.dll
 
-DISTFILES = $(wildcard ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v4.5/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v4.0/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v3.5/*.dll) $(wildcard ../../../external/binary-reference-assemblies/v2.0/*.dll) Makefile
+DISTFILES =    \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.6.2/Facades/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.6.1/Facades/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.6/Facades/*.dll)    \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.5.2/Facades/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.5.1/Facades/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.5/Facades/*.dll)    \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.6.2/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.6.1/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.6/*.dll)    \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.5.2/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.5.1/*.dll)  \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.5/*.dll)    \
+       $(wildcard ../../../external/binary-reference-assemblies/v4.0/*.dll)    \
+       $(wildcard ../../../external/binary-reference-assemblies/v3.5/*.dll)    \
+       $(wildcard ../../../external/binary-reference-assemblies/v2.0/*.dll)    \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.6.2/Facades/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.6.1/Facades/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.6/Facades/*.cs) \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.5.2/Facades/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.5.1/Facades/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.5/Facades/*.cs) \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.6.2/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.6.1/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.6/*.cs) \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.5.2/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.5.1/*.cs)       \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.5/*.cs) \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v4.0/*.cs) \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v3.5/*.cs) \
+       $(wildcard ../../../external/binary-reference-assemblies/src/v2.0/*.cs) \
+       ../../../external/binary-reference-assemblies/v4.6.2/Makefile   \
+       ../../../external/binary-reference-assemblies/v4.6.1/Makefile   \
+       ../../../external/binary-reference-assemblies/v4.6/Makefile     \
+       ../../../external/binary-reference-assemblies/v4.5.2/Makefile   \
+       ../../../external/binary-reference-assemblies/v4.5.1/Makefile   \
+       ../../../external/binary-reference-assemblies/v4.5/Makefile     \
+       ../../../external/binary-reference-assemblies/v4.0/Makefile     \
+       ../../../external/binary-reference-assemblies/v3.5/Makefile     \
+       ../../../external/binary-reference-assemblies/v2.0/Makefile     \
+       ../../../external/binary-reference-assemblies/Makefile  \
+       Makefile
 
 dist-local: dist-default
index 55b5420f131749c42ac58b6988087e793c0c3a3a..436cc7b930ed01a0c0d17fdaaf0970683c6e0398 100644 (file)
@@ -10,8 +10,7 @@ namespace System.ComponentModel {
     
     using System.Diagnostics;
     using System.Globalization;
-    using System.Security.Permissions;
-                                
+
     /// <devdoc>
     ///    <para>Specifies the editor to use to change a property. This class cannot be inherited.</para>
     /// </devdoc>
@@ -36,7 +35,7 @@ namespace System.ComponentModel {
         ///    name of the editor.</para>
         /// </devdoc>
         public EditorAttribute(string typeName, string baseTypeName) {
-            string temp = typeName.ToUpper(CultureInfo.InvariantCulture);
+            string temp = typeName.ToUpperInvariant ();
             Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension");
             this.typeName = typeName;
             this.baseTypeName = baseTypeName;
@@ -46,7 +45,7 @@ namespace System.ComponentModel {
         /// <para>Initializes a new instance of the <see cref='System.ComponentModel.EditorAttribute'/> class.</para>
         /// </devdoc>
         public EditorAttribute(string typeName, Type baseType) {
-            string temp = typeName.ToUpper(CultureInfo.InvariantCulture);
+            string temp = typeName.ToUpperInvariant ();
             Debug.Assert(temp.IndexOf(".DLL") == -1, "Came across: " + typeName + " . Please remove the .dll extension");
             this.typeName = typeName;
             this.baseTypeName = baseType.AssemblyQualifiedName;
index 7e24c906e5958737f29b5cf59744d9980de0530b..0b51b472add4e909c4be67348388d333ed84b52b 100644 (file)
@@ -9,14 +9,18 @@ namespace System.ComponentModel {
     using System.Collections;
     using System.ComponentModel.Design;
     using System.Diagnostics;
+#if MONO_FEATURE_CAS
     using System.Security.Permissions;
+#endif
 
     /// <devdoc>
     ///    <para>Provides
     ///       a type converter to convert expandable objects to and from various
     ///       other representations.</para>
     /// </devdoc>
+#if MONO_FEATURE_CAS
     [HostProtection(SharedState = true)]
+#endif
     public class ExpandableObjectConverter : TypeConverter {
     
         /// <devdoc>
index 792d9f055c1e81a953be6b36cf44163e1b9801ab..24784e96efc2e9f9475b1dbbfab946b48a8478c8 100644 (file)
@@ -10,12 +10,16 @@ namespace System.ComponentModel {
     using System.Diagnostics;
     using System.Globalization;
     using System.Runtime.Serialization;
+#if MONO_FEATURE_CAS
     using System.Security.Permissions;
+#endif
     
     /// <devdoc>
     ///    <para>The exception that is thrown when using invalid arguments that are enumerators.</para>
     /// </devdoc>
+#if MONO_FEATURE_CAS
     [HostProtection(SharedState = true)]
+#endif
     [Serializable]
     public class InvalidEnumArgumentException : ArgumentException {
 
index 8f218d666f64b66ea8b4c6ebb5080c9d7e8d8ddd..79005f4381598264ce545c616518a86919772904 100644 (file)
@@ -10,15 +10,19 @@ namespace System.ComponentModel.Design.Serialization {
     using System.Collections;
     using System.Diagnostics;
     using System.Reflection;
+#if MONO_FEATURE_CAS 
     using System.Security.Permissions;
+#endif
 
     /// <devdoc>
     ///     EventArgs for the ResolveNameEventHandler.  This event is used
     ///     by the serialization process to match a name to an object
     ///     instance.
     /// </devdoc>
-    [HostProtection(SharedState = true)]
+#if MONO_FEATURE_CAS 
+    [HostProtection(SharedState = true)]               
     [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Name = "FullTrust")]
+#endif
     public sealed class InstanceDescriptor {
         private MemberInfo  member;
         private ICollection arguments;
index 2a5432d0ace9a56eb12090ae1f3b0aae7274756e..4fc2f7c2078c5888ea0abbc52d45632d8a33dede 100644 (file)
@@ -2569,11 +2569,6 @@ namespace System.Diagnostics {
                         signaled = false;
                     }
                 }
-            }
-            finally {
-                if( processWaitHandle != null) {
-                    processWaitHandle.Close();
-                }
 
                 // If we have a hard timeout, we cannot wait for the streams
                 if( output != null && milliseconds == -1) {
@@ -2583,6 +2578,11 @@ namespace System.Diagnostics {
                 if( error != null && milliseconds == -1) {
                     error.WaitUtilEOF();
                 }
+            }
+            finally {
+                if( processWaitHandle != null) {
+                    processWaitHandle.Close();
+                }
 
                 ReleaseProcessHandle(handle);
 
index 59d567cb25ef7de5e53ec47e1b70daa737e36791..0cb24e826918eaaa5a12ae98ea5e0c30beb5b408 100644 (file)
@@ -261,5 +261,9 @@ namespace System.Reflection {
         {
             return typeImpl.GetInterfaceMap(interfaceType);
         }
+
+#if MONO
+        public override bool IsSZArray { get { return typeImpl.IsSZArray; } }
+#endif
     }
 }
index e31567473f76028d20434e8ef3e53f23aab793bb..929fb43097f515f3c33cb0250806c60c19cb059d 100644 (file)
@@ -1891,6 +1891,10 @@ namespace System {
         // private convenience data
         private const BindingFlags DefaultLookup = BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public;
         internal const BindingFlags DeclaredOnlyLookup = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
+
+#if MONO
+        public virtual bool IsSZArray { get { throw new NotImplementedException (); } }
+#endif
 }
 
 #if CONTRACTS_FULL
index bcedb915d92948a500f84360eefb95f88024632c..4337c3a4fdce3829c81c99b7e1f8ccc5e942f69c 100644 (file)
@@ -2,7 +2,7 @@ using System.Runtime.CompilerServices;
 
 [assembly: InternalsVisibleTo("cs0122-38, PublicKeyToken=<ad60da1470a03d36")]
 
-class Internal
+class InternalClass
 {
        
 }
\ No newline at end of file
index e30975028cedd68422c3f9c3acca8905a3cf76e6..8406845c4b684ccae29b462204c1672e0790736e 100644 (file)
@@ -1,4 +1,4 @@
-// CS0122: `Internal' is inaccessible due to its protection level
+// CS0122: `InternalClass' is inaccessible due to its protection level
 // Line: 9
 // Compiler options: -r:CS0122-38-lib.dll
 
@@ -6,6 +6,6 @@ class M
 {
        public static void Main ()
        {
-               new Internal ();
+               new InternalClass ();
        }
 }
\ No newline at end of file
index fe79b444e36e6600d1a1b227e831fe5a3d278c1b..2f2fe4580b400dfc74c80bd59366ceeeada97f71 100644 (file)
@@ -1805,8 +1805,10 @@ namespace Mono.CSharp
                        this.spec = spec;
                        current_type = null;
                        if (class_partial_parts != null) {
-                               foreach (var part in class_partial_parts)
+                               foreach (var part in class_partial_parts) {
                                        part.spec = spec;
+                                       part.current_type = null;
+                               }
                        }
                }
 
index 26f870d93858ce03ed842bd774fce8f2bf86d2a8..1243712f160dac5db9e9b50b7c6057cf385d6f11 100644 (file)
@@ -249,7 +249,12 @@ namespace Mono.CSharp
                        sdk_directory.Add ("4", new string[] { "4.0-api", "v4.0.30319" });
                        sdk_directory.Add ("4.0", new string[] { "4.0-api", "v4.0.30319" });
                        sdk_directory.Add ("4.5", new string[] { "4.5-api", "v4.0.30319" });
-                       sdk_directory.Add ("4.6", new string [] { "4.5", "net_4_x", "v4.0.30319" });
+                       sdk_directory.Add ("4.5.1", new string[] { "4.5.1-api", "v4.0.30319" });
+                       sdk_directory.Add ("4.5.2", new string[] { "4.5.2-api", "v4.0.30319" });
+                       sdk_directory.Add ("4.6", new string[] { "4.6-api", "v4.0.30319" });
+                       sdk_directory.Add ("4.6.1", new string[] { "4.6.1-api", "v4.0.30319" });
+                       sdk_directory.Add ("4.6.2", new string [] { "4.6.2-api", "v4.0.30319" });
+                       sdk_directory.Add ("4.x", new string [] { "4.5", "net_4_x", "v4.0.30319" });
                }
 
                public StaticLoader (StaticImporter importer, CompilerContext compiler)
@@ -269,7 +274,7 @@ namespace Mono.CSharp
 
                                string sdk_path = null;
 
-                               string sdk_version = compiler.Settings.SdkVersion ?? "4.6";
+                               string sdk_version = compiler.Settings.SdkVersion ?? "4.x";
                                string[] sdk_sub_dirs;
 
                                if (!sdk_directory.TryGetValue (sdk_version, out sdk_sub_dirs))
index 7d4d4d54d039826f748174b024b5b86f4ec6d388..a823cd25ea37f0d29feb36d9e3a8de142202f2ab 100644 (file)
@@ -345,7 +345,7 @@ namespace Mono.CSharp {
                void About ()
                {
                        output.WriteLine (
-                               "The Mono C# compiler is Copyright 2001-2011, Novell, Inc.\n\n" +
+                               "The Mono C# compiler is Copyright 2001-2011, Novell, Inc. 2011-2016 Xamarin Inc, 2016-2017 Microsoft Corp\n\n" +
                                "The compiler source code is released under the terms of the \n" +
                                "MIT X11 or GNU GPL licenses\n\n" +
 
@@ -1602,7 +1602,7 @@ namespace Mono.CSharp {
                void Usage ()
                {
                        output.WriteLine (
-                               "Mono C# compiler, Copyright 2001-2011 Novell, Inc., Copyright 2011-2012 Xamarin, Inc\n" +
+                               "Mono C# compiler, Copyright 2001-2011 Novell, Inc., 2011-2016 Xamarin, Inc, 2016-2017 Microsoft Corp\n" +
                                "mcs [options] source-files\n" +
                                "   --about              About the Mono C# compiler\n" +
                                "   -addmodule:M1[,Mn]   Adds the module to the generated assembly\n" +
index b696582ec135c34d75a3e81c1797e576f855fd39..c65542683e2f6301392d89e79a140fa316e839a4 100644 (file)
@@ -81,8 +81,8 @@
       <Project>{2762E921-91A8-4C87-91E9-BA628013F753}</Project>\r
       <Name>System-net_4_x</Name>\r
     </ProjectReference>\r
-    <ProjectReference Include="../../class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
-      <Project>{6DE38817-EC25-433A-AE58-0D30C5E6C460}</Project>\r
+    <ProjectReference Include="../../class/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
       <Name>Mono.Cecil-net_4_x</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
index 1dc04fc82fca90f56dae1e5f258937ef1baf2e7f..29918a4739813e01ce729b78e8668966f466f80e 100644 (file)
@@ -80,8 +80,8 @@
       <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
       <Name>corlib-net_4_x</Name>\r
     </ProjectReference>\r
-    <ProjectReference Include="../../class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
-      <Project>{6DE38817-EC25-433A-AE58-0D30C5E6C460}</Project>\r
+    <ProjectReference Include="../../class/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
       <Name>Mono.Cecil-net_4_x</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../class/System.XML/System.Xml-net_4_x.csproj">\r
index dde1cb6bbbdeb0fc1914d9ec1b00d3fd2663753d..0db2fed2633fa06bc8305983cc6b28624636edf0 100644 (file)
@@ -1377,10 +1377,18 @@ namespace CorCompare
                                if (ca.Count != 1)
                                        break;
 
+                               if (mapping == null)
+                                       mapping = new Dictionary<string, object> (StringComparer.Ordinal);
+
                                if (constructor.Parameters[0].ParameterType == constructor.Module.TypeSystem.Boolean) {
-                                       if (mapping == null)
-                                               mapping = new Dictionary<string, object> (StringComparer.Ordinal);
                                        mapping.Add ("Bindable", ca[0].Value);
+                               } else if (constructor.Parameters[0].ParameterType.FullName == "System.ComponentModel.BindableSupport") {
+                                       if ((int)ca[0].Value == 0)
+                                               mapping.Add ("Bindable", false);
+                                       else if ((int)ca[0].Value == 1)
+                                               mapping.Add ("Bindable", true);
+                                       else
+                                               throw new NotImplementedException ();
                                } else {
                                        throw new NotImplementedException ();
                                }
index 567c766e6cb5092bce1e1803a64f8e78e1647eb7..87714c727ec32ef0b225689dad8268ad8b77fb7e 100644 (file)
@@ -38,9 +38,15 @@ namespace Mono {
                static string target_host;
                static int target_port;
                static string agent;
+               static string [] script_args;
+
+               public static string [] ScriptArgs => script_args;
                
                static int Main (string [] args)
                {
+                       if (!SplitDriverAndScriptArguments (ref args, out script_args))
+                               return 1;
+
                        var cmd = new CommandLineParser (Console.Out);
                        cmd.UnknownOptionHandler += HandleExtraArguments;
 
@@ -90,6 +96,55 @@ namespace Mono {
                        return shell.Run (startup_files);
                }
 
+               static bool SplitDriverAndScriptArguments (ref string [] driver_args, out string [] script_args)
+               {
+                       // split command line arguments into two groups:
+                       // - anything before '--' or '-s' goes to the mcs driver, which may
+                       //   call back into the csharp driver for further processing
+                       // - anything after '--' or '-s' is made available to the REPL/script
+                       //   via the 'Args' global, similar to csi.
+                       // - if '-s' is used, the argument immediately following it will
+                       //   also be processed by the mcs driver (e.g. a source file)
+
+                       int driver_args_count = 0;
+                       int script_args_offset = 0;
+                       string script_file = null;
+
+                       while (driver_args_count < driver_args.Length && script_args_offset == 0) {
+                               switch (driver_args [driver_args_count]) {
+                               case "--":
+                                       script_args_offset = driver_args_count + 1;
+                                       break;
+                               case "-s":
+                                       if (driver_args_count + 1 >= driver_args.Length) {
+                                               script_args = null;
+                                               Console.Error.WriteLine ("usage is: -s SCRIPT_FILE");
+                                               return false;
+                                       }
+                                       driver_args_count++;
+                                       script_file = driver_args [driver_args_count];
+                                       script_args_offset = driver_args_count + 1;
+                                       break;
+                               default:
+                                       driver_args_count++;
+                                       break;
+                               }
+                       }
+
+                       if (script_args_offset > 0) {
+                               int script_args_count = driver_args.Length - script_args_offset;
+                               script_args = new string [script_args_count];
+                               Array.Copy (driver_args, script_args_offset, script_args, 0, script_args_count);
+                       } else
+                               script_args = Array.Empty<string> ();
+
+                       Array.Resize (ref driver_args, driver_args_count);
+                       if (script_file != null)
+                               driver_args [driver_args_count - 1] = script_file;
+
+                       return true;
+               }
+
                static int HandleExtraArguments (string [] args, int pos)
                {
                        switch (args [pos]) {
@@ -163,9 +218,13 @@ namespace Mono {
                public static new string help {
                        get {
                                return InteractiveBase.help +
-                                       "  TabAtStartCompletes      - Whether tab will complete even on empty lines\n";
+                                       "  TabAtStartCompletes      - Whether tab will complete even on empty lines\n" +
+                                       "  Args                     - Any command line arguments passed to csharp\n" +
+                                       "                             after the '--' (stop processing) argument";
                        }
                }
+
+               public static string [] Args => Driver.ScriptArgs;
        }
        
        public class CSharpShell {
index 49971281cd7852cae7af4b1efbd9c71bf534c2f4..13dc651863c7932150b51e6cfd18fc9030e65aa8 100644 (file)
@@ -72,6 +72,8 @@
     <Compile Include="..\..\..\external\linker\linker\Mono.Linker\I18nAssemblies.cs" />\r
     <Compile Include="..\..\..\external\linker\linker\Mono.Linker\IXApiVisitor.cs" />\r
     <Compile Include="..\..\..\external\linker\linker\Mono.Linker\LinkContext.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\LoadException.cs" />\r
+    <Compile Include="..\..\..\external\linker\linker\Mono.Linker\MarkException.cs" />\r
     <Compile Include="..\..\..\external\linker\linker\Mono.Linker\MethodAction.cs" />\r
     <Compile Include="..\..\..\external\linker\linker\Mono.Linker\Pipeline.cs" />\r
     <Compile Include="..\..\..\external\linker\linker\Mono.Linker\TypePreserve.cs" />\r
       <Project>{87FD2F0F-5222-4AE6-BD63-2D4975E11E5B}</Project>\r
       <Name>System.Xml-net_4_x</Name>\r
     </ProjectReference>\r
-    <ProjectReference Include="../../class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
-      <Project>{6DE38817-EC25-433A-AE58-0D30C5E6C460}</Project>\r
+    <ProjectReference Include="../../class/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
       <Name>Mono.Cecil-net_4_x</Name>\r
     </ProjectReference>\r
   </ItemGroup>\r
index 66410e5fe69bddfb2af8f759616b3291a8797308..f0e2169f2672872ac599b557d378da842d75270b 100644 (file)
@@ -10,6 +10,8 @@
 ../../../external/linker/linker/Mono.Linker/MethodAction.cs
 ../../../external/linker/linker/Mono.Linker/XApiReader.cs
 ../../../external/linker/linker/Mono.Linker/IXApiVisitor.cs
+../../../external/linker/linker/Mono.Linker/LoadException.cs
+../../../external/linker/linker/Mono.Linker/MarkException.cs
 ../../../external/linker/linker/Mono.Linker.Steps/BaseStep.cs
 ../../../external/linker/linker/Mono.Linker.Steps/LoadReferencesStep.cs
 ../../../external/linker/linker/Mono.Linker.Steps/LoadI18nAssemblies.cs
index e5bcb85ff16c6cfa2eed81b8113766c8a320862a..19a93b9c4f9a2adc4b2391bba1dd0b1dd07a06d6 100644 (file)
@@ -76,8 +76,8 @@
       <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
       <Name>corlib-net_4_x</Name>\r
     </ProjectReference>\r
-    <ProjectReference Include="../../class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
-      <Project>{6DE38817-EC25-433A-AE58-0D30C5E6C460}</Project>\r
+    <ProjectReference Include="../../class/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
       <Name>Mono.Cecil-net_4_x</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../class/Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_x.csproj">\r
index 4bc6fa1365a42a4132704bac161c70e90fe94c2d..944e0bcc710691969c20e4d127aab9e1ca9bc04b 100644 (file)
       <Project>{359142A1-D80F-401E-AA64-7167C9317649}</Project>\r
       <Name>System.Core-net_4_x</Name>\r
     </ProjectReference>\r
-    <ProjectReference Include="../../class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
-      <Project>{6DE38817-EC25-433A-AE58-0D30C5E6C460}</Project>\r
+    <ProjectReference Include="../../class/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
       <Name>Mono.Cecil-net_4_x</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib-net_4_x.csproj">\r
index 8be07f281f4171f13abb56785c77755f11caeb96..5c6e6e895ef0ea61eb001dffbb889469d7788d35 100755 (executable)
@@ -1159,7 +1159,7 @@ void          mono_register_config_for_assembly (const char* assembly_name, cons
                        Assembly a = universe.LoadFile (path);
 
                        foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
-                               a = universe.Load (an.FullName);
+                               a = LoadAssembly (an.Name);
                                if (!QueueAssembly (files, a.CodeBase))
                                        return false;
                        }
index 2a81a74173ce2ccb9477fb48418192b2605dc6d1..ddc254ec1138a5e495d354fb37b9bef64cabba9a 100644 (file)
@@ -25,7 +25,7 @@ SYMBOLICATE_EXPECTED_FILE = Test/symbolicate.expected
 CHECK_DIFF = @\
        $(MONO) $(TEST_EXE) > $(STACKTRACE_FILE); \
        $(MONO) $(LIB_PATH)/$(PROGRAM) $(MSYM_DIR) $(STACKTRACE_FILE) > $(SYMBOLICATE_RAW_FILE); \
-       cat $(SYMBOLICATE_RAW_FILE) | tr '\\' '/' | sed "s/) .* in .*\/mcs\//) in mcs\//" | sed '/\[MVID\]/d' | sed '/\[AOTID\]/d' > $(SYMBOLICATE_RESULT_FILE); \
+       cat $(SYMBOLICATE_RAW_FILE) | tr '\\' '/' | sed "s/) .* in .*\/mcs\//) in mcs\//" | sed "s/) .* in .*\/external\//) in external\//" | sed '/\[MVID\]/d' | sed '/\[AOTID\]/d' > $(SYMBOLICATE_RESULT_FILE); \
        DIFF=$$(diff -up $(SYMBOLICATE_EXPECTED_FILE) $(SYMBOLICATE_RESULT_FILE)); \
        if [ ! -z "$$DIFF" ]; then \
                echo "Symbolicate tests failed."; \
index 1ad44cec5ccaeb0d9f33a8a55cdbc81364810bda..71084c05af8d554e10d17f626233a3b0c5869551 100644 (file)
@@ -141,14 +141,12 @@ Stacktrace:
 
 System.ArgumentNullException: Value cannot be null.
 Parameter name: key
-  at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) in mcs/class/referencesource/mscorlib/system/throwhelper.cs:80 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:299 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:228 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in external/corert/src/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs:359 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in external/corert/src/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs:275 
   at StackTraceDumper+<>c.<Main>b__0_15 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:54 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:72 
 Stacktrace:
-  at System.ThrowHelper.ThrowArgumentNullException (System.ExceptionArgument argument) in mcs/class/referencesource/mscorlib/system/throwhelper.cs:80 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:299 
-  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in mcs/class/referencesource/mscorlib/system/collections/generic/dictionary.cs:228 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) in external/corert/src/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs:359 
+  at System.Collections.Generic.Dictionary`2[TKey,TValue].ContainsKey (TKey key) in external/corert/src/System.Private.CoreLib/src/System/Collections/Generic/Dictionary.cs:275 
   at StackTraceDumper+<>c.<Main>b__0_15 () in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:54 
   at StackTraceDumper.Catch (System.Action action) in mcs/tools/mono-symbolicate/Test/StackTraceDumper.cs:72 
index 44e49261a6ce85926b61641d19ac55a4a5929f21..2e17b66e81691b4c90b1ff077eca57c22f188fea 100644 (file)
     <Compile Include="..\..\..\external\cecil\symbols\mdb\Mono.CompilerServices.SymbolWriter\*.cs" />\r
     <Compile Include="..\..\..\external\cecil\symbols\pdb\Microsoft.Cci.Pdb\*.cs" />\r
     <Compile Include="..\..\..\external\cecil\symbols\pdb\Mono.Cecil.Pdb\*.cs" />\r
-    <Compile Include="..\..\..\external\cecil\System.Security.Cryptography\*.cs" />\r
     <Compile Include="..\..\class\Mono.Options\Mono.Options\Options.cs" />\r
     <Compile Include="LocationProvider.cs" />\r
     <Compile Include="Logger.cs" />\r
index 8e08e43950dd8ae2420e6e93d4fee0b1422eddd4..5d082b1ba71e2f6ba0c520824ee1674cf52ff9c2 100644 (file)
@@ -95,7 +95,6 @@ Logger.cs
 ../../../external/cecil/Mono.Cecil.PE/*.cs
 ../../../external/cecil/Mono.Collections.Generic/*.cs
 ../../../external/cecil/Mono.Security.Cryptography/*.cs
-../../../external/cecil/System.Security.Cryptography/*.cs
 ../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/MdbReader.cs
 ../../../external/cecil/symbols/mdb/Mono.Cecil.Mdb/MdbWriter.cs
 ../../../external/cecil/symbols/mdb/Mono.CompilerServices.SymbolWriter/*.cs
index d4120d4f909008aa2b62488abf53cff63ac8c4cd..4ffaddf33b9d698cb1807a35d016f1fa66c98d4f 100644 (file)
       <Project>{2CA6026B-2DC8-4C4C-A12C-1E8234049DB7}</Project>\r
       <Name>corlib-net_4_x</Name>\r
     </ProjectReference>\r
-    <ProjectReference Include="../../class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
-      <Project>{6DE38817-EC25-433A-AE58-0D30C5E6C460}</Project>\r
+    <ProjectReference Include="../../class/Mono.Cecil/Mono.Cecil-net_4_x.csproj">\r
+      <Project>{2C0D558F-0B38-4691-967E-A910A1B995C1}</Project>\r
       <Name>Mono.Cecil-net_4_x</Name>\r
     </ProjectReference>\r
     <ProjectReference Include="../../class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter-net_4_x.csproj">\r
index 75ebb3fd1340761c70b6e3457f31e46fc9092389..e02eaf6cc7fc28d39f4a4744f033aa234fc5151d 100644 (file)
@@ -154,8 +154,24 @@ EXTRA_DISTFILES = \
        data/Microsoft.VisualBasic.targets \
        data/MSBuild/Microsoft.Build.CommonTypes.xsd \
        data/MSBuild/Microsoft.Build.Core.xsd \
-       data/Portable/Targets/* \
-       data/Portable/Frameworks/v5.0/* \
+       data/Portable/Targets/Microsoft.Portable.Core.props \
+       data/Portable/Targets/Microsoft.Portable.Core.targets \
+       data/Portable/Targets/v4.0/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v4.0/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v4.0/Microsoft.Portable.VisualBasic.targets \
+       data/Portable/Targets/v4.5/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v4.5/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v4.5/Microsoft.Portable.VisualBasic.targets \
+       data/Portable/Targets/v4.6/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v4.6/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v4.6/Microsoft.Portable.VisualBasic.targets \
+       data/Portable/Targets/v5.0/Microsoft.Portable.Common.targets \
+       data/Portable/Targets/v5.0/Microsoft.Portable.CSharp.targets \
+       data/Portable/Targets/v5.0/Microsoft.Portable.VisualBasic.targets \
+       "data/Portable/Frameworks/v5.0/.NET Framework 4.6.xml" \
+       "data/Portable/Frameworks/v5.0/ASP.NET Core 1.0.xml" \
+       "data/Portable/Frameworks/v5.0/FrameworkList.xml" \
+       "data/Portable/Frameworks/v5.0/Windows Universal 10.0.xml" \
        frameworks/net_2.0.xml \
        frameworks/net_3.0.xml \
        frameworks/net_3.5.xml \
index d9f2d5ed386078c4bb96df1b2105fd4c2108e41a..cd1f0d86f65ba7b22e83d0d21d6c9a4135c68a31 100644 (file)
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FileList  Name=".NET Framework 4.5.1" TargetFrameworkDirectory="..\..\..\..\4.5-api">
+<FileList  Name=".NET Framework 4.5.1" TargetFrameworkDirectory="..\..\..\..\4.5.1-api">
 </FileList>
index bf92045249c3b7d3984a08146f54ce51756e5041..1eab465c6adf9f283ebe731569a9b02a1032753d 100644 (file)
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FileList  Name=".NET Framework 4.5.2" TargetFrameworkDirectory="..\..\..\..\4.5-api">
+<FileList  Name=".NET Framework 4.5.2" TargetFrameworkDirectory="..\..\..\..\4.5.2-api">
 </FileList>
index 9fa1fda25ed8f9845567b1cef1fe13f4449616f6..90dd7771941bfeeefed51637d2bc66e4be51fa8f 100644 (file)
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FileList  Name=".NET Framework 4.6.1" TargetFrameworkDirectory="..\..\..\..\4.5">
+<FileList  Name=".NET Framework 4.6.1" TargetFrameworkDirectory="..\..\..\..\4.6.1-api">
 </FileList>
index 2865ecb622b78bda4ecf283011be8ae987356adc..ba7d9f325697c5272cd695b4d4756f2001c306cd 100644 (file)
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FileList  Name=".NET Framework 4.6.2" TargetFrameworkDirectory="..\..\..\..\4.5">
+<FileList  Name=".NET Framework 4.6.2" TargetFrameworkDirectory="..\..\..\..\4.6.2-api">
 </FileList>
index a2ba03d987b2de0c3222c5a04b0b6e155d09a6a1..191215d23bfe96380212cb20c7cad41cc11c1789 100644 (file)
@@ -1,3 +1,3 @@
 <?xml version="1.0" encoding="utf-8"?>
-<FileList  Name=".NET Framework 4.6" TargetFrameworkDirectory="..\..\..\..\4.5">
+<FileList  Name=".NET Framework 4.6" TargetFrameworkDirectory="..\..\..\..\4.6-api">
 </FileList>
index c8ef14eaeed3dd86d814920839c14dc6ddd56398..cafb55618910fee90f6ffbdb45ae51ad053cea12 100644 (file)
 <opcode name="mono_lddomain" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x19" flow="next" />
 <opcode name="mono_atomic_store_i4" input="PopI+PopI" output="Push0" args="InlineI" o1="0xF0" o2="0x1A" flow="next" />
 <opcode name="mono_get_last_error" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x1B" flow="next" />
+<opcode name="mono_get_rgctx_arg" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x1C" flow="next" />
 </opdesc>
index fca2448151a9771b1a91e6fed9d4b130147559b1..91e8924febc18e66763e669964aea5d8352ab2c5 100644 (file)
@@ -320,6 +320,7 @@ OPDEF(CEE_MONO_CALLI_EXTRA_ARG, "mono_calli_extra_arg", VarPop, VarPush, InlineS
 OPDEF(CEE_MONO_LDDOMAIN, "mono_lddomain", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x19, NEXT)
 OPDEF(CEE_MONO_ATOMIC_STORE_I4, "mono_atomic_store_i4", PopI+PopI, Push0, InlineI, X, 2, 0xF0, 0x1A, NEXT)
 OPDEF(CEE_MONO_GET_LAST_ERROR, "mono_get_last_error", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x1B, NEXT)
+OPDEF(CEE_MONO_GET_RGCTX_ARG, "mono_get_rgctx_arg", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x1C, NEXT)
 #ifndef OPALIAS
 #define _MONO_CIL_OPALIAS_DEFINED_
 #define OPALIAS(a,s,r)
index 599651b1368b78f6c6770ff5742d1c6d83495c81..4c29af97bc9773c514f7a3886fd6ceff755ec6d5 100644 (file)
@@ -29,7 +29,7 @@
 #include <mono/metadata/class-internals.h>
 #include <mono/metadata/object-internals.h>
 #include <mono/metadata/loader.h>
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/w32handle.h>
 #include <mono/utils/bsearch.h>
@@ -1844,22 +1844,25 @@ load_filter (const char* filename)
 
 
 static gboolean
-try_load_from (MonoAssembly **assembly, const gchar *path1, const gchar *path2,
-                                       const gchar *path3, const gchar *path4, gboolean refonly)
+try_load_from (MonoAssembly **assembly,
+              const gchar *path1, const gchar *path2,
+              const gchar *path3, const gchar *path4, gboolean refonly,
+              MonoAssemblyCandidatePredicate predicate, gpointer user_data)
 {
        gchar *fullpath;
 
        *assembly = NULL;
        fullpath = g_build_filename (path1, path2, path3, path4, NULL);
        if (g_file_test (fullpath, G_FILE_TEST_IS_REGULAR))
-               *assembly = mono_assembly_open_full (fullpath, NULL, refonly);
+               *assembly = mono_assembly_open_predicate (fullpath, refonly, FALSE, predicate, user_data, NULL);
 
        g_free (fullpath);
        return (*assembly != NULL);
 }
 
 static MonoAssembly *
-real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolean refonly)
+real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolean refonly,
+          MonoAssemblyCandidatePredicate predicate, gpointer user_data)
 {
        MonoAssembly *result = NULL;
        gchar **path;
@@ -1883,22 +1886,22 @@ real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolea
                /* See test cases in bug #58992 and bug #57710 */
                /* 1st try: [culture]/[name].dll (culture may be empty) */
                strcpy (filename + len - 4, ".dll");
-               if (try_load_from (&result, *path, local_culture, "", filename, refonly))
+               if (try_load_from (&result, *path, local_culture, "", filename, refonly, predicate, user_data))
                        break;
 
                /* 2nd try: [culture]/[name].exe (culture may be empty) */
                strcpy (filename + len - 4, ".exe");
-               if (try_load_from (&result, *path, local_culture, "", filename, refonly))
+               if (try_load_from (&result, *path, local_culture, "", filename, refonly, predicate, user_data))
                        break;
 
                /* 3rd try: [culture]/[name]/[name].dll (culture may be empty) */
                strcpy (filename + len - 4, ".dll");
-               if (try_load_from (&result, *path, local_culture, name, filename, refonly))
+               if (try_load_from (&result, *path, local_culture, name, filename, refonly, predicate, user_data))
                        break;
 
                /* 4th try: [culture]/[name]/[name].exe (culture may be empty) */
                strcpy (filename + len - 4, ".exe");
-               if (try_load_from (&result, *path, local_culture, name, filename, refonly))
+               if (try_load_from (&result, *path, local_culture, name, filename, refonly, predicate, user_data))
                        break;
        }
 
@@ -1918,7 +1921,7 @@ monodis_preload (MonoAssemblyName *aname,
        gboolean refonly = GPOINTER_TO_UINT (user_data);
 
        if (assemblies_path && assemblies_path [0] != NULL) {
-               result = real_load (assemblies_path, aname->culture, aname->name, refonly);
+               result = real_load (assemblies_path, aname->culture, aname->name, refonly, NULL, NULL);
        }
 
        return result;
index 70f3f6e4ced663289b1a5f2820a367ff52f1b53f..80b6ad44458909157f645beedfa90e017d94ce76 100755 (executable)
@@ -1,5 +1,6 @@
-/*
- * util.c: Assorted utilities for the disassembler
+/**
+ * \file
+ * Assorted utilities for the disassembler
  *
  * Author:
  *   Miguel de Icaza (miguel@ximian.com)
@@ -19,9 +20,8 @@
 #endif
 
 /**
- * map:
- * @code: code to lookup in table
- * @table: table to decode code
+ * \param code code to lookup in table
+ * \param table table to decode code
  *
  * Warning: returns static buffer.
  */
@@ -37,9 +37,8 @@ map (guint32 code, dis_map_t *table)
 }
 
 /**
- * flags:
- * @code: bitfield
- * @table: table to decode bitfield
+ * \param code bitfield
+ * \param table table to decode bitfield
  *
  * Warning: returns static buffer.
  */
index 3f61191b3146cbdf38a3cac5aabd935bc63152ae..b0cdd521743fb30ec9f7c97f5b13e92dcf9e8bde 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2014 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
@@ -8,6 +9,20 @@
 #include <config.h>
 #include <glib.h>
 
+/*
+ * This file defines macros to compute sizes/alignments/field offsets which depend on
+ * the ABI. It is needed during cross compiling since the generated code needs to
+ * contain offsets which correspond to the ABI of the target, not the host.
+ * It defines the following macros:
+ * - MONO_ABI_SIZEOF(type) for every basic type
+ * - MONO_ABI_ALIGNOF(type) for every basic type
+ * - MONO_STRUCT_OFFSET(struct, field) for various runtime structures
+ * When not cross compiling, these correspond to the host ABI (i.e. sizeof/offsetof).
+ * When cross compiling, these are defined in a generated header file which is
+ * generated by the offsets tool in tools/offsets-tool. The name of the file
+ * is given by the --with-cross-offsets= configure argument.
+ */
+
 #define MONO_ABI_ALIGNOF(type) MONO_ALIGN_ ## type
 #define MONO_CURRENT_ABI_ALIGNOF_TYPEDEF(type) typedef struct { char c; type x; } Mono_Align_Struct_ ##type;
 #define MONO_CURRENT_ABI_ALIGNOF(type) ((int)G_STRUCT_OFFSET(Mono_Align_Struct_ ##type, x))
index 63e17e2dded29093b2e5fc254b5a9af500013179..03fed5f64ef36c0886041cbcd73deec4daeb4429 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Appdomain-related icalls.
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 58304b574be437794de04b4d31dce862f031306d..790dc504ed56b80fb71f8b2249a5eb0070eb2531 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * appdomain.c: AppDomain functions
+/**
+ * \file
+ * AppDomain functions
  *
  * Authors:
  *     Dietmar Maurer (dietmar@ximian.com)
@@ -38,7 +39,6 @@
 #include <mono/metadata/appdomain-icalls.h>
 #include <mono/metadata/domain-internals.h>
 #include "mono/metadata/metadata-internals.h"
-#include <mono/metadata/assembly.h>
 #include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/exception.h>
 #include <mono/metadata/exception-internals.h>
 #include <direct.h>
 #endif
 
-/*
- * This is the version number of the corlib-runtime interface. When
- * making changes to this interface (by changing the layout
- * of classes the runtime knows about, changing icall signature or
- * semantics etc), increment this variable. Also increment the
- * pair of this variable in mscorlib in:
- *       mcs/class/corlib/System/Environment.cs
- *
- * Changes which are already detected at runtime, like the addition
- * of icalls, do not require an increment.
- */
-#define MONO_CORLIB_VERSION 164
-
 typedef struct
 {
        int runtime_count;
@@ -243,14 +230,14 @@ create_domain_objects (MonoDomain *domain)
 
 /**
  * mono_runtime_init:
- * @domain: domain returned by mono_init ()
+ * \param domain domain returned by \c mono_init
  *
  * Initialize the core AppDomain: this function will run also some
  * IL initialization code, so it needs the execution engine to be fully 
  * operational.
  *
- * AppDomain.SetupInformation is set up in mono_runtime_exec_main, where
- * we know the entry_assembly.
+ * \c AppDomain.SetupInformation is set up in \c mono_runtime_exec_main, where
+ * we know the \c entry_assembly.
  *
  */
 void
@@ -350,11 +337,9 @@ mono_get_corlib_version (void)
 }
 
 /**
- * mono_check_corlib_version
- *
+ * mono_check_corlib_version:
  * Checks that the corlib that is loaded matches the version of this runtime.
- *
- * Returns: NULL if the runtime will work with the corlib, or a g_malloc
+ * \returns NULL if the runtime will work with the corlib, or a \c g_malloc
  * allocated string with the error otherwise.
  */
 const char*
@@ -375,9 +360,8 @@ mono_check_corlib_version (void)
 
 /**
  * mono_context_init:
- * @domain: The domain where the System.Runtime.Remoting.Context.Context is initialized
- *
- * Initializes the @domain's default System.Runtime.Remoting's Context.
+ * \param domain The domain where the \c System.Runtime.Remoting.Context.Context is initialized
+ * Initializes the \p domain's default \c System.Runtime.Remoting 's Context.
  */
 void
 mono_context_init (MonoDomain *domain)
@@ -407,7 +391,7 @@ mono_context_init_checked (MonoDomain *domain, MonoError *error)
 
 /**
  * mono_runtime_cleanup:
- * @domain: unused.
+ * \param domain unused.
  *
  * Internal routine.
  *
@@ -436,12 +420,18 @@ mono_runtime_cleanup (MonoDomain *domain)
 
 static MonoDomainFunc quit_function = NULL;
 
+/**
+ * mono_install_runtime_cleanup:
+ */
 void
 mono_install_runtime_cleanup (MonoDomainFunc func)
 {
        quit_function = func;
 }
 
+/**
+ * mono_runtime_quit:
+ */
 void
 mono_runtime_quit ()
 {
@@ -451,10 +441,9 @@ mono_runtime_quit ()
 
 /**
  * mono_domain_create_appdomain:
- * @friendly_name: The friendly name of the appdomain to create
- * @configuration_file: The configuration file to initialize the appdomain with
- * 
- * Returns a MonoDomain initialized with the appdomain
+ * \param friendly_name The friendly name of the appdomain to create
+ * \param configuration_file The configuration file to initialize the appdomain with
+ * \returns a \c MonoDomain initialized with the appdomain
  */
 MonoDomain *
 mono_domain_create_appdomain (char *friendly_name, char *configuration_file)
@@ -468,11 +457,11 @@ mono_domain_create_appdomain (char *friendly_name, char *configuration_file)
 
 /**
  * mono_domain_create_appdomain_checked:
- * @friendly_name: The friendly name of the appdomain to create
- * @configuration_file: The configuration file to initialize the appdomain with
- * @error: Set on error.
+ * \param friendly_name The friendly name of the appdomain to create
+ * \param configuration_file The configuration file to initialize the appdomain with
+ * \param error Set on error.
  * 
- * Returns a MonoDomain initialized with the appdomain.  On failure sets @error and returns NULL.
+ * \returns a MonoDomain initialized with the appdomain.  On failure sets \p error and returns NULL.
  */
 MonoDomain *
 mono_domain_create_appdomain_checked (char *friendly_name, char *configuration_file, MonoError *error)
@@ -506,9 +495,9 @@ leave:
 
 /**
  * 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
+ * \param domain \c MonoDomain initialized with the appdomain we want to change
+ * \param base_dir new base directory for the appdomain
+ * \param config_file_name path to the new configuration for the app domain
  *
  * Used to set the system configuration for an appdomain
  *
@@ -663,10 +652,9 @@ leave:
 
 /**
  * mono_domain_has_type_resolve:
- * @domain: application domains being looked up
+ * \param domain application domain being looked up
  *
- * Returns: TRUE if the AppDomain.TypeResolve field has been
- * set.
+ * \returns TRUE if the \c AppDomain.TypeResolve field has been set.
  */
 gboolean
 mono_domain_has_type_resolve (MonoDomain *domain)
@@ -689,16 +677,16 @@ mono_domain_has_type_resolve (MonoDomain *domain)
 
 /**
  * mono_domain_try_type_resolve:
- * @domain: application domainwhere the name where the type is going to be resolved
- * @name: the name of the type to resolve or NULL.
- * @tb: A System.Reflection.Emit.TypeBuilder, used if name is NULL.
+ * \param domain application domainwhere the name where the type is going to be resolved
+ * \param name the name of the type to resolve or NULL.
+ * \param tb A \c System.Reflection.Emit.TypeBuilder, used if name is NULL.
  *
- * This routine invokes the internal System.AppDomain.DoTypeResolve and returns
+ * This routine invokes the internal \c System.AppDomain.DoTypeResolve and returns
  * the assembly that matches name.
  *
- * If @name is null, the value of ((TypeBuilder)tb).FullName is used instead
+ * If \p name is null, the value of \c ((TypeBuilder)tb).FullName is used instead
  *
- * Returns: A MonoReflectionAssembly or NULL if not found
+ * \returns A \c MonoReflectionAssembly or NULL if not found
  */
 MonoReflectionAssembly *
 mono_domain_try_type_resolve (MonoDomain *domain, char *name, MonoObject *tb)
@@ -742,8 +730,7 @@ mono_domain_try_type_resolve_checked (MonoDomain *domain, char *name, MonoObject
 
 /**
  * mono_domain_owns_vtable_slot:
- *
- *  Returns whenever VTABLE_SLOT is inside a vtable which belongs to DOMAIN.
+ * \returns Whether \p vtable_slot is inside a vtable which belongs to \p domain.
  */
 gboolean
 mono_domain_owns_vtable_slot (MonoDomain *domain, gpointer vtable_slot)
@@ -758,15 +745,13 @@ mono_domain_owns_vtable_slot (MonoDomain *domain, gpointer vtable_slot)
 
 /**
  * mono_domain_set:
- * @domain: domain
- * @force: force setting.
+ * \param domain domain
+ * \param force force setting.
  *
- * Set the current appdomain to @domain. If @force is set, set it even
+ * Set the current appdomain to \p domain. If \p force is set, set it even
  * if it is being unloaded.
  *
- * Returns:
- *   TRUE on success;
- *   FALSE if the domain is unloaded
+ * \returns TRUE on success; FALSE if the domain is unloaded
  */
 gboolean
 mono_domain_set (MonoDomain *domain, gboolean force)
@@ -1871,6 +1856,9 @@ mono_make_shadow_copy (const char *filename, MonoError *oerror)
 }
 #endif /* DISABLE_SHADOW_COPY */
 
+/**
+ * mono_domain_from_appdomain:
+ */
 MonoDomain *
 mono_domain_from_appdomain (MonoAppDomain *appdomain_raw)
 {
@@ -1902,9 +1890,11 @@ leave:
 
 
 static gboolean
-try_load_from (MonoAssembly **assembly, const gchar *path1, const gchar *path2,
-                                       const gchar *path3, const gchar *path4,
-                                       gboolean refonly, gboolean is_private)
+try_load_from (MonoAssembly **assembly,
+              const gchar *path1, const gchar *path2,
+              const gchar *path3, const gchar *path4,
+              gboolean refonly, gboolean is_private,
+              MonoAssemblyCandidatePredicate predicate, gpointer user_data)
 {
        gchar *fullpath;
        gboolean found = FALSE;
@@ -1923,14 +1913,14 @@ try_load_from (MonoAssembly **assembly, const gchar *path1, const gchar *path2,
                found = g_file_test (fullpath, G_FILE_TEST_IS_REGULAR);
        
        if (found)
-               *assembly = mono_assembly_open_full (fullpath, NULL, refonly);
+               *assembly = mono_assembly_open_predicate (fullpath, refonly, FALSE, predicate, user_data, NULL);
 
        g_free (fullpath);
        return (*assembly != NULL);
 }
 
 static MonoAssembly *
-real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolean refonly)
+real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolean refonly, MonoAssemblyCandidatePredicate predicate, gpointer user_data)
 {
        MonoAssembly *result = NULL;
        gchar **path;
@@ -1957,22 +1947,22 @@ real_load (gchar **search_path, const gchar *culture, const gchar *name, gboolea
                /* See test cases in bug #58992 and bug #57710 */
                /* 1st try: [culture]/[name].dll (culture may be empty) */
                strcpy (filename + len - 4, ".dll");
-               if (try_load_from (&result, *path, local_culture, "", filename, refonly, is_private))
+               if (try_load_from (&result, *path, local_culture, "", filename, refonly, is_private, predicate, user_data))
                        break;
 
                /* 2nd try: [culture]/[name].exe (culture may be empty) */
                strcpy (filename + len - 4, ".exe");
-               if (try_load_from (&result, *path, local_culture, "", filename, refonly, is_private))
+               if (try_load_from (&result, *path, local_culture, "", filename, refonly, is_private, predicate, user_data))
                        break;
 
                /* 3rd try: [culture]/[name]/[name].dll (culture may be empty) */
                strcpy (filename + len - 4, ".dll");
-               if (try_load_from (&result, *path, local_culture, name, filename, refonly, is_private))
+               if (try_load_from (&result, *path, local_culture, name, filename, refonly, is_private, predicate, user_data))
                        break;
 
                /* 4th try: [culture]/[name]/[name].exe (culture may be empty) */
                strcpy (filename + len - 4, ".exe");
-               if (try_load_from (&result, *path, local_culture, name, filename, refonly, is_private))
+               if (try_load_from (&result, *path, local_culture, name, filename, refonly, is_private, predicate, user_data))
                        break;
        }
 
@@ -1998,11 +1988,19 @@ mono_domain_assembly_preload (MonoAssemblyName *aname,
        set_domain_search_path (domain);
 
        if (domain->search_path && domain->search_path [0] != NULL) {
-               result = real_load (domain->search_path, aname->culture, aname->name, refonly);
+               if (mono_trace_is_traced (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY)) {
+                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "Domain %s search path is:", domain->friendly_name);
+                       for (int i = 0; domain->search_path [i]; i++) {
+                               const char *p = domain->search_path[i];
+                               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "\tpath[%d] = '%s'", i, p);
+                       }
+                       mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_ASSEMBLY, "End of domain %s search path.", domain->friendly_name);                    
+               }
+               result = real_load (domain->search_path, aname->culture, aname->name, refonly, &mono_assembly_candidate_predicate_sn_same_name, aname);
        }
 
        if (result == NULL && assemblies_path && assemblies_path [0] != NULL) {
-               result = real_load (assemblies_path, aname->culture, aname->name, refonly);
+               result = real_load (assemblies_path, aname->culture, aname->name, refonly, &mono_assembly_candidate_predicate_sn_same_name, aname);
        }
 
        return result;
@@ -2056,7 +2054,7 @@ ves_icall_System_Reflection_Assembly_LoadFrom (MonoStringHandle fname, MonoBoole
        if (!is_ok (error))
                goto leave;
        
-       MonoAssembly *ass = mono_assembly_open_a_lot (filename, &status, refOnly, TRUE);
+       MonoAssembly *ass = mono_assembly_open_predicate (filename, refOnly, TRUE, NULL, NULL, &status);
        
        if (!ass) {
                if (status == MONO_IMAGE_IMAGE_INVALID)
@@ -2376,6 +2374,9 @@ ves_icall_System_AppDomain_InternalGetProcessGuid (MonoStringHandle newguid, Mon
        return newguid;
 }
 
+/**
+ * mono_domain_is_unloading:
+ */
 gboolean
 mono_domain_is_unloading (MonoDomain *domain)
 {
@@ -2565,12 +2566,12 @@ failure:
        return 1;
 }
 
-/*
+/**
  * mono_domain_unload:
- * @domain: The domain to unload
+ * \param domain The domain to unload
  *
- *  Unloads an appdomain. Follows the process outlined in the comment
- *  for mono_domain_try_unload.
+ * Unloads an appdomain. Follows the process outlined in the comment
+ * for \c mono_domain_try_unload.
  */
 void
 mono_domain_unload (MonoDomain *domain)
@@ -2591,10 +2592,10 @@ guarded_wait (MonoThreadHandle *thread_handle, guint32 timeout, gboolean alertab
        return result;
 }
 
-/*
+/**
  * mono_domain_unload:
- * @domain: The domain to unload
- * @exc: Exception information
+ * \param domain The domain to unload
+ * \param exc Exception information
  *
  *  Unloads an appdomain. Follows the process outlined in:
  *  http://blogs.gotdotnet.com/cbrumme
index 3a4286c13192f6d0e92dce005c2d33267f95dedd..de0089f737c70a3b6d556bebb1bbfece3379960f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * appdomain.h: AppDomain functions
+/**
+ * \file
+ * AppDomain functions
  *
  * Author:
  *     Dietmar Maurer (dietmar@ximian.com)
index c24e328f33083ff1c3beb8da8736aefe9be59bf7..65dc09f8712bc485f15fb4d5e45bc427f8037be8 100644 (file)
@@ -1,14 +1,41 @@
-/*
+/**
+ * \file
  * Copyright 2015 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
 #ifndef __MONO_METADATA_ASSEMBLY_INTERNALS_H__
 #define __MONO_METADATA_ASSEMBLY_INTERNALS_H__
 
+#include <glib.h>
+
 #include <mono/metadata/assembly.h>
 
 MONO_API MonoImage*    mono_assembly_load_module_checked (MonoAssembly *assembly, uint32_t idx, MonoError *error);
 
 MonoAssembly * mono_assembly_open_a_lot (const char *filename, MonoImageOpenStatus *status, gboolean refonly, gboolean load_from_context);
 
+/* If predicate returns true assembly should be loaded, if false ignore it. */
+typedef gboolean (*MonoAssemblyCandidatePredicate)(MonoAssembly *, gpointer);
+
+MonoAssembly*          mono_assembly_open_predicate (const char *filename,
+                                                    gboolean refonly,
+                                                    gboolean load_from_context,
+                                                    MonoAssemblyCandidatePredicate pred,
+                                                    gpointer user_data,
+                                                    MonoImageOpenStatus *status);
+
+MonoAssembly*          mono_assembly_load_from_predicate (MonoImage *image, const char *fname,
+                                                         gboolean refonly,
+                                                         MonoAssemblyCandidatePredicate pred,
+                                                         gpointer user_data,
+                                                         MonoImageOpenStatus *status);
+
+/* MonoAssemblyCandidatePredicate that compares the assembly name (name, version,
+ * culture, public key token) of the candidate with the wanted name, if the
+ * wanted name has a public key token (if not present, always return true).
+ * Pass the wanted MonoAssemblyName* as the user_data.
+ */
+gboolean
+mono_assembly_candidate_predicate_sn_same_name (MonoAssembly *candidate, gpointer wanted_name);
+
 #endif /* __MONO_METADATA_ASSEMBLY_INTERNALS_H__ */
index a136e34fb3ac95b836e1619a7d118f27f5bdba48..9178bb837d557a1ba439480048a49c1718a94d89 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * assembly.c: Routines for loading assemblies.
+/**
+ * \file
+ * Routines for loading assemblies.
  * 
  * Author:
  *   Miguel de Icaza (miguel@ximian.com)
@@ -251,10 +252,10 @@ encode_public_tok (const guchar *token, gint32 len)
 
 /**
  * mono_public_tokens_are_equal:
- * @pubt1: first public key token
- * @pubt2: second public key token
+ * \param pubt1 first public key token
+ * \param pubt2 second public key token
  *
- * Compare two public key tokens and return #TRUE is they are equal and #FALSE
+ * Compare two public key tokens and return TRUE is they are equal and FALSE
  * otherwise.
  */
 gboolean
@@ -265,13 +266,13 @@ mono_public_tokens_are_equal (const unsigned char *pubt1, const unsigned char *p
 
 /**
  * mono_set_assemblies_path:
- * @path: list of paths that contain directories where Mono will look for assemblies
+ * \param path list of paths that contain directories where Mono will look for assemblies
  *
  * Use this method to override the standard assembly lookup system and
  * override any assemblies coming from the GAC.  This is the method
- * that supports the MONO_PATH variable.
+ * that supports the \c MONO_PATH variable.
  *
- * Notice that MONO_PATH and this method are really a very bad idea as
+ * Notice that \c MONO_PATH and this method are really a very bad idea as
  * it prevents the GAC from working and it prevents the standard
  * resolution mechanisms from working.  Nonetheless, for some debugging
  * situations and bootstrapping setups, this is useful to have. 
@@ -497,15 +498,15 @@ check_policy_versions (MonoAssemblyBindingInfo *info, MonoAssemblyName *name)
 
 /**
  * mono_assembly_names_equal:
- * @l: first assembly
- * @r: second assembly.
+ * \param l first assembly
+ * \param r second assembly.
  *
- * Compares two MonoAssemblyNames and returns whether they are equal.
+ * Compares two \c MonoAssemblyName instances and returns whether they are equal.
  *
  * This compares the names, the cultures, the release version and their
  * public tokens.
  *
- * Returns: TRUE if both assembly names are equal.
+ * \returns TRUE if both assembly names are equal.
  */
 gboolean
 mono_assembly_names_equal (MonoAssemblyName *l, MonoAssemblyName *r)
@@ -534,7 +535,7 @@ mono_assembly_names_equal (MonoAssemblyName *l, MonoAssemblyName *r)
 }
 
 static MonoAssembly *
-load_in_path (const char *basename, const char** search_path, MonoImageOpenStatus *status, MonoBoolean refonly)
+load_in_path (const char *basename, const char** search_path, MonoImageOpenStatus *status, MonoBoolean refonly, MonoAssemblyCandidatePredicate predicate, gpointer user_data)
 {
        int i;
        char *fullpath;
@@ -542,7 +543,7 @@ load_in_path (const char *basename, const char** search_path, MonoImageOpenStatu
 
        for (i = 0; search_path [i]; ++i) {
                fullpath = g_build_filename (search_path [i], basename, NULL);
-               result = mono_assembly_open_full (fullpath, status, refonly);
+               result = mono_assembly_open_predicate (fullpath, refonly, FALSE, predicate, user_data, status);
                g_free (fullpath);
                if (result)
                        return result;
@@ -552,7 +553,7 @@ load_in_path (const char *basename, const char** search_path, MonoImageOpenStatu
 
 /**
  * mono_assembly_setrootdir:
- * @root_dir: The pathname of the root directory where we will locate assemblies
+ * \param root_dir The pathname of the root directory where we will locate assemblies
  *
  * This routine sets the internal default root directory for looking up
  * assemblies.
@@ -601,8 +602,8 @@ mono_native_getrootdir (void)
 
 /**
  * mono_set_dirs:
- * @assembly_dir: the base directory for assemblies
- * @config_dir: the base directory for configuration files
+ * \param assembly_dir the base directory for assemblies
+ * \param config_dir the base directory for configuration files
  *
  * This routine is used internally and by developers embedding
  * the runtime into their own applications.
@@ -922,6 +923,12 @@ mono_assembly_fill_assembly_name_full (MonoImage *image, MonoAssemblyName *aname
        return TRUE;
 }
 
+/**
+ * mono_assembly_fill_assembly_name:
+ * \param image Image
+ * \param aname Name
+ * \returns TRUE if successful
+ */
 gboolean
 mono_assembly_fill_assembly_name (MonoImage *image, MonoAssemblyName *aname)
 {
@@ -930,12 +937,12 @@ mono_assembly_fill_assembly_name (MonoImage *image, MonoAssemblyName *aname)
 
 /**
  * mono_stringify_assembly_name:
- * @aname: the assembly name.
+ * \param aname the assembly name.
  *
- * Convert @aname into its string format. The returned string is dynamically
+ * Convert \p aname into its string format. The returned string is dynamically
  * allocated and should be freed by the caller.
  *
- * Returns: a newly allocated string with a string representation of
+ * \returns a newly allocated string with a string representation of
  * the assembly name.
  */
 char*
@@ -972,7 +979,7 @@ assemblyref_public_tok (MonoImage *image, guint32 key_index, guint32 flags)
 
 /**
  * mono_assembly_addref:
- * @assemnly: the assembly to reference
+ * \param assembly the assembly to reference
  *
  * This routine increments the reference count on a MonoAssembly.
  * The reference count is reduced every time the method mono_assembly_close() is
@@ -1131,6 +1138,16 @@ mono_assembly_remap_version (MonoAssemblyName *aname, MonoAssemblyName *dest_ana
                dest_aname->minor = vset->minor;
                dest_aname->build = vset->build;
                dest_aname->revision = vset->revision;
+               if (current_runtime->public_key_token != NULL &&
+                   dest_aname->public_key_token [0] != 0 &&
+                   !mono_public_tokens_are_equal (dest_aname->public_key_token, (const mono_byte *)current_runtime->public_key_token)) {
+                       mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_ASSEMBLY,
+                                   "The request for assembly name '%s' with PublicKeyToken=%s was remapped to PublicKeyToken=%s",
+                                   dest_aname->name,
+                                   dest_aname->public_key_token,
+                                   current_runtime->public_key_token);
+                       memcpy (dest_aname->public_key_token, current_runtime->public_key_token, MONO_PUBLIC_KEY_TOKEN_LENGTH);
+               }
                if (vmap->new_assembly_name != NULL) {
                        dest_aname->name = vmap->new_assembly_name;
                        mono_trace (G_LOG_LEVEL_WARNING, MONO_TRACE_ASSEMBLY,
@@ -1147,11 +1164,11 @@ mono_assembly_remap_version (MonoAssemblyName *aname, MonoAssemblyName *dest_ana
 
 /**
  * mono_assembly_get_assemblyref:
- * @image: pointer to the MonoImage to extract the information from.
- * @index: index to the assembly reference in the image.
- * @aname: pointer to a `MonoAssemblyName` that will hold the returned value.
+ * \param image pointer to the \c MonoImage to extract the information from.
+ * \param index index to the assembly reference in the image.
+ * \param aname pointer to a \c MonoAssemblyName that will hold the returned value.
  *
- * Fills out the @aname with the assembly name of the @index assembly reference in @image.
+ * Fills out the \p aname with the assembly name of the \p index assembly reference in \p image.
  */
 void
 mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *aname)
@@ -1184,6 +1201,9 @@ mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *an
        }
 }
 
+/**
+ * mono_assembly_load_reference:
+ */
 void
 mono_assembly_load_reference (MonoImage *image, int index)
 {
@@ -1294,11 +1314,11 @@ mono_assembly_load_reference (MonoImage *image, int index)
 
 /**
  * mono_assembly_load_references:
- * @image: 
- * @status:
- * @deprecated: There is no reason to use this method anymore, it does nothing
+ * \param image
+ * \param status
+ * \deprecated There is no reason to use this method anymore, it does nothing
  *
- * This method is now a no-op, it does nothing other than setting the @status to #MONO_IMAGE_OK
+ * This method is now a no-op, it does nothing other than setting the \p status to \c MONO_IMAGE_OK
  */
 void
 mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus *status)
@@ -1316,6 +1336,9 @@ struct AssemblyLoadHook {
 
 AssemblyLoadHook *assembly_load_hook = NULL;
 
+/**
+ * mono_assembly_invoke_load_hook:
+ */
 void
 mono_assembly_invoke_load_hook (MonoAssembly *ass)
 {
@@ -1326,6 +1349,9 @@ mono_assembly_invoke_load_hook (MonoAssembly *ass)
        }
 }
 
+/**
+ * mono_install_assembly_load_hook:
+ */
 void
 mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, gpointer user_data)
 {
@@ -1401,6 +1427,9 @@ mono_assembly_invoke_search_hook_internal (MonoAssemblyName *aname, MonoAssembly
        return NULL;
 }
 
+/**
+ * mono_assembly_invoke_search_hook:
+ */
 MonoAssembly*
 mono_assembly_invoke_search_hook (MonoAssemblyName *aname)
 {
@@ -1423,6 +1452,9 @@ mono_install_assembly_search_hook_internal (MonoAssemblySearchFunc func, gpointe
        assembly_search_hook = hook;
 }
 
+/**
+ * mono_install_assembly_search_hook:
+ */
 void          
 mono_install_assembly_search_hook (MonoAssemblySearchFunc func, gpointer user_data)
 {
@@ -1440,12 +1472,18 @@ free_assembly_search_hooks (void)
        }
 }
 
+/**
+ * mono_install_assembly_refonly_search_hook:
+ */
 void
 mono_install_assembly_refonly_search_hook (MonoAssemblySearchFunc func, gpointer user_data)
 {
        mono_install_assembly_search_hook_internal (func, user_data, TRUE, FALSE);
 }
 
+/**
+ * mono_install_assembly_postload_search_hook:
+ */
 void          
 mono_install_assembly_postload_search_hook (MonoAssemblySearchFunc func, gpointer user_data)
 {
@@ -1498,6 +1536,9 @@ invoke_assembly_refonly_preload_hook (MonoAssemblyName *aname, gchar **assemblie
        return NULL;
 }
 
+/**
+ * mono_install_assembly_preload_hook:
+ */
 void
 mono_install_assembly_preload_hook (MonoAssemblyPreLoadFunc func, gpointer user_data)
 {
@@ -1512,6 +1553,9 @@ mono_install_assembly_preload_hook (MonoAssemblyPreLoadFunc func, gpointer user_
        assembly_preload_hook = hook;
 }
 
+/**
+ * mono_install_assembly_refonly_preload_hook:
+ */
 void
 mono_install_assembly_refonly_preload_hook (MonoAssemblyPreLoadFunc func, gpointer user_data)
 {
@@ -1604,10 +1648,10 @@ absolute_dir (const gchar *filename)
 
 /** 
  * mono_assembly_open_from_bundle:
- * @filename: Filename requested
- * @status: return status code
+ * \param filename Filename requested
+ * \param status return status code
  *
- * This routine tries to open the assembly specified by `filename' from the
+ * This routine tries to open the assembly specified by \p filename from the
  * defined bundles, if found, returns the MonoImage for it, if not found
  * returns NULL
  */
@@ -1650,28 +1694,28 @@ mono_assembly_open_from_bundle (const char *filename, MonoImageOpenStatus *statu
 }
 
 /**
- * mono_assemblies_open_full:
- * @filename: the file to load
- * @status: return status code 
- * @refonly: Whether this assembly is being opened in "reflection-only" mode.
-* 
- * This loads an assembly from the specified @filename.   The @filename allows
- * a local URL (starting with a file:// prefix).  If a file prefix is used, the
+ * mono_assembly_open_full:
+ * \param filename the file to load
+ * \param status return status code 
+ * \param refonly Whether this assembly is being opened in "reflection-only" mode.
+ *
+ * This loads an assembly from the specified \p filename. The \p filename allows
+ * a local URL (starting with a \c file:// prefix).  If a file prefix is used, the
  * filename is interpreted as a URL, and the filename is URL-decoded.   Otherwise the file
  * is treated as a local path.
  *
  * First, an attempt is made to load the assembly from the bundled executable (for those
- * deployments that have been done with the `mkbundle` tool or for scenarios where the
+ * deployments that have been done with the \c mkbundle tool or for scenarios where the
  * assembly has been registered as an embedded assembly).   If this is not the case, then
  * the assembly is loaded from disk using `api:mono_image_open_full`.
  *
  * If the pointed assembly does not live in the Global Assembly Cache, a shadow copy of
  * the assembly is made.
  *
- * If @refonly is set to true, then the assembly is loaded purely for inspection with
- * the `System.Reflection` API.
+ * If \p refonly is set to true, then the assembly is loaded purely for inspection with
+ * the \c System.Reflection API.
  *
- * Returns: NULL on error, with the @status set to an error code, or a pointer
+ * \returns NULL on error, with the \p status set to an error code, or a pointer
  * to the assembly.
  */
 MonoAssembly *
@@ -1683,7 +1727,16 @@ mono_assembly_open_full (const char *filename, MonoImageOpenStatus *status, gboo
 MonoAssembly *
 mono_assembly_open_a_lot (const char *filename, MonoImageOpenStatus *status, gboolean refonly, gboolean load_from_context)
 {
+       return mono_assembly_open_predicate (filename, refonly, load_from_context, NULL, NULL, status);
+}
 
+MonoAssembly *
+mono_assembly_open_predicate (const char *filename, gboolean refonly,
+                             gboolean load_from_context,
+                             MonoAssemblyCandidatePredicate predicate,
+                             gpointer user_data,
+                             MonoImageOpenStatus *status)
+{
        MonoImage *image;
        MonoAssembly *ass;
        MonoImageOpenStatus def_status;
@@ -1776,7 +1829,7 @@ mono_assembly_open_a_lot (const char *filename, MonoImageOpenStatus *status, gbo
                return image->assembly;
        }
 
-       ass = mono_assembly_load_from_full (image, fname, status, refonly);
+       ass = mono_assembly_load_from_predicate (image, fname, refonly, predicate, user_data, status);
 
        if (ass) {
                if (!loaded_from_bundle)
@@ -1802,7 +1855,7 @@ free_item (gpointer val, gpointer user_data)
 
 /**
  * mono_assembly_load_friends:
- * @ass: an assembly
+ * \param ass an assembly
  *
  * Load the list of friend assemblies that are allowed to access
  * the assembly's internal types and members. They are stored as assembly
@@ -1906,11 +1959,11 @@ has_reference_assembly_attribute_iterator (MonoImage *image, guint32 typeref_sco
 
 /**
  * mono_assembly_has_reference_assembly_attribute:
- * @assembly: a MonoAssembly
- * @error: set on error.
+ * \param assembly a MonoAssembly
+ * \param error set on error.
  *
- * Returns TRUE if @assembly has the System.Runtime.CompilerServices.ReferenceAssemblyAttribute set.
- * On error returns FALSE and sets @error.
+ * \returns TRUE if \p assembly has the \c System.Runtime.CompilerServices.ReferenceAssemblyAttribute set.
+ * On error returns FALSE and sets \p error.
  */
 gboolean
 mono_assembly_has_reference_assembly_attribute (MonoAssembly *assembly, MonoError *error)
@@ -1931,54 +1984,64 @@ mono_assembly_has_reference_assembly_attribute (MonoAssembly *assembly, MonoErro
 
 /**
  * mono_assembly_open:
- * @filename: Opens the assembly pointed out by this name
- * @status: return status code
+ * \param filename Opens the assembly pointed out by this name
+ * \param status return status code
  *
- * This loads an assembly from the specified @filename.   The @filename allows
- * a local URL (starting with a file:// prefix).  If a file prefix is used, the
+ * This loads an assembly from the specified \p filename. The \p filename allows
+ * a local URL (starting with a \c file:// prefix).  If a file prefix is used, the
  * filename is interpreted as a URL, and the filename is URL-decoded.   Otherwise the file
  * is treated as a local path.
  *
  * First, an attempt is made to load the assembly from the bundled executable (for those
- * deployments that have been done with the `mkbundle` tool or for scenarios where the
+ * deployments that have been done with the \c mkbundle tool or for scenarios where the
  * assembly has been registered as an embedded assembly).   If this is not the case, then
  * the assembly is loaded from disk using `api:mono_image_open_full`.
  *
  * If the pointed assembly does not live in the Global Assembly Cache, a shadow copy of
  * the assembly is made.
  *
- * Return: a pointer to the MonoAssembly if @filename contains a valid
+ * \returns a pointer to the \c MonoAssembly if \p filename contains a valid
  * assembly or NULL on error.  Details about the error are stored in the
- * @status variable.
+ * \p status variable.
  */
 MonoAssembly *
 mono_assembly_open (const char *filename, MonoImageOpenStatus *status)
 {
-       return mono_assembly_open_full (filename, status, FALSE);
+       return mono_assembly_open_predicate (filename, FALSE, FALSE, NULL, NULL, status);
 }
 
 /**
  * mono_assembly_load_from_full:
- * @image: Image to load the assembly from
- * @fname: assembly name to associate with the assembly
- * @status: returns the status condition
- * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+ * \param image Image to load the assembly from
+ * \param fname assembly name to associate with the assembly
+ * \param status returns the status condition
+ * \param refonly Whether this assembly is being opened in "reflection-only" mode.
  *
- * If the provided @image has an assembly reference, it will process the given
+ * If the provided \p image has an assembly reference, it will process the given
  * image as an assembly with the given name.
  *
  * Most likely you want to use the `api:mono_assembly_load_full` method instead.
  *
- * Returns: A valid pointer to a `MonoAssembly*` on success and the @status will be
- * set to #MONO_IMAGE_OK;  or NULL on error.
+ * Returns: A valid pointer to a \c MonoAssembly* on success and the \p status will be
+ * set to \c MONO_IMAGE_OK;  or NULL on error.
  *
- * If there is an error loading the assembly the @status will indicate the
- * reason with @status being set to `MONO_IMAGE_INVALID` if the
+ * If there is an error loading the assembly the \p status will indicate the
+ * reason with \p status being set to \c MONO_IMAGE_INVALID if the
  * image did not contain an assembly reference table.
  */
 MonoAssembly *
 mono_assembly_load_from_full (MonoImage *image, const char*fname, 
                              MonoImageOpenStatus *status, gboolean refonly)
+{
+       return mono_assembly_load_from_predicate (image, fname, refonly, NULL, NULL, status);
+}
+
+MonoAssembly *
+mono_assembly_load_from_predicate (MonoImage *image, const char *fname,
+                                  gboolean refonly,
+                                  MonoAssemblyCandidatePredicate predicate,
+                                  gpointer user_data,
+                                  MonoImageOpenStatus *status)
 {
        MonoAssembly *ass, *ass2;
        char *base_dir;
@@ -2068,6 +2131,15 @@ mono_assembly_load_from_full (MonoImage *image, const char*fname,
                mono_error_cleanup (&refasm_error);
        }
 
+       if (predicate && !predicate (ass, user_data)) {
+               mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate returned FALSE, skipping '%s' (%s)\n", ass->aname.name, image->name);
+               g_free (ass);
+               g_free (base_dir);
+               mono_image_close (image);
+               *status = MONO_IMAGE_IMAGE_INVALID;
+               return NULL;
+       }
+
        mono_assemblies_lock ();
 
        if (image->assembly) {
@@ -2105,22 +2177,22 @@ mono_assembly_load_from_full (MonoImage *image, const char*fname,
 
 /**
  * mono_assembly_load_from:
- * @image: Image to load the assembly from
- * @fname: assembly name to associate with the assembly
- * @status: return status code
+ * \param image Image to load the assembly from
+ * \param fname assembly name to associate with the assembly
+ * \param status return status code
  *
- * If the provided @image has an assembly reference, it will process the given
+ * If the provided \p image has an assembly reference, it will process the given
  * image as an assembly with the given name.
  *
  * Most likely you want to use the `api:mono_assembly_load_full` method instead.
  *
  * This is equivalent to calling `api:mono_assembly_load_from_full` with the
- * @refonly parameter set to FALSE.
- * Returns: A valid pointer to a `MonoAssembly*` on success and the @status will be
- * set to #MONO_IMAGE_OK;  or NULL on error.
+ * \p refonly parameter set to FALSE.
+ * \returns A valid pointer to a \c MonoAssembly* on success and then \p status will be
+ * set to \c MONO_IMAGE_OK; or NULL on error.
  *
- * If there is an error loading the assembly the @status will indicate the
- * reason with @status being set to `MONO_IMAGE_INVALID` if the
+ * If there is an error loading the assembly the \p status will indicate the
+ * reason with \p status being set to \c MONO_IMAGE_INVALID if the
  * image did not contain an assembly reference table.
  
  */
@@ -2133,7 +2205,7 @@ mono_assembly_load_from (MonoImage *image, const char *fname,
 
 /**
  * mono_assembly_name_free:
- * @aname: assembly name to free
+ * \param aname assembly name to free
  * 
  * Frees the provided assembly name object.
  * (it does not frees the object itself, only the name members).
@@ -2549,13 +2621,13 @@ unquote (const char *str)
 
 /**
  * mono_assembly_name_parse:
- * @name: name to parse
- * @aname: the destination assembly name
+ * \param name name to parse
+ * \param aname the destination assembly name
  * 
  * Parses an assembly qualified type name and assigns the name,
  * version, culture and token to the provided assembly name object.
  *
- * Returns: TRUE if the name could be parsed.
+ * \returns TRUE if the name could be parsed.
  */
 gboolean
 mono_assembly_name_parse (const char *name, MonoAssemblyName *aname)
@@ -2565,12 +2637,12 @@ mono_assembly_name_parse (const char *name, MonoAssemblyName *aname)
 
 /**
  * mono_assembly_name_new:
- * @name: name to parse
+ * \param name name to parse
  *
- * Allocate a new MonoAssemblyName and fill its values from the
- * passed @name.
+ * Allocate a new \c MonoAssemblyName and fill its values from the
+ * passed \p name.
  *
- * Returns: a newly allocated structure or NULL if there was any failure.
+ * \returns a newly allocated structure or NULL if there was any failure.
  */
 MonoAssemblyName*
 mono_assembly_name_new (const char *name)
@@ -2582,18 +2654,27 @@ mono_assembly_name_new (const char *name)
        return NULL;
 }
 
+/**
+ * mono_assembly_name_get_name:
+ */
 const char*
 mono_assembly_name_get_name (MonoAssemblyName *aname)
 {
        return aname->name;
 }
 
+/**
+ * mono_assembly_name_get_culture:
+ */
 const char*
 mono_assembly_name_get_culture (MonoAssemblyName *aname)
 {
        return aname->culture;
 }
 
+/**
+ * mono_assembly_name_get_pubkeytoken:
+ */
 mono_byte*
 mono_assembly_name_get_pubkeytoken (MonoAssemblyName *aname)
 {
@@ -2602,6 +2683,9 @@ mono_assembly_name_get_pubkeytoken (MonoAssemblyName *aname)
        return NULL;
 }
 
+/**
+ * mono_assembly_name_get_version:
+ */
 uint16_t
 mono_assembly_name_get_version (MonoAssemblyName *aname, uint16_t *minor, uint16_t *build, uint16_t *revision)
 {
@@ -2679,7 +2763,7 @@ probe_for_partial_name (const char *basepath, const char *fullname, MonoAssembly
        if (fullpath == NULL)
                return NULL;
        else {
-               MonoAssembly *res = mono_assembly_open (fullpath, status);
+               MonoAssembly *res = mono_assembly_open_predicate (fullpath, FALSE, FALSE, NULL, NULL, status);
                g_free (fullpath);
                return res;
        }
@@ -2687,20 +2771,20 @@ probe_for_partial_name (const char *basepath, const char *fullname, MonoAssembly
 
 /**
  * mono_assembly_load_with_partial_name:
- * @name: an assembly name that is then parsed by `api:mono_assembly_name_parse`.
- * @status: return status code
+ * \param name an assembly name that is then parsed by `api:mono_assembly_name_parse`.
+ * \param status return status code
  *
- * Loads a Mono Assembly from a name.  The name is parsed using `api:mono_assembly_name_parse`,
+ * Loads a \c MonoAssembly from a name.  The name is parsed using `api:mono_assembly_name_parse`,
  * so it might contain a qualified type name, version, culture and token.
  *
  * This will load the assembly from the file whose name is derived from the assembly name
- * by appending the .dll extension.
+ * by appending the \c .dll extension.
  *
  * The assembly is loaded from either one of the extra Global Assembly Caches specified
- * by the extra GAC paths (specified by the `MONO_GAC_PREFIX` environment variable) or
+ * by the extra GAC paths (specified by the \c MONO_GAC_PREFIX environment variable) or
  * if that fails from the GAC.
  *
- * Returns: NULL on failure, or a pointer to a MonoAssembly on success.   
+ * \returns NULL on failure, or a pointer to a \c MonoAssembly on success.
  */
 MonoAssembly*
 mono_assembly_load_with_partial_name (const char *name, MonoImageOpenStatus *status)
@@ -2972,6 +3056,12 @@ assembly_binding_info_parsed (MonoAssemblyBindingInfo *info, void *user_data)
        if (!domain)
                return;
 
+       if (info->has_new_version && mono_assembly_is_problematic_version (info->name, info->new_version.major, info->new_version.minor, info->new_version.build, info->new_version.revision)) {
+               mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Discarding assembly binding to problematic version %s v%d.%d.%d.%d",
+                       info->name, info->new_version.major, info->new_version.minor, info->new_version.build, info->new_version.revision);
+               return;
+       }
+
        for (tmp = domain->assembly_bindings; tmp; tmp = tmp->next) {
                info_tmp = (MonoAssemblyBindingInfo *)tmp->data;
                if (strcmp (info->name, info_tmp->name) == 0 && info_versions_equal (info, info_tmp))
@@ -3151,7 +3241,7 @@ mono_assembly_apply_binding (MonoAssemblyName *aname, MonoAssemblyName *dest_nam
 /**
  * mono_assembly_load_from_gac
  *
- * @aname: The assembly name object
+ * \param aname The assembly name object
  */
 static MonoAssembly*
 mono_assembly_load_from_gac (MonoAssemblyName *aname,  gchar *filename, MonoImageOpenStatus *status, MonoBoolean refonly)
@@ -3196,7 +3286,7 @@ mono_assembly_load_from_gac (MonoAssemblyName *aname,  gchar *filename, MonoImag
                paths = extra_gac_paths;
                while (!result && *paths) {
                        fullpath = g_build_path (G_DIR_SEPARATOR_S, *paths, "lib", "mono", "gac", subpath, NULL);
-                       result = mono_assembly_open_full (fullpath, status, refonly);
+                       result = mono_assembly_open_predicate (fullpath, refonly, FALSE, NULL, NULL, status);
                        g_free (fullpath);
                        paths++;
                }
@@ -3210,7 +3300,7 @@ mono_assembly_load_from_gac (MonoAssemblyName *aname,  gchar *filename, MonoImag
 
        fullpath = g_build_path (G_DIR_SEPARATOR_S, mono_assembly_getrootdir (),
                        "mono", "gac", subpath, NULL);
-       result = mono_assembly_open_full (fullpath, status, refonly);
+       result = mono_assembly_open_predicate (fullpath, refonly, FALSE, NULL, NULL, status);
        g_free (fullpath);
 
        if (result)
@@ -3259,7 +3349,7 @@ mono_assembly_load_corlib (const MonoRuntimeInfo *runtime, MonoImageOpenStatus *
 
        // This unusual directory layout can occur if mono is being built and run out of its own source repo
        if (assemblies_path) { // Custom assemblies path set via MONO_PATH or mono_set_assemblies_path
-               corlib = load_in_path ("mscorlib.dll", (const char**)assemblies_path, status, FALSE);
+               corlib = load_in_path ("mscorlib.dll", (const char**)assemblies_path, status, FALSE, NULL, NULL);
                if (corlib)
                        goto return_corlib_and_facades;
        }
@@ -3267,13 +3357,13 @@ mono_assembly_load_corlib (const MonoRuntimeInfo *runtime, MonoImageOpenStatus *
        /* Normal case: Load corlib from mono/<version> */
        corlib_file = g_build_filename ("mono", runtime->framework_version, "mscorlib.dll", NULL);
        if (assemblies_path) { // Custom assemblies path
-               corlib = load_in_path (corlib_file, (const char**)assemblies_path, status, FALSE);
+               corlib = load_in_path (corlib_file, (const char**)assemblies_path, status, FALSE, NULL, NULL);
                if (corlib) {
                        g_free (corlib_file);
                        goto return_corlib_and_facades;
                }
        }
-       corlib = load_in_path (corlib_file, default_path, status, FALSE);
+       corlib = load_in_path (corlib_file, default_path, status, FALSE, NULL, NULL);
        g_free (corlib_file);
 
 return_corlib_and_facades:
@@ -3295,6 +3385,44 @@ prevent_reference_assembly_from_running (MonoAssembly* candidate, gboolean refon
        return candidate;
 }
 
+gboolean
+mono_assembly_candidate_predicate_sn_same_name (MonoAssembly *candidate, gpointer ud)
+{
+       MonoAssemblyName *wanted_name = (MonoAssemblyName*)ud;
+       MonoAssemblyName *candidate_name = &candidate->aname;
+
+       g_assert (wanted_name != NULL);
+       g_assert (candidate_name != NULL);
+
+       if (mono_trace_is_traced (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY)) {
+               char * s = mono_stringify_assembly_name (wanted_name);
+               mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: wanted = %s\n", s);
+               g_free (s);
+               s = mono_stringify_assembly_name (candidate_name);
+               mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate = %s\n", s);
+               g_free (s);
+       }
+
+       /* No wanted token, bail. */
+       if (0 == wanted_name->public_key_token [0]) {
+               mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: wanted has no token, returning TRUE\n");
+               return TRUE;
+       }
+
+       if (0 == candidate_name->public_key_token [0]) {
+               mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate has no token, returning FALSE\n");
+               return FALSE;
+       }
+
+
+       gboolean result = mono_assembly_names_equal (wanted_name, candidate_name);
+
+       mono_trace (G_LOG_LEVEL_INFO, MONO_TRACE_ASSEMBLY, "Predicate: candidate and wanted names %s\n",
+                   result ? "match, returning TRUE" : "don't match, returning FALSE");
+       return result;
+
+}
+
 
 MonoAssembly*
 mono_assembly_load_full_nosearch (MonoAssemblyName *aname, 
@@ -3311,7 +3439,7 @@ mono_assembly_load_full_nosearch (MonoAssemblyName *aname,
        int len;
 
        aname = mono_assembly_remap_version (aname, &maped_aname);
-       
+
        /* Reflection only assemblies don't get assembly binding */
        if (!refonly)
                aname = mono_assembly_apply_binding (aname, &maped_name_pp);
@@ -3352,7 +3480,7 @@ mono_assembly_load_full_nosearch (MonoAssemblyName *aname,
 
                if (basedir) {
                        fullpath = g_build_filename (basedir, filename, NULL);
-                       result = mono_assembly_open_full (fullpath, status, refonly);
+                       result = mono_assembly_open_predicate (fullpath, refonly, FALSE, NULL, NULL, status);
                        g_free (fullpath);
                        if (result) {
                                result->in_gac = FALSE;
@@ -3361,7 +3489,7 @@ mono_assembly_load_full_nosearch (MonoAssemblyName *aname,
                        }
                }
 
-               result = load_in_path (filename, default_path, status, refonly);
+               result = load_in_path (filename, default_path, status, refonly, NULL, NULL);
                if (result)
                        result->in_gac = FALSE;
                g_free (filename);
@@ -3387,19 +3515,19 @@ mono_assembly_load_full_internal (MonoAssemblyName *aname, MonoAssembly *request
 
 /**
  * mono_assembly_load_full:
- * @aname: A MonoAssemblyName with the assembly name to load.
- * @basedir: A directory to look up the assembly at.
- * @status: a pointer to a MonoImageOpenStatus to return the status of the load operation
- * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+ * \param aname A MonoAssemblyName with the assembly name to load.
+ * \param basedir A directory to look up the assembly at.
+ * \param status a pointer to a MonoImageOpenStatus to return the status of the load operation
+ * \param refonly Whether this assembly is being opened in "reflection-only" mode.
  *
- * Loads the assembly referenced by @aname, if the value of @basedir is not NULL, it
+ * Loads the assembly referenced by \p aname, if the value of \p basedir is not NULL, it
  * attempts to load the assembly from that directory before probing the standard locations.
  *
- * If the assembly is being opened in reflection-only mode (@refonly set to TRUE) then no 
+ * If the assembly is being opened in reflection-only mode (\p refonly set to TRUE) then no 
  * assembly binding takes place.
  *
- * Returns: the assembly referenced by @aname loaded or NULL on error.   On error the
- * value pointed by status is updated with an error code.
+ * \returns the assembly referenced by \p aname loaded or NULL on error. On error the
+ * value pointed by \p status is updated with an error code.
  */
 MonoAssembly*
 mono_assembly_load_full (MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status, gboolean refonly)
@@ -3409,15 +3537,15 @@ mono_assembly_load_full (MonoAssemblyName *aname, const char *basedir, MonoImage
 
 /**
  * mono_assembly_load:
- * @aname: A MonoAssemblyName with the assembly name to load.
- * @basedir: A directory to look up the assembly at.
- * @status: a pointer to a MonoImageOpenStatus to return the status of the load operation
+ * \param aname A MonoAssemblyName with the assembly name to load.
+ * \param basedir A directory to look up the assembly at.
+ * \param status a pointer to a MonoImageOpenStatus to return the status of the load operation
  *
- * Loads the assembly referenced by @aname, if the value of @basedir is not NULL, it
+ * Loads the assembly referenced by \p aname, if the value of \p basedir is not NULL, it
  * attempts to load the assembly from that directory before probing the standard locations.
  *
- * Returns: the assembly referenced by @aname loaded or NULL on error.   On error the
- * value pointed by status is updated with an error code.
+ * \returns the assembly referenced by \p aname loaded or NULL on error. On error the
+ * value pointed by \p status is updated with an error code.
  */
 MonoAssembly*
 mono_assembly_load (MonoAssemblyName *aname, const char *basedir, MonoImageOpenStatus *status)
@@ -3427,12 +3555,12 @@ mono_assembly_load (MonoAssemblyName *aname, const char *basedir, MonoImageOpenS
 
 /**
  * mono_assembly_loaded_full:
- * @aname: an assembly to look for.
- * @refonly: Whether this assembly is being opened in "reflection-only" mode.
+ * \param aname an assembly to look for.
+ * \param refonly Whether this assembly is being opened in "reflection-only" mode.
  *
  * This is used to determine if the specified assembly has been loaded
- * Returns: NULL If the given @aname assembly has not been loaded, or a pointer to
- * a `MonoAssembly` that matches the `MonoAssemblyName` specified.
+ * \returns NULL If the given \p aname assembly has not been loaded, or a pointer to
+ * a \c MonoAssembly that matches the \c MonoAssemblyName specified.
  */
 MonoAssembly*
 mono_assembly_loaded_full (MonoAssemblyName *aname, gboolean refonly)
@@ -3449,12 +3577,12 @@ mono_assembly_loaded_full (MonoAssemblyName *aname, gboolean refonly)
 
 /**
  * mono_assembly_loaded:
- * @aname: an assembly to look for.
+ * \param aname an assembly to look for.
  *
  * This is used to determine if the specified assembly has been loaded
  
- * Returns: NULL If the given @aname assembly has not been loaded, or a pointer to
- * a `MonoAssembly` that matches the `MonoAssemblyName` specified.
+ * \returns NULL If the given \p aname assembly has not been loaded, or a pointer to
+ * a \c MonoAssembly that matches the \c MonoAssemblyName specified.
  */
 MonoAssembly*
 mono_assembly_loaded (MonoAssemblyName *aname)
@@ -3540,9 +3668,9 @@ mono_assembly_close_finish (MonoAssembly *assembly)
 
 /**
  * mono_assembly_close:
- * @assembly: the assembly to release.
+ * \param assembly the assembly to release.
  *
- * This method releases a reference to the @assembly.  The assembly is
+ * This method releases a reference to the \p assembly.  The assembly is
  * only released when all the outstanding references to it are released.
  */
 void
@@ -3552,6 +3680,9 @@ mono_assembly_close (MonoAssembly *assembly)
                mono_assembly_close_finish (assembly);
 }
 
+/**
+ * mono_assembly_load_module:
+ */
 MonoImage*
 mono_assembly_load_module (MonoAssembly *assembly, guint32 idx)
 {
@@ -3570,12 +3701,12 @@ mono_assembly_load_module_checked (MonoAssembly *assembly, uint32_t idx, MonoErr
 
 /**
  * mono_assembly_foreach:
- * @func: function to invoke for each assembly loaded
- * @user_data: data passed to the callback
+ * \param func function to invoke for each assembly loaded
+ * \param user_data data passed to the callback
  *
- * Invokes the provided @func callback for each assembly loaded into
+ * Invokes the provided \p func callback for each assembly loaded into
  * the runtime.   The first parameter passed to the callback  is the
- * `MonoAssembly*`, and the second parameter is the @user_data.
+ * \c MonoAssembly*, and the second parameter is the \p user_data.
  *
  * This is done for all assemblies loaded in the runtime, not just
  * those loaded in the current application domain.
@@ -3654,6 +3785,9 @@ mono_assembly_cleanup_domain_bindings (guint32 domain_id)
  */
 static MonoAssembly *main_assembly=NULL;
 
+/**
+ * mono_assembly_set_main:
+ */
 void
 mono_assembly_set_main (MonoAssembly *assembly)
 {
@@ -3673,9 +3807,9 @@ mono_assembly_get_main (void)
 
 /**
  * mono_assembly_get_image:
- * @assembly: The assembly to retrieve the image from
+ * \param assembly The assembly to retrieve the image from
  *
- * Returns: the MonoImage associated with this assembly.
+ * \returns the \c MonoImage associated with this assembly.
  */
 MonoImage*
 mono_assembly_get_image (MonoAssembly *assembly)
@@ -3685,11 +3819,11 @@ mono_assembly_get_image (MonoAssembly *assembly)
 
 /**
  * mono_assembly_get_name:
- * @assembly: The assembly to retrieve the name from
+ * \param assembly The assembly to retrieve the name from
  *
- * The returned name's lifetime is the same as @assembly's.
+ * The returned name's lifetime is the same as \p assembly's.
  *
- * Returns: the MonoAssemblyName associated with this assembly.
+ * \returns the \c MonoAssemblyName associated with this assembly.
  */
 MonoAssemblyName *
 mono_assembly_get_name (MonoAssembly *assembly)
@@ -3697,6 +3831,9 @@ mono_assembly_get_name (MonoAssembly *assembly)
        return &assembly->aname;
 }
 
+/**
+ * mono_register_bundled_assemblies:
+ */
 void
 mono_register_bundled_assemblies (const MonoBundledAssembly **assemblies)
 {
index 0cde65a2b5b1d244f5ae0e5818ee303180332e75..1a6f3519840656ccf57af040577abd81d209cf51 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONONET_METADATA_ASSEMBLY_H_ 
 #define _MONONET_METADATA_ASSEMBLY_H_
 
@@ -8,8 +12,10 @@ MONO_BEGIN_DECLS
 
 MONO_API void          mono_assemblies_init     (void);
 MONO_API void          mono_assemblies_cleanup  (void);
+MONO_RT_EXTERNAL_ONLY
 MONO_API MonoAssembly *mono_assembly_open       (const char *filename,
                                        MonoImageOpenStatus *status);
+MONO_RT_EXTERNAL_ONLY
 MONO_API MonoAssembly *mono_assembly_open_full (const char *filename,
                                        MonoImageOpenStatus *status,
                                        mono_bool refonly);
index 72330bbc4fbac5b967452135f960a34d304fab52..0e89624cce35befe8fb6c75d771e24e9d7b98c83 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * attach.c: Support for attaching to the runtime from other processes.
+/**
+ * \file
+ * Support for attaching to the runtime from other processes.
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
@@ -31,7 +32,7 @@
 #include <netdb.h>
 #include <unistd.h>
 
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/metadata.h>
 #include <mono/metadata/class-internals.h>
 #include <mono/metadata/object-internals.h>
@@ -275,7 +276,7 @@ mono_attach_load_agent (MonoDomain *domain, char *agent, char *args, MonoObject
        gpointer pa [1];
        MonoImageOpenStatus open_status;
 
-       agent_assembly = mono_assembly_open (agent, &open_status);
+       agent_assembly = mono_assembly_open_predicate (agent, FALSE, FALSE, NULL, NULL, &open_status);
        if (!agent_assembly) {
                fprintf (stderr, "Cannot open agent assembly '%s': %s.\n", agent, mono_image_strerror (open_status));
                g_free (agent);
index 7a5fb7e7347ee3b6e89cff824a2541a7eb28bf02..ff33b83fa5c5a574b525d5aa6bd4ada1cccae95a 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_ATTACH_H__
 #define __MONO_ATTACH_H__
 
index 8ba0cba9177ae3de883a80224875a4c60c8f136a..504c6c65fc6d2e87acbe6842fb89e4cb48875f0a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * attredefs.h: This file contains the various definitions for constants
+/**
+ * \file
+ * This file contains the various definitions for constants
  * found on the metadata tables
  *
  * Author:
index 5e81e1af7e1b1c10f60fc49e7248f29e6274b16d..df26858213a598c29cb29813758ab5d6d3369442 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * blob.h: Definitions used to pull information out of the Blob
+/**
+ * \file
+ * Definitions used to pull information out of the Blob
  *
  */
 #ifndef _MONO_METADATA_BLOB_H_
index 5807f87eddd5e703f572a8534fde48e84a34da43..8adf077e6b1956fca0f4f3accd195b8b72394126 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * boehm-gc.c: GC implementation using either the installed or included Boehm GC.
+/**
+ * \file
+ * GC implementation using either the installed or included Boehm GC.
  *
  * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
  * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
@@ -272,15 +273,15 @@ mono_gc_base_cleanup (void)
 
 /**
  * mono_gc_collect:
- * @generation: GC generation identifier
+ * \param generation GC generation identifier
  *
  * Perform a garbage collection for the given generation, higher numbers
  * mean usually older objects. Collecting a high-numbered generation
  * implies collecting also the lower-numbered generations.
- * The maximum value for @generation can be retrieved with a call to
- * mono_gc_max_generation(), so this function is usually called as:
+ * The maximum value for \p generation can be retrieved with a call to
+ * \c mono_gc_max_generation, so this function is usually called as:
  *
- *     mono_gc_collect (mono_gc_max_generation ());
+ * <code>mono_gc_collect (mono_gc_max_generation ());</code>
  */
 void
 mono_gc_collect (int generation)
@@ -308,12 +309,12 @@ mono_gc_max_generation (void)
 
 /**
  * mono_gc_get_generation:
- * @object: a managed object
+ * \param object a managed object
  *
- * Get the garbage collector's generation that @object belongs to.
+ * Get the garbage collector's generation that \p object belongs to.
  * Use this has a hint only.
  *
- * Returns: a garbage collector generation number
+ * \returns a garbage collector generation number
  */
 int
 mono_gc_get_generation  (MonoObject *object)
@@ -323,12 +324,12 @@ mono_gc_get_generation  (MonoObject *object)
 
 /**
  * mono_gc_collection_count:
- * @generation: a GC generation number
+ * \param generation a GC generation number
  *
  * Get how many times a garbage collection has been performed
- * for the given @generation number.
+ * for the given \p generation number.
  *
- * Returns: the number of garbage collections
+ * \returns the number of garbage collections
  */
 int
 mono_gc_collection_count (int generation)
@@ -338,13 +339,13 @@ mono_gc_collection_count (int generation)
 
 /**
  * mono_gc_add_memory_pressure:
- * @value: amount of bytes
+ * \param value amount of bytes
  *
  * Adjust the garbage collector's view of how many bytes of memory
  * are indirectly referenced by managed objects (for example unmanaged
  * memory holding image or other binary data).
  * This is a hint only to the garbage collector algorithm.
- * Note that negative amounts of @value will decrease the memory
+ * Note that negative amounts of value will decrease the memory
  * pressure.
  */
 void
@@ -1707,19 +1708,19 @@ alloc_handle (HandleData *handles, MonoObject *obj, gboolean track)
 
 /**
  * mono_gchandle_new:
- * @obj: managed object to get a handle for
- * @pinned: whether the object should be pinned
+ * \param obj managed object to get a handle for
+ * \param pinned whether the object should be pinned
  *
  * This returns a handle that wraps the object, this is used to keep a
  * reference to a managed object from the unmanaged world and preventing the
  * object from being disposed.
  * 
- * If @pinned is false the address of the object can not be obtained, if it is
+ * If \p pinned is false the address of the object can not be obtained, if it is
  * true the address of the object can be obtained.  This will also pin the
  * object so it will not be possible by a moving garbage collector to move the
  * object. 
  * 
- * Returns: a handle that can be used to access the object from
+ * \returns a handle that can be used to access the object from
  * unmanaged code.
  */
 guint32
@@ -1730,23 +1731,23 @@ mono_gchandle_new (MonoObject *obj, gboolean pinned)
 
 /**
  * mono_gchandle_new_weakref:
- * @obj: managed object to get a handle for
- * @track_resurrection: Determines how long to track the object, if this is set to TRUE, the object is tracked after finalization, if FALSE, the object is only tracked up until the point of finalization.
+ * \param obj managed object to get a handle for
+ * \param track_resurrection Determines how long to track the object, if this is set to TRUE, the object is tracked after finalization, if FALSE, the object is only tracked up until the point of finalization.
  *
  * This returns a weak handle that wraps the object, this is used to
  * keep a reference to a managed object from the unmanaged world.
- * Unlike the mono_gchandle_new the object can be reclaimed by the
+ * Unlike the \c mono_gchandle_new the object can be reclaimed by the
  * garbage collector.  In this case the value of the GCHandle will be
  * set to zero.
  * 
- * If @track_resurrection is TRUE the object will be tracked through
+ * If \p track_resurrection is TRUE the object will be tracked through
  * finalization and if the object is resurrected during the execution
  * of the finalizer, then the returned weakref will continue to hold
- * a reference to the object.   If @track_resurrection is FALSE, then
+ * a reference to the object.   If \p track_resurrection is FALSE, then
  * the weak reference's target will become NULL as soon as the object
  * is passed on to the finalizer.
  * 
- * Returns: a handle that can be used to access the object from
+ * \returns a handle that can be used to access the object from
  * unmanaged code.
  */
 guint32
@@ -1757,12 +1758,12 @@ mono_gchandle_new_weakref (MonoObject *obj, gboolean track_resurrection)
 
 /**
  * mono_gchandle_get_target:
- * @gchandle: a GCHandle's handle.
+ * \param gchandle a GCHandle's handle.
  *
- * The handle was previously created by calling `mono_gchandle_new` or
- * `mono_gchandle_new_weakref`.
+ * The handle was previously created by calling \c mono_gchandle_new or
+ * \c mono_gchandle_new_weakref.
  *
- * Returns: A pointer to the `MonoObject*` represented by the handle or
+ * \returns A pointer to the \c MonoObject* represented by the handle or
  * NULL for a collected object if using a weakref handle.
  */
 MonoObject*
@@ -1827,13 +1828,13 @@ mono_gc_is_null (void)
 
 /**
  * mono_gchandle_is_in_domain:
- * @gchandle: a GCHandle's handle.
- * @domain: An application domain.
+ * \param gchandle a GCHandle's handle.
+ * \param domain An application domain.
  *
- * Use this function to determine if the @gchandle points to an
- * object allocated in the specified @domain.
+ * Use this function to determine if the \p gchandle points to an
+ * object allocated in the specified \p domain.
  *
- * Returns: TRUE if the object wrapped by the @gchandle belongs to the specific @domain.
+ * \returns TRUE if the object wrapped by the \p gchandle belongs to the specific \p domain.
  */
 gboolean
 mono_gchandle_is_in_domain (guint32 gchandle, MonoDomain *domain)
@@ -1867,9 +1868,9 @@ mono_gchandle_is_in_domain (guint32 gchandle, MonoDomain *domain)
 
 /**
  * mono_gchandle_free:
- * @gchandle: a GCHandle's handle.
+ * \param gchandle a GCHandle's handle.
  *
- * Frees the @gchandle handle.  If there are no outstanding
+ * Frees the \p gchandle handle.  If there are no outstanding
  * references, the garbage collector can reclaim the memory of the
  * object wrapped. 
  */
@@ -1904,7 +1905,7 @@ mono_gchandle_free (guint32 gchandle)
 
 /**
  * mono_gchandle_free_domain:
- * @domain: domain that is unloading
+ * \param domain domain that is unloading
  *
  * Function used internally to cleanup any GC handle for objects belonging
  * to the specified domain during appdomain unload.
index 8581a042f2c310bafe764a2992b0897816939f08..d6e966ee83c70acc576c5806cc8e26eb77b663b1 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_CIL_COFF_H__
 #define __MONO_CIL_COFF_H__
index db74d5ac5c8911d9df4ce8678f60520cda35ed43..327a1c1cfe79bbf76ed0e5f8507a13bf0200c122 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
@@ -46,12 +47,9 @@ mono_class_try_get_generic_class (MonoClass *klass)
 
 /**
  * mono_class_get_flags:
- * @klass: the MonoClass to act on
- *
- * Return the TypeAttributes flags of @klass.
- * See the TYPE_ATTRIBUTE_* definitions on tabledefs.h for the different values.
- *
- * Returns: The type flags
+ * \param klass the MonoClass to act on
+ * \returns the \c TypeAttributes flags of \p klass.
+ * See the \c TYPE_ATTRIBUTE_* definitions in \c tabledefs.h for the different values.
  */
 guint32
 mono_class_get_flags (MonoClass *klass)
index 2e884ba3d352434a9717537c9287152d51246fb7..d57d5310cc5a3308b01d0bcc38ee5d0f8c1b3683 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 99c8d5b593d397041a059287ea79b1d47b997bb7..7d85d8ce84f9010140021b975b495d572b119b81 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2012 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 1aa43ee53ebfd99e6c3b823cc5f39bd70d8bd0e1..6e086cf1442a451765cc3fdb8ad2586709f0e208 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * class.c: Class management for the Mono runtime
+/**
+ * \file
+ * Class management for the Mono runtime
  *
  * Author:
  *   Miguel de Icaza (miguel@ximian.com)
@@ -164,12 +165,12 @@ disable_gclass_recording (gclass_record_func func, void *user_data)
 
 /**
  * mono_class_from_typeref:
- * @image: a MonoImage
- * @type_token: a TypeRef token
+ * \param image a MonoImage
+ * \param type_token a TypeRef token
  *
- * Creates the MonoClass* structure representing the type defined by
- * the typeref token valid inside @image.
- * Returns: The MonoClass* representing the typeref token, NULL ifcould
+ * Creates the \c MonoClass* structure representing the type defined by
+ * the typeref token valid inside \p image.
+ * \returns The \c MonoClass* representing the typeref token, or NULL if it could
  * not be loaded.
  */
 MonoClass *
@@ -183,15 +184,15 @@ mono_class_from_typeref (MonoImage *image, guint32 type_token)
 
 /**
  * mono_class_from_typeref_checked:
- * @image: a MonoImage
- * @type_token: a TypeRef token
- * @error: error return code, if any.
+ * \param image a MonoImage
+ * \param type_token a TypeRef token
+ * \param error error return code, if any.
  *
- * Creates the MonoClass* structure representing the type defined by
- * the typeref token valid inside @image.
+ * Creates the \c MonoClass* structure representing the type defined by
+ * the typeref token valid inside \p image.
  *
- * Returns: The MonoClass* representing the typeref token, NULL if it could
- * not be loaded with the @error value filled with the information about the
+ * \returns The \c MonoClass* representing the typeref token, NULL if it could
+ * not be loaded with the \p error value filled with the information about the
  * error.
  */
 MonoClass *
@@ -300,7 +301,7 @@ done:
        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);
+               mono_error_set_type_load_name (error, name, assembly, "Could not resolve type with token %08x (from typeref, class/assembly %s, %s)", type_token, name, assembly);
        }
        return res;
 }
@@ -369,10 +370,10 @@ mono_type_name_check_byref (MonoType *type, GString *str)
 
 /**
  * mono_identifier_escape_type_name_chars:
- * @str: a destination string
- * @identifier: an IDENTIFIER in internal form
+ * \param str a destination string
+ * \param identifier an IDENTIFIER in internal form
  *
- * Returns: str.
+ * \returns \p str
  *
  * The displayed form of the identifier is appended to str.
  *
@@ -568,22 +569,22 @@ mono_type_get_name_recurse (MonoType *type, GString *str, gboolean is_recursed,
 
 /**
  * mono_type_get_name_full:
- * @type: a type
- * @format: the format for the return string.
+ * \param type a type
+ * \param format the format for the return string.
  *
  * 
- * Returns: The string representation in a number of formats:
+ * \returns The string representation in a number of formats:
  *
- * if format is MONO_TYPE_NAME_FORMAT_REFLECTION, the return string is
- * returned in the formatrequired by System.Reflection, this is the
- * inverse of mono_reflection_parse_type ().
+ * if \p format is \c MONO_TYPE_NAME_FORMAT_REFLECTION, the return string is
+ * returned in the format required by \c System.Reflection, this is the
+ * inverse of mono_reflection_parse_type().
  *
- * if format is MONO_TYPE_NAME_FORMAT_IL, it returns a syntax that can
+ * if \p format is \c MONO_TYPE_NAME_FORMAT_IL, it returns a syntax that can
  * be used by the IL assembler.
  *
- * if format is MONO_TYPE_NAME_FORMAT_FULL_NAME
+ * if \p format is \c MONO_TYPE_NAME_FORMAT_FULL_NAME
  *
- * if format is MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED
+ * if \p format is \c MONO_TYPE_NAME_FORMAT_ASSEMBLY_QUALIFIED
  */
 char*
 mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format)
@@ -599,10 +600,10 @@ mono_type_get_name_full (MonoType *type, MonoTypeNameFormat format)
 
 /**
  * mono_type_get_full_name:
- * @class: a class
+ * \param class a class
  *
- * Returns: The string representation for type as required by System.Reflection.
- * The inverse of mono_reflection_parse_type ().
+ * \returns The string representation for type as required by System.Reflection.
+ * The inverse of mono_reflection_parse_type().
  */
 char *
 mono_type_get_full_name (MonoClass *klass)
@@ -612,9 +613,8 @@ mono_type_get_full_name (MonoClass *klass)
 
 /**
  * mono_type_get_name:
- * @type: a type
- *
- * Returns: The string representation for type as it would be represented in IL code.
+ * \param type a type
+ * \returns The string representation for type as it would be represented in IL code.
  */
 char*
 mono_type_get_name (MonoType *type)
@@ -622,11 +622,10 @@ mono_type_get_name (MonoType *type)
        return mono_type_get_name_full (type, MONO_TYPE_NAME_FORMAT_IL);
 }
 
-/*
+/**
  * mono_type_get_underlying_type:
- * @type: a type
- *
- * Returns: The MonoType for the underlying integer type if @type
+ * \param type a type
+ * \returns The \c MonoType for the underlying integer type if \p type
  * is an enum and byref is false, otherwise the type itself.
  */
 MonoType*
@@ -641,9 +640,9 @@ mono_type_get_underlying_type (MonoType *type)
 
 /**
  * mono_class_is_open_constructed_type:
- * @type: a type
+ * \param type a type
  *
- * Returns: TRUE if type represents a generics open constructed type.
+ * \returns TRUE if type represents a generics open constructed type.
  * IOW, not all type parameters required for the instantiation have
  * been provided or it's a generic type definition.
  *
@@ -869,18 +868,17 @@ mono_class_inflate_generic_type_with_mempool (MonoImage *image, MonoType *type,
        return inflated;
 }
 
-/*
+/**
  * mono_class_inflate_generic_type:
- * @type: a type
- * @context: a generics context
+ * \param type a type
+ * \param context a generics context
+ * \deprecated Please use \c mono_class_inflate_generic_type_checked instead
  *
- * If @type is a generic type and @context is not NULL, instantiate it using the 
- * generics context @context.
+ * If \p type is a generic type and \p context is not NULL, instantiate it using the 
+ * generics context \p context.
  *
- * Returns: The instantiated type or a copy of @type. The returned MonoType is allocated
+ * \returns The instantiated type or a copy of \p type. The returned \c MonoType is allocated
  * on the heap and is owned by the caller. Returns NULL on error.
- *
- * @deprecated Please use mono_class_inflate_generic_type_checked instead
  */
 MonoType*
 mono_class_inflate_generic_type (MonoType *type, MonoGenericContext *context)
@@ -981,14 +979,14 @@ fail:
        return res;
 }
 
-/*
+/**
  * mono_class_inflate_generic_method:
- * @method: a generic method
- * @context: a generics context
+ * \param method a generic method
+ * \param context a generics context
  *
- * Instantiate the generic method @method using the generics context @context.
+ * Instantiate the generic method \p method using the generics context \p context.
  *
- * Returns: The new instantiated method
+ * \returns The new instantiated method
  */
 MonoMethod *
 mono_class_inflate_generic_method (MonoMethod *method, MonoGenericContext *context)
@@ -1005,9 +1003,9 @@ mono_class_inflate_generic_method_checked (MonoMethod *method, MonoGenericContex
 /**
  * mono_class_inflate_generic_method_full:
  *
- * Instantiate method @method with the generic context @context.
+ * Instantiate method \p method with the generic context \p context.
  * BEWARE: All non-trivial fields are invalid, including klass, signature, and header.
- *         Use mono_method_signature () and mono_method_get_header () to get the correct values.
+ *         Use mono_method_signature() and mono_method_get_header() to get the correct values.
  */
 MonoMethod*
 mono_class_inflate_generic_method_full (MonoMethod *method, MonoClass *klass_hint, MonoGenericContext *context)
@@ -1023,7 +1021,7 @@ mono_class_inflate_generic_method_full (MonoMethod *method, MonoClass *klass_hin
 
 /**
  * mono_class_inflate_generic_method_full_checked:
- * Same as mono_class_inflate_generic_method_full but return failure using @error.
+ * Same as mono_class_inflate_generic_method_full but return failure using \p error.
  */
 MonoMethod*
 mono_class_inflate_generic_method_full_checked (MonoMethod *method, MonoClass *klass_hint, MonoGenericContext *context, MonoError *error)
@@ -1270,7 +1268,7 @@ mono_method_set_generic_container (MonoMethod *method, MonoGenericContainer* con
 
 /** 
  * mono_class_find_enum_basetype:
- * @class: The enum class
+ * \param class The enum class
  *
  *   Determine the basetype of an enum by iterating through its fields. We do this
  * in a separate function since it is cheaper than calling mono_class_setup_fields.
@@ -1403,7 +1401,7 @@ mono_class_alloc0 (MonoClass *klass, int size)
 
 /**
  * mono_class_setup_basic_field_info:
- * @class: The class to initialize
+ * \param class The class to initialize
  *
  * Initializes the following fields in MonoClass:
  * * klass->fields (only field->parent and field->name)
@@ -1480,14 +1478,14 @@ mono_class_setup_basic_field_info (MonoClass *klass)
 
 /**
  * mono_class_set_failure_causedby_class:
- * @klass: the class that is failing
- * @caused_by: the class that caused the failure
- * @msg: Why @klass is failing.
+ * \param klass the class that is failing
+ * \param caused_by the class that caused the failure
+ * \param msg Why \p klass is failing.
  * 
- * If @caused_by has a failure, sets a TypeLoadException failure on
- * @klass with message "@msg, due to: {@caused_by message}".
+ * If \p caused_by has a failure, sets a TypeLoadException failure on
+ * \p klass with message "\p msg, due to: {\p caused_by message}".
  *
- * Returns: TRUE if a failiure was set, or FALSE if @caused_by doesn't have a failure.
+ * \returns TRUE if a failiure was set, or FALSE if \p caused_by doesn't have a failure.
  */
 static gboolean
 mono_class_set_type_load_failure_causedby_class (MonoClass *klass, const MonoClass *caused_by, const gchar* msg)
@@ -1507,11 +1505,11 @@ mono_class_set_type_load_failure_causedby_class (MonoClass *klass, const MonoCla
 
 /** 
  * mono_class_setup_fields:
- * @klass: The class to initialize
+ * \p klass The class to initialize
  *
  * Initializes klass->fields, computes class layout and sizes.
  * typebuilder_setup_fields () is the corresponding function for dynamic classes.
- * Sets the following fields in @klass:
+ * Sets the following fields in \p klass:
  *  - all the fields initialized by mono_class_init_sizes ()
  *  - element_class/cast_class (for enums)
  *  - field->type/offset for all fields
@@ -2830,12 +2828,12 @@ mono_unload_interface_id (MonoClass *klass)
 
 /**
  * mono_get_unique_iid:
- * @class: interface
+ * \param klass interface
  *
- * Assign a unique integer ID to the interface represented by @class.
+ * Assign a unique integer ID to the interface represented by \p klass.
  * The ID will positive and as small as possible.
  * LOCKING: Acquires the classes lock.
- * Returns: The new ID.
+ * \returns The new ID.
  */
 static guint32
 mono_get_unique_iid (MonoClass *klass)
@@ -2974,8 +2972,8 @@ mono_class_interface_offset (MonoClass *klass, MonoClass *itf)
 /**
  * mono_class_interface_offset_with_variance:
  * 
- * Return the interface offset of @itf in @klass. Sets @non_exact_match to TRUE if the match required variance check
- * If @itf is an interface with generic variant arguments, try to find the compatible one.
+ * Return the interface offset of \p itf in \p klass. Sets \p non_exact_match to TRUE if the match required variance check
+ * If \p itf is an interface with generic variant arguments, try to find the compatible one.
  *
  * Note that this function is responsible for resolving ambiguities. Right now we use whatever ordering interfaces_packed gives us.
  *
@@ -3200,19 +3198,19 @@ set_interface_and_offset (int num_ifaces, MonoClass **interfaces_full, int *inte
 
 /**
  * mono_compress_bitmap:
- * @dest: destination buffer
- * @bitmap: bitmap buffer
- * @size: size of @bitmap in bytes
+ * \param dest destination buffer
+ * \param bitmap bitmap buffer
+ * \param size size of \p bitmap in bytes
  *
  * This is a mono internal function.
- * The @bitmap data is compressed into a format that is small but
+ * The \p bitmap data is compressed into a format that is small but
  * still searchable in few instructions by the JIT and runtime.
  * The compressed data is stored in the buffer pointed to by the
- * @dest array. Passing a #NULL value for @dest allows to just compute
+ * \p dest array. Passing a NULL value for \p dest allows to just compute
  * the size of the buffer.
  * This compression algorithm assumes the bits set in the bitmap are
  * few and far between, like in interface bitmaps.
- * Returns: The size of the compressed bitmap in bytes.
+ * \returns The size of the compressed bitmap in bytes.
  */
 int
 mono_compress_bitmap (uint8_t *dest, const uint8_t *bitmap, int size)
@@ -3246,16 +3244,16 @@ mono_compress_bitmap (uint8_t *dest, const uint8_t *bitmap, int size)
 
 /**
  * mono_class_interface_match:
- * @bitmap: a compressed bitmap buffer
- * @id: the index to check in the bitmap
+ * \param bitmap a compressed bitmap buffer
+ * \param id the index to check in the bitmap
  *
  * This is a mono internal function.
- * Checks if a bit is set in a compressed interface bitmap. @id must
+ * Checks if a bit is set in a compressed interface bitmap. \p id must
  * be already checked for being smaller than the maximum id encoded in the
  * bitmap.
  *
- * Returns: A non-zero value if bit @id is set in the bitmap @bitmap,
- * #FALSE otherwise.
+ * \returns A non-zero value if bit \p id is set in the bitmap \p bitmap,
+ * FALSE otherwise.
  */
 int
 mono_class_interface_match (const uint8_t *bitmap, int id)
@@ -4626,7 +4624,7 @@ mono_method_get_vtable_slot (MonoMethod *method)
 
 /**
  * mono_method_get_vtable_index:
- * @method: a method
+ * \param method a method
  *
  * Returns the index into the runtime vtable to access the method or,
  * in the case of a virtual generic method, the virtual generic method
@@ -4785,19 +4783,20 @@ concat_two_strings_with_zero (MonoImage *image, const char *s1, const char *s2)
 
 /**
  * mono_class_init:
- * @klass: the class to initialize
+ * \param klass the class to initialize
  *
- *   Compute the instance_size, class_size and other infos that cannot be 
- * computed at mono_class_get() time. Also compute vtable_size if possible. 
- * Returns TRUE on success or FALSE if there was a problem in loading
- * the type (incorrect assemblies, missing assemblies, methods, etc).
- * Initializes the following fields in @klass:
- * - all the fields initialized by mono_class_init_sizes ()
+ * Compute the \c instance_size, \c class_size and other infos that cannot be 
+ * computed at \c mono_class_get time. Also compute vtable_size if possible. 
+ * Initializes the following fields in \p klass:
+ * - all the fields initialized by \c mono_class_init_sizes
  * - has_cctor
  * - ghcimpl
  * - inited
  *
  * LOCKING: Acquires the loader lock.
+ *
+ * \returns TRUE on success or FALSE if there was a problem in loading
+ * the type (incorrect assemblies, missing assemblies, methods, etc).
  */
 gboolean
 mono_class_init (MonoClass *klass)
@@ -5448,12 +5447,12 @@ mono_class_set_failure_and_error (MonoClass *klass, MonoError *error, const char
 
 /**
  * mono_class_create_from_typedef:
- * @image: image where the token is valid
- * @type_token:  typedef token
- * @error:  used to return any error found while creating the type
+ * \param image: image where the token is valid
+ * \param type_token:  typedef token
+ * \param error:  used to return any error found while creating the type
  *
  * Create the MonoClass* representing the specified type token.
- * @type_token must be a TypeDef token.
+ * \p type_token must be a TypeDef token.
  *
  * FIXME: don't return NULL on failure, just the the caller figure it out.
  */
@@ -6180,9 +6179,9 @@ mono_class_from_generic_parameter_internal (MonoGenericParam *param)
 
 /**
  * mono_class_from_generic_parameter:
- * @param: Parameter to find/construct a class for.
- * @arg2: Is ignored.
- * @arg3: Is ignored.
+ * \param param Parameter to find/construct a class for.
+ * \param arg2 Is ignored.
+ * \param arg3 Is ignored.
  */
 MonoClass *
 mono_class_from_generic_parameter (MonoGenericParam *param, MonoImage *arg2 G_GNUC_UNUSED, gboolean arg3 G_GNUC_UNUSED)
@@ -6190,6 +6189,9 @@ mono_class_from_generic_parameter (MonoGenericParam *param, MonoImage *arg2 G_GN
        return mono_class_from_generic_parameter_internal (param);
 }
 
+/**
+ * mono_ptr_class_get:
+ */
 MonoClass *
 mono_ptr_class_get (MonoType *type)
 {
@@ -6316,9 +6318,8 @@ mono_fnptr_class_get (MonoMethodSignature *sig)
 
 /**
  * mono_class_from_mono_type:
- * @type: describes the type to return
- *
- * This returns a MonoClass for the specified MonoType, the value is never NULL.
+ * \param type describes the type to return
+ * \returns a \c MonoClass for the specified \c MonoType, the value is never NULL.
  */
 MonoClass *
 mono_class_from_mono_type (MonoType *type)
@@ -6388,9 +6389,9 @@ mono_class_from_mono_type (MonoType *type)
 
 /**
  * mono_type_retrieve_from_typespec
- * @image: context where the image is created
- * @type_spec:  typespec token
- * @context: the generic context used to evaluate generic instantiations in
+ * \param image context where the image is created
+ * \param type_spec  typespec token
+ * \param context the generic context used to evaluate generic instantiations in
  */
 static MonoType *
 mono_type_retrieve_from_typespec (MonoImage *image, guint32 type_spec, MonoGenericContext *context, gboolean *did_inflate, MonoError *error)
@@ -6419,9 +6420,9 @@ mono_type_retrieve_from_typespec (MonoImage *image, guint32 type_spec, MonoGener
 
 /**
  * mono_class_create_from_typespec
- * @image: context where the image is created
- * @type_spec:  typespec token
- * @context: the generic context used to evaluate generic instantiations in
+ * \param image context where the image is created
+ * \param type_spec typespec token
+ * \param context the generic context used to evaluate generic instantiations in
  */
 static MonoClass *
 mono_class_create_from_typespec (MonoImage *image, guint32 type_spec, MonoGenericContext *context, MonoError *error)
@@ -6438,12 +6439,11 @@ mono_class_create_from_typespec (MonoImage *image, guint32 type_spec, MonoGeneri
 
 /**
  * mono_bounded_array_class_get:
- * @element_class: element class 
- * @rank: the dimension of the array class
- * @bounded: whenever the array has non-zero bounds
- *
- * Returns: A class object describing the array with element type @element_type and 
- * dimension @rank. 
+ * \param element_class element class 
+ * \param rank the dimension of the array class
+ * \param bounded whenever the array has non-zero bounds
+ * \returns A class object describing the array with element type \p element_type and 
+ * dimension \p rank.
  */
 MonoClass *
 mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
@@ -6653,11 +6653,10 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
 
 /**
  * mono_array_class_get:
- * @element_class: element class 
- * @rank: the dimension of the array class
- *
- * Returns: A class object describing the array with element type @element_type and 
- * dimension @rank. 
+ * \param element_class element class 
+ * \param rank the dimension of the array class
+ * \returns A class object describing the array with element type \p element_type and 
+ * dimension \p rank.
  */
 MonoClass *
 mono_array_class_get (MonoClass *eclass, guint32 rank)
@@ -6667,11 +6666,11 @@ mono_array_class_get (MonoClass *eclass, guint32 rank)
 
 /**
  * mono_class_instance_size:
- * @klass: a class 
+ * \param klass a class
  *
  * Use to get the size of a class in bytes.
  *
- * Returns: The size of an object instance
+ * \returns The size of an object instance
  */
 gint32
 mono_class_instance_size (MonoClass *klass)
@@ -6684,7 +6683,7 @@ mono_class_instance_size (MonoClass *klass)
 
 /**
  * mono_class_min_align:
- * @klass: a class 
+ * \param klass a class 
  *
  * Use to get the computed minimum alignment requirements for the specified class.
  *
@@ -6701,12 +6700,12 @@ mono_class_min_align (MonoClass *klass)
 
 /**
  * mono_class_value_size:
- * @klass: a class 
+ * \param klass a class 
  *
  * This function is used for value types, and return the
  * space and the alignment to store that kind of value object.
  *
- * Returns: the size of a value of kind @klass
+ * \returns the size of a value of kind \p klass
  */
 gint32
 mono_class_value_size (MonoClass *klass, guint32 *align)
@@ -6728,9 +6727,9 @@ mono_class_value_size (MonoClass *klass, guint32 *align)
 
 /**
  * mono_class_data_size:
- * @klass: a class 
+ * \param klass a class 
  * 
- * Returns: The size of the static class data
+ * \returns The size of the static class data
  */
 gint32
 mono_class_data_size (MonoClass *klass)
@@ -6791,10 +6790,10 @@ mono_class_get_field_idx (MonoClass *klass, int idx)
 
 /**
  * mono_class_get_field:
- * @class: the class to lookup the field.
- * @field_token: the field token
+ * \param class the class to lookup the field.
+ * \param field_token the field token
  *
- * Returns: A MonoClassField representing the type and offset of
+ * \returns A \c MonoClassField representing the type and offset of
  * the field, or a NULL value if the field does not belong to this
  * class.
  */
@@ -6810,12 +6809,12 @@ mono_class_get_field (MonoClass *klass, guint32 field_token)
 
 /**
  * mono_class_get_field_from_name:
- * @klass: the class to lookup the field.
- * @name: the field name
+ * \param klass the class to lookup the field.
+ * \param name the field name
  *
- * Search the class @klass and it's parents for a field with the name @name.
+ * Search the class \p klass and its parents for a field with the name \p name.
  * 
- * Returns: The MonoClassField pointer of the named field or NULL
+ * \returns The \c MonoClassField pointer of the named field or NULL
  */
 MonoClassField *
 mono_class_get_field_from_name (MonoClass *klass, const char *name)
@@ -6825,16 +6824,16 @@ mono_class_get_field_from_name (MonoClass *klass, const char *name)
 
 /**
  * mono_class_get_field_from_name_full:
- * @klass: the class to lookup the field.
- * @name: the field name
- * @type: the type of the fields. This optional.
+ * \param klass the class to lookup the field.
+ * \param name the field name
+ * \param type the type of the fields. This optional.
  *
- * Search the class @klass and it's parents for a field with the name @name and type @type.
+ * Search the class \p klass and it's parents for a field with the name \p name and type \p type.
  *
- * If @klass is an inflated generic type, the type comparison is done with the equivalent field
+ * If \p klass is an inflated generic type, the type comparison is done with the equivalent field
  * of its generic type definition.
  *
- * Returns: The MonoClassField pointer of the named field or NULL
+ * \returns The MonoClassField pointer of the named field or NULL
  */
 MonoClassField *
 mono_class_get_field_from_name_full (MonoClass *klass, const char *name, MonoType *type)
@@ -6867,12 +6866,12 @@ mono_class_get_field_from_name_full (MonoClass *klass, const char *name, MonoTyp
 
 /**
  * mono_class_get_field_token:
- * @field: the field we need the token of
+ * \param field the field we need the token of
  *
  * Get the token of a field. Note that the tokesn is only valid for the image
  * the field was loaded from. Don't use this function for fields in dynamic types.
  * 
- * Returns: The token representing the field in the image it was loaded from.
+ * \returns The token representing the field in the image it was loaded from.
  */
 guint32
 mono_class_get_field_token (MonoClassField *field)
@@ -7002,6 +7001,9 @@ mono_class_get_property_default_value (MonoProperty *property, MonoTypeEnum *def
        return (const char *)mono_metadata_blob_heap (klass->image, constant_cols [MONO_CONSTANT_VALUE]);
 }
 
+/**
+ * mono_class_get_event_token:
+ */
 guint32
 mono_class_get_event_token (MonoEvent *event)
 {
@@ -7025,12 +7027,12 @@ mono_class_get_event_token (MonoEvent *event)
 
 /**
  * mono_class_get_property_from_name:
- * @klass: a class
- * @name: name of the property to lookup in the specified class
+ * \param klass a class
+ * \param name name of the property to lookup in the specified class
  *
  * Use this method to lookup a property in a class
- * Returns: the MonoProperty with the given name, or NULL if the property
- * does not exist on the @klass.
+ * \returns the \c MonoProperty with the given name, or NULL if the property
+ * does not exist on the \p klass.
  */
 MonoProperty*
 mono_class_get_property_from_name (MonoClass *klass, const char *name)
@@ -7049,9 +7051,9 @@ mono_class_get_property_from_name (MonoClass *klass, const char *name)
 
 /**
  * mono_class_get_property_token:
- * @prop: MonoProperty to query
+ * \param prop MonoProperty to query
  *
- * Returns: The ECMA token for the specified property.
+ * \returns The ECMA token for the specified property.
  */
 guint32
 mono_class_get_property_token (MonoProperty *prop)
@@ -7075,6 +7077,9 @@ mono_class_get_property_token (MonoProperty *prop)
        return 0;
 }
 
+/**
+ * mono_class_name_from_token:
+ */
 char *
 mono_class_name_from_token (MonoImage *image, guint32 type_token)
 {
@@ -7192,12 +7197,11 @@ mono_assembly_name_from_token (MonoImage *image, guint32 type_token)
 
 /**
  * mono_class_get_full:
- * @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
+ * \param image the image where the class resides
+ * \param type_token the token for the class
+ * \param context the generic context used to evaluate generic instantiations in
+ * \deprecated Functions that expose \c MonoGenericContext are going away in mono 4.0
+ * \returns The \c MonoClass that represents \p type_token in \p image
  */
 MonoClass *
 mono_class_get_full (MonoImage *image, guint32 type_token, MonoGenericContext *context)
@@ -7229,11 +7233,11 @@ mono_class_get_and_inflate_typespec_checked (MonoImage *image, guint32 type_toke
 }
 /**
  * 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
+ * \param image the image where the class resides
+ * \param type_token the token for the class
+ * \param error error object to return any error
  *
- * Returns: The MonoClass that represents @type_token in @image, or NULL on error.
+ * \returns The MonoClass that represents \p type_token in \p image, or NULL on error.
  */
 MonoClass *
 mono_class_get_checked (MonoImage *image, guint32 type_token, MonoError *error)
@@ -7272,7 +7276,7 @@ done:
        if (!klass && 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);
+               mono_error_set_type_load_name (error, name, assembly, "Could not resolve type with token %08x (class/assembly %s, %s)", type_token, name, assembly);
        }
 
        return klass;
@@ -7281,14 +7285,14 @@ done:
 
 /**
  * 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
+ * \param image the image where the type resides
+ * \param type_token the token for the type
+ * \param context the generic context used to evaluate generic instantiations in
+ * \param 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
+ * \returns The MonoType that represents \p type_token in \p image
  */
 MonoType *
 mono_type_get_checked (MonoImage *image, guint32 type_token, MonoGenericContext *context, MonoError *error)
@@ -7341,10 +7345,9 @@ mono_type_get_checked (MonoImage *image, guint32 type_token, MonoGenericContext
 
 /**
  * mono_class_get:
- * @image: image where the class token will be looked up.
- * @type_token: a type token from the image
- *
- * Returns the MonoClass with the given @type_token on the @image
+ * \param image image where the class token will be looked up.
+ * \param type_token a type token from the image
+ * \returns the \c MonoClass with the given \p type_token on the \p image
  */
 MonoClass *
 mono_class_get (MonoImage *image, guint32 type_token)
@@ -7454,6 +7457,9 @@ mono_image_init_name_cache (MonoImage *image)
 }
 
 /*FIXME Only dynamic assemblies should allow this operation.*/
+/**
+ * mono_image_add_to_name_cache:
+ */
 void
 mono_image_add_to_name_cache (MonoImage *image, const char *nspace, 
                                                          const char *name, guint32 index)
@@ -7496,13 +7502,13 @@ find_nocase (gpointer key, gpointer value, gpointer user_data)
 
 /**
  * mono_class_from_name_case:
- * @image: The MonoImage where the type is looked up in
- * @name_space: the type namespace
- * @name: the type short name.
- * @deprecated: use the mono_class_from_name_case_checked variant instead.
+ * \param image The MonoImage where the type is looked up in
+ * \param name_space the type namespace
+ * \param name the type short name.
+ * \deprecated use the mono_class_from_name_case_checked variant instead.
  *
- * Obtains a MonoClass with a given namespace and a given name which
- * is located in the given MonoImage.   The namespace and name
+ * Obtains a \c MonoClass with a given namespace and a given name which
+ * is located in the given \c MonoImage.   The namespace and name
  * lookups are case insensitive.
  */
 MonoClass *
@@ -7516,18 +7522,18 @@ mono_class_from_name_case (MonoImage *image, const char* name_space, const char
 }
 
 /**
- * mono_class_from_name_case:
- * @image: The MonoImage where the type is looked up in
- * @name_space: the type namespace
- * @name: the type short name.
- * @error: if 
+ * mono_class_from_name_case_checked:
+ * \param image The MonoImage where the type is looked up in
+ * \param name_space the type namespace
+ * \param name the type short name.
+ * \param error if 
  *
  * Obtains a MonoClass with a given namespace and a given name which
  * is located in the given MonoImage.   The namespace and name
  * lookups are case insensitive.
  *
- * Returns: The MonoClass if the given namespace and name were found, or NULL if it
- * was not found.   The @error object will contain information about the problem
+ * \returns The MonoClass if the given namespace and name were found, or NULL if it
+ * was not found.   The \p error object will contain information about the problem
  * in that case.
  */
 MonoClass *
@@ -7766,9 +7772,9 @@ mono_class_from_name_checked_aux (MonoImage *image, const char* name_space, cons
 
 /**
  * mono_class_from_name_checked:
- * @image: The MonoImage where the type is looked up in
- * @name_space: the type namespace
- * @name: the type short name.
+ * \param image The MonoImage where the type is looked up in
+ * \param name_space the type namespace
+ * \param name the type short name.
  *
  * Obtains a MonoClass with a given namespace and a given name which
  * is located in the given MonoImage.
@@ -7793,16 +7799,16 @@ mono_class_from_name_checked (MonoImage *image, const char* name_space, const ch
 
 /**
  * mono_class_from_name:
- * @image: The MonoImage where the type is looked up in
- * @name_space: the type namespace
- * @name: the type short name.
+ * \param image The \c MonoImage where the type is looked up in
+ * \param name_space the type namespace
+ * \param name the type short name.
  *
- * Obtains a MonoClass with a given namespace and a given name which
- * is located in the given MonoImage.
+ * Obtains a \c MonoClass with a given namespace and a given name which
+ * is located in the given \c MonoImage.
  *
  * To reference nested classes, use the "/" character as a separator.
- * For example use "Foo/Bar" to reference the class Bar that is nested
- * inside Foo, like this: "class Foo { class Bar {} }".
+ * For example use \c "Foo/Bar" to reference the class \c Bar that is nested
+ * inside \c Foo, like this: "class Foo { class Bar {} }".
  */
 MonoClass *
 mono_class_from_name (MonoImage *image, const char* name_space, const char *name)
@@ -7818,9 +7824,9 @@ mono_class_from_name (MonoImage *image, const char* name_space, const char *name
 
 /**
  * mono_class_load_from_name:
- * @image: The MonoImage where the type is looked up in
- * @name_space: the type namespace
- * @name: the type short name.
+ * \param image The MonoImage where the type is looked up in
+ * \param name_space the type namespace
+ * \param name the type short name.
  *
  * This function works exactly like mono_class_from_name but it will abort if the class is not found.
  * This function should be used by the runtime for critical types to which there's no way to recover but crash
@@ -7842,9 +7848,9 @@ mono_class_load_from_name (MonoImage *image, const char* name_space, const char
 
 /**
  * mono_class_try_load_from_name:
- * @image: The MonoImage where the type is looked up in
- * @name_space: the type namespace
- * @name: the type short name.
+ * \param image The MonoImage where the type is looked up in
+ * \param name_space the type namespace
+ * \param name the type short name.
  *
  * This function tries to load a type, returning the class was found or NULL otherwise.
  * This function should be used by the runtime when probing for optional types, those that could have being linked out.
@@ -7868,21 +7874,21 @@ mono_class_try_load_from_name (MonoImage *image, const char* name_space, const c
 
 /**
  * mono_class_is_subclass_of:
- * @klass: class to probe if it is a subclass of another one
- * @klassc: the class we suspect is the base class
- * @check_interfaces: whether we should perform interface checks
+ * \param klass class to probe if it is a subclass of another one
+ * \param klassc the class we suspect is the base class
+ * \param check_interfaces whether we should perform interface checks
  *
- * This method determines whether @klass is a subclass of @klassc.
+ * This method determines whether \p klass is a subclass of \p klassc.
  *
- * If the @check_interfaces flag is set, then if @klassc is an interface
- * this method return TRUE if the @klass implements the interface or
- * if @klass is an interface, if one of its base classes is @klass.
+ * If the \p check_interfaces flag is set, then if \p klassc is an interface
+ * this method return TRUE if the \p klass implements the interface or
+ * if \p klass is an interface, if one of its base classes is \p klass.
  *
- * If @check_interfaces is false then, then if @klass is not an interface
- * then it returns TRUE if the @klass is a subclass of @klassc.
+ * If \p check_interfaces is false, then if \p klass is not an interface,
+ * it returns TRUE if the \p klass is a subclass of \p klassc.
  *
- * if @klass is an interface and @klassc is System.Object, then this function
- * return true.
+ * if \p klass is an interface and \p klassc is \c System.Object, then this function
+ * returns TRUE.
  *
  */
 gboolean
@@ -8118,11 +8124,11 @@ mono_gparam_is_assignable_from (MonoClass *target, MonoClass *candidate)
 
 /**
  * mono_class_is_assignable_from:
- * @klass: the class to be assigned to
- * @oklass: the source class
+ * \param klass the class to be assigned to
+ * \param oklass the source class
  *
- * Returns: TRUE if an instance of object oklass can be assigned to an
- * instance of object @klass
+ * \returns TRUE if an instance of class \p oklass can be assigned to an
+ * instance of class \p klass
  */
 gboolean
 mono_class_is_assignable_from (MonoClass *klass, MonoClass *oklass)
@@ -8416,9 +8422,9 @@ mono_class_is_assignable_from_slow (MonoClass *target, MonoClass *candidate)
 
 /**
  * mono_class_get_cctor:
- * @klass: A MonoClass pointer
+ * \param klass A MonoClass pointer
  *
- * Returns: The static constructor of @klass if it exists, NULL otherwise.
+ * \returns The static constructor of \p klass if it exists, NULL otherwise.
  */
 MonoMethod*
 mono_class_get_cctor (MonoClass *klass)
@@ -8454,9 +8460,9 @@ mono_class_get_cctor (MonoClass *klass)
 
 /**
  * mono_class_get_finalizer:
- * @klass: The MonoClass pointer
+ * \param klass: The MonoClass pointer
  *
- * Returns: The finalizer method of @klass if it exists, NULL otherwise.
+ * \returns The finalizer method of \p klass if it exists, NULL otherwise.
  */
 MonoMethod*
 mono_class_get_finalizer (MonoClass *klass)
@@ -8482,8 +8488,8 @@ mono_class_get_finalizer (MonoClass *klass)
 
 /**
  * mono_class_needs_cctor_run:
- * @klass: the MonoClass pointer
- * @caller: a MonoMethod describing the caller
+ * \param klass the MonoClass pointer
+ * \param caller a MonoMethod describing the caller
  *
  * Determines whenever the class has a static constructor and whenever it
  * needs to be called when executing CALLER.
@@ -8502,10 +8508,9 @@ mono_class_needs_cctor_run (MonoClass *klass, MonoMethod *caller)
 
 /**
  * mono_class_array_element_size:
- * @klass: 
+ * \param klass
  *
- * Returns: The number of bytes an element of type @klass
- * uses when stored into an array.
+ * \returns The number of bytes an element of type \p klass uses when stored into an array.
  */
 gint32
 mono_class_array_element_size (MonoClass *klass)
@@ -8566,9 +8571,9 @@ handle_enum:
 
 /**
  * mono_array_element_size:
- * @ac: pointer to a #MonoArrayClass
+ * \param ac pointer to a \c MonoArrayClass
  *
- * Returns: The size of single array element.
+ * \returns The size of single array element.
  */
 gint32
 mono_array_element_size (MonoClass *ac)
@@ -8577,6 +8582,9 @@ mono_array_element_size (MonoClass *ac)
        return ac->sizes.element_size;
 }
 
+/**
+ * mono_ldtoken:
+ */
 gpointer
 mono_ldtoken (MonoImage *image, guint32 token, MonoClass **handle_class,
              MonoGenericContext *context)
@@ -8717,9 +8725,9 @@ mono_install_get_class_from_name (MonoGetClassFromName func)
 /**
  * mono_class_get_image:
  *
- * Use this method to get the `MonoImage*` where this class came from.
+ * Use this method to get the \c MonoImage* where this class came from.
  *
- * Returns: The image where this class is defined.
+ * \returns The image where this class is defined.
  */
 MonoImage*
 mono_class_get_image (MonoClass *klass)
@@ -8729,11 +8737,11 @@ mono_class_get_image (MonoClass *klass)
 
 /**
  * mono_class_get_element_class:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * Use this function to get the element class of an array.
  *
- * Returns: The element class of an array.
+ * \returns The element class of an array.
  */
 MonoClass*
 mono_class_get_element_class (MonoClass *klass)
@@ -8743,12 +8751,12 @@ mono_class_get_element_class (MonoClass *klass)
 
 /**
  * mono_class_is_valuetype:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Use this method to determine if the provided `MonoClass*` represents a value type,
+ * Use this method to determine if the provided \c MonoClass* represents a value type,
  * or a reference type.
  *
- * Returns: TRUE if the MonoClass represents a ValueType, FALSE if it represents a reference type.
+ * \returns TRUE if the \c MonoClass represents a \c ValueType, FALSE if it represents a reference type.
  */
 gboolean
 mono_class_is_valuetype (MonoClass *klass)
@@ -8758,11 +8766,11 @@ mono_class_is_valuetype (MonoClass *klass)
 
 /**
  * mono_class_is_enum:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Use this function to determine if the provided `MonoClass*` represents an enumeration.
+ * Use this function to determine if the provided \c MonoClass* represents an enumeration.
  *
- * Returns: TRUE if the MonoClass represents an enumeration.
+ * \returns TRUE if the \c MonoClass represents an enumeration.
  */
 gboolean
 mono_class_is_enum (MonoClass *klass)
@@ -8772,11 +8780,11 @@ mono_class_is_enum (MonoClass *klass)
 
 /**
  * mono_class_enum_basetype:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * Use this function to get the underlying type for an enumeration value.
  * 
- * Returns: The underlying type representation for an enumeration.
+ * \returns The underlying type representation for an enumeration.
  */
 MonoType*
 mono_class_enum_basetype (MonoClass *klass)
@@ -8790,9 +8798,9 @@ mono_class_enum_basetype (MonoClass *klass)
 
 /**
  * mono_class_get_parent
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: The parent class for this class.
+ * \returns The parent class for this class.
  */
 MonoClass*
 mono_class_get_parent (MonoClass *klass)
@@ -8802,13 +8810,13 @@ mono_class_get_parent (MonoClass *klass)
 
 /**
  * mono_class_get_nesting_type:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Use this function to obtain the class that the provided `MonoClass*` is nested on.
+ * Use this function to obtain the class that the provided \c MonoClass* is nested on.
  *
  * If the return is NULL, this indicates that this class is not nested.
  *
- * Returns: The container type where this type is nested or NULL if this type is not a nested type.
+ * \returns The container type where this type is nested or NULL if this type is not a nested type.
  */
 MonoClass*
 mono_class_get_nesting_type (MonoClass *klass)
@@ -8818,9 +8826,9 @@ mono_class_get_nesting_type (MonoClass *klass)
 
 /**
  * mono_class_get_rank:
- * @klass: the MonoClass to act on
+ * \param klass the MonoClass to act on
  *
- * Returns: The rank for the array (the number of dimensions).
+ * \returns The rank for the array (the number of dimensions).
  */
 int
 mono_class_get_rank (MonoClass *klass)
@@ -8830,9 +8838,9 @@ mono_class_get_rank (MonoClass *klass)
 
 /**
  * mono_class_get_name
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: The name of the class.
+ * \returns The name of the class.
  */
 const char*
 mono_class_get_name (MonoClass *klass)
@@ -8842,9 +8850,9 @@ mono_class_get_name (MonoClass *klass)
 
 /**
  * mono_class_get_namespace:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: The namespace of the class.
+ * \returns The namespace of the class.
  */
 const char*
 mono_class_get_namespace (MonoClass *klass)
@@ -8854,11 +8862,11 @@ mono_class_get_namespace (MonoClass *klass)
 
 /**
  * mono_class_get_type:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * This method returns the internal Type representation for the class.
+ * This method returns the internal \c MonoType representation for the class.
  *
- * Returns: The MonoType from the class.
+ * \returns The \c MonoType from the class.
  */
 MonoType*
 mono_class_get_type (MonoClass *klass)
@@ -8868,11 +8876,11 @@ mono_class_get_type (MonoClass *klass)
 
 /**
  * mono_class_get_type_token:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * This method returns type token for the class.
  *
- * Returns: The type token for the class.
+ * \returns The type token for the class.
  */
 guint32
 mono_class_get_type_token (MonoClass *klass)
@@ -8882,7 +8890,7 @@ mono_class_get_type_token (MonoClass *klass)
 
 /**
  * mono_class_get_byref_type:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * 
  */
@@ -8894,9 +8902,9 @@ mono_class_get_byref_type (MonoClass *klass)
 
 /**
  * mono_class_num_fields:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: The number of static and instance fields in the class.
+ * \returns The number of static and instance fields in the class.
  */
 int
 mono_class_num_fields (MonoClass *klass)
@@ -8906,9 +8914,9 @@ mono_class_num_fields (MonoClass *klass)
 
 /**
  * mono_class_num_methods:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: The number of methods in the class.
+ * \returns The number of methods in the class.
  */
 int
 mono_class_num_methods (MonoClass *klass)
@@ -8918,9 +8926,9 @@ mono_class_num_methods (MonoClass *klass)
 
 /**
  * mono_class_num_properties
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: The number of properties in the class.
+ * \returns The number of properties in the class.
  */
 int
 mono_class_num_properties (MonoClass *klass)
@@ -8932,9 +8940,9 @@ mono_class_num_properties (MonoClass *klass)
 
 /**
  * mono_class_num_events:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: The number of events in the class.
+ * \returns The number of events in the class.
  */
 int
 mono_class_num_events (MonoClass *klass)
@@ -8946,15 +8954,15 @@ mono_class_num_events (MonoClass *klass)
 
 /**
  * mono_class_get_fields:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * This routine is an iterator routine for retrieving the fields in a class.
  *
- * You must pass a gpointer that points to zero and is treated as an opaque handle to
+ * You must pass a \c gpointer that points to zero and is treated as an opaque handle to
  * iterate over all of the elements.  When no more values are
  * available, the return value is NULL.
  *
- * Returns: a @MonoClassField* on each iteration, or NULL when no more fields are available.
+ * \returns a \c MonoClassField* on each iteration, or NULL when no more fields are available.
  */
 MonoClassField*
 mono_class_get_fields (MonoClass* klass, gpointer *iter)
@@ -8985,16 +8993,16 @@ mono_class_get_fields (MonoClass* klass, gpointer *iter)
 }
 
 /**
- * mono_class_get_methods
- * @klass: the MonoClass to act on
+ * mono_class_get_methods:
+ * \param klass the \c MonoClass to act on
  *
  * This routine is an iterator routine for retrieving the fields in a class.
  *
- * You must pass a gpointer that points to zero and is treated as an opaque handle to
+ * You must pass a \c gpointer that points to zero and is treated as an opaque handle to
  * iterate over all of the elements.  When no more values are
  * available, the return value is NULL.
  *
- * Returns: a MonoMethod on each iteration or NULL when no more methods are available.
+ * \returns a \c MonoMethod on each iteration or NULL when no more methods are available.
  */
 MonoMethod*
 mono_class_get_methods (MonoClass* klass, gpointer *iter)
@@ -9108,7 +9116,7 @@ mono_class_get_virtual_methods (MonoClass* klass, gpointer *iter)
 
 /**
  * mono_class_get_properties:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * This routine is an iterator routine for retrieving the properties in a class.
  *
@@ -9116,7 +9124,7 @@ mono_class_get_virtual_methods (MonoClass* klass, gpointer *iter)
  * iterate over all of the elements.  When no more values are
  * available, the return value is NULL.
  *
- * Returns: a @MonoProperty* on each invocation, or NULL when no more are available.
+ * Returns: a \c MonoProperty* on each invocation, or NULL when no more are available.
  */
 MonoProperty*
 mono_class_get_properties (MonoClass* klass, gpointer *iter)
@@ -9148,15 +9156,15 @@ mono_class_get_properties (MonoClass* klass, gpointer *iter)
 
 /**
  * mono_class_get_events:
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * This routine is an iterator routine for retrieving the properties in a class.
  *
- * You must pass a gpointer that points to zero and is treated as an opaque handle to
+ * You must pass a \c gpointer that points to zero and is treated as an opaque handle to
  * iterate over all of the elements.  When no more values are
  * available, the return value is NULL.
  *
- * Returns: a @MonoEvent* on each invocation, or NULL when no more are available.
+ * \returns a \c MonoEvent* on each invocation, or NULL when no more are available.
  */
 MonoEvent*
 mono_class_get_events (MonoClass* klass, gpointer *iter)
@@ -9188,15 +9196,15 @@ mono_class_get_events (MonoClass* klass, gpointer *iter)
 
 /**
  * mono_class_get_interfaces
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * This routine is an iterator routine for retrieving the interfaces implemented by this class.
  *
- * You must pass a gpointer that points to zero and is treated as an opaque handle to
+ * You must pass a \c gpointer that points to zero and is treated as an opaque handle to
  * iterate over all of the elements.  When no more values are
  * available, the return value is NULL.
  *
- * Returns: a @Monoclass* on each invocation, or NULL when no more are available.
+ * \returns a \c MonoClass* on each invocation, or NULL when no more are available.
  */
 MonoClass*
 mono_class_get_interfaces (MonoClass* klass, gpointer *iter)
@@ -9286,16 +9294,16 @@ setup_nested_types (MonoClass *klass)
 
 /**
  * mono_class_get_nested_types
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
  * This routine is an iterator routine for retrieving the nested types of a class.
- * This works only if @klass is non-generic, or a generic type definition.
+ * This works only if \p klass is non-generic, or a generic type definition.
  *
- * You must pass a gpointer that points to zero and is treated as an opaque handle to
+ * You must pass a \c gpointer that points to zero and is treated as an opaque handle to
  * iterate over all of the elements.  When no more values are
  * available, the return value is NULL.
  *
- * Returns: a @Monoclass* on each invocation, or NULL when no more are available.
+ * \returns a \c Monoclass* on each invocation, or NULL when no more are available.
  */
 MonoClass*
 mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
@@ -9330,9 +9338,9 @@ mono_class_get_nested_types (MonoClass* klass, gpointer *iter)
 
 /**
  * mono_class_is_delegate
- * @klass: the MonoClass to act on
+ * \param klass the \c MonoClass to act on
  *
- * Returns: TRUE if the MonoClass represents a System.Delegate.
+ * \returns TRUE if the \c MonoClass represents a \c System.Delegate.
  */
 mono_bool
 mono_class_is_delegate (MonoClass *klass)
@@ -9342,10 +9350,10 @@ mono_class_is_delegate (MonoClass *klass)
 
 /**
  * mono_class_implements_interface
- * @klass: The MonoClass to act on
- * @interface: The interface to check if @klass implements.
+ * \param klass The MonoClass to act on
+ * \param interface The interface to check if \p klass implements.
  *
- * Returns: TRUE if @klass implements @interface.
+ * \returns TRUE if \p klass implements \p interface.
  */
 mono_bool
 mono_class_implements_interface (MonoClass* klass, MonoClass* iface)
@@ -9355,9 +9363,9 @@ mono_class_implements_interface (MonoClass* klass, MonoClass* iface)
 
 /**
  * mono_field_get_name:
- * @field: the MonoClassField to act on
+ * \param field the \c MonoClassField to act on
  *
- * Returns: The name of the field.
+ * \returns The name of the field.
  */
 const char*
 mono_field_get_name (MonoClassField *field)
@@ -9367,9 +9375,8 @@ mono_field_get_name (MonoClassField *field)
 
 /**
  * mono_field_get_type:
- * @field: the MonoClassField to act on
- *
- * Returns: MonoType of the field.
+ * \param field the \c MonoClassField to act on
+ * \returns \c MonoType of the field.
  */
 MonoType*
 mono_field_get_type (MonoClassField *field)
@@ -9386,10 +9393,10 @@ mono_field_get_type (MonoClassField *field)
 
 /**
  * mono_field_get_type_checked:
- * @field: the MonoClassField to act on
- * @error: used to return any erro found while retrieving @field type
+ * \param field the \c MonoClassField to act on
+ * \param error used to return any error found while retrieving \p field type
  *
- * Returns: MonoType of the field.
+ * \returns \c MonoType of the field.
  */
 MonoType*
 mono_field_get_type_checked (MonoClassField *field, MonoError *error)
@@ -9402,9 +9409,9 @@ mono_field_get_type_checked (MonoClassField *field, MonoError *error)
 
 /**
  * mono_field_get_parent:
- * @field: the MonoClassField to act on
+ * \param field the \c MonoClassField to act on
  *
- * Returns: MonoClass where the field was defined.
+ * \returns \c MonoClass where the field was defined.
  */
 MonoClass*
 mono_field_get_parent (MonoClassField *field)
@@ -9414,12 +9421,12 @@ mono_field_get_parent (MonoClassField *field)
 
 /**
  * mono_field_get_flags;
- * @field: the MonoClassField to act on
+ * \param field the \c MonoClassField to act on
  *
  * The metadata flags for a field are encoded using the
- * FIELD_ATTRIBUTE_* constants.  See the tabledefs.h file for details.
+ * \c FIELD_ATTRIBUTE_* constants.  See the \c tabledefs.h file for details.
  *
- * Returns: The flags for the field.
+ * \returns The flags for the field.
  */
 guint32
 mono_field_get_flags (MonoClassField *field)
@@ -9431,9 +9438,9 @@ mono_field_get_flags (MonoClassField *field)
 
 /**
  * mono_field_get_offset:
- * @field: the MonoClassField to act on
+ * \param field the \c MonoClassField to act on
  *
- * Returns: The field offset.
+ * \returns The field offset.
  */
 guint32
 mono_field_get_offset (MonoClassField *field)
@@ -9473,9 +9480,9 @@ mono_field_get_rva (MonoClassField *field)
 
 /**
  * mono_field_get_data:
- * @field: the MonoClassField to act on
+ * \param field the \c MonoClassField to act on
  *
- * Returns: A pointer to the metadata constant value or to the field
+ * \returns A pointer to the metadata constant value or to the field
  * data if it has an RVA flag.
  */
 const char *
@@ -9494,9 +9501,8 @@ mono_field_get_data (MonoClassField *field)
 
 /**
  * mono_property_get_name: 
- * @prop: the MonoProperty to act on
- *
- * Returns: The name of the property
+ * \param prop the \c MonoProperty to act on
+ * \returns The name of the property
  */
 const char*
 mono_property_get_name (MonoProperty *prop)
@@ -9506,9 +9512,8 @@ mono_property_get_name (MonoProperty *prop)
 
 /**
  * mono_property_get_set_method
- * @prop: the MonoProperty to act on.
- *
- * Returns: The setter method of the property (A MonoMethod)
+ * \param prop the \c MonoProperty to act on.
+ * \returns The setter method of the property, a \c MonoMethod.
  */
 MonoMethod*
 mono_property_get_set_method (MonoProperty *prop)
@@ -9518,9 +9523,8 @@ mono_property_get_set_method (MonoProperty *prop)
 
 /**
  * mono_property_get_get_method
- * @prop: the MonoProperty to act on.
- *
- * Returns: The setter method of the property (A MonoMethod)
+ * \param prop the MonoProperty to act on.
+ * \returns The getter method of the property (A \c MonoMethod)
  */
 MonoMethod*
 mono_property_get_get_method (MonoProperty *prop)
@@ -9530,9 +9534,8 @@ mono_property_get_get_method (MonoProperty *prop)
 
 /**
  * mono_property_get_parent:
- * @prop: the MonoProperty to act on.
- *
- * Returns: The MonoClass where the property was defined.
+ * \param prop the \c MonoProperty to act on.
+ * \returns The \c MonoClass where the property was defined.
  */
 MonoClass*
 mono_property_get_parent (MonoProperty *prop)
@@ -9542,12 +9545,12 @@ mono_property_get_parent (MonoProperty *prop)
 
 /**
  * mono_property_get_flags:
- * @prop: the MonoProperty to act on.
+ * \param prop the \c MonoProperty to act on.
  *
  * The metadata flags for a property are encoded using the
- * PROPERTY_ATTRIBUTE_* constants.  See the tabledefs.h file for details.
+ * \c PROPERTY_ATTRIBUTE_* constants.  See the \c tabledefs.h file for details.
  *
- * Returns: The flags for the property.
+ * \returns The flags for the property.
  */
 guint32
 mono_property_get_flags (MonoProperty *prop)
@@ -9557,9 +9560,8 @@ mono_property_get_flags (MonoProperty *prop)
 
 /**
  * mono_event_get_name:
- * @event: the MonoEvent to act on
- *
- * Returns: The name of the event.
+ * \param event the MonoEvent to act on
+ * \returns The name of the event.
  */
 const char*
 mono_event_get_name (MonoEvent *event)
@@ -9569,9 +9571,8 @@ mono_event_get_name (MonoEvent *event)
 
 /**
  * mono_event_get_add_method:
- * @event: The MonoEvent to act on.
- *
- * Returns: The @add' method for the event (a MonoMethod).
+ * \param event The \c MonoEvent to act on.
+ * \returns The \c add method for the event, a \c MonoMethod.
  */
 MonoMethod*
 mono_event_get_add_method (MonoEvent *event)
@@ -9581,9 +9582,8 @@ mono_event_get_add_method (MonoEvent *event)
 
 /**
  * mono_event_get_remove_method:
- * @event: The MonoEvent to act on.
- *
- * Returns: The @remove method for the event (a MonoMethod).
+ * \param event The \c MonoEvent to act on.
+ * \returns The \c remove method for the event, a \c MonoMethod.
  */
 MonoMethod*
 mono_event_get_remove_method (MonoEvent *event)
@@ -9593,9 +9593,8 @@ mono_event_get_remove_method (MonoEvent *event)
 
 /**
  * mono_event_get_raise_method:
- * @event: The MonoEvent to act on.
- *
- * Returns: The @raise method for the event (a MonoMethod).
+ * \param event The \c MonoEvent to act on.
+ * \returns The \c raise method for the event, a \c MonoMethod.
  */
 MonoMethod*
 mono_event_get_raise_method (MonoEvent *event)
@@ -9605,9 +9604,8 @@ mono_event_get_raise_method (MonoEvent *event)
 
 /**
  * mono_event_get_parent:
- * @event: the MonoEvent to act on.
- *
- * Returns: The MonoClass where the event is defined.
+ * \param event the MonoEvent to act on.
+ * \returns The \c MonoClass where the event is defined.
  */
 MonoClass*
 mono_event_get_parent (MonoEvent *event)
@@ -9617,12 +9615,12 @@ mono_event_get_parent (MonoEvent *event)
 
 /**
  * mono_event_get_flags
- * @event: the MonoEvent to act on.
+ * \param event the \c MonoEvent to act on.
  *
  * The metadata flags for an event are encoded using the
- * EVENT_* constants.  See the tabledefs.h file for details.
+ * \c EVENT_* constants.  See the \c tabledefs.h file for details.
  *
- * Returns: The flags for the event.
+ * \returns The flags for the event.
  */
 guint32
 mono_event_get_flags (MonoEvent *event)
@@ -9632,11 +9630,11 @@ mono_event_get_flags (MonoEvent *event)
 
 /**
  * mono_class_get_method_from_name:
- * @klass: where to look for the method
- * @name: name of the method
- * @param_count: number of parameters. -1 for any number.
+ * \param klass where to look for the method
+ * \param name name of the method
+ * \param param_count number of parameters. -1 for any number.
  *
- * Obtains a MonoMethod with a given name and number of parameters.
+ * Obtains a \c MonoMethod with a given name and number of parameters.
  * It only works if there are no multiple signatures for any given method name.
  */
 MonoMethod *
@@ -9690,12 +9688,12 @@ find_method_in_metadata (MonoClass *klass, const char *name, int param_count, in
 
 /**
  * mono_class_get_method_from_name_flags:
- * @klass: where to look for the method
- * @name_space: name of the method
- * @param_count: number of parameters. -1 for any number.
- * @flags: flags which must be set in the method
+ * \param klass where to look for the method
+ * \param name_space name of the method
+ * \param param_count number of parameters. -1 for any number.
+ * \param flags flags which must be set in the method
  *
- * Obtains a MonoMethod with a given name and number of parameters.
+ * Obtains a \c MonoMethod with a given name and number of parameters.
  * It only works if there are no multiple signatures for any given method name.
  */
 MonoMethod *
@@ -9748,9 +9746,9 @@ mono_class_get_method_from_name_flags (MonoClass *klass, const char *name, int p
 
 /**
  * mono_class_set_failure:
- * @klass: class in which the failure was detected
- * @ex_type: the kind of exception/error to be thrown (later)
- * @ex_data: exception data (specific to each type of exception/error)
+ * \param klass class in which the failure was detected
+ * \param ex_type the kind of exception/error to be thrown (later)
+ * \param ex_data exception data (specific to each type of exception/error)
  *
  * Keep a detected failure informations in the class for later processing.
  * Note that only the first failure is kept.
@@ -9783,16 +9781,16 @@ mono_class_has_failure (const MonoClass *klass)
 
 /**
  * mono_class_set_type_load_failure:
- * @klass: class in which the failure was detected
- * @fmt: Printf-style error message string.
+ * \param klass class in which the failure was detected
+ * \param fmt \c printf -style error message string.
  *
  * Collect detected failure informaion in the class for later processing.
- * The error is stored as a MonoErrorBoxed as with mono_error_set_type_load_class ()
+ * The error is stored as a MonoErrorBoxed as with mono_error_set_type_load_class()
  * Note that only the first failure is kept.
  *
- * Returns FALSE if a failure was already set on the class, or TRUE otherwise.
- *
  * LOCKING: Acquires the loader lock.
+ *
+ * \returns FALSE if a failure was already set on the class, or TRUE otherwise.
  */
 gboolean
 mono_class_set_type_load_failure (MonoClass *klass, const char * fmt, ...)
@@ -9866,9 +9864,9 @@ mono_classes_cleanup (void)
 
 /**
  * mono_class_get_exception_for_failure:
- * @klass: class in which the failure was detected
+ * \param klass class in which the failure was detected
  *
- * Return a constructed MonoException than the caller can then throw
+ * \returns a constructed MonoException than the caller can then throw
  * using mono_raise_exception - or NULL if no failure is present (or
  * doesn't result in an exception).
  */
@@ -10155,12 +10153,12 @@ can_access_member (MonoClass *access_klass, MonoClass *member_klass, MonoClass*
 
 /**
  * mono_method_can_access_field:
- * @method: Method that will attempt to access the field
- * @field: the field to access
+ * \param method Method that will attempt to access the field
+ * \param field the field to access
  *
  * Used to determine if a method is allowed to access the specified field.
  *
- * Returns: TRUE if the given @method is allowed to access the @field while following
+ * \returns TRUE if the given \p method is allowed to access the \p field while following
  * the accessibility rules of the CLI.
  */
 gboolean
@@ -10182,12 +10180,12 @@ mono_method_can_access_field (MonoMethod *method, MonoClassField *field)
 
 /**
  * mono_method_can_access_method:
- * @method: Method that will attempt to access the other method
- * @called: the method that we want to probe for accessibility.
+ * \param method Method that will attempt to access the other method
+ * \param called the method that we want to probe for accessibility.
  *
- * Used to determine if the @method is allowed to access the specified @called method.
+ * Used to determine if the \p method is allowed to access the specified \p called method.
  *
- * Returns: TRUE if the given @method is allowed to invoke the @called while following
+ * \returns TRUE if the given \p method is allowed to invoke the \p called while following
  * the accessibility rules of the CLI.
  */
 gboolean
@@ -10320,9 +10318,8 @@ mono_class_can_access_class (MonoClass *source_class, MonoClass *target_class)
 
 /**
  * mono_type_is_valid_enum_basetype:
- * @type: The MonoType to check
- *
- * Returns: TRUE if the type can be used as the basetype of an enum
+ * \param type The MonoType to check
+ * \returns TRUE if the type can be used as the basetype of an enum
  */
 gboolean mono_type_is_valid_enum_basetype (MonoType * type) {
        switch (type->type) {
@@ -10346,15 +10343,15 @@ gboolean mono_type_is_valid_enum_basetype (MonoType * type) {
 
 /**
  * mono_class_is_valid_enum:
- * @klass: An enum class to be validated
+ * \param klass An enum class to be validated
  *
  * This method verify the required properties an enum should have.
- *  
- * Returns: TRUE if the informed enum class is valid 
  *
  * FIXME: TypeBuilder enums are allowed to implement interfaces, but since they cannot have methods, only empty interfaces are possible
  * FIXME: enum types are not allowed to have a cctor, but mono_reflection_create_runtime_class sets has_cctor to 1 for all types
  * FIXME: TypeBuilder enums can have any kind of static fields, but the spec is very explicit about that (P II 14.3)
+ *
+ * \returns TRUE if the informed enum class is valid 
  */
 gboolean
 mono_class_is_valid_enum (MonoClass *klass)
@@ -10571,7 +10568,7 @@ mono_field_resolve_flags (MonoClassField *field)
 
 /**
  * mono_class_get_fields_lazy:
- * @klass: the MonoClass to act on
+ * \param klass the MonoClass to act on
  *
  * This routine is an iterator routine for retrieving the fields in a class.
  * Only minimal information about fields are loaded. Accessors must be used
@@ -10581,7 +10578,7 @@ mono_field_resolve_flags (MonoClassField *field)
  * iterate over all of the elements.  When no more values are
  * available, the return value is NULL.
  *
- * Returns: a @MonoClassField* on each iteration, or NULL when no more fields are available.
+ * \returns a \c MonoClassField* on each iteration, or NULL when no more fields are available.
  */
 MonoClassField*
 mono_class_get_fields_lazy (MonoClass* klass, gpointer *iter)
@@ -10622,17 +10619,17 @@ GENERATE_TRY_GET_CLASS_WITH_CACHE (safehandle, "System.Runtime.InteropServices",
 
 /**
  * mono_method_get_base_method:
- * @method: a method
- * @definition: if true, get the definition
- * @error: set on failure
+ * \param method a method
+ * \param definition if true, get the definition
+ * \param error set on failure
  *
  * Given a virtual method associated with a subclass, return the corresponding
- * method from an ancestor.  If @definition is FALSE, returns the method in the
- * superclass of the given method.  If @definition is TRUE, return the method
+ * method from an ancestor.  If \p definition is FALSE, returns the method in the
+ * superclass of the given method.  If \p definition is TRUE, return the method
  * in the ancestor class where it was first declared.  The type arguments will
  * be inflated in the ancestor classes.  If the method is not associated with a
  * class, or isn't virtual, returns the method itself.  On failure returns NULL
- * and sets @error.
+ * and sets \p error.
  */
 MonoMethod*
 mono_method_get_base_method (MonoMethod *method, gboolean definition, MonoError *error)
index 22189e2153dbd24e917f0ddb618f0618b26c3e80..f79cd9bff99e928cd3b8c9834b69311126c43fcd 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_CLI_CLASS_H_
 #define _MONO_CLI_CLASS_H_
 
index ec9f9bd02a2a8639408c117c7596d1806c3f131a..795ee2e5ea40b44cc97747caa9c445107ab148b4 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index b5679c919e0eaf6b781ddbff542a6036840d6d83..86309ef20234d4dd559726f0c9fcfe1a32f08e32 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * cominterop.c: COM Interop Support
+/**
+ * \file
+ * COM Interop Support
  * 
  *
  * (C) 2002 Ximian, Inc.  http://www.ximian.com
@@ -932,9 +933,8 @@ cominterop_get_native_wrapper_adjusted (MonoMethod *method)
 
 /**
  * mono_cominterop_get_native_wrapper:
- * @method: managed method
- *
- * Returns: the generated method to call
+ * \param method managed method
+ * \returns the generated method to call
  */
 MonoMethod *
 mono_cominterop_get_native_wrapper (MonoMethod *method)
@@ -1047,9 +1047,8 @@ mono_cominterop_get_native_wrapper (MonoMethod *method)
 
 /**
  * mono_cominterop_get_invoke:
- * @method: managed method
- *
- * Returns: the generated method that calls the underlying __ComObject
+ * \param method managed method
+ * \returns the generated method that calls the underlying \c __ComObject
  * rather than the proxy object.
  */
 MonoMethod *
@@ -2181,9 +2180,8 @@ mono_marshal_free_ccw_entry (gpointer key, gpointer value, gpointer user_data)
 
 /**
  * mono_marshal_free_ccw:
- * @object: the mono object
- *
- * Returns: whether the object had a CCW
+ * \param object the mono object
+ * \returns whether the object had a CCW
  */
 gboolean
 mono_marshal_free_ccw (MonoObject* object)
index d80021aa93bba6172773640a9e9d23c49917d76f..fc0e00297708d5b612828f629f18d806b9d7d291 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * cominterop.h: COM Interop Support
+/**
+ * \file
+ * COM Interop Support
  * 
  *
  * (C) 2002 Ximian, Inc.  http://www.ximian.com
index 9ec32ddd0e6931289dcfba14bf381ce7e0ceedf7..c5c572e58acfd40eabef646ccdf0e4f93931bc38 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * console-io.h: Console IO internal calls
+/**
+ * \file
+ * Console IO internal calls
  *
  * Author:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
index 233e2aef04e734058d89cc489fefd13fd135d998..83145afb536bd489eaa70f3e958b0ccd4c43def9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * console-null.c: Null driver, does nothing.
+/**
+ * \file
+ * Null driver, does nothing.
  *
  * Author:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
index 59d55ee8d6b519244525a91b3197be3b95460c25..98b3ba551cb005a3af4cbadc884cb576a81e4984 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * console-io.c: ConsoleDriver internal calls for Unix systems.
+/**
+ * \file
+ * ConsoleDriver internal calls for Unix systems.
  *
  * Author:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
index e0cd222e83378d4161d9be5346b835690e5d0433..0022457bbf561f3ef77af2dafbbd4e521e8a97de 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 542bc95ed22e0364b89531c0b705d63dd23b151e..5770f0beb1facae7f7bc3fa406ce7b7a8b35724d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * console-win32-uwp.c: UWP console support for Mono.
+/**
+ * \file
+ * UWP console support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 06a0244477e1afd5e3a0ba40d4fddcd4c8e56ed1..ab856f6449d1afd21506d6d46850e0e1d63e9e76 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * console-io.c: ConsoleDriver internal calls for Win32
+/**
+ * \file
+ * ConsoleDriver internal calls for Win32
  *
  * Author:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
index 393ad777403ae81040b0ac0b3d106505741062cf..38dc3e13086ed34d8f89dc83c3a5824d75146d31 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index d75660775e7153a663bcf048cdd7046b92eea063..ef4c2b773b2646492cc85b084bea638f07f9083b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * coree-windows-uwp.c: UWP coree support for Mono.
+/**
+ * \file
+ * UWP coree support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 0ce8810d4c224354306cb72cd01cf6d64f573da1..75a9b3bd8c41c6717eaa807afbf4004c9e2d1dd3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * coree.c: mscoree.dll functions
+/**
+ * \file
+ * mscoree.dll functions
  *
  * Author:
  *   Kornel Pal <http://www.kornelpal.hu/>
@@ -19,7 +20,7 @@
 #include "cil-coff.h"
 #include "metadata-internals.h"
 #include "image.h"
-#include "assembly.h"
+#include "assembly-internals.h"
 #include "domain-internals.h"
 #include "appdomain.h"
 #include "object.h"
@@ -119,7 +120,7 @@ BOOL STDMETHODCALLTYPE _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpRes
                 * probably be delayed until the first call to an exported function.
                 */
                if (image->tables [MONO_TABLE_ASSEMBLY].rows && ((MonoCLIImageInfo*) image->image_info)->cli_cli_header.ch_vtable_fixups.rva)
-                       assembly = mono_assembly_open (file_name, NULL);
+                       assembly = mono_assembly_open_predicate (file_name, FALSE, FALSE, NULL, NULL, NULL);
 
                g_free (file_name);
                break;
@@ -170,7 +171,7 @@ __int32 STDMETHODCALLTYPE _CorExeMain(void)
                ExitProcess (1);
        }
 
-       assembly = mono_assembly_open (file_name, NULL);
+       assembly = mono_assembly_open_predicate (file_name, FALSE, FALSE, NULL, NULL, NULL);
        mono_close_exe_image ();
        if (!assembly) {
                g_free (file_name);
index 1b139b692026ed0aa35e7a8f83f73997785223b7..7ddfad6165c8bfb97a1db3d5714fd10551c7e666 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * coree.h: mscoree.dll functions
+/**
+ * \file
+ * mscoree.dll functions
  *
  * Author:
  *   Kornel Pal <http://www.kornelpal.hu/>
index 89b744761bf04312b03558dc2459fbbde069d158..4d8cab37139d108d86dc723fcd8c0eb72b798b86 100644 (file)
@@ -390,9 +390,9 @@ static const NumberFormatEntry number_format_entries [] = {
        {1264, 1328, 1264, 1328, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1795, 1811, 1824, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {2, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1854, 1865, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {1264, 1328, 1264, 1328, 0, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {1264, 1328, 1264, 1328, 0, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1, 1264, 1, 1264, 1875, 1494, 0, 1296, 1347, 1311, 55, 1357, 3, 0, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1884, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1888, 1337, 1891, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
@@ -425,20 +425,20 @@ static const NumberFormatEntry number_format_entries [] = {
        {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
+       {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, 2}},
        {11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
        {2067, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 0, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, -1}},
        {11, 1264, 11, 1264, 2069, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
-       {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, 0}, {3, 0}},
+       {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
+       {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2126, 1337, 2128, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
+       {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 0, 1337, 1339, 1343, 1347, 1311, 55, 1357, 0, 0, 1, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
+       {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 0, 1337, 0, 1343, 1497, 1505, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2183, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 11, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
@@ -449,13 +449,13 @@ static const NumberFormatEntry number_format_entries [] = {
        {11, 1264, 11, 1264, 2197, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1328, 11, 1328, 1924, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
+       {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, -1}},
        {11, 1264, 11, 1264, 2197, 1337, 1339, 1296, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2201, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2205, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+       {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1539, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
@@ -498,9 +498,9 @@ static const NumberFormatEntry number_format_entries [] = {
        {1264, 1328, 1264, 1328, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1795, 1811, 1824, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {1264, 1328, 1264, 1328, 1359, 1337, 1828, 1343, 1831, 1843, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {2, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1854, 1865, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1, 1264, 1, 1264, 1875, 1494, 0, 1296, 1347, 1311, 55, 1357, 3, 0, 0, 0, 3, 0, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1884, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1888, 1337, 1891, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 0, 2, {3, -1}, {3, -1}},
@@ -531,19 +531,19 @@ static const NumberFormatEntry number_format_entries [] = {
        {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, 2}, {3, 2}},
+       {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 2, 2, 1, 2, 2, {3, -1}, {3, 2}},
        {11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
        {2067, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 2263, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {11, 1264, 11, 1264, 1380, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, 0}, {3, -1}},
        {11, 1264, 11, 1264, 2069, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, 0}},
-       {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, 0}, {3, 0}},
+       {11, 1264, 11, 1264, 2072, 1337, 1339, 1343, 1347, 1311, 55, 1357, 5, 1, 1, 1, 2, 2, 2, {3, -1}, {3, -1}},
+       {1264, 11, 1264, 11, 2076, 1337, 2080, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2126, 1337, 2128, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1971, 1337, 0, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 2}, {3, 2}},
-       {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
-       {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, 0}, {3, 0}},
+       {11, 1264, 11, 1264, 2168, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {11, 1264, 11, 1264, 2176, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 1, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2267, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 2}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 11, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 2190, 1494, 1339, 1296, 1753, 1311, 1769, 1777, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
@@ -552,13 +552,13 @@ static const NumberFormatEntry number_format_entries [] = {
        {11, 1264, 11, 1264, 2197, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1328, 11, 1328, 1924, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, 0}},
+       {1264, 11, 1264, 11, 1411, 1337, 1729, 1343, 1347, 1311, 55, 1357, 12, 2, 0, 0, 1, 2, 2, {3, 0}, {3, -1}},
        {11, 1264, 11, 1264, 2197, 1337, 1339, 1296, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1792, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2205, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+       {11, 1264, 11, 1264, 1380, 1337, 0, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1539, 1337, 1339, 1343, 1347, 1311, 55, 1357, 2, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
@@ -579,7 +579,7 @@ static const NumberFormatEntry number_format_entries [] = {
        {1264, 11, 1264, 11, 2292, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 2292, 1337, 1645, 1343, 1662, 1690, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1359, 1337, 1729, 1736, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1753, 1311, 1769, 1777, 1, 0, 1, 2, 1, 2, 2, {3, -1}, {3, -1}},
+       {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1753, 1311, 1769, 1777, 1, 0, 1, 2, 1, 2, 2, {3, 2}, {3, -1}},
        {1264, 1328, 1264, 1328, 2253, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1328, 11, 1328, 2294, 1337, 0, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
@@ -589,7 +589,7 @@ static const NumberFormatEntry number_format_entries [] = {
        {1264, 1328, 1264, 1328, 2296, 1494, 2303, 1296, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2336, 1337, 1339, 1343, 1347, 1311, 55, 1357, 12, 2, 1, 0, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 2340, 1494, 1339, 1296, 1347, 1311, 55, 1517, 9, 2, 9, 3, 2, 0, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 2343, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
+       {11, 1264, 11, 1264, 2343, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 2, 2, {3, 2}, {3, 2}},
        {11, 1264, 11, 1264, 1971, 1337, 1339, 1343, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2201, 1337, 1339, 1343, 1347, 1311, 55, 1357, 1, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2347, 1276, 1281, 1296, 1299, 1311, 1320, 1324, 3, 2, 0, 0, 3, 2, 2, {3, -1}, {3, -1}},
@@ -667,7 +667,7 @@ static const NumberFormatEntry number_format_entries [] = {
        {11, 1264, 11, 1264, 2292, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2562, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
-       {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, 0}},
+       {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 1464, 1337, 1339, 1343, 1466, 1476, 55, 1357, 1, 0, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 2423, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 2373, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
@@ -685,7 +685,7 @@ static const NumberFormatEntry number_format_entries [] = {
        {11, 1264, 11, 1264, 2357, 1337, 2239, 1343, 1347, 1311, 55, 1357, 0, 0, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 1726, 1276, 1339, 1296, 1347, 1311, 55, 1324, 9, 2, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 2573, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
-       {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, 0}, {3, 0}},
+       {1264, 1328, 1264, 1328, 1999, 1337, 0, 1343, 1347, 1311, 55, 1357, 8, 3, 1, 1, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 11, 1264, 11, 1359, 1337, 1339, 1343, 1347, 1311, 55, 1357, 8, 3, 0, 0, 1, 2, 2, {3, -1}, {3, -1}},
        {1264, 1328, 1264, 1328, 2257, 1494, 2041, 1296, 1347, 1311, 55, 1357, 9, 2, 1, 1, 1, 0, 2, {3, -1}, {3, -1}},
        {11, 1264, 11, 1264, 2340, 1494, 1339, 1296, 1347, 1311, 55, 1517, 9, 2, 9, 3, 2, 2, 2, {3, -1}, {3, -1}},
index f88f8dcd7834f34221dfe062b01c26c3a726431e..69e9005e1e2f91422154d36399f92c196ad7f05b 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_CULTURE_INFO_H_
 #define _MONO_METADATA_CULTURE_INFO_H_ 1
index 76bd1c21d8c1d94472af2886d8acc519d5afba0b..1f9150c33e36cc2c86ef85af3c63773ae76f8277 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_METADATA_CUSTOM_ATTRS_INTERNALS_H__
 #define __MONO_METADATA_CUSTOM_ATTRS_INTERNALS_H__
 
index 889315f06531e409d02ea705a7726a96a9de430e..4e13903d90d43197c378b3ce4522900e8537629e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * custom-attrs.c: Custom attributes.
+/**
+ * \file
+ * Custom attributes.
  * 
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -1055,6 +1056,9 @@ mono_custom_attrs_construct_by_type (MonoCustomAttrInfo *cinfo, MonoClass *attr_
        return result;
 }
 
+/**
+ * mono_custom_attrs_construct:
+ */
 MonoArray*
 mono_custom_attrs_construct (MonoCustomAttrInfo *cinfo)
 {
@@ -1098,8 +1102,7 @@ mono_custom_attrs_from_index (MonoImage *image, guint32 idx)
 }
 /**
  * mono_custom_attrs_from_index_checked:
- *
- * Returns: NULL if no attributes are found.  On error returns NULL and sets @error.
+ * \returns NULL if no attributes are found.  On error returns NULL and sets \p error.
  */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_index_checked (MonoImage *image, guint32 idx, gboolean ignore_missing, MonoError *error)
@@ -1176,6 +1179,9 @@ mono_custom_attrs_from_index_checked (MonoImage *image, guint32 idx, gboolean ig
        return ainfo;
 }
 
+/**
+ * mono_custom_attrs_from_method:
+ */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_method (MonoMethod *method)
 {
@@ -1214,6 +1220,9 @@ mono_custom_attrs_from_method_checked (MonoMethod *method, MonoError *error)
        return mono_custom_attrs_from_index_checked (method->klass->image, idx, FALSE, error);
 }
 
+/**
+ * mono_custom_attrs_from_class:
+ */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_class (MonoClass *klass)
 {
@@ -1248,6 +1257,9 @@ mono_custom_attrs_from_class_checked (MonoClass *klass, MonoError *error)
        return mono_custom_attrs_from_index_checked (klass->image, idx, FALSE, error);
 }
 
+/**
+ * mono_custom_attrs_from_assembly:
+ */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_assembly (MonoAssembly *assembly)
 {
@@ -1285,6 +1297,9 @@ mono_custom_attrs_from_module (MonoImage *image, MonoError *error)
        return mono_custom_attrs_from_index_checked (image, idx, FALSE, error);
 }
 
+/**
+ * mono_custom_attrs_from_property:
+ */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_property (MonoClass *klass, MonoProperty *property)
 {
@@ -1309,6 +1324,9 @@ mono_custom_attrs_from_property_checked (MonoClass *klass, MonoProperty *propert
        return mono_custom_attrs_from_index_checked (klass->image, idx, FALSE, error);
 }
 
+/**
+ * mono_custom_attrs_from_event:
+ */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_event (MonoClass *klass, MonoEvent *event)
 {
@@ -1333,6 +1351,9 @@ mono_custom_attrs_from_event_checked (MonoClass *klass, MonoEvent *event, MonoEr
        return mono_custom_attrs_from_index_checked (klass->image, idx, FALSE, error);
 }
 
+/**
+ * mono_custom_attrs_from_field:
+ */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_field (MonoClass *klass, MonoClassField *field)
 {
@@ -1360,12 +1381,12 @@ mono_custom_attrs_from_field_checked (MonoClass *klass, MonoClassField *field, M
 
 /**
  * mono_custom_attrs_from_param:
- * @method: handle to the method that we want to retrieve custom parameter information from
- * @param: parameter number, where zero represent the return value, and one is the first parameter in the method
+ * \param method handle to the method that we want to retrieve custom parameter information from
+ * \param param parameter number, where zero represent the return value, and one is the first parameter in the method
  *
  * The result must be released with mono_custom_attrs_free().
  *
- * Returns: the custom attribute object for the specified parameter, or NULL if there are none.
+ * \returns the custom attribute object for the specified parameter, or NULL if there are none.
  */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_param (MonoMethod *method, guint32 param)
@@ -1378,13 +1399,13 @@ mono_custom_attrs_from_param (MonoMethod *method, guint32 param)
 
 /**
  * mono_custom_attrs_from_param_checked:
- * @method: handle to the method that we want to retrieve custom parameter information from
- * @param: parameter number, where zero represent the return value, and one is the first parameter in the method
- * @error: set on error
+ * \param method handle to the method that we want to retrieve custom parameter information from
+ * \param param parameter number, where zero represent the return value, and one is the first parameter in the method
+ * \param error set on error
  *
  * The result must be released with mono_custom_attrs_free().
  *
- * Returns: the custom attribute object for the specified parameter, or NULL if there are none.  On failure returns NULL and sets @error.
+ * \returns the custom attribute object for the specified parameter, or NULL if there are none.  On failure returns NULL and sets \p error.
  */
 MonoCustomAttrInfo*
 mono_custom_attrs_from_param_checked (MonoMethod *method, guint32 param, MonoError *error)
@@ -1454,6 +1475,9 @@ mono_custom_attrs_from_param_checked (MonoMethod *method, guint32 param, MonoErr
        return mono_custom_attrs_from_index_checked (image, idx, FALSE, error);
 }
 
+/**
+ * mono_custom_attrs_has_attr:
+ */
 gboolean
 mono_custom_attrs_has_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass)
 {
@@ -1469,6 +1493,9 @@ mono_custom_attrs_has_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass)
        return FALSE;
 }
 
+/**
+ * mono_custom_attrs_get_attr:
+ */
 MonoObject*
 mono_custom_attrs_get_attr (MonoCustomAttrInfo *ainfo, MonoClass *attr_klass)
 {
@@ -1502,12 +1529,12 @@ mono_custom_attrs_get_attr_checked (MonoCustomAttrInfo *ainfo, MonoClass *attr_k
        return create_custom_attr (ainfo->image, centry->ctor, centry->data, centry->data_size, error);
 }
 
-/*
+/**
  * mono_reflection_get_custom_attrs_info:
- * @obj: a reflection object handle
+ * \param obj a reflection object handle
  *
- * Return the custom attribute info for attributes defined for the
- * reflection handle @obj. The objects.
+ * \returns the custom attribute info for attributes defined for the
+ * reflection handle \p obj. The objects.
  *
  * FIXME this function leaks like a sieve for SRE objects.
  */
@@ -1522,13 +1549,11 @@ mono_reflection_get_custom_attrs_info (MonoObject *obj)
 
 /**
  * mono_reflection_get_custom_attrs_info_checked:
- * @obj: a reflection object handle
- * @error: set on error
+ * \param obj a reflection object handle
+ * \param error set on error
  *
- * Return the custom attribute info for attributes defined for the
- * reflection handle @obj. The objects.
- *
- * On failure returns NULL and sets @error.
+ * \returns the custom attribute info for attributes defined for the
+ * reflection handle \p obj. The objects. On failure returns NULL and sets \p error.
  *
  * FIXME this function leaks like a sieve for SRE objects.
  */
@@ -1635,12 +1660,11 @@ mono_reflection_get_custom_attrs_info_checked (MonoObject *obj, MonoError *error
        return cinfo;
 }
 
-/*
+/**
  * mono_reflection_get_custom_attrs_by_type:
- * @obj: a reflection object handle
- *
- * Return an array with all the custom attributes defined of the
- * reflection handle @obj. If @attr_klass is non-NULL, only custom attributes 
+ * \param obj a reflection object handle
+ * \returns an array with all the custom attributes defined of the
+ * reflection handle \p obj. If \p attr_klass is non-NULL, only custom attributes 
  * of that type are returned. The objects are fully build. Return NULL if a loading error
  * occurs.
  */
@@ -1667,12 +1691,11 @@ mono_reflection_get_custom_attrs_by_type (MonoObject *obj, MonoClass *attr_klass
        return result;
 }
 
-/*
+/**
  * mono_reflection_get_custom_attrs:
- * @obj: a reflection object handle
- *
- * Return an array with all the custom attributes defined of the
- * reflection handle @obj. The objects are fully build. Return NULL if a loading error
+ * \param obj a reflection object handle
+ * \return an array with all the custom attributes defined of the
+ * reflection handle \p obj. The objects are fully build. Return NULL if a loading error
  * occurs.
  */
 MonoArray*
@@ -1683,11 +1706,10 @@ mono_reflection_get_custom_attrs (MonoObject *obj)
        return mono_reflection_get_custom_attrs_by_type (obj, NULL, &error);
 }
 
-/*
+/**
  * mono_reflection_get_custom_attrs_data:
- * @obj: a reflection obj handle
- *
- * Returns an array of System.Reflection.CustomAttributeData,
+ * \param obj a reflection obj handle
+ * \returns an array of \c System.Reflection.CustomAttributeData,
  * which include information about attributes reflected on
  * types loaded using the Reflection Only methods
  */
@@ -1838,13 +1860,11 @@ custom_attr_class_name_from_method_token (MonoImage *image, guint32 method_token
 
 /**
  * mono_assembly_metadata_foreach_custom_attr:
- * @assembly: the assembly to iterate over
- * @func: the function to call for each custom attribute
- * @user_data: passed to @func
- *
- * Calls @func for each custom attribute type on the given assembly until @func returns TRUE.
+ * \param assembly the assembly to iterate over
+ * \param func the function to call for each custom attribute
+ * \param user_data passed to \p func
+ * Calls \p func for each custom attribute type on the given assembly until \p func returns TRUE.
  * Everything is done using low-level metadata APIs, so it is safe to use during assembly loading.
- *
  */
 void
 mono_assembly_metadata_foreach_custom_attr (MonoAssembly *assembly, MonoAssemblyMetadataCustomAttrIterFunc func, gpointer user_data)
index d0937fdf70af561b9dcd6d9653a953f985b5a5d8..df6a4fed185b5e3bcf438a30654406119eb2f417 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * debug-helpers.c:
+/**
+ * \file
  *
  * Author:
  *     Mono Project (http://www.mono-project.com)
@@ -223,6 +223,9 @@ mono_type_get_desc (GString *res, MonoType *type, gboolean include_namespace)
                g_string_append_c (res, '&');
 }
 
+/**
+ * mono_type_full_name:
+ */
 char*
 mono_type_full_name (MonoType *type)
 {
@@ -233,6 +236,9 @@ mono_type_full_name (MonoType *type)
        return g_string_free (str, FALSE);
 }
 
+/**
+ * mono_signature_get_desc:
+ */
 char*
 mono_signature_get_desc (MonoMethodSignature *sig, gboolean include_namespace)
 {
@@ -280,8 +286,8 @@ mono_signature_full_name (MonoMethodSignature *sig)
        return result;
 }
 
-static void
-ginst_get_desc (GString *str, MonoGenericInst *ginst)
+void
+mono_ginst_get_desc (GString *str, MonoGenericInst *ginst)
 {
        int i;
 
@@ -302,11 +308,11 @@ mono_context_get_desc (MonoGenericContext *context)
        g_string_append (str, "<");
 
        if (context->class_inst)
-               ginst_get_desc (str, context->class_inst);
+               mono_ginst_get_desc (str, context->class_inst);
        if (context->method_inst) {
                if (context->class_inst)
                        g_string_append (str, "; ");
-               ginst_get_desc (str, context->method_inst);
+               mono_ginst_get_desc (str, context->method_inst);
        }
 
        g_string_append (str, ">");
@@ -317,19 +323,19 @@ mono_context_get_desc (MonoGenericContext *context)
 
 /**
  * mono_method_desc_new:
- * @name: the method name.
- * @include_namespace: whether the name includes a namespace or not.
+ * \param name the method name.
+ * \param include_namespace whether the name includes a namespace or not.
  *
- * Creates a method description for @name, which conforms to the following
+ * Creates a method description for \p name, which conforms to the following
  * specification:
  *
- * [namespace.]classname:methodname[(args...)]
+ * <code>[namespace.]classname:methodname[(args...)]</code>
  *
  * in all the loaded assemblies.
  *
- * Both classname and methodname can contain '*' which matches anything.
+ * Both classname and methodname can contain <code>*</code> which matches anything.
  *
- * Returns: a parsed representation of the method description.
+ * \returns a parsed representation of the method description.
  */
 MonoMethodDesc*
 mono_method_desc_new (const char *name, gboolean include_namespace)
@@ -400,6 +406,9 @@ mono_method_desc_new (const char *name, gboolean include_namespace)
        return result;
 }
 
+/**
+ * mono_method_desc_from_method:
+ */
 MonoMethodDesc*
 mono_method_desc_from_method (MonoMethod *method)
 {
@@ -416,9 +425,8 @@ mono_method_desc_from_method (MonoMethod *method)
 
 /**
  * mono_method_desc_free:
- * @desc: method description to be released
- *
- * Releases the MonoMethodDesc object @desc.
+ * \param desc method description to be released
+ * Releases the \c MonoMethodDesc object \p desc.
  */
 void
 mono_method_desc_free (MonoMethodDesc *desc)
@@ -431,14 +439,14 @@ mono_method_desc_free (MonoMethodDesc *desc)
 }
 
 /**
- * mono_method_descr_match:
- * @desc: MonoMethoDescription
- * @method: MonoMethod to test
+ * mono_method_desc_match:
+ * \param desc \c MonoMethoDescription
+ * \param method \c MonoMethod to test
  *
- * Determines whether the specified @method matches the provided @desc description.
+ * Determines whether the specified \p method matches the provided \p desc description.
  *
  * namespace and class are supposed to match already if this function is used.
- * Returns: True if the method matches the description, false otherwise.
+ * \returns TRUE if the method matches the description, FALSE otherwise.
  */
 gboolean
 mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method)
@@ -506,6 +514,9 @@ match_class (MonoMethodDesc *desc, int pos, MonoClass *klass)
        return match_class (desc, pos, klass->nested_in);
 }
 
+/**
+ * mono_method_desc_full_match:
+ */
 gboolean
 mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method)
 {
@@ -517,6 +528,9 @@ mono_method_desc_full_match (MonoMethodDesc *desc, MonoMethod *method)
        return mono_method_desc_match (desc, method);
 }
 
+/**
+ * mono_method_desc_search_in_class:
+ */
 MonoMethod*
 mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass)
 {
@@ -529,6 +543,9 @@ mono_method_desc_search_in_class (MonoMethodDesc *desc, MonoClass *klass)
        return NULL;
 }
 
+/**
+ * mono_method_desc_search_in_image:
+ */
 MonoMethod*
 mono_method_desc_search_in_image (MonoMethodDesc *desc, MonoImage *image)
 {
@@ -754,6 +771,9 @@ default_dh = {
        NULL  /* user data */
 };
 
+/**
+ * mono_disasm_code_one:
+ */
 char*
 mono_disasm_code_one (MonoDisHelper *dh, MonoMethod *method, const guchar *ip, const guchar **endp)
 {
@@ -772,6 +792,9 @@ mono_disasm_code_one (MonoDisHelper *dh, MonoMethod *method, const guchar *ip, c
        return result;
 }
 
+/**
+ * mono_disasm_code:
+ */
 char*
 mono_disasm_code (MonoDisHelper *dh, MonoMethod *method, const guchar *ip, const guchar* end)
 {
@@ -791,9 +814,8 @@ mono_disasm_code (MonoDisHelper *dh, MonoMethod *method, const guchar *ip, const
 
 /**
  * mono_field_full_name:
- * @field: field to retrieve information for
- *
- * Returns: the full name for the field, made up of the namespace, type name and the field name.
+ * \param field field to retrieve information for
+ * \returns the full name for the field, made up of the namespace, type name and the field name.
  */
 char *
 mono_field_full_name (MonoClassField *field)
@@ -814,6 +836,7 @@ mono_method_get_name_full (MonoMethod *method, gboolean signature, gboolean ret,
        char wrapper [64];
        char *klass_desc;
        char *inst_desc = NULL;
+       MonoError error;
 
        if (format == MONO_TYPE_NAME_FORMAT_IL)
                klass_desc = mono_type_full_name (&method->klass->byval_arg);
@@ -826,7 +849,7 @@ mono_method_get_name_full (MonoMethod *method, gboolean signature, gboolean ret,
                        g_string_append (str, "<");
                else
                        g_string_append (str, "[");
-               ginst_get_desc (str, ((MonoMethodInflated*)method)->context.method_inst);
+               mono_ginst_get_desc (str, ((MonoMethodInflated*)method)->context.method_inst);
                if (format == MONO_TYPE_NAME_FORMAT_IL)
                        g_string_append_c (str, '>');
                else
@@ -842,7 +865,7 @@ mono_method_get_name_full (MonoMethod *method, gboolean signature, gboolean ret,
                        g_string_append (str, "<");
                else
                        g_string_append (str, "[");
-               ginst_get_desc (str, container->context.method_inst);
+               mono_ginst_get_desc (str, container->context.method_inst);
                if (format == MONO_TYPE_NAME_FORMAT_IL)
                        g_string_append_c (str, '>');
                else
@@ -858,14 +881,22 @@ mono_method_get_name_full (MonoMethod *method, gboolean signature, gboolean ret,
                strcpy (wrapper, "");
 
        if (signature) {
-               char *tmpsig = mono_signature_get_desc (mono_method_signature (method), TRUE);
+               MonoMethodSignature *sig = mono_method_signature_checked (method, &error);
+               char *tmpsig;
+
+               if (!is_ok (&error)) {
+                       tmpsig = g_strdup_printf ("<unable to load signature>");
+                       mono_error_cleanup (&error);
+               } else {
+                       tmpsig = mono_signature_get_desc (sig, TRUE);
+               }
 
                if (method->wrapper_type != MONO_WRAPPER_NONE)
                        sprintf (wrapper, "(wrapper %s) ", wrapper_type_to_str (method->wrapper_type));
                else
                        strcpy (wrapper, "");
-               if (ret) {
-                       char *ret_str = mono_type_full_name (mono_method_signature (method)->ret);
+               if (ret && sig) {
+                       char *ret_str = mono_type_full_name (sig->ret);
                        res = g_strdup_printf ("%s%s %s:%s%s (%s)", wrapper, ret_str, klass_desc,
                                                                   method->name, inst_desc ? inst_desc : "", tmpsig);
                        g_free (ret_str);
@@ -885,6 +916,9 @@ mono_method_get_name_full (MonoMethod *method, gboolean signature, gboolean ret,
        return res;
 }
 
+/**
+ * mono_method_full_name:
+ */
 char *
 mono_method_full_name (MonoMethod *method, gboolean signature)
 {
@@ -915,7 +949,7 @@ print_name_space (MonoClass *klass)
 /**
  * mono_object_describe:
  *
- * Prints to stdout a small description of the object @obj.
+ * Prints to stdout a small description of the object \p obj.
  * For use in a debugger.
  */
 void
@@ -1067,7 +1101,7 @@ objval_describe (MonoClass *klass, const char *addr)
 /**
  * mono_object_describe_fields:
  *
- * Prints to stdout a small description of each field of the object @obj.
+ * Prints to stdout a small description of each field of the object \p obj.
  * For use in a debugger.
  */
 void
@@ -1081,7 +1115,7 @@ mono_object_describe_fields (MonoObject *obj)
  * mono_value_describe_fields:
  *
  * Prints to stdout a small description of each field of the value type
- * stored at @addr of type @klass.
+ * stored at \p addr of type \p klass.
  * For use in a debugger.
  */
 void
@@ -1093,7 +1127,7 @@ mono_value_describe_fields (MonoClass* klass, const char* addr)
 /**
  * mono_class_describe_statics:
  *
- * Prints to stdout a small description of each static field of the type @klass
+ * Prints to stdout a small description of each static field of the type \p klass
  * in the current application domain.
  * For use in a debugger.
  */
@@ -1132,7 +1166,7 @@ mono_class_describe_statics (MonoClass* klass)
 
 /**
  * mono_print_method_code
- * @MonoMethod: a pointer to the method
+ * \param method: a pointer to the method
  *
  * This method is used from a debugger to print the code of the method.
  *
index 09092f9e380b3c69807c4a0c83d15a12d4c556dc..fa4aa39706002ea1ee7c635ed1aeac7202fba581 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_DEBUG_HELPERS_H__
 #define __MONO_DEBUG_HELPERS_H__
 
index ba39e5224c4a31f89e9a86fe5fdb0b6906075a03..ab302a084d325e7437551da00004a201a154406f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * debug-mono-ppdb.c: Support for the portable PDB symbol
+/**
+ * \file
+ * Support for the portable PDB symbol
  * file format
  *
  *
@@ -283,13 +284,12 @@ get_docname (MonoPPDBFile *ppdb, MonoImage *image, int docidx)
 
 /**
  * mono_ppdb_lookup_location:
- * @minfo: A `MonoDebugMethodInfo' which can be retrieved by
- *         mono_debug_lookup_method().
- * @offset: IL offset within the corresponding method's CIL code.
+ * \param minfo A \c MonoDebugMethodInfo which can be retrieved by mono_debug_lookup_method().
+ * \param offset IL offset within the corresponding method's CIL code.
  *
  * This function is similar to mono_debug_lookup_location(), but we
  * already looked up the method and also already did the
- * `native address -> IL offset' mapping.
+ * native address -> IL offset mapping.
  */
 MonoDebugSourceLocation *
 mono_ppdb_lookup_location (MonoDebugMethodInfo *minfo, uint32_t offset)
index 274f2ef0c915f28b00c5bde9b75caf87c7b2d514..87033e728cfe4d7be009413f929b8d502f915a72 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * debug-mono-ppdb.c: Support for the portable PDB symbol
- * file format
+/**
+ * \file
+ * Support for the portable PDB symbol file format
  *
  *
  * Author:
index 709c8f278d41352dddd98cd89c08d7b542e0e099..838707510ce1a9e11f6b0beddc4088a4be7d6551 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * debug-mono-symfile.c: 
+/**
+ * \file
  *
  *   Support for reading debug info from .mdb files.
  *
@@ -139,6 +139,9 @@ load_symfile (MonoDebugHandle *handle, MonoSymbolFile *symfile, mono_bool in_the
        return TRUE;
 }
 
+/**
+ * mono_debug_open_mono_symbols:
+ */
 MonoSymbolFile *
 mono_debug_open_mono_symbols (MonoDebugHandle *handle, const uint8_t *raw_contents,
                              int size, gboolean in_the_debugger)
@@ -187,6 +190,9 @@ mono_debug_open_mono_symbols (MonoDebugHandle *handle, const uint8_t *raw_conten
        return symfile;
 }
 
+/**
+ * mono_debug_close_mono_symbol_file:
+ */
 void
 mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile)
 {
@@ -210,6 +216,9 @@ mono_debug_close_mono_symbol_file (MonoSymbolFile *symfile)
        mono_debugger_unlock ();
 }
 
+/**
+ * mono_debug_symfile_is_loaded:
+ */
 mono_bool
 mono_debug_symfile_is_loaded (MonoSymbolFile *symfile)
 {
@@ -299,13 +308,12 @@ check_line (StatementMachine *stm, int offset, MonoDebugSourceLocation **locatio
 
 /**
  * mono_debug_symfile_lookup_location:
- * @minfo: A `MonoDebugMethodInfo' which can be retrieved by
- *         mono_debug_lookup_method().
- * @offset: IL offset within the corresponding method's CIL code.
+ * \param minfo A \c MonoDebugMethodInfo which can be retrieved by \c mono_debug_lookup_method.
+ * \param offset IL offset within the corresponding method's CIL code.
  *
- * This function is similar to mono_debug_lookup_location(), but we
+ * This function is similar to \c mono_debug_lookup_location, but we
  * already looked up the method and also already did the
- * `native address -> IL offset' mapping.
+ * native address -> IL offset mapping.
  */
 MonoDebugSourceLocation *
 mono_debug_symfile_lookup_location (MonoDebugMethodInfo *minfo, uint32_t offset)
@@ -426,11 +434,11 @@ add_line (StatementMachine *stm, GPtrArray *il_offset_array, GPtrArray *line_num
                stm->first_file = stm->file;
 }
 
-/*
+/**
  * mono_debug_symfile_free_location:
  *
- *   Free a MonoDebugSourceLocation returned by
- *   mono_debug_symfile_lookup_location
+ * Free a \c MonoDebugSourceLocation returned by
+ * \c mono_debug_symfile_lookup_location
  */
 void
 mono_debug_symfile_free_location (MonoDebugSourceLocation  *location)
@@ -727,6 +735,9 @@ compare_method (const void *key, const void *object)
        return token - read32(&(me->_token));
 }
 
+/**
+ * mono_debug_symfile_lookup_method:
+ */
 MonoDebugMethodInfo *
 mono_debug_symfile_lookup_method (MonoDebugHandle *handle, MonoMethod *method)
 {
@@ -774,12 +785,12 @@ mono_debug_symfile_lookup_method (MonoDebugHandle *handle, MonoMethod *method)
        return minfo;
 }
 
-/*
+/**
  * mono_debug_symfile_lookup_locals:
  *
- *   Return information about the local variables of MINFO from the symbol file.
+ * Return information about the local variables of \p minfo from the symbol file.
  * Return NULL if no information can be found.
- * The result should be freed using mono_debug_symfile_free_locals ().
+ * The result should be freed using \c mono_debug_symfile_free_locals.
  */
 MonoDebugLocalsInfo*
 mono_debug_symfile_lookup_locals (MonoDebugMethodInfo *minfo)
index 2f6020189104161a7f121f64d323fb433c0d23fc..cebc943d8506c23f7dd67db8f3fe9b4ab91b945d 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * This header is only installed for use by the debugger:
  * the structures and the API declared here are not supported.
  * Copyright 2012 Xamarin Inc (http://www.xamarin.com)
index 58818f5db9885d51f82098093f2e4f8bd2eaec66..c87eac6882d420f826ac1488cf0bf672cbd3df83 100644 (file)
@@ -1,16 +1,17 @@
-//
-// Copyright (c) Microsoft. All rights reserved.
-// Licensed under the MIT license. See LICENSE file in the project root for full license information.
-//
-// Copyright 2015 Xamarin Inc
-//
-// File: decimal.c
-//
-// Ported from C++ to C and adjusted to Mono runtime
-//
-// Pending:
-//   DoToCurrency (they look like new methods we do not have)
-//
+/**
+ * \file
+ * Copyright (c) Microsoft. All rights reserved.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ *
+ * Copyright 2015 Xamarin Inc
+ *
+ * File: decimal.c
+ *
+ * Ported from C++ to C and adjusted to Mono runtime
+ *
+ * Pending:
+ *   DoToCurrency (they look like new methods we do not have)
+ */
 #ifndef DISABLE_DECIMAL
 #include "config.h"
 #include <stdint.h>
index 451de4ab25598c6469bc987b8862e00eb62f3d88..38594e71957a3468f5656d6880f35ca8d3943f91 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_DECIMAL_MS_H__
 #define __MONO_DECIMAL_MS_H__
 
index 10347f109004e75c4eab58ae6bcb5cb7be6a7aeb..9afda807789182eae8bbdda8f59e9b5cde802d6c 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Appdomain-related internal data structures and functions.
  * Copyright 2012 Xamarin Inc (http://www.xamarin.com)
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -427,6 +428,7 @@ typedef struct  {
 typedef struct  {
        const char runtime_version [12];
        const char framework_version [4];
+       const char *public_key_token;
        const AssemblyVersionSet version_sets [5];
 } MonoRuntimeInfo;
 
index b3fc90a4be5737989eaf6716982e7a4dbd19bc9f..12e88ace7cc7775f155ace68f0e9a3c4cf13f005 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * domain.c: MonoDomain functions
+/**
+ * \file
+ * MonoDomain functions
  *
  * Author:
  *     Dietmar Maurer (dietmar@ximian.com)
@@ -32,7 +33,7 @@
 #include <mono/metadata/domain-internals.h>
 #include <mono/metadata/class-internals.h>
 #include <mono/metadata/debug-internals.h>
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/exception.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/appdomain.h>
@@ -98,9 +99,9 @@ static const MonoRuntimeInfo *current_runtime = NULL;
 /* This is the list of runtime versions supported by this JIT.
  */
 static const MonoRuntimeInfo supported_runtimes[] = {
-       {"v4.0.30319","4.5", { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
-       {"mobile",    "2.1", { {2,0,5,0}, {10,0,0,0}, {2,0,5,0}, {2,0,5,0}, {4,0,0,0} } },
-       {"moonlight", "2.1", { {2,0,5,0}, { 9,0,0,0}, {3,5,0,0}, {3,0,0,0}, NOT_AVAIL } },
+       {"v4.0.30319","4.5",               NULL, { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
+       {"mobile",    "2.1", "7cec85d7bea7798e", { {2,0,5,0}, {10,0,0,0}, {2,0,5,0}, {2,0,5,0}, {4,0,0,0} } },
+       {"moonlight", "2.1",               NULL, { {2,0,5,0}, { 9,0,0,0}, {3,5,0,0}, {3,0,0,0}, NOT_AVAIL } },
 };
 
 #undef NOT_AVAIL
@@ -225,12 +226,12 @@ mono_install_free_domain_hook (MonoFreeDomainFunc func)
 
 /**
  * mono_string_equal:
- * @s1: First string to compare
- * @s2: Second string to compare
+ * \param s1 First string to compare
+ * \param s2 Second string to compare
  *
- * Compares two `MonoString*` instances ordinally for equality.
+ * Compares two \c MonoString* instances ordinally for equality.
  *
- * Returns FALSE if the strings differ.
+ * \returns FALSE if the strings differ.
  */
 gboolean
 mono_string_equal (MonoString *s1, MonoString *s2)
@@ -248,10 +249,10 @@ mono_string_equal (MonoString *s1, MonoString *s2)
 
 /**
  * mono_string_hash:
- * @s: the string to hash
+ * \param s the string to hash
  *
- * Compute the hash for a `MonoString*`
- * Returns the hash for the string.
+ * Compute the hash for a \c MonoString*
+ * \returns the hash for the string.
  */
 guint
 mono_string_hash (MonoString *s)
@@ -349,11 +350,11 @@ static guint32 domain_shadow_serial = 0L;
  * mono_domain_create:
  *
  * Creates a new application domain, the unmanaged representation
- * of the actual domain.   Usually you will want to create the
+ * of the actual domain.
  *
  * Application domains provide an isolation facilty for assemblies.   You
  * can load assemblies and execute code in them that will not be visible
- * to other application domains.   This is a runtime-based virtualization
+ * to other application domains. This is a runtime-based virtualization
  * technology.
  *
  * It is possible to unload domains, which unloads the assemblies and
@@ -363,7 +364,7 @@ static guint32 domain_shadow_serial = 0L;
  * structures, along a dedicated code manager to hold code that is
  * associated with the domain.
  *
- * Returns: New initialized MonoDomain, with no configuration or assemblies
+ * \returns New initialized \c MonoDomain, with no configuration or assemblies
  * loaded into it.
  */
 MonoDomain *
@@ -786,8 +787,8 @@ mono_init (const char *domain_name)
 
 /**
  * mono_init_from_assembly:
- * @domain_name: name to give to the initial domain
- * @filename: filename to load on startup
+ * \param domain_name name to give to the initial domain
+ * \param filename filename to load on startup
  *
  * Used by the runtime, users should use mono_jit_init instead.
  *
@@ -798,7 +799,7 @@ mono_init (const char *domain_name)
  * provided executable. The version is determined by looking at the exe 
  * configuration file and the version PE field)
  *
- * Returns: the initial domain.
+ * \returns the initial domain.
  */
 MonoDomain *
 mono_init_from_assembly (const char *domain_name, const char *filename)
@@ -809,15 +810,15 @@ mono_init_from_assembly (const char *domain_name, const char *filename)
 /**
  * mono_init_version:
  * 
- * Used by the runtime, users should use mono_jit_init instead.
+ * Used by the runtime, users should use \c mono_jit_init instead.
  * 
- * Creates the initial application domain and initializes the mono_defaults
+ * Creates the initial application domain and initializes the \c mono_defaults
  * structure.
  *
  * This function is guaranteed to not run any IL code.
  * The runtime is initialized using the provided rutime version.
  *
- * Returns: the initial domain.
+ * \returns the initial domain.
  */
 MonoDomain *
 mono_init_version (const char *domain_name, const char *version)
@@ -877,11 +878,11 @@ mono_get_root_domain (void)
 /**
  * mono_domain_get:
  *
- * This method returns the value of the current MonoDomain that this thread
+ * This method returns the value of the current \c MonoDomain that this thread
  * and code are running under.   To obtain the root domain use
- * mono_get_root_domain() API.
+ * \c mono_get_root_domain API.
  *
- * Returns: the current domain
+ * \returns the current domain
  */
 MonoDomain *
 mono_domain_get ()
@@ -919,9 +920,9 @@ mono_domain_set_internal_with_options (MonoDomain *domain, gboolean migrate_exce
 
 /**
  * mono_domain_set_internal:
- * @domain: the new domain
+ * \param domain the new domain
  *
- * Sets the current domain to @domain.
+ * Sets the current domain to \p domain.
  */
 void
 mono_domain_set_internal (MonoDomain *domain)
@@ -931,12 +932,12 @@ mono_domain_set_internal (MonoDomain *domain)
 
 /**
  * mono_domain_foreach:
- * @func: function to invoke with the domain data
- * @user_data: user-defined pointer that is passed to the supplied @func fo reach domain
+ * \param func function to invoke with the domain data
+ * \param user_data user-defined pointer that is passed to the supplied \p func fo reach domain
  *
  * Use this method to safely iterate over all the loaded application
- * domains in the current runtime.   The provided @func is invoked with a
- * pointer to the MonoDomain and is given the value of the @user_data
+ * domains in the current runtime.   The provided \p func is invoked with a
+ * pointer to the \c MonoDomain and is given the value of the \p user_data
  * parameter which can be used to pass state to your called routine.
  */
 void
@@ -964,12 +965,11 @@ mono_domain_foreach (MonoDomainFunc func, gpointer user_data)
        mono_gc_free_fixed (copy);
 }
 
+/* FIXME: maybe we should integrate this with mono_assembly_open? */
 /**
  * mono_domain_assembly_open:
- * @domain: the application domain
- * @name: file name of the assembly
- *
- * fixme: maybe we should integrate this with mono_assembly_open ??
+ * \param domain the application domain
+ * \param name file name of the assembly
  */
 MonoAssembly *
 mono_domain_assembly_open (MonoDomain *domain, const char *name)
@@ -992,10 +992,10 @@ mono_domain_assembly_open (MonoDomain *domain, const char *name)
                current = mono_domain_get ();
 
                mono_domain_set (domain, FALSE);
-               ass = mono_assembly_open (name, NULL);
+               ass = mono_assembly_open_predicate (name, FALSE, FALSE, NULL, NULL, NULL);
                mono_domain_set (current, FALSE);
        } else {
-               ass = mono_assembly_open (name, NULL);
+               ass = mono_assembly_open_predicate (name, FALSE, FALSE, NULL, NULL, NULL);
        }
 
        return ass;
@@ -1012,8 +1012,8 @@ unregister_vtable_reflection_type (MonoVTable *vtable)
 
 /**
  * mono_domain_free:
- * @domain: the domain to release
- * @force: if true, it allows the root domain to be released (used at shutdown only).
+ * \param domain the domain to release
+ * \param force if TRUE, it allows the root domain to be released (used at shutdown only).
  *
  * This releases the resources associated with the specific domain.
  * This is a low-level function that is invoked by the AppDomain infrastructure
@@ -1233,9 +1233,8 @@ mono_domain_free (MonoDomain *domain, gboolean force)
 
 /**
  * mono_domain_get_by_id:
- * @domainid: the ID
- *
- * Returns: the domain for a specific domain id.
+ * \param domainid the ID
+ * \returns the domain for a specific domain id.
  */
 MonoDomain * 
 mono_domain_get_by_id (gint32 domainid) 
@@ -1252,14 +1251,14 @@ mono_domain_get_by_id (gint32 domainid)
        return domain;
 }
 
-/*
+/**
  * mono_domain_get_id:
  *
  * A domain ID is guaranteed to be unique for as long as the domain
  * using it is alive. It may be reused later once the domain has been
  * unloaded.
  *
- * Returns: The unique ID for @domain.
+ * \returns The unique ID for \p domain.
  */
 gint32
 mono_domain_get_id (MonoDomain *domain)
@@ -1267,13 +1266,13 @@ mono_domain_get_id (MonoDomain *domain)
        return domain->domain_id;
 }
 
-/*
+/**
  * mono_domain_get_friendly_name:
  *
- * The returned string's lifetime is the same as @domain's. Consider
+ * The returned string's lifetime is the same as \p domain's. Consider
  * copying it if you need to store it somewhere.
  *
- * Returns: The friendly name of @domain. Can be NULL if not yet set.
+ * \returns The friendly name of \p domain. Can be NULL if not yet set.
  */
 const char *
 mono_domain_get_friendly_name (MonoDomain *domain)
@@ -1391,7 +1390,9 @@ mono_domain_code_foreach (MonoDomain *domain, MonoCodeManagerFunc func, void *us
        mono_domain_unlock (domain);
 }
 
-
+/**
+ * mono_context_set:
+ */
 void 
 mono_context_set (MonoAppContext * new_context)
 {
@@ -1411,12 +1412,12 @@ mono_context_get (void)
 
 /**
  * mono_context_get_id:
- * @context: the context to operate on.
+ * \param context the context to operate on.
  *
  * Context IDs are guaranteed to be unique for the duration of a Mono
  * process; they are never reused.
  *
- * Returns: The unique ID for @context.
+ * \returns The unique ID for \p context.
  */
 gint32
 mono_context_get_id (MonoAppContext *context)
@@ -1426,9 +1427,8 @@ mono_context_get_id (MonoAppContext *context)
 
 /**
  * mono_context_get_domain_id:
- * @context: the context to operate on.
- *
- * Returns: The ID of the domain that @context was created in.
+ * \param context the context to operate on.
+ * \returns The ID of the domain that \p context was created in.
  */
 gint32
 mono_context_get_domain_id (MonoAppContext *context)
@@ -1472,10 +1472,8 @@ mono_domain_add_class_static_data (MonoDomain *domain, MonoClass *klass, gpointe
 
 /**
  * mono_get_corlib:
- *
- * Use this function to get the `MonoImage*` for the mscorlib.dll assembly
- *
- * Returns: The MonoImage for mscorlib.dll
+ * Use this function to get the \c MonoImage* for the \c mscorlib.dll assembly
+ * \returns The \c MonoImage for mscorlib.dll
  */
 MonoImage*
 mono_get_corlib (void)
@@ -1485,10 +1483,8 @@ mono_get_corlib (void)
 
 /**
  * mono_get_object_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Object`.
- *
- * Returns: The `MonoClass*` for the `System.Object` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Object .
+ * \returns The \c MonoClass* for the \c System.Object type.
  */
 MonoClass*
 mono_get_object_class (void)
@@ -1498,10 +1494,8 @@ mono_get_object_class (void)
 
 /**
  * mono_get_byte_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Byte`.
- *
- * Returns: The `MonoClass*` for the `System.Byte` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Byte .
+ * \returns The \c MonoClass* for the \c System.Byte type.
  */
 MonoClass*
 mono_get_byte_class (void)
@@ -1511,10 +1505,8 @@ mono_get_byte_class (void)
 
 /**
  * mono_get_void_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Void`.
- *
- * Returns: The `MonoClass*` for the `System.Void` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Void .
+ * \returns The \c MonoClass* for the \c System.Void type.
  */
 MonoClass*
 mono_get_void_class (void)
@@ -1524,10 +1516,8 @@ mono_get_void_class (void)
 
 /**
  * mono_get_boolean_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Boolean`.
- *
- * Returns: The `MonoClass*` for the `System.Boolean` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Boolean .
+ * \returns The \c MonoClass* for the \c System.Boolean type.
  */
 MonoClass*
 mono_get_boolean_class (void)
@@ -1537,10 +1527,8 @@ mono_get_boolean_class (void)
 
 /**
  * mono_get_sbyte_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.SByte`.
- *
- * Returns: The `MonoClass*` for the `System.SByte` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.SByte.
+ * \returns The \c MonoClass* for the \c System.SByte type.
  */
 MonoClass*
 mono_get_sbyte_class (void)
@@ -1550,10 +1538,8 @@ mono_get_sbyte_class (void)
 
 /**
  * mono_get_int16_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Int16`.
- *
- * Returns: The `MonoClass*` for the `System.Int16` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Int16 .
+ * \returns The \c MonoClass* for the \c System.Int16 type.
  */
 MonoClass*
 mono_get_int16_class (void)
@@ -1563,10 +1549,8 @@ mono_get_int16_class (void)
 
 /**
  * mono_get_uint16_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.UInt16`.
- *
- * Returns: The `MonoClass*` for the `System.UInt16` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.UInt16 .
+ * \returns The \c MonoClass* for the \c System.UInt16 type.
  */
 MonoClass*
 mono_get_uint16_class (void)
@@ -1576,10 +1560,8 @@ mono_get_uint16_class (void)
 
 /**
  * mono_get_int32_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Int32`.
- *
- * Returns: The `MonoClass*` for the `System.Int32` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Int32 .
+ * \returns The \c MonoClass* for the \c System.Int32 type.
  */
 MonoClass*
 mono_get_int32_class (void)
@@ -1589,10 +1571,8 @@ mono_get_int32_class (void)
 
 /**
  * mono_get_uint32_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.UInt32`.
- *
- * Returns: The `MonoClass*` for the `System.UInt32` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.UInt32 .
+ * \returns The \c MonoClass* for the \c System.UInt32 type.
  */
 MonoClass*
 mono_get_uint32_class (void)
@@ -1602,10 +1582,8 @@ mono_get_uint32_class (void)
 
 /**
  * mono_get_intptr_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.IntPtr`.
- *
- * Returns: The `MonoClass*` for the `System.IntPtr` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.IntPtr .
+ * \returns The \c MonoClass* for the \c System.IntPtr type.
  */
 MonoClass*
 mono_get_intptr_class (void)
@@ -1615,10 +1593,8 @@ mono_get_intptr_class (void)
 
 /**
  * mono_get_uintptr_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.UIntPtr`.
- *
- * Returns: The `MonoClass*` for the `System.UIntPtr` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.UIntPtr .
+ * \returns The \c MonoClass* for the \c System.UIntPtr type.
  */
 MonoClass*
 mono_get_uintptr_class (void)
@@ -1628,10 +1604,8 @@ mono_get_uintptr_class (void)
 
 /**
  * mono_get_int64_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Int64`.
- *
- * Returns: The `MonoClass*` for the `System.Int64` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Int64 .
+ * \returns The \c MonoClass* for the \c System.Int64 type.
  */
 MonoClass*
 mono_get_int64_class (void)
@@ -1641,10 +1615,8 @@ mono_get_int64_class (void)
 
 /**
  * mono_get_uint64_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.UInt64`.
- *
- * Returns: The `MonoClass*` for the `System.UInt64` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.UInt64 .
+ * \returns The \c MonoClass* for the \c System.UInt64 type.
  */
 MonoClass*
 mono_get_uint64_class (void)
@@ -1654,10 +1626,8 @@ mono_get_uint64_class (void)
 
 /**
  * mono_get_single_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Single` (32-bit floating points).
- *
- * Returns: The `MonoClass*` for the `System.Single` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Single  (32-bit floating points).
+ * \returns The \c MonoClass* for the \c System.Single type.
  */
 MonoClass*
 mono_get_single_class (void)
@@ -1667,10 +1637,8 @@ mono_get_single_class (void)
 
 /**
  * mono_get_double_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Double` (64-bit floating points).
- *
- * Returns: The `MonoClass*` for the `System.Double` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Double  (64-bit floating points).
+ * \returns The \c MonoClass* for the \c System.Double type.
  */
 MonoClass*
 mono_get_double_class (void)
@@ -1680,10 +1648,8 @@ mono_get_double_class (void)
 
 /**
  * mono_get_char_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Char`.
- *
- * Returns: The `MonoClass*` for the `System.Char` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Char .
+ * \returns The \c MonoClass* for the \c System.Char type.
  */
 MonoClass*
 mono_get_char_class (void)
@@ -1693,10 +1659,8 @@ mono_get_char_class (void)
 
 /**
  * mono_get_string_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.String`.
- *
- * Returns: The `MonoClass*` for the `System.String` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.String .
+ * \returns The \c MonoClass* for the \c System.String type.
  */
 MonoClass*
 mono_get_string_class (void)
@@ -1706,10 +1670,8 @@ mono_get_string_class (void)
 
 /**
  * mono_get_enum_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Enum`.
- *
- * Returns: The `MonoClass*` for the `System.Enum` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Enum .
+ * \returns The \c MonoClass* for the \c System.Enum type.
  */
 MonoClass*
 mono_get_enum_class (void)
@@ -1719,10 +1681,8 @@ mono_get_enum_class (void)
 
 /**
  * mono_get_array_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Array`.
- *
- * Returns: The `MonoClass*` for the `System.Array` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Array .
+ * \returns The \c MonoClass* for the \c System.Array type.
  */
 MonoClass*
 mono_get_array_class (void)
@@ -1732,10 +1692,8 @@ mono_get_array_class (void)
 
 /**
  * mono_get_thread_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Threading.Thread`.
- *
- * Returns: The `MonoClass*` for the `System.Threading.Thread` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Threading.Thread .
+ * \returns The \c MonoClass* for the \c System.Threading.Thread type.
  */
 MonoClass*
 mono_get_thread_class (void)
@@ -1745,10 +1703,8 @@ mono_get_thread_class (void)
 
 /**
  * mono_get_exception_class:
- *
- * Use this function to get the `MonoClass*` that the runtime is using for `System.Exception`.
- *
- * Returns: The `MonoClass*` for the `` type.
+ * Use this function to get the \c MonoClass* that the runtime is using for \c System.Exception .
+ * \returns The \c MonoClass* for the \c  type.
  */
 MonoClass*
 mono_get_exception_class (void)
index 5b274071a880c494f66290304eaf09d2dbb7f3ea..8578c24824a376c3b4b54c0991b43adfe9823f22 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index eb91e637d4bac6204368cd8f332c8fe1aaab2c36..440f8094f02ca531f46e0cd60fca494a21974f52 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * dynamic-image.c: Images created at runtime.
+/**
+ * \file
+ * Images created at runtime.
  *   
  * 
  * Author:
index 454f350cf8c182ece7fd31690ba47d37e4a5b733..19570fb391e527b6cf79b876321143e91d1a8b49 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 3b62211ef3ed2524ad1e6785e2ca9fdbb399959c..0081f0e3feefd7dd23accc78be2e8b346db98bcc 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * dynamic-stream.c: MonoDynamicStream
+/**
+ * \file
+ * MonoDynamicStream
  * Copyright 2016 Microsoft
  *
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index f0fbef9174f111f8ea652c53ea8aa56c050104ce..2ccf0fe7217eb1ba5e55bd1524f219565a205cf2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * environment.c: System.Environment support internal calls
+/**
+ * \file
+ * System.Environment support internal calls
  *
  * Authors:
  *     Dick Porter (dick@ximian.com)
@@ -27,12 +28,20 @@ extern MonoString* ves_icall_System_Environment_GetOSVersionString (void);
 
 static gint32 exitcode=0;
 
-gint32 mono_environment_exitcode_get (void)
+/**
+ * mono_environment_exitcode_get:
+ */
+gint32
+mono_environment_exitcode_get (void)
 {
        return(exitcode);
 }
 
-void mono_environment_exitcode_set (gint32 value)
+/**
+ * mono_environment_exitcode_set:
+ */
+void
+mono_environment_exitcode_set (gint32 value)
 {
        exitcode=value;
 }
index 360ba3baa8ad9454daf22d513a3a4d1fb39928cc..617d18efc8440f83c383f599b59a121e51e79eee 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * environment.h: System.Environment support internal calls
+/**
+ * \file
+ * System.Environment support internal calls
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index e36e5ef9e76a2de9ea91a20b9e4bd59a6b1472ce..96996f138b459fa6c3ac788e93aeb235101f2943 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_METADATA_EXCEPTION_INTERNALS_H_
 #define _MONO_METADATA_EXCEPTION_INTERNALS_H_
 
index e6158463a5ae59c2378745bbcd645bf4ccce698d..de1e917dc8412cc6066f9bc6f8301aa0250c21e4 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exception.c: Exception handling
+/**
+ * \file
+ * Exception handling
  *
  * Authors:
  *     Paolo Molaro    (lupus@ximian.com)
@@ -35,14 +36,14 @@ static gpointer unhandled_exception_hook_data = NULL;
 
 /**
  * mono_exception_from_name:
- * @image: the Mono image where to look for the class
- * @name_space: the namespace for the class
- * @name: class name
+ * \param image the Mono image where to look for the class
+ * \param name_space the namespace for the class
+ * \param name class name
  *
  * Creates an exception of the given namespace/name class in the
  * current domain.
  *
- * Returns: the initialized exception instance.
+ * \returns the initialized exception instance.
  */
 MonoException *
 mono_exception_from_name (MonoImage *image, const char *name_space,
@@ -53,15 +54,15 @@ mono_exception_from_name (MonoImage *image, const char *name_space,
 
 /**
  * mono_exception_from_name_domain:
- * @domain: Domain where the return object will be created.
- * @image: the Mono image where to look for the class
- * @name_space: the namespace for the class
- * @name: class name
+ * \param domain Domain where the return object will be created.
+ * \param image the Mono image where to look for the class
+ * \param name_space the namespace for the class
+ * \param name class name
  *
  * Creates an exception object of the given namespace/name class on
  * the given domain.
  *
- * Returns: the initialized exception instance.
+ * \returns the initialized exception instance.
  */
 MonoException *
 mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image, 
@@ -91,12 +92,12 @@ mono_exception_from_name_domain (MonoDomain *domain, MonoImage *image,
 
 /**
  * mono_exception_from_token:
- * @image: the Mono image where to look for the class
- * @token: The type token of the class
+ * \param image the Mono image where to look for the class
+ * \param token The type token of the class
  *
- * Creates an exception of the type given by @token.
+ * Creates an exception of the type given by \p token.
  *
- * Returns: the initialized exception instance.
+ * \returns the initialized exception instance.
  */
 MonoException *
 mono_exception_from_token (MonoImage *image, guint32 token)
@@ -163,16 +164,16 @@ create_exception_two_strings (MonoClass *klass, MonoString *a1, MonoString *a2,
 
 /**
  * mono_exception_from_name_two_strings:
- * @image: the Mono image where to look for the class
- * @name_space: the namespace for the class
- * @name: class name
- * @a1: first string argument to pass
- * @a2: second string argument to pass
+ * \param image the Mono image where to look for the class
+ * \param name_space the namespace for the class
+ * \param name class name
+ * \param a1 first string argument to pass
+ * \param a2 second string argument to pass
  *
  * Creates an exception from a constructor that takes two string
  * arguments.
  *
- * Returns: the initialized exception instance.
+ * \returns the initialized exception instance.
  */
 MonoException *
 mono_exception_from_name_two_strings (MonoImage *image, const char *name_space,
@@ -188,18 +189,18 @@ mono_exception_from_name_two_strings (MonoImage *image, const char *name_space,
 
 /**
  * mono_exception_from_name_two_strings_checked:
- * @image: the Mono image where to look for the class
- * @name_space: the namespace for the class
- * @name: class name
- * @a1: first string argument to pass
- * @a2: second string argument to pass
- * @error: set on error
+ * \param image the Mono image where to look for the class
+ * \param name_space the namespace for the class
+ * \param name class name
+ * \param a1 first string argument to pass
+ * \param a2 second string argument to pass
+ * \param error set on error
  *
  * Creates an exception from a constructor that takes two string
  * arguments.
  *
- * Returns: the initialized exception instance. On failure returns
- * NULL and sets @error.
+ * \returns the initialized exception instance. On failure returns
+ * NULL and sets \p error.
  */
 MonoException *
 mono_exception_from_name_two_strings_checked (MonoImage *image, const char *name_space,
@@ -216,14 +217,14 @@ mono_exception_from_name_two_strings_checked (MonoImage *image, const char *name
 
 /**
  * mono_exception_from_name_msg:
- * @image: the Mono image where to look for the class
- * @name_space: the namespace for the class
- * @name: class name
- * @msg: the message to embed inside the exception
+ * \param image the Mono image where to look for the class
+ * \param name_space the namespace for the class
+ * \param name class name
+ * \param msg the message to embed inside the exception
  *
  * Creates an exception and initializes its message field.
  *
- * Returns: the initialized exception instance.
+ * \returns the initialized exception instance.
  */
 MonoException *
 mono_exception_from_name_msg (MonoImage *image, const char *name_space,
@@ -279,8 +280,7 @@ mono_exception_from_token_two_strings_checked (MonoImage *image, guint32 token,
 
 /**
  * mono_get_exception_divide_by_zero:
- *
- * Returns: a new instance of the `System.DivideByZeroException`
+ * \returns a new instance of the \c System.DivideByZeroException
  */
 MonoException *
 mono_get_exception_divide_by_zero ()
@@ -291,8 +291,7 @@ mono_get_exception_divide_by_zero ()
 
 /**
  * mono_get_exception_security:
- *
- * Returns: a new instance of the `System.Security.SecurityException`
+ * \returns a new instance of the \c System.Security.SecurityException
  */
 MonoException *
 mono_get_exception_security ()
@@ -303,8 +302,7 @@ mono_get_exception_security ()
 
 /**
  * mono_get_exception_thread_abort:
- *
- * Returns: a new instance of the `System.Threading.ThreadAbortException`
+ * \returns a new instance of the \c System.Threading.ThreadAbortException
  */
 MonoException *
 mono_get_exception_thread_abort ()
@@ -315,8 +313,7 @@ mono_get_exception_thread_abort ()
 
 /**
  * mono_get_exception_thread_interrupted:
- *
- * Returns: a new instance of the `System.Threading.ThreadInterruptedException`
+ * \returns a new instance of the \c System.Threading.ThreadInterruptedException
  */
 MonoException *
 mono_get_exception_thread_interrupted ()
@@ -327,8 +324,7 @@ mono_get_exception_thread_interrupted ()
 
 /**
  * mono_get_exception_arithmetic:
- *
- * Returns: a new instance of the `System.ArithmeticException`
+ * \returns a new instance of the \c System.ArithmeticException
  */
 MonoException *
 mono_get_exception_arithmetic ()
@@ -339,8 +335,7 @@ mono_get_exception_arithmetic ()
 
 /**
  * mono_get_exception_overflow:
- *
- * Returns: a new instance of the `System.OverflowException`
+ * \returns a new instance of the \c System.OverflowException
  */
 MonoException *
 mono_get_exception_overflow ()
@@ -351,8 +346,7 @@ mono_get_exception_overflow ()
 
 /**
  * mono_get_exception_null_reference:
- *
- * Returns: a new instance of the `System.NullReferenceException`
+ * \returns a new instance of the \c System.NullReferenceException
  */
 MonoException *
 mono_get_exception_null_reference ()
@@ -363,9 +357,8 @@ mono_get_exception_null_reference ()
 
 /**
  * mono_get_exception_execution_engine:
- * @msg: the message to pass to the user
- *
- * Returns: a new instance of the `System.ExecutionEngineException`
+ * \param msg the message to pass to the user
+ * \returns a new instance of the \c System.ExecutionEngineException
  */
 MonoException *
 mono_get_exception_execution_engine (const char *msg)
@@ -375,9 +368,8 @@ mono_get_exception_execution_engine (const char *msg)
 
 /**
  * mono_get_exception_serialization:
- * @msg: the message to pass to the user
- *
- * Returns: a new instance of the `System.Runtime.Serialization.SerializationException`
+ * \param msg the message to pass to the user
+ * \returns a new instance of the \c System.Runtime.Serialization.SerializationException
  */
 MonoException *
 mono_get_exception_serialization (const char *msg)
@@ -387,8 +379,7 @@ mono_get_exception_serialization (const char *msg)
 
 /**
  * mono_get_exception_invalid_cast:
- *
- * Returns: a new instance of the `System.InvalidCastException`
+ * \returns a new instance of the \c System.InvalidCastException
  */
 MonoException *
 mono_get_exception_invalid_cast ()
@@ -398,9 +389,8 @@ mono_get_exception_invalid_cast ()
 
 /**
  * mono_get_exception_invalid_operation:
- * @msg: the message to pass to the user
- *
- * Returns: a new instance of the `System.InvalidOperationException`
+ * \param msg the message to pass to the user
+ * \returns a new instance of the \c System.InvalidOperationException
  */
 MonoException *
 mono_get_exception_invalid_operation (const char *msg)
@@ -411,8 +401,7 @@ mono_get_exception_invalid_operation (const char *msg)
 
 /**
  * mono_get_exception_index_out_of_range:
- *
- * Returns: a new instance of the `System.IndexOutOfRangeException`
+ * \returns a new instance of the \c System.IndexOutOfRangeException
  */
 MonoException *
 mono_get_exception_index_out_of_range ()
@@ -423,8 +412,7 @@ mono_get_exception_index_out_of_range ()
 
 /**
  * mono_get_exception_array_type_mismatch:
- *
- * Returns: a new instance of the `System.ArrayTypeMismatchException`
+ * \returns a new instance of the \c System.ArrayTypeMismatchException
  */
 MonoException *
 mono_get_exception_array_type_mismatch ()
@@ -435,10 +423,9 @@ mono_get_exception_array_type_mismatch ()
 
 /**
  * mono_get_exception_type_load:
- * @class_name: the name of the class that could not be loaded
- * @assembly_name: the assembly where the class was looked up.
- *
- * Returns: a new instance of the `System.TypeLoadException`
+ * \param class_name the name of the class that could not be loaded
+ * \param assembly_name the assembly where the class was looked up.
+ * \returns a new instance of the \c System.TypeLoadException
  */
 MonoException *
 mono_get_exception_type_load (MonoString *class_name, char *assembly_name)
@@ -454,9 +441,8 @@ mono_get_exception_type_load (MonoString *class_name, char *assembly_name)
 
 /**
  * mono_get_exception_not_implemented:
- * @msg: the message to pass to the user
- *
- * Returns: a new instance of the `System.NotImplementedException`
+ * \param msg the message to pass to the user
+ * \returns a new instance of the \c System.NotImplementedException
  */
 MonoException *
 mono_get_exception_not_implemented (const char *msg)
@@ -466,9 +452,8 @@ mono_get_exception_not_implemented (const char *msg)
 
 /**
  * mono_get_exception_not_supported:
- * @msg: the message to pass to the user
- *
- * Returns: a new instance of the `System.NotSupportedException`
+ * \param msg the message to pass to the user
+ * \returns a new instance of the \c System.NotSupportedException
  */
 MonoException *
 mono_get_exception_not_supported (const char *msg)
@@ -478,10 +463,9 @@ mono_get_exception_not_supported (const char *msg)
 
 /**
  * mono_get_exception_missing_method:
- * @class_name: the class where the lookup was performed.
- * @member_name: the name of the missing method.
- *
- * Returns: a new instance of the `System.MissingMethodException`
+ * \param class_name the class where the lookup was performed.
+ * \param member_name the name of the missing method.
+ * \returns a new instance of the \c System.MissingMethodException
  */
 MonoException *
 mono_get_exception_missing_method (const char *class_name, const char *member_name)
@@ -498,10 +482,9 @@ mono_get_exception_missing_method (const char *class_name, const char *member_na
 
 /**
  * mono_get_exception_missing_field:
- * @class_name: the class where the lookup was performed
- * @member_name: the name of the missing method.
- *
- * Returns: a new instance of the `System.MissingFieldException`
+ * \param class_name the class where the lookup was performed
+ * \param member_name the name of the missing method.
+ * \returns a new instance of the \c System.MissingFieldException
  */
 MonoException *
 mono_get_exception_missing_field (const char *class_name, const char *member_name)
@@ -518,9 +501,8 @@ mono_get_exception_missing_field (const char *class_name, const char *member_nam
 
 /**
  * mono_get_exception_argument_null:
- * @arg: the name of the argument that is null
- *
- * Returns: a new instance of the `System.ArgumentNullException`
+ * \param arg the name of the argument that is null
+ * \returns a new instance of the \c System.ArgumentNullException
  */
 MonoException*
 mono_get_exception_argument_null (const char *arg)
@@ -540,9 +522,8 @@ mono_get_exception_argument_null (const char *arg)
 
 /**
  * mono_get_exception_argument:
- * @arg: the name of the invalid argument.
- *
- * Returns: a new instance of the `System.ArgumentException`
+ * \param arg the name of the invalid argument.
+ * \returns a new instance of the \c System.ArgumentException
  */
 MonoException *
 mono_get_exception_argument (const char *arg, const char *msg)
@@ -562,9 +543,8 @@ mono_get_exception_argument (const char *arg, const char *msg)
 
 /**
  * mono_get_exception_argument_out_of_range:
- * @arg: the name of the out of range argument.
- *
- * Returns: a new instance of the `System.ArgumentOutOfRangeException`
+ * \param arg the name of the out of range argument.
+ * \returns a new instance of the \c System.ArgumentOutOfRangeException
  */
 MonoException *
 mono_get_exception_argument_out_of_range (const char *arg)
@@ -584,9 +564,8 @@ mono_get_exception_argument_out_of_range (const char *arg)
 
 /**
  * mono_get_exception_thread_state:
- * @msg: the message to present to the user
- *
- * Returns: a new instance of the `System.Threading.ThreadStateException`
+ * \param msg the message to present to the user
+ * \returns a new instance of the \c System.Threading.ThreadStateException
  */
 MonoException *
 mono_get_exception_thread_state (const char *msg)
@@ -597,9 +576,8 @@ mono_get_exception_thread_state (const char *msg)
 
 /**
  * mono_get_exception_io:
- * @msg: the message to present to the user
- *
- * Returns: a new instance of the `System.IO.IOException`
+ * \param msg the message to present to the user
+ * \returns a new instance of the \c System.IO.IOException
  */
 MonoException *
 mono_get_exception_io (const char *msg)
@@ -610,9 +588,8 @@ mono_get_exception_io (const char *msg)
 
 /**
  * mono_get_exception_file_not_found:
- * @fname: the name of the file not found.
- *
- * Returns: a new instance of the `System.IO.FileNotFoundException`
+ * \param fname the name of the file not found.
+ * \returns a new instance of the \c System.IO.FileNotFoundException
  */
 MonoException *
 mono_get_exception_file_not_found (MonoString *fname)
@@ -626,10 +603,9 @@ mono_get_exception_file_not_found (MonoString *fname)
 
 /**
  * mono_get_exception_file_not_found2:
- * @msg: an informative message for the user.
- * @fname: the name of the file not found.
- *
- * Returns: a new instance of the `System.IO.FileNotFoundException`
+ * \param msg an informative message for the user.
+ * \param fname the name of the file not found.
+ * \returns a new instance of the \c System.IO.FileNotFoundException
  */
 MonoException *
 mono_get_exception_file_not_found2 (const char *msg, MonoString *fname)
@@ -645,10 +621,9 @@ mono_get_exception_file_not_found2 (const char *msg, MonoString *fname)
 
 /**
  * mono_get_exception_type_initialization:
- * @type_name: the name of the type that failed to initialize.
- * @inner: the inner exception.
- *
- * Returns: a new instance of the `System.TypeInitializationException`
+ * \param type_name the name of the type that failed to initialize.
+ * \param inner the inner exception.
+ * \returns a new instance of the \c System.TypeInitializationException
  */
 MonoException *
 mono_get_exception_type_initialization (const gchar *type_name, MonoException *inner)
@@ -702,9 +677,8 @@ mono_get_exception_type_initialization_checked (const gchar *type_name, MonoExce
 
 /**
  * mono_get_exception_synchronization_lock:
- * @inner: the inner exception.
- *
- * Returns: a new instance of the `System.SynchronizationLockException`
+ * \param inner the inner exception.
+ * \returns a new instance of the \c System.SynchronizationLockException
  */
 MonoException *
 mono_get_exception_synchronization_lock (const char *msg)
@@ -714,9 +688,8 @@ mono_get_exception_synchronization_lock (const char *msg)
 
 /**
  * mono_get_exception_cannot_unload_appdomain:
- * @inner: the inner exception.
- *
- * Returns: a new instance of the `System.CannotUnloadAppDomainException`
+ * \param inner the inner exception.
+ * \returns a new instance of the \c System.CannotUnloadAppDomainException
  */
 MonoException *
 mono_get_exception_cannot_unload_appdomain (const char *msg)
@@ -726,8 +699,7 @@ mono_get_exception_cannot_unload_appdomain (const char *msg)
 
 /**
  * mono_get_exception_appdomain_unloaded
- *
- * Returns: a new instance of the `System.AppDomainUnloadedException`
+ * \returns a new instance of the \c System.AppDomainUnloadedException
  */
 MonoException *
 mono_get_exception_appdomain_unloaded (void)
@@ -737,9 +709,8 @@ mono_get_exception_appdomain_unloaded (void)
 
 /**
  * mono_get_exception_bad_image_format:
- * @msg: an informative message for the user.
- *
- * Returns: a new instance of the `System.BadImageFormatException`
+ * \param msg an informative message for the user.
+ * \returns a new instance of the \c System.BadImageFormatException
  */
 MonoException *
 mono_get_exception_bad_image_format (const char *msg)
@@ -749,10 +720,9 @@ mono_get_exception_bad_image_format (const char *msg)
 
 /**
  * mono_get_exception_bad_image_format2:
- * @msg: an informative message for the user.
- * @fname: The full name of the file with the invalid image.
- *
- * Returns: a new instance of the `System.BadImageFormatException`
+ * \param msg an informative message for the user.
+ * \param fname The full name of the file with the invalid image.
+ * \returns a new instance of the \c System.BadImageFormatException
  */
 MonoException *
 mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname)
@@ -768,8 +738,7 @@ mono_get_exception_bad_image_format2 (const char *msg, MonoString *fname)
 
 /**
  * mono_get_exception_stack_overflow:
- *
- * Returns: a new instance of the `System.StackOverflowException`
+ * \returns a new instance of the \c System.StackOverflowException
  */
 MonoException *
 mono_get_exception_stack_overflow (void)
@@ -779,8 +748,7 @@ mono_get_exception_stack_overflow (void)
 
 /**
  * mono_get_exception_out_of_memory:
- *
- * Returns: a new instance of the `System.OutOfMemoryException`
+ * \returns a new instance of the \c System.OutOfMemoryException
  */
 MonoException *
 mono_get_exception_out_of_memory (void)
@@ -790,8 +758,7 @@ mono_get_exception_out_of_memory (void)
 
 /**
  * mono_get_exception_field_access:
- *
- * Returns: a new instance of the `System.FieldAccessException`
+ * \returns a new instance of the \c System.FieldAccessException
  */
 MonoException *
 mono_get_exception_field_access (void)
@@ -801,9 +768,8 @@ mono_get_exception_field_access (void)
 
 /**
  * mono_get_exception_field_access2:
- * @msg: an informative message for the user.
- *
- * Returns: a new instance of the `System.FieldAccessException`
+ * \param msg an informative message for the user.
+ * \returns a new instance of the \c System.FieldAccessException
  */
 MonoException *
 mono_get_exception_field_access_msg (const char *msg)
@@ -813,8 +779,7 @@ mono_get_exception_field_access_msg (const char *msg)
 
 /**
  * mono_get_exception_method_access:
- *
- * Returns: a new instance of the `System.MethodAccessException`
+ * \returns a new instance of the \c System.MethodAccessException
  */
 MonoException *
 mono_get_exception_method_access (void)
@@ -824,9 +789,8 @@ mono_get_exception_method_access (void)
 
 /**
  * mono_get_exception_method_access2:
- * @msg: an informative message for the user.
- *
- * Returns: a new instance of the `System.MethodAccessException`
+ * \param msg an informative message for the user.
+ * \returns a new instance of the \c System.MethodAccessException
  */
 MonoException *
 mono_get_exception_method_access_msg (const char *msg)
@@ -836,10 +800,9 @@ mono_get_exception_method_access_msg (const char *msg)
 
 /**
  * mono_get_exception_reflection_type_load:
- * @types: an array of types that were defined in the moduled loaded.
- * @exceptions: an array of exceptions that were thrown during the type loading.
- *
- * Returns: a new instance of the `System.Reflection.ReflectionTypeLoadException`
+ * \param types an array of types that were defined in the moduled loaded.
+ * \param exceptions an array of exceptions that were thrown during the type loading.
+ * \returns a new instance of the \c System.Reflection.ReflectionTypeLoadException
  */
 MonoException *
 mono_get_exception_reflection_type_load (MonoArray *types_raw, MonoArray *exceptions_raw)
@@ -899,6 +862,9 @@ mono_get_exception_reflection_type_load_checked (MonoArrayHandle types, MonoArra
        return exc;
 }
 
+/**
+ * mono_get_exception_runtime_wrapped:
+ */
 MonoException *
 mono_get_exception_runtime_wrapped (MonoObject *wrapped_exception)
 {
@@ -1032,13 +998,13 @@ ves_icall_Mono_Runtime_GetNativeStackTrace (MonoExceptionHandle exc, MonoError *
 
 /**
  * mono_error_raise_exception:
- * @target_error: the exception to raise
+ * \param target_error the exception to raise
  *
- * Raises the exception of @target_error.
- * Does nothing if @target_error has a success error code.
+ * Raises the exception of \p target_error.
+ * Does nothing if \p target_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 @target_error is cleaned up.
+ * The error object \p target_error is cleaned up.
 */
 void
 mono_error_raise_exception (MonoError *target_error)
@@ -1050,11 +1016,9 @@ mono_error_raise_exception (MonoError *target_error)
 
 /**
  * mono_error_set_pending_exception:
- * @error: The error
- *
- *
- * If @error is set, convert it to an exception and set the pending exception for the current icall.
- * Returns TRUE if @error was set, or FALSE otherwise, so that you can write:
+ * \param error The error
+ * If \p error is set, convert it to an exception and set the pending exception for the current icall.
+ * \returns TRUE if \p error was set, or FALSE otherwise, so that you can write:
  *    if (mono_error_set_pending_exception (error)) {
  *      { ... cleanup code ... }
  *      return;
index 35ae5d69e523474e1b4c0c966d7993d2af7d6159..6575694c7c50ce37e9c0d903a89dabf869f3d3f4 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_METADATA_EXCEPTION_H_
 #define _MONO_METADATA_EXCEPTION_H_
 
index 64332ed18d12f7273e6e7d868165a01e49167d41..c6c906bc098faaf23feb34e389b48fd046289940 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * file-mmap-posix.c: File mmap internal calls
+/**
+ * \file
+ * File mmap internal calls
  *
  * Author:
  *     Rodrigo Kumpera
index 3cc9124c0854ccf6626e244329df27bd8c5e90ae..1ecf2dedbe8299f8c78ff61ca1169fde19acfc8b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * file-mmap-windows.c: MemoryMappedFile internal calls for Windows
+/**
+ * \file
+ * MemoryMappedFile internal calls for Windows
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index a91b1b11d08b538f51baaf8c043350f4a51b02e1..93d1f05afae7e4148d752d2135a2fb284361ae86 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * file-mmap.h: Managed mmap wrappers.
+/**
+ * \file
+ * Managed mmap wrappers.
  *
  * Authors:
  *     Rodrigo Kumpera
index 9d154e1ecd60a5cf7b8c6bc94bf93c7a657cdcf7..aed76449e25eadd617289b36a17779772fc8f6da 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * filewatcher.c: File System Watcher internal calls
+/**
+ * \file
+ * File System Watcher internal calls
  *
  * Authors:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
index 5982dc5b7bff6e016eb75b76df10f7be50594c8a..2a0f8b0e62c08abbc3b858803c678ca9708d6618 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * filewatcher.h: File System Watcher internal calls
+/**
+ * \file
+ * File System Watcher internal calls
  *
  * Authors:
  *     Gonzalo Paniagua Javier (gonzalo@ximian.com)
index f71f0bc9f4a667052760a35b79296e6047badfd1..65488d77923aa78246fbd577e2a9019a4e70b06d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * metadata/gc-internals.h: Internal GC interface
+/**
+ * \file
+ * Internal GC interface
  *
  * Author: Paolo Molaro <lupus@ximian.com>
  *
index ef232a93e5e98a27911de3bb57996cdb9a5b683f..908efed7d65753c2b50a4793466e54b34d012cd7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * gc-stats.c: GC statistics.
+/**
+ * \file
+ * GC statistics.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
index f3bc6aba7c5cefa793da20e97c590ed9c0103356..ffe47f32cc59129e2730581bcee5d907e44a3f25 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * metadata/gc.c: GC icalls.
+/**
+ * \file
+ * GC icalls.
  *
  * Author: Paolo Molaro <lupus@ximian.com>
  *
@@ -383,9 +384,9 @@ object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*))
 
 /**
  * mono_object_register_finalizer:
- * @obj: object to register
+ * \param obj object to register
  *
- * Records that object @obj has a finalizer, this will call the
+ * Records that object \p obj has a finalizer, this will call the
  * Finalize method when the garbage collector disposes the object.
  * 
  */
@@ -398,15 +399,14 @@ mono_object_register_finalizer (MonoObject *obj)
 
 /**
  * mono_domain_finalize:
- * @domain: the domain to finalize
- * @timeout: msects to wait for the finalization to complete, -1 to wait indefinitely
+ * \param domain the domain to finalize
+ * \param timeout msecs to wait for the finalization to complete, \c -1 to wait indefinitely
  *
- *  Request finalization of all finalizable objects inside @domain. Wait
- * @timeout msecs for the finalization to complete.
+ * Request finalization of all finalizable objects inside \p domain. Wait
+ * \p timeout msecs for the finalization to complete.
  *
- * Returns: TRUE if succeeded, FALSE if there was a timeout
+ * \returns TRUE if succeeded, FALSE if there was a timeout
  */
-
 gboolean
 mono_domain_finalize (MonoDomain *domain, guint32 timeout) 
 {
@@ -1046,13 +1046,13 @@ mono_gc_is_finalizer_internal_thread (MonoInternalThread *thread)
 
 /**
  * mono_gc_is_finalizer_thread:
- * @thread: the thread to test.
+ * \param thread the thread to test.
  *
  * In Mono objects are finalized asynchronously on a separate thread.
- * This routine tests whether the @thread argument represents the
+ * This routine tests whether the \p thread argument represents the
  * finalization thread.
  * 
- * Returns: TRUE if @thread is the finalization thread.
+ * \returns TRUE if \p thread is the finalization thread.
  */
 gboolean
 mono_gc_is_finalizer_thread (MonoThread *thread)
@@ -1173,20 +1173,20 @@ reference_queue_clear_for_domain (MonoDomain *domain)
 }
 /**
  * mono_gc_reference_queue_new:
- * @callback callback used when processing collected entries.
+ * \param callback callback used when processing collected entries.
  *
  * Create a new reference queue used to process collected objects.
  * A reference queue let you add a pair of (managed object, user data)
- * using the mono_gc_reference_queue_add method.
+ * using the \c mono_gc_reference_queue_add method.
  *
- * Once the managed object is collected @callback will be called
+ * Once the managed object is collected \p callback will be called
  * in the finalizer thread with 'user data' as argument.
  *
  * The callback is called from the finalizer thread without any locks held.
- * When a AppDomain is unloaded, all callbacks for objects belonging to it
+ * When an AppDomain is unloaded, all callbacks for objects belonging to it
  * will be invoked.
  *
- * @returns the new queue.
+ * \returns the new queue.
  */
 MonoReferenceQueue*
 mono_gc_reference_queue_new (mono_reference_queue_callback callback)
@@ -1204,15 +1204,15 @@ mono_gc_reference_queue_new (mono_reference_queue_callback callback)
 
 /**
  * mono_gc_reference_queue_add:
- * @queue the queue to add the reference to.
- * @obj the object to be watched for collection
- * @user_data parameter to be passed to the queue callback
+ * \param queue the queue to add the reference to.
+ * \param obj the object to be watched for collection
+ * \param user_data parameter to be passed to the queue callback
  *
- * Queue an object to be watched for collection, when the @obj is
- * collected, the callback that was registered for the @queue will
- * be invoked with @user_data as argument.
+ * Queue an object to be watched for collection, when the \p obj is
+ * collected, the callback that was registered for the \p queue will
+ * be invoked with \p user_data as argument.
  *
- * @returns false if the queue is scheduled to be freed.
+ * \returns FALSE if the queue is scheduled to be freed.
  */
 gboolean
 mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *user_data)
@@ -1236,9 +1236,9 @@ mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *u
 
 /**
  * mono_gc_reference_queue_free:
- * @queue the queue that should be freed.
+ * \param queue the queue that should be freed.
  *
- * This operation signals that @queue should be freed. This operation is deferred
+ * This operation signals that \p queue should be freed. This operation is deferred
  * as it happens on the finalizer thread.
  *
  * After this call, no further objects can be queued. It's the responsibility of the
index 2317cb549a3b6dfaae44f087cf06ede9119625de..f8c3a1cdd9d5610e601151b1eb7b0bc544a41e9f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * handle.c: Handle to object in native code
+/**
+ * \file
+ * Handle to object in native code
  *
  * Authors:
  *  - Ludovic Henry <ludovic@xamarin.com>
index 76ce61c8e4c5556f11bee1b5d10fd637c0c5eaf1..2b35c878e3680fb9a92d45f47f8ae216982e6bc2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * handle.h: Handle to object in native code
+/**
+ * \file
+ * Handle to object in native code
  *
  * Authors:
  *  - Ludovic Henry <ludovic@xamarin.com>
index 068a04c8073f01561f1df6c9cfbf940561d9140c..6611e02de6bf6a96a29b6ff242fd6392523675e6 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * This file contains the default set of the mono internal calls.
  * Each type that has internal call methods must be declared here
  * with the ICALL_TYPE macro as follows:
@@ -146,7 +147,6 @@ ICALL(ARGI_4, "Setup",                            mono_ArgIterator_Setup)
 
 ICALL_TYPE(ARRAY, "System.Array", ARRAY_1)
 ICALL(ARRAY_1, "ClearInternal",    ves_icall_System_Array_ClearInternal)
-ICALL(ARRAY_2, "Clone",            ves_icall_System_Array_Clone)
 ICALL(ARRAY_3, "CreateInstanceImpl",   ves_icall_System_Array_CreateInstanceImpl)
 ICALL(ARRAY_14, "CreateInstanceImpl64",   ves_icall_System_Array_CreateInstanceImpl64)
 ICALL(ARRAY_4, "FastCopy",         ves_icall_System_Array_FastCopy)
@@ -263,7 +263,7 @@ ICALL(ENUM_7, "get_value", ves_icall_System_Enum_get_value)
 
 ICALL_TYPE(ENV, "System.Environment", ENV_1)
 ICALL(ENV_1, "Exit", ves_icall_System_Environment_Exit)
-ICALL(ENV_2, "GetCommandLineArgs", ves_icall_System_Environment_GetCoomandLineArgs)
+ICALL(ENV_2, "GetCommandLineArgs", ves_icall_System_Environment_GetCommandLineArgs)
 ICALL(ENV_3, "GetEnvironmentVariableNames", ves_icall_System_Environment_GetEnvironmentVariableNames)
 ICALL(ENV_31, "GetIs64BitOperatingSystem", ves_icall_System_Environment_GetIs64BitOperatingSystem)
 ICALL(ENV_4, "GetLogicalDrivesInternal", ves_icall_System_Environment_GetLogicalDrives )
index 85329546ec2e6e58d6c1831321d297e42a0a66b6..62af7edbdf5a6a7f9b809f5cc0af855b3422f679 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 00937670ceb15e66a2824b9a7403ad79a1bd2e9c..b187621542279144247c8bb6781ceb062c79faea 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 7867984e28ff8dc29723a44b21c84eae71df31d9..92b8d76e089566d24afdbac215f99b5f4e3fc659 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * icall-windows-uwp.c: UWP icall support for Mono.
+/**
+ * \file
+ * UWP icall support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 05e4ccf97374d36db769e0952af9f2f0ca60216a..c0b1d314d9189e72cb8534913a59edb9f0dc792d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * icall-windows.c: Windows icall support.
+/**
+ * \file
+ * Windows icall support.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 2e6392549d835a732a4f28b7cdf9b5ca317593a3..cb562cde7613af2419d55b049d8a3a7ece434449 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * icall.c:
+/**
+ * \file
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -732,14 +732,6 @@ ves_icall_System_Array_ClearInternal (MonoArray *arr, int idx, int length)
        mono_gc_bzero_atomic (mono_array_addr_with_size_fast (arr, sz, idx), length * sz);
 }
 
-ICALL_EXPORT MonoArray*
-ves_icall_System_Array_Clone (MonoArray *arr)
-{
-       MonoError error;
-       MonoArray *result = mono_array_clone_checked (arr, &error);
-       mono_error_set_pending_exception (&error);
-       return result;
-}
 
 ICALL_EXPORT gboolean
 ves_icall_System_Array_FastCopy (MonoArray *source, int source_idx, MonoArray* dest, int dest_idx, int length)
@@ -6404,6 +6396,8 @@ ICALL_EXPORT MonoReflectionType *
 ves_icall_Remoting_RealProxy_InternalGetProxyType (MonoTransparentProxy *tp)
 {
        MonoError error;
+       g_assert (tp != NULL && mono_object_class (tp) == mono_defaults.transparent_proxy_class);
+       g_assert (tp->remote_class != NULL && tp->remote_class->proxy_class != NULL);
        MonoReflectionType *ret = mono_type_get_object_checked (mono_object_domain (tp), &tp->remote_class->proxy_class->byval_arg, &error);
        mono_error_set_pending_exception (&error);
 
@@ -6564,7 +6558,7 @@ char **environ;
 #endif
 
 ICALL_EXPORT MonoArray *
-ves_icall_System_Environment_GetCoomandLineArgs (void)
+ves_icall_System_Environment_GetCommandLineArgs (void)
 {
        MonoError error;
        MonoArray *result = mono_runtime_get_main_args_checked (&error);
@@ -7287,10 +7281,20 @@ ves_icall_MonoMethod_get_base_method (MonoReflectionMethodHandle m, gboolean def
 
        MonoMethod *base = mono_method_get_base_method (method, definition, error);
        return_val_if_nok (error, MONO_HANDLE_CAST (MonoReflectionMethod, NULL_HANDLE));
-       if (base == method)
-               return m;
-       else
-               return mono_method_get_object_handle (mono_domain_get (), base, NULL, error);
+       if (base == method) {
+               /* we want to short-circuit and return 'm' here. But we should
+                  return the same method object that
+                  mono_method_get_object_handle, below would return.  Since
+                  that call takes NULL for the reftype argument, it will take
+                  base->klass as the reflected type for the MonoMethod.  So we
+                  need to check that m also has base->klass as the reflected
+                  type. */
+               MonoReflectionTypeHandle orig_reftype = MONO_HANDLE_NEW_GET (MonoReflectionType, m, reftype);
+               MonoClass *orig_klass = mono_class_from_mono_type (MONO_HANDLE_GETVAL (orig_reftype, type));
+               if (base->klass == orig_klass)
+                       return m;
+       }
+       return mono_method_get_object_handle (mono_domain_get (), base, NULL, error);
 }
 
 ICALL_EXPORT MonoStringHandle
@@ -8087,12 +8091,12 @@ mono_icall_cleanup (void)
 
 /**
  * mono_add_internal_call:
- * @name: method specification to surface to the managed world
- * @method: pointer to a C method to invoke when the method is called
+ * \param name method specification to surface to the managed world
+ * \param method pointer to a C method to invoke when the method is called
  *
- * This method surfaces the C function pointed by @method as a method
+ * This method surfaces the C function pointed by \p method as a method
  * that has been surfaced in managed code with the method specified in
- * @name as an internal call.
+ * \p name as an internal call.
  *
  * Internal calls are surfaced to all app domains loaded and they are
  * accessibly by a type with the specified name.
@@ -8103,15 +8107,16 @@ mono_icall_cleanup (void)
  *
  * For example, the following are all valid declarations:
  *
- * "MyApp.Services.ScriptService:Accelerate"
- * "MyApp.Services.ScriptService:Slowdown(int,bool)"
+ * \c MyApp.Services.ScriptService:Accelerate
+ *
+ * \c MyApp.Services.ScriptService:Slowdown(int,bool)
  *
  * You use method parameters in cases where there might be more than
  * one surface method to managed code.  That way you can register different
  * internal calls for different method overloads.
  *
  * The internal calls are invoked with no marshalling.   This means that .NET
- * types like System.String are exposed as `MonoString *` parameters.   This is
+ * types like \c System.String are exposed as \c MonoString* parameters.   This is
  * different than the way that strings are surfaced in P/Invoke.
  *
  * For more information on how the parameters are marshalled, see the
@@ -8271,11 +8276,10 @@ no_icall_table (void)
 
 /**
  * mono_lookup_internal_call_full:
- * @method: the method to look up
- * @uses_handles: out argument if method needs handles around managed objects.
- *
- * Returns a pointer to the icall code for the given method.  If
- * uses_handles is not NULL, it will be set to TRUE if the method
+ * \param method the method to look up
+ * \param uses_handles out argument if method needs handles around managed objects.
+ * \returns a pointer to the icall code for the given method.  If
+ * \p uses_handles is not NULL, it will be set to TRUE if the method
  * needs managed objects wrapped using the infrastructure in handle.h
  *
  * If the method is not found, warns and returns NULL.
@@ -8404,6 +8408,9 @@ mono_lookup_internal_call_full (MonoMethod *method, mono_bool *uses_handles)
 #endif
 }
 
+/**
+ * mono_lookup_internal_call:
+ */
 gpointer
 mono_lookup_internal_call (MonoMethod *method)
 {
index e6868daee9c2887f672d7e3d2f374ee8ae0a72cd..15bff3beedea89d2a91a1ab4e4c5e4288495664d 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2015 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index d09924ff496afc30d6fc625ffedb7ca7ba0d4d53..eb4d686412e586b822e0f064748cc7e7117c2b64 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * image.c: Routines for manipulating an image stored in an
+/**
+ * \file
+ * Routines for manipulating an image stored in an
  * extended PE/COFF file.
  * 
  * Authors:
@@ -199,14 +200,14 @@ mono_cli_rva_image_map (MonoImage *image, guint32 addr)
 }
 
 /**
- * mono_images_rva_map:
- * @image: a MonoImage
- * @addr: relative virtual address (RVA)
+ * mono_image_rva_map:
+ * \param image a \c MonoImage
+ * \param addr relative virtual address (RVA)
  *
  * This is a low-level routine used by the runtime to map relative
  * virtual address (RVA) into their location in memory. 
  *
- * Returns: the address in memory for the given RVA, or NULL if the
+ * \returns the address in memory for the given RVA, or NULL if the
  * RVA is not valid for this image. 
  */
 char *
@@ -290,13 +291,13 @@ mono_images_cleanup (void)
 
 /**
  * mono_image_ensure_section_idx:
- * @image: The image we are operating on
- * @section: section number that we will load/map into memory
+ * \param image The image we are operating on
+ * \param section section number that we will load/map into memory
  *
  * This routine makes sure that we have an in-memory copy of
- * an image section (.text, .rsrc, .data).
+ * an image section (<code>.text</code>, <code>.rsrc</code>, <code>.data</code>).
  *
- * Returns: TRUE on success
+ * \returns TRUE on success
  */
 int
 mono_image_ensure_section_idx (MonoImage *image, int section)
@@ -325,13 +326,13 @@ mono_image_ensure_section_idx (MonoImage *image, int section)
 
 /**
  * mono_image_ensure_section:
- * @image: The image we are operating on
- * @section: section name that we will load/map into memory
+ * \param image The image we are operating on
+ * \param section section name that we will load/map into memory
  *
  * This routine makes sure that we have an in-memory copy of
  * an image section (.text, .rsrc, .data).
  *
- * Returns: TRUE on success
+ * \returns TRUE on success
  */
 int
 mono_image_ensure_section (MonoImage *image, const char *section)
@@ -535,9 +536,9 @@ load_metadata_ptrs (MonoImage *image, MonoCLIImageInfo *iinfo)
        }
 
        i = ((MonoImageLoader*)image->loader)->load_tables (image);
-       g_assert (image->heap_guid.data);
 
        if (!image->metadata_only) {
+               g_assert (image->heap_guid.data);
                g_assert (image->heap_guid.size >= 16);
 
                image->guid = mono_guid_to_string ((guint8*)image->heap_guid.data);
@@ -758,6 +759,9 @@ mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error)
        return image->modules [idx - 1];
 }
 
+/**
+ * mono_image_load_module:
+ */
 MonoImage*
 mono_image_load_module (MonoImage *image, int idx)
 {
@@ -783,6 +787,9 @@ class_next_value (gpointer value)
        return (gpointer*)&klass->next_class_cache;
 }
 
+/**
+ * mono_image_init:
+ */
 void
 mono_image_init (MonoImage *image)
 {
@@ -1102,7 +1109,7 @@ Mono provides its own implementation of those assemblies so it's safe to do so.
 
 The ignored_assemblies list is generated using tools/nuget-hash-extractor and feeding the problematic nugets to it.
 
-Right now the list of nugets are the ones that provide the assemblies in $ignored_assemblies_names.
+Right now the list of nugets are the ones that provide the assemblies in $ignored_assemblies_file_names.
 
 This is to be removed once a proper fix is shipped through nuget.
 
@@ -1124,7 +1131,12 @@ typedef struct {
        const char guid [40];
 } IgnoredAssembly;
 
-const char *ignored_assemblies_names[] = {
+typedef struct {
+       int assembly_name;
+       guint16 major, minor, build, revision;
+} IgnoredAssemblyVersion;
+
+const char *ignored_assemblies_file_names[] = {
        "System.Runtime.InteropServices.RuntimeInformation.dll",
        "System.Globalization.Extensions.dll",
        "System.IO.Compression.dll",
@@ -1155,6 +1167,53 @@ static const IgnoredAssembly ignored_assemblies [] = {
        IGNORED_ASSEMBLY (0x75B4B041, SYS_VALUE_TUPLE, "F81A4140-A898-4E2B-B6E9-55CE78C273EC", "4.3.0 netstandard1.0"),
 };
 
+
+const char *ignored_assemblies_names[] = {
+       "System.Runtime.InteropServices.RuntimeInformation",
+       "System.Globalization.Extensions",
+       "System.IO.Compression",
+       "System.Net.Http",
+       "System.Text.Encoding.CodePages",
+       "System.Reflection.DispatchProxy",
+       "System.ValueTuple"
+};
+
+#define IGNORED_ASM_VER(NAME, MAJOR, MINOR, BUILD, REVISION) { .assembly_name = NAME, .major = MAJOR, .minor = MINOR, .build = BUILD, .revision = REVISION }
+
+static const IgnoredAssemblyVersion ignored_assembly_versions [] = {
+       IGNORED_ASM_VER (SYS_GLOBALIZATION_EXT, 4, 0, 0, 0),
+       IGNORED_ASM_VER (SYS_GLOBALIZATION_EXT, 4, 0, 1, 0),
+       IGNORED_ASM_VER (SYS_GLOBALIZATION_EXT, 4, 0, 2, 0),
+       IGNORED_ASM_VER (SYS_IO_COMPRESSION, 4, 1, 0, 0),
+       IGNORED_ASM_VER (SYS_IO_COMPRESSION, 4, 1, 2, 0),
+       IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 0),
+       IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 0, 1),
+       IGNORED_ASM_VER (SYS_NET_HTTP, 4, 1, 1, 0),
+       IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 0, 0),
+       IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 1, 0),
+       IGNORED_ASM_VER (SYS_REF_DISP_PROXY, 4, 0, 2, 0),
+       IGNORED_ASM_VER (SYS_RT_INTEROP_RUNTIME_INFO, 4, 0, 0, 0),
+       IGNORED_ASM_VER (SYS_RT_INTEROP_RUNTIME_INFO, 4, 0, 1, 0),
+       IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 1, 0),
+       IGNORED_ASM_VER (SYS_TEXT_ENC_CODEPAGES, 4, 0, 2, 0),
+       IGNORED_ASM_VER (SYS_VALUE_TUPLE, 4, 0, 1, 0),
+};
+
+gboolean
+mono_assembly_is_problematic_version (const char *name, guint16 major, guint16 minor, guint16 build, guint16 revision)
+{
+       for (int i = 0; i < G_N_ELEMENTS (ignored_assembly_versions); ++i) {
+               if (ignored_assembly_versions [i].major != major ||
+                       ignored_assembly_versions [i].minor != minor ||
+                       ignored_assembly_versions [i].build != build ||
+                       ignored_assembly_versions [i].revision != revision)
+                               continue;
+               if (!strcmp (ignored_assemblies_names [ignored_assembly_versions [i].assembly_name], name))
+                       return TRUE;
+       }
+       return FALSE;
+}
+
 /*
 Equivalent C# code:
        static void Main  () {
@@ -1187,7 +1246,7 @@ is_problematic_image (MonoImage *image)
        // Either sort by hash and bseach or use SoA and make the linear search more cache efficient.
        for (int i = 0; i < G_N_ELEMENTS (ignored_assemblies); ++i) {
                if (ignored_assemblies [i].hash == h && !strcmp (image->guid, ignored_assemblies [i].guid)) {
-                       const char *needle = ignored_assemblies_names [ignored_assemblies [i].assembly_name];
+                       const char *needle = ignored_assemblies_file_names [ignored_assemblies [i].assembly_name];
                        size_t needle_len = strlen (needle);
                        size_t asm_len = strlen (image->name);
                        if (asm_len > needle_len && !g_ascii_strcasecmp (image->name + (asm_len - needle_len), needle))
@@ -1343,14 +1402,14 @@ do_mono_image_open (const char *fname, MonoImageOpenStatus *status,
 }
 
 /**
- * mono_image_loaded:
- * @name: path or assembly name of the image to load
- * @refonly: Check with respect to reflection-only loads?
+ * mono_image_loaded_full:
+ * \param name path or assembly name of the image to load
+ * \param refonly Check with respect to reflection-only loads?
  *
  * This routine verifies that the given image is loaded.
  * It checks either reflection-only loads only, or normal loads only, as specified by parameter.
  *
- * Returns: the loaded MonoImage, or NULL on failure.
+ * \returns the loaded \c MonoImage, or NULL on failure.
  */
 MonoImage *
 mono_image_loaded_full (const char *name, gboolean refonly)
@@ -1368,11 +1427,9 @@ mono_image_loaded_full (const char *name, gboolean refonly)
 
 /**
  * mono_image_loaded:
- * @name: path or assembly name of the image to load
- *
+ * \param name path or assembly name of the image to load
  * This routine verifies that the given image is loaded. Reflection-only loads do not count.
- *
- * Returns: the loaded MonoImage, or NULL on failure.
+ * \returns the loaded \c MonoImage, or NULL on failure.
  */
 MonoImage *
 mono_image_loaded (const char *name)
@@ -1398,6 +1455,9 @@ find_by_guid (gpointer key, gpointer val, gpointer user_data)
                data->res = image;
 }
 
+/**
+ * mono_image_loaded_by_guid_full:
+ */
 MonoImage *
 mono_image_loaded_by_guid_full (const char *guid, gboolean refonly)
 {
@@ -1412,6 +1472,9 @@ mono_image_loaded_by_guid_full (const char *guid, gboolean refonly)
        return data.res;
 }
 
+/**
+ * mono_image_loaded_by_guid:
+ */
 MonoImage *
 mono_image_loaded_by_guid (const char *guid)
 {
@@ -1485,18 +1548,27 @@ mono_image_open_from_data_internal (char *data, guint32 data_len, gboolean need_
        return register_image (image);
 }
 
+/**
+ * mono_image_open_from_data_with_name:
+ */
 MonoImage *
 mono_image_open_from_data_with_name (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly, const char *name)
 {
        return mono_image_open_from_data_internal (data, data_len, need_copy, status, refonly, FALSE, name);
 }
 
+/**
+ * mono_image_open_from_data_full:
+ */
 MonoImage *
 mono_image_open_from_data_full (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status, gboolean refonly)
 {
   return mono_image_open_from_data_with_name (data, data_len, need_copy, status, refonly, NULL);
 }
 
+/**
+ * mono_image_open_from_data:
+ */
 MonoImage *
 mono_image_open_from_data (char *data, guint32 data_len, gboolean need_copy, MonoImageOpenStatus *status)
 {
@@ -1528,6 +1600,9 @@ mono_image_open_from_module_handle (HMODULE module_handle, char* fname, gboolean
 }
 #endif
 
+/**
+ * mono_image_open_full:
+ */
 MonoImage *
 mono_image_open_full (const char *fname, MonoImageOpenStatus *status, gboolean refonly)
 {
@@ -1644,13 +1719,12 @@ mono_image_open_a_lot (const char *fname, MonoImageOpenStatus *status, gboolean
 
 /**
  * mono_image_open:
- * @fname: filename that points to the module we want to open
- * @status: An error condition is returned in this field
- *
- * Returns: An open image of type %MonoImage or NULL on error. 
+ * \param fname filename that points to the module we want to open
+ * \param status An error condition is returned in this field
+ * \returns An open image of type \c MonoImage or NULL on error. 
  * The caller holds a temporary reference to the returned image which should be cleared 
- * when no longer needed by calling mono_image_close ().
- * if NULL, then check the value of @status for details on the error
+ * when no longer needed by calling \c mono_image_close.
+ * if NULL, then check the value of \p status for details on the error
  */
 MonoImage *
 mono_image_open (const char *fname, MonoImageOpenStatus *status)
@@ -1660,13 +1734,12 @@ mono_image_open (const char *fname, MonoImageOpenStatus *status)
 
 /**
  * mono_pe_file_open:
- * @fname: filename that points to the module we want to open
- * @status: An error condition is returned in this field
- *
- * Returns: An open image of type %MonoImage or NULL on error.  if
- * NULL, then check the value of @status for details on the error.
- * This variant for mono_image_open DOES NOT SET UP CLI METADATA.
- * It's just a PE file loader, used for FileVersionInfo.  It also does
+ * \param fname filename that points to the module we want to open
+ * \param status An error condition is returned in this field
+ * \returns An open image of type \c MonoImage or NULL on error.  if
+ * NULL, then check the value of \p status for details on the error.
+ * This variant for \c mono_image_open DOES NOT SET UP CLI METADATA.
+ * It's just a PE file loader, used for \c FileVersionInfo.  It also does
  * not use the image cache.
  */
 MonoImage *
@@ -1679,11 +1752,9 @@ mono_pe_file_open (const char *fname, MonoImageOpenStatus *status)
 
 /**
  * mono_image_open_raw
- * @fname: filename that points to the module we want to open
- * @status: An error condition is returned in this field
- * 
- * Returns an image without loading neither pe or cli data.
- * 
+ * \param fname filename that points to the module we want to open
+ * \param status An error condition is returned in this field
+ * \returns an image without loading neither pe or cli data.
  * Use mono_image_load_pe_data and mono_image_load_cli_data to load them.  
  */
 MonoImage *
@@ -1705,6 +1776,9 @@ mono_image_open_metadata_only (const char *fname, MonoImageOpenStatus *status)
        return do_mono_image_open (fname, status, TRUE, TRUE, FALSE, TRUE, FALSE);
 }
 
+/**
+ * mono_image_fixup_vtable:
+ */
 void
 mono_image_fixup_vtable (MonoImage *image)
 {
@@ -1778,9 +1852,8 @@ free_array_cache_entry (gpointer key, gpointer val, gpointer user_data)
 
 /**
  * mono_image_addref:
- * @image: The image file we wish to add a reference to
- *
- *  Increases the reference count of an image.
+ * \param image The image file we wish to add a reference to
+ * Increases the reference count of an image.
  */
 void
 mono_image_addref (MonoImage *image)
@@ -2116,8 +2189,7 @@ mono_image_close_finish (MonoImage *image)
 
 /**
  * mono_image_close:
- * @image: The image file we wish to close
- *
+ * \param image The image file we wish to close
  * Closes an image file, deallocates all memory consumed and
  * unmaps all possible sections of the file
  */
@@ -2130,9 +2202,8 @@ mono_image_close (MonoImage *image)
 
 /** 
  * mono_image_strerror:
- * @status: an code indicating the result from a recent operation
- *
- * Returns: a string describing the error
+ * \param status an code indicating the result from a recent operation
+ * \returns a string describing the error
  */
 const char *
 mono_image_strerror (MonoImageOpenStatus status)
@@ -2232,13 +2303,12 @@ mono_image_walk_resource_tree (MonoCLIImageInfo *info, guint32 res_id,
 
 /**
  * mono_image_lookup_resource:
- * @image: the image to look up the resource in
- * @res_id: A MONO_PE_RESOURCE_ID_ that represents the resource ID to lookup.
- * @lang_id: The language id.
- * @name: the resource name to lookup.
- *
- * Returns: NULL if not found, otherwise a pointer to the in-memory representation
- * of the given resource. The caller should free it using g_free () when no longer
+ * \param image the image to look up the resource in
+ * \param res_id A \c MONO_PE_RESOURCE_ID_ that represents the resource ID to lookup.
+ * \param lang_id The language id.
+ * \param name the resource name to lookup.
+ * \returns NULL if not found, otherwise a pointer to the in-memory representation
+ * of the given resource. The caller should free it using \c g_free when no longer
  * needed.
  */
 gpointer
@@ -2303,12 +2373,10 @@ mono_image_lookup_resource (MonoImage *image, guint32 res_id, guint32 lang_id, g
 
 /** 
  * mono_image_get_entry_point:
- * @image: the image where the entry point will be looked up.
- *
+ * \param image the image where the entry point will be looked up.
  * Use this routine to determine the metadata token for method that
  * has been flagged as the entry point.
- *
- * Returns: the token for the entry point method in the image
+ * \returns the token for the entry point method in the image
  */
 guint32
 mono_image_get_entry_point (MonoImage *image)
@@ -2318,15 +2386,15 @@ mono_image_get_entry_point (MonoImage *image)
 
 /**
  * mono_image_get_resource:
- * @image: the image where the resource will be looked up.
- * @offset: The offset to add to the resource
- * @size: a pointer to an int where the size of the resource will be stored
+ * \param image the image where the resource will be looked up.
+ * \param offset The offset to add to the resource
+ * \param size a pointer to an int where the size of the resource will be stored
  *
  * This is a low-level routine that fetches a resource from the
- * metadata that starts at a given @offset.  The @size parameter is
+ * metadata that starts at a given \p offset.  The \p size parameter is
  * filled with the data field as encoded in the metadata.
  *
- * Returns: the pointer to the resource whose offset is @offset.
+ * \returns the pointer to the resource whose offset is \p offset.
  */
 const char*
 mono_image_get_resource (MonoImage *image, guint32 offset, guint32 *size)
@@ -2417,6 +2485,9 @@ done:
        return res;
 }
 
+/**
+ * mono_image_load_file_for_image:
+ */
 MonoImage*
 mono_image_load_file_for_image (MonoImage *image, int fileidx)
 {
@@ -2428,13 +2499,13 @@ mono_image_load_file_for_image (MonoImage *image, int fileidx)
 
 /**
  * mono_image_get_strong_name:
- * @image: a MonoImage
- * @size: a guint32 pointer, or NULL.
+ * \param image a MonoImage
+ * \param size a \c guint32 pointer, or NULL.
  *
- * If the image has a strong name, and @size is not NULL, the value
+ * If the image has a strong name, and \p size is not NULL, the value
  * pointed to by size will have the size of the strong name.
  *
- * Returns: NULL if the image does not have a strong name, or a
+ * \returns NULL if the image does not have a strong name, or a
  * pointer to the public key.
  */
 const char*
@@ -2456,13 +2527,13 @@ mono_image_get_strong_name (MonoImage *image, guint32 *size)
 
 /**
  * mono_image_strong_name_position:
- * @image: a MonoImage
- * @size: a guint32 pointer, or NULL.
+ * \param image a \c MonoImage
+ * \param size a \c guint32 pointer, or NULL.
  *
- * If the image has a strong name, and @size is not NULL, the value
+ * If the image has a strong name, and \p size is not NULL, the value
  * pointed to by size will have the size of the strong name.
  *
- * Returns: the position within the image file where the strong name
+ * \returns the position within the image file where the strong name
  * is stored.
  */
 guint32
@@ -2482,15 +2553,15 @@ mono_image_strong_name_position (MonoImage *image, guint32 *size)
 
 /**
  * mono_image_get_public_key:
- * @image: a MonoImage
- * @size: a guint32 pointer, or NULL.
+ * \param image a \c MonoImage
+ * \param size a \c guint32 pointer, or NULL.
  *
- * This is used to obtain the public key in the @image.
+ * This is used to obtain the public key in the \p image.
  * 
- * If the image has a public key, and @size is not NULL, the value
+ * If the image has a public key, and \p size is not NULL, the value
  * pointed to by size will have the size of the public key.
  * 
- * Returns: NULL if the image does not have a public key, or a pointer
+ * \returns NULL if the image does not have a public key, or a pointer
  * to the public key.
  */
 const char*
@@ -2518,9 +2589,8 @@ mono_image_get_public_key (MonoImage *image, guint32 *size)
 
 /**
  * mono_image_get_name:
- * @name: a MonoImage
- *
- * Returns: the name of the assembly.
+ * \param name a \c MonoImage
+ * \returns the name of the assembly.
  */
 const char*
 mono_image_get_name (MonoImage *image)
@@ -2530,11 +2600,9 @@ mono_image_get_name (MonoImage *image)
 
 /**
  * mono_image_get_filename:
- * @image: a MonoImage
- *
- * Used to get the filename that hold the actual MonoImage
- *
- * Returns: the filename.
+ * \param image a \c MonoImage
+ * Used to get the filename that hold the actual \c MonoImage
+ * \returns the filename.
  */
 const char*
 mono_image_get_filename (MonoImage *image)
@@ -2542,12 +2610,18 @@ mono_image_get_filename (MonoImage *image)
        return image->name;
 }
 
+/**
+ * mono_image_get_guid:
+ */
 const char*
 mono_image_get_guid (MonoImage *image)
 {
        return image->guid;
 }
 
+/**
+ * mono_image_get_table_info:
+ */
 const MonoTableInfo*
 mono_image_get_table_info (MonoImage *image, int table_id)
 {
@@ -2556,6 +2630,9 @@ mono_image_get_table_info (MonoImage *image, int table_id)
        return &image->tables [table_id];
 }
 
+/**
+ * mono_image_get_table_rows:
+ */
 int
 mono_image_get_table_rows (MonoImage *image, int table_id)
 {
@@ -2564,6 +2641,9 @@ mono_image_get_table_rows (MonoImage *image, int table_id)
        return image->tables [table_id].rows;
 }
 
+/**
+ * mono_table_info_get_rows:
+ */
 int
 mono_table_info_get_rows (const MonoTableInfo *table)
 {
@@ -2572,11 +2652,9 @@ mono_table_info_get_rows (const MonoTableInfo *table)
 
 /**
  * mono_image_get_assembly:
- * @image: the MonoImage.
- *
+ * \param image the \c MonoImage .
  * Use this routine to get the assembly that owns this image.
- *
- * Returns: the assembly that holds this image.
+ * \returns the assembly that holds this image.
  */
 MonoAssembly* 
 mono_image_get_assembly (MonoImage *image)
@@ -2586,12 +2664,11 @@ mono_image_get_assembly (MonoImage *image)
 
 /**
  * mono_image_is_dynamic:
- * @image: the MonoImage
+ * \param image the \c MonoImage
  *
  * Determines if the given image was created dynamically through the
- * System.Reflection.Emit API
- *
- * Returns: TRUE if the image was created dynamically, FALSE if not.
+ * \c System.Reflection.Emit API
+ * \returns TRUE if the image was created dynamically, FALSE if not.
  */
 gboolean
 mono_image_is_dynamic (MonoImage *image)
@@ -2601,12 +2678,10 @@ mono_image_is_dynamic (MonoImage *image)
 
 /**
  * mono_image_has_authenticode_entry:
- * @image: the MonoImage
- *
+ * \param image the \c MonoImage
  * Use this routine to determine if the image has a Authenticode
  * Certificate Table.
- *
- * Returns: TRUE if the image contains an authenticode entry in the PE
+ * \returns TRUE if the image contains an authenticode entry in the PE
  * directory.
  */
 gboolean
@@ -2736,8 +2811,7 @@ mono_image_unlock (MonoImage *image)
 
 /**
  * mono_image_property_lookup:
- *
- * Lookup a property on @image. Used to store very rare fields of MonoClass and MonoMethod.
+ * Lookup a property on \p image . Used to store very rare fields of \c MonoClass and \c MonoMethod .
  *
  * LOCKING: Takes the image lock
  */
@@ -2755,8 +2829,8 @@ mono_image_property_lookup (MonoImage *image, gpointer subject, guint32 property
 
 /**
  * mono_image_property_insert:
- *
- * Insert a new property @property with value @value on @subject in @image. Used to store very rare fields of MonoClass and MonoMethod.
+ * Insert a new property \p property with value \p value on \p subject in \p
+ * image. Used to store very rare fields of \c MonoClass and \c MonoMethod.
  *
  * LOCKING: Takes the image lock
  */
@@ -2771,8 +2845,7 @@ mono_image_property_insert (MonoImage *image, gpointer subject, guint32 property
 
 /**
  * mono_image_property_remove:
- *
- * Remove all properties associated with @subject in @image. Used to store very rare fields of MonoClass and MonoMethod.
+ * Remove all properties associated with \p subject in \p image. Used to store very rare fields of \c MonoClass and \c MonoMethod .
  *
  * LOCKING: Takes the image lock
  */
index b158ec26834acc9962eb16361ee9cb94ba8dd243..72836fddb0a4f9a1312b451a6af2c45677502b5d 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONONET_METADATA_IMAGE_H_ 
 #define _MONONET_METADATA_IMAGE_H_
 
index 5761a8a00e35875b2174e07923a1fe7c96f4a3f3..50ca4e7e31daf8e432c9e05972421ab9a01ddf97 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * jit-info.c: MonoJitInfo functionality
+/**
+ * \file
+ * MonoJitInfo functionality
  *
  * Author:
  *     Dietmar Maurer (dietmar@ximian.com)
@@ -313,18 +314,18 @@ mono_jit_info_table_find_internal (MonoDomain *domain, char *addr, gboolean try_
 
 /**
  * mono_jit_info_table_find:
- * @domain: Domain that you want to look up
- * @addr: Points to an address with JITed code.
+ * \param domain Domain that you want to look up
+ * \param addr Points to an address with JITed code.
  *
- * Use this function to obtain a `MonoJitInfo*` object that can be used to get
- * some statistics.   You should provide both the @domain on which you will be
- * performing the probe, and an address.   Since application domains can share code
+ * Use this function to obtain a \c MonoJitInfo* object that can be used to get
+ * some statistics. You should provide both the \p domain on which you will be
+ * performing the probe, and an address. Since application domains can share code
  * the same address can be in use by multiple domains at once.
  *
  * This does not return any results for trampolines.
  *
- * Returns: NULL if the address does not belong to JITed code (it might be native
- * code or a trampoline) or a valid pointer to a `MonoJitInfo*`.
+ * \returns NULL if the address does not belong to JITed code (it might be native
+ * code or a trampoline) or a valid pointer to a \c MonoJitInfo* .
  */
 MonoJitInfo*
 mono_jit_info_table_find (MonoDomain *domain, char *addr)
@@ -823,13 +824,13 @@ mono_jit_info_init (MonoJitInfo *ji, MonoMethod *method, guint8 *code, int code_
 
 /**
  * mono_jit_info_get_code_start:
- * @ji: the JIT information handle
+ * \param ji the JIT information handle
  *
  * Use this function to get the starting address for the method described by
- * the @ji object.  You can use this plus the `mono_jit_info_get_code_size`
+ * the \p ji object.  You can use this plus the \c mono_jit_info_get_code_size
  * to determine the start and end of the native code.
  *
- * Returns: Starting address with the native code.
+ * \returns Starting address with the native code.
  */
 gpointer
 mono_jit_info_get_code_start (MonoJitInfo* ji)
@@ -839,13 +840,13 @@ mono_jit_info_get_code_start (MonoJitInfo* ji)
 
 /**
  * mono_jit_info_get_code_size:
- * @ji: the JIT information handle
+ * \param ji the JIT information handle
  *
  * Use this function to get the code size for the method described by
- * the @ji object.   You can use this plus the `mono_jit_info_get_code_start`
+ * the \p ji object. You can use this plus the \c mono_jit_info_get_code_start
  * to determine the start and end of the native code.
  *
- * Returns: Starting address with the native code.
+ * \returns Starting address with the native code.
  */
 int
 mono_jit_info_get_code_size (MonoJitInfo* ji)
@@ -855,13 +856,13 @@ mono_jit_info_get_code_size (MonoJitInfo* ji)
 
 /**
  * mono_jit_info_get_method:
- * @ji: the JIT information handle
+ * \param ji the JIT information handle
  *
- * Use this function to get the `MonoMethod *` that backs
- * the @ji object.
+ * Use this function to get the \c MonoMethod* that backs
+ * the \p ji object.
  *
- * Returns: The MonoMethod that represents the code tracked
- * by @ji.
+ * \returns The \c MonoMethod that represents the code tracked
+ * by \p ji.
  */
 MonoMethod*
 mono_jit_info_get_method (MonoJitInfo* ji)
index e0b18174a12eb66c15214112fdc165db20dab4e5..d9781cbdfdd8e849e0cc4d742fb4665eb6cbd4c9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * loader.c: Image Loader 
+/**
+ * \file
+ * Image Loader
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
@@ -253,11 +254,11 @@ field_from_memberref (MonoImage *image, guint32 token, MonoClass **retklass,
        return field;
 }
 
-/*
+/**
  * mono_field_from_token:
- * @deprecated use the _checked variant
+ * \deprecated use the \c _checked variant
  * Notes: runtime code MUST not use this function
-*/
+ */
 MonoClassField*
 mono_field_from_token (MonoImage *image, guint32 token, MonoClass **retklass, MonoGenericContext *context)
 {
@@ -570,10 +571,10 @@ fail:
        return NULL;
 }
 
-/*
+/**
  * mono_inflate_generic_signature:
  *
- *   Inflate SIG with CONTEXT, and return a canonical copy. On error, set ERROR, and return NULL.
+ * Inflate \p sig with \p context, and return a canonical copy. On error, set \p error, and return NULL.
  */
 MonoMethodSignature*
 mono_inflate_generic_signature (MonoMethodSignature *sig, MonoGenericContext *context, MonoError *error)
@@ -631,9 +632,10 @@ fail:
        return NULL;
 }
 
-/*
- * token is the method_ref/def/spec token used in a call IL instruction.
- * @deprecated use the _checked variant
+/**
+ * mono_method_get_signature_full:
+ * \p token is the method ref/def/spec token used in a \c call IL instruction.
+ * \deprecated use the \c _checked variant
  * Notes: runtime code MUST not use this function
  */
 MonoMethodSignature*
@@ -732,9 +734,10 @@ mono_method_get_signature_checked (MonoMethod *method, MonoImage *image, guint32
        return sig;
 }
 
-/*
- * token is the method_ref/def/spec token used in a call IL instruction.
- * @deprecated use the _checked variant
+/**
+ * mono_method_get_signature:
+ * \p token is the method_ref/def/spec token used in a call IL instruction.
+ * \deprecated use the \c _checked variant
  * Notes: runtime code MUST not use this function
  */
 MonoMethodSignature*
@@ -1022,32 +1025,33 @@ mono_dllmap_lookup (MonoImage *assembly, const char *dll, const char* func, cons
 
 /**
  * mono_dllmap_insert:
- * @assembly: if NULL, this is a global mapping, otherwise the remapping of the dynamic library will only apply to the specified assembly
- * @dll: The name of the external library, as it would be found in the DllImport declaration.  If prefixed with 'i:' the matching of the library name is done without case sensitivity
- * @func: if not null, the mapping will only applied to the named function (the value of EntryPoint)
- * @tdll: The name of the library to map the specified @dll if it matches.
- * @tfunc: The name of the function that replaces the invocation.  If NULL, it is replaced with a copy of @func.
+ * \param assembly if NULL, this is a global mapping, otherwise the remapping of the dynamic library will only apply to the specified assembly
+ * \param dll The name of the external library, as it would be found in the \c DllImport declaration.  If prefixed with <code>i:</code> the matching of the library name is done without case sensitivity
+ * \param func if not null, the mapping will only applied to the named function (the value of <code>EntryPoint</code>)
+ * \param tdll The name of the library to map the specified \p dll if it matches.
+ * \param tfunc The name of the function that replaces the invocation.  If NULL, it is replaced with a copy of \p func.
  *
  * LOCKING: Acquires the loader lock.
  *
- * This function is used to programatically add DllImport remapping in either
+ * This function is used to programatically add \c DllImport remapping in either
  * a specific assembly, or as a global remapping.   This is done by remapping
- * references in a DllImport attribute from the @dll library name into the @tdll
- * name.    If the @dll name contains the prefix "i:", the comparison of the 
+ * references in a \c DllImport attribute from the \p dll library name into the \p tdll
+ * name. If the \p dll name contains the prefix <code>i:</code>, the comparison of the 
  * library name is done without case sensitivity.
  *
- * If you pass @func, this is the name of the EntryPoint in a DllImport if specified
- * or the name of the function as determined by DllImport.    If you pass @func, you
- * must also pass @tfunc which is the name of the target function to invoke on a match.
+ * If you pass \p func, this is the name of the \c EntryPoint in a \c DllImport if specified
+ * or the name of the function as determined by \c DllImport. If you pass \p func, you
+ * must also pass \p tfunc which is the name of the target function to invoke on a match.
  *
  * Example:
- * mono_dllmap_insert (NULL, "i:libdemo.dll", NULL, relocated_demo_path, NULL);
  *
- * The above will remap DllImport statments for "libdemo.dll" and "LIBDEMO.DLL" to
- * the contents of relocated_demo_path for all assemblies in the Mono process.
+ * <code>mono_dllmap_insert (NULL, "i:libdemo.dll", NULL, relocated_demo_path, NULL);</code>
+ *
+ * The above will remap \c DllImport statements for \c libdemo.dll and \c LIBDEMO.DLL to
+ * the contents of \c relocated_demo_path for all assemblies in the Mono process.
  *
  * NOTE: This can be called before the runtime is initialized, for example from
- * mono_config_parse ().
+ * \c mono_config_parse.
  */
 void
 mono_dllmap_insert (MonoImage *assembly, const char *dll, const char *func, const char *tdll, const char *tfunc)
@@ -1148,6 +1152,9 @@ is_absolute_path (const char *path)
        return g_path_is_absolute (path);
 }
 
+/**
+ * mono_lookup_pinvoke_call:
+ */
 gpointer
 mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char **exc_arg)
 {
@@ -1710,6 +1717,9 @@ mono_get_method_from_token (MonoImage *image, guint32 token, MonoClass *klass,
        return result;
 }
 
+/**
+ * mono_get_method:
+ */
 MonoMethod *
 mono_get_method (MonoImage *image, guint32 token, MonoClass *klass)
 {
@@ -1719,6 +1729,9 @@ mono_get_method (MonoImage *image, guint32 token, MonoClass *klass)
        return result;
 }
 
+/**
+ * mono_get_method_full:
+ */
 MonoMethod *
 mono_get_method_full (MonoImage *image, guint32 token, MonoClass *klass,
                      MonoGenericContext *context)
@@ -1855,12 +1868,10 @@ mono_get_method_constrained_with_method (MonoImage *image, MonoMethod *method, M
 
 /**
  * mono_get_method_constrained:
- *
- * This is used when JITing the `constrained.' opcode.
- *
- * This returns two values: the contrained method, which has been inflated
- * as the function return value;   And the original CIL-stream method as
- * declared in cil_method.  The later is used for verification.
+ * This is used when JITing the <code>constrained.</code> opcode.
+ * \returns The contrained method, which has been inflated
+ * as the function return value; and the original CIL-stream method as
+ * declared in \p cil_method. The latter is used for verification.
  */
 MonoMethod *
 mono_get_method_constrained (MonoImage *image, guint32 token, MonoClass *constrained_class,
@@ -1884,6 +1895,9 @@ mono_get_method_constrained_checked (MonoImage *image, guint32 token, MonoClass
        return get_method_constrained (image, *cil_method, constrained_class, context, error);
 }
 
+/**
+ * mono_free_method:
+ */
 void
 mono_free_method  (MonoMethod *method)
 {
@@ -1925,6 +1939,9 @@ mono_free_method  (MonoMethod *method)
        }
 }
 
+/**
+ * mono_method_get_param_names:
+ */
 void
 mono_method_get_param_names (MonoMethod *method, const char **names)
 {
@@ -2004,6 +2021,9 @@ mono_method_get_param_names (MonoMethod *method, const char **names)
        }
 }
 
+/**
+ * mono_method_get_param_token:
+ */
 guint32
 mono_method_get_param_token (MonoMethod *method, int index)
 {
@@ -2031,6 +2051,9 @@ mono_method_get_param_token (MonoMethod *method, int index)
        return 0;
 }
 
+/**
+ * mono_method_get_marshal_info:
+ */
 void
 mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs)
 {
@@ -2093,6 +2116,9 @@ mono_method_get_marshal_info (MonoMethod *method, MonoMarshalSpec **mspecs)
        }
 }
 
+/**
+ * mono_method_has_marshal_info:
+ */
 gboolean
 mono_method_has_marshal_info (MonoMethod *method)
 {
@@ -2185,6 +2211,9 @@ mono_stack_walk (MonoStackWalk func, gpointer user_data)
        mono_get_eh_callbacks ()->mono_walk_stack_with_ctx (stack_walk_adapter, NULL, MONO_UNWIND_LOOKUP_ALL, &ud);
 }
 
+/**
+ * mono_stack_walk_no_il:
+ */
 void
 mono_stack_walk_no_il (MonoStackWalk func, gpointer user_data)
 {
@@ -2224,10 +2253,9 @@ async_stack_walk_adapter (MonoStackFrameInfo *frame, MonoContext *ctx, gpointer
 }
 
 
-/*
+/**
  * mono_stack_walk_async_safe:
- *
- *   Async safe version callable from signal handlers.
+ * Async safe version callable from signal handlers.
  */
 void
 mono_stack_walk_async_safe (MonoStackWalkAsyncSafe func, void *initial_sig_context, void *user_data)
@@ -2249,6 +2277,9 @@ last_managed (MonoMethod *m, gint no, gint ilo, gboolean managed, gpointer data)
        return managed;
 }
 
+/**
+ * mono_method_get_last_managed:
+ */
 MonoMethod*
 mono_method_get_last_managed (void)
 {
@@ -2262,7 +2293,7 @@ static gboolean loader_lock_track_ownership = FALSE;
 /**
  * mono_loader_lock:
  *
- * See docs/thread-safety.txt for the locking strategy.
+ * See \c docs/thread-safety.txt for the locking strategy.
  */
 void
 mono_loader_lock (void)
@@ -2273,6 +2304,9 @@ mono_loader_lock (void)
        }
 }
 
+/**
+ * mono_loader_unlock:
+ */
 void
 mono_loader_unlock (void)
 {
@@ -2330,7 +2364,7 @@ mono_loader_unlock_if_inited (void)
 }
 
 /**
- * mono_method_signature:
+ * mono_method_signature_checked:
  *
  * Return the signature of the method M. On failure, returns NULL, and ERR is set.
  */
@@ -2489,8 +2523,7 @@ mono_method_signature_checked (MonoMethod *m, MonoError *error)
 
 /**
  * mono_method_signature:
- *
- * Return the signature of the method M. On failure, returns NULL.
+ * \returns the signature of the method \p m. On failure, returns NULL.
  */
 MonoMethodSignature*
 mono_method_signature (MonoMethod *m)
@@ -2509,18 +2542,27 @@ mono_method_signature (MonoMethod *m)
        return sig;
 }
 
+/**
+ * mono_method_get_name:
+ */
 const char*
 mono_method_get_name (MonoMethod *method)
 {
        return method->name;
 }
 
+/**
+ * mono_method_get_class:
+ */
 MonoClass*
 mono_method_get_class (MonoMethod *method)
 {
        return method->klass;
 }
 
+/**
+ * mono_method_get_token:
+ */
 guint32
 mono_method_get_token (MonoMethod *method)
 {
@@ -2596,6 +2638,9 @@ mono_method_get_header_checked (MonoMethod *method, MonoError *error)
        return mono_metadata_parse_mh_full (img, container, (const char *)loc, error);
 }
 
+/**
+ * mono_method_get_header:
+ */
 MonoMethodHeader*
 mono_method_get_header (MonoMethod *method)
 {
@@ -2606,6 +2651,9 @@ mono_method_get_header (MonoMethod *method)
 }
 
 
+/**
+ * mono_method_get_flags:
+ */
 guint32
 mono_method_get_flags (MonoMethod *method, guint32 *iflags)
 {
@@ -2614,8 +2662,9 @@ mono_method_get_flags (MonoMethod *method, guint32 *iflags)
        return method->flags;
 }
 
-/*
- * Find the method index in the metadata methodDef table.
+/**
+ * mono_method_get_index:
+ * Find the method index in the metadata \c MethodDef table.
  */
 guint32
 mono_method_get_index (MonoMethod *method)
index f906e5172655d5cc41257d1907d92e35701db810..0891613e45fe6fc88cc4700eb8516b60bc96735c 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_METADATA_LOADER_H_
 #define _MONO_METADATA_LOADER_H_ 1
 
index 157750c81d8665d3410e16d231bc865b632f00e1..c3800d5325fbc6e599fe7188b4150a52ee78b0e4 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * locales.c: Culture-sensitive handling
+/**
+ * \file
+ * Culture-sensitive handling
  *
  * Authors:
  *     Dick Porter (dick@ximian.com)
index 676639356b41ad5ed151bc71cc945226a2ab52c7..774636cf253ac57401d01649adb3bb3a9975ba9b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * locales.h: Culture-sensitive handling
+/**
+ * \file
+ * Culture-sensitive handling
  *
  * Authors:
  *     Dick Porter (dick@ximian.com)
index bbf939994ab304d288ce6beb1c0fdfd4cd749277..bda05487d5fde39a960e535e54c5e513a8e9b18d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lock-tracer.c: Runtime simple lock tracer
+/**
+ * \file
+ * Runtime simple lock tracer
  *
  * Authors:
  *     Rodrigo Kumpera (rkumpera@novell.com)
index ee4ab3419504a593ece5443c857a74792ae186af..2f1a9ef0265e43dfc07184cce43d159a8c64631c 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_METADATA_LOCK_TRACER_H__
 #define __MONO_METADATA_LOCK_TRACER_H__
 
index ea210b5fb2bdcd56dd517bfc431faa2e6e25e255..7316ac4a0e0566a5123ebc7905ba0768c3d05ff3 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index d6b3f45f65018b53cf821724ed9229a45352fc97..9d251cdd7b0bb8c4105e87a06224294405f02807 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 7ac1a33b47a8653ed9fc5d79c7cfa3690dcbf818..f268d15cdad4135a70749e0166dd259421ba0a25 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * marshal-windows-uwp.c: UWP marshal support for Mono.
+/**
+ * \file
+ * UWP marshal support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 69ee01dea9b5de6e817356e5a386cad3ac4992ad..73f9310b41d75540da897759112f2665b5112cde 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * marshal-windows.c: Windows marshal support.
+/**
+ * \file
+ * Windows marshal support.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index af4cabd655fcf0665f9b4443ef9e363a6212ed2c..c639bda2efe31db3a121a7354096e9c535b910f2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * marshal.c: Routines for marshaling complex types in P/Invoke methods.
+/**
+ * \file
+ * Routines for marshaling complex types in P/Invoke methods.
  * 
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -985,11 +986,11 @@ mono_string_utf16_to_builder (MonoStringBuilder *sb, gunichar2 *text)
 
 /**
  * mono_string_builder_to_utf8:
- * @sb: the string builder
+ * \param sb the string builder
  *
- * Converts to utf8 the contents of the MonoStringBuilder.
+ * Converts to utf8 the contents of the \c MonoStringBuilder .
  *
- * Returns: a utf8 string with the contents of the StringBuilder.
+ * \returns a utf8 string with the contents of the \c StringBuilder .
  *
  * The return value must be released with mono_marshal_free.
  *
@@ -1036,11 +1037,11 @@ mono_string_builder_to_utf8 (MonoStringBuilder *sb)
 
 /**
  * mono_string_builder_to_utf16:
- * @sb: the string builder
+ * \param sb the string builder
  *
- * Converts to utf16 the contents of the MonoStringBuilder.
+ * Converts to utf16 the contents of the \c MonoStringBuilder .
  *
- * Returns: a utf16 string with the contents of the StringBuilder.
+ * Returns: a utf16 string with the contents of the \c StringBuilder .
  *
  * The return value must be released with mono_marshal_free.
  *
@@ -1113,12 +1114,12 @@ mono_string_to_ansibstr (MonoString *string_obj)
 
 /**
  * mono_string_to_byvalstr:
- * @dst: Where to store the null-terminated utf8 decoded string.
- * @src: the MonoString to copy.
- * @size: the maximum number of bytes to copy.
+ * \param dst Where to store the null-terminated utf8 decoded string.
+ * \param src the \c MonoString to copy.
+ * \param size the maximum number of bytes to copy.
  *
- * Copies the MonoString pointed to by @src as a utf8 string
- * into @dst, it copies at most @size bytes into the destination.
+ * Copies the \c MonoString pointed to by \p src as a utf8 string
+ * into \p dst, it copies at most \p size bytes into the destination.
  */
 void
 mono_string_to_byvalstr (gpointer dst, MonoString *src, int size)
@@ -1146,12 +1147,12 @@ mono_string_to_byvalstr (gpointer dst, MonoString *src, int size)
 
 /**
  * mono_string_to_byvalwstr:
- * @dst: Where to store the null-terminated utf16 decoded string.
- * @src: the MonoString to copy.
- * @size: the maximum number of wide characters to copy (each consumes 2 bytes)
+ * \param dst Where to store the null-terminated utf16 decoded string.
+ * \param src the \c MonoString to copy.
+ * \param size the maximum number of wide characters to copy (each consumes 2 bytes)
  *
- * Copies the MonoString pointed to by @src as a utf16 string into
- * @dst, it copies at most @size bytes into the destination (including
+ * Copies the \c MonoString pointed to by \p src as a utf16 string into
+ * \p dst, it copies at most \p size bytes into the destination (including
  * a terminating 16-bit zero terminator).
  */
 void
@@ -2797,6 +2798,9 @@ mono_mb_create_and_cache (GHashTable *cache, gpointer key,
        return mono_mb_create_and_cache_full (cache, key, mb, sig, max_stack, NULL, NULL);
 }
 
+/**
+ * mono_marshal_method_from_wrapper:
+ */
 MonoMethod *
 mono_marshal_method_from_wrapper (MonoMethod *wrapper)
 {
@@ -3077,6 +3081,9 @@ cache_generic_delegate_wrapper (GHashTable *cache, MonoMethod *orig_method, Mono
        return res;
 }
 
+/**
+ * mono_marshal_get_delegate_begin_invoke:
+ */
 MonoMethod *
 mono_marshal_get_delegate_begin_invoke (MonoMethod *method)
 {
@@ -3313,6 +3320,9 @@ mono_mb_emit_restore_result (MonoMethodBuilder *mb, MonoType *return_type)
 
 #endif /* DISABLE_JIT */
 
+/**
+ * mono_marshal_get_delegate_end_invoke:
+ */
 MonoMethod *
 mono_marshal_get_delegate_end_invoke (MonoMethod *method)
 {
@@ -3760,8 +3770,9 @@ mono_marshal_get_delegate_invoke_internal (MonoMethod *method, gboolean callvirt
        return res;     
 }
 
-/*
- * the returned method invokes all methods in a multicast delegate.
+/**
+ * mono_marshal_get_delegate_invoke:
+ * The returned method invokes all methods in a multicast delegate.
  */
 MonoMethod *
 mono_marshal_get_delegate_invoke (MonoMethod *method, MonoDelegate *del)
@@ -4211,15 +4222,17 @@ emit_runtime_invoke_body (MonoMethodBuilder *mb, MonoImage *image, MonoMethod *m
 }
 #endif
 
-/*
- * generates IL code for the runtime invoke function 
- * MonoObject *runtime_invoke (MonoObject *this_obj, void **params, MonoObject **exc, void* method)
+/**
+ * mono_marshal_get_runtime_invoke:
+ * Generates IL code for the runtime invoke function:
  *
- * we also catch exceptions if exc != null
- * If VIRTUAL is TRUE, then METHOD is invoked virtually on THIS. This is useful since
- * it means that the compiled code for METHOD does not have to be looked up 
+ * <code>MonoObject *runtime_invoke (MonoObject *this_obj, void **params, MonoObject **exc, void* method)</code>
+ *
+ * We also catch exceptions if \p exc is not NULL.
+ * If \p virtual is TRUE, then \p method is invoked virtually on \p this. This is useful since
+ * it means that the compiled code for \p method does not have to be looked up 
  * before calling the runtime invoke wrapper. In this case, the wrapper ignores
- * its METHOD argument.
+ * its \p method argument.
  */
 MonoMethod *
 mono_marshal_get_runtime_invoke (MonoMethod *method, gboolean virtual_)
@@ -4427,7 +4440,7 @@ mono_marshal_get_runtime_invoke_dynamic (void)
        MonoMethodSignature *csig;
        MonoExceptionClause *clause;
        MonoMethodBuilder *mb;
-       int pos, posna;
+       int pos;
        char *name;
        WrapperInfo *info;
 
@@ -4497,15 +4510,6 @@ mono_marshal_get_runtime_invoke_dynamic (void)
        mono_mb_emit_byte (mb, CEE_LDNULL);
        mono_mb_emit_stloc (mb, 0);
 
-       /* Check for the abort exception */
-       mono_mb_emit_ldloc (mb, 1);
-       mono_mb_emit_op (mb, CEE_ISINST, mono_defaults.threadabortexception_class);
-       posna = mono_mb_emit_short_branch (mb, CEE_BRFALSE_S);
-
-       /* Delay the abort exception */
-       mono_mb_emit_icall (mb, ves_icall_System_Threading_Thread_ResetAbort);
-
-       mono_mb_patch_short_branch (mb, posna);
        mono_mb_emit_branch (mb, CEE_LEAVE);
 
        clause->handler_len = mono_mb_get_pos (mb) - clause->handler_offset;
@@ -4642,9 +4646,10 @@ mono_mb_emit_auto_layout_exception (MonoMethodBuilder *mb, MonoClass *klass)
 }
 #endif
 
-/*
- * generates IL code for the icall wrapper (the generated method
- * calls the unmanaged code in func)
+/**
+ * mono_marshal_get_icall_wrapper:
+ * Generates IL code for the icall wrapper. The generated method
+ * calls the unmanaged code in \p func.
  */
 MonoMethod *
 mono_marshal_get_icall_wrapper (MonoMethodSignature *sig, const char *name, gconstpointer func, gboolean check_exceptions)
@@ -7541,16 +7546,16 @@ signature_param_uses_handles (MonoMethodSignature *sig, int param)
 #ifndef DISABLE_JIT
 /**
  * mono_marshal_emit_native_wrapper:
- * @image: the image to use for looking up custom marshallers
- * @sig: The signature of the native function
- * @piinfo: Marshalling information
- * @mspecs: Marshalling information
- * @aot: whenever the created method will be compiled by the AOT compiler
- * @method: if non-NULL, the pinvoke method to call
- * @check_exceptions: Whenever to check for pending exceptions after the native call
- * @func_param: the function to call is passed as a boxed IntPtr as the first parameter
+ * \param image the image to use for looking up custom marshallers
+ * \param sig The signature of the native function
+ * \param piinfo Marshalling information
+ * \param mspecs Marshalling information
+ * \param aot whenever the created method will be compiled by the AOT compiler
+ * \param method if non-NULL, the pinvoke method to call
+ * \param check_exceptions Whenever to check for pending exceptions after the native call
+ * \param func_param the function to call is passed as a boxed IntPtr as the first parameter
  *
- * generates IL code for the pinvoke wrapper, the generated code calls @func.
+ * generates IL code for the pinvoke wrapper, the generated code calls \p func .
  */
 void
 mono_marshal_emit_native_wrapper (MonoImage *image, MonoMethodBuilder *mb, MonoMethodSignature *sig, MonoMethodPInvoke *piinfo, MonoMarshalSpec **mspecs, gpointer func, gboolean aot, gboolean check_exceptions, gboolean func_param)
@@ -7826,11 +7831,11 @@ mono_marshal_emit_native_wrapper (MonoImage *image, MonoMethodBuilder *mb, MonoM
 
 /**
  * mono_marshal_get_native_wrapper:
- * @method: The MonoMethod to wrap.
- * @check_exceptions: Whenever to check for pending exceptions
+ * \param method The \c MonoMethod to wrap.
+ * \param check_exceptions Whenever to check for pending exceptions
  *
- * generates IL code for the pinvoke wrapper (the generated method
- * calls the unmanaged code in piinfo->addr)
+ * Generates IL code for the pinvoke wrapper. The generated method
+ * calls the unmanaged code in \c piinfo->addr.
  */
 MonoMethod *
 mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions, gboolean aot)
@@ -8237,11 +8242,11 @@ mono_marshal_get_native_wrapper (MonoMethod *method, gboolean check_exceptions,
 
 /**
  * mono_marshal_get_native_func_wrapper:
- * @image: The image to use for memory allocation and for looking up custom marshallers.
- * @sig: The signature of the function
- * @func: The native function to wrap
+ * \param image The image to use for memory allocation and for looking up custom marshallers.
+ * \param sig The signature of the function
+ * \param func The native function to wrap
  *
- *   Returns a wrapper method around native functions, similar to the pinvoke
+ * \returns a wrapper method around native functions, similar to the pinvoke
  * wrapper.
  */
 MonoMethod *
@@ -8750,9 +8755,10 @@ mono_marshal_set_callconv_from_modopt (MonoMethod *method, MonoMethodSignature *
        }
 }
 
-/*
- * generates IL code to call managed methods from unmanaged code 
- * If target_handle==0, the wrapper info will be a WrapperInfo structure.
+/**
+ * mono_marshal_get_managed_wrapper:
+ * Generates IL code to call managed methods from unmanaged code 
+ * If \p target_handle is \c 0, the wrapper info will be a \c WrapperInfo structure.
  */
 MonoMethod *
 mono_marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass, uint32_t target_handle, MonoError *error)
@@ -9071,8 +9077,9 @@ generate_check_cache (int obj_arg_position, int class_arg_position, int cache_ar
 
 #endif /* DISABLE_JIT */
 
-/*
- * This does the equivalent of mono_object_castclass_with_cache.
+/**
+ * mono_marshal_get_castclass_with_cache:
+ * This does the equivalent of \c mono_object_castclass_with_cache.
  */
 MonoMethod *
 mono_marshal_get_castclass_with_cache (void)
@@ -9154,8 +9161,9 @@ mono_marshal_isinst_with_cache (MonoObject *obj, MonoClass *klass, uintptr_t *ca
        return isinst;
 }
 
-/*
- * This does the equivalent of mono_object_isinst_with_cache.
+/**
+ * mono_marshal_get_isinst_with_cache:
+ * This does the equivalent of \c mono_object_isinst_with_cache.
  */
 MonoMethod *
 mono_marshal_get_isinst_with_cache (void)
@@ -9218,9 +9226,9 @@ mono_marshal_get_isinst_with_cache (void)
 
 /**
  * mono_marshal_get_struct_to_ptr:
- * @klass:
+ * \param klass \c MonoClass
  *
- * generates IL code for StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld)
+ * Generates IL code for <code>StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld)</code>
  */
 MonoMethod *
 mono_marshal_get_struct_to_ptr (MonoClass *klass)
@@ -9292,9 +9300,8 @@ mono_marshal_get_struct_to_ptr (MonoClass *klass)
 
 /**
  * mono_marshal_get_ptr_to_struct:
- * @klass:
- *
- * generates IL code for PtrToStructure (IntPtr src, object structure)
+ * \param klass \c MonoClass
+ * Generates IL code for <code>PtrToStructure (IntPtr src, object structure)</code>
  */
 MonoMethod *
 mono_marshal_get_ptr_to_struct (MonoClass *klass)
@@ -9413,9 +9420,10 @@ mono_marshal_get_synchronized_inner_wrapper (MonoMethod *method)
        return res;
 }
 
-/*
- * generates IL code for the synchronized wrapper: the generated method
- * calls METHOD while locking 'this' or the parent type.
+/**
+ * mono_marshal_get_synchronized_wrapper:
+ * Generates IL code for the synchronized wrapper: the generated method
+ * calls \p method while locking \c this or the parent type.
  */
 MonoMethod *
 mono_marshal_get_synchronized_wrapper (MonoMethod *method)
@@ -9606,8 +9614,9 @@ mono_marshal_get_synchronized_wrapper (MonoMethod *method)
 }
 
 
-/*
- * the returned method calls 'method' unboxing the this argument
+/**
+ * mono_marshal_get_unbox_wrapper:
+ * The returned method calls \p method unboxing the \c this argument.
  */
 MonoMethod *
 mono_marshal_get_unbox_wrapper (MonoMethod *method)
@@ -10168,6 +10177,9 @@ mono_marshal_get_virtual_stelemref_wrappers (int *nwrappers)
        return res;
 }
 
+/**
+ * mono_marshal_get_stelemref:
+ */
 MonoMethod*
 mono_marshal_get_stelemref (void)
 {
@@ -10395,13 +10407,13 @@ static int elem_addr_cache_next = 0;
 
 /**
  * mono_marshal_get_array_address:
- * @rank: rank of the array type
- * @elem_size: size in bytes of an element of an array.
+ * \param rank rank of the array type
+ * \param elem_size size in bytes of an element of an array.
  *
  * Returns a MonoMethod that implements the code to get the address
- * of an element in a multi-dimenasional array of @rank dimensions.
+ * of an element in a multi-dimenasional array of \p rank dimensions.
  * The returned method takes an array as the first argument and then
- * @rank indexes for the @rank dimensions.
+ * \p rank indexes for the \p rank dimensions.
  * If ELEM_SIZE is 0, read the array size from the array object.
  */
 MonoMethod*
@@ -10662,6 +10674,9 @@ mono_marshal_alloc_co_task_mem (size_t size)
 }
 #endif
 
+/**
+ * mono_marshal_alloc:
+ */
 void*
 mono_marshal_alloc (gulong size, MonoError *error)
 {
@@ -10699,12 +10714,18 @@ mono_marshal_free_co_task_mem (void *ptr)
 }
 #endif
 
+/**
+ * mono_marshal_free:
+ */
 void
 mono_marshal_free (gpointer ptr)
 {
        mono_marshal_free_co_task_mem (ptr);
 }
 
+/**
+ * mono_marshal_free_array:
+ */
 void
 mono_marshal_free_array (gpointer *ptr, int size) 
 {
@@ -10747,7 +10768,7 @@ mono_marshal_string_to_utf16_copy (MonoString *s)
  * mono_marshal_set_last_error:
  *
  * This function is invoked to set the last error value from a P/Invoke call
- * which has SetLastError set.
+ * which has \c SetLastError set.
  */
 void
 mono_marshal_set_last_error (void)
@@ -11358,9 +11379,9 @@ mono_marshal_is_loading_type_info (MonoClass *klass)
 /**
  * mono_marshal_load_type_info:
  *
- *  Initialize klass::marshal_info using information from metadata. This function can
+ * Initialize \c klass::marshal_info using information from metadata. This function can
  * recursively call itself, and the caller is responsible to avoid that by calling 
- * mono_marshal_is_loading_type_info () beforehand.
+ * \c mono_marshal_is_loading_type_info beforehand.
  *
  * LOCKING: Acquires the loader lock.
  */
@@ -11523,9 +11544,8 @@ mono_marshal_load_type_info (MonoClass* klass)
 
 /**
  * mono_class_native_size:
- * @klass: a class 
- * 
- * Returns: the native size of an object instance (when marshaled 
+ * \param klass a class 
+ * \returns the native size of an object instance (when marshaled 
  * to unmanaged code) 
  */
 gint32
@@ -11633,6 +11653,9 @@ mono_type_native_stack_size (MonoType *t, guint32 *align)
        return 0;
 }
 
+/**
+ * mono_marshal_type_size:
+ */
 gint32
 mono_marshal_type_size (MonoType *type, MonoMarshalSpec *mspec, guint32 *align,
                        gboolean as_field, gboolean unicode)
@@ -11728,7 +11751,10 @@ mono_marshal_type_size (MonoType *type, MonoMarshalSpec *mspec, guint32 *align,
        return 0;
 }
 
-/* This is a JIT icall, it sets the pending exception and return NULL on error */
+/**
+ * mono_marshal_asany:
+ * This is a JIT icall, it sets the pending exception and returns NULL on error.
+ */
 gpointer
 mono_marshal_asany (MonoObject *o, MonoMarshalNative string_encoding, int param_attrs)
 {
@@ -11813,7 +11839,10 @@ mono_marshal_asany (MonoObject *o, MonoMarshalNative string_encoding, int param_
        return NULL;
 }
 
-/* This is a JIT icall, it sets the pending exception */
+/**
+ * mono_marshal_free_asany:
+ * This is a JIT icall, it sets the pending exception
+ */
 void
 mono_marshal_free_asany (MonoObject *o, gpointer ptr, MonoMarshalNative string_encoding, int param_attrs)
 {
index 4b1c185f876011751b95773b1a031527dd3342ad..9d24832dbeeae6bda4abd2e6be459e647006c5a6 100644 (file)
@@ -1,6 +1,6 @@
-
-/*
- * marshal.h: Routines for marshaling complex types in P/Invoke methods.
+/**
+ * \file
+ * Routines for marshaling complex types in P/Invoke methods.
  * 
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -121,6 +121,7 @@ typedef enum {
        /* Subtypes of MONO_WRAPPER_UNKNOWN */
        WRAPPER_SUBTYPE_GSHAREDVT_IN_SIG,
        WRAPPER_SUBTYPE_GSHAREDVT_OUT_SIG,
+       WRAPPER_SUBTYPE_INTERP_IN
 } WrapperSubtype;
 
 typedef struct {
@@ -195,6 +196,10 @@ typedef struct {
        MonoMethod *method;
 } DelegateInvokeWrapperInfo;
 
+typedef struct {
+       MonoMethodSignature *sig;
+} InterpInWrapperInfo;
+
 /*
  * 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
@@ -237,6 +242,8 @@ typedef struct {
                GsharedvtWrapperInfo gsharedvt;
                /* DELEGATE_INVOKE */
                DelegateInvokeWrapperInfo delegate_invoke;
+               /* INTERP_IN */
+               InterpInWrapperInfo interp_in;
        } d;
 } WrapperInfo;
 
index 4896a237fe49060fcad67b280e3ac7c9820dc638..d2cf14781b077e8f00e6371770e1996bdb0c3f7f 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_MEMPOOL_INTERNALS_H_
 #define _MONO_MEMPOOL_INTERNALS_H_
 
index 7a871f034bfd58b28de0092507c84d2cc6c41b37..e6fe9b25d0ad188eb61a7be7be1dcac149ee548b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mempool.c: efficient memory allocation
+/**
+ * \file
+ * efficient memory allocation
  *
  * MonoMemPool is for fast allocation of memory. We free
  * all memory when the pool is destroyed.
@@ -91,9 +92,8 @@ mono_mempool_new (void)
 
 /**
  * mono_mempool_new_size:
- * @initial_size: the amount of memory to initially reserve for the memory pool.
- *
- * Returns: a new memory pool with a specific initial memory reservation.
+ * \param initial_size the amount of memory to initially reserve for the memory pool.
+ * \returns a new memory pool with a specific initial memory reservation.
  */
 MonoMemPool *
 mono_mempool_new_size (int initial_size)
@@ -120,7 +120,7 @@ mono_mempool_new_size (int initial_size)
 
 /**
  * mono_mempool_destroy:
- * @pool: the memory pool to destroy
+ * \param pool the memory pool to destroy
  *
  * Free all memory associated with this pool.
  */
@@ -141,7 +141,7 @@ mono_mempool_destroy (MonoMemPool *pool)
 
 /**
  * mono_mempool_invalidate:
- * @pool: the memory pool to invalidate
+ * \param pool the memory pool to invalidate
  *
  * Fill the memory associated with this pool to 0x2a (42). Useful for debugging.
  */
@@ -160,7 +160,7 @@ mono_mempool_invalidate (MonoMemPool *pool)
 
 /**
  * mono_mempool_stats:
- * @pool: the momory pool we need stats for
+ * \param pool the memory pool we need stats for
  *
  * Print a few stats about the mempool:
  * - Total memory allocated (malloced) by mem pool
@@ -224,7 +224,7 @@ mono_backtrace (int size)
 #endif
 
 /**
- * mono_mempool_alloc:
+ * get_next_size:
  * @pool: the memory pool to use
  * @size: size of the memory entity we are trying to allocate
  *
@@ -251,12 +251,12 @@ get_next_size (MonoMemPool *pool, int size)
 
 /**
  * mono_mempool_alloc:
- * @pool: the memory pool to use
- * @size: size of the memory block
+ * \param pool the memory pool to use
+ * \param size size of the memory block
  *
- * Allocates a new block of memory in @pool.
+ * Allocates a new block of memory in \p pool .
  *
- * Returns: the address of a newly allocated memory block.
+ * \returns the address of a newly allocated memory block.
  */
 gpointer
 mono_mempool_alloc (MonoMemPool *pool, guint size)
@@ -314,7 +314,7 @@ mono_mempool_alloc (MonoMemPool *pool, guint size)
 /**
  * mono_mempool_alloc0:
  *
- * same as mono_mempool_alloc, but fills memory with zero.
+ * same as \c mono_mempool_alloc, but fills memory with zero.
  */
 gpointer
 mono_mempool_alloc0 (MonoMemPool *pool, guint size)
@@ -343,7 +343,7 @@ mono_mempool_alloc0 (MonoMemPool *pool, guint size)
 /**
  * mono_mempool_contains_addr:
  *
- *  Determines whenever ADDR is inside the memory used by the mempool.
+ * Determines whether \p addr is inside the memory used by the mempool.
  */
 gboolean
 mono_mempool_contains_addr (MonoMemPool *pool,
index d006493a5dc4cf9af082b53e22a8dce5d43c5c48..1abc25cc406e7f02ef646c735482df13437f463c 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_MEMPOOL_H_
 #define _MONO_MEMPOOL_H_
 
index 561e9968838f4a69d24e7c6eb77e273118386a88..9d0f3afcc99566b1e7a677c7ca6eb719697cd054 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <stdio.h>
 
 #include "config.h"
@@ -97,6 +101,12 @@ mono_dump_metadata_offsets (void)
 void
 mono_metadata_cross_helpers_run (void);
 
+/*
+ * mono_metadata_cross_helpers_run:
+ *
+ *   Check that the offsets given by object-offsets.h match the offsets
+ * on the host. This only checks the metadata offsets.
+ */
 void
 mono_metadata_cross_helpers_run (void)
 {
index 5ff20a90e6e6b80c3d23d41ea84a2aeeb51b3ad8..3ed3136236cc98661bb1758e92879596222f332a 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_METADATA_INTERNALS_H__
 #define __MONO_METADATA_INTERNALS_H__
@@ -934,5 +937,11 @@ mono_find_image_set_owner (void *ptr);
 void
 mono_loader_register_module (const char *name, MonoDl *module);
 
+gboolean
+mono_assembly_is_problematic_version (const char *name, guint16 major, guint16 minor, guint16 build, guint16 revision);
+
+void
+mono_ginst_get_desc (GString *str, MonoGenericInst *ginst);
+
 #endif /* __MONO_METADATA_INTERNALS_H__ */
 
index 554f5157d967a90980b8ce481548c0c3e9474736..f31983c303f3a9b039fb44ba970437689a3a7114 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * metadata-verify.c: Metadata verfication support
+/**
+ * \file
+ * Metadata verfication support
  *
  * Author:
  *     Mono Project (http://www.mono-project.com)
index 545b917177bf45472e6df6c8d7eacc5d344cedd1..46550b7db1c9ab7e883df4b168ea80c67bfee092 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * metadata.c: Routines for accessing the metadata
+/**
+ * \file
+ * Routines for accessing the metadata
  *
  * Authors:
  *   Miguel de Icaza (miguel@ximian.com)
@@ -520,12 +521,12 @@ mono_tables_names [] = {
 
 /**
  * mono_meta_table_name:
- * @table: table index
+ * \param table table index
  *
  * Returns the name of the given ECMA metadata logical format table
  * as described in ECMA 335, Partition II, Section 22.
  * 
- * Returns: the name for the @table index
+ * \returns the name for the \p table index
  */
 const char *
 mono_meta_table_name (int table)
@@ -571,17 +572,17 @@ get_nrows (MonoImage *meta, int tableidx)
 }
 
 /* Reference: Partition II - 23.2.6 */
-/*
+/**
  * mono_metadata_compute_size:
- * @meta: metadata context
- * @tableindex: metadata table number
- * @result_bitfield: pointer to guint32 where to store additional info
+ * \param meta metadata context
+ * \param tableindex metadata table number
+ * \param result_bitfield pointer to \c guint32 where to store additional info
  * 
- * mono_metadata_compute_size() computes the lenght in bytes of a single
+ * \c mono_metadata_compute_size computes the length in bytes of a single
  * row in a metadata table. The size of each column is encoded in the
- * @result_bitfield return value along with the number of columns in the table.
- * the resulting bitfield should be handed to the mono_metadata_table_size()
- * and mono_metadata_table_count() macros.
+ * \p result_bitfield return value along with the number of columns in the table.
+ * the resulting bitfield should be handed to the \c mono_metadata_table_size
+ * and \c mono_metadata_table_count macros.
  * This is a Mono runtime internal only function.
  */
 int
@@ -974,7 +975,7 @@ mono_metadata_compute_size (MonoImage *meta, int tableindex, guint32 *result_bit
 
 /**
  * mono_metadata_compute_table_bases:
- * @meta: metadata context to compute table values
+ * \param meta metadata context to compute table values
  *
  * Computes the table bases for the metadata structure.
  * This is an internal function used by the image loader code.
@@ -998,12 +999,12 @@ mono_metadata_compute_table_bases (MonoImage *meta)
 
 /**
  * mono_metadata_locate:
- * @meta: metadata context
- * @table: table code.
- * @idx: index of element to retrieve from @table.
+ * \param meta metadata context
+ * \param table table code.
+ * \param idx index of element to retrieve from \p table.
  *
- * Returns: a pointer to the @idx element in the metadata table
- * whose code is @table.
+ * \returns a pointer to the \p idx element in the metadata table
+ * whose code is \p table.
  */
 const char *
 mono_metadata_locate (MonoImage *meta, int table, int idx)
@@ -1016,11 +1017,11 @@ mono_metadata_locate (MonoImage *meta, int table, int idx)
 
 /**
  * mono_metadata_locate_token:
- * @meta: metadata context
- * @token: metadata token
+ * \param meta metadata context
+ * \param token metadata token
  *
- * Returns: a pointer to the data in the metadata represented by the
- * token #token.
+ * \returns a pointer to the data in the metadata represented by the
+ * token \p token .
  */
 const char *
 mono_metadata_locate_token (MonoImage *meta, guint32 token)
@@ -1030,10 +1031,9 @@ mono_metadata_locate_token (MonoImage *meta, guint32 token)
 
 /**
  * mono_metadata_string_heap:
- * @meta: metadata context
- * @index: index into the string heap.
- *
- * Returns: an in-memory pointer to the @index in the string heap.
+ * \param meta metadata context
+ * \param index index into the string heap.
+ * \returns an in-memory pointer to the \p index in the string heap.
  */
 const char *
 mono_metadata_string_heap (MonoImage *meta, guint32 index)
@@ -1045,10 +1045,9 @@ mono_metadata_string_heap (MonoImage *meta, guint32 index)
 
 /**
  * mono_metadata_user_string:
- * @meta: metadata context
- * @index: index into the user string heap.
- *
- * Returns: an in-memory pointer to the @index in the user string heap ("#US").
+ * \param meta metadata context
+ * \param index index into the user string heap.
+ * \returns an in-memory pointer to the \p index in the user string heap (<code>#US</code>).
  */
 const char *
 mono_metadata_user_string (MonoImage *meta, guint32 index)
@@ -1060,10 +1059,9 @@ mono_metadata_user_string (MonoImage *meta, guint32 index)
 
 /**
  * mono_metadata_blob_heap:
- * @meta: metadata context
- * @index: index into the blob.
- *
- * Returns: an in-memory pointer to the @index in the Blob heap.
+ * \param meta metadata context
+ * \param index index into the blob.
+ * \returns an in-memory pointer to the \p index in the Blob heap.
  */
 const char *
 mono_metadata_blob_heap (MonoImage *meta, guint32 index)
@@ -1075,10 +1073,9 @@ mono_metadata_blob_heap (MonoImage *meta, guint32 index)
 
 /**
  * mono_metadata_guid_heap:
- * @meta: metadata context
- * @index: index into the guid heap.
- *
- * Returns: an in-memory pointer to the @index in the guid heap.
+ * \param meta metadata context
+ * \param index index into the guid heap.
+ * \returns an in-memory pointer to the \p index in the guid heap.
  */
 const char *
 mono_metadata_guid_heap (MonoImage *meta, guint32 index)
@@ -1101,12 +1098,12 @@ dword_align (const unsigned char *ptr)
 
 /**
  * mono_metadata_decode_row:
- * @t: table to extract information from.
- * @idx: index in table.
- * @res: array of @res_size cols to store the results in
+ * \param t table to extract information from.
+ * \param idx index in table.
+ * \param res array of \p res_size cols to store the results in
  *
- * This decompresses the metadata element @idx in table @t
- * into the guint32 @res array that has res_size elements
+ * This decompresses the metadata element \p idx in table \p t
+ * into the \c guint32 \p res array that has \p res_size elements
  */
 void
 mono_metadata_decode_row (const MonoTableInfo *t, int idx, guint32 *res, int res_size)
@@ -1140,12 +1137,12 @@ mono_metadata_decode_row (const MonoTableInfo *t, int idx, guint32 *res, int res
 
 /**
  * mono_metadata_decode_row_col:
- * @t: table to extract information from.
- * @idx: index for row in table.
- * @col: column in the row.
+ * \param t table to extract information from.
+ * \param idx index for row in table.
+ * \param col column in the row.
  *
- * This function returns the value of column @col from the @idx
- * row in the table @t.
+ * This function returns the value of column \p col from the \p idx
+ * row in the table \p t .
  */
 guint32
 mono_metadata_decode_row_col (const MonoTableInfo *t, int idx, guint col)
@@ -1179,12 +1176,12 @@ mono_metadata_decode_row_col (const MonoTableInfo *t, int idx, guint col)
 
 /**
  * mono_metadata_decode_blob_size:
- * @ptr: pointer to a blob object
- * @rptr: the new position of the pointer
+ * \param ptr pointer to a blob object
+ * \param rptr the new position of the pointer
  *
  * This decodes a compressed size as described by 23.1.4 (a blob or user string object)
  *
- * Returns: the size of the blob object
+ * \returns the size of the blob object
  */
 guint32
 mono_metadata_decode_blob_size (const char *xptr, const char **rptr)
@@ -1212,13 +1209,13 @@ mono_metadata_decode_blob_size (const char *xptr, const char **rptr)
 
 /**
  * mono_metadata_decode_value:
- * @ptr: pointer to decode from
- * @rptr: the new position of the pointer
+ * \param ptr pointer to decode from
+ * \param rptr the new position of the pointer
  *
  * This routine decompresses 32-bit values as specified in the "Blob and
  * Signature" section (23.2)
  *
- * Returns: the decoded value
+ * \returns the decoded value
  */
 guint32
 mono_metadata_decode_value (const char *_ptr, const char **rptr)
@@ -1248,13 +1245,13 @@ mono_metadata_decode_value (const char *_ptr, const char **rptr)
 
 /**
  * mono_metadata_decode_signed_value:
- * @ptr: pointer to decode from
- * @rptr: the new position of the pointer
+ * \param ptr pointer to decode from
+ * \param rptr the new position of the pointer
  *
  * This routine decompresses 32-bit signed values
  * (not specified in the spec)
  *
- * Returns: the decoded value
+ * \returns the decoded value
  */
 gint32
 mono_metadata_decode_signed_value (const char *ptr, const char **rptr)
@@ -1278,9 +1275,10 @@ mono_metadata_decode_signed_value (const char *ptr, const char **rptr)
        return ival - 0x20000000;
 }
 
-/* 
- * Translates the given 1-based index into the Method, Field, Event, or Param tables
- * using the *Ptr tables in uncompressed metadata, if they are available.
+/**
+ * mono_metadata_translate_token_index:
+ * Translates the given 1-based index into the \c Method, \c Field, \c Event, or \c Param tables
+ * using the \c *Ptr tables in uncompressed metadata, if they are available.
  *
  * FIXME: The caller is not forced to call this function, which is error-prone, since 
  * forgetting to call it would only show up as a bug on uncompressed metadata.
@@ -1325,10 +1323,10 @@ mono_metadata_translate_token_index (MonoImage *image, int table, guint32 idx)
 /**
  * mono_metadata_decode_table_row:
  *
- *   Same as mono_metadata_decode_row, but takes an IMAGE+TABLE ID pair, and takes
+ * Same as \c mono_metadata_decode_row, but takes an \p image + \p table ID pair, and takes
  * uncompressed metadata into account, so it should be used to access the
- * Method, Field, Param and Event tables when the access is made from metadata, i.e.
- * IDX is retrieved from a metadata table, like MONO_TYPEDEF_FIELD_LIST.
+ * \c Method, \c Field, \c Param and \c Event tables when the access is made from metadata, i.e.
+ * \p idx is retrieved from a metadata table, like \c MONO_TYPEDEF_FIELD_LIST.
  */
 void
 mono_metadata_decode_table_row (MonoImage *image, int table, int idx, guint32 *res, int res_size)
@@ -1342,9 +1340,9 @@ mono_metadata_decode_table_row (MonoImage *image, int table, int idx, guint32 *r
 /**
  * mono_metadata_decode_table_row_col:
  *
- *   Same as mono_metadata_decode_row_col, but takes an IMAGE+TABLE ID pair, and takes
+ * Same as \c mono_metadata_decode_row_col, but takes an \p image + \p table ID pair, and takes
  * uncompressed metadata into account, so it should be used to access the
- * Method, Field, Param and Event tables.
+ * \c Method, \c Field, \c Param and \c Event tables.
  */
 guint32 mono_metadata_decode_table_row_col (MonoImage *image, int table, int idx, guint col)
 {
@@ -1354,13 +1352,12 @@ guint32 mono_metadata_decode_table_row_col (MonoImage *image, int table, int idx
        return mono_metadata_decode_row_col (&image->tables [table], idx, col);
 }
 
-/*
+/**
  * mono_metadata_parse_typedef_or_ref:
- * @m: a metadata context.
- * @ptr: a pointer to an encoded TypedefOrRef in @m
- * @rptr: pointer updated to match the end of the decoded stream
- *
- * Returns: a token valid in the @m metadata decoded from
+ * \param m a metadata context.
+ * \param ptr a pointer to an encoded TypedefOrRef in \p m
+ * \param rptr pointer updated to match the end of the decoded stream
+ * \returns a token valid in the \p m metadata decoded from
  * the compressed representation.
  */
 guint32
@@ -1373,16 +1370,16 @@ mono_metadata_parse_typedef_or_ref (MonoImage *m, const char *ptr, const char **
        return mono_metadata_token_from_dor (token);
 }
 
-/*
+/**
  * mono_metadata_parse_custom_mod:
- * @m: a metadata context.
- * @dest: storage where the info about the custom modifier is stored (may be NULL)
- * @ptr: a pointer to (possibly) the start of a custom modifier list
- * @rptr: pointer updated to match the end of the decoded stream
+ * \param m a metadata context.
+ * \param dest storage where the info about the custom modifier is stored (may be NULL)
+ * \param ptr a pointer to (possibly) the start of a custom modifier list
+ * \param rptr pointer updated to match the end of the decoded stream
  *
- * Checks if @ptr points to a type custom modifier compressed representation.
+ * Checks if \p ptr points to a type custom modifier compressed representation.
  *
- * Returns: #TRUE if a custom modifier was found, #FALSE if not.
+ * \returns TRUE if a custom modifier was found, FALSE if not.
  */
 int
 mono_metadata_parse_custom_mod (MonoImage *m, MonoCustomMod *dest, const char *ptr, const char **rptr)
@@ -1446,6 +1443,9 @@ mono_metadata_parse_array_internal (MonoImage *m, MonoGenericContainer *containe
        return array;
 }
 
+/**
+ * mono_metadata_parse_array:
+ */
 MonoArrayType *
 mono_metadata_parse_array (MonoImage *m, const char *ptr, const char **rptr)
 {
@@ -1456,11 +1456,11 @@ mono_metadata_parse_array (MonoImage *m, const char *ptr, const char **rptr)
        return ret;
 }
 
-/*
+/**
  * mono_metadata_free_array:
- * @array: array description
+ * \param array array description
  *
- * Frees the array description returned from mono_metadata_parse_array().
+ * Frees the array description returned from \c mono_metadata_parse_array.
  */
 void
 mono_metadata_free_array (MonoArrayType *array)
@@ -1666,28 +1666,28 @@ mono_metadata_cleanup (void)
 
 /**
  * mono_metadata_parse_type:
- * @m: metadata context
- * @mode: king of type that may be found at @ptr
- * @opt_attrs: optional attributes to store in the returned type
- * @ptr: pointer to the type representation
- * @rptr: pointer updated to match the end of the decoded stream
- * @transient: whenever to allocate the result from the heap or from a mempool
+ * \param m metadata context
+ * \param mode kind of type that may be found at \p ptr
+ * \param opt_attrs optional attributes to store in the returned type
+ * \param ptr pointer to the type representation
+ * \param rptr pointer updated to match the end of the decoded stream
+ * \param transient whenever to allocate the result from the heap or from a mempool
  * 
- * Decode a compressed type description found at @ptr in @m.
- * @mode can be one of MONO_PARSE_MOD_TYPE, MONO_PARSE_PARAM, MONO_PARSE_RET,
- * MONO_PARSE_FIELD, MONO_PARSE_LOCAL, MONO_PARSE_TYPE.
+ * Decode a compressed type description found at \p ptr in \p m .
+ * \p mode can be one of \c MONO_PARSE_MOD_TYPE, \c MONO_PARSE_PARAM, \c MONO_PARSE_RET,
+ * \c MONO_PARSE_FIELD, \c MONO_PARSE_LOCAL, \c MONO_PARSE_TYPE.
  * This function can be used to decode type descriptions in method signatures,
  * field signatures, locals signatures etc.
  *
- * To parse a generic type, `generic_container' points to the current class'es
- * (the `generic_container' field in the MonoClass) or the current generic method's
- * (stored in image->property_hash) generic container.
- * When we encounter any MONO_TYPE_VAR or MONO_TYPE_MVAR's, they're looked up in
- * this MonoGenericContainer.
+ * To parse a generic type, \c generic_container points to the current class'es
+ * (the \c generic_container field in the <code>MonoClass</code>) or the current generic method's
+ * (stored in <code>image->property_hash</code>) generic container.
+ * When we encounter a \c MONO_TYPE_VAR or \c MONO_TYPE_MVAR, it's looked up in
+ * this \c MonoGenericContainer.
  *
  * LOCKING: Acquires the loader lock.
  *
- * Returns: a #MonoType structure representing the decoded type.
+ * \returns a \c MonoType structure representing the decoded type.
  */
 static MonoType*
 mono_metadata_parse_type_internal (MonoImage *m, MonoGenericContainer *container,
@@ -1910,14 +1910,14 @@ mono_metadata_get_param_attrs (MonoImage *m, int def, int param_count)
 }
 
 
-/*
+/**
  * mono_metadata_parse_signature:
- * @image: metadata context
- * @token: metadata token
+ * \param image metadata context
+ * \param token metadata token
  *
- * Decode a method signature stored in the STANDALONESIG table
+ * Decode a method signature stored in the \c StandAloneSig table
  *
- * Returns: a MonoMethodSignature describing the signature.
+ * \returns a \c MonoMethodSignature describing the signature.
  */
 MonoMethodSignature*
 mono_metadata_parse_signature (MonoImage *image, guint32 token)
@@ -1964,18 +1964,18 @@ mono_metadata_parse_signature_checked (MonoImage *image, guint32 token, MonoErro
        return mono_metadata_parse_method_signature_full (image, NULL, 0, ptr, NULL, error);
 }
 
-/*
+/**
  * mono_metadata_signature_alloc:
- * @image: metadata context
- * @nparmas: number of parameters in the signature
+ * \param image metadata context
+ * \param nparams number of parameters in the signature
  *
- * Allocate a MonoMethodSignature structure with the specified number of params.
+ * Allocate a \c MonoMethodSignature structure with the specified number of params.
  * The return type and the params types need to be filled later.
  * This is a Mono runtime internal function.
  *
  * LOCKING: Assumes the loader lock is held.
  *
- * Returns: the new MonoMethodSignature structure.
+ * \returns the new \c MonoMethodSignature structure.
  */
 MonoMethodSignature*
 mono_metadata_signature_alloc (MonoImage *m, guint32 nparams)
@@ -2070,14 +2070,14 @@ mono_metadata_signature_dup_mempool (MonoMemPool *mp, MonoMethodSignature *sig)
        return mono_metadata_signature_dup_internal (NULL, mp, sig);
 }
 
-/*
+/**
  * mono_metadata_signature_dup:
- * @sig: method signature
+ * \param sig method signature
  *
- * Duplicate an existing MonoMethodSignature so it can be modified.
+ * Duplicate an existing \c MonoMethodSignature so it can be modified.
  * This is a Mono runtime internal function.
  *
- * Returns: the new MonoMethodSignature structure.
+ * \returns the new \c MonoMethodSignature structure.
  */
 MonoMethodSignature*
 mono_metadata_signature_dup (MonoMethodSignature *sig)
@@ -2199,19 +2199,19 @@ mono_metadata_parse_method_signature_full (MonoImage *m, MonoGenericContainer *c
        return method;
 }
 
-/*
+/**
  * mono_metadata_parse_method_signature:
- * @m: metadata context
- * @def: the MethodDef index or 0 for Ref signatures.
- * @ptr: pointer to the signature metadata representation
- * @rptr: pointer updated to match the end of the decoded stream
+ * \param m metadata context
+ * \param def the \c MethodDef index or 0 for \c Ref signatures.
+ * \param ptr pointer to the signature metadata representation
+ * \param rptr pointer updated to match the end of the decoded stream
  *
- * Decode a method signature stored at @ptr.
+ * Decode a method signature stored at \p ptr.
  * This is a Mono runtime internal function.
  *
  * LOCKING: Assumes the loader lock is held.
  *
- * Returns: a MonoMethodSignature describing the signature.
+ * \returns a \c MonoMethodSignature describing the signature.
  */
 MonoMethodSignature *
 mono_metadata_parse_method_signature (MonoImage *m, int def, const char *ptr, const char **rptr)
@@ -2229,11 +2229,11 @@ mono_metadata_parse_method_signature (MonoImage *m, int def, const char *ptr, co
        return ret;
 }
 
-/*
+/**
  * mono_metadata_free_method_signature:
- * @sig: signature to destroy
+ * \param sig signature to destroy
  *
- * Free the memory allocated in the signature @sig.
+ * Free the memory allocated in the signature \p sig.
  * This method needs to be robust and work also on partially-built
  * signatures, so it does extra checks.
  */
@@ -3000,9 +3000,9 @@ mono_metadata_get_generic_inst (int type_argc, MonoType **type_argv)
 
 /**
  * mono_metadata_get_canonical_generic_inst:
- * @candidate: an arbitrary generic instantiation
+ * \param candidate an arbitrary generic instantiation
  *
- * Returns the canonical generic instantiation that represents the given
+ * \returns the canonical generic instantiation that represents the given
  * candidate by identifying the image set for the candidate instantiation and
  * finding the instance in the image set or adding a copy of the given instance
  * to the image set.
@@ -3555,11 +3555,11 @@ do_mono_metadata_parse_type (MonoType *type, MonoImage *m, MonoGenericContainer
        return TRUE;
 }
 
-/*
+/**
  * mono_metadata_free_type:
- * @type: type to free
+ * \param type type to free
  *
- * Free the memory allocated for type @type which is allocated on the heap.
+ * Free the memory allocated for type \p type which is allocated on the heap.
  */
 void
 mono_metadata_free_type (MonoType *type)
@@ -3901,15 +3901,15 @@ fail:
 
 }
 
-/*
+/**
  * mono_metadata_parse_mh:
- * @generic_context: generics context
- * @ptr: pointer to the method header.
+ * \param generic_context generics context
+ * \param ptr pointer to the method header.
  *
- * Decode the method header at @ptr, including pointer to the IL code,
+ * Decode the method header at \p ptr, including pointer to the IL code,
  * info about local variables and optional exception tables.
  *
- * Returns: a transient MonoMethodHeader allocated from the heap.
+ * \returns a transient \c MonoMethodHeader allocated from the heap.
  */
 MonoMethodHeader *
 mono_metadata_parse_mh (MonoImage *m, const char *ptr)
@@ -3920,9 +3920,9 @@ mono_metadata_parse_mh (MonoImage *m, const char *ptr)
        return header;
 }
 
-/*
+/**
  * mono_metadata_free_mh:
- * @mh: a method header
+ * \param mh a method header
  *
  * Free the memory allocated for the method header.
  */
@@ -3942,17 +3942,17 @@ mono_metadata_free_mh (MonoMethodHeader *mh)
        }
 }
 
-/*
+/**
  * mono_method_header_get_code:
- * @header: a MonoMethodHeader pointer
- * @code_size: memory location for returning the code size
- * @max_stack: memory location for returning the max stack
+ * \param header a \c MonoMethodHeader pointer
+ * \param code_size memory location for returning the code size
+ * \param max_stack memory location for returning the max stack
  *
  * Method header accessor to retreive info about the IL code properties:
  * a pointer to the IL code itself, the size of the code and the max number
  * of stack slots used by the code.
  *
- * Returns: pointer to the IL code represented by the method header.
+ * \returns pointer to the IL code represented by the method header.
  */
 const unsigned char*
 mono_method_header_get_code (MonoMethodHeader *header, guint32* code_size, guint32* max_stack)
@@ -3964,17 +3964,17 @@ mono_method_header_get_code (MonoMethodHeader *header, guint32* code_size, guint
        return header->code;
 }
 
-/*
+/**
  * mono_method_header_get_locals:
- * @header: a MonoMethodHeader pointer
- * @num_locals: memory location for returning the number of local variables
- * @init_locals: memory location for returning the init_locals flag
+ * \param header a \c MonoMethodHeader pointer
+ * \param num_locals memory location for returning the number of local variables
+ * \param init_locals memory location for returning the init_locals flag
  *
  * Method header accessor to retreive info about the local variables:
  * an array of local types, the number of locals and whether the locals
  * are supposed to be initialized to 0 on method entry
  *
- * Returns: pointer to an array of types of the local variables
+ * \returns pointer to an array of types of the local variables
  */
 MonoType**
 mono_method_header_get_locals (MonoMethodHeader *header, guint32* num_locals, gboolean *init_locals)
@@ -4000,19 +4000,19 @@ mono_method_header_get_num_clauses (MonoMethodHeader *header)
        return header->num_clauses;
 }
 
-/*
+/**
  * mono_method_header_get_clauses:
- * @header: a MonoMethodHeader pointer
- * @method: MonoMethod the header belongs to
- * @iter: pointer to a iterator
- * @clause: pointer to a MonoExceptionClause structure which will be filled with the info
+ * \param header a \c MonoMethodHeader pointer
+ * \param method \c MonoMethod the header belongs to
+ * \param iter pointer to a iterator
+ * \param clause pointer to a \c MonoExceptionClause structure which will be filled with the info
  *
- * Get the info about the exception clauses in the method. Set *iter to NULL to
+ * Get the info about the exception clauses in the method. Set \c *iter to NULL to
  * initiate the iteration, then call the method repeatedly until it returns FALSE.
  * At each iteration, the structure pointed to by clause if filled with the
  * exception clause information.
  *
- * Returns: TRUE if clause was filled with info, FALSE if there are no more exception
+ * \returns TRUE if clause was filled with info, FALSE if there are no more exception
  * clauses.
  */
 int
@@ -4041,13 +4041,13 @@ mono_method_header_get_clauses (MonoMethodHeader *header, MonoMethod *method, gp
 
 /**
  * mono_metadata_parse_field_type:
- * @m: metadata context to extract information from
- * @ptr: pointer to the field signature
- * @rptr: pointer updated to match the end of the decoded stream
+ * \param m metadata context to extract information from
+ * \param ptr pointer to the field signature
+ * \param rptr pointer updated to match the end of the decoded stream
  *
  * Parses the field signature, and returns the type information for it. 
  *
- * Returns: The MonoType that was extracted from @ptr.
+ * \returns The \c MonoType that was extracted from \p ptr .
  */
 MonoType *
 mono_metadata_parse_field_type (MonoImage *m, short field_flags, const char *ptr, const char **rptr)
@@ -4060,13 +4060,13 @@ mono_metadata_parse_field_type (MonoImage *m, short field_flags, const char *ptr
 
 /**
  * mono_metadata_parse_param:
- * @m: metadata context to extract information from
- * @ptr: pointer to the param signature
- * @rptr: pointer updated to match the end of the decoded stream
+ * \param m metadata context to extract information from
+ * \param ptr pointer to the param signature
+ * \param rptr pointer updated to match the end of the decoded stream
  *
  * Parses the param signature, and returns the type information for it. 
  *
- * Returns: The MonoType that was extracted from @ptr.
+ * \returns The \c MonoType that was extracted from \p ptr .
  */
 MonoType *
 mono_metadata_parse_param (MonoImage *m, const char *ptr, const char **rptr)
@@ -4077,15 +4077,15 @@ mono_metadata_parse_param (MonoImage *m, const char *ptr, const char **rptr)
        return type;
 }
 
-/*
+/**
  * mono_metadata_token_from_dor:
- * @dor_token: A TypeDefOrRef coded index
+ * \param dor_token A \c TypeDefOrRef coded index
  *
- * dor_token is a TypeDefOrRef coded index: it contains either
- * a TypeDef, TypeRef or TypeSpec in the lower bits, and the upper
+ * \p dor_token is a \c TypeDefOrRef coded index: it contains either
+ * a \c TypeDef, \c TypeRef or \c TypeSpec in the lower bits, and the upper
  * bits contain an index into the table.
  *
- * Returns: an expanded token
+ * \returns an expanded token
  */
 guint32
 mono_metadata_token_from_dor (guint32 dor_index)
@@ -4247,11 +4247,11 @@ search_ptr_table (MonoImage *image, int table, int idx)
 
 /**
  * mono_metadata_typedef_from_field:
- * @meta: metadata context
- * @index: FieldDef token
+ * \param meta metadata context
+ * \param index FieldDef token
  *
- * Returns: the 1-based index into the TypeDef table of the type that
- * declared the field described by @index, or 0 if not found.
+ * \returns the 1-based index into the \c TypeDef table of the type that
+ * declared the field described by \p index, or 0 if not found.
  */
 guint32
 mono_metadata_typedef_from_field (MonoImage *meta, guint32 index)
@@ -4276,13 +4276,12 @@ mono_metadata_typedef_from_field (MonoImage *meta, guint32 index)
        return loc.result + 1;
 }
 
-/*
+/**
  * mono_metadata_typedef_from_method:
- * @meta: metadata context
- * @index: MethodDef token
- *
- * Returns: the 1-based index into the TypeDef table of the type that
- * declared the method described by @index.  0 if not found.
+ * \param meta metadata context
+ * \param index \c MethodDef token
+ * \returns the 1-based index into the \c TypeDef table of the type that
+ * declared the method described by \p index.  0 if not found.
  */
 guint32
 mono_metadata_typedef_from_method (MonoImage *meta, guint32 index)
@@ -4388,20 +4387,20 @@ mono_metadata_interfaces_from_typedef_full (MonoImage *meta, guint32 index, Mono
        return TRUE;
 }
 
-/*
- * @meta: metadata context
- * @index: typedef token
- * @count: Out parameter used to store the number of interfaces
+/**
+ * mono_metadata_interfaces_from_typedef:
+ * \param meta metadata context
+ * \param index typedef token
+ * \param count Out parameter used to store the number of interfaces
  * 
- * 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. The returned
- * array is g_malloc'd and the caller must free it.
+ * The array of interfaces that the \p index typedef token implements is returned in
+ * \p interfaces. The number of elements in the array is returned in \p count. The returned
+ * array is allocated with \c g_malloc and the caller must free it.
  *
  * LOCKING: Acquires the loader lock .
  *
- * Returns: the interface array on success, NULL on failure.
+ * \returns the interface array on success, NULL on failure.
  */
-
 MonoClass**
 mono_metadata_interfaces_from_typedef (MonoImage *meta, guint32 index, guint *count)
 {
@@ -4417,14 +4416,13 @@ mono_metadata_interfaces_from_typedef (MonoImage *meta, guint32 index, guint *co
                return NULL;
 }
 
-/*
+/**
  * mono_metadata_nested_in_typedef:
- * @meta: metadata context
- * @index: typedef token
- * 
- * Returns: the 1-based index into the TypeDef table of the type
- * where the type described by @index is nested.
- * Returns 0 if @index describes a non-nested type.
+ * \param meta metadata context
+ * \param index typedef token
+ * \returns the 1-based index into the TypeDef table of the type
+ * where the type described by \p index is nested.
+ * Returns 0 if \p index describes a non-nested type.
  */
 guint32
 mono_metadata_nested_in_typedef (MonoImage *meta, guint32 index)
@@ -4446,14 +4444,13 @@ mono_metadata_nested_in_typedef (MonoImage *meta, guint32 index)
        return mono_metadata_decode_row_col (tdef, loc.result, MONO_NESTED_CLASS_ENCLOSING) | MONO_TOKEN_TYPE_DEF;
 }
 
-/*
+/**
  * mono_metadata_nesting_typedef:
- * @meta: metadata context
- * @index: typedef token
- * 
- * Returns: the 1-based index into the TypeDef table of the first type
- * that is nested inside the type described by @index. The search starts at
- * @start_index.  returns 0 if no such type is found.
+ * \param meta metadata context
+ * \param index typedef token
+ * \returns the 1-based index into the \c TypeDef table of the first type
+ * that is nested inside the type described by \p index. The search starts at
+ * \p start_index. Returns 0 if no such type is found.
  */
 guint32
 mono_metadata_nesting_typedef (MonoImage *meta, guint32 index, guint32 start_index)
@@ -4480,13 +4477,12 @@ mono_metadata_nesting_typedef (MonoImage *meta, guint32 index, guint32 start_ind
                return start;
 }
 
-/*
+/**
  * mono_metadata_packing_from_typedef:
- * @meta: metadata context
- * @index: token representing a type
- * 
- * Returns: the info stored in the ClassLAyout table for the given typedef token
- * into the @packing and @size pointers.
+ * \param meta metadata context
+ * \param index token representing a type
+ * \returns the info stored in the \c ClassLayout table for the given typedef token
+ * into the \p packing and \p size pointers.
  * Returns 0 if the info is not found.
  */
 guint32
@@ -4516,13 +4512,12 @@ mono_metadata_packing_from_typedef (MonoImage *meta, guint32 index, guint32 *pac
        return loc.result + 1;
 }
 
-/*
+/**
  * mono_metadata_custom_attrs_from_index:
- * @meta: metadata context
- * @index: token representing the parent
- * 
- * Returns: the 1-based index into the CustomAttribute table of the first 
- * attribute which belongs to the metadata object described by @index.
+ * \param meta metadata context
+ * \param index token representing the parent
+ * \returns: the 1-based index into the \c CustomAttribute table of the first 
+ * attribute which belongs to the metadata object described by \p index.
  * Returns 0 if no such attribute is found.
  */
 guint32
@@ -4551,14 +4546,13 @@ mono_metadata_custom_attrs_from_index (MonoImage *meta, guint32 index)
        return loc.result + 1;
 }
 
-/*
+/**
  * mono_metadata_declsec_from_index:
- * @meta: metadata context
- * @index: token representing the parent
- * 
- * Returns: the 0-based index into the DeclarativeSecurity table of the first 
- * attribute which belongs to the metadata object described by @index.
- * Returns -1 if no such attribute is found.
+ * \param meta metadata context
+ * \param index token representing the parent
+ * \returns the 0-based index into the \c DeclarativeSecurity table of the first 
+ * attribute which belongs to the metadata object described by \p index.
+ * Returns \c -1 if no such attribute is found.
  */
 guint32
 mono_metadata_declsec_from_index (MonoImage *meta, guint32 index)
@@ -4654,11 +4648,10 @@ mono_type_set_alignment (MonoTypeEnum type, int align)
        }
 }
 
-/*
+/**
  * mono_type_size:
- * @t: the type to return the size of
- *
- * Returns: the number of bytes required to hold an instance of this
+ * \param t the type to return the size of
+ * \returns The number of bytes required to hold an instance of this
  * type in memory
  */
 int
@@ -4760,11 +4753,10 @@ mono_type_size (MonoType *t, int *align)
        return 0;
 }
 
-/*
+/**
  * mono_type_stack_size:
- * @t: the type to return the size it uses on the stack
- *
- * Returns: the number of bytes required to hold an instance of this
+ * \param t the type to return the size it uses on the stack
+ * \returns The number of bytes required to hold an instance of this
  * type on the runtime stack
  */
 int
@@ -4896,6 +4888,9 @@ mono_type_generic_inst_is_valuetype (MonoType *type)
        return type->data.generic_class->container_class->valuetype;
 }
 
+/**
+ * mono_metadata_generic_class_is_valuetype:
+ */
 gboolean
 mono_metadata_generic_class_is_valuetype (MonoGenericClass *gclass)
 {
@@ -4970,11 +4965,10 @@ mono_metadata_str_hash (gconstpointer v1)
        return hash;
 } 
 
-/*
+/**
  * mono_metadata_type_hash:
- * @t1: a type
- *
- * Computes an hash value for @t1 to be used in GHashTable.
+ * \param t1 a type
+ * Computes a hash value for \p t1 to be used in \c GHashTable.
  * The returned hash is guaranteed to be the same across executions.
  */
 guint
@@ -5192,6 +5186,9 @@ do_mono_metadata_type_equal (MonoType *t1, MonoType *t2, gboolean signature_only
        return FALSE;
 }
 
+/**
+ * mono_metadata_type_equal:
+ */
 gboolean
 mono_metadata_type_equal (MonoType *t1, MonoType *t2)
 {
@@ -5200,14 +5197,14 @@ mono_metadata_type_equal (MonoType *t1, MonoType *t2)
 
 /**
  * mono_metadata_type_equal_full:
- * @t1: a type
- * @t2: another type
- * @signature_only: if signature only comparison should be made
+ * \param t1 a type
+ * \param t2 another type
+ * \param signature_only if signature only comparison should be made
  *
- * Determine if @t1 and @t2 are signature compatible if @signature_only is #TRUE, otherwise
+ * Determine if \p t1 and \p t2 are signature compatible if \p signature_only is TRUE, otherwise
  * behaves the same way as mono_metadata_type_equal.
  * The function mono_metadata_type_equal(a, b) is just a shortcut for mono_metadata_type_equal_full(a, b, FALSE).
- * Returns: #TRUE if @t1 and @t2 are equal taking @signature_only into account.
+ * \returns TRUE if \p t1 and \p t2 are equal taking \p signature_only into account.
  */
 gboolean
 mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_only)
@@ -5217,12 +5214,12 @@ mono_metadata_type_equal_full (MonoType *t1, MonoType *t2, gboolean signature_on
 
 /**
  * mono_metadata_signature_equal:
- * @sig1: a signature
- * @sig2: another signature
+ * \param sig1 a signature
+ * \param sig2 another signature
  *
- * Determine if @sig1 and @sig2 represent the same signature, with the
+ * Determine if \p sig1 and \p sig2 represent the same signature, with the
  * same number of arguments and the same types.
- * Returns: #TRUE if @sig1 and @sig2 are equal.
+ * \returns TRUE if \p sig1 and \p sig2 are equal.
  */
 gboolean
 mono_metadata_signature_equal (MonoMethodSignature *sig1, MonoMethodSignature *sig2)
@@ -5262,10 +5259,9 @@ mono_metadata_signature_equal (MonoMethodSignature *sig1, MonoMethodSignature *s
 
 /**
  * mono_metadata_type_dup:
- * @image: image to alloc memory from
- * @original: type to duplicate
- *
- * Returns: copy of type allocated from the image's mempool (or from the heap, if @image is null).
+ * \param image image to alloc memory from
+ * \param original type to duplicate
+ * \returns copy of type allocated from the image's mempool (or from the heap, if \p image is null).
  */
 MonoType *
 mono_metadata_type_dup (MonoImage *image, const MonoType *o)
@@ -5290,6 +5286,9 @@ mono_metadata_type_dup (MonoImage *image, const MonoType *o)
        return r;
 }
 
+/**
+ * mono_signature_hash:
+ */
 guint
 mono_signature_hash (MonoMethodSignature *sig)
 {
@@ -5333,20 +5332,17 @@ mono_metadata_encode_value (guint32 value, char *buf, char **endbuf)
                *endbuf = p;
 }
 
-/*
+/**
  * mono_metadata_field_info:
- * @meta: the Image the field is defined in
- * @index: the index in the field table representing the field
- * @offset: a pointer to an integer where to store the offset that 
- * may have been specified for the field in a FieldLayout table
- * @rva: a pointer to the RVA of the field data in the image that
- * may have been defined in a FieldRVA table
- * @marshal_spec: a pointer to the marshal spec that may have been 
- * defined for the field in a FieldMarshal table.
- *
- * Gather info for field @index that may have been defined in the FieldLayout, 
- * FieldRVA and FieldMarshal tables.
- * Either of offset, rva and marshal_spec can be NULL if you're not interested 
+ * \param meta the Image the field is defined in
+ * \param index the index in the field table representing the field
+ * \param offset a pointer to an integer where to store the offset that  may have been specified for the field in a FieldLayout table
+ * \param rva a pointer to the RVA of the field data in the image that may have been defined in a \c FieldRVA table
+ * \param marshal_spec a pointer to the marshal spec that may have been defined for the field in a \c FieldMarshal table.
+ *
+ * Gather info for field \p index that may have been defined in the \c FieldLayout, 
+ * \c FieldRVA and \c FieldMarshal tables.
+ * Either of \p offset, \p rva and \p marshal_spec can be NULL if you're not interested 
  * in the data.
  */
 void
@@ -5411,15 +5407,15 @@ mono_metadata_field_info_full (MonoImage *meta, guint32 index, guint32 *offset,
 
 }
 
-/*
+/**
  * mono_metadata_get_constant_index:
- * @meta: the Image the field is defined in
- * @index: the token that may have a row defined in the constants table
- * @hint: possible position for the row
+ * \param meta the Image the field is defined in
+ * \param index the token that may have a row defined in the constants table
+ * \param hint possible position for the row
  *
- * @token must be a FieldDef, ParamDef or PropertyDef token.
+ * \p token must be a \c FieldDef, \c ParamDef or \c PropertyDef token.
  *
- * Returns: the index into the Constants table or 0 if not found.
+ * \returns the index into the \c Constants table or 0 if not found.
  */
 guint32
 mono_metadata_get_constant_index (MonoImage *meta, guint32 token, guint32 hint)
@@ -5459,14 +5455,13 @@ mono_metadata_get_constant_index (MonoImage *meta, guint32 token, guint32 hint)
        return 0;
 }
 
-/*
+/**
  * mono_metadata_events_from_typedef:
- * @meta: metadata context
- * @index: 0-based index (in the TypeDef table) describing a type
- *
- * Returns: the 0-based index in the Event table for the events in the
+ * \param meta metadata context
+ * \param index 0-based index (in the \c TypeDef table) describing a type
+ * \returns the 0-based index in the \c Event table for the events in the
  * type. The last event that belongs to the type (plus 1) is stored
- * in the @end_idx pointer.
+ * in the \p end_idx pointer.
  */
 guint32
 mono_metadata_events_from_typedef (MonoImage *meta, guint32 index, guint *end_idx)
@@ -5498,14 +5493,13 @@ mono_metadata_events_from_typedef (MonoImage *meta, guint32 index, guint *end_id
        return start - 1;
 }
 
-/*
+/**
  * mono_metadata_methods_from_event:
- * @meta: metadata context
- * @index: 0-based index (in the Event table) describing a event
- *
- * Returns: the 0-based index in the MethodDef table for the methods in the
+ * \param meta metadata context
+ * \param index 0-based index (in the \c Event table) describing a event
+ * \returns the 0-based index in the \c MethodDef table for the methods in the
  * event. The last method that belongs to the event (plus 1) is stored
- * in the @end_idx pointer.
+ * in the \p end_idx pointer.
  */
 guint32
 mono_metadata_methods_from_event   (MonoImage *meta, guint32 index, guint *end_idx)
@@ -5550,14 +5544,13 @@ mono_metadata_methods_from_event   (MonoImage *meta, guint32 index, guint *end_i
        return start;
 }
 
-/*
+/**
  * mono_metadata_properties_from_typedef:
- * @meta: metadata context
- * @index: 0-based index (in the TypeDef table) describing a type
- *
- * Returns: the 0-based index in the Property table for the properties in the
+ * \param meta metadata context
+ * \param index 0-based index (in the \c TypeDef table) describing a type
+ * \returns the 0-based index in the \c Property table for the properties in the
  * type. The last property that belongs to the type (plus 1) is stored
- * in the @end_idx pointer.
+ * in the \p end_idx pointer.
  */
 guint32
 mono_metadata_properties_from_typedef (MonoImage *meta, guint32 index, guint *end_idx)
@@ -5589,14 +5582,13 @@ mono_metadata_properties_from_typedef (MonoImage *meta, guint32 index, guint *en
        return start - 1;
 }
 
-/*
+/**
  * mono_metadata_methods_from_property:
- * @meta: metadata context
- * @index: 0-based index (in the PropertyDef table) describing a property
- *
- * Returns: the 0-based index in the MethodDef table for the methods in the
+ * \param meta metadata context
+ * \param index 0-based index (in the \c PropertyDef table) describing a property
+ * \returns the 0-based index in the \c MethodDef table for the methods in the
  * property. The last method that belongs to the property (plus 1) is stored
- * in the @end_idx pointer.
+ * in the \p end_idx pointer.
  */
 guint32
 mono_metadata_methods_from_property   (MonoImage *meta, guint32 index, guint *end_idx)
@@ -5641,6 +5633,9 @@ mono_metadata_methods_from_property   (MonoImage *meta, guint32 index, guint *en
        return start;
 }
 
+/**
+ * mono_metadata_implmap_from_method:
+ */
 guint32
 mono_metadata_implmap_from_method (MonoImage *meta, guint32 method_idx)
 {
@@ -5663,11 +5658,12 @@ 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
+ * mono_type_create_from_typespec:
+ * \param image context where the image is created
+ * \param type_spec  typespec token
+ * \deprecated use \c mono_type_create_from_typespec_checked that has proper error handling
  *
- * Creates a MonoType representing the TypeSpec indexed by the @type_spec
+ * Creates a \c MonoType representing the \c TypeSpec indexed by the \p type_spec
  * token.
  */
 MonoType *
@@ -5742,6 +5738,9 @@ mono_image_strndup (MonoImage *image, const char *data, guint len)
        return res;
 }
 
+/**
+ * mono_metadata_parse_marshal_spec:
+ */
 MonoMarshalSpec *
 mono_metadata_parse_marshal_spec (MonoImage *image, const char *ptr)
 {
@@ -5832,6 +5831,9 @@ mono_metadata_parse_marshal_spec_full (MonoImage *image, MonoImage *parent_image
        return res;
 }
 
+/**
+ * mono_metadata_free_marshal_spec:
+ */
 void 
 mono_metadata_free_marshal_spec (MonoMarshalSpec *spec)
 {
@@ -5844,13 +5846,10 @@ mono_metadata_free_marshal_spec (MonoMarshalSpec *spec)
 
 /**
  * mono_type_to_unmanaged:
- *
- * Returns: A MonoMarshalNative enumeration value (MONO_NATIVE_) value
+ * The value pointed to by \p conv will contain the kind of marshalling required for this
+ * particular type one of the \c MONO_MARSHAL_CONV_ enumeration values.
+ * \returns A \c MonoMarshalNative enumeration value (<code>MONO_NATIVE_</code>) value
  * describing the underlying native reprensetation of the type.
- * 
- * In addition the value pointed by
- * "conv" will contain the kind of marshalling required for this
- * particular type one of the MONO_MARSHAL_CONV_ enumeration values.
  */
 guint32
 mono_type_to_unmanaged (MonoType *type, MonoMarshalSpec *mspec, gboolean as_field,
@@ -6041,6 +6040,9 @@ handle_enum:
        return MONO_NATIVE_MAX;
 }
 
+/**
+ * mono_metadata_get_marshal_info:
+ */
 const char*
 mono_metadata_get_marshal_info (MonoImage *meta, guint32 idx, gboolean is_field)
 {
@@ -6418,10 +6420,9 @@ mono_get_shared_generic_inst (MonoGenericContainer *container)
 
 /**
  * mono_type_is_byref:
- * @type: the MonoType operated on
- *
- * Returns: #TRUE if @type represents a type passed by reference,
- * #FALSE otherwise.
+ * \param type the \c MonoType operated on
+ * \returns TRUE if \p type represents a type passed by reference,
+ * FALSE otherwise.
  */
 gboolean
 mono_type_is_byref (MonoType *type)
@@ -6431,10 +6432,9 @@ mono_type_is_byref (MonoType *type)
 
 /**
  * mono_type_get_type:
- * @type: the MonoType operated on
- *
- * Returns: the IL type value for @type. This is one of the MonoTypeEnum
- * enum members like MONO_TYPE_I4 or MONO_TYPE_STRING.
+ * \param type the \c MonoType operated on
+ * \returns the IL type value for \p type. This is one of the \c MonoTypeEnum
+ * enum members like \c MONO_TYPE_I4 or \c MONO_TYPE_STRING.
  */
 int
 mono_type_get_type (MonoType *type)
@@ -6444,12 +6444,10 @@ mono_type_get_type (MonoType *type)
 
 /**
  * mono_type_get_signature:
- * @type: the MonoType operated on
- *
- * It is only valid to call this function if @type is a MONO_TYPE_FNPTR.
- *
- * Returns: the MonoMethodSignature pointer that describes the signature
- * of the function pointer @type represents.
+ * \param type the \c MonoType operated on
+ * It is only valid to call this function if \p type is a \c MONO_TYPE_FNPTR .
+ * \returns the \c MonoMethodSignature pointer that describes the signature
+ * of the function pointer \p type represents.
  */
 MonoMethodSignature*
 mono_type_get_signature (MonoType *type)
@@ -6460,13 +6458,11 @@ mono_type_get_signature (MonoType *type)
 
 /**
  * mono_type_get_class:
- * @type: the MonoType operated on
- *
- * It is only valid to call this function if @type is a MONO_TYPE_CLASS or a
- * MONO_TYPE_VALUETYPE. For more general functionality, use mono_class_from_mono_type (),
- * instead
- *
- * Returns: the MonoClass pointer that describes the class that @type represents.
+ * \param type the \c MonoType operated on
+ * It is only valid to call this function if \p type is a \c MONO_TYPE_CLASS or a
+ * \c MONO_TYPE_VALUETYPE . For more general functionality, use \c mono_class_from_mono_type,
+ * instead.
+ * \returns the \c MonoClass pointer that describes the class that \p type represents.
  */
 MonoClass*
 mono_type_get_class (MonoType *type)
@@ -6477,11 +6473,9 @@ mono_type_get_class (MonoType *type)
 
 /**
  * mono_type_get_array_type:
- * @type: the MonoType operated on
- *
- * It is only valid to call this function if @type is a MONO_TYPE_ARRAY.
- *
- * Returns: a MonoArrayType struct describing the array type that @type
+ * \param type the \c MonoType operated on
+ * It is only valid to call this function if \p type is a \c MONO_TYPE_ARRAY .
+ * \returns a \c MonoArrayType struct describing the array type that \p type
  * represents. The info includes details such as rank, array element type
  * and the sizes and bounds of multidimensional arrays.
  */
@@ -6493,12 +6487,9 @@ mono_type_get_array_type (MonoType *type)
 
 /**
  * mono_type_get_ptr_type:
- * @type: the MonoType operated on
- *
- * It is only valid to call this function if @type is a MONO_TYPE_PTR.
- * instead
- *
- * Returns: the MonoType pointer that describes the type that @type
+ * \pararm type the \c MonoType operated on
+ * It is only valid to call this function if \p type is a \c MONO_TYPE_PTR .
+ * \returns the \c MonoType pointer that describes the type that \p type
  * represents a pointer to.
  */
 MonoType*
@@ -6508,6 +6499,9 @@ mono_type_get_ptr_type (MonoType *type)
        return type->data.type;
 }
 
+/**
+ * mono_type_get_modifiers:
+ */
 MonoClass*
 mono_type_get_modifiers (MonoType *type, gboolean *is_required, gpointer *iter)
 {
@@ -6517,10 +6511,9 @@ mono_type_get_modifiers (MonoType *type, gboolean *is_required, gpointer *iter)
 
 /**
  * mono_type_is_struct:
- * @type: the MonoType operated on
- *
- * Returns: #TRUE is @type is a struct, that is a ValueType but not en enum
- * or a basic type like System.Int32. #FALSE otherwise.
+ * \param type the \c MonoType operated on
+ * \returns TRUE if \p type is a struct, that is a \c ValueType but not an enum
+ * or a basic type like \c System.Int32 . FALSE otherwise.
  */
 mono_bool
 mono_type_is_struct (MonoType *type)
@@ -6534,9 +6527,8 @@ mono_type_is_struct (MonoType *type)
 
 /**
  * mono_type_is_void:
- * @type: the MonoType operated on
- *
- * Returns: #TRUE is @type is System.Void. #FALSE otherwise.
+ * \param type the \c MonoType operated on
+ * \returns TRUE if \p type is \c System.Void . FALSE otherwise.
  */
 mono_bool
 mono_type_is_void (MonoType *type)
@@ -6546,9 +6538,8 @@ mono_type_is_void (MonoType *type)
 
 /**
  * mono_type_is_pointer:
- * @type: the MonoType operated on
- *
- * Returns: #TRUE is @type is a managed or unmanaged pointer type. #FALSE otherwise.
+ * \param type the \c MonoType operated on
+ * \returns TRUE if \p type is a managed or unmanaged pointer type. FALSE otherwise.
  */
 mono_bool
 mono_type_is_pointer (MonoType *type)
@@ -6562,9 +6553,8 @@ mono_type_is_pointer (MonoType *type)
 
 /**
  * mono_type_is_reference:
- * @type: the MonoType operated on
- *
- * Returns: #TRUE is @type represents an object reference . #FALSE otherwise.
+ * \param type the \c MonoType operated on
+ * \returns TRUE if \p type represents an object reference. FALSE otherwise.
  */
 mono_bool
 mono_type_is_reference (MonoType *type)
@@ -6584,9 +6574,8 @@ mono_type_is_generic_parameter (MonoType *type)
 
 /**
  * mono_signature_get_return_type:
- * @sig: the method signature inspected
- *
- * Returns: the return type of the method signature @sig
+ * \param sig the method signature inspected
+ * \returns the return type of the method signature \p sig
  */
 MonoType*
 mono_signature_get_return_type (MonoMethodSignature *sig)
@@ -6596,16 +6585,14 @@ mono_signature_get_return_type (MonoMethodSignature *sig)
 
 /**
  * mono_signature_get_params:
- * @sig: the method signature inspected
- * #iter: pointer to an iterator
- *
- * Iterates over the parameters for the method signature @sig.
- * A void* pointer must be initualized to #NULL to start the iteration
- * and it's address is passed to this function repeteadly until it returns
- * #NULL.
- *
- * Returns: the next parameter type of the method signature @sig,
- * #NULL when finished.
+ * \param sig the method signature inspected
+ * \param iter pointer to an iterator
+ * Iterates over the parameters for the method signature \p sig.
+ * A \c void* pointer must be initialized to NULL to start the iteration
+ * and its address is passed to this function repeteadly until it returns
+ * NULL.
+ * \returns the next parameter type of the method signature \p sig,
+ * NULL when finished.
  */
 MonoType*
 mono_signature_get_params (MonoMethodSignature *sig, gpointer *iter)
@@ -6634,9 +6621,8 @@ mono_signature_get_params (MonoMethodSignature *sig, gpointer *iter)
 
 /**
  * mono_signature_get_param_count:
- * @sig: the method signature inspected
- *
- * Returns: the number of parameters in the method signature @sig.
+ * \param sig the method signature inspected
+ * \returns the number of parameters in the method signature \p sig.
  */
 guint32
 mono_signature_get_param_count (MonoMethodSignature *sig)
@@ -6646,9 +6632,8 @@ mono_signature_get_param_count (MonoMethodSignature *sig)
 
 /**
  * mono_signature_get_call_conv:
- * @sig: the method signature inspected
- *
- * Returns: the call convention of the method signature @sig.
+ * \param sig the method signature inspected
+ * \returns the call convention of the method signature \p sig.
  */
 guint32
 mono_signature_get_call_conv (MonoMethodSignature *sig)
@@ -6658,10 +6643,9 @@ mono_signature_get_call_conv (MonoMethodSignature *sig)
 
 /**
  * mono_signature_vararg_start:
- * @sig: the method signature inspected
- *
- * Returns: the number of the first vararg parameter in the
- * method signature @sig. -1 if this is not a vararg signature.
+ * \param sig the method signature inspected
+ * \returns the number of the first vararg parameter in the
+ * method signature \param sig. \c -1 if this is not a vararg signature.
  */
 int
 mono_signature_vararg_start (MonoMethodSignature *sig)
@@ -6671,10 +6655,9 @@ mono_signature_vararg_start (MonoMethodSignature *sig)
 
 /**
  * mono_signature_is_instance:
- * @sig: the method signature inspected
- *
- * Returns: #TRUE if this the method signature @sig has an implicit
- * first instance argument. #FALSE otherwise.
+ * \param sig the method signature inspected
+ * \returns TRUE if this the method signature \p sig has an implicit
+ * first instance argument. FALSE otherwise.
  */
 gboolean
 mono_signature_is_instance (MonoMethodSignature *sig)
@@ -6684,10 +6667,9 @@ mono_signature_is_instance (MonoMethodSignature *sig)
 
 /**
  * mono_signature_param_is_out
- * @sig: the method signature inspected
- * @param_num: the 0-based index of the inspected parameter
- * 
- * Returns: #TRUE if the parameter is an out parameter, #FALSE
+ * \param sig the method signature inspected
+ * \param param_num the 0-based index of the inspected parameter
+ * \returns TRUE if the parameter is an out parameter, FALSE
  * otherwise.
  */
 mono_bool
@@ -6699,10 +6681,9 @@ mono_signature_param_is_out (MonoMethodSignature *sig, int param_num)
 
 /**
  * mono_signature_explicit_this:
- * @sig: the method signature inspected
- *
- * Returns: #TRUE if this the method signature @sig has an explicit
- * instance argument. #FALSE otherwise.
+ * \param sig the method signature inspected
+ * \returns TRUE if this the method signature \p sig has an explicit
+ * instance argument. FALSE otherwise.
  */
 gboolean
 mono_signature_explicit_this (MonoMethodSignature *sig)
index ee5671d693de3175273e3544cb3c105796508603..874852c9b076712b2cabde8da92eea05e02f1eb5 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_METADATA_H__
 #define __MONO_METADATA_H__
index 09e6027f4a0d53b7f5c2d50eed49cc7c59b1479b..9ce5f04e8eb68ef4957988ca74b6b13458c361cc 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * method-builder.c: Functions for creating IL methods at runtime.
+/**
+ * \file
+ * Functions for creating IL methods at runtime.
  * 
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -86,6 +87,9 @@ mono_mb_new_no_dup_name (MonoClass *klass, const char *name, MonoWrapperType typ
        return mb;
 }
 
+/**
+ * mono_mb_new:
+ */
 MonoMethodBuilder *
 mono_mb_new (MonoClass *klass, const char *name, MonoWrapperType type)
 {
@@ -94,6 +98,9 @@ mono_mb_new (MonoClass *klass, const char *name, MonoWrapperType type)
        return mb;
 }
 
+/**
+ * mono_mb_free:
+ */
 void
 mono_mb_free (MonoMethodBuilder *mb)
 {
@@ -121,10 +128,8 @@ mono_mb_free (MonoMethodBuilder *mb)
 
 /**
  * mono_mb_create_method:
- *
- * Create a MonoMethod from this method builder.
- * Returns: the newly created method.
- *
+ * Create a \c MonoMethod from this method builder.
+ * \returns the newly created method.
  */
 MonoMethod *
 mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, int max_stack)
@@ -261,6 +266,9 @@ mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, in
        return method;
 }
 
+/**
+ * mono_mb_add_data:
+ */
 guint32
 mono_mb_add_data (MonoMethodBuilder *mb, gpointer data)
 {
@@ -278,6 +286,9 @@ mono_mb_add_data (MonoMethodBuilder *mb, gpointer data)
 
 #ifndef DISABLE_JIT
 
+/**
+ * mono_mb_add_local:
+ */
 int
 mono_mb_add_local (MonoMethodBuilder *mb, MonoType *type)
 {
@@ -300,6 +311,9 @@ mono_mb_add_local (MonoMethodBuilder *mb, MonoType *type)
        return res;
 }
 
+/**
+ * mono_mb_patch_addr:
+ */
 void
 mono_mb_patch_addr (MonoMethodBuilder *mb, int pos, int value)
 {
@@ -309,12 +323,18 @@ mono_mb_patch_addr (MonoMethodBuilder *mb, int pos, int value)
        mb->code [pos + 3] = (value >> 24) & 0xff;
 }
 
+/**
+ * mono_mb_patch_addr_s:
+ */
 void
 mono_mb_patch_addr_s (MonoMethodBuilder *mb, int pos, gint8 value)
 {
        *((gint8 *)(&mb->code [pos])) = value;
 }
 
+/**
+ * mono_mb_emit_byte:
+ */
 void
 mono_mb_emit_byte (MonoMethodBuilder *mb, guint8 op)
 {
@@ -326,6 +346,9 @@ mono_mb_emit_byte (MonoMethodBuilder *mb, guint8 op)
        mb->code [mb->pos++] = op;
 }
 
+/**
+ * mono_mb_emit_ldflda:
+ */
 void
 mono_mb_emit_ldflda (MonoMethodBuilder *mb, gint32 offset)
 {
@@ -338,6 +361,9 @@ mono_mb_emit_ldflda (MonoMethodBuilder *mb, gint32 offset)
        }
 }
 
+/**
+ * mono_mb_emit_i4:
+ */
 void
 mono_mb_emit_i4 (MonoMethodBuilder *mb, gint32 data)
 {
@@ -363,6 +389,9 @@ mono_mb_emit_i8 (MonoMethodBuilder *mb, gint64 data)
        mb->pos += 8;
 }
 
+/**
+ * mono_mb_emit_i2:
+ */
 void
 mono_mb_emit_i2 (MonoMethodBuilder *mb, gint16 data)
 {
@@ -383,12 +412,18 @@ mono_mb_emit_op (MonoMethodBuilder *mb, guint8 op, gpointer data)
        mono_mb_emit_i4 (mb, mono_mb_add_data (mb, data));
 }
 
+/**
+ * mono_mb_emit_ldstr:
+ */
 void
 mono_mb_emit_ldstr (MonoMethodBuilder *mb, char *str)
 {
        mono_mb_emit_op (mb, CEE_LDSTR, str);
 }
 
+/**
+ * mono_mb_emit_ldarg:
+ */
 void
 mono_mb_emit_ldarg (MonoMethodBuilder *mb, guint argnum)
 {
@@ -404,6 +439,9 @@ mono_mb_emit_ldarg (MonoMethodBuilder *mb, guint argnum)
        }
 }
 
+/**
+ * mono_mb_emit_ldarg_addr:
+ */
 void
 mono_mb_emit_ldarg_addr (MonoMethodBuilder *mb, guint argnum)
 {
@@ -417,6 +455,9 @@ mono_mb_emit_ldarg_addr (MonoMethodBuilder *mb, guint argnum)
        }
 }
 
+/**
+ * mono_mb_emit_ldloc_addr:
+ */
 void
 mono_mb_emit_ldloc_addr (MonoMethodBuilder *mb, guint locnum)
 {
@@ -430,6 +471,9 @@ mono_mb_emit_ldloc_addr (MonoMethodBuilder *mb, guint locnum)
        }
 }
 
+/**
+ * mono_mb_emit_ldloc:
+ */
 void
 mono_mb_emit_ldloc (MonoMethodBuilder *mb, guint num)
 {
@@ -445,6 +489,9 @@ mono_mb_emit_ldloc (MonoMethodBuilder *mb, guint num)
        }
 }
 
+/**
+ * mono_mb_emit_stloc:
+ */
 void
 mono_mb_emit_stloc (MonoMethodBuilder *mb, guint num)
 {
@@ -460,6 +507,9 @@ mono_mb_emit_stloc (MonoMethodBuilder *mb, guint num)
        }
 }
 
+/**
+ * mono_mb_emit_icon:
+ */
 void
 mono_mb_emit_icon (MonoMethodBuilder *mb, gint32 value)
 {
@@ -493,6 +543,9 @@ mono_mb_get_pos (MonoMethodBuilder *mb)
        return mb->pos;
 }
 
+/**
+ * mono_mb_emit_branch:
+ */
 guint32
 mono_mb_emit_branch (MonoMethodBuilder *mb, guint8 op)
 {
@@ -546,12 +599,18 @@ mono_mb_emit_calli (MonoMethodBuilder *mb, MonoMethodSignature *sig)
        mono_mb_emit_op (mb, CEE_CALLI, sig);
 }
 
+/**
+ * mono_mb_emit_managed_call:
+ */
 void
 mono_mb_emit_managed_call (MonoMethodBuilder *mb, MonoMethod *method, MonoMethodSignature *opt_sig)
 {
        mono_mb_emit_op (mb, CEE_CALL, method);
 }
 
+/**
+ * mono_mb_emit_native_call:
+ */
 void
 mono_mb_emit_native_call (MonoMethodBuilder *mb, MonoMethodSignature *sig, gpointer func)
 {
@@ -585,12 +644,18 @@ mono_mb_emit_exception_full (MonoMethodBuilder *mb, const char *exc_nspace, cons
        mono_mb_emit_byte (mb, CEE_THROW);
 }
 
+/**
+ * mono_mb_emit_exception:
+ */
 void
 mono_mb_emit_exception (MonoMethodBuilder *mb, const char *exc_name, const char *msg)
 {
        mono_mb_emit_exception_full (mb, "System", exc_name, msg);
 }
 
+/**
+ * mono_mb_emit_add_to_local:
+ */
 void
 mono_mb_emit_add_to_local (MonoMethodBuilder *mb, guint16 local, gint32 incr)
 {
index 0176fc56a4227968c6bd76c1c63ab095fdae6ff1..b94abb0d64a87f9bb7e04cc2eac9f29968e0e878 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * method-builder.h: Functions for creating IL methods at runtime.
+/**
+ * \file
+ * Functions for creating IL methods at runtime.
  * 
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
index 676400c152e8d414dbf72f87b4d74e86037e0fb2..beb96a4dc43924583e799d484d928eb11f24af9b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * monitor.c:  Monitor locking functions
+/**
+ * \file
+ * Monitor locking functions
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
@@ -307,10 +308,9 @@ monitor_is_on_freelist (MonoThreadsSync *mon)
 
 /**
  * mono_locks_dump:
- * @include_untaken:
- *
+ * \param include_untaken Whether to list unheld inflated locks.
  * Print a report on stdout of the managed locks currently held by
- * threads. If @include_untaken is specified, list also inflated locks
+ * threads. If \p include_untaken is specified, list also inflated locks
  * which are unheld.
  * This is supposed to be used in debuggers like gdb.
  */
@@ -1049,6 +1049,9 @@ mono_monitor_enter_internal (MonoObject *obj)
        return TRUE;
 }
 
+/**
+ * mono_monitor_enter:
+ */
 gboolean
 mono_monitor_enter (MonoObject *obj)
 {
@@ -1067,6 +1070,9 @@ mono_monitor_enter_fast (MonoObject *obj)
        return mono_monitor_try_enter_internal (obj, 0, FALSE) == 1;
 }
 
+/**
+ * mono_monitor_try_enter:
+ */
 gboolean
 mono_monitor_try_enter (MonoObject *obj, guint32 ms)
 {
@@ -1077,6 +1083,9 @@ mono_monitor_try_enter (MonoObject *obj, guint32 ms)
        return mono_monitor_try_enter_internal (obj, ms, FALSE) == 1;
 }
 
+/**
+ * mono_monitor_exit:
+ */
 void
 mono_monitor_exit (MonoObject *obj)
 {
@@ -1160,6 +1169,9 @@ ves_icall_System_Threading_Monitor_Monitor_try_enter_with_atomic_var (MonoObject
        *lockTaken = res == 1;
 }
 
+/**
+ * mono_monitor_enter_v4:
+ */
 void
 mono_monitor_enter_v4 (MonoObject *obj, char *lock_taken)
 {
index 657f22b190c1bb2538c1b82264adf0e594ed2e4e..f0babcc7396eb7c87f77d442f2447ee06eaf5b0e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * monitor.h: Monitor locking functions
+/**
+ * \file
+ * Monitor locking functions
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index 1241ea2c134757c2306748754912bd7691cadd50..9d28614b16e822487c9f258b88c4875bf3ce9a75 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-basic-block.c: Routines for parsing basic blocks from the IL stream
+/**
+ * \file
+ * Routines for parsing basic blocks from the IL stream
  *
  * Authors:
  *   Rodrigo Kumpera (rkumpera@novell.com)
index a3f65187873add05800f1a59f35fb1912c01d817..bed87a1774ce84ba1622847c288ab9a10d2a4bd5 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_METADATA_BASIC_BLOCK_H__
 #define __MONO_METADATA_BASIC_BLOCK_H__
 
index 2e61a1b3373548162adf8a0291ebc00c3411fe4a..b526b414c13f6b3920330cd545ee8af78eaeb937 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-config-dirs.c:
+/**
+ * \file
  *
  * Copyright 2015 Xamarin Inc (http://www.xamarin.com)
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 25e765122539c04384aad6f75ade2ee5efb39637..d0755f397a7fbe0bdc1104a8cecc5159dae5460d 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_CONFIG_INTERNAL_H__
 #define __MONO_CONFIG_INTERNAL_H__
 
index 8a65e0b8ece23931bf8ca9b36358d6de4299c54e..e598348f9ba23e0bdd12ccd7ae48bdd79cf8116b 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-config.c
+/**
+ * \file
  *
  * Runtime and assembly configuration file support routines.
  *
@@ -464,6 +464,9 @@ mono_config_init (void)
        g_hash_table_insert (config_handlers, (gpointer) aot_cache_handler.element_name, (gpointer) &aot_cache_handler);
 }
 
+/**
+ * mono_config_cleanup:
+ */
 void
 mono_config_cleanup (void)
 {
@@ -515,8 +518,7 @@ mono_config_parse_file_with_context (ParseState *state, const char *filename)
 
 /**
  * mono_config_parse_memory:
- * @buffer: a pointer to an string XML representation of the configuration
- *
+ * \param buffer a pointer to an string XML representation of the configuration
  * Parses the configuration from a buffer
  */
 void
@@ -566,6 +568,9 @@ static BundledConfig *bundled_configs = NULL;
 
 static const char *bundled_machine_config = NULL;
 
+/**
+ * mono_register_config_for_assembly:
+ */
 void
 mono_register_config_for_assembly (const char* assembly_name, const char* config_xml)
 {
@@ -578,6 +583,9 @@ mono_register_config_for_assembly (const char* assembly_name, const char* config
        bundled_configs = bconfig;
 }
 
+/**
+ * mono_config_string_for_assembly_file:
+ */
 const char *
 mono_config_string_for_assembly_file (const char *filename)
 {
@@ -590,6 +598,9 @@ mono_config_string_for_assembly_file (const char *filename)
        return NULL;
 }
 
+/**
+ * mono_config_for_assembly:
+ */
 void 
 mono_config_for_assembly (MonoImage *assembly)
 {
@@ -632,10 +643,9 @@ mono_config_for_assembly (MonoImage *assembly)
 
 /**
  * mono_config_parse:
- * @filename: the filename to load the configuration variables from.
- *
+ * \param filename the filename to load the configuration variables from.
  * Pass a NULL filename to parse the default config files
- * (or the file in the MONO_CONFIG env var).
+ * (or the file in the \c MONO_CONFIG env var).
  */
 void
 mono_config_parse (const char *filename) {
@@ -669,7 +679,10 @@ mono_config_parse (const char *filename) {
 #endif
 }
 
-/* Invoked during startup */
+/**
+ * mono_set_config_dir:
+ * Invoked during startup
+ */
 void
 mono_set_config_dir (const char *dir)
 {
@@ -681,6 +694,9 @@ mono_set_config_dir (const char *dir)
        mono_cfg_dir = env_mono_cfg_dir;
 }
 
+/**
+ * mono_get_config_dir:
+ */
 const char* 
 mono_get_config_dir (void)
 {
@@ -690,12 +706,18 @@ mono_get_config_dir (void)
        return mono_cfg_dir;
 }
 
+/**
+ * mono_register_machine_config:
+ */
 void
 mono_register_machine_config (const char *config_xml)
 {
        bundled_machine_config = config_xml;
 }
 
+/**
+ * mono_get_machine_config:
+ */
 const char *
 mono_get_machine_config (void)
 {
@@ -891,12 +913,18 @@ mono_config_parse_assembly_bindings (const char *filename, int amajor, int amino
 
 static mono_bool mono_server_mode = FALSE;
 
+/**
+ * mono_config_set_server_mode:
+ */
 void
 mono_config_set_server_mode (mono_bool server_mode)
 {
        mono_server_mode = server_mode;
 }
 
+/**
+ * mono_config_is_server_mode:
+ */
 mono_bool
 mono_config_is_server_mode (void)
 {
index b9695c14ba296122fa8444d0c942074e2e389997..daebd02c28a19da26fff04dadf1d734e9dcc99eb 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-config.h
+/**
+ * \file
  *
  * Author: Paolo Molaro (lupus@ximian.com)
  *
index 50b10a9280abadc87b43d739e4c6ae9fb28e83a4..b1a40b6ae5f2eb1c21f210c680971e67d8b916b0 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-debug.c: 
+/**
+ * \file
  *
  * Author:
  *     Mono Project (http://www.mono-project.com)
@@ -178,6 +178,9 @@ mono_debug_cleanup (void)
        }
 }
 
+/**
+ * mono_debug_domain_create:
+ */
 void
 mono_debug_domain_create (MonoDomain *domain)
 {
@@ -223,6 +226,9 @@ mono_debug_get_image (MonoImage *image)
        return (MonoDebugHandle *)g_hash_table_lookup (mono_debug_handles, image);
 }
 
+/**
+ * mono_debug_close_image:
+ */
 void
 mono_debug_close_image (MonoImage *image)
 {
@@ -331,9 +337,9 @@ mono_debug_lookup_method_internal (MonoMethod *method)
 /**
  * mono_debug_lookup_method:
  *
- * Lookup symbol file information for the method @method.  The returned
- * `MonoDebugMethodInfo' is a private structure, but it can be passed to
- * mono_debug_symfile_lookup_location().
+ * Lookup symbol file information for the method \p method.  The returned
+ * \c MonoDebugMethodInfo is a private structure, but it can be passed to
+ * \c mono_debug_symfile_lookup_location.
  */
 MonoDebugMethodInfo *
 mono_debug_lookup_method (MonoMethod *method)
@@ -431,6 +437,9 @@ write_variable (MonoDebugVarInfo *var, guint8 *ptr, guint8 **rptr)
        *rptr = ptr;
 }
 
+/**
+ * mono_debug_add_method:
+ */
 MonoDebugMethodAddress *
 mono_debug_add_method (MonoMethod *method, MonoDebugMethodJitInfo *jit, MonoDomain *domain)
 {
@@ -530,6 +539,9 @@ mono_debug_remove_method (MonoMethod *method, MonoDomain *domain)
        mono_debugger_unlock ();
 }
 
+/**
+ * mono_debug_add_delegate_trampoline:
+ */
 void
 mono_debug_add_delegate_trampoline (gpointer code, int size)
 {
@@ -719,8 +731,8 @@ cleanup_and_fail:
 /**
  * mono_debug_il_offset_from_address:
  *
- *   Compute the IL offset corresponding to NATIVE_OFFSET inside the native
- * code of METHOD in DOMAIN.
+ * Compute the IL offset corresponding to \p native_offset inside the native
+ * code of \p method in \p domain.
  */
 gint32
 mono_debug_il_offset_from_address (MonoMethod *method, MonoDomain *domain, guint32 native_offset)
@@ -738,14 +750,12 @@ mono_debug_il_offset_from_address (MonoMethod *method, MonoDomain *domain, guint
 
 /**
  * mono_debug_lookup_source_location:
- * @address: Native offset within the @method's machine code.
- *
+ * \param address Native offset within the \p method's machine code.
  * Lookup the source code corresponding to the machine instruction located at
- * native offset @address within @method.
- *
- * The returned `MonoDebugSourceLocation' contains both file / line number
+ * native offset \p address within \p method.
+ * The returned \c MonoDebugSourceLocation contains both file / line number
  * information and the corresponding IL offset.  It must be freed by
- * mono_debug_free_source_location().
+ * \c mono_debug_free_source_location.
  */
 MonoDebugSourceLocation *
 mono_debug_lookup_source_location (MonoMethod *method, guint32 address, MonoDomain *domain)
@@ -897,9 +907,8 @@ mono_debug_free_method_async_debug_info (MonoDebugMethodAsyncInfo *info)
 
 /**
  * mono_debug_free_source_location:
- * @location: A `MonoDebugSourceLocation'.
- *
- * Frees the @location.
+ * \param location A \c MonoDebugSourceLocation
+ * Frees the \p location.
  */
 void
 mono_debug_free_source_location (MonoDebugSourceLocation *location)
@@ -920,9 +929,8 @@ mono_install_get_seq_point (MonoGetSeqPointFunc func)
 
 /**
  * mono_debug_print_stack_frame:
- * @native_offset: Native offset within the @method's machine code.
- *
- * Conventient wrapper around mono_debug_lookup_source_location() which can be
+ * \param native_offset Native offset within the \p method's machine code.
+ * Conventient wrapper around \c mono_debug_lookup_source_location which can be
  * used if you only want to use the location to print a stack frame.
  */
 gchar *
@@ -1003,6 +1011,9 @@ struct _BundledSymfile {
 
 static BundledSymfile *bundled_symfiles = NULL;
 
+/**
+ * mono_register_symfile_for_assembly:
+ */
 void
 mono_register_symfile_for_assembly (const char *assembly_name, const mono_byte *raw_contents, int size)
 {
index 8f20018f274c40ddfb009c94ab94cb4ecc02d068..66365a01c60f2e93980d99693be9b5a52f89b691 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * This header is only installed for use by the debugger:
  * the structures and the API declared here are not supported.
  */
index 0a697360e22e3404541a4f645725d78a2d518217..d7822c72ff6306bcdd732310b8a2555085d2e50b 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-endian.c:
+/**
+ * \file
  *
  * Author:
  *     Mono Project (http://www.mono-project.com)
index acc2590193fc74fac651b5f5a2237834460584be..8704dc5959d768ec585df4cd4a2ce9596505d978 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_METADATA_ENDIAN_H_
 #define _MONO_METADATA_ENDIAN_H_ 1
 
index c5c65b66947c8a8f83e1c8dd53f3aee795ddf1a1..d8d5d4435edaad15c29bd53dd90ecdad8dc04645 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-gc.h: GC related public interface
+/**
+ * \file
+ * GC related public interface
  *
  */
 #ifndef __METADATA_MONO_GC_H__
index 9c6cdb44101c6479dfbc36381aefc2252a7fb074..1b558370d02c12c4bfc3ce7d7394a0ffff774f8d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * ghashtable.c: Hashtable implementation
+/**
+ * \file
+ * Hashtable implementation
  *
  * Author:
  *   Miguel de Icaza (miguel@novell.com)
@@ -256,6 +257,9 @@ rehash (MonoGHashTable *hash)
        mg_free (old_values);
 }
 
+/**
+ * mono_g_hash_table_size:
+ */
 guint
 mono_g_hash_table_size (MonoGHashTable *hash)
 {
@@ -264,6 +268,9 @@ mono_g_hash_table_size (MonoGHashTable *hash)
        return hash->in_use;
 }
 
+/**
+ * mono_g_hash_table_lookup:
+ */
 gpointer
 mono_g_hash_table_lookup (MonoGHashTable *hash, gconstpointer key)
 {
@@ -275,6 +282,9 @@ mono_g_hash_table_lookup (MonoGHashTable *hash, gconstpointer key)
                return NULL;
 }
 
+/**
+ * mono_g_hash_table_lookup_extended:
+ */
 gboolean
 mono_g_hash_table_lookup_extended (MonoGHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value)
 {
@@ -293,6 +303,9 @@ mono_g_hash_table_lookup_extended (MonoGHashTable *hash, gconstpointer key, gpoi
        return FALSE;
 }
 
+/**
+ * mono_g_hash_table_foreach:
+ */
 void
 mono_g_hash_table_foreach (MonoGHashTable *hash, GHFunc func, gpointer user_data)
 {
@@ -322,6 +335,9 @@ mono_g_hash_table_find (MonoGHashTable *hash, GHRFunc predicate, gpointer user_d
        return NULL;
 }
 
+/**
+ * mono_g_hash_table_remove:
+ */
 gboolean
 mono_g_hash_table_remove (MonoGHashTable *hash, gconstpointer key)
 {
@@ -374,6 +390,9 @@ mono_g_hash_table_remove (MonoGHashTable *hash, gconstpointer key)
        return TRUE;
 }
 
+/**
+ * mono_g_hash_table_foreach_remove:
+ */
 guint
 mono_g_hash_table_foreach_remove (MonoGHashTable *hash, GHRFunc func, gpointer user_data)
 {
@@ -396,6 +415,9 @@ mono_g_hash_table_foreach_remove (MonoGHashTable *hash, GHRFunc func, gpointer u
        return count;
 }
 
+/**
+ * mono_g_hash_table_destroy:
+ */
 void
 mono_g_hash_table_destroy (MonoGHashTable *hash)
 {
@@ -454,12 +476,18 @@ mono_g_hash_table_insert_replace (MonoGHashTable *hash, gpointer key, gpointer v
        }
 }
 
+/**
+ * mono_g_hash_table_insert:
+ */
 void
 mono_g_hash_table_insert (MonoGHashTable *h, gpointer k, gpointer v)
 {
        mono_g_hash_table_insert_replace (h, k, v, FALSE);
 }
 
+/**
+ * mono_g_hash_table_replace:
+ */
 void
 mono_g_hash_table_replace(MonoGHashTable *h, gpointer k, gpointer v)
 {
index dca17694f8eab15a9ae3022b6d49ba112046aa49..7f778e50bd10445a9413a184e4f9683235358af2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hash.c: GC-aware hashtable, based on Eglib's Hashtable
+/**
+ * \file
+ * GC-aware hashtable, based on Eglib's Hashtable
  *
  * Authors:
  *   Paolo Molaro (lupus@xamarin.com)
index 657a21348dc8829ec9fe6e635292728495b5f9a7..27ed22e4307ce8a89ea793449f38ed45ecbd6e2d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-mlist.c: Managed object list implementation
+/**
+ * \file
+ * Managed object list implementation
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -33,9 +34,8 @@ static MonoVTable *monolist_item_vtable = NULL;
 
 /**
  * mono_mlist_alloc:
- * @data: object to use as data
- *
- * Allocates a new managed list node with @data as the contents.
+ * \param data object to use as data
+ * Allocates a new managed list node with \p data as the contents.
  * A managed list node also represents a singly-linked list.
  * Managed lists are garbage collected, so there is no free routine
  * and the user is required to keep references to the managed list
@@ -52,15 +52,14 @@ mono_mlist_alloc (MonoObject *data)
 
 /**
  * mono_mlist_alloc_checked:
- * @data: object to use as data
- * @error: set on error
- *
- * Allocates a new managed list node with @data as the contents.  A
+ * \param data object to use as data
+ * \param error set on error
+ * Allocates a new managed list node with \p data as the contents.  A
  * managed list node also represents a singly-linked list.  Managed
  * lists are garbage collected, so there is no free routine and the
  * user is required to keep references to the managed list to prevent
  * it from being garbage collected. On failure returns NULL and sets
- * @error.
+ * \p error.
  */
 MonoMList*
 mono_mlist_alloc_checked (MonoObject *data, MonoError *error)
@@ -80,9 +79,8 @@ mono_mlist_alloc_checked (MonoObject *data, MonoError *error)
 
 /**
  * mono_mlist_get_data:
- * @list: the managed list node
- *
- * Get the object stored in the list node @list.
+ * \param list the managed list node
+ * Get the object stored in the list node \p list.
  */
 MonoObject*
 mono_mlist_get_data (MonoMList* list)
@@ -92,9 +90,8 @@ mono_mlist_get_data (MonoMList* list)
 
 /**
  * mono_mlist_set_data:
- * @list: the managed list node
- *
- * Set the object content in the list node @list.
+ * \param list the managed list node
+ * Set the object content in the list node \p list.
  */
 void
 mono_mlist_set_data (MonoMList* list, MonoObject *data)
@@ -104,10 +101,9 @@ mono_mlist_set_data (MonoMList* list, MonoObject *data)
 
 /**
  * mono_mlist_set_next:
- * @list: a managed list node
- * @next: list node that will be next for the @list node.
- *
- * Set next node for @list to @next.
+ * \param list a managed list node
+ * \param next list node that will be next for the \p list node.
+ * Set next node for \p list to \p next.
  */
 MonoMList *
 mono_mlist_set_next (MonoMList* list, MonoMList *next)
@@ -121,9 +117,8 @@ mono_mlist_set_next (MonoMList* list, MonoMList *next)
 
 /**
  * mono_mlist_length:
- * @list: the managed list
- *
- * Get the number of items in the list @list.
+ * \param list the managed list
+ * Get the number of items in the list \p list.
  * Since managed lists are singly-linked, this operation takes O(n) time.
  */
 int
@@ -139,9 +134,8 @@ mono_mlist_length (MonoMList* list)
 
 /**
  * mono_mlist_next:
- * @list: the managed list node
- *
- * Returns the next managed list node starting from @list.
+ * \param list the managed list node
+ * Returns the next managed list node starting from \p list.
  */
 MonoMList*
 mono_mlist_next (MonoMList* list)
@@ -151,9 +145,8 @@ mono_mlist_next (MonoMList* list)
 
 /**
  * mono_mlist_last:
- * @list: the managed list node
- *
- * Returns the last managed list node in list @list.
+ * \param list the managed list node
+ * Returns the last managed list node in list \p list.
  * Since managed lists are singly-linked, this operation takes O(n) time.
  */
 MonoMList*
@@ -169,11 +162,10 @@ mono_mlist_last (MonoMList* list)
 
 /**
  * mono_mlist_prepend:
- * @list: the managed list
- * @data: the object to add to the list
- *
- * Allocate a new list node with @data as content and prepend it
- * to the list @list. @list can be NULL.
+ * \param list the managed list
+ * \param data the object to add to the list
+ * Allocate a new list node with \p data as content and prepend it
+ * to the list \p list. \p list can be NULL.
  */
 MonoMList*
 mono_mlist_prepend (MonoMList* list, MonoObject *data)
@@ -186,13 +178,12 @@ mono_mlist_prepend (MonoMList* list, MonoObject *data)
 
 /**
  * mono_mlist_prepend_checked:
- * @list: the managed list
- * @data: the object to add to the list
- * @error: set on error
- *
- * Allocate a new list node with @data as content and prepend it to
- * the list @list. @list can be NULL. On failure returns NULL and sets
- * @error.
+ * \param list the managed list
+ * \param data the object to add to the list
+ * \param error set on error
+ * Allocate a new list node with \p data as content and prepend it to
+ * the list \p list. \p list can be NULL. On failure returns NULL and sets
+ * \p error.
  */
 MonoMList*
 mono_mlist_prepend_checked (MonoMList* list, MonoObject *data, MonoError *error)
@@ -208,11 +199,10 @@ mono_mlist_prepend_checked (MonoMList* list, MonoObject *data, MonoError *error)
 
 /**
  * mono_mlist_append:
- * @list: the managed list
- * @data: the object to add to the list
- *
- * Allocate a new list node with @data as content and append it
- * to the list @list. @list can be NULL.
+ * \param list the managed list
+ * \param data the object to add to the list
+ * Allocate a new list node with \p data as content and append it
+ * to the list \p list. \p list can be NULL.
  * Since managed lists are singly-linked, this operation takes O(n) time.
  */
 MonoMList*
@@ -226,14 +216,13 @@ mono_mlist_append (MonoMList* list, MonoObject *data)
 
 /**
  * mono_mlist_append_checked:
- * @list: the managed list
- * @data: the object to add to the list
- * @error: set on error
- *
- * Allocate a new list node with @data as content and append it
- * to the list @list. @list can be NULL.
+ * \param list the managed list
+ * \param data the object to add to the list
+ * \param error set on error
+ * Allocate a new list node with \p data as content and append it
+ * to the list \p list. \p list can be NULL.
  * Since managed lists are singly-linked, this operation takes O(n) time.
- * On failure returns NULL and sets @error.
+ * On failure returns NULL and sets \p error.
  */
 MonoMList*
 mono_mlist_append_checked (MonoMList* list, MonoObject *data, MonoError *error)
@@ -266,10 +255,9 @@ find_prev (MonoMList* list, MonoMList *item)
 
 /**
  * mono_mlist_remove_item:
- * @list: the managed list
- * @data: the object to remove from the list
- *
- * Remove the list node @item from the managed list @list.
+ * \param list the managed list
+ * \param data the object to remove from the list
+ * Remove the list node \p item from the managed list \p list.
  * Since managed lists are singly-linked, this operation can take O(n) time.
  */
 MonoMList*
index c625ecacc84aa1cece647e2084760c8cee2c08f7..cfeeba39acb42c2382ac205d1b1ce9e32559dd83 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_METADATA_MONO_MLIST_H__
 #define __MONO_METADATA_MONO_MLIST_H__
 
index 91b4fc60f97cd3ad58a8295eb8a4bfefdc58a2bb..c72b708532af58969d727a03353bda785727f477 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Define the system and runtime performance counters.
  * Each category is defined with the macro:
  *     PERFCTR_CAT(catid, name, help, type, instances, first_counter_id)
index 8c370a9bacfc4bdce4d68498f481ec23ab7c0434..57ae9d3f0d2df6242d3704151aa281894257a2e8 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-perfcounters.c
+/**
+ * \file
  *
  * Performance counters support.
  *
index 906d2c69b8b610d9f0c0739cfd0a8a5283fa6880..e7c702f449aa0386ef2fc2236c882f1e2717e529 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_PERFCOUNTERS_H__
 #define __MONO_PERFCOUNTERS_H__
 
index 00b3b09c39288a69ad3b804845071c28c597a007..61589f3bbbdec2d9a1fd7520c884efa399b9d919 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-ptr-array.h: GC aware equivalente of g_ptr_array
+/**
+ * \file
+ * GC aware equivalente of g_ptr_array
  *
  * Author:
  *     Rodrigo Kumpera  <rkumpera@novell.com>
index 5f3ecb93ea65582aaadb6081e7cfa9e1f2f0c7dc..e6e397af0ec7cd4bca2b842d3d39b8a6cc3e003e 100644 (file)
@@ -1,6 +1,7 @@
-/*
- * mono-route.c: Read the network routing tables using sysctl(3) calls
- *               Required for Unix-like systems that don't have Linux's /proc/net/route
+/**
+ * \file
+ * Read the network routing tables using sysctl(3) calls
+ * Required for Unix-like systems that don't have Linux's /proc/net/route
  *
  * Author:
  *   Ben Woods (woodsb02@gmail.com)
index 4bafef4653c25d7cf3d349a163add7ec6456dacc..5086fbd3ef05f2d31dbd450cf44a2014ca016e77 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_ROUTE_H__
 #define __MONO_ROUTE_H__
 
index a7cc247231597cb8641286ee8457e882ff6fa2f4..dc76e58cd03509369b98535a8f917668aa076745 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index bd1ebe9b3644e12c924ecf7fdf652e058e963ed8..42f5297aaa627c0373e4ca254d44a1ee78bb3743 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-security-windows-uwp.c: UWP security support for Mono.
+/**
+ * \file
+ * UWP security support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 63807a5ac8fdd999be398a52975549a1ac43e5f2..d6f269c6e946b25b5f9968512832f726981882b6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-security-windows.c: Windows security support.
+/**
+ * \file
+ * Windows security support.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 0d770f70cdc0906290840eeb398892843cfcdfb4..7a03a77ef05d99254025e00f2e7c185875dd765f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * security.c:  Security internal calls
+/**
+ * \file
+ * Security internal calls
  *
  * Author:
  *     Sebastien Pouliot  <sebastien@ximian.com>
@@ -12,7 +13,7 @@
 #include <config.h>
 #endif
 
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/image.h>
 #include <mono/metadata/exception.h>
@@ -592,7 +593,7 @@ void invoke_protected_memory_method (MonoArray *data, MonoObject *scope, gboolea
        if (system_security_assembly == NULL) {
                system_security_assembly = mono_image_loaded ("System.Security");
                if (!system_security_assembly) {
-                       MonoAssembly *sa = mono_assembly_open ("System.Security.dll", NULL);
+                       MonoAssembly *sa = mono_assembly_open_predicate ("System.Security.dll", FALSE, FALSE, NULL, NULL, NULL);
                        if (!sa)
                                g_assert_not_reached ();
                        system_security_assembly = mono_assembly_get_image (sa);
index e7fcb2d03b407e68d84dea83dc51469ee32bddb2..ca875829624582f90cb3c5fb3d36dde8265a5974 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #if defined(__native_client__)
 
 #include "nacl-stub.h"
index 4ee7dd7c9c4f9ea7f327c0ffe7d81a5dcb3e1107..5dff7bf1940f93d32d0950476a80e0a475460fa0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * null-gc.c: GC implementation using malloc: will leak everything, just for testing.
+/**
+ * \file
+ * GC implementation using malloc: will leak everything, just for testing.
  *
  * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
  * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
index 0c9274b2dbb8bc5e594bcc81224a4b816bbf7f8f..e1e4eb2d8519d1230b8894a22b825c3cd34f21ae 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_METADATA_NUMBER_FORMATTER_H_
 #define _MONO_METADATA_NUMBER_FORMATTER_H_ 1
 
index 48084d143eb540991da6643180b4e23853536676..bb6bc6aeaf2746e74984da81074fd89df22509ed 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * number-ms.c: System.Double, System.Single and System.Number runtime support
+/**
+ * \file
+ * System.Double, System.Single and System.Number runtime support
  *
  * Author:
  *     Ludovic Henry (ludovic@xamarin.com)
index c6c7e3878702b1b9a2754e1d3e8b18c9241d2c40..f20cc95cce3d4ad8ef5c6728a441680045e0d3e0 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_NUMBER_MS_H__
 #define __MONO_NUMBER_MS_H__
 
index 3e6c7f3e47ba3a874700f2cbb341563f2fa0df42..48bf20f157e7cf2e07aae0c3f28dc2bcb8fa6dc8 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_OBJECT_INTERNALS_H__
 #define __MONO_OBJECT_INTERNALS_H__
 
index f304361d4bd4129d9996f6c2cd5891906e146e0d..30d2a1f0c2320eaf8f8cb96950129a7cf57a1c70 100644 (file)
@@ -1,4 +1,6 @@
-/*
+
+/**
+\file
 This is a parameterized header. It's supposed/ok to be included multiple times.
 
 Input defines: (those to be defined by the includer file)
@@ -12,6 +14,12 @@ 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
+DISABLE_METADATA_OFFSETS - Disable the definition of offsets for structures defined in metadata/.
+DISABLE_JIT_OFFSETS - Disable the definition of offsets for structures defined in mini/.
+
+The last two are needed because metadata shouldn't include JIT offsets since the structures
+are not defined, while the JIT shouldn't include metadata offsets, since some of them
+are GC specific, and the JIT needs to remain GC agnostic.
 
 Output defines:
 
@@ -51,8 +59,8 @@ DECL_SIZE(float)
 DECL_SIZE(double)
 DECL_SIZE(gpointer)
 
+// Offsets for structures defined in metadata/
 #ifndef DISABLE_METADATA_OFFSETS
-//object offsets
 DECL_OFFSET(MonoObject, vtable)
 DECL_OFFSET(MonoObject, synchronisation)
 
@@ -141,6 +149,7 @@ DECL_OFFSET(SgenThreadInfo, tlab_temp_end)
 
 #endif //DISABLE METADATA OFFSETS
 
+// Offsets for structures defined in mini/
 #ifndef DISABLE_JIT_OFFSETS
 DECL_OFFSET(MonoLMF, previous_lmf)
 
index bba8c17d17ec4d142458764a1d674876c54dc7ac..a2525d1cd1ea2051e95f17dd8651a795bcf5af4f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * object.c: Object creation for the Mono runtime
+/**
+ * \file
+ * Object creation for the Mono runtime
  *
  * Author:
  *   Miguel de Icaza (miguel@ximian.com)
@@ -82,8 +83,7 @@ static mono_mutex_t ldstr_section;
 
 /**
  * mono_runtime_object_init:
- * @this_obj: the object to initialize
- *
+ * \param this_obj the object to initialize
  * This function calls the zero-argument constructor (which must
  * exist) for the given object.
  */
@@ -97,12 +97,11 @@ mono_runtime_object_init (MonoObject *this_obj)
 
 /**
  * mono_runtime_object_init_checked:
- * @this_obj: the object to initialize
- * @error: set on error.
- *
+ * \param this_obj the object to initialize
+ * \param error set on error.
  * This function calls the zero-argument constructor (which must
  * exist) for the given object and returns TRUE on success, or FALSE
- * on error and sets @error.
+ * on error and sets \p error.
  */
 gboolean
 mono_runtime_object_init_checked (MonoObject *this_obj, MonoError *error)
@@ -201,11 +200,10 @@ static MonoRuntimeCallbacks callbacks;
 
 /**
  * mono_thread_set_main:
- * @thread: thread to set as the main thread
- *
- * This function can be used to instruct the runtime to treat @thread
- * as the main thread, ie, the thread that would normally execute the Main()
- * method. This basically means that at the end of @thread, the runtime will
+ * \param thread thread to set as the main thread
+ * This function can be used to instruct the runtime to treat \p thread
+ * as the main thread, ie, the thread that would normally execute the \c Main
+ * method. This basically means that at the end of \p thread, the runtime will
  * wait for the existing foreground threads to quit and other such details.
  */
 void
@@ -223,6 +221,9 @@ mono_thread_set_main (MonoThread *thread)
        main_thread = thread;
 }
 
+/**
+ * mono_thread_get_main:
+ */
 MonoThread*
 mono_thread_get_main (void)
 {
@@ -300,11 +301,10 @@ get_type_init_exception_for_vtable (MonoVTable *vtable)
        return ex;
 }
 
-/*
+/**
  * mono_runtime_class_init:
- * @vtable: vtable that needs to be initialized
- *
- * This routine calls the class constructor for @vtable.
+ * \param vtable vtable that needs to be initialized
+ * This routine calls the class constructor for \p vtable.
  */
 void
 mono_runtime_class_init (MonoVTable *vtable)
@@ -336,11 +336,9 @@ unref_type_lock (TypeInitializationLock *lock)
 
 /**
  * mono_runtime_class_init_full:
- * @vtable that neeeds to be initialized
- * @error set on error
- *
- * returns TRUE if class constructor .cctor has been initialized successfully, or FALSE otherwise and sets @error.
- * 
+ * \param vtable that neeeds to be initialized
+ * \param error set on error
+ * \returns TRUE if class constructor \c .cctor has been initialized successfully, or FALSE otherwise and sets \p error.
  */
 gboolean
 mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
@@ -355,7 +353,7 @@ mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
        MonoNativeThreadId tid;
        int do_initialization = 0;
        MonoDomain *last_domain = NULL;
-       MonoException * pending_tae = NULL;
+       gboolean pending_tae = FALSE;
 
        error_init (error);
 
@@ -471,7 +469,7 @@ mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
 
                mono_threads_begin_abort_protected_block ();
                mono_runtime_try_invoke (method, NULL, NULL, (MonoObject**) &exc, error);
-               gboolean got_pending_interrupt = mono_threads_end_abort_protected_block ();
+               mono_threads_end_abort_protected_block ();
 
                //exception extracted, error will be set to the right value later
                if (exc == NULL && !mono_error_ok (error))//invoking failed but exc was not set
@@ -519,13 +517,15 @@ mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
                mono_coop_cond_broadcast (&lock->cond);
                mono_type_init_unlock (lock);
 
-               //This can happen if the cctor self-aborts
-               if (exc && mono_object_class (exc) == mono_defaults.threadabortexception_class)
-                       pending_tae = exc;
-
-               //TAEs are blocked around .cctors, they must escape as soon as no cctor is left to run.
-               if (!pending_tae && got_pending_interrupt)
-                       pending_tae = mono_thread_try_resume_interruption ();
+               /*
+                * This can happen if the cctor self-aborts. We need to reactivate tae
+                * (next interruption checkpoint will throw it) and make sure we won't
+                * throw tie for the type.
+                */
+               if (exc && mono_object_class (exc) == mono_defaults.threadabortexception_class) {
+                       pending_tae = TRUE;
+                       mono_thread_resume_interruption (FALSE);
+               }
        } else {
                /* this just blocks until the initializing thread is done */
                mono_type_init_lock (lock);
@@ -546,10 +546,8 @@ mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
                vtable->initialized = 1;
        mono_type_initialization_unlock ();
 
-       //TAE wins over TIE
-       if (pending_tae)
-               mono_error_set_exception_instance (error, pending_tae);
-       else if (vtable->init_failed) {
+       /* If vtable init fails because of TAE, we don't throw TIE, only the TAE */
+       if (vtable->init_failed && !pending_tae) {
                /* Either we were the initializing thread or we waited for the initialization */
                mono_error_set_exception_instance (error, get_type_init_exception_for_vtable (vtable));
                return FALSE;
@@ -638,8 +636,7 @@ mono_set_always_build_imt_trampolines (gboolean value)
 
 /**
  * mono_compile_method:
- * @method: The method to compile.
- *
+ * \param method The method to compile.
  * This JIT-compiles the method, and returns the pointer to the native code
  * produced.
  */
@@ -653,12 +650,11 @@ mono_compile_method (MonoMethod *method)
 }
 
 /**
- * mono_compile_method:
- * @method: The method to compile.
- * @error: set on error.
- *
+ * mono_compile_method_checked:
+ * \param method The method to compile.
+ * \param error set on error.
  * This JIT-compiles the method, and returns the pointer to the native code
- * produced.  On failure returns NULL and sets @error.
+ * produced.  On failure returns NULL and sets \p error.
  */
 gpointer
 mono_compile_method_checked (MonoMethod *method, MonoError *error)
@@ -697,13 +693,11 @@ mono_runtime_create_delegate_trampoline (MonoClass *klass)
 
 /**
  * mono_runtime_free_method:
- * @domain; domain where the method is hosted
- * @method: method to release
- *
+ * \param domain domain where the method is hosted
+ * \param method method to release
  * This routine is invoked to free the resources associated with
  * a method that has been JIT compiled.  This is used to discard
  * methods that were used only temporarily (for example, used in marshalling)
- *
  */
 void
 mono_runtime_free_method (MonoDomain *domain, MonoMethod *method)
@@ -1530,13 +1524,11 @@ build_imt (MonoClass *klass, MonoVTable *vt, MonoDomain *domain, gpointer* imt,
 
 /**
  * mono_vtable_build_imt_slot:
- * @vtable: virtual object table struct
- * @imt_slot: slot in the IMT table
- *
- * Fill the given @imt_slot in the IMT table of @vtable with
+ * \param vtable virtual object table struct
+ * \param imt_slot slot in the IMT table
+ * Fill the given \p imt_slot in the IMT table of \p vtable with
  * a trampoline or a trampoline for the case of collisions.
  * This is part of the internal mono API.
- *
  * LOCKING: Take the domain lock.
  */
 void
@@ -1566,13 +1558,11 @@ mono_vtable_build_imt_slot (MonoVTable* vtable, int imt_slot)
 
 /**
  * mono_method_alloc_generic_virtual_trampoline:
- * @domain: a domain
- * @size: size in bytes
- *
- * Allocs size bytes to be used for the code of a generic virtual
+ * \param domain a domain
+ * \param size size in bytes
+ * Allocs \p size bytes to be used for the code of a generic virtual
  * trampoline.  It's either allocated from the domain's code manager or
  * reused from a previously invalidated piece.
- *
  * LOCKING: The domain lock must be held.
  */
 gpointer
@@ -1645,11 +1635,10 @@ get_generic_virtual_entries (MonoDomain *domain, gpointer *vtable_slot)
 }
 
 /**
- * mono_method_add_generic_virtual_invocation:
- * @domain: a domain
- * @vtable_slot: pointer to the vtable slot
- * @method: the inflated generic virtual method
- * @code: the method's code
+ * \param domain a domain
+ * \param vtable_slot pointer to the vtable slot
+ * \param method the inflated generic virtual method
+ * \param code the method's code
  *
  * Registers a call via unmanaged code to a generic virtual method
  * instantiation or variant interface method.  If the number of calls reaches a threshold
@@ -1748,12 +1737,11 @@ static MonoVTable *mono_class_create_runtime_vtable (MonoDomain *domain, MonoCla
 
 /**
  * mono_class_vtable:
- * @domain: the application domain
- * @class: the class to initialize
- *
+ * \param domain the application domain
+ * \param class the class to initialize
  * VTables are domain specific because we create domain specific code, and 
  * they contain the domain specific static class data.
- * On failure, NULL is returned, and class->exception_type is set.
+ * On failure, NULL is returned, and \c class->exception_type is set.
  */
 MonoVTable *
 mono_class_vtable (MonoDomain *domain, MonoClass *klass)
@@ -1766,10 +1754,9 @@ mono_class_vtable (MonoDomain *domain, MonoClass *klass)
 
 /**
  * mono_class_vtable_full:
- * @domain: the application domain
- * @class: the class to initialize
- * @error set on failure.
- *
+ * \param domain the application domain
+ * \param class the class to initialize
+ * \param error set on failure.
  * VTables are domain specific because we create domain specific code, and 
  * they contain the domain specific static class data.
  */
@@ -1798,10 +1785,9 @@ mono_class_vtable_full (MonoDomain *domain, MonoClass *klass, MonoError *error)
 
 /**
  * mono_class_try_get_vtable:
- * @domain: the application domain
- * @class: the class to initialize
- *
- * This function tries to get the associated vtable from @class if
+ * \param domain the application domain
+ * \param class the class to initialize
+ * This function tries to get the associated vtable from \p class if
  * it was already created.
  */
 MonoVTable *
@@ -2185,16 +2171,15 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
 #ifndef DISABLE_REMOTING
 /**
  * mono_class_proxy_vtable:
- * @domain: the application domain
- * @remove_class: the remote class
- * @error: set on error
- *
+ * \param domain the application domain
+ * \param remove_class the remote class
+ * \param error set on error
  * Creates a vtable for transparent proxies. It is basically
- * a copy of the real vtable of the class wrapped in @remote_class,
+ * a copy of the real vtable of the class wrapped in \p remote_class,
  * but all function pointers invoke the remoting functions, and
- * vtable->klass points to the transparent proxy class, and not to @class.
+ * \c vtable->klass points to the transparent proxy class, and not to \p class.
  *
- * On failure returns NULL and sets @error
+ * On failure returns NULL and sets \p error
  */
 static MonoVTable *
 mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRemotingTarget target_type, MonoError *error)
@@ -2371,8 +2356,7 @@ failure:
 
 /**
  * mono_class_field_is_special_static:
- *
- *   Returns whether @field is a thread/context static field.
+ * \returns whether \p field is a thread/context static field.
  */
 gboolean
 mono_class_field_is_special_static (MonoClassField *field)
@@ -2392,10 +2376,9 @@ mono_class_field_is_special_static (MonoClassField *field)
 
 /**
  * mono_class_field_get_special_static_type:
- * @field: The MonoClassField describing the field.
- *
- * Returns: SPECIAL_STATIC_THREAD if the field is thread static, SPECIAL_STATIC_CONTEXT if it is context static,
- * SPECIAL_STATIC_NONE otherwise.
+ * \param field The \c MonoClassField describing the field.
+ * \returns \c SPECIAL_STATIC_THREAD if the field is thread static, \c SPECIAL_STATIC_CONTEXT if it is context static,
+ * \c SPECIAL_STATIC_NONE otherwise.
  */
 guint32
 mono_class_field_get_special_static_type (MonoClassField *field)
@@ -2413,8 +2396,7 @@ mono_class_field_get_special_static_type (MonoClassField *field)
 
 /**
  * mono_class_has_special_static_fields:
- * 
- *   Returns whenever @klass has any thread/context static fields.
+ * \returns whether \p klass has any thread/context static fields.
  */
 gboolean
 mono_class_has_special_static_fields (MonoClass *klass)
@@ -2508,13 +2490,11 @@ copy_remote_class_key (MonoDomain *domain, gpointer *key)
 
 /**
  * mono_remote_class:
- * @domain: the application domain
- * @class_name: name of the remote class
- * @error: set on error
- *
- * Creates and initializes a MonoRemoteClass object for a remote type. 
- *
- * On failure returns NULL and sets @error
+ * \param domain the application domain
+ * \param class_name name of the remote class
+ * \param error set on error
+ * Creates and initializes a \c MonoRemoteClass object for a remote type. 
+ * On failure returns NULL and sets \p error
  */
 MonoRemoteClass*
 mono_remote_class (MonoDomain *domain, MonoStringHandle class_name, MonoClass *proxy_class, MonoError *error)
@@ -2674,14 +2654,13 @@ mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mon
 
 /**
  * mono_upgrade_remote_class:
- * @domain: the application domain
- * @tproxy: the proxy whose remote class has to be upgraded.
- * @klass: class to which the remote class can be casted.
- * @error: set on error
- *
+ * \param domain the application domain
+ * \param tproxy the proxy whose remote class has to be upgraded.
+ * \param klass class to which the remote class can be casted.
+ * \param error set on error
  * Updates the vtable of the remote class by adding the necessary method slots
  * and interface offsets so it can be safely casted to klass. klass can be a
- * class or an interface.  On success returns TRUE, on failure returns FALSE and sets @error.
+ * class or an interface.  On success returns TRUE, on failure returns FALSE and sets \p error.
  */
 gboolean
 mono_upgrade_remote_class (MonoDomain *domain, MonoObjectHandle proxy_object, MonoClass *klass, MonoError *error)
@@ -2727,11 +2706,10 @@ leave:
 
 /**
  * mono_object_get_virtual_method:
- * @obj: object to operate on.
- * @method: method 
- *
- * Retrieves the MonoMethod that would be called on obj if obj is passed as
- * the instance of a callvirt of method.
+ * \param obj object to operate on.
+ * \param method method 
+ * Retrieves the \c MonoMethod that would be called on \p obj if \p obj is passed as
+ * the instance of a callvirt of \p method.
  */
 MonoMethod*
 mono_object_get_virtual_method (MonoObject *obj_raw, MonoMethod *method)
@@ -2746,12 +2724,11 @@ mono_object_get_virtual_method (MonoObject *obj_raw, MonoMethod *method)
 }
 
 /**
- * mono_object_get_virtual_method:
- * @obj: object to operate on.
- * @method: method 
- *
- * Retrieves the MonoMethod that would be called on obj if obj is passed as
- * the instance of a callvirt of method.
+ * mono_object_handle_get_virtual_method:
+ * \param obj object to operate on.
+ * \param method method 
+ * Retrieves the \c MonoMethod that would be called on \p obj if \p obj is passed as
+ * the instance of a callvirt of \p method.
  */
 MonoMethod*
 mono_object_handle_get_virtual_method (MonoObjectHandle obj, MonoMethod *method, MonoError *error)
@@ -2862,23 +2839,21 @@ do_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **ex
 
 /**
  * mono_runtime_invoke:
- * @method: method to invoke
- * @obJ: object instance
- * @params: arguments to the method
- * @exc: exception information.
- *
- * Invokes the method represented by @method on the object @obj.
- *
- * obj is the 'this' pointer, it should be NULL for static
- * methods, a MonoObject* for object instances and a pointer to
+ * \param method method to invoke
+ * \param obj object instance
+ * \param params arguments to the method
+ * \param exc exception information.
+ * Invokes the method represented by \p method on the object \p obj.
+ * \p obj is the \c this pointer, it should be NULL for static
+ * methods, a \c MonoObject* for object instances and a pointer to
  * the value type for value types.
  *
  * The params array contains the arguments to the method with the
- * same convention: MonoObject* pointers for object instances and
+ * same convention: \c MonoObject* pointers for object instances and
  * pointers to the value type otherwise. 
  * 
  * From unmanaged code you'll usually use the
- * mono_runtime_invoke() variant.
+ * \c mono_runtime_invoke variant.
  *
  * Note that this function doesn't handle virtual methods for
  * you, it will exec the exact method you pass: we still need to
@@ -2886,10 +2861,10 @@ do_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **ex
  * of a virtual method (there are examples of this in the code,
  * though).
  * 
- * You can pass NULL as the exc argument if you don't want to
- * catch exceptions, otherwise, *exc will be set to the exception
+ * You can pass NULL as the \p exc argument if you don't want to
+ * catch exceptions, otherwise, \c *exc will be set to the exception
  * thrown, if any.  if an exception is thrown, you can't use the
- * MonoObject* result from the function.
+ * \c MonoObject* result from the function.
  * 
  * If the method returns a value type, it is boxed in an object
  * reference.
@@ -2914,20 +2889,19 @@ mono_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **
 
 /**
  * mono_runtime_try_invoke:
- * @method: method to invoke
- * @obJ: object instance
- * @params: arguments to the method
- * @exc: exception information.
- * @error: set on error
- *
- * Invokes the method represented by @method on the object @obj.
- *
- * obj is the 'this' pointer, it should be NULL for static
- * methods, a MonoObject* for object instances and a pointer to
+ * \param method method to invoke
+ * \param obj object instance
+ * \param params arguments to the method
+ * \param exc exception information.
+ * \param error set on error
+ * Invokes the method represented by \p method on the object \p obj.
+ *
+ * \p obj is the \c this pointer, it should be NULL for static
+ * methods, a \c MonoObject* for object instances and a pointer to
  * the value type for value types.
  *
  * The params array contains the arguments to the method with the
- * same convention: MonoObject* pointers for object instances and
+ * same convention: \c MonoObject* pointers for object instances and
  * pointers to the value type otherwise. 
  * 
  * From unmanaged code you'll usually use the
@@ -2939,12 +2913,12 @@ mono_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **
  * of a virtual method (there are examples of this in the code,
  * though).
  * 
- * For this function, you must not pass NULL as the exc argument if
+ * For this function, you must not pass NULL as the \p exc argument if
  * you don't want to catch exceptions, use
  * mono_runtime_invoke_checked().  If an exception is thrown, you
- * can't use the MonoObject* result from the function.
+ * can't use the \c MonoObject* result from the function.
  * 
- * If this method cannot be invoked, @error will be set and @exc and
+ * If this method cannot be invoked, \p error will be set and \p exc and
  * the return value must not be used.
  *
  * If the method returns a value type, it is boxed in an object
@@ -2965,19 +2939,18 @@ mono_runtime_try_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
 
 /**
  * mono_runtime_invoke_checked:
- * @method: method to invoke
- * @obJ: object instance
- * @params: arguments to the method
- * @error: set on error
- *
- * Invokes the method represented by @method on the object @obj.
- *
- * obj is the 'this' pointer, it should be NULL for static
- * methods, a MonoObject* for object instances and a pointer to
+ * \param method method to invoke
+ * \param obj object instance
+ * \param params arguments to the method
+ * \param error set on error
+ * Invokes the method represented by \p method on the object \p obj.
+ *
+ * \p obj is the \c this pointer, it should be NULL for static
+ * methods, a \c MonoObject* for object instances and a pointer to
  * the value type for value types.
  *
- * The params array contains the arguments to the method with the
- * same convention: MonoObject* pointers for object instances and
+ * The \p params array contains the arguments to the method with the
+ * same convention: \c MonoObject* pointers for object instances and
  * pointers to the value type otherwise. 
  * 
  * From unmanaged code you'll usually use the
@@ -2989,12 +2962,12 @@ mono_runtime_try_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
  * of a virtual method (there are examples of this in the code,
  * though).
  * 
- * If an exception is thrown, you can't use the MonoObject* result
+ * If an exception is thrown, you can't use the \c MonoObject* result
  * from the function.
  * 
- * If this method cannot be invoked, @error will be set.  If the
+ * If this method cannot be invoked, \p error will be set.  If the
  * method throws an exception (and we're in coop mode) the exception
- * will be set in @error.
+ * will be set in \p error.
  *
  * If the method returns a value type, it is boxed in an object
  * reference.
@@ -3012,50 +2985,57 @@ mono_runtime_invoke_checked (MonoMethod *method, void *obj, void **params, MonoE
 
 /**
  * mono_method_get_unmanaged_thunk:
- * @method: method to generate a thunk for.
+ * \param method method to generate a thunk for.
  *
- * Returns an unmanaged->managed thunk that can be used to call
+ * Returns an \c unmanaged->managed thunk that can be used to call
  * a managed method directly from C.
  *
  * The thunk's C signature closely matches the managed signature:
  *
- * C#: public bool Equals (object obj);
- * C:  typedef MonoBoolean (*Equals)(MonoObject*,
- *             MonoObject*, MonoException**);
+ * C#: <code>public bool Equals (object obj);</code>
  *
- * The 1st ("this") parameter must not be used with static methods:
+ * C:  <code>typedef MonoBoolean (*Equals)(MonoObject*, MonoObject*, MonoException**);</code>
  *
- * C#: public static bool ReferenceEquals (object a, object b);
- * C:  typedef MonoBoolean (*ReferenceEquals)(MonoObject*, MonoObject*,
- *             MonoException**);
+ * The 1st (<code>this</code>) parameter must not be used with static methods:
  *
- * The last argument must be a non-null pointer of a MonoException* pointer.
- * It has "out" semantics. After invoking the thunk, *ex will be NULL if no
+ * C#: <code>public static bool ReferenceEquals (object a, object b);</code>
+ *
+ * C:  <code>typedef MonoBoolean (*ReferenceEquals)(MonoObject*, MonoObject*, MonoException**);</code>
+ *
+ * The last argument must be a non-null \c MonoException* pointer.
+ * It has "out" semantics. After invoking the thunk, \c *ex will be NULL if no
  * exception has been thrown in managed code. Otherwise it will point
- * to the MonoException* caught by the thunk. In this case, the result of
+ * to the \c MonoException* caught by the thunk. In this case, the result of
  * the thunk is undefined:
  *
+ * <pre>
  * MonoMethod *method = ... // MonoMethod* of System.Object.Equals
+ *
  * MonoException *ex = NULL;
+ *
  * Equals func = mono_method_get_unmanaged_thunk (method);
+ *
  * MonoBoolean res = func (thisObj, objToCompare, &ex);
+ *
  * if (ex) {
+ *
  *    // handle exception
+ *
  * }
+ * </pre>
  *
  * The calling convention of the thunk matches the platform's default
  * convention. This means that under Windows, C declarations must
- * contain the __stdcall attribute:
+ * contain the \c __stdcall attribute:
  *
- * C:  typedef MonoBoolean (__stdcall *Equals)(MonoObject*,
- *             MonoObject*, MonoException**);
+ * C: <code>typedef MonoBoolean (__stdcall *Equals)(MonoObject*, MonoObject*, MonoException**);</code>
  *
  * LIMITATIONS
  *
  * Value type arguments and return values are treated as they were objects:
  *
- * C#: public static Rectangle Intersect (Rectangle a, Rectangle b);
- * C:  typedef MonoObject* (*Intersect)(MonoObject*, MonoObject*, MonoException**);
+ * C#: <code>public static Rectangle Intersect (Rectangle a, Rectangle b);</code>
+ * C:  <code>typedef MonoObject* (*Intersect)(MonoObject*, MonoObject*, MonoException**);</code>
  *
  * Arguments must be properly boxed upon trunk's invocation, while return
  * values must be unboxed.
@@ -3177,15 +3157,15 @@ handle_enum:
 
 /**
  * mono_field_set_value:
- * @obj: Instance object
- * @field: MonoClassField describing the field to set
- * @value: The value to be set
+ * \param obj Instance object
+ * \param field \c MonoClassField describing the field to set
+ * \param value The value to be set
  *
- * Sets the value of the field described by @field in the object instance @obj
- * to the value passed in @value.   This method should only be used for instance
- * fields.   For static fields, use mono_field_static_set_value.
+ * Sets the value of the field described by \p field in the object instance \p obj
+ * to the value passed in \p value.   This method should only be used for instance
+ * fields.   For static fields, use \c mono_field_static_set_value.
  *
- * The value must be on the native format of the field type. 
+ * The value must be in the native format of the field type. 
  */
 void
 mono_field_set_value (MonoObject *obj, MonoClassField *field, void *value)
@@ -3202,13 +3182,11 @@ mono_field_set_value (MonoObject *obj, MonoClassField *field, void *value)
 
 /**
  * mono_field_static_set_value:
- * @field: MonoClassField describing the field to set
- * @value: The value to be set
- *
- * Sets the value of the static field described by @field
- * to the value passed in @value.
- *
- * The value must be on the native format of the field type. 
+ * \param field \c MonoClassField describing the field to set
+ * \param value The value to be set
+ * Sets the value of the static field described by \p field
+ * to the value passed in \p value.
+ * The value must be in the native format of the field type. 
  */
 void
 mono_field_static_set_value (MonoVTable *vt, MonoClassField *field, void *value)
@@ -3280,20 +3258,23 @@ mono_field_get_addr (MonoObject *obj, MonoVTable *vt, MonoClassField *field)
 
 /**
  * mono_field_get_value:
- * @obj: Object instance
- * @field: MonoClassField describing the field to fetch information from
- * @value: pointer to the location where the value will be stored
- *
- * Use this routine to get the value of the field @field in the object
+ * \param obj Object instance
+ * \param field \c MonoClassField describing the field to fetch information from
+ * \param value pointer to the location where the value will be stored
+ * Use this routine to get the value of the field \p field in the object
  * passed.
  *
  * The pointer provided by value must be of the field type, for reference
- * types this is a MonoObject*, for value types its the actual pointer to
+ * types this is a \c MonoObject*, for value types its the actual pointer to
  * the value type.
  *
  * For example:
- *     int i;
- *     mono_field_get_value (obj, int_field, &i);
+ *
+ * <pre>
+ * int i;
+ *
+ * mono_field_get_value (obj, int_field, &i);
+ * </pre>
  */
 void
 mono_field_get_value (MonoObject *obj, MonoClassField *field, void *value)
@@ -3312,13 +3293,11 @@ mono_field_get_value (MonoObject *obj, MonoClassField *field, void *value)
 
 /**
  * mono_field_get_value_object:
- * @domain: domain where the object will be created (if boxing)
- * @field: MonoClassField describing the field to fetch information from
- * @obj: The object instance for the field.
- *
- * Returns: a new MonoObject with the value from the given field.  If the
+ * \param domain domain where the object will be created (if boxing)
+ * \param field \c MonoClassField describing the field to fetch information from
+ * \param obj The object instance for the field.
+ * \returns a new \c MonoObject with the value from the given field.  If the
  * field represents a value type, the value is boxed.
- *
  */
 MonoObject *
 mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObject *obj)
@@ -3331,14 +3310,12 @@ mono_field_get_value_object (MonoDomain *domain, MonoClassField *field, MonoObje
 
 /**
  * mono_field_get_value_object_checked:
- * @domain: domain where the object will be created (if boxing)
- * @field: MonoClassField describing the field to fetch information from
- * @obj: The object instance for the field.
- * @error: Set on error.
- *
- * Returns: a new MonoObject with the value from the given field.  If the
- * field represents a value type, the value is boxed.  On error returns NULL and sets @error.
- *
+ * \param domain domain where the object will be created (if boxing)
+ * \param field \c MonoClassField describing the field to fetch information from
+ * \param obj The object instance for the field.
+ * \param error Set on error.
+ * \returns a new \c MonoObject with the value from the given field.  If the
+ * field represents a value type, the value is boxed.  On error returns NULL and sets \p error.
  */
 MonoObject *
 mono_field_get_value_object_checked (MonoDomain *domain, MonoClassField *field, MonoObject *obj, MonoError *error)
@@ -3575,19 +3552,22 @@ mono_field_static_get_value_for_thread (MonoInternalThread *thread, MonoVTable *
 
 /**
  * mono_field_static_get_value:
- * @vt: vtable to the object
- * @field: MonoClassField describing the field to fetch information from
- * @value: where the value is returned
- *
- * Use this routine to get the value of the static field @field value.
+ * \param vt vtable to the object
+ * \param field \c MonoClassField describing the field to fetch information from
+ * \param value where the value is returned
+ * Use this routine to get the value of the static field \p field value.
  *
  * The pointer provided by value must be of the field type, for reference
- * types this is a MonoObject*, for value types its the actual pointer to
+ * types this is a \c MonoObject*, for value types its the actual pointer to
  * the value type.
  *
  * For example:
+ *
+ * <pre>
  *     int i;
+ *
  *     mono_field_static_get_value (vt, int_field, &i);
+ * </pre>
  */
 void
 mono_field_static_get_value (MonoVTable *vt, MonoClassField *field, void *value)
@@ -3601,15 +3581,14 @@ mono_field_static_get_value (MonoVTable *vt, MonoClassField *field, void *value)
 
 /**
  * mono_field_static_get_value_checked:
- * @vt: vtable to the object
- * @field: MonoClassField describing the field to fetch information from
- * @value: where the value is returned
- * @error: set on error
- *
- * Use this routine to get the value of the static field @field value.
+ * \param vt vtable to the object
+ * \param field \c MonoClassField describing the field to fetch information from
+ * \param value where the value is returned
+ * \param error set on error
+ * Use this routine to get the value of the static field \p field value.
  *
  * The pointer provided by value must be of the field type, for reference
- * types this is a MonoObject*, for value types its the actual pointer to
+ * types this is a \c MonoObject*, for value types its the actual pointer to
  * the value type.
  *
  * For example:
@@ -3617,7 +3596,7 @@ mono_field_static_get_value (MonoVTable *vt, MonoClassField *field, void *value)
  *     mono_field_static_get_value_checked (vt, int_field, &i, error);
  *     if (!is_ok (error)) { ... }
  *
- * On failure sets @error.
+ * On failure sets \p error.
  */
 void
 mono_field_static_get_value_checked (MonoVTable *vt, MonoClassField *field, void *value, MonoError *error)
@@ -3629,18 +3608,17 @@ mono_field_static_get_value_checked (MonoVTable *vt, MonoClassField *field, void
 
 /**
  * mono_property_set_value:
- * @prop: MonoProperty to set
- * @obj: instance object on which to act
- * @params: parameters to pass to the propery
- * @exc: optional exception
- *
+ * \param prop MonoProperty to set
+ * \param obj instance object on which to act
+ * \param params parameters to pass to the propery
+ * \param exc optional exception
  * Invokes the property's set method with the given arguments on the
  * object instance obj (or NULL for static properties). 
  * 
  * You can pass NULL as the exc argument if you don't want to
- * catch exceptions, otherwise, *exc will be set to the exception
+ * catch exceptions, otherwise, \c *exc will be set to the exception
  * thrown, if any.  if an exception is thrown, you can't use the
- * MonoObject* result from the function.
+ * \c MonoObject* result from the function.
  */
 void
 mono_property_set_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc)
@@ -3658,16 +3636,14 @@ mono_property_set_value (MonoProperty *prop, void *obj, void **params, MonoObjec
 
 /**
  * mono_property_set_value_checked:
- * @prop: MonoProperty to set
- * @obj: instance object on which to act
- * @params: parameters to pass to the propery
- * @error: set on error
- *
+ * \param prop \c MonoProperty to set
+ * \param obj instance object on which to act
+ * \param params parameters to pass to the propery
+ * \param error set on error
  * Invokes the property's set method with the given arguments on the
- * object instance obj (or NULL for static properties). 
- * 
- * Returns: TRUE on success.  On failure returns FALSE and sets @error.
- * If an exception is thrown, it will be caught and returned via @error.
+ * object instance \p obj (or NULL for static properties). 
+ * \returns TRUE on success.  On failure returns FALSE and sets \p error.
+ * If an exception is thrown, it will be caught and returned via \p error.
  */
 gboolean
 mono_property_set_value_checked (MonoProperty *prop, void *obj, void **params, MonoError *error)
@@ -3685,20 +3661,19 @@ mono_property_set_value_checked (MonoProperty *prop, void *obj, void **params, M
 
 /**
  * mono_property_get_value:
- * @prop: MonoProperty to fetch
- * @obj: instance object on which to act
- * @params: parameters to pass to the propery
- * @exc: optional exception
- *
- * Invokes the property's get method with the given arguments on the
- * object instance obj (or NULL for static properties). 
+ * \param prop \c MonoProperty to fetch
+ * \param obj instance object on which to act
+ * \param params parameters to pass to the propery
+ * \param exc optional exception
+ * Invokes the property's \c get method with the given arguments on the
+ * object instance \p obj (or NULL for static properties). 
  * 
- * You can pass NULL as the exc argument if you don't want to
- * catch exceptions, otherwise, *exc will be set to the exception
+ * You can pass NULL as the \p exc argument if you don't want to
+ * catch exceptions, otherwise, \c *exc will be set to the exception
  * thrown, if any.  if an exception is thrown, you can't use the
- * MonoObject* result from the function.
+ * \c MonoObject* result from the function.
  *
- * Returns: the value from invoking the get method on the property.
+ * \returns the value from invoking the \c get method on the property.
  */
 MonoObject*
 mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObject **exc)
@@ -3718,19 +3693,18 @@ mono_property_get_value (MonoProperty *prop, void *obj, void **params, MonoObjec
 
 /**
  * mono_property_get_value_checked:
- * @prop: MonoProperty to fetch
- * @obj: instance object on which to act
- * @params: parameters to pass to the propery
- * @error: set on error
- *
- * Invokes the property's get method with the given arguments on the
+ * \param prop \c MonoProperty to fetch
+ * \param obj instance object on which to act
+ * \param params parameters to pass to the propery
+ * \param error set on error
+ * Invokes the property's \c get method with the given arguments on the
  * object instance obj (or NULL for static properties). 
  * 
  * If an exception is thrown, you can't use the
- * MonoObject* result from the function.  The exception will be propagated via @error.
+ * \c MonoObject* result from the function.  The exception will be propagated via \p error.
  *
- * Returns: the value from invoking the get method on the property. On
- * failure returns NULL and sets @error.
+ * \returns the value from invoking the get method on the property. On
+ * failure returns NULL and sets \p error.
  */
 MonoObject*
 mono_property_get_value_checked (MonoProperty *prop, void *obj, void **params, MonoError *error)
@@ -3787,12 +3761,12 @@ mono_nullable_init (guint8 *buf, MonoObject *value, MonoClass *klass)
 
 /**
  * mono_nullable_box:
- * @buf: The buffer representing the data to be boxed
- * @klass: the type to box it as.
- * @error: set on oerr
+ * \param buf The buffer representing the data to be boxed
+ * \param klass the type to box it as.
+ * \param error set on error
  *
- * Creates a boxed vtype or NULL from the Nullable structure pointed to by
- * @buf.  On failure returns NULL and sets @error
+ * Creates a boxed vtype or NULL from the \c Nullable structure pointed to by
+ * \p buf.  On failure returns NULL and sets \p error.
  */
 MonoObject*
 mono_nullable_box (guint8 *buf, MonoClass *klass, MonoError *error)
@@ -3823,9 +3797,8 @@ mono_nullable_box (guint8 *buf, MonoClass *klass, MonoError *error)
 
 /**
  * mono_get_delegate_invoke:
- * @klass: The delegate class
- *
- * Returns: the MonoMethod for the "Invoke" method in the delegate klass or NULL if @klass is a broken delegate type
+ * \param klass The delegate class
+ * \returns the \c MonoMethod for the \c Invoke method in the delegate class or NULL if \p klass is a broken delegate type
  */
 MonoMethod *
 mono_get_delegate_invoke (MonoClass *klass)
@@ -3844,9 +3817,8 @@ mono_get_delegate_invoke (MonoClass *klass)
 
 /**
  * mono_get_delegate_begin_invoke:
- * @klass: The delegate class
- *
- * Returns: the MonoMethod for the "BeginInvoke" method in the delegate klass or NULL if @klass is a broken delegate type
+ * \param klass The delegate class
+ * \returns the \c MonoMethod for the \c BeginInvoke method in the delegate class or NULL if \p klass is a broken delegate type
  */
 MonoMethod *
 mono_get_delegate_begin_invoke (MonoClass *klass)
@@ -3865,9 +3837,8 @@ mono_get_delegate_begin_invoke (MonoClass *klass)
 
 /**
  * mono_get_delegate_end_invoke:
- * @klass: The delegate class
- *
- * Returns: the MonoMethod for the "EndInvoke" method in the delegate klass or NULL if @klass is a broken delegate type
+ * \param klass The delegate class
+ * \returns the \c MonoMethod for the \c EndInvoke method in the delegate class or NULL if \p klass is a broken delegate type
  */
 MonoMethod *
 mono_get_delegate_end_invoke (MonoClass *klass)
@@ -3886,16 +3857,16 @@ mono_get_delegate_end_invoke (MonoClass *klass)
 
 /**
  * mono_runtime_delegate_invoke:
- * @delegate: pointer to a delegate object.
- * @params: parameters for the delegate.
- * @exc: Pointer to the exception result.
+ * \param delegate pointer to a delegate object.
+ * \param params parameters for the delegate.
+ * \param exc Pointer to the exception result.
  *
- * Invokes the delegate method @delegate with the parameters provided.
+ * Invokes the delegate method \p delegate with the parameters provided.
  *
- * You can pass NULL as the exc argument if you don't want to
- * catch exceptions, otherwise, *exc will be set to the exception
+ * You can pass NULL as the \p exc argument if you don't want to
+ * catch exceptions, otherwise, \c *exc will be set to the exception
  * thrown, if any.  if an exception is thrown, you can't use the
- * MonoObject* result from the function.
+ * \c MonoObject* result from the function.
  */
 MonoObject*
 mono_runtime_delegate_invoke (MonoObject *delegate, void **params, MonoObject **exc)
@@ -3922,18 +3893,17 @@ mono_runtime_delegate_invoke (MonoObject *delegate, void **params, MonoObject **
 
 /**
  * mono_runtime_delegate_try_invoke:
- * @delegate: pointer to a delegate object.
- * @params: parameters for the delegate.
- * @exc: Pointer to the exception result.
- * @error: set on error
- *
- * Invokes the delegate method @delegate with the parameters provided.
- *
- * You can pass NULL as the exc argument if you don't want to
- * catch exceptions, otherwise, *exc will be set to the exception
- * thrown, if any.  On failure to execute, @error will be set.
+ * \param delegate pointer to a delegate object.
+ * \param params parameters for the delegate.
+ * \param exc Pointer to the exception result.
+ * \param error set on error
+ * Invokes the delegate method \p delegate with the parameters provided.
+ *
+ * You can pass NULL as the \p exc argument if you don't want to
+ * catch exceptions, otherwise, \c *exc will be set to the exception
+ * thrown, if any.  On failure to execute, \p error will be set.
  * if an exception is thrown, you can't use the
- * MonoObject* result from the function.
+ * \c MonoObject* result from the function.
  */
 MonoObject*
 mono_runtime_delegate_try_invoke (MonoObject *delegate, void **params, MonoObject **exc, MonoError *error)
@@ -3960,13 +3930,11 @@ mono_runtime_delegate_try_invoke (MonoObject *delegate, void **params, MonoObjec
 
 /**
  * mono_runtime_delegate_invoke_checked:
- * @delegate: pointer to a delegate object.
- * @params: parameters for the delegate.
- * @error: set on error
- *
- * Invokes the delegate method @delegate with the parameters provided.
- *
- * On failure @error will be set and you can't use the MonoObject*
+ * \param delegate pointer to a delegate object.
+ * \param params parameters for the delegate.
+ * \param error set on error
+ * Invokes the delegate method \p delegate with the parameters provided.
+ * On failure \p error will be set and you can't use the \c MonoObject*
  * result from the function.
  */
 MonoObject*
@@ -3981,8 +3949,7 @@ static int num_main_args = 0;
 
 /**
  * mono_runtime_get_main_args:
- *
- * Returns: a MonoArray with the arguments passed to the main program
+ * \returns A \c MonoArray with the arguments passed to the main program
  */
 MonoArray*
 mono_runtime_get_main_args (void)
@@ -3995,11 +3962,10 @@ mono_runtime_get_main_args (void)
 }
 
 /**
- * mono_runtime_get_main_args:
- * @error: set on error
- *
- * Returns: a MonoArray with the arguments passed to the main
- * program. On failure returns NULL and sets @error.
+ * mono_runtime_get_main_args_checked:
+ * \param error set on error
+ * \returns a \c MonoArray with the arguments passed to the main
+ * program. On failure returns NULL and sets \p error.
  */
 MonoArray*
 mono_runtime_get_main_args_checked (MonoError *error)
@@ -4035,11 +4001,10 @@ free_main_args (void)
 
 /**
  * mono_runtime_set_main_args:
- * @argc: number of arguments from the command line
- * @argv: array of strings from the command line
- *
+ * \param argc number of arguments from the command line
+ * \param argv array of strings from the command line
  * Set the command line arguments from an embedding application that doesn't otherwise call
- * mono_runtime_run_main ().
+ * \c mono_runtime_run_main.
  */
 int
 mono_runtime_set_main_args (int argc, char* argv[])
@@ -4171,16 +4136,13 @@ prepare_run_main (MonoMethod *method, int argc, char *argv[])
 
 /**
  * mono_runtime_run_main:
- * @method: the method to start the application with (usually Main)
- * @argc: number of arguments from the command line
- * @argv: array of strings from the command line
- * @exc: excetption results
- *
- * Execute a standard Main() method (argc/argv contains the
+ * \param method the method to start the application with (usually <code>Main</code>)
+ * \param argc number of arguments from the command line
+ * \param argv array of strings from the command line
+ * \param exc excetption results
+ * Execute a standard \c Main method (\p argc / \p argv contains the
  * executable name). This method also sets the command line argument value
- * needed by System.Environment.
- *
- * 
+ * needed by \c System.Environment.
  */
 int
 mono_runtime_run_main (MonoMethod *method, int argc, char* argv[],
@@ -4202,16 +4164,14 @@ mono_runtime_run_main (MonoMethod *method, int argc, char* argv[],
 
 /**
  * mono_runtime_run_main_checked:
- * @method: the method to start the application with (usually Main)
- * @argc: number of arguments from the command line
- * @argv: array of strings from the command line
- * @error: set on error
+ * \param method the method to start the application with (usually \c Main)
+ * \param argc number of arguments from the command line
+ * \param argv array of strings from the command line
+ * \param error set on error
  *
- * Execute a standard Main() method (argc/argv contains the
+ * Execute a standard \c Main method (\p argc / \p argv contains the
  * executable name). This method also sets the command line argument value
- * needed by System.Environment.  On failure sets @error.
- *
- * 
+ * needed by \c System.Environment.  On failure sets \p error.
  */
 int
 mono_runtime_run_main_checked (MonoMethod *method, int argc, char* argv[],
@@ -4224,18 +4184,15 @@ mono_runtime_run_main_checked (MonoMethod *method, int argc, char* argv[],
 
 /**
  * mono_runtime_try_run_main:
- * @method: the method to start the application with (usually Main)
- * @argc: number of arguments from the command line
- * @argv: array of strings from the command line
- * @exc: set if Main throws an exception
- * @error: set if Main can't be executed
- *
- * Execute a standard Main() method (argc/argv contains the executable
+ * \param method the method to start the application with (usually \c Main)
+ * \param argc number of arguments from the command line
+ * \param argv array of strings from the command line
+ * \param exc set if \c Main throws an exception
+ * \param error set if \c Main can't be executed
+ * Execute a standard \c Main method (\p argc / \p argv contains the executable
  * name). This method also sets the command line argument value needed
- * by System.Environment.  On failure sets @error if Main can't be
- * executed or @exc if it threw and exception.
- *
- * 
+ * by \c System.Environment.  On failure sets \p error if Main can't be
+ * executed or \p exc if it threw an exception.
  */
 int
 mono_runtime_try_run_main (MonoMethod *method, int argc, char* argv[],
@@ -4358,17 +4315,15 @@ make_transparent_proxy (MonoObject *obj, MonoError *error)
 
 /**
  * mono_object_xdomain_representation
- * @obj: an object
- * @target_domain: a domain
- * @error: set on error.
- *
- * Creates a representation of obj in the domain target_domain.  This
- * is either a copy of obj arrived through via serialization and
+ * \param obj an object
+ * \param target_domain a domain
+ * \param error set on error.
+ * Creates a representation of obj in the domain \p target_domain.  This
+ * is either a copy of \p obj arrived through via serialization and
  * deserialization or a proxy, depending on whether the object is
- * serializable or marshal by ref.  obj must not be in target_domain.
- *
- * If the object cannot be represented in target_domain, NULL is
- * returned and @error is set appropriately.
+ * serializable or marshal by ref.  \p obj must not be in \p target_domain.
+ * If the object cannot be represented in \p target_domain, NULL is
+ * returned and \p error is set appropriately.
  */
 MonoObject*
 mono_object_xdomain_representation (MonoObject *obj, MonoDomain *target_domain, MonoError *error)
@@ -4499,10 +4454,8 @@ static MonoRuntimeUnhandledExceptionPolicy runtime_unhandled_exception_policy =
 
 /**
  * mono_runtime_unhandled_exception_policy_set:
- * @policy: the new policy
- * 
+ * \param policy the new policy
  * This is a VM internal routine.
- *
  * Sets the runtime policy for handling unhandled exceptions.
  */
 void
@@ -4524,14 +4477,13 @@ mono_runtime_unhandled_exception_policy_get (void) {
 
 /**
  * mono_unhandled_exception:
- * @exc: exception thrown
- *
+ * \param exc exception thrown
  * This is a VM internal routine.
  *
  * We call this function when we detect an unhandled exception
  * in the default domain.
  *
- * It invokes the * UnhandledException event in AppDomain or prints
+ * It invokes the \c UnhandledException event in \c AppDomain or prints
  * a warning to the console 
  */
 void
@@ -4582,19 +4534,18 @@ mono_unhandled_exception (MonoObject *exc)
 
 /**
  * mono_runtime_exec_managed_code:
- * @domain: Application domain
- * @main_func: function to invoke from the execution thread
- * @main_args: parameter to the main_func
- *
+ * \param domain Application domain
+ * \param main_func function to invoke from the execution thread
+ * \param main_args parameter to the main_func
  * Launch a new thread to execute a function
  *
- * main_func is called back from the thread with main_args as the
- * parameter.  The callback function is expected to start Main()
+ * \p main_func is called back from the thread with main_args as the
+ * parameter.  The callback function is expected to start \c Main
  * eventually.  This function then waits for all managed threads to
  * finish.
- * It is not necesseray anymore to execute managed code in a subthread,
+ * It is not necessary anymore to execute managed code in a subthread,
  * so this function should not be used anymore by default: just
- * execute the code and then call mono_thread_manage ().
+ * execute the code and then call mono_thread_manage().
  */
 void
 mono_runtime_exec_managed_code (MonoDomain *domain,
@@ -4830,10 +4781,12 @@ invoke_array_extract_argument (MonoArray *params, int i, MonoType *t, gboolean*
                                                *has_byref_nullables = TRUE;
                                } else {
                                        /* MS seems to create the objects if a null is passed in */
+                                       gboolean was_null = FALSE;
                                        if (!mono_array_get (params, MonoObject*, i)) {
                                                MonoObject *o = mono_object_new_checked (mono_domain_get (), mono_class_from_mono_type (t_orig), error);
                                                return_val_if_nok (error, NULL);
                                                mono_array_setref (params, i, o); 
+                                               was_null = TRUE;
                                        }
 
                                        if (t->byref) {
@@ -4851,6 +4804,8 @@ invoke_array_extract_argument (MonoArray *params, int i, MonoType *t, gboolean*
                                        }
                                                
                                        result = mono_object_unbox (mono_array_get (params, MonoObject*, i));
+                                       if (!t->byref && was_null)
+                                               mono_array_setref (params, i, NULL);
                                }
                                break;
                        case MONO_TYPE_STRING:
@@ -4890,22 +4845,21 @@ invoke_array_extract_argument (MonoArray *params, int i, MonoType *t, gboolean*
 }
 /**
  * mono_runtime_invoke_array:
- * @method: method to invoke
- * @obJ: object instance
- * @params: arguments to the method
- * @exc: exception information.
- *
- * Invokes the method represented by @method on the object @obj.
- *
- * obj is the 'this' pointer, it should be NULL for static
- * methods, a MonoObject* for object instances and a pointer to
+ * \param method method to invoke
+ * \param obj object instance
+ * \param params arguments to the method
+ * \param exc exception information.
+ * Invokes the method represented by \p method on the object \p obj.
+ *
+ * \p obj is the \c this pointer, it should be NULL for static
+ * methods, a \c MonoObject* for object instances and a pointer to
  * the value type for value types.
  *
- * The params array contains the arguments to the method with the
- * same convention: MonoObject* pointers for object instances and
- * pointers to the value type otherwise. The _invoke_array
- * variant takes a C# object[] as the params argument (MonoArray
- * *params): in this case the value types are boxed inside the
+ * The \p params array contains the arguments to the method with the
+ * same convention: \c MonoObject* pointers for object instances and
+ * pointers to the value type otherwise. The \c _invoke_array
+ * variant takes a C# \c object[] as the params argument (\c MonoArray*):
+ * in this case the value types are boxed inside the
  * respective reference representation.
  * 
  * From unmanaged code you'll usually use the
@@ -4917,10 +4871,10 @@ invoke_array_extract_argument (MonoArray *params, int i, MonoType *t, gboolean*
  * of a virtual method (there are examples of this in the code,
  * though).
  * 
- * You can pass NULL as the exc argument if you don't want to
- * catch exceptions, otherwise, *exc will be set to the exception
+ * You can pass NULL as the \p exc argument if you don't want to
+ * catch exceptions, otherwise, \c *exc will be set to the exception
  * thrown, if any.  if an exception is thrown, you can't use the
- * MonoObject* result from the function.
+ * \c MonoObject* result from the function.
  * 
  * If the method returns a value type, it is boxed in an object
  * reference.
@@ -4949,22 +4903,21 @@ mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
 
 /**
  * mono_runtime_invoke_array_checked:
- * @method: method to invoke
- * @obJ: object instance
- * @params: arguments to the method
- * @error: set on failure.
- *
- * Invokes the method represented by @method on the object @obj.
- *
- * obj is the 'this' pointer, it should be NULL for static
- * methods, a MonoObject* for object instances and a pointer to
+ * \param method method to invoke
+ * \param obj object instance
+ * \param params arguments to the method
+ * \param error set on failure.
+ * Invokes the method represented by \p method on the object \p obj.
+ *
+ * \p obj is the \c this pointer, it should be NULL for static
+ * methods, a \c MonoObject* for object instances and a pointer to
  * the value type for value types.
  *
- * The params array contains the arguments to the method with the
- * same convention: MonoObject* pointers for object instances and
- * pointers to the value type otherwise. The _invoke_array
- * variant takes a C# object[] as the params argument (MonoArray
- * *params): in this case the value types are boxed inside the
+ * The \p params array contains the arguments to the method with the
+ * same convention: \c MonoObject* pointers for object instances and
+ * pointers to the value type otherwise. The \c _invoke_array
+ * variant takes a C# \c object[] as the \p params argument (\c MonoArray*):
+ * in this case the value types are boxed inside the
  * respective reference representation.
  *
  * From unmanaged code you'll usually use the
@@ -4976,8 +4929,8 @@ mono_runtime_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
  * of a virtual method (there are examples of this in the code,
  * though).
  *
- * On failure or exception, @error will be set. In that case, you
- * can't use the MonoObject* result from the function.
+ * On failure or exception, \p error will be set. In that case, you
+ * can't use the \c MonoObject* result from the function.
  *
  * If the method returns a value type, it is boxed in an object
  * reference.
@@ -4992,23 +4945,22 @@ mono_runtime_invoke_array_checked (MonoMethod *method, void *obj, MonoArray *par
 
 /**
  * mono_runtime_try_invoke_array:
- * @method: method to invoke
- * @obJ: object instance
- * @params: arguments to the method
- * @exc: exception information.
- * @error: set on failure.
- *
- * Invokes the method represented by @method on the object @obj.
- *
- * obj is the 'this' pointer, it should be NULL for static
- * methods, a MonoObject* for object instances and a pointer to
+ * \param method method to invoke
+ * \param obj object instance
+ * \param params arguments to the method
+ * \param exc exception information.
+ * \param error set on failure.
+ * Invokes the method represented by \p method on the object \p obj.
+ *
+ * \p obj is the \c this pointer, it should be NULL for static
+ * methods, a \c MonoObject* for object instances and a pointer to
  * the value type for value types.
  *
- * The params array contains the arguments to the method with the
- * same convention: MonoObject* pointers for object instances and
- * pointers to the value type otherwise. The _invoke_array
- * variant takes a C# object[] as the params argument (MonoArray
- * *params): in this case the value types are boxed inside the
+ * The \p params array contains the arguments to the method with the
+ * same convention: \c MonoObject* pointers for object instances and
+ * pointers to the value type otherwise. The \c _invoke_array
+ * variant takes a C# \c object[] as the params argument (\c MonoArray*):
+ * in this case the value types are boxed inside the
  * respective reference representation.
  *
  * From unmanaged code you'll usually use the
@@ -5020,10 +4972,10 @@ mono_runtime_invoke_array_checked (MonoMethod *method, void *obj, MonoArray *par
  * of a virtual method (there are examples of this in the code,
  * though).
  *
- * You can pass NULL as the exc argument if you don't want to catch
- * exceptions, otherwise, *exc will be set to the exception thrown, if
- * any.  On other failures, @error will be set. If an exception is
- * thrown or there's an error, you can't use the MonoObject* result
+ * You can pass NULL as the \p exc argument if you don't want to catch
+ * exceptions, otherwise, \c *exc will be set to the exception thrown, if
+ * any.  On other failures, \p error will be set. If an exception is
+ * thrown or there's an error, you can't use the \c MonoObject* result
  * from the function.
  *
  * If the method returns a value type, it is boxed in an object
@@ -5157,10 +5109,9 @@ mono_runtime_try_invoke_array (MonoMethod *method, void *obj, MonoArray *params,
 
 /**
  * mono_object_new:
- * @klass: the class of the object that we want to create
- *
- * Returns: a newly created object whose definition is
- * looked up using @klass.   This will not invoke any constructors, 
+ * \param klass the class of the object that we want to create
+ * \returns a newly created object whose definition is
+ * looked up using \p klass.   This will not invoke any constructors, 
  * so the consumer of this routine has to invoke any constructors on
  * its own to initialize the object.
  * 
@@ -5194,15 +5145,14 @@ ves_icall_object_new (MonoDomain *domain, MonoClass *klass)
 
 /**
  * mono_object_new_checked:
- * @klass: the class of the object that we want to create
- * @error: set on error
- *
- * Returns: a newly created object whose definition is
- * looked up using @klass.   This will not invoke any constructors,
+ * \param klass the class of the object that we want to create
+ * \param error set on error
+ * \returns a newly created object whose definition is
+ * looked up using \p klass.   This will not invoke any constructors,
  * so the consumer of this routine has to invoke any constructors on
  * its own to initialize the object.
  *
- * It returns NULL on failure and sets @error.
+ * It returns NULL on failure and sets \p error.
  */
 MonoObject *
 mono_object_new_checked (MonoDomain *domain, MonoClass *klass, MonoError *error)
@@ -5248,10 +5198,9 @@ mono_object_new_pinned (MonoDomain *domain, MonoClass *klass, MonoError *error)
 
 /**
  * mono_object_new_specific:
- * @vtable: the vtable of the object that we want to create
- *
- * Returns: A newly created object with class and domain specified
- * by @vtable
+ * \param vtable the vtable of the object that we want to create
+ * \returns A newly created object with class and domain specified
+ * by \p vtable
  */
 MonoObject *
 mono_object_new_specific (MonoVTable *vtable)
@@ -5319,17 +5268,16 @@ ves_icall_object_new_specific (MonoVTable *vtable)
 
 /**
  * mono_object_new_alloc_specific:
- * @vtable: virtual table for the object.
- *
- * This function allocates a new `MonoObject` with the type derived
- * from the @vtable information.   If the class of this object has a 
+ * \param vtable virtual table for the object.
+ * This function allocates a new \c MonoObject with the type derived
+ * from the \p vtable information.   If the class of this object has a 
  * finalizer, then the object will be tracked for finalization.
  *
  * This method might raise an exception on errors.  Use the
- * `mono_object_new_fast_checked` method if you want to manually raise
+ * \c mono_object_new_fast_checked method if you want to manually raise
  * the exception.
  *
- * Returns: the allocated object.   
+ * \returns the allocated object.   
  */
 MonoObject *
 mono_object_new_alloc_specific (MonoVTable *vtable)
@@ -5343,19 +5291,18 @@ mono_object_new_alloc_specific (MonoVTable *vtable)
 
 /**
  * mono_object_new_alloc_specific_checked:
- * @vtable: virtual table for the object.
- * @error: holds the error return value.  
+ * \param vtable virtual table for the object.
+ * \param error holds the error return value.  
  *
- * This function allocates a new `MonoObject` with the type derived
- * from the @vtable information. If the class of this object has a 
+ * This function allocates a new \c MonoObject with the type derived
+ * from the \p vtable information. If the class of this object has a 
  * finalizer, then the object will be tracked for finalization.
  *
- * If there is not enough memory, the @error parameter will be set
+ * If there is not enough memory, the \p error parameter will be set
  * and will contain a user-visible message with the amount of bytes
  * that were requested.
  *
- * Returns: the allocated object, or NULL if there is not enough memory
- *
+ * \returns the allocated object, or NULL if there is not enough memory
  */
 MonoObject *
 mono_object_new_alloc_specific_checked (MonoVTable *vtable, MonoError *error)
@@ -5378,18 +5325,18 @@ mono_object_new_alloc_specific_checked (MonoVTable *vtable, MonoError *error)
 
 /**
  * mono_object_new_fast:
- * @vtable: virtual table for the object.
+ * \param vtable virtual table for the object.
  *
- * This function allocates a new `MonoObject` with the type derived
- * from the @vtable information.   The returned object is not tracked
+ * This function allocates a new \c MonoObject with the type derived
+ * from the \p vtable information.   The returned object is not tracked
  * for finalization.   If your object implements a finalizer, you should
- * use `mono_object_new_alloc_specific` instead.
+ * use \c mono_object_new_alloc_specific instead.
  *
  * This method might raise an exception on errors.  Use the
- * `mono_object_new_fast_checked` method if you want to manually raise
+ * \c mono_object_new_fast_checked method if you want to manually raise
  * the exception.
  *
- * Returns: the allocated object.   
+ * \returns the allocated object.   
  */
 MonoObject*
 mono_object_new_fast (MonoVTable *vtable)
@@ -5403,20 +5350,19 @@ mono_object_new_fast (MonoVTable *vtable)
 
 /**
  * mono_object_new_fast_checked:
- * @vtable: virtual table for the object.
- * @error: holds the error return value.
+ * \param vtable virtual table for the object.
+ * \param error holds the error return value.
  *
- * This function allocates a new `MonoObject` with the type derived
- * from the @vtable information. The returned object is not tracked
+ * This function allocates a new \c MonoObject with the type derived
+ * from the \p vtable information. The returned object is not tracked
  * for finalization.   If your object implements a finalizer, you should
- * use `mono_object_new_alloc_specific_checked` instead.
+ * use \c mono_object_new_alloc_specific_checked instead.
  *
- * If there is not enough memory, the @error parameter will be set
+ * If there is not enough memory, the \p error parameter will be set
  * and will contain a user-visible message with the amount of bytes
  * that were requested.
  *
- * Returns: the allocated object, or NULL if there is not enough memory
- *
+ * \returns the allocated object, or NULL if there is not enough memory
  */
 MonoObject*
 mono_object_new_fast_checked (MonoVTable *vtable, MonoError *error)
@@ -5466,13 +5412,11 @@ mono_object_new_mature (MonoVTable *vtable, MonoError *error)
 
 /**
  * mono_class_get_allocation_ftn:
- * @vtable: vtable
- * @for_box: the object will be used for boxing
- * @pass_size_in_words: 
- *
- * Return the allocation function appropriate for the given class.
+ * \param vtable vtable
+ * \param for_box the object will be used for boxing
+ * \param pass_size_in_words Unused
+ * \returns the allocation function appropriate for the given class.
  */
-
 void*
 mono_class_get_allocation_ftn (MonoVTable *vtable, gboolean for_box, gboolean *pass_size_in_words)
 {
@@ -5506,11 +5450,10 @@ mono_class_get_allocation_ftn (MonoVTable *vtable, gboolean for_box, gboolean *p
 
 /**
  * mono_object_new_from_token:
- * @image: Context where the type_token is hosted
- * @token: a token of the type that we want to create
- *
- * Returns: A newly created object whose definition is
- * looked up using @token in the @image image
+ * \param image Context where the type_token is hosted
+ * \param token a token of the type that we want to create
+ * \returns A newly created object whose definition is
+ * looked up using \p token in the \p image image
  */
 MonoObject *
 mono_object_new_from_token  (MonoDomain *domain, MonoImage *image, guint32 token)
@@ -5534,9 +5477,8 @@ mono_object_new_from_token  (MonoDomain *domain, MonoImage *image, guint32 token
 
 /**
  * mono_object_clone:
- * @obj: the object to clone
- *
- * Returns: A newly created object who is a shallow copy of @obj
+ * \param obj the object to clone
+ * \returns A newly created object who is a shallow copy of \p obj
  */
 MonoObject *
 mono_object_clone (MonoObject *obj)
@@ -5580,9 +5522,8 @@ mono_object_clone_checked (MonoObject *obj, MonoError *error)
 
 /**
  * mono_array_full_copy:
- * @src: source array to copy
- * @dest: destination array
- *
+ * \param src source array to copy
+ * \param dest destination array
  * Copies the content of one array to another with exactly the same type and size.
  */
 void
@@ -5621,12 +5562,11 @@ array_full_copy_unchecked_size (MonoArray *src, MonoArray *dest, MonoClass *klas
 
 /**
  * mono_array_clone_in_domain:
- * @domain: the domain in which the array will be cloned into
- * @array: the array to clone
- * @error: set on error
- *
+ * \param domain the domain in which the array will be cloned into
+ * \param array the array to clone
+ * \param error set on error
  * This routine returns a copy of the array that is hosted on the
- * specified MonoDomain.  On failure returns NULL and sets @error.
+ * specified \c MonoDomain.  On failure returns NULL and sets \p error.
  */
 MonoArrayHandle
 mono_array_clone_in_domain (MonoDomain *domain, MonoArrayHandle array_handle, MonoError *error)
@@ -5677,9 +5617,8 @@ leave:
 
 /**
  * mono_array_clone:
- * @array: the array to clone
- *
- * Returns: A newly created array who is a shallow copy of @array
+ * \param array the array to clone
+ * \returns A newly created array who is a shallow copy of \p array
  */
 MonoArray*
 mono_array_clone (MonoArray *array)
@@ -5694,11 +5633,10 @@ mono_array_clone (MonoArray *array)
 
 /**
  * mono_array_clone_checked:
- * @array: the array to clone
- * @error: set on error
- *
- * Returns: A newly created array who is a shallow copy of @array.  On
- * failure returns NULL and sets @error.
+ * \param array the array to clone
+ * \param error set on error
+ * \returns A newly created array who is a shallow copy of \p array.  On
+ * failure returns NULL and sets \p error.
  */
 MonoArray*
 mono_array_clone_checked (MonoArray *array_raw, MonoError *error)
@@ -5753,12 +5691,11 @@ mono_array_calc_byte_len (MonoClass *klass, uintptr_t len, uintptr_t *res)
 
 /**
  * mono_array_new_full:
- * @domain: domain where the object is created
- * @array_class: array class
- * @lengths: lengths for each dimension in the array
- * @lower_bounds: lower bounds for each dimension in the array (may be NULL)
- *
- * This routine creates a new array objects with the given dimensions,
+ * \param domain domain where the object is created
+ * \param array_class array class
+ * \param lengths lengths for each dimension in the array
+ * \param lower_bounds lower bounds for each dimension in the array (may be NULL)
+ * This routine creates a new array object with the given dimensions,
  * lower bounds and type.
  */
 MonoArray*
@@ -5866,11 +5803,10 @@ mono_array_new_full_checked (MonoDomain *domain, MonoClass *array_class, uintptr
 
 /**
  * mono_array_new:
- * @domain: domain where the object is created
- * @eclass: element class
- * @n: number of array elements
- *
- * This routine creates a new szarray with @n elements of type @eclass.
+ * \param domain domain where the object is created
+ * \param eclass element class
+ * \param n number of array elements
+ * This routine creates a new szarray with \p n elements of type \p eclass.
  */
 MonoArray *
 mono_array_new (MonoDomain *domain, MonoClass *eclass, uintptr_t n)
@@ -5885,13 +5821,12 @@ mono_array_new (MonoDomain *domain, MonoClass *eclass, uintptr_t n)
 
 /**
  * mono_array_new_checked:
- * @domain: domain where the object is created
- * @eclass: element class
- * @n: number of array elements
- * @error: set on error
- *
- * This routine creates a new szarray with @n elements of type @eclass.
- * On failure returns NULL and sets @error.
+ * \param domain domain where the object is created
+ * \param eclass element class
+ * \param n number of array elements
+ * \param error set on error
+ * This routine creates a new szarray with \p n elements of type \p eclass.
+ * On failure returns NULL and sets \p error.
  */
 MonoArray *
 mono_array_new_checked (MonoDomain *domain, MonoClass *eclass, uintptr_t n, MonoError *error)
@@ -5921,10 +5856,9 @@ ves_icall_array_new (MonoDomain *domain, MonoClass *eclass, uintptr_t n)
 
 /**
  * mono_array_new_specific:
- * @vtable: a vtable in the appropriate domain for an initialized class
- * @n: number of array elements
- *
- * This routine is a fast alternative to mono_array_new() for code which
+ * \param vtable a vtable in the appropriate domain for an initialized class
+ * \param n number of array elements
+ * This routine is a fast alternative to \c mono_array_new for code which
  * can be sure about the domain it operates in.
  */
 MonoArray *
@@ -6003,10 +5937,9 @@ mono_string_empty (MonoDomain *domain)
 
 /**
  * mono_string_new_utf16:
- * @text: a pointer to an utf16 string
- * @len: the length of the string
- *
- * Returns: A newly created string object which contains @text.
+ * \param text a pointer to an utf16 string
+ * \param len the length of the string
+ * \returns A newly created string object which contains \p text.
  */
 MonoString *
 mono_string_new_utf16 (MonoDomain *domain, const guint16 *text, gint32 len)
@@ -6023,12 +5956,11 @@ mono_string_new_utf16 (MonoDomain *domain, const guint16 *text, gint32 len)
 
 /**
  * mono_string_new_utf16_checked:
- * @text: a pointer to an utf16 string
- * @len: the length of the string
- * @error: written on error.
- *
- * Returns: A newly created string object which contains @text.
- * On error, returns NULL and sets @error.
+ * \param text a pointer to an utf16 string
+ * \param len the length of the string
+ * \param error written on error.
+ * \returns A newly created string object which contains \p text.
+ * On error, returns NULL and sets \p error.
  */
 MonoString *
 mono_string_new_utf16_checked (MonoDomain *domain, const guint16 *text, gint32 len, MonoError *error)
@@ -6048,12 +5980,11 @@ mono_string_new_utf16_checked (MonoDomain *domain, const guint16 *text, gint32 l
 
 /**
  * mono_string_new_utf16_handle:
- * @text: a pointer to an utf16 string
- * @len: the length of the string
- * @error: written on error.
- *
- * Returns: A newly created string object which contains @text.
- * On error, returns NULL and sets @error.
+ * \param text a pointer to an utf16 string
+ * \param len the length of the string
+ * \param error written on error.
+ * \returns A newly created string object which contains \p text.
+ * On error, returns NULL and sets \p error.
  */
 MonoStringHandle
 mono_string_new_utf16_handle (MonoDomain *domain, const guint16 *text, gint32 len, MonoError *error)
@@ -6062,12 +5993,11 @@ mono_string_new_utf16_handle (MonoDomain *domain, const guint16 *text, gint32 le
 }
 
 /**
- * mono_string_new_utf32:
- * @text: a pointer to an utf32 string
- * @len: the length of the string
- * @error: set on failure.
- *
- * Returns: A newly created string object which contains @text. On failure returns NULL and sets @error.
+ * mono_string_new_utf32_checked:
+ * \param text a pointer to an utf32 string
+ * \param len the length of the string
+ * \param error set on failure.
+ * \returns A newly created string object which contains \p text. On failure returns NULL and sets \p error.
  */
 static MonoString *
 mono_string_new_utf32_checked (MonoDomain *domain, const mono_unichar4 *text, gint32 len, MonoError *error)
@@ -6100,10 +6030,9 @@ mono_string_new_utf32_checked (MonoDomain *domain, const mono_unichar4 *text, gi
 
 /**
  * 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.
+ * \param text a pointer to a UTF-32 string
+ * \param len the length of the string
+ * \returns A newly created string object which contains \p text.
  */
 MonoString *
 mono_string_new_utf32 (MonoDomain *domain, const mono_unichar4 *text, gint32 len)
@@ -6116,10 +6045,9 @@ mono_string_new_utf32 (MonoDomain *domain, const mono_unichar4 *text, gint32 len
 
 /**
  * mono_string_new_size:
- * @text: a pointer to an utf16 string
- * @len: the length of the string
- *
- * Returns: A newly created string object of @len
+ * \param text a pointer to a UTF-16 string
+ * \param len the length of the string
+ * \returns A newly created string object of \p len
  */
 MonoString *
 mono_string_new_size (MonoDomain *domain, gint32 len)
@@ -6166,10 +6094,9 @@ mono_string_new_size_checked (MonoDomain *domain, gint32 len, MonoError *error)
 
 /**
  * mono_string_new_len:
- * @text: a pointer to an utf8 string
- * @length: number of bytes in @text to consider
- *
- * Returns: A newly created string object which contains @text.
+ * \param text a pointer to an utf8 string
+ * \param length number of bytes in \p text to consider
+ * \returns A newly created string object which contains \p text.
  */
 MonoString*
 mono_string_new_len (MonoDomain *domain, const char *text, guint length)
@@ -6184,12 +6111,11 @@ mono_string_new_len (MonoDomain *domain, const char *text, guint length)
 
 /**
  * mono_string_new_len_checked:
- * @text: a pointer to an utf8 string
- * @length: number of bytes in @text to consider
- * @error: set on error
- *
- * Returns: A newly created string object which contains @text. On
- * failure returns NULL and sets @error.
+ * \param text a pointer to an utf8 string
+ * \param length number of bytes in \p text to consider
+ * \param error set on error
+ * \returns A newly created string object which contains \p text. On
+ * failure returns NULL and sets \p error.
  */
 MonoString*
 mono_string_new_len_checked (MonoDomain *domain, const char *text, guint length, MonoError *error)
@@ -6217,13 +6143,10 @@ mono_string_new_len_checked (MonoDomain *domain, const char *text, guint length,
 
 /**
  * mono_string_new:
- * @text: a pointer to an utf8 string
- *
- * Returns: A newly created string object which contains @text.
- *
+ * \param text a pointer to a UTF-8 string
+ * \deprecated Use \c mono_string_new_checked in new code.
  * This function asserts if it cannot allocate a new string.
- *
- * @deprecated Use mono_string_new_checked in new code.
+ * \returns A newly created string object which contains \p text.
  */
 MonoString*
 mono_string_new (MonoDomain *domain, const char *text)
@@ -6237,11 +6160,10 @@ mono_string_new (MonoDomain *domain, const char *text)
 
 /**
  * mono_string_new_checked:
- * @text: a pointer to an utf8 string
- * @merror: set on error
- *
- * Returns: A newly created string object which contains @text.
- * On error returns NULL and sets @merror.
+ * \param text a pointer to an utf8 string
+ * \param merror set on error
+ * \returns A newly created string object which contains \p text.
+ * On error returns NULL and sets \p merror.
  */
 MonoString*
 mono_string_new_checked (MonoDomain *domain, const char *text, MonoError *error)
@@ -6297,9 +6219,8 @@ leave:
 
 /**
  * mono_string_new_wrapper:
- * @text: pointer to utf8 characters.
- *
- * Helper function to create a string object from @text in the current domain.
+ * \param text pointer to UTF-8 characters.
+ * Helper function to create a string object from \p text in the current domain.
  */
 MonoString*
 mono_string_new_wrapper (const char *text)
@@ -6316,10 +6237,9 @@ mono_string_new_wrapper (const char *text)
 
 /**
  * mono_value_box:
- * @class: the class of the value
- * @value: a pointer to the unboxed data
- *
- * Returns: A newly created object which contains @value.
+ * \param class the class of the value
+ * \param value a pointer to the unboxed data
+ * \returns A newly created object which contains \p value.
  */
 MonoObject *
 mono_value_box (MonoDomain *domain, MonoClass *klass, gpointer value)
@@ -6332,13 +6252,12 @@ mono_value_box (MonoDomain *domain, MonoClass *klass, gpointer value)
 
 /**
  * mono_value_box_checked:
- * @domain: the domain of the new object
- * @class: the class of the value
- * @value: a pointer to the unboxed data
- * @error: set on error
- *
- * Returns: A newly created object which contains @value. On failure
- * returns NULL and sets @error.
+ * \param domain the domain of the new object
+ * \param class the class of the value
+ * \param value a pointer to the unboxed data
+ * \param error set on error
+ * \returns A newly created object which contains \p value. On failure
+ * returns NULL and sets \p error.
  */
 MonoObject *
 mono_value_box_checked (MonoDomain *domain, MonoClass *klass, gpointer value, MonoError *error)
@@ -6397,12 +6316,11 @@ mono_value_box_checked (MonoDomain *domain, MonoClass *klass, gpointer value, Mo
 
 /**
  * mono_value_copy:
- * @dest: destination pointer
- * @src: source pointer
- * @klass: a valuetype class
- *
- * Copy a valuetype from @src to @dest. This function must be used
- * when @klass contains references fields.
+ * \param dest destination pointer
+ * \param src source pointer
+ * \param klass a valuetype class
+ * Copy a valuetype from \p src to \p dest. This function must be used
+ * when \p klass contains reference fields.
  */
 void
 mono_value_copy (gpointer dest, gpointer src, MonoClass *klass)
@@ -6414,13 +6332,12 @@ mono_value_copy (gpointer dest, gpointer src, MonoClass *klass)
 
 /**
  * mono_value_copy_array:
- * @dest: destination array
- * @dest_idx: index in the @dest array
- * @src: source pointer
- * @count: number of items
- *
- * Copy @count valuetype items from @src to the array @dest at index @dest_idx. 
- * This function must be used when @klass contains references fields.
+ * \param dest destination array
+ * \param dest_idx index in the \p dest array
+ * \param src source pointer
+ * \param count number of items
+ * Copy \p count valuetype items from \p src to the array \p dest at index \p dest_idx. 
+ * This function must be used when \p klass contains references fields.
  * Overlap is handled.
  */
 void
@@ -6436,9 +6353,8 @@ mono_value_copy_array (MonoArray *dest, int dest_idx, gpointer src, int count)
 
 /**
  * mono_object_get_domain:
- * @obj: object to query
- * 
- * Returns: the MonoDomain where the object is hosted
+ * \param obj object to query
+ * \returns the \c MonoDomain where the object is hosted
  */
 MonoDomain*
 mono_object_get_domain (MonoObject *obj)
@@ -6450,11 +6366,9 @@ mono_object_get_domain (MonoObject *obj)
 
 /**
  * mono_object_get_class:
- * @obj: object to query
- *
- * Use this function to obtain the `MonoClass*` for a given `MonoObject`.
- *
- * Returns: the MonoClass of the object.
+ * \param obj object to query
+ * Use this function to obtain the \c MonoClass* for a given \c MonoObject.
+ * \returns the \c MonoClass of the object.
  */
 MonoClass*
 mono_object_get_class (MonoObject *obj)
@@ -6465,9 +6379,8 @@ mono_object_get_class (MonoObject *obj)
 }
 /**
  * mono_object_get_size:
- * @o: object to query
- * 
- * Returns: the size, in bytes, of @o
+ * \param o object to query
+ * \returns the size, in bytes, of \p o
  */
 guint
 mono_object_get_size (MonoObject* o)
@@ -6493,9 +6406,8 @@ mono_object_get_size (MonoObject* o)
 
 /**
  * mono_object_unbox:
- * @obj: object to unbox
- * 
- * Returns: a pointer to the start of the valuetype boxed in this
+ * \param obj object to unbox
+ * \returns a pointer to the start of the valuetype boxed in this
  * object.
  *
  * This method will assert if the object passed is not a valuetype.
@@ -6512,10 +6424,9 @@ mono_object_unbox (MonoObject *obj)
 
 /**
  * mono_object_isinst:
- * @obj: an object
- * @klass: a pointer to a class 
- *
- * Returns: @obj if @obj is derived from @klass or NULL otherwise.
+ * \param obj an object
+ * \param klass a pointer to a class 
+ * \returns \p obj if \p obj is derived from \p klass or NULL otherwise.
  */
 MonoObject *
 mono_object_isinst (MonoObject *obj_raw, MonoClass *klass)
@@ -6533,12 +6444,11 @@ mono_object_isinst (MonoObject *obj_raw, MonoClass *klass)
 
 /**
  * mono_object_isinst_checked:
- * @obj: an object
- * @klass: a pointer to a class 
- * @error: set on error
- *
- * Returns: @obj if @obj is derived from @klass or NULL if it isn't.
- * On failure returns NULL and sets @error.
+ * \param obj an object
+ * \param klass a pointer to a class 
+ * \param error set on error
+ * \returns \p obj if \p obj is derived from \p klass or NULL if it isn't.
+ * On failure returns NULL and sets \p error.
  */
 MonoObject *
 mono_object_isinst_checked (MonoObject *obj_raw, MonoClass *klass, MonoError *error)
@@ -6554,12 +6464,11 @@ mono_object_isinst_checked (MonoObject *obj_raw, MonoClass *klass, MonoError *er
 
 /**
  * mono_object_handle_isinst:
- * @obj: an object
- * @klass: a pointer to a class 
- * @error: set on error
- *
- * Returns: @obj if @obj is derived from @klass or NULL if it isn't.
- * On failure returns NULL and sets @error.
+ * \param obj an object
+ * \param klass a pointer to a class 
+ * \param error set on error
+ * \returns \p obj if \p obj is derived from \p klass or NULL if it isn't.
+ * On failure returns NULL and sets \p error.
  */
 MonoObjectHandle
 mono_object_handle_isinst (MonoObjectHandle obj, MonoClass *klass, MonoError *error)
@@ -6580,6 +6489,9 @@ mono_object_handle_isinst (MonoObjectHandle obj, MonoClass *klass, MonoError *er
        return result;
 }
 
+/**
+ * mono_object_isinst_mbyref:
+ */
 MonoObject *
 mono_object_isinst_mbyref (MonoObject *obj_raw, MonoClass *klass)
 {
@@ -6666,7 +6578,7 @@ mono_object_handle_isinst_mbyref (MonoObjectHandle obj, MonoClass *klass, MonoEr
 
                pa [0] = MONO_HANDLE_RAW (reftype);
                pa [1] = MONO_HANDLE_RAW (obj);
-               MonoObject *res = mono_runtime_invoke_checked (im, rp, pa, error);
+               MonoObject *res = mono_runtime_invoke_checked (im, MONO_HANDLE_RAW (rp), pa, error);
                if (!is_ok (error))
                        goto leave;
 
@@ -6685,10 +6597,9 @@ leave:
 
 /**
  * mono_object_castclass_mbyref:
- * @obj: an object
- * @klass: a pointer to a class 
- *
- * Returns: @obj if @obj is derived from @klass, returns NULL otherwise.
+ * \param obj an object
+ * \param klass a pointer to a class 
+ * \returns \p obj if \p obj is derived from \p klass, returns NULL otherwise.
  */
 MonoObject *
 mono_object_castclass_mbyref (MonoObject *obj_raw, MonoClass *klass)
@@ -6804,9 +6715,8 @@ mono_string_is_interned_lookup (MonoString *str, int insert, MonoError *error)
 
 /**
  * mono_string_is_interned:
- * @o: String to probe
- *
- * Returns whether the string has been interned.
+ * \param o String to probe
+ * \returns Whether the string has been interned.
  */
 MonoString*
 mono_string_is_interned (MonoString *o)
@@ -6820,10 +6730,9 @@ mono_string_is_interned (MonoString *o)
 
 /**
  * mono_string_intern:
- * @o: String to intern
- *
+ * \param o String to intern
  * Interns the string passed.  
- * Returns: The interned string.
+ * \returns The interned string.
  */
 MonoString*
 mono_string_intern (MonoString *str)
@@ -6836,11 +6745,10 @@ mono_string_intern (MonoString *str)
 
 /**
  * mono_string_intern_checked:
- * @o: String to intern
- * @error: set on error.
- *
+ * \param o String to intern
+ * \param error set on error.
  * Interns the string passed.
- * Returns: The interned string.  On failure returns NULL and sets @error
+ * \returns The interned string.  On failure returns NULL and sets \p error
  */
 MonoString*
 mono_string_intern_checked (MonoString *str, MonoError *error)
@@ -6854,12 +6762,11 @@ mono_string_intern_checked (MonoString *str, MonoError *error)
 
 /**
  * mono_ldstr:
- * @domain: the domain where the string will be used.
- * @image: a metadata context
- * @idx: index into the user string table.
- * 
- * Implementation for the ldstr opcode.
- * Returns: a loaded string from the @image/@idx combination.
+ * \param domain the domain where the string will be used.
+ * \param image a metadata context
+ * \param idx index into the user string table.
+ * Implementation for the \c ldstr opcode.
+ * \returns a loaded string from the \p image / \p idx combination.
  */
 MonoString*
 mono_ldstr (MonoDomain *domain, MonoImage *image, guint32 idx)
@@ -6872,14 +6779,13 @@ mono_ldstr (MonoDomain *domain, MonoImage *image, guint32 idx)
 
 /**
  * mono_ldstr_checked:
- * @domain: the domain where the string will be used.
- * @image: a metadata context
- * @idx: index into the user string table.
- * @error: set on error.
- * 
- * Implementation for the ldstr opcode.
- * Returns: a loaded string from the @image/@idx combination.
- * On failure returns NULL and sets @error.
+ * \param domain the domain where the string will be used.
+ * \param image a metadata context
+ * \param idx index into the user string table.
+ * \param error set on error.
+ * Implementation for the \c ldstr opcode.
+ * \returns A loaded string from the \p image / \p idx combination.
+ * On failure returns NULL and sets \p error.
  */
 MonoString*
 mono_ldstr_checked (MonoDomain *domain, MonoImage *image, guint32 idx, MonoError *error)
@@ -6900,12 +6806,11 @@ mono_ldstr_checked (MonoDomain *domain, MonoImage *image, guint32 idx, MonoError
 
 /**
  * mono_ldstr_metadata_sig
- * @domain: the domain for the string
- * @sig: the signature of a metadata string
- * @error: set on error
- *
- * Returns: a MonoString for a string stored in the metadata. On
- * failure returns NULL and sets @error.
+ * \param domain the domain for the string
+ * \param sig the signature of a metadata string
+ * \param error set on error
+ * \returns a \c MonoString for a string stored in the metadata. On
+ * failure returns NULL and sets \p error.
  */
 static MonoString*
 mono_ldstr_metadata_sig (MonoDomain *domain, const char* sig, MonoError *error)
@@ -6996,12 +6901,10 @@ mono_ldstr_utf8 (MonoImage *image, guint32 idx, MonoError *error)
 
 /**
  * mono_string_to_utf8:
- * @s: a System.String
- *
- * Returns the UTF8 representation for @s.
- * The resulting buffer needs to be freed with mono_free().
- *
- * @deprecated Use mono_string_to_utf8_checked to avoid having an exception arbritraly raised.
+ * \param s a \c System.String
+ * \deprecated Use \c mono_string_to_utf8_checked to avoid having an exception arbitrarily raised.
+ * \returns the UTF-8 representation for \p s.
+ * The resulting buffer needs to be freed with \c mono_free().
  */
 char *
 mono_string_to_utf8 (MonoString *s)
@@ -7020,12 +6923,11 @@ mono_string_to_utf8 (MonoString *s)
 
 /**
  * mono_string_to_utf8_checked:
- * @s: a System.String
- * @error: a MonoError.
- * 
- * Converts a MonoString to its UTF8 representation. May fail; check 
- * @error to determine whether the conversion was successful.
- * The resulting buffer should be freed with mono_free().
+ * \param s a \c System.String
+ * \param error a \c MonoError.
+ * Converts a \c MonoString to its UTF-8 representation. May fail; check 
+ * \p error to determine whether the conversion was successful.
+ * The resulting buffer should be freed with \c mono_free().
  */
 char *
 mono_string_to_utf8_checked (MonoString *s, MonoError *error)
@@ -7070,12 +6972,10 @@ mono_string_handle_to_utf8 (MonoStringHandle s, MonoError *error)
 
 /**
  * mono_string_to_utf8_ignore:
- * @s: a MonoString
- *
- * Converts a MonoString to its UTF8 representation. Will ignore
+ * \param s a MonoString
+ * Converts a \c MonoString to its UTF-8 representation. Will ignore
  * invalid surrogate pairs.
- * The resulting buffer should be freed with mono_free().
- * 
+ * The resulting buffer should be freed with \c mono_free().
  */
 char *
 mono_string_to_utf8_ignore (MonoString *s)
@@ -7107,9 +7007,8 @@ mono_string_to_utf8_ignore (MonoString *s)
 
 /**
  * mono_string_to_utf8_image_ignore:
- * @s: a System.String
- *
- * Same as mono_string_to_utf8_ignore, but allocate the string from the image mempool.
+ * \param s a \c System.String
+ * Same as \c mono_string_to_utf8_ignore, but allocate the string from the image mempool.
  */
 char *
 mono_string_to_utf8_image_ignore (MonoImage *image, MonoString *s)
@@ -7121,9 +7020,8 @@ mono_string_to_utf8_image_ignore (MonoImage *image, MonoString *s)
 
 /**
  * mono_string_to_utf8_mp_ignore:
- * @s: a System.String
- *
- * Same as mono_string_to_utf8_ignore, but allocate the string from a mempool.
+ * \param s a \c System.String
+ * Same as \c mono_string_to_utf8_ignore, but allocate the string from a mempool.
  */
 char *
 mono_string_to_utf8_mp_ignore (MonoMemPool *mp, MonoString *s)
@@ -7136,12 +7034,11 @@ mono_string_to_utf8_mp_ignore (MonoMemPool *mp, MonoString *s)
 
 /**
  * mono_string_to_utf16:
- * @s: a MonoString
- *
- * Return an null-terminated array of the utf-16 chars
- * contained in @s. The result must be freed with g_free().
+ * \param s a \c MonoString
+ * \returns a null-terminated array of the UTF-16 chars
+ * contained in \p s. The result must be freed with \c g_free().
  * This is a temporary helper until our string implementation
- * is reworked to always include the null terminating char.
+ * is reworked to always include the null-terminating char.
  */
 mono_unichar2*
 mono_string_to_utf16 (MonoString *s)
@@ -7167,10 +7064,9 @@ 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().
+ * \param s a \c MonoString
+ * \returns a null-terminated array of the UTF-32 (UCS-4) chars
+ * contained in \p s. The result must be freed with \c g_free().
  */
 mono_unichar4*
 mono_string_to_utf32 (MonoString *s)
@@ -7194,11 +7090,9 @@ mono_string_to_utf32 (MonoString *s)
 
 /**
  * mono_string_from_utf16:
- * @data: the UTF16 string (LPWSTR) to convert
- *
- * Converts a NULL terminated UTF16 string (LPWSTR) to a MonoString.
- *
- * Returns: a MonoString.
+ * \param data the UTF-16 string (LPWSTR) to convert
+ * Converts a NULL-terminated UTF-16 string (LPWSTR) to a \c MonoString.
+ * \returns a \c MonoString.
  */
 MonoString *
 mono_string_from_utf16 (gunichar2 *data)
@@ -7211,12 +7105,10 @@ mono_string_from_utf16 (gunichar2 *data)
 
 /**
  * mono_string_from_utf16_checked:
- * @data: the UTF16 string (LPWSTR) to convert
- * @error: set on error
- *
- * Converts a NULL terminated UTF16 string (LPWSTR) to a MonoString.
- *
- * Returns: a MonoString. On failure sets @error and returns NULL.
+ * \param data the UTF-16 string (LPWSTR) to convert
+ * \param error set on error
+ * Converts a NULL-terminated UTF-16 string (LPWSTR) to a \c MonoString.
+ * \returns a \c MonoString. On failure sets \p error and returns NULL.
  */
 MonoString *
 mono_string_from_utf16_checked (gunichar2 *data, MonoError *error)
@@ -7238,11 +7130,9 @@ mono_string_from_utf16_checked (gunichar2 *data, MonoError *error)
 
 /**
  * mono_string_from_utf32:
- * @data: the UTF32 string (LPWSTR) to convert
- *
- * Converts a UTF32 (UCS-4)to a MonoString.
- *
- * Returns: a MonoString.
+ * \param data the UTF-32 string (LPWSTR) to convert
+ * Converts a UTF-32 (UCS-4) string to a \c MonoString.
+ * \returns a \c MonoString.
  */
 MonoString *
 mono_string_from_utf32 (mono_unichar4 *data)
@@ -7255,12 +7145,10 @@ mono_string_from_utf32 (mono_unichar4 *data)
 
 /**
  * mono_string_from_utf32_checked:
- * @data: the UTF32 string (LPWSTR) to convert
- * @error: set on error
- *
- * Converts a UTF32 (UCS-4)to a MonoString.
- *
- * Returns: a MonoString. On failure returns NULL and sets @error.
+ * \param data the UTF-32 string (LPWSTR) to convert
+ * \param error set on error
+ * Converts a UTF-32 (UCS-4) string to a \c MonoString.
+ * \returns a \c MonoString. On failure returns NULL and sets \p error.
  */
 MonoString *
 mono_string_from_utf32_checked (mono_unichar4 *data, MonoError *error)
@@ -7324,9 +7212,8 @@ mono_string_to_utf8_internal (MonoMemPool *mp, MonoImage *image, MonoString *s,
 
 /**
  * mono_string_to_utf8_image:
- * @s: a System.String
- *
- * Same as mono_string_to_utf8, but allocate the string from the image mempool.
+ * \param s a \c System.String
+ * Same as \c mono_string_to_utf8, but allocate the string from the image mempool.
  */
 char *
 mono_string_to_utf8_image (MonoImage *image, MonoStringHandle s, MonoError *error)
@@ -7338,9 +7225,8 @@ mono_string_to_utf8_image (MonoImage *image, MonoStringHandle s, MonoError *erro
 
 /**
  * mono_string_to_utf8_mp:
- * @s: a System.String
- *
- * Same as mono_string_to_utf8, but allocate the string from a mempool.
+ * \param s a \c System.String
+ * Same as \c mono_string_to_utf8, but allocate the string from a mempool.
  */
 char *
 mono_string_to_utf8_mp (MonoMemPool *mp, MonoString *s, MonoError *error)
@@ -7367,9 +7253,8 @@ mono_get_eh_callbacks (void)
 
 /**
  * mono_raise_exception:
- * @ex: exception object
- *
- * Signal the runtime that the exception @ex has been raised in unmanaged code.
+ * \param ex exception object
+ * Signal the runtime that the exception \p ex has been raised in unmanaged code.
  */
 void
 mono_raise_exception (MonoException *ex) 
@@ -7395,12 +7280,11 @@ mono_raise_exception_with_context (MonoException *ex, MonoContext *ctx)
 
 /**
  * mono_wait_handle_new:
- * @domain: Domain where the object will be created
- * @handle: Handle for the wait handle
- * @error: set on error.
- *
- * Returns: A new MonoWaitHandle created in the given domain for the
- * given handle.  On failure returns NULL and sets @rror.
+ * \param domain Domain where the object will be created
+ * \param handle Handle for the wait handle
+ * \param error set on error.
+ * \returns A new \c MonoWaitHandle created in the given domain for the
+ * given handle.  On failure returns NULL and sets \p error.
  */
 MonoWaitHandle *
 mono_wait_handle_new (MonoDomain *domain, HANDLE handle, MonoError *error)
@@ -7470,16 +7354,14 @@ mono_runtime_capture_context (MonoDomain *domain, MonoError *error)
 }
 /**
  * mono_async_result_new:
- * @domain:domain where the object will be created.
- * @handle: wait handle.
- * @state: state to pass to AsyncResult
- * @data: C closure data.
- * @error: set on error.
- *
- * Creates a new MonoAsyncResult (AsyncResult C# class) in the given domain.
- * If the handle is not null, the handle is initialized to a MonOWaitHandle.
- * On failure returns NULL and sets @error.
- *
+ * \param domain domain where the object will be created.
+ * \param handle wait handle.
+ * \param state state to pass to AsyncResult
+ * \param data C closure data.
+ * \param error set on error.
+ * Creates a new MonoAsyncResult (\c AsyncResult C# class) in the given domain.
+ * If the handle is not null, the handle is initialized to a \c MonoWaitHandle.
+ * On failure returns NULL and sets \p error.
  */
 MonoAsyncResult *
 mono_async_result_new (MonoDomain *domain, HANDLE handle, MonoObject *state, gpointer data, MonoObject *object_data, MonoError *error)
@@ -7601,17 +7483,15 @@ mono_message_init (MonoDomain *domain,
 #ifndef DISABLE_REMOTING
 /**
  * mono_remoting_invoke:
- * @real_proxy: pointer to a RealProxy object
- * @msg: The MonoMethodMessage to execute
- * @exc: used to store exceptions
- * @out_args: used to store output arguments
- *
- * This is used to call RealProxy::Invoke(). RealProxy::Invoke() returns an
- * IMessage interface and it is not trivial to extract results from there. So
- * we call an helper method PrivateInvoke instead of calling
- * RealProxy::Invoke() directly.
- *
- * Returns: the result object.
+ * \param real_proxy pointer to a \c RealProxy object
+ * \param msg The \c MonoMethodMessage to execute
+ * \param exc used to store exceptions
+ * \param out_args used to store output arguments
+ * This is used to call \c RealProxy::Invoke(). \c RealProxy::Invoke() returns an
+ * \c IMessage interface and it is not trivial to extract results from there. So
+ * we call an helper method \c PrivateInvoke instead of calling
+ * \c RealProxy::Invoke() directly.
+ * \returns the result object.
  */
 MonoObject *
 mono_remoting_invoke (MonoObject *real_proxy, MonoMethodMessage *msg, MonoObject **exc, MonoArray **out_args, MonoError *error)
@@ -7748,10 +7628,9 @@ prepare_to_string_method (MonoObject *obj, void **target)
 
 /**
  * mono_object_to_string:
- * @obj: The object
- * @exc: Any exception thrown by ToString (). May be NULL.
- *
- * Returns: the result of calling ToString () on an object.
+ * \param obj The object
+ * \param exc Any exception thrown by \c ToString. May be NULL.
+ * \returns the result of calling \c ToString on an object.
  */
 MonoString *
 mono_object_to_string (MonoObject *obj, MonoObject **exc)
@@ -7776,11 +7655,10 @@ mono_object_to_string (MonoObject *obj, MonoObject **exc)
 
 /**
  * mono_object_to_string_checked:
- * @obj: The object
- * @error: Set on error.
- *
- * Returns: the result of calling ToString () on an object. If the
- * method cannot be invoked or if it raises an exception, sets @error
+ * \param obj The object
+ * \param error Set on error.
+ * \returns the result of calling \c ToString() on an object. If the
+ * method cannot be invoked or if it raises an exception, sets \p error
  * and returns NULL.
  */
 MonoString *
@@ -7794,12 +7672,11 @@ mono_object_to_string_checked (MonoObject *obj, MonoError *error)
 
 /**
  * mono_object_try_to_string:
- * @obj: The object
- * @exc: Any exception thrown by ToString (). Must not be NULL.
- * @error: Set if method cannot be invoked.
- *
- * Returns: the result of calling ToString () on an object. If the
- * method cannot be invoked sets @error, if it raises an exception sets @exc,
+ * \param obj The object
+ * \param exc Any exception thrown by \c ToString(). Must not be NULL.
+ * \param error Set if method cannot be invoked.
+ * \returns the result of calling \c ToString() on an object. If the
+ * method cannot be invoked sets \p error, if it raises an exception sets \p exc,
  * and returns NULL.
  */
 MonoString *
@@ -7825,8 +7702,7 @@ get_native_backtrace (MonoException *exc_raw)
 
 /**
  * mono_print_unhandled_exception:
- * @exc: The exception
- *
+ * \param exc The exception
  * Prints the unhandled exception.
  */
 void
@@ -7891,17 +7767,16 @@ mono_print_unhandled_exception (MonoObject *exc)
 
 /**
  * mono_delegate_ctor_with_method:
- * @this: pointer to an uninitialized delegate object
- * @target: target object
- * @addr: pointer to native code
- * @method: method
- * @error: set on error.
- *
+ * \param this pointer to an uninitialized delegate object
+ * \param target target object
+ * \param addr pointer to native code
+ * \param method method
+ * \param error set on error.
  * Initialize a delegate and sets a specific method, not the one
- * associated with addr.  This is useful when sharing generic code.
- * In that case addr will most probably not be associated with the
+ * associated with \p addr.  This is useful when sharing generic code.
+ * In that case \p addr will most probably not be associated with the
  * correct instantiation of the method.
- * On failure returns FALSE and sets @error.
+ * On failure returns FALSE and sets \p error.
  */
 gboolean
 mono_delegate_ctor_with_method (MonoObject *this_obj, MonoObject *target, gpointer addr, MonoMethod *method, MonoError *error)
@@ -7946,13 +7821,12 @@ mono_delegate_ctor_with_method (MonoObject *this_obj, MonoObject *target, gpoint
 
 /**
  * mono_delegate_ctor:
- * @this: pointer to an uninitialized delegate object
- * @target: target object
- * @addr: pointer to native code
- * @error: set on error.
- *
+ * \param this pointer to an uninitialized delegate object
+ * \param target target object
+ * \param addr pointer to native code
+ * \param error set on error.
  * This is used to initialize a delegate.
- * On failure returns FALSE and sets @error.
+ * On failure returns FALSE and sets \p error.
  */
 gboolean
 mono_delegate_ctor (MonoObject *this_obj, MonoObject *target, gpointer addr, MonoError *error)
@@ -7980,15 +7854,14 @@ mono_delegate_ctor (MonoObject *this_obj, MonoObject *target, gpointer addr, Mon
 
 /**
  * mono_method_call_message_new:
- * @method: method to encapsulate
- * @params: parameters to the method
- * @invoke: optional, delegate invoke.
- * @cb: async callback delegate.
- * @state: state passed to the async callback.
- * @error: set on error.
- *
- * Translates arguments pointers into a MonoMethodMessage.
- * On failure returns NULL and sets @error.
+ * \param method method to encapsulate
+ * \param params parameters to the method
+ * \param invoke optional, delegate invoke.
+ * \param cb async callback delegate.
+ * \param state state passed to the async callback.
+ * \param error set on error.
+  * Translates arguments pointers into a \c MonoMethodMessage.
+ * On failure returns NULL and sets \p error.
  */
 MonoMethodMessage *
 mono_method_call_message_new (MonoMethod *method, gpointer *params, MonoMethod *invoke, 
@@ -8111,17 +7984,15 @@ mono_method_return_message_restore (MonoMethod *method, gpointer *params, MonoAr
 
 /**
  * mono_load_remote_field:
- * @this: pointer to an object
- * @klass: klass of the object containing @field
- * @field: the field to load
- * @res: a storage to store the result
- *
+ * \param this pointer to an object
+ * \param klass klass of the object containing \p field
+ * \param field the field to load
+ * \param res a storage to store the result
  * This method is called by the runtime on attempts to load fields of
- * transparent proxy objects. @this points to such TP, @klass is the class of
- * the object containing @field. @res is a storage location which can be
+ * transparent proxy objects. \p this points to such TP, \p klass is the class of
+ * the object containing \p field. \p res is a storage location which can be
  * used to store the result.
- *
- * Returns: an address pointing to the value of field.
+ * \returns an address pointing to the value of field.
  */
 gpointer
 mono_load_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, gpointer *res)
@@ -8134,18 +8005,16 @@ mono_load_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField *
 
 /**
  * mono_load_remote_field_checked:
- * @this: pointer to an object
- * @klass: klass of the object containing @field
- * @field: the field to load
- * @res: a storage to store the result
- * @error: set on error
- *
+ * \param this pointer to an object
+ * \param klass klass of the object containing \p field
+ * \param field the field to load
+ * \param res a storage to store the result
+ * \param error set on error
  * This method is called by the runtime on attempts to load fields of
- * transparent proxy objects. @this points to such TP, @klass is the class of
- * the object containing @field. @res is a storage location which can be
+ * transparent proxy objects. \p this points to such TP, \p klass is the class of
+ * the object containing \p field. \p res is a storage location which can be
  * used to store the result.
- *
- * Returns: an address pointing to the value of field.  On failure returns NULL and sets @error.
+ * \returns an address pointing to the value of field.  On failure returns NULL and sets \p error.
  */
 gpointer
 mono_load_remote_field_checked (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, gpointer *res, MonoError *error)
@@ -8217,10 +8086,9 @@ mono_load_remote_field_checked (MonoObject *this_obj, MonoClass *klass, MonoClas
 
 /**
  * mono_load_remote_field_new:
- * @this: 
- * @klass: 
- * @field:
- *
+ * \param this
+ * \param klass
+ * \param field
  * Missing documentation.
  */
 MonoObject *
@@ -8235,16 +8103,14 @@ mono_load_remote_field_new (MonoObject *this_obj, MonoClass *klass, MonoClassFie
 
 /**
  * mono_load_remote_field_new_checked:
- * @this: pointer to an object
- * @klass: klass of the object containing @field
- * @field: the field to load
- * @error: set on error.
- *
+ * \param this pointer to an object
+ * \param klass klass of the object containing \p field
+ * \param field the field to load
+ * \param error set on error.
  * This method is called by the runtime on attempts to load fields of
- * transparent proxy objects. @this points to such TP, @klass is the class of
- * the object containing @field.
- * 
- * Returns: a freshly allocated object containing the value of the field.  On failure returns NULL and sets @error.
+ * transparent proxy objects. \p this points to such TP, \p klass is the class of
+ * the object containing \p field.
+ * \returns a freshly allocated object containing the value of the field.  On failure returns NULL and sets \p error.
  */
 MonoObject *
 mono_load_remote_field_new_checked (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, MonoError *error)
@@ -8276,14 +8142,13 @@ mono_load_remote_field_new_checked (MonoObject *this_obj, MonoClass *klass, Mono
 
 /**
  * mono_store_remote_field:
- * @this_obj: pointer to an object
- * @klass: klass of the object containing @field
- * @field: the field to load
- * @val: the value/object to store
- *
+ * \param this_obj pointer to an object
+ * \param klass klass of the object containing \p field
+ * \param field the field to load
+ * \param val the value/object to store
  * This method is called by the runtime on attempts to store fields of
- * transparent proxy objects. @this_obj points to such TP, @klass is the class of
- * the object containing @field. @val is the new value to store in @field.
+ * transparent proxy objects. \p this_obj points to such TP, \p klass is the class of
+ * the object containing \p field. \p val is the new value to store in \p field.
  */
 void
 mono_store_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, gpointer val)
@@ -8295,17 +8160,15 @@ mono_store_remote_field (MonoObject *this_obj, MonoClass *klass, MonoClassField
 
 /**
  * mono_store_remote_field_checked:
- * @this_obj: pointer to an object
- * @klass: klass of the object containing @field
- * @field: the field to load
- * @val: the value/object to store
- * @error: set on error
- *
+ * \param this_obj pointer to an object
+ * \param klass klass of the object containing \p field
+ * \param field the field to load
+ * \param val the value/object to store
+ * \param error set on error
  * This method is called by the runtime on attempts to store fields of
- * transparent proxy objects. @this_obj points to such TP, @klass is the class of
- * the object containing @field. @val is the new value to store in @field.
- *
- * Returns: on success returns TRUE, on failure returns FALSE and sets @error.
+ * transparent proxy objects. \p this_obj points to such TP, \p klass is the class of
+ * the object containing \p field. \p val is the new value to store in \p field.
+ * \returns on success returns TRUE, on failure returns FALSE and sets \p error.
  */
 gboolean
 mono_store_remote_field_checked (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, gpointer val, MonoError *error)
@@ -8335,11 +8198,10 @@ mono_store_remote_field_checked (MonoObject *this_obj, MonoClass *klass, MonoCla
 
 /**
  * mono_store_remote_field_new:
- * @this_obj:
- * @klass:
- * @field:
- * @arg:
- *
+ * \param this_obj
+ * \param klass
+ * \param field
+ * \param arg
  * Missing documentation
  */
 void
@@ -8352,12 +8214,11 @@ mono_store_remote_field_new (MonoObject *this_obj, MonoClass *klass, MonoClassFi
 
 /**
  * mono_store_remote_field_new_checked:
- * @this_obj:
- * @klass:
- * @field:
- * @arg:
- * @error:
- *
+ * \param this_obj
+ * \param klass
+ * \param field
+ * \param arg
+ * \param error
  * Missing documentation
  */
 gboolean
@@ -8389,10 +8250,10 @@ mono_store_remote_field_new_checked (MonoObject *this_obj, MonoClass *klass, Mon
 }
 #endif
 
-/*
+/**
  * mono_create_ftnptr:
  *
- *   Given a function address, create a function descriptor for it.
+ * Given a function address, create a function descriptor for it.
  * This is only needed on some platforms.
  */
 gpointer
@@ -8415,9 +8276,8 @@ mono_get_addr_from_ftnptr (gpointer descr)
 
 /**
  * mono_string_chars:
- * @s: a MonoString
- *
- * Returns a pointer to the UCS16 characters stored in the MonoString
+ * \param s a \c MonoString
+ * \returns a pointer to the UTF-16 characters stored in the \c MonoString
  */
 gunichar2 *
 mono_string_chars (MonoString *s)
@@ -8429,9 +8289,8 @@ mono_string_chars (MonoString *s)
 
 /**
  * mono_string_length:
- * @s: MonoString
- *
- * Returns the lenght in characters of the string
+ * \param s MonoString
+ * \returns the length in characters of the string
  */
 int
 mono_string_length (MonoString *s)
@@ -8443,9 +8302,8 @@ mono_string_length (MonoString *s)
 
 /**
  * mono_string_handle_length:
- * @s: MonoString
- *
- * Returns the lenght in characters of the string
+ * \param s \c MonoString
+ * \returns the length in characters of the string
  */
 int
 mono_string_handle_length (MonoStringHandle s)
@@ -8458,9 +8316,8 @@ mono_string_handle_length (MonoStringHandle s)
 
 /**
  * mono_array_length:
- * @array: a MonoArray*
- *
- * Returns the total number of elements in the array. This works for
+ * \param array a \c MonoArray*
+ * \returns the total number of elements in the array. This works for
  * both vectors and multidimensional arrays.
  */
 uintptr_t
@@ -8473,16 +8330,14 @@ mono_array_length (MonoArray *array)
 
 /**
  * mono_array_addr_with_size:
- * @array: a MonoArray*
- * @size: size of the array elements
- * @idx: index into the array
- *
- * Use this function to obtain the address for the @idx item on the
- * @array containing elements of size @size.
+ * \param array a \c MonoArray*
+ * \param size size of the array elements
+ * \param idx index into the array
+ * Use this function to obtain the address for the \p idx item on the
+ * \p array containing elements of size \p size.
  *
  * This method performs no bounds checking or type checking.
- *
- * Returns the address of the @idx element in the array.
+ * \returns the address of the \p idx element in the array.
  */
 char*
 mono_array_addr_with_size (MonoArray *array, int size, uintptr_t idx)
@@ -8523,17 +8378,16 @@ mono_glist_to_array (GList *list, MonoClass *eclass, MonoError *error)
 
 /**
  * mono_array_set:
- * @array: array to alter
- * @element_type: A C type name, this macro will use the sizeof(type) to determine the element size
- * @index: index into the array
- * @value: value to set
- *
- * Value Type version: This sets the @index's element of the @array
- * with elements of size sizeof(type) to the provided @value.
+ * \param array array to alter
+ * \param element_type A C type name, this macro will use the sizeof(type) to determine the element size
+ * \param index index into the array
+ * \param value value to set
+ * Value Type version: This sets the \p index's element of the \p array
+ * with elements of size sizeof(type) to the provided \p value.
  *
  * This macro does not attempt to perform type checking or bounds checking.
  *
- * Use this to set value types in a `MonoArray`.
+ * Use this to set value types in a \c MonoArray.
  */
 void mono_array_set(MonoArray *array, Type element_type, uintptr_t index, Value value)
 {
@@ -8541,16 +8395,15 @@ void mono_array_set(MonoArray *array, Type element_type, uintptr_t index, Value
 
 /**
  * mono_array_setref:
- * @array: array to alter
- * @index: index into the array
- * @value: value to set
- *
- * Reference Type version: This sets the @index's element of the
- * @array with elements of size sizeof(type) to the provided @value.
+ * \param array array to alter
+ * \param index index into the array
+ * \param value value to set
+ * Reference Type version. This sets the \p index's element of the
+ * \p array with elements of size sizeof(type) to the provided \p value.
  *
  * This macro does not attempt to perform type checking or bounds checking.
  *
- * Use this to reference types in a `MonoArray`.
+ * Use this to reference types in a \c MonoArray.
  */
 void mono_array_setref(MonoArray *array, uintptr_t index, MonoObject *object)
 {
@@ -8558,21 +8411,21 @@ void mono_array_setref(MonoArray *array, uintptr_t index, MonoObject *object)
 
 /**
  * mono_array_get:
- * @array: array on which to operate on
- * @element_type: C element type (example: MonoString *, int, MonoObject *)
- * @index: index into the array
+ * \param array array on which to operate on
+ * \param element_type C element type (example: \c MonoString*, \c int, \c MonoObject*)
+ * \param index index into the array
  *
- * Use this macro to retrieve the @index element of an @array and
+ * Use this macro to retrieve the \p index element of an \p array and
  * extract the value assuming that the elements of the array match
  * the provided type value.
  *
  * This method can be used with both arrays holding value types and
- * reference types.   For reference types, the @type parameter should
- * be a `MonoObject*` or any subclass of it, like `MonoString*`.
+ * reference types.   For reference types, the \p type parameter should
+ * be a \c MonoObject* or any subclass of it, like \c MonoString*.
  *
  * This macro does not attempt to perform type checking or bounds checking.
  *
- * Returns: The element at the @index position in the @array.
+ * \returns The element at the \p index position in the \p array.
  */
 Type mono_array_get (MonoArray *array, Type element_type, uintptr_t index)
 {
index e93565dc630060000fd655f89966343c954bb5ea..3444bb8e34ea924bd6c38b401705de1a29c3b7a4 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_CLI_OBJECT_H_
 #define _MONO_CLI_OBJECT_H_
 
index 838142e253f01761818863eade191b0f48381df4..511b291df997428e5ffcaab002126ea70ec8cfd4 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * opcodes.c: CIL instruction information
+/**
+ * \file
+ * CIL instruction information
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -44,6 +45,9 @@ static const int16_t opidx [] = {
 #undef OPDEF
 };
 
+/**
+ * mono_opcode_name:
+ */
 const char*
 mono_opcode_name (int opcode)
 {
index d70d6f07bef754c0ad0f0b9f42dbb000b6e278a3..976a46df28b3e56a36a9fe196c9c3a8942855032 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_METADATA_OPCODES_H__
 #define __MONO_METADATA_OPCODES_H__
 
index 1bf80e2c867a41e775e7b2ebb3ba1da5794d2f5f..e8cc23718413760aa2537c07c22769ae95c87fb7 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_PROFILER_PRIVATE_H__
 #define __MONO_PROFILER_PRIVATE_H__
index ec29d9d45d29033772aadeb58cb86168e5b550c1..4b81e2ebd9ba34d7bc6b18bef6870f243145ba95 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * profiler.c: Profiler interface for Mono
+/**
+ * \file
+ * Profiler interface for Mono
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -126,14 +127,12 @@ MonoProfileFlags mono_profiler_events;
 
 /**
  * mono_profiler_install:
- * @prof: a MonoProfiler structure pointer, or a pointer to a derived structure.
- * @callback: the function to invoke at shutdown
- *
- * Use mono_profiler_install to activate profiling in the Mono runtime.
+ * \param prof a \c MonoProfiler structure pointer, or a pointer to a derived structure.
+ * \param callback the function to invoke at shutdown
+ * Use \c mono_profiler_install to activate profiling in the Mono runtime.
  * Typically developers of new profilers will create a new structure whose
- * first field is a MonoProfiler and put any extra information that they need
+ * first field is a \c MonoProfiler and put any extra information that they need
  * to access from the various profiling callbacks there.
- *
  */
 void
 mono_profiler_install (MonoProfiler *prof, MonoProfileFunc callback)
@@ -149,16 +148,15 @@ mono_profiler_install (MonoProfiler *prof, MonoProfileFunc callback)
 
 /**
  * mono_profiler_set_events:
- * @events: an ORed set of values made up of MONO_PROFILER_ flags
- *
- * The events descriped in the @events argument is a set of flags
+ * \param events an ORed set of values made up of \c MONO_PROFILER_ flags
+ * The events described in the \p events argument is a set of flags
  * that represent which profiling events must be triggered.  For
  * example if you have registered a set of methods for tracking
- * JIT compilation start and end with mono_profiler_install_jit_compile,
- * you will want to pass the MONO_PROFILE_JIT_COMPILATION flag to
+ * JIT compilation start and end with \c mono_profiler_install_jit_compile,
+ * you will want to pass the \c MONO_PROFILE_JIT_COMPILATION flag to
  * this routine.
  *
- * You can call mono_profile_set_events more than once and you can
+ * You can call \c mono_profile_set_events more than once and you can
  * do this at runtime to modify which methods are invoked.
  */
 void
@@ -186,12 +184,12 @@ mono_profiler_get_events (void)
 
 /**
  * mono_profiler_install_enter_leave:
- * @enter: the routine to be called on each method entry
- * @fleave: the routine to be called each time a method returns
+ * \param enter the routine to be called on each method entry
+ * \param fleave the routine to be called each time a method returns
  *
  * Use this routine to install routines that will be called everytime
  * a method enters and leaves.   The routines will receive as an argument
- * the MonoMethod representing the method that is entering or leaving.
+ * the \c MonoMethod representing the method that is entering or leaving.
  */
 void
 mono_profiler_install_enter_leave (MonoProfileMethodFunc enter, MonoProfileMethodFunc fleave)
@@ -204,8 +202,8 @@ mono_profiler_install_enter_leave (MonoProfileMethodFunc enter, MonoProfileMetho
 
 /**
  * mono_profiler_install_jit_compile:
- * @start: the routine to be called when the JIT process starts.
- * @end: the routine to be called when the JIT process ends.
+ * \param start the routine to be called when the JIT process starts.
+ * \param end the routine to be called when the JIT process ends.
  *
  * Use this routine to install routines that will be called when JIT 
  * compilation of a method starts and completes.
@@ -244,6 +242,9 @@ mono_profiler_install_method_invoke (MonoProfileMethodFunc start, MonoProfileMet
        prof_list->method_end_invoke = end;
 }
 
+/**
+ * mono_profiler_install_thread:
+ */
 void 
 mono_profiler_install_thread (MonoProfileThreadFunc start, MonoProfileThreadFunc end)
 {
@@ -261,6 +262,9 @@ mono_profiler_install_thread_name (MonoProfileThreadNameFunc thread_name_cb)
        prof_list->thread_name = thread_name_cb;
 }
 
+/**
+ * mono_profiler_install_transition:
+ */
 void 
 mono_profiler_install_transition (MonoProfileMethodResult callback)
 {
@@ -269,6 +273,9 @@ mono_profiler_install_transition (MonoProfileMethodResult callback)
        prof_list->man_unman_transition = callback;
 }
 
+/**
+ * mono_profiler_install_allocation:
+ */
 void 
 mono_profiler_install_allocation (MonoProfileAllocFunc callback)
 {
@@ -290,8 +297,8 @@ static int64_t sampling_frequency = 100; // Hz
 
 /**
  * mono_profiler_set_statistical_mode:
- * @mode the sampling mode used.
- * @sample_frequency_is_us the sampling frequency in microseconds.
+ * \param mode the sampling mode used.
+ * \param sample_frequency_is_us the sampling frequency in microseconds.
  *
  * Set the sampling parameters for the profiler. Sampling mode affects the effective sampling rate as in samples/s you'll witness.
  * The default sampling mode is process mode, which only reports samples when there's activity in the process.
@@ -307,6 +314,9 @@ mono_profiler_set_statistical_mode (MonoProfileSamplingMode mode, int64_t sampli
        sampling_frequency = sampling_frequency_hz;
 }
 
+/**
+ * mono_profiler_install_statistical:
+ */
 void 
 mono_profiler_install_statistical (MonoProfileStatFunc callback)
 {
@@ -369,6 +379,9 @@ void mono_profiler_install_exception (MonoProfileExceptionFunc throw_callback, M
        prof_list->exception_clause_cb = clause_callback;
 }
 
+/**
+ * mono_profiler_install_coverage_filter:
+ */
 void 
 mono_profiler_install_coverage_filter (MonoProfileCoverageFilterFunc callback)
 {
@@ -377,6 +390,9 @@ mono_profiler_install_coverage_filter (MonoProfileCoverageFilterFunc callback)
        prof_list->coverage_filter_cb = callback;
 }
 
+/**
+ * mono_profiler_install_appdomain:
+ */
 void 
 mono_profiler_install_appdomain   (MonoProfileAppDomainFunc start_load, MonoProfileAppDomainResult end_load,
                                    MonoProfileAppDomainFunc start_unload, MonoProfileAppDomainFunc end_unload)
@@ -409,6 +425,9 @@ mono_profiler_install_context (MonoProfileContextFunc load, MonoProfileContextFu
        prof_list->context_unload = unload;
 }
 
+/**
+ * mono_profiler_install_assembly:
+ */
 void 
 mono_profiler_install_assembly    (MonoProfileAssemblyFunc start_load, MonoProfileAssemblyResult end_load,
                                    MonoProfileAssemblyFunc start_unload, MonoProfileAssemblyFunc end_unload)
@@ -421,6 +440,9 @@ mono_profiler_install_assembly    (MonoProfileAssemblyFunc start_load, MonoProfi
        prof_list->assembly_end_unload = end_unload;
 }
 
+/**
+ * mono_profiler_install_module:
+ */
 void 
 mono_profiler_install_module      (MonoProfileModuleFunc start_load, MonoProfileModuleResult end_load,
                                    MonoProfileModuleFunc start_unload, MonoProfileModuleFunc end_unload)
@@ -433,6 +455,9 @@ mono_profiler_install_module      (MonoProfileModuleFunc start_load, MonoProfile
        prof_list->module_end_unload = end_unload;
 }
 
+/**
+ * mono_profiler_install_class:
+ */
 void
 mono_profiler_install_class       (MonoProfileClassFunc start_load, MonoProfileClassResult end_load,
                                    MonoProfileClassFunc start_unload, MonoProfileClassFunc end_unload)
@@ -445,6 +470,9 @@ mono_profiler_install_class       (MonoProfileClassFunc start_load, MonoProfileC
        prof_list->class_end_unload = end_unload;
 }
 
+/**
+ * mono_profiler_method_enter:
+ */
 void
 mono_profiler_method_enter (MonoMethod *method)
 {
@@ -455,6 +483,9 @@ mono_profiler_method_enter (MonoMethod *method)
        }
 }
 
+/**
+ * mono_profiler_method_leave:
+ */
 void
 mono_profiler_method_leave (MonoMethod *method)
 {
@@ -465,6 +496,9 @@ mono_profiler_method_leave (MonoMethod *method)
        }
 }
 
+/**
+ * mono_profiler_method_jit:
+ */
 void 
 mono_profiler_method_jit (MonoMethod *method)
 {
@@ -475,6 +509,9 @@ mono_profiler_method_jit (MonoMethod *method)
        }
 }
 
+/**
+ * mono_profiler_method_end_jit:
+ */
 void 
 mono_profiler_method_end_jit (MonoMethod *method, MonoJitInfo* jinfo, int result)
 {
@@ -519,6 +556,9 @@ mono_profiler_method_end_invoke (MonoMethod *method)
        }
 }
 
+/**
+ * mono_profiler_code_transition:
+ */
 void 
 mono_profiler_code_transition (MonoMethod *method, int result)
 {
@@ -529,6 +569,9 @@ mono_profiler_code_transition (MonoMethod *method, int result)
        }
 }
 
+/**
+ * mono_profiler_allocation:
+ */
 void 
 mono_profiler_allocation (MonoObject *obj)
 {
@@ -548,6 +591,9 @@ mono_profiler_monitor_event      (MonoObject *obj, MonoProfilerMonitorEvent even
        }
 }
 
+/**
+ * mono_profiler_stat_hit:
+ */
 void
 mono_profiler_stat_hit (guchar *ip, void *context)
 {
@@ -598,6 +644,9 @@ mono_profiler_exception_clause_handler (MonoMethod *method, int clause_type, int
        }
 }
 
+/**
+ * mono_profiler_thread_start:
+ */
 void
 mono_profiler_thread_start (gsize tid)
 {
@@ -608,6 +657,9 @@ mono_profiler_thread_start (gsize tid)
        }
 }
 
+/**
+ * mono_profiler_thread_end:
+ */
 void 
 mono_profiler_thread_end (gsize tid)
 {
@@ -628,6 +680,9 @@ mono_profiler_thread_name (gsize tid, const char *name)
        }
 }
 
+/**
+ * mono_profiler_assembly_event:
+ */
 void 
 mono_profiler_assembly_event  (MonoAssembly *assembly, int code)
 {
@@ -655,6 +710,9 @@ mono_profiler_assembly_event  (MonoAssembly *assembly, int code)
        }
 }
 
+/**
+ * mono_profiler_assembly_loaded:
+ */
 void 
 mono_profiler_assembly_loaded (MonoAssembly *assembly, int result)
 {
@@ -674,6 +732,9 @@ void mono_profiler_iomap (char *report, const char *pathname, const char *new_pa
        }
 }
 
+/**
+ * mono_profiler_module_event:
+ */
 void 
 mono_profiler_module_event  (MonoImage *module, int code)
 {
@@ -701,6 +762,9 @@ mono_profiler_module_event  (MonoImage *module, int code)
        }
 }
 
+/**
+ * mono_profiler_module_loaded:
+ */
 void 
 mono_profiler_module_loaded (MonoImage *module, int result)
 {
@@ -711,6 +775,9 @@ mono_profiler_module_loaded (MonoImage *module, int result)
        }
 }
 
+/**
+ * mono_profiler_class_event:
+ */
 void 
 mono_profiler_class_event  (MonoClass *klass, int code)
 {
@@ -738,6 +805,9 @@ mono_profiler_class_event  (MonoClass *klass, int code)
        }
 }
 
+/**
+ * mono_profiler_class_loaded:
+ */
 void 
 mono_profiler_class_loaded (MonoClass *klass, int result)
 {
@@ -748,6 +818,9 @@ mono_profiler_class_loaded (MonoClass *klass, int result)
        }
 }
 
+/**
+ * mono_profiler_appdomain_event:
+ */
 void 
 mono_profiler_appdomain_event  (MonoDomain *domain, int code)
 {
@@ -775,6 +848,9 @@ mono_profiler_appdomain_event  (MonoDomain *domain, int code)
        }
 }
 
+/**
+ * mono_profiler_appdomain_loaded:
+ */
 void 
 mono_profiler_appdomain_loaded (MonoDomain *domain, int result)
 {
@@ -809,6 +885,9 @@ mono_profiler_context_unloaded (MonoAppContext *context)
                        prof->context_unload (prof->profiler, context);
 }
 
+/**
+ * mono_profiler_shutdown:
+ */
 void 
 mono_profiler_shutdown (void)
 {
@@ -821,6 +900,9 @@ mono_profiler_shutdown (void)
        mono_profiler_set_events ((MonoProfileFlags)0);
 }
 
+/**
+ * mono_profiler_gc_heap_resize:
+ */
 void
 mono_profiler_gc_heap_resize (gint64 new_size)
 {
@@ -831,6 +913,9 @@ mono_profiler_gc_heap_resize (gint64 new_size)
        }
 }
 
+/**
+ * mono_profiler_gc_event:
+ */
 void
 mono_profiler_gc_event (MonoGCEvent event, int generation)
 {
@@ -871,6 +956,9 @@ mono_profiler_gc_roots (int num, void **objects, int *root_types, uintptr_t *ext
        }
 }
 
+/**
+ * mono_profiler_install_gc:
+ */
 void
 mono_profiler_install_gc (MonoProfileGCFunc callback, MonoProfileGCResizeFunc heap_resize_callback)
 {
@@ -882,9 +970,9 @@ mono_profiler_install_gc (MonoProfileGCFunc callback, MonoProfileGCResizeFunc he
 
 /**
  * mono_profiler_install_gc_moves:
- * @callback: callback function
+ * \param callback callback function
  *
- * Install the @callback function that the GC will call when moving objects.
+ * Install the \p callback function that the GC will call when moving objects.
  * The callback receives an array of pointers and the number of elements
  * in the array. Every even element in the array is the original object location
  * and the following odd element is the new location of the object in memory.
@@ -904,15 +992,15 @@ mono_profiler_install_gc_moves (MonoProfileGCMoveFunc callback)
 
 /**
  * mono_profiler_install_gc_roots:
- * @handle_callback: callback function
- * @roots_callback: callback function
+ * \param handle_callback callback function
+ * \param roots_callback callback function
  *
- * Install the @handle_callback function that the GC will call when GC
+ * Install the \p handle_callback function that the GC will call when GC
  * handles are created or destroyed.
- * The callback receives an operation, which is either #MONO_PROFILER_GC_HANDLE_CREATED
- * or #MONO_PROFILER_GC_HANDLE_DESTROYED, the handle type, the handle value and the
+ * The callback receives an operation, which is either \c MONO_PROFILER_GC_HANDLE_CREATED
+ * or \c MONO_PROFILER_GC_HANDLE_DESTROYED, the handle type, the handle value and the
  * object pointer, if present.
- * Install the @roots_callback function that the GC will call when tracing
+ * Install the \p roots_callback function that the GC will call when tracing
  * the roots for a collection.
  * The callback receives the number of elements and three arrays: an array
  * of objects, an array of root types and flags and an array of extra info.
@@ -1098,15 +1186,15 @@ mono_profiler_coverage_free (MonoMethod *method)
 
 /**
  * mono_profiler_coverage_get:
- * @prof: The profiler handle, installed with mono_profiler_install
- * @method: the method to gather information from.
- * @func: A routine that will be called back with the results
+ * \param prof The profiler handle, installed with mono_profiler_install
+ * \param method the method to gather information from.
+ * \param func A routine that will be called back with the results
  *
- * If the MONO_PROFILER_INS_COVERAGE flag was active during JIT compilation
- * it is posisble to obtain coverage information about a give method.
+ * If the \c MONO_PROFILER_INS_COVERAGE flag was active during JIT compilation
+ * it is possible to obtain coverage information about a give method.
  *
- * The function @func will be invoked repeatedly with instances of the
- * MonoProfileCoverageEntry structure.
+ * The function \p func will be invoked repeatedly with instances of the
+ * \c MonoProfileCoverageEntry structure.
  */
 void 
 mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileCoverageFunc func)
@@ -1254,7 +1342,7 @@ load_profiler_from_mono_installation (const char *libname, const char *desc)
 
 /**
  * mono_profiler_load:
- * @desc: arguments to configure the profiler
+ * \param desc arguments to configure the profiler
  *
  * Invoke this method to initialize the profiler.   This will drive the
  * loading of the internal ("default") or any external profilers.
index 84dc1bb83b1bca0dbdf7309649757483a5fbe593..cced986680eed40eb26d3c2e3f2bf1ed574be8f9 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_PROFILER_H__
 #define __MONO_PROFILER_H__
 
index c542daf2890eb1c9e5aa510942426a7f72ff6092..48580e3e3c48b0fa8e6fd3039768d930c4cc0b2e 100644 (file)
@@ -1,6 +1,6 @@
-
-/*
- * property-bag.c: Linearizable property bag.
+/**
+ * \file
+ * Linearizable property bag.
  *
  * Authors:
  *   Rodrigo Kumpera (kumpera@gmail.com)
index 8f3f0ee26c2c0d8341fed2b9eec4f6122fbbe66c..b6eef75d382313f95960edaa5bf70c4706efc7ae 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * property-bag.h: Linearizable property bag.
+/**
+ * \file
+ * Linearizable property bag.
  *
  * Authors:
  *   Rodrigo Kumpera (kumpera@gmail.com)
index 87d2d104790dceb6272299c34f19911ceb362615..1dcfc8d4077884a2d28723ed5c0331ff7d85180f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * rand.c: System.Security.Cryptography.RNGCryptoServiceProvider support
+/**
+ * \file
+ * System.Security.Cryptography.RNGCryptoServiceProvider support
  *
  * Authors:
  *      Mark Crichton (crichton@gimp.org)
index 563b374835969d1375f8562b19057528e8bb4860..898f44f0c15f1728ef99cd31b4c991f2b4ae75d1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * rand.h: System.Security.Cryptography.RNGCryptoServiceProvider support
+/**
+ * \file
+ * System.Security.Cryptography.RNGCryptoServiceProvider support
  *
  * Author:
  *      Mark Crichton (crichton@gimp.org)
index cba372954533a1914c19525d476232028ff45e49..5a0e06102b0f13916188cae94c77280996beaa7f 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 87c8006002b0d64cebb57b5259be6f891436d72f..d14e8cbdf6dc0e770a2d40a54df317eaf7b10172 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2014 Xamarin Inc
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 43843be4a5a676a9f8f34808588688bbbf81f150..0986f149264c16cc97b6d100479f63bbbeaed4de 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * reflection.c: System.Type icalls and related reflection queries.
+/**
+ * \file
+ * System.Type icalls and related reflection queries.
  * 
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -143,6 +144,9 @@ mono_class_free_ref_info (MonoClass *klass)
 }
 
 
+/**
+ * mono_custom_attrs_free:
+ */
 void
 mono_custom_attrs_free (MonoCustomAttrInfo *ainfo)
 {
@@ -212,12 +216,11 @@ mono_reflection_cleanup_domain (MonoDomain *domain)
 }
 
 
-/*
+/**
  * mono_assembly_get_object:
- * @domain: an app domain
- * @assembly: an assembly
- *
- * Return an System.Reflection.Assembly object representing the MonoAssembly @assembly.
+ * \param domain an app domain
+ * \param assembly an assembly
+ * \returns a \c System.Reflection.Assembly object representing the \c MonoAssembly \p assembly.
  */
 MonoReflectionAssembly*
 mono_assembly_get_object (MonoDomain *domain, MonoAssembly *assembly)
@@ -253,6 +256,9 @@ mono_assembly_get_object_handle (MonoDomain *domain, MonoAssembly *assembly, Mon
        return CHECK_OR_CONSTRUCT_HANDLE (MonoReflectionAssemblyHandle, assembly, NULL, assembly_object_construct, NULL);
 }
 
+/**
+ * mono_module_get_object:
+ */
 MonoReflectionModule*   
 mono_module_get_object   (MonoDomain *domain, MonoImage *image)
 {
@@ -319,6 +325,9 @@ mono_module_get_object_handle (MonoDomain *domain, MonoImage *image, MonoError *
        return CHECK_OR_CONSTRUCT_HANDLE (MonoReflectionModuleHandle, image, NULL, module_object_construct, NULL);
 }
 
+/**
+ * mono_module_file_get_object:
+ */
 MonoReflectionModule*
 mono_module_file_get_object (MonoDomain *domain, MonoImage *image, int table_index)
 {
@@ -424,12 +433,12 @@ mono_type_normalize (MonoType *type)
 
        return type;
 }
-/*
+
+/**
  * mono_type_get_object:
- * @domain: an app domain
- * @type: a type
- *
- * Return an System.MonoType object representing the type @type.
+ * \param domain an app domain
+ * \param type a type
+ * \returns A \c System.MonoType object representing the type \p type.
  */
 MonoReflectionType*
 mono_type_get_object (MonoDomain *domain, MonoType *type)
@@ -561,13 +570,12 @@ mono_type_get_object_handle (MonoDomain *domain, MonoType *type, MonoError *erro
        return MONO_HANDLE_NEW (MonoReflectionType, mono_type_get_object_checked (domain, type, error));
 }
 
-/*
+/**
  * mono_method_get_object:
- * @domain: an app domain
- * @method: a method
- * @refclass: the reflected type (can be NULL)
- *
- * Return an System.Reflection.MonoMethod object representing the method @method.
+ * \param domain an app domain
+ * \param method a method
+ * \param refclass the reflected type (can be NULL)
+ * \returns A \c System.Reflection.MonoMethod object representing the method \p method.
  */
 MonoReflectionMethod*
 mono_method_get_object (MonoDomain *domain, MonoMethod *method, MonoClass *refclass)
@@ -677,14 +685,13 @@ mono_method_clear_object (MonoDomain *domain, MonoMethod *method)
        }
 }
 
-/*
+/**
  * mono_field_get_object:
- * @domain: an app domain
- * @klass: a type
- * @field: a field
- *
- * Return an System.Reflection.MonoField object representing the field @field
- * in class @klass.
+ * \param domain an app domain
+ * \param klass a type
+ * \param field a field
+ * \returns A \c System.Reflection.MonoField object representing the field \p field
+ * in class \p klass.
  */
 MonoReflectionField*
 mono_field_get_object (MonoDomain *domain, MonoClass *klass, MonoClassField *field)
@@ -796,13 +803,13 @@ fail:
 
 /**
  * mono_property_get_object_handle:
- * @domain: an app domain
- * @klass: a type
- * @property: a property
- * @error: set on error
+ * \param domain an app domain
+ * \param klass a type
+ * \param property a property
+ * \param error set on error
  *
- * Return an System.Reflection.MonoProperty object representing the property @property
- * in class @klass.  On error returns NULL and sets @error.
+ * \returns A \c System.Reflection.MonoProperty object representing the property \p property
+ * in class \p klass.  On error returns NULL and sets \p error.
  */
 MonoReflectionPropertyHandle
 mono_property_get_object_handle (MonoDomain *domain, MonoClass *klass, MonoProperty *property, MonoError *error)
@@ -812,13 +819,12 @@ mono_property_get_object_handle (MonoDomain *domain, MonoClass *klass, MonoPrope
 
 /**
  * mono_property_get_object:
- * @domain: an app domain
- * @klass: a type
- * @property: a property
- * @error: set on error
- *
- * Return an System.Reflection.MonoProperty object representing the property @property
- * in class @klass.  On error returns NULL and sets @error.
+ * \param domain an app domain
+ * \param klass a type
+ * \param property a property
+ * \param error set on error
+ * \returns a \c System.Reflection.MonoProperty object representing the property \p property
+ * in class \p klass.  On error returns NULL and sets \p error.
  */
 MonoReflectionProperty*
 mono_property_get_object_checked (MonoDomain *domain, MonoClass *klass, MonoProperty *property, MonoError *error)
@@ -828,14 +834,13 @@ mono_property_get_object_checked (MonoDomain *domain, MonoClass *klass, MonoProp
        HANDLE_FUNCTION_RETURN_OBJ (res);
 }
 
-/*
+/**
  * mono_event_get_object:
- * @domain: an app domain
- * @klass: a type
- * @event: a event
- *
- * Return an System.Reflection.MonoEvent object representing the event @event
- * in class @klass.
+ * \param domain an app domain
+ * \param klass a type
+ * \param event a event
+ * \returns A \c System.Reflection.MonoEvent object representing the event \p event
+ * in class \p klass.
  */
 MonoReflectionEvent*
 mono_event_get_object (MonoDomain *domain, MonoClass *klass, MonoEvent *event)
@@ -862,13 +867,12 @@ event_object_construct (MonoDomain *domain, MonoClass *klass, MonoEvent *event,
 
 /**
  * mono_event_get_object_handle:
- * @domain: an app domain
- * @klass: a type
- * @event: a event
- * @error: set on error
- *
- * Return an System.Reflection.MonoEvent object representing the event @event
- * in class @klass. On failure sets @error and returns NULL
+ * \param domain an app domain
+ * \param klass a type
+ * \param event a event
+ * \param error set on error
+ * \returns a \c System.Reflection.MonoEvent object representing the event \p event
+ * in class \p klass. On failure sets \p error and returns NULL
  */
 MonoReflectionEventHandle
 mono_event_get_object_handle (MonoDomain *domain, MonoClass *klass, MonoEvent *event, MonoError *error)
@@ -880,12 +884,12 @@ mono_event_get_object_handle (MonoDomain *domain, MonoClass *klass, MonoEvent *e
 
 /**
  * mono_get_reflection_missing_object:
- * @domain: Domain where the object lives
+ * \param domain Domain where the object lives
  *
- * Returns the System.Reflection.Missing.Value singleton object
- * (of type System.Reflection.Missing).
+ * \returns the \c System.Reflection.Missing.Value singleton object
+ * (of type \c System.Reflection.Missing).
  *
- * Used as the value for ParameterInfo.DefaultValue when Optional
+ * Used as the value for \c ParameterInfo.DefaultValue when Optional
  * is present
  */
 static MonoObjectHandle
@@ -1122,6 +1126,9 @@ fail:
        return MONO_HANDLE_NEW (MonoArray, NULL_HANDLE);
 }
 
+/**
+ * mono_param_get_objects:
+ */
 MonoArray*
 mono_param_get_objects (MonoDomain *domain, MonoMethod *method)
 {
@@ -1186,12 +1193,11 @@ leave:
        HANDLE_FUNCTION_RETURN_VAL (is_ok (error));
 }
 
-/*
+/**
  * mono_method_body_get_object:
- * @domain: an app domain
- * @method: a method
- *
- * Return an System.Reflection.MethodBody object representing the method @method.
+ * \param domain an app domain
+ * \param method a method
+ * \return A \c System.Reflection.MethodBody object representing the method \p method.
  */
 MonoReflectionMethodBody*
 mono_method_body_get_object (MonoDomain *domain, MonoMethod *method)
@@ -1301,12 +1307,11 @@ fail:
 
 /**
  * mono_method_body_get_object_handle:
- * @domain: an app domain
- * @method: a method
- * @error: set on error
- *
- * Return an System.Reflection.MethodBody object representing the
- * method @method.  On failure, returns NULL and sets @error.
+ * \param domain an app domain
+ * \param method a method
+ * \param error set on error
+ * \returns a \c System.Reflection.MethodBody object representing the
+ * method \p method.  On failure, returns NULL and sets \p error.
  */
 MonoReflectionMethodBodyHandle
 mono_method_body_get_object_handle (MonoDomain *domain, MonoMethod *method, MonoError *error)
@@ -1318,11 +1323,9 @@ mono_method_body_get_object_handle (MonoDomain *domain, MonoMethod *method, Mono
 
 /**
  * mono_get_dbnull_object:
- * @domain: Domain where the object lives
- *
- * Returns the System.DBNull.Value singleton object
- *
- * Used as the value for ParameterInfo.DefaultValue 
+ * \param domain Domain where the object lives
+ * Used as the value for \c ParameterInfo.DefaultValue
+ * \returns the \c System.DBNull.Value singleton object
  */
 MonoObject *
 mono_get_dbnull_object (MonoDomain *domain)
@@ -1752,12 +1755,11 @@ _mono_reflection_parse_type (char *name, char **endptr, gboolean is_recursed,
 
 /**
  * mono_identifier_unescape_type_name_chars:
- * @identifier: the display name of a mono type
+ * \param identifier the display name of a mono type
  *
- * Returns:
- *  The name in internal form, that is without escaping backslashes.
+ * \returns The name in internal form, that is without escaping backslashes.
  *
- *  The string is modified in place!
+ * The string is modified in place!
  */
 char*
 mono_identifier_unescape_type_name_chars(char* identifier)
@@ -1802,9 +1804,7 @@ unescape_each_nested_name (void* data, void* user_data)
 /**
  * mono_identifier_unescape_info:
  *
- * @info: a parsed display form of an (optionally assembly qualified) full type name.
- *
- * Returns: nothing.
+ * \param info a parsed display form of an (optionally assembly qualified) full type name.
  *
  * Destructively updates the info by unescaping the identifiers that
  * comprise the type namespace, name, nested types (if any) and
@@ -1827,6 +1827,9 @@ mono_identifier_unescape_info (MonoTypeNameParse *info)
                g_list_foreach(info->nested, &unescape_each_nested_name, NULL);
 }
 
+/**
+ * mono_reflection_parse_type:
+ */
 int
 mono_reflection_parse_type (char *name, MonoTypeNameParse *info)
 {
@@ -2011,17 +2014,16 @@ mono_reflection_get_type_internal (MonoImage *rootimage, MonoImage* image, MonoT
        return &klass->byval_arg;
 }
 
-/*
+/**
  * mono_reflection_get_type:
- * @image: a metadata context
- * @info: type description structure
- * @ignorecase: flag for case-insensitive string compares
- * @type_resolve: whenever type resolve was already tried
+ * \param image a metadata context
+ * \param info type description structure
+ * \param ignorecase flag for case-insensitive string compares
+ * \param type_resolve whenever type resolve was already tried
  *
- * Build a MonoType from the type description in @info.
+ * Build a MonoType from the type description in \p info.
  * 
  */
-
 MonoType*
 mono_reflection_get_type (MonoImage* image, MonoTypeNameParse *info, gboolean ignorecase, gboolean *type_resolve) {
        MonoError error;
@@ -2032,15 +2034,13 @@ mono_reflection_get_type (MonoImage* image, MonoTypeNameParse *info, gboolean ig
 
 /**
  * mono_reflection_get_type_checked:
- * @rootimage: the image of the currently active managed caller
- * @image: a metadata context
- * @info: type description structure
- * @ignorecase: flag for case-insensitive string compares
- * @type_resolve: whenever type resolve was already tried
- * @error: set on error.
- *
- * Build a MonoType from the type description in @info. On failure returns NULL and sets @error.
- *
+ * \param rootimage the image of the currently active managed caller
+ * \param image a metadata context
+ * \param info type description structure
+ * \param ignorecase flag for case-insensitive string compares
+ * \param type_resolve whenever type resolve was already tried
+ * \param error set on error.
+ * Build a \c MonoType from the type description in \p info. On failure returns NULL and sets \p error.
  */
 MonoType*
 mono_reflection_get_type_checked (MonoImage *rootimage, MonoImage* image, MonoTypeNameParse *info, gboolean ignorecase, gboolean *type_resolve, MonoError *error) {
@@ -2177,6 +2177,9 @@ mono_reflection_get_type_with_rootimage (MonoImage *rootimage, MonoImage* image,
        return type;
 }
 
+/**
+ * mono_reflection_free_type_info:
+ */
 void
 mono_reflection_free_type_info (MonoTypeNameParse *info)
 {
@@ -2198,13 +2201,13 @@ mono_reflection_free_type_info (MonoTypeNameParse *info)
        }
 }
 
-/*
+/**
  * mono_reflection_type_from_name:
- * @name: type name.
- * @image: a metadata context (can be NULL).
+ * \param name type name.
+ * \param image a metadata context (can be NULL).
  *
- * Retrieves a MonoType from its @name. If the name is not fully qualified,
- * it defaults to get the type from @image or, if @image is NULL or loading
+ * Retrieves a \c MonoType from its \p name. If the name is not fully qualified,
+ * it defaults to get the type from \p image or, if \p image is NULL or loading
  * from it fails, uses corlib.
  * 
  */
@@ -2219,14 +2222,12 @@ mono_reflection_type_from_name (char *name, MonoImage *image)
 
 /**
  * mono_reflection_type_from_name_checked:
- * @name: type name.
- * @image: a metadata context (can be NULL).
- * @error: set on errror.
- *
- * Retrieves a MonoType from its @name. If the name is not fully qualified,
- * it defaults to get the type from @image or, if @image is NULL or loading
- * from it fails, uses corlib.  On failure returns NULL and sets @error.
- * 
+ * \param name type name.
+ * \param image a metadata context (can be NULL).
+ * \param error set on errror.
+ * Retrieves a MonoType from its \p name. If the name is not fully qualified,
+ * it defaults to get the type from \p image or, if \p image is NULL or loading
+ * from it fails, uses corlib.  On failure returns NULL and sets \p error.
  */
 MonoType*
 mono_reflection_type_from_name_checked (char *name, MonoImage *image, MonoError *error)
@@ -2254,10 +2255,9 @@ mono_reflection_type_from_name_checked (char *name, MonoImage *image, MonoError
        return type;
 }
 
-/*
+/**
  * mono_reflection_get_token:
- *
- *   Return the metadata token of OBJ which should be an object
+ * \returns the metadata token of \p obj which should be an object
  * representing a metadata element.
  */
 guint32
@@ -2273,11 +2273,10 @@ mono_reflection_get_token (MonoObject *obj_raw)
 
 /**
  * mono_reflection_get_token_checked:
- * @obj: the object
- * @error: set on error
- *
- *   Return the metadata token of @obj which should be an object
- * representing a metadata element.  On failure sets @error.
+ * \param obj the object
+ * \param error set on error
+ * \returns the metadata token of \p obj which should be an object
+ * representing a metadata element.  On failure sets \p error.
  */
 guint32
 mono_reflection_get_token_checked (MonoObjectHandle obj, MonoError *error)
@@ -2369,13 +2368,12 @@ mono_reflection_is_usertype (MonoReflectionTypeHandle ref)
 
 /**
  * mono_reflection_bind_generic_parameters:
- * @type: a managed type object (which should be some kind of generic (instance? definition?))
- * @type_args: the number of type arguments to bind
- * @types: array of type arguments
- * @error: set on error
- *
+ * \param type a managed type object (which should be some kind of generic (instance? definition?))
+ * \param type_args the number of type arguments to bind
+ * \param types array of type arguments
+ * \param error set on error
  * Given a managed type object for a generic type instance, binds each of its arguments to the specified types.
- * Returns the MonoType* for the resulting type instantiation.  On failure returns NULL and sets @error.
+ * \returns the \c MonoType* for the resulting type instantiation.  On failure returns NULL and sets \p error.
  */
 MonoType*
 mono_reflection_bind_generic_parameters (MonoReflectionTypeHandle reftype, int type_argc, MonoType **types, MonoError *error)
@@ -2589,14 +2587,13 @@ mono_declsec_get_flags (MonoImage *image, guint32 token)
        return result;
 }
 
-/*
+/**
+ * mono_declsec_flags_from_method:
+ * \param method The method for which we want the declarative security flags.
  * Get the security actions (in the form of flags) associated with the specified method.
- *
- * @method: The method for which we want the declarative security flags.
- * Return the declarative security flags for the method (only).
- *
- * Note: To keep MonoMethod size down we do not cache the declarative security flags
- *       (except for the stack modifiers which are kept in the MonoJitInfo structure)
+ * To keep \c MonoMethod size down we do not cache the declarative security flags
+ * (except for the stack modifiers which are kept in the MonoJitInfo structure)
+ * \returns the declarative security flags for the method (only).
  */
 guint32
 mono_declsec_flags_from_method (MonoMethod *method)
@@ -2611,14 +2608,13 @@ mono_declsec_flags_from_method (MonoMethod *method)
        return 0;
 }
 
-/*
+/**
+ * mono_declsec_flags_from_class:
+ * \param klass The class for which we want the declarative security flags.
  * Get the security actions (in the form of flags) associated with the specified class.
- *
- * @klass: The class for which we want the declarative security flags.
- * Return the declarative security flags for the class.
- *
- * Note: We cache the flags inside the MonoClass structure as this will get 
- *       called very often (at least for each method).
+ * We cache the flags inside the \c MonoClass structure as this will get 
+ * called very often (at least for each method).
+ * \returns the declarative security flags for the class.
  */
 guint32
 mono_declsec_flags_from_class (MonoClass *klass)
@@ -2641,11 +2637,11 @@ mono_declsec_flags_from_class (MonoClass *klass)
        return 0;
 }
 
-/*
+/**
+ * mono_declsec_flags_from_assembly:
+ * \param assembly The assembly for which we want the declarative security flags.
  * Get the security actions (in the form of flags) associated with the specified assembly.
- *
- * @assembly: The assembly for which we want the declarative security flags.
- * Return the declarative security flags for the assembly.
+ * \returns the declarative security flags for the assembly.
  */
 guint32
 mono_declsec_flags_from_assembly (MonoAssembly *assembly)
@@ -2731,10 +2727,11 @@ mono_declsec_get_method_demands_params (MonoMethod *method, MonoDeclSecurityActi
        return fill_actions_from_index (method->klass->image, idx, demands, id_std, id_noncas, id_choice);
 }
 
-/*
+/**
+ * mono_declsec_get_demands:
  * Collect all actions (that requires to generate code in mini) assigned for
  * the specified method.
- * Note: Don't use the content of actions if the function return FALSE.
+ * Don't use the content of actions if the function return FALSE.
  */
 MonoBoolean
 mono_declsec_get_demands (MonoMethod *method, MonoDeclSecurityActions* demands)
@@ -2781,10 +2778,10 @@ mono_declsec_get_demands (MonoMethod *method, MonoDeclSecurityActions* demands)
 }
 
 
-/*
- * Collect all Link actions: LinkDemand, NonCasLinkDemand and LinkDemandChoice (2.0).
- *
- * Note: Don't use the content of actions if the function return FALSE.
+/**
+ * mono_declsec_get_linkdemands:
+ * Collect all Link actions: \c LinkDemand, \c NonCasLinkDemand and \c LinkDemandChoice (2.0).
+ * Don't use the content of actions if the function return FALSE.
  */
 MonoBoolean
 mono_declsec_get_linkdemands (MonoMethod *method, MonoDeclSecurityActions* klass, MonoDeclSecurityActions *cmethod)
@@ -2827,14 +2824,13 @@ mono_declsec_get_linkdemands (MonoMethod *method, MonoDeclSecurityActions* klass
        return result;
 }
 
-/*
- * Collect all Inherit actions: InheritanceDemand, NonCasInheritanceDemand and InheritanceDemandChoice (2.0).
- *
- * @klass      The inherited class - this is the class that provides the security check (attributes)
- * @demans     
- * return TRUE if inheritance demands (any kind) are present, FALSE otherwise.
- * 
- * Note: Don't use the content of actions if the function return FALSE.
+/**
+ * mono_declsec_get_inheritdemands_class:
+ * \param klass        The inherited class - this is the class that provides the security check (attributes)
+ * \param demands
+ * Collect all Inherit actions - \c InheritanceDemand, \c NonCasInheritanceDemand and \c InheritanceDemandChoice (2.0).
+ * Don't use the content of actions if the function return FALSE.
+ * \returns TRUE if inheritance demands (any kind) are present, FALSE otherwise.
  */
 MonoBoolean
 mono_declsec_get_inheritdemands_class (MonoClass *klass, MonoDeclSecurityActions* demands)
@@ -2859,10 +2855,10 @@ mono_declsec_get_inheritdemands_class (MonoClass *klass, MonoDeclSecurityActions
        return result;
 }
 
-/*
- * Collect all Inherit actions: InheritanceDemand, NonCasInheritanceDemand and InheritanceDemandChoice (2.0).
- *
- * Note: Don't use the content of actions if the function return FALSE.
+/**
+ * mono_declsec_get_inheritdemands_method:
+ * Collect all Inherit actions: \c InheritanceDemand, \c NonCasInheritanceDemand and \c InheritanceDemandChoice (2.0).
+ * Don't use the content of actions if the function return FALSE.
  */
 MonoBoolean
 mono_declsec_get_inheritdemands_method (MonoMethod *method, MonoDeclSecurityActions* demands)
@@ -2931,6 +2927,9 @@ mono_declsec_get_method_action (MonoMethod *method, guint32 action, MonoDeclSecu
        return FALSE;
 }
 
+/**
+ * mono_declsec_get_class_action:
+ */
 MonoBoolean
 mono_declsec_get_class_action (MonoClass *klass, guint32 action, MonoDeclSecurityEntry *entry)
 {
@@ -2945,6 +2944,9 @@ mono_declsec_get_class_action (MonoClass *klass, guint32 action, MonoDeclSecurit
        return FALSE;
 }
 
+/**
+ * mono_declsec_get_assembly_action:
+ */
 MonoBoolean
 mono_declsec_get_assembly_action (MonoAssembly *assembly, guint32 action, MonoDeclSecurityEntry *entry)
 {
@@ -2991,9 +2993,8 @@ mono_reflection_call_is_assignable_to (MonoClass *klass, MonoClass *oklass, Mono
 
 /**
  * mono_reflection_type_get_type:
- * @reftype: the System.Type object
- *
- * Returns the MonoType* associated with the C# System.Type object @reftype.
+ * \param reftype the \c System.Type object
+ * \returns the \c MonoType* associated with the C# \c System.Type object \p reftype.
  */
 MonoType*
 mono_reflection_type_get_type (MonoReflectionType *reftype)
@@ -3008,9 +3009,8 @@ mono_reflection_type_get_type (MonoReflectionType *reftype)
 
 /**
  * mono_reflection_assembly_get_assembly:
- * @refassembly: the System.Reflection.Assembly object
- *
- * Returns the MonoAssembly* associated with the C# System.Reflection.Assembly object @refassembly.
+ * \param refassembly the \c System.Reflection.Assembly object
+ * \returns the \c MonoAssembly* associated with the C# \c System.Reflection.Assembly object \p refassembly.
  */
 MonoAssembly*
 mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly)
@@ -3022,9 +3022,8 @@ mono_reflection_assembly_get_assembly (MonoReflectionAssembly *refassembly)
 
 /**
  * mono_class_from_mono_type_handle:
- * @reftype: the System.Type handle
- *
- * Returns the MonoClass* corresponding to the given type.
+ * \param reftype the \c System.Type handle
+ * \returns the \c MonoClass* corresponding to the given type.
  */
 MonoClass*
 mono_class_from_mono_type_handle (MonoReflectionTypeHandle reftype)
index 80e334ed349d31f8c6c511f0b35cf0dd2b3a53b9..847ba62a34f0f459ecf567f2164bcf5e75fd3bcc 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __METADATA_REFLECTION_H__
 #define __METADATA_REFLECTION_H__
 
index ecc5f94248485b893960e154aeda2b7b1d1a6d61..aee1b27ca833f4bf7646a6627711920bfcb09de8 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * remoting.c: Remoting support
+/**
+ * \file
+ * Remoting support
  * 
  * Copyright 2002-2003 Ximian, Inc (http://www.ximian.com)
  * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
@@ -434,6 +435,9 @@ fail:
 } 
 
 
+/**
+ * mono_marshal_get_remoting_invoke:
+ */
 MonoMethod *
 mono_marshal_get_remoting_invoke (MonoMethod *method)
 {
@@ -907,7 +911,8 @@ mono_marshal_get_xappdomain_dispatch (MonoMethod *method, int *marshal_types, in
        return res;
 }
 
-/* mono_marshal_get_xappdomain_invoke ()
+/**
+ * mono_marshal_get_xappdomain_invoke:
  * Generates a fast remoting wrapper for cross app domain calls.
  */
 MonoMethod *
@@ -1237,6 +1242,9 @@ mono_marshal_get_xappdomain_invoke (MonoMethod *method)
        return res;
 }
 
+/**
+ * mono_marshal_get_remoting_invoke_for_target:
+ */
 MonoMethod *
 mono_marshal_get_remoting_invoke_for_target (MonoMethod *method, MonoRemotingTarget target_type)
 {
@@ -1269,6 +1277,9 @@ mono_marshal_load_remoting_wrapper (MonoRealProxy *rp, MonoMethod *method)
        return compiled_ptr;
 }
 
+/**
+ * mono_marshal_get_remoting_invoke_with_check:
+ */
 MonoMethod *
 mono_marshal_get_remoting_invoke_with_check (MonoMethod *method)
 {
@@ -1330,13 +1341,14 @@ mono_marshal_get_remoting_invoke_with_check (MonoMethod *method)
        return res;
 }
 
-/*
+/**
  * mono_marshal_get_ldfld_wrapper:
- * @type: the type of the field
+ * \param type the type of the field
  *
  * This method generates a function which can be use to load a field with type
- * @type from an object. The generated function has the following signature:
- * <@type> ldfld_wrapper (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, int offset)
+ * \p type from an object. The generated function has the following signature:
+ *
+ * <code><i>type</i> ldfld_wrapper (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, int offset)</code>
  */
 MonoMethod *
 mono_marshal_get_ldfld_wrapper (MonoType *type)
@@ -1624,13 +1636,14 @@ mono_marshal_get_ldflda_wrapper (MonoType *type)
 }
 
 
-/*
+/**
  * mono_marshal_get_stfld_wrapper:
- * @type: the type of the field
+ * \param type the type of the field
  *
  * This method generates a function which can be use to store a field with type
- * @type. The generated function has the following signature:
- * void stfld_wrapper (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, int offset, <@type> val)
+ * \p type. The generated function has the following signature:
+ *
+ * <code>void stfld_wrapper (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, int offset, <i>type</i> val)</code>
  */
 MonoMethod *
 mono_marshal_get_stfld_wrapper (MonoType *type)
@@ -1770,6 +1783,9 @@ mono_marshal_get_stfld_wrapper (MonoType *type)
        return res;
 }
 
+/**
+ * mono_marshal_get_proxy_cancast:
+ */
 MonoMethod *
 mono_marshal_get_proxy_cancast (MonoClass *klass)
 {
@@ -1931,11 +1947,10 @@ leave:
 
 /**
  * mono_marshal_xdomain_copy_value_handle:
- * @val: The value to copy.
- * @error: set on failure.
- *
- * Makes a copy of @val suitable for the current domain.
- * On failure returns NULL and sets @error.
+ * \param val The value to copy.
+ * \param error set on failure.
+ * Makes a copy of \p val suitable for the current domain.
+ * On failure returns NULL and sets \p error.
  */
 MonoObjectHandle
 mono_marshal_xdomain_copy_value_handle (MonoObjectHandle val, MonoError *error)
index b0307aed93dfe044247ac64fee04393385b97eca..aeeb4bb8a43487db7d681f61249ae43b006bf9b2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * remoting.h: Remoting support
+/**
+ * \file
+ * Remoting support
  *
  * (C) 2014 Xamarin, Inc.  http://www.xamarin.com
  *
index bf66ecad46589750b8cbde64e36535a8c05d7856..992dbdeea99f65b44a9b43ae68ba43284b63b244 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_METADATA_ROW_INDEXES_H__
 #define __MONO_METADATA_ROW_INDEXES_H__
index df6643672e986ef898e953da9df44e256bcec00a..84fe0d1469e742909ed3a12722d2d4168fa9564a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * runtime.c: Runtime functions
+/**
+ * \file
+ * Runtime functions
  *
  * Authors:
  *  Jonathan Pryor 
@@ -27,11 +28,10 @@ static gboolean shutting_down = FALSE;
 
 /** 
  * mono_runtime_set_shutting_down:
+ * \deprecated This function can break the shutdown sequence.
  *
- * Invoked by System.Environment.Exit to flag that the runtime
+ * Invoked by \c System.Environment.Exit to flag that the runtime
  * is shutting down.
- *
- * Deprecated. This function can break the shutdown sequence.
  */
 void
 mono_runtime_set_shutting_down (void)
@@ -41,12 +41,8 @@ mono_runtime_set_shutting_down (void)
 
 /**
  * mono_runtime_is_shutting_down:
- *
- * Returns whether the runtime has been flagged for shutdown.
- *
- * This is consumed by the P:System.Environment.HasShutdownStarted
- * property.
- *
+ * This is consumed by the \c P:System.Environment.HasShutdownStarted property.
+ * \returns whether the runtime has been flagged for shutdown.
  */
 gboolean
 mono_runtime_is_shutting_down (void)
@@ -156,4 +152,4 @@ mono_runtime_get_aotid (void)
                return NULL;
 
        return mono_guid_to_string ((guint8*) aotid);
-}
\ No newline at end of file
+}
index 65cb5daa4a511e4f33a9eb0e03567b76cdd056d2..f17f5c9e474cd0b41233360102ecc2ba0d007f47 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * runtime.h: Runtime functions
+/**
+ * \file
+ * Runtime functions
  *
  * Author:
  *     Jonathan Pryor
index 4c93932b868549c9ecd9c6921d571fbf15a3dc4d..4d4a2fdef98c95a13b2ac769b783968c56e56ad3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * security-core-clr.c: CoreCLR security
+/**
+ * \file
+ * CoreCLR security
  *
  * Authors:
  *     Mark Probst <mark.probst@gmail.com>
@@ -27,19 +28,19 @@ static MonoSecurityCoreCLROptions security_core_clr_options = MONO_SECURITY_CORE
 
 /**
  * mono_security_core_clr_set_options:
- * @options: the new options for the coreclr system to use
+ * \param options the new options for the coreclr system to use
  *
  * By default, the CoreCLRs security model forbids execution trough reflection of methods not visible from the calling code.
  * Even if the method being called is not in a platform assembly. For non moonlight CoreCLR users this restriction does not
  * make a lot of sense, since the author could have just changed the non platform assembly to allow the method to be called.
  * This function allows specific relaxations from the default behaviour to be set.
  *
- * Use MONO_SECURITY_CORE_CLR_OPTIONS_DEFAULT for the default coreclr coreclr behaviour as used in Moonlight.
+ * Use \c MONO_SECURITY_CORE_CLR_OPTIONS_DEFAULT for the default coreclr coreclr behaviour as used in Moonlight.
  *
- * Use MONO_SECURITY_CORE_CLR_OPTIONS_RELAX_REFLECTION to allow transparent code to execute methods and access 
+ * Use \c MONO_SECURITY_CORE_CLR_OPTIONS_RELAX_REFLECTION to allow transparent code to execute methods and access 
  * fields that are not in platformcode, even if those methods and fields are private or otherwise not visible to the calling code.
  *
- * Use MONO_SECURITY_CORE_CLR_OPTIONS_RELAX_DELEGATE to allow delegates to be created that point at methods that are not in
+ * Use \c MONO_SECURITY_CORE_CLR_OPTIONS_RELAX_DELEGATE to allow delegates to be created that point at methods that are not in
  * platformcode even if those methods and fields are private or otherwise not visible to the calling code.
  *
  */
index 51fdb8c1239eedc47904a1389ce8c3e92b69daaf..04103412e48ce04f31bae3b20a589aef2a8934d0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * security-core-clr.h: CoreCLR security
+/**
+ * \file
+ * CoreCLR security
  *
  * Author:
  *     Mark Probst <mark.probst@gmail.com>
index 7006806ed34478d83cb122fb5ea5b2b782d49b89..47e916c3f9916bbddf34456dbe2caf10a963a2a0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * security-manager.c:  Security Manager (Unmanaged side)
+/**
+ * \file
+ * Security Manager (Unmanaged side)
  *
  * Author:
  *     Sebastien Pouliot  <sebastien@ximian.com>
index 19ac3e8f82c496521b73ac37eb4d8cfab999adea..d9f49ceb510c86ff0ea33218dead8ce21bff1d14 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * security-manager.h:  Security Manager
+/**
+ * \file
+ * Security Manager
  *
  * Author:
  *     Sebastien Pouliot  <sebastien@ximian.com>
index 3d61904d593383aee1d042cf80e64ab5e6b830b0..8405b258498f7ffd5394a80109049d25fdb6e861 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * security.c:  Security internal calls
+/**
+ * \file
+ * Security internal calls
  *
  * Author:
  *     Sebastien Pouliot  <sebastien@ximian.com>
index 4f996c727d73161c972cb8a5af4fcfef55060258..7adbfe9f7c6dcf6dd8c607190f79e936b8302bb4 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * seq-points-data.c: Sequence Points functions
+/**
+ * \file
+ * Sequence Points functions
  *
  * Authors:
  *   Marcos Henrich (marcos.henrich@xamarin.com)
index afd19549824a4461ac9241fda71ede99d159b97b..7b24b999621b569360131c697b0f10ad2faa374b 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2015 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 09224b2f15be171f37d2107b293af76b76c47d38..cf987d045d2adbab4bad2c5f2e7c816953d3c499 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-bridge-internals.h: The cross-GC bridge.
+/**
+ * \file
+ * The cross-GC bridge.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
index 7ec2d4386dfb5f4934169182128e402931b4f397..9bfb7245a63cd0dd1c6efbbd5c007884557c78cb 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-bridge.c: Simple generational GC.
+/**
+ * \file
+ * Simple generational GC.
  *
  * Copyright 2011 Novell, Inc (http://www.novell.com)
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
@@ -46,6 +47,9 @@ static SgenBridgeProcessor compare_to_bridge_processor;
 volatile gboolean bridge_processing_in_progress = FALSE;
 
 // FIXME: The current usage pattern for this function is unsafe. Bridge processing could start immediately after unlock
+/**
+ * mono_gc_wait_for_bridge_processing:
+ */
 void
 mono_gc_wait_for_bridge_processing (void)
 {
@@ -58,6 +62,9 @@ mono_gc_wait_for_bridge_processing (void)
        sgen_gc_unlock ();
 }
 
+/**
+ * mono_gc_register_bridge_callbacks:
+ */
 void
 mono_gc_register_bridge_callbacks (MonoGCBridgeCallbacks *callbacks)
 {
index a03b0a81bfd508c93bcc82afa65aa3ff6e4ae3da..c131f3066914e0c334f3a7bbb7f947f307bd1aca 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2011 Novell, Inc.
  * 
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 836c1143d7a15631baeb4562281136a4fd0e9a5a..eac61f32577fa1ff64af811766f65449fed621f1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-client-mono.h: Mono's client definitions for SGen.
+/**
+ * \file
+ * Mono's client definitions for SGen.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index f5a6a61be6e1942879ade9f3c798624c8eabdce4..2d1587d4986aab0aab049dd1c62d512a1ef9d882 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Xamarin, Inc.
  *
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 1b5feb983bff4cd5646fd23c4994e1ebf3614bf6..f2958e964be0ddb76c22b4ff4ebd7574d827c121 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-mono.c: SGen features specific to Mono.
+/**
+ * \file
+ * SGen features specific to Mono.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
@@ -127,7 +128,7 @@ mono_gc_wbarrier_value_copy (gpointer dest, gpointer src, int count, MonoClass *
 /**
  * mono_gc_wbarrier_object_copy:
  *
- * Write barrier to call when obj is the result of a clone or copy of an object.
+ * Write barrier to call when \p obj is the result of a clone or copy of an object.
  */
 void
 mono_gc_wbarrier_object_copy (MonoObject* obj, MonoObject *src)
@@ -152,6 +153,9 @@ mono_gc_wbarrier_object_copy (MonoObject* obj, MonoObject *src)
        sgen_get_remset ()->wbarrier_object_copy (obj, src);
 }
 
+/**
+ * mono_gc_wbarrier_set_arrayref:
+ */
 void
 mono_gc_wbarrier_set_arrayref (MonoArray *arr, gpointer slot_ptr, MonoObject* value)
 {
@@ -167,6 +171,9 @@ mono_gc_wbarrier_set_arrayref (MonoArray *arr, gpointer slot_ptr, MonoObject* va
        sgen_get_remset ()->wbarrier_set_field ((GCObject*)arr, slot_ptr, value);
 }
 
+/**
+ * mono_gc_wbarrier_set_field:
+ */
 void
 mono_gc_wbarrier_set_field (MonoObject *obj, gpointer field_ptr, MonoObject* value)
 {
@@ -519,12 +526,18 @@ sgen_client_run_finalize (MonoObject *obj)
        mono_gc_run_finalize (obj, NULL);
 }
 
+/**
+ * mono_gc_invoke_finalizers:
+ */
 int
 mono_gc_invoke_finalizers (void)
 {
        return sgen_gc_invoke_finalizers ();
 }
 
+/**
+ * mono_gc_pending_finalizers:
+ */
 MonoBoolean
 mono_gc_pending_finalizers (void)
 {
@@ -556,12 +569,11 @@ object_in_domain_predicate (MonoObject *obj, void *user_data)
 
 /**
  * mono_gc_finalizers_for_domain:
- * @domain: the unloading appdomain
- * @out_array: output array
- * @out_size: size of output array
- *
- * Enqueue for finalization all objects that belong to the unloading appdomain @domain
- * @suspend is used for early termination of the enqueuing process.
+ * \param domain the unloading appdomain
+ * \param out_array output array
+ * \param out_size size of output array
+ * Enqueue for finalization all objects that belong to the unloading appdomain \p domain.
+ * \p suspend is used for early termination of the enqueuing process.
  */
 void
 mono_gc_finalize_domain (MonoDomain *domain)
@@ -978,6 +990,9 @@ mono_gc_alloc_mature (MonoVTable *vtable, size_t size)
        return obj;
 }
 
+/**
+ * mono_gc_alloc_fixed:
+ */
 void*
 mono_gc_alloc_fixed (size_t size, MonoGCDescriptor descr, MonoGCRootSource source, const char *msg)
 {
@@ -992,6 +1007,9 @@ mono_gc_alloc_fixed (size_t size, MonoGCDescriptor descr, MonoGCRootSource sourc
        return res;
 }
 
+/**
+ * mono_gc_free_fixed:
+ */
 void
 mono_gc_free_fixed (void* addr)
 {
@@ -2131,22 +2149,20 @@ walk_references (GCObject *start, size_t size, void *data)
 
 /**
  * mono_gc_walk_heap:
- * @flags: flags for future use
- * @callback: a function pointer called for each object in the heap
- * @data: a user data pointer that is passed to callback
- *
- * This function can be used to iterate over all the live objects in the heap:
- * for each object, @callback is invoked, providing info about the object's
+ * \param flags flags for future use
+ * \param callback a function pointer called for each object in the heap
+ * \param data a user data pointer that is passed to callback
+ * This function can be used to iterate over all the live objects in the heap;
+ * for each object, \p callback is invoked, providing info about the object's
  * location in memory, its class, its size and the objects it references.
- * For each referenced object it's offset from the object address is
+ * For each referenced object its offset from the object address is
  * reported in the offsets array.
  * The object references may be buffered, so the callback may be invoked
  * multiple times for the same object: in all but the first call, the size
  * argument will be zero.
- * Note that this function can be only called in the #MONO_GC_EVENT_PRE_START_WORLD
+ * Note that this function can be only called in the \c MONO_GC_EVENT_PRE_START_WORLD
  * profiler event handler.
- *
- * Returns: a non-zero value if the GC doesn't support heap walking
+ * \returns a non-zero value if the GC doesn't support heap walking
  */
 int
 mono_gc_walk_heap (int flags, MonoGCReferences callback, void *data)
@@ -2291,12 +2307,18 @@ sgen_thread_detach (SgenThreadInfo *p)
                mono_thread_detach_internal (mono_thread_internal_current ());
 }
 
+/**
+ * mono_gc_register_thread:
+ */
 gboolean
 mono_gc_register_thread (void *baseptr)
 {
        return mono_thread_info_attach (baseptr) != NULL;
 }
 
+/**
+ * mono_gc_is_gc_thread:
+ */
 gboolean
 mono_gc_is_gc_thread (void)
 {
@@ -2661,10 +2683,9 @@ sgen_client_metadata_for_object (GCObject *obj)
 
 /**
  * mono_gchandle_is_in_domain:
- * @gchandle: a GCHandle's handle.
- * @domain: An application domain.
- *
- * Returns: TRUE if the object wrapped by the @gchandle belongs to the specific @domain.
+ * \param gchandle a GCHandle's handle.
+ * \param domain An application domain.
+ * \returns TRUE if the object wrapped by the \p gchandle belongs to the specific \p domain.
  */
 gboolean
 mono_gchandle_is_in_domain (guint32 gchandle, MonoDomain *domain)
@@ -2675,7 +2696,7 @@ mono_gchandle_is_in_domain (guint32 gchandle, MonoDomain *domain)
 
 /**
  * mono_gchandle_free_domain:
- * @unloading: domain that is unloading
+ * \param unloading domain that is unloading
  *
  * Function used internally to cleanup any GC handle for objects belonging
  * to the specified domain during appdomain unload.
@@ -2969,6 +2990,9 @@ sgen_client_describe_invalid_pointer (GCObject *ptr)
 
 static gboolean gc_inited;
 
+/**
+ * mono_gc_base_init:
+ */
 void
 mono_gc_base_init (void)
 {
index 8b51ccf588a23f92ff45121dbc1499c5957b5bbc..21a90e8b78d90750de7a0318258566ae9f6f56c9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-bridge.c: Simple generational GC.
+/**
+ * \file
+ * Simple generational GC.
  *
  * Copyright 2011 Novell, Inc (http://www.novell.com)
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
index 346e4b0aeb50a1aff3d8ada64bf8b2042898dd17..12f82b07f725afa8c0bfad012269a0a480a36814 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-bridge.c: Simple generational GC.
+/**
+ * \file
+ * Simple generational GC.
  *
  * Copyright 2011 Novell, Inc (http://www.novell.com)
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
index 88f25d67c67c87b8a9d06175f90c606a3057b8a2..8c1a234616f499e752b71233db8d038245a2debe 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-stw.c: Stop the world functionality
+/**
+ * \file
+ * Stop the world functionality
  *
  * Author:
  *     Paolo Molaro (lupus@ximian.com)
index fc9a73de67d011c315611e66f02b762b081236ba..8df0c6600ecece033d67ba1865e4dadaea245d17 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-tarjan-bridge.c: Tarjan-based bridge implementation.
+/**
+ * \file
+ * Tarjan-based bridge implementation.
  *
  * Copyright 2011 Novell, Inc (http://www.novell.com)
  * Copyright 2014 Xamarin Inc (http://www.xamarin.com)
index 5ca66e738af696bcbd0efcab0000a4c7bd32c9ec..1f4e1c64dbe18c50c8085d059ebd2b709103cc8e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-toggleref.c: toggleref support for sgen
+/**
+ * \file
+ * toggleref support for sgen
  *
  * Author:
  *  Rodrigo Kumpera (kumpera@gmail.com)
@@ -182,12 +183,12 @@ mono_gc_toggleref_add (MonoObject *object, mono_bool strong_ref)
 
 /**
  * mono_gc_toggleref_register_callback:
- * @callback callback used to determine the new state of the given object.
+ * \param callback callback used to determine the new state of the given object.
  *
- * The callback must decide the status of a given object. It must return one of the values in the MONO_TOGGLE_REF_ enum.
+ * The callback must decide the status of a given object. It must return one of the values in the \c MONO_TOGGLE_REF_ enum.
  * This function is called with the world running but with the GC locked. This means that you can do everything that doesn't
  * require GC interaction. This includes, but not limited to, allocating objects, (de)registering for finalization, manipulating
- *gchandles, storing to reference fields or interacting with other threads that might perform such operations.
+ * gchandles, storing to reference fields or interacting with other threads that might perform such operations.
  */
 void
 mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) (MonoObject *obj))
index 917323c575af0d6f5f20122bd086e1c0c1005232..d968b6dc359575a13202e5bd5c07d1d0d69ac380 100644 (file)
@@ -1,6 +1,6 @@
-/*
- *
- * sgen-toggleref.h: toggleref support for sgen
+/**
+ * \file
+ * toggleref support for sgen
  *
  * Copyright 2011 Xamarin, Inc.
  *
index 97e6d57fa52156742e972a8de1b74820f7a6e43c..ecd2339cdf29691da77ff9c7a9ad82858a46ea47 100644 (file)
@@ -1,6 +1,7 @@
-/*
- * sre-encode.c: Routines for encoding SRE builders into a
- *    MonoDynamicImage and generating tokens.
+/**
+ * \file
+ * Routines for encoding SRE builders into a
+ * MonoDynamicImage and generating tokens.
  *   
  * 
  * Author:
index 3d7f3b7108466868afdd2f357d462b26e05ace6b..175232941be64794dbf41c43cbef066a5cfb090a 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index f1cddf7cac594ab95114ec4feeb3782b95b4b2d8..b3c0779cf8fd67382acc147fdebe57bb4b75672f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sre-save.c: Routine for saving an image to a file.
+/**
+ * \file
+ * Routine for saving an image to a file.
  *   
  * 
  * Author:
index 67800081470c54d52c447db3a41b6474c09dda64..2d833eacdcbb8b9aaa78b597b11579e793458423 100644 (file)
@@ -1,6 +1,7 @@
-/*
- * sre.c: Routines for creating an image at runtime
- *   and related System.Reflection.Emit icalls
+/**
+ * \file
+ * Routines for creating an image at runtime
+ * and related System.Reflection.Emit icalls
  *   
  * 
  * Author:
@@ -2216,16 +2217,15 @@ encode_named_val (MonoReflectionAssembly *assembly, char *buffer, char *p, char
 
 /**
  * mono_reflection_get_custom_attrs_blob:
- * @ctor: custom attribute constructor
- * @ctorArgs: arguments o the constructor
- * @properties:
- * @propValues:
- * @fields:
- * @fieldValues:
- * 
+ * \param ctor custom attribute constructor
+ * \param ctorArgs arguments o the constructor
+ * \param properties
+ * \param propValues
+ * \param fields
+ * \param fieldValues
  * Creates the blob of data that needs to be saved in the metadata and that represents
- * the custom attributed described by @ctor, @ctorArgs etc.
- * Returns: a Byte array representing the blob of data.
+ * the custom attributed described by \p ctor, \p ctorArgs etc.
+ * \returns a \c Byte array representing the blob of data.
  */
 MonoArray*
 mono_reflection_get_custom_attrs_blob (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *propValues, MonoArray *fields, MonoArray* fieldValues) 
@@ -2238,17 +2238,16 @@ mono_reflection_get_custom_attrs_blob (MonoReflectionAssembly *assembly, MonoObj
 
 /**
  * mono_reflection_get_custom_attrs_blob_checked:
- * @ctor: custom attribute constructor
- * @ctorArgs: arguments o the constructor
- * @properties:
- * @propValues:
- * @fields:
- * @fieldValues:
- * @error: set on error
- * 
+ * \param ctor custom attribute constructor
+ * \param ctorArgs arguments o the constructor
+ * \param properties
+ * \param propValues
+ * \param fields
+ * \param fieldValues
+ * \param error set on error
  * Creates the blob of data that needs to be saved in the metadata and that represents
- * the custom attributed described by @ctor, @ctorArgs etc.
- * Returns: a Byte array representing the blob of data.  On failure returns NULL and sets @error.
+ * the custom attributed described by \p ctor, \p ctorArgs etc.
+ * \returns a \c Byte array representing the blob of data.  On failure returns NULL and sets \p error.
  */
 MonoArray*
 mono_reflection_get_custom_attrs_blob_checked (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *propValues, MonoArray *fields, MonoArray* fieldValues, MonoError *error) 
index abbccd6a19a633dbb8d8f2b6a4cf4a7d3fd2fa3c..8556a498940d8b5ae622a8accda3e9f76c79711c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * string-icalls.c: String internal calls for the corlib
+/**
+ * \file
+ * String internal calls for the corlib
  *
  * Author:
  *   Patrik Torstensson (patrik.torstensson@labs2.com)
index edc43f2e8edd341f56be34a3c218328adc9a7c1d..84be0998e06dd89548c32f7efb38c2c240a76f27 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_CLI_STRING_ICALLS_H_
 #define _MONO_CLI_STRING_ICALLS_H_
 
index 8d55a552f84dbc86d35b01deea7793039e7b007d..386092de3c016611f8534021fa20adc389164671 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sysmath.c: these are based on bob smith's csharp routines 
+/**
+ * \file
+ * these are based on bob smith's csharp routines 
  *
  * Author:
  *     Mono Project (http://www.mono-project.com)
index 85d3234dfdb45f6c3adc7fe987a00a8387c78d10..52a4f7a973fc5e4295a1e3963ff86c7f27bb1faf 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * math.h
+/**
+ * \file
  *
  * Author:
  *   Dan Lewis (dihlewis@yahoo.co.uk)
index fa0e9ef4b28c5777da02f721abd4ef79a41e78c5..90cb93e050c3f4391107e77567d1c3667d00c5b7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tabledefs.h: This file contains the various definitions for constants
+/**
+ * \file
+ * This file contains the various definitions for constants
  * found on the metadata tables
  *
  * Author:
index 82d9b07ad14de051920b533ef9245005641a981e..67d555707a593382872dac3445295d337ff6ee5f 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #if defined(HAVE_EPOLL)
 
index 47f346a28918863dfae0fae8fcc8568f28d1874d..657fad7e359767ef40ff70bb337608871f5c8507 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #if defined(HAVE_KQUEUE)
 
index d7eff1c210c9feee2ed71ddd206a90f13af9d5fc..8ff6b13c6975ca66371ec6572153f122f956a423 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "utils/mono-poll.h"
 
index 6b394e0f8c87f5c242a5fd1dac777fc97779ad11..a40ed6de5ea1e62c8c98d1082d18b5f3b919b365 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * threadpool-io.c: Microsoft IO threadpool runtime support
+/**
+ * \file
+ * Microsoft IO threadpool runtime support
  *
  * Author:
  *     Ludovic Henry (ludovic.henry@xamarin.com)
@@ -318,8 +319,6 @@ selector_thread (gpointer data)
        MonoError error;
        MonoGHashTable *states;
 
-       io_selector_running = TRUE;
-
        if (mono_runtime_is_shutting_down ()) {
                io_selector_running = FALSE;
                return 0;
@@ -445,7 +444,12 @@ selector_thread (gpointer data)
 
        mono_g_hash_table_destroy (states);
 
+       mono_coop_mutex_lock (&threadpool_io->updates_lock);
+
        io_selector_running = FALSE;
+       mono_coop_cond_broadcast (&threadpool_io->updates_cond);
+
+       mono_coop_mutex_unlock (&threadpool_io->updates_lock);
 
        return 0;
 }
@@ -555,9 +559,15 @@ initialize (void)
        if (!threadpool_io->backend.init (threadpool_io->wakeup_pipes [0]))
                g_error ("initialize: backend->init () failed");
 
+       mono_coop_mutex_lock (&threadpool_io->updates_lock);
+
+       io_selector_running = TRUE;
+
        MonoError error;
        if (!mono_thread_create_internal (mono_get_root_domain (), selector_thread, NULL, MONO_THREAD_CREATE_FLAGS_THREADPOOL | MONO_THREAD_CREATE_FLAGS_SMALL_STACK, &error))
                g_error ("initialize: mono_thread_create_internal () failed due to %s", mono_error_get_message (&error));
+
+       mono_coop_mutex_unlock (&threadpool_io->updates_lock);
 }
 
 static void
@@ -591,6 +601,11 @@ ves_icall_System_IOSelector_Add (gpointer handle, MonoIOSelectorJob *job)
 
        mono_coop_mutex_lock (&threadpool_io->updates_lock);
 
+       if (!io_selector_running) {
+               mono_coop_mutex_unlock (&threadpool_io->updates_lock);
+               return;
+       }
+
        update = update_get_new ();
        update->type = UPDATE_ADD;
        update->data.add.fd = GPOINTER_TO_INT (handle);
@@ -618,6 +633,11 @@ mono_threadpool_io_remove_socket (int fd)
 
        mono_coop_mutex_lock (&threadpool_io->updates_lock);
 
+       if (!io_selector_running) {
+               mono_coop_mutex_unlock (&threadpool_io->updates_lock);
+               return;
+       }
+
        update = update_get_new ();
        update->type = UPDATE_REMOVE_SOCKET;
        update->data.add.fd = fd;
@@ -640,6 +660,11 @@ mono_threadpool_io_remove_domain_jobs (MonoDomain *domain)
 
        mono_coop_mutex_lock (&threadpool_io->updates_lock);
 
+       if (!io_selector_running) {
+               mono_coop_mutex_unlock (&threadpool_io->updates_lock);
+               return;
+       }
+
        update = update_get_new ();
        update->type = UPDATE_REMOVE_DOMAIN;
        update->data.remove_domain.domain = domain;
index c7de70f2715b9fa733dc58fc13a0ec4d61c896fc..c3f62f049e85abaf2437a436c207e1c3b8d72d96 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_THREADPOOL_IO_H_
 #define _MONO_METADATA_THREADPOOL_IO_H_
index 3a87574aab1015efd48bcca798342fa1ac8759e8..cfcecf95a85e73d07860d22ffdcc2419e3b2142c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * threadpool-worker.c: native threadpool worker
+/**
+ * \file
+ * native threadpool worker
  *
  * Author:
  *     Ludovic Henry (ludovic.henry@xamarin.com)
@@ -109,11 +110,6 @@ typedef struct {
        gdouble accumulated_sample_duration;
 } ThreadPoolHillClimbing;
 
-typedef struct {
-       MonoThreadPoolWorkerCallback callback;
-       gpointer data;
-} ThreadPoolWorkItem;
-
 typedef union {
        struct {
                gint16 max_working; /* determined by heuristic */
@@ -127,16 +123,15 @@ typedef union {
 typedef struct {
        MonoRefCount ref;
 
+       MonoThreadPoolWorkerCallback callback;
+
        ThreadPoolWorkerCounter counters;
 
        MonoCoopMutex parked_threads_lock;
        gint32 parked_threads_count;
        MonoCoopCond parked_threads_cond;
 
-       ThreadPoolWorkItem *work_items; // ThreadPoolWorkItem []
-       gint32 work_items_count;
-       gint32 work_items_size;
-       MonoCoopMutex work_items_lock;
+       volatile gint32 work_items_count;
 
        guint32 worker_creation_current_second;
        guint32 worker_creation_current_count;
@@ -220,8 +215,6 @@ destroy (gpointer data)
        mono_coop_mutex_destroy (&worker.parked_threads_lock);
        mono_coop_cond_destroy (&worker.parked_threads_cond);
 
-       mono_coop_mutex_destroy (&worker.work_items_lock);
-
        mono_coop_mutex_destroy (&worker.worker_creation_lock);
 
        mono_coop_mutex_destroy (&worker.heuristic_lock);
@@ -230,7 +223,7 @@ destroy (gpointer data)
 }
 
 void
-mono_threadpool_worker_init (void)
+mono_threadpool_worker_init (MonoThreadPoolWorkerCallback callback)
 {
        ThreadPoolHillClimbing *hc;
        const char *threads_per_cpu_env;
@@ -239,13 +232,12 @@ mono_threadpool_worker_init (void)
 
        mono_refcount_init (&worker, destroy);
 
+       worker.callback = callback;
+
        mono_coop_mutex_init (&worker.parked_threads_lock);
        worker.parked_threads_count = 0;
        mono_coop_cond_init (&worker.parked_threads_cond);
 
-       /* worker.work_items_size is inited to 0 */
-       mono_coop_mutex_init (&worker.work_items_lock);
-
        worker.worker_creation_current_second = -1;
        mono_coop_mutex_init (&worker.worker_creation_lock);
 
@@ -312,69 +304,32 @@ mono_threadpool_worker_cleanup (void)
 }
 
 static void
-work_item_lock (void)
-{
-       mono_coop_mutex_lock (&worker.work_items_lock);
-}
-
-static void
-work_item_unlock (void)
+work_item_push (void)
 {
-       mono_coop_mutex_unlock (&worker.work_items_lock);
-}
-
-static void
-work_item_push (MonoThreadPoolWorkerCallback callback, gpointer data)
-{
-       ThreadPoolWorkItem work_item;
-
-       g_assert (callback);
-
-       work_item.callback = callback;
-       work_item.data = data;
+       gint32 old, new;
 
-       work_item_lock ();
-
-       g_assert (worker.work_items_count <= worker.work_items_size);
-
-       if (G_UNLIKELY (worker.work_items_count == worker.work_items_size)) {
-               worker.work_items_size += 64;
-               worker.work_items = g_renew (ThreadPoolWorkItem, worker.work_items, worker.work_items_size);
-       }
-
-       g_assert (worker.work_items);
-
-       worker.work_items [worker.work_items_count ++] = work_item;
-
-       // printf ("[push] worker.work_items = %p, worker.work_items_count = %d, worker.work_items_size = %d\n",
-       //      worker.work_items, worker.work_items_count, worker.work_items_size);
+       do {
+               old = InterlockedRead (&worker.work_items_count);
+               g_assert (old >= 0);
 
-       work_item_unlock ();
+               new = old + 1;
+       } while (InterlockedCompareExchange (&worker.work_items_count, new, old) != old);
 }
 
 static gboolean
-work_item_try_pop (ThreadPoolWorkItem *work_item)
+work_item_try_pop (void)
 {
-       g_assert (work_item);
-
-       work_item_lock ();
-
-       // printf ("[pop]  worker.work_items = %p, worker.work_items_count = %d, worker.work_items_size = %d\n",
-       //      worker.work_items, worker.work_items_count, worker.work_items_size);
+       gint32 old, new;
 
-       if (worker.work_items_count == 0) {
-               work_item_unlock ();
-               return FALSE;
-       }
-
-       *work_item = worker.work_items [-- worker.work_items_count];
+       do {
+               old = InterlockedRead (&worker.work_items_count);
+               g_assert (old >= 0);
 
-       if (G_UNLIKELY (worker.work_items_count >= 64 * 3 && worker.work_items_count < worker.work_items_size / 2)) {
-               worker.work_items_size -= 64;
-               worker.work_items = g_renew (ThreadPoolWorkItem, worker.work_items, worker.work_items_size);
-       }
+               if (old == 0)
+                       return FALSE;
 
-       work_item_unlock ();
+               new = old - 1;
+       } while (InterlockedCompareExchange (&worker.work_items_count, new, old) != old);
 
        return TRUE;
 }
@@ -382,24 +337,18 @@ work_item_try_pop (ThreadPoolWorkItem *work_item)
 static gint32
 work_item_count (void)
 {
-       gint32 count;
-
-       work_item_lock ();
-       count = worker.work_items_count;
-       work_item_unlock ();
-
-       return count;
+       return InterlockedRead (&worker.work_items_count);
 }
 
 static void worker_request (void);
 
 void
-mono_threadpool_worker_enqueue (MonoThreadPoolWorkerCallback callback, gpointer data)
+mono_threadpool_worker_request (void)
 {
        if (!mono_refcount_tryinc (&worker))
                return;
 
-       work_item_push (callback, data);
+       work_item_push ();
 
        worker_request ();
 
@@ -522,12 +471,10 @@ worker_thread (gpointer unused)
        g_assert (thread);
 
        while (!mono_runtime_is_shutting_down ()) {
-               ThreadPoolWorkItem work_item;
-
                if (mono_thread_interruption_checkpoint ())
                        continue;
 
-               if (!work_item_try_pop (&work_item)) {
+               if (!work_item_try_pop ()) {
                        gboolean timeout;
 
                        timeout = worker_park ();
@@ -537,10 +484,10 @@ worker_thread (gpointer unused)
                        continue;
                }
 
-               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] worker executing %p (%p)",
-                       mono_native_thread_id_get (), work_item.callback, work_item.data);
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] worker executing",
+                       mono_native_thread_id_get ());
 
-               work_item.callback (work_item.data);
+               worker.callback ();
        }
 
        COUNTER_ATOMIC (counter, {
index 00cf11d64d09132ed4f7e120ea7bd9f0c95c69a4..9b2c51d7f65eaffadea062299bd6d96e26cefe8c 100644 (file)
@@ -1,19 +1,22 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_THREADPOOL_WORKER_H
 #define _MONO_METADATA_THREADPOOL_WORKER_H
 
 #include <glib.h>
 
-typedef void (*MonoThreadPoolWorkerCallback)(gpointer);
+typedef void (*MonoThreadPoolWorkerCallback)(void);
 
 void
-mono_threadpool_worker_init (void);
+mono_threadpool_worker_init (MonoThreadPoolWorkerCallback callback);
 
 void
 mono_threadpool_worker_cleanup (void);
 
 void
-mono_threadpool_worker_enqueue (MonoThreadPoolWorkerCallback callback, gpointer data);
+mono_threadpool_worker_request (void);
 
 gboolean
 mono_threadpool_worker_notify_completed (void);
index 0b36a37cee925f982d5d36686cbfecfb4e31e881..3c0fa3d7f6db0ebda4cd140ae42d6f7a7b60e716 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * threadpool.c: Microsoft threadpool runtime support
+/**
+ * \file
+ * Microsoft threadpool runtime support
  *
  * Author:
  *     Ludovic Henry (ludovic.henry@xamarin.com)
@@ -121,6 +122,9 @@ destroy (gpointer unused)
        mono_coop_mutex_destroy (&threadpool.domains_lock);
 }
 
+static void
+worker_callback (void);
+
 static void
 initialize (void)
 {
@@ -134,7 +138,7 @@ initialize (void)
        threadpool.limit_io_min = mono_cpu_count ();
        threadpool.limit_io_max = CLAMP (threadpool.limit_io_min * 100, MIN (threadpool.limit_io_min, 200), MAX (threadpool.limit_io_min, 200));
 
-       mono_threadpool_worker_init ();
+       mono_threadpool_worker_init (worker_callback);
 }
 
 static void
@@ -276,7 +280,7 @@ try_invoke_perform_wait_callback (MonoObject** exc, MonoError *error)
 }
 
 static void
-worker_callback (gpointer unused)
+worker_callback (void)
 {
        MonoError error;
        ThreadPoolDomain *tpdomain, *previous_tpdomain;
@@ -778,7 +782,7 @@ ves_icall_System_Threading_ThreadPool_RequestWorkerThread (void)
                counter._.starting ++;
        });
 
-       mono_threadpool_worker_enqueue (worker_callback, NULL);
+       mono_threadpool_worker_request ();
 
        mono_refcount_dec (&threadpool);
        return TRUE;
index a628e3311313b293480abd8dee3523f7645ba0fc..91b404fe275d4a8a981b099d2f7b428c40341c9b 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_METADATA_THREADPOOL_H_
 #define _MONO_METADATA_THREADPOOL_H_
 
index 25571e7f896f7877aed0cb90fef41920d6320ffd..9bf9cb639b046ab04165d36265e386eb3e830872 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * threads-types.h: Generic thread typedef support (includes
- * system-specific files)
+/**
+ * \file
+ * Generic thread typedef support (includes system-specific files)
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
@@ -227,7 +227,7 @@ uint32_t mono_alloc_special_static_data (uint32_t static_type, uint32_t size, ui
 void*    mono_get_special_static_data   (uint32_t offset);
 gpointer mono_get_special_static_data_for_thread (MonoInternalThread *thread, guint32 offset);
 
-MonoException* mono_thread_resume_interruption (void);
+MonoException* mono_thread_resume_interruption (gboolean exec);
 void mono_threads_perform_thread_dump (void);
 
 gboolean
@@ -253,7 +253,6 @@ mono_threads_detach_coop (gpointer cookie, gpointer *dummy);
 
 void mono_threads_begin_abort_protected_block (void);
 gboolean mono_threads_end_abort_protected_block (void);
-MonoException* mono_thread_try_resume_interruption (void);
 
 gboolean
 mono_thread_internal_current_is_attached (void);
index 57e1d9addf3d489102d8bab5e5219a1d1dcabd41..4a3c91fe2c704780e95aba5384c6b1f443114a99 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * threads.c: Thread support internal calls
+/**
+ * \file
+ * Thread support internal calls
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
@@ -219,9 +220,18 @@ get_next_managed_thread_id (void)
        return InterlockedIncrement (&managed_thread_id_counter);
 }
 
+/*
+ * We separate interruptions/exceptions into either sync (they can be processed anytime,
+ * normally as soon as they are set, and are set by the same thread) and async (they can't
+ * be processed inside abort protected blocks and are normally set by other threads). We
+ * can have both a pending sync and async interruption. In this case, the sync exception is
+ * processed first. Since we clean sync flag first, mono_thread_execute_interruption must
+ * also handle all sync type exceptions before the async type exceptions.
+ */
 enum {
-       INTERRUPT_REQUESTED_BIT = 0x1,
-       INTERRUPT_REQUEST_DEFERRED_BIT = 0x2,
+       INTERRUPT_SYNC_REQUESTED_BIT = 0x1,
+       INTERRUPT_ASYNC_REQUESTED_BIT = 0x2,
+       INTERRUPT_REQUESTED_MASK = 0x3,
        ABORT_PROT_BLOCK_SHIFT = 2,
        ABORT_PROT_BLOCK_BITS = 8,
        ABORT_PROT_BLOCK_MASK = (((1 << ABORT_PROT_BLOCK_BITS) - 1) << ABORT_PROT_BLOCK_SHIFT)
@@ -234,150 +244,141 @@ mono_thread_get_abort_prot_block_count (MonoInternalThread *thread)
        return (state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT;
 }
 
-static void
-verify_thread_state (gsize state)
-{
-       //can't have both INTERRUPT_REQUESTED_BIT and INTERRUPT_REQUEST_DEFERRED_BIT set at the same time
-       g_assert ((state & (INTERRUPT_REQUESTED_BIT | INTERRUPT_REQUEST_DEFERRED_BIT)) != (INTERRUPT_REQUESTED_BIT | INTERRUPT_REQUEST_DEFERRED_BIT));
-
-       //XXX This would be nice to be true, but can happen due to self-aborts (and possibly set-pending-exception)
-       //if prot_count > 0, INTERRUPT_REQUESTED_BIT must never be set
-       // int prot_count = (state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT;
-       // g_assert (!(prot_count > 0 && (state & INTERRUPT_REQUESTED_BIT)));
-}
-
 void
 mono_threads_begin_abort_protected_block (void)
 {
        MonoInternalThread *thread = mono_thread_internal_current ();
        gsize old_state, new_state;
+       int new_val;
        do {
                old_state = thread->thread_state;
-               verify_thread_state (old_state);
-
-               int new_val = ((old_state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT) + 1;
-
-               new_state = 0;
-               if (old_state & (INTERRUPT_REQUESTED_BIT | INTERRUPT_REQUEST_DEFERRED_BIT)) {
-                       if (old_state & INTERRUPT_REQUESTED_BIT)
-                               printf ("begin prot happy as it demoted interrupt to deferred interrupt\n");
-                       new_state |= INTERRUPT_REQUEST_DEFERRED_BIT;
-               }
 
+               new_val = ((old_state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT) + 1;
                //bounds check abort_prot_count
                g_assert (new_val > 0);
                g_assert (new_val < (1 << ABORT_PROT_BLOCK_BITS));
-               new_state |= new_val << ABORT_PROT_BLOCK_SHIFT;
 
+               new_state = old_state + (1 << ABORT_PROT_BLOCK_SHIFT);
        } while (InterlockedCompareExchangePointer ((volatile gpointer)&thread->thread_state, (gpointer)new_state, (gpointer)old_state) != (gpointer)old_state);
+
+       /* Defer async request since we won't be able to process until exiting the block */
+       if (new_val == 1 && (new_state & INTERRUPT_ASYNC_REQUESTED_BIT)) {
+               InterlockedDecrement (&thread_interruption_requested);
+               THREADS_INTERRUPT_DEBUG ("[%d] begin abort protected block old_state %ld new_state %ld, defer tir %d\n", thread->small_id, old_state, new_state, thread_interruption_requested);
+               if (thread_interruption_requested < 0)
+                       g_warning ("bad thread_interruption_requested state");
+       } else {
+               THREADS_INTERRUPT_DEBUG ("[%d] begin abort protected block old_state %ld new_state %ld, tir %d\n", thread->small_id, old_state, new_state, thread_interruption_requested);
+       }
 }
 
-gboolean
-mono_threads_end_abort_protected_block (void)
+static gboolean
+mono_thread_state_has_interruption (gsize state)
 {
-       MonoInternalThread *thread = mono_thread_internal_current ();
-       gsize old_state, new_state;
-       do {
-               old_state = thread->thread_state;
-               verify_thread_state (old_state);
-
-               int new_val = ((old_state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT) - 1;
-               new_state = 0;
-
-               if ((old_state & INTERRUPT_REQUEST_DEFERRED_BIT) && new_val == 0) {
-                       printf ("end abort on alert, promoted deferred to pront interrupt\n");
-                       new_state |= INTERRUPT_REQUESTED_BIT;
-               }
+       /* pending exception, self abort */
+       if (state & INTERRUPT_SYNC_REQUESTED_BIT)
+               return TRUE;
 
-               //bounds check abort_prot_count
-               g_assert (new_val >= 0);
-               g_assert (new_val < (1 << ABORT_PROT_BLOCK_BITS));
-               new_state |= new_val << ABORT_PROT_BLOCK_SHIFT;
+       /* abort, interruption, suspend */
+       if ((state & INTERRUPT_ASYNC_REQUESTED_BIT) && !(state & ABORT_PROT_BLOCK_MASK))
+               return TRUE;
 
-       } while (InterlockedCompareExchangePointer ((volatile gpointer)&thread->thread_state, (gpointer)new_state, (gpointer)old_state) != (gpointer)old_state);
-       return (new_state & INTERRUPT_REQUESTED_BIT) == INTERRUPT_REQUESTED_BIT;
+       return FALSE;
 }
 
-
-//Don't use this function, use inc/dec below
-static void
-mono_thread_abort_prot_block_count_add (MonoInternalThread *thread, int val)
+gboolean
+mono_threads_end_abort_protected_block (void)
 {
+       MonoInternalThread *thread = mono_thread_internal_current ();
        gsize old_state, new_state;
+       int new_val;
        do {
                old_state = thread->thread_state;
-               verify_thread_state (old_state);
 
-               int new_val = val + ((old_state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT);
                //bounds check abort_prot_count
+               new_val = ((old_state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT) - 1;
                g_assert (new_val >= 0);
                g_assert (new_val < (1 << ABORT_PROT_BLOCK_BITS));
-               new_state = (old_state & ~ABORT_PROT_BLOCK_MASK) | (new_val << ABORT_PROT_BLOCK_SHIFT);
 
+               new_state = old_state - (1 << ABORT_PROT_BLOCK_SHIFT);
        } while (InterlockedCompareExchangePointer ((volatile gpointer)&thread->thread_state, (gpointer)new_state, (gpointer)old_state) != (gpointer)old_state);
-}
 
-static void
-mono_thread_inc_abort_prot_block_count (MonoInternalThread *thread)
-{
-       mono_thread_abort_prot_block_count_add (thread, 1);
-}
+       if (new_val == 0 && (new_state & INTERRUPT_ASYNC_REQUESTED_BIT)) {
+               InterlockedIncrement (&thread_interruption_requested);
+               THREADS_INTERRUPT_DEBUG ("[%d] end abort protected block old_state %ld new_state %ld, restore tir %d\n", thread->small_id, old_state, new_state, thread_interruption_requested);
+       } else {
+               THREADS_INTERRUPT_DEBUG ("[%d] end abort protected block old_state %ld new_state %ld, tir %d\n", thread->small_id, old_state, new_state, thread_interruption_requested);
+       }
 
-static void
-mono_thread_dec_abort_prot_block_count (MonoInternalThread *thread)
-{
-       mono_thread_abort_prot_block_count_add (thread, -1);
+       return mono_thread_state_has_interruption (new_state);
 }
 
 static gboolean
 mono_thread_get_interruption_requested (MonoInternalThread *thread)
 {
        gsize state = thread->thread_state;
-       return (state & INTERRUPT_REQUESTED_BIT) == INTERRUPT_REQUESTED_BIT;
+
+       return mono_thread_state_has_interruption (state);
 }
 
-/* Returns TRUE is there was a state change */
+/*
+ * Returns TRUE is there was a state change
+ * We clear a single interruption request, sync has priority.
+ */
 static gboolean
 mono_thread_clear_interruption_requested (MonoInternalThread *thread)
 {
        gsize old_state, new_state;
        do {
                old_state = thread->thread_state;
-               verify_thread_state (old_state);
 
-               //Already cleared
-               if (!(old_state & (INTERRUPT_REQUESTED_BIT | INTERRUPT_REQUEST_DEFERRED_BIT)))
+               // no interruption to process
+               if (!(old_state & INTERRUPT_SYNC_REQUESTED_BIT) &&
+                               (!(old_state & INTERRUPT_ASYNC_REQUESTED_BIT) || (old_state & ABORT_PROT_BLOCK_MASK)))
                        return FALSE;
-               new_state = old_state & ~(INTERRUPT_REQUESTED_BIT | INTERRUPT_REQUEST_DEFERRED_BIT);
+
+               if (old_state & INTERRUPT_SYNC_REQUESTED_BIT)
+                       new_state = old_state & ~INTERRUPT_SYNC_REQUESTED_BIT;
+               else
+                       new_state = old_state & ~INTERRUPT_ASYNC_REQUESTED_BIT;
        } while (InterlockedCompareExchangePointer ((volatile gpointer)&thread->thread_state, (gpointer)new_state, (gpointer)old_state) != (gpointer)old_state);
+
+       InterlockedDecrement (&thread_interruption_requested);
+       THREADS_INTERRUPT_DEBUG ("[%d] clear interruption old_state %ld new_state %ld, tir %d\n", thread->small_id, old_state, new_state, thread_interruption_requested);
+       if (thread_interruption_requested < 0)
+               g_warning ("bad thread_interruption_requested state");
        return TRUE;
 }
 
-/* Returns TRUE is there was a state change */
+/* Returns TRUE is there was a state change and the interruption can be processed */
 static gboolean
 mono_thread_set_interruption_requested (MonoInternalThread *thread)
 {
        //always force when the current thread is doing it to itself.
-       gboolean force_interrupt = thread == mono_thread_internal_current ();
+       gboolean sync = thread == mono_thread_internal_current ();
        gsize old_state, new_state;
        do {
                old_state = thread->thread_state;
-               verify_thread_state (old_state);
 
-               int prot_count = ((old_state & ABORT_PROT_BLOCK_MASK) >> ABORT_PROT_BLOCK_SHIFT);
                //Already set
-               if (old_state & (INTERRUPT_REQUESTED_BIT | INTERRUPT_REQUEST_DEFERRED_BIT))
+               if ((sync && (old_state & INTERRUPT_SYNC_REQUESTED_BIT)) ||
+                               (!sync && (old_state & INTERRUPT_ASYNC_REQUESTED_BIT)))
                        return FALSE;
 
-               //If there's an outstanding prot block, we queue it
-               if (prot_count && !force_interrupt) {
-                       printf ("set interrupt unhappy, as it's only putting a deferred req %d\n", force_interrupt);
-                       new_state = old_state | INTERRUPT_REQUEST_DEFERRED_BIT;
-               } else
-                       new_state = old_state | INTERRUPT_REQUESTED_BIT;
+               if (sync)
+                       new_state = old_state | INTERRUPT_SYNC_REQUESTED_BIT;
+               else
+                       new_state = old_state | INTERRUPT_ASYNC_REQUESTED_BIT;
        } while (InterlockedCompareExchangePointer ((volatile gpointer)&thread->thread_state, (gpointer)new_state, (gpointer)old_state) != (gpointer)old_state);
 
-       return (new_state & INTERRUPT_REQUESTED_BIT) == INTERRUPT_REQUESTED_BIT;
+       if (sync || !(new_state & ABORT_PROT_BLOCK_MASK)) {
+               InterlockedIncrement (&thread_interruption_requested);
+               THREADS_INTERRUPT_DEBUG ("[%d] set interruption on [%d] old_state %ld new_state %ld, tir %d\n", mono_thread_internal_current ()->small_id, thread->small_id, old_state, new_state, thread_interruption_requested);
+       } else {
+               THREADS_INTERRUPT_DEBUG ("[%d] set interruption on [%d] old_state %ld new_state %ld, tir deferred %d\n", mono_thread_internal_current ()->small_id, thread->small_id, old_state, new_state, thread_interruption_requested);
+       }
+
+       return sync || !(new_state & ABORT_PROT_BLOCK_MASK);
 }
 
 static inline MonoNativeThreadId
@@ -1002,19 +1003,31 @@ done:
        return ret;
 }
 
-void mono_thread_new_init (intptr_t tid, gpointer stack_start, gpointer func)
+/**
+ * mono_thread_new_init:
+ */
+void
+mono_thread_new_init (intptr_t tid, gpointer stack_start, gpointer func)
 {
        if (mono_thread_start_cb) {
                mono_thread_start_cb (tid, stack_start, func);
        }
 }
 
-void mono_threads_set_default_stacksize (guint32 stacksize)
+/**
+ * mono_threads_set_default_stacksize:
+ */
+void
+mono_threads_set_default_stacksize (guint32 stacksize)
 {
        default_stacksize = stacksize;
 }
 
-guint32 mono_threads_get_default_stacksize (void)
+/**
+ * mono_threads_get_default_stacksize:
+ */
+guint32
+mono_threads_get_default_stacksize (void)
 {
        return default_stacksize;
 }
@@ -1047,6 +1060,9 @@ mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, Mo
        return internal;
 }
 
+/**
+ * mono_thread_create:
+ */
 void
 mono_thread_create (MonoDomain *domain, gpointer func, gpointer arg)
 {
@@ -1061,6 +1077,9 @@ mono_thread_create_checked (MonoDomain *domain, gpointer func, gpointer arg, Mon
        return (NULL != mono_thread_create_internal (domain, func, arg, MONO_THREAD_CREATE_FLAGS_NONE, error));
 }
 
+/**
+ * mono_thread_attach:
+ */
 MonoThread *
 mono_thread_attach (MonoDomain *domain)
 {
@@ -1168,8 +1187,7 @@ mono_thread_detach_internal (MonoInternalThread *thread)
        Leaving the counter unbalanced will cause a performance degradation since all threads
        will now keep checking their local flags all the time.
        */
-       if (mono_thread_clear_interruption_requested (thread))
-               InterlockedDecrement (&thread_interruption_requested);
+       mono_thread_clear_interruption_requested (thread);
 
        mono_threads_lock ();
 
@@ -1263,6 +1281,9 @@ done:
         */
 }
 
+/**
+ * mono_thread_detach:
+ */
 void
 mono_thread_detach (MonoThread *thread)
 {
@@ -1270,12 +1291,12 @@ 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.
+ * 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.
+ * can be called from pthread dtors, like <code>dealloc:</code> implementations in Objective-C.
  */
 mono_bool
 mono_thread_detach_if_exiting (void)
@@ -1305,6 +1326,9 @@ mono_thread_internal_current_is_attached (void)
        return TRUE;
 }
 
+/**
+ * mono_thread_exit:
+ */
 void
 mono_thread_exit (void)
 {
@@ -1497,10 +1521,9 @@ mono_thread_get_name (MonoInternalThread *this_obj, guint32 *name_len)
        return res;
 }
 
-/*
+/**
  * mono_thread_get_name_utf8:
- *
- * Return the name of the thread in UTF-8.
+ * \returns the name of the thread in UTF-8.
  * Return NULL if the thread has no name.
  * The returned memory is owned by the caller.
  */
@@ -1523,11 +1546,10 @@ mono_thread_get_name_utf8 (MonoThread *thread)
        return tname;
 }
 
-/*
+/**
  * mono_thread_get_managed_id:
- *
- * Return the Thread.ManagedThreadId value of `thread`.
- * Returns -1 if `thread` is NULL.
+ * \returns the \c Thread.ManagedThreadId value of \p thread.
+ * Returns \c -1 if \p thread is NULL.
  */
 int32_t
 mono_thread_get_managed_id (MonoThread *thread)
@@ -1692,6 +1714,9 @@ ves_icall_System_Threading_Thread_ByteArrayToCurrentDomain (MonoArray *arr)
        return result;
 }
 
+/**
+ * mono_thread_current:
+ */
 MonoThread *
 mono_thread_current (void)
 {
@@ -2322,10 +2347,8 @@ void ves_icall_System_Threading_Thread_Interrupt_internal (MonoThread *this_obj)
 
 /**
  * mono_thread_current_check_pending_interrupt:
- *
  * Checks if there's a interruption request and set the pending exception if so.
- *
- * @returns true if a pending exception was set
+ * \returns true if a pending exception was set
  */
 gboolean
 mono_thread_current_check_pending_interrupt (void)
@@ -2403,10 +2426,8 @@ ves_icall_System_Threading_Thread_Abort (MonoInternalThread *thread, MonoObject
 
 /**
  * mono_thread_internal_abort:
- *
- * Request thread @thread to be aborted.
- *
- * @thread MUST NOT be the current thread.
+ * Request thread \p thread to be aborted.
+ * \p thread MUST NOT be the current thread.
  */
 void
 mono_thread_internal_abort (MonoInternalThread *thread)
@@ -2624,6 +2645,9 @@ is_running_protected_wrapper (void)
        return found;
 }
 
+/**
+ * mono_thread_stop:
+ */
 void
 mono_thread_stop (MonoThread *thread)
 {
@@ -3003,7 +3027,11 @@ void mono_thread_init (MonoThreadStartCB start_cb,
        mono_thread_attach_cb = attach_cb;
 }
 
-void mono_thread_cleanup (void)
+/**
+ * mono_thread_cleanup:
+ */
+void
+mono_thread_cleanup (void)
 {
 #if !defined(RUN_IN_SUBTHREAD) && !defined(HOST_WIN32)
        /* The main thread must abandon any held mutexes (particularly
@@ -3034,6 +3062,9 @@ mono_threads_install_cleanup (MonoThreadCleanupFunc func)
        mono_thread_cleanup_fn = func;
 }
 
+/**
+ * mono_thread_set_manage_callback:
+ */
 void
 mono_thread_set_manage_callback (MonoThread *thread, MonoThreadManageCallback func)
 {
@@ -3227,7 +3258,11 @@ mono_threads_set_shutting_down (void)
        }
 }
 
-void mono_thread_manage (void)
+/**
+ * mono_thread_manage:
+ */
+void
+mono_thread_manage (void)
 {
        struct wait_data wait_data;
        struct wait_data *wait = &wait_data;
@@ -4387,8 +4422,6 @@ mono_thread_execute_interruption (void)
 #ifdef HOST_WIN32
                WaitForSingleObjectEx (GetCurrentThread(), 0, TRUE);
 #endif
-               InterlockedDecrement (&thread_interruption_requested);
-
                /* Clear the interrupted flag of the thread so it can wait again */
                mono_thread_info_clear_self_interrupt ();
        }
@@ -4449,7 +4482,6 @@ mono_thread_request_interruption (gboolean running_managed)
 
        if (!mono_thread_set_interruption_requested (thread))
                return NULL;
-       InterlockedIncrement (&thread_interruption_requested);
 
        if (!running_managed || is_running_protected_wrapper ()) {
                /* Can't stop while in unmanaged code. Increase the global interruption
@@ -4474,7 +4506,7 @@ mono_thread_request_interruption (gboolean running_managed)
 /*This function should be called by a thread after it has exited all of
  * its handle blocks at interruption time.*/
 MonoException*
-mono_thread_resume_interruption (void)
+mono_thread_resume_interruption (gboolean exec)
 {
        MonoInternalThread *thread = mono_thread_internal_current ();
        gboolean still_aborting;
@@ -4489,15 +4521,17 @@ mono_thread_resume_interruption (void)
 
        /*This can happen if the protected block called Thread::ResetAbort*/
        if (!still_aborting)
-               return FALSE;
+               return NULL;
 
        if (!mono_thread_set_interruption_requested (thread))
                return NULL;
-       InterlockedIncrement (&thread_interruption_requested);
 
        mono_thread_info_self_interrupt ();
 
-       return mono_thread_execute_interruption ();
+       if (exec)
+               return mono_thread_execute_interruption ();
+       else
+               return NULL;
 }
 
 gboolean mono_thread_interruption_requested ()
@@ -4624,10 +4658,8 @@ mono_thread_set_state (MonoInternalThread *thread, MonoThreadState state)
 
 /**
  * mono_thread_test_and_set_state:
- *
- * Test if current state of @thread include @test. If it does not, OR @set into the state.
- *
- * Returns TRUE is @set was OR'd in.
+ * Test if current state of \p thread include \p test. If it does not, OR \p set into the state.
+ * \returns TRUE if \p set was OR'd in.
  */
 gboolean
 mono_thread_test_and_set_state (MonoInternalThread *thread, MonoThreadState test, MonoThreadState set)
@@ -4750,8 +4782,6 @@ async_abort_critical (MonoThreadInfo *info, gpointer ud)
        if (!mono_thread_set_interruption_requested (thread))
                return MonoResumeThread;
 
-       InterlockedIncrement (&thread_interruption_requested);
-
        ji = mono_thread_info_get_last_managed (info);
        protected_wrapper = ji && !ji->is_trampoline && !ji->async && mono_threads_is_critical_method (mono_jit_info_get_method (ji));
        running_managed = mono_jit_info_match (ji, MONO_CONTEXT_GET_IP (&mono_thread_info_get_suspend_state (info)->ctx));
@@ -4842,8 +4872,7 @@ async_suspend_critical (MonoThreadInfo *info, gpointer ud)
                        return KeepSuspended;
                }
        } else {
-               if (mono_thread_set_interruption_requested (thread))
-                       InterlockedIncrement (&thread_interruption_requested);
+               mono_thread_set_interruption_requested (thread);
                if (data->interrupt)
                        data->interrupt_token = mono_thread_info_prepare_interrupt ((MonoThreadInfo *)thread->thread_info);
 
@@ -4923,14 +4952,14 @@ mono_thread_internal_suspend_for_shutdown (MonoInternalThread *thread)
        mono_thread_info_safe_suspend_and_run (thread_get_tid (thread), FALSE, suspend_for_shutdown_critical, NULL);
 }
 
-/*
+/**
  * mono_thread_is_foreign:
- * @thread: the thread to query
+ * \param thread the thread to query
  *
  * This function allows one to determine if a thread was created by the mono runtime and has
- * a well defined lifecycle or it's a foreigh one, created by the native environment.
+ * a well defined lifecycle or it's a foreign one, created by the native environment.
  *
- * Returns: TRUE if @thread was not created by the runtime.
+ * \returns TRUE if \p thread was not created by the runtime.
  */
 mono_bool
 mono_thread_is_foreign (MonoThread *thread)
@@ -5167,20 +5196,6 @@ mono_threads_detach_coop (gpointer cookie, gpointer *dummy)
        }
 }
 
-MonoException*
-mono_thread_try_resume_interruption (void)
-{
-       MonoInternalThread *thread;
-
-       thread = mono_thread_internal_current ();
-       if (!mono_get_eh_callbacks ()->mono_above_abort_threshold ())
-               return NULL;
-       if (mono_thread_get_abort_prot_block_count (thread) > 0 || mono_get_eh_callbacks ()->mono_current_thread_has_handle_block_guard ())
-               return NULL;
-
-       return mono_thread_resume_interruption ();
-}
-
 #if 0
 /* Returns TRUE if the current thread is ready to be interrupted. */
 gboolean
index 2ab8b09ea066069f17df38e3deb1ab59945ed9dc..bad65287b58d49393c804f3d772af7416ed4aac0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * threads.h: Threading API
+/**
+ * \file
+ * Threading API
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index be8904c8a3ef8bd0186f4ac84c2863a8fd41d44c..a1c58944d7404369baf5dea9daaf75f0fa4e519f 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_METADATA_TOKENTYPE_H_
 #define _MONO_METADATA_TOKENTYPE_H_
 
index 341b729255753123068c5dfcb32b8dc2d12abd59..821de196bdd6f68bb2bcb982f8a3c1333c7f95c1 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_METADATA_VERIFY_INTERNAL_H__
 #define __MONO_METADATA_VERIFY_INTERNAL_H__
 
index e2cec88115b46804b96d1ec856b029954428da35..3677d9e4b7000a26e269aebc690e625978725d77 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * verify.c: 
+/**
+ * \file
  *
  * Author:
  *     Mono Project (http://www.mono-project.com)
@@ -644,9 +644,9 @@ is_valid_generic_instantiation (MonoGenericContainer *gc, MonoGenericContext *co
 /**
  * mono_generic_param_is_constraint_compatible:
  *
- * Returns: TRUE if @candidate is constraint compatible with @target.
+ * \returns TRUE if \p candidate is constraint compatible with \p target.
  * 
- * This means that @candidate constraints are a super set of @target constaints
+ * This means that \p candidate constraints are a super set of \p target constaints
  */
 static gboolean
 mono_generic_param_is_constraint_compatible (VerifyContext *ctx, MonoGenericParam *target, MonoGenericParam *candidate, MonoClass *candidate_param_class, MonoGenericContext *context)
@@ -1170,6 +1170,10 @@ stack_slot_full_name (ILStackDesc *value)
 }
 
 //////////////////////////////////////////////////////////////////
+
+/**
+ * mono_free_verify_list:
+ */
 void
 mono_free_verify_list (GSList *list)
 {
@@ -4813,6 +4817,10 @@ mono_opcode_is_prefix (int op)
 /*
  * FIXME: need to distinguish between valid and verifiable.
  * Need to keep track of types on the stack.
+ */
+
+/**
+ * mono_method_verify:
  * Verify types for opcodes.
  */
 GSList*
@@ -6015,10 +6023,8 @@ mono_verify_corlib ()
 
 /**
  * mono_verifier_is_enabled_for_method:
- * @method: the method to probe
- *
- * Returns TRUE if @method needs to be verified.
- * 
+ * \param method the method to probe
+ * \returns TRUE if \p method needs to be verified.
  */
 gboolean
 mono_verifier_is_enabled_for_method (MonoMethod *method)
@@ -6028,10 +6034,8 @@ mono_verifier_is_enabled_for_method (MonoMethod *method)
 
 /**
  * mono_verifier_is_enabled_for_class:
- * @klass: The `MonoClass` to probe
- *
- * Returns TRUE if @klass need to be verified.
- * 
+ * \param klass The \c MonoClass to probe
+ * \returns TRUE if \p klass need to be verified.
  */
 gboolean
 mono_verifier_is_enabled_for_class (MonoClass *klass)
index bc4b2d293dd4771fa01947fb4e37cca1ecb67e56..ed7920e69f9346ecadb255199f81b9529eee6fc2 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_METADATA_VERIFY_H__
 #define __MONO_METADATA_VERIFY_H__
 
index 6192d880d47ca3d2a88baec230a29c907eed6c34..ad0aa9b5a77a63ec5da728fba4e84b0725cbbd76 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "w32error.h"
 
index 8b8303968fad595402d17f11cfc1f6ef7627d840..a5253c15c74d03aca483a165d1ad773a33c34477 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include <windows.h>
 
index b02f814fdbfcc5709a2be77b2f879d7cd92e861d..c8fb1717a52225a1bb1fda4186822b821fc2a1b0 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32ERROR_H_
 #define _MONO_METADATA_W32ERROR_H_
index 0300e204d7092f6a50ccc3eae69a4aec253cf4f4..246ddadf3f751a0e8b599a5b7b6f648891345f31 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32event-unix.c: Runtime support for managed Event on Unix
+/**
+ * \file
+ * Runtime support for managed Event on Unix
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index 343347da362baca44d1d2a7998f38213c2739ff5..792735b02687d3046fd65878a6e37f2ab09714af 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32event-win32.c: Runtime support for managed Event on Win32
+/**
+ * \file
+ * Runtime support for managed Event on Win32
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index f1fbd702872e7912a66264241abb6305a60e855a..3e8d65de06ea8f608c00b39c4d91097d73de0dac 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32EVENT_H_
 #define _MONO_METADATA_W32EVENT_H_
index 0458a64d30b0a9178dd71efbd735c43e2e378368..0f7876c9ddf3ef023e915af0b5128e50ac27c425 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 99e02a47e0bd950407664d1caac463edea128108..62d44889be9b9baa3ff3da048b144c3e40ed3326 100644 (file)
@@ -1,5 +1,6 @@
 /*     $OpenBSD: glob.c,v 1.26 2005/11/28 17:50:12 deraadt Exp $ */
-/*
+/**
+ * \file
  * Copyright (c) 1989, 1993
  *     The Regents of the University of California.  All rights reserved.
  *
index b19230896258026746b47347adb6f93e3b93172e..81f604ca43f2a31f7cc8ea2deced92ab8b8eee8a 100644 (file)
@@ -1,7 +1,8 @@
 /*     $OpenBSD: glob.h,v 1.10 2005/12/13 00:35:22 millert Exp $       */
 /*     $NetBSD: glob.h,v 1.5 1994/10/26 00:55:56 cgd Exp $     */
 
-/*
+/**
+ * \file
  * Copyright (c) 1989, 1993
  *     The Regents of the University of California.  All rights reserved.
  *
index 084a1e6792c0192caec7c0bc1aebdaa9c7285465..734b43b41f629ccad056873ed12050c78d9db1a1 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include <config.h>
 #include <glib.h>
@@ -554,7 +557,7 @@ static gint
 get_errno_from_g_file_error (gint error)
 {
        switch (error) {
-#ifdef EACCESS
+#ifdef EACCES
        case G_FILE_ERROR_ACCES: return EACCES;
 #endif
 #ifdef ENAMETOOLONG
@@ -611,7 +614,7 @@ get_errno_from_g_file_error (gint error)
 #ifdef EINTR
        case G_FILE_ERROR_INTR: return EINTR;
 #endif
-#ifdef EWIO
+#ifdef EIO
        case G_FILE_ERROR_IO: return EIO;
 #endif
 #ifdef EPERM
index 0c7c97f93c67a1a76148c974fd79d080fa314dcf..a60b4fa4ffa7a6a48ec0f26c9ce7fe2dad9d5374 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index c0ab592f6078316c1dd3736bb75a3d9dc46147b1..ca2192652ea1fa00bc4da1a62612dc9b280dc5e2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32file-win32-uwp.c: UWP w32file support for Mono.
+/**
+ * \file
+ * UWP w32file support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index df96ee154476d9e9bef3fcc681eee2c772b22a90..8b1c3a9f5b87938d165d4c66af723fe2d5cd789e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32file-win32.c: Windows File IO internal calls.
+/**
+ * \file
+ * Windows File IO internal calls.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 5086bc442ef339c8a0fd77e530d81fe173e86199..5c86cee116c5ce180e4fc85fa19efebbde8e3e24 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32file.c: File IO internal calls
+/**
+ * \file
+ * File IO internal calls
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index b2cf4f63c0c9b24d801b5229fe74b91d1bddf2f2..65afdb31d786f01475530e1d15ed21ff2c069feb 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32file.h: File IO internal calls
+/**
+ * \file
+ * File IO internal calls
  *
  * Authors:
  *     Dick Porter (dick@ximian.com)
index 2441f9526185f088956b540e4c010174d26b72e1..50ca016f284c309976d362d269afa900fc5f43d9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32handle-namespace.c: namespace for w32handles
+/**
+ * \file
+ * namespace for w32handles
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index 75797a80d65e0fba735a99fad2b2b916d85bf9a6..6d9c4e6c7be4802ea46eb554ac8921899143fbd8 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32HANDLE_NAMESPACE_H_
 #define _MONO_METADATA_W32HANDLE_NAMESPACE_H_
@@ -25,4 +28,4 @@ mono_w32handle_namespace_unlock (void);
 gpointer
 mono_w32handle_namespace_search_handle (MonoW32HandleType type, gchar *name);
 
-#endif /* _MONO_METADATA_W32HANDLE_NAMESPACE_H_ */
\ No newline at end of file
+#endif /* _MONO_METADATA_W32HANDLE_NAMESPACE_H_ */
index 7563c2cd7f0935936def6bc6bc0fa0aea1344947..cff31a8928e08455534390c5816019dc27937ee6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32handle.c:  Generic and internal operations on handles
+/**
+ * \file
+ * Generic and internal operations on handles
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index f3f546c10a98626a934696e3868b5dd91ef2afe0..741dd0832356212c99d603faf744da68e4ffc4cf 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32HANDLE_H_
 #define _MONO_METADATA_W32HANDLE_H_
index f98779da887c5ccfd82d17b9f2e5941b3d082106..ee3ae7e740d24b3990dc2621f9f63fd536892252 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32mutex-unix.c: Runtime support for managed Mutex on Unix
+/**
+ * \file
+ * Runtime support for managed Mutex on Unix
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index 6f967e8d3262a9e4e6f0e92910203d12171dd7a7..44b29b5c14bbf1e4175773710cb4c0f6319f7eb5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32mutex-win32.c: Runtime support for managed Mutex on Win32
+/**
+ * \file
+ * Runtime support for managed Mutex on Win32
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index 917b36f1dd37fe3415cc36c58487ea3b7d3f1d1c..b80fd1c3ce24d98c9f141f91d35c07fcb94f3a72 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32MUTEX_H_
 #define _MONO_METADATA_W32MUTEX_H_
index 45893772e98f466b922565a39a69880b5f38c56f..1bb016736b4186b61df3c54289e26ca0461e010c 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32PROCESS_INTERNALS_H_
 #define _MONO_METADATA_W32PROCESS_INTERNALS_H_
index ce3b9996133c7736e325536651b1d8d8b0196d9d..e67cec6b2d1991bd474dd27a6dbb961177b0a040 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "w32process.h"
 #include "w32process-unix-internals.h"
index 2bb37261ef65c85ce9001ab012c0deade9d52415..50384b8424431d01e92ef16a28539efe994486d5 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "w32process.h"
 #include "w32process-unix-internals.h"
index 3dfee3c60789255ccebfbcb68ceb3d71e66d2982..ec028ad7bbc8b693276c20a3a52ff28f2127ec85 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "w32process.h"
 #include "w32process-unix-internals.h"
index 72fd6088860040f2855e360ae86f9faa6c2b323d..5db6bd49446d42a422be8c427b0ee3068c07eb0f 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32PROCESS_UNIX_INTERNALS_H_
 #define _MONO_METADATA_W32PROCESS_UNIX_INTERNALS_H_
index d6696cab584277ab946a3ba8f37f837807c431e5..9c4bdc25f7fc872dbce66531a984a8c61b9384b8 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "w32process.h"
 #include "w32process-unix-internals.h"
index 45d45a87452ed209cf6d46e6d6021657031e55b7..642f77a7ac05941f27fb9ce4bb95adc15234b00c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * process.c: System.Diagnostics.Process support
+/**
+ * \file
+ * System.Diagnostics.Process support
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index 15fa8aae1d9761c246c35937483ef0a390f3a409..14792024826b89f6b2c9f70318a72c2ee6d10724 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 8c6b93d819ebe810d996cfee61ea3c3fdedea095..be769f4b320d1231e88856fa3854be81a33df5f7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * process-windows-uwp.c: UWP process support for Mono.
+/**
+ * \file
+ * UWP process support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index ae8afd434373e708abe7002e72d127f52bb5b303..53cf95bc358e93a57c23737f7da1b6cb0d82388c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * process.c: System.Diagnostics.Process support
+/**
+ * \file
+ * System.Diagnostics.Process support
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index 960ad07697374077b14c8fcc75348e80c056b1fc..8de42cbcdfe7790bba989e07dea89ef79a174ddf 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include <glib.h>
 
index 2a1efc79efa117186028678eb0bcb9ec11d51837..7a33f2a6c6b69271eaaed8f707322b2c0e8da770 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32process.h: System.Diagnostics.Process support
+/**
+ * \file
+ * System.Diagnostics.Process support
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index b40a779cb4aca33f37a03ed5004c012f74a2bb16..22336c2fd45e90ba75451c214541bf89e9439c3e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32semaphore-unix.c: Runtime support for managed Semaphore on Unix
+/**
+ * \file
+ * Runtime support for managed Semaphore on Unix
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index bd6bdc97e8e3fcc7d749d0464a758e30e559e846..ca4ec59b439a98aa00bc78b040584f9ceaea26e9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32semaphore-win32.c: Runtime support for managed Semaphore on Win32
+/**
+ * \file
+ * Runtime support for managed Semaphore on Win32
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
@@ -47,4 +48,4 @@ ves_icall_System_Threading_Semaphore_OpenSemaphore_internal (MonoString *name, g
        *error = GetLastError ();
 
        return sem;
-}
\ No newline at end of file
+}
index 789dfbef70f0a3db26c4a114491c0afdcbbf199c..13c963a10a4b7d0dc025fd141ac3d49a769a5169 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_W32SEMAPHORE_H_
 #define _MONO_METADATA_W32SEMAPHORE_H_
index be189389bf5470ae36cd014afd21e59b0c14f2d5..5122fdf5ed1573a7dc05d877b8709c1aba11441d 100644 (file)
@@ -1,9 +1,9 @@
-/*
-* w32socket-internals.h
-*
-* Copyright 2016 Microsoft
-* Licensed under the MIT license. See LICENSE file in the project root for full license information.
-*/
+/**
+ * \file
+ *
+ * Copyright 2016 Microsoft
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ */
 #ifndef __MONO_METADATA_W32SOCKET_INTERNALS_H__
 #define __MONO_METADATA_W32SOCKET_INTERNALS_H__
 
index f0139c318186b75d4755dc7b113c2bc0fa793bdc..70b36ed2fa36feb4b22bd3579f3dc6e551a35207 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32socket-unix.c: Unix specific socket code.
+/**
+ * \file
+ * Unix specific socket code.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 1c6f8fd8307a8203a200e041380a1dff4048d4f2..e6a6f9713a42afb628240a0fc970286528629a0c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32socket-win32.c: Windows specific socket code.
+/**
+ * \file
+ * Windows specific socket code.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 8bc8b49a8c5b70bb2043829c7bb12797141bf069..90ee4869efeb90136f3b552f0ff7602624153051 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * socket-io.c: Socket IO internal calls
+/**
+ * \file
+ * Socket IO internal calls
  *
  * Authors:
  *     Dick Porter (dick@ximian.com)
@@ -47,7 +48,7 @@
 
 #include <mono/metadata/object.h>
 #include <mono/metadata/exception.h>
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/w32file.h>
 #include <mono/metadata/threads.h>
@@ -641,7 +642,7 @@ get_socket_assembly (void)
 
                socket_assembly = mono_image_loaded ("System");
                if (!socket_assembly) {
-                       MonoAssembly *sa = mono_assembly_open ("System.dll", NULL);
+                       MonoAssembly *sa = mono_assembly_open_predicate ("System.dll", FALSE, FALSE, NULL, NULL, NULL);
                
                        if (!sa) {
                                g_assert_not_reached ();
@@ -1973,7 +1974,7 @@ ves_icall_System_Net_Sockets_Socket_GetSocketOption_obj_internal (gsize sock, gi
                if (mono_posix_image == NULL) {
                        mono_posix_image = mono_image_loaded ("Mono.Posix");
                        if (!mono_posix_image) {
-                               MonoAssembly *sa = mono_assembly_open ("Mono.Posix.dll", NULL);
+                               MonoAssembly *sa = mono_assembly_open_predicate ("Mono.Posix.dll", FALSE, FALSE, NULL, NULL, NULL);
                                if (!sa) {
                                        *werror = WSAENOPROTOOPT;
                                        return;
index dade775479a4cf40ac43e158e6701dadd25174fc..58ef7079f0da4e01cb53ac09650b56ccaa26aeb2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * w32socket.h: System.Net.Sockets.Socket support
+/**
+ * \file
+ * System.Net.Sockets.Socket support
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index 85241847c330049ca9c5442f3926c65468fb18d5..90ac3d80ad37cba2e2b00d2bb0cbd5f4ca9b24d8 100644 (file)
@@ -1,4 +1,6 @@
-/* NOTE NOTE NOTE
+/**
+ * \file
+ * NOTE NOTE NOTE
  * No additional wrapper types should be added.
  * If a new wrapper is asolutely necessary, an existing one needs
  * to be removed first (with all the change that implies).
index 4592dec23c164804b8b72003e49d64372c4aa311..79041633ffaf9d50d6cf372b05fdff33a4272f92 100755 (executable)
@@ -506,7 +506,8 @@ test_sources =                      \
        basic-vectors.cs \
        aot-tests.cs \
        gc-test.cs \
-       gshared.cs
+       gshared.cs \
+       mixed.cs
 
 if NACL_CODEGEN
 test_sources += nacl.cs
@@ -650,7 +651,7 @@ libmonoincludedir = $(includedir)/mono-$(API_VER)/mono/jit
 
 libmonoinclude_HEADERS = jit.h
 
-CSFLAGS = -unsafe -nowarn:0219,0169,0414,0649
+CSFLAGS = -unsafe -nowarn:0219,0169,0414,0649,0618
 
 basic-simd.exe: basic-simd.cs TestDriver.dll
        $(MCS) -out:$@ $(CSFLAGS) $< -r:TestDriver.dll -r:$(CLASS)/Mono.Simd.dll
@@ -751,6 +752,9 @@ rcheck: mono $(regtests)
 richeck: mono $(regtests)
        $(INTERP_RUNTIME) --regression $(regtests)
 
+mixedcheck: mono mixed.exe
+       $(MINI_RUNTIME) --interp=jit=JitClass mixed.exe
+
 if ARM
 check-seq-points:
 else
index c4c00645c1630884ba75ec654fc47124dcd2a379..2d8b5267ae03cadcdab157404b2b59232e57f743 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * abcremoval.c: Array bounds check removal
+/**
+ * \file
+ * Array bounds check removal
  *
  * Author:
  *   Massimiliano Mantione (massi@ximian.com)
@@ -1242,7 +1243,7 @@ type_to_value_kind (MonoType *type)
 
 /**
  * mono_perform_abc_removal:
- * @cfg: Control Flow Graph
+ * \param cfg Control Flow Graph
  *
  * Performs the ABC removal from a cfg in SSA form.
  * It does the following:
index 0d00454a9da7304b4425afd9eea2ff14c40c1cc5..ac52857ea76d9037ad1aa3edeb50883d32f32504 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * abcremoval.h: Array bounds check removal
+/**
+ * \file
+ * Array bounds check removal
  *
  * Author:
  *   Massimiliano Mantione (massi@ximian.com)
index 7ff437f9f9d5e9e1585cc4ac2d9a890959ed0b41..c30de719a428d6a5683febbcdf1e00295edde822 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * alias-analysis.c: Implement simple alias analysis for local variables.
+/**
+ * \file
+ * Implement simple alias analysis for local variables.
  *
  * Author:
  *   Rodrigo Kumpera (kumpera@gmail.com)
index 22dc64f95197ac60691c4a89eac17f793438fc2f..d6dfd3b69d2eb0411c9a2d1a77be821123d8931c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * aot-compiler.c: mono Ahead of Time compiler
+/**
+ * \file
+ * mono Ahead of Time compiler
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -7137,6 +7138,7 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                        opts->write_symbols = TRUE;
                } else if (str_begins_with (arg, "no-write-symbols")) {
                        opts->write_symbols = FALSE;
+               // Intentionally undocumented -- one-off experiment
                } else if (str_begins_with (arg, "metadata-only")) {
                        opts->metadata_only = TRUE;
                } else if (str_begins_with (arg, "bind-to-runtime-version")) {
@@ -7158,6 +7160,7 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                        opts->nodebug = TRUE;
                } else if (str_begins_with (arg, "dwarfdebug")) {
                        opts->dwarf_debug = TRUE;
+               // Intentionally undocumented -- No one remembers what this does. It appears to be ARM-only
                } else if (str_begins_with (arg, "nopagetrampolines")) {
                        opts->use_trampolines_page = FALSE;
                } else if (str_begins_with (arg, "ntrampolines=")) {
@@ -7176,6 +7179,7 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                        opts->ld_flags = g_strdup (arg + strlen ("ld-flags="));                 
                } else if (str_begins_with (arg, "soft-debug")) {
                        opts->soft_debug = TRUE;
+               // Intentionally undocumented x2-- deprecated
                } else if (str_begins_with (arg, "gen-seq-points-file=")) {
                        fprintf (stderr, "Mono Warning: aot option gen-seq-points-file= is deprecated.\n");
                } else if (str_begins_with (arg, "gen-seq-points-file")) {
@@ -7194,8 +7198,10 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                        opts->print_skipped_methods = TRUE;
                } else if (str_begins_with (arg, "stats")) {
                        opts->stats = TRUE;
+               // Intentionally undocumented-- has no known function other than to debug the compiler
                } else if (str_begins_with (arg, "no-instances")) {
                        opts->no_instances = TRUE;
+               // Intentionally undocumented x4-- Used for internal debugging of compiler
                } else if (str_begins_with (arg, "log-generics")) {
                        opts->log_generics = TRUE;
                } else if (str_begins_with (arg, "log-instances=")) {
@@ -7216,8 +7222,10 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                } else if (str_begins_with (arg, "info")) {
                        printf ("AOT target setup: %s.\n", AOT_TARGET_STR);
                        exit (0);
+               // Intentionally undocumented: Used for precise stack maps, which are not available yet
                } else if (str_begins_with (arg, "gc-maps")) {
                        mini_gc_enable_gc_maps_for_aot ();
+               // Intentionally undocumented: Used for internal debugging
                } else if (str_begins_with (arg, "dump")) {
                        opts->dump_json = TRUE;
                } else if (str_begins_with (arg, "llvmonly")) {
@@ -7234,36 +7242,44 @@ mono_aot_parse_options (const char *aot_options, MonoAotOptions *opts)
                        opts->verbose = TRUE;
                } else if (str_begins_with (arg, "help") || str_begins_with (arg, "?")) {
                        printf ("Supported options for --aot:\n");
-                       printf ("    outfile=\n");
-                       printf ("    llvm-outfile=\n");
-                       printf ("    llvm-path=\n");
-                       printf ("    temp-path=\n");
-                       printf ("    save-temps\n");
-                       printf ("    keep-temps\n");
-                       printf ("    write-symbols\n");
-                       printf ("    metadata-only\n");
+                       printf ("    asmonly\n");
                        printf ("    bind-to-runtime-version\n");
+                       printf ("    bitcode\n");
+                       printf ("    data-outfile=\n");
+                       printf ("    direct-icalls\n");
+                       printf ("    direct-pinvoke\n");
+                       printf ("    dwarfdebug\n");
                        printf ("    full\n");
-                       printf ("    threads=\n");
-                       printf ("    static\n");
-                       printf ("    asmonly\n");
-                       printf ("    asmwriter\n");
+                       printf ("    hybrid\n");
+                       printf ("    info\n");
+                       printf ("    keep-temps\n");
+                       printf ("    llvm\n");
+                       printf ("    llvmonly\n");
+                       printf ("    llvm-outfile=\n");
+                       printf ("    llvm-path=\n");
+                       printf ("    msym-dir=\n");
+                       printf ("    mtriple\n");
+                       printf ("    nimt-trampolines=\n");
                        printf ("    nodebug\n");
-                       printf ("    dwarfdebug\n");
-                       printf ("    ntrampolines=\n");
+                       printf ("    no-direct-calls\n");
+                       printf ("    no-write-symbols\n");
                        printf ("    nrgctx-trampolines=\n");
-                       printf ("    nimt-trampolines=\n");
+                       printf ("    nrgctx-fetch-trampolines=\n");
                        printf ("    ngsharedvt-trampolines=\n");
-                       printf ("    tool-prefix=\n");
+                       printf ("    ntrampolines=\n");
+                       printf ("    outfile=\n");
+                       printf ("    profile=\n");
+                       printf ("    profile-only\n");
+                       printf ("    print-skipped-methods\n");
                        printf ("    readonly-value=\n");
+                       printf ("    save-temps\n");
                        printf ("    soft-debug\n");
-                       printf ("    msym-dir=\n");
-                       printf ("    gc-maps\n");
-                       printf ("    print-skipped\n");
-                       printf ("    no-instances\n");
+                       printf ("    static\n");
                        printf ("    stats\n");
-                       printf ("    dump\n");
-                       printf ("    info\n");
+                       printf ("    temp-path=\n");
+                       printf ("    tool-prefix=\n");
+                       printf ("    threads=\n");
+                       printf ("    write-symbols\n");
                        printf ("    verbose\n");
                        printf ("    help/?\n");
                        exit (0);
@@ -7597,8 +7613,11 @@ compile_method (MonoAotCompile *acfg, MonoMethod *method)
                return;
        }
        if (cfg->exception_type != MONO_EXCEPTION_NONE) {
-               if (acfg->aot_opts.print_skipped_methods)
+               if (acfg->aot_opts.print_skipped_methods) {
                        printf ("Skip (JIT failure): %s\n", mono_method_get_full_name (method));
+                       if (cfg->exception_message)
+                               printf ("Caused by: %s\n", cfg->exception_message);
+               }
                /* Let the exception happen at runtime */
                return;
        }
@@ -8059,48 +8078,452 @@ append_mangled_signature (GString *s, MonoMethodSignature *sig)
        return TRUE;
 }
 
-/*
- * mono_aot_get_mangled_method_name:
- *
- *   Return a unique mangled name for METHOD, or NULL.
- */
-char*
-mono_aot_get_mangled_method_name (MonoMethod *method)
+static void
+append_mangled_wrapper_type (GString *s, guint32 wrapper_type) 
 {
-       WrapperInfo *info;
-       GString *s;
-       gboolean supported;
+       const char *label;
 
-       // FIXME: Add more cases
-       if (method->wrapper_type != MONO_WRAPPER_UNKNOWN)
-               return NULL;
-       info = mono_marshal_get_wrapper_info (method);
-       if (!(info && (info->subtype == WRAPPER_SUBTYPE_GSHAREDVT_IN_SIG || info->subtype == WRAPPER_SUBTYPE_GSHAREDVT_OUT_SIG)))
-               return NULL;
+       switch (wrapper_type) {
+       case MONO_WRAPPER_REMOTING_INVOKE:
+               label = "remoting_invoke";
+               break;
+       case MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK:
+               label = "remoting_invoke_check";
+               break;
+       case MONO_WRAPPER_XDOMAIN_INVOKE:
+               label = "remoting_invoke_xdomain";
+               break;
+       case MONO_WRAPPER_PROXY_ISINST:
+               label = "proxy_isinst";
+               break;
+       case MONO_WRAPPER_LDFLD:
+               label = "ldfld";
+               break;
+       case MONO_WRAPPER_LDFLDA:
+               label = "ldflda";
+               break;
+       case MONO_WRAPPER_STFLD: 
+               label = "stfld";
+               break;
+       case MONO_WRAPPER_ALLOC:
+               label = "alloc";
+               break;
+       case MONO_WRAPPER_WRITE_BARRIER:
+               label = "write_barrier";
+               break;
+       case MONO_WRAPPER_STELEMREF:
+               label = "stelemref";
+               break;
+       case MONO_WRAPPER_UNKNOWN:
+               label = "unknown";
+               break;
+       case MONO_WRAPPER_MANAGED_TO_NATIVE:
+               label = "man2native";
+               break;
+       case MONO_WRAPPER_SYNCHRONIZED:
+               label = "synch";
+               break;
+       case MONO_WRAPPER_MANAGED_TO_MANAGED:
+               label = "man2man";
+               break;
+       case MONO_WRAPPER_CASTCLASS:
+               label = "castclass";
+               break;
+       case MONO_WRAPPER_RUNTIME_INVOKE:
+               label = "run_invoke";
+               break;
+       case MONO_WRAPPER_DELEGATE_INVOKE:
+               label = "del_inv";
+               break;
+       case MONO_WRAPPER_DELEGATE_BEGIN_INVOKE:
+               label = "del_beg_inv";
+               break;
+       case MONO_WRAPPER_DELEGATE_END_INVOKE:
+               label = "del_end_inv";
+               break;
+       case MONO_WRAPPER_NATIVE_TO_MANAGED:
+               label = "native2man";
+               break;
+       default:
+               g_assert_not_reached ();
+       }
 
-       s = g_string_new ("");
+       g_string_append_printf (s, "%s_", label);
+}
 
-       g_string_append_printf (s, "aot_method_w_");
+static void
+append_mangled_wrapper_subtype (GString *s, WrapperSubtype subtype) 
+{
+       const char *label;
 
-       switch (info->subtype) {
+       switch (subtype) 
+       {
+       case WRAPPER_SUBTYPE_NONE:
+               return;
+       case WRAPPER_SUBTYPE_ELEMENT_ADDR:
+               label = "elem_addr";
+               break;
+       case WRAPPER_SUBTYPE_STRING_CTOR:
+               label = "str_ctor";
+               break;
+       case WRAPPER_SUBTYPE_VIRTUAL_STELEMREF:
+               label = "virt_stelem";
+               break;
+       case WRAPPER_SUBTYPE_FAST_MONITOR_ENTER:
+               label = "fast_mon_enter";
+               break;
+       case WRAPPER_SUBTYPE_FAST_MONITOR_ENTER_V4:
+               label = "fast_mon_enter_4";
+               break;
+       case WRAPPER_SUBTYPE_FAST_MONITOR_EXIT:
+               label = "fast_monitor_exit";
+               break;
+       case WRAPPER_SUBTYPE_PTR_TO_STRUCTURE:
+               label = "ptr2struct";
+               break;
+       case WRAPPER_SUBTYPE_STRUCTURE_TO_PTR:
+               label = "struct2ptr";
+               break;
+       case WRAPPER_SUBTYPE_CASTCLASS_WITH_CACHE:
+               label = "castclass_w_cache";
+               break;
+       case WRAPPER_SUBTYPE_ISINST_WITH_CACHE:
+               label = "isinst_w_cache";
+               break;
+       case WRAPPER_SUBTYPE_RUNTIME_INVOKE_NORMAL:
+               label = "run_inv_norm";
+               break;
+       case WRAPPER_SUBTYPE_RUNTIME_INVOKE_DYNAMIC:
+               label = "run_inv_dyn";
+               break;
+       case WRAPPER_SUBTYPE_RUNTIME_INVOKE_DIRECT:
+               label = "run_inv_dir";
+               break;
+       case WRAPPER_SUBTYPE_RUNTIME_INVOKE_VIRTUAL:
+               label = "run_inv_vir";
+               break;
+       case WRAPPER_SUBTYPE_ICALL_WRAPPER:
+               label = "icall";
+               break;
+       case WRAPPER_SUBTYPE_NATIVE_FUNC_AOT:
+               label = "native_func_aot";
+               break;
+       case WRAPPER_SUBTYPE_PINVOKE:
+               label = "pinvoke";
+               break;
+       case WRAPPER_SUBTYPE_SYNCHRONIZED_INNER:
+               label = "synch_inner";
+               break;
+       case WRAPPER_SUBTYPE_GSHAREDVT_IN:
+               label = "gshared_in";
+               break;
+       case WRAPPER_SUBTYPE_GSHAREDVT_OUT:
+               label = "gshared_out";
+               break;
+       case WRAPPER_SUBTYPE_ARRAY_ACCESSOR:
+               label = "array_acc";
+               break;
+       case WRAPPER_SUBTYPE_GENERIC_ARRAY_HELPER:
+               label = "generic_arry_help";
+               break;
+       case WRAPPER_SUBTYPE_DELEGATE_INVOKE_VIRTUAL:
+               label = "del_inv_virt";
+               break;
+       case WRAPPER_SUBTYPE_DELEGATE_INVOKE_BOUND:
+               label = "del_inv_bound";
+               break;
        case WRAPPER_SUBTYPE_GSHAREDVT_IN_SIG:
-               g_string_append_printf (s, "gsharedvt_in_");
+               label = "gsharedvt_in_sig";
                break;
        case WRAPPER_SUBTYPE_GSHAREDVT_OUT_SIG:
-               g_string_append_printf (s, "gsharedvt_out_");
+               label = "gsharedvt_out_sig";
                break;
        default:
                g_assert_not_reached ();
+       }
+
+       g_string_append_printf (s, "%s_", label);
+}
+
+static char *
+sanitize_mangled_string (const char *input)
+{
+       GString *s = g_string_new ("");
+
+       for (int i=0; input [i] != '\0'; i++) {
+               char c = input [i];
+               switch (c) {
+               case '.':
+                       g_string_append (s, "_dot_");
+                       break;
+               case ' ':
+                       g_string_append (s, "_");
+                       break;
+               case '`':
+                       g_string_append (s, "_bt_");
+                       break;
+               case '<':
+                       g_string_append (s, "_le_");
+                       break;
+               case '>':
+                       g_string_append (s, "_gt_");
+                       break;
+               case '/':
+                       g_string_append (s, "_sl_");
+                       break;
+               case '[':
+                       g_string_append (s, "_lbrack_");
+                       break;
+               case ']':
+                       g_string_append (s, "_rbrack_");
+                       break;
+               case '(':
+                       g_string_append (s, "_lparen_");
+                       break;
+               case '-':
+                       g_string_append (s, "_dash_");
+                       break;
+               case ')':
+                       g_string_append (s, "_rparen_");
+                       break;
+               case ',':
+                       g_string_append (s, "_comma_");
+                       break;
+               default:
+                       g_string_append_c (s, c);
+               }
+       }
+
+       return g_string_free (s, FALSE);
+}
+
+static gboolean
+append_mangled_klass (GString *s, MonoClass *klass)
+{
+       char *klass_desc = mono_class_full_name (klass);
+       g_string_append_printf (s, "_%s_%s_", klass->name_space, klass_desc);
+       g_free (klass_desc);
+
+       // Success
+       return TRUE;
+}
+
+static gboolean
+append_mangled_method (GString *s, MonoMethod *method);
+
+static gboolean
+append_mangled_wrapper (GString *s, MonoMethod *method) 
+{
+       gboolean success = TRUE;
+       WrapperInfo *info = mono_marshal_get_wrapper_info (method);
+       g_string_append_printf (s, "wrapper_");
+
+       append_mangled_wrapper_type (s, method->wrapper_type);
+
+       switch (method->wrapper_type) {
+       case MONO_WRAPPER_REMOTING_INVOKE:
+       case MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK:
+       case MONO_WRAPPER_XDOMAIN_INVOKE: {
+               MonoMethod *m = mono_marshal_method_from_wrapper (method);
+               g_assert (m);
+               success = success && append_mangled_method (s, m);
+               break;
+       }
+       case MONO_WRAPPER_PROXY_ISINST:
+       case MONO_WRAPPER_LDFLD:
+       case MONO_WRAPPER_LDFLDA:
+       case MONO_WRAPPER_STFLD: {
+               g_assert (info);
+               success = success && append_mangled_klass (s, info->d.proxy.klass);
+               break;
+       }
+       case MONO_WRAPPER_ALLOC: {
+               /* The GC name is saved once in MonoAotFileInfo */
+               g_assert (info->d.alloc.alloc_type != -1);
+               g_string_append_printf (s, "%d_", info->d.alloc.alloc_type);
+               // SlowAlloc, etc
+               g_string_append_printf (s, "%s_", method->name);
+               break;
+       }
+       case MONO_WRAPPER_WRITE_BARRIER: {
+               break;
+       }
+       case MONO_WRAPPER_STELEMREF: {
+               append_mangled_wrapper_subtype (s, info->subtype);
+               if (info->subtype == WRAPPER_SUBTYPE_VIRTUAL_STELEMREF)
+                       g_string_append_printf (s, "%d", info->d.virtual_stelemref.kind);
+               break;
+       }
+       case MONO_WRAPPER_UNKNOWN: {
+               append_mangled_wrapper_subtype (s, info->subtype);
+               if (info->subtype == WRAPPER_SUBTYPE_PTR_TO_STRUCTURE ||
+                       info->subtype == WRAPPER_SUBTYPE_STRUCTURE_TO_PTR)
+                       success = success && append_mangled_klass (s, method->klass);
+               else if (info->subtype == WRAPPER_SUBTYPE_SYNCHRONIZED_INNER)
+                       success = success && append_mangled_method (s, info->d.synchronized_inner.method);
+               else if (info->subtype == WRAPPER_SUBTYPE_ARRAY_ACCESSOR)
+                       success = success && append_mangled_method (s, info->d.array_accessor.method);
+               else if (info->subtype == WRAPPER_SUBTYPE_GSHAREDVT_IN_SIG)
+                       append_mangled_signature (s, info->d.gsharedvt.sig);
+               else if (info->subtype == WRAPPER_SUBTYPE_GSHAREDVT_OUT_SIG)
+                       append_mangled_signature (s, info->d.gsharedvt.sig);
+               break;
+       }
+       case MONO_WRAPPER_MANAGED_TO_NATIVE: {
+               append_mangled_wrapper_subtype (s, info->subtype);
+               if (info->subtype == WRAPPER_SUBTYPE_ICALL_WRAPPER) {
+                       g_string_append_printf (s, "%s", method->name);
+               } else if (info->subtype == WRAPPER_SUBTYPE_NATIVE_FUNC_AOT) {
+                       success = success && append_mangled_method (s, info->d.managed_to_native.method);
+               } else {
+                       g_assert (info->subtype == WRAPPER_SUBTYPE_NONE || info->subtype == WRAPPER_SUBTYPE_PINVOKE);
+                       success = success && append_mangled_method (s, info->d.managed_to_native.method);
+               }
+               break;
+       }
+       case MONO_WRAPPER_SYNCHRONIZED: {
+               MonoMethod *m;
+
+               m = mono_marshal_method_from_wrapper (method);
+               g_assert (m);
+               g_assert (m != method);
+               success = success && append_mangled_method (s, m);
                break;
        }
+       case MONO_WRAPPER_MANAGED_TO_MANAGED: {
+               append_mangled_wrapper_subtype (s, info->subtype);
 
-       supported = append_mangled_signature (s, info->d.gsharedvt.sig);
-       if (!supported) {
+               if (info->subtype == WRAPPER_SUBTYPE_ELEMENT_ADDR) {
+                       g_string_append_printf (s, "%d_", info->d.element_addr.rank);
+                       g_string_append_printf (s, "%d_", info->d.element_addr.elem_size);
+               } else if (info->subtype == WRAPPER_SUBTYPE_STRING_CTOR) {
+                       success = success && append_mangled_method (s, info->d.string_ctor.method);
+               } else {
+                       g_assert_not_reached ();
+               }
+               break;
+       }
+       case MONO_WRAPPER_CASTCLASS: {
+               append_mangled_wrapper_subtype (s, info->subtype);
+               break;
+       }
+       case MONO_WRAPPER_RUNTIME_INVOKE: {
+               append_mangled_wrapper_subtype (s, info->subtype);
+               if (info->subtype == WRAPPER_SUBTYPE_RUNTIME_INVOKE_DIRECT || info->subtype == WRAPPER_SUBTYPE_RUNTIME_INVOKE_VIRTUAL)
+                       success = success && append_mangled_method (s, info->d.runtime_invoke.method);
+               else if (info->subtype == WRAPPER_SUBTYPE_RUNTIME_INVOKE_NORMAL)
+                       success = success && append_mangled_signature (s, info->d.runtime_invoke.sig);
+               break;
+       }
+       case MONO_WRAPPER_DELEGATE_INVOKE:
+       case MONO_WRAPPER_DELEGATE_BEGIN_INVOKE:
+       case MONO_WRAPPER_DELEGATE_END_INVOKE: {
+               if (method->is_inflated) {
+                       /* These wrappers are identified by their class */
+                       g_string_append_printf (s, "i_");
+                       success = success && append_mangled_klass (s, method->klass);
+               } else {
+                       WrapperInfo *info = mono_marshal_get_wrapper_info (method);
+
+                       g_string_append_printf (s, "u_");
+                       if (method->wrapper_type == MONO_WRAPPER_DELEGATE_INVOKE)
+                               append_mangled_wrapper_subtype (s, info->subtype);
+                       g_string_append_printf (s, "u_sigstart");
+               }
+               break;
+       }
+       case MONO_WRAPPER_NATIVE_TO_MANAGED: {
+               g_assert (info);
+               success = success && append_mangled_method (s, info->d.native_to_managed.method);
+               success = success && append_mangled_klass (s, method->klass);
+               break;
+       }
+       default:
+               g_assert_not_reached ();
+       }
+       return success && append_mangled_signature (s, mono_method_signature (method));
+}
+
+static void
+append_mangled_context (GString *str, MonoGenericContext *context)
+{
+       GString *res = g_string_new ("");
+
+       g_string_append_printf (res, "gens_");
+       g_string_append (res, "00");
+
+       gboolean good = context->class_inst && context->class_inst->type_argc > 0;
+       good = good || (context->method_inst && context->method_inst->type_argc > 0);
+       g_assert (good);
+
+       if (context->class_inst)
+               mono_ginst_get_desc (res, context->class_inst);
+       if (context->method_inst) {
+               if (context->class_inst)
+                       g_string_append (res, "11");
+               mono_ginst_get_desc (res, context->method_inst);
+       }
+       g_string_append_printf (str, "gens_%s", res->str);
+}      
+
+static gboolean
+append_mangled_method (GString *s, MonoMethod *method)
+{
+       if (method->wrapper_type)
+               return append_mangled_wrapper (s, method);
+
+       g_string_append_printf (s, "%s_", method->klass->image->assembly->aname.name);
+
+       if (method->is_inflated) {
+               g_string_append_printf (s, "inflated_");
+               MonoMethodInflated *imethod = (MonoMethodInflated*) method;
+               g_assert (imethod->context.class_inst != NULL || imethod->context.method_inst != NULL);
+
+               append_mangled_context (s, &imethod->context);
+               g_string_append_printf (s, "_declared_by_");
+               append_mangled_method (s, imethod->declaring);
+       } else if (method->is_generic) {
+               g_string_append_printf (s, "generic_");
+               append_mangled_klass (s, method->klass);
+               g_string_append_printf (s, "_%s_", method->name);
+
+               MonoGenericContainer *container = mono_method_get_generic_container (method);
+               g_string_append_printf (s, "_%s");
+               append_mangled_context (s, &container->context);
+
+               return append_mangled_signature (s, mono_method_signature (method));
+       } else {
+               g_string_append_printf (s, "_");
+               append_mangled_klass (s, method->klass);
+               g_string_append_printf (s, "_%s_", method->name);
+               if (!append_mangled_signature (s, mono_method_signature (method))) {
+                       g_string_free (s, TRUE);
+                       return FALSE;
+               }
+       }
+
+       return TRUE;
+}
+
+/*
+ * mono_aot_get_mangled_method_name:
+ *
+ *   Return a unique mangled name for METHOD, or NULL.
+ */
+char*
+mono_aot_get_mangled_method_name (MonoMethod *method)
+{
+       GString *s = g_string_new ("aot_");
+       if (!append_mangled_method (s, method)) {
                g_string_free (s, TRUE);
                return NULL;
+       } else {
+               char *out = g_string_free (s, FALSE);
+               // Scrub method and class names
+               char *cleaned = sanitize_mangled_string (out);
+               g_free (out);
+               return cleaned;
        }
-
-       return g_string_free (s, FALSE);
 }
 
 gboolean
index 451755b57064467dcc5ec9f1a3fb2f39470b145e..6ae02d6ffc8ab5c145a4cc323ca9372d7718a7e2 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_AOT_COMPILER_H__
 #define __MONO_AOT_COMPILER_H__
 
index 598e75830157d60ff90910d5015df84757056c23..9279967b31afbe1f14bc3e47ee00a9625c7be3c5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * aot-runtime.c: mono Ahead of Time compiler
+/**
+ * \file
+ * mono Ahead of Time compiler
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -2262,7 +2263,7 @@ load_aot_module (MonoAssembly *assembly, gpointer user_data)
        /*
         * Register the plt region as a single trampoline so we can unwind from this code
         */
-       mono_tramp_info_register (
+       mono_aot_tramp_info_register (
                mono_tramp_info_create (
                        NULL,
                        amodule->plt,
@@ -5146,7 +5147,7 @@ mono_aot_get_trampoline (const char *name)
        gpointer code;
 
        code =  mono_aot_get_trampoline_full (name, &out_tinfo);
-       mono_tramp_info_register (out_tinfo, NULL);
+       mono_aot_tramp_info_register (out_tinfo, NULL);
 
        return code;
 }
@@ -5300,7 +5301,7 @@ get_new_trampoline_from_page (int tramp_type)
                /* Register the generic part at the beggining of the trampoline page */
                gen_info = mono_tramp_info_create (NULL, (guint8*)taddr, amodule->info.tramp_page_code_offsets [tramp_type], NULL, NULL);
                read_page_trampoline_uwinfo (gen_info, tramp_type, TRUE);
-               mono_tramp_info_register (gen_info, NULL);
+               mono_aot_tramp_info_register (gen_info, NULL);
                /*
                 * FIXME
                 * Registering each specific trampoline produces a lot of
@@ -5311,7 +5312,7 @@ get_new_trampoline_from_page (int tramp_type)
                        /* Register the rest of the page as a single trampoline */
                        sp_info = mono_tramp_info_create (NULL, code, page->trampolines_end - code, NULL, NULL);
                        read_page_trampoline_uwinfo (sp_info, tramp_type, FALSE);
-                       mono_tramp_info_register (sp_info, NULL);
+                       mono_aot_tramp_info_register (sp_info, NULL);
                }
                return code;
        }
@@ -5580,7 +5581,7 @@ mono_aot_get_unbox_trampoline (MonoMethod *method)
        }
 
        tinfo->code_size = *(guint32*)symbol_addr;
-       mono_tramp_info_register (tinfo, NULL);
+       mono_aot_tramp_info_register (tinfo, NULL);
 
        /* The caller expects an ftnptr */
        return mono_create_ftnptr (mono_domain_get (), code);
index cad20a06b24c5662be9729fd1cc30f83d87b6a1f..6f918c5d0de3647c5dc6dce838de9af144095cea 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include "mini.h"
 
 /* Dummy versions of some arch specific functions to avoid ifdefs at call sites */
index 168e69c3d89f429166eb6f0e0df8a74f1c550698..f8fdcebaf9b220170a913328bda60bf8e77ead3b 100644 (file)
@@ -557,12 +557,12 @@ public class SimdTests {
                if (a.Y != 2)
                        return 2;
 
-               a.X = 500000000000055l;
-               a.Y = -12345678900l;
+               a.X = 500000000000055L;
+               a.Y = -12345678900L;
 
-               if (a.X != 500000000000055l)
+               if (a.X != 500000000000055L)
                        return 3;
-               if (a.Y != -12345678900l)
+               if (a.Y != -12345678900L)
                        return 4;
                return 0;
        }
index d8f8f569377a44f0eb8dd6748e2d521b6e81cfc9..2f964b4162f88a70a06caaf992da8b14db18bac2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * branch-opts.c: Branch optimizations support 
+/**
+ * \file
+ * Branch optimizations support
  *
  * Authors:
  *   Patrik Torstensson (Patrik.Torstesson at gmail.com)
index 1e76055f58110efa7587c6f49c3a061a987034fa..36c9ffac877b0a822328e5f09df25603dfddc2a4 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright (C) 2016 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index ef58553701405aa66ea0fe4d2627974f8001866b..2a0161f383cfb22ce68678d81cbd403fb96671ad 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright (C) 2016 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index da291f47ab54fe474de156ea760709537c8a0d38..940c07ac8d825b9d0bb3886ec37d35b71319ef41 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * cfold.c: Constant folding support
+/**
+ * \file
+ * Constant folding support
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
index adecdd3837d0157643054c9aff01e7b8f87d86be..280eda7c0ac58340e2b49a6bc15e289592bbf1b3 100644 (file)
@@ -638,7 +638,6 @@ xconv_r8_to_i4: dest:y src1:x len:7
 
 prefetch_membase: src1:b len:4
 
-expand_i1: dest:x src1:y len:17 clob:1
 expand_i2: dest:x src1:i len:15
 expand_i4: dest:x src1:i len:9
 expand_r4: dest:x src1:f len:20
index 4dc68f255c0deaa30497fd0b808996d5dad126f2..8c1a71e147fe75ddbeaae4af024179139d90d1fd 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * debug-mini.c: Mini-specific debugging stuff.
+/**
+ * \file
+ * Mini-specific debugging stuff.
  *
  * Author:
  *   Martin Baulig (martin@ximian.com)
@@ -652,11 +653,11 @@ print_var_info (MonoDebugVarInfo *info, int idx, const char *name, const char *t
  * mono_debug_print_locals:
  *
  * Prints to stdout the information about the local variables in
- * a method (if @only_arguments is false) or about the arguments.
+ * a method (if \p only_arguments is false) or about the arguments.
  * The information includes the storage info (where the variable 
  * lives, in a register or in memory).
  * The method is found by looking up what method has been emitted at
- * the instruction address @ip.
+ * the instruction address \p ip.
  * This is for use inside a debugger.
  */
 void
index 547966a98cdef3a9e844f987cccdd6ae80b65f01..8e3691db62bf3bbadad4e51ba32de3e81b8b3a57 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * debugger-agent.c: Soft Debugger back-end module
+/**
+ * \file
+ * Soft Debugger back-end module
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index 6a64df5a5b382f3642e3f2a338bbb292f9455c93..41fe82ea98ede8d2e3cca7dae2d7163358c875b4 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_DEBUGGER_AGENT_H__
 #define __MONO_DEBUGGER_AGENT_H__
 
index af3ff832ecbf01b98cdd7c50f693bdbf9f63590d..23e576f0ea9046e20cc10366332ac0527ec40f64 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * decompose.c: Functions to decompose complex IR instructions into simpler ones.
+/**
+ * \file
+ * Functions to decompose complex IR instructions into simpler ones.
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index b4c8dc39056147e947786a6c25efdbeb80096296..208ae7597a00e73eefabd1719534c6aaef1b7088 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * dominators.c: Dominator computation on the control flow graph
+/**
+ * \file
+ * Dominator computation on the control flow graph
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
index 7b5a7c68a4cd6b46440eda8d9ae1aed1a18c69f5..26966768f4038e98dbee439b2f59485b88d0593f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * driver.c: The new mono JIT compiler.
+/**
+ * \file
+ * The new mono JIT compiler.
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -21,7 +22,7 @@
 #include <unistd.h>
 #endif
 
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/loader.h>
 #include <mono/metadata/tabledefs.h>
 #include <mono/metadata/class.h>
@@ -272,6 +273,9 @@ mono_parse_graph_options (const char* p)
        exit (1);
 }
 
+/**
+ * mono_parse_default_optimizations:
+ */
 int
 mono_parse_default_optimizations (const char* p)
 {
@@ -536,7 +540,7 @@ mini_regression_list (int verbose, int count, char *images [])
        
        total_run =  total = 0;
        for (i = 0; i < count; ++i) {
-               ass = mono_assembly_open (images [i], NULL);
+               ass = mono_assembly_open_predicate (images [i], FALSE, FALSE, NULL, NULL, NULL);
                if (!ass) {
                        g_warning ("failed to load assembly: %s", images [i]);
                        continue;
@@ -985,10 +989,9 @@ compile_all_methods (MonoAssembly *ass, int verbose, guint32 opts, guint32 recom
 
 /**
  * mono_jit_exec:
- * @assembly: reference to an assembly
- * @argc: argument count
- * @argv: argument vector
- *
+ * \param assembly reference to an assembly
+ * \param argc argument count
+ * \param argv argument vector
  * Start execution of a program.
  */
 int 
@@ -1122,7 +1125,7 @@ load_agent (MonoDomain *domain, char *desc)
                args = NULL;
        }
 
-       agent_assembly = mono_assembly_open (agent, &open_status);
+       agent_assembly = mono_assembly_open_predicate (agent, FALSE, FALSE, NULL, NULL, &open_status);
        if (!agent_assembly) {
                fprintf (stderr, "Cannot open agent assembly '%s': %s.\n", agent, mono_image_strerror (open_status));
                g_free (agent);
@@ -1359,11 +1362,11 @@ static const char info[] =
 
 static gboolean enable_debugging;
 
-/*
+/**
  * mono_jit_parse_options:
  *
- *   Process the command line options in ARGV as done by the runtime executable. 
- * This should be called before mono_jit_init ().
+ * Process the command line options in \p argv as done by the runtime executable.
+ * This should be called before \c mono_jit_init.
  */
 void
 mono_jit_parse_options (int argc, char * argv[])
@@ -1551,9 +1554,8 @@ switch_arch (char* argv[], const char* target_arch)
 
 /**
  * mono_main:
- * @argc: number of arguments in the argv array
- * @argv: array of strings containing the startup arguments
- *
+ * \param argc number of arguments in the argv array
+ * \param argv array of strings containing the startup arguments
  * Launches the Mono JIT engine and parses all the command line options
  * in the same way that the mono command line VM would.
  */
@@ -1905,9 +1907,18 @@ mono_main (int argc, char* argv[])
 #endif
                } else if (strcmp (argv [i], "--nollvm") == 0){
                        mono_use_llvm = FALSE;
+               } else if ((strcmp (argv [i], "--interpreter") == 0) || !strcmp (argv [i], "--interp")) {
+#ifdef ENABLE_INTERPRETER
+                       mono_use_interpreter = TRUE;
+#else
+                       fprintf (stderr, "Mono Warning: --interpreter not enabled in this runtime.\n");
+#endif
+               } else if (strncmp (argv [i], "--interp=", 9) == 0) {
 #ifdef ENABLE_INTERPRETER
-               } else if (strcmp (argv [i], "--interpreter") == 0) {
                        mono_use_interpreter = TRUE;
+                       mono_interp_parse_options (argv [i] + 9);
+#else
+                       fprintf (stderr, "Mono Warning: --interp= not enabled in this runtime.\n");
 #endif
 
 #ifdef __native_client__
@@ -2121,7 +2132,7 @@ mono_main (int argc, char* argv[])
                jit_info_table_test (domain);
 #endif
 
-       assembly = mono_assembly_open (aname, &open_status);
+       assembly = mono_assembly_open_predicate (aname, FALSE, FALSE, NULL, NULL, &open_status);
        if (!assembly) {
                fprintf (stderr, "Cannot open assembly '%s': %s.\n", aname, mono_image_strerror (open_status));
                mini_cleanup (domain);
@@ -2287,6 +2298,9 @@ mono_main (int argc, char* argv[])
        return 0;
 }
 
+/**
+ * mono_jit_init:
+ */
 MonoDomain * 
 mono_jit_init (const char *file)
 {
@@ -2295,22 +2309,22 @@ mono_jit_init (const char *file)
 
 /**
  * mono_jit_init_version:
- * @domain_name: the name of the root domain
- * @runtime_version: the version of the runtime to load
+ * \param domain_name the name of the root domain
+ * \param runtime_version the version of the runtime to load
  *
  * Use this version when you want to force a particular runtime
  * version to be used.  By default Mono will pick the runtime that is
- * referenced by the initial assembly (specified in @file), this
+ * referenced by the initial assembly (specified in \p file), this
  * routine allows programmers to specify the actual runtime to be used
  * as the initial runtime is inherited by all future assemblies loaded
  * (since Mono does not support having more than one mscorlib runtime
  * loaded at once).
  *
- * The @runtime_version can be one of these strings: "v4.0.30319" for
+ * The \p runtime_version can be one of these strings: "v4.0.30319" for
  * desktop, "mobile" for mobile or "moonlight" for Silverlight compat.
  * If an unrecognized string is input, the vm will default to desktop.
  *
- * Returns: the MonoDomain representing the domain where the assembly
+ * \returns the \c MonoDomain representing the domain where the assembly
  * was loaded.
  */
 MonoDomain * 
@@ -2319,6 +2333,9 @@ mono_jit_init_version (const char *domain_name, const char *runtime_version)
        return mini_init (domain_name, runtime_version);
 }
 
+/**
+ * mono_jit_cleanup:
+ */
 void        
 mono_jit_cleanup (MonoDomain *domain)
 {
@@ -2333,6 +2350,9 @@ mono_jit_set_aot_only (gboolean val)
        mono_aot_only = val;
 }
 
+/**
+ * mono_jit_set_aot_mode:
+ */
 void
 mono_jit_set_aot_mode (MonoAotMode mode)
 {
@@ -2355,12 +2375,11 @@ mono_jit_set_aot_mode (MonoAotMode mode)
 
 /**
  * mono_jit_set_trace_options:
- * @options: string representing the trace options
- *
+ * \param options string representing the trace options
  * Set the options of the tracing engine. This function can be called before initializing
  * the mono runtime. See the --trace mono(1) manpage for the options format.
  *
- * Returns: #TRUE if the options where parsed and set correctly, #FALSE otherwise.
+ * \returns TRUE if the options were parsed and set correctly, FALSE otherwise.
  */
 gboolean
 mono_jit_set_trace_options (const char* options)
@@ -2375,14 +2394,14 @@ mono_jit_set_trace_options (const char* options)
 /**
  * mono_set_signal_chaining:
  *
- *   Enable/disable signal chaining. This should be called before mono_jit_init ().
+ * Enable/disable signal chaining. This should be called before \c mono_jit_init.
  * If signal chaining is enabled, the runtime saves the original signal handlers before
  * installing its own handlers, and calls the original ones in the following cases:
- * - a SIGSEGV/SIGABRT signal received while executing native (i.e. not JITted) code.
- * - SIGPROF
- * - SIGFPE
- * - SIGQUIT
- * - SIGUSR2
+ * - a \c SIGSEGV / \c SIGABRT signal received while executing native (i.e. not JITted) code.
+ * - \c SIGPROF
+ * - \c SIGFPE
+ * - \c SIGQUIT
+ * - \c SIGUSR2
  * Signal chaining only works on POSIX platforms.
  */
 void
@@ -2406,14 +2425,14 @@ mono_set_crash_chaining (gboolean chain_crashes)
 
 /**
  * mono_parse_options_from:
- * @options: string containing strings 
- * @ref_argc: pointer to the argc variable that might be updated 
- * @ref_argv: pointer to the argv string vector variable that might be updated
+ * \param options string containing strings 
+ * \param ref_argc pointer to the \c argc variable that might be updated 
+ * \param ref_argv pointer to the \c argv string vector variable that might be updated
  *
- * This function parses the contents of the `MONO_ENV_OPTIONS`
+ * This function parses the contents of the \c MONO_ENV_OPTIONS
  * environment variable as if they were parsed by a command shell
  * splitting the contents by spaces into different elements of the
- * @argv vector.  This method supports quoting with both the " and '
+ * \p argv vector.  This method supports quoting with both the " and '
  * characters.  Inside quoting, spaces and tabs are significant,
  * otherwise, they are considered argument separators.
  *
@@ -2422,14 +2441,14 @@ mono_set_crash_chaining (gboolean chain_crashes)
  * inside quotes.   If the quotes are not balanced, this method 
  *
  * If the environment variable is empty, no changes are made
- * to the values pointed by @ref_argc and @ref_argv.
+ * to the values pointed by \p ref_argc and \p ref_argv.
  *
- * Otherwise the @ref_argv is modified to point to a new array that contains
+ * Otherwise the \p ref_argv is modified to point to a new array that contains
  * all the previous elements contained in the vector, plus the values parsed.
- * The @argc is updated to match the new number of parameters.
+ * The \p argc is updated to match the new number of parameters.
  *
- * Returns: The value NULL is returned on success, otherwise a g_strdup allocated
- * string is returned (this is an alias to malloc under normal circumstances) that
+ * \returns The value NULL is returned on success, otherwise a \c g_strdup allocated
+ * string is returned (this is an alias to \c malloc under normal circumstances) that
  * contains the error message that happened during parsing.
  */
 char *
@@ -2513,13 +2532,13 @@ mono_parse_options_from (const char *options, int *ref_argc, char **ref_argv [])
 
 /**
  * mono_parse_env_options:
- * @ref_argc: pointer to the argc variable that might be updated 
- * @ref_argv: pointer to the argv string vector variable that might be updated
+ * \param ref_argc pointer to the \c argc variable that might be updated 
+ * \param ref_argv pointer to the \c argv string vector variable that might be updated
  *
- * This function parses the contents of the `MONO_ENV_OPTIONS`
+ * This function parses the contents of the \c MONO_ENV_OPTIONS
  * environment variable as if they were parsed by a command shell
  * splitting the contents by spaces into different elements of the
- * @argv vector.  This method supports quoting with both the " and '
+ * \p argv vector.  This method supports quoting with both the " and '
  * characters.  Inside quoting, spaces and tabs are significant,
  * otherwise, they are considered argument separators.
  *
@@ -2528,11 +2547,11 @@ mono_parse_options_from (const char *options, int *ref_argc, char **ref_argv [])
  * inside quotes.   If the quotes are not balanced, this method 
  *
  * If the environment variable is empty, no changes are made
- * to the values pointed by @ref_argc and @ref_argv.
+ * to the values pointed by \p ref_argc and \p ref_argv.
  *
- * Otherwise the @ref_argv is modified to point to a new array that contains
+ * Otherwise the \p ref_argv is modified to point to a new array that contains
  * all the previous elements contained in the vector, plus the values parsed.
- * The @argc is updated to match the new number of parameters.
+ * The \p argc is updated to match the new number of parameters.
  *
  * If there is an error parsing, this method will terminate the process by
  * calling exit(1).
index 773ea4924b3af98d143e59f141dd958cd2b0affd..9f2c405b68360afdf129e789ed284a382f25fe3a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * dwarfwriter.c: Creation of DWARF debug information
+/**
+ * \file
+ * Creation of DWARF debug information
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index f157e16d69503eed80fbd7ab9859da1e600effa0..d67e12aad97ad7e483757bcfe323530f2076e091 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * dwarfwriter.h: Creation of DWARF debug information
+/**
+ * \file
+ * Creation of DWARF debug information
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index 383aea2f447911cd020226c709046309e8159efa..846ad9744f59c5f30b8987af7d8ac4f822ba4ec2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-amd64.c: exception support for AMD64
+/**
+ * \file
+ * exception support for AMD64
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -478,11 +479,9 @@ get_throw_trampoline (MonoTrampInfo **info, gboolean rethrow, gboolean corlib, g
 
 /**
  * mono_arch_get_throw_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * exceptions. The returned function has the following 
  * signature: void (*func) (MonoException *exc); 
- *
  */
 gpointer
 mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
@@ -703,9 +702,8 @@ mono_arch_setup_async_callback (MonoContext *ctx, void (*async_cb)(void *fun), g
 
 /**
  * mono_arch_handle_exception:
- *
- * @ctx: saved processor state
- * @obj: the exception object
+ * \param ctx saved processor state
+ * \param obj the exception object
  */
 gboolean
 mono_arch_handle_exception (void *sigctx, gpointer obj)
index 39ac2f8c9bc1728e6e7b069af8301e702c9a2203..109dd60841b6d78af03ab4127a3eea3f26a79862 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-arm.c: exception support for ARM
+/**
+ * \file
+ * exception support for ARM
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -336,11 +337,10 @@ mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
 
 /**
  * mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * corlib exceptions. The returned function has the following 
  * signature: void (*func) (guint32 ex_token, guint32 offset); 
- * Here, offset is the offset which needs to be substracted from the caller IP 
+ * Here, \c offset is the offset which needs to be substracted from the caller IP 
  * to get the IP of the throw. Passing the offset has the advantage that it 
  * needs no relocations in the caller.
  * On ARM, the ip is passed instead of an offset.
index 9bc79372897c88ad250ea57c5c863bc255a07228..a991846b99ee55e691eb1e44392352d8a18d1480 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-arm64.c: exception support for ARM64
+/**
+ * \file
+ * exception support for ARM64
  *
  * Copyright 2013 Xamarin Inc
  *
index adae20f2b5f2fb83a57d67b3b08b30a77f007483..d2c3ac5eacf4c94920c02e1597f64690d921c62c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-ia64.c: exception support for IA64
+/**
+ * \file
+ * exception support for IA64
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
@@ -360,11 +361,9 @@ get_throw_trampoline (gboolean rethrow)
 
 /**
  * mono_arch_get_throw_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * exceptions. The returned function has the following 
  * signature: void (*func) (MonoException *exc); 
- *
  */
 gpointer
 mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
@@ -388,8 +387,7 @@ mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
 
 /**
  * mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * corlib exceptions. The returned function has the following 
  * signature: void (*func) (guint32 ex_token_index, guint32 offset); 
  * Here, offset is the offset which needs to be substracted from the caller IP 
@@ -568,9 +566,8 @@ mono_arch_unwind_frame (MonoDomain *domain, MonoJitTlsData *jit_tls,
 
 /**
  * mono_arch_handle_exception:
- *
- * @ctx: saved processor state
- * @obj: the exception object
+ * \param ctx saved processor state
+ * \param obj the exception object
  */
 gboolean
 mono_arch_handle_exception (void *sigctx, gpointer obj)
index 515a6bf23af715e0cf2cd24bae3a543c629be3b1..4876fc164cfadd920fc948c7b08e0300d3c528eb 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-mips.c: exception support for MIPS
+/**
+ * \file
+ * exception support for MIPS
  *
  * Authors:
  *   Mark Mason (mason@broadcom.com)
@@ -293,11 +294,9 @@ mono_arch_get_throw_exception_generic (guint8 *start, int size, int corlib, gboo
 
 /**
  * mono_arch_get_rethrow_exception:
- *
- * Returns a function pointer which can be used to rethrow 
+ * \returns a function pointer which can be used to rethrow 
  * exceptions. The returned function has the following 
  * signature: void (*func) (MonoException *exc); 
- *
  */
 gpointer
 mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
@@ -361,8 +360,7 @@ mono_arch_get_throw_exception_by_name (void)
 
 /**
  * mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * corlib exceptions. The returned function has the following 
  * signature: void (*func) (guint32 ex_token, guint32 offset); 
  * On MIPS, the offset argument is missing.
index dba01d52e117c7af49e3909270f36bb45411cfd9..8a758c43c89d7910f1164c5d8ac711ace0619cf8 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-ppc.c: exception support for PowerPC
+/**
+ * \file
+ * exception support for PowerPC
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -453,11 +454,9 @@ mono_arch_get_throw_exception_generic (int size, MonoTrampInfo **info, int corli
 
 /**
  * mono_arch_get_rethrow_exception:
- *
- * Returns a function pointer which can be used to rethrow 
+ * \returns a function pointer which can be used to rethrow 
  * exceptions. The returned function has the following 
  * signature: void (*func) (MonoException *exc); 
- *
  */
 gpointer
 mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
@@ -493,8 +492,7 @@ mono_arch_get_throw_exception (MonoTrampInfo **info, gboolean aot)
 
 /**
  * mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * corlib exceptions. The returned function has the following 
  * signature: void (*func) (guint32 ex_token, guint32 offset); 
  * On PPC, we pass the ip instead of the offset
index 0ce54e7611e53c3a642bd11de6fbf9ff5d9b80ba..77241a6c68a3da3a769600184618cf178034a0fb 100644 (file)
@@ -1,21 +1,20 @@
-/*------------------------------------------------------------------*/
-/*                                                                 */
-/* Name        - exceptions-s390.c                                 */
-/*                                                                 */
-/* Function    - Exception support for S/390.                       */
-/*                                                                 */
-/* Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com) */
-/*                                                                 */
-/* Date        - January, 2004                                     */
-/*                                                                 */
-/* Derivation  - From exceptions-x86 & exceptions-ppc              */
-/*              Paolo Molaro (lupus@ximian.com)                    */
-/*              Dietmar Maurer (dietmar@ximian.com)                */
-/*                                                                 */
-/* Copyright   - 2001 Ximian, Inc.                                 */
-/* Licensed under the MIT license. See LICENSE file in the project root for full license information. */
-/*                                                                 */
-/*------------------------------------------------------------------*/
+/**
+ * \file
+ *
+ * Function    - Exception support for S/390.
+ *
+ * Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ *
+ * Date        - January, 2004
+ *
+ * Derivation  - From exceptions-x86 & exceptions-ppc
+ *              Paolo Molaro (lupus@ximian.com)
+ *              Dietmar Maurer (dietmar@ximian.com)
+ *
+ * Copyright   - 2001 Ximian, Inc.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ *
+ */
 
 /*------------------------------------------------------------------*/
 /*                 D e f i n e s                                    */
index 77510a7f934de0d832dd20fca39c687f19c4d1de..f7010b13f88e4873928d655ee63ddb576e9a7b28 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-sparc.c: exception support for sparc
+/**
+ * \file
+ * exception support for sparc
  *
  * Authors:
  *   Mark Crichton (crichton@gimp.org)
@@ -220,8 +221,7 @@ get_throw_exception (gboolean rethrow)
 
 /**
  * mono_arch_get_throw_exception:
- *
- * Returns a function pointer which can be used to raise exceptions.
+ * \returns a function pointer which can be used to raise exceptions.
  * The returned function has the following 
  * signature: void (*func) (MonoException *exc); 
  */
@@ -267,8 +267,7 @@ mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
 
 /**
  * mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * corlib exceptions. The returned function has the following 
  * signature: void (*func) (guint32 ex_token, guint32 offset); 
  * Here, offset is the offset which needs to be substracted from the caller IP 
index 1a0c6fab0a66a82a6e7bc270a1e564e509e0af02..30cb4b92d27c86ff3c549d23d4a812b8902fc118 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * exceptions-x86.c: exception support for x86
+/**
+ * \file
+ * exception support for x86
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -682,8 +683,7 @@ get_throw_trampoline (const char *name, gboolean rethrow, gboolean llvm, gboolea
 
 /**
  * mono_arch_get_throw_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * exceptions. The returned function has the following 
  * signature: void (*func) (MonoException *exc); 
  * For example to raise an arithmetic exception you can use:
@@ -706,8 +706,7 @@ mono_arch_get_rethrow_exception (MonoTrampInfo **info, gboolean aot)
 
 /**
  * mono_arch_get_throw_corlib_exception:
- *
- * Returns a function pointer which can be used to raise 
+ * \returns a function pointer which can be used to raise 
  * corlib exceptions. The returned function has the following 
  * signature: void (*func) (guint32 ex_token, guint32 offset); 
  * Here, offset is the offset which needs to be substracted from the caller IP 
index 4755adbaab1f01f086f98a416846348c5356ca8a..c7b10b3a4c1517217b7c56e798bf9379bced451c 100644 (file)
@@ -2846,6 +2846,72 @@ class Tests
                }
                return 0;
        }
+
+       public class MyException : Exception {
+               public int marker = 0;
+               public string res = "";
+
+               public MyException (String res) {
+                       this.res = res;
+               }
+
+               public bool FilterWithoutState () {
+                       return this.marker == 0x666;
+               }
+
+               public bool FilterWithState () {
+                       bool ret = this.marker == 0x566;
+                       this.marker += 0x100;
+                       return ret;
+               }
+
+               public bool FilterWithStringState () {
+                       bool ret = this.marker == 0x777;
+                       this.res = "fromFilter_" + this.res;
+                       return ret;
+               }
+       }
+
+       public static int test_1_basic_filter_catch () {
+               try {
+                       MyException e = new MyException ("");
+                       e.marker = 0x1337;
+                       throw e;
+               } catch (MyException ex) when (ex.marker == 0x1337) {
+                       return 1;
+               }
+               return 0;
+       }
+
+       public static int test_1234_complicated_filter_catch () {
+               string res = "init";
+               try {
+                       MyException e = new MyException (res);
+                       e.marker = 0x566;
+                       try {
+                               try {
+                                       throw e;
+                               } catch (MyException ex) when (ex.FilterWithoutState ()) {
+                                       res = "WRONG_" + res;
+                               } finally {
+                                       e.marker = 0x777;
+                                       res = "innerFinally_" + res;
+                               }
+                       } catch (MyException ex) when (ex.FilterWithState ()) {
+                               res = "2ndcatch_" + res;
+                       }
+                       // "2ndcatch_innerFinally_init"
+                       // Console.WriteLine ("res1: " + res);
+                       e.res = res;
+                       throw e;
+               } catch (MyException ex) when (ex.FilterWithStringState ()) {
+                       res = "fwos_" + ex.res;
+               } finally {
+                       res = "outerFinally_" + res;
+               }
+               // Console.WriteLine ("res2: " + res);
+               return "outerFinally_fwos_fromFilter_2ndcatch_innerFinally_init" == res ? 1234 : 0;
+       }
 }
 
 #if !__MOBILE__
index 21f87eb5819d7a47a4e0ca63cf739666226b79bb..357651ee64175b78d2d4ecb3fd1d88ee7b808853 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * genmdesc: Generates the machine description
+/**
+ * \file
+ * Generates the machine description
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
index 0b123e50cf686664138ce21ffb0faa23c1e549c1..f13530082174053e8e7ef6fae8b7ce887ce66635 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * graph.c: Helper routines to graph various internal states of the code generator
+/**
+ * \file
+ * Helper routines to graph various internal states of the code generator
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
index 047add7aab5d2816c7a99226ba101ced681182eb..7f681b23bb5ba355da140cd5fb52c4b0fac81acb 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * helpers.c: Assorted routines
+/**
+ * \file
+ * Assorted routines
  *
  * (C) 2003 Ximian, Inc.
  */
@@ -125,10 +126,9 @@ mono_blockset_print (MonoCompile *cfg, MonoBitSet *set, const char *name, guint
 }
 
 /**
- * mono_disassemble_code:
- * @cfg: compilation context
- * @code: a pointer to the code
- * @size: the code size in bytes
+ * \param cfg compilation context
+ * \param code a pointer to the code
+ * \param size the code size in bytes
  *
  * Disassemble to code to stdout.
  */
index d1b03b3931b21e42e60353b4c0dbab3051983496..88eac7edb4550f5cfbea080941a36a37afc95da7 100644 (file)
@@ -1247,7 +1247,6 @@ COND:   ldloc.0
        }
 
        .method public static int32 test_1_filters () {
-               .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 )   // ...!INTERPRETER.
                .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 )          // ...!BITCODE..
                .maxstack 16
                .locals init (
index 2e4619301d1b6ca24b81da6be81759e9fbef874b..f381ac8358750ff78ef0ac55f11862c110b6442d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * image-writer.c: Creation of object files or assembly files using the same interface.
+/**
+ * \file
+ * Creation of object files or assembly files using the same interface.
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
index cc8b5f3d556a2459ec8d45880352bc01e9bb67dc..3da1717d3e3d56e7791748e64c1bf88b302bed3c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * image-writer.h: Creation of object files or assembly files using the same interface.
+/**
+ * \file
+ * Creation of object files or assembly files using the same interface.
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com);
index 9697ccbad6fec104caaf59b9521f5315c62f5003..6984c38b395d4e91e48a285f5028dae0bf0f15e8 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 /* we need some special math function */
 #ifndef _ISOC99_SOURCE
 #define _ISOC99_SOURCE
index f26e4ff57b3badc3c7a3a9d5c9d91e1d9b3be89a..bda0b457e8520bfd76f4702efef447fe904a9fb0 100644 (file)
@@ -82,6 +82,12 @@ typedef struct _RuntimeMethod
        guint32 *local_offsets;
        unsigned int param_count;
        unsigned int hasthis;
+       gpointer jit_wrapper;
+       gpointer jit_addr;
+       MonoMethodSignature *jit_sig;
+       gpointer jit_entry;
+       MonoType *rtype;
+       MonoType **param_types;
 } RuntimeMethod;
 
 struct _MonoInvocation {
@@ -111,6 +117,7 @@ typedef struct {
 } ThreadContext;
 
 extern int mono_interp_traceopt;
+extern GSList *jit_classes;
 
 MonoException *
 mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *context);
index 72fcf9f131116d31561b06333ca06a5a7948cd09..8d2a26859053f0830db1a8e3416508db811b7a86 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * PLEASE NOTE: This is a research prototype.
  *
  *
@@ -36,7 +37,7 @@
 
 /* trim excessive headers */
 #include <mono/metadata/image.h>
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/cil-coff.h>
 #include <mono/metadata/mono-endian.h>
 #include <mono/metadata/tabledefs.h>
 #endif
 #endif
 
-#define INIT_FRAME(frame,parent_frame,method_args,method_retval,domain,mono_method,error)      \
-       do {    \
-               (frame)->parent = (parent_frame);       \
-               (frame)->stack_args = (method_args);    \
-               (frame)->retval = (method_retval);      \
-               (frame)->runtime_method = mono_interp_get_runtime_method ((domain), (mono_method), (error));    \
-               (frame)->ex = NULL;     \
-               (frame)->ip = NULL;     \
-               (frame)->invoke_trap = 0;       \
+static inline void
+init_frame (MonoInvocation *frame, MonoInvocation *parent_frame, RuntimeMethod *rmethod, stackval *method_args, stackval *method_retval)
+{
+       frame->parent = parent_frame;
+       frame->stack_args = method_args;
+       frame->retval = method_retval;
+       frame->runtime_method = rmethod;
+       frame->ex = NULL;
+       frame->ip = NULL;
+       frame->invoke_trap = 0;
+}
+
+#define INIT_FRAME(frame,parent_frame,method_args,method_retval,domain,mono_method,error) do { \
+       RuntimeMethod *_rmethod = mono_interp_get_runtime_method ((domain), (mono_method), (error));    \
+       init_frame ((frame), (parent_frame), _rmethod, (method_args), (method_retval)); \
        } while (0)
 
+/*
+ * List of classes whose methods will be executed by transitioning to JITted code.
+ * Used for testing.
+ */
+GSList *jit_classes;
+
 void ves_exec_method (MonoInvocation *frame);
 
 static char* dump_stack (stackval *stack, stackval *sp);
@@ -257,18 +270,33 @@ RuntimeMethod*
 mono_interp_get_runtime_method (MonoDomain *domain, MonoMethod *method, MonoError *error)
 {
        RuntimeMethod *rtm;
+       MonoJitDomainInfo *info;
+       MonoMethodSignature *sig;
+       int i;
+
        error_init (error);
 
+       info = domain_jit_info (domain);
        mono_domain_jit_code_hash_lock (domain);
-       if ((rtm = mono_internal_hash_table_lookup (&domain->jit_code_hash, method))) {
-               mono_domain_jit_code_hash_unlock (domain);
+       rtm = mono_internal_hash_table_lookup (&info->interp_code_hash, method);
+       mono_domain_jit_code_hash_unlock (domain);
+       if (rtm)
                return rtm;
-       }
+
+       sig = mono_method_signature (method);
+
        rtm = mono_domain_alloc0 (domain, sizeof (RuntimeMethod));
        rtm->method = method;
-       rtm->param_count = mono_method_signature (method)->param_count;
-       rtm->hasthis = mono_method_signature (method)->hasthis;
-       mono_internal_hash_table_insert (&domain->jit_code_hash, method, rtm);
+       rtm->param_count = sig->param_count;
+       rtm->hasthis = sig->hasthis;
+       rtm->rtype = mini_get_underlying_type (sig->ret);
+       rtm->param_types = mono_domain_alloc0 (domain, sizeof (MonoType*) * sig->param_count);
+       for (i = 0; i < sig->param_count; ++i)
+               rtm->param_types [i] = mini_get_underlying_type (sig->params [i]);
+
+       mono_domain_jit_code_hash_lock (domain);
+       if (!mono_internal_hash_table_lookup (&info->interp_code_hash, method))
+               mono_internal_hash_table_insert (&info->interp_code_hash, method, rtm);
        mono_domain_jit_code_hash_unlock (domain);
 
        return rtm;
@@ -484,9 +512,13 @@ stackval_to_data (MonoType *type, stackval *val, char *data, gboolean pinvoke)
        case MONO_TYPE_SZARRAY:
        case MONO_TYPE_CLASS:
        case MONO_TYPE_OBJECT:
-       case MONO_TYPE_ARRAY:
+       case MONO_TYPE_ARRAY: {
+               gpointer *p = (gpointer *) data;
+               mono_gc_wbarrier_generic_store (p, val->data.p);
+               return;
+       }
        case MONO_TYPE_PTR: {
-               gpointer *p = (gpointer*)data;
+               gpointer *p = (gpointer *) data;
                *p = val->data.p;
                return;
        }
@@ -696,8 +728,6 @@ interp_walk_stack_with_ctx (MonoInternalStackWalk func, MonoContext *ctx, MonoUn
                        return;
                frame = frame->parent;
        }
-
-       g_assert (0);
 }
 
 static MonoPIFunc mono_interp_enter_icall_trampoline = NULL;
@@ -760,7 +790,7 @@ static MethodArguments* build_args_from_sig (MonoMethodSignature *sig, MonoInvoc
        if (margs->flen > 0)
                margs->fargs = g_malloc0 (sizeof (double) * margs->flen);
 
-       if (margs->ilen > 8)
+       if (margs->ilen > 12)
                g_error ("build_args_from_sig: TODO, allocate gregs: %d\n", margs->ilen);
 
        if (margs->flen > 3)
@@ -920,8 +950,10 @@ ves_pinvoke_method (MonoInvocation *frame, MonoMethodSignature *sig, MonoFuncV a
 void
 mono_interp_init_delegate (MonoDelegate *del)
 {
-       if (!del->method)
-               del->method = ((RuntimeMethod *) del->method_ptr)->method;
+       if (del->method)
+               return;
+       /* shouldn't need a write barrier because we don't write a MonoObject into the field */
+       del->method = ((RuntimeMethod *) del->method_ptr)->method;
 }
 
 /*
@@ -940,6 +972,15 @@ ves_runtime_method (MonoInvocation *frame, ThreadContext *context)
 
        mono_class_init (method->klass);
 
+       if (method->klass == mono_defaults.array_class) {
+               if (!strcmp (method->name, "UnsafeMov")) {
+                       /* TODO: layout checks */
+                       MonoType *mt = mono_method_signature (method)->ret;
+                       stackval_from_data (mt, frame->retval, (char *) frame->stack_args, FALSE);
+                       return;
+               }
+       }
+
        isinst_obj = mono_object_isinst_checked (obj, mono_defaults.array_class, &error);
        mono_error_cleanup (&error); /* FIXME: don't swallow the error */
        if (obj && isinst_obj) {
@@ -1274,13 +1315,32 @@ mono_interp_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoOb
                break;
        case MONO_TYPE_VALUETYPE:
                retval = mono_object_new_checked (context->domain, klass, error);
-               ret = ((char*)retval) + sizeof (MonoObject);
+               ret = mono_object_unbox (retval);
                if (!sig->ret->data.klass->enumtype)
                        result.data.vt = ret;
+               else
+                       result.data.vt = alloca (mono_class_instance_size (klass));
+               break;
+       case MONO_TYPE_GENERICINST:
+               if (!MONO_TYPE_IS_REFERENCE (sig->ret)) {
+                       retval = mono_object_new_checked (context->domain, klass, error);
+                       ret = mono_object_unbox (retval);
+                       if (!sig->ret->data.klass->enumtype)
+                               result.data.vt = ret;
+                       else
+                               result.data.vt = alloca (mono_class_instance_size (klass));
+               } else {
+                       isobject = 1;
+               }
+               break;
+
+       case MONO_TYPE_PTR:
+               retval = mono_object_new_checked (context->domain, mono_defaults.int_class, error);
+               ret = mono_object_unbox (retval);
                break;
        default:
                retval = mono_object_new_checked (context->domain, klass, error);
-               ret = ((char*)retval) + sizeof (MonoObject);
+               ret = mono_object_unbox (retval);
                break;
        }
 
@@ -1322,6 +1382,12 @@ handle_enum:
                case MONO_TYPE_I8:
                        args [a_index].data.l = *(gint64*)params [i];
                        break;
+               case MONO_TYPE_R4:
+                       args [a_index].data.f = *(gfloat *) params [i];
+                       break;
+               case MONO_TYPE_R8:
+                       args [a_index].data.f = *(gdouble *) params [i];
+                       break;
                case MONO_TYPE_VALUETYPE:
                        if (sig->params [i]->data.klass->enumtype) {
                                type = mono_class_enum_basetype (sig->params [i]->data.klass)->type;
@@ -1331,6 +1397,7 @@ handle_enum:
                        }
                        break;
                case MONO_TYPE_STRING:
+               case MONO_TYPE_PTR:
                case MONO_TYPE_CLASS:
                case MONO_TYPE_ARRAY:
                case MONO_TYPE_SZARRAY:
@@ -1375,6 +1442,209 @@ handle_enum:
        return retval;
 }
 
+typedef struct {
+       RuntimeMethod *rmethod;
+       gpointer this_arg;
+       gpointer res;
+       gpointer args [16];
+       gpointer *many_args;
+} InterpEntryData;
+
+/* Main function for entering the interpreter from compiled code */
+static void
+interp_entry (InterpEntryData *data)
+{
+       MonoInvocation frame;
+       RuntimeMethod *rmethod = data->rmethod;
+       ThreadContext *context = mono_native_tls_get_value (thread_context_id);
+       ThreadContext context_struct;
+       MonoInvocation *old_frame;
+       stackval result;
+       stackval *args;
+       MonoMethod *method;
+       MonoMethodSignature *sig;
+       MonoType *type;
+       int i;
+
+       method = rmethod->method;
+       sig = mono_method_signature (method);
+
+       // FIXME: Optimize this
+
+       //printf ("%s\n", mono_method_full_name (method, 1));
+
+       frame.ex = NULL;
+       if (context == NULL) {
+               context = &context_struct;
+               memset (context, 0, sizeof (ThreadContext));
+               context_struct.base_frame = &frame;
+               context_struct.env_frame = &frame;
+               mono_native_tls_set_value (thread_context_id, context);
+       }
+       else
+               old_frame = context->current_frame;
+       context->domain = mono_domain_get ();
+
+       args = alloca (sizeof (stackval) * (sig->param_count + (sig->hasthis ? 1 : 0)));
+       if (sig->hasthis)
+               args [0].data.p = data->this_arg;
+
+       gpointer *params;
+       if (data->many_args)
+               params = data->many_args;
+       else
+               params = data->args;
+       for (i = 0; i < sig->param_count; ++i) {
+               int a_index = i + (sig->hasthis ? 1 : 0);
+               if (sig->params [i]->byref) {
+                       args [a_index].data.p = params [i];
+                       continue;
+               }
+               type = rmethod->param_types [i];
+               switch (type->type) {
+               case MONO_TYPE_U1:
+               case MONO_TYPE_I1:
+                       args [a_index].data.i = *(MonoBoolean*)params [i];
+                       break;
+               case MONO_TYPE_U2:
+               case MONO_TYPE_I2:
+                       args [a_index].data.i = *(gint16*)params [i];
+                       break;
+               case MONO_TYPE_U:
+#if SIZEOF_VOID_P == 4
+                       args [a_index].data.p = GINT_TO_POINTER (*(guint32*)params [i]);
+#else
+                       args [a_index].data.p = GINT_TO_POINTER (*(guint64*)params [i]);
+#endif
+                       break;
+               case MONO_TYPE_I:
+#if SIZEOF_VOID_P == 4
+                       args [a_index].data.p = GINT_TO_POINTER (*(gint32*)params [i]);
+#else
+                       args [a_index].data.p = GINT_TO_POINTER (*(gint64*)params [i]);
+#endif
+                       break;
+               case MONO_TYPE_U4:
+                       args [a_index].data.i = *(guint32*)params [i];
+                       break;
+               case MONO_TYPE_I4:
+                       args [a_index].data.i = *(gint32*)params [i];
+                       break;
+               case MONO_TYPE_U8:
+                       args [a_index].data.l = *(guint64*)params [i];
+                       break;
+               case MONO_TYPE_I8:
+                       args [a_index].data.l = *(gint64*)params [i];
+                       break;
+               case MONO_TYPE_PTR:
+               case MONO_TYPE_OBJECT:
+                       args [a_index].data.p = *(MonoObject**)params [i];
+                       break;
+               case MONO_TYPE_VALUETYPE:
+                       args [a_index].data.p = params [i];
+                       break;
+               case MONO_TYPE_GENERICINST:
+                       if (MONO_TYPE_IS_REFERENCE (type))
+                               args [a_index].data.p = params [i];
+                       else
+                               args [a_index].data.vt = params [i];
+                       break;
+               default:
+                       printf ("%s\n", mono_type_full_name (sig->params [i]));
+                       NOT_IMPLEMENTED;
+                       break;
+               }
+       }
+
+       init_frame (&frame, context->current_frame, data->rmethod, args, &result);
+       context->managed_code = 1;
+
+       type = rmethod->rtype;
+       switch (type->type) {
+       case MONO_TYPE_GENERICINST:
+               if (!MONO_TYPE_IS_REFERENCE (type))
+                       frame.retval->data.vt = data->res;
+               break;
+       case MONO_TYPE_VALUETYPE:
+               frame.retval->data.vt = data->res;
+               break;
+       default:
+               break;
+       }
+
+       ves_exec_method_with_context (&frame, context);
+       context->managed_code = 0;
+       if (context == &context_struct)
+               mono_native_tls_set_value (thread_context_id, NULL);
+       else
+               context->current_frame = old_frame;
+
+       // FIXME:
+       g_assert (frame.ex == NULL);
+
+       type = rmethod->rtype;
+       switch (type->type) {
+       case MONO_TYPE_VOID:
+               break;
+       case MONO_TYPE_I1:
+               *(gint8*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_U1:
+               *(guint8*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_I2:
+               *(gint16*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_U2:
+               *(guint16*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_I4:
+               *(gint32*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_U4:
+               *(guint64*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_I8:
+               *(gint64*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_U8:
+               *(guint64*)data->res = frame.retval->data.i;
+               break;
+       case MONO_TYPE_I:
+#if SIZEOF_VOID_P == 8
+               *(gint64*)data->res = (gint64)frame.retval->data.p;
+#else
+               *(gint32*)data->res = (gint32)frame.retval->data.p;
+#endif
+               break;
+       case MONO_TYPE_U:
+#if SIZEOF_VOID_P == 8
+               *(guint64*)data->res = (guint64)frame.retval->data.p;
+#else
+               *(guint32*)data->res = (guint32)frame.retval->data.p;
+#endif
+               break;
+       case MONO_TYPE_OBJECT:
+               /* No need for a write barrier */
+               *(MonoObject**)data->res = (MonoObject*)frame.retval->data.p;
+               break;
+       case MONO_TYPE_GENERICINST:
+               if (MONO_TYPE_IS_REFERENCE (type)) {
+                       *(MonoObject**)data->res = *(MonoObject**)frame.retval->data.p;
+               } else {
+                       /* Already set before the call */
+               }
+               break;
+       case MONO_TYPE_VALUETYPE:
+               /* Already set before the call */
+               break;
+       default:
+               printf ("%s\n", mono_type_full_name (sig->ret));
+               NOT_IMPLEMENTED;
+               break;
+       }
+}
+
 static stackval * 
 do_icall (ThreadContext *context, int op, stackval *sp, gpointer ptr)
 {
@@ -1464,84 +1734,220 @@ do_icall (ThreadContext *context, int op, stackval *sp, gpointer ptr)
        return sp;
 }
 
-static mono_mutex_t create_method_pointer_mutex;
-
-static GHashTable *method_pointer_hash = NULL;
-
-#define TRAMPS_USED 8
-
-static MonoMethod *method_pointers [TRAMPS_USED] = {0};
-
-#define GEN_METHOD_PTR_TRAMP(num) \
-               static MonoObject * mp_tramp_ ## num (MonoObject *this_obj, void **params, MonoObject **exc, void *compiled_method) { \
-                       MonoError error; \
-                       void *params_real[] = {this_obj, &params, &exc, &compiled_method}; \
-                       MonoObject *ret = mono_interp_runtime_invoke (method_pointers [num], NULL, params_real, NULL, &error); \
-                       mono_error_cleanup (&error); \
-                       return ret; \
-               }
-
+/*
+ * These functions are the entry points into the interpreter from compiled code.
+ * They are called by the interp_in wrappers. They have the following signature:
+ * void (<optional this_arg>, <optional retval pointer>, <arg1>, ..., <argn>, <method ptr>)
+ * They pack up their arguments into an InterpEntryData structure and call interp_entry ().
+ * It would be possible for the wrappers to pack up the arguments etc, but that would make them bigger, and there are
+ * more wrappers then these functions.
+ * this/static * ret/void * 16 arguments -> 64 functions.
+ */
 
-GEN_METHOD_PTR_TRAMP (0);
-GEN_METHOD_PTR_TRAMP (1);
-GEN_METHOD_PTR_TRAMP (2);
-GEN_METHOD_PTR_TRAMP (3);
-GEN_METHOD_PTR_TRAMP (4);
-GEN_METHOD_PTR_TRAMP (5);
-GEN_METHOD_PTR_TRAMP (6);
-GEN_METHOD_PTR_TRAMP (7);
+#define MAX_INTERP_ENTRY_ARGS 8
 
-#undef GEN_METHOD_PTR_TRAMP
+#define INTERP_ENTRY_BASE(_method, _this_arg, _res) \
+       InterpEntryData data; \
+       (data).rmethod = (_method); \
+       (data).res = (_res); \
+       (data).this_arg = (_this_arg); \
+       (data).many_args = NULL;
 
-gpointer *mp_tramps[TRAMPS_USED] = {
-       (gpointer) mp_tramp_0, (gpointer) mp_tramp_1, (gpointer) mp_tramp_2, (gpointer) mp_tramp_3,
-       (gpointer) mp_tramp_4, (gpointer) mp_tramp_5, (gpointer) mp_tramp_6, (gpointer) mp_tramp_7
-};
+#define INTERP_ENTRY0(_this_arg, _res, _method) {      \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY1(_this_arg, _res, _method) {        \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY2(_this_arg, _res, _method) {  \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       (data).args [1] = arg2; \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY3(_this_arg, _res, _method) { \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       (data).args [1] = arg2; \
+       (data).args [2] = arg3; \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY4(_this_arg, _res, _method) {      \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       (data).args [1] = arg2; \
+       (data).args [2] = arg3; \
+       (data).args [3] = arg4; \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY5(_this_arg, _res, _method) {      \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       (data).args [1] = arg2; \
+       (data).args [2] = arg3; \
+       (data).args [3] = arg4; \
+       (data).args [4] = arg5; \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY6(_this_arg, _res, _method) {      \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       (data).args [1] = arg2; \
+       (data).args [2] = arg3; \
+       (data).args [3] = arg4; \
+       (data).args [4] = arg5; \
+       (data).args [5] = arg6; \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY7(_this_arg, _res, _method) {      \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       (data).args [1] = arg2; \
+       (data).args [2] = arg3; \
+       (data).args [3] = arg4; \
+       (data).args [4] = arg5; \
+       (data).args [5] = arg6; \
+       (data).args [6] = arg7; \
+       interp_entry (&data); \
+       }
+#define INTERP_ENTRY8(_this_arg, _res, _method) {      \
+       INTERP_ENTRY_BASE (_method, _this_arg, _res); \
+       (data).args [0] = arg1; \
+       (data).args [1] = arg2; \
+       (data).args [2] = arg3; \
+       (data).args [3] = arg4; \
+       (data).args [4] = arg5; \
+       (data).args [5] = arg6; \
+       (data).args [6] = arg7; \
+       (data).args [7] = arg8; \
+       interp_entry (&data); \
+       }
 
-static int tramps_used = 0;
+#define ARGLIST0 RuntimeMethod *rmethod
+#define ARGLIST1 gpointer arg1, RuntimeMethod *rmethod
+#define ARGLIST2 gpointer arg1, gpointer arg2, RuntimeMethod *rmethod
+#define ARGLIST3 gpointer arg1, gpointer arg2, gpointer arg3, RuntimeMethod *rmethod
+#define ARGLIST4 gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, RuntimeMethod *rmethod
+#define ARGLIST5 gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, RuntimeMethod *rmethod
+#define ARGLIST6 gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, gpointer arg6, RuntimeMethod *rmethod
+#define ARGLIST7 gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, gpointer arg6, gpointer arg7, RuntimeMethod *rmethod
+#define ARGLIST8 gpointer arg1, gpointer arg2, gpointer arg3, gpointer arg4, gpointer arg5, gpointer arg6, gpointer arg7, gpointer arg8, RuntimeMethod *rmethod
+
+static void interp_entry_static_0 (ARGLIST0) INTERP_ENTRY0 (NULL, NULL, rmethod)
+static void interp_entry_static_1 (ARGLIST1) INTERP_ENTRY1 (NULL, NULL, rmethod)
+static void interp_entry_static_2 (ARGLIST2) INTERP_ENTRY2 (NULL, NULL, rmethod)
+static void interp_entry_static_3 (ARGLIST3) INTERP_ENTRY3 (NULL, NULL, rmethod)
+static void interp_entry_static_4 (ARGLIST4) INTERP_ENTRY4 (NULL, NULL, rmethod)
+static void interp_entry_static_5 (ARGLIST5) INTERP_ENTRY5 (NULL, NULL, rmethod)
+static void interp_entry_static_6 (ARGLIST6) INTERP_ENTRY6 (NULL, NULL, rmethod)
+static void interp_entry_static_7 (ARGLIST7) INTERP_ENTRY7 (NULL, NULL, rmethod)
+static void interp_entry_static_8 (ARGLIST8) INTERP_ENTRY8 (NULL, NULL, rmethod)
+static void interp_entry_static_ret_0 (gpointer res, ARGLIST0) INTERP_ENTRY0 (NULL, res, rmethod)
+static void interp_entry_static_ret_1 (gpointer res, ARGLIST1) INTERP_ENTRY1 (NULL, res, rmethod)
+static void interp_entry_static_ret_2 (gpointer res, ARGLIST2) INTERP_ENTRY2 (NULL, res, rmethod)
+static void interp_entry_static_ret_3 (gpointer res, ARGLIST3) INTERP_ENTRY3 (NULL, res, rmethod)
+static void interp_entry_static_ret_4 (gpointer res, ARGLIST4) INTERP_ENTRY4 (NULL, res, rmethod)
+static void interp_entry_static_ret_5 (gpointer res, ARGLIST5) INTERP_ENTRY5 (NULL, res, rmethod)
+static void interp_entry_static_ret_6 (gpointer res, ARGLIST6) INTERP_ENTRY6 (NULL, res, rmethod)
+static void interp_entry_static_ret_7 (gpointer res, ARGLIST7) INTERP_ENTRY7 (NULL, res, rmethod)
+static void interp_entry_static_ret_8 (gpointer res, ARGLIST8) INTERP_ENTRY8 (NULL, res, rmethod)
+static void interp_entry_instance_0 (gpointer this_arg, ARGLIST0) INTERP_ENTRY0 (this_arg, NULL, rmethod)
+static void interp_entry_instance_1 (gpointer this_arg, ARGLIST1) INTERP_ENTRY1 (this_arg, NULL, rmethod)
+static void interp_entry_instance_2 (gpointer this_arg, ARGLIST2) INTERP_ENTRY2 (this_arg, NULL, rmethod)
+static void interp_entry_instance_3 (gpointer this_arg, ARGLIST3) INTERP_ENTRY3 (this_arg, NULL, rmethod)
+static void interp_entry_instance_4 (gpointer this_arg, ARGLIST4) INTERP_ENTRY4 (this_arg, NULL, rmethod)
+static void interp_entry_instance_5 (gpointer this_arg, ARGLIST5) INTERP_ENTRY5 (this_arg, NULL, rmethod)
+static void interp_entry_instance_6 (gpointer this_arg, ARGLIST6) INTERP_ENTRY6 (this_arg, NULL, rmethod)
+static void interp_entry_instance_7 (gpointer this_arg, ARGLIST7) INTERP_ENTRY7 (this_arg, NULL, rmethod)
+static void interp_entry_instance_8 (gpointer this_arg, ARGLIST8) INTERP_ENTRY8 (this_arg, NULL, rmethod)
+static void interp_entry_instance_ret_0 (gpointer this_arg, gpointer res, ARGLIST0) INTERP_ENTRY0 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_1 (gpointer this_arg, gpointer res, ARGLIST1) INTERP_ENTRY1 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_2 (gpointer this_arg, gpointer res, ARGLIST2) INTERP_ENTRY2 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_3 (gpointer this_arg, gpointer res, ARGLIST3) INTERP_ENTRY3 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_4 (gpointer this_arg, gpointer res, ARGLIST4) INTERP_ENTRY4 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_5 (gpointer this_arg, gpointer res, ARGLIST5) INTERP_ENTRY5 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_6 (gpointer this_arg, gpointer res, ARGLIST6) INTERP_ENTRY6 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_7 (gpointer this_arg, gpointer res, ARGLIST7) INTERP_ENTRY6 (this_arg, res, rmethod)
+static void interp_entry_instance_ret_8 (gpointer this_arg, gpointer res, ARGLIST8) INTERP_ENTRY6 (this_arg, res, rmethod)
+
+#define INTERP_ENTRY_FUNCLIST(type) interp_entry_ ## type ## _0, interp_entry_ ## type ## _1, interp_entry_ ## type ## _2, interp_entry_ ## type ## _3, interp_entry_ ## type ## _4, interp_entry_ ## type ## _5, interp_entry_ ## type ## _6, interp_entry_ ## type ## _7, interp_entry_ ## type ## _8
+
+gpointer entry_funcs_static [MAX_INTERP_ENTRY_ARGS + 1] = { INTERP_ENTRY_FUNCLIST (static) };
+gpointer entry_funcs_static_ret [MAX_INTERP_ENTRY_ARGS + 1] = { INTERP_ENTRY_FUNCLIST (static_ret) };
+gpointer entry_funcs_instance [MAX_INTERP_ENTRY_ARGS + 1] = { INTERP_ENTRY_FUNCLIST (instance) };
+gpointer entry_funcs_instance_ret [MAX_INTERP_ENTRY_ARGS + 1] = { INTERP_ENTRY_FUNCLIST (instance_ret) };
+
+/* General version for methods with more than MAX_INTERP_ENTRY_ARGS arguments */
+static void
+interp_entry_general (gpointer this_arg, gpointer res, gpointer *args, gpointer rmethod)
+{
+       INTERP_ENTRY_BASE (rmethod, this_arg, res);
+       data.many_args = args;
+       interp_entry (&data);
+}
 
+/*
+ * mono_interp_create_method_pointer:
+ *
+ * Return a function pointer which can be used to call METHOD using the
+ * interpreter. Return NULL for methods which are not supported.
+ */
 gpointer
 mono_interp_create_method_pointer (MonoMethod *method, MonoError *error)
 {
        gpointer addr;
-       MonoJitInfo *ji;
+       MonoMethodSignature *sig = mono_method_signature (method);
+       MonoMethod *wrapper;
+       RuntimeMethod *rmethod;
 
-       mono_os_mutex_lock (&create_method_pointer_mutex);
-       if (!method_pointer_hash) {
-               // FIXME: is registering method table as GC root really necessary?
-               // MONO_GC_REGISTER_ROOT_FIXED (method_pointer_hash);
-               method_pointer_hash = g_hash_table_new (NULL, NULL);
-       }
-       addr = g_hash_table_lookup (method_pointer_hash, method);
-       if (addr) {
-               mono_os_mutex_unlock (&create_method_pointer_mutex);
-               return addr;
+       if (method->wrapper_type && method->wrapper_type != MONO_WRAPPER_RUNTIME_INVOKE)
+               return NULL;
+
+       rmethod = mono_interp_get_runtime_method (mono_domain_get (), method, error);
+       if (rmethod->jit_entry)
+               return rmethod->jit_entry;
+       wrapper = mini_get_interp_in_wrapper (sig);
+
+       gpointer jit_wrapper = mono_jit_compile_method_jit_only (wrapper, error);
+       mono_error_assert_ok (error);
+
+       //printf ("%s %s\n", mono_method_full_name (method, 1), mono_method_full_name (wrapper, 1));
+       gpointer entry_func;
+       if (sig->param_count > MAX_INTERP_ENTRY_ARGS) {
+               entry_func = interp_entry_general;
+       } else if (sig->hasthis) {
+               if (sig->ret->type == MONO_TYPE_VOID)
+                       entry_func = entry_funcs_instance [sig->param_count];
+               else
+                       entry_func = entry_funcs_instance_ret [sig->param_count];
+       } else {
+               if (sig->ret->type == MONO_TYPE_VOID)
+                       entry_func = entry_funcs_static [sig->param_count];
+               else
+                       entry_func = entry_funcs_static_ret [sig->param_count];
        }
+       g_assert (entry_func);
+
+       /* This is the argument passed to the interp_in wrapper by the static rgctx trampoline */
+       MonoFtnDesc *ftndesc = g_new0 (MonoFtnDesc, 1);
+       ftndesc->addr = entry_func;
+       ftndesc->arg = rmethod;
+       mono_error_assert_ok (error);
 
        /*
-        * If it is a static P/Invoke method, we can just return the pointer
-        * to the method implementation.
+        * The wrapper is called by compiled code, which doesn't pass the extra argument, so we pass it in the
+        * rgctx register using a trampoline.
         */
-       if (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL && ((MonoMethodPInvoke*) method)->addr) {
-               ji = g_new0 (MonoJitInfo, 1);
-               ji->d.method = method;
-               ji->code_size = 1;
-               ji->code_start = addr = ((MonoMethodPInvoke*) method)->addr;
-
-               mono_jit_info_table_add (mono_get_root_domain (), ji);
-       }               
-       else {
-               g_assert (method->wrapper_type == MONO_WRAPPER_RUNTIME_INVOKE);
-               g_assert (tramps_used < TRAMPS_USED);
-
-               /* FIXME: needs locking */
-               method_pointers [tramps_used] = method;
-               addr = mp_tramps [tramps_used];
-               tramps_used++;
-       }
 
-       g_hash_table_insert (method_pointer_hash, method, addr);
-       mono_os_mutex_unlock (&create_method_pointer_mutex);
+       // FIXME: AOT
+       g_assert (!mono_aot_only);
+       addr = mono_arch_get_static_rgctx_trampoline (ftndesc, jit_wrapper);
+
+       mono_memory_barrier ();
+       rmethod->jit_entry = addr;
 
        return addr;
 }
@@ -1595,23 +2001,16 @@ static int opcode_counts[512];
 #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);
 
 static void 
-ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
+ves_exec_method_with_context_with_ip (MonoInvocation *frame, ThreadContext *context, unsigned short *start_with_ip, MonoException *filter_exception)
 {
        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
+       const unsigned short *ip = NULL;
        register stackval *sp;
        RuntimeMethod *rtm;
 #if DEBUG_INTERP
@@ -1658,25 +2057,26 @@ ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
        }
 
        rtm = frame->runtime_method;
-       frame->args = alloca (rtm->alloca_size);
-       memset (frame->args, 0, rtm->alloca_size);
-
-       sp = frame->stack = (stackval *)((char *)frame->args + rtm->args_size);
-       memset (sp, 0, rtm->stack_size);
+       if (!start_with_ip ) {
+               frame->args = alloca (rtm->alloca_size);
+               memset (frame->args, 0, rtm->alloca_size);
 
+               ip = rtm->code;
+       } else {
+               ip = start_with_ip;
+       }
+       sp = frame->stack = (stackval *) ((char *) frame->args + rtm->args_size);
        vt_sp = (unsigned char *) sp + rtm->stack_size;
-       memset (vt_sp, 0, rtm->vt_stack_size);
 #if DEBUG_INTERP
        vtalloc = vt_sp;
 #endif
-
        locals = (unsigned char *) vt_sp + rtm->vt_stack_size;
-       memset (vt_sp, 0, rtm->locals_size);
-
        child_frame.parent = frame;
 
-       /* ready to go */
-       ip = rtm->code;
+       if (filter_exception) {
+               sp->data.p = filter_exception;
+               sp++;
+       }
 
        /*
         * using while (ip < end) may result in a 15% performance drop, 
@@ -1940,6 +2340,7 @@ ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
                                child_frame.runtime_method = mono_interp_get_runtime_method (context->domain, mono_marshal_get_remoting_invoke (child_frame.runtime_method->method), &error);
                                mono_error_cleanup (&error); /* FIXME: don't swallow the error */
                        }
+
                        ves_exec_method_with_context (&child_frame, context);
 
                        context->current_frame = frame;
@@ -1993,6 +2394,215 @@ ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
                        }
                        MINT_IN_BREAK;
                }
+
+               MINT_IN_CASE(MINT_JIT_CALL) {
+                       MonoMethodSignature *sig;
+                       RuntimeMethod *rmethod = rtm->data_items [* (guint16 *)(ip + 1)];
+                       MonoFtnDesc ftndesc;
+                       guint8 res_buf [256];
+                       MonoType *type;
+
+                       //printf ("%s\n", mono_method_full_name (rmethod->method, 1));
+
+                       /*
+                        * Call JITted code through a gsharedvt_out wrapper. These wrappers receive every argument
+                        * by ref and return a return value using an explicit return value argument.
+                        */
+                       if (!rmethod->jit_wrapper) {
+                               MonoMethod *method = rmethod->method;
+                               MonoError error;
+
+                               sig = mono_method_signature (method);
+                               g_assert (sig);
+
+                               MonoMethod *wrapper = mini_get_gsharedvt_out_sig_wrapper (sig);
+                               //printf ("J: %s %s\n", mono_method_full_name (method, 1), mono_method_full_name (wrapper, 1));
+
+                               gpointer jit_wrapper = mono_jit_compile_method_jit_only (wrapper, &error);
+                               mono_error_assert_ok (&error);
+
+                               gpointer addr = mono_jit_compile_method_jit_only (method, &error);
+                               g_assert (addr);
+                               mono_error_assert_ok (&error);
+
+                               rmethod->jit_addr = addr;
+                               rmethod->jit_sig = sig;
+                               mono_memory_barrier ();
+                               rmethod->jit_wrapper = jit_wrapper;
+
+                       } else {
+                               sig = rmethod->jit_sig;
+                       }
+
+                       frame->ip = ip;
+                       ip += 2;
+                       sp -= sig->param_count;
+                       if (sig->hasthis)
+                               --sp;
+
+                       ftndesc.addr = rmethod->jit_addr;
+                       ftndesc.arg = NULL;
+
+                       // FIXME: Optimize this
+
+                       gpointer args [32];
+                       int pindex = 0;
+                       int stack_index = 0;
+                       if (rmethod->hasthis) {
+                               args [pindex ++] = sp [0].data.p;
+                               stack_index ++;
+                       }
+                       type = rmethod->rtype;
+                       if (type->type != MONO_TYPE_VOID) {
+                               if (MONO_TYPE_ISSTRUCT (type))
+                                       args [pindex ++] = vt_sp;
+                               else
+                                       args [pindex ++] = res_buf;
+                       }
+                       for (int i = 0; i < rmethod->param_count; ++i) {
+                               MonoType *t = rmethod->param_types [i];
+                               stackval *sval = &sp [stack_index + i];
+                               if (sig->params [i]->byref) {
+                                       args [pindex ++] = sval->data.p;
+                               } else if (MONO_TYPE_ISSTRUCT (t)) {
+                                       args [pindex ++] = sval->data.p;
+                               } else if (MONO_TYPE_IS_REFERENCE (t)) {
+                                       args [pindex ++] = &sval->data.p;
+                               } else {
+                                       switch (t->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_VALUETYPE:
+                                               args [pindex ++] = &sval->data.i;
+                                               break;
+                                       case MONO_TYPE_PTR:
+                                       case MONO_TYPE_FNPTR:
+                                       case MONO_TYPE_I:
+                                       case MONO_TYPE_U:
+                                       case MONO_TYPE_OBJECT:
+                                               args [pindex ++] = &sval->data.p;
+                                               break;
+                                       case MONO_TYPE_I8:
+                                       case MONO_TYPE_U8:
+                                               args [pindex ++] = &sval->data.l;
+                                               break;
+                                       default:
+                                               printf ("%s\n", mono_type_full_name (t));
+                                               g_assert_not_reached ();
+                                       }
+                               }
+                       }
+
+                       switch (pindex) {
+                       case 0: {
+                               void (*func)(gpointer) = rmethod->jit_wrapper;
+
+                               func (&ftndesc);
+                               break;
+                       }
+                       case 1: {
+                               void (*func)(gpointer, gpointer) = rmethod->jit_wrapper;
+
+                               func (args [0], &ftndesc);
+                               break;
+                       }
+                       case 2: {
+                               void (*func)(gpointer, gpointer, gpointer) = rmethod->jit_wrapper;
+
+                               func (args [0], args [1], &ftndesc);
+                               break;
+                       }
+                       case 3: {
+                               void (*func)(gpointer, gpointer, gpointer, gpointer) = rmethod->jit_wrapper;
+
+                               func (args [0], args [1], args [2], &ftndesc);
+                               break;
+                       }
+                       case 4: {
+                               void (*func)(gpointer, gpointer, gpointer, gpointer, gpointer) = rmethod->jit_wrapper;
+
+                               func (args [0], args [1], args [2], args [3], &ftndesc);
+                               break;
+                       }
+                       case 5: {
+                               void (*func)(gpointer, gpointer, gpointer, gpointer, gpointer, gpointer) = rmethod->jit_wrapper;
+
+                               func (args [0], args [1], args [2], args [3], args [4], &ftndesc);
+                               break;
+                       }
+                       case 6: {
+                               void (*func)(gpointer, gpointer, gpointer, gpointer, gpointer, gpointer, gpointer) = rmethod->jit_wrapper;
+
+                               func (args [0], args [1], args [2], args [3], args [4], args [5], &ftndesc);
+                               break;
+                       }
+                       case 7: {
+                               void (*func)(gpointer, gpointer, gpointer, gpointer, gpointer, gpointer, gpointer, gpointer) = rmethod->jit_wrapper;
+
+                               func (args [0], args [1], args [2], args [3], args [4], args [5], args [6], &ftndesc);
+                               break;
+                       }
+                       default:
+                               g_assert_not_reached ();
+                               break;
+                       }
+
+                       MonoType *rtype = rmethod->rtype;
+                       switch (rtype->type) {
+                       case MONO_TYPE_VOID:
+                       case MONO_TYPE_OBJECT:
+                       case MONO_TYPE_STRING:
+                       case MONO_TYPE_CLASS:
+                       case MONO_TYPE_ARRAY:
+                       case MONO_TYPE_SZARRAY:
+                       case MONO_TYPE_I:
+                       case MONO_TYPE_U:
+                               sp->data.p = *(gpointer*)res_buf;
+                               break;
+                       case MONO_TYPE_I1:
+                               sp->data.i = *(gint8*)res_buf;
+                               break;
+                       case MONO_TYPE_U1:
+                               sp->data.i = *(guint8*)res_buf;
+                               break;
+                       case MONO_TYPE_I2:
+                               sp->data.i = *(gint16*)res_buf;
+                               break;
+                       case MONO_TYPE_U2:
+                               sp->data.i = *(guint16*)res_buf;
+                               break;
+                       case MONO_TYPE_I4:
+                               sp->data.i = *(gint32*)res_buf;
+                               break;
+                       case MONO_TYPE_U4:
+                               sp->data.i = *(guint32*)res_buf;
+                               break;
+                       case MONO_TYPE_VALUETYPE:
+                               /* The result was written to vt_sp */
+                               sp->data.p = vt_sp;
+                               break;
+                       case MONO_TYPE_GENERICINST:
+                               if (MONO_TYPE_IS_REFERENCE (rtype)) {
+                                       sp->data.p = *(gpointer*)res_buf;
+                               } else {
+                                       /* The result was written to vt_sp */
+                                       sp->data.p = vt_sp;
+                               }
+                               break;
+                       default:
+                               printf ("%s\n", mono_type_full_name (rtype));
+                               g_assert_not_reached ();
+                               break;
+                       }
+                       if (rtype->type != MONO_TYPE_VOID)
+                               sp++;
+                       MINT_IN_BREAK;
+               }
+
                MINT_IN_CASE(MINT_CALLVIRT) {
                        stackval *endsp = sp;
                        MonoObject *this_arg;
@@ -2443,7 +3053,7 @@ ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
                MINT_IN_CASE(MINT_STIND_REF) 
                        ++ip;
                        sp -= 2;
-                       * (gpointer *) sp->data.p = sp[1].data.p;
+                       mono_gc_wbarrier_generic_store (sp->data.p, sp [1].data.p);
                        MINT_IN_BREAK;
                MINT_IN_CASE(MINT_STIND_I1)
                        ++ip;
@@ -2759,6 +3369,8 @@ ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
                MINT_IN_CASE(MINT_CPOBJ) {
                        c = rtm->data_items[* (guint16 *)(ip + 1)];
                        g_assert (c->byval_arg.type == MONO_TYPE_VALUETYPE);
+                       /* if this assertion fails, we need to add a write barrier */
+                       g_assert (!MONO_TYPE_IS_REFERENCE (&c->byval_arg));
                        stackval_from_data (&c->byval_arg, &sp [-2], sp [-1].data.p, FALSE);
                        ip += 2;
                        sp -= 2;
@@ -3039,8 +3651,15 @@ array_constructed:
                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_O)
+                       o = sp [-2].data.p;
+                       if (!o)
+                               THROW_EX (mono_get_exception_null_reference (), ip);
+                       sp -= 2;
+                       mono_gc_wbarrier_set_field (o, (char *) o + * (guint16 *)(ip + 1), sp [1].data.p);
+                       ip += 2;
+                       MINT_IN_BREAK;
 
                MINT_IN_CASE(MINT_STFLD_VT)
                        o = sp [-2].data.p;
@@ -3151,11 +3770,14 @@ array_constructed:
                        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);
+
+                       g_assert (!c->byval_arg.byref);
+                       if (MONO_TYPE_IS_REFERENCE (&c->byval_arg))
+                               mono_gc_wbarrier_generic_store (sp [-2].data.p, sp [-1].data.p);
+                       else
+                               stackval_from_data (&c->byval_arg, sp [-2].data.p, (char *) &sp [-1].data.p, FALSE);
                        sp -= 2;
                        MINT_IN_BREAK;
                }
@@ -3254,7 +3876,10 @@ array_constructed:
                }
                MINT_IN_CASE(MINT_STRLEN)
                        ++ip;
-                       sp [-1].data.i = mono_string_length ((MonoString*)sp [-1].data.p);
+                       o = sp [-1].data.p;
+                       if (!o)
+                               THROW_EX (mono_get_exception_null_reference (), ip);
+                       sp [-1].data.i = mono_string_length ((MonoString*) o);
                        MINT_IN_BREAK;
                MINT_IN_CASE(MINT_ARRAY_RANK)
                        o = sp [-1].data.p;
@@ -3412,7 +4037,7 @@ array_constructed:
                                mono_error_cleanup (&error); /* FIXME: don't swallow the error */
                                if (sp [2].data.p && !isinst_obj)
                                        THROW_EX (mono_get_exception_array_type_mismatch (), ip);
-                               mono_array_set ((MonoArray *)o, gpointer, aindex, sp [2].data.p);
+                               mono_array_setref ((MonoArray *) o, aindex, sp [2].data.p);
                                break;
                        }
                        case MINT_STELEM_VT: {
@@ -3623,6 +4248,9 @@ array_constructed:
                        BINOP_CAST(l, -, guint64);
                        MINT_IN_BREAK;
                MINT_IN_CASE(MINT_ENDFINALLY)
+                       while (sp > frame->stack) {
+                               --sp;
+                       }
                        if (finally_ips) {
                                ip = finally_ips->data;
                                finally_ips = g_slist_remove (finally_ips, ip);
@@ -3949,9 +4577,10 @@ array_constructed:
                        ++ip;
                        MINT_IN_BREAK;
                }
-#if 0
-               MINT_IN_CASE(MINT_ENDFILTER) ves_abort(); MINT_IN_BREAK;
-#endif
+               MINT_IN_CASE(MINT_ENDFILTER)
+                       /* top of stack is result of filter */
+                       frame->retval = &sp [-1];
+                       goto exit_frame;
                MINT_IN_CASE(MINT_INITOBJ)
                        --sp;
                        memset (sp->data.vt, 0, READ32(ip + 1));
@@ -4048,24 +4677,44 @@ array_constructed:
                        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) {
-                                               MonoObject *isinst_obj = mono_object_isinst_checked ((MonoObject*)frame->ex, clause->data.catch_class, &error);
-                                               mono_error_cleanup (&error); /* FIXME: don't swallow the error */
-                                               if (isinst_obj) {
-                                                       /* 
-                                                        * 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);
+                               g_print ("* clause [%d]: %p\n", i, clause);
+#endif
+                               if (!MONO_OFFSET_IN_CLAUSE (clause, ip_offset)) {
+                                       continue;
+                               }
+                               if (clause->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
+#if DEBUG_INTERP
+                                       if (tracing)
+                                               g_print ("* Filter found at '%s'\n", method->name);
+#endif
+                                       MonoInvocation dup_frame;
+                                       stackval retval;
+                                       memcpy (&dup_frame, inv, sizeof (MonoInvocation));
+                                       dup_frame.retval = &retval;
+                                       ves_exec_method_with_context_with_ip (&dup_frame, context, inv->runtime_method->code + clause->data.filter_offset, frame->ex);
+                                       if (dup_frame.retval->data.i) {
+#if DEBUG_INTERP
+                                               if (tracing)
+                                                       g_print ("* Matched Filter at '%s'\n", method->name);
 #endif
-                                                       goto handle_finally;
-                                               }
-                                       } else {
-                                               g_error ("FIXME: handle filter clause");
+                                               inv->ex_handler = clause;
+                                               goto handle_finally;
+                                       }
+                               } else if (clause->flags == MONO_EXCEPTION_CLAUSE_NONE) {
+                                       MonoObject *isinst_obj = mono_object_isinst_checked ((MonoObject*)frame->ex, clause->data.catch_class, &error);
+                                       mono_error_cleanup (&error); /* FIXME: don't swallow the error */
+                                       if (isinst_obj) {
+                                               /* 
+                                                * OK, we found an handler, now we need to execute the finally
+                                                * and fault blocks before branching to the handler code.
+                                                */
+#if DEBUG_INTERP
+                                               if (tracing)
+                                                       g_print ("* Found handler at '%s'\n", method->name);
+#endif
+                                               inv->ex_handler = clause;
+                                               goto handle_finally;
                                        }
                                }
                        }
@@ -4078,9 +4727,11 @@ array_constructed:
                                goto handle_finally;
                }
 die_on_ex:
-               ex_obj = (MonoObject*)frame->ex;
+               ex_obj = (MonoObject *) frame->ex;
                mono_unhandled_exception (ex_obj);
-               exit (1);
+               MonoJitTlsData *jit_tls = (MonoJitTlsData *) mono_tls_get_jit_tls ();
+               jit_tls->abort_func (ex_obj);
+               g_assert_not_reached ();
        }
        handle_finally:
        {
@@ -4189,6 +4840,12 @@ exit_frame:
        DEBUG_LEAVE ();
 }
 
+static void
+ves_exec_method_with_context (MonoInvocation *frame, ThreadContext *context)
+{
+       ves_exec_method_with_context_with_ip (frame, context, NULL, NULL);
+}
+
 void
 ves_exec_method (MonoInvocation *frame)
 {
@@ -4378,12 +5035,25 @@ interp_ves_icall_get_trace (MonoException *exc, gint32 skip, MonoBoolean need_fi
        return res;
 }
 
+void
+mono_interp_parse_options (const char *options)
+{
+       char **args, **ptr;
+
+       args = g_strsplit (options, ",", -1);
+       for (ptr = args; ptr && *ptr; ptr ++) {
+               char *arg = *ptr;
+
+               if (strncmp (arg, "jit=", 4) == 0)
+                       jit_classes = g_slist_prepend (jit_classes, arg + 4);
+       }
+}
+
 void
 mono_interp_init ()
 {
        mono_native_tls_alloc (&thread_context_id, NULL);
-    mono_native_tls_set_value (thread_context_id, NULL);
-       mono_os_mutex_init_recursive (&create_method_pointer_mutex);
+       mono_native_tls_set_value (thread_context_id, NULL);
 
        mono_interp_transform_init ();
 }
@@ -4500,6 +5170,7 @@ interp_regression_step (MonoImage *image, int verbose, int *total_run, int *tota
        *total += failed + cfailed;
        *total_run += run;
 }
+
 static int
 interp_regression (MonoImage *image, int verbose, int *total_run)
 {
@@ -4535,7 +5206,7 @@ mono_interp_regression_list (int verbose, int count, char *images [])
        
        total_run = total = 0;
        for (i = 0; i < count; ++i) {
-               MonoAssembly *ass = mono_assembly_open (images [i], NULL);
+               MonoAssembly *ass = mono_assembly_open_predicate (images [i], FALSE, FALSE, NULL, NULL, NULL);
                if (!ass) {
                        g_warning ("failed to load assembly: %s", images [i]);
                        continue;
index cd3514fa7ef08a02f13453df1fdbcd32a90202e3..951c47c85e1a416fa8bcbad7e87d0263ccff3228 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_INTERPRETER_H__
 #define __MONO_MINI_INTERPRETER_H__
 #include <mono/mini/mini.h>
@@ -20,6 +24,9 @@ mono_interp_init_delegate (MonoDelegate *del);
 gpointer
 mono_interp_create_trampoline (MonoDomain *domain, MonoMethod *method, MonoError *error);
 
+void
+mono_interp_parse_options (const char *options);
+
 void
 interp_walk_stack_with_ctx (MonoInternalStackWalk func, MonoContext *ctx, MonoUnwindOptions options, void *user_data);
 #endif /* __MONO_MINI_INTERPRETER_H__ */
index 5b4d69269e851cb3cbab24ba2d5996c093c15035..e1c58ecf7a968643c8ac0ae638088dfa4f4aea01 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Utilities for handling interpreter VM instructions
  *
  * Authors:
index a6afa577ebd66786f2dd9b42a27484a140b377c7..39330d479f7eea4098161b4560d21350b6d289db 100644 (file)
@@ -266,6 +266,8 @@ OPDEF(MINT_JMP, "jmp", 2, MintOpMethodToken)
 
 OPDEF(MINT_CALLRUN, "callrun", 1, MintOpNoArgs)
 
+OPDEF(MINT_ENDFILTER, "endfilter", 1, MintOpNoArgs)
+
 OPDEF(MINT_NEWOBJ, "newobj", 2, MintOpMethodToken) 
 OPDEF(MINT_INITOBJ, "initobj", 3, MintOpInt) 
 OPDEF(MINT_CASTCLASS, "castclass", 2, MintOpClassToken) 
@@ -509,4 +511,5 @@ OPDEF(MINT_MONO_NEWOBJ, "mono_newobj", 2, MintOpClassToken)
 OPDEF(MINT_MONO_RETOBJ, "mono_retobj", 1, MintOpNoArgs)
 OPDEF(MINT_MONO_FREE, "mono_free", 1, MintOpNoArgs)
 
-
+// FIXME: MintOp
+OPDEF(MINT_JIT_CALL, "mono_jit_call", 2, MintOpNoArgs)
index e787526e2febe225faeb272671a1f38770600f42..7a9bc4da017922de3a485fcdaf71cc9669083c6a 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __INTERPRETER_MINTOPS_H
 #define __INTERPRETER_MINTOPS_H
 
index 480fe0bdb3a38540a1f2e5fedce207efac955ab4..6012bb1e1d78eb1b5b26a0a0972cbecedfebc594 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * transform CIL into different opcodes for more
  * efficient interpretation
  *
@@ -502,7 +503,7 @@ store_arg(TransformData *td, int n)
                else
                        size = mono_class_value_size (klass, NULL);
                ADD_CODE(td, MINT_STARG_VT);
-               ADD_CODE(td, n);
+               ADD_CODE(td, td->rtm->arg_offsets [n]);
                WRITE32(td, &size);
                if (td->sp [-1].type == STACK_TYPE_VT)
                        POP_VT(td, size);
@@ -635,6 +636,35 @@ get_data_item_index (TransformData *td, void *ptr)
        return index;
 }
 
+static gboolean
+jit_call_supported (MonoMethod *method, MonoMethodSignature *sig)
+{
+       GSList *l;
+
+       if (sig->param_count > 6)
+               return FALSE;
+       if (sig->pinvoke)
+               return FALSE;
+       if (method->flags & METHOD_ATTRIBUTE_PINVOKE_IMPL)
+               return FALSE;
+       if (method->iflags & METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL)
+               return FALSE;
+       if (method->is_inflated)
+               return FALSE;
+       if (method->string_ctor)
+               return FALSE;
+
+       for (l = jit_classes; l; l = l->next) {
+               char *class_name = l->data;
+               // FIXME: Namespaces
+               if (!strcmp (method->klass->name, class_name))
+                       return TRUE;
+       }
+
+       //return TRUE;
+       return FALSE;
+}
+
 static void
 interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target_method, MonoDomain *domain, MonoGenericContext *generic_context, unsigned char *is_bb_start, int body_start_offset, MonoClass *constrained_class, gboolean readonly)
 {
@@ -857,6 +887,10 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target
                        ADD_CODE (td, get_data_item_index (td, target_method->klass));
                        ADD_CODE (td, 1 + target_method->klass->rank);
                }
+       } else if (!calli && !virtual && jit_call_supported (target_method, csignature)) {
+               ADD_CODE(td, MINT_JIT_CALL);
+               ADD_CODE(td, get_data_item_index (td, (void *)mono_interp_get_runtime_method (domain, target_method, &error)));
+               mono_error_assert_ok (&error);
        } else {
                if (calli)
                        ADD_CODE(td, native ? MINT_CALLI_NAT : MINT_CALLI);
@@ -864,7 +898,7 @@ interp_transform_call (TransformData *td, MonoMethod *method, MonoMethod *target
                        ADD_CODE(td, is_void ? MINT_VCALLVIRT : MINT_CALLVIRT);
                else
                        ADD_CODE(td, is_void ? MINT_VCALL : MINT_CALL);
-               
+
                if (calli) {
                        ADD_CODE(td, get_data_item_index (td, (void *)csignature));
                } else {
@@ -943,6 +977,17 @@ generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start, Mo
                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*/
+
+               if (c->flags & MONO_EXCEPTION_CLAUSE_FILTER) {
+                       td.stack_height [c->data.filter_offset] = 0;
+                       td.vt_stack_size [c->data.filter_offset] = 0;
+                       td.is_bb_start [c->data.filter_offset] = 1;
+
+                       td.stack_height [c->data.filter_offset] = 1;
+                       td.stack_state [c->data.filter_offset] = g_malloc0(sizeof(StackInfo));
+                       td.stack_state [c->data.filter_offset][0].type = STACK_TYPE_O;
+                       td.stack_state [c->data.filter_offset][0].klass = NULL; /*FIX*/
+               }
        }
 
        td.ip = header->code;
@@ -2758,6 +2803,7 @@ generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start, Mo
                        ++td.ip;
                        break;
                case CEE_ENDFINALLY:
+                       td.sp = td.stack;
                        SIMPLE_OP (td, MINT_ENDFINALLY);
                        generating_code = 0;
                        break;
@@ -3071,8 +3117,11 @@ generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start, Mo
                                break;
 #if 0
                        case CEE_UNUSED57: ves_abort(); break;
-                       case CEE_ENDFILTER: ves_abort(); break;
 #endif
+                       case CEE_ENDFILTER:
+                               ADD_CODE (&td, MINT_ENDFILTER);
+                               ++td.ip;
+                               break;
                        case CEE_UNALIGNED_:
                                ++td.ip;
                                /* FIX: should do something? */;
@@ -3121,6 +3170,7 @@ generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start, Mo
                                CHECK_STACK(&td, 3);
                                ADD_CODE(&td, MINT_INITBLK);
                                td.sp -= 3;
+                               td.ip += 1;
                                break;
 #if 0
                        case CEE_NO_:
@@ -3200,6 +3250,8 @@ generate (MonoMethod *method, RuntimeMethod *rtm, unsigned char *is_bb_start, Mo
                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;
+               if (c->flags & MONO_EXCEPTION_CLAUSE_FILTER)
+                       c->data.filter_offset = td.in_offsets [c->data.filter_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;
@@ -3308,7 +3360,7 @@ mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *cont
                                } 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;
@@ -3325,6 +3377,24 @@ mono_interp_transform_method (RuntimeMethod *runtime_method, ThreadContext *cont
                method = nm;
                header = mono_method_get_header (nm);
                mono_os_mutex_unlock(&calc_section);
+       } else if (method->klass == mono_defaults.array_class) {
+               if (!strcmp (method->name, "UnsafeMov")) {
+                       mono_os_mutex_lock (&calc_section);
+                       if (!runtime_method->transformed) {
+                               runtime_method->code = g_malloc (sizeof (short));
+                               runtime_method->code[0] = MINT_CALLRUN;
+                               runtime_method->stack_size = sizeof (stackval); /* for tracing */
+                               runtime_method->alloca_size = runtime_method->stack_size;
+                               runtime_method->transformed = TRUE;
+                       }
+                       mono_os_mutex_unlock(&calc_section);
+                       mono_profiler_method_end_jit (method, NULL, MONO_PROFILE_OK);
+                       return NULL;
+               } else if (!strcmp (method->name, "UnsafeStore)")) {
+                       g_error ("TODO");
+               } else if (!strcmp (method->name, "UnsafeLoad)")) {
+                       g_error ("TODO");
+               }
        }
        g_assert ((signature->param_count + signature->hasthis) < 1000);
        g_assert (header->max_stack < 10000);
index c11cd46ae081a02e008d6a99c2fe100d11373586..d535f25b6d311f3e566db35914720fb03e133f95 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * ir-emit.h: IR Creation/Emission Macros
+/**
+ * \file
+ * IR Creation/Emission Macros
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index ab4ab1295f8f3f6fb8d73bcca4ba8e7b9d320f16..b52edd4e404bf1fadba2233bdb25834d92dcf840 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * jit-icalls.c: internal calls used by the JIT
+/**
+ * \file
+ * internal calls used by the JIT
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
index a83b337baaafb9d7fa97c1dc66313aca59c983b7..f605a709507ac845e886240354877a313bd91c68 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_JIT_ICALLS_H__
 #define __MONO_JIT_ICALLS_H__
 
index ed5eca5248beb4e1d7bff51a183720e7cc3e2498..59e713da790443c5c6201607af18213f34d1351f 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
  *
index faadc048ec98457f870f771ca0e919c1f03b7b0d..998c082c284b93d6b6d56e00c040f5c20d32aab5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * liveness.c: liveness analysis
+/**
+ * \file
+ * liveness analysis
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
index 64ad6f4bd3c64343ae6a32520bf7fa7a6f9c79b5..eaa656e059c1b9c3894a321a9a4d6b19b24704e6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * liveness.c: liveness analysis
+/**
+ * \file
+ * liveness analysis
  *
  * Author:
  *   Dietmar Maurer (dietmar@ximian.com)
index 360fbfbb67d80d1fedcf697645430f907a2befee..05b89437f5bbc2a51c71a60f3c49273edd1205d0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lldb.c: Mono support for LLDB.
+/**
+ * \file
+ * Mono support for LLDB.
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index 6c601376c3929c5ace8c765441b0f08d66d1613b..b91a7b1304e76daf41d1b77adf7fa1234c397451 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_XDEBUG_LLDB_H__
 #define __MONO_XDEBUG_LLDB_H__
 
index 4510b71cea6ee58689c4ce7179b1421def6ca226..dd7019b4c291b80ba9d090318f6394657a846359 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * llvm-jit.h: LLVM backend
+/**
+ * \file
+ * LLVM backend
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
index f62cb8bd952d976dbc92c4618e5a22763c491109..9d4144eb4e1f6f17e6e946969d3dc30ac2595587 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * llvm-runtime.h: Runtime support for llvm generated code
+/**
+ * \file
+ * Runtime support for llvm generated code
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
index d8f62355b8ef1ecc69e4195fb804ef1f305fa687..7a16c1da728cac177ba8e9a7d40c5dff0f385eef 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * local-propagation.c: Local constant, copy and tree propagation.
+/**
+ * \file
+ * Local constant, copy and tree propagation.
  *
  * To make some sense of the tree mover, read mono/docs/tree-mover.txt
  *
index 80044897a83e48a34caee27a8aa05d1a92e74edc..41511ce34b0e1f4e425f455f5d37bf819d0817ff 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * main.c: The main entry point for the mono executable
+/**
+ * \file
+ * The main entry point for the mono executable
  *
  * The main entry point does a few things:
  * 
index 6e30cdc295716ad1ca163fbaac78269ba4a07bd4..62bc0f5fc52ad32eaa28fe5b38d88c038492544f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * method-to-ir.c: Convert CIL to the JIT internal representation
+/**
+ * \file
+ * Convert CIL to the JIT internal representation
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
@@ -1260,16 +1261,22 @@ mono_get_got_var (MonoCompile *cfg)
        return cfg->got_var;
 }
 
-static MonoInst *
-mono_get_vtable_var (MonoCompile *cfg)
+static void
+mono_create_rgctx_var (MonoCompile *cfg)
 {
-       g_assert (cfg->gshared);
-
        if (!cfg->rgctx_var) {
                cfg->rgctx_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
                /* force the var to be stack allocated */
                cfg->rgctx_var->flags |= MONO_INST_VOLATILE;
        }
+}
+
+static MonoInst *
+mono_get_vtable_var (MonoCompile *cfg)
+{
+       g_assert (cfg->gshared);
+
+       mono_create_rgctx_var (cfg);
 
        return cfg->rgctx_var;
 }
@@ -1825,47 +1832,35 @@ emit_push_lmf (MonoCompile *cfg)
        if (!cfg->lmf_ir)
                return;
 
-       if (cfg->lmf_ir_mono_lmf) {
-               MonoInst *lmf_vara_ins, *lmf_ins;
-               /* Load current lmf */
-               lmf_ins = mono_create_tls_get (cfg, TLS_KEY_LMF);
-               g_assert (lmf_ins);
-               EMIT_NEW_VARLOADA (cfg, lmf_vara_ins, cfg->lmf_var, NULL);
-               /* Save previous_lmf */
-               EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_vara_ins->dreg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf), lmf_ins->dreg);
-               /* Set new LMF */
-               mono_create_tls_set (cfg, lmf_vara_ins, TLS_KEY_LMF);
-       } else {
-               int lmf_reg, prev_lmf_reg;
-               /*
-                * Store lmf_addr in a variable, so it can be allocated to a global register.
-                */
-               if (!cfg->lmf_addr_var)
-                       cfg->lmf_addr_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+       int lmf_reg, prev_lmf_reg;
+       /*
+        * Store lmf_addr in a variable, so it can be allocated to a global register.
+        */
+       if (!cfg->lmf_addr_var)
+               cfg->lmf_addr_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
 
 #ifdef HOST_WIN32
-               ins = mono_create_tls_get (cfg, TLS_KEY_JIT_TLS);
-               g_assert (ins);
-               int jit_tls_dreg = ins->dreg;
+       ins = mono_create_tls_get (cfg, TLS_KEY_JIT_TLS);
+       g_assert (ins);
+       int jit_tls_dreg = ins->dreg;
 
-               lmf_reg = alloc_preg (cfg);
-               EMIT_NEW_BIALU_IMM (cfg, lmf_ins, OP_PADD_IMM, lmf_reg, jit_tls_dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, lmf));
+       lmf_reg = alloc_preg (cfg);
+       EMIT_NEW_BIALU_IMM (cfg, lmf_ins, OP_PADD_IMM, lmf_reg, jit_tls_dreg, MONO_STRUCT_OFFSET (MonoJitTlsData, lmf));
 #else
-               lmf_ins = mono_create_tls_get (cfg, TLS_KEY_LMF_ADDR);
-               g_assert (lmf_ins);
+       lmf_ins = mono_create_tls_get (cfg, TLS_KEY_LMF_ADDR);
+       g_assert (lmf_ins);
 #endif
-               lmf_ins->dreg = cfg->lmf_addr_var->dreg;
+       lmf_ins->dreg = cfg->lmf_addr_var->dreg;
 
-               EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
-               lmf_reg = ins->dreg;
+       EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
+       lmf_reg = ins->dreg;
 
-               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, 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);
-       }
+       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, 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);
 }
 
 /*
@@ -1885,26 +1880,19 @@ emit_pop_lmf (MonoCompile *cfg)
        EMIT_NEW_VARLOADA (cfg, ins, cfg->lmf_var, NULL);
        lmf_reg = ins->dreg;
 
-       if (cfg->lmf_ir_mono_lmf) {
-               /* Load previous_lmf */
-               EMIT_NEW_LOAD_MEMBASE (cfg, ins, OP_LOAD_MEMBASE, alloc_preg (cfg), lmf_reg, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
-               /* Set new LMF */
-               mono_create_tls_set (cfg, ins, TLS_KEY_LMF);
-       } else {
-               int prev_lmf_reg;
-               /*
-                * Emit IR to pop the LMF:
-                * *(lmf->lmf_addr) = lmf->prev_lmf
-                */
-               /* This could be called before emit_push_lmf () */
-               if (!cfg->lmf_addr_var)
-                       cfg->lmf_addr_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
-               lmf_addr_reg = cfg->lmf_addr_var->dreg;
+       int prev_lmf_reg;
+       /*
+        * Emit IR to pop the LMF:
+        * *(lmf->lmf_addr) = lmf->prev_lmf
+        */
+       /* This could be called before emit_push_lmf () */
+       if (!cfg->lmf_addr_var)
+               cfg->lmf_addr_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
+       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, MONO_STRUCT_OFFSET (MonoLMF, previous_lmf));
-               EMIT_NEW_STORE_MEMBASE (cfg, ins, OP_STORE_MEMBASE_REG, lmf_addr_reg, 0, prev_lmf_reg);
-       }
+       prev_lmf_reg = alloc_preg (cfg);
+       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);
 }
 
 static void
@@ -2857,6 +2845,8 @@ emit_llvmonly_calli (MonoCompile *cfg, MonoMethodSignature *fsig, MonoInst **arg
 static gboolean
 direct_icalls_enabled (MonoCompile *cfg)
 {
+       return FALSE;
+
        /* LLVM on amd64 can't handle calls to non-32 bit addresses */
 #ifdef TARGET_AMD64
        if (cfg->compile_llvm && !cfg->llvm_only)
@@ -4899,18 +4889,18 @@ static MonoBreakPolicyFunc break_policy_func = always_insert_breakpoint;
 
 /**
  * mono_set_break_policy:
- * policy_callback: the new callback function
+ * \param policy_callback the new callback function
  *
  * Allow embedders to decide wherther to actually obey breakpoint instructions
- * (both break IL instructions and Debugger.Break () method calls), for example
+ * (both break IL instructions and \c Debugger.Break method calls), for example
  * to not allow an app to be aborted by a perfectly valid IL opcode when executing
  * untrusted or semi-trusted code.
  *
- * @policy_callback will be called every time a break point instruction needs to
- * be inserted with the method argument being the method that calls Debugger.Break()
- * or has the IL break instruction. The callback should return #MONO_BREAK_POLICY_NEVER
+ * \p policy_callback will be called every time a break point instruction needs to
+ * be inserted with the method argument being the method that calls \c Debugger.Break
+ * or has the IL \c break instruction. The callback should return \c MONO_BREAK_POLICY_NEVER
  * if it wants the breakpoint to not be effective in the given method.
- * #MONO_BREAK_POLICY_ALWAYS is the default.
+ * \c MONO_BREAK_POLICY_ALWAYS is the default.
  */
 void
 mono_set_break_policy (MonoBreakPolicyFunc policy_callback)
@@ -6908,14 +6898,12 @@ initialize_array_data (MonoMethod *method, gboolean aot, unsigned char *ip, Mono
                        return NULL;
                if (strcmp (cmethod->name, "InitializeArray") || strcmp (cmethod->klass->name, "RuntimeHelpers") || cmethod->klass->image != mono_defaults.corlib)
                        return NULL;
-               switch (mono_type_get_underlying_type (&klass->byval_arg)->type) {
-               case MONO_TYPE_BOOLEAN:
+               switch (mini_get_underlying_type (&klass->byval_arg)->type) {
                case MONO_TYPE_I1:
                case MONO_TYPE_U1:
                        size = 1; break;
                /* we need to swap on big endian, so punt. Should we handle R4 and R8 as well? */
 #if TARGET_BYTE_ORDER == G_LITTLE_ENDIAN
-               case MONO_TYPE_CHAR:
                case MONO_TYPE_I2:
                case MONO_TYPE_U2:
                        size = 2; break;
@@ -12360,6 +12348,21 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                ins->type = STACK_I4;
                                MONO_ADD_INS (cfg->cbb, ins);
 
+                               ip += 2;
+                               *sp++ = ins;
+                               break;
+                       case CEE_MONO_GET_RGCTX_ARG:
+                               CHECK_OPSIZE (2);
+                               CHECK_STACK_OVF (1);
+
+                               mono_create_rgctx_var (cfg);
+
+                               MONO_INST_NEW (cfg, ins, OP_MOVE);
+                               ins->dreg = alloc_dreg (cfg, STACK_PTR);
+                               ins->sreg1 = cfg->rgctx_var->dreg;
+                               ins->type = STACK_PTR;
+                               MONO_ADD_INS (cfg->cbb, ins);
+
                                ip += 2;
                                *sp++ = ins;
                                break;
index c4518da3deda497facfea4dd426603893915f970..a4143e8a34494d926f21f4276b166100aca50eb3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-amd64-gsharedvt.c: libcorkscrew-based native unwinder
+/**
+ * \file
+ * libcorkscrew-based native unwinder
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
@@ -441,22 +442,17 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
                        } else {
                                MonoType *ret = sig->ret;
 
-                               // Unwrap enums
-                               if (ret->type == MONO_TYPE_VALUETYPE)
-                                       ret = mini_type_get_underlying_type (ret);
-
+                               ret = mini_type_get_underlying_type (ret);
                                switch (ret->type) {
                                case MONO_TYPE_I1:
                                        info->ret_marshal = GSHAREDVT_RET_I1;
                                        break;
-                               case MONO_TYPE_BOOLEAN:
                                case MONO_TYPE_U1:
                                        info->ret_marshal = GSHAREDVT_RET_U1;
                                        break;
                                case MONO_TYPE_I2:
                                        info->ret_marshal = GSHAREDVT_RET_I2;
                                        break;
-                               case MONO_TYPE_CHAR:
                                case MONO_TYPE_U2:
                                        info->ret_marshal = GSHAREDVT_RET_U2;
                                        break;
@@ -470,11 +466,7 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
                                case MONO_TYPE_U:
                                case MONO_TYPE_PTR:
                                case MONO_TYPE_FNPTR:
-                               case MONO_TYPE_CLASS:
                                case MONO_TYPE_OBJECT:
-                               case MONO_TYPE_SZARRAY:
-                               case MONO_TYPE_ARRAY:
-                               case MONO_TYPE_STRING:
                                case MONO_TYPE_U8:
                                case MONO_TYPE_I8:
                                        info->ret_marshal = GSHAREDVT_RET_I8;
index 1bb14e5abd2c4f43eed0d67118a82037ad151d71..323e2f3f98ae3be1198e7187927b14e501383041 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-exceptions-native-unwinder.c: libcorkscrew-based native unwinder
+/**
+ * \file
+ * libcorkscrew-based native unwinder
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
@@ -53,4 +54,4 @@ static const char* ret_marshal_name[] = {
 #define DEBUG_AMD64_GSHAREDVT_PRINT(...)
 #endif
 
-#endif /* MINI_AMD64_GSHAREDVT_H */
\ No newline at end of file
+#endif /* MINI_AMD64_GSHAREDVT_H */
index bdfc3bfcd3307010c0613900cdfd5553ff74d60b..6351b6d9306149ea80fd9b2d9896be5e4c1ebc51 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-amd64.c: AMD64 backend for the Mono code generator
+/**
+ * \file
+ * AMD64 backend for the Mono code generator
  *
  * Based on mini-x86.c.
  *
@@ -282,13 +283,9 @@ merge_argument_class_from_type (MonoType *type, ArgumentClass class1)
        case MONO_TYPE_U4:
        case MONO_TYPE_I:
        case MONO_TYPE_U:
-       case MONO_TYPE_STRING:
        case MONO_TYPE_OBJECT:
-       case MONO_TYPE_CLASS:
-       case MONO_TYPE_SZARRAY:
        case MONO_TYPE_PTR:
        case MONO_TYPE_FNPTR:
-       case MONO_TYPE_ARRAY:
        case MONO_TYPE_I8:
        case MONO_TYPE_U8:
                class2 = ARG_CLASS_INTEGER;
@@ -889,11 +886,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
        case MONO_TYPE_U:
        case MONO_TYPE_PTR:
        case MONO_TYPE_FNPTR:
-       case MONO_TYPE_CLASS:
        case MONO_TYPE_OBJECT:
-       case MONO_TYPE_SZARRAY:
-       case MONO_TYPE_ARRAY:
-       case MONO_TYPE_STRING:
                cinfo->ret.storage = ArgInIReg;
                cinfo->ret.reg = AMD64_RAX;
                break;
@@ -1021,11 +1014,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
                case MONO_TYPE_U:
                case MONO_TYPE_PTR:
                case MONO_TYPE_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
                        add_general (&gr, &stack_size, ainfo);
                        break;
                case MONO_TYPE_GENERICINST:
@@ -1297,8 +1286,7 @@ mono_arch_get_allocatable_int_vars (MonoCompile *cfg)
 
 /**
  * mono_arch_compute_omit_fp:
- *
- *   Determine whenever the frame pointer can be eliminated.
+ * Determine whether the frame pointer can be eliminated.
  */
 static void
 mono_arch_compute_omit_fp (MonoCompile *cfg)
@@ -1824,10 +1812,6 @@ mono_arch_create_vars (MonoCompile *cfg)
 
        if (cfg->method->save_lmf) {
                cfg->lmf_ir = TRUE;
-#if !defined(TARGET_WIN32)
-               if (!optimize_for_xen)
-                       cfg->lmf_ir_mono_lmf = TRUE;
-#endif
        }
 }
 
@@ -2550,10 +2534,6 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                }
 
                switch (t->type) {
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_CLASS:  
-               case MONO_TYPE_ARRAY:
-               case MONO_TYPE_SZARRAY:
                case MONO_TYPE_OBJECT:
                case MONO_TYPE_PTR:
                case MONO_TYPE_I:
@@ -2684,10 +2664,6 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
        case MONO_TYPE_VOID:
                *(gpointer*)ret = NULL;
                break;
-       case MONO_TYPE_STRING:
-       case MONO_TYPE_CLASS:  
-       case MONO_TYPE_ARRAY:
-       case MONO_TYPE_SZARRAY:
        case MONO_TYPE_OBJECT:
        case MONO_TYPE_I:
        case MONO_TYPE_U:
@@ -3505,16 +3481,14 @@ mono_amd64_get_tls_gs_offset (void)
 }
 
 /*
- * mono_amd64_emit_tls_get:
- * @code: buffer to store code to
- * @dreg: hard register where to place the result
- * @tls_offset: offset info
+ * \param code buffer to store code to
+ * \param dreg hard register where to place the result
+ * \param tls_offset offset info
+ * \return a pointer to the end of the stored code
  *
- * mono_amd64_emit_tls_get emits in @code the native code that puts in
+ * mono_amd64_emit_tls_get emits in \p code the native code that puts in
  * the dreg register the item in the thread local storage identified
  * by tls_offset.
- *
- * Returns: a pointer to the end of the stored code
  */
 static guint8*
 mono_amd64_emit_tls_get (guint8* code, int dreg, int tls_offset)
@@ -7600,12 +7574,10 @@ mono_arch_get_patch_offset (guint8 *code)
 }
 
 /**
- * mono_breakpoint_clean_code:
+ * \return TRUE if no sw breakpoint was present.
  *
- * Copy @size bytes from @code - @offset to the buffer @buf. If the debugger inserted software
+ * Copy \p size bytes from \p code - \p offset to the buffer \p buf. If the debugger inserted software
  * breakpoints in the original code, they are removed in the copy.
- *
- * Returns TRUE if no sw breakpoint was present.
  */
 gboolean
 mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guint8 *buf, int size)
index dc7b3699b445e3f76dfbd74108cb3c2d9b59d41b..ace42c42331376aa3963e919f8a60b06dc6ead45 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_AMD64_H__
 #define __MONO_MINI_AMD64_H__
 
@@ -63,19 +67,19 @@ typedef struct {
 // instead of RtlInstallFunctionTableCallback. This gives us the benefit to
 // include all needed unwind upon registration.
 typedef DWORD (NTAPI* RtlAddGrowableFunctionTablePtr)(
-    _Out_ PVOID * DynamicTable,
-    _In_reads_(MaximumEntryCount) PRUNTIME_FUNCTION FunctionTable,
-    _In_ DWORD EntryCount,
-    _In_ DWORD MaximumEntryCount,
-    _In_ ULONG_PTR RangeBase,
-    _In_ ULONG_PTR RangeEnd);
+    PVOID * DynamicTable,
+    PRUNTIME_FUNCTION FunctionTable,
+    DWORD EntryCount,
+    DWORD MaximumEntryCount,
+    ULONG_PTR RangeBase,
+    ULONG_PTR RangeEnd);
 
 typedef VOID (NTAPI* RtlGrowFunctionTablePtr)(
-    _Inout_ PVOID DynamicTable,
-    _In_ DWORD NewEntryCount);
+    PVOID DynamicTable,
+    DWORD NewEntryCount);
 
 typedef VOID (NTAPI* RtlDeleteGrowableFunctionTablePtr)(
-    _In_ PVOID DynamicTable);
+    PVOID DynamicTable);
 
 #endif /* HOST_WIN32 */
 
@@ -399,10 +403,6 @@ typedef struct {
 #define MONO_ARCH_EMULATE_CONV_R8_UN    1
 #define MONO_ARCH_EMULATE_FREM 1
 #define MONO_ARCH_HAVE_IS_INT_OVERFLOW 1
-
-#ifndef HOST_WIN32
-#define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
-#endif
 #define MONO_ARCH_HAVE_INVALIDATE_METHOD 1
 #define MONO_ARCH_HAVE_FULL_AOT_TRAMPOLINES 1
 #define MONO_ARCH_IMT_REG AMD64_R10
index 6d52aecf6da191d0a89a555015a7a97f31d32a4b..9a8e05e8ec69b4b508763ce17a73c417db899541 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_ARCH_H__
 #define __MONO_MINI_ARCH_H__
 
index 2c7f8812a699661bd095a63d227419d1b91f112e..78e7f8064fc5955dd3a51aacf4c92359b6d972d7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-arm-gsharedvt.c: gsharedvt support code for arm
+/**
+ * \file
+ * gsharedvt support code for arm
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
index 58964502b7fcbb47b0a892f7fc74319537b605ff..f80d5f5b0272e5f6315be7c26c65cf5941b91f7c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-arm.c: ARM backend for the Mono code generator
+/**
+ * \file
+ * ARM backend for the Mono code generator
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
@@ -943,10 +944,6 @@ is_regsize_var (MonoType *t)
        case MONO_TYPE_FNPTR:
                return TRUE;
        case MONO_TYPE_OBJECT:
-       case MONO_TYPE_STRING:
-       case MONO_TYPE_CLASS:
-       case MONO_TYPE_SZARRAY:
-       case MONO_TYPE_ARRAY:
                return TRUE;
        case MONO_TYPE_GENERICINST:
                if (!mono_type_generic_inst_is_valuetype (t))
@@ -1271,11 +1268,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
        case MONO_TYPE_U:
        case MONO_TYPE_PTR:
        case MONO_TYPE_FNPTR:
-       case MONO_TYPE_CLASS:
        case MONO_TYPE_OBJECT:
-       case MONO_TYPE_SZARRAY:
-       case MONO_TYPE_ARRAY:
-       case MONO_TYPE_STRING:
                cinfo->ret.storage = RegTypeGeneral;
                cinfo->ret.reg = ARMREG_R0;
                break;
@@ -1424,11 +1417,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
                case MONO_TYPE_U:
                case MONO_TYPE_PTR:
                case MONO_TYPE_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
                        cinfo->args [n].size = sizeof (gpointer);
                        add_general (&gr, &stack_size, ainfo, TRUE);
                        break;
@@ -1649,8 +1638,7 @@ debug_omit_fp (void)
 
 /**
  * mono_arch_compute_omit_fp:
- *
- *   Determine whenever the frame pointer can be eliminated.
+ * Determine whether the frame pointer can be eliminated.
  */
 static void
 mono_arch_compute_omit_fp (MonoCompile *cfg)
@@ -2802,10 +2790,6 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                }
 
                switch (t->type) {
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_CLASS:  
-               case MONO_TYPE_ARRAY:
-               case MONO_TYPE_SZARRAY:
                case MONO_TYPE_OBJECT:
                case MONO_TYPE_PTR:
                case MONO_TYPE_I:
@@ -2907,10 +2891,6 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
        case MONO_TYPE_VOID:
                *(gpointer*)ret = NULL;
                break;
-       case MONO_TYPE_STRING:
-       case MONO_TYPE_CLASS:  
-       case MONO_TYPE_ARRAY:
-       case MONO_TYPE_SZARRAY:
        case MONO_TYPE_OBJECT:
        case MONO_TYPE_I:
        case MONO_TYPE_U:
index 98f8ef946bd345234cfad4e89badb04f4bcd511b..a7da8a6a98c555e7ac42fa1ee9e1b2a2a6f00a0d 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2011 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index df24c53c6581c444f8c8c02ce774215617ad4f0b..c50ef05a38953a16e86b454ce9025bd93f8bb2b0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-arm64-gsharedvt.c: gsharedvt support code for arm64
+/**
+ * \file
+ * gsharedvt support code for arm64
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
@@ -347,19 +348,19 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
                        if (!gsharedvt_in || sig->ret->byref) {
                                info->ret_marshal = GSHAREDVT_RET_I8;
                        } else {
-                               switch (sig->ret->type) {
+                               MonoType *rtype = mini_get_underlying_type (sig->ret);
+
+                               switch (rtype->type) {
                                case MONO_TYPE_I1:
                                        info->ret_marshal = GSHAREDVT_RET_I1;
                                        break;
                                case MONO_TYPE_U1:
-                               case MONO_TYPE_BOOLEAN:
                                        info->ret_marshal = GSHAREDVT_RET_U1;
                                        break;
                                case MONO_TYPE_I2:
                                        info->ret_marshal = GSHAREDVT_RET_I2;
                                        break;
                                case MONO_TYPE_U2:
-                               case MONO_TYPE_CHAR:
                                        info->ret_marshal = GSHAREDVT_RET_U2;
                                        break;
                                case MONO_TYPE_I4:
index b828218887d6baf99a453afe60d2fbc07e54c70a..ed8e402455efc5e3c159c3f5172219620f844761 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MINI_ARM64_GSHAREDVT_H__
 #define __MINI_ARM64_GSHAREDVT_H__
 
index 10acac62282508876ba07dc56e093fd53b739441..65fd99f10506390cd425012bd357e59114507af2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-arm64.c: ARM64 backend for the Mono code generator
+/**
+ * \file
+ * ARM64 backend for the Mono code generator
  *
  * Copyright 2013 Xamarin, Inc (http://www.xamarin.com)
  * 
@@ -1229,7 +1230,6 @@ add_param (CallInfo *cinfo, ArgInfo *ainfo, MonoType *t)
        case MONO_TYPE_I1:
                add_general (cinfo, ainfo, 1, TRUE);
                break;
-       case MONO_TYPE_BOOLEAN:
        case MONO_TYPE_U1:
                add_general (cinfo, ainfo, 1, FALSE);
                break;
@@ -1237,7 +1237,6 @@ add_param (CallInfo *cinfo, ArgInfo *ainfo, MonoType *t)
                add_general (cinfo, ainfo, 2, TRUE);
                break;
        case MONO_TYPE_U2:
-       case MONO_TYPE_CHAR:
                add_general (cinfo, ainfo, 2, FALSE);
                break;
        case MONO_TYPE_I4:
@@ -1250,11 +1249,7 @@ add_param (CallInfo *cinfo, ArgInfo *ainfo, MonoType *t)
        case MONO_TYPE_U:
        case MONO_TYPE_PTR:
        case MONO_TYPE_FNPTR:
-       case MONO_TYPE_CLASS:
        case MONO_TYPE_OBJECT:
-       case MONO_TYPE_SZARRAY:
-       case MONO_TYPE_ARRAY:
-       case MONO_TYPE_STRING:
        case MONO_TYPE_U8:
        case MONO_TYPE_I8:
                add_general (cinfo, ainfo, 8, FALSE);
@@ -1545,7 +1540,6 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
 
                        /* Special case arguments smaller than 1 machine word */
                        switch (t->type) {
-                       case MONO_TYPE_BOOLEAN:
                        case MONO_TYPE_U1:
                                *(guint8*)stack_arg = *(guint8*)arg;
                                break;
@@ -1553,7 +1547,6 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                                *(gint8*)stack_arg = *(gint8*)arg;
                                break;
                        case MONO_TYPE_U2:
-                       case MONO_TYPE_CHAR:
                                *(guint16*)stack_arg = *(guint16*)arg;
                                break;
                        case MONO_TYPE_I2:
@@ -1574,10 +1567,6 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                }
 
                switch (t->type) {
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_CLASS:
-               case MONO_TYPE_ARRAY:
-               case MONO_TYPE_SZARRAY:
                case MONO_TYPE_OBJECT:
                case MONO_TYPE_PTR:
                case MONO_TYPE_I:
@@ -1586,7 +1575,6 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                case MONO_TYPE_U8:
                        p->regs [slot] = (mgreg_t)*arg;
                        break;
-               case MONO_TYPE_BOOLEAN:
                case MONO_TYPE_U1:
                        p->regs [slot] = *(guint8*)arg;
                        break;
@@ -1597,7 +1585,6 @@ mono_arch_start_dyn_call (MonoDynCallInfo *info, gpointer **args, guint8 *ret, g
                        p->regs [slot] = *(gint16*)arg;
                        break;
                case MONO_TYPE_U2:
-               case MONO_TYPE_CHAR:
                        p->regs [slot] = *(guint16*)arg;
                        break;
                case MONO_TYPE_I4:
@@ -1691,10 +1678,6 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
        case MONO_TYPE_VOID:
                *(gpointer*)ret = NULL;
                break;
-       case MONO_TYPE_STRING:
-       case MONO_TYPE_CLASS:
-       case MONO_TYPE_ARRAY:
-       case MONO_TYPE_SZARRAY:
        case MONO_TYPE_OBJECT:
        case MONO_TYPE_I:
        case MONO_TYPE_U:
@@ -1705,14 +1688,12 @@ mono_arch_finish_dyn_call (MonoDynCallInfo *info, guint8 *buf)
                *(gint8*)ret = res;
                break;
        case MONO_TYPE_U1:
-       case MONO_TYPE_BOOLEAN:
                *(guint8*)ret = res;
                break;
        case MONO_TYPE_I2:
                *(gint16*)ret = res;
                break;
        case MONO_TYPE_U2:
-       case MONO_TYPE_CHAR:
                *(guint16*)ret = res;
                break;
        case MONO_TYPE_I4:
@@ -1904,9 +1885,6 @@ mono_arch_create_vars (MonoCompile *cfg)
        if (cfg->method->save_lmf) {
                cfg->create_lmf_var = TRUE;
                cfg->lmf_ir = TRUE;
-#ifdef HAVE_GET_TLS_ADDR
-               cfg->lmf_ir_mono_lmf = TRUE;
-#endif
        }
 }
 
index 179d34ca4daf662d89d7135f250ced34418522ad..f6dc7946c110941b8f7fa1c2f60a1974db48b0a1 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mini-arm64.h
+/**
+ * \file
  *
  * Copyright 2013 Xamarin Inc
  *
@@ -147,9 +147,6 @@ typedef struct {
 #define MONO_ARCH_HAVE_SETUP_RESUME_FROM_SIGNAL_HANDLER_CTX 1
 #define MONO_ARCH_HAVE_SETUP_ASYNC_CALLBACK 1
 #define MONO_ARCH_HAVE_GENERAL_RGCTX_LAZY_FETCH_TRAMPOLINE 1
-#ifndef MONO_CROSS_COMPILE
-#define MONO_ARCH_ENABLE_MONO_LMF_VAR 1
-#endif
 #define MONO_ARCH_HAVE_OP_GET_EX_OBJ 1
 #define MONO_ARCH_HAVE_OBJC_GET_SELECTOR 1
 #define MONO_ARCH_HAVE_SDB_TRAMPOLINES 1
index 876d35c635c87dabbcb0682569be6633970dcb94..4482640343b38ca252d75d3e0665ceeea4de7caa 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-codegen.c: Arch independent code generation functionality
+/**
+ * \file
+ * Arch independent code generation functionality
  *
  * (C) 2003 Ximian, Inc.
  */
index 0a61530c8922a371f1c686759a4e3abebb920f71..8aeb6ffb2f48e88b4a227ad352ad2b78a995d54c 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include "config.h"
 
 #include <stdio.h>
@@ -44,6 +48,12 @@ mono_dump_jit_offsets (void)
 #endif
 }
 
+/*
+ * mono_cross_helpers_run:
+ *
+ *   Check that the offsets given by object-offsets.h match the offsets
+ * on the host.
+ */
 void
 mono_cross_helpers_run (void)
 {
@@ -59,6 +69,7 @@ mono_cross_helpers_run (void)
 #if defined (HAS_CROSS_COMPILER_OFFSETS) && !defined (MONO_CROSS_COMPILE)
        mono_metadata_cross_helpers_run ();
 
+       /* The metadata offsets are already checked above */
 #define DISABLE_METADATA_OFFSETS
 #define USE_CROSS_COMPILE_OFFSETS
 #define DECL_OFFSET(struct,field) this_should_not_happen_for_cross_fields
index 779bde4da366632a69a5a1a0421861351162f8f2..75e0a8800fb7531a7083f293f0989b5f44de37ff 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-darwin.c: Darwin/MacOS support for Mono.
+/**
+ * \file
+ * Darwin/MacOS support for Mono.
  *
  * Authors:
  *   Mono Team (mono-list@lists.ximian.com)
index 272065388e6187182d90d5d35fe36d8d1f6730c9..cacc74c49bc360f876d124fc3fa8a851b479dea7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-exceptions.c: generic exception support
+/**
+ * \file
+ * generic exception support
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -760,10 +761,9 @@ get_method_from_stack_frame (MonoJitInfo *ji, gpointer generic_info)
 
 /**
  * mono_exception_walk_native_trace:
- * @ex: The exception object whose frames should be walked
- * @func: callback to call for each stack frame
- * @user_data: data passed to the callback
- *
+ * \param ex The exception object whose frames should be walked
+ * \param func callback to call for each stack frame
+ * \param user_data data passed to the callback
  * This function walks the stacktrace of an exception. For
  * each frame the callback function is called with the relevant info.
  * The walk ends when no more stack frames are found or when the callback
@@ -916,10 +916,8 @@ mono_runtime_walk_stack_with_ctx (MonoJitStackWalk func, MonoContext *start_ctx,
 }
 /**
  * mono_walk_stack_with_ctx:
- *
- * Unwind the current thread starting at @start_ctx.
- * 
- * If @start_ctx is null, we capture the current context.
+ * Unwind the current thread starting at \p start_ctx.
+ * If \p start_ctx is null, we capture the current context.
  */
 void
 mono_walk_stack_with_ctx (MonoJitStackWalk func, MonoContext *start_ctx, MonoUnwindOptions unwind_options, void *user_data)
@@ -947,14 +945,13 @@ mono_walk_stack_with_ctx (MonoJitStackWalk func, MonoContext *start_ctx, MonoUnw
 
 /**
  * mono_walk_stack_with_state:
- *
- * Unwind a thread described by @state.
+ * Unwind a thread described by \p state.
  *
  * State must be valid (state->valid == TRUE).
  *
  * If you are using this function to unwind another thread, make sure it is suspended.
  * 
- * If @state is null, we capture the current context.
+ * If \p state is null, we capture the current context.
  */
 void
 mono_walk_stack_with_state (MonoJitStackWalk func, MonoThreadUnwindState *state, MonoUnwindOptions unwind_options, void *user_data)
@@ -992,16 +989,15 @@ mono_walk_stack (MonoJitStackWalk func, MonoUnwindOptions options, void *user_da
 
 /**
  * mono_walk_stack_full:
- * @func: callback to call for each stack frame
- * @domain: starting appdomain, can be NULL to use the current domain
- * @unwind_options: what extra information the unwinder should gather
- * @start_ctx: starting state of the stack walk, can be NULL.
- * @thread: the thread whose stack to walk, can be NULL to use the current thread
- * @lmf: the LMF of @thread, can be NULL to use the LMF of the current thread
- * @user_data: data passed to the callback
- *
+ * \param func callback to call for each stack frame
+ * \param domain starting appdomain, can be NULL to use the current domain
+ * \param unwind_options what extra information the unwinder should gather
+ * \param start_ctx starting state of the stack walk, can be NULL.
+ * \param thread the thread whose stack to walk, can be NULL to use the current thread
+ * \param lmf the LMF of \p thread, can be NULL to use the LMF of the current thread
+ * \param user_data data passed to the callback
  * This function walks the stack of a thread, starting from the state
- * represented by start_ctx. For each frame the callback
+ * represented by \p start_ctx. For each frame the callback
  * function is called with the relevant info. The walk ends when no more
  * managed stack frames are found or when the callback returns a TRUE value.
  */
@@ -1669,9 +1665,9 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, MonoObject *obj, gi
 
 /**
  * mono_handle_exception_internal:
- * @ctx: saved processor state
- * @obj: the exception object
- * @resume: whenever to resume unwinding based on the state in MonoJitTlsData.
+ * \param ctx saved processor state
+ * \param obj the exception object
+ * \param resume whenever to resume unwinding based on the state in \c MonoJitTlsData.
  */
 static gboolean
 mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resume, MonoJitInfo **out_ji)
@@ -1987,7 +1983,7 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
                                                if (is_outside) {
                                                        jit_tls->handler_block_return_address = NULL;
                                                        jit_tls->handler_block = NULL;
-                                                       mono_thread_resume_interruption (); /*We ignore the exception here, it will be raised later*/
+                                                       mono_thread_resume_interruption (TRUE); /*We ignore the exception here, it will be raised later*/
                                                }
                                        }
 
@@ -2067,13 +2063,11 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
 
 /**
  * mono_debugger_run_finally:
- * @start_ctx: saved processor state
- *
- * This method is called by the Mono Debugger to call all `finally' clauses of the
- * current stack frame.  It's used when the user issues a `return' command to make
+ * \param start_ctx saved processor state
+ * This method is called by the Mono Debugger to call all \c finally clauses of the
+ * current stack frame.  It's used when the user issues a \c return command to make
  * the current stack frame return.  After returning from this method, the debugger
  * unwinds the stack one frame and gives control back to the user.
- *
  * NOTE: This method is only used when running inside the Mono Debugger.
  */
 void
@@ -2108,8 +2102,8 @@ mono_debugger_run_finally (MonoContext *start_ctx)
 
 /**
  * mono_handle_exception:
- * @ctx: saved processor state
- * @obj: the exception object
+ * \param ctx saved processor state
+ * \param obj the exception object
  */
 gboolean
 mono_handle_exception (MonoContext *ctx, MonoObject *obj)
@@ -2677,11 +2671,11 @@ mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx)
        mono_runtime_stdout_fflush ();
 }
 
-/*
+/**
  * mono_print_thread_dump:
  *
- *   Print information about the current thread to stdout.
- * SIGCTX can be NULL, allowing this to be called from gdb.
+ * Print information about the current thread to stdout.
+ * \p sigctx can be NULL, allowing this to be called from gdb.
  */
 void
 mono_print_thread_dump (void *sigctx)
index a7eacef6bcfc310e27dff68e48ce3d95a77e4e4a..3b5463e80fb1c16626c54ad26547553a3fbee682 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-gc.c: GC interface for the mono JIT
+/**
+ * \file
+ * GC interface for the mono JIT
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index 12e0c52066ec14c4e8475c990df1054c72b568bb..4373d17733248751b3d7f589b254b6ce8990b675 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_GC_H__
 #define __MONO_MINI_GC_H__
 
index 58fcaac9c82d59ae4b4317013f16d5531c6c2202..bc7d12aa678ed4dd54f5f111ef17998c28aa1668 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-generic-sharing.c: Support functions for generic sharing.
+/**
+ * \file
+ * Support functions for generic sharing.
  *
  * Author:
  *   Mark Probst (mark.probst@gmail.com)
@@ -1199,9 +1200,9 @@ mini_get_gsharedvt_in_sig_wrapper (MonoMethodSignature *sig)
        sig = mini_get_underlying_signature (sig);
 
        // FIXME: Normal cache
+       gshared_lock ();
        if (!cache)
                cache = g_hash_table_new_full ((GHashFunc)mono_signature_hash, (GEqualFunc)mono_metadata_signature_equal, NULL, NULL);
-       gshared_lock ();
        res = g_hash_table_lookup (cache, sig);
        gshared_unlock ();
        if (res) {
@@ -1303,9 +1304,9 @@ mini_get_gsharedvt_out_sig_wrapper (MonoMethodSignature *sig)
        sig = mini_get_underlying_signature (sig);
 
        // FIXME: Normal cache
+       gshared_lock ();
        if (!cache)
                cache = g_hash_table_new_full ((GHashFunc)mono_signature_hash, (GEqualFunc)mono_metadata_signature_equal, NULL, NULL);
-       gshared_lock ();
        res = g_hash_table_lookup (cache, sig);
        gshared_unlock ();
        if (res) {
@@ -1407,6 +1408,170 @@ mini_get_gsharedvt_out_sig_wrapper (MonoMethodSignature *sig)
        return res;
 }
 
+/*
+ * mini_get_interp_in_wrapper:
+ *
+ *   Return a wrapper which can be used to transition from compiled code to the interpreter.
+ * The wrapper has the same signature as SIG. It is very similar to a gsharedvt_in wrapper,
+ * except the 'extra_arg' is passed in the rgctx reg, so this wrapper needs to be
+ * called through a static rgctx trampoline.
+ * FIXME: Move this elsewhere.
+ */
+MonoMethod*
+mini_get_interp_in_wrapper (MonoMethodSignature *sig)
+{
+       MonoMethodBuilder *mb;
+       MonoMethod *res, *cached;
+       WrapperInfo *info;
+       MonoMethodSignature *csig, *entry_sig;
+       int i, pindex, retval_var = 0;
+       static GHashTable *cache;
+       const char *name;
+       gboolean generic = FALSE;
+
+       sig = mini_get_underlying_signature (sig);
+
+       gshared_lock ();
+       if (!cache)
+               cache = g_hash_table_new_full ((GHashFunc)mono_signature_hash, (GEqualFunc)mono_metadata_signature_equal, NULL, NULL);
+       res = g_hash_table_lookup (cache, sig);
+       gshared_unlock ();
+       if (res) {
+               g_free (sig);
+               return res;
+       }
+
+       if (sig->param_count > 8)
+               /* Call the generic interpreter entry point, the specialized ones only handle a limited number of arguments */
+               generic = TRUE;
+
+       /* Create the signature for the wrapper */
+       csig = g_malloc0 (MONO_SIZEOF_METHOD_SIGNATURE + (sig->param_count * sizeof (MonoType*)));
+       memcpy (csig, sig, mono_metadata_signature_size (sig));
+
+       /* Create the signature for the callee callconv */
+       if (generic) {
+               /*
+                * The called function has the following signature:
+                * interp_entry_general (gpointer this_arg, gpointer res, gpointer *args, gpointer rmethod)
+                */
+               entry_sig = g_malloc0 (MONO_SIZEOF_METHOD_SIGNATURE + (4 * sizeof (MonoType*)));
+               entry_sig->ret = &mono_defaults.void_class->byval_arg;
+               entry_sig->param_count = 4;
+               entry_sig->params [0] = &mono_defaults.int_class->byval_arg;
+               entry_sig->params [1] = &mono_defaults.int_class->byval_arg;
+               entry_sig->params [2] = &mono_defaults.int_class->byval_arg;
+               entry_sig->params [3] = &mono_defaults.int_class->byval_arg;
+               name = "interp_in_generic";
+               generic = TRUE;
+       } else  {
+               /*
+                * The called function has the following signature:
+                * void entry(<optional this ptr>, <optional return ptr>, <arguments>, <extra arg>)
+                */
+               entry_sig = g_malloc0 (MONO_SIZEOF_METHOD_SIGNATURE + ((sig->param_count + 2) * sizeof (MonoType*)));
+               memcpy (entry_sig, sig, mono_metadata_signature_size (sig));
+               pindex = 0;
+               /* The return value is returned using an explicit vret argument */
+               if (sig->ret->type != MONO_TYPE_VOID) {
+                       entry_sig->params [pindex ++] = &mono_defaults.int_class->byval_arg;
+                       entry_sig->ret = &mono_defaults.void_class->byval_arg;
+               }
+               for (i = 0; i < sig->param_count; i++) {
+                       entry_sig->params [pindex] = sig->params [i];
+                       if (!sig->params [i]->byref) {
+                               entry_sig->params [pindex] = mono_metadata_type_dup (NULL, entry_sig->params [pindex]);
+                               entry_sig->params [pindex]->byref = 1;
+                       }
+                       pindex ++;
+               }
+               /* Extra arg */
+               entry_sig->params [pindex ++] = &mono_defaults.int_class->byval_arg;
+               entry_sig->param_count = pindex;
+               name = sig->hasthis ? "interp_in" : "interp_in_static";
+       }
+
+       mb = mono_mb_new (mono_defaults.object_class, name, MONO_WRAPPER_UNKNOWN);
+
+       // FIXME: save lmf
+
+#ifndef DISABLE_JIT
+       if (sig->ret->type != MONO_TYPE_VOID)
+               retval_var = mono_mb_add_local (mb, sig->ret);
+
+       /* Make the call */
+       if (generic) {
+               /* Collect arguments */
+               int args_var = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
+
+               mono_mb_emit_icon (mb, sizeof (gpointer) * sig->param_count);
+               mono_mb_emit_byte (mb, CEE_PREFIX1);
+               mono_mb_emit_byte (mb, CEE_LOCALLOC);
+               mono_mb_emit_stloc (mb, args_var);
+
+               for (i = 0; i < sig->param_count; i++) {
+                       mono_mb_emit_ldloc (mb, args_var);
+                       mono_mb_emit_icon (mb, sizeof (gpointer) * i);
+                       mono_mb_emit_byte (mb, CEE_ADD);
+                       if (sig->params [i]->byref)
+                               mono_mb_emit_ldarg (mb, i + (sig->hasthis == TRUE));
+                       else
+                               mono_mb_emit_ldarg_addr (mb, i + (sig->hasthis == TRUE));
+                       mono_mb_emit_byte (mb, CEE_STIND_I);
+               }
+
+               if (sig->hasthis)
+                       mono_mb_emit_ldarg (mb, 0);
+               else
+                       mono_mb_emit_byte (mb, CEE_LDNULL);
+               if (sig->ret->type != MONO_TYPE_VOID)
+                       mono_mb_emit_ldloc_addr (mb, retval_var);
+               else
+                       mono_mb_emit_byte (mb, CEE_LDNULL);
+               mono_mb_emit_ldloc (mb, args_var);
+       } else {
+               if (sig->hasthis)
+                       mono_mb_emit_ldarg (mb, 0);
+               if (sig->ret->type != MONO_TYPE_VOID)
+                       mono_mb_emit_ldloc_addr (mb, retval_var);
+               for (i = 0; i < sig->param_count; i++) {
+                       if (sig->params [i]->byref)
+                               mono_mb_emit_ldarg (mb, i + (sig->hasthis == TRUE));
+                       else
+                               mono_mb_emit_ldarg_addr (mb, i + (sig->hasthis == TRUE));
+               }
+       }
+       /* Extra arg */
+       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+       mono_mb_emit_byte (mb, CEE_MONO_GET_RGCTX_ARG);
+       mono_mb_emit_icon (mb, sizeof (gpointer));
+       mono_mb_emit_byte (mb, CEE_ADD);
+       mono_mb_emit_byte (mb, CEE_LDIND_I);
+       /* Method to call */
+       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+       mono_mb_emit_byte (mb, CEE_MONO_GET_RGCTX_ARG);
+       mono_mb_emit_byte (mb, CEE_LDIND_I);
+       mono_mb_emit_calli (mb, entry_sig);
+       if (sig->ret->type != MONO_TYPE_VOID)
+               mono_mb_emit_ldloc (mb, retval_var);
+       mono_mb_emit_byte (mb, CEE_RET);
+#endif
+
+       info = mono_wrapper_info_create (mb, WRAPPER_SUBTYPE_INTERP_IN);
+       info->d.interp_in.sig = sig;
+
+       res = mono_mb_create (mb, csig, sig->param_count + 16, info);
+
+       gshared_lock ();
+       cached = g_hash_table_lookup (cache, sig);
+       if (cached)
+               res = cached;
+       else
+               g_hash_table_insert (cache, sig, res);
+       gshared_unlock ();
+       return res;
+}
+
 MonoMethodSignature*
 mini_get_gsharedvt_out_sig_wrapper_signature (gboolean has_this, gboolean has_ret, int param_count)
 {
@@ -3054,7 +3219,7 @@ mini_get_basic_type_from_generic (MonoType *type)
                return type;
        else if (!type->byref && (type->type == MONO_TYPE_VAR || type->type == MONO_TYPE_MVAR)) {
                MonoType *constraint = type->data.generic_param->gshared_constraint;
-               /* The gparam serial encodes the type this gparam can represent */
+               /* The gparam constraint encodes the type this gparam can represent */
                if (!constraint) {
                        return &mono_defaults.object_class->byval_arg;
                } else {
@@ -3072,7 +3237,7 @@ mini_get_basic_type_from_generic (MonoType *type)
 /*
  * mini_type_get_underlying_type:
  *
- *   Return the underlying type of TYPE, taking into account enums, byref, bool, char and generic
+ *   Return the underlying type of TYPE, taking into account enums, byref, bool, char, ref types and generic
  * sharing.
  */
 MonoType*
@@ -3091,6 +3256,9 @@ mini_type_get_underlying_type (MonoType *type)
        case MONO_TYPE_CHAR:
                return &mono_defaults.uint16_class->byval_arg;
        case MONO_TYPE_STRING:
+       case MONO_TYPE_CLASS:
+       case MONO_TYPE_ARRAY:
+       case MONO_TYPE_SZARRAY:
                return &mono_defaults.object_class->byval_arg;
        default:
                return type;
index e60d80a4ff2dfddda2329ed7005509e5c58b3990..2c866de3fdc7dccfa3c96ba9e8259e9d00c9fbc9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-ia64.c: IA64 backend for the Mono code generator
+/**
+ * \file
+ * IA64 backend for the Mono code generator
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
@@ -350,23 +351,17 @@ get_call_info (MonoCompile *cfg, MonoMemPool *mp, MonoMethodSignature *sig, gboo
        {
                ret_type = mini_get_underlying_type (sig->ret);
                switch (ret_type->type) {
-               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_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
-               case MONO_TYPE_STRING:
                        cinfo->ret.storage = ArgInIReg;
                        cinfo->ret.reg = IA64_R8;
                        break;
index bfee9d5c5480a3f0b0fb876524f6952cf2a5ef79..e1fc154b1f359cc63280c86d4fd17e50ad0a270e 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_IA64_H__
 #define __MONO_MINI_IA64_H__
 
index f969274e4a7f6bfb211b13063d73dea5f51a61a2..67dd9418a7da3f568b288ab010996b5fa1a6cc11 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-llvm-cpp.h: LLVM backend
+/**
+ * \file
+ * LLVM backend
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
index d0f3efbe8b1b052eaee9a01f3e09250f6469fff5..a5c0397221b6f5e8889f9447d7d98605c58c0740 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Handle the differences between the llvm backend beeing embedded
  * or loaded at runtime.
  */
index 880abaed5733b0e3bafea900e888031e529844c6..0500f102a5729388457926e6b6554c9ab7ca574c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-llvm.c: llvm "Backend" for the mono JIT
+/**
+ * \file
+ * llvm "Backend" for the mono JIT
  *
  * Copyright 2009-2011 Novell Inc (http://www.novell.com)
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
@@ -483,13 +484,9 @@ type_to_llvm_type (EmitContext *ctx, MonoType *t)
                return LLVMInt16Type ();
        case MONO_TYPE_U4:
                return LLVMInt32Type ();
-       case MONO_TYPE_BOOLEAN:
-               return LLVMInt8Type ();
        case MONO_TYPE_I8:
        case MONO_TYPE_U8:
                return LLVMInt64Type ();
-       case MONO_TYPE_CHAR:
-               return LLVMInt16Type ();
        case MONO_TYPE_R4:
                return LLVMFloatType ();
        case MONO_TYPE_R8:
@@ -498,10 +495,6 @@ type_to_llvm_type (EmitContext *ctx, MonoType *t)
        case MONO_TYPE_U:
                return IntPtrType ();
        case MONO_TYPE_OBJECT:
-       case MONO_TYPE_CLASS:
-       case MONO_TYPE_ARRAY:
-       case MONO_TYPE_SZARRAY:
-       case MONO_TYPE_STRING:
        case MONO_TYPE_PTR:
                return ObjRefType ();
        case MONO_TYPE_VAR:
index 027a16fa3c75ec9a48dcede0540f1996e42c2c48..483729d1c3bbc03b3a2ee5dfb392b183c0470b72 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_LLVM_H__
 #define __MONO_MINI_LLVM_H__
 
index 4eecb95e25bc1ed7e6ddbc5def91439dbaf392ed..d660489fe5e4c37ea47bf2137b2bf155da4f9eaf 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-mips.c: MIPS backend for the Mono code generator
+/**
+ * \file
+ * MIPS backend for the Mono code generator
  *
  * Authors:
  *   Mark Mason (mason@broadcom.com)
@@ -1113,7 +1114,6 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
                DEBUG(printf("param %d: ", i));
                simpletype = mini_get_underlying_type (sig->params [i]);
                switch (simpletype->type) {
-               case MONO_TYPE_BOOLEAN:
                case MONO_TYPE_I1:
                case MONO_TYPE_U1:
                        DEBUG(printf("1 byte\n"));
@@ -1121,7 +1121,6 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
                        add_int32_arg (cinfo, &cinfo->args[n]);
                        n++;
                        break;
-               case MONO_TYPE_CHAR:
                case MONO_TYPE_I2:
                case MONO_TYPE_U2:
                        DEBUG(printf("2 bytes\n"));
@@ -1140,11 +1139,7 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
                case MONO_TYPE_U:
                case MONO_TYPE_PTR:
                case MONO_TYPE_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
                        cinfo->args [n].size = sizeof (gpointer);
                        add_int32_arg (cinfo, &cinfo->args[n]);
                        n++;
@@ -1260,23 +1255,17 @@ get_call_info (MonoMemPool *mp, MonoMethodSignature *sig)
        {
                simpletype = mini_get_underlying_type (sig->ret);
                switch (simpletype->type) {
-               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_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
-               case MONO_TYPE_STRING:
                        cinfo->ret.reg = mips_v0;
                        break;
                case MONO_TYPE_U8:
@@ -1323,8 +1312,7 @@ debug_omit_fp (void)
 
 /**
  * mono_arch_compute_omit_fp:
- *
- *   Determine whenever the frame pointer can be eliminated.
+ * Determine whether the frame pointer can be eliminated.
  */
 static void
 mono_arch_compute_omit_fp (MonoCompile *cfg)
index df179bd2545334cd8cf1eca629efc0f54b487a43..c24bf22d601ac7040b1965ed698977fcb99c80fa 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_MIPS_H__
 #define __MONO_MINI_MIPS_H__
 
index 4bf5a79bdc606ae04c9309cf003bbb3d73f015db..9732a3f94fc5e29b76c8651bb17710ccfe0e18a7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * magic-types.c: intrinsics for variable sized int/floats
+/**
+ * \file
+ * intrinsics for variable sized int/floats
  *
  * Author:
  *   Rodrigo Kumpera (kumpera@gmail.com)
index bccd97d16a30f26b935ece4bae2b85f8d19c0c69..838b8a9cd961307000be0460d90a65b5b4e7fa1f 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2003 Ximian, Inc
  * Copyright 2003-2011 Novell Inc
  * Copyright 2011 Xamarin Inc
@@ -864,6 +865,7 @@ MINI_OP(OP_PSUBW_SAT_UN, "psubw_sat_un", XREG, XREG, XREG)
 
 MINI_OP(OP_PMULW, "pmulw", XREG, XREG, XREG)
 MINI_OP(OP_PMULD, "pmuld", XREG, XREG, XREG)
+/* Multiplies two 32 bit numbers into a 64 bit one */
 MINI_OP(OP_PMULQ, "pmulq", XREG, XREG, XREG)
 
 MINI_OP(OP_PMULW_HIGH_UN, "pmul_high_un", XREG, XREG, XREG)
index 5e574b376097aac3209254f2a36a3c4a5211152f..0d1b11f3e45a95dabae4f05a33ff37576f11fef5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-posix.c: POSIX signal handling support for Mono.
+/**
+ * \file
+ * POSIX signal handling support for Mono.
  *
  * Authors:
  *   Mono Team (mono-list@lists.ximian.com)
index 4af328dc5d7d466360d306afcd293ac7b7011127..ed3d0bca4c6959e97a5bdbb6f870e9570b6ba0fa 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-ppc.c: PowerPC backend for the Mono code generator
+/**
+ * \file
+ * PowerPC backend for the Mono code generator
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
index ff1dda35d6d8c9a85fa20a31b756bac1cdb07aa4..aaa6ddda3ecf8a2310758f067c1a1eaa89911693 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_PPC_H__
 #define __MONO_MINI_PPC_H__
 
index 9c3f28cbb8f6075370b2a9d6d7a1ef40df7d29da..190af5cec63edf4eb598a5d9811ec21587a59e26 100644 (file)
@@ -1,6 +1,6 @@
-
-/*
- * mini-runtime.c: Runtime code for the JIT
+/**
+ * \file
+ * Runtime code for the JIT
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
@@ -218,15 +218,15 @@ get_method_from_ip (void *ip)
 
 /**
  * mono_pmip:
- * @ip: an instruction pointer address
+ * \param ip an instruction pointer address
  *
  * This method is used from a debugger to get the name of the
- * method at address @ip.   This routine is typically invoked from
+ * method at address \p ip.   This routine is typically invoked from
  * a debugger like this:
  *
  * (gdb) print mono_pmip ($pc)
  *
- * Returns: the name of the method at address @ip.
+ * \returns the name of the method at address \p ip.
  */
 G_GNUC_UNUSED char *
 mono_pmip (void *ip)
@@ -235,21 +235,17 @@ mono_pmip (void *ip)
 }
 
 /**
- * mono_print_method_from_ip
- * @ip: an instruction pointer address
+ * mono_print_method_from_ip:
+ * \param ip an instruction pointer address
  *
  * This method is used from a debugger to get the name of the
- * method at address @ip.
+ * method at address \p ip.
  *
- * This prints the name of the method at address @ip in the standard
- * output.  Unlike mono_pmip which returns a string, this routine
+ * This prints the name of the method at address \p ip in the standard
+ * output.  Unlike \c mono_pmip which returns a string, this routine
  * prints the value on the standard output.
  */
-#ifdef __GNUC__
-/* Prevent the linker from optimizing this away in embedding setups to help debugging */
- __attribute__ ((__used__))
-#endif
-void
+MONO_ATTR_USED void
 mono_print_method_from_ip (void *ip)
 {
        MonoJitInfo *ji;
@@ -474,8 +470,8 @@ register_trampoline_jit_info (MonoDomain *domain, MonoTrampInfo *info)
  * INFO can be NULL.
  * Frees INFO.
  */
-void
-mono_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain)
+static void
+mono_tramp_info_register_internal (MonoTrampInfo *info, MonoDomain *domain, gboolean aot)
 {
        MonoTrampInfo *copy;
 
@@ -506,7 +502,8 @@ mono_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain)
        mono_lldb_save_trampoline_info (info);
 
 #ifdef MONO_ARCH_HAVE_UNWIND_TABLE
-       mono_arch_unwindinfo_install_tramp_unwind_info (info->unwind_ops, info->code, info->code_size);
+       if (!aot)
+               mono_arch_unwindinfo_install_tramp_unwind_info (info->unwind_ops, info->code, info->code_size);
 #endif
 
        /* Only register trampolines that have unwind infos */
@@ -519,6 +516,18 @@ mono_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain)
        mono_tramp_info_free (info);
 }
 
+void
+mono_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain)
+{
+       mono_tramp_info_register_internal (info, domain, FALSE);
+}
+
+void
+mono_aot_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain)
+{
+       mono_tramp_info_register_internal (info, domain, TRUE);
+}
+
 static void
 mono_tramp_info_cleanup (void)
 {
@@ -722,9 +731,6 @@ register_dyn_icall (gpointer func, const char *name, const char *sigstr, gboolea
 MonoLMF *
 mono_get_lmf (void)
 {
-#if defined(MONO_ARCH_ENABLE_MONO_LMF_VAR) && defined(HAVE_GET_TLS_ADDR)
-       return (MonoLMF *)mono_tls_get_lmf ();
-#else
        MonoJitTlsData *jit_tls;
 
        if ((jit_tls = mono_tls_get_jit_tls ()))
@@ -735,7 +741,6 @@ mono_get_lmf (void)
         * (the thread object allocation can trigger a collection).
         */
        return NULL;
-#endif
 }
 
 MonoLMF **
@@ -747,11 +752,7 @@ mono_get_lmf_addr (void)
 void
 mono_set_lmf (MonoLMF *lmf)
 {
-#if defined(MONO_ARCH_ENABLE_MONO_LMF_VAR) && defined(HAVE_GET_TLS_ADDR)
-       mono_tls_set_lmf (lmf);
-#else
        (*mono_get_lmf_addr ()) = lmf;
-#endif
 }
 
 MonoJitTlsData*
@@ -841,9 +842,8 @@ mono_jit_set_domain (MonoDomain *domain)
 
 /**
  * mono_thread_abort:
- * @obj: exception object
- *
- * abort the thread, print exception information and stack trace
+ * \param obj exception object
+ * Abort the thread, print exception information and stack trace
  */
 static void
 mono_thread_abort (MonoObject *obj)
@@ -883,23 +883,9 @@ setup_jit_tls_data (gpointer stack_start, gpointer abort_func)
 
        jit_tls->first_lmf = lmf;
 
-       /*
-        * We can have 2 configurations for accessing lmf.
-        * We can use only the tls_lmf_addr variable, which will store the address of
-        * jit_tls->lmf, or, if we have MONO_ARCH_ENABLE_MONO_LMF_VAR enabled, we can
-        * use both tls_lmf_addr and tls_lmf variables (in this case we need to have
-        * means of getting the address of a tls variable; this can be done always
-        * when using __thread or, on osx, even when using pthread)
-        */
-#if defined(MONO_ARCH_ENABLE_MONO_LMF_VAR) && defined(HAVE_GET_TLS_ADDR)
-       /* jit_tls->lmf is unused */
-       mono_tls_set_lmf (lmf);
-       mono_set_lmf_addr (mono_tls_get_tls_addr (TLS_KEY_LMF));
-#else
        mono_set_lmf_addr (&jit_tls->lmf);
 
        jit_tls->lmf = lmf;
-#endif
 
 #ifdef MONO_ARCH_HAVE_TLS_INIT
        mono_arch_tls_init ();
@@ -1768,7 +1754,7 @@ no_gsharedvt_in_wrapper (void)
 }
 
 static gpointer
-mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoError *error)
+mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, gboolean jit_only, MonoError *error)
 {
        MonoDomain *target_domain, *domain = mono_domain_get ();
        MonoJitInfo *info;
@@ -1780,8 +1766,11 @@ mono_jit_compile_method_with_opt (MonoMethod *method, guint32 opt, MonoError *er
        error_init (error);
 
 #ifdef ENABLE_INTERPRETER
-       if (mono_use_interpreter)
-               return mono_interp_create_method_pointer (method, error);
+       if (mono_use_interpreter && !jit_only) {
+               code = mono_interp_create_method_pointer (method, error);
+               if (code)
+                       return code;
+       }
 #endif
 
        if (mono_llvm_only)
@@ -1938,7 +1927,21 @@ mono_jit_compile_method (MonoMethod *method, MonoError *error)
 {
        gpointer code;
 
-       code = mono_jit_compile_method_with_opt (method, mono_get_optimizations_for_method (method, default_opt), error);
+       code = mono_jit_compile_method_with_opt (method, mono_get_optimizations_for_method (method, default_opt), FALSE, error);
+       return code;
+}
+
+/*
+ * mono_jit_compile_method_jit_only:
+ *
+ *   Compile METHOD using the JIT/AOT, even in interpreted mode.
+ */
+gpointer
+mono_jit_compile_method_jit_only (MonoMethod *method, MonoError *error)
+{
+       gpointer code;
+
+       code = mono_jit_compile_method_with_opt (method, mono_get_optimizations_for_method (method, default_opt), TRUE, error);
        return code;
 }
 
@@ -2350,13 +2353,14 @@ mono_llvmonly_runtime_invoke (MonoMethod *method, RuntimeInvokeInfo *info, void
 
 /**
  * mono_jit_runtime_invoke:
- * @method: the method to invoke
- * @obj: this pointer
- * @params: array of parameter values.
- * @exc: Set to the exception raised in the managed method.  If NULL, error is thrown instead.
- *       If coop is enabled, this argument is ignored - all exceptoins are caught and propagated
- *       through @error
- * @error: error or caught exception object
+ * \param method: the method to invoke
+ * \param obj: this pointer
+ * \param params: array of parameter values.
+ * \param exc: Set to the exception raised in the managed method.
+ * \param error: error or caught exception object
+ * If \p exc is NULL, \p error is thrown instead.
+ * If coop is enabled, \p exc argument is ignored -
+ * all exceptions are caught and propagated through \p error
  */
 static MonoObject*
 mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObject **exc, MonoError *error)
@@ -2424,7 +2428,7 @@ mono_jit_runtime_invoke (MonoMethod *method, void *obj, void **params, MonoObjec
                }
 
                if (callee) {
-                       compiled_method = mono_jit_compile_method_with_opt (callee, mono_get_optimizations_for_method (callee, default_opt), error);
+                       compiled_method = mono_jit_compile_method (callee, error);
                        if (!compiled_method) {
                                g_assert (!mono_error_ok (error));
                                return NULL;
@@ -3371,6 +3375,7 @@ mini_create_jit_domain_info (MonoDomain *domain)
        info->seq_points = g_hash_table_new_full (mono_aligned_addr_hash, NULL, NULL, mono_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);
+       mono_jit_code_hash_init (&info->interp_code_hash);
 
        domain->runtime_info = info;
 }
@@ -3836,7 +3841,7 @@ register_icalls (void)
                register_icall (mono_threads_state_poll, "mono_threads_state_poll", "void", FALSE);
 
 #ifndef MONO_ARCH_NO_EMULATE_LONG_MUL_OPTS
-       register_opcode_emulation (OP_LMUL, "__emul_lmul", "long long long", mono_llmult, "mono_llmult", TRUE);
+       register_opcode_emulation (OP_LMUL, "__emul_lmul", "long long long", mono_llmult, "mono_llmult", FALSE);
        register_opcode_emulation (OP_LDIV, "__emul_ldiv", "long long long", mono_lldiv, "mono_lldiv", FALSE);
        register_opcode_emulation (OP_LDIV_UN, "__emul_ldiv_un", "long long long", mono_lldiv_un, "mono_lldiv_un", FALSE);
        register_opcode_emulation (OP_LREM, "__emul_lrem", "long long long", mono_llrem, "mono_llrem", FALSE);
@@ -4039,13 +4044,11 @@ register_icalls (void)
        register_icall_no_wrapper (mono_tls_get_thread, "mono_tls_get_thread", "ptr");
        register_icall_no_wrapper (mono_tls_get_jit_tls, "mono_tls_get_jit_tls", "ptr");
        register_icall_no_wrapper (mono_tls_get_domain, "mono_tls_get_domain", "ptr");  
-       register_icall_no_wrapper (mono_tls_get_lmf, "mono_tls_get_lmf", "ptr");
        register_icall_no_wrapper (mono_tls_get_sgen_thread_info, "mono_tls_get_sgen_thread_info", "ptr");
        register_icall_no_wrapper (mono_tls_get_lmf_addr, "mono_tls_get_lmf_addr", "ptr");
        register_icall_no_wrapper (mono_tls_set_thread, "mono_tls_set_thread", "void ptr");
        register_icall_no_wrapper (mono_tls_set_jit_tls, "mono_tls_set_jit_tls", "void ptr");
        register_icall_no_wrapper (mono_tls_set_domain, "mono_tls_set_domain", "void ptr");
-       register_icall_no_wrapper (mono_tls_set_lmf, "mono_tls_set_lmf", "void ptr");
        register_icall_no_wrapper (mono_tls_set_sgen_thread_info, "mono_tls_set_sgen_thread_info", "void ptr");
        register_icall_no_wrapper (mono_tls_set_lmf_addr, "mono_tls_set_lmf_addr", "void ptr");
 }
@@ -4215,10 +4218,9 @@ mono_set_verbose_level (guint32 level)
 
 /**
  * mono_get_runtime_build_info:
- *
- * Return the runtime version + build date in string format.
  * The returned string is owned by the caller. The returned string
- * format is "VERSION (FULL_VERSION BUILD_DATE)" and build date is optional.
+ * format is <code>VERSION (FULL_VERSION BUILD_DATE)</code> and build date is optional.
+ * \returns the runtime version + build date in string format.
  */
 char*
 mono_get_runtime_build_info (void)
index d6e6bc42408637a697f6038972fcef2da6389e78..11270779c744363459be136e5c0d184145a8b34f 100644 (file)
@@ -1,18 +1,16 @@
-/*------------------------------------------------------------------*/
-/*                                                                 */
-/* Name        - mini-s390.c                                       */
-/*                                                                 */
-/* Function    - S/390 backend for the Mono code generator.         */
-/*                                                                 */
-/* Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com) */
-/*                                                                 */
-/* Date        - January, 2004                                     */
-/*                                                                 */
-/* Derivation  - From mini-x86 & mini-ppc by -                     */
-/*              Paolo Molaro (lupus@ximian.com)                    */
-/*              Dietmar Maurer (dietmar@ximian.com)                */
-/*                                                                 */
-/*------------------------------------------------------------------*/
+/**
+ * \file
+ * Function    - S/390 backend for the Mono code generator.
+ *
+ * Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ *
+ * Date        - January, 2004
+ *
+ * Derivation  - From mini-x86 & mini-ppc by -
+ *              Paolo Molaro (lupus@ximian.com)
+ *              Dietmar Maurer (dietmar@ximian.com)
+ *
+ */
 
 /*------------------------------------------------------------------*/
 /*                 D e f i n e s                                    */
@@ -1629,23 +1627,17 @@ get_call_info (MonoCompile *cfg, MonoMemPool *mp, MonoMethodSignature *sig)
        simpleType = ret_type->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_SZARRAY:
-               case MONO_TYPE_ARRAY:
                case MONO_TYPE_PTR:
                case MONO_TYPE_FNPTR:
-               case MONO_TYPE_STRING:
                        cinfo->ret.reg = s390_r2;
                        sz->code_size += 4;
                        break;
@@ -1769,7 +1761,6 @@ enum_retvalue:
                simpleType = ptype->type;
                cinfo->args[nParm].type = simpleType;
                switch (simpleType) {
-               case MONO_TYPE_BOOLEAN:
                case MONO_TYPE_I1:
                case MONO_TYPE_U1:
                        cinfo->args[nParm].size = sizeof(char);
@@ -1778,7 +1769,6 @@ enum_retvalue:
                        break;
                case MONO_TYPE_I2:
                case MONO_TYPE_U2:
-               case MONO_TYPE_CHAR:
                        cinfo->args[nParm].size = sizeof(short);
                        add_general (&gr, sz, cinfo->args+nParm);
                        nParm++;
@@ -1793,11 +1783,7 @@ enum_retvalue:
                case MONO_TYPE_U:
                case MONO_TYPE_PTR:
                case MONO_TYPE_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
                        cinfo->args[nParm].size = sizeof(gpointer);
                        add_general (&gr, sz, cinfo->args+nParm);
                        nParm++;
index 5147ad413cea93fc78aec4082299cd09ceede92f..9747be08ce7f9b504e35437cda29af54bfdaf83d 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_S390X_H__
 #define __MONO_MINI_S390X_H__
 
@@ -47,7 +51,6 @@ typedef struct
 #define MONO_ARCH_NEED_DIV_CHECK                       1
 #define MONO_ARCH_SIGNAL_STACK_SIZE                    256*1024
 #define MONO_ARCH_HAVE_DECOMPOSE_OPTS                  1
-#define MONO_ARCH_ENABLE_MONO_LMF_VAR                  1
 #define MONO_ARCH_IMT_REG                              s390_r9
 #define MONO_ARCH_VTABLE_REG                           S390_FIRST_ARG_REG
 #define MONO_ARCH_RGCTX_REG                            MONO_ARCH_IMT_REG
index 88fd22fe9362301c02d7a969cfdd4a1e89f0e3ea..65056f26c5b8a705b1691d9226952c26475ce7c6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-sparc.c: Sparc backend for the Mono code generator
+/**
+ * \file
+ * Sparc backend for the Mono code generator
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
index 2c9d8772f68d2777de68676b49c0092ca5834215..8140006cfec0ee53fee21b8d6b65c988ab0854ae 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_SPARC_H__
 #define __MONO_MINI_SPARC_H__
 
index 88c89e75e960ba18203b2633f707debec28a04cc..3ef30208cf7b65a0e8a1d5dfdf5c8ce400380f7e 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * (C) 2003 Ximian, Inc.
  * (C) 2003-2011 Novell, Inc.
  * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
@@ -67,8 +68,8 @@ rgctx_tramp_info_hash (gconstpointer data)
 
 /**
  * mono_create_static_rgctx_trampoline:
- * @m: the mono method to create a trampoline for
- * @addr: the address to jump to (where the compiled code for M lives)
+ * \param m the mono method to create a trampoline for
+ * \param addr the address to jump to (where the compiled code for M lives)
  *
  * Creates a static rgctx trampoline for M which branches to ADDR which should
  * point to the compiled code of M.
@@ -82,7 +83,7 @@ rgctx_tramp_info_hash (gconstpointer data)
  *
  * On PPC addr should be an ftnptr and the return value is an ftnptr too.
  *
- * Returns the generated static rgctx trampoline.
+ * \returns the generated static rgctx trampoline.
  */
 gpointer
 mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
@@ -119,7 +120,7 @@ mono_create_static_rgctx_trampoline (MonoMethod *m, gpointer addr)
        if (mono_aot_only)
                res = mono_aot_get_static_rgctx_trampoline (ctx, addr);
        else
-               res = mono_arch_get_static_rgctx_trampoline (m, (MonoMethodRuntimeGenericContext *)ctx, addr);
+               res = mono_arch_get_static_rgctx_trampoline (ctx, addr);
 
        mono_domain_lock (domain);
        /* Duplicates inserted while we didn't hold the lock are OK */
@@ -1292,7 +1293,7 @@ mono_handler_block_guard_trampoline (mgreg_t *regs, guint8 *code, gpointer *tram
        if (!resume_ip) /*this should not happen, but we should avoid crashing */
                exc = mono_get_exception_execution_engine ("Invalid internal state, resuming abort after handler block but no resume ip found");
        else
-               exc = mono_thread_resume_interruption ();
+               exc = mono_thread_resume_interruption (TRUE);
 
        if (exc) {
                mono_handle_exception (&ctx, (MonoObject *)exc);
index 41100fa3b35be60f47127f19ff3bff3792956bdf..26c7ada5df39c91beb747816bf8ebbb8e4557ec2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-unwind.h: Stack Unwinding Interface
+/**
+ * \file
+ * Stack Unwinding Interface
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
index 887a6a13b29fa60c41e8ce3f8c3d977d693babd8..cd3f1f04c1a7ae030d799b3e929f2a35bea6a52a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-windows-dllmain.c: DllMain entry point.
+/**
+ * \file
+ * DllMain entry point.
  *
  * (C) 2002-2003 Ximian, Inc.
  * (C) 2003-2006 Novell, Inc.
index 2d479708fcd8034d08702f4b90417fc332dc5ea8..97bea437f3edfe7faf6d5bf228322a23987a3379 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-windows-uwp.c: UWP profiler stat support for Mono.
+/**
+ * \file
+ * UWP profiler stat support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 9983e27d1b3b5913a0c5eb28b21bc3b3f289c477..2d3c64f22e62ba0014bf63ff7dcb4f40619c4f84 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-posix.c: POSIX signal handling support for Mono.
+/**
+ * \file
+ * POSIX signal handling support for Mono.
  *
  * Authors:
  *   Mono Team (mono-list@lists.ximian.com)
index ba823c3d54d6f57552111714998ce900de3c83cc..3d95e3e9ffc4aa70f6429f7c31d13c467c079fac 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_WINDOWS_H__
 #define __MONO_MINI_WINDOWS_H__
 
index 130d48e7f56d7acbdf1cd9422eaf3610b1f0d1fd..7aea192c9de166c860fdb59ab61c24d59abcd1e1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-x86-gsharedvt.c: gsharedvt support code for x86
+/**
+ * \file
+ * gsharedvt support code for x86
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
index 47b71ddd88ee7e7772b41f36b125f7c9ee1d1bd9..1afbca76287e9cf3ebdd5fc52803f6a01c91292e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini-x86.c: x86 backend for the Mono code generator
+/**
+ * \file
+ * x86 backend for the Mono code generator
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
@@ -356,11 +357,7 @@ get_call_info_internal (CallInfo *cinfo, MonoMethodSignature *sig)
                case MONO_TYPE_U:
                case MONO_TYPE_PTR:
                case MONO_TYPE_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
-               case MONO_TYPE_STRING:
                        cinfo->ret.storage = ArgInIReg;
                        cinfo->ret.reg = X86_EAX;
                        break;
@@ -485,11 +482,7 @@ get_call_info_internal (CallInfo *cinfo, MonoMethodSignature *sig)
                case MONO_TYPE_U:
                case MONO_TYPE_PTR:
                case MONO_TYPE_FNPTR:
-               case MONO_TYPE_CLASS:
                case MONO_TYPE_OBJECT:
-               case MONO_TYPE_STRING:
-               case MONO_TYPE_SZARRAY:
-               case MONO_TYPE_ARRAY:
                        add_general (&gr, param_regs, &stack_size, ainfo);
                        break;
                case MONO_TYPE_GENERICINST:
@@ -1073,8 +1066,11 @@ mono_arch_allocate_vars (MonoCompile *cfg)
         * have locals larger than 8 bytes we need to make sure that
         * they have the appropriate offset.
         */
-       if (MONO_ARCH_FRAME_ALIGNMENT > 8 && locals_stack_align > 8)
-               offset += MONO_ARCH_FRAME_ALIGNMENT - sizeof (gpointer) * 2;
+       if (MONO_ARCH_FRAME_ALIGNMENT > 8 && locals_stack_align > 8) {
+               int extra_size = MONO_ARCH_FRAME_ALIGNMENT - sizeof (gpointer) * 2;
+               offset += extra_size;
+               locals_stack_size += extra_size;
+       }
        for (i = cfg->locals_start; i < cfg->num_varinfo; i++) {
                if (offsets [i] != -1) {
                        MonoInst *inst = cfg->varinfo [i];
@@ -1180,9 +1176,6 @@ mono_arch_create_vars (MonoCompile *cfg)
        if (cfg->method->save_lmf) {
                cfg->create_lmf_var = TRUE;
                cfg->lmf_ir = TRUE;
-#ifndef HOST_WIN32
-               cfg->lmf_ir_mono_lmf = TRUE;
-#endif
        }
 
        cfg->arch_eh_jit_info = 1;
@@ -2001,6 +1994,12 @@ mono_arch_peephole_pass_2 (MonoCompile *cfg, MonoBasicBlock *bb)
        }
 }
 
+#define NEW_INS(cfg,ins,dest,op) do {  \
+               MONO_INST_NEW ((cfg), (dest), (op)); \
+               (dest)->cil_code = (ins)->cil_code;                              \
+               mono_bblock_insert_before_ins (bb, ins, (dest)); \
+       } while (0)
+
 /*
  * mono_arch_lowering_pass:
  *
@@ -2031,6 +2030,31 @@ mono_arch_lowering_pass (MonoCompile *cfg, MonoBasicBlock *bb)
                                break;
                        mono_decompose_op_imm (cfg, bb, ins);
                        break;
+#ifdef MONO_ARCH_SIMD_INTRINSICS
+               case OP_EXPAND_I1: {
+                       MonoInst *temp;
+                       int temp_reg1 = mono_alloc_ireg (cfg);
+                       int temp_reg2 = mono_alloc_ireg (cfg);
+                       int original_reg = ins->sreg1;
+
+                       NEW_INS (cfg, ins, temp, OP_ICONV_TO_U1);
+                       temp->sreg1 = original_reg;
+                       temp->dreg = temp_reg1;
+
+                       NEW_INS (cfg, ins, temp, OP_SHL_IMM);
+                       temp->sreg1 = temp_reg1;
+                       temp->dreg = temp_reg2;
+                       temp->inst_imm = 8;
+
+                       NEW_INS (cfg, ins, temp, OP_IOR);
+                       temp->sreg1 = temp->dreg = temp_reg2;
+                       temp->sreg2 = temp_reg1;
+
+                       ins->opcode = OP_EXPAND_I2;
+                       ins->sreg1 = temp_reg2;
+               }
+                       break;
+#endif
                default:
                        break;
                }
@@ -4829,14 +4853,6 @@ mono_arch_output_basic_block (MonoCompile *cfg, MonoBasicBlock *bb)
                        }                       
                        break;
 
-               case OP_EXPAND_I1:
-                       /*FIXME this causes a partial register stall, maybe it would not be that bad to use shift + mask + or*/
-                       /*The +4 is to get a mov ?h, ?l over the same reg.*/
-                       x86_mov_reg_reg (code, ins->dreg + 4, ins->dreg, 1);
-                       x86_sse_alu_pd_reg_reg_imm (code, X86_SSE_PINSRW, ins->dreg, ins->sreg1, 0);
-                       x86_sse_alu_pd_reg_reg_imm (code, X86_SSE_PINSRW, ins->dreg, ins->sreg1, 1);
-                       x86_sse_shift_reg_imm (code, X86_SSE_PSHUFD, ins->dreg, ins->dreg, 0);
-                       break;
                case OP_EXPAND_I2:
                        x86_sse_alu_pd_reg_reg_imm (code, X86_SSE_PINSRW, ins->dreg, ins->sreg1, 0);
                        x86_sse_alu_pd_reg_reg_imm (code, X86_SSE_PINSRW, ins->dreg, ins->sreg1, 1);
@@ -5262,24 +5278,18 @@ mono_arch_emit_epilog (MonoCompile *cfg)
                /* check if we need to restore protection of the stack after a stack overflow */
                if (!cfg->compile_aot && mono_arch_have_fast_tls () && mono_tls_get_tls_offset (TLS_KEY_JIT_TLS) != -1) {
                        code = mono_x86_emit_tls_get (code, X86_ECX, mono_tls_get_tls_offset (TLS_KEY_JIT_TLS));
-               } else {
-                       gpointer func = mono_tls_get_tls_getter (TLS_KEY_JIT_TLS, TRUE);
-                       /* FIXME use tls only from IR level */
-                       x86_xchg_reg_reg (code, X86_EAX, X86_ECX, 4);
-                       code = emit_call (cfg, code, MONO_PATCH_INFO_INTERNAL_METHOD, func);
-                       x86_xchg_reg_reg (code, X86_EAX, X86_ECX, 4);
-               }
 
-               /* 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, 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);
-               /* note that the call trampoline will preserve eax/edx */
-               x86_call_reg (code, X86_ECX);
-               x86_patch (patch, code);
+                       /* 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, 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);
+                       /* note that the call trampoline will preserve eax/edx */
+                       x86_call_reg (code, X86_ECX);
+                       x86_patch (patch, code);
+               }
 
                /* restore caller saved regs */
                if (cfg->used_int_regs & (1 << X86_EBX)) {
@@ -5796,12 +5806,10 @@ mono_arch_get_patch_offset (guint8 *code)
 }
 
 /**
- * mono_breakpoint_clean_code:
+ * \return TRUE if no sw breakpoint was present.
  *
- * Copy @size bytes from @code - @offset to the buffer @buf. If the debugger inserted software
+ * Copy \p size bytes from \p code - \p offset to the buffer \p buf. If the debugger inserted software
  * breakpoints in the original code, they are removed in the copy.
- *
- * Returns TRUE if no sw breakpoint was present.
  */
 gboolean
 mono_breakpoint_clean_code (guint8 *method_start, guint8 *code, int offset, guint8 *buf, int size)
index edc0bb19eccc0997e504aea797953e139a72ea77..5c40278e39d373a23da950143ee37b14b4054685 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_X86_H__
 #define __MONO_MINI_X86_H__
 
@@ -192,10 +196,6 @@ 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_IMT_REG X86_EDX
 #define MONO_ARCH_VTABLE_REG X86_EDX
 #define MONO_ARCH_RGCTX_REG MONO_ARCH_IMT_REG
index c0ce85bc0d6c1fc39e9738099cf23c9fada8a2ec..efe23ea8f63c35d5abf5b2bfd3a1816bc5e18b88 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mini.c: The new Mono code generator.
+/**
+ * \file
+ * The new Mono code generator.
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
@@ -4368,7 +4369,7 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
  * mini_get_underlying_type:
  *
  *   Return the type the JIT will use during compilation.
- * Handles: byref, enums, native types, generic sharing.
+ * Handles: byref, enums, native types, bool/char, ref types, generic sharing.
  * For gsharedvt types, it will return the original VAR/MVAR.
  */
 MonoType*
index e7fc859c250c3b22c299c1d6b94ace2ec2e3bb92..730c936de3c6a5103683ada79fe930cabdc9cb7c 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2002-2003 Ximian Inc
  * Copyright 2003-2011 Novell Inc
  * Copyright 2011 Xamarin Inc
@@ -365,6 +366,8 @@ typedef struct
        gpointer llvm_module;
        /* Maps MonoMethod -> GSlist of addresses */
        GHashTable *llvm_jit_callees;
+       /* Maps MonoMethod -> RuntimeMethod */
+       MonoInternalHashTable interp_code_hash;
 } MonoJitDomainInfo;
 
 typedef struct {
@@ -1138,7 +1141,6 @@ typedef struct {
 typedef struct {
        gpointer          end_of_stack;
        guint32           stack_size;
-       /* !defined(HAVE_KW_THREAD) || !defined(MONO_ARCH_ENABLE_MONO_LMF_VAR) */
        MonoLMF          *lmf;
        MonoLMF          *first_lmf;
        gpointer         restore_stack_prot;
@@ -1711,7 +1713,6 @@ typedef struct {
         * Whenever to use the mono_lmf TLS variable instead of indirection through the
         * mono_lmf_addr TLS variable.
         */
-       guint            lmf_ir_mono_lmf : 1;
        guint            gen_write_barriers : 1;
        guint            init_ref_vars : 1;
        guint            extend_live_ranges : 1;
@@ -2421,6 +2422,7 @@ gpointer  mono_resolve_patch_target         (MonoMethod *method, MonoDomain *dom
 gpointer  mono_jit_find_compiled_method_with_jit_info (MonoDomain *domain, MonoMethod *method, MonoJitInfo **ji);
 gpointer  mono_jit_find_compiled_method     (MonoDomain *domain, MonoMethod *method);
 gpointer  mono_jit_compile_method           (MonoMethod *method, MonoError *error);
+gpointer  mono_jit_compile_method_jit_only  (MonoMethod *method, MonoError *error);
 gpointer  mono_jit_compile_method_inner     (MonoMethod *method, MonoDomain *target_domain, int opt, MonoError *error);
 MonoLMF * mono_get_lmf                      (void);
 MonoLMF** mono_get_lmf_addr                 (void);
@@ -2632,6 +2634,7 @@ void              mono_emit_unwind_op (MonoCompile *cfg, int when,
                                                                           int val);
 MonoTrampInfo*    mono_tramp_info_create (const char *name, guint8 *code, guint32 code_size, MonoJumpInfo *ji, GSList *unwind_ops);
 void              mono_tramp_info_free (MonoTrampInfo *info);
+void              mono_aot_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain);
 void              mono_tramp_info_register (MonoTrampInfo *info, MonoDomain *domain);
 int               mini_exception_id_by_name (const char *name);
 gboolean          mini_type_is_hfa (MonoType *t, int *out_nfields, int *out_esize) MONO_LLVM_INTERNAL;
@@ -2799,7 +2802,7 @@ void     mono_arch_create_vars                  (MonoCompile *cfg) MONO_LLVM_INT
 void     mono_arch_save_unwind_info             (MonoCompile *cfg);
 void     mono_arch_register_lowlevel_calls      (void);
 gpointer mono_arch_get_unbox_trampoline         (MonoMethod *m, gpointer addr);
-gpointer mono_arch_get_static_rgctx_trampoline  (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr);
+gpointer mono_arch_get_static_rgctx_trampoline  (gpointer arg, gpointer addr);
 gpointer  mono_arch_get_llvm_imt_trampoline     (MonoDomain *domain, MonoMethod *method, int vt_offset);
 gpointer mono_arch_get_gsharedvt_arg_trampoline (MonoDomain *domain, gpointer arg, gpointer addr);
 void     mono_arch_patch_callsite               (guint8 *method_start, guint8 *code, guint8 *addr);
@@ -3098,6 +3101,7 @@ MonoMethod* mini_get_gsharedvt_in_sig_wrapper (MonoMethodSignature *sig);
 MonoMethod* mini_get_gsharedvt_out_sig_wrapper (MonoMethodSignature *sig);
 MonoMethodSignature* mini_get_gsharedvt_out_sig_wrapper_signature (gboolean has_this, gboolean has_ret, int param_count);
 gboolean mini_gsharedvt_runtime_invoke_supported (MonoMethodSignature *sig);
+MonoMethod* mini_get_interp_in_wrapper (MonoMethodSignature *sig);
 
 /* SIMD support */
 
diff --git a/mono/mini/mixed.cs b/mono/mini/mixed.cs
new file mode 100644 (file)
index 0000000..be88673
--- /dev/null
@@ -0,0 +1,182 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Runtime.CompilerServices;
+
+/*
+ * Regression tests for the mixed-mode execution.
+ * Run with --interp=jit=JitClass
+ */
+
+struct AStruct {
+       public int i;
+}
+
+struct GStruct<T> {
+       public int i;
+}
+
+class InterpClass
+{
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void entry_void_0 () {
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static int entry_int_int (int i) {
+               return i + 1;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public int entry_int_this_int (int i) {
+               return i + 1;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static string entry_string_string (string s1, string s2) {
+               return s1 + s2;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static AStruct entry_struct_struct (AStruct l) {
+               return l;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static List<string> entry_ginst_ginst (List<string> l) {
+               return l;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static GStruct<string> entry_ginst_ginst_vtype (GStruct<string> l) {
+               return l;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void entry_void_byref_int (ref int i) {
+               i = i + 1;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static int entry_8_int_args (int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8) {
+               return i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static int entry_9_int_args (int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9) {
+               return i1 + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static IntPtr entry_intptr_intptr (IntPtr i) {
+               return i;
+       }
+
+}
+
+/* The methods in this class will always be JITted */
+class JitClass
+{
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static int entry () {
+               InterpClass.entry_void_0 ();
+               InterpClass.entry_void_0 ();
+               int res = InterpClass.entry_int_int (1);
+               if (res != 2)
+                       return 1;
+               var c = new InterpClass ();
+               res = c.entry_int_this_int (1);
+               if (res != 2)
+                       return 2;
+               var s = InterpClass.entry_string_string ("A", "B");
+               if (s != "AB")
+                       return 3;
+               var astruct = new AStruct () { i = 1 };
+               var astruct2 = InterpClass.entry_struct_struct (astruct);
+               if (astruct2.i != 1)
+                       return 4;
+               var l = new List<string> ();
+               var l2 = InterpClass.entry_ginst_ginst (l);
+               if (l != l2)
+                       return 5;
+               var gstruct = new GStruct<string> () { i = 1 };
+               var gstruct2 = InterpClass.entry_ginst_ginst_vtype (gstruct);
+               if (gstruct2.i != 1)
+                       return 6;
+               int val = 1;
+               InterpClass.entry_void_byref_int (ref val);
+               if (val != 2)
+                       return 7;
+               res = InterpClass.entry_8_int_args (1, 2, 3, 4, 5, 6, 7, 8);
+               if (res != 36)
+                       return 8;
+               res = InterpClass.entry_9_int_args (1, 2, 3, 4, 5, 6, 7, 8, 9);
+               if (res != 45)
+                       return 9;
+               var ptr = new IntPtr (32);
+               var ptr2 = InterpClass.entry_intptr_intptr (ptr);
+               if (ptr != ptr2)
+                       return 10;
+               return 0;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static AStruct exit_vtype (AStruct s) {
+               return s;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static List<string> exit_ginst (List<string> l) {
+               return l;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static GStruct<string> exit_ginst_vtype (GStruct<string> l) {
+               return l;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void exit_byref (ref int i) {
+               i += 1;
+       }
+}
+
+#if __MOBILE__
+class MixedTests
+#else
+class Tests
+#endif
+{
+
+#if !__MOBILE__
+       public static int Main (string[] args) {
+               return TestDriver.RunTests (typeof (Tests), args);
+       }
+#endif
+
+       public static int test_0_entry () {
+               // This does an interp->jit transition
+               return JitClass.entry ();
+       }
+
+       public static int test_0_exit () {
+               var astruct = new AStruct () { i = 1};
+               var astruct2 = JitClass.exit_vtype (astruct);
+               if (astruct2.i != 1)
+                       return 1;
+               var ginst = new List<string> ();
+               var ginst2 = JitClass.exit_ginst (ginst);
+               if (ginst != ginst2)
+                       return 2;
+               var gstruct = new GStruct<string> () { i = 1 };
+               var gstruct2 = JitClass.exit_ginst_vtype (gstruct);
+               if (gstruct2.i != 1)
+                       return 3;
+               var anint = 1;
+               JitClass.exit_byref (ref anint);
+               if (anint != 2)
+                       return 4;
+               return 0;
+       }
+}
\ No newline at end of file
index 3131bc16d60229bf3930877a3e25db40ed156e22..e5d6ae6bdb82618cfa703fd77e2811170f68788e 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #if defined(__native_client__) && defined(__x86_64__)
 typedef guint64 regmask_t;
 #else
index 623783262034c2a9d18540b85dedffb41ef139a4..88f732d9fc350b9e8a6e5b8bda942e9670a3b0c9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * seq-points.c: Sequence Points functions
+/**
+ * \file
+ * Sequence Points functions
  *
  * Authors:
  *   Marcos Henrich (marcos.henrich@xamarin.com)
index 79915205a2d7e25bcd94b944edff81803fc48474..e2a98696ef63800b0bd43f266303da6be1f581f6 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2014 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index 2240a94cc67521fc623f0b65b7c085152754597b..b394b545d607d7efea9d87e93f923aeced13d43c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * simd-instrisics.c: simd support for intrinsics
+/**
+ * \file
+ * simd support for intrinsics
  *
  * Author:
  *   Rodrigo Kumpera (rkumpera@novell.com)
@@ -14,6 +15,7 @@
 #include "ir-emit.h"
 #include "mono/utils/bsearch.h"
 #include <mono/metadata/abi-details.h>
+#include <mono/metadata/reflection-internals.h>
 
 /*
 General notes on SIMD intrinsics
@@ -1028,13 +1030,15 @@ type_to_pmul_op (MonoType *t)
        case MONO_TYPE_U4:
        case MONO_TYPE_I4:
                return OP_PMULD;
-       case MONO_TYPE_U8:
-       case MONO_TYPE_I8:
-               return OP_PMULQ;
        case MONO_TYPE_R4:
                return OP_MULPS;
        case MONO_TYPE_R8:
                return OP_MULPD;
+       case MONO_TYPE_U8:
+               /* PMULQ multiplies two 32 bit numbers into a 64 bit one */
+               return -1;
+       case MONO_TYPE_I8:
+               return -1;
        default:
                break;
        }
@@ -1055,6 +1059,99 @@ type_to_pdiv_op (MonoType *t)
        return -1;
 }
 
+static int
+type_to_pxor_op (MonoType *t)
+{
+       /*
+        * These opcodes have the same semantics, but using the
+        * correctly typed version is better for performance.
+        */
+       switch (t->type) {
+       case MONO_TYPE_R4:
+               return OP_XORPS;
+       case MONO_TYPE_R8:
+               return OP_XORPD;
+       default:
+               return OP_PXOR;
+       }
+}
+
+static int
+type_to_pand_op (MonoType *t)
+{
+       switch (t->type) {
+       case MONO_TYPE_R4:
+               return OP_ANDPS;
+       case MONO_TYPE_R8:
+               return OP_ANDPD;
+       default:
+               return OP_PAND;
+       }
+}
+
+static int
+type_to_por_op (MonoType *t)
+{
+       switch (t->type) {
+       case MONO_TYPE_R4:
+               return OP_ORPS;
+       case MONO_TYPE_R8:
+               return OP_ORPD;
+       default:
+               return OP_POR;
+       }
+}
+
+static int
+type_to_pmin_op (MonoType *t)
+{
+       switch (t->type) {
+       case MONO_TYPE_R4:
+               return OP_MINPS;
+       case MONO_TYPE_R8:
+               return OP_MINPD;
+       case MONO_TYPE_I1:
+               return OP_PMINB;
+       case MONO_TYPE_U1:
+               return OP_PMINB_UN;
+       case MONO_TYPE_I2:
+               return OP_PMINW;
+       case MONO_TYPE_U2:
+               return OP_PMINW_UN;
+       case MONO_TYPE_I4:
+               return OP_PMIND;
+       case MONO_TYPE_U4:
+               return OP_PMIND_UN;
+       default:
+               return -1;
+       }
+}
+
+static int
+type_to_pmax_op (MonoType *t)
+{
+       switch (t->type) {
+       case MONO_TYPE_R4:
+               return OP_MAXPS;
+       case MONO_TYPE_R8:
+               return OP_MAXPD;
+       case MONO_TYPE_I1:
+               return OP_PMAXB;
+       case MONO_TYPE_U1:
+               return OP_PMAXB_UN;
+       case MONO_TYPE_I2:
+               return OP_PMAXW;
+       case MONO_TYPE_U2:
+               return OP_PMAXW_UN;
+       case MONO_TYPE_I4:
+               return OP_PMAXD;
+       case MONO_TYPE_U4:
+               return OP_PMAXD_UN;
+       default:
+               return -1;
+       }
+}
+
 static int
 get_simd_vreg_or_expanded_scalar (MonoCompile *cfg, MonoClass *klass, MonoType *param_type, MonoInst *src)
 {
@@ -1938,6 +2035,30 @@ mono_emit_simd_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
        return NULL;
 }
 
+static void
+assert_handled (MonoCompile *cfg, MonoMethod *method)
+{
+       MonoCustomAttrInfo *cattr;
+       MonoError error;
+
+       if (cfg->verbose_level > 1) {
+               cattr = mono_custom_attrs_from_method_checked (method, &error);
+
+               if (cattr) {
+                       gboolean has_attr = FALSE;
+                       for (int i = 0; i < cattr->num_attrs; ++i)
+                               if (cattr->attrs [i].ctor && (!strcmp (cattr->attrs [i].ctor->klass->name, "JitIntrinsicAttribute")))
+                                       has_attr = TRUE;
+                       if (has_attr) {
+                               printf ("SIMD intrinsic unhandled: %s\n", mono_method_get_name_full (method, TRUE, TRUE, MONO_TYPE_NAME_FORMAT_IL));
+                               fflush (stdout);
+                               //g_assert_not_reached ();
+                       }
+                       mono_custom_attrs_free (cattr);
+               }
+       }
+}
+
 // The entries should be ordered by name
 // System.Numerics.Vector2/Vector3/Vector4
 static const SimdIntrinsic vector2_intrinsics[] = {
@@ -1966,7 +2087,7 @@ emit_vector_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignatu
         */
        intrins = (const SimdIntrinsic*)mono_binary_search (cmethod->name, vector2_intrinsics, sizeof (vector2_intrinsics) / sizeof (SimdIntrinsic), sizeof (SimdIntrinsic), &simd_intrinsic_compare_by_name);
        if (!intrins) {
-               //printf ("%s\n", mono_method_full_name (cmethod, 1));
+               assert_handled (cfg, cmethod);
                return NULL;
        }
 
@@ -2034,6 +2155,8 @@ emit_vector_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignatu
                break;
        }
 
+       assert_handled (cfg, cmethod);
+
        if (cfg->verbose_level > 1) {
                char *name = mono_method_full_name (cmethod, TRUE);
                printf ("  SIMD method %s not handled.\n", name);
@@ -2042,6 +2165,7 @@ emit_vector_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSignatu
        return NULL;
 }
 
+/* These should be ordered by name */
 static const SimdIntrinsic vector_t_intrinsics[] = {
        { SN_ctor },
        { SN_Abs },
@@ -2051,12 +2175,17 @@ static const SimdIntrinsic vector_t_intrinsics[] = {
        { SN_GreaterThanOrEqual },
        { SN_LessThan },
        { SN_LessThanOrEqual },
+       { SN_Max },
+       { SN_Min },
        { SN_get_AllOnes, OP_XONES },
        { SN_get_Count },
        { SN_get_Item },
        { SN_get_Zero, OP_XZERO },
        { SN_op_Addition },
+       { SN_op_BitwiseAnd },
+       { SN_op_BitwiseOr },
        { SN_op_Division },
+       { SN_op_ExclusiveOr },
        { SN_op_Explicit },
        { SN_op_Multiply },
        { SN_op_Subtraction }
@@ -2072,7 +2201,7 @@ emit_vector_t_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
 
        intrins = (const SimdIntrinsic*)mono_binary_search (cmethod->name, vector_t_intrinsics, sizeof (vector_t_intrinsics) / sizeof (SimdIntrinsic), sizeof (SimdIntrinsic), &simd_intrinsic_compare_by_name);
        if (!intrins) {
-               //printf ("%s\n", mono_method_full_name (cmethod, 1));
+               assert_handled (cfg, cmethod);
                return NULL;
        }
 
@@ -2148,15 +2277,16 @@ emit_vector_t_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
        case SN_op_Explicit:
                return simd_intrinsic_emit_cast (intrins, cfg, cmethod, args);
        case SN_Equals:
-               if (fsig->param_count == 1)
+               if (fsig->param_count == 1 && fsig->ret->type == MONO_TYPE_BOOLEAN && mono_metadata_type_equal (fsig->params [0], type))
                        return simd_intrinsic_emit_equality_op (cfg, cmethod, args, type_to_comp_op (etype), SIMD_COMP_EQ);
-               if (fsig->param_count == 2)
+               if (fsig->param_count == 2 && mono_metadata_type_equal (fsig->ret, type) && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type))
                        return simd_intrinsic_emit_binary_op (cfg, type_to_comp_op (etype), 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
                break;
 
        case SN_GreaterThan:
        case SN_GreaterThanOrEqual:
-       case SN_LessThan: {
+       case SN_LessThan:
+       case SN_LessThanOrEqual: {
                MonoInst *cmp1, *cmp2;
                int eq_op, gt_op;
 
@@ -2176,16 +2306,16 @@ emit_vector_t_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
                switch (intrins->name) {
                case SN_GreaterThan:
                        return simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
-               case SN_LessThanOrEqual:
+               case SN_LessThan:
                        return simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
+               case SN_LessThanOrEqual:
+                       cmp1 = simd_intrinsic_emit_binary_op (cfg, eq_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
+                       cmp2 = simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
+                       return simd_intrinsic_emit_binary_op (cfg, OP_POR, 0, cmethod->klass, fsig->params [0], fsig->params [1], cmp1, cmp2);
                case SN_GreaterThanOrEqual:
                        cmp1 = simd_intrinsic_emit_binary_op (cfg, eq_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
                        cmp2 = simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [0], args [1]);
                        return simd_intrinsic_emit_binary_op (cfg, OP_POR, 0, cmethod->klass, fsig->params [0], fsig->params [1], cmp1, cmp2);
-               case SN_LessThan:
-                       cmp1 = simd_intrinsic_emit_binary_op (cfg, eq_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
-                       cmp2 = simd_intrinsic_emit_binary_op (cfg, gt_op, 0, cmethod->klass, fsig->params [0], fsig->params [1], args [1], args [0]);
-                       return simd_intrinsic_emit_binary_op (cfg, OP_POR, 0, cmethod->klass, fsig->params [0], fsig->params [1], cmp1, cmp2);
                default:
                        g_assert_not_reached ();
                        break;
@@ -2216,7 +2346,12 @@ emit_vector_t_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
        case SN_op_Addition:
        case SN_op_Subtraction:
        case SN_op_Multiply:
-       case SN_op_Division: {
+       case SN_op_Division:
+       case SN_op_ExclusiveOr:
+       case SN_op_BitwiseAnd:
+       case SN_op_BitwiseOr:
+       case SN_Max:
+       case SN_Min: {
                if (!(fsig->param_count == 2 && mono_metadata_type_equal (fsig->ret, fsig->params [0]) && mono_metadata_type_equal (fsig->params [0], fsig->params [1])))
                        break;
                int op = 0;
@@ -2233,6 +2368,21 @@ emit_vector_t_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
                case SN_op_Division:
                        op = type_to_pdiv_op (etype);
                        break;
+               case SN_op_ExclusiveOr:
+                       op = type_to_pxor_op (etype);
+                       break;
+               case SN_op_BitwiseAnd:
+                       op = type_to_pand_op (etype);
+                       break;
+               case SN_op_BitwiseOr:
+                       op = type_to_por_op (etype);
+                       break;
+               case SN_Min:
+                       op = type_to_pmin_op (etype);
+                       break;
+               case SN_Max:
+                       op = type_to_pmax_op (etype);
+                       break;
                default:
                        g_assert_not_reached ();
                }
@@ -2272,6 +2422,8 @@ emit_vector_t_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
                break;
        }
 
+       assert_handled (cfg, cmethod);
+
        if (cfg->verbose_level > 1) {
                char *name = mono_method_full_name (cmethod, TRUE);
                printf ("  SIMD method %s not handled.\n", name);
index d0b34b2781d177be5a558e56491edf369130ba84..b4dc2bf65d4e55b4d5df07fb3649668f7b9cfc88 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * ssa.c: Static single assign form support for the JIT compiler.
+/**
+ * \file
+ * Static single assign form support for the JIT compiler.
  *
  * Author:
  *    Dietmar Maurer (dietmar@ximian.com)
@@ -159,9 +160,8 @@ typedef struct {
 
 /**
  * mono_ssa_rename_vars:
- *
- *  Implement renaming of SSA variables. Also compute def-use information in parallel.
- * @stack_history points to an area of memory which can be used for storing changes 
+ * Implement renaming of SSA variables. Also compute def-use information in parallel.
+ * \p stack_history points to an area of memory which can be used for storing changes 
  * made to the stack, so they can be reverted later.
  */
 static void
index f93dc88c0c6922e3b097ffd2c0f488df657801d9..8856f7745af768d911a88c4fe08150c737c7b56e 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_SUPPORT_S390X_H__
 #define __MONO_SUPPORT_S390X_H__
 
index a29208fb85784d60ffc57afc63bbf1907f44fae6..e767f63125a6914d68d7258c3742ce08b2c4bed6 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "config.h"
 #include "tasklets.h"
index 615f20a4b9b9a1067ae941b0702b87d748aab880..fc6f0b8178a9c6144c778aaa22c9297478b7bf14 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_TASKLETS_H__
 #define __MONO_TASKLETS_H__
 
index d44511d7739bd53613ff092c02264a509b73a3e7..e5e36100f09575d94edbd0d24c29028a82ba949d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * trace.c: Tracing facilities for the Mono Runtime.
+/**
+ * \file
+ * Tracing facilities for the Mono Runtime.
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
index db97f81a287a1debb1013ca824a22e95fa10d3e6..7f6d4562f7d4a1cbcddd01128fa5981618ff1fae 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_TRACE_H__
 #define __MONO_TRACE_H__
 #include <glib.h>
index 5cf1f75540db1a921bea4ea3755ebc5edd7118dd..eb1d59340f03843479ae60fe992854a6c7a2be11 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-amd64-gsharedvt.c: libcorkscrew-based native unwinder
+/**
+ * \file
+ * libcorkscrew-based native unwinder
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
index 7ec7437eb30de65ba5895512bfc4619f583718d2..aa61977cd8f0395c40dedd758282a9acd35e72f1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-amd64.c: JIT trampoline code for amd64
+/**
+ * \file
+ * JIT trampoline code for amd64
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -76,10 +77,10 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 /*
  * mono_arch_get_static_rgctx_trampoline:
  *
- *   Create a trampoline which sets RGCTX_REG to MRGCTX, then jumps to ADDR.
+ *   Create a trampoline which sets RGCTX_REG to ARG, then jumps to ADDR.
  */
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        guint8 *code, *start;
        GSList *unwind_ops;
@@ -101,7 +102,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericCo
 
        unwind_ops = mono_arch_get_cie_program ();
 
-       amd64_mov_reg_imm (code, MONO_ARCH_RGCTX_REG, mrgctx);
+       amd64_mov_reg_imm (code, MONO_ARCH_RGCTX_REG, arg);
        amd64_jump_code (code, addr);
        g_assert ((code - start) < buf_len);
        g_assert_checked (mono_arch_unwindinfo_validate_size (unwind_ops, MONO_TRAMPOLINE_UNWINDINFO_SIZE(0)));
@@ -1008,15 +1009,16 @@ gpointer
 mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
 {
 #ifdef ENABLE_INTERPRETER
-       const int gregs_num = 8;
+       const int gregs_num = 12;
        const int fregs_num = 3;
        guint8 *start = NULL, *code, *label_gexits [gregs_num], *label_fexits [fregs_num], *label_leave_tramp [3], *label_is_float_ret;
        MonoJumpInfo *ji = NULL;
        GSList *unwind_ops = NULL;
        static int farg_regs[] = {AMD64_XMM0, AMD64_XMM1, AMD64_XMM2};
-       int i, framesize = 0, off_rbp, off_methodargs, off_targetaddr;
+       int buf_len, i, framesize = 0, off_rbp, off_methodargs, off_targetaddr;
 
-       start = code = (guint8 *) mono_global_codeman_reserve (256 + MONO_TRAMPOLINE_UNWINDINFO_SIZE(0));
+       buf_len = 512 + MONO_TRAMPOLINE_UNWINDINFO_SIZE(0);
+       start = code = (guint8 *) mono_global_codeman_reserve (buf_len);
 
        off_rbp = -framesize;
 
@@ -1055,9 +1057,8 @@ mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
                amd64_dec_reg_size (code, AMD64_RAX, 1);
        }
 
-       for (i = 0; i < fregs_num; i++) {
+       for (i = 0; i < fregs_num; i++)
                x86_patch (label_fexits [i], code);
-       }
 
        /* load pointer to MethodArguments* into R11 */
        amd64_mov_reg_reg (code, AMD64_R11, AMD64_ARG_REG2, sizeof (mgreg_t));
@@ -1085,9 +1086,8 @@ mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
                amd64_dec_reg_size (code, AMD64_RAX, 1);
        }
 
-       for (i = 0; i < gregs_num; i++) {
+       for (i = 0; i < gregs_num; i++)
                x86_patch (label_gexits [i], code);
-       }
 
        /* load target addr */
        amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, off_targetaddr, sizeof (mgreg_t));
@@ -1107,8 +1107,6 @@ mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
        label_is_float_ret = code;
        x86_branch8 (code, X86_CC_NZ, 0, FALSE);
 
-
-
        /* greg return */
        /* load MethodArguments */
        amd64_mov_reg_membase (code, AMD64_R11, AMD64_RBP, off_methodargs, sizeof (mgreg_t));
@@ -1124,8 +1122,6 @@ mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
        label_leave_tramp [1] = code;
        x86_jump8 (code, 0);
 
-
-
        /* freg return */
        x86_patch (label_is_float_ret, code);
        /* load MethodArguments */
@@ -1146,6 +1142,8 @@ mono_arch_get_enter_icall_trampoline (MonoTrampInfo **info)
        amd64_pop_reg (code, AMD64_RBP);
        amd64_ret (code);
 
+       g_assert (code - start < buf_len);
+
        mono_arch_flush_icache (start, code - start);
        mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_EXCEPTION_HANDLING, NULL);
 
@@ -1169,7 +1167,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        g_assert_not_reached ();
        return NULL;
index acc1dd839ff1f5ed644013141850e8925389b458..fe96db64815a1b78653b7d163e7e472d2b4a62b7 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-arm-gsharedvt.c: gsharedvt support code for arm
+/**
+ * \file
+ * gsharedvt support code for arm
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
index 4c61ab08866e868d680141ef5647b2f05ce3a273..f2501091b44269ae8463ee12fd50556c6a81efb1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-arm.c: JIT trampoline code for ARM
+/**
+ * \file
+ * JIT trampoline code for ARM
  *
  * Authors:
  *   Paolo Molaro (lupus@ximian.com)
@@ -84,6 +85,13 @@ mono_arch_patch_plt_entry (guint8 *code, gpointer *got, mgreg_t *regs, guint8 *a
        *(guint8**)jump_entry = addr;
 }
 
+gpointer
+mono_arm_handler_block_trampoline_helper (gpointer *ptr)
+{
+       MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
+       return jit_tls->handler_block_return_address;
+}
+
 #ifndef DISABLE_JIT
 
 #define arm_is_imm12(v) ((int)(v) > -4096 && (int)(v) < 4096)
@@ -501,7 +509,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        guint8 *code, *start;
        GSList *unwind_ops;
@@ -514,7 +522,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericCo
 
        ARM_LDR_IMM (code, MONO_ARCH_RGCTX_REG, ARMREG_PC, 0);
        ARM_LDR_IMM (code, ARMREG_PC, ARMREG_PC, 0);
-       *(guint32*)code = (guint32)mrgctx;
+       *(guint32*)code = (guint32)arg;
        code += 4;
        *(guint32*)code = (guint32)addr;
        code += 4;
@@ -680,13 +688,6 @@ mono_arch_create_general_rgctx_lazy_fetch_trampoline (MonoTrampInfo **info, gboo
        return buf;
 }
 
-gpointer
-mono_arm_handler_block_trampoline_helper (gpointer *ptr)
-{
-       MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
-       return jit_tls->handler_block_return_address;
-}
-
 gpointer
 mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
 {
@@ -851,7 +852,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        g_assert_not_reached ();
        return NULL;
index 2e005d3c7ab703cc11d3e7c147ab1cb459df3e19..1e35f6a8521b54dc7f78066cc8cf40dce6607c11 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-arm64-gsharedvt.c: gsharedvt support code for arm64
+/**
+ * \file
+ * gsharedvt support code for arm64
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
index 6cc8be320f68e950e6f36e929aa1d68cb2fd0ab4..c68a960c5759a71b954da3a871035761f9858aff 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-arm64.c: JIT trampoline code for ARM64
+/**
+ * \file
+ * JIT trampoline code for ARM64
  *
  * Copyright 2013 Xamarin Inc
  *
@@ -92,6 +93,13 @@ mono_arch_get_plt_info_offset (guint8 *plt_entry, mgreg_t *regs, guint8 *code)
        return ((guint32*)plt_entry) [4];
 }
 
+gpointer
+mono_arm_handler_block_trampoline_helper (gpointer *ptr)
+{
+       MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
+       return jit_tls->handler_block_return_address;
+}
+
 #ifndef DISABLE_JIT
 
 guchar*
@@ -356,14 +364,14 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        guint8 *code, *start;
        guint32 buf_len = 32;
        MonoDomain *domain = mono_domain_get ();
 
        start = code = mono_domain_code_reserve (domain, buf_len);
-       code = mono_arm_emit_imm64 (code, MONO_ARCH_RGCTX_REG, (guint64)mrgctx);
+       code = mono_arm_emit_imm64 (code, MONO_ARCH_RGCTX_REG, (guint64)arg);
        code = mono_arm_emit_imm64 (code, ARMREG_IP0, (guint64)addr);
        arm_brx (code, ARMREG_IP0);
 
@@ -507,13 +515,6 @@ mono_arch_create_general_rgctx_lazy_fetch_trampoline (MonoTrampInfo **info, gboo
        return buf;
 }
 
-gpointer
-mono_arm_handler_block_trampoline_helper (gpointer *ptr)
-{
-       MonoJitTlsData *jit_tls = mono_tls_get_jit_tls ();
-       return jit_tls->handler_block_return_address;
-}
-
 gpointer
 mono_arch_create_handler_block_trampoline (MonoTrampInfo **info, gboolean aot)
 {
@@ -689,7 +690,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        g_assert_not_reached ();
        return NULL;
index 48338e3f757c96cdb385771aba5d2fbd97ba0478..4c2a4ee80ff498ebab969fad4eb41ca7456ab135 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-ia64.c: JIT trampoline code for ia64
+/**
+ * \file
+ * JIT trampoline code for ia64
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
index 37f17a47c89b3d7c20e638236364ae6fa25b4533..bb2beef7424cbd407dc2d198653dd9322d33cea8 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-mips.c: JIT trampoline code for MIPS
+/**
+ * \file
+ * JIT trampoline code for MIPS
  *
  * Authors:
  *    Mark Mason (mason@broadcom.com)
@@ -306,7 +307,7 @@ mono_arch_create_specific_trampoline (gpointer arg1, MonoTrampolineType tramp_ty
 }
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        guint8 *code, *start;
        int buf_len;
@@ -317,7 +318,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericCo
 
        start = code = mono_domain_code_reserve (domain, buf_len);
 
-       mips_load (code, MONO_ARCH_RGCTX_REG, mrgctx);
+       mips_load (code, MONO_ARCH_RGCTX_REG, arg);
        mips_load (code, mips_at, addr);
        mips_jr (code, mips_at);
        mips_nop (code);
index 32ab65ba8cda81118f2a16007cef51fda25a7b5a..fa684925a78c6b04ff6a262e65717227b8c5c60b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-ppc.c: JIT trampoline code for PowerPC
+/**
+ * \file
+ * JIT trampoline code for PowerPC
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -112,10 +113,10 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 /*
  * mono_arch_get_static_rgctx_trampoline:
  *
- *   Create a trampoline which sets RGCTX_REG to MRGCTX, then jumps to ADDR.
+ *   Create a trampoline which sets RGCTX_REG to ARG, then jumps to ADDR.
  */
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        guint8 *code, *start, *p;
        guint8 imm_buf [128];
@@ -128,7 +129,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericCo
 
        /* Compute size of code needed to emit mrgctx */
        p = imm_buf;
-       ppc_load_ptr (p, MONO_ARCH_RGCTX_REG, mrgctx);
+       ppc_load_ptr (p, MONO_ARCH_RGCTX_REG, arg);
        imm_size = p - imm_buf;
 
        mono_domain_lock (domain);
index db7e3d9ad0f2ea907ed0398dbaf9af0bcd95b086..56f1839ae4218621055cf9dd7884439d6a9c1d0d 100644 (file)
@@ -1,20 +1,19 @@
-/*------------------------------------------------------------------*/
-/*                                                                 */
-/* Name        - tramp-s390x.c                                     */
-/*                                                                 */
-/* Function    - JIT trampoline code for S/390.                     */
-/*                                                                 */
-/* Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com) */
-/*                                                                 */
-/* Date        - January, 2004                                     */
-/*                                                                 */
-/* Derivation  - From exceptions-x86 & exceptions-ppc              */
-/*              Paolo Molaro (lupus@ximian.com)                    */
-/*              Dietmar Maurer (dietmar@ximian.com)                */
-/*                                                                 */
-/* Copyright   - 2001 Ximian, Inc.                                 */
-/* Licensed under the MIT license. See LICENSE file in the project root for full license information.*/
-/*------------------------------------------------------------------*/
+/**
+ * \file
+ * Function    - JIT trampoline code for S/390.
+ *
+ * Name               - Neale Ferguson (Neale.Ferguson@SoftwareAG-usa.com)
+ *
+ * Date        - January, 2004
+ *
+ * Derivation  - From exceptions-x86 & exceptions-ppc
+ *              Paolo Molaro (lupus@ximian.com)
+ *              Dietmar Maurer (dietmar@ximian.com)
+ *
+ * Copyright   - 2001 Ximian, Inc.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
+ *
+ */
 
 /*------------------------------------------------------------------*/
 /*                 D e f i n e s                                    */
@@ -554,20 +553,18 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
 /*                                                                  */
 /* Name        - mono_arch_get_static_rgctx_trampoline             */
 /*                                                                  */
-/* Function    - Create a trampoline which sets RGCTX_REG to MRGCTX*/
+/* Function    - Create a trampoline which sets RGCTX_REG to ARG       */
 /*               then jumps to ADDR.                               */
 /*                                                                  */
 /*------------------------------------------------------------------*/
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, 
-                                       MonoMethodRuntimeGenericContext *mrgctx, 
-                                       gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg,
+                                                                          gpointer addr)
 {
        guint8 *code, *start;
        gint32 displace;
        int buf_len;
-       char trampName[128];
 
        MonoDomain *domain = mono_domain_get ();
 
@@ -575,7 +572,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m,
 
        start = code = mono_domain_code_reserve (domain, buf_len);
 
-       S390_SET  (code, MONO_ARCH_RGCTX_REG, mrgctx);
+       S390_SET  (code, MONO_ARCH_RGCTX_REG, arg);
        displace = ((uintptr_t) addr - (uintptr_t) code) / 2;
        s390_jg   (code, displace);
        g_assert ((code - start) < buf_len);
@@ -583,9 +580,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m,
        mono_arch_flush_icache (start, code - start);
        mono_profiler_code_buffer_new (start, code - start, MONO_PROFILER_CODE_BUFFER_HELPER, NULL);
 
-       snprintf(trampName, sizeof(trampName), "%s_rgctx_trampoline", m->name);
-
-       mono_tramp_info_register (mono_tramp_info_create (trampName, start, code - start, NULL, NULL), domain);
+       mono_tramp_info_register (mono_tramp_info_create (NULL, start, code - start, NULL, NULL), domain);
 
        return(start);
 }      
index ad7bcddbe85dac3c3c7f030c61bb19ea07bcafab..b88495977d9d1b5f7346d1e7ecf8e28a11a4957a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-sparc.c: JIT trampoline code for Sparc
+/**
+ * \file
+ * JIT trampoline code for Sparc
  *
  * Authors:
  *   Mark Crichton (crichton@gimp.org)
index 5482504beac9a030f672da799d03a2c9c9edabbd..2001532d7ed9cb5ad5addab16c8724bfa8aabf85 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-x86-gsharedvt.c: gsharedvt support code for x86
+/**
+ * \file
+ * gsharedvt support code for x86
  *
  * Authors:
  *   Zoltan Varga <vargaz@gmail.com>
index eac0f3141335a7a7f08152dfe6080e3c76151dac..89ae8d64281d6b3e412b04d0b165b17a0a8591c0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * tramp-x86.c: JIT trampoline code for x86
+/**
+ * \file
+ * JIT trampoline code for x86
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -61,7 +62,7 @@ mono_arch_get_unbox_trampoline (MonoMethod *m, gpointer addr)
 }
 
 gpointer
-mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericContext *mrgctx, gpointer addr)
+mono_arch_get_static_rgctx_trampoline (gpointer arg, gpointer addr)
 {
        guint8 *code, *start;
        int buf_len;
@@ -75,7 +76,7 @@ mono_arch_get_static_rgctx_trampoline (MonoMethod *m, MonoMethodRuntimeGenericCo
 
        unwind_ops = mono_arch_get_cie_program ();
 
-       x86_mov_reg_imm (code, MONO_ARCH_RGCTX_REG, mrgctx);
+       x86_mov_reg_imm (code, MONO_ARCH_RGCTX_REG, arg);
        x86_jump_code (code, addr);
        g_assert ((code - start) <= buf_len);
 
index 18a5099d977decdb86790a83a81df355b34745f9..812c430a634225259b2e584fda24a70789eb26df 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 #include <mono/utils/mono-compiler.h>
 
index f63171e52f171eaf656667e33b5a9297c37231f2..2dc04322dc6b22a1f64feac6342fa85d39e5f334 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * unwind.c: Stack Unwinding Interface
+/**
+ * \file
+ * Stack Unwinding Interface
  *
  * Authors:
  *   Zoltan Varga (vargaz@gmail.com)
index bbf90a08b64aac4af029668e370ba1778036466c..ee8f4f79061c26081ef606cd010e4afd5d79bc0e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * xdebug.c: Support for emitting gdb debug info for JITted code.
+/**
+ * \file
+ * Support for emitting gdb debug info for JITted code.
  *
  * Author:
  *   Zoltan Varga (vargaz@gmail.com)
index 59f8aeea2a0a838e89d3cf8ca5422d65db89c60c..384e624b64ea447806f8fc054b44443bbe2a6b43 100644 (file)
@@ -119,7 +119,10 @@ match_option (const char* p, const char *opt, char **rval)
 void
 mono_profiler_startup (const char *desc);
 
-/* the entry point */
+/**
+ * mono_profiler_startup:
+ * the entry point
+ */
 void
 mono_profiler_startup (const char *desc)
 {
index dc9b091bf6f95262b3dd0bec4a1903c88576e3d7..54953e85d4cea98c4f03ee78afbaa902146ccc58 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * gc-internal-agnostic.h: Mono-agnostic GC interface.
+/**
+ * \file
+ * Mono-agnostic GC interface.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
index 3b167f893814ea2375bd9236b743ed7e4a3a19d2..20ecc4e5f2f3e4ab146bd772f8bfabe80cde69b2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-alloc.c: Object allocation routines + managed allocators
+/**
+ * \file
+ * Object allocation routines + managed allocators
  *
  * Author:
  *     Paolo Molaro (lupus@ximian.com)
index d0314e8ccfd99166524ccec93893e2cdc12d9764..274f6dac2fdabdfed67add95ea4a76eaa559f494 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-archdep.h: Architecture dependent parts of SGen.
+/**
+ * \file
+ * Architecture dependent parts of SGen.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 4150e4b824e6aad234bb88b1a74a84a33cdd4a13..0247a6b12695c3e1368d327fefd5f58dd31fd2da 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-array-list.c: A pointer array list that doesn't require reallocs
+/**
+ * \file
+ * A pointer array list that doesn't require reallocs
  *
  * Copyright (C) 2016 Xamarin Inc
  *
index c505833ae01c727e5b3a8e2dce5b77d1db71148b..12e8bcdecf70f419c23c0cc65bcad7faac32e396 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-array-list.h: A pointer array that doesn't use reallocs.
+/**
+ * \file
+ * A pointer array that doesn't use reallocs.
  *
  * Copyright (C) 2016 Xamarin Inc
  *
index 0138669a78897f120a97561e8f96b22edb5cfa57..42a9101b1d66eb591e57be26164b5454e1dbe46f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-cardtable.c: Card table implementation for sgen
+/**
+ * \file
+ * Card table implementation for sgen
  *
  * Author:
  *     Rodrigo Kumpera (rkumpera@novell.com)
index a4fa1e32b6e91b2be1b3f281c21172bdbed6744c..ad2e23a3adbbba4444d62a46be59c57bfdd8c638 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
  *
index b1f46068cb3594e91a11309ae72797ada4bc0bc1..11e6451d5b66b34418fb6fdd2ef66025be26d00f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-client.h: SGen client interface.
+/**
+ * \file
+ * SGen client interface.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index 429dcb26af30a8b2370225bf988dc247aa7db7b5..d9296ca15945b9a4dcfeb066d9751de9c17d9704 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-conf.h: Tunable parameters and debugging switches.
+/**
+ * \file
+ * Tunable parameters and debugging switches.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 4c3eae0f09e3db3c7736872a54640a0565f722f0..1e3d3918b65ce7187ff5a09ff6a9f7e4223cdfe3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-copy-object.h: This is where objects are copied.
+/**
+ * \file
+ * This is where objects are copied.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index ae8e2ab2f20cb5498bb559cb577e9c18c37c01cf..b519a1ec58eb17750a9407ea4269317c22f57e95 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-debug.c: Collector debugging
+/**
+ * \file
+ * Collector debugging
  *
  * Author:
  *     Paolo Molaro (lupus@ximian.com)
index f358c9da42977d736172a2d3fe15b8798ecf6970..9a160744b65253a0511fdd88e374ea097516a9dd 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-descriptor.c: GC descriptors describe object layout.
+/**
+ * \file
+ * GC descriptors describe object layout.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
@@ -262,6 +263,9 @@ mono_gc_get_bitmap_for_descr (SgenDescriptor descr, int *numbits)
        }
 }
 
+/**
+ * mono_gc_make_descr_from_bitmap:
+ */
 SgenDescriptor
 mono_gc_make_descr_from_bitmap (gsize *bitmap, int numbits)
 {
index e072ca45d3267c1e21108f9eaafd7d33c0a62767..2c7f19b18c46a4d1029174e5bb509f1916af57b0 100644 (file)
@@ -1,6 +1,7 @@
-/*
- * sgen-descriptor.h: GC descriptors describe object layout.
-
+/**
+ * \file
+ * GC descriptors describe object layout.
+ *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
index bef8bcded6fdb1ea3440012debe30e9a21ac7996..e227281c12d96e0d45b2d49fd6f557e9d24afaee 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-fin-weak-hash.c: Finalizers and weak links.
+/**
+ * \file
+ * Finalizers and weak links.
  *
  * Author:
  *     Paolo Molaro (lupus@ximian.com)
index 88f0c68a2059c742b9fc48decd0d73daa6694137..ab46a371126ca76de0901d9cb657988d91409d4f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-gc.c: Simple generational GC.
+/**
+ * \file
+ * Simple generational GC.
  *
  * Author:
  *     Paolo Molaro (lupus@ximian.com)
@@ -2741,6 +2742,9 @@ sgen_thread_unregister (SgenThreadInfo *p)
  * the conservative scan, otherwise by the remembered set scan.
  */
 
+/**
+ * mono_gc_wbarrier_arrayref_copy:
+ */
 void
 mono_gc_wbarrier_arrayref_copy (gpointer dest_ptr, gpointer src_ptr, int count)
 {
@@ -2766,6 +2770,9 @@ mono_gc_wbarrier_arrayref_copy (gpointer dest_ptr, gpointer src_ptr, int count)
        remset.wbarrier_arrayref_copy (dest_ptr, src_ptr, count);
 }
 
+/**
+ * mono_gc_wbarrier_generic_nostore:
+ */
 void
 mono_gc_wbarrier_generic_nostore (gpointer ptr)
 {
@@ -2793,6 +2800,9 @@ mono_gc_wbarrier_generic_nostore (gpointer ptr)
        remset.wbarrier_generic_nostore (ptr);
 }
 
+/**
+ * mono_gc_wbarrier_generic_store:
+ */
 void
 mono_gc_wbarrier_generic_store (gpointer ptr, GCObject* value)
 {
@@ -2803,7 +2813,9 @@ mono_gc_wbarrier_generic_store (gpointer ptr, GCObject* value)
        sgen_dummy_use (value);
 }
 
-/* Same as mono_gc_wbarrier_generic_store () but performs the store
+/**
+ * mono_gc_wbarrier_generic_store_atomic:
+ * Same as \c mono_gc_wbarrier_generic_store but performs the store
  * as an atomic operation with release semantics.
  */
 void
index a89a5471dd729c563d09721fcd4a5bd9ccdadf68..e8df83337a63fc88e57f4a40aa34a0ea8c68f39b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-gc.c: Simple generational GC.
+/**
+ * \file
+ * Simple generational GC.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 6fc24a2151a8e4b464f94cb5724afe32af392a6e..555d5bf483f68db8dc8f02f59fec6d389f129f5b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-gchandles.c: SGen GC handles.
+/**
+ * \file
+ * SGen GC handles.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
@@ -203,20 +204,18 @@ sgen_gchandle_iterate (GCHandleType handle_type, int max_generation, SgenGCHandl
 
 /**
  * mono_gchandle_new:
- * @obj: managed object to get a handle for
- * @pinned: whether the object should be pinned
- *
+ * \param obj managed object to get a handle for
+ * \param pinned whether the object should be pinned
  * This returns a handle that wraps the object, this is used to keep a
  * reference to a managed object from the unmanaged world and preventing the
  * object from being disposed.
  * 
- * If @pinned is false the address of the object can not be obtained, if it is
+ * If \p pinned is false the address of the object can not be obtained, if it is
  * true the address of the object can be obtained.  This will also pin the
  * object so it will not be possible by a moving garbage collector to move the
  * object. 
  * 
- * Returns: a handle that can be used to access the object from
- * unmanaged code.
+ * \returns a handle that can be used to access the object from unmanaged code.
  */
 guint32
 mono_gchandle_new (GCObject *obj, gboolean pinned)
@@ -226,23 +225,23 @@ mono_gchandle_new (GCObject *obj, gboolean pinned)
 
 /**
  * mono_gchandle_new_weakref:
- * @obj: managed object to get a handle for
- * @track_resurrection: Determines how long to track the object, if this is set to TRUE, the object is tracked after finalization, if FALSE, the object is only tracked up until the point of finalization.
+ * \param obj managed object to get a handle for
+ * \param track_resurrection Determines how long to track the object, if this is set to TRUE, the object is tracked after finalization, if FALSE, the object is only tracked up until the point of finalization.
  *
  * This returns a weak handle that wraps the object, this is used to
  * keep a reference to a managed object from the unmanaged world.
- * Unlike the mono_gchandle_new the object can be reclaimed by the
+ * Unlike the \c mono_gchandle_new the object can be reclaimed by the
  * garbage collector.  In this case the value of the GCHandle will be
  * set to zero.
  * 
- * If @track_resurrection is TRUE the object will be tracked through
+ * If \p track_resurrection is TRUE the object will be tracked through
  * finalization and if the object is resurrected during the execution
  * of the finalizer, then the returned weakref will continue to hold
- * a reference to the object.   If @track_resurrection is FALSE, then
+ * a reference to the object.   If \p track_resurrection is FALSE, then
  * the weak reference's target will become NULL as soon as the object
  * is passed on to the finalizer.
  * 
- * Returns: a handle that can be used to access the object from
+ * \returns a handle that can be used to access the object from
  * unmanaged code.
  */
 guint32
@@ -295,12 +294,12 @@ retry:
 
 /**
  * mono_gchandle_get_target:
- * @gchandle: a GCHandle's handle.
+ * \param gchandle a GCHandle's handle.
  *
- * The handle was previously created by calling `mono_gchandle_new` or
- * `mono_gchandle_new_weakref`
+ * The handle was previously created by calling \c mono_gchandle_new or
+ * \c mono_gchandle_new_weakref
  *
- * Returns a pointer to the `MonoObject*` represented by the handle or
+ * \returns a pointer to the \c MonoObject* represented by the handle or
  * NULL for a collected object if using a weakref handle.
  */
 GCObject*
@@ -385,9 +384,9 @@ sgen_gchandle_get_metadata (guint32 gchandle)
 
 /**
  * mono_gchandle_free:
- * @gchandle: a GCHandle's handle.
+ * \param gchandle a GCHandle's handle.
  *
- * Frees the @gchandle handle.  If there are no outstanding
+ * Frees the \p gchandle handle.  If there are no outstanding
  * references, the garbage collector can reclaim the memory of the
  * object wrapped. 
  */
index 256b18ecbe6e86965c1aef14bbfb5796442d3399..ccd65867f2b75f870b63a3c85215f9cbe7fa8abd 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-gray.c: Gray queue management.
+/**
+ * \file
+ * Gray queue management.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index b2f69d0586d2dd296a42c0d573fbc4c78a2d677e..bbaefe07575539c21e9ba7f02708f8d5a8b1148a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-gray.h: Gray queue management.
+/**
+ * \file
+ * Gray queue management.
  *
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
  * Copyright (C) 2012 Xamarin Inc
index 42856fc65d846a016638bf1ed9b043792540d17e..3ceebc77f30c738e52d2086a73b70da368fcb215 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * sgen-hash-table.c
+/**
+ * \file
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files (the
index 5144cab12702b55ce432e22ae37c785bbc429fb6..389fca32a030da39da1e4b6e08f6fa9e32e9180f 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_SGENHASHTABLE_H__
 #define __MONO_SGENHASHTABLE_H__
 
index e8c0d7ab595a74fa63e86d3a8e03e087df4fd542..49ab78651c258250a0c096164bbadf386ededd54 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-internal.c: Internal lock-free memory allocator.
+/**
+ * \file
+ * Internal lock-free memory allocator.
  *
  * Copyright (C) 2012 Xamarin Inc
  *
index 04b1f241e1abaff2b96990b572e1bdf5e5bf8907..103ef31436465d683b500229926c512e575adc03 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright Xamarin Inc (http://www.xamarin.com)
  *
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 024e0192442b01e66e451189399ddf06bd99a18a..ed25ba5b81db36651b39c9b6cc6c80e39307930a 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright Xamarin Inc (http://www.xamarin.com)
  *
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index e61ba557818f7ac6516d3c5ccff295d113cde566..791eaa25abc15fc3868559945a0da42c43f5f7c4 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-los.c: Large objects space.
+/**
+ * \file
+ * Large objects space.
  *
  * Author:
  *     Paolo Molaro (lupus@ximian.com)
index 826aca9dfd1fa7b5fb32ebe9d8f9f0a6175a036a..e04bf9e063cf1727207af8ae62bbb5892d563936 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-major-copy-object.h: Object copying in the major collectors.
+/**
+ * \file
+ * Object copying in the major collectors.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 98d8917593cd385d6f77c5bdfed4facb5e96ef63..4a76eb460311eb3b89af301bc2031a40a31a7665 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * sgen-marksweep-drain-gray-stack.h: The copy/mark and gray stack
- *     draining functions of the M&S major collector.
+/**
+ * \file
+ * The copy/mark and gray stack draining functions of the M&S major collector.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index 5c4ec06a9ebda9b21afd80477086a42fe303ba00..67b422c1990c10c52989478c2331e14b0f1dfbb3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-marksweep.c: The Mark & Sweep major collector.
+/**
+ * \file
+ * The Mark & Sweep major collector.
  *
  * Author:
  *     Mark Probst <mark.probst@gmail.com>
index d6c7f130f3cae7571d5524cd7cdf67c65119ce28..8dae5a062fd6ddcc54ee582cd161624449ee6a11 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * sgen-memory-governor.c: When to schedule collections based on
- * memory usage.
+/**
+ * \file
+ * When to schedule collections based on memory usage.
  *
  * Author:
  *     Rodrigo Kumpera (rkumpera@novell.com)
index 585fbe9a8388af909098645da5304d8a7ff2e121..81c02dab5bec904551c0c9aa6ba8954985ae4b85 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
  *
index da392c4292847badfe7fcc5a9b01e9c2cb082851..9ba0d129522e677b98bf87768d72b09c1e2fc2c4 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-minor-copy-object.h: Copy functions for nursery collections.
+/**
+ * \file
+ * Copy functions for nursery collections.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 2c357c3c9524c7d3e06b90cfb0aa354918f6e669..aadfe068e24f401bf99510dcebda4595031c6b91 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-minor-scan-object.h: Object scanning in the nursery collectors.
+/**
+ * \file
+ * Object scanning in the nursery collectors.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 77a3aa866f743573c2c04da3c52352506d970e0a..91611877ce6423b43acd2a6c690ac36c884bc5db 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-nursery-allocator.c: Nursery allocation code.
+/**
+ * \file
+ * Nursery allocation code.
  *
  * Copyright 2009-2010 Novell, Inc.
  *           2011 Rodrigo Kumpera
index ab00a56d66dd26cca6eb188000031cde4e95d3f0..f98158077b88e507cefb1e47ed8a96cd4a464af3 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
index be803daffa7a53f3d09596b1a0b51c4261620033..904688c2ae81f628eb8b52d37da7ddfc03564927 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-pinning.c: The pin queue.
+/**
+ * \file
+ * The pin queue.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 2ae2594fa85e1c762898e60d43e6caafaf0ed40a..cdd673f29b5b2ca2df1613f1911bc9cd456bfb1b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-pinning.h: All about pinning objects.
+/**
+ * \file
+ * All about pinning objects.
  *
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
  * Copyright (C) 2012 Xamarin Inc
index 5fb25b0bdc53ce85ac6244422f841c6ff645e813..ed7d92f6f2ab0150db83d3619259937969a2a0a5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-pointer-queue.c: A pointer queue that can be sorted.
+/**
+ * \file
+ * A pointer queue that can be sorted.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index 5127b5bdc1db15038b16213469545ee12d17c76a..52c9b7ec916fe002a72fbed2ca27d1a393a8bfb6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-pointer-queue.h: A pointer queue that can be sorted.
+/**
+ * \file
+ * A pointer queue that can be sorted.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index e6f1f775c917bbfcece04939dda8a6d4d0e3e3a5..08bfdfe890ee2d9ddf8a4e91f1f8158d66363a36 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * All binary protocol entries are defined here.  To keep compatibility with past binary
  * protocol files, new protocol entries need to be defined at the end of the file so that
  * the sequential numbering is preserved.  We also can't change the types or numbers of
index 66e80d97e55483c544d38ed56214085926010149..419e90a482a50faa961382308edd80844b743a17 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * sgen-protocol.c: Binary protocol of internal activity, to aid
- * debugging.
+/**
+ * \file
+ * Binary protocol of internal activity, to aid debugging.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index f0da36fd73def734e02e7740f24c1207215781f0..8b82dc3794aee3a4eb19c7bf3b06da97f34115db 100644 (file)
@@ -1,6 +1,6 @@
-/*
- * sgen-protocol.h: Binary protocol of internal activity, to aid
- * debugging.
+/**
+ * \file
+ * Binary protocol of internal activity, to aid debugging.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 5139a2b4e7a2be1645a74a9be4352cbbe3461edd..e8144244a6c198f78502f058701984e7a0c18895 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-qsort.c: Quicksort.
+/**
+ * \file
+ * Quicksort.
  *
  * Copyright (C) 2013 Xamarin Inc
  *
index 46a7489691086013a11f35ce74a8ce8206295aaa..f77d21b724214d2ac0b0dbb2c8ad7da626be7ebe 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-qsort.h: Fast inline sorting
+/**
+ * \file
+ * Fast inline sorting
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index b5cbedaa92ec50bb9d0b1237e353a244ad4a6303..d6da307a734ee4d0cb74039412d0eb0004be9c17 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-scan-object.h: Generic object scan.
+/**
+ * \file
+ * Generic object scan.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index bc8aee7044c8a12baaa684e9411893dedf9f567a..24a59f759a97602d2d1c0d99558201d775940bf9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-simple-nursery.c: Simple always promote nursery.
+/**
+ * \file
+ * Simple always promote nursery.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index a4deb5a3c6a702d2e65b37c1530102f8767776dc..078e1908d4e36855e3dfe2fd0202371793210911 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-splliy-nursery.c: 3-space based nursery collector.
+/**
+ * \file
+ * 3-space based nursery collector.
  *
  * Author:
  *     Rodrigo Kumpera Kumpera <kumpera@gmail.com>
index 8b28fde01707b1b46fa2d5f292400cefca3154fc..7abb01b022ff0c56849bdf80fb5779f021594bbc 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-tagged-pointer.h: Macros for tagging and untagging pointers.
+/**
+ * \file
+ * Macros for tagging and untagging pointers.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index 20c5e17d3d7464fc90ac156b0efdaeb3d45b8b6a..6f164d278c1b7d9b9a075c3de72506c0d2ba021a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-thread-pool.c: Threadpool for all concurrent GC work.
+/**
+ * \file
+ * Threadpool for all concurrent GC work.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
index 329cc148c1c8bb966488c6c2ba6ea370e49ad393..ce4bb11e321ee58668336c2a6989fa7ee71d4e6e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-thread-pool.h: Threadpool for all concurrent GC work.
+/**
+ * \file
+ * Threadpool for all concurrent GC work.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
index 77c9413ac6c9a540283f3947a9a0a7b177968888..f5169f45ab2e711c87ac1a59d41007ef8715b236 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-workers.c: Worker threads for parallel and concurrent GC.
+/**
+ * \file
+ * Worker threads for parallel and concurrent GC.
  *
  * Copyright 2001-2003 Ximian, Inc
  * Copyright 2003-2010 Novell, Inc.
index 4c84ea10219ca2208bb3bd380af152e08540b7c8..e2f030dc159135210d50d80fd1e60a5799e7291a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * sgen-workers.c: Worker threads for parallel and concurrent GC.
+/**
+ * \file
+ * Worker threads for parallel and concurrent GC.
  *
  * Copyright 2011 Xamarin Inc (http://www.xamarin.com)
  * Copyright (C) 2012 Xamarin Inc
index 3ced39a0cdd0326ebe3e6f19fa126bf0f12c676b..b5303524f2181cda052be396bda400893a7becc3 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = assemblyresolve gc-descriptors
+SUBDIRS = assemblyresolve gc-descriptors . testing_gac
 
 if FULL_AOT_TESTS
 FEATUREFUL_RUNTIME_TEST =  
@@ -7,7 +7,7 @@ FEATUREFUL_RUNTIME_TEST = test-appdomain-unload
 endif
 
 check-local: assemblyresolve/test/asm.dll testjit test-generic-sharing test-type-load test-multi-netmodule test-cattr-type-load test-reflection-load-with-context test_platform        \
-                test-console-output test-messages test-env-options test-unhandled-exception-2 $(FEATUREFUL_RUNTIME_TEST) test-process-stress test-pedump rm-empty-logs
+                test-console-output test-env-options test-unhandled-exception-2 $(FEATUREFUL_RUNTIME_TEST) test-process-stress test-pedump rm-empty-logs runtest-gac-loading
 check-full: test-sgen check-local
 check-parallel: compile-tests check-full
 
@@ -481,7 +481,8 @@ BASE_TEST_CS_SRC=           \
        thread6.cs      \
        appdomain-threadpool-unload.cs  \
        process-unref-race.cs   \
-       bug-46661.cs
+       bug-46661.cs    \
+       w32message.cs
 
 TEST_CS_SRC_DIST=      \
        $(BASE_TEST_CS_SRC)     \
@@ -580,6 +581,11 @@ TEST_IL_SRC=                       \
 if AMD64
 # #651684
 PLATFORM_DISABLED_TESTS = finally_guard.exe
+
+if HOST_WIN32
+PLATFORM_DISABLED_TESTS += w32message.exe
+endif
+
 endif
 
 if IA64
@@ -592,7 +598,7 @@ if X86
 
 if HOST_WIN32
 PLATFORM_DISABLED_TESTS=async-exc-compilation.exe finally_guard.exe finally_block_ending_in_dead_bb.exe \
-       bug-18026.exe monitor.exe threadpool-exceptions5.exe process-unref-race.exe
+       bug-18026.exe monitor.exe threadpool-exceptions5.exe process-unref-race.exe w32message.exe
 endif
 
 endif
@@ -643,6 +649,8 @@ PLATFORM_DISABLED_TESTS= abort-stress-1.exe \
                          threadpool-exceptions5.exe \
                          threadpool-exceptions6.exe
 
+PLATFORM_DISABLED_TESTS+= w32message.exe
+
 # Tests that rely on AppDomain.Unload
 PLATFORM_DISABLED_TESTS+= appdomain-async-invoke.exe \
                           appdomain-exit.exe \
@@ -926,37 +934,27 @@ INTERP_DISABLED_TESTS = \
        async-exc-compilation.exe \
        async-with-cb-throws.exe \
        async_read.exe \
-       bug-10127.exe \
        bug-18026.exe \
-       bug-27147.exe \
        bug-2907.exe \
        bug-323114.exe \
        bug-327438.2.exe \
        bug-335131.2.exe \
-       bug-349190.2.exe \
        bug-415577.exe \
        bug-461867.exe \
        bug-461941.exe \
        bug-46661.exe \
        bug-47295.exe \
        bug-48015.exe \
-       bug-508538.exe \
        bug-544446.exe \
        bug-685908.exe \
-       bug-70561.exe \
-       bug-78549.exe \
        bug-80307.exe \
        bug-80392.2.exe \
        bug-81673.exe \
-       bug-81691.exe \
        bug-82022.exe \
        bug445361.exe \
-       bug469742.2.exe \
        call_missing_class.exe \
        call_missing_method.exe \
        calliGenericTest.exe \
-       cattr-field.exe \
-       classinit3.exe \
        cominterop.exe \
        constant-division.exe \
        context-static.exe \
@@ -965,24 +963,19 @@ INTERP_DISABLED_TESTS = \
        delegate-delegate-exit.exe \
        delegate-exit.exe \
        delegate-with-null-target.exe \
-       delegate.exe \
        delegate1.exe \
        delegate3.exe \
        delegate5.exe \
-       delegate7.exe \
        delegate8.exe \
        delegate9.exe \
        dynamic-method-access.2.exe \
        dynamic-method-finalize.2.exe \
        dynamic-method-resurrection.exe \
        dynamic-method-stack-traces.exe \
-       enum.exe \
        even-odd.exe \
        exception18.exe \
        field-access.exe \
        finally_block_ending_in_dead_bb.exe \
-       gc-altstack.exe \
-       gchandles.exe \
        generic-marshalbyref.2.exe \
        generic-mkrefany.2.exe \
        generic-refanyval.2.exe \
@@ -994,31 +987,23 @@ INTERP_DISABLED_TESTS = \
        handleref.exe \
        invalid-token.exe \
        invalid_generic_instantiation.exe \
-       invoke-string-ctors.exe \
-       invoke.exe \
        ldfld_missing_class.exe \
        ldfld_missing_field.exe \
        ldftn-access.exe \
-       loader.exe \
+       main-returns-background-change.exe \
        marshal-valuetypes.exe \
        marshal.exe \
        marshal2.exe \
        marshal8.exe \
        marshal9.exe \
        marshalbool.exe \
-       main-returns-background-change.exe \
        method-access.exe \
-       modules.exe \
-       monitor-abort.exe \
-       monitor-wait-abort.exe \
        monitor.exe \
-       namedmutex-destroy-race.exe \
        nullable_boxing.2.exe \
        pinvoke-2.2.exe \
        pinvoke-utf8.exe \
        pinvoke.exe \
        pinvoke11.exe \
-       pinvoke17.exe \
        pinvoke2.exe \
        pinvoke3.exe \
        pinvoke_ppcc.exe \
@@ -1026,26 +1011,18 @@ INTERP_DISABLED_TESTS = \
        pinvoke_ppcf.exe \
        pinvoke_ppci.exe \
        pinvoke_ppcs.exe \
-       priority.exe \
        process-unref-race.exe \
-       reference-loader.exe \
        reload-at-bb-end.exe \
        remoting1.exe \
        remoting2.exe \
        remoting3.exe \
        remoting4.exe \
        remoting5.exe \
-       runtime-invoke.exe \
-       runtime-invoke.gen.exe \
        safehandle.2.exe \
-       shared-generic-synchronized.2.exe \
-       sleep.exe \
        stackframes-async.2.exe \
        static-constructor.exe \
        test-inline-call-stack.exe \
-       test-tls.exe \
        test-type-ctor.exe \
-       thread-exit.exe \
        thread6.exe \
        threadpool-exceptions1.exe \
        threadpool-exceptions2.exe \
@@ -1061,7 +1038,6 @@ INTERP_DISABLED_TESTS = \
        typeload-unaligned.exe \
        unload-appdomain-on-shutdown.exe \
        vararg.exe \
-       vararg.exe \
        vararg2.exe \
        vt-sync-method.exe \
        winx64structs.exe \
@@ -1188,22 +1164,6 @@ test-eglib-remap:
        @if which nm > /dev/null; then if nm $(top_builddir)/mono/mini/mono | grep -v $(OK_G_SYMBOLS) | grep 't g_'; then exit 1; else exit 0; fi; fi
 endif
 
-#
-# Tests that the internals in mono/io-layer/messages.c are ok by triggering the 
-# code that checks that the table is properly sorted
-#
-if NACL_CODEGEN
-test-messages:
-else
-if HOST_WIN32
-test-messages:
-else
-test-messages: w32message.exe
-       > test_messages.zero
-       $(with_mono_path) $(JITTEST_PROG_RUN) w32message.exe > w32message.allout 2>&1 && cmp test_messages.zero w32message.allout
-endif
-endif
-
 test-env-options:
        MONO_ENV_OPTIONS="--version" $(RUNTIME) array-init.exe | grep -q Architecture:
 
@@ -1211,7 +1171,7 @@ test-sgen : sgen-tests
 
 # Precompile the test assemblies in parallel
 compile-tests:
-       $(MAKE) -j4 $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS)
+       $(MAKE) -j4 $(TESTSI_CS) $(TESTSI_IL) $(TESTBS) libtest.la $(PREREQSI_IL) $(PREREQSI_CS) compile-gac-loading
 if FULL_AOT_TESTS
        $(MAKE) $(PREREQSI_IL_AOT) $(PREREQSI_CS_AOT) $(AOT_EXTRA_LIBS)
 endif
@@ -1731,9 +1691,15 @@ EXTRA_DIST += bug-17537-helper.cs
 bug-17537-helper.exe: bug-17537-helper.cs
        $(MCS) -out:$@ $(srcdir)/bug-17537-helper.cs
        chmod -x $@
+if FULL_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
+if HYBRID_AOT_TESTS
+       $(RUNTIME) $(AOT_BUILD_FLAGS) $@
+endif
 
 bug-17537.exe: bug-17537.cs bug-17537-helper.exe
-       $(MCS) -r:System.dll -out:$@ $(srcdir)/bug-17537.cs
+       $(MCS) -r:$(CLASS)/System.dll -out:$@ $(srcdir)/bug-17537.cs
 
 EXTRA_DIST += coreclr-security.cs
 
@@ -1785,7 +1751,7 @@ generic-delegate2.2.exe : generic-delegate2.2.cs generic-delegate2-lib.2.dll
        $(MCS) -r:generic-delegate2-lib.2.dll -out:$@ $(srcdir)/generic-delegate2.2.cs
 
 bug-3903.exe: bug-3903.cs
-       $(MCS_NO_LIB)  $(srcdir)/bug-3903.cs -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/System.Core.dll -out:$@
+       $(MCS_NO_LIB)  $(srcdir)/bug-3903.cs -nostdlib -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/mscorlib.dll -r:$(srcdir)/../../external/binary-reference-assemblies/v2.0/System.Core.dll -out:$@
 
 gshared: test-generic-sharing
 
@@ -1972,6 +1938,14 @@ test-console-output: console-output.exe
 test-pedump: test-runner.exe
        $(with_mono_path) $(mono_build_root)/tools/pedump/pedump --verify error test-runner.exe
 
+.PHONY: test-gac-loading
+
+runtest-gac-loading: test-runner.exe
+       $(MAKE) -C testing_gac runtest
+
+compile-gac-loading:
+       $(MAKE) -C testing_gac compile-tests
+
 PROCESS_STRESS_TESTS=  \
                process-stress-1.exe    \
                process-stress-2.exe    \
diff --git a/mono/tests/abort-cctor-2.cs b/mono/tests/abort-cctor-2.cs
new file mode 100644 (file)
index 0000000..f1e7548
--- /dev/null
@@ -0,0 +1,54 @@
+using System;
+using System.Threading;
+
+public class Critical {
+       static Critical ()
+       {
+               Program.mre1.Set ();
+               Program.mre2.WaitOne ();
+               try {
+                       throw new Exception ();
+               } catch (Exception) {
+                       Console.WriteLine ("Catched exception in cctor");
+                       Program.catched_exception = true;
+               }
+       }
+}
+
+
+public class Program {
+       public static ManualResetEvent mre1 = new ManualResetEvent (false);
+       public static ManualResetEvent mre2 = new ManualResetEvent (false);
+
+       public static bool catched_exception, catched_abort;
+
+       public static int Main (string[] args)
+       {
+               Thread thread = new Thread (DoStuff);
+               thread.Start ();
+
+               mre1.WaitOne ();
+               thread.Abort ();
+               mre2.Set ();
+
+               thread.Join ();
+
+               if (!catched_exception)
+                       Environment.Exit (1);
+               if (!catched_abort)
+                       Environment.Exit (2);
+
+               Console.WriteLine ("done, all things good");
+               return 0;
+       }
+
+       public static void DoStuff ()
+       {
+               try {
+                       new Critical ();
+               } catch (ThreadAbortException) {
+                       Console.WriteLine ("Catched thread abort");
+                       Program.catched_abort = true;
+               }
+       }
+}
index 19c494c9d5c3b571978f93a87466a4b075fe24a7..7ff7a3b28e5143b073080de5dcf530737239a235 100644 (file)
@@ -185,6 +185,7 @@ class Driver
        static void Test3 ()
        {
                Console.WriteLine ("Test 3:");
+               bool catched_abort = false;
 
                Driver.mre1.Reset ();
                Driver.mre2.Reset ();
@@ -197,6 +198,7 @@ class Driver
                                Environment.Exit (7);
                        } catch (ThreadAbortException e) {
                                Console.WriteLine ("TEST 3: aborted {0}", e);
+                               catched_abort = true;
                        }
                });
 
@@ -210,12 +212,16 @@ class Driver
 
                thread.Join ();
 
+               // Did we catch the abort
+               if (!catched_abort)
+                       Environment.Exit (8);
+
                //is StaticConstructor2 viable?
                try {
                        IsStaticConstructor3Viable ();
                        Console.WriteLine ("StaticConstructor3 is viable");
                        /* A regular exception escaping the .cctor makes the type not usable */
-                       Environment.Exit (8);
+                       Environment.Exit (9);
                } catch (TypeInitializationException e) {
                        Console.WriteLine ("StaticConstructor3 not viable");
                }
@@ -262,9 +268,9 @@ class Driver
                new StaticConstructor4 ();
                Console.WriteLine ("IsStaticConstructor4Viable: Did it get to the end? {0} Did it catch an exception {1} and end of the finally block {2}", StaticConstructor4.gotToEnd, StaticConstructor4.caughtException, got_to_the_end_of_the_finally);
                if (!StaticConstructor4.gotToEnd) /* the TAE must not land during a .cctor */
-                       Environment.Exit (9);
-               if (StaticConstructor4.caughtException)
                        Environment.Exit (10);
+               if (StaticConstructor4.caughtException)
+                       Environment.Exit (11);
        }
 
        static void Test4 ()
@@ -305,7 +311,7 @@ class Driver
 
                if (!got_to_the_end_of_the_finally) { 
                        Console.WriteLine ("Did not get to the end of test 4 cctor");
-                       Environment.Exit (11);
+                       Environment.Exit (12);
                }
 
                //is StaticConstructor4viable?
@@ -314,11 +320,52 @@ class Driver
                        Console.WriteLine ("StaticConstructor4 is viable"); /* a TAE doesn't make a type unusable */
                } catch (TypeInitializationException  e) {
                        Console.WriteLine ("StaticConstructor4 not viable");
-                       Environment.Exit (12);
+                       Environment.Exit (13);
+               }
+       }
+
+
+       class StaticConstructor5 {
+               public static bool catched_exception = false;
+               static StaticConstructor5 ()
+               {
+                       Driver.mre1.Set ();
+                       Driver.mre2.WaitOne ();
+                       try {
+                               throw new Exception ();
+                       } catch (Exception) {
+                               Console.WriteLine ("Catched exception in cctor");
+                               catched_exception = true;
+                       }
                }
        }
 
+       static void Test5 ()
+       {
+               bool catched_abort = false;
+               Driver.mre1.Reset ();
+               Driver.mre2.Reset ();
+               Thread thread = new Thread (() => {
+                                       try {
+                                               new StaticConstructor5 ();
+                                       } catch (ThreadAbortException) {
+                                               Console.WriteLine ("Catched thread abort");
+                                               catched_abort = true;
+                                       }
+                               });
+               thread.Start ();
+
+               Driver.mre1.WaitOne ();
+               thread.Abort ();
+               Driver.mre2.Set ();
 
+               thread.Join ();
+
+               if (!StaticConstructor5.catched_exception)
+                       Environment.Exit (14);
+               if (!catched_abort)
+                       Environment.Exit (15);
+       }
 
        public static int Main ()
        {
@@ -326,7 +373,8 @@ class Driver
                Test2 ();
                Test3 ();
                Test4 ();
+               Test5 ();
                Console.WriteLine ("done, all things good");
                return 0;
        }
-}
\ No newline at end of file
+}
index 9fc03ba6ff7e1321b30f782bda7ca2cf02a6fb10..494c5ecc1acbcd82b000a50546e940c347e68e04 100644 (file)
@@ -17,8 +17,14 @@ class Program
 
        static void ProbeCorlib ()
        {
-               Type good = System.Type.GetType("System.Nullable`1[[System.Int32, mscorlib]]"); 
-               Type bad = System.Type.GetType("System.Nullable`1[[System.IO.MemoryMappedFiles.MemoryMappedFile, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]");
+               Type good = System.Type.GetType("System.Nullable`1[[System.Int32, mscorlib]]");
+#if MOBILE
+               string pubKeyToken = "7cec85d7bea7798e";
+#else
+               string pubKeyToken = "b77a5c561934e089";
+#endif
+               string t = String.Format ("System.Nullable`1[[System.IO.MemoryMappedFiles.MemoryMappedFile, System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken={0}]]", pubKeyToken);
+               Type bad = System.Type.GetType(t);
 
                if (good.Assembly.FullName.Split (',') [0] != "mscorlib")
                        throw new Exception ("Wrong assembly name");
index a9f727f9296a779de712399b25b78862aecd9dc2..23fec490693ff134df0462fe9125fc60160bbd86 100644 (file)
@@ -265,4 +265,18 @@ class Tests
                return 0;
        }
 
+       private static void method_invoke_no_modify_by_value_arg_helper (int dummy)
+    {
+    }
+
+    public static int test_0_method_invoke_no_modify_by_value_arg ()
+    {
+        var args = new object[] { null };
+        var method = typeof (Tests).GetMethod ("method_invoke_no_modify_by_value_arg_helper", BindingFlags.NonPublic | BindingFlags.Static);
+        method.Invoke (null, args);
+        if (args[0] == null)
+            return 0;
+        else
+            return 1;
+    }
 }
index 9975440147cfad259371d8e54bc8980a57464ff0..648a899c5e35b08fa809d17dc271d50c056a6b58 100644 (file)
@@ -31,6 +31,7 @@ public class TestRunner
        const string TEST_TIME_FORMAT = "mm\\:ss\\.fff";
        const string ENV_TIMEOUT = "TEST_DRIVER_TIMEOUT_SEC";
        const string MONO_PATH = "MONO_PATH";
+       const string MONO_GAC_PREFIX = "MONO_GAC_PREFIX";
 
        class ProcessData {
                public string test;
@@ -57,6 +58,7 @@ public class TestRunner
                string config = null;
                string mono_path = null;
                string runtime_args = null;
+               string mono_gac_prefix = null;
                var opt_sets = new List<string> ();
 
                string aot_run_flags = null;
@@ -147,6 +149,13 @@ public class TestRunner
                                        }
                                        mono_path = args [i + 1].Substring(0, args [i + 1].Length);
 
+                                       i += 2;
+                               } else if (args [i] == "--mono-gac-prefix") {
+                                       if (i + 1 >= args.Length) {
+                                               Console.WriteLine ("Missing argument to --mono-gac-prefix command line option.");
+                                               return 1;
+                                       }
+                                       mono_gac_prefix = args[i + 1];
                                        i += 2;
                                } else if (args [i] == "--aot-run-flags") {
                                        if (i + 1 >= args.Length) {
@@ -251,7 +260,10 @@ public class TestRunner
                                                ProcessStartInfo job = new ProcessStartInfo (runtime, aot_args);
                                                job.UseShellExecute = false;
                                                job.EnvironmentVariables[ENV_TIMEOUT] = timeout.ToString();
-                                               job.EnvironmentVariables[MONO_PATH] = mono_path;
+                                               if (mono_path != null)
+                                                       job.EnvironmentVariables[MONO_PATH] = mono_path;
+                                               if (mono_gac_prefix != null)
+                                                       job.EnvironmentVariables[MONO_GAC_PREFIX] = mono_gac_prefix;
                                                Process compiler = new Process ();
                                                compiler.StartInfo = job;
 
@@ -331,6 +343,8 @@ public class TestRunner
                                                info.EnvironmentVariables["MONO_CONFIG"] = config;
                                        if (mono_path != null)
                                                info.EnvironmentVariables[MONO_PATH] = mono_path;
+                                       if (mono_gac_prefix != null)
+                                               info.EnvironmentVariables[MONO_GAC_PREFIX] = mono_gac_prefix;
                                        Process p = new Process ();
                                        p.StartInfo = info;
 
diff --git a/mono/tests/testing_gac/.gitattributes b/mono/tests/testing_gac/.gitattributes
new file mode 100644 (file)
index 0000000..18dffd1
--- /dev/null
@@ -0,0 +1 @@
+testkey.snk binary
\ No newline at end of file
diff --git a/mono/tests/testing_gac/.gitignore b/mono/tests/testing_gac/.gitignore
new file mode 100644 (file)
index 0000000..fea7aaf
--- /dev/null
@@ -0,0 +1,3 @@
+/Makefile
+/Makefile.in
+/lib/mono/
diff --git a/mono/tests/testing_gac/Makefile.am b/mono/tests/testing_gac/Makefile.am
new file mode 100644 (file)
index 0000000..5c706e6
--- /dev/null
@@ -0,0 +1,178 @@
+
+### buildtree stuff
+
+CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
+
+if FULL_AOT_TESTS
+PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY,FULL_AOT_DESKTOP 
+endif
+
+if HYBRID_AOT_TESTS
+PROFILE_MCS_FLAGS = -d:MOBILE,MOBILE_LEGACY 
+endif
+
+### test runner stuff
+
+if HOST_WIN32
+PLATFORM_PATH_SEPARATOR=;
+else
+PLATFORM_PATH_SEPARATOR=:
+endif
+
+RUNTIME= $(top_builddir)/runtime/mono-wrapper
+TEST_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME)
+TOOLS_RUNTIME= MONO_PATH=$(mcs_topdir)/class/lib/build $(RUNTIME)
+
+TEST_RUNNER = ../test-runner.exe --runtime $(RUNTIME)
+
+if HOST_WIN32
+TEST_RUNNER_ARGS=--runtime $(if $(MONO_EXECUTABLE),$(shell cygpath -w -a $(MONO_EXECUTABLE) | sed 's/\\/\\\\/g'),mono)
+else
+TEST_RUNNER_ARGS=--runtime $(if $(MONO_EXECUTABLE),$(MONO_EXECUTABLE),mono)
+endif
+
+TEST_RUNNER_ARGS += $(if $(V), --verbose,)
+
+if FULL_AOT_TESTS
+TEST_RUNNER += --aot-run-flags "$(AOT_RUN_FLAGS)" --aot-build-flags "$(AOT_BUILD_FLAGS)"
+endif
+
+if HYBRID_AOT_TESTS
+TEST_RUNNER += --aot-run-flags "$(AOT_RUN_FLAGS)" --aot-build-flags "$(AOT_BUILD_FLAGS)"
+endif
+
+### tools
+
+GACUTIL= $(mcs_topdir)/class/lib/build/gacutil.exe
+SN= $(mcs_topdir)/class/lib/build/sn.exe
+
+MCS= $(TOOLS_RUNTIME) $(CSC) -noconfig -nologo -debug:portable -target:library $(PROFILE_MCS_FLAGS)
+
+### testcase stuff
+
+BASE_MONO_PATH=$(CLASS)
+
+V1_SRC= v1/gactestlib.cs
+V2_SRC= v2/gactestlib.cs
+APP_V1_SRC = v1/app.cs v1/app-refl-load.cs
+
+APP_SIGNED_V1_EXE = app-v1.exe app-refl-load-v1.exe
+
+UNSIGNED_V1_DLL= unsigned_v1/gactestlib.dll
+UNSIGNED_V2_DLL= unsigned_v2/gactestlib.dll
+
+SIGNED_V1_DLL= signed_v1/gactestlib.dll
+SIGNED_V2_DLL= signed_v2/gactestlib.dll
+
+GACTESTLIB_SRCS= $(V1_SRC) $(V2_SRC)
+GACTESTLIB_DLLS= $(SIGNED_V1_DLL) $(SIGNED_V2_DLL) $(UNSIGNED_V1_DLL) $(UNSIGNED_V2_DLL)
+
+if FULL_AOT_TESTS
+GACTESTLIB_DLLS_AOT=$(GACTESTLIB_DLLS:.dll=.dll$(PLATFORM_AOT_SUFFIX))
+APP_SIGNED_V1_AOT=$(APP_SIGNED_V1_EXE:.exe=.exe$(PLATFORM_AOT_SUFFIX))
+endif
+
+if HYBRID_AOT_TESTS
+GACTESTLIB_DLLS_AOT=$(GACTESTLIB_DLLS:.dll=.dll$(PLATFORM_AOT_SUFFIX))
+APP_SIGNED_V1_AOT=$(APP_SIGNED_V1_EXE:.exe=.exe$(PLATFORM_AOT_SUFFIX))
+endif
+
+
+SIGNING_KEY= testkey.snk
+
+# prefix for the testing gac.  gacutil will add lib/mono/gac directories
+GACDIR=.
+
+SIGN= -delaysign -keyfile:$(SIGNING_KEY)
+
+
+### autotools stuff
+
+EXTRA_DIST= README $(SIGNING_KEY) $(GACTESTLIB_SRCS) 
+
+### Test cases
+
+# MONO_GAC_PREFIX tests
+if FULL_AOT_TESTS
+GAC_TESTS=
+else
+if HYBRID_AOT_TESTS
+GAC_TESTS=
+else
+GAC_TESTS= test-signed-v1-app-gac
+endif
+endif
+
+# MONO_PATH tests
+MP_TESTS= test-signed-v1-app-mp-unsigned-v1 \
+       test-signed-v1-app-mp-signed-v1 \
+       test-signed-v1-app-mp-unsigned-v2-signed-v1 \
+       test-signed-v1-app-mp-signed-v2-signed-v1
+
+###
+
+.PHONY: runtest compile-tests prereqs
+
+runtest: $(MP_TESTS) $(GAC_TESTS)
+
+compile-tests: prereqs $(APP_SIGNED_V1_EXE) $(APP_SIGNED_V1_AOT)
+
+prereqs: $(GACTESTLIB_DLLS) $(GACTESTLIB_DLLS_AOT) gacinstall
+
+$(UNSIGNED_V1_DLL): $(V1_SRC)
+       -mkdir -p $(@D)
+       $(MCS) -out:$@ $<
+
+$(UNSIGNED_V2_DLL): $(V2_SRC)
+       -mkdir -p $(@D)
+       $(MCS) -out:$@ $<
+
+$(SIGNED_V1_DLL): $(V1_SRC) $(SIGNING_KEY)
+       -mkdir -p $(@D)
+       $(MCS) -out:$@ $(SIGN) $< && $(TOOLS_RUNTIME) $(SN) -R $@ $(SIGNING_KEY)
+
+$(SIGNED_V2_DLL): $(V2_SRC) $(SIGNING_KEY)
+       -mkdir -p $(@D)
+       $(MCS) -out:$@ $(SIGN) $< && $(TOOLS_RUNTIME) $(SN) -R $@ $(SIGNING_KEY)
+
+%-v1.exe: v1/%.cs $(SIGNED_V1_DLL)
+       $(MCS) -target:exe -out:$@ -r:$(SIGNED_V1_DLL) $<
+
+%.exe$(PLATFORM_AOT_SUFFIX): %.exe 
+       $(TEST_RUNTIME) $(AOT_BUILD_FLAGS) $<
+
+%.dll$(PLATFORM_AOT_SUFFIX): %.dll 
+       $(TEST_RUNTIME) $(AOT_BUILD_FLAGS) $<
+
+test-signed-v1-app-mp-unsigned-v1: $(APP_SIGNED_V1_EXE) prereqs
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "unsigned_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" --expected-exit-code 1 $(APP_SIGNED_V1_EXE)
+
+test-signed-v1-app-mp-signed-v1: $(APP_SIGNED_V1_EXE) prereqs
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "signed_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)"  $(APP_SIGNED_V1_EXE)
+
+test-signed-v1-app-gac: $(APP_SIGNED_V1_EXE) gacinstall prereqs
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-gac-prefix $(GACDIR) $(APP_SIGNED_V1_EXE)
+
+test-signed-v1-app-mp-unsigned-v2-signed-v1: $(APP_SIGNED_V1_EXE) prereqs
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "unsigned_v2$(PLATFORM_PATH_SEPARATOR)signed_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" $(APP_SIGNED_V1_EXE)
+
+test-signed-v1-app-mp-signed-v2-signed-v1: $(APP_SIGNED_V1_EXE) prereqs
+       $(TOOLS_RUNTIME) $(TEST_RUNNER) $(TEST_RUNNER_ARGS) --testsuite-name "testing_gac_$@" --mono-path "signed_v2$(PLATFORM_PATH_SEPARATOR)signed_v1$(PLATFORM_PATH_SEPARATOR)$(BASE_MONO_PATH)" $(APP_SIGNED_V1_EXE)
+
+.PHONY: gacinstall
+
+gacinstall: $(SIGNED_V1_DLL) $(GACTESTLIB_DLLS_AOT)
+       $(TOOLS_RUNTIME) $(GACUTIL) -i $< -gacdir $(GACDIR) 
+
+mostlyclean-local: clean-gac-subdir clean-gactestlib-dll
+       -rm -f TestResult-*.xml
+
+.PHONY: clean-gac-subdir clean-gactestlib-dll
+
+clean-gac-subdir:
+       -rm -rf $(GACDIR)/lib/mono/gac/
+
+clean-gactestlib-dll:
+       -rm -f $(GACTESTLIB_DLLS)
+       -rm -f $(GACTESTLIB_DLLS_AOT)
+       -rm -f $(APP_SIGNED_V1_EXE) $(APP_SIGNED_V1_AOT)
diff --git a/mono/tests/testing_gac/README b/mono/tests/testing_gac/README
new file mode 100644 (file)
index 0000000..5087911
--- /dev/null
@@ -0,0 +1,7 @@
+This directory is used by some tests in <root>/mono/tests that require a GAC (set via MONO_GAC_PREFIX).
+
+The gac will be in this directory, under lib/mono/gac/
+
+
+
+When clean, this directory should have no files other than this README and Makefile
\ No newline at end of file
diff --git a/mono/tests/testing_gac/testkey.snk b/mono/tests/testing_gac/testkey.snk
new file mode 100644 (file)
index 0000000..b76369a
Binary files /dev/null and b/mono/tests/testing_gac/testkey.snk differ
diff --git a/mono/tests/testing_gac/v1/app-refl-load.cs b/mono/tests/testing_gac/v1/app-refl-load.cs
new file mode 100644 (file)
index 0000000..4170aa0
--- /dev/null
@@ -0,0 +1,45 @@
+using System;
+using System.Reflection;
+
+public class App {
+       const string assemblyName = "gactestlib";
+       const string assemblyVersion = "1.0.0.0";
+       const string assemblyPublicKeyToken = "537eab56aa911cb7"; /* see testkey.snk */
+       public static int Main (string[] args)
+       {
+               TestAssemblyLoad ();
+
+               TestReflectionOnlyLoad ();
+
+               return 0;
+       }
+
+       public static void TestAssemblyLoad ()
+       {
+               var expectedVersion = new Version (assemblyVersion);
+
+               var s = String.Format ("{0}, Version={1}, Culture=\"\", PublicKeyToken={2}",
+                                      assemblyName, assemblyVersion, assemblyPublicKeyToken);
+               var n = new AssemblyName (s);
+               var a = AppDomain.CurrentDomain.Load (n);
+
+               if (a == null)
+                       Environment.Exit (1);
+               if (a.GetName ().Version != expectedVersion)
+                       Environment.Exit (2);
+       }
+
+       public static void TestReflectionOnlyLoad ()
+       {
+               var expectedVersion = new Version (assemblyVersion);
+
+               var s = String.Format ("{0}, Version={1}, Culture=\"\", PublicKeyToken={2}",
+                                      assemblyName, assemblyVersion, assemblyPublicKeyToken);
+               var a = Assembly.ReflectionOnlyLoad (s);
+
+               if (a == null)
+                       Environment.Exit (3);
+               if (a.GetName ().Version != expectedVersion)
+                       Environment.Exit (4);
+       }
+}
diff --git a/mono/tests/testing_gac/v1/app.cs b/mono/tests/testing_gac/v1/app.cs
new file mode 100644 (file)
index 0000000..523668a
--- /dev/null
@@ -0,0 +1,8 @@
+using System;
+
+public class App {
+       public static void Main () {
+               X.N1 ();
+               X.N2 ();
+       }
+}
diff --git a/mono/tests/testing_gac/v1/gactestlib.cs b/mono/tests/testing_gac/v1/gactestlib.cs
new file mode 100644 (file)
index 0000000..1ced863
--- /dev/null
@@ -0,0 +1,15 @@
+
+[assembly: System.Reflection.AssemblyVersion ("1.0.0.0")]
+
+public class X
+{
+       public static void N1 ()
+       {
+               
+       }
+
+       public static void N2 ()
+       {
+       }
+
+}
diff --git a/mono/tests/testing_gac/v2/gactestlib.cs b/mono/tests/testing_gac/v2/gactestlib.cs
new file mode 100644 (file)
index 0000000..85ae296
--- /dev/null
@@ -0,0 +1,15 @@
+
+[assembly: System.Reflection.AssemblyVersion ("1.1.0.0")]
+
+public class X
+{
+       public static void N1 ()
+       {
+               
+       }
+
+       // In the "v2" version, let's make this method missing.
+       // public static void N2 ()
+       // {
+       // }
+}
index 5ff5d3a1e727fe7cb697368fc1b98ef4e510cbb1..cacfa691420864741284489786e263d82fa93501 100644 (file)
@@ -2,9 +2,6 @@
 // This test merely creates a Win32Exception that triggers the
 // code in mono/io-layer/message.c that validates that the
 // error table is propertly sorted
-//
-// If there is output on stderr, we have an error
-//
 using System;
 using System.ComponentModel;
 
@@ -14,13 +11,16 @@ class X {
                return new Win32Exception (c).Message;
        }
 
-       static void check (int c, string s)
+       static bool check (int c, string s)
        {
-               if (msg (c) != s)
-                       Console.WriteLine ("For {0} expected {1} got {2}", c, s, msg (c));
+               if (msg (c) != s) {
+                       Console.Error.WriteLine ("For {0} expected {1} got {2}", c, s, msg (c));
+                       return false;
+               }
+               return true;
        }
        
-       static void Main ()
+       static int Main ()
        {
                //
                // All this test does is instantiate two Win32Exceptions
@@ -33,8 +33,11 @@ class X {
                Exception a = new Win32Exception (99999);
                a = new Win32Exception (9805);
 
-               check (2, "Cannot find the specified file");
+               if (!check (2, "Cannot find the specified file"))
+                       return 1;
+
 
+               return 0;
        }
        
-}
\ No newline at end of file
+}
index 748720ad95e7eb4328e1eb0072c3596a56c3caf6..c01d8ae5ff295ad2c00ba8631c16e9293720d8ac 100644 (file)
@@ -1,6 +1,7 @@
-/*
- * atomic.c:  Workarounds for atomic operations for platforms that dont have
- *           really atomic asm functions in atomic.h
+/**
+ * \file
+ * Workarounds for atomic operations for platforms that dont have
+ * really atomic asm functions in atomic.h
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index dca6170a1a1e72cfe2f03cc77a5ce9a2895e1d6d..2fd9ebb27389386b12a0c6ae4c8b899ed086b17e 100755 (executable)
@@ -1,5 +1,6 @@
-/*
- * atomic.h:  Atomic operations
+/**
+ * \file
+ * Atomic operations
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index 399a5c609a9b7ec323b5e3afc7264d3e8a9511c0..d568706c1cd21dfc1d278c3284705e8ab0ed1bcf 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * bsearch () implementation. Needed because some broken platforms
  * have implementations that have unreasonable, non-standard
  * requirements (e.g. "key must not be null"). Taken from NetBSD
index 82137ef4a4f2d38e856ae8fad63a7c4a5be36199..93fdd5dac9025caa40a1cb6b023b889baa687e20 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_BSEARCH_H__
 #define __MONO_BSEARCH_H__
 
index 9af2739b0868956b4893de27dd528c263ee504d2..a1d0d0ebcd3081341a7821c44b447642b8889b00 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * checked-build.c: Expensive asserts used when mono is built with --with-checked-build=yes
+/**
+ * \file
+ * Expensive asserts used when mono is built with --with-checked-build=yes
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 8648fd81e432491355898297111d30b75fafa435..a8d90d1731c6190688330ee18c500ecd37eebe3d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * checked-build.h: Expensive asserts used when mono is built with --with-checked-build=yes
+/**
+ * \file
+ * Expensive asserts used when mono is built with --with-checked-build=yes
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index c5c153bbca925462dd90b5958272916f6148af9c..540f2588a8bf61bd8eaa45a363712d1730f8b43d 100644 (file)
@@ -1,5 +1,6 @@
-/* 
- * dtrace.h: DTrace probes
+/* *
+ * \file
+ * DTrace probes
  * 
  * Authors:
  *   Andreas Faerber <andreas.faerber@web.de>
index 908bcabc5125d0e594237ac67286015302cd8ff9..0bc7a45d22548b7bd62372698e77038d2020d230 100644 (file)
@@ -1,4 +1,5 @@
-/* 
+/**
+ * \file
  * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
  * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index e2c4c96843d15b251e04cf254b875ec95b2e97e7..a89b7713714ae95aa2c20e4a00e90c4834ab4e61 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * hazard-pointer.c: Hazard pointer related code.
+/**
+ * \file
+ * Hazard pointer related code.
  *
  * (C) Copyright 2011 Novell, Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -287,18 +288,18 @@ mono_hazard_pointer_restore_for_signal_handler (int small_id)
 
 /**
  * mono_thread_hazardous_try_free:
- * @p: the pointer to free
- * @free_func: the function that can free the pointer
+ * \param p the pointer to free
+ * \param free_func the function that can free the pointer
  *
- * If @p is not a hazardous pointer it will be immediately freed by calling @free_func.
+ * If \p p is not a hazardous pointer it will be immediately freed by calling \p free_func.
  * Otherwise it will be queued for later.
  *
- * Use this function if @free_func can ALWAYS be called in the context where this function is being called.
+ * Use this function if \p free_func can ALWAYS be called in the context where this function is being called.
  *
  * This function doesn't pump the free queue so try to accommodate a call at an appropriate time.
  * See mono_thread_hazardous_try_free_some for when it's appropriate.
  *
- * Return: TRUE if @p was free or FALSE if it was queued.
+ * \returns TRUE if \p p was free or FALSE if it was queued.
  */
 gboolean
 mono_thread_hazardous_try_free (gpointer p, MonoHazardousFreeFunc free_func)
@@ -314,14 +315,12 @@ mono_thread_hazardous_try_free (gpointer p, MonoHazardousFreeFunc free_func)
 
 /**
  * mono_thread_hazardous_queue_free:
- * @p: the pointer to free
- * @free_func: the function that can free the pointer
- *
- * Queue @p to be freed later. @p will be freed once the hazard free queue is pumped.
+ * \param p the pointer to free
+ * \param free_func the function that can free the pointer
+ * Queue \p p to be freed later. \p p will be freed once the hazard free queue is pumped.
  *
  * This function doesn't pump the free queue so try to accommodate a call at an appropriate time.
- * See mono_thread_hazardous_try_free_some for when it's appropriate.
- *
+ * See \c mono_thread_hazardous_try_free_some for when it's appropriate.
  */
 void
 mono_thread_hazardous_queue_free (gpointer p, MonoHazardousFreeFunc free_func)
index 558c0ad0afa9d5f1a2c7896bd8a34e3c7b10cfa9..a1f453e88cae366599b228a378b16e61961f8485 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * hazard-pointer.h: Hazard pointer related code.
+/**
+ * \file
+ * Hazard pointer related code.
  *
  * (C) Copyright 2011 Novell, Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 331f9038081e178c45067a123ccedf5e4e9c9c01..0efbea01ed3370f5bb6838911fce9714a4f08e13 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * json.c: JSON writer
+/**
+ * \file
+ * JSON writer
  *
  * Author:
  *   Joao Matos (joao.matos@xamarin.com)
index 79b26165e77eb3a7c6518733c60a89e881b028f3..03e6503fc9816d58f310493424012fddf1b24aae 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * json.h: JSON writer
+/**
+ * \file
+ * JSON writer
  *
  * Author:
  *   Joao Matos (joao.matos@xamarin.com)
index 70d6c95851f6f86820fb950de526a07e21bb380f..9d8e94a2bce815b700ba73109d9cfb1870cdbd43 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __LINUX_MAGIC_H
 #define __LINUX_MAGIC_H
 
index 08b4deff37c0379b92524ce00ee5788e717b57b0..8b9f8c93849f6bebcdf1f5358c1edaa74fccb712 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lock-free-alloc.c: Lock free allocator.
+/**
+ * \file
+ * Lock free allocator.
  *
  * (C) Copyright 2011 Novell, Inc
  *
index 9501307fc1dd29f5c8c3c26baa9073c3b5856bf5..dd2e952b5ad61ace5138c3f1375230cd48efac25 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lock-free-alloc.h: Lock free allocator.
+/**
+ * \file
+ * Lock free allocator.
  *
  * (C) Copyright 2011 Novell, Inc
  *
index 5e48558a0d94c438b9afd9db4994ce8c538b7002..2e892357b63377ff98bb516d26f56c4f6d2138a2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lock-free-array-queue.c: A lock-free somewhat-queue that doesn't
+/**
+ * \file
+ * A lock-free somewhat-queue that doesn't
  * require hazard pointers.
  *
  * (C) Copyright 2011 Xamarin Inc.
index 8e198e9227df62230c3e31cf092401d66c117c15..e23754d6a251041b4629c8395d63c83f5d16123a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lock-free-array-queue.h: A lock-free somewhat-queue that doesn't
+/**
+ * \file
+ * A lock-free somewhat-queue that doesn't
  * require hazard pointers.
  *
  * (C) Copyright 2011 Xamarin Inc.
index 3abb84104732786d6978fed3f01d42496de8585d..8afbf246a312a183ad348e3a168cba20b286b7be 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lock-free-queue.c: Lock free queue.
+/**
+ * \file
+ * Lock free queue.
  *
  * (C) Copyright 2011 Novell, Inc
  *
index 300b4556ef251f3fb64274a8a4fe7c0d6d592059..abb16d287b896ce36568aa0e0db9eff9f68964ec 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * lock-free-queue.h: Lock free queue.
+/**
+ * \file
+ * Lock free queue.
  *
  * (C) Copyright 2011 Novell, Inc
  *
index 179a4f7ed748199ed0f6ccc018a63957e7fde44a..733f94c343cf1c93b90f3e769fbc0f12c0610e40 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mach-support-x86.c: mach support for x86
+/**
+ * \file
+ * mach support for x86
  *
  * Authors:
  *   Geoff Norton (gnorton@novell.com)
index f84cc85b63c156dfca9a78cfc5f997c668b127ce..649487ccc096f9d67f96614b9c8096a6dc2b06a9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mach-support-arm.c: mach support for ARM
+/**
+ * \file
+ * mach support for ARM
  *
  * Authors:
  *   Geoff Norton (gnorton@novell.com)
index 4a58dc4a218008af42f4191d508b075840a72603..5033eb19d66807abf1b506ce51700085d5858517 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mach-support-arm.c: mach support for ARM
+/**
+ * \file
+ * mach support for ARM
  *
  * Authors:
  *   Geoff Norton (gnorton@novell.com)
index 88eb187da4476b24dbb4980a851ab217ba1c1d5e..cc629bda2decefc2b4fd26985ba9204c5b6d81d9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mach-support-unknown.c: mach support for cross compilers (IOW, none)
+/**
+ * \file
+ * mach support for cross compilers (IOW, none)
  *
  * Authors:
  *   Rodrigo Kumpera (kumpera@gmail.com)
index a296254cd2cffb17f92947fdbc9dce54f7aa1c4e..d1e0a73492f58934903f4e8e7a220199541d0b41 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mach-support-x86.c: mach support for x86
+/**
+ * \file
+ * mach support for x86
  *
  * Authors:
  *   Geoff Norton (gnorton@novell.com)
index 314b30d972c2b18c065f33f6978a050b64bb10f0..4abfcfaa2c6413b4b837c1ceef7472fdf44caa4f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mach-support-x86.c: mach support for x86
+/**
+ * \file
+ * mach support for x86
  *
  * Authors:
  *   Geoff Norton (gnorton@novell.com)
index 9ac334c7171a729dbbf5bfbca16b6da1e4291087..67b3a84cfc6b4337b659eead22553eb73c2f9616 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MACH_SUPPORT_H__
 #define __MONO_MACH_SUPPORT_H__
 
index 455ffe77ea44acc865935bab96f757e0114e71b4..fc1f2c9e5d2b5ae1496bc370e50d934efeeb42e0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * memfuncs.c: Our own bzero/memmove.
+/**
+ * \file
+ * Our own bzero/memmove.
  *
  * Copyright (C) 2013-2015 Xamarin Inc
  *
 
 /**
  * mono_gc_bzero_aligned:
- * @dest: address to start to clear
- * @size: size of the region to clear
+ * \param dest address to start to clear
+ * \param size size of the region to clear
  *
- * Zero @size bytes starting at @dest.
- * The address of @dest MUST be aligned to word boundaries
+ * Zero \p size bytes starting at \p dest.
+ * The address of \p dest MUST be aligned to word boundaries
  *
  * FIXME borrow faster code from some BSD libc or bionic
  */
@@ -99,12 +100,12 @@ mono_gc_bzero_aligned (void *dest, size_t size)
 
 /**
  * mono_gc_bzero_atomic:
- * @dest: address to start to clear
- * @size: size of the region to clear
+ * \param dest address to start to clear
+ * \param size size of the region to clear
  *
- * Zero @size bytes starting at @dest.
+ * Zero \p size bytes starting at \p dest.
  *
- * Use this to zero memory without word tearing when dest is aligned.
+ * Use this to zero memory without word tearing when \p dest is aligned.
  */
 void
 mono_gc_bzero_atomic (void *dest, size_t size)
@@ -136,14 +137,15 @@ mono_gc_bzero_atomic (void *dest, size_t size)
 
 /**
  * mono_gc_memmove_aligned:
- * @dest: destination of the move
- * @src: source
- * @size: size of the block to move
+ * \param dest destination of the move
+ * \param src source
+ * \param size size of the block to move
  *
- * Move @size bytes from @src to @dest.
+ * Move \p size bytes from \p src to \p dest.
  *
  * Use this to copy memory without word tearing when both pointers are aligned
- */void
+ */
+void
 mono_gc_memmove_aligned (void *dest, const void *src, size_t size)
 {
        g_assert (unaligned_bytes (dest) == 0);
@@ -203,11 +205,11 @@ mono_gc_memmove_aligned (void *dest, const void *src, size_t size)
 
 /**
  * mono_gc_memmove_atomic:
- * @dest: destination of the move
- * @src: source
- * @size: size of the block to move
+ * \param dest destination of the move
+ * \param src source
+ * \param size size of the block to move
  *
- * Move @size bytes from @src to @dest.
+ * Move \p size bytes from \p src to \p dest.
  *
  * Use this to copy memory without word tearing when both pointers are aligned
  */
index 24cc0544474044307cc06261b69a2d0bf3ba59cf..b75029384862fab01d5f8522407b7e3b9fd9312b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * memfuncs.h: Our own bzero/memmove.
+/**
+ * \file
+ * Our own bzero/memmove.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
index 15b96e564f9de1f068521df3ec3948a36915ebaa..1f0e365357a36246979439cf3236b00a86b66eb7 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include "config.h"
 
 #ifdef HAVE_UNISTD_H
@@ -248,9 +252,8 @@ free_chunklist (CodeChunk *chunk)
 
 /**
  * mono_code_manager_destroy:
- * @cman: a code manager
- *
- * Free all the memory associated with the code manager @cman.
+ * \param cman a code manager
+ * Free all the memory associated with the code manager \p cman.
  */
 void
 mono_code_manager_destroy (MonoCodeManager *cman)
@@ -262,11 +265,10 @@ mono_code_manager_destroy (MonoCodeManager *cman)
 
 /**
  * mono_code_manager_invalidate:
- * @cman: a code manager
- *
+ * \param cman a code manager
  * Fill all the memory with an invalid native code value
  * so that any attempt to execute code allocated in the code
- * manager @cman will fail. This is used for debugging purposes.
+ * manager \p cman will fail. This is used for debugging purposes.
  */
 void             
 mono_code_manager_invalidate (MonoCodeManager *cman)
@@ -287,8 +289,7 @@ mono_code_manager_invalidate (MonoCodeManager *cman)
 
 /**
  * mono_code_manager_set_read_only:
- * @cman: a code manager
- *
+ * \param cman a code manager
  * Make the code manager read only, so further allocation requests cause an assert.
  */
 void             
@@ -299,12 +300,11 @@ mono_code_manager_set_read_only (MonoCodeManager *cman)
 
 /**
  * mono_code_manager_foreach:
- * @cman: a code manager
- * @func: a callback function pointer
- * @user_data: additional data to pass to @func
- *
- * Invokes the callback @func for each different chunk of memory allocated
- * in the code manager @cman.
+ * \param cman a code manager
+ * \param func a callback function pointer
+ * \param user_data additional data to pass to \p func
+  * Invokes the callback \p func for each different chunk of memory allocated
+ * in the code manager \p cman.
  */
 void
 mono_code_manager_foreach (MonoCodeManager *cman, MonoCodeManagerFunc func, void *user_data)
@@ -432,14 +432,12 @@ new_codechunk (CodeChunk *last, int dynamic, int size)
 }
 
 /**
- * mono_code_manager_reserve:
- * @cman: a code manager
- * @size: size of memory to allocate
- * @alignment: power of two alignment value
- *
- * Allocates at least @size bytes of memory inside the code manager @cman.
- *
- * Returns: the pointer to the allocated memory or #NULL on failure
+ * mono_code_manager_reserve_align:
+ * \param cman a code manager
+ * \param size size of memory to allocate
+ * \param alignment power of two alignment value
+ * Allocates at least \p size bytes of memory inside the code manager \p cman.
+ * \returns the pointer to the allocated memory or NULL on failure
  */
 void*
 mono_code_manager_reserve_align (MonoCodeManager *cman, int size, int alignment)
@@ -510,12 +508,10 @@ mono_code_manager_reserve_align (MonoCodeManager *cman, int size, int alignment)
 
 /**
  * mono_code_manager_reserve:
- * @cman: a code manager
- * @size: size of memory to allocate
- *
- * Allocates at least @size bytes of memory inside the code manager @cman.
- *
- * Returns: the pointer to the allocated memory or #NULL on failure
+ * \param cman a code manager
+ * \param size size of memory to allocate
+ * Allocates at least \p size bytes of memory inside the code manager \p cman.
+ * \returns the pointer to the allocated memory or NULL on failure
  */
 void*
 mono_code_manager_reserve (MonoCodeManager *cman, int size)
@@ -525,11 +521,10 @@ mono_code_manager_reserve (MonoCodeManager *cman, int size)
 
 /**
  * mono_code_manager_commit:
- * @cman: a code manager
- * @data: the pointer returned by mono_code_manager_reserve ()
- * @size: the size requested in the call to mono_code_manager_reserve ()
- * @newsize: the new size to reserve
- *
+ * \param cman a code manager
+ * \param data the pointer returned by mono_code_manager_reserve ()
+ * \param size the size requested in the call to mono_code_manager_reserve ()
+ * \param newsize the new size to reserve
  * If we reserved too much room for a method and we didn't allocate
  * already from the code manager, we can get back the excess allocation
  * for later use in the code manager.
@@ -546,14 +541,12 @@ mono_code_manager_commit (MonoCodeManager *cman, void *data, int size, int newsi
 
 /**
  * mono_code_manager_size:
- * @cman: a code manager
- * @used_size: pointer to an integer for the result
- *
+ * \param cman a code manager
+ * \param used_size pointer to an integer for the result
  * This function can be used to get statistics about a code manager:
- * the integer pointed to by @used_size will contain how much
- * memory is actually used inside the code managed @cman.
- *
- * Returns: the amount of memory allocated in @cman
+ * the integer pointed to by \p used_size will contain how much
+ * memory is actually used inside the code managed \p cman.
+ * \returns the amount of memory allocated in \p cman
  */
 int
 mono_code_manager_size (MonoCodeManager *cman, int *used_size)
index 166899caafff31a14afdf59fa75b88d2e3f2956d..64cff52da7f98c471292d8977dc9be3d8302e73e 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_CODEMAN_H__
 #define __MONO_CODEMAN_H__
 
index f3371b4be1fd93265e80cf86e1757877b7889029..57fa81aebafb142b19689541f166e661f6d53d59 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __UTILS_MONO_COMPILER_H__
 #define __UTILS_MONO_COMPILER_H__
 
index af13bf62b982d00032f425312560f2312d5a505a..b7488c7cf5214036b9720920751de1634391cce4 100644 (file)
@@ -1,5 +1,6 @@
-/*
-* mono-complex.h: C99 Complex math cross-platform support code
+/**
+ * \file
+* C99 Complex math cross-platform support code
 *
 * Author:
 *      Joao Matos (joao.matos@xamarin.com)
index 9f5fd6addb19608c19acb1a7549eecf7000af369..ad8d340701a9fb539609031be33199263d393273 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-conc-hashtable.h: A mostly concurrent hashtable
+/**
+ * \file
+ * A mostly concurrent hashtable
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
@@ -214,10 +215,8 @@ retry:
 
 /**
  * mono_conc_hashtable_remove:
- *
  * Remove a value from the hashtable. Requires external locking
- *
- * @Returns the old value if key is already present or null
+ * \returns the old value if \p key is already present or NULL
  */
 gpointer
 mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key)
@@ -283,9 +282,8 @@ mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key)
 }
 /**
  * mono_conc_hashtable_insert:
- * 
  * Insert a value into the hashtable. Requires external locking.
- * @Returns the old value if key is already present or null
+ * \returns the old value if \p key is already present or NULL
  */
 gpointer
 mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value)
@@ -345,8 +343,7 @@ mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, g
 
 /**
  * mono_conc_hashtable_foreach:
- *
- * Calls @func for each value in the hashtable. Requires external locking.
+ * Calls \p func for each value in the hashtable. Requires external locking.
  */
 void
 mono_conc_hashtable_foreach (MonoConcurrentHashTable *hash_table, GHFunc func, gpointer userdata)
index a8eb927fb35e7161fc4ee2d46efa7c6166465a76..d4cc69976ed609debe90c3c276c66145f3b01086 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-conc-hashtable.h: A mostly concurrent hashtable
+/**
+ * \file
+ * A mostly concurrent hashtable
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 36ec4a4e0bb5d97e2b67b3bb06cc8d405eed660a..efbe9f03e7a28eeed84c76c2c110f7ce3bf16f6e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-context.c: plat independent machine state definitions
+/**
+ * \file
+ * plat independent machine state definitions
  *
  *
  * Copyright (c) 2011 Novell, Inc (http://www.novell.com)
@@ -60,6 +61,16 @@ mono_sigctx_to_monoctx (void *sigctx, MonoContext *mctx)
        mctx->esi = UCONTEXT_REG_ESI (ctx);
        mctx->edi = UCONTEXT_REG_EDI (ctx);
        mctx->eip = UCONTEXT_REG_EIP (ctx);
+#ifdef UCONTEXT_REG_XMM
+       mctx->fregs [0] = UCONTEXT_REG_XMM0 (ctx);
+       mctx->fregs [1] = UCONTEXT_REG_XMM1 (ctx);
+       mctx->fregs [2] = UCONTEXT_REG_XMM2 (ctx);
+       mctx->fregs [3] = UCONTEXT_REG_XMM3 (ctx);
+       mctx->fregs [4] = UCONTEXT_REG_XMM4 (ctx);
+       mctx->fregs [5] = UCONTEXT_REG_XMM5 (ctx);
+       mctx->fregs [6] = UCONTEXT_REG_XMM6 (ctx);
+       mctx->fregs [7] = UCONTEXT_REG_XMM7 (ctx);
+#endif
 #elif defined(HOST_WIN32)
        CONTEXT *context = (CONTEXT*)sigctx;
 
@@ -106,6 +117,16 @@ mono_monoctx_to_sigctx (MonoContext *mctx, void *sigctx)
        UCONTEXT_REG_ESI (ctx) = mctx->esi;
        UCONTEXT_REG_EDI (ctx) = mctx->edi;
        UCONTEXT_REG_EIP (ctx) = mctx->eip;
+#ifdef UCONTEXT_REG_XMM
+       UCONTEXT_REG_XMM0 (ctx) = mctx->fregs [0];
+       UCONTEXT_REG_XMM1 (ctx) = mctx->fregs [1];
+       UCONTEXT_REG_XMM2 (ctx) = mctx->fregs [2];
+       UCONTEXT_REG_XMM3 (ctx) = mctx->fregs [3];
+       UCONTEXT_REG_XMM4 (ctx) = mctx->fregs [4];
+       UCONTEXT_REG_XMM5 (ctx) = mctx->fregs [5];
+       UCONTEXT_REG_XMM6 (ctx) = mctx->fregs [6];
+       UCONTEXT_REG_XMM7 (ctx) = mctx->fregs [7];
+#endif
 #elif defined(HOST_WIN32)
        CONTEXT *context = (CONTEXT*)sigctx;
 
index 6e7cf7bd442e212121babd370ef644db76fb971d..d0cf8cce421380b2918070ea0d3cf65f9a56e7d0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-context.h: plat independent machine state definitions
+/**
+ * \file
+ * plat independent machine state definitions
  *
  *
  * Copyright (c) 2011 Novell, Inc (http://www.novell.com)
@@ -192,7 +193,7 @@ typedef struct {
                                [xmm4] MONO_CONTEXT_OFFSET (fregs, X86_XMM4, MonoContextSimdReg), \
                                [xmm5] MONO_CONTEXT_OFFSET (fregs, X86_XMM5, MonoContextSimdReg), \
                                [xmm6] MONO_CONTEXT_OFFSET (fregs, X86_XMM6, MonoContextSimdReg), \
-                               [xmm7] MONO_CONTEXT_OFFSET (fregs, X86_XMM7, MonoContextSimdReg), \
+                               [xmm7] MONO_CONTEXT_OFFSET (fregs, X86_XMM7, MonoContextSimdReg)); \
        } while (0)
 #else
 #define MONO_CONTEXT_GET_CURRENT_FREGS(ctx)
index cf631d04ffd1ffbab5ad389a20239da3fa6acf4a..5f309d7e65a2c3bfbd62b9d61d5853fffba0a705 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_COOP_MUTEX_H__
 #define __MONO_COOP_MUTEX_H__
index 29937c5b73877e18c63ae2b49365bb6bf328de6f..2cb01f9572c3183002f8084d93416d535713c97f 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_COOP_SEMAPHORE_H__
 #define __MONO_COOP_SEMAPHORE_H__
index e8ceb3927fcb2518b352ba5fd6335a72e0cc3ae2..a7108623b82a0d4699c3dfcfbd369e7d11bf974c 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2006-2010 Novell
  * Copyright 2011 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -37,11 +38,11 @@ static void initialize_system_counters (void);
 
 /**
  * mono_counter_get_variance:
- * @counter: counter to get the variance
+ * \param counter counter to get the variance
  *
  * Variance specifies how the counter value is expected to behave between any two samplings.
  *
- * Returns: the monotonicity of the counter.
+ * \returns the monotonicity of the counter.
  */
 int
 mono_counter_get_variance (MonoCounter *counter)
@@ -51,11 +52,11 @@ mono_counter_get_variance (MonoCounter *counter)
 
 /**
  * mono_counter_get_unit:
- * @counter: counter to get the unit
+ * \param counter counter to get the unit
  *
  * The unit gives a high level view of the unit that the counter is measuring.
  *
- * Returns: the unit of the counter.
+ * \returns the unit of the counter.
  */
 int
 mono_counter_get_unit (MonoCounter *counter)
@@ -65,11 +66,9 @@ mono_counter_get_unit (MonoCounter *counter)
 
 /**
  * mono_counter_get_section:
- * @counter: counter to get the section
- *
+ * \param counter counter to get the section
  * Sections are the unit of organization between all counters.
- *
- * Returns: the section of the counter.
+ * \returns the section of the counter.
  */
 
 int
@@ -80,11 +79,8 @@ mono_counter_get_section (MonoCounter *counter)
 
 /**
  * mono_counter_get_type:
- * @counter: counter to get the type
- *
- * Returns the type used to strong the value of the counter.
- *
- * Returns:the type of the counter.
+ * \param counter counter to get the type
+ * \returns the type used to store the value of the counter.
  */
 int
 mono_counter_get_type (MonoCounter *counter)
@@ -94,11 +90,8 @@ mono_counter_get_type (MonoCounter *counter)
 
 /**
  * mono_counter_get_name:
- * @counter: counter to get the name
- *
- * Returns the counter name. The string should not be freed.
- *
- * Returns the name of the counter.
+ * \param counter counter to get the name
+ * \returns the counter name. The string should not be freed.
  */
 
 const char*
@@ -109,11 +102,9 @@ mono_counter_get_name (MonoCounter *counter)
 
 /**
  * mono_counter_get_size:
- * @counter: counter to get the max size of the counter
- *
- * Use the returned size to create the buffer used with mono_counters_sample
- *
- * Returns: the max size of the counter data.
+ * \param counter counter to get the max size of the counter
+ * Use the returned size to create the buffer used with \c mono_counters_sample
+ * \returns the max size of the counter data.
  */
 size_t
 mono_counter_get_size (MonoCounter *counter)
@@ -123,8 +114,7 @@ mono_counter_get_size (MonoCounter *counter)
 
 /**
  * mono_counters_enable:
- * @section_mask: a mask listing the sections that will be displayed
- *
+ * \param sectionmask a mask listing the sections that will be displayed
  * This is used to track which counters will be displayed.
  */
 void
@@ -197,19 +187,18 @@ register_internal (const char *name, int type, void *addr, int size)
 
 /**
  * mono_counters_register:
- * @name: The name for this counters.
- * @type: One of the possible MONO_COUNTER types, or MONO_COUNTER_CALLBACK for a function pointer.
- * @addr: The address to register.
+ * \param name The name for this counters.
+ * \param type One of the possible \c MONO_COUNTER types, or \c MONO_COUNTER_CALLBACK for a function pointer.
+ * \param addr The address to register.
  *
- * Register addr as the address of a counter of type type.
- * Note that @name must be a valid string at all times until
- * mono_counters_dump () is called.
+ * Register \p addr as the address of a counter of type type.
+ * Note that \p name must be a valid string at all times until
+ * \c mono_counters_dump() is called.
  *
  * This function should not be used with counter types that require an explicit size such as string
  * as the counter size will be set to zero making them effectively useless.
  *
- *
- * It may be a function pointer if MONO_COUNTER_CALLBACK is specified:
+ * It may be a function pointer if \c MONO_COUNTER_CALLBACK is specified:
  * the function should return the value and take no arguments.
  */
 void 
@@ -251,23 +240,23 @@ mono_counters_register (const char* name, int type, void *addr)
 
 /**
  * mono_counters_register_with_size:
- * @name: The name for this counters.
- * @type: One of the possible MONO_COUNTER types, or MONO_COUNTER_CALLBACK for a function pointer.
- * @addr: The address to register.
- * @size: Max size of the counter data.
+ * \param name The name for this counters.
+ * \param type One of the possible MONO_COUNTER types, or MONO_COUNTER_CALLBACK for a function pointer.
+ * \param addr The address to register.
+ * \param size Max size of the counter data.
  *
- * Register addr as the address of a counter of type @type.
- * Note that @name must be a valid string at all times until
- * mono_counters_dump () is called.
+ * Register \p addr as the address of a counter of type \p type.
+ * Note that \p name must be a valid string at all times until
+ * \c mono_counters_dump() is called.
  *
- * It may be a function pointer if MONO_COUNTER_CALLBACK is specified:
+ * It may be a function pointer if \c MONO_COUNTER_CALLBACK is specified:
  * the function should return the value and take no arguments.
  *
- * The value of @size is ignored for types with fixed size such as int and long.
+ * The value of \p size is ignored for types with fixed size such as int and long.
  *
- * Use @size for types that can have dynamic size such as string.
+ * Use \p size for types that can have dynamic size such as string.
  *
- * If @size is negative, it's silently converted to zero.
+ * If \p size is negative, it's silently converted to zero.
  */
 void
 mono_counters_register_with_size (const char *name, int type, void *addr, int size)
@@ -280,8 +269,7 @@ mono_counters_register_with_size (const char *name, int type, void *addr, int si
 
 /**
  * mono_counters_on_register
- * @callback : function to callback when a counter is registered
- *
+ * \param callback function to callback when a counter is registered
  * Add a callback that is going to be called when a counter is registered
  */
 void
@@ -428,12 +416,10 @@ initialize_system_counters (void)
 
 /**
  * mono_counters_foreach:
- * @cb: The callback that will be called for each counter.
- * @user_data: Value passed as second argument of the callback.
- *
- * Iterate over all counters and call @cb for each one of them. Stop iterating if
+ * \param cb The callback that will be called for each counter.
+ * \param user_data Value passed as second argument of the callback.
+ * Iterate over all counters and call \p cb for each one of them. Stop iterating if
  * the callback returns FALSE.
- *
  */
 void
 mono_counters_foreach (CountersEnumCallback cb, gpointer user_data)
@@ -593,12 +579,11 @@ mono_counters_dump_section (int section, int variance, FILE *outfile)
 
 /**
  * mono_counters_dump:
- * @section_mask: The sections to dump counters for
- * @outfile: a FILE to dump the results to
- *
+ * \param section_mask The sections to dump counters for
+ * \param outfile a FILE to dump the results to
  * Displays the counts of all the enabled counters registered. 
  * To filter by variance, you can OR one or more variance with the specific section you want.
- * Use MONO_COUNTER_SECTION_MASK to dump all categories of a specific variance.
+ * Use \c MONO_COUNTER_SECTION_MASK to dump all categories of a specific variance.
  */
 void
 mono_counters_dump (int section_mask, FILE *outfile)
@@ -667,9 +652,8 @@ static uintptr_t resource_limits [MONO_RESOURCE_COUNT * 2];
 
 /**
  * mono_runtime_resource_check_limit:
- * @resource_type: one of the #MonoResourceType enum values
- * @value: the current value of the resource usage
- *
+ * \param resource_type one of the \c MonoResourceType enum values
+ * \param value the current value of the resource usage
  * Check if a runtime resource limit has been reached. This function
  * is intended to be used by the runtime only.
  */
@@ -689,17 +673,15 @@ mono_runtime_resource_check_limit (int resource_type, uintptr_t value)
 
 /**
  * mono_runtime_resource_limit:
- * @resource_type: one of the #MonoResourceType enum values
- * @soft_limit: the soft limit value
- * @hard_limit: the hard limit value
- *
+ * \param resource_type one of the \c MonoResourceType enum values
+ * \param soft_limit the soft limit value
+ * \param hard_limit the hard limit value
  * This function sets the soft and hard limit for runtime resources. When the limit
  * is reached, a user-specified callback is called. The callback runs in a restricted
  * environment, in which the world coult be stopped, so it can't take locks, perform
  * allocations etc. The callback may be called multiple times once a limit has been reached
  * if action is not taken to decrease the resource use.
- *
- * Returns: 0 on error or a positive integer otherwise.
+ * \returns 0 on error or a positive integer otherwise.
  */
 int
 mono_runtime_resource_limit (int resource_type, uintptr_t soft_limit, uintptr_t hard_limit)
@@ -715,8 +697,7 @@ mono_runtime_resource_limit (int resource_type, uintptr_t soft_limit, uintptr_t
 
 /**
  * mono_runtime_resource_set_callback:
- * @callback: a function pointer
- * 
+ * \param callback a function pointer
  * Set the callback to be invoked when a resource limit is reached.
  * The callback will receive the resource type, the resource amount in resource-specific
  * units and a flag indicating whether the soft or hard limit was reached.
index 20be122e58288ccbd62cdcb25ab464080e9604d1..991a4d9bd0d8092c27e0ec9658141e686844ada0 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_COUNTERS_H__
 #define __MONO_COUNTERS_H__
 
index 5cef8ee741b7e7cd21248da3a0de37ab2dc9cf05..b32103a28bb402ebc00459ce5cf405a7f645fac2 100644 (file)
@@ -1,5 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/**
+ * \file
  * This code implements the MD5 message-digest algorithm.
  * The algorithm is due to Ron Rivest.  This code was
  * written by Colin Plumb in 1993, no copyright is claimed.
index 225706c547ac78f411d6a57bc554f8e29e7d5290..4e29328885f7087cf8fb0782a41a78d1c0d540d1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-dl.c: Interface to the dynamic linker
+/**
+ * \file
+ * Interface to the dynamic linker
  *
  * Author:
  *    Mono Team (http://www.mono-project.com)
index 6e4b81eaf791a12b6c2191d1a767a1bbb0d29957..0383ad1c9068e6fc6f4bfc3fad0d67622030b721 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_DL_FALLBACK_H__
 #define __MONO_UTILS_DL_FALLBACK_H__
 
index b48a1831d757df85fc1f2f9c1f6756f91cba9695..0ade0d5414931c3bab348ef107cff8d3416fd3e2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-dl.c: Interface to the dynamic linker
+/**
+ * \file
+ * Interface to the dynamic linker
  *
  * Author:
  *    Mono Team (http://www.mono-project.com)
index 5215418048825fbf9153149748a88b6f01656b69..3cd33a21de3539dafc2007e908988567e6d3b1b5 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_DL_WINDOWS_H__
 #define __MONO_UTILS_DL_WINDOWS_H__
 
index 36ade1f67e9299f3b8a5f07f9ae249033d337e87..e3e5ddf7b6ada4287adb6b5bcf1b3cc2018596ac 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-dl-windows-uwp.c: UWP dl support for Mono.
+/**
+ * \file
+ * UWP dl support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 32eaac799b6cae03ebef2cc16efd1584cb29cc09..ab26660fed439ce08d37c2b3e67c3b3d81b67423 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-dl.c: Interface to the dynamic linker
+/**
+ * \file
+ * Interface to the dynamic linker
  *
  * Author:
  *    Mono Team (http://www.mono-project.com)
index 6c0f582cf6d1ddc170d86bf4f6fb40374138525a..c605ce6e41e9dc31457c4e2b9598e95607e8c431 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-dl.c: Interface to the dynamic linker
+/**
+ * \file
+ * Interface to the dynamic linker
  *
  * Author:
  *    Mono Team (http://www.mono-project.com)
@@ -114,20 +115,19 @@ get_dl_name_from_libtool (const char *libtool_file)
 
 /**
  * mono_dl_open:
- * @name: name of file containing shared module
- * @flags: flags
- * @error_msg: pointer for error message on failure
+ * \param name name of file containing shared module
+ * \param flags flags
+ * \param error_msg pointer for error message on failure
  *
- * Load the given file @name as a shared library or dynamically loadable
- * module. @name can be NULL to indicate loading the currently executing
+ * Load the given file \p name as a shared library or dynamically loadable
+ * module. \p name can be NULL to indicate loading the currently executing
  * binary image.
- * @flags can have the MONO_DL_LOCAL bit set to avoid exporting symbols
- * from the module to the shared namespace. The MONO_DL_LAZY bit can be set
+ * \p flags can have the \c MONO_DL_LOCAL bit set to avoid exporting symbols
+ * from the module to the shared namespace. The \c MONO_DL_LAZY bit can be set
  * to lazily load the symbols instead of resolving everithing at load time.
- * @error_msg points to a string where an error message will be stored in
- * case of failure.   The error must be released with g_free.
- *
- * Returns: a MonoDl pointer on success, NULL on failure.
+ * \p error_msg points to a string where an error message will be stored in
+ * case of failure.   The error must be released with \c g_free.
+ * \returns a \c MonoDl pointer on success, NULL on failure.
  */
 MonoDl*
 mono_dl_open (const char *name, int flags, char **error_msg)
@@ -204,14 +204,12 @@ mono_dl_open (const char *name, int flags, char **error_msg)
 
 /**
  * mono_dl_symbol:
- * @module: a MonoDl pointer
- * @name: symbol name
- * @symbol: pointer for the result value
- *
- * Load the address of symbol @name from the given @module.
- * The address is stored in the pointer pointed to by @symbol.
- *
- * Returns: NULL on success, an error message on failure
+ * \param module a MonoDl pointer
+ * \param name symbol name
+ * \param symbol pointer for the result value
+ * Load the address of symbol \p name from the given \p module.
+ * The address is stored in the pointer pointed to by \p symbol.
+ * \returns NULL on success, an error message on failure
  */
 char*
 mono_dl_symbol (MonoDl *module, const char *name, void **symbol)
@@ -247,11 +245,9 @@ mono_dl_symbol (MonoDl *module, const char *name, void **symbol)
 
 /**
  * mono_dl_close:
- * @module: a MonoDl pointer
- *
+ * \param module a \c MonoDl pointer
  * Unload the given module and free the module memory.
- *
- * Returns: 0 on success.
+ * \returns \c 0 on success.
  */
 void
 mono_dl_close (MonoDl *module)
@@ -269,18 +265,17 @@ mono_dl_close (MonoDl *module)
 
 /**
  * mono_dl_build_path:
- * @directory: optional directory
- * @name: base name of the library
- * @iter: iterator token
- *
+ * \param directory optional directory
+ * \param name base name of the library
+ * \param iter iterator token
  * Given a directory name and the base name of a library, iterate
  * over the possible file names of the library, taking into account
  * the possible different suffixes and prefixes on the host platform.
  *
  * The returned file name must be freed by the caller.
- * @iter must point to a NULL pointer the first time the function is called
+ * \p iter must point to a NULL pointer the first time the function is called
  * and then passed unchanged to the following calls.
- * Returns: the filename or NULL at the end of the iteration
+ * \returns the filename or NULL at the end of the iteration
  */
 char*
 mono_dl_build_path (const char *directory, const char *name, void **iter)
index 1da98cb8e1d0f812e6a8624ce706b9741a88efeb..ac7747c8799f9f0f12b53613a2d9e45627d159fc 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_DL_H__
 #define __MONO_UTILS_DL_H__
 
index de78a84aa431f0e84026576401ba4acdac96e84d..1e535cca26fd6a469cc514ee0dec5071d5e549f9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-embed.c: Example code APIs to register a libraries using
+/**
+ * \file
+ * Example code APIs to register a libraries using
  * mono_dl_fallback_register.  Real implementations should instead
  * use a binary search for implementing the dl_mapping_open and
  * dl_mapping_symbol methods here.
@@ -56,15 +57,15 @@ dl_mapping_symbol (void *handle, const char *symbol, char **err, void *user_data
 
 /**
  * mono_dl_register_library:
-u * @name: Library name, this is the name used by the DllImport as the external library name
- * @mappings: the mappings to register for P/Invoke.
+ * \param name Library name, this is the name used by the DllImport as the external library name
+ * \param mappings the mappings to register for P/Invoke.
  *
  * The mappings registered using this function are used as fallbacks if the dynamic linker 
  * fails, or if the platform doesn't have a dynamic linker.
  *
- * Mappings is a pointer to the first element of an array of
- * MonoDlMapping values.  The list must be terminated with both 
- * the name and addr fields set to NULL.
+ * \p mappings is a pointer to the first element of an array of
+ * \c MonoDlMapping values.  The list must be terminated with both 
+ * the \c name and \c addr fields set to NULL.
  *
  * This is typically used like this:
  * MonoDlMapping sample_library_mappings [] = {
index 78453e81ad0c1e12e11e325b87c9b3522146323e..7e145c82d654ba666d777d4270fa69dab6f005cf 100755 (executable)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_EMBED_H__
 #define __MONO_EMBED_H__
 
index c74923c00944b34d83aa5c2da0cc4a2fa19931d4..145aebfebd30c4b39225502e9c1980c61c9e16a9 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_ERROR_INTERNALS_H__
 #define __MONO_ERROR_INTERNALS_H__
 
index 2afe7fae2dee3bd5a00dce04e9399eeefee96668..2f83c8357d5281cba7d9699683d10907425241d0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-error.c: Error handling code
+/**
+ * \file
+ * Error handling code
  *
  * Authors:
  *     Rodrigo Kumpera    (rkumpera@novell.com)
@@ -101,10 +102,9 @@ mono_error_init_flags (MonoError *oerror, unsigned short flags)
 
 /**
  * mono_error_init:
- * @error: Pointer to MonoError struct to initialize
- *
- * Any function which takes a MonoError for purposes of reporting an error
- * is required to call either this or mono_error_init_flags on entry.
+ * \param error Pointer to \c MonoError struct to initialize
+ * Any function which takes a \c MonoError for purposes of reporting an error
+ * is required to call either this or \c mono_error_init_flags on entry.
  */
 void
 mono_error_init (MonoError *error)
@@ -785,14 +785,12 @@ mono_error_move (MonoError *dest, MonoError *src)
 
 /**
  * mono_error_box:
- * @ierror: The input error that will be boxed.
- * @image: The mempool of this image will hold the boxed error.
- *
- * Creates a new boxed error in the given mempool from MonoError.
- * It does not alter ierror, so you still have to clean it up with
- * mono_error_cleanup or mono_error_convert_to_exception or another such function.
- *
- * Returns the boxed error, or NULL if the mempool could not allocate.
+ * \param ierror The input error that will be boxed.
+ * \param image The mempool of this image will hold the boxed error.
+ * Creates a new boxed error in the given mempool from \c MonoError.
+ * It does not alter \p ierror, so you still have to clean it up with
+ * \c mono_error_cleanup or \c mono_error_convert_to_exception or another such function.
+ * \returns the boxed error, or NULL if the mempool could not allocate.
  */
 MonoErrorBoxed*
 mono_error_box (const MonoError *ierror, MonoImage *image)
@@ -833,16 +831,14 @@ mono_error_box (const MonoError *ierror, MonoImage *image)
 
 /**
  * mono_error_set_from_boxed:
- * @oerror: The error that will be set to the contents of the box.
- * @box: A mempool-allocated error.
- *
+ * \param oerror The error that will be set to the contents of the box.
+ * \param box A mempool-allocated error.
  * Sets the error condition in the oerror from the contents of the
  * given boxed error.  Does not alter the boxed error, so it can be
- * used in a future call to mono_error_set_from_boxed as needed.  The
- * oerror should've been previously initialized with mono_error_init,
+ * used in a future call to \c mono_error_set_from_boxed as needed.  The
+ * \p oerror should've been previously initialized with \c mono_error_init,
  * as usual.
- *
- * Returns TRUE on success or FALSE on failure.
+ * \returns TRUE on success or FALSE on failure.
  */
 gboolean
 mono_error_set_from_boxed (MonoError *oerror, const MonoErrorBoxed *box)
index 88f986c509492da698af9bab26a91a6628e2d889..30c4493e5197653fc487abc5b17a14d04ee182b8 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_ERROR_H__
 #define __MONO_ERROR_H__
 
index cd93eaff39fc9aacdee597c3a2d69c2c5b9fded6..416ca2625d37be2696b07494c1a444e11fbd17a6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-filemap.c: Unix/Windows implementation for filemap.
+/**
+ * \file
+ * Unix/Windows implementation for filemap.
  *
  * Author:
  *   Paolo Molaro (lupus@ximian.com)
index e51387776b93ed25d0c69b83d1abdd1d77d9b7f9..4ab9cd7b05ecb8898fe3738ac3e21cf940e13049 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-arm.c: ARM hardware feature detection
+/**
+ * \file
+ * ARM hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index f541ea3df2bebc78f42295ad212f739f63f1982f..f5cddcf25dc114a826754a0dd265640cf4375065 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-arm64.c: ARM64 hardware feature detection
+/**
+ * \file
+ * ARM64 hardware feature detection
  *
  * Copyright 2013 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 4311a99a18dba09ebb761e80f834fc03575a1c5f..898b5c13843161162585567fa4022cf6d07cb4f6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-cross.c: No-op hardware feature detection
+/**
+ * \file
+ * No-op hardware feature detection
  *
  * Author:
  *  Alex Rønne Petersen (alexrp@xamarin.com)
index dd1edbd8d40dcb6d79e62325a157d585845ddd6c..968c9fb2d4f04f2b21fc614788534314abf64656 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-ia64.c: Itanium hardware feature detection
+/**
+ * \file
+ * Itanium hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index 119f930a685a4d0915736d14f4d623b4291deca8..d5dbee1cca81a4ac3c1ebec958aebf29e227613d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-mips.c: MIPS hardware feature detection
+/**
+ * \file
+ * MIPS hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index af36c4d5473191c740746c83b47b726e4ddc0524..c004bfe6b3310a2ce47f7e084d3239e625c6b978 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-ppc.c: PowerPC hardware feature detection
+/**
+ * \file
+ * PowerPC hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index 93bd236ba75fb463a0dd5c3128b1edff59006f09..12df49b91ba84fbad94d2c64b25c9d71afdb9d3e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-s390x.c: S/390x hardware feature detection
+/**
+ * \file
+ * S/390x hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index 75208bdeff7bc02996f188a00eeaed769007d138..6775a39668fc988fa031f3f4c1187eaa3ad26541 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-sparc.c: SPARC hardware feature detection
+/**
+ * \file
+ * SPARC hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index 98bcf8e064e1ec65ceb100aa1b819f988eb353a4..bca3c45345c01a79cf59593575e569c7892026a0 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_HWCAP_SPARC_H__
 #define __MONO_UTILS_HWCAP_SPARC_H__
 
index 620a3d43e421637d991502d3fd8a8b0c92bb1ccb..a54db439d3dad599149396bc086a7e3c0817dae4 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include "config.h"
 
 #if defined (TARGET_ARM)
index 5d72a4c7e2030260e74b82369ffc82db450636f4..7a4b859a8e4442e4f491fcde3b9c05aa71faaed8 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap-x86.c: x86 hardware feature detection
+/**
+ * \file
+ * x86 hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index 158db963ed0364f0cd7c26cbd201df407724b867..c0e68ee034fffc8368b0ce06660a2f9ae4eadcd6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-hwcap.c: Hardware feature detection
+/**
+ * \file
+ * Hardware feature detection
  *
  * Authors:
  *    Alex Rønne Petersen (alexrp@xamarin.com)
index 1867d3d258a62bbb0c0e4d8b820892a691781586..49bb56ba493034c1cac52bfbd5a023e722388700 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_HWCAP_H__
 #define __MONO_UTILS_HWCAP_H__
 
index 10ee6de5d5904459a8356e41caaf6caf0ccae971..93bc0c8b6eb833d6c2e89dc3db2ac7e7dc7c2d5b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-internal-hash.c: A hash table which uses the values themselves as nodes.
+/**
+ * \file
+ * A hash table which uses the values themselves as nodes.
  *
  * Author:
  *   Mark Probst (mark.probst@gmail.com)
index aa8d149724728dd8eac5d52726a3f8a838e7d0e6..65fac641a536a9bcbf38b4a0c70902904b40b5fb 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-internal-hash.h: A hash table which uses the values themselves as nodes.
+/**
+ * \file
+ * A hash table which uses the values themselves as nodes.
  *
  * Author:
  *   Mark Probst (mark.probst@gmail.com)
index c17e5d7203dd00a26b662c3a06731b51246f9fe6..b164b6b56db21e607b97501f5855bc9b79660bdf 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include "config.h"
 
 #include <string.h>
index 4451aa2e30cb79c9afee0eca055ff1508d76b4ed..220b4fa69b1272739651504ae8122b02eb35d506 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_IO_PORTABILITY_H
 #define __MONO_IO_PORTABILITY_H
 
index 046ef46d6b181684b2d86affafbff3d9ce4b1f46..4007d9c4d67395a0f2073949d92ffa456a96936c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-lazy-init.h: Lazy initialization and cleanup utilities
+/**
+ * \file
+ * Lazy initialization and cleanup utilities
  *
  * Authors: Ludovic Henry <ludovic@xamarin.com>
  *
index ea11fcc634bbc948e11af5338c56f1304cdc6f31..ee56addd11cbb2f263009be13666ac2f8a5ab4fa 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-split-ordered-list.c: A lock-free split ordered list.
+/**
+ * \file
+ * A lock-free split ordered list.
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index ee4d77799ec50d1d54573851d4c20994899a21de..bb25cb1c18e83055981fb35d944af508d2705e91 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-linked-list-set.h: A lock-free split ordered list.
+/**
+ * \file
+ * A lock-free split ordered list.
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index fde2fd0c6b897852b55571a3a8bfff0c7fa0c680..1072788a6f5165885bbb8d15ec265449325cbbde 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-log-android.c: Android-specific interface to the logger
+/**
+ * \file
+ * Android-specific interface to the logger
  *
  * This module contains the Android logcat logger interface
  *
 #include "mono-logger-internals.h"
 
 /**
- * mono_log_open_logcat
- *
- *     Open access to Android logcat (no-op)
- *
- *     @path - Not used
- *     @userData - Not used
+ * mono_log_open_logcat:
+ * \param path Unused
+ * \param userData Unused
+ * Open access to Android logcat (no-op)
  */   
 void
 mono_log_open_logcat (const char *path, void *userData)
@@ -29,14 +28,12 @@ mono_log_open_logcat (const char *path, void *userData)
 }
 
 /**
- * mono_log_write_logcat
- *
- *     Write data to Android logcat.
- *
- *     @domain - Identifier string
- *     @level - Logging level flags
- *     @format - Printf format string
- *     @vargs - Variable argument list
+ * mono_log_write_logcat:
+ * \param domain Identifier string
+ * \param level Logging level flags
+ * \param format \c printf format string
+ * \param vargs Variable argument list
+ * Write data to Android logcat.
  */
 void
 mono_log_write_logcat (const char *log_domain, GLogLevelFlags level, mono_bool hdr, const char *message)
index bdb6dffb50e27f1838959452b585907afa062bbf..6590cb54bdcae62b31fe2cb216c6f94ab3a24687 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-log-common.c: Platform-independent interface to the logger
+/**
+ * \file
+ * Platform-independent interface to the logger
  *
  * This module contains the POSIX syslog logger interface
  *
@@ -56,13 +57,11 @@ mapLogFileLevel(GLogLevelFlags level)
 }
 
 /**
- * mono_log_open_logfile
- *     
- *     Open the logfile. If the path is not specified default to stdout. If the
- *     open fails issue a warning and use stdout as the log file destination.
- *
- *     @path - Path for log file
- *     @userData - Not used
+ * mono_log_open_logfile:
+ * \param path Path for log file
+ * \param userData Not used
+ * Open the logfile. If the path is not specified default to stdout. If the
+ * open fails issue a warning and use stdout as the log file destination.
  */
 void
 mono_log_open_logfile(const char *path, void *userData)
@@ -89,14 +88,12 @@ mono_log_open_logfile(const char *path, void *userData)
 }
 
 /**
- * mono_log_write_logfile
- *     
- *     Write data to the log file.
- *
- *     @domain - Identifier string
- *     @level - Logging level flags
- *     @format - Printf format string
- *     @vargs - Variable argument list
+ * mono_log_write_logfile:
+ * \param domain Identifier string
+ * \param level Logging level flags
+ * \param format \c printf format string
+ * \param vargs Variable argument list
+ * Write data to the log file.
  */
 void
 mono_log_write_logfile (const char *log_domain, GLogLevelFlags level, mono_bool hdr, const char *message)
@@ -138,9 +135,8 @@ mono_log_write_logfile (const char *log_domain, GLogLevelFlags level, mono_bool
 }
 
 /**
- * mono_log_close_logfile
- *
- *     Close the log file
+ * mono_log_close_logfile:
+ * Close the log file
  */
 void
 mono_log_close_logfile()
index 12142913e4d0478e1a2c97db0cb91e2672b1e9d3..f5f03bb4bf4bc50c5cfeef9e564512f8029bf57e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-log-darwin.c: Darwin-specific interface to the logger
+/**
+ * \file
+ * Darwin-specific interface to the logger
  *
  */
 #include <config.h>
index 6d25d3a6117b7cc4237bc10c8c6ef9e1e67cec3d..a7968265ac6eaa3677225eadf33538668dbcbf64 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-log-posix.c: POSIX interface to the logger
+/**
+ * \file
+ * POSIX interface to the logger
  *
  * This module contains the POSIX syslog logger routines
  *
@@ -54,13 +55,11 @@ mapSyslogLevel(GLogLevelFlags level)
 }
 
 /**
- * mono_log_open_logfile
- *     
- *     Open the syslog interface specifying that we want our PID recorded 
- *     and that we're using the LOG_USER facility.
- *
- *     @ident - Identifier: ignored
- *     @userData - Not used
+ * mono_log_open_syslog:
+ * \param ident Identifier: ignored
+ * \param userData Not used
+ * Open the syslog interface specifying that we want our PID recorded 
+ * and that we're using the \c LOG_USER facility.
  */
 void
 mono_log_open_syslog(const char *ident, void *userData)
@@ -70,14 +69,12 @@ mono_log_open_syslog(const char *ident, void *userData)
 }
 
 /**
- * mono_log_write_syslog
- *     
- *     Write data to the log file.
- *
- *     @domain - Identifier string
- *     @level - Logging level flags
- *     @format - Printf format string
- *     @vargs - Variable argument list
+ * mono_log_write_syslog:
+ * \param domain Identifier string
+ * \param level Logging level flags
+ * \param format \c printf format string
+ * \param vargs Variable argument list
+ * Write data to the log file.
  */
 void
 mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, const char *message)
@@ -89,9 +86,8 @@ mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, c
 }
 
 /**
- * mono_log_close_logfile
- *
- *     Close the log file
+ * mono_log_close_syslog:
+ * Close the log file
  */
 void
 mono_log_close_syslog()
index ab5db470e1941f75bd2e712d119f979ffa6ff602..a39360398bc8de726ff9fd853f924e105f69802e 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-log-windows.c: Simplistic simulation of a syslog logger for Windows
+/**
+ * \file
+ * Simplistic simulation of a syslog logger for Windows
  *
  * This module contains the Windows syslog logger interface
  *
@@ -55,13 +56,11 @@ mapLogFileLevel(GLogLevelFlags level)
 }
 
 /**
- * mono_log_open_syslog
- *     
- *     Open the syslog file. If the open fails issue a warning and 
- *     use stdout as the log file destination.
- *
- *     @ident - Identifier: ignored
- *     @userData - Not used
+ * mono_log_open_syslog:
+ * \param ident Identifier: ignored
+ * \param userData Not used
+ * Open the syslog file. If the open fails issue a warning and 
+ * use stdout as the log file destination.
  */
 void
 mono_log_open_syslog(const char *ident, void *userData)
@@ -77,13 +76,11 @@ mono_log_open_syslog(const char *ident, void *userData)
 
 /**
  * mono_log_write_syslog
- *     
- *     Write data to the syslog file.
- *
- *     @domain - Identifier string
- *     @level - Logging level flags
- *     @format - Printf format string
- *     @vargs - Variable argument list
+ * \param domain Identifier string
+ * \param level Logging level flags
+ * \param format \c printf format string
+ * \param vargs Variable argument list
+ * Write data to the syslog file.
  */
 void
 mono_log_write_syslog(const char *domain, GLogLevelFlags level, mono_bool hdr, const char *message)
index d1e2599c30dd1e489a3cf8ff2884e09241d2b62f..0933903e747c4d88e8a0cd380a81703a3f16a47d 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_LOGGER_INTERNAL_H__
 #define __MONO_LOGGER_INTERNAL_H__
 
index 3228d6058f10e7fd8524c9eaf869d7bdc949fcdc..aeaa3f97ceefab0bc79fe685d042ade9a91d5368 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -80,11 +84,9 @@ mono_trace_cleanup (void)
 }
 
 /**
- * mono_tracev:
- *
- *     @level: Verbose level of the specified message
- *     @mask: Type of the specified message
- *
+ * mono_tracev_inner:
+ * \param level Verbose level of the specified message
+ * \param mask Type of the specified message
  * Traces a new message, depending on the current logging level
  * and trace mask.
  */
@@ -108,11 +110,9 @@ mono_tracev_inner (GLogLevelFlags level, MonoTraceMask mask, const char *format,
 
 /**
  * mono_trace_set_level:
- *
- *     @level: Verbose level to set
- *
+ * \param level Verbose level to set
  * Sets the current logging level. Every subsequent call to
- * mono_trace will check the visibility of a message against this
+ * \c mono_trace will check the visibility of a message against this
  * value.
  */
 void 
@@ -126,11 +126,9 @@ mono_trace_set_level (GLogLevelFlags level)
 
 /**
  * mono_trace_set_mask:
- *
- *     @mask: Mask of visible message types.
- *
+ * \param mask Mask of visible message types.
  * Sets the current logging level. Every subsequent call to
- * mono_trace will check the visibility of a message against this
+ * \c mono_trace will check the visibility of a message against this
  * value.
  */
 void 
@@ -144,9 +142,7 @@ mono_trace_set_mask (MonoTraceMask mask)
 
 /**
  * mono_trace_set_logdest:
- *
- *     @dest: Destination for logging
- *
+ * \param dest Destination for logging
  * Sets the current logging destination. This can be a file or, if supported,
  * syslog.
  */
@@ -186,9 +182,7 @@ mono_trace_set_logdest_string (const char *dest)
 
 /**
  * mono_trace_set_logheader:
- *
- *     @head: Whether we want pid/date/time header on log messages
- *
+ * \param head Whether we want pid/date/time header on log messages
  * Sets the current logging header option.
  */
 void 
@@ -203,11 +197,9 @@ mono_trace_set_logheader_string(const char *head)
 
 /**
  * mono_trace_push:
- *
- *     @level: Verbose level to set
- *     @mask: Mask of visible message types.
- *
- * Saves the current values of level and mask then calls mono_trace_set
+ * \param level Verbose level to set
+ * \param mask Mask of visible message types.
+ * Saves the current values of level and mask then calls \c mono_trace_set
  * with the specified new values.
  */
 void 
@@ -442,10 +434,8 @@ structured_log_adapter (const gchar *log_domain, GLogLevelFlags log_level, const
 
 /**
  * mono_trace_set_log_handler_internal:
- *
- *  @callback The callback that will replace the default logging handler
- *  @user_data Argument passed to @callback
- *
+ * \param callback The callback that will replace the default logging handler
+ * \param user_data Argument passed to \p 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.
@@ -480,11 +470,8 @@ printerr_handler (const char *string)
 
 /**
  * mono_trace_set_print_handler:
- *
- * @callback The callback that will replace the default runtime behavior for stdout output.
- *
+ * \param 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)
@@ -496,11 +483,8 @@ mono_trace_set_print_handler (MonoPrintCallback callback)
 
 /**
  * mono_trace_set_printerr_handler:
- *
- * @callback The callback that will replace the default runtime behavior for stderr output.
- *
+ * \param 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)
index 5f0943d5e1d698981354c2c86604edda6255d204..a90e6c54cf365c5aa90b0484019b5e42356281e3 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_LOGGER_H__
 #define __MONO_LOGGER_H__
 
index fce4e6c2ba693a5340fd455b89ac868208515f52..5e546a9201c6ef3286470b9b83499e35bd7cedd5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-machine.h: machine definitions
+/**
+ * \file
+ * machine definitions
  *
  * Authors:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index f75064ba3c17b6fc02bb5a0a958bdd1d835404b0..7672b0cca9b2bd0daeee62160a8425a33fed6c78 100644 (file)
@@ -1,8 +1,14 @@
+/**
+ * \file
+ */
 
 #include "mono-math.h"
 
 #ifndef HAVE_SIGNBIT
 
+/**
+ * mono_signbit_float:
+ */
 int
 mono_signbit_float (float x)
 {
@@ -13,6 +19,9 @@ mono_signbit_float (float x)
        return u.i < 0;
 }
 
+/**
+ * mono_signbit_double:
+ */
 int
 mono_signbit_double (double x)
 {
index 46499c2a25a9e3a6081cab3928d040e32da2c34f..438964ba64d8dc62b01b64559eda22ea23be6f67 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_SIGNBIT_H__
 #define __MONO_SIGNBIT_H__
index 5ded45eb9db3d8f4b8d17316df2b83573ea237fc..e353c84256aa0fff865ed77ba9b94510c531e45a 100644 (file)
@@ -1,5 +1,6 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/**
+ * \file
  * This code implements the MD5 message-digest algorithm.
  * The algorithm is due to Ron Rivest.  This code was
  * written by Colin Plumb in 1993, no copyright is claimed.
 
 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H
 
+/**
+ * mono_md5_init:
+ */
 void
 mono_md5_init (MonoMD5Context *ctx)
 {
        CC_MD5_Init (ctx);
 }
 
+/**
+ * mono_md5_update:
+ */
 void
 mono_md5_update (MonoMD5Context *ctx, const guchar *buf, guint32 len)
 {
        CC_MD5_Update (ctx, buf, len);
 }
 
+/**
+ * mono_md5_final:
+ */
 void
 mono_md5_final (MonoMD5Context *ctx, guchar digest[16])
 {
@@ -321,14 +331,14 @@ md5_transform (guint32 buf[4], const guint32 in[16])
 
 
 /**
- * mono_md5_get_digest: get the md5 hash of a buffer
- * @buffer: byte buffer
- * @buffer_size: buffer size (in bytes)
- * @digest: 16 bytes buffer receiving the hash code.
+ * mono_md5_get_digest:
+ * \param buffer byte buffer
+ * \param buffer_size buffer size (in bytes)
+ * \param digest 16-byte buffer receiving the hash code.
  * 
- * Get the md5 hash of a buffer. The result is put in 
- * the 16 bytes buffer @digest .
- **/
+ * Get the MD5 hash of a buffer. The result is put in 
+ * the 16-byte buffer \p digest.
+ */
 void
 mono_md5_get_digest (const guchar *buffer, gint buffer_size, guchar digest[16])
 {      
@@ -342,15 +352,15 @@ mono_md5_get_digest (const guchar *buffer, gint buffer_size, guchar digest[16])
 
 
 /**
- * mono_md5_get_digest_from_file: get the md5 hash of a file
- * @filename: file name
- * @digest: 16 bytes buffer receiving the hash code.
+ * mono_md5_get_digest_from_file:
+ * \param filename file name
+ * \param digest 16-byte buffer receiving the hash code.
  * 
- * Get the md5 hash of a file. The result is put in 
- * the 16 bytes buffer @digest .
+ * Get the MD5 hash of a file. The result is put in 
+ * the 16-byte buffer \p digest.
  * 
- * If an IO error happens the value in @digest is not updated.
- **/
+ * If an IO error happens the value in \p digest is not updated.
+ */
 void
 mono_md5_get_digest_from_file (const gchar *filename, guchar digest[16])
 {      
index b59ffff85f93b28573c3089420381f8eeef6b484..3f937b3b43164c6f8a97015bcff49fc6632324b3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-membar.h: Memory barrier inline functions
+/**
+ * \file
+ * Memory barrier inline functions
  *
  * Author:
  *     Mark Probst (mark.probst@gmail.com)
index fbb87cff574175996469db0a1ac3b10586a4fcef..ce0130793a24257f765638140f12f86c084664d5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-memory-model.h: Mapping of the arch memory model.
+/**
+ * \file
+ * Mapping of the arch memory model.
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 90695609f0875b608f7c6ad3069b970459e4e86c..8fa286337f5544deb33bff98616953fae9e34772 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-mmap-internals.h: Internal virtual memory stuff.
+/**
+ * \file
+ * Internal virtual memory stuff.
  *
  * Copyright (C) 2014 Xamarin Inc
  *
index 44da254692b27d9c0af259cebef9e2a3c5086093..3076a51c61eddf2886cd584bb781a1d812d10944 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_MMAP_WINDOWS_H__
 #define __MONO_UTILS_MMAP_WINDOWS_H__
 
index 347fb70e89fa38d99faff71fc181b02ef8f633d4..32de747b7f238861b5b8ba2c98c5098b48aaf95f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-dl-windows-uwp.c: UWP dl support for Mono.
+/**
+ * \file
+ * UWP dl support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 69619f8acb9440148ca1ff6663b1d985f1ac89c5..0f482d1a0901c788884b85b77f29bbbc935dc16d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-mmap-windows.c: Windows support for mapping code into the process address space
+/**
+ * \file
+ * Windows support for mapping code into the process address space
  *
  * Author:
  *   Mono Team (mono-list@lists.ximian.com)
index e2868f62de12e7eca24533ad4e500ec41037f710..62266d34d25eac954dd6aa1c5ccf6cf551c7b0c2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-mmap.c: Support for mapping code into the process address space
+/**
+ * \file
+ * Support for mapping code into the process address space
  *
  * Author:
  *   Mono Team (mono-list@lists.ximian.com)
@@ -177,17 +178,15 @@ prot_from_flags (int flags)
 
 /**
  * mono_valloc:
- * @addr: memory address
- * @length: memory area size
- * @flags: protection flags
- *
- * Allocates @length bytes of virtual memory with the @flags
- * protection. @addr can be a preferred memory address or a
- * mandatory one if MONO_MMAP_FIXED is set in @flags.
- * @addr must be pagesize aligned and can be NULL.
- * @length must be a multiple of pagesize.
- *
- * Returns: NULL on failure, the address of the memory area otherwise
+ * \param addr memory address
+ * \param length memory area size
+ * \param flags protection flags
+ * Allocates \p length bytes of virtual memory with the \p flags
+ * protection. \p addr can be a preferred memory address or a
+ * mandatory one if MONO_MMAP_FIXED is set in \p flags.
+ * \p addr must be pagesize aligned and can be NULL.
+ * \p length must be a multiple of pagesize.
+ * \returns NULL on failure, the address of the memory area otherwise
  */
 void*
 mono_valloc (void *addr, size_t length, int flags, MonoMemAccountType type)
@@ -225,12 +224,10 @@ mono_valloc (void *addr, size_t length, int flags, MonoMemAccountType type)
 
 /**
  * mono_vfree:
- * @addr: memory address returned by mono_valloc ()
- * @length: size of memory area
- *
- * Remove the memory mapping at the address @addr.
- *
- * Returns: 0 on success.
+ * \param addr memory address returned by mono_valloc ()
+ * \param length size of memory area
+ * Remove the memory mapping at the address \p addr.
+ * \returns \c 0 on success.
  */
 int
 mono_vfree (void *addr, size_t length, MonoMemAccountType type)
@@ -247,19 +244,17 @@ mono_vfree (void *addr, size_t length, MonoMemAccountType type)
 
 /**
  * mono_file_map:
- * @length: size of data to map
- * @flags: protection flags
- * @fd: file descriptor
- * @offset: offset in the file
- * @ret_handle: pointer to storage for returning a handle for the map
- *
- * Map the area of the file pointed to by the file descriptor @fd, at offset
- * @offset and of size @length in memory according to the protection flags
- * @flags.
- * @offset and @length must be multiples of the page size.
- * @ret_handle must point to a void*: this value must be used when unmapping
- * the memory area using mono_file_unmap ().
- *
+ * \param length size of data to map
+ * \param flags protection flags
+ * \param fd file descriptor
+ * \param offset offset in the file
+ * \param ret_handle pointer to storage for returning a handle for the map
+ * Map the area of the file pointed to by the file descriptor \p fd, at offset
+ * \p offset and of size \p length in memory according to the protection flags
+ * \p flags.
+ * \p offset and \p length must be multiples of the page size.
+ * \p ret_handle must point to a void*: this value must be used when unmapping
+ * the memory area using \c mono_file_unmap().
  */
 void*
 mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_handle)
@@ -288,13 +283,11 @@ mono_file_map (size_t length, int flags, int fd, guint64 offset, void **ret_hand
 
 /**
  * mono_file_unmap:
- * @addr: memory address returned by mono_file_map ()
- * @handle: handle of memory map
- *
- * Remove the memory mapping at the address @addr.
- * @handle must be the value returned in ret_handle by mono_file_map ().
- *
- * Returns: 0 on success.
+ * \param addr memory address returned by mono_file_map ()
+ * \param handle handle of memory map
+ * Remove the memory mapping at the address \p addr.
+ * \p handle must be the value returned in ret_handle by \c mono_file_map().
+ * \returns \c 0 on success.
  */
 int
 mono_file_unmap (void *addr, void *handle)
@@ -310,18 +303,16 @@ mono_file_unmap (void *addr, void *handle)
 
 /**
  * mono_mprotect:
- * @addr: memory address
- * @length: size of memory area
- * @flags: new protection flags
- *
- * Change the protection for the memory area at @addr for @length bytes
- * to matche the supplied @flags.
- * If @flags includes MON_MMAP_DISCARD the pages are discarded from memory
+ * \param addr memory address
+ * \param length size of memory area
+ * \param flags new protection flags
+ * Change the protection for the memory area at \p addr for \p length bytes
+ * to matche the supplied \p flags.
+ * If \p flags includes MON_MMAP_DISCARD the pages are discarded from memory
  * and the area is cleared to zero.
- * @addr must be aligned to the page size.
- * @length must be a multiple of the page size.
- *
- * Returns: 0 on success.
+ * \p addr must be aligned to the page size.
+ * \p length must be a multiple of the page size.
+ * \returns \c 0 on success.
  */
 #if defined(__native_client__)
 int
index 1b3b1d63af9fae39922ffe6aaceb51b3266bf3e6..72cf853389ac73e74cffc12ac35f8487ec354420 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_MMAP_H__
 #define __MONO_UTILS_MMAP_H__
 
index fc5bcc966a7105f964abe575254493d9498aa50b..f86bd651ee74be0b7507e7743a6bf4e1873a70ac 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include "config.h"
 #include "utils/mono-networkinterfaces.h"
 
@@ -9,10 +13,9 @@
 
 /**
  * mono_networkinterface_list:
- * @size: a pointer to a location where the size of the returned array is stored
- *
- * Return an array of names for the interfaces currently on the system.
- * The size of the array is stored in @size.
+ * \param size a pointer to a location where the size of the returned array is stored
+ * \returns an array of names for the interfaces currently on the system.
+ * The size of the array is stored in \p size.
  */
 gpointer*
 mono_networkinterface_list (int *size)
@@ -63,11 +66,10 @@ mono_networkinterface_list (int *size)
 
 /**
  * mono_network_get_data:
- * @name: name of the interface
- * @data: description of data to return
- *
- * Return a data item of a network adapter like bytes sent per sec, etc
- * according to the @data argumet.
+ * \param name name of the interface
+ * \param data description of data to return
+ * \return a data item of a network adapter like bytes sent per sec, etc
+ * according to the \p data argumet.
  */
 gint64
 mono_network_get_data (char* name, MonoNetworkData data, MonoNetworkError *error)
index 766a4befad284270fa93cc0c415ee61e32c9d182..b2765a49d1b89df41feb5e9267021fc8333d45a8 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_NETWORK_INTERFACES_H__
 #define __MONO_NETWORK_INTERFACES_H__
 /*
index 0021ac3f9bad0f08272cb4bf30eaaeb5f86bc488..754ae7dd6cc75e475fc6c5aee682f271dc84c6e9 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_ONCE_H__
 #define __MONO_ONCE_H__
index 7edd2041a3d4a954441b3bfbb677f122e73c5800..86b6926dc3ec8de59f36cce2b10901114cd4ef19 100644 (file)
@@ -1,6 +1,7 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * mono-os-mutex.h: Portability wrappers around POSIX Mutexes
+/**
+ * \file
+ * Portability wrappers around POSIX Mutexes
  *
  * Authors: Jeffrey Stedfast <fejj@ximian.com>
  *
index 42d19c403ba179c5b4f51bb498c10bb0e52757f4..f766529201e3426bf1349b2f3020ad39d9a54932 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-os-semaphore.h:  Definitions for generic semaphore usage
+/**
+ * \file
+ * Definitions for generic semaphore usage
  *
  * Author:
  *     Geoff Norton  <gnorton@novell.com>
index f87c9f39bb3ea0764d1493166e5d9598d75a11ee..e93eb7e53f0192a0249eae1d06a0ce1cf39a03fa 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-path.c: Routines for handling path names.
+/**
+ * \file
+ * Routines for handling path names.
  * 
  * Authors:
  *     Gonzalo Paniagua Javier (gonzalo@novell.com)
index 1ce57b07c6fb6cc44b169896730c5850ece3f6c4..75b9c3c5124689a031428cfbd85a75790a0be9bf 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_PATH_H
 #define __MONO_PATH_H
 
index d81b4eb9168f050626d4afd5ab31628fd5d061fa..f759b68b4b2ab98387f5470b1f11f17cec454798 100755 (executable)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 
 #ifdef HOST_WIN32
index bedef4c8863d07e38382bc92b52feb5a87392bf0..e44f923fbafe5d53881cd4f67d5ba73e37411daa 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef MONO_POLL_H
 #define MONO_POLL_H
 
index f14c7a402b614fc5f491d1e47141caa1150d717a..b340170a76de2917d4b516bc3937b5399960f624 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_UTILS_PROCLIB_WINDOWS_H__
 #define __MONO_UTILS_PROCLIB_WINDOWS_H__
 
index 4a2f37dabf9318acc744729cf437a727d722ddef..15a7cb2eca74fdb9648529fd4733a24bcff8405d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-proclib-windows-uwp.c: UWP proclib support for Mono.
+/**
+ * \file
+ * UWP proclib support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 6386a510d568510321f409ef0e9c86b976701b5f..9e3f1c9585f5f0dc3e6ffd9dbb8bd91b25c84985 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-proclib-windows.c: Windows proclib support for Mono.
+/**
+ * \file
+ * Windows proclib support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -20,8 +21,7 @@ mono_process_current_pid ()
 
 /**
  * mono_cpu_count:
- *
- * Return the number of processors on the system.
+ * \returns the number of processors on the system.
  */
 int
 mono_cpu_count (void)
index 5f6d145b6da32fc12c5257199e36708056beac30..f733896a6d73ae9a4997347724b5790488230aa4 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2008-2011 Novell Inc
  * Copyright 2011 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -82,10 +83,9 @@ CPU_COUNT(cpu_set_t *set)
 
 /**
  * mono_process_list:
- * @size: a pointer to a location where the size of the returned array is stored
- *
- * Return an array of pid values for the processes currently running on the system.
- * The size of the array is stored in @size.
+ * \param size a pointer to a location where the size of the returned array is stored
+ * \returns an array of pid values for the processes currently running on the system.
+ * The size of the array is stored in \p size.
  */
 gpointer*
 mono_process_list (int *size)
@@ -289,12 +289,11 @@ sysctl_kinfo_proc (gpointer pid, KINFO_PROC* processi)
 
 /**
  * mono_process_get_name:
- * @pid: pid of the process
- * @buf: byte buffer where to store the name of the prcoess
- * @len: size of the buffer @buf
- *
- * Return the name of the process identified by @pid, storing it
- * inside @buf for a maximum of len bytes (including the terminating 0).
+ * \param pid pid of the process
+ * \param buf byte buffer where to store the name of the prcoess
+ * \param len size of the buffer \p buf
+ * \returns the name of the process identified by \p pid, storing it
+ * inside \p buf for a maximum of len bytes (including the terminating 0).
  */
 char*
 mono_process_get_name (gpointer pid, char *buf, int len)
@@ -601,11 +600,10 @@ get_pid_status_item (int pid, const char *item, MonoProcessError *error, int mul
 
 /**
  * mono_process_get_data:
- * @pid: pid of the process
- * @data: description of data to return
- *
- * Return a data item of a process like user time, memory use etc,
- * according to the @data argumet.
+ * \param pid pid of the process
+ * \param data description of data to return
+ * \returns a data item of a process like user time, memory use etc,
+ * according to the \p data argumet.
  */
 gint64
 mono_process_get_data_with_error (gpointer pid, MonoProcessData data, MonoProcessError *error)
@@ -678,8 +676,7 @@ mono_process_current_pid ()
 
 /**
  * mono_cpu_count:
- *
- * Return the number of processors on the system.
+ * \returns the number of processors on the system.
  */
 #ifndef HOST_WIN32
 int
@@ -856,9 +853,8 @@ get_cpu_times (int cpu_id, gint64 *user, gint64 *systemt, gint64 *irq, gint64 *s
 
 /**
  * mono_cpu_get_data:
- * @cpu_id: processor number or -1 to get a summary of all the processors
- * @data: type of data to retrieve
- *
+ * \param cpu_id processor number or -1 to get a summary of all the processors
+ * \param data type of data to retrieve
  * Get data about a processor on the system, like time spent in user space or idle time.
  */
 gint64
index 67db3f3f31715e57ab0ca97e4dc5364a2d202e3a..b372b5031137949c5d89b7899d381db30d8e7ae9 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_PROC_LIB_H__
 #define __MONO_PROC_LIB_H__
 /*
index 0eaadf795758a2371b9f5eac026d75771ea7b3f3..0703b8b977778a9ec5eeafdfd3a4daf6cf9c6e1b 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-property-hash.c: Hash table for (object, property) pairs
+/**
+ * \file
+ * Hash table for (object, property) pairs
  *
  * Author:
  *     Zoltan Varga (vargaz@gmail.com)
index 0b24c7fbcd973ab42a1ca276418963bf0681a293..03208aa22cefe12e55dd2320506aff90db3909c1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-property-hash.h: Hash table for (object, property) pairs
+/**
+ * \file
+ * Hash table for (object, property) pairs
  *
  * Author:
  *     Zoltan Varga (vargaz@gmail.com)
index 927a933d54bb50dde98dfd235926ea0e741ed918..9dec4e76083ef1cc6f4a602619e3d4d7f1ebe708 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include "config.h"
 #include <mono/utils/mono-publib.h>
 #include <glib.h>
@@ -11,11 +15,9 @@ mono_free (void *ptr)
 
 /**
  * mono_set_allocator_vtable
- *
- * Make the runtime use the functions in @vtable for allocating memory.
+ * Make the runtime use the functions in \p vtable for allocating memory.
  * The provided functions must have the same semantics of their libc's equivalents.
- *
- * @return TRUE is the vtable was installed. FALSE if the version is incompatible.
+ * \returns TRUE if the vtable was installed. FALSE if the version is incompatible.
  */
 mono_bool
 mono_set_allocator_vtable (MonoAllocatorVTable* vtable)
index 6b1e71a940a6e07fc80b404834f20e061c482d60..9e0055447429e45376033c2624793e3aa240c44f 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_PUBLIB_H__
 #define __MONO_PUBLIB_H__
 
index f60c121c98d65d04dab51aa1650f7f27dfc94fbb..143a457f0bdd7ed326d8e49c7d5cd117209c1a51 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_UTILS_RAND_WINDOWS_H_
 #define _MONO_UTILS_RAND_WINDOWS_H_
 
index 7d92434526c2e900198ccda099b6f7721e956ff3..858df2dcef1255b05598cfdbc5b2676ced6c1658 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-rand-windows-uwp.c: UWP rand support for Mono.
+/**
+ * \file
+ * UWP rand support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 4ac99a8468512c38eefdc5ae76104f0e015f4ad0..638f8b38ed5d142f90a9905003f9448fe7fe2581 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-rand-windows.c: Windows rand support for Mono.
+/**
+ * \file
+ * Windows rand support for Mono.
  *
  * Copyright 2016 Microsoft
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -78,12 +79,10 @@ mono_rand_open (void)
 
 /**
  * mono_rand_init:
- * @seed: A string containing seed data
- * @seed_size: Length of seed string
- *
- * Returns: On success, a non-NULL handle which can be used to fetch random data from mono_rand_try_get_bytes. On failure, NULL.
- *
+ * \param seed A string containing seed data
+ * \param seed_size Length of seed string
  * Initializes an RNG client.
+ * \returns On success, a non-NULL handle which can be used to fetch random data from \c mono_rand_try_get_bytes. On failure, NULL.
  */
 gpointer
 mono_rand_init (guchar *seed, gint seed_size)
@@ -113,14 +112,12 @@ mono_rand_init (guchar *seed, gint seed_size)
 
 /**
  * mono_rand_try_get_bytes:
- * @handle: A pointer to an RNG handle. Handle is set to NULL on failure.
- * @buffer: A buffer into which to write random data.
- * @buffer_size: Number of bytes to write into buffer.
- * @error: Set on error.
- *
- * Returns: FALSE on failure and sets @error, TRUE on success.
- *
+ * \param handle A pointer to an RNG handle. Handle is set to NULL on failure.
+ * \param buffer A buffer into which to write random data.
+ * \param buffer_size Number of bytes to write into buffer.
+ * \param error Set on error.
  * Extracts bytes from an RNG handle.
+ * \returns FALSE on failure and sets \p error, TRUE on success.
  */
 gboolean
 mono_rand_try_get_bytes (gpointer *handle, guchar *buffer, gint buffer_size, MonoError *error)
@@ -160,8 +157,7 @@ mono_rand_try_get_bytes (gpointer *handle, guchar *buffer, gint buffer_size, Mon
 
 /**
  * mono_rand_close:
- * @handle: An RNG handle.
- *
+ * \param handle An RNG handle.
  * Releases an RNG handle.
  */
 void
index 4962795b621a489d9fa988e9bc2959f87503629c..13b8a32393716ec9473ce9d9e4bbd9ef6e849087 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-rand.c: 
+/**
+ * \file
  *
  * Authors:
  *      Mark Crichton (crichton@gimp.org)
@@ -255,14 +255,12 @@ mono_rand_close (gpointer provider)
 
 /**
  * mono_rand_try_get_uint32:
- * @handle: A pointer to an RNG handle. Handle is set to NULL on failure.
- * @val: A pointer to a 32-bit unsigned int, to which the result will be written.
- * @min: Result will be greater than or equal to this value.
- * @max: Result will be less than or equal to this value.
- *
- * Returns: FALSE on failure, TRUE on success.
- *
+ * \param handle A pointer to an RNG handle. Handle is set to NULL on failure.
+ * \param val A pointer to a 32-bit unsigned int, to which the result will be written.
+ * \param min Result will be greater than or equal to this value.
+ * \param max Result will be less than or equal to this value.
  * Extracts one 32-bit unsigned int from an RNG handle.
+ * \returns FALSE on failure, TRUE on success.
  */
 gboolean
 mono_rand_try_get_uint32 (gpointer *handle, guint32 *val, guint32 min, guint32 max, MonoError *error)
index e803ae9d9cae2466a90b1ff1c7e6e16a9bb3a105..383ffd565b4c287e2426e4e556d8b522e566b982 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONO_UTILS_RAND_H_
 #define _MONO_UTILS_RAND_H_
 
index aac0ec378eb68fb553bf472ee5436f599c7a3707..4a6415f3fde705cff9e03433c353ad5fc06dfe05 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+\file
 SHA-1 in C
 By Steve Reid <sreid@sea-to-sky.net>
 100% Public Domain
@@ -77,18 +78,27 @@ A million repetitions of "a"
 
 #if HAVE_COMMONCRYPTO_COMMONDIGEST_H
 
+/**
+ * mono_sha1_init:
+ */
 void
 mono_sha1_init (MonoSHA1Context* context)
 {
        CC_SHA1_Init (context);
 }
 
+/**
+ * mono_sha1_update:
+ */
 void
 mono_sha1_update (MonoSHA1Context* context, const guchar* data, guint32 len)
 {
        CC_SHA1_Update (context, data, len);
 }
 
+/**
+ * mono_sha1_final:
+ */
 void
 mono_sha1_final (MonoSHA1Context* context, unsigned char digest[20])
 {
@@ -267,7 +277,10 @@ unsigned char finalcount[8];
 }
 
 #endif
+
+/**
+ * mono_sha1_get_digest:
+ */
 void
 mono_sha1_get_digest (const guchar *buffer, gint buffer_size, guchar digest [20])
 {      
@@ -280,15 +293,15 @@ mono_sha1_get_digest (const guchar *buffer, gint buffer_size, guchar digest [20]
 }
 
 /**
- * mono_sha1_get_digest_from_file: get the sha1 hash of a file
- * @filename: file name
- * @digest: 20 bytes buffer receiving the hash code.
+ * mono_sha1_get_digest_from_file:
+ * \param filename file name
+ * \param digest 20-byte buffer receiving the hash code.
  * 
- * Get the sha1 hash of a file. The result is put in 
- * the 20 bytes buffer @digest .
+ * Get the SHA-1 hash of a file. The result is put in 
+ * the 20-byte buffer \p digest.
  * 
- * If an IO error happens the value in @digest is not updated.
- **/
+ * If an IO error happens the value in \p digest is not updated.
+ */
 void
 mono_sha1_get_digest_from_file (const gchar *filename, guchar digest [20])
 {      
@@ -316,11 +329,11 @@ mono_sha1_get_digest_from_file (const gchar *filename, guchar digest [20])
        mono_sha1_final (&ctx, digest);
 }
 
-/*
+/**
  * mono_digest_get_public_token:
  *
  * Get the public token from public key data.
- * @token must point to at least 8 bytes of storage.
+ * \p token must point to at least 8 bytes of storage.
  */
 void 
 mono_digest_get_public_token (guchar* token, const guchar *pubkey, guint32 len)
index 643bb4d7709a9f7299bd8b039e7665d6e058921c..c067ce22512786dd24cfea7715080b2355f48063 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MONO_SIGCONTEXT_H__
 #define __MONO_MONO_SIGCONTEXT_H__
 
        #define UCONTEXT_REG_ESI(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__esi)
        #define UCONTEXT_REG_EDI(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__edi)
        #define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__ss.__eip)
+       #define UCONTEXT_REG_XMM
+       #define UCONTEXT_REG_XMM0(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm0)
+       #define UCONTEXT_REG_XMM1(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm1)
+       #define UCONTEXT_REG_XMM2(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm2)
+       #define UCONTEXT_REG_XMM3(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm3)
+       #define UCONTEXT_REG_XMM4(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm4)
+       #define UCONTEXT_REG_XMM5(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm5)
+       #define UCONTEXT_REG_XMM6(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm6)
+       #define UCONTEXT_REG_XMM7(ctx) (((ucontext_t*)(ctx))->uc_mcontext->__fs.__fpu_xmm7)
 #  else
        #define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext->ss.eax)
        #define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext->ss.ebx)
index a90affdd91e77599a111d92b393c5d0d530b928c..4842cb8f72bb41bf5274c6fdac634bfd9832afa9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-signal-handler.h: Handle signal handler differences across platforms
+/**
+ * \file
+ * Handle signal handler differences across platforms
  *
  * Copyright (C) 2013 Xamarin Inc
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 123f40ba2ada9142574079d10a086586925900e6..8a6e1aa244efbc20e1570c5a49e600ee4073abd8 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2008-2010 Novell, Inc.
  * Copyright 2011 Xamarin Inc.
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
index 7fed904e27264f0f9fdcfc838cab3edc6f536aca..3685dcb996d4c8078843a205ce71c7340162f41d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-stdlib.c: stdlib replacement functions.
+/**
+ * \file
+ * stdlib replacement functions.
  * 
  * Authors:
  *     Gonzalo Paniagua Javier (gonzalo@novell.com)
index 35fa6a88f608422e63d8f4de9cbdb127256ee836..eb8531bc86a4386a922a27690a309b4265fa82e0 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_FILE_H
 #define __MONO_FILE_H
 
index 6e2daade7a5ff9bd76bc5c07a0d20c0437a91c62..3bed46bec059aa78607cd134c4803e5fa5c8092b 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __UTILS_MONO_STRING_H__
 #define __UTILS_MONO_STRING_H__
 #include <glib.h>
index b5c039857665f2c8846b35280ec550bbd5527c46..c8c17a3d3cfc1cda13b0f7a25ce4d47340d2f14a 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 
 #if defined(PLATFORM_ANDROID)
index f36ec0beb813bf39430d83be8cc1889529bab591..2d8b37e58a58d459525d7b07ffd92730b7a39193 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads-api.h: Low level access to thread state.
+/**
+ * \file
+ * Low level access to thread state.
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 2111413c94f366f8f335f5b834cd2f2cd45f0ea1..0d5f1e9b73577e3ce129005e5dedf4de73dc3972 100644 (file)
@@ -1,5 +1,6 @@
- /*
- * mono-threads.c: Coop threading
+/**
+ * \file
+ * Coop threading
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index f6afc34dafc5a58666ad8f444326fb9b6abd0e5c..ac2726e989071b3bb604d68818f765acc1479917 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads-coop.h: Cooperative suspend thread helpers
+/**
+ * \file
+ * Cooperative suspend thread helpers
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 750d53d5cd8f43eeb8f1874f0612be75a5259a35..a99a95ec10e134ebdc97565ce5d54a8c73becc4f 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__
 #define __MONO_UTILS_MONO_THREADS_DEBUG_H__
index e2e635552114aafcc5c34ac6e39d33231fa3f6e6..f854fba31a49130a72c7d25146ff6faa06b39d42 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 
 #if defined(__FreeBSD__)
index 6ffec1ab60478ff1a386f4f19aedc30a04fdb1c3..f4980b6b6c5d0a3ffd262eb6e2ff2b0a41605a37 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 
 #if (defined(__linux__) && !defined(PLATFORM_ANDROID)) || defined(__FreeBSD_kernel__)
index 649cdad0d9ac43575997f28abc49945e4e4f08da..db1e5b9fce9fe7fee582d6437afedf335c07f356 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads-mach-helper.c: ObjectiveC hacks to improve our changes with thread shutdown
+/**
+ * \file
+ * ObjectiveC hacks to improve our changes with thread shutdown
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 3dd01e8a21dc0e267c4e2f457edd325a47ca52d2..c6b37c67df088696cd252ca3c2c14de99ea9e0e8 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads-mach.c: Low-level threading, mach version
+/**
+ * \file
+ * Low-level threading, mach version
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index c140148dbddc352f3d211260c85abe5e5099152d..fd8fb8f10d4d429fc72de8bcd1d05bcaeff95091 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 
 #if defined(__NetBSD__)
index 7e2e0e21e2e3fe36d2b9e19cef50ef11018b2df5..117e22108f6e726d4b26906294ea3150f2bc9854 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 
 #if defined(__OpenBSD__)
index a4de7746d9f0de61b0f7870c79608aa330f3be56..1dbb223608647398daaa6ff780b70fc868a889ad 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads-posix-signals.c: Shared facility for Posix signals support
+/**
+ * \file
+ * Shared facility for Posix signals support
  *
  * Author:
  *     Ludovic Henry (ludovic@gmail.com)
index d978c538ae9b2d934a946088a145d8c47e379bc8..9ee2a77402de20bebbca6cabbd61ec0a3f7917bd 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads-posix.c: Low-level threading, posix version
+/**
+ * \file
+ * Low-level threading, posix version
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 27acdda1f7117680e9c6bb27467e8f8b7b4d3c59..38e869cd040e9ffb3504349cbd9bb7c25aa0babb 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <config.h>
 
 #include <mono/utils/mono-compiler.h>
index b350187e7e7a795a43e4f45cac2551ad0391ce09..9ef565ddf9107934b6c77054a3ecc44f5ad2dcb2 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads-windows.c: Low-level threading, windows version
+/**
+ * \file
+ * Low-level threading, windows version
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index fcff68c318dd5a87a54f58c73c583fb564034f29..e6d151ce2566c841cfdba4ae8d1f083d30bfcfa6 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads.c: Low-level threading
+/**
+ * \file
+ * Low-level threading
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 867946071c3aa21c16923060f88cd4fe3e383eb0..dc26a4ac42e8d8b4068467a2c90f92cab9025208 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-threads.h: Low-level threading
+/**
+ * \file
+ * Low-level threading
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 06f9f217b88cf6ce3a51b9fe65182ae38f182995..ddca2c9ebb80d732c5697fdc97f2fa6858ddcdee 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Time utility functions.
  * Author: Paolo Molaro (<lupus@ximian.com>)
  * Copyright (C) 2008 Novell, Inc.
index 438b9ef18815b1bdc0ee574c715638654f25f44f..2dc35dbe2a94aef8a4792005517239fe3c81c879 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __UTILS_MONO_TIME_H__
 #define __UTILS_MONO_TIME_H__
 
index 68b4ce363946b3edc2b59169e548822d4368a172..c83fb10d5321125c91aa0c0fba353ab0e7ee53e5 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-tls.c: Low-level TLS support
+/**
+ * \file
+ * Low-level TLS support
  *
  * Thread local variables that are accessed both from native and managed code
  * are defined here and should be accessed only through this APIs
@@ -178,7 +179,6 @@ static __thread gpointer mono_tls_lmf_addr MONO_TLS_FAST;
 static MonoNativeTlsKey mono_tls_key_thread;
 static MonoNativeTlsKey mono_tls_key_jit_tls;
 static MonoNativeTlsKey mono_tls_key_domain;
-static MonoNativeTlsKey mono_tls_key_lmf;
 static MonoNativeTlsKey mono_tls_key_sgen_thread_info;
 static MonoNativeTlsKey mono_tls_key_lmf_addr;
 
@@ -212,7 +212,6 @@ mono_tls_init_runtime_keys (void)
        MONO_THREAD_VAR_OFFSET (mono_tls_thread, tls_offsets [TLS_KEY_THREAD]);
        MONO_THREAD_VAR_OFFSET (mono_tls_jit_tls, tls_offsets [TLS_KEY_JIT_TLS]);
        MONO_THREAD_VAR_OFFSET (mono_tls_domain, tls_offsets [TLS_KEY_DOMAIN]);
-       MONO_THREAD_VAR_OFFSET (mono_tls_lmf, tls_offsets [TLS_KEY_LMF]);
        MONO_THREAD_VAR_OFFSET (mono_tls_lmf_addr, tls_offsets [TLS_KEY_LMF_ADDR]);
 #else
        mono_native_tls_alloc (&mono_tls_key_thread, NULL);
@@ -221,8 +220,6 @@ mono_tls_init_runtime_keys (void)
        MONO_THREAD_VAR_OFFSET (mono_tls_key_jit_tls, tls_offsets [TLS_KEY_JIT_TLS]);
        mono_native_tls_alloc (&mono_tls_key_domain, NULL);
        MONO_THREAD_VAR_OFFSET (mono_tls_key_domain, tls_offsets [TLS_KEY_DOMAIN]);
-       mono_native_tls_alloc (&mono_tls_key_lmf, NULL);
-       MONO_THREAD_VAR_OFFSET (mono_tls_key_lmf, tls_offsets [TLS_KEY_LMF]);
        mono_native_tls_alloc (&mono_tls_key_lmf_addr, NULL);
        MONO_THREAD_VAR_OFFSET (mono_tls_key_lmf_addr, tls_offsets [TLS_KEY_LMF_ADDR]);
 #endif
@@ -235,7 +232,6 @@ mono_tls_free_keys (void)
        mono_native_tls_free (mono_tls_key_thread);
        mono_native_tls_free (mono_tls_key_jit_tls);
        mono_native_tls_free (mono_tls_key_domain);
-       mono_native_tls_free (mono_tls_key_lmf);
        mono_native_tls_free (mono_tls_key_sgen_thread_info);
        mono_native_tls_free (mono_tls_key_lmf_addr);
 #endif
@@ -268,8 +264,6 @@ mono_tls_get_tls_getter (MonoTlsKey key, gboolean name)
                return name ? (gpointer)"mono_tls_get_jit_tls" : (gpointer)mono_tls_get_jit_tls;
        case TLS_KEY_DOMAIN:
                return name ? (gpointer)"mono_tls_get_domain" : (gpointer)mono_tls_get_domain;
-       case TLS_KEY_LMF:
-               return name ? (gpointer)"mono_tls_get_lmf" : (gpointer)mono_tls_get_lmf;
        case TLS_KEY_SGEN_THREAD_INFO:
                return name ? (gpointer)"mono_tls_get_sgen_thread_info" : (gpointer)mono_tls_get_sgen_thread_info;
        case TLS_KEY_LMF_ADDR:
@@ -290,8 +284,6 @@ mono_tls_get_tls_setter (MonoTlsKey key, gboolean name)
                return name ? (gpointer)"mono_tls_set_jit_tls" : (gpointer)mono_tls_set_jit_tls;
        case TLS_KEY_DOMAIN:
                return name ? (gpointer)"mono_tls_set_domain" : (gpointer)mono_tls_set_domain;
-       case TLS_KEY_LMF:
-               return name ? (gpointer)"mono_tls_set_lmf" : (gpointer)mono_tls_set_lmf;
        case TLS_KEY_SGEN_THREAD_INFO:
                return name ? (gpointer)"mono_tls_set_sgen_thread_info" : (gpointer)mono_tls_set_sgen_thread_info;
        case TLS_KEY_LMF_ADDR:
@@ -301,23 +293,6 @@ mono_tls_get_tls_setter (MonoTlsKey key, gboolean name)
        return NULL;
 }
 
-gpointer
-mono_tls_get_tls_addr (MonoTlsKey key)
-{
-#ifdef HAVE_GET_TLS_ADDR
-       if (key == TLS_KEY_LMF) {
-#if defined(USE_KW_THREAD)
-               return &mono_tls_lmf;
-#elif defined(TARGET_MACH)
-               return mono_mach_get_tls_address_from_thread (pthread_self (), mono_tls_key_lmf);
-#endif
-       }
-#endif
-       /* Implement if we ever need for other targets/keys */
-       g_assert_not_reached ();
-       return NULL;
-}
-
 /* Getters for each tls key */
 gpointer mono_tls_get_thread (void)
 {
@@ -334,11 +309,6 @@ gpointer mono_tls_get_domain (void)
        return MONO_TLS_GET_VALUE (mono_tls_domain, mono_tls_key_domain);
 }
 
-gpointer mono_tls_get_lmf (void)
-{
-       return MONO_TLS_GET_VALUE (mono_tls_lmf, mono_tls_key_lmf);
-}
-
 gpointer mono_tls_get_sgen_thread_info (void)
 {
        return MONO_TLS_GET_VALUE (mono_tls_sgen_thread_info, mono_tls_key_sgen_thread_info);
@@ -365,11 +335,6 @@ void mono_tls_set_domain (gpointer value)
        MONO_TLS_SET_VALUE (mono_tls_domain, mono_tls_key_domain, value);
 }
 
-void mono_tls_set_lmf (gpointer value)
-{
-       MONO_TLS_SET_VALUE (mono_tls_lmf, mono_tls_key_lmf, value);
-}
-
 void mono_tls_set_sgen_thread_info (gpointer value)
 {
        MONO_TLS_SET_VALUE (mono_tls_sgen_thread_info, mono_tls_key_sgen_thread_info, value);
index a3751ea6e38b7ee2bbc60aaa1390f35d1eb2b88d..b87ede880ba5d1f79b3c0fc36a38b5b46c306682 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-tls.h: Low-level TLS support
+/**
+ * \file
+ * Low-level TLS support
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
@@ -22,23 +23,15 @@ typedef enum {
        TLS_KEY_JIT_TLS = 1,
        /* mono_domain_get () */
        TLS_KEY_DOMAIN = 2,
-       TLS_KEY_LMF = 3,
-       TLS_KEY_SGEN_THREAD_INFO = 4,
-       TLS_KEY_LMF_ADDR = 5,
-       TLS_KEY_NUM = 6
+       TLS_KEY_SGEN_THREAD_INFO = 3,
+       TLS_KEY_LMF_ADDR = 4,
+       TLS_KEY_NUM = 5
 } MonoTlsKey;
 
 #ifdef HAVE_KW_THREAD
 #define USE_KW_THREAD
 #endif
 
-#if defined(USE_KW_THREAD)
-#define HAVE_GET_TLS_ADDR
-#elif defined(TARGET_MACH) && (defined(TARGET_X86) || defined(TARGET_AMD64))
-/* mono_mach_get_tls_address_from_thread is untested for arm/arm64 */
-#define HAVE_GET_TLS_ADDR
-#endif
-
 #ifdef HOST_WIN32
 
 #include <windows.h>
@@ -82,19 +75,16 @@ void mono_tls_free_keys (void);
 gint32 mono_tls_get_tls_offset (MonoTlsKey key);
 gpointer mono_tls_get_tls_getter (MonoTlsKey key, gboolean name);
 gpointer mono_tls_get_tls_setter (MonoTlsKey key, gboolean name);
-gpointer mono_tls_get_tls_addr (MonoTlsKey key);
 
 gpointer mono_tls_get_thread (void);
 gpointer mono_tls_get_jit_tls (void);
 gpointer mono_tls_get_domain (void);
-gpointer mono_tls_get_lmf (void);
 gpointer mono_tls_get_sgen_thread_info (void);
 gpointer mono_tls_get_lmf_addr (void);
 
 void mono_tls_set_thread (gpointer value);
 void mono_tls_set_jit_tls (gpointer value);
 void mono_tls_set_domain (gpointer value);
-void mono_tls_set_lmf (gpointer value);
 void mono_tls_set_sgen_thread_info (gpointer value);
 void mono_tls_set_lmf_addr (gpointer value);
 
index 8ebc25a69b303019f66ecd117a2e9f7a5843a0c1..a39f6be3f0819d4b93b0799c7a35bb53fb526786 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-uri.c: Simple routine used to escape uris.
+/**
+ * \file
+ * Simple routine used to escape uris.
  *
  * Author:
  *   Miguel de Icaza (miguel@novell.com)
index 1a92a8f7ef86a3fa84b518daaf6dd21fe6925cfc..3cbc85e6c021997d24bd8e741898aa8823ffba9f 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_URI_H
 #define __MONO_URI_H
 #include <glib.h>
index adae6f06cad706c00eb40512f3490e3519b09704..351df65443a69596f01c3ef5b6eeb6862146096d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-value-hash.c: A hash table which only stores values in the hash nodes.
+/**
+ * \file
+ * A hash table which only stores values in the hash nodes.
  *
  * Author:
  *   Miguel de Icaza (miguel@novell.com)
index 7b2e00c321d645920e815f57f6b933b70bb91ecd..d2869274d5a94f5c15cf6cb928ae8f7a24e7a2ce 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * mono-value-hash.h: A hash table which only stores values in the hash nodes.
+/**
+ * \file
+ * A hash table which only stores values in the hash nodes.
  *
  * Author:
  *   Mark Probst (mark.probst@gmail.com)
index 2f6b6c501037c6cd070612896455c227b3f2b9ae..987689a9cd8e946671fd35f5ae4d42c39cc61a30 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <glib.h>
 #include <string.h>
 
 
 #define BITS_PER_CHUNK MONO_BITSET_BITS_PER_CHUNK
 
-/*
+/**
  * mono_bitset_alloc_size:
- * @max_size: The number of bits you want to hold
- * @flags: unused
- *
- * Return the number of bytes required to hold the bitset.
+ * \param max_size The number of bits you want to hold
+ * \param flags unused
+ * \returns the number of bytes required to hold the bitset.
  * Useful to allocate it on the stack or with mempool.
- * Use with mono_bitset_mem_new ().
+ * Use with \c mono_bitset_mem_new.
  */
 guint32
 mono_bitset_alloc_size (guint32 max_size, guint32 flags) {
@@ -22,13 +25,12 @@ mono_bitset_alloc_size (guint32 max_size, guint32 flags) {
        return sizeof (MonoBitSet) + sizeof (gsize) * (real_size - MONO_ZERO_LEN_ARRAY);
 }
 
-/*
+/**
  * mono_bitset_new:
- * @max_size: The numer of bits you want to hold
- * @flags: bitfield of flags
- *
- * Return a bitset of size max_size. It must be freed using
- * mono_bitset_free.
+ * \param max_size The numer of bits you want to hold
+ * \param flags bitfield of flags
+ * \returns a bitset of size \p max_size. It must be freed using
+ * \c mono_bitset_free.
  */
 MonoBitSet *
 mono_bitset_new (guint32 max_size, guint32 flags) {
@@ -41,15 +43,15 @@ mono_bitset_new (guint32 max_size, guint32 flags) {
        return result;
 }
 
-/*
+/**
  * mono_bitset_mem_new:
- * @mem: The location the bitset is stored
- * @max_size: The number of bits you want to hold
- * @flags: bitfield of flags
+ * \param mem The location the bitset is stored
+ * \param max_size The number of bits you want to hold
+ * \param flags bitfield of flags
  *
- * Return mem, which is now a initialized bitset of size max_size. It is
- * not freed even if called with mono_bitset_free. mem must be at least
- * as big as mono_bitset_alloc_size returns for the same max_size.
+ * Return \p mem, which is now a initialized bitset of size \p max_size. It is
+ * not freed even if called with \c mono_bitset_free. \p mem must be at least
+ * as big as \c mono_bitset_alloc_size returns for the same \p max_size.
  */
 MonoBitSet *
 mono_bitset_mem_new (gpointer mem, guint32 max_size, guint32 flags) {
@@ -63,11 +65,11 @@ mono_bitset_mem_new (gpointer mem, guint32 max_size, guint32 flags) {
 
 /*
  * mono_bitset_free:
- * @set: bitset ptr to free
+ * \param set bitset ptr to free
  *
- * Free bitset unless flags have MONO_BITSET_DONT_FREE set. Does not
- * free anything if flag MONO_BITSET_DONT_FREE is set or bitset was
- * made with mono_bitset_mem_new.
+ * Free bitset unless flags have \c MONO_BITSET_DONT_FREE set. Does not
+ * free anything if flag \c MONO_BITSET_DONT_FREE is set or bitset was
+ * made with \c mono_bitset_mem_new.
  */
 void
 mono_bitset_free (MonoBitSet *set) {
@@ -75,12 +77,12 @@ mono_bitset_free (MonoBitSet *set) {
                g_free (set);
 }
 
-/*
+/**
  * mono_bitset_set:
- * @set: bitset ptr
- * @pos: set bit at this pos
+ * \param set bitset ptr
+ * \param pos set bit at this pos
  *
- * Set bit at pos @pos, counting from 0.
+ * Set bit at \p pos, counting from 0.
  */
 void
 mono_bitset_set (MonoBitSet *set, guint32 pos) {
@@ -92,13 +94,12 @@ mono_bitset_set (MonoBitSet *set, guint32 pos) {
        set->data [j] |= (gsize)1 << bit;
 }
 
-/*
+/**
  * mono_bitset_test:
- * @set: bitset ptr
- * @pos: test bit at this pos
- *
- * Test bit at pos @pos, counting from 0.
- * Returns a value != 0 if set, 0 otherwise.
+ * \param set bitset ptr
+ * \param pos test bit at this pos
+ * Test bit at \p pos, counting from 0.
+ * \returns a nonzero value if set, 0 otherwise.
  */
 int
 mono_bitset_test (const MonoBitSet *set, guint32 pos) {
@@ -110,12 +111,11 @@ mono_bitset_test (const MonoBitSet *set, guint32 pos) {
        return (set->data [j] & ((gsize)1 << bit)) > 0;
 }
 
-/*
+/**
  * mono_bitset_test_bulk:
- * @set: bitset ptr
- * @pos: test bit at this pos
- *
- * Return 32/64 bits from the bitset, starting from @pos, which must be 
+ * \param set bitset ptr
+ * \param pos test bit at this pos
+ * \returns 32/64 bits from the bitset, starting from \p pos, which must be 
  * divisible with 32/64.
  */
 gsize
@@ -128,12 +128,12 @@ mono_bitset_test_bulk (const MonoBitSet *set, guint32 pos) {
                return set->data [j];
 }
 
-/*
+/**
  * mono_bitset_clear:
- * @set: bitset ptr
- * @pos: unset bit at this pos
+ * \param set bitset ptr
+ * \param pos unset bit at this pos
  *
- * Unset bit at pos 'pos', counting from 0.
+ * Unset bit at \p pos, counting from 0.
  */
 void
 mono_bitset_clear (MonoBitSet *set, guint32 pos) {
@@ -145,9 +145,9 @@ mono_bitset_clear (MonoBitSet *set, guint32 pos) {
        set->data [j] &= ~((gsize)1 << bit);
 }
 
-/*
+/**
  * mono_bitset_clear_all:
- * @set: bitset ptr
+ * \param set bitset ptr
  *
  * Unset all bits.
  */
@@ -156,9 +156,9 @@ mono_bitset_clear_all (MonoBitSet *set) {
        memset (set->data, 0, set->size / 8);
 }
 
-/*
+/**
  * mono_bitset_set_all:
- * @set: bitset ptr
+ * \param set bitset ptr
  *
  * Set all bits.
  */
@@ -167,9 +167,9 @@ mono_bitset_set_all (MonoBitSet *set) {
        memset (set->data, -1, set->size / 8);
 }
 
-/*
+/**
  * mono_bitset_invert:
- * @set: bitset ptr
+ * \param set bitset ptr
  *
  * Flip all bits.
  */
@@ -180,11 +180,10 @@ mono_bitset_invert (MonoBitSet *set) {
                set->data [i] = ~set->data [i];
 }
 
-/*
+/**
  * mono_bitset_size:
- * @set: bitset ptr
- *
- * Returns the number of bits this bitset can hold.
+ * \param set bitset ptr
+ * \returns the number of bits this bitset can hold.
  */
 guint32
 mono_bitset_size (const MonoBitSet *set) {
@@ -196,11 +195,10 @@ mono_bitset_size (const MonoBitSet *set) {
  */
 #if 1
 
-/*
+/**
  * mono_bitset_count:
- * @set: bitset ptr
- *
- * return number of bits that is set.
+ * \param set bitset ptr
+ * \returns number of bits that are set.
  */
 guint32
 mono_bitset_count (const MonoBitSet *set) {
@@ -383,11 +381,10 @@ find_first_unset (gsize mask, gint nth_bit)
        return -1;
 }
 
-/*
+/**
  * mono_bitset_find_start:
- * @set: bitset ptr
- *
- * Equivalent to mono_bitset_find_first (set, -1) but faster.
+ * \param set bitset ptr
+ * Equivalent to <code>mono_bitset_find_first (set, -1)</code> but faster.
  */
 int
 mono_bitset_find_start   (const MonoBitSet *set)
@@ -401,13 +398,12 @@ mono_bitset_find_start   (const MonoBitSet *set)
        return -1;
 }
 
-/*
+/**
  * mono_bitset_find_first:
- * @set: bitset ptr
- * @pos: pos to search _after_ (not including)
- *
- * Returns position of first set bit after @pos. If pos < 0 begin search from
- * start. Return -1 if no bit set is found.
+ * \param set bitset ptr
+ * \param pos pos to search after (not including)
+ * \returns position of first set bit after \p pos. If \p pos < 0, begin search from
+ * start. Return \c -1 if no bit set is found.
  */
 int
 mono_bitset_find_first (const MonoBitSet *set, gint pos) {
@@ -437,13 +433,12 @@ mono_bitset_find_first (const MonoBitSet *set, gint pos) {
        return -1;
 }
 
-/*
+/**
  * mono_bitset_find_last:
- * @set: bitset ptr
- * @pos: pos to search _before_ (not including)
- *
- * Returns position of last set bit before pos. If pos < 0 search is
- * started from the end. Returns -1 if no set bit is found.
+ * \param set bitset ptr
+ * \param pos pos to search before (not including)
+ * \returns position of last set bit before \p pos. If \p pos < 0 search is
+ * started from the end. Returns \c -1 if no set bit is found.
  */
 int
 mono_bitset_find_last (const MonoBitSet *set, gint pos) {
@@ -469,13 +464,12 @@ mono_bitset_find_last (const MonoBitSet *set, gint pos) {
        return -1;
 }
 
-/*
+/**
  * mono_bitset_find_first_unset:
- * @set: bitset ptr
- * @pos: pos to search _after_ (not including)
- *
- * Returns position of first unset bit after @pos. If pos < 0 begin search from
- * start. Return -1 if no bit set is found.
+ * \param set bitset ptr
+ * \param pos pos to search after (not including)
+ * \returns position of first unset bit after \p pos. If \p pos < 0 begin search from
+ * start. Return \c -1 if no bit set is found.
  */
 int
 mono_bitset_find_first_unset (const MonoBitSet *set, gint pos) {
@@ -506,13 +500,12 @@ mono_bitset_find_first_unset (const MonoBitSet *set, gint pos) {
        return -1;
 }
 
-/*
+/**
  * mono_bitset_clone:
- * @set: bitset ptr to clone
- * @new_size: number of bits the cloned bitset can hold
- *
- * Return a cloned bitset of size new_size. MONO_BITSET_DONT_FREE
- * unset in cloned bitset. If new_size is 0, the cloned object is just
+ * \param set bitset ptr to clone
+ * \param new_size number of bits the cloned bitset can hold
+ * \returns a cloned bitset of size \p new_size. \c MONO_BITSET_DONT_FREE
+ * unset in cloned bitset. If \p new_size is 0, the cloned object is just
  * as big.
  */
 MonoBitSet*
@@ -527,10 +520,10 @@ mono_bitset_clone (const MonoBitSet *set, guint32 new_size) {
        return result;
 }
 
-/*
+/**
  * mono_bitset_copyto:
- * @src: bitset ptr to copy from
- * @dest: bitset ptr to copy to
+ * \param src bitset ptr to copy from
+ * \param dest bitset ptr to copy to
  *
  * Copy one bitset to another.
  */
@@ -541,10 +534,10 @@ mono_bitset_copyto (const MonoBitSet *src, MonoBitSet *dest) {
        memcpy (&dest->data, &src->data, dest->size / 8);
 }
 
-/*
+/**
  * mono_bitset_union:
- * @dest: bitset ptr to hold union
- * @src: bitset ptr to copy
+ * \param dest bitset ptr to hold union
+ * \param src bitset ptr to copy
  *
  * Make union of one bitset and another.
  */
@@ -559,10 +552,10 @@ mono_bitset_union (MonoBitSet *dest, const MonoBitSet *src) {
                dest->data [i] |= src->data [i];
 }
 
-/*
+/**
  * mono_bitset_intersection:
- * @dest: bitset ptr to hold intersection
- * @src: bitset ptr to copy
+ * \param dest bitset ptr to hold intersection
+ * \param src bitset ptr to copy
  *
  * Make intersection of one bitset and another.
  */
@@ -577,11 +570,11 @@ mono_bitset_intersection (MonoBitSet *dest, const MonoBitSet *src) {
                dest->data [i] &= src->data [i];
 }
 
-/*
+/**
  * mono_bitset_intersection_2:
- * @dest: bitset ptr to hold intersection
- * @src1: first bitset
- * @src2: second bitset
+ * \param dest bitset ptr to hold intersection
+ * \param src1 first bitset
+ * \param src2 second bitset
  *
  * Make intersection of two bitsets
  */
@@ -597,12 +590,12 @@ mono_bitset_intersection_2 (MonoBitSet *dest, const MonoBitSet *src1, const Mono
                dest->data [i] = src1->data [i] & src2->data [i];
 }
 
-/*
+/**
  * mono_bitset_sub:
- * @dest: bitset ptr to hold bitset - src
- * @src: bitset ptr to copy
+ * \param dest bitset ptr to hold bitset - src
+ * \param src bitset ptr to copy
  *
- * Unset all bits in dest, which are set in src.
+ * Unset all bits in \p dest that are set in \p src.
  */
 void
 mono_bitset_sub (MonoBitSet *dest, const MonoBitSet *src) {
@@ -615,12 +608,11 @@ mono_bitset_sub (MonoBitSet *dest, const MonoBitSet *src) {
                dest->data [i] &= ~src->data [i];
 }
 
-/*
+/**
  * mono_bitset_equal:
- * @src: bitset ptr
- * @src1: bitset ptr
- *
- * return TRUE if their size are the same and the same bits are set in
+ * \param src bitset ptr
+ * \param src1 bitset ptr
+ * \returns TRUE if their size are the same and the same bits are set in
  * both bitsets.
  */
 gboolean
@@ -635,13 +627,12 @@ mono_bitset_equal (const MonoBitSet *src, const MonoBitSet *src1) {
        return TRUE;
 }
 
-/*
+/**
  * mono_bitset_foreach:
- * @set: bitset ptr
- * @func: Function to call for every set bit
- * @data: pass this as second arg to func
- *
- * Calls func for every bit set in bitset. Argument 1 is the number of
+ * \param set bitset ptr
+ * \param func Function to call for every set bit
+ * \param data pass this as second arg to func
+ * Calls \p func for every bit set in bitset. Argument 1 is the number of
  * the bit set, argument 2 is data
  */
 void
index 682b8d539a3885953bfb1111b7b340a6b08e3779..fbeedeefbe1a6fcb66543c8b43dfc9ebff8db83a 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_BITSET_H__
 #define __MONO_BITSET_H__
 
index 992db1543ccba145540ddfa2df54d1ca2edf9895..72cc1810f9eb5361bf25df93ad12198433faa19d 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * networking-fallbacks.c: Fallback networking code that rely on old BSD apis or whatever else is available.
+/**
+ * \file
+ * Fallback networking code that rely on old BSD apis or whatever else is available.
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 8c8c75b5a1012ffdaab66fdac3d976abb6c76cea..32aeb9633886e6fed3fd9f09e10ab79386cbd4f0 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * networking-missing.c: Implements missing standard socket functions.
+/**
+ * \file
+ * Implements missing standard socket functions.
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index ede69be85f35d83385d2d8acd2e6f5faf3fd44d2..caa2073a539e10e996ed1273a806ca92f4d3dee3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * networking-posix.c: Modern posix networking code
+/**
+ * \file
+ * Modern posix networking code
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index fa61d263cdec4a0fd96c1dad14586c4cebe47035..cf8200c816401cdf270a393111ecca6149b9faee 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * networking-windows.c: Windows-specific networking implementations
+/**
+ * \file
+ * Windows-specific networking implementations
  *
  * Author:
  *     Alexander Köplinger (alex.koeplinger@outlook.com)
index bd461b01f1631443c3c6a70773424eebee1635dc..104f3e5fa841bd10ec2464fac4415994eab30a1f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * networking.c: Portable networking functions
+/**
+ * \file
+ * Portable networking functions
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index 370a3d0ffaf2dbe9070bc36e6aa8ee732dcd2d99..f9c5f63dbc0218b516796349925b4edbd3fade03 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * networking.h: Portable networking functions
+/**
+ * \file
+ * Portable networking functions
  *
  * Author:
  *     Rodrigo Kumpera (kumpera@gmail.com)
index b4a3e2f5afdf8dc083df00f30973be0d2a4349ea..6f57d9464e7b6c51520a6e27652a474cc1baae06 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * os-event-unix.c: MonoOSEvent on Unix
+/**
+ * \file
+ * MonoOSEvent on Unix
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index 33fb867d654e01ea6811ad317e7fd1bd24fc7262..b63ec21a28f1a424f21ac6f1a8525a17395041ba 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * os-event-win32.c: MonoOSEvent on Win32
+/**
+ * \file
+ * MonoOSEvent on Win32
  *
  * Author:
  *     Ludovic Henry (luhenry@microsoft.com)
index 280b19ad8ac9cd263caf4d592911003e892597e3..9ab5524f0a57153a1178b2637c7dc4aff6efe447 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_UTILS_OS_EVENT_H_
 #define _MONO_UTILS_OS_EVENT_H_
index 0bf17f6727b869e51d81ef173de334692914631e..af1377d7012b7e0da4377e0a08e8d563b1a1dd6c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * parse.c: Parsing for GC options.
+/**
+ * \file
+ * Parsing for GC options.
  *
  * Copyright (C) 2015 Xamarin Inc
  *
 
 /**
  * mono_gc_parse_environment_string_extract_number:
- *
- * @str: points to the first digit of the number
- * @out: pointer to the variable that will receive the value
- *
+ * \param str points to the first digit of the number
+ * \param out pointer to the variable that will receive the value
  * Tries to extract a number from the passed string, taking in to account m, k
  * and g suffixes
- *
- * Returns true if passing was successful
+ * \returns TRUE if passing was successful
  */
 gboolean
 mono_gc_parse_environment_string_extract_number (const char *str, size_t *out)
index e2b4a83f39ac7ecd8c8717e977d39812e0efeb74..e4dbbd26a59650fb9e9e99f15d4bab7050d6441a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * parse.h: Parsing for GC options.
+/**
+ * \file
+ * Parsing for GC options.
  *
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
  */
index ed6f9ab4d488ad9f5103f89e9151425fdd3cdec1..d6e3845c12a4347824fdf6b8b37f365f92639ca9 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_UTILS_REFCOUNT_H__
 #define __MONO_UTILS_REFCOUNT_H__
index d286bd05da6f9b28c1ede7c1fe0a4cea9b187c36..2ece0733d122a42d8ac969a7027081faf6af501a 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * strenc.c: string encoding conversions
+/**
+ * \file
+ * string encoding conversions
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
@@ -26,18 +27,17 @@ static const char trailingBytesForUTF8[256] = {
 
 /**
  * mono_unicode_from_external:
- * @in: pointers to the buffer.
- * @bytes: number of bytes in the string.
- *
- * Tries to turn a NULL-terminated string into UTF16.
+ * \param in pointers to the buffer.
+ * \param bytes number of bytes in the string.
+ * Tries to turn a NULL-terminated string into UTF-16.
  *
- * First, see if it's valid UTF8, in which case just turn it directly
- * into UTF16.  Next, run through the colon-separated encodings in
- * MONO_EXTERNAL_ENCODINGS and do an iconv conversion on each,
- * returning the first successful conversion to UTF16.  If no
+ * First, see if it's valid UTF-8, in which case just turn it directly
+ * into UTF-16.  Next, run through the colon-separated encodings in
+ * \c MONO_EXTERNAL_ENCODINGS and do an \c iconv conversion on each,
+ * returning the first successful conversion to UTF-16.  If no
  * conversion succeeds, return NULL.
  *
- * Callers must free the returned string if not NULL. bytes holds the number
+ * Callers must free the returned string if not NULL. \p bytes holds the number
  * of bytes in the returned string, not including the terminator.
  */
 gunichar2 *
@@ -100,21 +100,20 @@ mono_unicode_from_external (const gchar *in, gsize *bytes)
 
 /**
  * mono_utf8_from_external:
- * @in: pointer to the string buffer.
- *
+ * \param in pointer to the string buffer.
  * Tries to turn a NULL-terminated string into UTF8.
  *
- * First, see if it's valid UTF8, in which case there's nothing more
+ * First, see if it's valid UTF-8, in which case there's nothing more
  * to be done.  Next, run through the colon-separated encodings in
- * MONO_EXTERNAL_ENCODINGS and do an iconv conversion on each,
- * returning the first successful conversion to utf8.  If no
+ * \c MONO_EXTERNAL_ENCODINGS and do an \c iconv conversion on each,
+ * returning the first successful conversion to UTF-8.  If no
  * conversion succeeds, return NULL.
  *
  * Callers must free the returned string if not NULL.
  *
- * This function is identical to mono_unicode_from_external, apart
- * from returning utf8 not utf16; it's handy in a few places to work
- * in utf8.
+ * This function is identical to \c mono_unicode_from_external, apart
+ * from returning UTF-8 not UTF-16; it's handy in a few places to work
+ * in UTF-8.
  */
 gchar *mono_utf8_from_external (const gchar *in)
 {
@@ -165,12 +164,10 @@ gchar *mono_utf8_from_external (const gchar *in)
 
 /**
  * mono_unicode_to_external:
- * @uni: an UTF16 string to conver to an external representation.
- *
- * Turns NULL-terminated UTF16 into either UTF8, or the first
- * working item in MONO_EXTERNAL_ENCODINGS if set.  If no conversions
- * work, then UTF8 is returned.
- *
+ * \param uni a UTF-16 string to convert to an external representation.
+ * Turns NULL-terminated UTF-16 into either UTF-8, or the first
+ * working item in \c MONO_EXTERNAL_ENCODINGS if set.  If no conversions
+ * work, then UTF-8 is returned.
  * Callers must free the returned string.
  */
 gchar *mono_unicode_to_external (const gunichar2 *uni)
@@ -220,15 +217,13 @@ gchar *mono_unicode_to_external (const gunichar2 *uni)
 
 /**
  * mono_utf8_validate_and_len
- * @source: Pointer to putative UTF-8 encoded string.
- *
- * Checks @source for being valid UTF-8. @utf is assumed to be
+ * \param source Pointer to putative UTF-8 encoded string.
+ * Checks \p source for being valid UTF-8. \p utf is assumed to be
  * null-terminated.
- *
- * Return value: true if @source is valid.
- * oEnd : will equal the null terminator at the end of the string if valid.
- *            if not valid, it will equal the first charater of the invalid sequence.
- * oLengh : will equal the length to @oEnd
+ * \returns TRUE if \p source is valid.
+ * \p oEnd will equal the null terminator at the end of the string if valid.
+ * if not valid, it will equal the first charater of the invalid sequence.
+ * \p oLength will equal the length to \p oEnd
  **/
 gboolean
 mono_utf8_validate_and_len (const gchar *source, glong* oLength, const gchar** oEnd)
@@ -287,17 +282,18 @@ mono_utf8_validate_and_len (const gchar *source, glong* oLength, const gchar** o
 
 /**
  * mono_utf8_validate_and_len_with_bounds
- * @source: Pointer to putative UTF-8 encoded string.
- * @max_bytes: Max number of bytes that can be decoded. This function returns FALSE if
- * it needs to decode characters beyond that.
+ * \param source: Pointer to putative UTF-8 encoded string.
+ * \param max_bytes: Max number of bytes that can be decoded.
  *
- * Checks @source for being valid UTF-8. @utf is assumed to be
+ * Checks \p source for being valid UTF-8. \p utf is assumed to be
  * null-terminated.
  *
- * Return value: true if @source is valid.
- * oEnd : will equal the null terminator at the end of the string if valid.
- *            if not valid, it will equal the first charater of the invalid sequence.
- * oLengh : will equal the length to @oEnd
+ * This function returns FALSE if it needs to decode characters beyond \p max_bytes.
+ *
+ * \returns TRUE if \p source is valid.
+ * \p oEnd will equal the null terminator at the end of the string if valid.
+ * if not valid, it will equal the first charater of the invalid sequence.
+ * \p oLength will equal the length to \p oEnd
  **/
 gboolean
 mono_utf8_validate_and_len_with_bounds (const gchar *source, glong max_bytes, glong* oLength, const gchar** oEnd)
index 8da0155669c77663585275a84ecea1d4c753e790..ce15c38904225e1d32ea412de42a5ba49b6f16bc 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * strenc.h: string encoding conversions
+/**
+ * \file
+ * string encoding conversions
  *
  * Author:
  *     Dick Porter (dick@ximian.com)
index fa0bc87fd6bd1c45dce11a20f0b92491929f35f6..1d582fb945f8f405e7751f9d350dedf144f596ce 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_UTILS_W32API_H__
 #define __MONO_UTILS_W32API_H__
index 9122f1e8fc8dc7b3f892c9c95137cd1e33283453..72667c0324bda7141d510022212c68686255e3e0 100644 (file)
@@ -36,7 +36,8 @@ $comparedLines | foreach {
     {
                ##Look for diffs.
                $mono_version = (Select-String -InputObject $_.InputObject -pattern '#define VERSION \"(.*)\"')
-               if ($mono_version -eq $null) {
+               $mono_corlib_version = (Select-String -InputObject $_.InputObject -pattern '#define MONO_CORLIB_VERSION')
+               if ($mono_version -eq $null -And $mono_corlib_version -eq $null) {
                        Write-Host "Changes detected, versions doesn't match. Configuration must to be replaced."
                        exit 1;
                }
index 7183d6f4a80004ba495fc185e0ac61c284c27f57..b6a4a81c1357b523855f2c0290c6febb61513de3 100644 (file)
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <LinkIncremental>true</LinkIncremental>\r
+    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r
   </PropertyGroup>\r
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <LinkIncremental>true</LinkIncremental>\r
+    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
+    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r
+  </PropertyGroup>\r
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
+    <CustomBuildAfterTargets>PostBuildEvent</CustomBuildAfterTargets>\r
   </PropertyGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
     <PreBuildEvent>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX86</TargetMachine>\r
     </Link>\r
-    <PostBuildEvent>\r
+    <PostBuildEvent />\r
+    <CustomBuildStep>\r
       <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
+      <Message>genmdesc.exe Custom Build Step.</Message>\r
+      <Outputs>$(MONO_INCLUDE_DIR)\mini\cpu-x86.h</Outputs>\r
+      <Inputs>$(MONO_INCLUDE_DIR)\mini\cpu-x86.md</Inputs>\r
+    </CustomBuildStep>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <PreBuildEvent>\r
       <SubSystem>Console</SubSystem>\r
       <TargetMachine>MachineX64</TargetMachine>\r
     </Link>\r
-    <PostBuildEvent>\r
+    <PostBuildEvent />\r
+    <CustomBuildStep>\r
       <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
+    </CustomBuildStep>\r
+    <CustomBuildStep>\r
+      <Message>genmdesc.exe Custom Build Step.</Message>\r
+    </CustomBuildStep>\r
+    <CustomBuildStep>\r
+      <Outputs>$(MONO_INCLUDE_DIR)\mini\cpu-amd64.h</Outputs>\r
+    </CustomBuildStep>\r
+    <CustomBuildStep>\r
+      <Inputs>$(MONO_INCLUDE_DIR)\mini\cpu-amd64.md</Inputs>\r
+    </CustomBuildStep>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <PreBuildEvent>\r
       <TargetMachine>MachineX86</TargetMachine>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
-    <PostBuildEvent>\r
+    <PostBuildEvent />\r
+    <CustomBuildStep>\r
       <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
+      <Message>genmdesc.exe Custom Build Step.</Message>\r
+      <Outputs>$(MONO_INCLUDE_DIR)\mini\cpu-x86.h</Outputs>\r
+      <Inputs>$(MONO_INCLUDE_DIR)\mini\cpu-x86.md</Inputs>\r
+    </CustomBuildStep>\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <PreBuildEvent>\r
       <TargetMachine>MachineX64</TargetMachine>\r
       <GenerateDebugInformation>true</GenerateDebugInformation>\r
     </Link>\r
-    <PostBuildEvent>\r
+    <PostBuildEvent />\r
+    <CustomBuildStep>\r
       <Command>runmdesc.bat "$(TargetPath)" $(Platform)</Command>\r
-    </PostBuildEvent>\r
+      <Outputs>$(MONO_INCLUDE_DIR)\mini\cpu-amd64.h</Outputs>\r
+      <Inputs>$(MONO_INCLUDE_DIR)\mini\cpu-amd64.md</Inputs>\r
+      <Message>genmdesc.exe Custom Build Step.</Message>\r
+    </CustomBuildStep>\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <ClCompile Include="..\mono\mini\genmdesc.c">\r
index 18885f2304927357ed14d9e01da4ac3971f25cd4..a93798e286de6d338a0e9b8140a987bac13823f5 100644 (file)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>\r
+<?xml version="1.0" encoding="utf-8"?>\r
 <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
   <ItemGroup Label="ProjectConfigurations">\r
     <ProjectConfiguration Include="Debug|Win32">\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
     </Link>\r
-    <PostBuildEvent>\r
-      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
-    </PostBuildEvent>\r
+    <PostBuildEvent />\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
     <PreBuildEvent>\r
     <Link>\r
       <SubSystem>Windows</SubSystem>\r
     </Link>\r
-    <PostBuildEvent>\r
-      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
-    </PostBuildEvent>\r
+    <PostBuildEvent />\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
     <PreBuildEvent>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     </Link>\r
-    <PostBuildEvent>\r
-      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
-    </PostBuildEvent>\r
+    <PostBuildEvent />\r
   </ItemDefinitionGroup>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <PreBuildEvent>\r
       <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
       <OptimizeReferences>true</OptimizeReferences>\r
     </Link>\r
-    <PostBuildEvent>\r
-      <Command>.\libmono.bat "$(MONO_INCLUDE_DIR)" "$(SolutionDir)include\mono" -q</Command>\r
-    </PostBuildEvent>\r
+    <PostBuildEvent />\r
   </ItemDefinitionGroup>\r
   <ItemGroup>\r
     <CustomBuildStep Include="..\mono\mini\mini-x86.h">\r
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
   <ImportGroup Label="ExtensionTargets">\r
   </ImportGroup>\r
-</Project>\r
+</Project>
\ No newline at end of file
index 193213c809b05a5c69ade222b03689eba06ad0a9..4a8ecd3326e2a094e6fad1b47285b8ff37476af3 100644 (file)
@@ -387,13 +387,9 @@ Global
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Release|x64.ActiveCfg = Release|x64\r
                {C36612BD-22D3-4B95-85E2-7FDC4FC5D740}.Release|x64.Build.0 = Release|x64\r
                {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|Win32.Build.0 = Debug|Win32\r
                {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|x64.ActiveCfg = Debug|x64\r
-               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Debug|x64.Build.0 = Debug|x64\r
                {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|Win32.ActiveCfg = Release|Win32\r
-               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|Win32.Build.0 = Release|Win32\r
                {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|x64.ActiveCfg = Release|x64\r
-               {3E0D229E-C39F-4EDA-9A6A-A33ECEA0322D}.Release|x64.Build.0 = Release|x64\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Debug|Win32.ActiveCfg = Debug|Win32\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Debug|Win32.Build.0 = Debug|Win32\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Debug|x64.ActiveCfg = Debug|x64\r
@@ -403,37 +399,21 @@ Global
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Release|x64.ActiveCfg = Release|x64\r
                {CB0D9E92-293C-439C-9AC7-C5F59B6E0772}.Release|x64.Build.0 = Release|x64\r
                {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Debug|Win32.Build.0 = Debug|Win32\r
                {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Debug|x64.ActiveCfg = Debug|x64\r
-               {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Debug|x64.Build.0 = Debug|x64\r
                {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Release|Win32.ActiveCfg = Release|Win32\r
-               {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Release|Win32.Build.0 = Release|Win32\r
                {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Release|x64.ActiveCfg = Release|x64\r
-               {C7D83158-4EB6-4409-8730-612AD45FAF6A}.Release|x64.Build.0 = Release|x64\r
                {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Debug|Win32.Build.0 = Debug|Win32\r
                {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Debug|x64.ActiveCfg = Debug|x64\r
-               {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Debug|x64.Build.0 = Debug|x64\r
                {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Release|Win32.ActiveCfg = Release|Win32\r
-               {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Release|Win32.Build.0 = Release|Win32\r
                {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Release|x64.ActiveCfg = Release|x64\r
-               {6C64262B-077B-4E12-AF91-9409ECCB75F6}.Release|x64.Build.0 = Release|x64\r
                {7BECCFA0-28A0-4995-9856-558560F720E6}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {7BECCFA0-28A0-4995-9856-558560F720E6}.Debug|Win32.Build.0 = Debug|Win32\r
                {7BECCFA0-28A0-4995-9856-558560F720E6}.Debug|x64.ActiveCfg = Debug|x64\r
-               {7BECCFA0-28A0-4995-9856-558560F720E6}.Debug|x64.Build.0 = Debug|x64\r
                {7BECCFA0-28A0-4995-9856-558560F720E6}.Release|Win32.ActiveCfg = Release|Win32\r
-               {7BECCFA0-28A0-4995-9856-558560F720E6}.Release|Win32.Build.0 = Release|Win32\r
                {7BECCFA0-28A0-4995-9856-558560F720E6}.Release|x64.ActiveCfg = Release|x64\r
-               {7BECCFA0-28A0-4995-9856-558560F720E6}.Release|x64.Build.0 = Release|x64\r
                {0046B994-40A8-4C64-AC9D-429DC9177B54}.Debug|Win32.ActiveCfg = Debug|Win32\r
-               {0046B994-40A8-4C64-AC9D-429DC9177B54}.Debug|Win32.Build.0 = Debug|Win32\r
                {0046B994-40A8-4C64-AC9D-429DC9177B54}.Debug|x64.ActiveCfg = Debug|x64\r
-               {0046B994-40A8-4C64-AC9D-429DC9177B54}.Debug|x64.Build.0 = Debug|x64\r
                {0046B994-40A8-4C64-AC9D-429DC9177B54}.Release|Win32.ActiveCfg = Release|Win32\r
-               {0046B994-40A8-4C64-AC9D-429DC9177B54}.Release|Win32.Build.0 = Release|Win32\r
                {0046B994-40A8-4C64-AC9D-429DC9177B54}.Release|x64.ActiveCfg = Release|x64\r
-               {0046B994-40A8-4C64-AC9D-429DC9177B54}.Release|x64.Build.0 = Release|x64\r
                {DC50997D-8A0D-4EB6-849B-9D7FBC39CE53}.Debug|Win32.ActiveCfg = Debug|x64\r
                {DC50997D-8A0D-4EB6-849B-9D7FBC39CE53}.Debug|x64.ActiveCfg = Debug|x64\r
                {DC50997D-8A0D-4EB6-849B-9D7FBC39CE53}.Debug|x64.Build.0 = Debug|x64\r
@@ -479,9 +459,9 @@ Global
                {DC50997D-8A0D-4EB6-849B-9D7FBC39CE53} = {DE3617B4-17A8-4E5F-A00F-BA43D956881F}\r
        EndGlobalSection\r
        GlobalSection(ExtensibilityGlobals) = postSolution\r
-               AMDCaProjectFile = C:\Users\Owner\Development\monogit\mono\msvc\CodeAnalyst\mono.caw\r
-               AMDCaPersistentStartup = mono\r
                AMDCaPersistentConfig = Debug|Win32\r
+               AMDCaPersistentStartup = mono\r
+               AMDCaProjectFile = C:\Users\Owner\Development\monogit\mono\msvc\CodeAnalyst\mono.caw\r
        EndGlobalSection\r
        GlobalSection(DPCodeReviewSolutionGUID) = preSolution\r
                DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}\r
index dda2aafb936f4316201d8370105732c4e27df78e..35e07dde01621005a0bca0ad8b5feda74c7d443e 100644 (file)
     </project>
     <project dir="class/Mono.Cecil" library="Mono.Cecil-basic">
       <boot>true</boot>
-      <flags>/codepage:65001 /nologo /noconfig -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib -r:./../../class/lib/basic/mscorlib.dll -optimize -keyfile:../mono.snk -d:NET_4_0 /publicsign -r:./../../class/lib/basic/System.Core.dll</flags>
+      <flags>/codepage:65001 /nologo /noconfig -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib -r:./../../class/lib/basic/mscorlib.dll -optimize -keyfile:../mono.snk -d:NET_4_0 /publicsign -r:./../../class/lib/basic/System.Core.dll -r:./../../class/lib/basic/System.dll</flags>
       <output>Mono.Cecil.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/basic/Mono.Cecil.dll</library_output>
     </project>
     <project dir="class/Mono.Cecil" library="Mono.Cecil-build">
       <boot>false</boot>
-      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize -keyfile:../mono.snk -d:NET_4_0 /publicsign -r:./../../class/lib/build/System.Core.dll</flags>
+      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/build/mscorlib.dll -optimize -keyfile:../mono.snk -d:NET_4_0 /publicsign -r:./../../class/lib/build/System.Core.dll -r:./../../class/lib/build/System.dll</flags>
       <output>Mono.Cecil.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/build/Mono.Cecil.dll</library_output>
     </project>
     <project dir="class/corlib" library="corlib-net_4_x">
       <boot>true</boot>
-      <flags>/codepage:65001 /nologo /noconfig /deterministic -unsafe -nostdlib -nowarn:612,618,1635 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT,HAS_CORLIB_CONTRACTS -d:FEATURE_MACL -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib /debug:portable -optimize -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT,HAS_CORLIB_CONTRACTS -d:FEATURE_MACL -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin -runtimemetadataversion:v4.0.30319 -d:MONO_FEATURE_CONSOLE</flags>
+      <flags>/codepage:65001 /nologo /noconfig /deterministic -unsafe -nostdlib -nowarn:612,618,1635 -d:INSIDE_CORLIB,MONO_CULTURE_DATA -d:LIBC -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT,HAS_CORLIB_CONTRACTS -d:FEATURE_MACL -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib /debug:portable -optimize -d:FEATURE_PAL,GENERICS_WORK,FEATURE_LIST_PREDICATES,FEATURE_SERIALIZATION,FEATURE_ASCII,FEATURE_LATIN1,FEATURE_UTF7,FEATURE_UTF32,MONO_HYBRID_ENCODING_SUPPORT,FEATURE_ASYNC_IO,NEW_EXPERIMENTAL_ASYNC_IO,FEATURE_UTF32,FEATURE_EXCEPTIONDISPATCHINFO,FEATURE_CORRUPTING_EXCEPTIONS,FEATURE_EXCEPTION_NOTIFICATIONS,FEATURE_STRONGNAME_MIGRATION,FEATURE_USE_LCID,FEATURE_FUSION,FEATURE_CRYPTO,FEATURE_X509_SECURESTRINGS,FEATURE_SYNCHRONIZATIONCONTEXT,FEATURE_SYNCHRONIZATIONCONTEXT_WAIT,HAS_CORLIB_CONTRACTS -d:FEATURE_MACL -d:FEATURE_REMOTING,MONO_COM,FEATURE_COMINTEROP,FEATURE_ROLE_BASED_SECURITY -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -resource:resources/charinfo.nlp -resource:resources/collation.core.bin -resource:resources/collation.tailoring.bin -resource:resources/collation.cjkCHS.bin -resource:resources/collation.cjkCHT.bin -resource:resources/collation.cjkJA.bin -resource:resources/collation.cjkKO.bin -resource:resources/collation.cjkKOlv2.bin -runtimemetadataversion:v4.0.30319 -d:MONO_FEATURE_CONSOLE -d:MONO_FEATURE_APPLETLS</flags>
       <output>mscorlib.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/mscorlib.dll</library_output>
     </project>
     <project dir="class/System" library="System-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -nowarn:436 -d:CODEDOM -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
+      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -nowarn:436 -d:CODEDOM -d:MONO_FEATURE_APPLETLS -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -d:CONFIGURATION_DEP -r:./../../class/lib/net_4_x/System.Xml.dll -r:./../../class/lib/net_4_x/System.Configuration.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
       <output>System.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/System.dll</library_output>
     </project>
     <project dir="class/System" library="System-bare-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -nowarn:436 -d:CODEDOM -d:MONO_FEATURE_BTLS</flags>
+      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -nowarn:436 -d:CODEDOM -d:MONO_FEATURE_APPLETLS -d:MONO_FEATURE_BTLS</flags>
       <output>System.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/bare/System.dll</library_output>
     </project>
     <project dir="class/System" library="System-secxml-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -nowarn:436 -d:CODEDOM -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/net_4_x/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
+      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -d:CONFIGURATION_2_0 -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX -d:MONO_FEATURE_PROCESS_START -d:MONO_FEATURE_THREAD_ABORT -d:MONO_FEATURE_THREAD_SUSPEND_RESUME -d:MONO_FEATURE_MULTIPLE_APPDOMAINS -unsafe -resource:resources/Asterisk.wav -resource:resources/Beep.wav -resource:resources/Exclamation.wav -resource:resources/Hand.wav -resource:resources/Question.wav -nowarn:436 -d:CODEDOM -d:MONO_FEATURE_APPLETLS -d:MONO_FEATURE_BTLS -d:SECURITY_DEP -d:XML_DEP -d:MONO_SECURITY_ALIAS -r:./../../class/lib/net_4_x/bare/System.Xml.dll -r:MonoSecurity=./../../class/lib/net_4_x/Mono.Security.dll</flags>
       <output>System.dll</output>
       <built_sources></built_sources>
       <library_output>./../../class/lib/net_4_x/secxml/System.dll</library_output>
     </project>
     <project dir="class/Mono.Cecil" library="Mono.Cecil-net_4_x">
       <boot>false</boot>
-      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -keyfile:../../mono.snk -d:NET_3_5 /publicsign -r:./../../../class/lib/net_4_x/System.Core.dll</flags>
+      <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -keyfile:../mono.snk -d:NET_4_0 /publicsign -r:./../../class/lib/net_4_x/System.Core.dll -r:./../../class/lib/net_4_x/System.dll</flags>
       <output>Mono.Cecil.dll</output>
       <built_sources></built_sources>
-      <library_output>./../../../class/lib/net_4_x/legacy/Mono.Cecil.dll</library_output>
+      <library_output>./../../class/lib/net_4_x/Mono.Cecil.dll</library_output>
       <fx_version>4.5</fx_version>
       <profile>net_4_x</profile>
       <resources></resources>
       <resources></resources>
       <response>System.Reflection.Context.dll.sources</response>
     </project>
-    <project dir="class/legacy/Mono.Cecil" library="Mono.Cecil-net_4_x">
+    <project dir="class/legacy/Mono.Cecil" library="legacy_Mono.Cecil-net_4_x">
       <boot>false</boot>
       <flags>/codepage:65001 /nologo /noconfig /deterministic -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib -r:./../../../class/lib/net_4_x/mscorlib.dll /debug:portable -optimize -keyfile:../../mono.snk -d:NET_3_5 /publicsign -r:./../../../class/lib/net_4_x/System.Core.dll</flags>
       <output>Mono.Cecil.dll</output>
index e6afb26d8ff37979b08de265bda5f08c04d6ce23..d3729144a610939269165092422bce631af42d6a 100755 (executable)
@@ -22,6 +22,7 @@ IF NOT %ERRORLEVEL% == 0 (
        ECHO copy %WIN_CONFIG_H% %CONFIG_H%
        copy %WIN_CONFIG_H% %CONFIG_H%
        %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "(Get-Content %CONFIG_H%) -replace '#MONO_VERSION#', (Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value | Set-Content %CONFIG_H%" 2>&1
+       %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -NonInteractive -Command "$mono_version=[int[]](Select-String -path %CONFIGURE_AC% -pattern 'AC_INIT\(mono, \[(.*)\]').Matches[0].Groups[1].Value.Split('.'); $corlib_counter=[int](Select-String -path %CONFIGURE_AC% -pattern 'MONO_CORLIB_COUNTER=(.*)').Matches[0].Groups[1].Value; (Get-Content %CONFIG_H%) -replace '#MONO_CORLIB_VERSION#',('1{0:00}{1:00}{2:00}{3:000}' -f $mono_version[0],$mono_version[1],$mono_version[2],$corlib_counter) | Set-Content %CONFIG_H%" 2>&1
 )
 
 %windir%\system32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy bypass -NonInteractive -File compare-config-files.ps1 %EGLIB_WIN_CONFIG_H% %EGLIB_CONFIG_H% 2>&1
index c4621b6759d9d29b8e2208bd815817de2627b39a..a40e037e8beb7816e2249e5c9341b44b3e31dc7c 100644 (file)
@@ -211,7 +211,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Http-net_4_x", "mcs/cl
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cairo-net_4_x", "mcs/class/Mono.Cairo/Mono.Cairo-net_4_x.csproj", "{D76A0C93-56FE-4339-99A8-B7A3D49D6DDE}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil-net_4_x", "mcs/class/legacy/Mono.Cecil/Mono.Cecil-net_4_x.csproj", "{6DE38817-EC25-433A-AE58-0D30C5E6C460}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil-net_4_x", "mcs/class/Mono.Cecil/Mono.Cecil-net_4_x.csproj", "{2C0D558F-0B38-4691-967E-A910A1B995C1}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Cecil.Mdb-net_4_x", "mcs/class/Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_x.csproj", "{CF14D34A-F69B-47FB-A99C-D25C77198F30}"
 EndProject
@@ -305,6 +305,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Workflow.Runtime-net
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Reflection.Context-net_4_x", "mcs/class/System.Reflection.Context/System.Reflection.Context-net_4_x.csproj", "{50A4818C-4BD7-49DB-AD2C-FF3FB0A9D392}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "legacy_Mono.Cecil-net_4_x", "mcs/class/legacy/Mono.Cecil/legacy_Mono.Cecil-net_4_x.csproj", "{CF1339E8-584B-4B3D-9A93-6F4AFDAFEE66}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facades_System.Security.Cryptography.X509Certificates-net_4_x", "mcs/class/Facades/System.Security.Cryptography.X509Certificates/Facades_System.Security.Cryptography.X509Certificates-net_4_x.csproj", "{C2E71C2B-A806-4FEB-AE2D-A5BE884E3BA7}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Facades_System.ServiceModel.Primitives-net_4_x", "mcs/class/Facades/System.ServiceModel.Primitives/Facades_System.ServiceModel.Primitives-net_4_x.csproj", "{524B10FC-880D-4131-8CAE-027BC3A68B6F}"
@@ -1099,10 +1101,10 @@ Global
                {D76A0C93-56FE-4339-99A8-B7A3D49D6DDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {D76A0C93-56FE-4339-99A8-B7A3D49D6DDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {D76A0C93-56FE-4339-99A8-B7A3D49D6DDE}.Release|Any CPU.Build.0 = Release|Any CPU
-               {6DE38817-EC25-433A-AE58-0D30C5E6C460}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {6DE38817-EC25-433A-AE58-0D30C5E6C460}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {6DE38817-EC25-433A-AE58-0D30C5E6C460}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {6DE38817-EC25-433A-AE58-0D30C5E6C460}.Release|Any CPU.Build.0 = Release|Any CPU
+               {2C0D558F-0B38-4691-967E-A910A1B995C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {2C0D558F-0B38-4691-967E-A910A1B995C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {2C0D558F-0B38-4691-967E-A910A1B995C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {2C0D558F-0B38-4691-967E-A910A1B995C1}.Release|Any CPU.Build.0 = Release|Any CPU
                {CF14D34A-F69B-47FB-A99C-D25C77198F30}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {CF14D34A-F69B-47FB-A99C-D25C77198F30}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {CF14D34A-F69B-47FB-A99C-D25C77198F30}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -1287,6 +1289,10 @@ Global
                {50A4818C-4BD7-49DB-AD2C-FF3FB0A9D392}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {50A4818C-4BD7-49DB-AD2C-FF3FB0A9D392}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {50A4818C-4BD7-49DB-AD2C-FF3FB0A9D392}.Release|Any CPU.Build.0 = Release|Any CPU
+               {CF1339E8-584B-4B3D-9A93-6F4AFDAFEE66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {CF1339E8-584B-4B3D-9A93-6F4AFDAFEE66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {CF1339E8-584B-4B3D-9A93-6F4AFDAFEE66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {CF1339E8-584B-4B3D-9A93-6F4AFDAFEE66}.Release|Any CPU.Build.0 = Release|Any CPU
                {C2E71C2B-A806-4FEB-AE2D-A5BE884E3BA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {C2E71C2B-A806-4FEB-AE2D-A5BE884E3BA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {C2E71C2B-A806-4FEB-AE2D-A5BE884E3BA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
index 08a0c5d7da18ddd8d9e3d737e6e3ffc68ead74e2..58fddbc742bb2132b78e3af4468fdbb244b4d396 100755 (executable)
@@ -3,5 +3,6 @@
 export TESTCMD=`dirname "${BASH_SOURCE[0]}"`/run-step.sh
 
 ${TESTCMD} --label=interpreter-regression --timeout=10m make -C mono/mini richeck
+${TESTCMD} --label=mixedmode-regression --timeout=10m make -C mono/mini mixedcheck
 ${TESTCMD} --label=compile-runtime-tests --timeout=40m make -w -C mono/tests -j4 tests
 ${TESTCMD} --label=runtime-interp --timeout=160m make -w -C mono/tests -k testinterp V=1
index e615aef425d006ff1b3657a161234b3dd45638d2..fa2dad0cb86fdda398c11a5659c054e0ed23097a 100644 (file)
@@ -1,2 +1,2 @@
 #!/bin/sh
-exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/xbuild/14.0/bin/xbuild.exe "$@"
+MONO_GC_PARAMS="nursery-size=64m,$MONO_GC_PARAMS" exec @bindir@/mono $MONO_OPTIONS @mono_instdir@/xbuild/14.0/bin/xbuild.exe "$@"
index 0ccce3ad57e095ad8c8fee3a58c6c0a5c453d76c..980f4322c14fae2f19df47dc5af7e9f23c42b3c9 100644 (file)
@@ -464,7 +464,7 @@ namespace Mono.Tools.LocaleBuilder
                };
 
                static readonly Dictionary<int, string[][]> GroupSizes = new Dictionary<int, string[][]> {
-                       { 0x0028, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x0026, new [] { new [] { "2" }, new [] { "3" }, new [] { "3" } } },
                        { 0x0039, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x0045, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x0046, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
@@ -473,23 +473,16 @@ namespace Mono.Tools.LocaleBuilder
                        { 0x0049, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x004a, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x004b, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x004c, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+                       { 0x004c, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x004d, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x004e, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x004f, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x0051, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x0053, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x0054, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x0051, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
                        { 0x0057, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x005b, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x005d, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x005e, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x0060, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x0061, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x006d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x006f, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x0078, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x007c, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x0428, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x006f, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
+                       { 0x0426, new [] { new [] { "2" }, new [] { "3" }, new [] { "3" } } },
                        { 0x0439, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x0445, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x0446, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
@@ -498,31 +491,24 @@ namespace Mono.Tools.LocaleBuilder
                        { 0x0449, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x044a, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x044b, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x044c, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+                       { 0x044c, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x044d, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x044e, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x044f, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x0451, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x0453, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x0454, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x0451, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
                        { 0x0457, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x045b, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x045d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x045e, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x0460, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x0461, new [] { new [] { "3" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x046d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x046f, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x0478, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x047c, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x046f, new [] { new [] { "3", "0" }, new [] { "3" }, new [] { "3" } } },
+                       { 0x0820, new [] { new [] { "3", "2" }, new [] { "3" }, new [] { "3" } } },
                        { 0x0845, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+                       { 0x0849, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x0850, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x085d, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x0860, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
+                       { 0x0c50, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
+                       { 0x0c51, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
                        { 0x4009, new [] { new [] { "3", "2" }, new [] { "3", "2" }, new [] { "3", "2" } } },
-                       { 0x540a, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x785d, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x7c28, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
                        { 0x7c50, new [] { new [] { "3", "0" }, new [] { "3", "0" }, new [] { "3", "0" } } },
-                       { 0x7c5d, new [] { new [] { "3" }, new [] { "3", "0" }, new [] { "3", "0" } } },
                };
 
                static readonly Dictionary<int, string[]> Text = new Dictionary<int, string[]> {
index 1d52b77c0cf11ca21ed8ab645b9f618491c92de6..371aca44bbfd05a69f6cf936406bda325d4b17c5 100644 (file)
@@ -4,10 +4,19 @@ SOURCES = \
 nuget-hash-extractor.exe: $(SOURCES)
         mcs /r:System.Xml.Linq  /r:System.IO.Compression -o:nuget-hash-extractor.exe $(SOURCES)
 
-download:
+.download_stamp_file: Makefile download.sh
        echo "Downloading all the nugets";      \
        ./download.sh
 
-run: nuget-hash-extractor.exe
+download: .download_stamp_file
+
+run: nuget-hash-extractor.exe .download_stamp_file
        mono nuget-hash-extractor.exe nugets
+
+run-asm: nuget-hash-extractor.exe .download_stamp_file
+       mono nuget-hash-extractor.exe nugets asm
+
+run-ver: nuget-hash-extractor.exe .download_stamp_file
+       mono nuget-hash-extractor.exe nugets ver
+
 .PHONY: download run
index f79ee5f351c058841e6f5b8c40d509aad0858dda..a16a3bfac027d6d142480187bc0dcf2d84f6de13 100755 (executable)
@@ -33,4 +33,6 @@ wget https://www.nuget.org/api/v2/package/System.Reflection.DispatchProxy/4.0.0
 #System.ValueTuple
 wget https://www.nuget.org/api/v2/package/System.ValueTuple/4.3.0 -O nugets/system.valuetuple.4.3.0.nupkg
 
-#System.Security.Cryptography.OpenSsl when .net 4.6.2 + 1 is out
\ No newline at end of file
+#System.Security.Cryptography.OpenSsl when .net 4.6.2 + 1 is out
+
+touch .download_stamp_file
\ No newline at end of file
index 013097f83c8e9c1a21c27d07e423300605f6f83c..96b4b7c8c91e9ca0e010acfca6062e81327a92c6 100644 (file)
@@ -33,7 +33,16 @@ class Driver {
                        LoadAndDump (et, version);
                }
        }
+
+       static bool dump_asm, dump_ver;
        static void Main (string[] args) {
+
+               if (args.Length > 1) {
+                       dump_asm = args [1].Equals ("asm");
+                       dump_ver = args [1].Equals ("ver");
+               } else {
+                       dump_asm = true;
+               }
                foreach (var f in Directory.GetFiles (args [0], "*.nupkg")) {
                        DumpNuget (f);
                }
@@ -52,12 +61,13 @@ class Driver {
                var data = StreamToArray (entry.Open ());
                AppDomain ad = AppDomain.CreateDomain ("parse_" + ++domain_id);
                DoParse p = (DoParse)ad.CreateInstanceAndUnwrap (typeof (DoParse).Assembly.FullName, typeof (DoParse).FullName);
-               p.ParseAssembly (data, version, entry.Name, entry.FullName);
+               p.ParseAssembly (data, version, entry.Name, entry.FullName, dump_asm, dump_ver);
                AppDomain.Unload (ad);
        }
 }
 
 class DoParse : MarshalByRefObject {
+
        static int Hash (string str) {
                int h = 5381;
         for (int i = 0;  i < str.Length; ++i)
@@ -82,7 +92,7 @@ class DoParse : MarshalByRefObject {
                return parts[parts.Length - 2];
        }
 
-       public void ParseAssembly (byte[] data, string version, string name, string fullname) {
+       public void ParseAssembly (byte[] data, string version, string name, string fullname, bool dump_asm, bool dump_ver) {
                var a = Assembly.ReflectionOnlyLoad (data);
                var m = a.GetModules ()[0];
                var id = m.ModuleVersionId.ToString ().ToUpper ();
@@ -91,6 +101,13 @@ class DoParse : MarshalByRefObject {
 
                string ver_str = version + " " + FileToMoniker (fullname);      
 
-               Console.WriteLine ($"IGNORED_ASSEMBLY (0x{hash_code}, {str}, \"{id}\", \"{ver_str}\"),");
+               if (dump_asm)
+                       Console.WriteLine ($"IGNORED_ASSEMBLY (0x{hash_code}, {str}, \"{id}\", \"{ver_str}\"),");
+
+               //IGNORED_ASM_VER (SYS_IO_COMPRESSION, 4, 1, 2, 0),
+               var ver = a.GetName ().Version;
+               if (dump_ver)
+                       Console.WriteLine ($"IGNORED_ASM_VER ({str}, {ver.Major}, {ver.Minor}, {ver.Build}, {ver.Revision}),");
+               
        }
 }
\ No newline at end of file
index 6ae2a1e1e497e30b768c728687a773408f3d1997..072b535f299e50eeb30e684b19c3ca1dd5c81e90 100644 (file)
@@ -21,7 +21,7 @@
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/tokentype.h>
 #include <mono/metadata/appdomain.h>
-#include <mono/metadata/assembly.h>
+#include <mono/metadata/assembly-internals.h>
 #include <mono/metadata/metadata-internals.h>
 #include <mono/metadata/class-internals.h>
 #include <mono/metadata/verify-internals.h>
@@ -523,7 +523,7 @@ try_load_from (MonoAssembly **assembly, const gchar *path1, const gchar *path2,
        *assembly = NULL;
        fullpath = g_build_filename (path1, path2, path3, path4, NULL);
        if (g_file_test (fullpath, G_FILE_TEST_IS_REGULAR))
-               *assembly = mono_assembly_open_full (fullpath, NULL, refonly);
+               *assembly = mono_assembly_open_predicate (fullpath, refonly, FALSE, NULL, NULL, NULL);
 
        g_free (fullpath);
        return (*assembly != NULL);
@@ -727,7 +727,7 @@ main (int argc, char *argv [])
 
                mono_verifier_set_mode (verifier_mode);
 
-               assembly = mono_assembly_open (file, NULL);
+               assembly = mono_assembly_open_predicate (file, FALSE, FALSE, NULL, NULL, NULL);
                /*fake an assembly for netmodules so the verifier works*/
                if (!assembly && (image = mono_image_open (file, &status)) && image->tables [MONO_TABLE_ASSEMBLY].rows == 0) {
                        assembly = g_new0 (MonoAssembly, 1);
index 37a232b6a53a1715de5a96064b544663f18252ad..6a4873657aa8d012c32b2183dcf7efaeaf2ac680 100644 (file)
 
 /* Version number of package */
 #define VERSION "#MONO_VERSION#"
+
+/* Version of the corlib-runtime interface */
+#define MONO_CORLIB_VERSION #MONO_CORLIB_VERSION#
+
 #endif