Merge pull request #4570 from lateralusX/jlorenss/visual_studio_msbuild_fix
authorJohan Lorensson <lateralusx.github@gmail.com>
Mon, 27 Mar 2017 07:04:53 +0000 (09:04 +0200)
committerGitHub <noreply@github.com>
Mon, 27 Mar 2017 07:04:53 +0000 (09:04 +0200)
Windows msbuild triggers too much to rebuild.

767 files changed:
.gitmodules
configure.ac
data/lldb/monobt.py
docs/Makefile.am
docs/doxyfile
docs/exdoc
docs/sources/mono-api-jitinternal.html
external/cecil
external/linker
external/xunit-binaries [new submodule]
man/csharp.1
man/mono.1
mcs/build/library.make
mcs/build/platforms/darwin.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/tests.make
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.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.Security/Mono.Security.Interface/MonoTlsProviderFactory.Apple.cs [deleted file]
mcs/class/Mono.Security/monotouch_Mono.Security.dll.sources
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_x.csproj
mcs/class/System.Configuration/System.Configuration/InternalConfigurationHost.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/Test/System.Linq.Expressions/ExpressionTest_Call.cs
mcs/class/System.Core/common_System.Core.dll.sources
mcs/class/System.Data/Makefile
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/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.DirectoryServices/System.DirectoryServices-net_4_x.csproj
mcs/class/System.Drawing/System.Drawing.Printing/InvalidPrinterException.cs
mcs/class/System.Drawing/System.Drawing/Bitmap.cs
mcs/class/System.Drawing/System.Drawing/Font.cs
mcs/class/System.Drawing/System.Drawing/Icon.cs
mcs/class/System.Drawing/System.Drawing/Image.cs
mcs/class/System.Numerics/Makefile
mcs/class/System.Numerics/System.Numerics_xtest.dll.sources [new file with mode: 0644]
mcs/class/System.Web.Extensions/Makefile
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/Test/tools/standalone-runner.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.Net.Sockets/Socket.cs
mcs/class/System/System.Net.Sockets/SocketAsyncResult.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/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.Security/SslStreamTest.cs
mcs/class/System/Test/System.Net/HttpWebResponseTest.cs
mcs/class/System/common.sources
mcs/class/System/xammac_net_4_5_System.dll.sources
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/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/Test/System.Reflection/MethodInfoTest.cs
mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs
mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs
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/referencesource/System/compmod/system/componentmodel/EditorAttribute.cs
mcs/mcs/class.cs
mcs/tools/cil-stringreplacer/cil-stringreplacer-net_4_x.csproj
mcs/tools/corcompare/mono-api-info-net_4_x.csproj
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/pdb2mdb/pdb2mdb-net_4_x.csproj
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.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/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/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/genmdesc.c
mono/mini/graph.c
mono/mini/helpers.c
mono/mini/image-writer.c
mono/mini/image-writer.h
mono/mini/interp/hacks.h
mono/mini/interp/interp.c
mono/mini/interp/interp.h
mono/mini/interp/mintops.c
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/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/runtime-invoke.cs
mono/tests/testing_gac/Makefile.am
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/scripts/order.xml
net_4_x.sln
scripts/xbuild.in

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 433ff566fd7d69a1ce7475421f6914d99e4aae4a..5f8e03a3bf7ced0c8d2888b348d7a7b6bdece5ef 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])
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 1ab0b08ad40962d4f794f12ce042b98d2148df52..44bc86223530a07fa74ab87007cf264e53d63400 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1ab0b08ad40962d4f794f12ce042b98d2148df52
+Subproject commit 44bc86223530a07fa74ab87007cf264e53d63400
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..b4663b40458524c166601dd09dc38e744e35b9a0 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.
@@ -264,8 +270,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 +298,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 
@@ -528,7 +534,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 +1698,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 +1948,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 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 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..c221aa43c10e224ca7ef161e140f3172e23aa989 100644 (file)
@@ -9,3 +9,5 @@ NO_THREAD_SUSPEND_RESUME=1
 NO_MULTIPLE_APPDOMAINS=1
 NO_PROCESS_START=1
 NO_MONO_SECURITY=1
+MONO_FEATURE_APPLETLS=
+ONLY_APPLETLS=
index e826c7e7e31e1b734fbd5625532536f3184d787a..e1edd9999c5488d281bad465df9dcfb329504a31 100644 (file)
@@ -10,3 +10,5 @@ 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=
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 d9f6a95ff72b5d1653e3a0f809d994029c3ee5cf..cb68f8abddafdeedfebae274606cb1a727e51f0a 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 :=
@@ -159,4 +188,52 @@ $(test_makefrag): $(test_response)
 
 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 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..3398e4b7797e9906b24b458bbd076561817a68d3 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="..\..\..\external\cecil\System.Security.Cryptography\*.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 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.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 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 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 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 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..0ccd4597cf28757afe53f7736459e521435c2beb 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
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 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>
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 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 02a3f27c9a5f9f80c45fdce1cc3c2a442b7b599d..225730863701716bbc2b9273a17a0b333698bee0 100644 (file)
@@ -56,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 ffa825c5f273f0e9208cbb5871b20031094715c6..7a7d8c68952fd7dd9e8cace165984ef9d6096260 100644 (file)
@@ -37,6 +37,7 @@
 
 using System.IO;
 using System.Drawing.Imaging;
+using System.Reflection;
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
 using System.ComponentModel;
@@ -132,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);
index 34117a2e1935a713a9a39c23961f96eb595773ca..31861d5123845aa92525989d58a76a31d2fa9a07 100644 (file)
@@ -31,6 +31,7 @@
 // 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.ComponentModel;
@@ -427,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);
                        }
                }
 
@@ -624,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 8352f15c6703c8e6acc3e36bb095edc030b11798..6fe88d5a2e02b682022c7150bc7102f84661a2d1 100644 (file)
@@ -36,6 +36,7 @@ using System.Collections;
 using System.ComponentModel;
 using System.Drawing.Imaging;
 using System.IO;
+using System.Reflection;
 using System.Runtime.Serialization;
 using System.Runtime.InteropServices;
 
@@ -229,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);
@@ -261,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);
@@ -859,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 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 \
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 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
 
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 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 c71e98acfbb3de983040762641d00a4dd7083846..8efb18cc93ef6d734bdc7f42df4760900c2b96e7 100644 (file)
@@ -36,7 +36,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 +58,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 e5d0536e06876efb440c7eedf3a070826fa5ccc5..4d5d7b418496bad939a53f2b25840d4031ebb150 100644 (file)
@@ -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
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 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 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 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 15322fe8fc26a42a87007a96db58e7da3639c757..c53bd72e937d8003767a1524bc8bb5b3ff5327a7 100644 (file)
@@ -204,13 +204,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 +227,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 +292,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 +325,8 @@ Mono.Net.Security/SystemCertificateValidator.cs
 
 Mono.Util/MonoPInvokeCallbackAttribute.cs
 
+MonoTouch/Dummy.cs
+
 ReferenceSources/AutoWebProxyScriptEngine.cs
 ReferenceSources/AssertWrapper.cs
 ReferenceSources/CAPI.cs
index beb6f2415cf1c7c2da9e4ba40f1a04757013f3b9..fe68fff758f91170508456245fee3a8f194fabee 100644 (file)
@@ -1 +1,2 @@
 #include net_4_x_System.dll.sources
+Mono.Net.Security/MonoTlsProviderFactory.Apple.cs
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..aa8356730c3f14431e7c54bfabf9c57605025634 100644 (file)
@@ -1,3 +1,4 @@
+#if MONO_FEATURE_APPLETLS
 using System;
 using System.Runtime.InteropServices;
 
@@ -108,3 +109,4 @@ namespace XamMac.CoreFoundation
                }
        }
 }
+#endif
index 19b9392fc781fcc43d1aab962c74c3f167b36d2e..0bc4d0693fd15d9c6c5921eec1672076579db399 100644 (file)
@@ -72,6 +72,14 @@ 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
+
 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 718aadc3f374ab1ba539160635b4c594da13b2ab..63ed7a3371111b90bf3e0ce575ee8532f4208d83 100644 (file)
@@ -1,3 +1,4 @@
+#if MONO_FEATURE_APPLETLS
 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..6c15bbb54f4788fb034f61d73be312b678227b80 100644 (file)
@@ -1,3 +1,4 @@
+#if MONO_FEATURE_APPLETLS
 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..05575d9d58c0f5632081f661ce5b7bb70f96bee6 100644 (file)
@@ -49,6 +49,55 @@ 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 // ONLY_APPLETLS should not support any other option
+                       return InitFromHandleApple (handle);
+#elif MONOTOUCH_WATCH
+                       throw new PlatformNotSupportedException ();
+#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 // ONLY_APPLETLS should not support any other option
+                       return ImportApple (rawData);
+#elif MONOTOUCH_WATCH
+                       throw new PlatformNotSupportedException ();
+#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 +119,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 +128,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 +219,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 +236,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 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 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 8a80a2b0cc70e2ffffdd7bc72eacd420e9cabbf9..409f345eccbe572ee5c793c11c8f37074275c29a 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
@@ -57,6 +57,8 @@
     <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="..\referencesource\mscorlib\system\unsafecharbuffer.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\version.cs" />\r
     <Compile Include="Assembly\AssemblyInfo.cs" />\r
+    <Compile Include="CoreFoundation\CFHelpers.cs" />\r
     <Compile Include="corefx\SR.cs" />\r
     <Compile Include="corert\AddrofIntrinsics.cs" />\r
     <Compile Include="corert\Debug.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..33f1c83c097edfc401399168ac636af1bec8811e 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
@@ -1690,3 +1690,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 c3f493f88dc42349fc0aa8e0b9274ee08b03d2a5..436cc7b930ed01a0c0d17fdaaf0970683c6e0398 100644 (file)
@@ -35,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;
@@ -45,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 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 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 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 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 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 81a92adc2e1a3ceb6b36797384d078e8770b7666..bfd0a23e506637525fb7cc13ec5a10c9f611398c 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * appdomain.c: AppDomain functions
+/**
+ * \file
+ * AppDomain functions
  *
  * Authors:
  *     Dietmar Maurer (dietmar@ximian.com)
@@ -229,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
@@ -336,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*
@@ -361,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)
@@ -393,7 +391,7 @@ mono_context_init_checked (MonoDomain *domain, MonoError *error)
 
 /**
  * mono_runtime_cleanup:
- * @domain: unused.
+ * \param domain unused.
  *
  * Internal routine.
  *
@@ -422,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 ()
 {
@@ -437,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)
@@ -454,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)
@@ -492,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
  *
@@ -649,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)
@@ -675,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)
@@ -728,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)
@@ -744,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)
@@ -1857,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)
 {
@@ -2371,6 +2373,9 @@ ves_icall_System_AppDomain_InternalGetProcessGuid (MonoStringHandle newguid, Mon
        return newguid;
 }
 
+/**
+ * mono_domain_is_unloading:
+ */
 gboolean
 mono_domain_is_unloading (MonoDomain *domain)
 {
@@ -2560,12 +2565,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)
@@ -2586,10 +2591,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 01cd44d5aacfc41978002266dd6ff6448790cdd2..65dc09f8712bc485f15fb4d5e45bc427f8037be8 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 aa900409470e52ba1c0b1d51e3ed2ca1608d7215..097ce878007517266c8bdec27627ea0dd25267bb 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. 
@@ -491,15 +492,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)
@@ -546,7 +547,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.
@@ -595,8 +596,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.
@@ -916,6 +917,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)
 {
@@ -924,12 +931,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*
@@ -966,7 +973,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
@@ -1151,11 +1158,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)
@@ -1188,6 +1195,9 @@ mono_assembly_get_assemblyref (MonoImage *image, int index, MonoAssemblyName *an
        }
 }
 
+/**
+ * mono_assembly_load_reference:
+ */
 void
 mono_assembly_load_reference (MonoImage *image, int index)
 {
@@ -1298,11 +1308,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)
@@ -1320,6 +1330,9 @@ struct AssemblyLoadHook {
 
 AssemblyLoadHook *assembly_load_hook = NULL;
 
+/**
+ * mono_assembly_invoke_load_hook:
+ */
 void
 mono_assembly_invoke_load_hook (MonoAssembly *ass)
 {
@@ -1330,6 +1343,9 @@ mono_assembly_invoke_load_hook (MonoAssembly *ass)
        }
 }
 
+/**
+ * mono_install_assembly_load_hook:
+ */
 void
 mono_install_assembly_load_hook (MonoAssemblyLoadFunc func, gpointer user_data)
 {
@@ -1405,6 +1421,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)
 {
@@ -1427,6 +1446,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)
 {
@@ -1444,12 +1466,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)
 {
@@ -1502,6 +1530,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)
 {
@@ -1516,6 +1547,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)
 {
@@ -1608,10 +1642,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
  */
@@ -1654,28 +1688,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 *
@@ -1815,7 +1849,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
@@ -1919,11 +1953,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)
@@ -1944,25 +1978,25 @@ 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)
@@ -1972,21 +2006,21 @@ mono_assembly_open (const char *filename, MonoImageOpenStatus *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 *
@@ -2137,22 +2171,22 @@ mono_assembly_load_from_predicate (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.
  
  */
@@ -2165,7 +2199,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).
@@ -2581,13 +2615,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)
@@ -2597,12 +2631,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)
@@ -2614,18 +2648,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)
 {
@@ -2634,6 +2677,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)
 {
@@ -2719,20 +2765,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)
@@ -3189,7 +3235,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)
@@ -3463,19 +3509,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)
@@ -3485,15 +3531,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)
@@ -3503,12 +3549,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)
@@ -3525,12 +3571,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)
@@ -3616,9 +3662,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
@@ -3628,6 +3674,9 @@ mono_assembly_close (MonoAssembly *assembly)
                mono_assembly_close_finish (assembly);
 }
 
+/**
+ * mono_assembly_load_module:
+ */
 MonoImage*
 mono_assembly_load_module (MonoAssembly *assembly, guint32 idx)
 {
@@ -3646,12 +3695,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.
@@ -3730,6 +3779,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)
 {
@@ -3749,9 +3801,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)
@@ -3761,11 +3813,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)
@@ -3773,6 +3825,9 @@ mono_assembly_get_name (MonoAssembly *assembly)
        return &assembly->aname;
 }
 
+/**
+ * mono_register_bundled_assemblies:
+ */
 void
 mono_register_bundled_assemblies (const MonoBundledAssembly **assemblies)
 {
index 9b12cafdf66f4d4cc0e9e1c339ed49833ef06917..1a6f3519840656ccf57af040577abd81d209cf51 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef _MONONET_METADATA_ASSEMBLY_H_ 
 #define _MONONET_METADATA_ASSEMBLY_H_
 
index 6aba8e215b47e5d4acfb51f594c7b384dd1cb0cb..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)
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 f0fa3579f72bcfd9b456132a305819cc8cc5e075..107022576d02563a69f22a4e2c76e193d77f5b5b 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)
@@ -270,15 +271,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)
@@ -306,12 +307,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)
@@ -321,12 +322,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)
@@ -336,13 +337,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
@@ -1705,19 +1706,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
@@ -1728,23 +1729,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
@@ -1755,12 +1756,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*
@@ -1825,13 +1826,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)
@@ -1865,9 +1866,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. 
  */
@@ -1902,7 +1903,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 24e9afa16d5c400765431100fafa54a57056930e..1a2970b1e6bb37ad0d35ba84fa925cb3ef372aa4 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 b830214e8838eea0f63b3ea4125a41fe65b53a8e..84ddd824129bb829934999f43fa70cb5bf633ec1 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * cominterop.c: COM Interop Support
+/**
+ * \file
+ * COM Interop Support
  * 
  *
  * (C) 2002 Ximian, Inc.  http://www.ximian.com
@@ -930,9 +931,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)
@@ -1045,9 +1045,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 *
@@ -2179,9 +2178,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 7d60b770fe57a3999f7c0ba60b19ed292b2c157a..2ad4210f7563f413d0175f37021fcfe1b6fd8b40 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 295ab4e928cae0412972d5491bb1de4b5bbb47d4..75a9b3bd8c41c6717eaa807afbf4004c9e2d1dd3 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * coree.c: mscoree.dll functions
+/**
+ * \file
+ * mscoree.dll functions
  *
  * Author:
  *   Kornel Pal <http://www.kornelpal.hu/>
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 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 3cac05ef00e9e8259f8c8f0a5afe872e643f2691..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)
@@ -827,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
@@ -843,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
@@ -894,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)
 {
@@ -924,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
@@ -1076,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
@@ -1090,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
@@ -1102,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.
  */
@@ -1141,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 ecd89bef1e0415862979b32882fabb486a3ee642..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.
index a35350dc9a99c1f83c9c418df48d126125b0c578..12e88ace7cc7775f155ace68f0e9a3c4cf13f005 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * domain.c: MonoDomain functions
+/**
+ * \file
+ * MonoDomain functions
  *
  * Author:
  *     Dietmar Maurer (dietmar@ximian.com)
@@ -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)
@@ -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..e645673e69ba22d15aeb4e3832c8cabe30273081 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:
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 2f3b7f7f27fc1a5dec9a8c1d2adb5193ed908486..010f6863367afbecadd989050d69a9b5ebbb006d 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * icall.c:
+/**
+ * \file
  *
  * Authors:
  *   Dietmar Maurer (dietmar@ximian.com)
@@ -7285,10 +7285,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
@@ -8085,12 +8095,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.
@@ -8101,15 +8111,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
@@ -8269,11 +8280,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.
@@ -8402,6 +8412,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 a886f17f202a3ca66d143279002e952201426fe2..688bc3c50ba3decfab81a59a1f5b476dfbc7aea0 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)
 {
@@ -1195,7 +1202,6 @@ static const IgnoredAssemblyVersion ignored_assembly_versions [] = {
 gboolean
 mono_assembly_is_problematic_version (const char *name, guint16 major, guint16 minor, guint16 build, guint16 revision)
 {
-       return FALSE;
        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 ||
@@ -1396,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)
@@ -1421,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)
@@ -1451,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)
 {
@@ -1465,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)
 {
@@ -1538,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)
 {
@@ -1581,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)
 {
@@ -1697,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)
@@ -1713,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 *
@@ -1732,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 *
@@ -1758,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)
 {
@@ -1831,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)
@@ -2169,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
  */
@@ -2183,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)
@@ -2285,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
@@ -2356,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)
@@ -2371,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)
@@ -2470,6 +2485,9 @@ done:
        return res;
 }
 
+/**
+ * mono_image_load_file_for_image:
+ */
 MonoImage*
 mono_image_load_file_for_image (MonoImage *image, int fileidx)
 {
@@ -2481,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*
@@ -2509,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
@@ -2535,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*
@@ -2571,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)
@@ -2583,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)
@@ -2595,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)
 {
@@ -2609,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)
 {
@@ -2617,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)
 {
@@ -2625,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)
@@ -2639,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)
@@ -2654,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
@@ -2789,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
  */
@@ -2808,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
  */
@@ -2824,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 113fe1f2136b731aaf260dcff8c54a5492e9e02d..403199d0c9a2cc2d5fe1cfc6629f1bbd7d889ccf 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 16fcbdb0618c251bb1b90d3bfbf8e4b22cf8ee7a..1ec84e6533be4aa4c2f718d06ab82e93e5010b3f 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..3f898dba5a0709d6996a54f9c86c0b370659c111 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)
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 cdd4a301dbad590e1e9187de5d9d558350dda983..3ed3136236cc98661bb1758e92879596222f332a 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef __MONO_METADATA_INTERNALS_H__
 #define __MONO_METADATA_INTERNALS_H__
@@ -937,5 +940,8 @@ 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 fe82c2e037bef78c7074f11e22a817abd3093f40..413d7c40831df779ddf96fb371932d1f9f1dd9c3 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-config.c
+/**
+ * \file
  *
  * Runtime and assembly configuration file support routines.
  *
@@ -465,6 +465,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)
 {
@@ -516,8 +519,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
@@ -567,6 +569,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)
 {
@@ -579,6 +584,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)
 {
@@ -591,6 +599,9 @@ mono_config_string_for_assembly_file (const char *filename)
        return NULL;
 }
 
+/**
+ * mono_config_for_assembly:
+ */
 void 
 mono_config_for_assembly (MonoImage *assembly)
 {
@@ -633,10 +644,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)
 {
@@ -679,6 +692,9 @@ mono_set_config_dir (const char *dir)
                mono_cfg_dir = mono_cfg_dir_allocated = g_strdup (dir);
 }
 
+/**
+ * mono_get_config_dir:
+ */
 const char* 
 mono_get_config_dir (void)
 {
@@ -688,12 +704,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)
 {
@@ -889,12 +911,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 28b209d4f31249ccde284e54c4d9715c7f35eabc..7a03a77ef05d99254025e00f2e7c185875dd765f 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * security.c:  Security internal calls
+/**
+ * \file
+ * Security internal calls
  *
  * Author:
  *     Sebastien Pouliot  <sebastien@ximian.com>
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..4fb3b6b653833aec939efc924ffac256a78ceb2b 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)
 {
@@ -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 4e3b30f011541330aa48beb58265f4b6d68a9d17..efff08c45240111f006b7388b90f9eb498258c29 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..f410534223dacd272fa9c95d6320d0426eab7438 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * threadpool-worker.c: native threadpool worker
+/**
+ * \file
+ * native threadpool worker
  *
  * Author:
  *     Ludovic Henry (ludovic.henry@xamarin.com)
index 00cf11d64d09132ed4f7e120ea7bd9f0c95c69a4..e6f6e10eb42f4068b3bcb97478065b476c155c45 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #ifndef _MONO_METADATA_THREADPOOL_WORKER_H
 #define _MONO_METADATA_THREADPOOL_WORKER_H
index 0b36a37cee925f982d5d36686cbfecfb4e31e881..cf9a8e69deb9d4be8c5262e2ea07bd343b2e48ce 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * threadpool.c: Microsoft threadpool runtime support
+/**
+ * \file
+ * Microsoft threadpool runtime support
  *
  * Author:
  *     Ludovic Henry (ludovic.henry@xamarin.com)
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 cda335d25a69471d6ef9d5a5114f3cda884f9f27..06aed504381819cb8b07c308a21a7a89493c8466 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 bd221429641102adfe0c73ebc4a61029cc75e08a..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)
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 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 59a123ed0573475ceb7e0551c9ee6c1b7171bbfb..5ef9b0253805706ec4d2ebda94cdea752542d534 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)
@@ -8062,48 +8063,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 622ad2e4f95b94cdbd824482273c823d16519edf..8cd1999b0857569f330efbad6c882ebc5bd68533 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)
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 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 e18cb98d643bd015f474be8bec56aa36e03706b6..8cd39fc9b4329a01158cabb7e50620a08e1e4f72 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 7a64689897785245979c39f23330243fe86d3ee5..9e09e7a944eb5d7a64fc7f6ef9c1f030ea93ea99 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)
@@ -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)
 {
@@ -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 
@@ -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.
  */
@@ -2287,6 +2289,9 @@ mono_main (int argc, char* argv[])
        return 0;
 }
 
+/**
+ * mono_jit_init:
+ */
 MonoDomain * 
 mono_jit_init (const char *file)
 {
@@ -2295,22 +2300,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 +2324,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 +2341,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 +2366,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 +2385,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 +2416,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 +2432,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 +2523,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 +2538,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 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 493dbc85a70b677bcf498cf3218b579892dc9528..d5f9545776ef4c46362d301961cd2b2bbb0a00b3 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 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 9207195fa150f38a485c56a18452185a48d94888..5f44592287d9a2d157b9e07002017214d988110a 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * PLEASE NOTE: This is a research prototype.
  *
  *
@@ -484,9 +485,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 +701,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 +763,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 +923,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 +945,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 +1288,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 +1355,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 +1370,7 @@ handle_enum:
                        }
                        break;
                case MONO_TYPE_STRING:
+               case MONO_TYPE_PTR:
                case MONO_TYPE_CLASS:
                case MONO_TYPE_ARRAY:
                case MONO_TYPE_SZARRAY:
@@ -1595,23 +1635,13 @@ 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)
 {
        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
@@ -2443,7 +2473,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 +2789,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 +3071,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 +3190,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 +3296,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 +3457,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: {
@@ -4078,9 +4123,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:
        {
index cd3514fa7ef08a02f13453df1fdbcd32a90202e3..6189b3d1be4e709841609b011a0ec76182cb2b5f 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_INTERPRETER_H__
 #define __MONO_MINI_INTERPRETER_H__
 #include <mono/mini/mini.h>
index 5b4d69269e851cb3cbab24ba2d5996c093c15035..e1c58ecf7a968643c8ac0ae638088dfa4f4aea01 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Utilities for handling interpreter VM instructions
  *
  * Authors:
index e787526e2febe225faeb272671a1f38770600f42..7a9bc4da017922de3a485fcdaf71cc9669083c6a 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __INTERPRETER_MINTOPS_H
 #define __INTERPRETER_MINTOPS_H
 
index 480fe0bdb3a38540a1f2e5fedce207efac955ab4..1b1776867fcc1bfe1b585db11a1e008a96c4ea3f 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);
@@ -3308,7 +3309,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 +3326,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 522438da5b06d3cf9168208ca95f5ed579144006..859cccd112dac40e219798182f98dc0b5b98dcec 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 cfdc728c0d019e49bf5b19d187be5919eb0d0465..b98c7a57528eb1827e5a95997bcffd63780a8d4f 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 20fb8d23719ac2f86437015040f66a228100b835..18533d7702645ca812c6332ca371ee9e63cac592 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)
@@ -4880,18 +4881,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)
index c4518da3deda497facfea4dd426603893915f970..bd9c3b1f198cc38c072e460ce10adc8be10bef92 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>
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 0ad34cf0075905ae49bfdd8aff96c117ca39f027..316a2f673d483f81e88a007417afbb44c41c17ac 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.
  *
@@ -1297,8 +1298,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)
@@ -3501,16 +3501,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)
@@ -7596,12 +7594,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 8b9ca55c9bab6bf9650ea7905779444c53cfe9c4..ace42c42331376aa3963e919f8a60b06dc6ead45 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_AMD64_H__
 #define __MONO_MINI_AMD64_H__
 
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 1ab5eeab15c852da548777f57ae2659139d46854..30107af99ccf076dc30832114815a0aff6256ce7 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)
@@ -1647,8 +1648,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 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..b81873b49317059276dd8812cfbc326277b947d1 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>
index b828218887d6baf99a453afe60d2fbc07e54c70a..ed8e402455efc5e3c159c3f5172219620f844761 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MINI_ARM64_GSHAREDVT_H__
 #define __MINI_ARM64_GSHAREDVT_H__
 
index 1305cb6c23ec48bf66a67fb666ac5f3ec715d589..e6a76ad1f00a07ca06a90ab45d762808d173d97a 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)
  * 
index bc634c4f30fc36f9ca40374626e0df8e90da5567..f6dc7946c110941b8f7fa1c2f60a1974db48b0a1 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mini-arm64.h
+/**
+ * \file
  *
  * Copyright 2013 Xamarin Inc
  *
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 28e04d6d6288388a8ca141a481b7262cd1b7ea5a..14bd722aca127a552c040e3981bad1c77974822a 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 d83009b18342bba963006a88588cd354e06ed4ab..31e775ecc9e5c7f004307a52a8ba1d897d5a0c53 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..2f42b49f91a3df7a56ecab070a046432a569c9ae 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)
index e60d80a4ff2dfddda2329ed7005509e5c58b3990..8a629bceb62f56a7ec937e3028c80e002a94df01 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)
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 3fb5dfce0117b9e7df33932b2fa3a7de384465fd..b31eb601de6249b175f98f887bd4d83d73daa203 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)
index 027a16fa3c75ec9a48dcede0540f1996e42c2c48..483729d1c3bbc03b3a2ee5dfb392b183c0470b72 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_LLVM_H__
 #define __MONO_MINI_LLVM_H__
 
index 4eecb95e25bc1ed7e6ddbc5def91439dbaf392ed..70e1a2ccb300853c6b82d6686a4330f361234bbf 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)
@@ -1323,8 +1324,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 3ecc77cf66b82cbaed40a6f7def0fabaad6591eb..838b8a9cd961307000be0460d90a65b5b4e7fa1f 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2003 Ximian, Inc
  * Copyright 2003-2011 Novell Inc
  * Copyright 2011 Xamarin Inc
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 c5b6750559c9f3eb66cedc0d92ececdfabb35ed0..9b404ff7c1c3b384c616b20f3b368bab1b514441 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_PPC_H__
 #define __MONO_MINI_PPC_H__
 
index 45de59b8565681db09a7c1e45aecab24b74e7db3..d8f22a99a33a17c5c41ae535a11d63334045cc5c 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;
@@ -843,9 +839,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)
@@ -2338,13 +2333,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)
@@ -4198,10 +4194,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..9fa04b07c61448197f13175b586bd7ace5b236b0 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                                    */
index a1a9941c48f0e0737bb71ef2d6ecfcbbd212235f..9747be08ce7f9b504e35437cda29af54bfdaf83d 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_S390X_H__
 #define __MONO_MINI_S390X_H__
 
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..c6835f196de75821f6652ff7bdaa9be4a5d01a2e 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)
@@ -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 f8394aba05a765e7fcb2be188c11c6fd09cbb210..6ab899b6ce9edc7fd2bb1d912734f48ada580bbe 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)
@@ -1073,8 +1074,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];
@@ -1998,6 +2002,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:
  *
@@ -2028,6 +2038,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;
                }
@@ -4826,14 +4861,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);
@@ -5784,12 +5811,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 ffe8387ee110459bf9ff5e87c13eb70aa7c378c7..5c40278e39d373a23da950143ee37b14b4054685 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MINI_X86_H__
 #define __MONO_MINI_X86_H__
 
index 21dd9c8f7ea21323fda7a86424318f7037c027b6..ac9c22f9ae18d14f7161b6730fb43ebaaf6e43fc 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)
index 93c53e0f0fad95c683bebca297e5c241fc559e81..90e217364bb95971d664c92587c951e4010975fb 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Copyright 2002-2003 Ximian Inc
  * Copyright 2003-2011 Novell Inc
  * Copyright 2011 Xamarin Inc
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 3782178bed347ce27a16b2c8334f24ef98ef2503..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
@@ -1057,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)
 {
@@ -1940,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[] = {
@@ -1968,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;
        }
 
@@ -2036,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);
@@ -2044,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 },
@@ -2053,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 }
@@ -2074,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;
        }
 
@@ -2152,13 +2279,14 @@ emit_vector_t_intrinsics (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSigna
        case SN_Equals:
                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 && fsig->ret->type == MONO_TYPE_BOOLEAN && mono_metadata_type_equal (fsig->params [0], type) && mono_metadata_type_equal (fsig->params [1], type))
+               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;
 
@@ -2218,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;
@@ -2235,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 ();
                }
@@ -2274,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..cf5d75e4ceb0c901e6e0e806450239f35ec3823b 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)
@@ -1008,7 +1009,7 @@ 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;
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..2872b1c13329feaaa1dc433d66be3f3a6883c1a3 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)
@@ -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)
 {
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..e80cd023dccd22b75239bfbde9a26d811d18c319 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*
@@ -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)
 {
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..95c2eafb0aecb440fe83c961f8e448bc52a9f14b 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)
index 32ab65ba8cda81118f2a16007cef51fda25a7b5a..364dcacae6a6ce4bba2f912408de565511def8a2 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)
index db7e3d9ad0f2ea907ed0398dbaf9af0bcd95b086..c89f2038b2047c1013a92b712a7c5359310229ea 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                                    */
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..0caf863f70f5f03d978a58dee9f38a06b551b4e2 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)
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 ec27de4224b9520a93998439738af18de6bbf08d..fb6082ab6ab097da6911bab9a45fa1e0280ecead 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 cbef28ab7249edbfda165289c5f62966b01661e7..b5303524f2181cda052be396bda400893a7becc3 100644 (file)
@@ -934,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 \
@@ -973,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 \
@@ -1002,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 \
@@ -1034,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 \
@@ -1069,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 \
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 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 c22260a47aad65ca62b6157d415400a5218cf379..5c706e6b9171e12f18f4e7193b19478a9eeb35c4 100644 (file)
@@ -33,8 +33,6 @@ endif
 
 TEST_RUNNER_ARGS += $(if $(V), --verbose,)
 
-CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
-
 if FULL_AOT_TESTS
 TEST_RUNNER += --aot-run-flags "$(AOT_RUN_FLAGS)" --aot-build-flags "$(AOT_BUILD_FLAGS)"
 endif
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 51524916490be41b7181cf2cb0c697f5745dcdd6..71a0d8d62577fff3eba913fe17b1a65e7514d338 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 07822b8d62b8695f1dbde2d70663f22e597288af..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)
index dea2a526f81af4fff9ddc66d934732cf0c6cb9b7..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)
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 00fad690193a5f8415f4afc317b1c28afa97fd99..9d5722e33a1be79c5e67a36369b814bf4ece1811 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 7e22eafa8cc9cf25b2c9870a6ad44c42e5e3df0b..abbe812f5928d6ea6a83795111dbd928f0da9bc2 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 5cc59c77fbe6dd87bf56d097df56dc7380e9baf9..4b32dfb0334b17fe02402fde748554536f770b1b 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #include <string.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -70,11 +74,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.
  */
@@ -98,11 +100,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 
@@ -116,11 +116,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 
@@ -134,9 +132,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.
  */
@@ -176,9 +172,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 
@@ -193,11 +187,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 
@@ -432,10 +424,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.
@@ -470,11 +460,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)
@@ -486,11 +473,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 10a190ff9b059383a5705e6e0e5d765a79a7122d..ccfcb0b8ac029d3e64c318cc5d98f447d9aea6cf 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 a51253c1d86a1baee8fb210a5fcdf4640358443c..6b2bb98eef90e81d7b6e9a95a063d4f31e076482 100644 (file)
@@ -1,5 +1,5 @@
-/*
- * mono-rand.c: 
+/**
+ * \file
  *
  * Authors:
  *      Mark Crichton (crichton@gimp.org)
@@ -254,14 +254,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 c63f7d3f420d059bc9caf696c879c9488032ed3f..c067ce22512786dd24cfea7715080b2355f48063 100644 (file)
@@ -1,3 +1,7 @@
+/**
+ * \file
+ */
+
 #ifndef __MONO_MONO_SIGCONTEXT_H__
 #define __MONO_MONO_SIGCONTEXT_H__
 
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 ed6b1807a3a22a97bcba35b62862c27e3a09e670..c7ad2cedd416318e210e14ebcaebb3134b3ba431 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 a468cd9383db908131ff4eaf1f02de369c3ca701..ddc0a02ac183c904def40e251be8f4697fd3f31e 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 f9723108cbe2963ced056d839aba6491312a6831..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
index 20e87174b45784a420c5595e93f9476c797466e1..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)
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 ca5423cfbab59022afd6d503672b1cf81032284e..9dd245e29cc21af0c7a8088303dcb6ba0034f66b 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 *
@@ -99,21 +99,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)
 {
@@ -163,12 +162,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)
@@ -217,15 +214,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)
@@ -284,17 +279,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 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 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 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 "$@"